@code-yeongyu/senpi 2026.8.13 → 2026.8.16
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 +142 -0
- package/README.md +1 -0
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +14 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +5 -4
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/core/agent-session.d.ts +80 -8
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +206 -31
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +19 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/experimental.d.ts +4 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/template.js +31 -9
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts +4 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js +30 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js +13 -47
- package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts +18 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js +64 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js +27 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts +15 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js +45 -11
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/options.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +3 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +17 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +225 -75
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts +2 -3
- package/dist/core/extensions/builtin/compaction/lane-policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.js +2 -3
- package/dist/core/extensions/builtin/compaction/lane-policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +2 -0
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-retry.js +38 -4
- package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +2 -1
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.d.ts +33 -0
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.js +67 -0
- package/dist/core/extensions/builtin/compaction/summarization-turn-order.js.map +1 -0
- package/dist/core/extensions/builtin/config-reload/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/index.js +31 -8
- package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/routine-settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/routine-settings.js +11 -12
- package/dist/core/extensions/builtin/config-reload/routine-settings.js.map +1 -1
- package/dist/core/extensions/builtin/goal/terminal-provider-error.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/terminal-provider-error.js +16 -0
- package/dist/core/extensions/builtin/goal/terminal-provider-error.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +4 -0
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/process-tree.js +6 -1
- package/dist/core/extensions/builtin/mcp/process-tree.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js +14 -0
- package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js +91 -0
- package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js +22 -2
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +25 -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 +2 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/reasoning/index.d.ts +3 -0
- package/dist/core/extensions/builtin/reasoning/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/reasoning/index.js +211 -0
- package/dist/core/extensions/builtin/reasoning/index.js.map +1 -0
- package/dist/core/extensions/builtin/service-tier.d.ts +44 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js +176 -24
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +4 -4
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +13 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +24 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/lockfile-policy.d.ts +15 -0
- package/dist/core/lockfile-policy.d.ts.map +1 -0
- package/dist/core/lockfile-policy.js +15 -0
- package/dist/core/lockfile-policy.js.map +1 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +1 -0
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +34 -7
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +115 -27
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +5 -3
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/provider-api-key-auth.d.ts.map +1 -1
- package/dist/core/provider-api-key-auth.js +45 -2
- package/dist/core/provider-api-key-auth.js.map +1 -1
- package/dist/core/provider-composer.d.ts +12 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +1 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +13 -0
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +15 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/retry-fallback/controller.d.ts +1 -1
- package/dist/core/retry-fallback/controller.d.ts.map +1 -1
- package/dist/core/retry-fallback/controller.js +5 -3
- package/dist/core/retry-fallback/controller.js.map +1 -1
- package/dist/core/retry-fallback/settings.d.ts.map +1 -1
- package/dist/core/retry-fallback/settings.js +4 -1
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/sdk.d.ts +5 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +14 -8
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +20 -4
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +50 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +258 -15
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/thinking-levels.d.ts +22 -0
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js +29 -0
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -0
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +2 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +18 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +2 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +17 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/model-favorites.d.ts +2 -1
- package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-favorites.js +72 -6
- package/dist/modes/interactive/components/model-favorites.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +5 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +10 -6
- package/dist/modes/interactive/components/model-selector.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 +10 -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 +22 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +14 -4
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +109 -50
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +36 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +2 -0
- package/dist/modes/interactive/theme/grok-day.json +2 -0
- package/dist/modes/interactive/theme/grok-night.json +2 -0
- package/dist/modes/interactive/theme/light.json +2 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +23 -10
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +9 -1
- package/dist/modes/interactive/theme/theme.d.ts +5 -3
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +12 -2
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +4 -1
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +5 -2
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts +10 -0
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +87 -19
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/multi-session-host.js +3 -3
- package/dist/modes/rpc/multi-session-host.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +26 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +25 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +60 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
- package/dist/modes/rpc/session-command-router.js +2 -14
- package/dist/modes/rpc/session-command-router.js.map +1 -1
- package/dist/modes/rpc/session-event-writer.d.ts +29 -10
- package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
- package/dist/modes/rpc/session-event-writer.js +229 -50
- package/dist/modes/rpc/session-event-writer.js.map +1 -1
- package/dist/server/create-harness.d.ts.map +1 -1
- package/dist/server/create-harness.js +2 -0
- package/dist/server/create-harness.js.map +1 -1
- package/dist/utils/shell.d.ts +27 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +79 -13
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +10 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +14 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/compaction.md +3 -3
- package/docs/custom-provider.md +1 -1
- package/docs/environment-variables.md +8 -2
- package/docs/extensions.md +13 -1
- package/docs/json.md +9 -5
- package/docs/keybindings.md +8 -2
- package/docs/providers.md +9 -1
- package/docs/rpc.md +128 -6
- package/docs/sdk.md +9 -0
- package/docs/settings.md +93 -1
- package/docs/terminal-setup.md +23 -2
- package/docs/themes.md +24 -3
- package/docs/tui.md +2 -2
- package/docs/usage.md +24 -4
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +26 -3
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +14 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/call-capture.ts +64 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +45 -61
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-execution-event.ts +201 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +22 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +25 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +77 -12
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +43 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +67 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +4 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +127 -88
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +5 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +9 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +12 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +88 -45
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +28 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +7 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +19 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +18 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +4 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +21 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +29 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/README.md +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +40 -14
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +16 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +69 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +125 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +208 -42
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +13 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +10 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +31 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +8 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.d.ts +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.js +234 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +6 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +44 -9
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +32 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/alibaba-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +14 -3
- 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.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +26 -0
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +121 -0
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +23 -7
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +4 -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 +7 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +24 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +9 -2
- package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +8 -2
- 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 +6 -2
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +6 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +18 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +243 -5
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +33 -8
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +7 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.d.ts +0 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js +0 -41
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js.map +0 -1
package/docs/keybindings.md
CHANGED
|
@@ -86,7 +86,7 @@ The dedicated history actions always change history entries, regardless of the c
|
|
|
86
86
|
|
|
87
87
|
### TUI Fullscreen Viewport
|
|
88
88
|
|
|
89
|
-
These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content.
|
|
89
|
+
These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content. See [Terminal setup](terminal-setup.md) for terminal-specific mouse and trackpad behavior.
|
|
90
90
|
|
|
91
91
|
Fullscreen transcript bindings take precedence over editor bindings. The default unmodified navigation keys therefore control the transcript in fullscreen mode, while their `ctrl` variants continue to control the editor. Outside fullscreen mode, both variants control the editor.
|
|
92
92
|
|
|
@@ -97,7 +97,7 @@ Fullscreen transcript bindings take precedence over editor bindings. The default
|
|
|
97
97
|
| `pageUp`, `pageDown` | Editor | Transcript |
|
|
98
98
|
| `ctrl+pageUp`, `ctrl+pageDown` | Editor | Editor |
|
|
99
99
|
|
|
100
|
-
This routing remains configurable through the ordinary action bindings. For example, `"tui.altScreen.pageUp": "ctrl+pageUp"` makes `pageUp` control the editor and `ctrl+pageUp` control the transcript in fullscreen mode. Bind `tui.altScreen.halfPageUp` and `tui.altScreen.halfPageDown` for
|
|
100
|
+
This routing remains configurable through the ordinary action bindings. For example, `"tui.altScreen.pageUp": "ctrl+pageUp"` makes `pageUp` control the editor and `ctrl+pageUp` control the transcript in fullscreen mode. Bind `tui.altScreen.halfPageUp` and `tui.altScreen.halfPageDown` for half-page steps, or bind `tui.altScreen.lineUp` and `tui.altScreen.lineDown` for single-line steps. Setting `"tui.altScreen.pageUp": []` disables that transcript shortcut entirely. User bindings replace the defaults for that action.
|
|
101
101
|
|
|
102
102
|
| Keybinding id | Default | Description |
|
|
103
103
|
|--------|---------|-------------|
|
|
@@ -105,8 +105,14 @@ This routing remains configurable through the ordinary action bindings. For exam
|
|
|
105
105
|
| `tui.altScreen.pageDown` | `pageDown` | Scroll the transcript down by one page |
|
|
106
106
|
| `tui.altScreen.halfPageUp` | *(none)* | Scroll the transcript up by half a page |
|
|
107
107
|
| `tui.altScreen.halfPageDown` | *(none)* | Scroll the transcript down by half a page |
|
|
108
|
+
| `tui.altScreen.lineUp` | *(none)* | Scroll the transcript up by one line |
|
|
109
|
+
| `tui.altScreen.lineDown` | *(none)* | Scroll the transcript down by one line |
|
|
108
110
|
| `tui.altScreen.previousPrompt` | `ctrl+shift+up` | Jump to the previous marked message |
|
|
109
111
|
| `tui.altScreen.nextPrompt` | `ctrl+shift+down` | Jump to the next marked message |
|
|
112
|
+
| `tui.altScreen.search` | `ctrl+shift+f` | Search the rendered transcript |
|
|
113
|
+
| `tui.altScreen.searchNext` | `enter`, `ctrl+g` | Select the next search match while searching |
|
|
114
|
+
| `tui.altScreen.searchPrevious` | `shift+enter`, `ctrl+shift+g` | Select the previous search match while searching |
|
|
115
|
+
| `tui.altScreen.searchClose` | `escape` | Close transcript search |
|
|
110
116
|
| `tui.altScreen.top` | `home` | Scroll to the beginning of the transcript |
|
|
111
117
|
| `tui.altScreen.bottom` | `end` | Scroll to the transcript end and follow new output |
|
|
112
118
|
|
package/docs/providers.md
CHANGED
|
@@ -23,6 +23,7 @@ Use `/login` in interactive mode, then select a provider:
|
|
|
23
23
|
- xAI (Grok/X subscription)
|
|
24
24
|
- OpenRouter (OAuth-minted API key billed from OpenRouter credits)
|
|
25
25
|
- Radius
|
|
26
|
+
- Cursor (Pro/Ultra/Teams) — authentication only for now, see below
|
|
26
27
|
|
|
27
28
|
Use `/logout` to clear credentials. Tokens are stored in `~/.senpi/agent/auth.json` and auto-refresh when expired. OpenRouter instead mints a user-controlled API key that does not expire automatically.
|
|
28
29
|
|
|
@@ -59,7 +60,8 @@ The `claude-sdk-oauth` provider routes LLM calls through the official [Claude Ag
|
|
|
59
60
|
| `SENPI_CLAUDE_SDK_OAUTH_PINNED_ACCOUNT` | Overrides `pinnedAccount` |
|
|
60
61
|
|
|
61
62
|
Every `SENPI_*` variable is stripped from the Claude Code subprocess environment on all three lanes; other inherited variables are preserved.
|
|
62
|
-
- **
|
|
63
|
+
- **Native compaction.** This lane pins the SDK's session-scoped `autoCompactEnabled: true`, overriding the user's global Claude Code preference because native compaction is part of the lane contract. It does not set `autoCompactWindow`. With `resumeMode: "auto"`, the resident Claude Code session owns compaction; `resumeMode: "off"` restores per-turn sessions and returns compaction ownership to senpi.
|
|
64
|
+
- **Session reuse.** By default one long-lived SDK query spans the entire senpi session instead of a fresh one per turn, so conversations continue with only the new delta sent. An accepted senpi compaction rewrites the transcript and forks to a fresh resident session; a rejected compaction leaves continuity unchanged. Reuse also fails closed on branch/fork navigation, account failover, an aborted turn, or any configuration change. Idle sessions retire after 30 minutes (max 32 resident); a session with an in-flight turn is never evicted. After a senpi process restart the lane always starts fresh. Set `resumeMode: "off"` (or `SENPI_CLAUDE_SDK_OAUTH_RESUME=off`) to restore the old per-turn behaviour. Accepted values are `"auto"` (default) and `"off"`; any other value is silently ignored.
|
|
63
65
|
- Account state is exposed to desktop/automation clients: RPC `get_provider_accounts`, `account_pin`, `account_remove` and the `auth_accounts_changed` / `account_failover` events, mirrored through the app-server protocol. Token material is never included.
|
|
64
66
|
|
|
65
67
|
#### Session continuity self-check
|
|
@@ -132,6 +134,12 @@ senpi sends `prompt_cache_key` (set to the session id) on Moonshot requests. Kim
|
|
|
132
134
|
|
|
133
135
|
Radius is a dynamic `pi-messages` gateway. `/login radius` stores OAuth tokens in `auth.json`; the gateway catalog is refreshed independently and cached in `models-store.json`. Custom Radius gateways can be declared in `models.json` with `"oauth": "radius"` and a gateway `baseUrl`.
|
|
134
136
|
|
|
137
|
+
### Cursor
|
|
138
|
+
|
|
139
|
+
- Run `/login cursor`, then approve the request in the browser (`cursor.com/loginDeepControl` deep link; the CLI polls until the browser approval releases the tokens)
|
|
140
|
+
- Tokens are stored in `auth.json` and auto-refresh via `api2.cursor.sh/auth/exchange_user_api_key`, keeping the previous refresh token when Cursor does not rotate it
|
|
141
|
+
- **Authentication only for now:** Cursor chat runs on a protobuf Connect-RPC agent protocol that senpi has not ported, so the provider exposes no models yet. The stored access token resolves through the standard auth pipeline for extensions that implement the Cursor protocol.
|
|
142
|
+
|
|
135
143
|
## Ollama Cloud
|
|
136
144
|
|
|
137
145
|
Set `OLLAMA_API_KEY` or store an API key under the `ollama` auth key, then refresh the dynamic catalog:
|
package/docs/rpc.md
CHANGED
|
@@ -246,6 +246,8 @@ Response:
|
|
|
246
246
|
"data": {
|
|
247
247
|
"model": {...},
|
|
248
248
|
"thinkingLevel": "medium",
|
|
249
|
+
"serviceTier": "priority",
|
|
250
|
+
"fastMode": true,
|
|
249
251
|
"isStreaming": false,
|
|
250
252
|
"isCompacting": false,
|
|
251
253
|
"steeringMode": "all",
|
|
@@ -262,6 +264,8 @@ Response:
|
|
|
262
264
|
|
|
263
265
|
The `model` field is a full [Model](#model) object or `null`. The `sessionName` field is the display name set via `set_session_name`, or omitted if not set.
|
|
264
266
|
|
|
267
|
+
`serviceTier` is the tier a request would carry right now (`"auto"`, `"flex"`, or `"priority"`), omitted when no tier applies. `fastMode` is `true` when the active model is served at the priority ("fast") tier — either because fast mode is on for this session or because the model selection itself pins `priority`. The two never disagree: whenever `fastMode` is `true`, `serviceTier` is `"priority"`.
|
|
268
|
+
|
|
265
269
|
#### get_messages
|
|
266
270
|
|
|
267
271
|
Get all messages in the conversation.
|
|
@@ -365,8 +369,18 @@ Response:
|
|
|
365
369
|
{"type": "response", "command": "set_thinking_level", "success": true}
|
|
366
370
|
```
|
|
367
371
|
|
|
368
|
-
Pass `"scope": "turn"` to change only the current session level without rewriting the
|
|
369
|
-
returns an error when the active model cannot apply the requested level
|
|
372
|
+
Pass `"scope": "turn"` to change only the current session level without rewriting the model's remembered level. The
|
|
373
|
+
command returns an error when the active model cannot apply the requested level, and a rejected request leaves the
|
|
374
|
+
session level unchanged — a failed `set_thinking_level` never mutates state.
|
|
375
|
+
|
|
376
|
+
```json
|
|
377
|
+
{
|
|
378
|
+
"type": "response",
|
|
379
|
+
"command": "set_thinking_level",
|
|
380
|
+
"success": false,
|
|
381
|
+
"error": "Thinking level low is not supported by the active model."
|
|
382
|
+
}
|
|
383
|
+
```
|
|
370
384
|
|
|
371
385
|
#### cycle_thinking_level
|
|
372
386
|
|
|
@@ -406,6 +420,67 @@ Response:
|
|
|
406
420
|
}
|
|
407
421
|
```
|
|
408
422
|
|
|
423
|
+
### Fast mode
|
|
424
|
+
|
|
425
|
+
#### set_fast_mode
|
|
426
|
+
|
|
427
|
+
Turn fast mode (the OpenAI Codex `priority` service tier) on or off for the active model. The choice is remembered
|
|
428
|
+
per model, so a later session on the same model starts the same way; `enabled: false` records an explicit `"auto"`
|
|
429
|
+
so it also overrides a tier inherited from the model catalog.
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{"type": "set_fast_mode", "enabled": true}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Response:
|
|
436
|
+
```json
|
|
437
|
+
{
|
|
438
|
+
"type": "response",
|
|
439
|
+
"command": "set_fast_mode",
|
|
440
|
+
"success": true,
|
|
441
|
+
"data": {
|
|
442
|
+
"enabled": true,
|
|
443
|
+
"serviceTier": "priority",
|
|
444
|
+
"provider": "openai-codex",
|
|
445
|
+
"modelId": "gpt-5.6-sol"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
`serviceTier` is the tier just recorded for the model (`"priority"` on, `"auto"` off). `provider`/`modelId` identify
|
|
451
|
+
the model the preference was stored under: a `-fast` catalog variant and its base model share one entry, so the
|
|
452
|
+
reported id can be the base model rather than the model that was active.
|
|
453
|
+
|
|
454
|
+
The command returns an error instead of a silent no-op when the request cannot be applied:
|
|
455
|
+
|
|
456
|
+
| Situation | `error` |
|
|
457
|
+
|-----------|---------|
|
|
458
|
+
| Active model is not an OpenAI Codex model | `Fast mode is only available for OpenAI Codex models.` |
|
|
459
|
+
| `enabled: false` while the model selection pins `:priority` | `Fast mode is fixed by the active model selection's priority tier.` |
|
|
460
|
+
| `enabled` is not a boolean | `set_fast_mode requires a boolean 'enabled' field.` |
|
|
461
|
+
|
|
462
|
+
A successful call emits a [`service_tier_changed`](#service_tier_changed) event.
|
|
463
|
+
|
|
464
|
+
#### get_fast_mode
|
|
465
|
+
|
|
466
|
+
Read the current fast-mode state.
|
|
467
|
+
|
|
468
|
+
```json
|
|
469
|
+
{"type": "get_fast_mode"}
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Response:
|
|
473
|
+
```json
|
|
474
|
+
{
|
|
475
|
+
"type": "response",
|
|
476
|
+
"command": "get_fast_mode",
|
|
477
|
+
"success": true,
|
|
478
|
+
"data": {"enabled": true, "serviceTier": "priority"}
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
`serviceTier` is `null` when no tier applies. It matches `get_state.serviceTier`.
|
|
483
|
+
|
|
409
484
|
### Queue Modes
|
|
410
485
|
|
|
411
486
|
#### set_steering_mode
|
|
@@ -1016,6 +1091,42 @@ Events are streamed to stdout as JSON lines during agent operation. Events do no
|
|
|
1016
1091
|
| `extension_error` | Extension threw an error |
|
|
1017
1092
|
| `extension_event` | Capability-gated extension-owned event (`extension_events` clients only) |
|
|
1018
1093
|
| `loaded_surfaces_changed` | Loaded skills, extensions, or MCP inventory changed; re-read `get_commands` and `get_loaded_surfaces` |
|
|
1094
|
+
| `model_changed` | Active model changed (any source), with the thinking level in force afterwards |
|
|
1095
|
+
| `service_tier_changed` | Effective service tier or fast-mode state changed |
|
|
1096
|
+
|
|
1097
|
+
Event types are additive: a client that does not recognise a type must ignore that record rather than fail. `model_changed`
|
|
1098
|
+
and `service_tier_changed` were added after the initial protocol and are safe to ignore.
|
|
1099
|
+
|
|
1100
|
+
### model_changed
|
|
1101
|
+
|
|
1102
|
+
Emitted after the session's active model changed, whatever caused it: a `set_model` or `cycle_model` command, a slash
|
|
1103
|
+
command, a retry fallback, or a session restore.
|
|
1104
|
+
|
|
1105
|
+
```json
|
|
1106
|
+
{
|
|
1107
|
+
"type": "model_changed",
|
|
1108
|
+
"model": {"provider": "openai-codex", "id": "gpt-5.6-sol", "...": "..."},
|
|
1109
|
+
"thinkingLevel": "xhigh",
|
|
1110
|
+
"source": "cycle"
|
|
1111
|
+
}
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
`model` is a full [Model](#model) object. `thinkingLevel` is the level in force **after** the switch — each model
|
|
1115
|
+
remembers its own level, so this is that model's restored level (clamped to what it supports), not the level the
|
|
1116
|
+
previous model was using. `source` is one of `"set"`, `"cycle"`, `"restore"`, `"fallback"`, or `"fallback-revert"`.
|
|
1117
|
+
|
|
1118
|
+
Clients that previously inferred the active model from `entry_appended` records can consume this instead.
|
|
1119
|
+
|
|
1120
|
+
### service_tier_changed
|
|
1121
|
+
|
|
1122
|
+
Emitted when the tier requests would carry, or the fast-mode indicator, changes — a `set_fast_mode` command, the
|
|
1123
|
+
`/fast` slash command, or a model switch that resolves a different tier.
|
|
1124
|
+
|
|
1125
|
+
```json
|
|
1126
|
+
{"type": "service_tier_changed", "tier": "priority", "fastMode": true}
|
|
1127
|
+
```
|
|
1128
|
+
|
|
1129
|
+
`tier` is omitted when no tier applies. The pair matches `get_state.serviceTier` / `get_state.fastMode`.
|
|
1019
1130
|
|
|
1020
1131
|
### extension_event
|
|
1021
1132
|
|
|
@@ -1097,6 +1208,14 @@ Emitted during streaming of assistant messages. Contains a delta event without a
|
|
|
1097
1208
|
```json
|
|
1098
1209
|
{
|
|
1099
1210
|
"type": "message_update",
|
|
1211
|
+
"usage": {
|
|
1212
|
+
"input": 100,
|
|
1213
|
+
"output": 1,
|
|
1214
|
+
"cacheRead": 0,
|
|
1215
|
+
"cacheWrite": 0,
|
|
1216
|
+
"totalTokens": 101,
|
|
1217
|
+
"cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}
|
|
1218
|
+
},
|
|
1100
1219
|
"assistantMessageEvent": {
|
|
1101
1220
|
"type": "text_delta",
|
|
1102
1221
|
"contentIndex": 0,
|
|
@@ -1121,12 +1240,15 @@ The `assistantMessageEvent` field contains one of these delta types:
|
|
|
1121
1240
|
|
|
1122
1241
|
Example streaming a text response:
|
|
1123
1242
|
```json
|
|
1124
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
1125
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
1126
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
1127
|
-
{"type":"message_update","assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
1243
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_start","contentIndex":0}}
|
|
1244
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
1245
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":" world"}}
|
|
1246
|
+
{"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"text_end","contentIndex":0,"content":"Hello world"}}
|
|
1128
1247
|
```
|
|
1129
1248
|
|
|
1249
|
+
The top-level `usage` field contains the latest cumulative provider-reported usage. It may remain
|
|
1250
|
+
zero until completion when a provider does not report usage during streaming.
|
|
1251
|
+
|
|
1130
1252
|
`message_update` intentionally omits the former cumulative `message` field and
|
|
1131
1253
|
`assistantMessageEvent.partial`. Clients that need a live partial message must assemble it
|
|
1132
1254
|
from `message_start` and subsequent events using `contentIndex`. Treat `message_end.message`
|
package/docs/sdk.md
CHANGED
|
@@ -372,6 +372,13 @@ import { ModelRuntime } from "@earendil-works/pi-coding-agent";
|
|
|
372
372
|
|
|
373
373
|
const modelRuntime = await ModelRuntime.create();
|
|
374
374
|
|
|
375
|
+
// create() restores cached catalogs but does not refresh them from pi.dev by default.
|
|
376
|
+
// Opt in to a create-time network refresh and bound how long it may take:
|
|
377
|
+
const refreshedRuntime = await ModelRuntime.create({
|
|
378
|
+
allowModelNetwork: true,
|
|
379
|
+
modelRefreshTimeoutMs: 15_000,
|
|
380
|
+
});
|
|
381
|
+
|
|
375
382
|
// Find specific built-in model (doesn't check if API key exists)
|
|
376
383
|
const opus = getModel("anthropic", "claude-opus-4-5");
|
|
377
384
|
if (!opus) throw new Error("Model not found");
|
|
@@ -402,6 +409,8 @@ If no model is provided:
|
|
|
402
409
|
2. Uses default from settings
|
|
403
410
|
3. Falls back to first available model
|
|
404
411
|
|
|
412
|
+
Remote catalogs are persisted locally so later runtimes can restore them without a network request. The default file is `~/.pi/agent/models-store.json`; set `modelsStorePath` to choose another location, or inject `modelsStore` to control persistence. Network refreshes are throttled to once per provider every four hours unless forced. To force an immediate refresh, call `await modelRuntime.refresh({ allowNetwork: true, force: true, signal })`. Setting `PI_OFFLINE` disables model network access.
|
|
413
|
+
|
|
405
414
|
To match CLI model parsing, use the exported resolver helpers:
|
|
406
415
|
|
|
407
416
|
```typescript
|
package/docs/settings.md
CHANGED
|
@@ -84,7 +84,10 @@ Permission rules are a confirmation policy, not a sandbox. Senpi, extensions, pa
|
|
|
84
84
|
| `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
|
|
85
85
|
| `defaultModel` | string | - | Default model ID |
|
|
86
86
|
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
|
|
87
|
-
| `
|
|
87
|
+
| `modelThinkingLevels` | object | - | Per-model reasoning effort memory (`"provider/id": "level"`) |
|
|
88
|
+
| `modelLastOnThinkingLevels` | object | - | Per-model last non-off reasoning level, used by `/reasoning on` to restore the previous effort |
|
|
89
|
+
| `modelServiceTiers` | object | - | Per-model service tier memory (`"provider/id": "auto" \| "priority"`) |
|
|
90
|
+
| `promptPreset` | string | `"auto"` | Force a system prompt preset: `"auto"`, `"kimi-k2-6"`, `"kimi-k2-7"`, `"kimi-k3"`, `"glm-5.2"`, `"glm-5.3"`, `"grok-4.5"`, `"grok-4.6"`, `"claude-fable-5"`, `"claude-opus-5"`, `"claude-opus-4-5"`, `"claude-opus-4-6"`, `"claude-opus-4-7"`, `"claude-opus-4-8"`, `"deepseek-v4-flash"`, `"deepseek-v4-flash-0731"`, `"deepseek-v4-pro"`, `"gpt-5"`, `"gpt-5.2"`, `"gpt-5.3-codex"`, `"gpt-5.4"`, `"gpt-5.5"`, or `"gpt-5.6"` |
|
|
88
91
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
89
92
|
| `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
|
|
90
93
|
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
@@ -136,6 +139,7 @@ When this value is anything other than `"auto"`, it overrides any model-level `p
|
|
|
136
139
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in autocomplete dropdown (3-20) |
|
|
137
140
|
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
138
141
|
| `tuiMode` | string | `"regular"` | Interactive TUI mode: `"regular"` or experimental `"fullscreen"`. Changes from `/settings` apply immediately; `--tui-mode` overrides this setting at startup |
|
|
142
|
+
| `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the resume hint. Has no effect in regular TUI mode |
|
|
139
143
|
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost column and keeps it visible, and `"hidden"` hides it. Has no effect in regular TUI mode |
|
|
140
144
|
|
|
141
145
|
For VS Code, include `--wait` so senpi resumes after the editor exits:
|
|
@@ -348,6 +352,20 @@ instead of being killed; its explicit `timeout` remains the kill deadline. See
|
|
|
348
352
|
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
|
|
349
353
|
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
|
|
350
354
|
|
|
355
|
+
Windows paths in JSON must use forward slashes or escaped backslashes:
|
|
356
|
+
|
|
357
|
+
```json
|
|
358
|
+
{
|
|
359
|
+
"shellPath": "C:/Program Files/Git/bin/bash.exe"
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"shellPath": "C:\\Program Files\\Git\\bin\\bash.exe"
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
351
369
|
```json
|
|
352
370
|
{
|
|
353
371
|
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
|
|
@@ -356,6 +374,22 @@ instead of being killed; its explicit `timeout` remains the kill deadline. See
|
|
|
356
374
|
|
|
357
375
|
`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.
|
|
358
376
|
|
|
377
|
+
### Tools
|
|
378
|
+
|
|
379
|
+
| Setting | Type | Default | Description |
|
|
380
|
+
|---------|------|---------|-------------|
|
|
381
|
+
| `defaultTools` | string[] | - | Built-in tools enabled initially. When omitted, Pi uses its standard defaults |
|
|
382
|
+
|
|
383
|
+
`defaultTools` selects the built-in tools enabled at startup. Extension and SDK custom tools remain enabled:
|
|
384
|
+
|
|
385
|
+
```json
|
|
386
|
+
{
|
|
387
|
+
"defaultTools": ["bash", "edit", "write"]
|
|
388
|
+
}
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
An empty array starts with no built-in tools while preserving extension and SDK custom tools. `--tools` replaces this behavior with a strict allowlist for all tools, `--no-tools` disables all tools, and `--no-builtin-tools` disables the built-in defaults. `--exclude-tools` filters the resulting list. A project `defaultTools` array replaces the global array.
|
|
392
|
+
|
|
359
393
|
### Sessions
|
|
360
394
|
|
|
361
395
|
| Setting | Type | Default | Description |
|
|
@@ -384,6 +418,64 @@ When multiple sources specify a session directory, precedence is `--session-dir`
|
|
|
384
418
|
|
|
385
419
|
`enabledModels` changes which models appear in the catalog, startup selection, and `/model` narrowing. `favoriteModels` is separate and only controls Ctrl+P cycling.
|
|
386
420
|
|
|
421
|
+
#### Per-model memory
|
|
422
|
+
|
|
423
|
+
`modelThinkingLevels`, `modelLastOnThinkingLevels`, and `modelServiceTiers` are maps from `"provider/id"` to a level or tier value. They're managed automatically: switching models, using `/reasoning`, `/efforts`, or `/fast` writes the appropriate key. You rarely need to edit them by hand, but the shape looks like this:
|
|
424
|
+
|
|
425
|
+
```json
|
|
426
|
+
{
|
|
427
|
+
"modelThinkingLevels": {
|
|
428
|
+
"openai-codex/gpt-5.6-sol": "xhigh",
|
|
429
|
+
"anthropic/claude-fable-5": "high"
|
|
430
|
+
},
|
|
431
|
+
"modelServiceTiers": {
|
|
432
|
+
"openai-codex/gpt-5.6-sol": "priority"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
A `-fast` catalog variant (like `gpt-5.6-sol-fast`) and its base model share one entry, so you can't give them conflicting tiers.
|
|
438
|
+
|
|
439
|
+
#### Favorite model decorators
|
|
440
|
+
|
|
441
|
+
Favorite model patterns accept optional decorator suffixes for reasoning level and service tier:
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
provider/model-id # bare pattern
|
|
445
|
+
provider/model-id:high # pin reasoning to high
|
|
446
|
+
provider/model-id:priority # pin service tier to priority
|
|
447
|
+
provider/model-id:priority:high # pin both tier and level
|
|
448
|
+
claude-*:xhigh # glob with level pin
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Decorators survive favorite toggling. A `:level` pin takes precedence over the per-model memory for reasoning, and a `:priority` pin takes precedence for the service tier. Under a pin, `/fast off` notifies that fast mode is fixed by the active model selection.
|
|
452
|
+
|
|
453
|
+
#### Thinking level precedence
|
|
454
|
+
|
|
455
|
+
When a model becomes active, its reasoning level is resolved in this order:
|
|
456
|
+
|
|
457
|
+
1. An explicit or ephemeral session-scoped level (e.g. turn-scope `set_thinking_level`)
|
|
458
|
+
2. A favorite pattern `:level` pin
|
|
459
|
+
3. The per-model `modelThinkingLevels` memory
|
|
460
|
+
4. `defaultThinkingLevel`
|
|
461
|
+
5. `"medium"` (the hardcoded fallback)
|
|
462
|
+
|
|
463
|
+
The resolved level is always clamped to what the model actually supports.
|
|
464
|
+
|
|
465
|
+
#### Service tier precedence
|
|
466
|
+
|
|
467
|
+
The service tier on outgoing requests is resolved as:
|
|
468
|
+
|
|
469
|
+
1. A scoped/favorite `:priority` pin
|
|
470
|
+
2. The model catalog's `compat.serviceTier`
|
|
471
|
+
3. `openai.serviceTier` (the global OpenAI setting)
|
|
472
|
+
|
|
473
|
+
The per-model `modelServiceTiers` memory is not part of that resolution: it applies to OpenAI Codex
|
|
474
|
+
models only, through fast mode. It acts as the session-start default for `/fast` (a remembered
|
|
475
|
+
`"priority"` starts the session fast) and as an explicit `"auto"` opt-out of a catalog-inherited
|
|
476
|
+
priority tier, which keeps `service_tier` off the wire. Under a `:priority` pin the memory has no
|
|
477
|
+
effect, because the pin outranks it.
|
|
478
|
+
|
|
387
479
|
### Markdown
|
|
388
480
|
|
|
389
481
|
| Setting | Type | Default | Description |
|
package/docs/terminal-setup.md
CHANGED
|
@@ -2,9 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Pi uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
4
|
|
|
5
|
-
## Kitty
|
|
5
|
+
## Kitty
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Works out of the box.
|
|
8
|
+
|
|
9
|
+
## iTerm2
|
|
10
|
+
|
|
11
|
+
### Regular TUI mode
|
|
12
|
+
|
|
13
|
+
Works out of the box.
|
|
14
|
+
|
|
15
|
+
### Fullscreen TUI mode
|
|
16
|
+
|
|
17
|
+
Pi owns the viewport, so iTerm2 sends mouse-wheel reports instead of scrolling its native scrollback. With iTerm2's default fast-trackpad behavior, those reports can lose most of an accelerated wheel delta, making fullscreen scrolling much slower than regular scrolling.
|
|
18
|
+
|
|
19
|
+
If fast mouse-wheel gestures move only about one line at a time in fullscreen mode:
|
|
20
|
+
|
|
21
|
+
1. Open **iTerm2 → Settings → Advanced**.
|
|
22
|
+
2. Search for **Trackpad scrolls fast?** and set it to **No**.
|
|
23
|
+
|
|
24
|
+
This is an iTerm2-wide workaround and may also change native trackpad scrolling. The underlying behavior is tracked in [iTerm2 issue 9619](https://gitlab.com/gnachman/iterm2/-/work_items/9619).
|
|
8
25
|
|
|
9
26
|
## Apple Terminal
|
|
10
27
|
|
|
@@ -32,6 +49,10 @@ If Claude Code 2.x or newer is the only reason you added that mapping, you can r
|
|
|
32
49
|
|
|
33
50
|
Pi binds `Ctrl+J` as a default newline alias, so `Shift+Enter` keeps working in tmux via that remap without extra pi configuration.
|
|
34
51
|
|
|
52
|
+
### Fullscreen TUI mode
|
|
53
|
+
|
|
54
|
+
In fullscreen mode, links remain clickable, but Ghostty does not show its hover underline or lower-left URL preview while pi captures mouse input. Hold `Shift+Command` on macOS or `Shift+Ctrl` on Linux to use Ghostty's native link handling.
|
|
55
|
+
|
|
35
56
|
## WezTerm
|
|
36
57
|
|
|
37
58
|
WezTerm usually works out of the box for `Shift+Enter` via xterm modifyOtherKeys. To use the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
|
package/docs/themes.md
CHANGED
|
@@ -39,6 +39,23 @@ Select a theme via `/settings` or in `settings.json`:
|
|
|
39
39
|
|
|
40
40
|
On first run, pi detects your terminal background and defaults to `dark` or `light`.
|
|
41
41
|
|
|
42
|
+
### Initial Theme
|
|
43
|
+
|
|
44
|
+
Start an interactive run with a theme without changing the saved setting:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pi --use-theme light
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To follow terminal appearance, use `lightTheme/darkTheme` syntax:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pi --use-theme light/dark
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The CLI value is the initial theme for that run. Choosing another theme later in `/settings` applies it immediately
|
|
57
|
+
and saves it normally.
|
|
58
|
+
|
|
42
59
|
## Creating a Custom Theme
|
|
43
60
|
|
|
44
61
|
1. Create a theme file:
|
|
@@ -72,6 +89,8 @@ vim ~/.senpi/agent/themes/my-theme.json
|
|
|
72
89
|
"thinkingText": "secondary",
|
|
73
90
|
"selectedBg": "#2d2d30",
|
|
74
91
|
"scrollbarThumb": "#555566",
|
|
92
|
+
"searchMatchBg": "#2d2d30",
|
|
93
|
+
"searchMatchText": "",
|
|
75
94
|
"userMessageBg": "#2d2d30",
|
|
76
95
|
"userMessageText": "",
|
|
77
96
|
"customMessageBg": "#2d2d30",
|
|
@@ -141,13 +160,13 @@ vim ~/.senpi/agent/themes/my-theme.json
|
|
|
141
160
|
|
|
142
161
|
- `name` is required, must be unique, and must not contain `/`.
|
|
143
162
|
- `vars` is optional. Define reusable colors here, then reference them in `colors`.
|
|
144
|
-
- `colors` must define all 51 required tokens. `thinkingMax`
|
|
163
|
+
- `colors` must define all 51 required tokens. `thinkingMax`, `scrollbarThumb`, and the two search highlight tokens are optional and use the fallbacks listed below.
|
|
145
164
|
|
|
146
165
|
The `$schema` field enables editor auto-completion and validation.
|
|
147
166
|
|
|
148
167
|
## Color Tokens
|
|
149
168
|
|
|
150
|
-
Every theme must define all 51 required color tokens. `thinkingMax`
|
|
169
|
+
Every theme must define all 51 required color tokens. The optional tokens preserve compatibility with existing themes: `thinkingMax` falls back to `thinkingXhigh`, `scrollbarThumb` and `searchMatchBg` fall back to `selectedBg`, and `searchMatchText` falls back to `text`. Other search matches use `searchMatchText` on `searchMatchBg` with an underline; the current match reverses that foreground/background pair and uses bold text.
|
|
151
170
|
|
|
152
171
|
### Core UI (11 colors)
|
|
153
172
|
|
|
@@ -165,12 +184,14 @@ Every theme must define all 51 required color tokens. `thinkingMax` and `scrollb
|
|
|
165
184
|
| `text` | Default text (usually `""`) |
|
|
166
185
|
| `thinkingText` | Thinking block text |
|
|
167
186
|
|
|
168
|
-
### Backgrounds & Content (11 required,
|
|
187
|
+
### Backgrounds & Content (11 required, 3 optional)
|
|
169
188
|
|
|
170
189
|
| Token | Purpose |
|
|
171
190
|
|-------|---------|
|
|
172
191
|
| `selectedBg` | Selected line background |
|
|
173
192
|
| `scrollbarThumb` | Fullscreen scrollbar thumb background; optional, falls back to `selectedBg` |
|
|
193
|
+
| `searchMatchBg` | Transcript search match background and current-match text; optional, falls back to `selectedBg` |
|
|
194
|
+
| `searchMatchText` | Transcript search match text and current-match background; optional, falls back to `text` |
|
|
174
195
|
| `userMessageBg` | User message background |
|
|
175
196
|
| `userMessageText` | User message text |
|
|
176
197
|
| `customMessageBg` | Extension message background |
|
package/docs/tui.md
CHANGED
|
@@ -431,7 +431,7 @@ renderResult(result, options, theme, context) {
|
|
|
431
431
|
|
|
432
432
|
| Category | Colors |
|
|
433
433
|
|----------|--------|
|
|
434
|
-
| General | `text`, `accent`, `muted`, `dim` |
|
|
434
|
+
| General | `text`, `accent`, `muted`, `dim`, `searchMatchText` |
|
|
435
435
|
| Status | `success`, `error`, `warning` |
|
|
436
436
|
| Borders | `border`, `borderAccent`, `borderMuted` |
|
|
437
437
|
| Messages | `userMessageText`, `customMessageText`, `customMessageLabel` |
|
|
@@ -444,7 +444,7 @@ renderResult(result, options, theme, context) {
|
|
|
444
444
|
|
|
445
445
|
**Background colors** (`theme.bg(color, text)`):
|
|
446
446
|
|
|
447
|
-
`selectedBg`, `userMessageBg`, `customMessageBg`, `toolPendingBg`, `toolSuccessBg`, `toolErrorBg`
|
|
447
|
+
`selectedBg`, `searchMatchBg`, `userMessageBg`, `customMessageBg`, `toolPendingBg`, `toolSuccessBg`, `toolErrorBg`
|
|
448
448
|
|
|
449
449
|
**For Markdown**, use `getMarkdownTheme()`:
|
|
450
450
|
|
package/docs/usage.md
CHANGED
|
@@ -42,6 +42,9 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
42
42
|
| [`/llama`](llama-cpp.md) | Download, load, and unload llama.cpp router models |
|
|
43
43
|
| `/model` | Switch models |
|
|
44
44
|
| `/scoped-models` | Enable/disable models for Ctrl+P cycling |
|
|
45
|
+
| `/reasoning [on\|off]` | Show or toggle reasoning for the current model |
|
|
46
|
+
| `/efforts [level]` | Show or set reasoning effort (graded models only) |
|
|
47
|
+
| `/fast [on\|off]` | Toggle fast mode (OpenAI Codex models, persisted per model) |
|
|
45
48
|
| `/settings` | Thinking level, theme, message delivery, transport |
|
|
46
49
|
| `/resume` | Pick from previous sessions |
|
|
47
50
|
| `/new` | Start a new session |
|
|
@@ -63,6 +66,22 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
63
66
|
| `/changelog` | Display version history |
|
|
64
67
|
| `/quit`, `/exit` | Quit senpi |
|
|
65
68
|
|
|
69
|
+
### Reasoning and Fast Mode Commands
|
|
70
|
+
|
|
71
|
+
**`/reasoning [on|off]`** shows or toggles reasoning. Behavior adapts to the active model:
|
|
72
|
+
|
|
73
|
+
- Models without reasoning support are told plainly.
|
|
74
|
+
- Always-on models reject `/reasoning off`.
|
|
75
|
+
- On/off-only and graded models toggle normally.
|
|
76
|
+
|
|
77
|
+
`/reasoning on` restores the effort level you last used for that model. No-arg shows current status.
|
|
78
|
+
|
|
79
|
+
**`/efforts [minimal|low|medium|high|xhigh|max]`** sets the reasoning effort ladder for graded models. On/off-only models are directed to use `/reasoning` instead. `xhigh` and `max` appear only when the model supports them. No-arg shows current effort and available levels.
|
|
80
|
+
|
|
81
|
+
**`/fast [on|off]`** toggles OpenAI Codex fast mode (`service_tier: "priority"`). The choice is remembered per model and survives restarts. No-arg toggles. Non-Codex models are told fast mode is unavailable. If the active model selection pins `:priority` via a favorite decorator, `/fast off` is blocked and explains why.
|
|
82
|
+
|
|
83
|
+
All three commands work over RPC and headless (no selector opened, status sent as text notifications).
|
|
84
|
+
|
|
66
85
|
## Message Queue
|
|
67
86
|
|
|
68
87
|
You can submit messages while the agent is still working:
|
|
@@ -243,18 +262,19 @@ senpi --no-extensions -e ./my-extension.ts
|
|
|
243
262
|
|
|
244
263
|
| Option | Description |
|
|
245
264
|
|--------|-------------|
|
|
246
|
-
| `--system-prompt <text>` | Replace
|
|
247
|
-
| `--append-system-prompt <text>` | Append to system prompt |
|
|
265
|
+
| `--system-prompt <text>` | Replace the generated base prompt (text or a file path); per-model prompt presets step aside; context files and skills are still appended |
|
|
266
|
+
| `--append-system-prompt <text>` | Append to the system prompt (repeatable; text or a file path); applies after per-model prompt presets |
|
|
248
267
|
| `--tui-mode <mode>` | TUI mode: `regular` (default) or experimental `fullscreen` |
|
|
268
|
+
| `--use-theme <name[/name]>` | Set the initial interactive theme for this run without changing settings |
|
|
249
269
|
| `--verbose` | Force verbose startup |
|
|
250
270
|
| `-a`, `--approve` | Trust project-local files for this run |
|
|
251
271
|
| `-na`, `--no-approve` | Ignore project-local files for this run |
|
|
252
272
|
| `-h`, `--help` | Show help |
|
|
253
273
|
| `-v`, `--version` | Show version |
|
|
254
274
|
|
|
255
|
-
In `fullscreen` mode, the transcript scrolls inside the terminal viewport while queued messages, working status, extension widgets, editor, and footer remain fixed at the bottom. Mouse/trackpad input scrolls the region under the pointer; keyboard viewport actions always remain available. Inline images work in terminals that support the Kitty graphics protocol, including Kitty and Ghostty. In iTerm2 they render as text placeholders because its inline-image protocol cannot delete or crop placements during application-owned scrolling. In `regular` mode, senpi uses the main screen and terminal-owned scrollback, and iTerm2 inline images continue to render normally.
|
|
275
|
+
In `fullscreen` mode, the transcript scrolls inside the terminal viewport while queued messages, working status, extension widgets, editor, and footer remain fixed at the bottom. Mouse/trackpad input scrolls the region under the pointer; keyboard viewport actions always remain available. Inline images work in terminals that support the Kitty graphics protocol, including Kitty and Ghostty. In iTerm2 they render as text placeholders because its inline-image protocol cannot delete or crop placements during application-owned scrolling. In `regular` mode, senpi uses the main screen and terminal-owned scrollback, and iTerm2 inline images continue to render normally. See [Terminal setup](terminal-setup.md) for terminal-specific settings and workarounds.
|
|
256
276
|
|
|
257
|
-
Set **TUI mode** in `/settings` to switch between `regular` and `fullscreen` immediately and choose the default for future sessions.
|
|
277
|
+
Set **TUI mode** in `/settings` to switch between `regular` and `fullscreen` immediately and choose the default for future sessions. **Fullscreen exit output** controls whether exiting fullscreen prints the final transcript or restores the previous screen and prints only the session resume hint.
|
|
258
278
|
|
|
259
279
|
### File Arguments
|
|
260
280
|
|