feat: flag-gated playground-token mint for local MCP testing#87
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…turn playground minting Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaM9hGtqua4ZC2bKD2d2Fq
…view minors) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaM9hGtqua4ZC2bKD2d2Fq
…playground TUI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaM9hGtqua4ZC2bKD2d2Fq
…helm pin Playground discovery is now on by default for local dev (AEP_MCP_URL="" disables it); PLAYGROUND_TOKEN_ENABLED's Go default is false so the helm explicit pin was redundant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaM9hGtqua4ZC2bKD2d2Fq
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaM9hGtqua4ZC2bKD2d2Fq
xlight05
added a commit
to xlight05/labs-agentic-engineer
that referenced
this pull request
Jul 6, 2026
…so2#87/wso2#89) into rewrite-improve Second upstream sync after the dependency-management merge. Mostly net-new (take-theirs); a handful of shared files resolved keep-ours + graft-their-additive. TAKE-THEIRS (net-new, clean): - services/collab — Yjs collaboration server skeleton for Tiptap collaborative markdown spec editing (PR wso2#86, phases 1-6) + apps/console/src/features/spec/collab/*. - playground-token: internal/feature/dependencies/playground_token.go + /internal/v1/mcp/playground-token surface (flag-gated on PLAYGROUND_TOKEN_ENABLED, off by default; docker-compose sets it) + services/agents/playground/mcp.ts (MCP discovery resolver) + config.PlaygroundTokenEnabled. RESOLVE-UNION (both added, keep both): - deployments/docker-compose.yml (AEP_WORKSPACE_ROOT + PLAYGROUND_TOKEN_ENABLED). - services/agents/.env.example (our agents config + the AEP_MCP_* discovery vars). - CONTEXT.md (our GitHub-native glossary + the new "Playground token" entry). - pnpm-lock.yaml (regenerated from the merged package.json set). KEEP-OURS + graft their additive bits: - surfaces.go — keep our /internal/v1/executions/ model; take the new MCP + playground-token doc rows; drop their stale /internal/v1/tasks/ row. - services/agents/AGENTS.md — keep our accurate per-turn-key/workspace model doc; drop their boot-time-ANTHROPIC_API_KEY line; graft the playground-MCP bullet. - services/agents/playground/playground.ts — keep our committed-truth workspace turn shape (workspaceRef/EvalWorkspace/evalTurnHeaders); add the mcpResolver + `mcp` on the turn body; SKIP their /tasks command (the structured task-planner we don't have) + its `model` field. SKIP (consciously not adopted): the structured task-planner glossary entry + the /tasks playground command (task-planner is the SKIP'd structured agent). Validation: aep-api go build/vet/tests green (incl. the new playground-token surface test); pnpm turbo typecheck 12/13 green (@aep/collab net-new, @aep/agents, @aep/agent-stream all green). @aep/console fails ONLY on pre-existing gaps (verify-2 CreateProjectRequest.prompt + the two-console convergence deferral) — not introduced by this merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Gives the agents playground a way to authenticate with aep-api's MCP discovery endpoint for local testing only — closing the "no way to run the playground against real catalogs" gap without prejudging the open agent→BFF authentication decision (#85 open question 1).
Stacked on #85 (the MCP surface it authenticates against lives there); GitHub will retarget this to
aep-rewritewhen #85 merges.How it works
sequenceDiagram participant P as Playground TUI (host) participant A as aep-api :9090 Note over P,A: every design turn P->>A: POST /internal/v1/mcp/playground-token {orgHandle} A-->>P: {token, expiresInSeconds: 300} P->>A: POST /internal/v1/mcp (Bearer token) — tools/list, tools/call A-->>P: catalogs (external resources, org endpoints, resource types)POST /internal/v1/mcp/playground-token— mints a fresh 5-minute MCP token ({orgHandle}optional, default"default"). The route is only mounted whenPLAYGROUND_TOKEN_ENABLED=true: default is false, onlydocker-compose.ymlsets it, helm pins itfalseexplicitly, and when disabled the path 404s by absence. Registered as a raw mux handler beside the MCP mount, so it structurally cannot appear in the generated OpenAPI contract. No caller auth by design — the flag (plus local reachability) is the gate, and the endpoint comment documents that the production posture remains an open decision.AEP_MCP_URLis set andAEP_MCP_TOKENis not, it mints a fresh token per turn (no caching — the 5-minute TTL can never expire mid-session). An explicitAEP_MCP_TOKENis used verbatim and skips minting. Mint failure warns once and the session continues without discovery tools. The/tasksbreakdown command does not touch MCP at all — discovery is a design-turn concern; the planner reads the published bundle.✗ error(it assumed the file tools' result shape; MCP results are bare strings).Verified live
All four dependency checks pass on the real TUI (driven end-to-end): external-kind discovery reusing a registered resource by exact name and schema keys; org-service resolution to the exact catalog name; platform-resource emitting
postgres-cnpgfrom the type catalog;/tasksflagging the provisioning gate in its rationale. Per-turn minting confirmed at the wire (mints on design turns only; zero MCP traffic from/tasks).🤖 Generated with Claude Code
https://claude.ai/code/session_01HaM9hGtqua4ZC2bKD2d2Fq