Merged
Conversation
Add pi (https://github.com/badlogic/pi-mono) as a supported source. Pi is a terminal-based AI coding agent. Integration is via a TypeScript extension (codeisland-pi.ts) that forwards pi lifecycle events to the CodeIsland Unix socket, following the same hook-event protocol as other supported tools. Changes: - SessionSnapshot: add "pi" to supportedSources and displayName - AppState: add findPiPids() and route "pi" in findPids(forSource:) - Resources: add codeisland-pi.ts extension and pi.png icon placeholder The extension maps pi events to CodeIsland hook_event_names: session_start → SessionStart session_shutdown → SessionEnd before_agent_start → UserPromptSubmit tool_call (safe) → PreToolUse tool_call (dangerous) → PermissionRequest (blocking via bridge) tool_result → PostToolUse agent_end → Stop session_before_compact → PreCompact session_compact → PostCompact Installation: drop codeisland-pi.ts into ~/.pi/agent/extensions/ and reload pi with /reload. No settings.json changes required. Note: pi.png is a placeholder — a proper pixel mascot and icon can be contributed as a follow-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add pi as a supported source.
Pi is a terminal-based AI coding agent built with Node.js. Integration uses the existing CodeIsland Unix socket hook-event protocol — no new protocol or app architecture changes are required.
How it works
A TypeScript extension (
codeisland-pi.ts) runs inside pi and forwards lifecycle events to the CodeIsland socket, following the samehook_event_nameconvention as all other supported tools.hook_event_namesession_startSessionStartsession_shutdownSessionEndbefore_agent_startUserPromptSubmittool_call(safe)PreToolUsetool_call(dangerous bash)PermissionRequest(blocking via bridge)tool_resultPostToolUseagent_endStopsession_before_compactPreCompactsession_compactPostCompactChanges
Sources/CodeIslandCore/SessionSnapshot.swift— add"pi"tosupportedSourcesanddisplayNameSources/CodeIsland/AppState.swift— addfindPiPids()and route"pi"infindPids(forSource:)Sources/CodeIsland/Resources/codeisland-pi.ts— the pi extension users installSources/CodeIsland/Resources/cli-icons/pi.png— placeholder icon (proper pixel mascot welcome as follow-up)Installation (user side)
CodeIsland picks up pi sessions automatically — no further configuration needed.
Notes
pi.pngis a placeholder; a proper pixel-art mascot can be contributed separatelyConfigInstallerauto-install support (like OpenCode) can be added as a follow-up once the core integration is validated