Repository navigation
GitHub Copilot SDK for Java 1.0.9-preview.0
Pre-releaseInstallation
vMaj.Min.Micro. For example v0.1.32. The corresponding maven version for the release will be Maj.Min.Micro-java.N, where Maj, Min and Micro are the corresponding numbers for the reference implementation release, and N is a monotonically increasing sequence number starting with 0 for each release. See the corresponding architectural decision record for more information in the docs/adr directory of the source code.
📦 [View on Maven Central]((central.sonatype.com/redacted)
📖 [Documentation]((github.github.io/redacted) · [Javadoc]((github.github.io/redacted)
Maven
<dependency>
<groupId>com.github</groupId>
<artifactId>copilot-sdk-java</artifactId>
<version>1.0.9-preview.0</version>
</dependency>Gradle (Kotlin DSL)
implementation("com.github:copilot-sdk-java:1.0.9-preview.0")Gradle (Groovy DSL)
implementation 'com.github:copilot-sdk-java:1.0.9-preview.0'Feature: AgentStop lifecycle hook
The agentStop hook lets your application intercept the natural end of an agent turn and optionally request the agent to continue. Return { decision: "block", reason: "..." } to queue a follow-up prompt; return nothing to let the agent stop normally. (#2054)
SessionHooks hooks = new SessionHooks()
.setOnAgentStop((input, invocation) -> {
if (!input.isStopHookActive() && needsValidation()) {
return CompletableFuture.completedFuture(
new AgentStopHookOutput()
.setDecision("block")
.setReason("Run final validation and fix any failures.")
);
}
return CompletableFuture.completedFuture(null);
});Feature: custom JSON schema for @CopilotToolParam
A new schema attribute on @CopilotToolParam lets you provide an explicit JSON Schema for parameters whose types cannot be auto-mapped by the schema generator — for example, third-party or internal types. (#2069)
`@CopilotTool`("Schedule a deployment")
public String scheduleDeployment(
`@CopilotToolParam`(value = "Deployment time in ISO-8601",
schema = "{\"type\":\"string\",\"format\":\"date-time\"}")
com.acme.internal.AcmeDateTime deployTime) {
return "Scheduled for " + deployTime;
}Other changes
- feature: [Java] enforce non-blank
@CopilotToolParamdescription at compile time (#1980)
New contributors
@rinceyuanmade their first contribution in #1980@belaltaher8made their first contribution in #2054
Generated by Release Changelog Generator · sonnet46 43.8 AIC · ⌖ 6.15 AIC · ⊞ 8.6K