Add private app extension APIs - #2574
Draft
merlynomsft wants to merge 15 commits into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject malformed app-session badge snapshots without allowing notification handler errors to disconnect the extension transport. Expand the real stdio regression to cover malformed casing, large coalesced frames, and fragmented frames. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
Add an atomic setBadges extension API with ordered canonical wire updates, complete preflight validation, duplicate-target rejection, and singular API compatibility. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b70aed5b-8c00-44fe-9312-c67ff0084b51
Contributor
SDK Consistency Review — PR #2574No cross-SDK consistency issues found. This PR adds a private/internal app-extension API surface:
Why this doesn't need Python/Go/.NET/Java parity right now:
API naming/shape is parallel between the two implemented languages (
|
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
@github/copilot-sdk/private/app-extensionentry point anddefineAppExtension(async host => disposer)activation model.CopilotSession,CopilotClient, raw JSON-RPC, credentials, generic session mutation, or unrestricted fetch.requiredToolrouting for product-session prompts.joinAppSessionBadges()and legacysetBadge/setBadgesAPIs exported as compatibility adapters; legacy badge updates preserve the current action.Private API shape
host.sessionBadges.register({ contributionId, onAction? })receives revisioned target snapshots and publishes singular or atomic ordered presentation updates.AppSessionPresentationcombinesbadgewith an optional Create PR action state;setPresentationandsetPresentationsreplace both atomically.onActionreceives the exact eligible snapshot target,kind: "createPullRequest", the requested draft mode, and anAbortSignal; it returns{ prompt, requiredTool }ornull.host.canvases.register(...)supports bounded generic action descriptors and typed open/action/close callbacks for a declared contribution.host.forgeProviders.register(...)exposes named provider operations for a declared contribution.host.mediatedFetch.request(...)requests a host-authorized operation without receiving account credentials.session.send({ prompt, requiredTool? })forwards an optional required tool in Node and Rust.Lifecycle and security boundaries
extensions.appExtension.register({ protocolVersion: 1 })returns runtime-derived principal, capability grants, and declared contribution identities; the SDK sends no spoofable identity.# Pull Request Creationheader; required tool identifiers are strictly validated.requiredToolbelongs to an active same-package product-session extension.presentation: null.Dependencies and landing order
github/copilot-agent-runtime#19512— trusted private bootstrap and transport.github/github-app#14999— app host and contribution consumers.Validation
requiredTooltransport tests.fast-uri@3.1.7harness dependency; affected transport coverage is green.