mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 00:02:54 +00:00
Pi previously fell back to terminal-title heuristics on the dashboard
because it has no settings.json hook surface — its extensibility is the
in-process TypeScript extension API. Add a bundled extension that POSTs
pi lifecycle events to the existing agent-hooks server, modeled on the
OpenCode plugin pattern.
- Add 'pi' source to AgentHookServer with /hook/pi route, normalizePiEvent,
extractPiToolFields, and isNewTurnEvent('pi', 'before_agent_start')
- Map pi events: before_agent_start | agent_start | tool_call |
tool_execution_start/_end | message_end -> working;
agent_end | session_shutdown -> done
- Ship orca-agent-status.ts via PiTitlebarExtensionService's per-PTY overlay
alongside the existing titlebar-spinner and prefill extensions; the
extension reads the same ORCA_AGENT_HOOK_* endpoint file the OpenCode
plugin uses (survives Orca restart for already-spawned PTYs)
- Add pi tool names (bash, read, write, edit, grep, web_search, fetch_content)
to TOOL_INPUT_KEYS_BY_TOOL so deriveToolInputPreview produces useful row
previews; glob is shared with Gemini's existing entry
- Add 'pi' to WellKnownAgentType + 'Pi' label
- Tests: 12 new pi normalization tests in agent-hooks/server.test.ts
Co-authored-by: Orca <help@stably.ai>