@code-yeongyu/senpi 2026.8.9 → 2026.8.11-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 +122 -0
- package/dist/brand-dir-migration.d.ts +28 -0
- package/dist/brand-dir-migration.d.ts.map +1 -0
- package/dist/brand-dir-migration.js +77 -0
- package/dist/brand-dir-migration.js.map +1 -0
- package/dist/cli/grok-neo-gate.d.ts +0 -8
- package/dist/cli/grok-neo-gate.d.ts.map +1 -1
- package/dist/cli/grok-neo-gate.js +4 -2
- package/dist/cli/grok-neo-gate.js.map +1 -1
- package/dist/cli-main.js +3 -0
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +27 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +41 -9
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +4 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +21 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/brand.d.ts +79 -0
- package/dist/core/brand.d.ts.map +1 -0
- package/dist/core/brand.js +141 -0
- package/dist/core/brand.js.map +1 -0
- package/dist/core/dynamic-prompt/identity.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/identity.js +2 -1
- package/dist/core/dynamic-prompt/identity.js.map +1 -1
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +2 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/extensions/builtin/cache-keepalive/index.d.ts +30 -0
- package/dist/core/extensions/builtin/cache-keepalive/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cache-keepalive/index.js +281 -0
- package/dist/core/extensions/builtin/cache-keepalive/index.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +10 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +9 -9
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +2 -1
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/generated-shim-filter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/generated-shim-filter.js +4 -4
- package/dist/core/extensions/builtin/config-reload/generated-shim-filter.js.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js +21 -8
- package/dist/core/extensions/builtin/goal/cache-warm-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm.d.ts +11 -2
- package/dist/core/extensions/builtin/goal/cache-warm.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/cache-warm.js +16 -0
- package/dist/core/extensions/builtin/goal/cache-warm.js.map +1 -1
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +36 -1
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts +2 -2
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +3 -3
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +2 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +121 -54
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/prompt.js +4 -4
- package/dist/core/extensions/builtin/goal/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/goal/store-changed-event.d.ts +8 -0
- package/dist/core/extensions/builtin/goal/store-changed-event.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/store-changed-event.js +9 -0
- package/dist/core/extensions/builtin/goal/store-changed-event.js.map +1 -0
- package/dist/core/extensions/builtin/goal/store.d.ts +3 -2
- package/dist/core/extensions/builtin/goal/store.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/store.js +128 -101
- package/dist/core/extensions/builtin/goal/store.js.map +1 -1
- package/dist/core/extensions/builtin/goal/wait-progress.js +5 -5
- package/dist/core/extensions/builtin/goal/wait-progress.js.map +1 -1
- package/dist/core/extensions/builtin/help/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/help/index.js +3 -2
- package/dist/core/extensions/builtin/help/index.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +2 -0
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.d.ts +16 -0
- package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.js +15 -0
- package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js +2 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js +2 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js +2 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +2 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/grok-4.5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js +6 -5
- package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +2 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.js +7 -8
- package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/session-bundle.d.ts +3 -3
- package/dist/core/extensions/builtin/terminal/session-bundle.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/session-bundle.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.map +1 -1
- package/dist/core/extensions/loader.js +7 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +4 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +19 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +50 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -4
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +0 -7
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/generated-shim-banner.d.ts +15 -0
- package/dist/core/generated-shim-banner.d.ts.map +1 -0
- package/dist/core/generated-shim-banner.js +26 -0
- package/dist/core/generated-shim-banner.js.map +1 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +7 -3
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +2 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader.d.ts +4 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +9 -5
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-log.d.ts.map +1 -1
- package/dist/core/session-log.js +4 -2
- package/dist/core/session-log.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +10 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +17 -2
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js +2 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.d.ts +0 -4
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +2 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +12 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/filesystem-policy.d.ts +10 -0
- package/dist/core/tools/filesystem-policy.d.ts.map +1 -0
- package/dist/core/tools/filesystem-policy.js +59 -0
- package/dist/core/tools/filesystem-policy.js.map +1 -0
- package/dist/core/tools/find.d.ts +3 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +15 -0
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +3 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +16 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +3 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +11 -0
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +3 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +13 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts +3 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +12 -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/inspector-policy.d.ts.map +1 -1
- package/dist/inspector-policy.js +2 -1
- package/dist/inspector-policy.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +5 -4
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +4 -0
- package/dist/migrations.js.map +1 -1
- package/dist/modes/app-server/threads/goal-handlers.d.ts.map +1 -1
- package/dist/modes/app-server/threads/goal-handlers.js +7 -0
- package/dist/modes/app-server/threads/goal-handlers.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +7 -7
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/cli-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/cli-tips.js +2 -1
- package/dist/modes/interactive/tips/catalog/cli-tips.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/ethos-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/ethos-tips.js +4 -3
- package/dist/modes/interactive/tips/catalog/ethos-tips.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/model-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/model-tips.js +2 -1
- package/dist/modes/interactive/tips/catalog/model-tips.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/session-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/session-tips.js +2 -1
- package/dist/modes/interactive/tips/catalog/session-tips.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/settings-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/settings-tips.js +3 -2
- package/dist/modes/interactive/tips/catalog/settings-tips.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/workspace-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/workspace-tips.js +4 -3
- package/dist/modes/interactive/tips/catalog/workspace-tips.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +2 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/nearest-parent-config.d.ts +6 -1
- package/dist/nearest-parent-config.d.ts.map +1 -1
- package/dist/nearest-parent-config.js +18 -2
- package/dist/nearest-parent-config.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +13 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.js +2 -0
- package/dist/rpc-entry.js.map +1 -1
- package/dist/self-update-bootstrap.d.ts.map +1 -1
- package/dist/self-update-bootstrap.js +6 -0
- package/dist/self-update-bootstrap.js.map +1 -1
- package/dist/senpi +2 -2
- package/dist/utils/pi-user-agent.d.ts +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js +4 -3
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +2 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +3 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +37 -6
- package/dist/utils/version-check.js.map +1 -1
- package/docs/extensions.md +76 -0
- package/docs/providers.md +23 -3
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +50 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/{resumption-channel.ts → wake-source-state.ts} +9 -9
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +7 -7
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +12 -11
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +3 -1
- 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 +13 -0
- 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 +6 -3
- 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/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -2
- 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 +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.d.ts +17 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js +52 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.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/together.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/tool-call-middleware/protocols/antml/recovery-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.js +120 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +3 -1
- 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 +17 -3
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/wire-identity.d.ts +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/wire-identity.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/wire-identity.js +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/wire-identity.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.js +11 -3
- package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/native/prebuilds/darwin-arm64/senpi_pty.darwin-arm64.node +0 -0
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +6 -6
- package/dist/core/extensions/builtin/resumption-channel-event.d.ts +0 -13
- package/dist/core/extensions/builtin/resumption-channel-event.d.ts.map +0 -1
- package/dist/core/extensions/builtin/resumption-channel-event.js +0 -13
- package/dist/core/extensions/builtin/resumption-channel-event.js.map +0 -1
- package/dist/core/omo-native-detect.d.ts +0 -3
- package/dist/core/omo-native-detect.d.ts.map +0 -1
- package/dist/core/omo-native-detect.js +0 -58
- package/dist/core/omo-native-detect.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,128 @@
|
|
|
14
14
|
|
|
15
15
|
### Removed
|
|
16
16
|
|
|
17
|
+
## [2026.8.11-2] - 2026-08-10
|
|
18
|
+
|
|
19
|
+
### New Features
|
|
20
|
+
|
|
21
|
+
### Breaking Changes
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Distributions repackaging senpi can set their own product identity through a `SENPI_BRAND` profile: name, display
|
|
26
|
+
version, config directory (optionally flat), environment prefix, wire identity and update channel. The profile is
|
|
27
|
+
consumed and scrubbed at startup, so nested senpi processes keep the engine identity. A standalone install is
|
|
28
|
+
unchanged ([#783](https://github.com/code-yeongyu/senpi/pull/783)).
|
|
29
|
+
- Product settings are read across the brand prefix and the legacy `SENPI_`/`PI_` prefixes, so existing environments
|
|
30
|
+
keep working after a rebrand ([#783](https://github.com/code-yeongyu/senpi/pull/783)).
|
|
31
|
+
- A branded install checks its own release channel for updates, and the update notice, changelog link and self-update
|
|
32
|
+
paths point at the distribution's own command instead of `senpi update`
|
|
33
|
+
([#783](https://github.com/code-yeongyu/senpi/pull/783)).
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Windows pipe-fallback shutdown no longer crashes with an uncaught `spawn taskkill ENOENT` when the helper cannot
|
|
40
|
+
resolve. Senpi now invokes `taskkill.exe` explicitly and falls back to direct child termination if helper startup
|
|
41
|
+
fails ([#792](https://github.com/code-yeongyu/senpi/pull/792)).
|
|
42
|
+
- A brand profile carrying an unsafe `configDir` (a path separator, `.` or `..`) is rejected instead of redirecting
|
|
43
|
+
agent state and its migration outside the intended directory
|
|
44
|
+
([#787](https://github.com/code-yeongyu/senpi/pull/787)).
|
|
45
|
+
- A branded install without an update channel no longer falls back to checking the engine's own releases, which it
|
|
46
|
+
cannot install ([#787](https://github.com/code-yeongyu/senpi/pull/787)).
|
|
47
|
+
- Prevented an asynchronous goal continuation from restoring a goal after `thread/goal/clear` or recording delivery
|
|
48
|
+
against a replacement goal ([#788](https://github.com/code-yeongyu/senpi/pull/788)).
|
|
49
|
+
- Prevented Claude Agent SDK OAuth sessions from scheduling `assistant_rewritten` forks when only host-side thinking
|
|
50
|
+
timing annotations changed, preserving resident-session and prompt-cache continuity for reasoning-heavy turns
|
|
51
|
+
([#751](https://github.com/code-yeongyu/senpi/pull/751) by [@goldtg](https://github.com/goldtg)).
|
|
52
|
+
|
|
53
|
+
### Removed
|
|
54
|
+
|
|
55
|
+
## [2026.8.11] - 2026-08-10
|
|
56
|
+
|
|
57
|
+
### New Features
|
|
58
|
+
|
|
59
|
+
### Breaking Changes
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
### Removed
|
|
68
|
+
|
|
69
|
+
- Removed the OmO-specific footer badge, its detection module, and the `isOmoNative` provider surface. Downstream packages contribute footer content through the supported `ctx.ui.setStatus` extension API instead, so no product-specific markers live in the coding agent.
|
|
70
|
+
|
|
71
|
+
## [2026.8.10] - 2026-08-10
|
|
72
|
+
|
|
73
|
+
### New Features
|
|
74
|
+
|
|
75
|
+
### Breaking Changes
|
|
76
|
+
|
|
77
|
+
### Added
|
|
78
|
+
|
|
79
|
+
- Added `pi.registerFilesystemPolicy()` for extensions. Policies receive a canonicalized path plus operation (`read`, `enumerate`, or `write`) and tool name, compose deny-wins below permission hooks, and are enforced by the built-in `read`, `write`, `edit`, `ls`, `find`, and `grep` tools. Denials surface as ordinary tool errors carrying the policy reason, and hosts without any registered policy behave exactly as before. The runner also exposes aggregated denied-root metadata for future sandbox backends.
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
### Removed
|
|
86
|
+
|
|
87
|
+
## [2026.8.9-2] - 2026-08-09
|
|
88
|
+
|
|
89
|
+
### New Features
|
|
90
|
+
|
|
91
|
+
### Breaking Changes
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- Added opt-in native Anthropic prompt-cache keep-alive pings, disabled by default and bounded per session by request and estimated-cost caps. Idle pings stay dormant while any Goal continuation wait is armed and render as `⚡ Warm ping #N` transcript entries.
|
|
96
|
+
|
|
97
|
+
- Added provider-native prompt-cache identity and first-request affinity for the interactive agent: Moonshot/Kimi Chat
|
|
98
|
+
Completions now send `prompt_cache_key`, while OpenRouter sends both `x-session-id` and the request body's `session_id`
|
|
99
|
+
so repeated turns consistently target the same upstream cache lane.
|
|
100
|
+
|
|
101
|
+
- Goal continuation now aggregates terminal monitors, background terminal sessions, detached eval cells, and other producers through the shared `wake_source_state` contract. Scheduled/resumed telemetry keeps `activeMonitorCount` as the aggregate compatibility field and adds a per-source `wakeSources` snapshot.
|
|
102
|
+
|
|
103
|
+
- Goal cache-warm wait and wake entries now show an in-memory iteration number for each accepted monitor cycle, resetting when the Goal or wake epoch changes while remaining compatible with legacy persisted entries.
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
|
|
107
|
+
- Goal monitor continuation backstops now derive from the active model's prompt-cache safe-wait budget instead of a fixed four-minute delay, capped by `promptCache.goalBackstopMaxSeconds` (default 3570 seconds). Held direct-input admission now consumes wall-clock time, and cache-warm notices no longer claim warmth or savings after the cache TTL may have elapsed.
|
|
108
|
+
|
|
109
|
+
- Expanded explicit OpenRouter prompt-cache markers beyond Anthropic model names to Qwen and Google prefixes, including
|
|
110
|
+
catalog IDs with one leading `~`, so those provider families reuse the intended cache boundary instead of sending
|
|
111
|
+
otherwise equivalent prompts without cache-control markers.
|
|
112
|
+
|
|
113
|
+
### Fixed
|
|
114
|
+
|
|
115
|
+
- Fixed active goals becoming stranded when the final wake source drained: an armed monitor wait now fires after a one-second micro-grace even at zero active sources. Activating a goal through app-server `thread/goal/set` also queues work for an otherwise idle session.
|
|
116
|
+
|
|
117
|
+
- Fixed provider cache accounting and TTL reporting used by Senpi's status, cost, and cache-warm decisions: flat Kimi
|
|
118
|
+
`usage.cached_tokens` now counts as cache-read tokens; Bedrock requests one-hour retention only for Claude Opus 4.5,
|
|
119
|
+
Sonnet 4.5, and Haiku 4.5 while other cacheable Claude models stay at five minutes; and the Claude SDK OAuth lane now
|
|
120
|
+
reports its SDK-managed cache lifetime as 300 seconds.
|
|
121
|
+
- Fixed Anthropic prompt-cache pre-warming importing the Anthropic SDK before Senpi knew whether the selected model
|
|
122
|
+
supported warming. Unsupported providers now remain dependency-lazy, while supported Anthropic models preserve the
|
|
123
|
+
same zero-output warm request and normalized cache-usage accounting.
|
|
124
|
+
|
|
125
|
+
- Fixed a full session freeze when four or more long-lived background terminal sessions were active. Each native terminal
|
|
126
|
+
`waitExit()` previously parked one of the four default libuv workers on a blocking thread join for the child's lifetime,
|
|
127
|
+
starving all later fs/DNS work so provider requests died as `Request timed out.` and the turn pipeline wedged with input
|
|
128
|
+
dead. Native waits are now settled from a dedicated reaper thread, keeping the libuv pool free; synchronous wait errors,
|
|
129
|
+
exit payloads, and process-tree kill behavior are unchanged. Added native regression coverage for threadpool exhaustion
|
|
130
|
+
and Worker teardown ([#768](https://github.com/code-yeongyu/senpi/pull/768)).
|
|
131
|
+
- Fixed threshold-triggered compaction giving up with "Compaction did not apply" when an idle-warmed summary became stale after a message-revision change. The blocking route now discards the stale warm result and regenerates a fresh summary against the current session instead of allowing context to keep growing.
|
|
132
|
+
|
|
133
|
+
- Recovered malformed Claude tool-call text that starts with an angle-less
|
|
134
|
+
`antml:invoke` and ends with a stray `</function_results>`, so Senpi executes
|
|
135
|
+
the validated call once without printing internal protocol markup.
|
|
136
|
+
|
|
137
|
+
### Removed
|
|
138
|
+
|
|
17
139
|
## [2026.8.9] - 2026-08-09
|
|
18
140
|
|
|
19
141
|
### New Features
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First-run copy-forward for a rebranded install.
|
|
3
|
+
*
|
|
4
|
+
* A machine that already ran the engine keeps its state in the engine's own directory. A
|
|
5
|
+
* branded install reads a different location, so the existing state is COPIED once - never
|
|
6
|
+
* moved - because the same machine may keep running the engine standalone, and a move would
|
|
7
|
+
* silently empty that install.
|
|
8
|
+
*/
|
|
9
|
+
/** Written last, so an interrupted copy simply runs again next start. */
|
|
10
|
+
export declare const MIGRATION_MARKER = ".migrated-from-senpi";
|
|
11
|
+
export interface BrandDirMigrationResult {
|
|
12
|
+
readonly migrated: boolean;
|
|
13
|
+
readonly copied: readonly string[];
|
|
14
|
+
readonly from: string;
|
|
15
|
+
readonly to: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Copies engine state into the branded directory. Idempotent: entries that already exist in
|
|
19
|
+
* the destination are left untouched, so a re-run after a partial copy completes it instead of
|
|
20
|
+
* overwriting newer state.
|
|
21
|
+
*/
|
|
22
|
+
export declare function migrateEngineStateToBrandDir(legacyAgentDir: string, brandDir: string): BrandDirMigrationResult;
|
|
23
|
+
/**
|
|
24
|
+
* Runs the copy-forward for the active brand, announcing it once so the user knows the two
|
|
25
|
+
* installs now hold independent state.
|
|
26
|
+
*/
|
|
27
|
+
export declare function migrateEngineStateForBrand(homeDir?: string): BrandDirMigrationResult | undefined;
|
|
28
|
+
//# sourceMappingURL=brand-dir-migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-dir-migration.d.ts","sourceRoot":"","sources":["../src/brand-dir-migration.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AAEH,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AASvD,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAgC9G;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,MAAkB,GAAG,uBAAuB,GAAG,SAAS,CAS3G"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cpSync, existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import { CONFIG_DIR_NAME, CONFIG_FLAT_LAYOUT, FLAT_LAYOUT_SENTINEL } from "./config.js";
|
|
6
|
+
/**
|
|
7
|
+
* First-run copy-forward for a rebranded install.
|
|
8
|
+
*
|
|
9
|
+
* A machine that already ran the engine keeps its state in the engine's own directory. A
|
|
10
|
+
* branded install reads a different location, so the existing state is COPIED once - never
|
|
11
|
+
* moved - because the same machine may keep running the engine standalone, and a move would
|
|
12
|
+
* silently empty that install.
|
|
13
|
+
*/
|
|
14
|
+
/** Written last, so an interrupted copy simply runs again next start. */
|
|
15
|
+
export const MIGRATION_MARKER = ".migrated-from-senpi";
|
|
16
|
+
/** Regenerable state: caches, logs and build worktrees are rebuilt on demand. */
|
|
17
|
+
const SKIPPED_ENTRIES = new Set(["cache", "logs", "omo-local-update"]);
|
|
18
|
+
function isSkipped(entry) {
|
|
19
|
+
return SKIPPED_ENTRIES.has(entry) || entry.endsWith(".log");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Copies engine state into the branded directory. Idempotent: entries that already exist in
|
|
23
|
+
* the destination are left untouched, so a re-run after a partial copy completes it instead of
|
|
24
|
+
* overwriting newer state.
|
|
25
|
+
*/
|
|
26
|
+
export function migrateEngineStateToBrandDir(legacyAgentDir, brandDir) {
|
|
27
|
+
const result = { migrated: false, copied: [], from: legacyAgentDir, to: brandDir };
|
|
28
|
+
if (!existsSync(legacyAgentDir))
|
|
29
|
+
return result;
|
|
30
|
+
if (existsSync(join(brandDir, MIGRATION_MARKER)))
|
|
31
|
+
return result;
|
|
32
|
+
if (existsSync(join(brandDir, FLAT_LAYOUT_SENTINEL)))
|
|
33
|
+
return result;
|
|
34
|
+
let entries;
|
|
35
|
+
try {
|
|
36
|
+
entries = readdirSync(legacyAgentDir);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
mkdirSync(brandDir, { recursive: true });
|
|
42
|
+
const copied = [];
|
|
43
|
+
for (const entry of entries) {
|
|
44
|
+
if (isSkipped(entry))
|
|
45
|
+
continue;
|
|
46
|
+
const target = join(brandDir, entry);
|
|
47
|
+
if (existsSync(target))
|
|
48
|
+
continue;
|
|
49
|
+
try {
|
|
50
|
+
cpSync(join(legacyAgentDir, entry), target, { recursive: true, errorOnExist: false });
|
|
51
|
+
copied.push(entry);
|
|
52
|
+
}
|
|
53
|
+
catch { }
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
writeFileSync(join(brandDir, MIGRATION_MARKER), `${legacyAgentDir}\n`);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return { ...result, copied };
|
|
60
|
+
}
|
|
61
|
+
return { migrated: true, copied, from: legacyAgentDir, to: brandDir };
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Runs the copy-forward for the active brand, announcing it once so the user knows the two
|
|
65
|
+
* installs now hold independent state.
|
|
66
|
+
*/
|
|
67
|
+
export function migrateEngineStateForBrand(homeDir = homedir()) {
|
|
68
|
+
if (!CONFIG_FLAT_LAYOUT)
|
|
69
|
+
return undefined;
|
|
70
|
+
const result = migrateEngineStateToBrandDir(join(homeDir, ".senpi", "agent"), join(homeDir, CONFIG_DIR_NAME));
|
|
71
|
+
if (result.migrated && result.copied.length > 0) {
|
|
72
|
+
console.log(chalk.green(`Copied existing settings from ${result.from} to ${result.to}`));
|
|
73
|
+
console.log(chalk.dim("The original directory is untouched; the two installs keep separate state from now on."));
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=brand-dir-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-dir-migration.js","sourceRoot":"","sources":["../src/brand-dir-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;A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AK,CAAC,KAAK,CAAC,iCAAiC,MAAM,CAAC,IAAI,OAAO,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACzF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wFAAwF,CAAC,CAAC,CAAC;IAClH,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["import { cpSync, existsSync, mkdirSync, readdirSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport chalk from \"chalk\";\nimport { CONFIG_DIR_NAME, CONFIG_FLAT_LAYOUT, FLAT_LAYOUT_SENTINEL } from \"./config.ts\";\n\n/**\n * First-run copy-forward for a rebranded install.\n *\n * A machine that already ran the engine keeps its state in the engine's own directory. A\n * branded install reads a different location, so the existing state is COPIED once - never\n * moved - because the same machine may keep running the engine standalone, and a move would\n * silently empty that install.\n */\n\n/** Written last, so an interrupted copy simply runs again next start. */\nexport const MIGRATION_MARKER = \".migrated-from-senpi\";\n\n/** Regenerable state: caches, logs and build worktrees are rebuilt on demand. */\nconst SKIPPED_ENTRIES = new Set([\"cache\", \"logs\", \"omo-local-update\"]);\n\nfunction isSkipped(entry: string): boolean {\n\treturn SKIPPED_ENTRIES.has(entry) || entry.endsWith(\".log\");\n}\n\nexport interface BrandDirMigrationResult {\n\treadonly migrated: boolean;\n\treadonly copied: readonly string[];\n\treadonly from: string;\n\treadonly to: string;\n}\n\n/**\n * Copies engine state into the branded directory. Idempotent: entries that already exist in\n * the destination are left untouched, so a re-run after a partial copy completes it instead of\n * overwriting newer state.\n */\nexport function migrateEngineStateToBrandDir(legacyAgentDir: string, brandDir: string): BrandDirMigrationResult {\n\tconst result = { migrated: false, copied: [] as string[], from: legacyAgentDir, to: brandDir };\n\tif (!existsSync(legacyAgentDir)) return result;\n\tif (existsSync(join(brandDir, MIGRATION_MARKER))) return result;\n\tif (existsSync(join(brandDir, FLAT_LAYOUT_SENTINEL))) return result;\n\n\tlet entries: string[];\n\ttry {\n\t\tentries = readdirSync(legacyAgentDir);\n\t} catch {\n\t\treturn result;\n\t}\n\n\tmkdirSync(brandDir, { recursive: true });\n\tconst copied: string[] = [];\n\tfor (const entry of entries) {\n\t\tif (isSkipped(entry)) continue;\n\t\tconst target = join(brandDir, entry);\n\t\tif (existsSync(target)) continue;\n\t\ttry {\n\t\t\tcpSync(join(legacyAgentDir, entry), target, { recursive: true, errorOnExist: false });\n\t\t\tcopied.push(entry);\n\t\t} catch {}\n\t}\n\n\ttry {\n\t\twriteFileSync(join(brandDir, MIGRATION_MARKER), `${legacyAgentDir}\\n`);\n\t} catch {\n\t\treturn { ...result, copied };\n\t}\n\n\treturn { migrated: true, copied, from: legacyAgentDir, to: brandDir };\n}\n\n/**\n * Runs the copy-forward for the active brand, announcing it once so the user knows the two\n * installs now hold independent state.\n */\nexport function migrateEngineStateForBrand(homeDir: string = homedir()): BrandDirMigrationResult | undefined {\n\tif (!CONFIG_FLAT_LAYOUT) return undefined;\n\n\tconst result = migrateEngineStateToBrandDir(join(homeDir, \".senpi\", \"agent\"), join(homeDir, CONFIG_DIR_NAME));\n\tif (result.migrated && result.copied.length > 0) {\n\t\tconsole.log(chalk.green(`Copied existing settings from ${result.from} to ${result.to}`));\n\t\tconsole.log(chalk.dim(\"The original directory is untouched; the two installs keep separate state from now on.\"));\n\t}\n\treturn result;\n}\n"]}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature gate for the grok-neo interactive chrome.
|
|
3
|
-
*
|
|
4
|
-
* The grok chrome is experimental, so its `--grok-neo` handoff stays behind an
|
|
5
|
-
* opt-in env gate: OFF by default, the flag is absent from help and parses as
|
|
6
|
-
* an unknown extension flag, exactly as if the feature did not exist. Set
|
|
7
|
-
* `SENPI_ENABLE_GROK_NEO=1` (or `true`/`yes`) to enable it.
|
|
8
|
-
*/
|
|
9
1
|
export declare const ENV_ENABLE_GROK_NEO = "SENPI_ENABLE_GROK_NEO";
|
|
10
2
|
/** Whether the experimental grok-neo CLI flag is exposed for this process. */
|
|
11
3
|
export declare function isGrokNeoEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grok-neo-gate.d.ts","sourceRoot":"","sources":["../../src/cli/grok-neo-gate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grok-neo-gate.d.ts","sourceRoot":"","sources":["../../src/cli/grok-neo-gate.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAK9E"}
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
* The grok chrome is experimental, so its `--grok-neo` handoff stays behind an
|
|
5
5
|
* opt-in env gate: OFF by default, the flag is absent from help and parses as
|
|
6
6
|
* an unknown extension flag, exactly as if the feature did not exist. Set
|
|
7
|
-
*
|
|
7
|
+
* `<PREFIX>_ENABLE_GROK_NEO=1` (or `true`/`yes`) to enable it, where the prefix is the
|
|
8
|
+
* running product's own prefix; the legacy `SENPI_`/`PI_` names keep working.
|
|
8
9
|
*/
|
|
10
|
+
import { envValue } from "../core/brand.js";
|
|
9
11
|
export const ENV_ENABLE_GROK_NEO = "SENPI_ENABLE_GROK_NEO";
|
|
10
12
|
/** Whether the experimental grok-neo CLI flag is exposed for this process. */
|
|
11
13
|
export function isGrokNeoEnabled(env = process.env) {
|
|
12
|
-
const value = env
|
|
14
|
+
const value = envValue("ENABLE_GROK_NEO", env);
|
|
13
15
|
if (value === undefined)
|
|
14
16
|
return false;
|
|
15
17
|
const normalized = value.trim().toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grok-neo-gate.js","sourceRoot":"","sources":["../../src/cli/grok-neo-gate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"grok-neo-gate.js","sourceRoot":"","sources":["../../src/cli/grok-neo-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE3D,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACpE,MAAM,KAAK,GAAG,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IAC/C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,OAAO,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,KAAK,CAAC;AAC5E,CAAC","sourcesContent":["/**\n * Feature gate for the grok-neo interactive chrome.\n *\n * The grok chrome is experimental, so its `--grok-neo` handoff stays behind an\n * opt-in env gate: OFF by default, the flag is absent from help and parses as\n * an unknown extension flag, exactly as if the feature did not exist. Set\n * `<PREFIX>_ENABLE_GROK_NEO=1` (or `true`/`yes`) to enable it, where the prefix is the\n * running product's own prefix; the legacy `SENPI_`/`PI_` names keep working.\n */\nimport { envValue } from \"../core/brand.ts\";\n\nexport const ENV_ENABLE_GROK_NEO = \"SENPI_ENABLE_GROK_NEO\";\n\n/** Whether the experimental grok-neo CLI flag is exposed for this process. */\nexport function isGrokNeoEnabled(env: NodeJS.ProcessEnv = process.env): boolean {\n\tconst value = envValue(\"ENABLE_GROK_NEO\", env);\n\tif (value === undefined) return false;\n\tconst normalized = value.trim().toLowerCase();\n\treturn normalized === \"1\" || normalized === \"true\" || normalized === \"yes\";\n}\n"]}
|
package/dist/cli-main.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { APP_NAME } from "./config.js";
|
|
3
|
+
import { scrubBrandFromEnvironment } from "./core/brand.js";
|
|
3
4
|
import { configureHttpDispatcher } from "./core/http-dispatcher.js";
|
|
4
5
|
import { installEarlyInspectorVmImportRecovery } from "./inspector-policy.js";
|
|
5
6
|
import { main } from "./main.js";
|
|
@@ -7,6 +8,8 @@ import { main } from "./main.js";
|
|
|
7
8
|
// import rejection can fire before interactive mode registers its own crash handler.
|
|
8
9
|
installEarlyInspectorVmImportRecovery();
|
|
9
10
|
process.title = APP_NAME;
|
|
11
|
+
// The brand has been resolved for this process; nested engine runs must not inherit it.
|
|
12
|
+
scrubBrandFromEnvironment();
|
|
10
13
|
process.env.PI_CODING_AGENT = "true";
|
|
11
14
|
process.emitWarning = (() => { });
|
|
12
15
|
configureHttpDispatcher();
|
package/dist/cli-main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-main.js","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,yFAAyF;AACzF,qFAAqF;AACrF,qCAAqC,EAAE,CAAC;AAExC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;AACrC,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAE,CAAC,CAA+B,CAAC;AAE/D,uBAAuB,EAAE,CAAC;AAE1B,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { APP_NAME } from \"./config.ts\";\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { installEarlyInspectorVmImportRecovery } from \"./inspector-policy.ts\";\nimport { main } from \"./main.ts\";\n\n// Must precede the asynchronous bootstrap: with --inspect-brk, the recoverable Inspector\n// import rejection can fire before interactive mode registers its own crash handler.\ninstallEarlyInspectorVmImportRecovery();\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nconfigureHttpDispatcher();\n\nawait main(process.argv.slice(2));\n"]}
|
|
1
|
+
{"version":3,"file":"cli-main.js","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,yFAAyF;AACzF,qFAAqF;AACrF,qCAAqC,EAAE,CAAC;AAExC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC;AACzB,wFAAwF;AACxF,yBAAyB,EAAE,CAAC;AAC5B,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;AACrC,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAE,CAAC,CAA+B,CAAC;AAE/D,uBAAuB,EAAE,CAAC;AAE1B,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { APP_NAME } from \"./config.ts\";\nimport { scrubBrandFromEnvironment } from \"./core/brand.ts\";\nimport { configureHttpDispatcher } from \"./core/http-dispatcher.ts\";\nimport { installEarlyInspectorVmImportRecovery } from \"./inspector-policy.ts\";\nimport { main } from \"./main.ts\";\n\n// Must precede the asynchronous bootstrap: with --inspect-brk, the recoverable Inspector\n// import rejection can fire before interactive mode registers its own crash handler.\ninstallEarlyInspectorVmImportRecovery();\n\nprocess.title = APP_NAME;\n// The brand has been resolved for this process; nested engine runs must not inherit it.\nscrubBrandFromEnvironment();\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nconfigureHttpDispatcher();\n\nawait main(process.argv.slice(2));\n"]}
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import { spawn } from "node:child_process";
|
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
import { APP_NAME,
|
|
6
|
+
import { APP_NAME, DISPLAY_VERSION, getPackageDir } from "./config.js";
|
|
7
7
|
import { releaseInheritedInspectorForChild } from "./inspector-policy.js";
|
|
8
8
|
import { handleBootstrapSelfUpdate } from "./self-update-bootstrap.js";
|
|
9
9
|
process.title = APP_NAME;
|
|
@@ -50,7 +50,7 @@ async function runFullCli() {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
if (isRootCommand(args) && (args.includes("--version") || args.includes("-v"))) {
|
|
53
|
-
console.log(
|
|
53
|
+
console.log(DISPLAY_VERSION);
|
|
54
54
|
process.exit();
|
|
55
55
|
}
|
|
56
56
|
if (isMissingBundledWorkspaceDependencies(getPackageDir())) {
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
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AAM,CAAC,CAAC;gBAClC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACX,OAAO;YACR,CAAC;YACD,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;IAChF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AAED,IAAI,qCAAqC,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC;IAC5D,IAAI,MAAM,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,OAAO,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;AACF,CAAC;AAED,OAAO,CAAC,QAAQ,GAAG,MAAM,UAAU,EAAE,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { spawn } from \"node:child_process\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { APP_NAME, DISPLAY_VERSION, getPackageDir } from \"./config.ts\";\nimport { releaseInheritedInspectorForChild } from \"./inspector-policy.ts\";\nimport { handleBootstrapSelfUpdate } from \"./self-update-bootstrap.ts\";\n\nprocess.title = APP_NAME;\nprocess.env.PI_CODING_AGENT = \"true\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nconst args = process.argv.slice(2);\nconst PACKAGE_COMMANDS = new Set([\"install\", \"remove\", \"uninstall\", \"update\", \"list\", \"config\"]);\n\nfunction isRootCommand(args: readonly string[]): boolean {\n\tconst firstArg = args[0];\n\treturn firstArg === undefined || !PACKAGE_COMMANDS.has(firstArg);\n}\n\nfunction isPackageManagerInstall(packageDir: string): boolean {\n\treturn packageDir.replace(/\\\\/g, \"/\").includes(\"/node_modules/@code-yeongyu/senpi\");\n}\n\nfunction isMissingBundledWorkspaceDependencies(packageDir: string): boolean {\n\tif (!isPackageManagerInstall(packageDir)) {\n\t\treturn false;\n\t}\n\tconst bundledPackages = [\"pi-agent-core\", \"pi-ai\", \"pi-tui\"];\n\treturn bundledPackages.some((name) => {\n\t\treturn !existsSync(join(packageDir, \"node_modules\", \"@earendil-works\", name, \"dist\", \"index.js\"));\n\t});\n}\n\nasync function runFullCli(): Promise<number> {\n\tconst extension = import.meta.url.endsWith(\".ts\") ? \".ts\" : \".js\";\n\tconst fullCliPath = fileURLToPath(new URL(`./cli-main${extension}`, import.meta.url));\n\treleaseInheritedInspectorForChild();\n\treturn await new Promise<number>((resolve, reject) => {\n\t\tconst child = spawn(process.execPath, [...process.execArgv, fullCliPath, ...args], {\n\t\t\tenv: process.env,\n\t\t\tstdio: \"inherit\",\n\t\t});\n\t\tchild.on(\"error\", (error) => {\n\t\t\treject(error);\n\t\t});\n\t\tchild.on(\"close\", (code, signal) => {\n\t\t\tif (signal) {\n\t\t\t\tprocess.kill(process.pid, signal);\n\t\t\t\tresolve(1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresolve(code ?? 1);\n\t\t});\n\t});\n}\n\nif (isRootCommand(args) && (args.includes(\"--version\") || args.includes(\"-v\"))) {\n\tconsole.log(DISPLAY_VERSION);\n\tprocess.exit();\n}\n\nif (isMissingBundledWorkspaceDependencies(getPackageDir())) {\n\tif (await handleBootstrapSelfUpdate(args)) {\n\t\tprocess.exit();\n\t}\n}\n\nprocess.exitCode = await runFullCli();\n"]}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type BrandProfile } from "./core/brand.ts";
|
|
1
2
|
/**
|
|
2
3
|
* Detect if we're running as a Bun compiled binary.
|
|
3
4
|
* Bun binaries have import.meta.url containing "$bunfs", "~BUN", or "%7EBUN" (Bun's virtual filesystem path)
|
|
@@ -62,20 +63,45 @@ export declare function getChangelogPath(): string;
|
|
|
62
63
|
export declare function getInteractiveAssetsDir(): string;
|
|
63
64
|
/** Get path to a bundled interactive asset */
|
|
64
65
|
export declare function getBundledInteractiveAssetPath(name: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* A distribution repackaging this engine injects its brand once. The profile is consumed
|
|
68
|
+
* here - which also scrubs the variable - so every process spawned later inherits a clean
|
|
69
|
+
* environment and keeps the engine's own identity.
|
|
70
|
+
*/
|
|
71
|
+
export declare const BRAND: BrandProfile | undefined;
|
|
65
72
|
export declare const PACKAGE_NAME: string;
|
|
66
73
|
export declare const APP_NAME: string;
|
|
67
74
|
export declare const APP_TITLE: string;
|
|
68
75
|
export declare const CONFIG_DIR_NAME: string;
|
|
76
|
+
/** True when the brand stores agent state directly under the config dir, with no `agent` segment. */
|
|
77
|
+
export declare const CONFIG_FLAT_LAYOUT: boolean;
|
|
69
78
|
export declare const VERSION: string;
|
|
79
|
+
/** Version shown to users; VERSION stays the engine version used for update comparisons. */
|
|
80
|
+
export declare const DISPLAY_VERSION: string;
|
|
81
|
+
/** Primary environment prefix for this product; legacy prefixes stay readable. */
|
|
82
|
+
export declare const ENV_PREFIX: string;
|
|
70
83
|
export declare const ENV_AGENT_DIR: string;
|
|
71
84
|
export declare const ENV_SESSION_DIR: string;
|
|
72
85
|
export declare function expandTildePath(path: string): string;
|
|
73
86
|
/** Get the share viewer URL for a gist ID */
|
|
74
87
|
export declare function getShareViewerUrl(gistId: string): string;
|
|
75
|
-
/**
|
|
88
|
+
/** Marker file that identifies a flat-layout config directory. */
|
|
89
|
+
export declare const FLAT_LAYOUT_SENTINEL = "settings.json";
|
|
90
|
+
/**
|
|
91
|
+
* Resolve the agent config directory from an explicit environment.
|
|
92
|
+
*
|
|
93
|
+
* A flat-layout brand keeps its state directly under the config directory, so it looks for
|
|
94
|
+
* the settings file as proof rather than for an `agent` subdirectory - the config directory
|
|
95
|
+
* name may also be used by unrelated project tooling.
|
|
96
|
+
*/
|
|
76
97
|
export declare function resolveAgentDir(cwd: string, homeDir: string, envDir?: string): string;
|
|
77
98
|
/** Get the agent config directory (e.g., ~/.senpi/agent/) */
|
|
78
99
|
export declare function getAgentDir(): string;
|
|
100
|
+
/**
|
|
101
|
+
* Short, display-only spelling of the agent directory for help text and tips, e.g.
|
|
102
|
+
* `~/.omo` for a flat brand or `~/.senpi/agent` for the engine layout.
|
|
103
|
+
*/
|
|
104
|
+
export declare function agentDirLabel(): string;
|
|
79
105
|
/** Get path to user's custom themes directory */
|
|
80
106
|
export declare function getCustomThemesDir(): string;
|
|
81
107
|
/** Get path to models.json */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAY5E;;;GAGG;AACH,eAAO,MAAM,WAAW,SACqF,CAAC;AAE9G,gEAAgE;AAChE,eAAO,MAAM,YAAY,SAAyB,CAAC;AAMnD,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvF,UAAU,qBAAqB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC/D,KAAK,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAChC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAsC7F,wBAAgB,mBAAmB,IAAI,aAAa,CAqBnD;AAmOD,w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, sep, win32 } from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
import { createBunLauncherRepairCommand } from "./bun-global-launcher.js";
|
|
6
|
+
import { brandProfile, envValue } from "./core/brand.js";
|
|
6
7
|
import { findNearestParentConfigDir } from "./nearest-parent-config.js";
|
|
7
8
|
import { spawnProcessSync } from "./utils/child-process.js";
|
|
8
9
|
import { normalizePath } from "./utils/paths.js";
|
|
@@ -305,7 +306,7 @@ export function getUpdateInstruction(packageName) {
|
|
|
305
306
|
*/
|
|
306
307
|
export function getPackageDir() {
|
|
307
308
|
// Allow override via environment variable (useful for Nix/Guix where store paths tokenize poorly)
|
|
308
|
-
const envDir =
|
|
309
|
+
const envDir = envValue("PACKAGE_DIR");
|
|
309
310
|
if (envDir) {
|
|
310
311
|
return normalizePath(envDir);
|
|
311
312
|
}
|
|
@@ -401,37 +402,68 @@ catch (e) {
|
|
|
401
402
|
throw e;
|
|
402
403
|
}
|
|
403
404
|
const piConfigName = pkg.piConfig?.name;
|
|
405
|
+
/**
|
|
406
|
+
* A distribution repackaging this engine injects its brand once. The profile is consumed
|
|
407
|
+
* here - which also scrubs the variable - so every process spawned later inherits a clean
|
|
408
|
+
* environment and keeps the engine's own identity.
|
|
409
|
+
*/
|
|
410
|
+
export const BRAND = brandProfile();
|
|
404
411
|
export const PACKAGE_NAME = pkg.name || "@earendil-works/pi-coding-agent";
|
|
405
|
-
export const APP_NAME = piConfigName || "pi";
|
|
406
|
-
export const APP_TITLE = piConfigName ? APP_NAME : "π";
|
|
407
|
-
export const CONFIG_DIR_NAME = pkg.piConfig?.configDir || ".pi";
|
|
412
|
+
export const APP_NAME = BRAND?.name || piConfigName || "pi";
|
|
413
|
+
export const APP_TITLE = BRAND?.name || (piConfigName ? APP_NAME : "π");
|
|
414
|
+
export const CONFIG_DIR_NAME = BRAND?.configDir || pkg.piConfig?.configDir || ".pi";
|
|
415
|
+
/** True when the brand stores agent state directly under the config dir, with no `agent` segment. */
|
|
416
|
+
export const CONFIG_FLAT_LAYOUT = BRAND?.flatLayout === true;
|
|
408
417
|
export const VERSION = pkg.version || "0.0.0";
|
|
418
|
+
/** Version shown to users; VERSION stays the engine version used for update comparisons. */
|
|
419
|
+
export const DISPLAY_VERSION = BRAND?.displayVersion || VERSION;
|
|
409
420
|
// e.g., PI_CODING_AGENT_DIR or TAU_CODING_AGENT_DIR
|
|
410
|
-
|
|
411
|
-
export const
|
|
421
|
+
/** Primary environment prefix for this product; legacy prefixes stay readable. */
|
|
422
|
+
export const ENV_PREFIX = BRAND?.envPrefix || APP_NAME.toUpperCase();
|
|
423
|
+
export const ENV_AGENT_DIR = `${ENV_PREFIX}_CODING_AGENT_DIR`;
|
|
424
|
+
export const ENV_SESSION_DIR = `${ENV_PREFIX}_CODING_AGENT_SESSION_DIR`;
|
|
412
425
|
export function expandTildePath(path) {
|
|
413
426
|
return normalizePath(path);
|
|
414
427
|
}
|
|
415
428
|
const DEFAULT_SHARE_VIEWER_URL = "https://pi.dev/session/";
|
|
416
429
|
/** Get the share viewer URL for a gist ID */
|
|
417
430
|
export function getShareViewerUrl(gistId) {
|
|
418
|
-
const baseUrl =
|
|
431
|
+
const baseUrl = envValue("SHARE_VIEWER_URL") || DEFAULT_SHARE_VIEWER_URL;
|
|
419
432
|
return `${baseUrl}#${gistId}`;
|
|
420
433
|
}
|
|
421
434
|
// =============================================================================
|
|
422
435
|
// User Config Paths (~/.senpi/agent/*)
|
|
423
436
|
// =============================================================================
|
|
424
|
-
/**
|
|
437
|
+
/** Marker file that identifies a flat-layout config directory. */
|
|
438
|
+
export const FLAT_LAYOUT_SENTINEL = "settings.json";
|
|
439
|
+
/**
|
|
440
|
+
* Resolve the agent config directory from an explicit environment.
|
|
441
|
+
*
|
|
442
|
+
* A flat-layout brand keeps its state directly under the config directory, so it looks for
|
|
443
|
+
* the settings file as proof rather than for an `agent` subdirectory - the config directory
|
|
444
|
+
* name may also be used by unrelated project tooling.
|
|
445
|
+
*/
|
|
425
446
|
export function resolveAgentDir(cwd, homeDir, envDir) {
|
|
426
447
|
if (envDir) {
|
|
427
448
|
return normalizePath(envDir, { homeDir });
|
|
428
449
|
}
|
|
450
|
+
if (CONFIG_FLAT_LAYOUT) {
|
|
451
|
+
const flatProjectDir = findNearestParentConfigDir(cwd, homeDir, CONFIG_DIR_NAME, undefined, FLAT_LAYOUT_SENTINEL);
|
|
452
|
+
return flatProjectDir ?? join(homeDir, CONFIG_DIR_NAME);
|
|
453
|
+
}
|
|
429
454
|
const projectConfigDir = findNearestParentConfigDir(cwd, homeDir, CONFIG_DIR_NAME, "agent");
|
|
430
455
|
return projectConfigDir ? join(projectConfigDir, "agent") : join(homeDir, CONFIG_DIR_NAME, "agent");
|
|
431
456
|
}
|
|
432
457
|
/** Get the agent config directory (e.g., ~/.senpi/agent/) */
|
|
433
458
|
export function getAgentDir() {
|
|
434
|
-
return resolveAgentDir(process.cwd(), homedir(),
|
|
459
|
+
return resolveAgentDir(process.cwd(), homedir(), envValue("CODING_AGENT_DIR"));
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Short, display-only spelling of the agent directory for help text and tips, e.g.
|
|
463
|
+
* `~/.omo` for a flat brand or `~/.senpi/agent` for the engine layout.
|
|
464
|
+
*/
|
|
465
|
+
export function agentDirLabel() {
|
|
466
|
+
return CONFIG_FLAT_LAYOUT ? `~/${CONFIG_DIR_NAME}` : `~/${CONFIG_DIR_NAME}/agent`;
|
|
435
467
|
}
|
|
436
468
|
/** Get path to user's custom themes directory */
|
|
437
469
|
export function getCustomThemesDir() {
|