@code-yeongyu/senpi 2026.6.6-3 → 2026.6.10-2
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 +30 -0
- package/README.md +102 -100
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +7 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +59 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +3 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -1
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +1 -1
- package/dist/core/compaction/utils.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/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.js +0 -2
- package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +7 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +34 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +21 -1
- 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 +3 -4
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +23 -6
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +2 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +24 -26
- package/dist/core/prompt-templates.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/resource-loader.d.ts +14 -3
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +128 -58
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +34 -17
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-resident-store.d.ts +16 -0
- package/dist/core/session-resident-store.d.ts.map +1 -0
- package/dist/core/session-resident-store.js +48 -0
- package/dist/core/session-resident-store.js.map +1 -0
- package/dist/core/settings-manager.d.ts +4 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +9 -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/trust-manager.d.ts +22 -0
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +75 -22
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +92 -129
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +39 -34
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +7 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +26 -4
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +6 -3
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +22 -18
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +15 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +158 -19
- 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/interactive/working-status.d.ts +2 -0
- package/dist/modes/interactive/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/working-status.js +34 -0
- package/dist/modes/interactive/working-status.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 +6 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +58 -11
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/senpi +10 -1
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +78 -0
- package/dist/utils/changelog.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/docs.json +4 -0
- package/docs/extensions.md +46 -18
- package/docs/index.md +5 -4
- package/docs/json.md +21 -15
- package/docs/keybindings.md +6 -3
- package/docs/models.md +10 -43
- package/docs/packages.md +11 -13
- package/docs/prompt-templates.md +10 -3
- package/docs/providers.md +9 -9
- package/docs/rpc.md +14 -13
- package/docs/sdk.md +18 -9
- package/docs/security.md +55 -0
- package/docs/session-format.md +4 -4
- package/docs/sessions.md +14 -14
- package/docs/settings.md +14 -11
- package/docs/skills.md +8 -8
- package/docs/terminal-setup.md +38 -4
- package/docs/termux.md +3 -3
- package/docs/tmux.md +4 -2
- package/docs/tui.md +4 -4
- package/docs/usage.md +55 -57
- package/examples/extensions/README.md +1 -0
- 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/project-trust.ts +64 -0
- 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 +125 -77
- 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/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.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 -4
- 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 +4 -5
- 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/image-models.generated.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +355 -313
- 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 +376 -431
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.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 +15 -7
- 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 +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 +17 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.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-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +1 -7
- 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 +2 -16
- 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 +5 -1
- 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/overflow.d.ts +0 -4
- 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 +0 -6
- 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/autocomplete.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- 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 +89 -39
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +18 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +131 -61
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.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 +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -76
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -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 +14 -4
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -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 +43 -21
- 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 +4 -8
- 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/extensions/builtin/todotools/continuation/config.d.ts +0 -10
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.js +0 -33
- package/dist/core/extensions/builtin/todotools/continuation/config.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts +0 -5
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js +0 -34
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts +0 -11
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js +0 -201
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.d.ts +0 -6
- package/dist/core/extensions/builtin/todotools/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.js +0 -58
- package/dist/core/extensions/builtin/todotools/settings.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts +0 -34
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.js +0 -82
- package/dist/core/extensions/builtin/todotools/system-messages.js.map +0 -1
- package/dist/core/index.d.ts +0 -12
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -12
- package/dist/core/index.js.map +0 -1
package/docs/sessions.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Sessions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Senpi saves conversations as sessions so you can continue work, branch from earlier turns, and revisit previous paths.
|
|
4
4
|
|
|
5
5
|
## Session Storage
|
|
6
6
|
|
|
7
|
-
Sessions auto-save to `~/.
|
|
7
|
+
Sessions auto-save to `~/.senpi/agent/sessions/`, organized by working directory. Each session is a JSONL file with a tree structure.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
senpi -c # Continue most recent session
|
|
11
|
+
senpi -r # Browse and select from past sessions
|
|
12
|
+
senpi --no-session # Ephemeral mode; do not save
|
|
13
|
+
senpi --name "my task" # Set session display name at startup
|
|
14
|
+
senpi --session <path|id> # Use a specific session file or partial session ID
|
|
15
|
+
senpi --fork <path|id> # Fork a session file or partial session ID into a new session
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Use `/session` in interactive mode to see the current session file, session ID, message count, tokens, and cost.
|
|
@@ -36,7 +36,7 @@ For the JSONL file format and SessionManager API, see [Session Format](session-f
|
|
|
36
36
|
|
|
37
37
|
## Resuming and Deleting Sessions
|
|
38
38
|
|
|
39
|
-
`/resume` opens an interactive session picker for the current project. `
|
|
39
|
+
`/resume` opens an interactive session picker for the current project. `senpi -r` opens the same picker at startup.
|
|
40
40
|
|
|
41
41
|
In the picker you can:
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ In the picker you can:
|
|
|
47
47
|
- rename with Ctrl+R
|
|
48
48
|
- delete with Ctrl+D, then confirm
|
|
49
49
|
|
|
50
|
-
When available,
|
|
50
|
+
When available, senpi uses the `trash` CLI for deletion instead of permanently removing files.
|
|
51
51
|
|
|
52
52
|
## Naming Sessions
|
|
53
53
|
|
|
@@ -60,11 +60,11 @@ Use `/name <name>` to set a human-readable session name:
|
|
|
60
60
|
Set the name at startup with `--name` or `-n`:
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
senpi --name "Refactor auth module"
|
|
64
|
+
senpi --name "CI audit" -p "Review this build failure"
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Named sessions are easier to find in `/resume` and `
|
|
67
|
+
Named sessions are easier to find in `/resume` and `senpi -r`.
|
|
68
68
|
|
|
69
69
|
## Branching with `/tree`
|
|
70
70
|
|
|
@@ -128,7 +128,7 @@ Use `/tree` when you want to keep alternatives together. Use `/fork` or `/clone`
|
|
|
128
128
|
|
|
129
129
|
## Branch Summaries
|
|
130
130
|
|
|
131
|
-
When `/tree` switches away from one branch to another,
|
|
131
|
+
When `/tree` switches away from one branch to another, senpi can summarize the abandoned branch and attach that summary at the new position. This preserves important context from the path you left without replaying the whole branch.
|
|
132
132
|
|
|
133
133
|
When prompted, choose one of:
|
|
134
134
|
|
package/docs/settings.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Settings
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Senpi uses JSON settings files with project settings overriding global settings.
|
|
4
4
|
|
|
5
5
|
| Location | Scope |
|
|
6
6
|
|----------|-------|
|
|
@@ -11,13 +11,15 @@ Edit directly or use `/settings` for common options.
|
|
|
11
11
|
|
|
12
12
|
## Project Trust
|
|
13
13
|
|
|
14
|
-
On interactive startup,
|
|
14
|
+
On interactive startup, senpi asks before trusting a project folder that contains trust-gated project inputs 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.
|
|
15
15
|
|
|
16
|
-
Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without
|
|
16
|
+
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 trust-gated project inputs, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
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`.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
`senpi config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
21
|
+
|
|
22
|
+
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.
|
|
21
23
|
|
|
22
24
|
## All Settings
|
|
23
25
|
|
|
@@ -64,6 +66,7 @@ When this value is anything other than `"auto"`, it overrides any model-level `p
|
|
|
64
66
|
|---------|------|---------|-------------|
|
|
65
67
|
| `theme` | string | `"dark"` | Theme name (`"dark"`, `"light"`, or custom) |
|
|
66
68
|
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
69
|
+
| `defaultProjectTrust` | string | `"ask"` | Fallback project trust behavior: `"ask"`, `"always"`, or `"never"`. Global setting only |
|
|
67
70
|
| `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
|
|
68
71
|
| `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
|
|
69
72
|
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
@@ -74,9 +77,9 @@ When this value is anything other than `"auto"`, it overrides any model-level `p
|
|
|
74
77
|
|
|
75
78
|
### Telemetry and update checks
|
|
76
79
|
|
|
77
|
-
`enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks;
|
|
80
|
+
`enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks; senpi can still fetch the latest published `@code-yeongyu/senpi` version from the npm registry (`registry.npmjs.org`).
|
|
78
81
|
|
|
79
|
-
Set `PI_SKIP_VERSION_CHECK=1` to disable the
|
|
82
|
+
Set `PI_SKIP_VERSION_CHECK=1` to disable the senpi version update check. Use `--offline` or `PI_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
|
|
80
83
|
|
|
81
84
|
### Warnings
|
|
82
85
|
|
|
@@ -130,7 +133,7 @@ Set `PI_SKIP_VERSION_CHECK=1` to disable the Pi version update check. Use `--off
|
|
|
130
133
|
|
|
131
134
|
When a provider requests a retry delay longer than `retry.provider.maxRetryDelayMs` (e.g., Google's "quota will reset after 5h"), the request fails immediately with an informative error instead of waiting silently. Set to `0` to disable the cap.
|
|
132
135
|
|
|
133
|
-
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before
|
|
136
|
+
Keep `retry.provider.maxRetries` at `0` unless provider-level retries are explicitly needed. Setting it above `0` can make SDK/provider retries handle out-of-usage-limit errors before senpi sees them, which may block the agent until the provider quota resets in some circumstances.
|
|
134
137
|
|
|
135
138
|
```json
|
|
136
139
|
{
|
|
@@ -197,7 +200,7 @@ When unset, senpi leaves provider payloads unchanged. This setting currently app
|
|
|
197
200
|
}
|
|
198
201
|
```
|
|
199
202
|
|
|
200
|
-
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.
|
|
203
|
+
`npmCommand` is used for all npm package-manager operations, including installs, uninstalls, and dependency installs inside git packages. User-scoped npm packages install under `~/.senpi/agent/npm/`; project-scoped npm packages install under `.senpi/npm/`. Use argv-style entries exactly as the process should be launched. When `npmCommand` is configured, git package dependency installs use plain `install` to avoid npm-specific flags in wrappers or alternate package managers.
|
|
201
204
|
|
|
202
205
|
### Sessions
|
|
203
206
|
|
|
@@ -206,10 +209,10 @@ When unset, senpi leaves provider payloads unchanged. This setting currently app
|
|
|
206
209
|
| `sessionDir` | string | - | Directory where session files are stored. Accepts absolute or relative paths, plus `~`. |
|
|
207
210
|
|
|
208
211
|
```json
|
|
209
|
-
{ "sessionDir": ".
|
|
212
|
+
{ "sessionDir": ".senpi/sessions" }
|
|
210
213
|
```
|
|
211
214
|
|
|
212
|
-
When multiple sources specify a session directory, precedence is `--session-dir`, `
|
|
215
|
+
When multiple sources specify a session directory, precedence is `--session-dir`, `SENPI_CODING_AGENT_SESSION_DIR`, then `sessionDir` in settings.json.
|
|
213
216
|
|
|
214
217
|
### Model Cycling
|
|
215
218
|
|
package/docs/skills.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
>
|
|
1
|
+
> senpi can create skills. Ask it to build one for your use case.
|
|
2
2
|
|
|
3
3
|
# Skills
|
|
4
4
|
|
|
5
5
|
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Senpi implements the [Agent Skills standard](https://agentskills.io/specification), warning about most violations but remaining lenient. Senpi allows skill names to differ from their parent directory even though the standard disallows it; that rule is suboptimal for shared skill directories used across multiple agent harnesses.
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ Pi implements the [Agent Skills standard](https://agentskills.io/specification),
|
|
|
21
21
|
|
|
22
22
|
> **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Senpi loads skills from:
|
|
25
25
|
|
|
26
26
|
- Global:
|
|
27
27
|
- `~/.senpi/agent/skills/`
|
|
@@ -63,7 +63,7 @@ For project-level Claude Code skills, add to `.senpi/settings.json`:
|
|
|
63
63
|
|
|
64
64
|
## How Skills Work
|
|
65
65
|
|
|
66
|
-
1. At startup,
|
|
66
|
+
1. At startup, senpi scans skill locations and extracts names and descriptions
|
|
67
67
|
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
|
|
68
68
|
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
69
69
|
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
@@ -140,12 +140,12 @@ Per the [Agent Skills specification](https://agentskills.io/specification#frontm
|
|
|
140
140
|
|
|
141
141
|
| Field | Required | Description |
|
|
142
142
|
|-------|----------|-------------|
|
|
143
|
-
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard,
|
|
143
|
+
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Unlike the standard, Senpi does not require this to match the parent directory because that standard requirement is suboptimal for shared skill directories. |
|
|
144
144
|
| `description` | Yes | Max 1024 chars. What the skill does and when to use it. |
|
|
145
145
|
| `license` | No | License name or reference to bundled file. |
|
|
146
146
|
| `compatibility` | No | Max 500 chars. Environment requirements. |
|
|
147
147
|
| `metadata` | No | Arbitrary key-value mapping. |
|
|
148
|
-
| `allowed-tools` | No |
|
|
148
|
+
| `allowed-tools` | No | Spec field for pre-approved tools. Senpi does not implement it; the field is ignored. |
|
|
149
149
|
| `disable-model-invocation` | No | When `true`, skill is hidden from system prompt. Users must use `/skill:name`. |
|
|
150
150
|
|
|
151
151
|
### Name Rules
|
|
@@ -154,7 +154,7 @@ Per the [Agent Skills specification](https://agentskills.io/specification#frontm
|
|
|
154
154
|
- Lowercase letters, numbers, hyphens only
|
|
155
155
|
- No leading/trailing hyphens
|
|
156
156
|
- No consecutive hyphens
|
|
157
|
-
|
|
157
|
+
Senpi does not require the name to match the parent directory. The Agent Skills standard does, but that requirement is suboptimal for shared skill directories used by multiple tools.
|
|
158
158
|
|
|
159
159
|
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
160
160
|
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
@@ -175,7 +175,7 @@ description: Helps with PDFs.
|
|
|
175
175
|
|
|
176
176
|
## Validation
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
Senpi validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill:
|
|
179
179
|
|
|
180
180
|
- Name exceeds 64 characters or contains invalid characters
|
|
181
181
|
- Name starts/ends with hyphen or has consecutive hyphens
|
package/docs/terminal-setup.md
CHANGED
|
@@ -40,7 +40,7 @@ If you want `Shift+Enter` to keep working in tmux via that remap, add `ctrl+j` t
|
|
|
40
40
|
|
|
41
41
|
## WezTerm
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
WezTerm usually works out of the box for `Shift+Enter` via xterm modifyOtherKeys. To use the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
|
|
44
44
|
|
|
45
45
|
```lua
|
|
46
46
|
local wezterm = require 'wezterm'
|
|
@@ -49,16 +49,50 @@ config.enable_kitty_keyboard = true
|
|
|
49
49
|
return config
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
On
|
|
52
|
+
On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To use `Option+Enter` for pi follow-up queueing, add this key override:
|
|
53
|
+
|
|
54
|
+
```lua
|
|
55
|
+
local wezterm = require 'wezterm'
|
|
56
|
+
local config = wezterm.config_builder()
|
|
57
|
+
config.keys = {
|
|
58
|
+
{
|
|
59
|
+
key = 'Enter',
|
|
60
|
+
mods = 'ALT',
|
|
61
|
+
action = wezterm.action.SendString('\x1b[13;3u'),
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
return config
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If you already have a `config.keys` table, add the entry to it.
|
|
68
|
+
|
|
69
|
+
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `PI_HARDWARE_CURSOR=1` before running senpi or set `showHardwareCursor` to `true` in settings.
|
|
70
|
+
|
|
71
|
+
## Alacritty
|
|
72
|
+
|
|
73
|
+
Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To use `Option+Enter` for pi follow-up queueing, add to `~/.config/alacritty/alacritty.toml`:
|
|
74
|
+
|
|
75
|
+
```toml
|
|
76
|
+
[[keyboard.bindings]]
|
|
77
|
+
key = "Enter"
|
|
78
|
+
mods = "Alt"
|
|
79
|
+
chars = "\u001b[13;3u"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Restart Alacritty after changing the config.
|
|
53
83
|
|
|
54
84
|
## VS Code (Integrated Terminal)
|
|
55
85
|
|
|
86
|
+
VS Code 1.109.5 and newer enable Kitty keyboard protocol in the integrated terminal by default, so `Shift+Enter` should work out of the box.
|
|
87
|
+
|
|
88
|
+
VS Code versions older than 1.109.5 need an explicit terminal keybinding for `Shift+Enter`.
|
|
89
|
+
|
|
56
90
|
`keybindings.json` locations:
|
|
57
91
|
- macOS: `~/Library/Application Support/Code/User/keybindings.json`
|
|
58
92
|
- Linux: `~/.config/Code/User/keybindings.json`
|
|
59
93
|
- Windows: `%APPDATA%\\Code\\User\\keybindings.json`
|
|
60
94
|
|
|
61
|
-
Add to `keybindings.json
|
|
95
|
+
Add to `keybindings.json`:
|
|
62
96
|
|
|
63
97
|
```json
|
|
64
98
|
{
|
|
@@ -109,6 +143,6 @@ For the best experience, use a terminal that supports the Kitty keyboard protoco
|
|
|
109
143
|
|
|
110
144
|
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
111
145
|
|
|
112
|
-
If you want the hardware cursor visible, set `PI_HARDWARE_CURSOR=1` before running
|
|
146
|
+
If you want the hardware cursor visible, set `PI_HARDWARE_CURSOR=1` before running senpi (disabled by default for compatibility).
|
|
113
147
|
|
|
114
148
|
Consider using a dedicated terminal emulator for the best experience.
|
package/docs/termux.md
CHANGED
|
@@ -16,14 +16,14 @@ pkg update && pkg upgrade
|
|
|
16
16
|
# Install dependencies
|
|
17
17
|
pkg install nodejs termux-api git
|
|
18
18
|
|
|
19
|
-
# Install
|
|
19
|
+
# Install senpi
|
|
20
20
|
npm install -g @code-yeongyu/senpi
|
|
21
21
|
|
|
22
22
|
# Create config directory
|
|
23
23
|
mkdir -p ~/.senpi/agent
|
|
24
24
|
|
|
25
|
-
# Run
|
|
26
|
-
|
|
25
|
+
# Run senpi
|
|
26
|
+
senpi
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Clipboard Support
|
package/docs/tmux.md
CHANGED
|
@@ -18,7 +18,7 @@ tmux kill-server
|
|
|
18
18
|
tmux
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Pi requests extended key reporting automatically when Kitty keyboard protocol is not available. With `extended-keys-format csi-u`, tmux forwards modified keys in CSI-u format, which is the most reliable configuration.
|
|
21
|
+
Pi requests extended key reporting automatically when Kitty keyboard protocol is not available. With `extended-keys-format csi-u`, tmux forwards modified keys in CSI-u format, which is the most reliable configuration. The `extended-keys-format` option requires tmux 3.5 or later.
|
|
22
22
|
|
|
23
23
|
## Why `csi-u` Is Recommended
|
|
24
24
|
|
|
@@ -57,5 +57,7 @@ This affects the default keybindings (`Enter` to submit, `Shift+Enter` for newli
|
|
|
57
57
|
|
|
58
58
|
## Requirements
|
|
59
59
|
|
|
60
|
-
- tmux 3.
|
|
60
|
+
- tmux 3.5 or later for `extended-keys-format csi-u` (run `tmux -V` to check)
|
|
61
61
|
- A terminal emulator that supports extended keys (Ghostty, Kitty, iTerm2, WezTerm, Windows Terminal)
|
|
62
|
+
|
|
63
|
+
With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`; Pi still supports tmux's default xterm `modifyOtherKeys` format.
|
package/docs/tui.md
CHANGED
|
@@ -742,7 +742,7 @@ ctx.ui.setStatus("my-ext", ctx.ui.theme.fg("accent", "● active"));
|
|
|
742
742
|
ctx.ui.setStatus("my-ext", undefined);
|
|
743
743
|
```
|
|
744
744
|
|
|
745
|
-
**Examples:** [status-line.ts](../examples/extensions/status-line.ts), [plan-mode
|
|
745
|
+
**Examples:** [status-line.ts](../examples/extensions/status-line.ts), [plan-mode/](../examples/extensions/plan-mode/), [preset.ts](../examples/extensions/preset.ts)
|
|
746
746
|
|
|
747
747
|
### Pattern 4b: Working Indicator Customization
|
|
748
748
|
|
|
@@ -766,7 +766,7 @@ ctx.ui.setWorkingIndicator({
|
|
|
766
766
|
// Hide the indicator entirely
|
|
767
767
|
ctx.ui.setWorkingIndicator({ frames: [] });
|
|
768
768
|
|
|
769
|
-
// Restore
|
|
769
|
+
// Restore senpi's default spinner
|
|
770
770
|
ctx.ui.setWorkingIndicator();
|
|
771
771
|
```
|
|
772
772
|
|
|
@@ -802,7 +802,7 @@ ctx.ui.setWidget("my-widget", (_tui, theme) => {
|
|
|
802
802
|
ctx.ui.setWidget("my-widget", undefined);
|
|
803
803
|
```
|
|
804
804
|
|
|
805
|
-
**Examples:** [plan-mode
|
|
805
|
+
**Examples:** [plan-mode/](../examples/extensions/plan-mode/)
|
|
806
806
|
|
|
807
807
|
### Pattern 6: Custom Footer
|
|
808
808
|
|
|
@@ -919,7 +919,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
919
919
|
- **Selection UI**: [examples/extensions/preset.ts](../examples/extensions/preset.ts) - SelectList with DynamicBorder framing
|
|
920
920
|
- **Async with cancel**: [examples/extensions/qna.ts](../examples/extensions/qna.ts) - BorderedLoader for LLM calls
|
|
921
921
|
- **Settings toggles**: [examples/extensions/tools.ts](../examples/extensions/tools.ts) - SettingsList for tool enable/disable
|
|
922
|
-
- **Status indicators**: [examples/extensions/plan-mode
|
|
922
|
+
- **Status indicators**: [examples/extensions/plan-mode/](../examples/extensions/plan-mode/) - setStatus and setWidget
|
|
923
923
|
- **Working indicator**: [examples/extensions/working-indicator.ts](../examples/extensions/working-indicator.ts) - setWorkingIndicator
|
|
924
924
|
- **Custom footer**: [examples/extensions/custom-footer.ts](../examples/extensions/custom-footer.ts) - setFooter with stats
|
|
925
925
|
- **Custom editor**: [examples/extensions/modal-editor.ts](../examples/extensions/modal-editor.ts) - Vim-like modal editing
|
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,32 +93,30 @@ 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
|
-
- `~/.
|
|
99
|
-
- parent directories, walking up from the current working directory
|
|
100
|
-
- the current directory
|
|
98
|
+
- `~/.senpi/agent/AGENTS.md` for global instructions
|
|
99
|
+
- parent directories, walking up from the current working directory
|
|
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
|
-
|
|
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).
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
### Project Trust
|
|
107
107
|
|
|
108
|
-
- `.
|
|
109
|
-
- `~/.pi/agent/SYSTEM.md` globally
|
|
108
|
+
On interactive startup, senpi asks before trusting a project folder that contains project-local extensions or settings 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.
|
|
110
109
|
|
|
111
|
-
|
|
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.
|
|
112
111
|
|
|
113
|
-
|
|
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 trust-gated project inputs, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
|
|
114
113
|
|
|
115
|
-
|
|
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`.
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
`senpi config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
|
|
118
117
|
|
|
119
|
-
|
|
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.
|
|
120
119
|
|
|
121
|
-
Use `/trust` in interactive mode to save a project trust decision for future sessions. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
|
|
122
120
|
|
|
123
121
|
## Exporting and Sharing Sessions
|
|
124
122
|
|
|
@@ -126,31 +124,31 @@ Use `/export [file]` to write a session to HTML.
|
|
|
126
124
|
|
|
127
125
|
Use `/share` to upload a private GitHub gist with a shareable HTML link.
|
|
128
126
|
|
|
129
|
-
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.
|
|
130
128
|
|
|
131
129
|
## CLI Reference
|
|
132
130
|
|
|
133
131
|
```bash
|
|
134
|
-
|
|
132
|
+
senpi [options] [@files...] [messages...]
|
|
135
133
|
```
|
|
136
134
|
|
|
137
135
|
### Package Commands
|
|
138
136
|
|
|
139
137
|
```bash
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
|
149
147
|
```
|
|
150
148
|
|
|
151
|
-
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.
|
|
152
150
|
|
|
153
|
-
See [
|
|
151
|
+
See [Senpi Packages](packages.md) for package sources and security notes.
|
|
154
152
|
|
|
155
153
|
### Modes
|
|
156
154
|
|
|
@@ -162,10 +160,10 @@ See [Pi Packages](packages.md) for package sources and security notes.
|
|
|
162
160
|
| `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
|
|
163
161
|
| `--export <in> [out]` | Export a session to HTML |
|
|
164
162
|
|
|
165
|
-
In print mode,
|
|
163
|
+
In print mode, senpi also reads piped stdin and merges it into the initial prompt:
|
|
166
164
|
|
|
167
165
|
```bash
|
|
168
|
-
cat README.md |
|
|
166
|
+
cat README.md | senpi -p "Summarize this text"
|
|
169
167
|
```
|
|
170
168
|
|
|
171
169
|
### Model Options
|
|
@@ -219,7 +217,7 @@ Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
|
|
|
219
217
|
Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
|
|
220
218
|
|
|
221
219
|
```bash
|
|
222
|
-
|
|
220
|
+
senpi --no-extensions -e ./my-extension.ts
|
|
223
221
|
```
|
|
224
222
|
|
|
225
223
|
### Other Options
|
|
@@ -239,61 +237,61 @@ pi --no-extensions -e ./my-extension.ts
|
|
|
239
237
|
Prefix files with `@` to include them in the message:
|
|
240
238
|
|
|
241
239
|
```bash
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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"
|
|
245
243
|
```
|
|
246
244
|
|
|
247
245
|
### Examples
|
|
248
246
|
|
|
249
247
|
```bash
|
|
250
248
|
# Interactive with initial prompt
|
|
251
|
-
|
|
249
|
+
senpi "List all .ts files in src/"
|
|
252
250
|
|
|
253
251
|
# Non-interactive
|
|
254
|
-
|
|
252
|
+
senpi -p "Summarize this codebase"
|
|
255
253
|
|
|
256
254
|
# Non-interactive with piped stdin
|
|
257
|
-
cat README.md |
|
|
255
|
+
cat README.md | senpi -p "Summarize this text"
|
|
258
256
|
|
|
259
257
|
# Named one-shot session
|
|
260
|
-
|
|
258
|
+
senpi --name "release audit" -p "Audit this repository"
|
|
261
259
|
|
|
262
260
|
# Different model
|
|
263
|
-
|
|
261
|
+
senpi --provider openai --model gpt-4o "Help me refactor"
|
|
264
262
|
|
|
265
263
|
# Model with provider prefix
|
|
266
|
-
|
|
264
|
+
senpi --model openai/gpt-4o "Help me refactor"
|
|
267
265
|
|
|
268
266
|
# Model with thinking level shorthand
|
|
269
|
-
|
|
267
|
+
senpi --model sonnet:high "Solve this complex problem"
|
|
270
268
|
|
|
271
269
|
# Limit model cycling
|
|
272
|
-
|
|
270
|
+
senpi --models "claude-*,gpt-4o"
|
|
273
271
|
|
|
274
272
|
# Read-only mode
|
|
275
|
-
|
|
273
|
+
senpi --tools read,grep,find,ls -p "Review the code"
|
|
276
274
|
|
|
277
275
|
# Disable one extension or built-in tool while keeping the rest available
|
|
278
|
-
|
|
276
|
+
senpi --exclude-tools ask_question
|
|
279
277
|
```
|
|
280
278
|
|
|
281
279
|
### Environment Variables
|
|
282
280
|
|
|
283
281
|
| Variable | Description |
|
|
284
282
|
|----------|-------------|
|
|
285
|
-
| `
|
|
286
|
-
| `
|
|
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` |
|
|
287
285
|
| `PI_PACKAGE_DIR` | Override package directory, useful for Nix/Guix store paths |
|
|
288
286
|
| `PI_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
|
|
289
|
-
| `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 |
|
|
290
288
|
| `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
|
|
291
289
|
| `PI_CACHE_RETENTION` | Set to `long` for extended prompt cache where supported |
|
|
292
290
|
| `VISUAL`, `EDITOR` | External editor for Ctrl+G |
|
|
293
291
|
|
|
294
292
|
## Design Principles
|
|
295
293
|
|
|
296
|
-
|
|
294
|
+
Senpi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
|
|
297
295
|
|
|
298
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.
|
|
299
297
|
|
|
@@ -19,6 +19,7 @@ cp permission-gate.ts ~/.senpi/agent/extensions/
|
|
|
19
19
|
| Extension | Description |
|
|
20
20
|
|-----------|-------------|
|
|
21
21
|
| `permission-gate.ts` | Prompts for confirmation before dangerous bash commands (rm -rf, sudo, etc.) |
|
|
22
|
+
| `project-trust.ts` | Demonstrates the `project_trust` event for user/global and CLI extensions |
|
|
22
23
|
| `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
|
|
23
24
|
| `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
|
|
24
25
|
| `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.79.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|