feat: add Pi as first-class Mosaic runtime #339
Reference in New Issue
Block a user
Delete Branch "feat/pi-runtime-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds Pi (
@mariozechner/pi-coding-agent) as a native runtime alongside Claude, Codex, and OpenCode. This enablesmosaic piandmosaic yolo pias first-class launch commands, with full framework contract injection, skill loading, and lifecycle hooks.Motivation
Pi is already embedded in the gateway (
@mariozechner/pi-coding-agent~0.57.1) and MACP plugin (@mariozechner/pi-agent-core). Making it a first-class launcher runtime enables standalone Mosaic usage without the full gateway/database stack — just Pi +~/.config/mosaic/.Pi is also the cleanest integration target:
--append-system-promptfor native contract injection (no config-file-write workarounds)--skillfor native Mosaic skill discovery (SKILL.md format compatible)--extensionfor TypeScript lifecycle hooks (replaces bash shims)Changes
Monorepo (
@mosaic/mosaic)types.ts— Add'pi'toRuntimeNameunionruntime/detector.ts— Add Pi toRUNTIME_DEFS(command:pi, version:--version)runtime/installer.ts— Addpi: 'Pi'labelruntime/mcp-config.ts— AddconfigurePiMcp()targeting~/.pi/agent/settings.jsonstages/runtime-setup.ts— Add'pi'to wizard runtime scan listLocal Install (
~/.config/mosaic/) — applied separatelyruntime/pi/RUNTIME.md— Pi runtime contractruntime/pi/mosaic-extension.ts— Pi extension (session lifecycle, mission detection,/mosaic-statuscommand)bin/mosaic—launch_pi(), yolo pi, coord --pi, prdy --piadapters/pi.md— Pi adapter documentationAGENTS.md— Pi added to runtime load orderUsage
Testing
pnpm --filter @mosaic/mosaic typecheck— cleanpnpm --filter @mosaic/mosaic build— cleanbash -n) — cleanmosaic pilaunches successfully with framework injected