Documentation
¶
Overview ¶
Command workshop runs the ap-workshop sidecar: a Streamable-HTTP MCP server that lives inside the plan-2 workshop namespace W and exposes the agent builder's workshop tools (added starting with Task 2) to the builder agent's runner.
It holds exactly two controller-issued tokens, both minted by the AgentSession/Workshop reconcilers (pkg/controllers/agentsession/sidecarpod.go's identity branch, pkg/controllers/workshop/controller.go) and never by this binary itself:
- a projected ServiceAccount token at /var/run/secrets/workshop/serviceaccount/token, RBAC-bounded to W, used to build the controller-runtime client every workshop CR read/write goes through; and
- an operator bearer, delivered as the env var "token" (the <session>-workshop-token Secret's key, envFrom'd by the controller), used to reach the operator's memory/HTTP routes.
This sidecar holds no LLM credential and no "pods" verb — see the design spec §13 and the plan-3b Global Constraints.
registries.go blank-imports the same self-registering Kind packages internal/cmd/runner/main.go links, so a registry lookup inside this sidecar — Task 2's `inventory` tool foremost — reports the cluster's REAL registered set rather than whatever subset this binary happened to pull in transitively. Kept as its own file (mirroring the runner's own convention of naming these blank imports explicitly) so "what does the workshop sidecar register" is answerable by reading one file.
The channel-kind and artifact-renderer blocks below must be kept in sync with internal/cmd/runner/main.go's own blank-import block; tools_inventory_test.go's TestInventory_RegistryParityWithRunner AST-parses both files and fails when they diverge.
The sandbox-kind block is the one exception: it mirrors internal/cmd/operator/main.go, not the runner's — the runner never provisions a sandbox (the operator's SpiceboxSession/ToolCall controllers do), so there is no runner-side blank import for `inventory`'s SandboxClasses field to mirror. TestInventory_RegistryParityWithRunner checks this block against the operator instead, and says so.
This file stayed in internal/cmd/workshop (package main) when the rest of this package's tool files moved to pkg/tools/workshopmcp: it blank-imports 26 self-registering packages, and dragging those into every importer of workshopmcp — including test/e2e, which links workshopmcp to drive the server in-process — would be a real coupling and compile-cost hit for a harness that doesn't need any of them registered. The consequence is deliberate: `inventory`'s registry-derived fields (ChannelKinds, Renderers, SandboxBackends, …), read in-process by a harness that links only workshopmcp, report whatever THAT harness itself links — which is the more honest answer for e2e than a copy of this binary's own registered set. pkg/tools/workshopmcp's OWN unit tests are the one exception: they need a real registered set to keep asserting what they asserted before the split, so pkg/tools/workshopmcp/registries_test.go blank-imports the channel-kind/artifact-renderer/sandbox-kind subset of this list — a _test.go file, so it never reaches any non-test importer of workshopmcp.