[upstream-sync] Port upstream PRs #808, #803, #802: skipPermission, deprecate autoRestart, optional join-session permission handler#57
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…tart, optional join-session permission handler
- PR #808: Add :skip-permission? to tool definitions. When true, sends
skipPermission: true in the wire protocol, allowing the tool to execute
without triggering a permission prompt.
- PR #803: Deprecate :auto-restart? client option. The auto-restart
behavior has been removed across all official SDKs. The option is
retained for backward compatibility (default changed to false) but has
no effect. maybe-reconnect! is now a no-op.
- PR #802: Make :on-permission-request optional in join-session. When
omitted, a default handler returning {:kind :no-result} is used,
matching the upstream JoinSessionConfig type. A new ::join-session-config
spec reflects this in instrumentation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports three upstream changes from
github/copilot-sdkmerged 2026-03-12/13.Upstream PRs Ported
PR #808 — Allow tools to set
skipPermissionNode.js SDK change:
Tool(TArgs)interface gains an optionalskipPermission?: booleanfield. Whentrue, the tool can execute without triggering a permission prompt.Clojure port:
::skip-permission?spec tospecs.clj:skip-permission?as optional key in::toolspecbuild-create-session-paramsandbuild-resume-session-paramsnow emitskipPermission: truein the wire tool definition when:skip-permission? trueis setUsage:
{:tool-name "safe_lookup" :tool-description "A read-only lookup that needs no confirmation" :skip-permission? true :tool-handler (fn [params _inv] (str "RESULT: " (:id params)))}PR #803 — Remove autoRestart feature
Node.js SDK change:
autoRestart?: booleaninCopilotClientOptionsis now@deprecated This option has no effect and will be removed in a future release.Internally hardcoded tofalse; reconnect logic removed.Clojure port:
:auto-restart?default changed fromtruetofalsemaybe-reconnect!is now a no-op (reconnect logic removed):auto-restart?as deprecatedPR #802 — Add no-result permission handling for extensions
Node.js SDK change:
joinSessionexposesJoinSessionConfigwhich isResumeSessionConfigwithonPermissionRequestmade optional. Default handler returns{kind: "no-result"}.Clojure port:
::join-session-configspec inspecs.clj— same as::resume-session-configbut:on-permission-requestis optionaljoin-sessionnow defaults:on-permission-requestto(constantly {:kind :no-result})when not providedinstrument.cljupdated to use::join-session-configforjoin-session's:argsspecUsage (extensions that use
:skip-permission?tools don't need a permission handler):PRs Skipped
LogOptions.Ephemeral *bool)CopilotClient.__init__refactor)Testing
Tests could not be run in the CI environment due to Maven dependency resolution limitations (no write access to
~/.m2/and network restrictions). The changes are:The PR is submitted as draft for maintainer review and CI run.