Skip to content

Add session-scoped extension permission requests - #564

Draft
Joaquín Ruales (jruales) wants to merge 5 commits into
mainfrom
jruales/session-extension-permission
Draft

Joaquín Ruales (jruales) wants to merge 5 commits into
mainfrom
jruales/session-extension-permission

Conversation

@jruales

@jruales Joaquín Ruales (jruales) commented Nov 5, 2026 •

Copy link
Copy Markdown

Extension consent can be requested before any chat turn exists, but inputNeeded only models chat-owned requests. Hosts need a session-owned request and response path.

Changes

  • Add SessionInputRequestKind.ExtensionPermission, carrying the extension name, requested capabilities, and optional choices without a chat.
  • Add the client-dispatchable session/permissionResponded action in 1.1.0.
  • Require the opt-in ClientCapabilities.extensionPermissions capability. Hosts must hide these requests and response actions from clients that omit it.
  • Restore session activity using InputNeeded → InProgress → default/latest chat precedence when consent completes. Peer errors do not override the default chat.
  • Keep TypeScript, Go, Rust, .NET, Kotlin, and Swift reducers consistent through shared fixtures. Preserve Go's explicit empty capability object ({}) instead of omitting it.

Validation

  • npm run generate: passed.
  • npm test: passed (637 tests; coverage gate passed).
  • cd clients/typescript && npm run typecheck && npm test: passed (77 tests).
  • Focused native reducer and round-trip checks: passed for Go, Rust, .NET, Kotlin, and Swift.

VS Code implementation: microsoft/vscode#346208.

🤖 Written by GitHub Copilot on behalf of Joaquín Ruales (@jruales).

Agent extensions can request capabilities, such as registering hooks,
while they start and before any chat turn exists. Add an
`extensionPermission` session input request and a client-dispatchable
`session/permissionResponded` action so hosts can ask the user and
receive the answer on the session channel.

Co-authored-by: Copilot <[email protected]>
AHP 1.1.0 is unreleased, so clients may still negotiate 1.0.0. Add an
opt-in `extensionPermissions` client capability so hosts can deliver
session-owned extension permission requests only to clients that can
answer them.

Co-authored-by: Copilot <[email protected]>
Go, Rust, .NET, Kotlin and Swift reducers now track extension permission requests, apply `session/permissionResponded`, and restore the chats' activity once no request blocks the session, matching the TypeScript reducer. Adds a shared reducer fixture for an extension permission request on an idle session.

Co-authored-by: Copilot <[email protected]>
Preserve running-peer precedence when extension consent completes, and keep an explicitly empty extensionPermissions capability distinct from an absent capability. Add shared reducer and round-trip fixtures across native clients.

Co-authored-by: Copilot <[email protected]>
Register the wire type used by the shared extension-permission capability fixtures in the TypeScript client corpus runner.

Co-authored-by: Copilot <[email protected]>

This branch has not been deployed

No deployments
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.

1 participant