Repository navigation
feat(mcp)!: move to the SAGA 1.0 candidate, with the card at a stable v1 address - #12
Merged
Merged
Conversation
…candidate The card's address now names its compatibility line, ui://views/answer-card.v1.html, instead of a hash of its bytes. Every compatible release, including a release stamp or a card change, is served at the same address, so a host that still holds a tool descriptor from before a deploy reads a card that is served (iaser-ai#335 Q1). SAGA moves to the 1.0 release candidate, packed from the SDK's source at 8b4d987 and committed under candidates/ until 1.0.0-rc.1 is on the npm registry. The manifest pins the exact candidate version, and the root pnpm-workspace.yaml overrides the five siblings to the tarballs. The MCP packages, hono and @hono/node-server align with the SDK, with its documented dompurify and @hono/node-server overrides. - The packaging test checks a candidate against the committed tarball bytes, and a registry release against its npm integrity. - The card's SDK identity names a candidate by its source commit and tarball digests. - The Dev release gate accepts the candidate under apps/mcp/candidates; Beta and Production still refuse it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… duplicated tests SAGA's fetch app now serves /mcp: Host and Origin admission, body bounds, the request budget, lifetime attachment and the official stateless handler. Ansari keeps only its own routes (/health and the Dev-only diagnostics beacon) and its logs around /mcp. The server factory receives the request lifetime instead of creating its own budget, and the request budget stays the tool's 60 s bound. mcp.error now carries SAGA's fixed failure kind. Tests that only re-checked what SAGA's fetch app tests itself are retired: - request-timer release when a server closes, with or without a transport (the server-close and closed-subscription fixtures); - malformed and oversize body refusals. Ansari's own checks stay: the 60 s budget, the deployment allowlists replacing localhost on both targets, the upstream abort on timeout, and the Node listener's SIGTERM shutdown. The app version is 0.17.0: the card address and SAGA version change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r smoke check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch-app comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v1 card address The walkthrough now describes: - the SAGA 1.0 candidate install; - the card at ui://views/answer-card.v1.html; - /mcp served through SAGA's createMcpFetchApp; - app 0.17.0. Its embedded sources match the code at the commit SOURCE_BASE names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yia-mw-agent
approved these changes
Nov 5, 2026
yia-mw-agent
left a comment
Collaborator
There was a problem hiding this comment.
Helmet-Review-Request: #12 (comment)
Reviewed the full merge-base-to-head diff (base develop 7c605bb = merge-base, 28 files) at 21cc907, which was also the live head at start and before submitting. No material defects.
Checks run on that head:
pnpm install --frozen-lockfile --filter ansari-mcp...succeeds, so the lockfile and the five root overrides agree.pnpm mcp lint,typecheckandtestpass (145 of 145).pnpm test:browserpasses (78 checks, no errors).check-release --target devpasses;--target betaand--target productionrefuse the candidate as the PR says, so neither can deploy it before the registry release.- The five committed tarballs all report
0.0.0-candidate.g8b4d987dd233. A scan found no machine paths or credential markers in them. The packaging test checks the lockfile integrity against the committed bytes. - The
MCP applicationandfrontendCI jobs pass; theapiandauthjobs were still pending when I looked, and this PR does not touch them.
What I checked in the code:
createMcpFetchAppreplaces the hand-built Host/Origin, body and budget wiring.requestMsstill defaults to the 60 sHANDLER_BOUND_MS, so the SDK's 10 s default does not clamp the tool.- The lifetime is passed into
createAnsariMcpServer. The retired fixtures only re-tested behavior the SDK now owns, and the Ansari-specific checks stay: the 60 s budget, the allowlists replacing localhost, upstream abort on timeout, and SIGTERM shutdown. VIEW_MAJOR = 1givesui://views/answer-card.v1.htmlon both the closed and diagnostic cards. The tests and the Docker smoke script now expect the stable address.sdk-identity.mjs, the build stamp and the packaging test compute the same candidate identity, and thecheck-releaseregex accepts theapps/mcp/candidatespath.
Non-blocking:
apps/mcp/README.mdline 104 (MCP_VIEW_DIAGNOSTICS_ORIGINrow) says a diagnostics origin "changes the card's bytes, address and permissions", and line 139 says "changes bytes, address and permissions". The address no longer changes (view-artifact.tsanddiagnostics.test.tssay so). Dropping "address" from both would make the docs consistent.- Before upstream, replace the candidate pin as the PR describes. Until then the tarballs are the only record of what the SDK candidate contained.
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.
Addresses Q1 of iaser-ai#335.
What changes
Card address. The card is served at
ui://views/answer-card.v1.html, which names its compatibility line, not a hash of its bytes. Every compatible release keeps this address, including a release stamp or a card change. So a host that still holds a tool descriptor from before a deploy reads a card the server still serves.VIEW_MAJORinsrc/server/view-artifact.tsgoes up only for a change an already-loaded card can't handle.SAGA 1.0 release candidate. The SDK is packed from its source at commit
8b4d987and committed underapps/mcp/candidates/until1.0.0-rc.1is on the npm registry.pnpm-workspace.yamloverrides the five siblings to those tarballs.@modelcontextprotocol/serverandclientmove to 2.4.0,honoto 4.13.16 and@hono/node-serverto 2.1.5. The root overrides fordompurifyand@hono/node-serverfollow the SDK's documentation;apps/mcpis their only consumer.Less SAGA glue. SAGA's
createMcpFetchAppnow serves/mcp: Host and Origin admission, body bounds, the request budget, lifetime attachment and the official stateless handler. Ansari keeps its own routes (/healthand the Dev-only diagnostics beacon) and its logs. The server factory receives the request lifetime instead of building budgets, and the budget stays at the tool's 60 s bound.mcp.errorcarries SAGA's fixed failure kind.Tests
Also: app version 0.17.0, the SAGA credit links to the SDK repository, and the README and walkthrough describe the above.
Verification
pnpm mcp verifypassed: lint, typecheck, 145 tests and 78 browser checks.bash apps/mcp/scripts/verify-container.shpassed. The root-context Docker build installs from the committed tarballs, and the container servesui://views/answer-card.v1.html.pnpm check:release --target devpasses.--target betarefuses the candidate.Before upstream
When
1.0.0-rc.1is on the npm registry:apps/mcp/candidates/.test/packaging.test.ts.🤖 Generated with Claude Code