Skip to content

Commit 933d98d

Browse files
Update SDK snapshot for Copilot CLI 1.0.94-2
1 parent 6259d09 commit 933d98d

13 files changed

Lines changed: 210 additions & 26 deletions

File tree

‎docs/features/streaming-events.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ The `permissionRequest` is a discriminated union on `kind`:
734734
| `kind` | Key Fields | Description |
735735
|--------|------------|-------------|
736736
| `"shell"` | `fullCommandText`, `intention`, `commands[]`, `possiblePaths[]` | Execute a shell command |
737-
| `"write"` | `fileName`, `diff`, `intention`, `newFileContents?` | Write/modify a file |
737+
| `"write"` | `fileName`, `diff`, `intention`, `newFileContents?`, `fileEdits?` | Write/modify a file |
738738
| `"read"` | `path`, `intention` | Read a file or directory |
739739
| `"mcp"` | `serverName`, `toolName`, `toolTitle`, `args?`, `readOnly` | Call an MCP tool |
740740
| `"url"` | `url`, `intention` | Fetch a URL |
@@ -743,6 +743,10 @@ The `permissionRequest` is a discriminated union on `kind`:
743743

744744
All `kind` variants also include an optional `toolCallId` linking back to the tool call that triggered the request.
745745

746+
Write requests can also include `fileEdits` in both `permissionRequest` and `promptRequest`. Each entry contains an optional `before` and `after` snapshot, each with an absolute `path` in the session filesystem namespace and complete UTF-8 `content`. A missing `before` means creation; a missing `after` means deletion. An empty `content` string represents an empty file, not an unavailable preview. A move can have different paths on its two sides. When a move overwrites an existing destination, separate entries describe the source deletion and destination replacement.
747+
748+
These snapshots describe the planned operation, not a later read of the live filesystem. The runtime omits `fileEdits` when it cannot provide a complete text preview, including requests made before reading a sandbox-protected file, non-UTF-8 contents, or an unreadable or non-regular move destination, such as a named pipe. Do not infer a deletion from an empty legacy `newFileContents` value. The existing fields and approval choices remain available to consumers that do not use previews.
749+
746750
### `permission.completed`
747751

748752
A permission request was resolved.

‎dotnet/src/Generated/Rpc.cs‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dotnet/src/Generated/SessionEvents.cs‎

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/rpc/zsession_events.go‎

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/zsession_events.go‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎nodejs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"url": "https://github.com/github/copilot-sdk.git"
66
},
77
"version": "0.0.0-dev",
8-
"copilotCliVersion": "1.0.94-1",
8+
"copilotCliVersion": "1.0.94-2",
99
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
1010
"main": "./dist/cjs/index.js",
1111
"types": "./dist/index.d.ts",

‎nodejs/scripts/unified-release.ts‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,12 @@ export function publicationSdks(
9191
destination !== "public" || visibility === "public",
9292
"Internal releases cannot publish publicly"
9393
);
94-
// Python publishes in the caller so PyPI authentication and attestations share one workflow identity.
95-
return packagedSdks(channel, visibility).filter(
96-
(language) =>
97-
language !== "python" &&
98-
(destination === "public" ||
99-
language === "nodejs" ||
100-
(channel !== "unstable" && language === "dotnet"))
94+
// Public Python publishes in the caller so PyPI authentication and attestations share one workflow identity.
95+
return packagedSdks(channel, visibility).filter((language) =>
96+
destination === "public"
97+
? language !== "python"
98+
: language === "nodejs" ||
99+
(channel !== "unstable" && (language === "dotnet" || language === "python"))
101100
);
102101
}
103102

‎nodejs/src/cliVersion.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const COPILOT_CLI_VERSION = "1.0.94-1";
1+
export const COPILOT_CLI_VERSION = "1.0.94-2";
22

33
export const COPILOT_CLI_USE_NPM_PACKAGE = false;

‎nodejs/src/generated/session-events.ts‎

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎nodejs/test/e2e/compaction.e2e.test.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,7 @@ class BudgetReplayHandler extends CopilotRequestHandler {
145145
}
146146

147147
describe("Refusal fallback output budget", async () => {
148-
const { createClient } = await createSdkTestContext({
149-
copilotClientOptions: {
150-
env: {
151-
ANTHROPIC_REFUSAL_FALLBACK: "true",
152-
COPILOT_EXP_COPILOT_CLI_ANTHROPIC_REFUSAL_FALLBACK: "true",
153-
},
154-
},
155-
});
148+
const { createClient } = await createSdkTestContext();
156149

157150
it("should clamp fallback output before admission and retain its effective budget", async () => {
158151
const handler = new RefusalBudgetReplayHandler();

0 commit comments

Comments
 (0)