@code-yeongyu/senpi 2026.6.10 → 2026.6.13
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.
- package/CHANGELOG.md +68 -1
- package/README.md +21 -21
- package/dist/cli/startup-ui.d.ts +10 -0
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +72 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +3 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +31 -7
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts +0 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js +0 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +4 -4
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.d.ts +0 -5
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.js +0 -4
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +0 -6
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +0 -3
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +10 -2
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.d.ts +0 -3
- package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.js +0 -13
- package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +12 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js +1 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-registry.d.ts +0 -3
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +3 -3
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +43 -6
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/project-trust.js +2 -2
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +0 -4
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +0 -15
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +11 -2
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +6 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +17 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +0 -7
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/index.d.ts +0 -5
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +0 -67
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +3 -5
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +38 -34
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/tail-window.d.ts +15 -0
- package/dist/core/tools/tail-window.d.ts.map +1 -0
- package/dist/core/tools/tail-window.js +75 -0
- package/dist/core/tools/tail-window.js.map +1 -0
- package/dist/core/trust-manager.d.ts +8 -3
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +26 -11
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +17 -6
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/aborted-error-label.d.ts +2 -0
- package/dist/modes/interactive/aborted-error-label.d.ts.map +1 -0
- package/dist/modes/interactive/aborted-error-label.js +8 -0
- package/dist/modes/interactive/aborted-error-label.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +101 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +45 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +4 -4
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +18 -18
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +0 -4
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +0 -7
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/event-output-buffer.d.ts +10 -0
- package/dist/modes/rpc/event-output-buffer.d.ts.map +1 -0
- package/dist/modes/rpc/event-output-buffer.js +27 -0
- package/dist/modes/rpc/event-output-buffer.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +9 -11
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +17 -7
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +10 -3
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +14 -0
- package/dist/utils/shell.js.map +1 -1
- package/docs/compaction-guide.md +9 -9
- package/docs/compaction.md +2 -2
- package/docs/containerization.md +22 -22
- package/docs/custom-provider.md +13 -13
- package/docs/development.md +4 -2
- package/docs/extensions.md +18 -19
- package/docs/index.md +4 -4
- package/docs/json.md +21 -15
- package/docs/keybindings.md +6 -3
- package/docs/models.md +6 -6
- package/docs/packages.md +11 -11
- package/docs/prompt-templates.md +2 -2
- package/docs/providers.md +9 -9
- package/docs/rpc.md +14 -13
- package/docs/sdk.md +13 -9
- package/docs/security.md +14 -10
- package/docs/session-format.md +4 -4
- package/docs/sessions.md +14 -14
- package/docs/settings.md +14 -12
- package/docs/skills.md +8 -8
- package/docs/terminal-setup.md +2 -2
- package/docs/termux.md +3 -3
- package/docs/tui.md +4 -4
- package/docs/usage.md +52 -59
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/README.md +4 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +0 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +7 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/README.md +2 -4
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +0 -3
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +252 -470
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +533 -740
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +12 -5
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +11 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +29 -16
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts +0 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js +0 -13
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +0 -14
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +59 -19
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -5
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -8
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +1 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +93 -9
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +89 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +15 -8
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +72 -16
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -4
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +1 -7
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +5 -5
- package/dist/core/experimental.d.ts +0 -2
- package/dist/core/experimental.d.ts.map +0 -1
- package/dist/core/experimental.js +0 -4
- package/dist/core/experimental.js.map +0 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts +0 -11
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +0 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.js +0 -40
- package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +0 -1
- package/dist/core/extensions/builtin/system-messages.d.ts +0 -47
- package/dist/core/extensions/builtin/system-messages.d.ts.map +0 -1
- package/dist/core/extensions/builtin/system-messages.js +0 -117
- package/dist/core/extensions/builtin/system-messages.js.map +0 -1
- package/dist/core/index.d.ts +0 -13
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -13
- package/dist/core/index.js.map +0 -1
package/docs/usage.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Using
|
|
1
|
+
# Using Senpi
|
|
2
2
|
|
|
3
3
|
This page collects day-to-day usage details that do not fit on the quickstart page.
|
|
4
4
|
|
|
@@ -53,7 +53,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
53
53
|
| `/reload` | Reload keybindings, extensions, skills, prompts, and context files |
|
|
54
54
|
| `/hotkeys` | Show all keyboard shortcuts |
|
|
55
55
|
| `/changelog` | Display version history |
|
|
56
|
-
| `/quit` | Quit
|
|
56
|
+
| `/quit` | Quit senpi |
|
|
57
57
|
|
|
58
58
|
## Message Queue
|
|
59
59
|
|
|
@@ -64,21 +64,21 @@ You can submit messages while the agent is still working:
|
|
|
64
64
|
- **Escape** aborts and restores queued messages to the editor.
|
|
65
65
|
- **Alt+Up** retrieves queued messages back to the editor.
|
|
66
66
|
|
|
67
|
-
On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want
|
|
67
|
+
On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want senpi to receive the shortcut.
|
|
68
68
|
|
|
69
69
|
Configure delivery in [Settings](settings.md) with `steeringMode` and `followUpMode`.
|
|
70
70
|
|
|
71
71
|
## Sessions
|
|
72
72
|
|
|
73
|
-
Sessions are saved automatically to `~/.
|
|
73
|
+
Sessions are saved automatically to `~/.senpi/agent/sessions/`, organized by working directory.
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
senpi -c # Continue most recent session
|
|
77
|
+
senpi -r # Browse and select a session
|
|
78
|
+
senpi --no-session # Ephemeral mode; do not save
|
|
79
|
+
senpi --name "my task" # Set session display name at startup
|
|
80
|
+
senpi --session <path|id> # Use a specific session file or session ID
|
|
81
|
+
senpi --fork <path|id> # Fork a session into a new session file
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Useful session commands:
|
|
@@ -93,36 +93,29 @@ See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
|
|
|
93
93
|
|
|
94
94
|
## Context Files
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Senpi loads `AGENTS.md` or `CLAUDE.md` at startup from:
|
|
97
97
|
|
|
98
|
-
- `~/.
|
|
98
|
+
- `~/.senpi/agent/AGENTS.md` for global instructions
|
|
99
99
|
- parent directories, walking up from the current working directory
|
|
100
100
|
- the current directory
|
|
101
101
|
|
|
102
102
|
Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Replace the default system prompt with:
|
|
107
|
-
|
|
108
|
-
- `.pi/SYSTEM.md` for a project
|
|
109
|
-
- `~/.pi/agent/SYSTEM.md` globally
|
|
110
|
-
|
|
111
|
-
Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
|
|
104
|
+
To replace or extend the default system prompt, use the `--system-prompt` and `--append-system-prompt` CLI flags described under [Other Options](#other-options).
|
|
112
105
|
|
|
113
106
|
### Project Trust
|
|
114
107
|
|
|
115
|
-
On interactive startup,
|
|
108
|
+
On interactive startup, senpi asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.senpi/agent/trust.json`. Trusting a project allows senpi to load `.senpi/settings.json` and `.senpi` resources, install missing project packages, and execute project extensions.
|
|
116
109
|
|
|
117
|
-
Before the trust decision,
|
|
110
|
+
Before the trust decision, senpi loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
|
|
118
111
|
|
|
119
|
-
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore
|
|
112
|
+
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
120
113
|
|
|
121
|
-
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.
|
|
114
|
+
If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.senpi/agent/settings.json`, or change it with `/settings`.
|
|
122
115
|
|
|
123
|
-
`
|
|
116
|
+
`senpi config` and package commands use the same project trust flow, except `senpi update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
124
117
|
|
|
125
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.
|
|
118
|
+
Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.senpi/agent/trust.json` only; the current session is not reloaded, so restart senpi for changes to take effect.
|
|
126
119
|
|
|
127
120
|
|
|
128
121
|
## Exporting and Sharing Sessions
|
|
@@ -131,31 +124,31 @@ Use `/export [file]` to write a session to HTML.
|
|
|
131
124
|
|
|
132
125
|
Use `/share` to upload a private GitHub gist with a shareable HTML link.
|
|
133
126
|
|
|
134
|
-
If you use
|
|
127
|
+
If you use senpi for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
|
|
135
128
|
|
|
136
129
|
## CLI Reference
|
|
137
130
|
|
|
138
131
|
```bash
|
|
139
|
-
|
|
132
|
+
senpi [options] [@files...] [messages...]
|
|
140
133
|
```
|
|
141
134
|
|
|
142
135
|
### Package Commands
|
|
143
136
|
|
|
144
137
|
```bash
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
138
|
+
senpi install <source> [-l] # Install package, -l for project-local
|
|
139
|
+
senpi remove <source> [-l] # Remove package
|
|
140
|
+
senpi uninstall <source> [-l] # Alias for remove
|
|
141
|
+
senpi update [source|self|senpi] # Update senpi and packages; reconcile pinned git refs
|
|
142
|
+
senpi update --extensions # Update packages only; reconcile pinned git refs
|
|
143
|
+
senpi update --self # Update senpi only
|
|
144
|
+
senpi update --extension <src> # Update one package
|
|
145
|
+
senpi list # List installed packages
|
|
146
|
+
senpi config # Enable/disable package resources
|
|
154
147
|
```
|
|
155
148
|
|
|
156
|
-
These commands manage
|
|
149
|
+
These commands manage senpi packages, not the senpi CLI installation. To uninstall senpi itself, see [Quickstart](quickstart.md#uninstall). `senpi config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command. `senpi update` never prompts for project trust.
|
|
157
150
|
|
|
158
|
-
See [
|
|
151
|
+
See [Senpi Packages](packages.md) for package sources and security notes.
|
|
159
152
|
|
|
160
153
|
### Modes
|
|
161
154
|
|
|
@@ -167,10 +160,10 @@ See [Pi Packages](packages.md) for package sources and security notes.
|
|
|
167
160
|
| `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
|
|
168
161
|
| `--export <in> [out]` | Export a session to HTML |
|
|
169
162
|
|
|
170
|
-
In print mode,
|
|
163
|
+
In print mode, senpi also reads piped stdin and merges it into the initial prompt:
|
|
171
164
|
|
|
172
165
|
```bash
|
|
173
|
-
cat README.md |
|
|
166
|
+
cat README.md | senpi -p "Summarize this text"
|
|
174
167
|
```
|
|
175
168
|
|
|
176
169
|
### Model Options
|
|
@@ -224,7 +217,7 @@ Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
|
|
|
224
217
|
Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
|
|
225
218
|
|
|
226
219
|
```bash
|
|
227
|
-
|
|
220
|
+
senpi --no-extensions -e ./my-extension.ts
|
|
228
221
|
```
|
|
229
222
|
|
|
230
223
|
### Other Options
|
|
@@ -244,61 +237,61 @@ pi --no-extensions -e ./my-extension.ts
|
|
|
244
237
|
Prefix files with `@` to include them in the message:
|
|
245
238
|
|
|
246
239
|
```bash
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
240
|
+
senpi @prompt.md "Answer this"
|
|
241
|
+
senpi -p @screenshot.png "What's in this image?"
|
|
242
|
+
senpi @code.ts @test.ts "Review these files"
|
|
250
243
|
```
|
|
251
244
|
|
|
252
245
|
### Examples
|
|
253
246
|
|
|
254
247
|
```bash
|
|
255
248
|
# Interactive with initial prompt
|
|
256
|
-
|
|
249
|
+
senpi "List all .ts files in src/"
|
|
257
250
|
|
|
258
251
|
# Non-interactive
|
|
259
|
-
|
|
252
|
+
senpi -p "Summarize this codebase"
|
|
260
253
|
|
|
261
254
|
# Non-interactive with piped stdin
|
|
262
|
-
cat README.md |
|
|
255
|
+
cat README.md | senpi -p "Summarize this text"
|
|
263
256
|
|
|
264
257
|
# Named one-shot session
|
|
265
|
-
|
|
258
|
+
senpi --name "release audit" -p "Audit this repository"
|
|
266
259
|
|
|
267
260
|
# Different model
|
|
268
|
-
|
|
261
|
+
senpi --provider openai --model gpt-4o "Help me refactor"
|
|
269
262
|
|
|
270
263
|
# Model with provider prefix
|
|
271
|
-
|
|
264
|
+
senpi --model openai/gpt-4o "Help me refactor"
|
|
272
265
|
|
|
273
266
|
# Model with thinking level shorthand
|
|
274
|
-
|
|
267
|
+
senpi --model sonnet:high "Solve this complex problem"
|
|
275
268
|
|
|
276
269
|
# Limit model cycling
|
|
277
|
-
|
|
270
|
+
senpi --models "claude-*,gpt-4o"
|
|
278
271
|
|
|
279
272
|
# Read-only mode
|
|
280
|
-
|
|
273
|
+
senpi --tools read,grep,find,ls -p "Review the code"
|
|
281
274
|
|
|
282
275
|
# Disable one extension or built-in tool while keeping the rest available
|
|
283
|
-
|
|
276
|
+
senpi --exclude-tools ask_question
|
|
284
277
|
```
|
|
285
278
|
|
|
286
279
|
### Environment Variables
|
|
287
280
|
|
|
288
281
|
| Variable | Description |
|
|
289
282
|
|----------|-------------|
|
|
290
|
-
| `
|
|
291
|
-
| `
|
|
283
|
+
| `SENPI_CODING_AGENT_DIR` | Override config directory; default is `~/.senpi/agent` |
|
|
284
|
+
| `SENPI_CODING_AGENT_SESSION_DIR` | Override session storage directory; overridden by `--session-dir` |
|
|
292
285
|
| `PI_PACKAGE_DIR` | Override package directory, useful for Nix/Guix store paths |
|
|
293
286
|
| `PI_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
|
|
294
|
-
| `PI_SKIP_VERSION_CHECK` | Skip the
|
|
287
|
+
| `PI_SKIP_VERSION_CHECK` | Skip the senpi version update check at startup. This prevents the npm registry latest-version request |
|
|
295
288
|
| `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
|
|
296
289
|
| `PI_CACHE_RETENTION` | Set to `long` for extended prompt cache where supported |
|
|
297
290
|
| `VISUAL`, `EDITOR` | External editor for Ctrl+G |
|
|
298
291
|
|
|
299
292
|
## Design Principles
|
|
300
293
|
|
|
301
|
-
|
|
294
|
+
Senpi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
|
|
302
295
|
|
|
303
296
|
It intentionally does not include built-in MCP, permission popups, plan mode, to-dos, or long-running shell orchestration. You can build or install those workflows as extensions or packages, or use external tools such as containers and tmux.
|
|
304
297
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.79.
|
|
9
|
+
"version": "0.79.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "0.79.
|
|
9
|
+
"version": "0.79.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.9.
|
|
9
|
+
"version": "1.9.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.79.
|
|
9
|
+
"version": "0.79.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
|
@@ -106,7 +106,7 @@ Tool execution mode is configurable:
|
|
|
106
106
|
|
|
107
107
|
In parallel mode, tool completion events follow tool completion order, but persisted toolResult messages still follow assistant source order.
|
|
108
108
|
|
|
109
|
-
The mode can be set globally via `toolExecution` in the agent config, or per-tool via `executionMode` on `AgentTool`.
|
|
109
|
+
The mode can be set globally via `toolExecution` in the agent config, or per-tool via `executionMode` on `AgentTool`. In parallel mode, a tool call targeting a tool with `executionMode: "sequential"` runs as an exclusive barrier: it waits for all previously scheduled calls in the batch to finish, and later calls wait for it to complete. Parallel tools before or after the barrier still execute concurrently with each other.
|
|
110
110
|
|
|
111
111
|
The `beforeToolCall` hook runs after `tool_execution_start` and validated argument parsing. It can block execution. The `afterToolCall` hook runs after tool execution finishes and before `tool_execution_end` and final tool result message events are emitted.
|
|
112
112
|
|
|
@@ -164,7 +164,7 @@ const agent = new Agent({
|
|
|
164
164
|
initialState: {
|
|
165
165
|
systemPrompt: string,
|
|
166
166
|
model: Model<any>,
|
|
167
|
-
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh",
|
|
167
|
+
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // "max" is Anthropic-only adaptive thinking effort
|
|
168
168
|
tools: AgentTool<any>[],
|
|
169
169
|
messages: AgentMessage[],
|
|
170
170
|
},
|
|
@@ -391,7 +391,8 @@ const readFileTool: AgentTool = {
|
|
|
391
391
|
path: Type.String({ description: "File path" }),
|
|
392
392
|
}),
|
|
393
393
|
// Override execution mode for this tool (optional).
|
|
394
|
-
// "sequential"
|
|
394
|
+
// "sequential" makes this tool an exclusive barrier in parallel batches:
|
|
395
|
+
// it runs alone, but parallel tools before or after it still run concurrently.
|
|
395
396
|
// "parallel" allows concurrent execution with other tool calls.
|
|
396
397
|
// If omitted, the global toolExecution config applies.
|
|
397
398
|
executionMode: "sequential",
|
|
@@ -571,8 +571,11 @@ async function prepareToolCall(currentContext, assistantMessage, toolCall, confi
|
|
|
571
571
|
}
|
|
572
572
|
async function executePreparedToolCall(prepared, signal, emit) {
|
|
573
573
|
const updateEvents = [];
|
|
574
|
+
let acceptingUpdates = true;
|
|
574
575
|
try {
|
|
575
576
|
const result = await prepared.tool.execute(prepared.toolCall.id, prepared.args, signal, (partialResult) => {
|
|
577
|
+
if (!acceptingUpdates)
|
|
578
|
+
return;
|
|
576
579
|
updateEvents.push(Promise.resolve(emit({
|
|
577
580
|
type: "tool_execution_update",
|
|
578
581
|
toolCallId: prepared.toolCall.id,
|
|
@@ -581,16 +584,21 @@ async function executePreparedToolCall(prepared, signal, emit) {
|
|
|
581
584
|
partialResult,
|
|
582
585
|
})));
|
|
583
586
|
});
|
|
587
|
+
acceptingUpdates = false;
|
|
584
588
|
await Promise.all(updateEvents);
|
|
585
589
|
return { result, isError: false };
|
|
586
590
|
}
|
|
587
591
|
catch (error) {
|
|
592
|
+
acceptingUpdates = false;
|
|
588
593
|
await Promise.all(updateEvents);
|
|
589
594
|
return {
|
|
590
595
|
result: createErrorToolResult(error instanceof Error ? error.message : String(error)),
|
|
591
596
|
isError: true,
|
|
592
597
|
};
|
|
593
598
|
}
|
|
599
|
+
finally {
|
|
600
|
+
acceptingUpdates = false;
|
|
601
|
+
}
|
|
594
602
|
}
|
|
595
603
|
async function finalizeExecutedToolCall(currentContext, assistantMessage, prepared, executed, config, signal) {
|
|
596
604
|
let result = executed.result;
|