Skip to content

Mount the Frames endpoint - #86

Open
dcmcand wants to merge 1 commit into
slice/frames-21-forwarderfrom
slice/frames-22-mount
Open

dcmcand wants to merge 1 commit into
slice/frames-21-forwarderfrom
slice/frames-22-mount

Conversation

@dcmcand

@dcmcand dcmcand commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Slice 22: Frames endpoint in the gateway

With Frames on, a coding agent's app token reaches /frames/mcp on the gateway (including its internal host) and gets Frames' answer for its own person, using the broker's token, and anything else is refused.

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 22)
Contracts touched: Gateway Frames endpoint /frames/mcp, The internal host serves the Frames endpoint
Depends on: #85

  • /frames/mcp = CrossOriginProtection(RequireAgentToken(requireFramesCap(forwarder))): cookie 401; personal, job, shared-app, or non-Frames agent tokens 403 before any broker or Frames call.
  • The token source is the broker, for the token's own person; each broker error maps to its own agent-facing text.
  • The internal host serves /frames/mcp; a background start probe; nothing mounted in the local build.

Reviewer notes:

  • The full -race run fails in packages this PR does not touch (load-dependent races and timing; also at the base). CI runs without -race.
  • To check on the test cluster (Slice 25): a curl from an agent pod to /frames/mcp is not refused by go-sdk's loopback Host check.

Validation

Step Command / action Expected Result
unit go test -count=1 -race ./internal/gateway/... ./internal/cli/... ok without -race: ok; Frames tests ok under -race; other packages' existing -race failures noted above
local make test-local ok exit 0

With frames.enabled on, the gateway mounts /frames/mcp, behind cross-
origin protection, RequireAgentToken and a Frames cap check. Only a
coding agent app's own live token whose template sets agentFrames gets
through; anything else is refused before the broker or Frames is asked.
The handler asks the broker for the token's person's Frames token and
forwards the call; each broker error reaches the agent as its own text.

The internal host pods call serves /frames/mcp as well as /api/. At start
a background probe checks Frames is reachable without holding start.
The local build mounts nothing.

contracts.md gains the endpoint and the internal-host change, patterns.md
names the new route on the internal host, and the plan's evidence,
checkpoint review and deviations are updated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant