Skip to content

feat: add Pi coding agent adapter (pi + pi-web) - #157

Open
XiaoLrrr wants to merge 1 commit into
RealZST:mainfrom
XiaoLrrr:main
Open

XiaoLrrr wants to merge 1 commit into
RealZST:mainfrom
XiaoLrrr:main

Conversation

@XiaoLrrr

Copy link
Copy Markdown

What

Adds a pi adapter for Pi, the coding agent by Mario Zechner (badlogic). Its config root is ~/.pi/agent ($PI_CODING_AGENT_DIR).

pi-web is the local browser UI for the same agent and reuses the same ~/.pi/agent configuration β€” it has no separate config root, so one adapter covers both the pi CLI and pi-web.

Details

  • Skills: ~/.pi/agent/skills (user) + .pi/skills (project), recursive SKILL.md discovery per the Agent Skills spec. Pi also reads the universal ~/.agents/skills / .agents/skills, which stay owned by the codex/antigravity/qoder-cn adapters (not double-claimed).
  • MCP: ~/.pi/agent/mcp.json (user) + .pi/mcp.json (project), JSON {"mcpServers": {...}} with a native per-entry enabled flag. Toggling flips it in place (set_pi_mcp_enabled), preserving description, timeout, exposure, toolExposure, cwd, oauth, env, headers.
  • Plugins: ~/.pi/agent/extensions + .pi/extensions, TypeScript/JS modules (single-file + index.{ts,js} directory form), same shape as omp.
  • Context/rules: AGENTS.md / AGENTS.override.md / CLAUDE.md (+ .MD variants) from the agent dir and each ancestor of the cwd.
  • Remote MCP: new RemoteMcpSchema::PlainUrlHttpOnly β€” the file shape matches Cursor/Kiro PlainUrl, but Pi rejects the legacy SSE transport (docs/mcp.md), so remote entries are Streamable HTTP only.
  • No shell-command hooks (extensions are TS/JS modules) β†’ HookFormat::None.

Also updates the frontend AGENT_ORDER + display name, the agent capability matrix tests, and the README agent table (16 β†’ 17 agents).

Verification

  • cargo check -p hk-core passes
  • cargo test -p hk-core adapter::tests β€” 15 passed
  • cargo test -p hk-core adapter::pi::tests β€” 4 passed
  • cargo test -p hk-core deployer::tests β€” 82 passed

Note: 3 pre-existing copilot / openclaw tests fail on Windows due to Unix-path assumptions; unrelated to this change.

Upstream docs used

@XiaoLrrr
XiaoLrrr force-pushed the main branch 3 times, most recently from c946db2 to 3efd5fc Compare October 14, 2026 03:29
Pi is the coding agent at github.com/earendil-works/pi with its config root
at ~/.pi/agent ($PI_CODING_AGENT_DIR). pi-web (agegr/pi-web) is the local
browser UI for the same agent and shares this config root, so one adapter
covers both.

- adapter/pi.rs: skills (~/.pi/agent/skills + ~/.agents/skills universal +
  npm package skills/ dirs; project .pi/skills + .agents/skills), MCP
  (~/.pi/agent/mcp.json, .pi/mcp.json β€” JSON mcpServers with native
  per-entry enabled), plugins (settings.json `packages` npm packages +
  ~/.pi/agent/extensions local TS modules), context files (AGENTS.md /
  CLAUDE.md variants), settings.json
- deployer: set_pi_mcp_enabled (native MCP enabled flag in place) and
  set_pi_package_enabled (add/remove npm package declaration in `packages`)
- manager: toggle dispatch for pi MCP + npm-package vs local-TS plugin toggle
- RemoteMcpSchema::PlainUrlHttpOnly (Pi is Streamable HTTP only, no SSE)
- frontend: AGENT_ORDER + display name "Pi" + onboarding scatter coords
- README: agent matrix + supported-agent count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant