Skip to content

Commit 3034131

Browse files
committed
fix(mcp): launcher runs the consumer's pinned .#odu, not github:
The odu-mcp launcher defaulted to `nix run github:juspay/odu -- mcp` — an unpinned fetch of master that (a) bypasses the npins pin the consuming repo deliberately maintains and (b) fails outright until a release lands on master. A consuming repo pins odu via npins and re-exports it as `.#odu`; the launcher now runs that exact pinned output (override with ODU_FLAKE). Docs updated.
1 parent 2997b5b commit 3034131

3 files changed

Lines changed: 21 additions & 20 deletions

File tree

.apm/skills/odu-mcp/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ that re-exposes a live CI run as agent tools (`run`, `get_nodes`, `tail_log`,
1212
`odu://log/{node}`), so Claude Code / Codex / opencode / Gemini CLI drive CI
1313
with structured calls instead of scraping terminal output.
1414

15-
`bin/serve` is self-contained — it resolves odu via `nix run` and serves over
16-
stdio in the consumer's repo (dialing `.ci/odu.sock`). Set `ODU_FLAKE` to
17-
override the odu flake-ref (default `github:juspay/odu`); a repo that
18-
re-exports odu can point it at its own pinned output with `ODU_FLAKE=.#odu`.
15+
`bin/serve` resolves odu through the consuming repo's own pinned flake output
16+
(`nix run .#odu -- mcp`) and serves over stdio in that repo (dialing
17+
`.ci/odu.sock`) — the exact, npins-pinned odu the repo's CI uses, never an
18+
unpinned `github:` fetch. Override the flake-ref with `ODU_FLAKE`.
1919

2020
Full docs in the [repo README](https://github.com/juspay/odu/blob/master/README.md).
2121

.apm/skills/odu-mcp/bin/serve

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/usr/bin/env bash
2-
# Launch the odu MCP server — odu's agent face. Resolves odu via Nix and runs
3-
# `odu mcp` in the current directory: the server dials `.ci/odu.sock` and
4-
# starts / attaches to runs in the cwd, so an MCP host launching this from the
5-
# repo root drives that repo's CI. Self-contained — no surrounding devshell
6-
# required. Requires flakes (`experimental-features = nix-command flakes`).
2+
# Launch the odu MCP server — odu's agent face. Runs `odu mcp` in the current
3+
# directory: the server dials `.ci/odu.sock` and starts / attaches to runs in
4+
# the cwd, so an MCP host launching this from the repo root drives that repo's
5+
# CI. Requires flakes (`experimental-features = nix-command flakes`).
76
#
8-
# Override knobs (env vars):
9-
# ODU_FLAKE — flake-ref for odu (default: github:juspay/odu). A consuming
10-
# repo that re-exports odu can point this at its pinned output,
11-
# e.g. ODU_FLAKE=.#odu
7+
# Resolves odu through the CONSUMING repo's own flake output (`.#odu`) — the
8+
# repo pins odu via npins and re-exports it, so the agent face is the exact,
9+
# pinned odu the repo's CI uses (never an unpinned `github:` fetch). Override
10+
# with ODU_FLAKE for a non-standard output or an out-of-tree odu.
1211
set -euo pipefail
13-
exec nix run --accept-flake-config "${ODU_FLAKE:-github:juspay/odu}" -- mcp "$@"
12+
exec nix run --accept-flake-config "${ODU_FLAKE:-.#odu}" -- mcp "$@"

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,16 @@ The agent loop is `run` → `wait_for_settle` (fail-fast) → read the red node'
162162
{ "mcpServers": { "odu": {
163163
"type": "stdio",
164164
"command": "nix",
165-
"args": ["run", "github:juspay/odu", "--", "mcp"] } } }
165+
"args": ["run", ".#odu", "--", "mcp"] } } }
166166
```
167167

168-
Repos that manage agent config with [APM](https://github.com/juspay/apm) get
169-
this wired automatically by depending on `juspay/odu`: odu's `apm.yml` declares
170-
the MCP server, deploying the `odu-mcp` launcher and the `.mcp.json` entry into
171-
the consumer's tree (set `ODU_FLAKE=.#odu` to use a repo's own pinned odu
172-
instead of `github:juspay/odu`).
168+
`.#odu` is the repo's own pinned odu (it pins odu via npins and re-exports it),
169+
so the agent face is the exact odu the repo's CI uses — never an unpinned
170+
`github:` fetch. Repos that manage agent config with
171+
[APM](https://github.com/juspay/apm) get this wired automatically by depending
172+
on `juspay/odu`: odu's `apm.yml` declares the MCP server, deploying the
173+
`odu-mcp` launcher and the `.mcp.json` entry into the consumer's tree (the
174+
launcher runs `.#odu`; override with `ODU_FLAKE`).
173175

174176
## Honest notes
175177

0 commit comments

Comments
 (0)