Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
62c1e25
On branch edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 5, 2026
2ad3c39
On branch edburns/dd-2785864-pre-public-non-code-changes Prepare for …
edburns Mar 6, 2026
2f10ab3
On branch edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 9, 2026
93908c9
On branch edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 9, 2026
d36624b
On branch edburns/dd-2785864-pre-public-non-code-changes Reference im…
edburns Mar 9, 2026
6b94284
Merge remote-tracking branch 'public-upstream/main' into edburns/dd-2…
edburns Mar 9, 2026
a5ee484
Merge branch 'public-upstream/public-upstream-main' into edburns/dd-2…
edburns Mar 12, 2026
a607f1d
On branch edburns/dd-2785864-pre-public-non-code-changes Publish to s…
edburns Mar 12, 2026
9ce8275
On branch edburns/dd-2785864-pre-public-non-code-changes Correct arti…
edburns Mar 12, 2026
36fcf4b
On branch edburns/dd-2824425-fix-record-vs-getter-discrepancy
edburns Mar 12, 2026
f0b2e63
Update src/site/markdown/advanced.md
edburns Mar 12, 2026
26a39e7
Update src/site/markdown/documentation.md
edburns Mar 12, 2026
4fff65f
Merge pull request #189 from edburns/edburns/dd-2824425-fix-record-vs…
edburns Mar 12, 2026
90eb590
Merge remote-tracking branch 'public-upstream/main' into edburns/dd-2…
edburns Mar 12, 2026
3fbefc8
Initial plan
Copilot Mar 12, 2026
b3a2826
Add Automatic-Module-Name to JAR manifest via maven-jar-plugin
Copilot Mar 12, 2026
99c341e
Merge pull request #191 from copilot-community-sdk/copilot/add-automa…
edburns Mar 12, 2026
5533f1c
Merge remote-tracking branch 'public-upstream/main' into edburns/dd-2…
edburns Mar 12, 2026
29b41c7
Put the publish-snapshot workflow on main
edburns Mar 12, 2026
86b23e6
On branch edburns/dd-2824811-smoke-test Execute this prompt to create…
edburns Mar 12, 2026
4a5aa18
Merge pull request #192 from edburns/edburns/dd-2824811-smoke-test
edburns Mar 12, 2026
9de12e1
Merge branch 'public-upstream/public-upstream-main' into edburns/dd-2…
edburns Mar 12, 2026
2361886
Consider the content of `smoke-test` to be ignorable.
edburns Mar 12, 2026
c0d8668
Merge branch 'public-upstream/public-upstream-main' into edburns/dd-2…
edburns Mar 12, 2026
562028c
Merge branch 'copilot-community-sdk:main' into main
edburns Mar 12, 2026
412690a
Small updates to Quick Start for better automated testing
edburns Mar 12, 2026
012d2e3
On branch edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 12, 2026
54ba35f
Fix flaky CompactionTest: wait for compaction complete event with Cou…
Copilot Mar 12, 2026
7c32952
On branch edburns/dd-2785864-pre-public-non-code-changes The artifac…
edburns Mar 14, 2026
144ea1b
On branch edburns/dd-2785864-pre-public-non-code-changes Fix artifactId
edburns Mar 14, 2026
1186376
On branch edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 14, 2026
6362bdc
On branch edburns/dd-2785864-pre-public-non-code-changes Document ver…
edburns Mar 14, 2026
3809ed1
On branch edburns/dd-2785864-pre-public-non-code-changes Disclaimer a…
edburns Mar 14, 2026
d9a8603
On branch edburns/dd-2785864-pre-public-non-code-changes Pin actions …
edburns Mar 14, 2026
0a0789a
On branch edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 14, 2026
cb16f95
Merge branch 'main' into edburns/dd-2785864-pre-public-non-code-changes
edburns Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* edburns@github.com
* @github/copilot-sdk-java
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copilot Instructions for copilot-sdk-java

A Java SDK for programmatic control of GitHub Copilot CLI. This is a community-driven port of the official .NET SDK, targeting Java 17+.
A Java SDK for programmatic control of GitHub Copilot CLI. This is a port of the official .NET SDK, targeting Java 17+.

## About These Instructions

Expand Down Expand Up @@ -124,7 +124,7 @@ session.createSession(new SessionConfig()
Sessions emit typed events via `session.on()`:

```java
session.on(AssistantMessageEvent.class, msg -> System.out.println(msg.getData().getContent()));
session.on(AssistantMessageEvent.class, msg -> System.out.println(msg.getData().content()));
session.on(SessionIdleEvent.class, idle -> done.complete(null));
```

Expand Down
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

changelog:
header: |
📋 **Full Changelog**: See [CHANGELOG.md](https://github.com/copilot-community-sdk/copilot-sdk-java/blob/main/CHANGELOG.md) for detailed release notes.
📋 **Full Changelog**: See [CHANGELOG.md](https://github.com/github/copilot-sdk-java/blob/main/CHANGELOG.md) for detailed release notes.
exclude:
labels:
- ignore-for-release
Expand Down
22 changes: 13 additions & 9 deletions .github/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
<div class="hero-bg"></div>
<div class="hero-content">
<h1>Copilot SDK for <span class="gradient-text">Java</span></h1>
<p class="hero-subtitle">An unofficial, community-driven SDK for building AI-powered tools with GitHub Copilot's agentic runtime.</p>
<p class="hero-subtitle">The official SDK for building AI-powered tools with GitHub Copilot's agentic runtime.</p>
<div class="header-buttons">
<a href="https://github.com/copilot-community-sdk/copilot-sdk-java" class="btn btn-github">
<a href="https://github.com/github/copilot-sdk-java" class="btn btn-github">
<svg height="20" width="20" viewBox="0 0 16 16"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
View on GitHub
</a>
<a href="https://central.sonatype.com/artifact/io.github.copilot-community-sdk/copilot-sdk" class="btn btn-maven">
<a href="https://central.sonatype.com/artifact/com.github/copilot-sdk" class="btn btn-maven">
<svg height="20" width="20" viewBox="0 0 24 24"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"></path></svg>
View on Maven Central
</a>
Expand All @@ -32,8 +32,12 @@ <h1>Copilot SDK for <span class="gradient-text">Java</span></h1>

<main class="container">

<div class="alert alert-warning">
⚠️ <strong>Disclaimer:</strong> This is an <strong>unofficial, community-driven SDK</strong> and is <strong>not supported or endorsed by GitHub</strong>. Use at your own risk.
<div class="alert alert-warning">
⚠️ <strong>Disclaimer:</strong> This is the official Java SDK for GitHub Copilot. This repository treats the official .NET and nodejs SDKs for GitHub Copilot as reference implementations. These SDKS are all officially supported as GitHub open source projects. The Java implementation follows the backward compatibility guarantees offered by the reference implementations. As such this implementation may introduce breaking changes, according to the policy declared by the reference implementations. Use at your own risk.
</div>

<div class="alert alert-warning">
⚠️ <strong>Artifact versioning plan:</strong>Releases of this implementation track releases of the reference implementation. For each release of the reference implementation, there may follow a corresponding relase 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 impementation release, and `N` is a monotonically increasing sequence number starting with 0 for each release. See the corrseponding architectural decision record for more information in the `docs/adr` directory of the source code.
</div>

<div class="alert alert-info">
Expand Down Expand Up @@ -71,13 +75,13 @@ <h2 class="section-title">Available Versions</h2>

<footer class="footer">
<div class="footer-links">
<a href="https://github.com/copilot-community-sdk/copilot-sdk-java">GitHub Repository</a>
<a href="https://github.com/github/copilot-sdk-java">GitHub Repository</a>
<span class="sep">·</span>
<a href="https://central.sonatype.com/artifact/io.github.copilot-community-sdk/copilot-sdk">Maven Central</a>
<a href="https://central.sonatype.com/artifact/com.github/copilot-sdk">Maven Central</a>
<span class="sep">·</span>
<a href="https://github.com/copilot-community-sdk/copilot-sdk-java/blob/main/LICENSE">MIT License</a>
<a href="https://github.com/github/copilot-sdk-java/blob/main/LICENSE">MIT License</a>
</div>
<p class="built-with">Built with ❤️ by <a href="https://github.com/brunoborges">Bruno Borges</a> and GitHub Copilot</p>
<p class="built-with">Built with ❤️ by Microsoft and GitHub Copilot</p>
</footer>

</main>
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: 22
- uses: actions/setup-java@v5
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: "17"
distribution: "temurin"
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:

- name: Upload test results for site generation
if: success() && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: test-results-for-site
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ jobs:
steps:
# Clone the repository
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

# Install GitHub CLI and gh-aw extension for Copilot Agent interaction
- name: Install gh-aw extension
uses: github/gh-aw/actions/setup-cli@v0.42.17
uses: github/gh-aw/actions/setup-cli@7a970851c1090295e55a16e549c61ba1ce227f16 # v0.42.17
with:
version: v0.42.17

# Setup Node.js
- uses: actions/setup-node@v6
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: 22

# Set up JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v5
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '17'
distribution: 'temurin'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v5
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Checkout gh-pages branch
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: gh-pages
path: site
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:

- name: Download test results from Build & Test
if: steps.tags.outputs.is_release == 'false' && inputs.rebuild_all_versions != true && github.event_name == 'workflow_run'
uses: actions/download-artifact@v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: test-results-for-site
path: /tmp/test-results
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
run: |
cd site

REPO_URL="https://github.com/copilot-community-sdk/copilot-sdk-java"
REPO_URL="https://github.com/github/copilot-sdk-java"

# Get versions from git tags (already sorted by version, descending)
VERSIONS=$(git -C .. tag -l | grep -E '^v?[0-9]+\.[0-9]+' | sed 's/^v//' | sort -Vr)
Expand Down Expand Up @@ -293,13 +293,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: 'site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
8 changes: 5 additions & 3 deletions .github/workflows/notes.template
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Installation

> ⚠️ **Disclaimer:** This is an **unofficial, community-driven SDK** and is **not supported or endorsed by GitHub**. Use at your own risk.
⚠️ **Disclaimer:** This is the official Java SDK for GitHub Copilot. This repository treats the official .NET and nodejs SDKs for GitHub Copilot as reference implementations. These SDKS are all officially supported as GitHub open source projects. The Java implementation follows the backward compatibility guarantees offered by the reference implementations. As such this implementation may introduce breaking changes, according to the policy declared by the reference implementations. Use at your own risk.

⚠️ **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 relase 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 impementation release, and `N` is a monotonically increasing sequence number starting with 0 for each release. See the corrseponding architectural decision record for more information in the `docs/adr` directory of the source code.

📦 [View on Maven Central](https://central.sonatype.com/artifact/${GROUP_ID}/${ARTIFACT_ID}/${VERSION})

📖 [Documentation](https://copilot-community-sdk.github.io/copilot-sdk-java/${VERSION}/) · [Javadoc](https://copilot-community-sdk.github.io/copilot-sdk-java/${VERSION}/apidocs/index.html)
📖 [Documentation](https://github.github.io/copilot-sdk-java/${VERSION}/) · [Javadoc](https://github.github.io/copilot-sdk-java/${VERSION}/apidocs/index.html)

## Maven
```xml
Expand All @@ -23,4 +25,4 @@ implementation("${GROUP_ID}:${ARTIFACT_ID}:${VERSION}")
## Gradle (Groovy DSL)
```groovy
implementation '${GROUP_ID}:${ARTIFACT_ID}:${VERSION}'
```
```
14 changes: 7 additions & 7 deletions .github/workflows/publish-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
outputs:
version: ${{ steps.versions.outputs.release_version }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -51,10 +51,10 @@ jobs:
- uses: ./.github/actions/setup-copilot

- name: Set up JDK 17
uses: actions/setup-java@v5
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: "17"
distribution: "temurin"
distribution: "microsoft"
cache: "maven"
server-id: central
server-username: MAVEN_USERNAME
Expand Down Expand Up @@ -111,10 +111,10 @@ jobs:

# Update version in README.md
sed -i "s|<version>[0-9]*\.[0-9]*\.[0-9]*</version>|<version>${VERSION}</version>|g" README.md
sed -i "s|copilot-sdk:[0-9]*\.[0-9]*\.[0-9]*|copilot-sdk:${VERSION}|g" README.md
sed -i "s|copilot-sdk-java:[0-9]*\.[0-9]*\.[0-9]*|copilot-sdk-java:${VERSION}|g" README.md

# Update version in jbang-example.java
sed -i "s|copilot-sdk:[0-9]*\.[0-9]*\.[0-9]*|copilot-sdk:${VERSION}|g" jbang-example.java
sed -i "s|copilot-sdk-java:[0-9]*\.[0-9]*\.[0-9]*|copilot-sdk-java:${VERSION}|g" jbang-example.java

# Update version in cookbook files (Maven will filter ${project.version} during site generation,
# but we also need the actual version for direct JBang usage)
Expand Down Expand Up @@ -169,13 +169,13 @@ jobs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Create GitHub Release
run: |
VERSION="${{ needs.publish-maven.outputs.version }}"
GROUP_ID="io.github.copilot-community-sdk"
GROUP_ID="com.github"
ARTIFACT_ID="copilot-sdk"
CURRENT_TAG="v${VERSION}"

Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Snapshot to Maven Central

env:
HUSKY: 0

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: publish-snapshot
cancel-in-progress: false

jobs:
publish-snapshot:
name: Publish SNAPSHOT to Maven Central
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- uses: ./.github/actions/setup-copilot

- name: Set up JDK 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: "17"
distribution: "microsoft"
cache: "maven"
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Verify version is a SNAPSHOT
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Publishing version: $VERSION"
if [[ "$VERSION" != *"-SNAPSHOT" ]]; then
echo "ERROR: This workflow only publishes SNAPSHOT versions. Current version: $VERSION"
exit 1
fi
echo "### Snapshot Publish" >> $GITHUB_STEP_SUMMARY
echo "- **Version:** $VERSION" >> $GITHUB_STEP_SUMMARY
echo "- **Repository:** Maven Central Snapshots" >> $GITHUB_STEP_SUMMARY

- name: Deploy Snapshot
run: mvn -B deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
6 changes: 3 additions & 3 deletions .github/workflows/weekly-upstream-sync.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/weekly-upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check for upstream changes
id: check
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ examples-test/
.merge-env
blog-copilotsdk/
.claude/worktrees
smoke-test
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"-Dcopilot.tests.dir=${workspaceFolder}/target/copilot-sdk/test"
]
},
"java.compile.nullAnalysis.mode": "automatic"
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic"
}
Loading
Loading