This demo runs the Code Mode router against an external yoko Connect supergraph instead of the local employees federation used by make code-mode-demo.
It is useful when you want to exercise Code Mode against a richer set of plugins (Pylon, Linear, PostHog, Circleback, Slack, Notion) served by the yoko project.
It is designed to coexist with make code-mode-demo: it uses different ports (router 3012, MCP 5037, yoko-mock 5038), so both demos can run side-by-side.
- A local checkout of the
yokoConnect supergraph project (separate repository). Inside that checkout you must already have built the plugins and composed the supergraph so that the directory contains:config.json— the composed router config for the yoko supergraph.plugins/— the plugin binaries the router will load.
- Go (toolchain matching the repo
go.mod). - The
codexCLI onPATH, authenticated. The Yoko mock shells out tocodexfor query generation.
From the repository root, set YOKO_DIR to your local yoko checkout and run:
make code-mode-connect-demo YOKO_DIR=/path/to/yokoYOKO_DIR is required.
The target fails fast with a clear error if it is missing or if the directory does not contain config.json.
What the target does:
- Builds
router/router. - Builds
demo/code-mode/yoko-mock/yoko-mock. - Starts
yoko-mockonlocalhost:5038. - Starts the router with
YOKO_DIRas its working directory anddemo/code-mode-connect/router-config.yamlas its config. The router resolvesconfig.jsonandplugins/relative to that CWD, which is whyYOKO_DIRmust be a real composed yoko checkout.
Expected ports:
- Router GraphQL:
http://localhost:3012/graphql - Code Mode MCP:
http://127.0.0.1:5037/mcp - Yoko mock:
http://localhost:5038
Press Ctrl-C in the foreground terminal. If anything is left behind, run:
make code-mode-connect-demo-downThe process logs for background services are written to /tmp/cosmo-code-mode-connect-demo-logs.
router-config.yaml propagates the auth headers expected by the yoko plugins (X-Pylon-Token, X-Linear-Token, X-Posthog-Token, X-Circleback-Token, X-Slack-Token, X-Notion-Token, etc.).
Provide values for these on the request side when calling the router so the plugins can reach their upstream services.