[WIP] Add LC-17 canvas protocol and presentation clarifications - #447
Draft
Ulugbek Abdullaev (ulugbekna) wants to merge 6 commits into
Draft
Ulugbek Abdullaev (ulugbekna) wants to merge 6 commits into
Ulugbek Abdullaev (ulugbekna) wants to merge 6 commits into
Conversation
Introduces a versioned, renderer-neutral `ahp-canvas:` channel for local extension/package-rendered canvas surfaces, promoting the VS Code PoC transport into the canonical AHP contract. - Stable identity: CanvasIdentityKey (chat, source, canvasType, instanceId) plus a host-assigned, opaque `incarnation` token that is never reused for a superseded logical instance; CanvasPackageSource carries a dedicated `sourceId` distinct from display-only `packageName`/`version`. - Lifecycle state: CanvasTrustState (trusted/pending/blocked) and CanvasAvailabilityState (unsupported/notLoaded/loading/empty/ready/failed) are independent axes; SessionState.canvases is durable membership, distinct from the new read-only listCanvasTypes discovery catalogue. - Commands: listCanvasTypes (read-only type discovery), openCanvas (requestId-scoped idempotency; a new requestId for an already-open identity may re-invoke the provider without creating a second identity), resolveCanvasSource (read-only current-state/live-URL read, never opens/resumes/restarts), invokeCanvasAction (required incarnation precondition, no exactly-once-across-crash promise), restartCanvasProvider (the only operation that bumps incarnation), and closeCanvas (required revision precondition; logical close, distinct from hiding a tab). - Capability: new server/runtime-side CanvasCapabilities / InitializeResult.canvases, independent of the existing client-side ClientCapabilities.canvases and of protocol-version negotiation alone. - Bounds: declared, enforceable size/depth limits (request id length, identity field length, schema property/depth, declared-action count, input/result length) plus an isCanvasSchemaWithinLimits helper. - canvasReducer and sessionReducer's session/canvasSet consistently reject stale-revision actions rather than special-casing incarnation. Bumps PROTOCOL_VERSION to 0.10.0 and regenerates all client mirrors (Rust, Kotlin, Swift, Go, .NET, TypeScript), JSON schemas, and docs via `npm run generate`. Adds reducer fixtures and boundary tests for the new channel; CHANGELOG.md heading and fragment collapse remain a release-time step per RELEASING.md, not part of this change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build on the pinned LC-17 snapshot without changing wire shapes or versions. Clarify correlated native-open publication and transient presentation credential renewal, add focused conformance cases, and regenerate derived documentation. Normalize the affected canonical guards and inherited canvas EOF whitespace for consumer hygiene without changing execution behavior. The existing protocol 0.10.0 changelog-heading gate remains a draft blocker. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <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
Publishes the proposed LC-17 canvas protocol contract, presentation clarifications and generated-client corrections on the recorded main integration.
requestId, and a provider must not perform a duplicate native open.canvas/iconChangedpresentation metadata.icon: nullremoves the icon; omission is not equivalent to removal. The action does not replace an endpoint, change incarnation or replay a canvas effect.StateActionserialization: explicit null is preserved and a missing required field is rejected. The generator produces the correction; generated output is not independently patched.Current provenance
Canonical head:
cd05c63ceb7ec951608834d8846cdf71d1288294.569a2867d325f1101939e0027a53c23f00203d36b5d7170f5fe1d4c9e8b1c71a4c94dc44feba00fd86b08fe855d81601787b9dfaa1a710110081ebc8fb6bfdd1dfef0944c2689e3d14593dd33422976a9683981a7cf5ceccb8424f928e2f5e806a88788acd05c63ceb7ec951608834d8846cdf71d1288294The initial publication merge combined main
d1a2b199cdb493e914165322a925c1a5f0113616with the initial qualified clarification commit. At that stage, the only tree difference from the clarification was the already-merged Hono 4.13.7 dependency update inplugins/copilot-plugin/mcp-server/package-lock.json. That statement describes the initial merge only, not the later corrections listed above.The byte-identical
ulugbekna/scaling-couscousclarification copy had no distinct contribution and was neither edited nor published. A separate publication session was necessary because the original app-stored base was a fork-only ref; the normal main merge preserved that earlier work instead of rewriting it.The earlier #443 remains a separate draft at its recorded
40b27012d3d6ea1705ff182e8c95ad643dc02b4ehead onulugbekna/agent-host-protocol:ulugbekna/local-canvas-protocol. This PR does not alter that reference implementation or manufacture its fork-only branch in this repository.Validation
At the current canonical head, CI run 34712357768 passes all seven executable jobs:
check, TypeScript, .NET, Go, Kotlin, Rust and Swift. The CLA check also passes. The separate VS Code PR Check is a collaborator-approval policy gate, not an unfinished test run.Coverage includes canonical reducers and cross-language fixture dispatch, generated mirrors, icon replacement/removal and stale revisions, required-null round trips, and Kotlin direct-payload and
StateActionserializers. VS Code's consumer imports this exact canonicalcd05c63crevision through microsoft/vscode#335951 rather than maintaining an independent protocol patch.The initial publication's local validation is historical: generation was clean, change-fragment/generated checks passed, and the downstream command passed 482 tests with full reducer branch coverage, while the original top-level test command stopped at the then-missing 0.10.0 changelog gate. The later parity correction adds an explicit 0.10.0 — Unreleased heading, and the current executable CI results above supersede that earlier pending validation status. Earlier failures are not relabeled as passes.
Scope limits
This remains a proposed protocol contract, not a published protocol release or approval to merge. The 0.10.0 changelog entry is explicitly unreleased. Runtime/SDK implementation, consumer qualification and production enablement are separate responsibilities; the later runtime correction's ongoing qualification is not implied by this protocol CI result. No native Office integration or new execution authority is conferred by the contract.