Description
Adds pi (earendil-works/pi, formerly pi-mono) as a developer agent with the @grafana/agento11y-pi extension. doc-0002 “pi” has the facts: built-in MCP since 0.99 (use exposure direct), in-process extension that exports per-turn generations with cost from pi’s own catalog, preflight deny unsupported but preflight redaction supported, no permission system, and the stdin hang trap. A local spike on pi 1.2.0 with plugin 0.25.0 already verified print and JSON modes, export and postflight deny; the remaining spike is against real Bedrock profiles and the real stack.
Acceptance Criteria
- #1 Spike notes record: a session on a per-team application inference profile ARN completes with correct routing; cost_usd is non-zero with models.json cost; the session groups as expected in the Coding agents view; whether a SIGTERM mid-turn flushes the last generation
- #2 The dev-workstation image installs lockfile-pinned pi and @grafana/agento11y-pi with npm ci –ignore-scripts, and pi -e
-p runs in the container with PI_TELEMETRY=0, PI_OFFLINE=1 and PI_SKIP_VERSION_CHECK=1 - #3 A pi developer runs corpus sessions unattended with –mode json and stdin closed, follow-ups via the same –session-id, the demo MCP servers as mcp__
__ , and writes event=dev_session lines with agent=pi - #4 A pi session appears in the Coding agents view with the chosen agent name, user, team, model, tokens and cost
Definition of Done
- #1 just check
Implementation Plan
Pin pi 1.2.0 and plugin 0.25.0; implement the frozen session adapter contract and image wiring with process-edge tests. The deployment is currently absent, so real per-team profile and telemetry proof follows initial infrastructure provisioning; do not mark live criteria from local tests.
Implementation Notes
Dependency audit found obsolete auto-installed @mariozechner pi peers with eight high findings. Replaced those peer resolutions with npm aliases to the same pinned @earendil-works 1.2.0 packages. npm audit –omit=dev now reports zero vulnerabilities; all seven real CLI/plugin tests still pass.
Live throwaway ARM64 container proved per-team profile routing with scoped IAM key, same-session resume, nonzero cost and canonical model/user/team in four exported generations. First time-tool prompt used shell date; API inspection caught missing MCP because –no-extensions also disables builtin:mcp. Explicit -e builtin:mcp correction proven live by exported mcp__time__get_current_time in a separate session. SIGTERM and live guard acceptance remain pending.
SIGTERM live spike: signal sent immediately after first message_update; pi exited 143, and Agent Observability conversation read returned 404. The active generation did not flush. This is documented as a cancellation/capture limitation, not success or missing-cost proof.
Per-team ARN routing, cost, grouping API, cancellation behavior, pinned image and unattended resume/MCP behavior verified. Visual Coding agents criterion remains unverified by maintainer decision.
Implementation and required runtime/API evidence complete, including cancellation limitation; resume for explicitly deferred Coding agents visual verification and final host rollout after AIO-0007 (unpatched braces advisory disposition).