Skip to content

chore: bump @github/copilot to ^1.0.75 and regenerate all SDKs - #2115

Draft
MRayermannMSFT wants to merge 1 commit into
mainfrom
dev/mrayermannmsft/other/copilot-1.0.75-bump
Draft

chore: bump @github/copilot to ^1.0.75 and regenerate all SDKs#2115
MRayermannMSFT wants to merge 1 commit into
mainfrom
dev/mrayermannmsft/other/copilot-1.0.75-bump

Conversation

@MRayermannMSFT

Copy link
Copy Markdown
Contributor

Why

Split out of #2114 so the Agent Factories authoring surface can be reviewed on its own. This half is almost entirely machine-generated: of ~12.1k added lines, roughly 200 are hand-written, and every one of those exists because the new schemas force it.

Bumping @github/copilot from ^1.0.73 to ^1.0.75 is also useful independently of factories — 1.0.75 is the first published runtime carrying the full factory wire surface, but the regeneration picks up everything else that landed alongside it.

What

Generated types — regenerated for Node.js, Python, Go, .NET, and Rust from the 1.0.75 schemas.

Codegen: narrow the opaque-JSON conversion. x-opaque-json was being applied to every annotated definition, but only 1 of the 14 (CanvasJsonSchema) is genuinely unconstrained; the other 13 carry anyOf or type + properties. Blanket-converting them threw away the structure of McpServerConfig, ExternalToolResult, EventLogTypes, and UIElicitationSchemaProperty. The conversion now requires the absence of any structural keyword. Genuinely opaque nodes emit JsonValue rather than unknown, which is a global tightening.

Fallout the new schemas force:

  • sessionFs gained sqliteTransaction, so every hand-written provider adapter must implement it. Node forwards to an optional provider hook and classifies failures; Python, Go, and .NET have no transaction hook in their provider interfaces, so they refuse the batch with a classified fatal error rather than applying it non-atomically. This is the deliberate call worth a look — refusing is safer than silently running a "transaction" that isn't atomic.
  • UIExitPlanModeResponse gained deferImplementation, so a Rust e2e struct literal has to name it.
  • lsp.initialize and telemetry.setFeatureOverrides are declared Promise<void> and now resolve with {} rather than null, so two e2e assertions no longer pin the resolved value.
  • The JsonValue tightening reaches ToolTelemetry, the hooks-invoke response, and data.arguments in a session-event type test.

Verification

Verified standalone on this branch (not just as part of #2114): Node typecheck clean, lint 0 errors, 675 unit tests passing; cargo check --all-targets clean; go build ./... and go vet ./... clean; dotnet build clean with 0 warnings.

Notes for reviewers

The generated files are the bulk of the diff and are reproducible — cd scripts/codegen && npm run generate should be a no-op on this branch. The review that matters is the ~200 hand-written lines listed under Fallout above, plus the codegen predicate change in scripts/codegen/typescript.ts.

#2114 depends on this and will rebase onto it once this merges.

Moves the runtime dependency from ^1.0.73 to ^1.0.75 and regenerates the
wire types for every language. No hand-written API changes beyond what the
new schemas force.

Generated surface
- Regenerates rpc/session-event types for Node.js, Python, Go, .NET, and
  Rust from the 1.0.75 schemas.

Codegen: narrow the opaque-JSON conversion
- `x-opaque-json` was being applied to every annotated definition, but only
  one of the fourteen (`CanvasJsonSchema`) is genuinely unconstrained; the
  rest carry `anyOf` or `type` + `properties`. Blanket-converting them threw
  away the structure of `McpServerConfig`, `ExternalToolResult`,
  `EventLogTypes`, and `UIElicitationSchemaProperty`. The conversion now
  requires the absence of any structural keyword.
- Genuinely opaque nodes emit `JsonValue` instead of `unknown`, which is a
  global tightening; `ToolTelemetry` is realigned to match.

Fallout the new schemas force
- `sessionFs` gained `sqliteTransaction`, so every hand-written provider
  adapter has to implement it. Node forwards to an optional provider hook
  and classifies failures; Python, Go, and .NET have no transaction hook in
  their provider interfaces, so they refuse the batch with a classified
  `fatal` error rather than applying it non-atomically.
- `UIExitPlanModeResponse` gained `deferImplementation`, so the Rust e2e
  struct literal has to name it.
- `lsp.initialize` and `telemetry.setFeatureOverrides` are declared
  `Promise<void>` and now resolve with `{}` rather than `null`, so two e2e
  assertions no longer pin the resolved value.
- The `JsonValue` tightening reaches `data.arguments`, which is no longer
  optional-chained in the session-event type test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bumps @github/copilot to 1.0.75 and regenerates SDK wire types, including factory APIs and SQLite transaction handling.

Changes:

  • Regenerates Node.js, Python, Go, .NET, and Rust protocol types.
  • Adds recursive JsonValue TypeScript generation.
  • Adds SessionFs SQLite transaction adapters and related compatibility updates.
Show a summary per file
File Description
scripts/codegen/typescript.ts Refines opaque JSON generation.
rust/tests/e2e/rpc_tasks_and_handlers.rs Updates exit-plan response fixture.
rust/src/generated/session_events.rs Regenerates event types.
rust/src/generated/rpc.rs Regenerates RPC surface.
python/copilot/session_fs_provider.py Refuses unsupported transactions atomically.
python/copilot/generated/session_events.py Regenerates event models.
nodejs/test/typescript-codegen.test.ts Tests JsonValue generation.
nodejs/test/session-event-types.test.ts Updates opaque argument assertion.
nodejs/test/e2e/rpc_session_state.e2e.test.ts Stops asserting void RPC values.
nodejs/src/types.ts Tightens tool telemetry types.
nodejs/src/sessionFsProvider.ts Adds transaction provider support.
nodejs/src/generated/session-events.ts Regenerates event definitions.
nodejs/src/generated/rpc.ts Regenerates RPC definitions.
nodejs/src/client.ts Serializes hook output as JSON.
nodejs/package.json Bumps Copilot dependency.
nodejs/package-lock.json Locks Copilot 1.0.75 binaries.
go/zsession_events.go Re-exports new event types.
go/session_fs_provider.go Refuses unsupported transactions.
go/rpc/zsession_events.go Regenerates event models.
go/rpc/zsession_encoding.go Decodes factory update events.
go/rpc/zrpc_encoding.go Updates generated union decoding.
dotnet/src/SessionFsProvider.cs Refuses unsupported transactions.
dotnet/src/Generated/SessionEvents.cs Regenerates event models.

Review details

Files not reviewed (6)
  • go/rpc/zrpc.go: Generated file
  • go/rpc/zrpc_encoding.go: Generated file
  • go/rpc/zsession_encoding.go: Generated file
  • go/rpc/zsession_events.go: Generated file
  • go/zsession_events.go: Generated file
  • nodejs/package-lock.json: Generated file
  • Files reviewed: 12/27 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment on lines +263 to +276
const STRUCTURAL_SCHEMA_KEYWORDS = [
"anyOf",
"oneOf",
"allOf",
"not",
"type",
"properties",
"patternProperties",
"items",
"prefixItems",
"enum",
"const",
"$ref",
] as const;
Comment on lines +58 to +60
transaction?(
statements: SessionFsSqliteTransactionStatement[]
): Promise<SessionFsSqliteQueryResult[]>;
Comment on lines +236 to +240
sqliteTransaction: async ({ statements }) => {
if (!provider.sqlite?.transaction) {
return {
results: [],
error: {
required: ["payload"],
};

const normalized = normalizeSchemaForTypeScript(schema);
@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review

This PR regenerates types for Node.js, Python, Go, .NET, and Rust from schema @github/copilot@1.0.75. The hand-written changes (the sqliteTransaction fallback handlers) are applied consistently across the four SDKs that expose a SessionFsProvider interface.

✅ Consistent across all updated SDKs

The sqliteTransaction refusal pattern is implemented uniformly:

  • Node.js (sessionFsProvider.ts): forwards to optional provider.sqlite.transaction?(), classifies errors with sqliteTransactionErrorClass, refuses with fatal if hook absent
  • Python (session_fs_provider.py): refuses with fatal + identical message strings
  • Go (session_fs_provider.go): refuses with fatal + equivalent message strings
  • .NET (SessionFsProvider.cs): refuses with Fatal + equivalent message strings

The deliberate design choice (refuse atomically rather than apply non-atomically) is applied identically in all four SDKs. ✅

⚠️ Java not regenerated — follow-up needed

Java's pom.xml still references ^1.0.73 (the pre-PR schema version). The new SessionFsSqliteTransaction* types do not exist in java/src/generated/.

Java does not currently expose a SessionFsProvider interface, so there is no provider-layer gap for the sqliteTransaction refusal logic. However, the generated wire types (SessionFsSqliteTransactionRequest, SessionFsSqliteTransactionResult, SessionFsSqliteTransactionError, SessionFsSqliteTransactionErrorClass) and any other schema additions in 1.0.75 won't be available to Java consumers until Java is regenerated.

Suggestion: Either bump Java to ^1.0.75 and regenerate as a follow-up PR, or confirm this is tracked (e.g., as part of #2114). No action needed to block this PR.

Summary

No blocking consistency issues. The changes are well-structured and the four updated SDKs are mutually consistent. The Java gap is an intentional deferral per the PR description, not introduced by this PR.

Generated by SDK Consistency Review Agent for #2115 · sonnet46 66.8 AIC · ⌖ 5.51 AIC · ⊞ 6.6K ·

@MRayermannMSFT

Copy link
Copy Markdown
Contributor Author

Parked for now. The copilot-sdk team already has an update to the latest CLI in flight, so we are holding these rather than racing it. This PR stays open as a draft and should be re-evaluated once main carries a newer @github/copilot.

Remaining CI blocker is a runtime regression, not this PR. Two Python E2E tests fail on Windows only, deterministically across two full runs:

  • test_session_fs_e2e.py::test_should_write_workspace_metadata_via_sessionfs
  • test_session_fs_e2e.py::test_should_persist_plan_md_via_sessionfs

Both time out waiting for the runtime to persist session state through a SessionFS provider — workspace.yaml never reaches the provider. Evidence that it is not the SDK code here:

  • Linux and macOS run the same two tests and pass, with identical Python code.
  • The session_fs_sqlite tests pass on Windows, so the new sqliteTransaction adapter is never reached.
  • The model call succeeds; the failure is the next line, a filesystem wait.
  • Captures are byte-identical to main.
  • These tests pass on main (runtime 1.0.73). The only changed variable is the runtime binary, 1.0.73 -> 1.0.75.

Prime suspect, unconfirmed: the SessionFs port to Rust. The test passes session_state_path = "/session-state", a POSIX-style absolute path, and Windows path resolution is the obvious hazard there. This likely affects any SDK consumer using a SessionFS provider on Windows.

Note that the hand-written fixes in this PR are not factory-specific — they are what bumping past 1.0.73 forces at all (the sqliteTransaction adapters, the x-opaque-json codegen narrowing, the JsonValue tightening fallout, deferImplementation, and the two Promise<void> assertions). They should be useful to whoever lands the next bump, even if this PR itself is superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants