@oh-my-pi/pi-coding-agent 10.6.2 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +80 -79
  3. package/docs/compaction.md +182 -149
  4. package/docs/config-usage.md +141 -78
  5. package/docs/custom-tools.md +45 -16
  6. package/docs/extension-loading.md +56 -954
  7. package/docs/extensions.md +192 -51
  8. package/docs/hooks.md +109 -70
  9. package/docs/python-repl.md +52 -19
  10. package/docs/rpc.md +43 -19
  11. package/docs/sdk.md +270 -211
  12. package/docs/session-tree-plan.md +60 -417
  13. package/docs/session.md +104 -39
  14. package/docs/skills.md +59 -95
  15. package/docs/theme.md +139 -110
  16. package/docs/tree.md +42 -33
  17. package/docs/tui.md +226 -80
  18. package/package.json +8 -9
  19. package/src/capability/index.ts +3 -4
  20. package/src/cli/args.ts +4 -4
  21. package/src/cli/grep-cli.ts +1 -1
  22. package/src/commit/agentic/index.ts +4 -3
  23. package/src/commit/git/index.ts +2 -3
  24. package/src/commit/map-reduce/index.ts +2 -1
  25. package/src/config/prompt-templates.ts +2 -0
  26. package/src/config/settings-schema.ts +30 -7
  27. package/src/config/settings.ts +0 -14
  28. package/src/config.ts +2 -2
  29. package/src/discovery/agents.ts +36 -0
  30. package/src/discovery/index.ts +1 -0
  31. package/src/exa/mcp-client.ts +3 -3
  32. package/src/ipy/executor.ts +5 -7
  33. package/src/ipy/gateway-coordinator.ts +1 -1
  34. package/src/ipy/kernel.ts +20 -15
  35. package/src/ipy/prelude.py +1 -1
  36. package/src/ipy/runtime.ts +7 -6
  37. package/src/lsp/lspmux.ts +3 -3
  38. package/src/main.ts +6 -8
  39. package/src/mcp/tool-bridge.ts +19 -9
  40. package/src/modes/components/assistant-message.ts +2 -2
  41. package/src/modes/components/hook-editor.ts +4 -4
  42. package/src/modes/components/settings-defs.ts +37 -2
  43. package/src/modes/components/tool-execution.ts +7 -7
  44. package/src/modes/controllers/command-controller.ts +2 -2
  45. package/src/modes/controllers/event-controller.ts +4 -7
  46. package/src/modes/controllers/input-controller.ts +4 -4
  47. package/src/modes/controllers/selector-controller.ts +1 -0
  48. package/src/modes/interactive-mode.ts +3 -5
  49. package/src/modes/rpc/rpc-mode.ts +8 -9
  50. package/src/patch/index.ts +6 -6
  51. package/src/prompts/agents/explore.md +2 -2
  52. package/src/prompts/agents/frontmatter.md +5 -5
  53. package/src/prompts/agents/plan.md +3 -2
  54. package/src/prompts/agents/reviewer.md +1 -1
  55. package/src/prompts/system/system-prompt.md +1 -3
  56. package/src/sdk.ts +13 -9
  57. package/src/session/agent-session.ts +6 -4
  58. package/src/session/compaction/compaction.ts +3 -3
  59. package/src/session/session-manager.ts +8 -9
  60. package/src/ssh/connection-manager.ts +4 -4
  61. package/src/system-prompt.ts +2 -6
  62. package/src/task/agents.ts +1 -1
  63. package/src/task/executor.ts +31 -8
  64. package/src/task/index.ts +14 -35
  65. package/src/task/omp-command.ts +3 -1
  66. package/src/task/output-manager.ts +20 -6
  67. package/src/task/parallel.ts +3 -3
  68. package/src/task/render.ts +16 -2
  69. package/src/task/types.ts +13 -20
  70. package/src/task/worktree.ts +3 -3
  71. package/src/tools/ask.ts +3 -8
  72. package/src/tools/fetch.ts +2 -2
  73. package/src/tools/gemini-image.ts +5 -6
  74. package/src/tools/grep.ts +5 -5
  75. package/src/tools/index.ts +12 -5
  76. package/src/tools/read.ts +1 -1
  77. package/src/tools/todo-write.ts +2 -3
  78. package/src/utils/frontmatter.ts +1 -1
  79. package/src/utils/image-resize.ts +1 -1
  80. package/src/utils/timings.ts +3 -2
  81. package/src/web/scrapers/github.ts +2 -2
  82. package/src/web/scrapers/utils.ts +2 -3
  83. package/src/web/scrapers/youtube.ts +2 -3
  84. package/src/web/search/auth.ts +5 -6
  85. package/src/web/search/providers/anthropic.ts +3 -2
  86. package/src/utils/terminal-notify.ts +0 -37
package/CHANGELOG.md CHANGED
@@ -2,6 +2,50 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [11.0.0] - 2026-02-05
6
+
7
+ ### Added
8
+
9
+ - Added UI dropdown options for `task.maxRecursion Depth` setting with presets (Unlimited, None, Single, Double, Triple)
10
+ - Added UI dropdown options for `grep.contextBefore` setting with presets (0-5 lines)
11
+ - Added UI dropdown options for `grep.contextAfter` setting with presets (0-10 lines)
12
+ - Added `task.maxRecursionDepth` setting to control how many levels deep subagents can spawn their own subagents (0=none, 1=one level, 2=two levels, -1=unlimited)
13
+ - Added support for nested task artifact naming with parent task prefixes (e.g., "0-Auth.1-Subtask") to organize hierarchical task outputs
14
+ - Added `taskDepth` and `parentTaskPrefix` options to `CreateAgentSessionOptions` for tracking subagent recursion depth and organizing nested artifacts
15
+ - Added `task.maxConcurrency` setting to control concurrent limit for subagents (default: 32)
16
+ - Added UI options for task concurrency configuration with presets from unlimited to 64 tasks
17
+ - Added support for loading skills from `~/.agents/skills`
18
+
19
+ ### Changed
20
+
21
+ - Simplified `task.maxRecursionDepth` description in settings UI to remove specific value examples
22
+ - Made thinking level persistence optional via `persist` parameter in `setThinkingLevel()` method, allowing temporary thinking level changes without saving to settings
23
+ - Updated thinking level cycling to no longer persist changes to settings, enabling quick iteration through thinking levels without modifying user preferences
24
+ - Replaced nanoid with Snowflake for ID generation throughout codebase for improved performance and collision resistance
25
+ - Updated session ID format in documentation from nanoid to snowflake hex string (e.g., "a1b2c3d4e5f60001")
26
+ - Renamed environment variable prefix from `OMP_` to `PI_` throughout codebase (e.g., `OMP_DEBUG_STARTUP` → `PI_DEBUG_STARTUP`, `OMP_PYTHON_GATEWAY_URL` → `PI_PYTHON_GATEWAY_URL`)
27
+ - Removed `env` setting from configuration schema; environment variables are no longer automatically applied from settings
28
+ - Changed `venvPath` property in PythonRuntime from nullable to optional (returns `undefined` instead of `null`)
29
+ - Simplified notification settings from protocol-specific options (bell, osc99, osc9) to simple on/off toggle for `completion.notify` and `ask.notify`
30
+ - Moved notification protocol detection and sending to `TERMINAL` API from local utility functions
31
+ - Changed task tool spawns configuration from "explore" to "*" to allow subagents to spawn any agent type
32
+ - Changed system prompt to enable parallel delegation guidance for all agents (removed coordinator-only restriction)
33
+ - Changed task tool to automatically disable itself when maximum recursion depth is reached, preventing infinite nesting
34
+ - Changed task concurrency from hardcoded constant to configurable setting via `task.maxConcurrency`
35
+ - Changed concurrency limit calculation to support unlimited concurrency when set to 0
36
+
37
+ ### Removed
38
+
39
+ - Removed nanoid dependency from package.json
40
+ - Removed `terminal-notify.ts` utility module with `detectNotificationProtocol()`, `sendNotification()`, and `isNotificationSuppressed()` functions
41
+ - Removed `MAX_PARALLEL_TASKS` constant and associated task count validation limit
42
+
43
+ ### Fixed
44
+
45
+ - Fixed MCP tool name generation to properly sanitize server and tool names, preventing invalid characters and duplicate prefixes in tool identifiers
46
+ - Fixed task ID display formatting to show hierarchical structure for nested tasks (e.g., "0.1 Auth>Subtask" instead of "0-Auth.1-Subtask")
47
+ - Improved frontmatter parsing error messages to include source context for better debugging
48
+
5
49
  ## [10.6.1] - 2026-02-04
6
50
 
7
51
  ### Added
package/README.md CHANGED
@@ -59,13 +59,13 @@ npm install -g @oh-my-pi/pi-coding-agent
59
59
 
60
60
  Download from [GitHub Releases](https://github.com/can1357/oh-my-pi/releases):
61
61
 
62
- | Platform | Binary |
63
- | ------------------- | ------------------------ |
64
- | macOS Apple Silicon | `omp-darwin-arm64` |
65
- | macOS Intel | `omp-darwin-x64` |
66
- | Linux x64 | `omp-linux-x64` |
67
- | Linux ARM64 | `omp-linux-arm64` |
68
- | Windows x64 | `omp-windows-x64.exe` |
62
+ | Platform | Binary |
63
+ | ------------------- | --------------------- |
64
+ | macOS Apple Silicon | `omp-darwin-arm64` |
65
+ | macOS Intel | `omp-darwin-x64` |
66
+ | Linux x64 | `omp-linux-x64` |
67
+ | Linux ARM64 | `omp-linux-arm64` |
68
+ | Windows x64 | `omp-windows-x64.exe` |
69
69
 
70
70
  ```bash
71
71
  # macOS/Linux
@@ -201,24 +201,24 @@ The agent reads, writes, and edits files, and executes commands via bash.
201
201
 
202
202
  ### Slash Commands
203
203
 
204
- | Command | Description |
205
- | ------------------------- | --------------------------------------------------------------------------- |
206
- | `/settings` | Open settings menu (thinking, theme, queue mode, toggles) |
204
+ | Command | Description |
205
+ | ------------------------- | ----------------------------------------------------------------------------------------------- |
206
+ | `/settings` | Open settings menu (thinking, theme, queue mode, toggles) |
207
207
  | `/model` | Switch models mid-session. Use `/model <search>` or `provider/model` to prefilter/disambiguate. |
208
- | `/export [file]` | Export session to HTML file |
209
- | `/dump` | Copy session transcript to clipboard |
210
- | `/share` | Upload session as secret GitHub gist, get shareable URL (requires `gh` CLI) |
211
- | `/session` | Show session info: path, message counts, token usage, cost |
212
- | `/hotkeys` | Show all keyboard shortcuts |
213
- | `/changelog` | Display full version history |
214
- | `/tree` | Navigate session tree in-place (search, filter, label entries) |
215
- | `/branch` | Create new conversation branch from a previous message |
216
- | `/resume` | Switch to a different session (interactive selector) |
217
- | `/login` | OAuth login for subscription-based models |
218
- | `/logout` | Clear OAuth tokens |
219
- | `/new` | Start a new session |
220
- | `/copy` | Copy last agent message to clipboard |
221
- | `/compact [instructions]` | Manually compact conversation context |
208
+ | `/export [file]` | Export session to HTML file |
209
+ | `/dump` | Copy session transcript to clipboard |
210
+ | `/share` | Upload session as secret GitHub gist, get shareable URL (requires `gh` CLI) |
211
+ | `/session` | Show session info: path, message counts, token usage, cost |
212
+ | `/hotkeys` | Show all keyboard shortcuts |
213
+ | `/changelog` | Display full version history |
214
+ | `/tree` | Navigate session tree in-place (search, filter, label entries) |
215
+ | `/branch` | Create new conversation branch from a previous message |
216
+ | `/resume` | Switch to a different session (interactive selector) |
217
+ | `/login` | OAuth login for subscription-based models |
218
+ | `/logout` | Clear OAuth tokens |
219
+ | `/new` | Start a new session |
220
+ | `/copy` | Copy last agent message to clipboard |
221
+ | `/compact [instructions]` | Manually compact conversation context |
222
222
 
223
223
  ### Editor Features
224
224
 
@@ -245,13 +245,13 @@ The agent reads, writes, and edits files, and executes commands via bash.
245
245
 
246
246
  **Editing:**
247
247
 
248
- | Key | Action |
249
- | ------------------------- | ---------------------------- |
250
- | Enter | Send message |
248
+ | Key | Action |
249
+ | ------------------------- | ----------------------------------------- |
250
+ | Enter | Send message |
251
251
  | Shift+Enter | New line (Ctrl+Enter on Windows Terminal) |
252
- | Ctrl+W / Option+Backspace | Delete word backwards |
253
- | Ctrl+U | Delete to start of line |
254
- | Ctrl+K | Delete to end of line |
252
+ | Ctrl+W / Option+Backspace | Delete word backwards |
253
+ | Ctrl+U | Delete to start of line |
254
+ | Ctrl+K | Delete to end of line |
255
255
 
256
256
  **Other:**
257
257
 
@@ -366,6 +366,7 @@ When disabled, neither case triggers automatic compaction (use `/compact` manual
366
366
  ```
367
367
 
368
368
  **Environment Variables (`env`):**
369
+
369
370
  - Automatically sets environment variables when the application starts
370
371
  - Only sets variables that aren't already present in `process.env`
371
372
  - Supports any environment variable, not just API keys
@@ -564,7 +565,7 @@ Global `~/.omp/agent/settings.json` stores persistent preferences:
564
565
  | Setting | Description | Default |
565
566
  | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------- |
566
567
  | `theme` | Color theme name | auto-detected |
567
- | `modelRoles` | Model assignments by role (e.g., `{"default": "...", "slow": "...", "smol": "...", "plan": "..."}`) | - |
568
+ | `modelRoles` | Model assignments by role (e.g., `{"default": "...", "slow": "...", "smol": "...", "plan": "..."}`) | - |
568
569
  | `defaultThinkingLevel` | Thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh` | - |
569
570
  | `enabledModels` | Model patterns for cycling. Supports glob patterns (`github-copilot/*`, `*sonnet*`) and fuzzy matching. Same as `--models` CLI flag | - |
570
571
  | `queueMode` | Message queue mode: `all` or `one-at-a-time` | `one-at-a-time` |
@@ -824,33 +825,33 @@ omp [options] [@files...] [messages...]
824
825
 
825
826
  ### Options
826
827
 
827
- | Option | Description |
828
- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
828
+ | Option | Description |
829
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
829
830
  | `--provider <name>` | Provider: `anthropic`, `openai`, `google`, `mistral`, `xai`, `groq`, `cerebras`, `openrouter`, `zai`, `cursor`, `github-copilot`, `openai-codex`, `google-gemini-cli`, `google-antigravity`, or custom |
830
- | `--model <id>` | Model ID |
831
- | `--api-key <key>` | API key (overrides environment) |
832
- | `--system-prompt <text\|file>` | Custom system prompt (text or file path) |
833
- | `--append-system-prompt <text\|file>` | Append to system prompt |
834
- | `--mode <mode>` | Output mode: `text`, `json`, `rpc` (implies `--print`) |
835
- | `--print`, `-p` | Non-interactive: process prompt and exit |
836
- | `--no-session` | Don't save session |
837
- | `--session <path>` | Use specific session file |
838
- | `--session-dir <dir>` | Directory for session storage and lookup |
839
- | `--continue`, `-c` | Continue most recent session |
840
- | `--resume`, `-r` | Select session to resume |
841
- | `--models <patterns>` | Comma-separated patterns for model role cycling. Supports glob patterns (e.g., `anthropic/*`, `*sonnet*:high`) and fuzzy matching (e.g., `sonnet,haiku:low`) |
842
- | `--no-tools` | Disable all built-in tools |
843
- | `--tools <tools>` | Restrict to comma-separated tool list (default: all tools enabled) |
844
- | `--thinking <level>` | Thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
845
- | `--extension <path>`, `-e` | Load an extension file (can be used multiple times) |
846
- | `--no-extensions` | Disable extension discovery (explicit `-e` paths still work) |
847
- | `--no-skills` | Disable skills discovery and loading |
848
- | `--skills <patterns>` | Comma-separated glob patterns to filter skills (e.g., `git-*,docker`) |
849
- | `--no-lsp` | Disable LSP integration |
850
- | `--hook <path>` | Load a hook file (for debugging) |
851
- | `--export <file> [output]` | Export session to HTML |
852
- | `--help`, `-h` | Show help |
853
- | `--version`, `-v` | Show version |
831
+ | `--model <id>` | Model ID |
832
+ | `--api-key <key>` | API key (overrides environment) |
833
+ | `--system-prompt <text\|file>` | Custom system prompt (text or file path) |
834
+ | `--append-system-prompt <text\|file>` | Append to system prompt |
835
+ | `--mode <mode>` | Output mode: `text`, `json`, `rpc` (implies `--print`) |
836
+ | `--print`, `-p` | Non-interactive: process prompt and exit |
837
+ | `--no-session` | Don't save session |
838
+ | `--session <path>` | Use specific session file |
839
+ | `--session-dir <dir>` | Directory for session storage and lookup |
840
+ | `--continue`, `-c` | Continue most recent session |
841
+ | `--resume`, `-r` | Select session to resume |
842
+ | `--models <patterns>` | Comma-separated patterns for model role cycling. Supports glob patterns (e.g., `anthropic/*`, `*sonnet*:high`) and fuzzy matching (e.g., `sonnet,haiku:low`) |
843
+ | `--no-tools` | Disable all built-in tools |
844
+ | `--tools <tools>` | Restrict to comma-separated tool list (default: all tools enabled) |
845
+ | `--thinking <level>` | Thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
846
+ | `--extension <path>`, `-e` | Load an extension file (can be used multiple times) |
847
+ | `--no-extensions` | Disable extension discovery (explicit `-e` paths still work) |
848
+ | `--no-skills` | Disable skills discovery and loading |
849
+ | `--skills <patterns>` | Comma-separated glob patterns to filter skills (e.g., `git-*,docker`) |
850
+ | `--no-lsp` | Disable LSP integration |
851
+ | `--hook <path>` | Load a hook file (for debugging) |
852
+ | `--export <file> [output]` | Export session to HTML |
853
+ | `--help`, `-h` | Show help |
854
+ | `--version`, `-v` | Show version |
854
855
 
855
856
  ### File Arguments
856
857
 
@@ -906,11 +907,11 @@ omp --export session.jsonl output.html
906
907
 
907
908
  ### Environment Variables
908
909
 
909
- | Variable | Description |
910
- |----------|-------------|
910
+ | Variable | Description |
911
+ | ------------------------------------------- | ----------------------------------------------------------------- |
911
912
  | `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc. | API keys for providers (see [API Keys & OAuth](#api-keys--oauth)) |
912
- | `OMP_CODING_AGENT_DIR` | Override the agent config directory (default: `~/.omp/agent`) |
913
- | `VISUAL`, `EDITOR` | External editor for Ctrl+G (e.g., `vim`, `code --wait`) |
913
+ | `PI_CODING_AGENT_DIR` | Override the agent config directory (default: `~/.omp/agent`) |
914
+ | `VISUAL`, `EDITOR` | External editor for Ctrl+G (e.g., `vim`, `code --wait`) |
914
915
 
915
916
  ---
916
917
 
@@ -920,27 +921,27 @@ All tools are enabled by default. Use `--tools <list>` to restrict to a subset.
920
921
 
921
922
  ### Core Tools
922
923
 
923
- | Tool | Description |
924
- | ------- | --------------------------------------------------------------------------------------------------------------- |
925
- | `read` | Read file contents. Images sent as attachments. Text: first 2000 lines. Use offset/limit for large files. |
926
- | `write` | Write/overwrite file. Creates parent directories. |
927
- | `edit` | Replace text in file with fuzzy whitespace matching. Fails if text appears multiple times or not found. |
928
- | `bash` | Execute command. Returns stdout/stderr. Optional `timeout` parameter. |
929
- | `grep` | Search file contents (regex or literal). Respects `.gitignore`. |
930
- | `find` | Search for files by glob pattern. Respects `.gitignore`. |
931
- | `ls` | List directory contents. Includes dotfiles. |
924
+ | Tool | Description |
925
+ | ------- | --------------------------------------------------------------------------------------------------------- |
926
+ | `read` | Read file contents. Images sent as attachments. Text: first 2000 lines. Use offset/limit for large files. |
927
+ | `write` | Write/overwrite file. Creates parent directories. |
928
+ | `edit` | Replace text in file with fuzzy whitespace matching. Fails if text appears multiple times or not found. |
929
+ | `bash` | Execute command. Returns stdout/stderr. Optional `timeout` parameter. |
930
+ | `grep` | Search file contents (regex or literal). Respects `.gitignore`. |
931
+ | `find` | Search for files by glob pattern. Respects `.gitignore`. |
932
+ | `ls` | List directory contents. Includes dotfiles. |
932
933
 
933
934
  ### Additional Built-in Tools
934
935
 
935
- | Tool | Description |
936
- | ------------- | ----------------------------------------------------- |
937
- | `task` | Spawn sub-agents for complex multi-step tasks |
938
- | `lsp` | Language Server Protocol queries (go-to-definition, references, hover) |
939
- | `todo_write` | Track task progress during sessions |
940
- | `web_search` | Search the web |
941
- | `fetch` | Fetch and process URLs |
942
- | `python` | Execute Python code in IPython kernel |
943
- | `notebook` | Edit Jupyter notebook cells |
936
+ | Tool | Description |
937
+ | ------------ | ---------------------------------------------------------------------- |
938
+ | `task` | Spawn sub-agents for complex multi-step tasks |
939
+ | `lsp` | Language Server Protocol queries (go-to-definition, references, hover) |
940
+ | `todo_write` | Track task progress during sessions |
941
+ | `web_search` | Search the web |
942
+ | `fetch` | Fetch and process URLs |
943
+ | `python` | Execute Python code in IPython kernel |
944
+ | `notebook` | Edit Jupyter notebook cells |
944
945
 
945
946
  Example: `--tools read,grep,find,ls` for read-only code review.
946
947