-
Notifications
You must be signed in to change notification settings - Fork 128
feat: add Kotlin coroutine extension layer (Mono -> suspend, Flux -> Flow) #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add Kotlin coroutine extension layer (Mono -> suspend, Flux -> Flow) #376
Conversation
|
The remaining failure appears to be in agentscope-extensions-a2a-client, which is unrelated to this PR. |
| // Cached sorted hooks (invalidated when hooks list changes) | ||
| private transient volatile List<Hook> cachedSortedHooks; | ||
| private final AtomicBoolean hooksDirty = new AtomicBoolean(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert these changes
| <kotlin.version>1.9.24</kotlin.version> | ||
| <kotlin.coroutines.version>1.8.1</kotlin.coroutines.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version should be managed in agentscope-dependencies-bom
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>agentscope-kotlin</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <artifactId>agentscope-kotlin</artifactId> | |
| <artifactId>agentscope-extensions-kotlin</artifactId> |
AgentScope-Java Version
1.0.4-SNAPSHOT
Description
This PR adds a Kotlin coroutine extension layer for AgentScope Java to improve the Kotlin developer experience while keeping Reactor as the core async implementation.
A new optional module
agentscope-kotlinis introduced underagentscope-extensions, providing Kotlin-friendly APIs on top of existing Reactor-based methods:Mono<Msg>→suspend funFlux<Event>→Flow<Event>Mono<Void>→suspend funreturningUnitAll extensions are implemented as Kotlin extension functions, so no existing Java APIs or behaviors are changed.
What’s Included
agentscope-kotlinextension moduleAgent.call(...),Agent.observe(...), andAgent.stream(...)kotlinx-coroutines-reactorfor non-blocking interoperabilityExample Usage