Visitar URL original
Release GitHub Copilot SDK for Java 1.0.9-preview.0 · github/copilot-sdk · GitHub
Skip to content

GitHub Copilot SDK for Java 1.0.9-preview.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 30 Jul 04:58
· 337 commits to main since this release

Installation

⚠️ Artifact versioning plan: Releases of this implementation track releases of the reference implementation. For each release of the reference implementation, there may follow a corresponding release of this implementation with the same number as the reference implementation. Release identifiers of the reference implementation are in the form 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 @CopilotToolParam description at compile time (#1980)

New contributors

  • @rinceyuan made their first contribution in #1980
  • @belaltaher8 made their first contribution in #2054

Generated by Release Changelog Generator · sonnet46 43.8 AIC · ⌖ 6.15 AIC · ⊞ 8.6K