From 9e86db79561a060d503bca9516717a5dd2089304 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 12 May 2026 20:33:39 +0000
Subject: [PATCH 1/2] Initial plan
From befdd933a7b9600871316ecb00d5b59fdb2d7753 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 12 May 2026 20:47:33 +0000
Subject: [PATCH 2/2] fix: fix release version replacement for -beta-java.N
qualifier format
- Fix sed patterns in publish-maven.yml to use general qualifier regex
`\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*` that matches any version qualifier
format (-java.N, -java-preview.N, -beta-java.N) and also handles
previously-chained invalid versions
- Fix awk regex patterns in update-changelog.sh to recognize -beta-java.N
in [Unreleased] and version link patterns (-(beta-)?java(-preview)?.N)
- Fix duplicate [Unreleased] link bug: track unreleased_link_handled flag
so the first-version-link insertion block only fires when there is no
existing [Unreleased] link to update
- Move [Unreleased] handler before first-version-link handler in awk so
the flag is set before the later block evaluates it
- Update version validation regex to accept -beta-java.N format
- Fix CHANGELOG.md: remove duplicate [Unreleased] links and fix incorrect
predecessor version references for 1.0.0-beta-java.2 and .3
- Fix README.md, jbang-example.java, and cookbook markdown files:
replace chained invalid versions with correct 1.0.0-beta-java.3
- Fix test-update-changelog.sh: replace ((passed++)) with
passed=$((passed+1)) to avoid set -e triggering on arithmetic result 0;
add two new tests for beta-java format and no-duplicate-links guarantee
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
---
.../scripts/release/test-update-changelog.sh | 71 ++++++++++++++++++-
.github/scripts/release/update-changelog.sh | 31 ++++----
.github/workflows/publish-maven.yml | 16 ++---
CHANGELOG.md | 35 ++-------
README.md | 4 +-
jbang-example.java | 2 +-
src/site/markdown/cookbook/error-handling.md | 14 ++--
.../markdown/cookbook/managing-local-files.md | 4 +-
.../markdown/cookbook/multiple-sessions.md | 4 +-
.../markdown/cookbook/persisting-sessions.md | 6 +-
.../markdown/cookbook/pr-visualization.md | 2 +-
11 files changed, 116 insertions(+), 73 deletions(-)
diff --git a/.github/scripts/release/test-update-changelog.sh b/.github/scripts/release/test-update-changelog.sh
index ade87d6a94..b5fc8486b7 100755
--- a/.github/scripts/release/test-update-changelog.sh
+++ b/.github/scripts/release/test-update-changelog.sh
@@ -33,10 +33,10 @@ run_test() {
if $test_func; then
echo -e "${GREEN}PASSED${NC}"
- ((passed++))
+ passed=$((passed + 1))
else
echo -e "${RED}FAILED${NC}"
- ((failed++))
+ failed=$((failed + 1))
fi
}
@@ -180,6 +180,71 @@ EOF
fi
}
+# Test 6: Beta-java version format (e.g., 1.0.0-beta-java.N)
+test_beta_java_version() {
+ local test_file="${TEST_DIR}/test6.md"
+ cat > "$test_file" << 'EOF'
+# Changelog
+
+## [Unreleased]
+
+### Added
+- New feature
+
+## [1.0.0-beta-java.1] - 2026-05-01
+
+[Unreleased]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...HEAD
+[1.0.0-beta-java.1]: https://github.com/test/repo/compare/v0.3.0-java.2...v1.0.0-beta-java.1
+[0.3.0-java.2]: https://github.com/test/repo/releases/tag/0.3.0-java.2
+EOF
+
+ CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.0-beta-java.2 > /dev/null 2>&1
+
+ # The [Unreleased] link should now point to v1.0.0-beta-java.2
+ # [1.0.0-beta-java.2] should compare from v1.0.0-beta-java.1
+ if grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...HEAD" "$test_file" && \
+ grep -q "\[1.0.0-beta-java.2\]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2" "$test_file"; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+# Test 7: No duplicate [Unreleased] links when existing [Unreleased] link is present
+test_no_duplicate_unreleased_links() {
+ local test_file="${TEST_DIR}/test7.md"
+ cat > "$test_file" << 'EOF'
+# Changelog
+
+## [Unreleased]
+
+### Added
+- New feature
+
+## [1.0.0-beta-java.2] - 2026-05-08
+
+## [1.0.0-beta-java.1] - 2026-05-05
+
+[Unreleased]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...HEAD
+[1.0.0-beta-java.2]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2
+[1.0.0-beta-java.1]: https://github.com/test/repo/compare/v0.3.0-java.2...v1.0.0-beta-java.1
+[0.3.0-java.2]: https://github.com/test/repo/releases/tag/0.3.0-java.2
+EOF
+
+ CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.0-beta-java.3 > /dev/null 2>&1
+
+ # Count [Unreleased] link definitions - there should be exactly one
+ local unreleased_count
+ unreleased_count=$(grep -c "^\[Unreleased\]:" "$test_file")
+ if [ "$unreleased_count" -eq 1 ] && \
+ grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.0-beta-java.3...HEAD" "$test_file" && \
+ grep -q "\[1.0.0-beta-java.3\]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...v1.0.0-beta-java.3" "$test_file"; then
+ return 0
+ else
+ return 1
+ fi
+}
+
# Run all tests
echo "Running CHANGELOG update script tests..."
echo ""
@@ -189,6 +254,8 @@ run_test "Handle CHANGELOG without Unreleased link" test_no_unreleased_link
run_test "Preserve content structure" test_preserve_content
run_test "Error handling - no Unreleased section" test_no_unreleased_section
run_test "Multiple version handling" test_multiple_versions
+run_test "Beta-java version format (e.g., 1.0.0-beta-java.N)" test_beta_java_version
+run_test "No duplicate [Unreleased] links when existing link is present" test_no_duplicate_unreleased_links
echo ""
echo "=========================================="
diff --git a/.github/scripts/release/update-changelog.sh b/.github/scripts/release/update-changelog.sh
index ff35dec722..e21d03774e 100755
--- a/.github/scripts/release/update-changelog.sh
+++ b/.github/scripts/release/update-changelog.sh
@@ -45,6 +45,7 @@ BEGIN {
links_section = 0
first_version_link = ""
repo_url = ""
+ unreleased_link_handled = 0
}
# Track if we are in the links section at the bottom
@@ -53,7 +54,7 @@ BEGIN {
}
# Capture the repository URL from the first version link
-links_section && repo_url == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?\]:/ {
+links_section && repo_url == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?\]:/ {
match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\//, arr)
if (arr[1] != "") {
repo_url = arr[1]
@@ -86,28 +87,30 @@ skip_old_reference_impl && /^[[:space:]]*$/ { next }
skip_old_reference_impl && /^> \*\*Reference implementation sync:\*\*/ { next }
skip_old_reference_impl && !/^[[:space:]]*$/ && !/^> \*\*Reference implementation sync:\*\*/ { skip_old_reference_impl = 0 }
-# Capture the first version link to get the previous version
-links_section && first_version_link == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?\]:/ {
- match($0, /\[([0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?)\]:/, arr)
- if (arr[1] != "" && repo_url != "") {
- first_version_link = arr[1]
- # Insert Unreleased and new version links before first version link
- print "[Unreleased]: " repo_url "/compare/v" version "...HEAD"
- print "[" version "]: " repo_url "/compare/v" arr[1] "...v" version
- }
-}
-
-# Update existing [Unreleased] link if present
+# Update existing [Unreleased] link if present (must be checked before the first-version-link block)
links_section && /^\[Unreleased\]:/ {
# Get the previous version and repo URL from the existing link
- match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\/compare\/v([0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?)\.\.\.HEAD/, arr)
+ match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\/compare\/v([0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?)\.\.\.HEAD/, arr)
if (arr[1] != "" && arr[2] != "") {
print "[Unreleased]: " arr[1] "/compare/v" version "...HEAD"
print "[" version "]: " arr[1] "/compare/v" arr[2] "...v" version
+ unreleased_link_handled = 1
next
}
}
+# Capture the first version link to get the previous version
+# Only fires if the [Unreleased] link was not already handled above
+links_section && first_version_link == "" && !unreleased_link_handled && /^\[[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?\]:/ {
+ match($0, /\[([0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?)\]:/, arr)
+ if (arr[1] != "" && repo_url != "") {
+ first_version_link = arr[1]
+ # Insert Unreleased and new version links before first version link
+ print "[Unreleased]: " repo_url "/compare/v" version "...HEAD"
+ print "[" version "]: " repo_url "/compare/v" arr[1] "...v" version
+ }
+}
+
# Print all other lines unchanged
{ print }
' "$CHANGELOG_FILE" > "$TEMP_FILE"
diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml
index 99e61ac18f..f14987176a 100644
--- a/.github/workflows/publish-maven.yml
+++ b/.github/workflows/publish-maven.yml
@@ -87,8 +87,8 @@ jobs:
else
# Split version: supports "0.1.32", "0.1.32-java.0", and "0.1.32-java-preview.0" formats
# Validate RELEASE_VERSION format explicitly to provide clear errors
- if ! echo "$RELEASE_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-java(-preview)?\.[0-9]+)?$'; then
- echo "Error: RELEASE_VERSION '$RELEASE_VERSION' is invalid. Expected format: M.M.P, M.M.P-java.N, or M.M.P-java-preview.N (e.g., 1.2.3, 1.2.3-java.0, or 1.2.3-java-preview.0)." >&2
+ if ! echo "$RELEASE_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?$'; then
+ echo "Error: RELEASE_VERSION '$RELEASE_VERSION' is invalid. Expected format: M.M.P, M.M.P-java.N, M.M.P-java-preview.N, or M.M.P-beta-java.N (e.g., 1.2.3, 1.2.3-java.0, 1.2.3-java-preview.0, or 1.2.3-beta-java.0)." >&2
exit 1
fi
# Extract the base M.M.P portion (before any qualifier)
@@ -121,21 +121,21 @@ jobs:
# Update CHANGELOG.md with release version and Reference implementation sync hash
./.github/scripts/release/update-changelog.sh "${VERSION}" "${REFERENCE_IMPL_HASH}"
- # Update version in README.md (supports versions like 1.0.0, 0.1.32-java.0, and 0.3.0-java-preview.0)
- sed -i "s|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|${VERSION}|g" README.md
- sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" README.md
+ # Update version in README.md (supports any version qualifier like -java.N, -java-preview.N, -beta-java.N)
+ sed -i "s|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|${VERSION}|g" README.md
+ sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" README.md
# Update snapshot version in README.md
DEV_VERSION="${{ steps.versions.outputs.dev_version }}"
- sed -i "s|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}-SNAPSHOT|${DEV_VERSION}|g" README.md
+ sed -i "s|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*-SNAPSHOT|${DEV_VERSION}|g" README.md
# Update version in jbang-example.java
- sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" jbang-example.java
+ sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" jbang-example.java
sed -i 's|copilot-sdk-java:${project\.version}|copilot-sdk-java:'"${VERSION}"'|g' jbang-example.java
# Update version in cookbook files (hardcoded for direct GitHub browsing and JBang usage)
find src/site/markdown/cookbook -name "*.md" -type f -exec \
- sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" {} \;
+ sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" {} \;
# Commit the documentation changes before release:prepare (requires clean working directory)
git add CHANGELOG.md README.md jbang-example.java src/site/markdown/cookbook/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd49095408..5eb0397d56 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -506,38 +506,12 @@ New types: `GetForegroundSessionResponse`, `SetForegroundSessionResponse`
- Pre-commit hook for Spotless code formatting
- Comprehensive API documentation
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
-[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
-[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.1...HEAD
-[0.3.0-java-preview.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.1
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...HEAD
-[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...HEAD
-[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.2...HEAD
-[1.0.0-beta-java.2]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.2
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.3...HEAD
-[1.0.0-beta-java.3]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.3
+[1.0.0-beta-java.3]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.2...v1.0.0-beta-java.3
+[1.0.0-beta-java.2]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2
+[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1
[0.3.0-java.2]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java.2
-[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
-[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
-[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
-[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
-[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
-[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
-[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
-[0.2.1-java.0]: https://github.com/github/copilot-sdk-java/compare/v0.1.32-java.0...v0.2.1-java.0
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
-[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
-[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
-[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
-[0.2.1-java.0]: https://github.com/github/copilot-sdk-java/compare/v0.1.32-java.0...v0.2.1-java.0
-[0.1.32-java.0]: https://github.com/github/copilot-sdk-java/compare/v1.0.11...v0.1.32-java.0
-[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
+[0.3.0-java-preview.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.1
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
@@ -555,4 +529,3 @@ New types: `GetForegroundSessionResponse`, `SetForegroundSessionResponse`
[1.0.2]: https://github.com/github/copilot-sdk-java/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/github/copilot-sdk-java/compare/1.0.0...v1.0.1
[1.0.0]: https://github.com/github/copilot-sdk-java/releases/tag/1.0.0
-
diff --git a/README.md b/README.md
index 7107c07573..c1aac6a5ab 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ Java SDK for programmatic control of GitHub Copilot CLI, enabling you to build A
com.github
copilot-sdk-java
- 1.0.0-beta-java.1
+ 1.0.0-beta-java.3
```
@@ -60,7 +60,7 @@ Snapshot builds of the next development version are published to Maven Central S
### Gradle
```groovy
-implementation 'com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1'
+implementation 'com.github:copilot-sdk-java:1.0.0-beta-java.3'
```
## Quick Start
diff --git a/jbang-example.java b/jbang-example.java
index e19da2958f..78763bea9c 100644
--- a/jbang-example.java
+++ b/jbang-example.java
@@ -1,5 +1,5 @@
///usr/bin/env jbang "$0" "$@" ; exit $?
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.SessionUsageInfoEvent;
diff --git a/src/site/markdown/cookbook/error-handling.md b/src/site/markdown/cookbook/error-handling.md
index 74732006ee..42c9e3a9c6 100644
--- a/src/site/markdown/cookbook/error-handling.md
+++ b/src/site/markdown/cookbook/error-handling.md
@@ -30,7 +30,7 @@ jbang BasicErrorHandling.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -64,7 +64,7 @@ public class BasicErrorHandling {
## Handling specific error types
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import java.util.concurrent.ExecutionException;
@@ -99,7 +99,7 @@ public class SpecificErrorHandling {
## Timeout handling
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotSession;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -130,7 +130,7 @@ public class TimeoutHandling {
## Aborting a request
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotSession;
import com.github.copilot.sdk.json.MessageOptions;
import java.util.concurrent.Executors;
@@ -162,7 +162,7 @@ public class AbortRequest {
## Graceful shutdown
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
public class GracefulShutdown {
@@ -192,7 +192,7 @@ public class GracefulShutdown {
## Try-with-resources pattern
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -224,7 +224,7 @@ public class TryWithResources {
## Handling tool errors
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
diff --git a/src/site/markdown/cookbook/managing-local-files.md b/src/site/markdown/cookbook/managing-local-files.md
index 78f914f103..788a712b60 100644
--- a/src/site/markdown/cookbook/managing-local-files.md
+++ b/src/site/markdown/cookbook/managing-local-files.md
@@ -34,7 +34,7 @@ jbang ManagingLocalFiles.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.SessionIdleEvent;
@@ -161,7 +161,7 @@ session.send(new MessageOptions().setPrompt(prompt));
## Interactive file organization
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import java.io.BufferedReader;
import java.io.InputStreamReader;
diff --git a/src/site/markdown/cookbook/multiple-sessions.md b/src/site/markdown/cookbook/multiple-sessions.md
index 42bb1f6222..c6f9666779 100644
--- a/src/site/markdown/cookbook/multiple-sessions.md
+++ b/src/site/markdown/cookbook/multiple-sessions.md
@@ -30,7 +30,7 @@ jbang MultipleSessions.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -123,7 +123,7 @@ try {
## Managing session lifecycle with CompletableFuture
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import java.util.concurrent.CompletableFuture;
import java.util.List;
diff --git a/src/site/markdown/cookbook/persisting-sessions.md b/src/site/markdown/cookbook/persisting-sessions.md
index 119448a440..6c9440a510 100644
--- a/src/site/markdown/cookbook/persisting-sessions.md
+++ b/src/site/markdown/cookbook/persisting-sessions.md
@@ -30,7 +30,7 @@ jbang PersistingSessions.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -127,7 +127,7 @@ public class DeleteSession {
## Getting session history
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.UserMessageEvent;
@@ -162,7 +162,7 @@ public class SessionHistory {
## Complete example with session management
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import java.util.Scanner;
public class SessionManager {
diff --git a/src/site/markdown/cookbook/pr-visualization.md b/src/site/markdown/cookbook/pr-visualization.md
index 627ee5b842..d193e4487e 100644
--- a/src/site/markdown/cookbook/pr-visualization.md
+++ b/src/site/markdown/cookbook/pr-visualization.md
@@ -34,7 +34,7 @@ jbang PRVisualization.java github/copilot-sdk
## Full example: PRVisualization.java
```java
-//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
+//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.ToolExecutionStartEvent;