- Add build:binary script for Bun compilation
- Add paths.ts for cross-platform asset resolution (npm/bun/tsx)
- Add GitHub Actions workflow for automated binary releases
- Update README with installation options
Based on #89 by @steipete
Add npm script to build a standalone binary using Bun's bytecode compilation.
The binary is ~30% faster than Node.js for CLI operations.
Benchmark results (10 runs, simple query):
- Bun Bytecode Binary: 1.82s avg
- Bun runtime: 2.09s avg
- Node.js: 2.59s avg
Startup time only (--help):
- Bun Bytecode: 0.049s (3.8x faster than Node)
- Bun runtime: 0.121s
- Node.js: 0.185s
Usage: npm run build:binary
Output: dist/pi-binary
Requires Bun 1.3+ for bytecode compilation support.
Display '✓ logged in' indicator next to providers where the user is already authenticated. This makes it clear at a glance whether you're using your Claude Pro/Max subscription.
Fix race condition where app_mention event fires before message event
logs to log.jsonl, causing the user's triggering message to be missing
from the agent's context. Now append the current message directly from
ctx.message to recentMessages.
Since version 0.9.0, RPC mode (--mode rpc) was not saving messages to
session files. The agent.subscribe() call with session management logic
was only present in the TUI renderer after it was refactored.
RPC mode now properly saves sessions just like interactive mode.
Added test for RPC mode session management to prevent regression.
Fixes#83
Thanks @kiliman for reporting this issue!
Previously, the selected line in @ fuzzy search and Tab completion used
accent color for prefix/label but muted color for description. Now the
entire selected line uses the accent color for better visual consistency.
Add grep, find, and ls tools for safe code exploration without modification risk.
These tools are available via the new --tools CLI flag.
- grep: Uses ripgrep (auto-downloaded) for fast regex searching. Respects .gitignore,
supports glob filtering, context lines, and hidden files.
- find: Uses fd (auto-downloaded) for fast file finding. Respects .gitignore, supports
glob patterns, and hidden files.
- ls: Lists directory contents with proper sorting and directory indicators.
- --tools flag: Specify available tools (e.g., --tools read,grep,find,ls for read-only mode)
- Dynamic system prompt adapts to selected tools with relevant guidelines
Closes#74
- Replace slow synchronous directory walking with fd for fuzzy file search
- Auto-download fd to ~/.pi/agent/tools/ if not found in PATH
- Performance improved from ~900ms to ~10ms per keystroke on large repos
- Remove minimatch dependency from tui package
- Graceful degradation if fd unavailable (empty results)
Fixes#69
Breaking Changes:
- Timestamps now use Slack format - run migrate-timestamps.ts for existing logs
Added:
- Channel/user ID mappings in system prompt
- Skills documentation in system prompt
- Debug last_prompt.txt output
- Bash working directory info
- Token-efficient log queries filtering tool calls
Changed:
- Turn-based message context (groups consecutive bot messages as one turn)
- Messages sorted by Slack timestamp
- Condensed system prompt (~5k → ~2.7k chars)
- Simplified user prompt
- Selective logging (skip UI status labels)
Fixed:
- Duplicate message logging from app_mention handler
- Username obfuscation in thread messages
- Messages > 40k chars are split into multiple Slack messages
- Full tool results now shown in thread (no truncation)
- Main message truncates with 'see thread for full response' if too long
- Keep jsonl log truncation for storage efficiency
- Truncate messages exceeding Slack's 40,000 char limit
- Catch Slack API errors in queue and post to thread instead of crashing
- Add error context to queue operations for better debugging
- Wrap replaceMessage in try/catch
- During execution: show tool labels, thinking, and text in main message
- After completion: replace main message with only final assistant text
- Post thinking (italic) and text to thread for full audit trail
- Add promise queue to ensure ctx.respond calls execute sequentially
- Add log.logThinking() and log.logResponse() for console output
- Get final text from agent.state.messages instead of tracking
Closes#65
- Footer now displays active git branch after directory path (e.g., ~/project (main))
- Branch detected by reading .git/HEAD directly (fast, synchronous)
- Cache refreshed after each assistant message to detect branch changes
- Handles normal branches, detached HEAD, and non-git repos
Closes#55