Skip to content

chore: sync upstream (68 commits)#35

Closed
yazelin wants to merge 69 commits intomainfrom
upstream-sync/20260306-232831
Closed

chore: sync upstream (68 commits)#35
yazelin wants to merge 69 commits intomainfrom
upstream-sync/20260306-232831

Conversation

@yazelin
Copy link
Owner

@yazelin yazelin commented Mar 6, 2026

Upstream Sync

Commits: 68 new commits from upstream
Upstream SHA: 4e1499dd23709022c720eaaa5457d00bf0cb3977
Base SHA: c4b3b366c4bd8dfba9ba4aa05e4019825360ad78

Upstream Changes

4e1499d docs: clarify session destroy vs delete semantics (#599)
4246289 Go: remove hand-written PermissionRequest that conflicts with generated type (#685)
5b4a6ec Update @github/copilot to 0.0.421 (#684)
2951807 Improve .NET SDK build infrastructure and documentation (#643)
207b85b fix(python): add timeout parameter to generated RPC methods (#681)
87a54de chore: rename runtime-fix-needed label to runtime
b49e5d8 fix: remove add-comment from runtime triage to prevent code leaks
c13dbba fix: trigger runtime triage workflow on label instead of issue open
528bd97 Add PermissionRequestResultKind type for .NET and Go SDKs (#631)
2fc65b4 chore(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 (#649)
87a2c30 chore(deps): bump githubnext/gh-aw from 0.40.0 to 0.53.0 (#650)
3890417 chore(deps-dev): bump @types/node from 25.2.0 to 25.3.3 in /test/harness (#651)
b9f9630 chore(deps-dev): bump @typescript-eslint/eslint-plugin in /nodejs (#652)
dae999c chore(deps): bump github/gh-aw from 0.52.1 to 0.53.0 (#653)
cd151fe chore(deps-dev): bump @types/node from 25.2.0 to 25.3.3 in /nodejs (#654)
53b6a11 chore(deps-dev): bump @github/copilot in /test/harness (#655)
9be0264 chore(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 (#656)
e9797ca chore(deps-dev): bump rimraf from 6.1.2 to 6.1.3 in /nodejs (#657)
760ba65 docs: add custom agents & sub-agent orchestration guide (#675)
0ee6666 Add patterns to Dependabot config for weekly batched PRs (#673)

Conflict Resolution

  • ACP paths auto-resolved: none
  • Manual review needed: none

After Merge

# Rebase feature branches
git fetch origin main
git rebase origin/main

Auto-generated by upstream-sync workflow

MikeAlhayek and others added 30 commits February 23, 2026 10:59
* fix: replace execSync with execFileSync in docs validation

Replace all execSync calls with execFileSync to avoid shell interpretation
of interpolated paths. This resolves a CodeQL alert about shell command
injection via uncontrolled absolute paths (scripts/docs-validation/validate.ts:79).

execFileSync passes arguments as an array, bypassing the shell entirely,
which eliminates the risk of path characters being misinterpreted.

Also updated catch blocks to check err.stderr in addition to err.stdout,
since 2>&1 shell redirection is no longer used.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: remove unused spawn import

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Document Microsoft Foundry Local setup and usage

Added section for Microsoft Foundry Local with installation and usage instructions.

* Update docs/auth/byok.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…#542)

Update the Copilot CLI dependency to the latest version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Improve discoverability of permission handler being required

* Update TypeScript tests

* Formatting

* Test updates

* Formatting

* More doc updates

* Fix E2E tests: add permission handler to all session calls across Python, Go, C#

- Add on_permission_request/OnPermissionRequest to all Python and Go E2E test
  create_session/resume_session calls
- Fix pre-existing deny tests: restore 'denied-interactively-by-user' kind
  (was accidentally changed by blanket replace)
- Fix session-resume scenario builds for Go and C#

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix docs validation: add permission handler to getting-started.md examples

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix remaining E2E tests missing permission handler

- Go: client_test.go CreateSession calls need OnPermissionRequest
- Python: test_client.py create_session call needs config arg

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace fabricated skill.json references with actual SKILL.md format used
by the SDK. The previous doc described a skill.json manifest, prompts/
directory, and tools/ directory that don't exist in the implementation.

Changes:
- Replace skill.json with SKILL.md format (YAML frontmatter + markdown)
- Fix directory structure to match actual layout (skill-name/SKILL.md)
- Add onPermissionRequest to all code examples (required by SDK)
- Remove fabricated prompts/ and tools/ directory concepts
- Fix troubleshooting and best practices to reference SKILL.md
- Remove speculative skill conflict precedence claims

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add permission checks for SDK-registered custom tools

Add 'custom-tool' to the PermissionRequest kind union in Node.js and
Python types. Update all existing custom tool e2e tests across all four
languages (Node.js, Python, Go, .NET) to provide an onPermissionRequest
handler, and add new e2e tests verifying permission approval and denial
flows for custom tools.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review: remove unused import, add toolName verification to Go and .NET tests

- Remove unused PermissionRequestResult import from Node.js test
- Add toolName assertion in Go test for cross-SDK parity
- Add toolName assertion in .NET test for cross-SDK parity

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Formatting

* Fix rebase issue

* Go fix

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…st() (github#592)

* fix(python): remove 30s default timeout from JsonRpcClient.request()

The Python SDK's JsonRpcClient.request() had a hardcoded 30s default
timeout via asyncio.wait_for(), unlike the other three SDK languages
(Go, Node/TS, .NET) which all wait indefinitely for the server to
respond.

Change the default from timeout=30.0 to timeout=None so that requests
wait indefinitely by default, matching the behavior of the other SDKs.
Callers can still pass an explicit timeout when needed.

Fixes github#539

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(python): add type casts to fix ty check errors

Add cast() calls for handler results that go through
inspect.isawaitable(), which loses type narrowing:
- session.py: _handle_permission_request, _handle_user_input_request
- client.py: _execute_tool_call

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: WANG Xu <feici02@outlook.com>
* Fix Go JSON-RPC client data race

* prevent race between startCLIServer and [Force]Stop

* we require 1.24

* prevent races between Start and [Force]Stop

* fail fast when CLI exits before reporting TCP port
…ub#561)

* Set Python 3.11 as the minimum version

* Run pyupgrade

* More modernization

* Address review comments

* Update python/copilot/generated` via codegen instead of by pyupgrade

* Update Python version matrix to only include 3.11 for compatibility testing

* Regenerate codegen files

Update generated files for Python and Go SDKs to include new agent API
types, compaction result types, and new session event types
(assistant.streaming_delta, session.task_complete).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix formatting

* fix: gofmt Go generated files and fix Python test for fork PRs

- Run gofmt on go/rpc/generated_rpc.go and go/generated_session_events.go
  to fix spaces→tabs formatting that caused the Codegen Check to fail.
- Fix test_resume_session_forwards_client_name to return a mock response
  for session.resume instead of forwarding to the real CLI, which requires
  the COPILOT_HMAC_KEY secret unavailable to fork PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Patrick Nikoletich <patniko@github.com>
Bumps the npm_and_yarn group with 1 update in the /nodejs directory: [minimatch](https://github.com/isaacs/minimatch).


Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the /test/harness directory: [hono](https://github.com/honojs/hono).


Updates `hono` from 4.11.9 to 4.12.3
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](honojs/hono@v4.11.9...v4.12.3)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the /scripts/docs-validation directory: [minimatch](https://github.com/isaacs/minimatch).


Updates `minimatch` from 10.1.2 to 10.2.4
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v10.1.2...v10.2.4)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 10.2.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* More e2e nodejs tests

* fix lint/format

* Fix E2E tests: add missing onPermissionRequest, fix assertions, fix promise leak

- Add onPermissionRequest: approveAll to all createSession()/resumeSession()
  calls in new E2E test files (CI blocker)
- Fix no-op assertion in client_lifecycle.test.ts (was testing lambda return)
- Fix weak assertion in tool_results.test.ts (now checks 'service is down')
- Fix resumeSession in error_resilience.test.ts (was missing required arg)
- Fix hanging Promise leak in replayingCapiProxy.ts (return without await)
- Add TODO comment on skipped Compaction test suite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix prettier formatting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: fix glob snapshot mismatch and session cleanup in e2e tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: skip bash stderr test on Windows (PowerShell wrapping breaks snapshot match)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: add Windows glob ordering variant to snapshot

On Windows, glob returns files in alphabetical order (app.ts before
index.ts) while macOS/Linux return them differently. Add a second
conversation variant to handle both orderings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Patrick Nikoletich <patniko@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…thods (github#596)

Fix truthy check for excluded_tools in create_session and resume_session
that silently dropped empty lists ([]), preventing callers from explicitly
clearing excluded tools.

This is the remaining half of github#487 — available_tools was already fixed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#529)

Add comprehensive documentation for instrumenting Copilot SDK applications
with OpenTelemetry GenAI semantic conventions.

The guide includes:
- Installation and basic setup for OpenTelemetry
- Complete SessionEventType to GenAI attribute mapping
- Detailed examples for ASSISTANT_USAGE, TOOL_EXECUTION events
- Full working code example with proper span management
- Content recording guidelines (opt-in for sensitive data)
- MCP tool conventions
- Metrics export
- Azure Monitor integration
- Best practices and troubleshooting

This enables Copilot SDK users to add standardized observability
following OpenTelemetry GenAI Semantic Conventions v1.34.0.
* docs: fix OpenTelemetry guide to use correct SDK APIs

- CopilotClient() takes CopilotClientOptions, not SessionConfig; model
  is set on create_session() instead
- session.send() returns a message ID, not an async iterator; events
  are received via session.on(handler) callbacks
- session.send() takes a dict {"prompt": ...}, not a bare string
- Add required on_permission_request to all create_session() calls
- Fix imports: SessionConfig → PermissionHandler
- Rewrite complete example with correct event subscription pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: skip validation for contextual code snippets

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…github#600)

directive pair that lets authors include a full compilable code block
that is validated but not rendered in docs, while the visible snippet
that follows is automatically skipped from validation.

Convert 4 skipped samples in getting-started.md to use hidden blocks:
- Python event subscription example
- Go event subscription example
- C# event subscription example
- Go CLI server connection example

This increases validated code blocks from 182 to 186 and demonstrates
the hidden block pattern for future conversions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ning a list of exceptions (github#603)

The Zen of Python says, "Errors should never pass silently".
* Add workflow to update @github/copilot dependency

Adds a workflow_dispatch workflow that:
- Accepts a target version of @github/copilot
- Updates the dependency in nodejs/ and test/harness/
- Re-runs all code generators
- Formats generated output
- Pushes a branch and opens a PR for review

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Also refresh nodejs/samples lockfile during dependency update

The samples package-lock.json picks up @github/copilot transitively
through the file:.. link to the nodejs SDK and needs refreshing too.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review feedback

- Add version input validation (semver regex) to prevent injection
- Pass version via env var instead of direct interpolation in shell
- Add actions/setup-dotnet for dotnet format step
- Restrict formatting to generated files only (src/generated/**)
- Handle idempotent re-runs: reuse existing branch, skip empty commits,
  detect existing PRs
- Use --force-with-lease for safe branch updates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Updated nodejs and test harness dependencies
- Re-ran code generators
- Formatted generated code

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Initial plan

* Extract ActionDisposable into its own file and use it from both Client.cs and Session.cs

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
…b#625)

* Initial plan

* Remove unnecessary SemaphoreSlims for _permissionHandlerLock and _userInputHandlerLock

Replace SemaphoreSlim-based locking with volatile fields for
_permissionHandler and _userInputHandler. These fields are single
reference types where reads and writes are atomic in .NET, so
locking is unnecessary. The volatile keyword ensures proper
visibility across threads.

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
SteveSandersonMS and others added 28 commits March 4, 2026 15:59
* Add cross-repo issue analysis agentic workflow

Adds an agentic workflow that analyzes issues filed in copilot-sdk to
determine if the root cause is in copilot-agent-runtime. When a runtime
fix is needed, it automatically creates a linked issue and draft PR in
the runtime repo.

Triggers on new issues and manual workflow_dispatch. Requires a
CROSS_REPO_PAT secret with access to both repos.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Rename secret to RUNTIME_TRIAGE_TOKEN

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The agent's GitHub MCP tools need the PAT to read files from
copilot-agent-runtime. The github-token under safe-outputs only
applies to safe output jobs, not the agent itself.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add steps: to clone copilot-agent-runtime onto the runner
- Add bash tools (grep, find, cat) so agent searches locally
- Update prompt to reference local filesystem paths
- Rename workflow to SDK Runtime Triage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The agent runs in a chroot that only sees GITHUB_WORKSPACE. Clone
copilot-agent-runtime into the workspace directory so the agent
can search it with local bash tools.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Initial plan

* Add get_last_session_id() to Python and Go SDKs with E2E tests

Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
Each updates entry needs patterns: ['*'] when using multi-ecosystem-groups
so Dependabot batches all dependencies into a single weekly PR instead of
creating individual PRs per dependency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: add custom agents & sub-agent orchestration guide

Add comprehensive documentation for custom agents covering:
- Defining custom agents with scoped tools and prompts
- Configuration reference for all CustomAgentConfig properties
- How sub-agent delegation and inference work
- Listening to sub-agent lifecycle events (started/completed/failed/selected)
- Building agent tree UIs from event data
- Attaching MCP servers to agents
- Best practices and common patterns

Code examples provided for all four SDK languages (TypeScript, Python, Go, .NET).

Addresses github#619 and github#301.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix C# docs validation: add hidden block for sub-agent events snippet

The C# code block for sub-agent event handling referenced 'session'
without declaring it, causing CS0103 compilation errors during docs
validation. Added a hidden validation block with a full compilable
wrapper class, matching the pattern used elsewhere in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.1.2 to 6.1.3.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](isaacs/rimraf@v6.1.2...v6.1.3)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#656)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@github/copilot](https://github.com/github/copilot-cli) from 0.0.420 to 0.0.421.
- [Release notes](https://github.com/github/copilot-cli/releases)
- [Changelog](https://github.com/github/copilot-cli/blob/main/changelog.md)
- [Commits](github/copilot-cli@v0.0.420...v0.0.421)

---
updated-dependencies:
- dependency-name: "@github/copilot"
  dependency-version: 0.0.421
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ithub#654)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.2.0 to 25.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.3.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/gh-aw](https://github.com/github/gh-aw) from 0.52.1 to 0.53.0.
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](github/gh-aw@a86e657...8c53fd1)

---
updated-dependencies:
- dependency-name: github/gh-aw
  dependency-version: 0.53.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…thub#652)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.54.0 to 8.56.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.56.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.56.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ess (github#651)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.2.0 to 25.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.3.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [githubnext/gh-aw](https://github.com/githubnext/gh-aw) from 0.40.0 to 0.53.0.
- [Release notes](https://github.com/githubnext/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](github/gh-aw@v0.40.0...v0.53.0)

---
updated-dependencies:
- dependency-name: githubnext/gh-aw
  dependency-version: 0.53.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ub#649)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v7...70fc10c)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add PermissionRequestResultKind type for .NET and Go SDKs

Replace magic strings for permission request result kinds with
strongly-typed values. .NET uses a readonly struct following the
ChatRole pattern from Microsoft.Extensions.AI. Go uses a typed
string constant block following the existing ConnectionState pattern.

Both remain extensible for custom values while making the well-known
kinds (approved, denied-by-rules, denied-interactively-by-user,
denied-no-approval-rule-and-could-not-request-from-user) discoverable
via IntelliSense/autocomplete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR feedback and fix CI issues

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Mock session.resume response in client test to fix fork PR CI

The 'forwards clientName in session.resume request' test calls through to
the real CLI, which requires COPILOT_HMAC_KEY for authentication. This
secret is unavailable to fork PRs, causing CI failures. Mock the
sendRequest return value since the test only verifies parameter forwarding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Switch from issues.opened to issues.labeled trigger with an if-guard
on the 'runtime triage' label. This prevents the workflow from
self-triggering on framework-created issues (no-op tracking, failure
reports) that carry the 'agentic-workflows' label.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The workflow was posting detailed analysis (including runtime code
snippets) as comments on public SDK issues. Remove the add-comment
safe-output and corresponding prompt instructions so the workflow
only labels the source issue and creates issues/PRs in the runtime repo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(python): add timeout parameter to generated RPC methods

Every generated async RPC method now accepts an optional `timeout`
keyword argument that is forwarded to `JsonRpcClient.request()`.
This lets callers override the default 30s timeout for long-running
RPCs like `session.fleet.start` without bypassing the typed API.

Fixes github#539

* test: cover no-params and server-scoped RPC timeout branches

Add tests for PlanApi.read (session, no params) and ModelsApi.list
(server, no params) to exercise all four codegen branches.

* fix: move _timeout_kwargs after quicktype imports, add server+params test

- Move _timeout_kwargs helper after the quicktype-generated import block
  to avoid duplicate Optional import and keep preamble conventional
- Add ToolsApi.list tests covering the server-scoped + params branch
- All four codegen branches now have test coverage

* style: fix ruff format in test_rpc_timeout.py

* fix: use float | None instead of Optional[float] in generated RPC

Optional is not imported in the generated rpc.py file. On Python 3.11
(used in CI), annotations are eagerly evaluated, so Optional[float]
would cause NameError at import time. Use the modern float | None
union syntax which requires no import and matches the rest of the
generated code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: wrap long docstring line in client.py to pass ruff E501

Pre-existing ruff line-length violation in get_last_session_id docstring
example that was failing CI on main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: resolve pre-existing CI failures in docs and ruff lint

- docs/guides/custom-agents.md: use typed enum constants instead of
  string literals for PermissionRequestResultKind (C# and Go examples)
- python/copilot/client.py: wrap long docstring line to satisfy E501

Both issues pre-exist on main and block all PR CI runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Rasaboun <40967731+Rasaboun@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Improve .NET SDK build infrastructure and documentation

- Add Central Package Management (Directory.Packages.props) with all package versions centralized
- Add Directory.Build.props with shared properties (TargetFramework, ImplicitUsings, Nullable, TreatWarningsAsErrors)
- Add nuget.config with single nuget.org source and package source mapping (required by CPM)
- Add global.json specifying .NET 10 SDK (the library is still built with a net8.0 TFM)
- Update all CI workflows from .NET 8.0.x to .NET 10.0.x
- Enable XML documentation file generation (GenerateDocumentationFile)
- Add XML doc comments to all non-generated public types and members
- Add valid-value lists in XML docs for string properties with known values (e.g. PermissionRequest.Kind, ToolResultObject.ResultType)
- Add #pragma warning disable CS1591 to generated files (SessionEvents.cs, Rpc.cs) and codegen scripts
- Enable EmbedUntrackedSources, IncludeSymbols, SymbolPackageFormat
- Enable ContinuousIntegrationBuild conditional on CI/TF_BUILD environment variables
- Add PackageProjectUrl to package metadata
- Add [EditorBrowsable(Never)] to obsolete GithubToken property
- Upgrade analysis level and fix some diagnostics

* Exclude nodejs/scripts/ from Node.js SDK test triggers

Changes to development utility scripts (codegen, protocol version updates)
should not trigger the Node.js test suite, as they don't affect SDK runtime
code and the workflow fails on fork PRs that lack the COPILOT_HMAC_KEY secret.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Mock sendRequest in session.resume unit tests

These tests verify that the correct parameters are forwarded to the RPC
call, not that the CLI handles them. Mock sendRequest (like the setModel
test already does) so the tests don't depend on CLI authentication,
which is unavailable on fork PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix PermissionRequestResultKind type in custom-agents docs

Use PermissionRequestResultKind.Approved instead of string literal
"approved" to match the strongly-typed struct in the .NET SDK.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Updated nodejs and test harness dependencies
- Re-ran code generators
- Formatted generated code

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* docs: clarify session destroy vs delete semantics across all SDKs

Clarify the distinction between destroy() (closes session, releases
in-memory resources, preserves disk state for resumption) and
deleteSession() (permanently removes all data from disk).

Update doc comments across all four SDK languages (Go, Node.js, Python,
.NET) and the session persistence guide to make the behavioral
difference explicit and help users choose the right method.

Fixes github#526

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: add disconnect() method, deprecate destroy() across all SDKs

Add disconnect() as the preferred method for closing sessions across all
four SDK languages, marking destroy() as deprecated:

- Node.js: disconnect() + Symbol.asyncDispose support, destroy() delegates
- Python: disconnect() + __aenter__/__aexit__ context manager, destroy()
  emits DeprecationWarning
- Go: Disconnect() method, Destroy() marked with Deprecated godoc tag
- .NET: DisconnectAsync() method, DisposeAsync() delegates to it

Update all samples, READMEs, and documentation guides to use the new
disconnect() terminology. Internal stop() methods now call disconnect().

Resolves PR github#599 comments:
- Rename destroy → disconnect for clarity
- Define IDisposable behavior in .NET (DisposeAsync delegates to
  DisconnectAsync)
- Add idiomatic cleanup patterns (async context managers, Symbol.asyncDispose)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: update all tests, scenarios, and docs to use disconnect()

Migrate all test scenarios, e2e tests, READMEs, and documentation
references from destroy()/Destroy() to disconnect()/Disconnect().

- 90 test scenario files across Go/Python/TypeScript/C#
- 15 Node.js e2e test files
- 8 Python e2e test files
- 3 Go e2e test files
- 1 .NET test file
- READMEs and compatibility docs updated with new API reference
- Agent docs updated with new method names
- Reconnect scenario log messages updated to 'disconnected'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: rename snapshot to match updated test name

The hooks_extended test 'should invoke onSessionEnd hook when session is
destroyed' was renamed to '...disconnected', but the snapshot YAML file
wasn't renamed to match, causing CI to fail with 'No cached response'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* dotnet: remove DisconnectAsync, keep only DisposeAsync

Address review feedback from SteveSandersonMS: for .NET, the
standard IAsyncDisposable pattern (DisposeAsync) is sufficient
on its own without a duplicate DisconnectAsync method.

Moves the disconnect implementation directly into DisposeAsync
and removes the separate DisconnectAsync method. Updates all
references in Client.cs and README.md accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yazelin
Copy link
Owner Author

yazelin commented Mar 9, 2026

Closed: upstream sync completed via manual merge in commit 14dcaa8

@yazelin yazelin closed this Mar 9, 2026
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.