Repository navigation
Conversation
internal/frames holds what the gateway and helper share about Frames: the route, the tools offered (list_frames, get_frame), the write tools refused, the token source seam, and a start probe that logs frames.ready or frames.unreachable without holding start. Six reason codes give agents plain texts for each failure. framesmcp.NewHandler is a stateless MCP server that offers exactly the two read tools with Frames' own input schemas, refuses the write tools without calling Frames, and forwards each call with a new go-sdk client. The person's token goes only to Frames' own scheme and host, the timeout bounds the Frames call alone, and an answer over 1 MiB is refused. A refused token logs frames.token_refused with Frames' reason and never the token. The call to Frames runs on a context of its own, because the agent's negotiated protocol version otherwise leaked into it and Frames refused the request. A frames-tagged integration test runs the forwarder against Frames' real handler at a pinned commit, built in a temporary repository and run in a loopback-only network namespace; CI vets that tag. contracts.md gains the log events, the tool error texts and the Frames tools, and the plan's evidence, checkpoint review and deviations are updated.
This branch has not been deployed
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.
Slice 21: The Frames MCP forwarder
A stateless MCP handler offers exactly
list_framesandget_frame, forwards them to Frames with the token a source gives, refuses writes without calling Frames, and turns every failure into a clear tool error within the timeout.Spec: nebari-dev/tapas/docs/superpowers/specs/2026-11-30-frames-integration-design.md
Plan: nebari-dev/tapas/docs/superpowers/plans/2026-12-01-agent-tokens-and-frames.md (Slice 21)
Contracts touched: Log events
frames.ready,frames.unreachable,frames.token_refused, Agent-facing texts of Frames tool errors, The local build imports no go-sdkDepends on: #84
internal/frames: route, tools, refused write tools, token source, start probe; no go-sdk import.framesmcp.NewHandler: stateless, exact schema mirror, writes refused with no call to Frames, token only to Frames' own host, timeout on the Frames call only, 1 MiB cap.frames) against Frames' real handler at pinae0718e, in a temp repo and a loopback-only namespace; CI vets the tag.Validation
go test -count=1 -race ./internal/frames/...go vet -tags frames ./internal/frames/framesmcp/NEBARI_FRAMES_DIR=../nebari-frames bash scripts/test/frames-integration.shok .../internal/frames/framesmcpmake test-local