@code-yeongyu/senpi 2026.7.25-2 → 2026.7.26
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 +52 -0
- package/README.md +1 -1
- package/dist/cli/args.d.ts +4 -16
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -25
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/grok-neo-gate.d.ts +12 -0
- package/dist/cli/grok-neo-gate.d.ts.map +1 -0
- package/dist/cli/grok-neo-gate.js +18 -0
- package/dist/cli/grok-neo-gate.js.map +1 -0
- package/dist/cli-main.js +4 -0
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +2 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +33 -8
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +9 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +179 -57
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-providers.d.ts +2 -2
- package/dist/core/auth-providers.js +2 -2
- package/dist/core/auth-providers.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.js +3 -2
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +30 -2
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +28 -0
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/goal/command-registration.js +2 -2
- package/dist/core/extensions/builtin/goal/command-registration.js.map +1 -1
- package/dist/core/extensions/builtin/goal/format.d.ts +1 -1
- package/dist/core/extensions/builtin/goal/format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/format.js +9 -2
- package/dist/core/extensions/builtin/goal/format.js.map +1 -1
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +38 -23
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts +6 -0
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +19 -0
- package/dist/core/extensions/builtin/goal/lifecycle-helpers.js.map +1 -0
- package/dist/core/extensions/builtin/goal/persistence.d.ts +6 -0
- package/dist/core/extensions/builtin/goal/persistence.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/persistence.js +141 -0
- package/dist/core/extensions/builtin/goal/persistence.js.map +1 -0
- package/dist/core/extensions/builtin/goal/store.d.ts +7 -3
- package/dist/core/extensions/builtin/goal/store.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/store.js +66 -181
- package/dist/core/extensions/builtin/goal/store.js.map +1 -1
- package/dist/core/extensions/builtin/goal/tool-registration.d.ts +1 -0
- package/dist/core/extensions/builtin/goal/tool-registration.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/tool-registration.js +26 -15
- package/dist/core/extensions/builtin/goal/tool-registration.js.map +1 -1
- package/dist/core/extensions/builtin/goal/transitions.d.ts +3 -0
- package/dist/core/extensions/builtin/goal/transitions.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/transitions.js +45 -0
- package/dist/core/extensions/builtin/goal/transitions.js.map +1 -0
- package/dist/core/extensions/builtin/goal/types.d.ts +10 -4
- package/dist/core/extensions/builtin/goal/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/types.js +2 -2
- package/dist/core/extensions/builtin/goal/types.js.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/ui.js +2 -0
- package/dist/core/extensions/builtin/goal/ui.js.map +1 -1
- package/dist/core/extensions/builtin/goal/validation.d.ts +8 -1
- package/dist/core/extensions/builtin/goal/validation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/validation.js +24 -12
- package/dist/core/extensions/builtin/goal/validation.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +0 -2
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/index.js +8 -5
- package/dist/core/extensions/builtin/mcp/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +1 -0
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/extension.js +32 -0
- package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/index.d.ts +1 -1
- package/dist/core/extensions/builtin/terminal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/index.js +1 -1
- package/dist/core/extensions/builtin/terminal/index.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/monitor-notify.d.ts +29 -0
- package/dist/core/extensions/builtin/terminal/monitor-notify.d.ts.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-notify.js +185 -0
- package/dist/core/extensions/builtin/terminal/monitor-notify.js.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts +35 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.js +98 -0
- package/dist/core/extensions/builtin/terminal/monitor-registry.js.map +1 -0
- package/dist/core/extensions/builtin/terminal/notify.d.ts +9 -0
- package/dist/core/extensions/builtin/terminal/notify.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/notify.js +30 -14
- package/dist/core/extensions/builtin/terminal/notify.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/prompt.d.ts +1 -1
- package/dist/core/extensions/builtin/terminal/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/prompt.js +13 -5
- package/dist/core/extensions/builtin/terminal/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts +3 -12
- package/dist/core/extensions/builtin/terminal/runtime-session.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/runtime-session.js +4 -59
- package/dist/core/extensions/builtin/terminal/runtime-session.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/settings.d.ts +8 -0
- package/dist/core/extensions/builtin/terminal/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/settings.js +16 -2
- package/dist/core/extensions/builtin/terminal/settings.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/shared.d.ts +2 -2
- package/dist/core/extensions/builtin/terminal/shared.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/shared.js +2 -1
- package/dist/core/extensions/builtin/terminal/shared.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/bash-output.d.ts +10 -4
- package/dist/core/extensions/builtin/terminal/tools/bash-output.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/bash-output.js +17 -96
- package/dist/core/extensions/builtin/terminal/tools/bash-output.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.d.ts +7 -0
- package/dist/core/extensions/builtin/terminal/tools/context.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/context.js.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts +41 -0
- package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -0
- package/dist/core/extensions/builtin/terminal/tools/monitor.js +97 -0
- package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -0
- package/dist/core/extensions/builtin/terminal/tools/render.d.ts +3 -0
- package/dist/core/extensions/builtin/terminal/tools/render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/terminal/tools/render.js +5 -2
- package/dist/core/extensions/builtin/terminal/tools/render.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/fuzzy-match.d.ts +19 -0
- package/dist/core/extensions/builtin/todotools/fuzzy-match.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/fuzzy-match.js +70 -0
- package/dist/core/extensions/builtin/todotools/fuzzy-match.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/normalize.d.ts +8 -0
- package/dist/core/extensions/builtin/todotools/normalize.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/normalize.js +174 -0
- package/dist/core/extensions/builtin/todotools/normalize.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/prompt.d.ts +2 -2
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.js +4 -2
- package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts +9 -8
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js +99 -48
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todo.js +65 -38
- package/dist/core/extensions/builtin/todotools/tools/todo.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +12 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +5 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +12 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +23 -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 +0 -5
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -2
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts +32 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +91 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-resolver.d.ts +9 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +4 -3
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/resource-loader.d.ts +9 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +10 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/retry-fallback/cooldown.d.ts.map +1 -1
- package/dist/core/retry-fallback/cooldown.js +5 -0
- package/dist/core/retry-fallback/cooldown.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +11 -35
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +5 -16
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +0 -13
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/timings.d.ts +7 -2
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +11 -0
- package/dist/core/timings.js.map +1 -1
- package/dist/inspector-policy.d.ts +22 -0
- package/dist/inspector-policy.d.ts.map +1 -0
- package/dist/inspector-policy.js +84 -0
- package/dist/inspector-policy.js.map +1 -0
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -23
- package/dist/main.js.map +1 -1
- package/dist/modes/app-server/runtime.d.ts.map +1 -1
- package/dist/modes/app-server/runtime.js +1 -0
- package/dist/modes/app-server/runtime.js.map +1 -1
- package/dist/modes/app-server/threads/goal-handlers.js +4 -2
- package/dist/modes/app-server/threads/goal-handlers.js.map +1 -1
- package/dist/modes/app-server/threads/goal-wire.d.ts.map +1 -1
- package/dist/modes/app-server/threads/goal-wire.js +1 -0
- package/dist/modes/app-server/threads/goal-wire.js.map +1 -1
- package/dist/modes/app-server/threads/handlers.d.ts +1 -0
- package/dist/modes/app-server/threads/handlers.d.ts.map +1 -1
- package/dist/modes/app-server/threads/handlers.js +2 -0
- package/dist/modes/app-server/threads/handlers.js.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.d.ts +1 -0
- package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
- package/dist/modes/app-server/threads/turns.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turns.js +47 -3
- package/dist/modes/app-server/threads/turns.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +29 -4
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +5 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +43 -17
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/grok/chrome-tokens.d.ts +22 -0
- package/dist/modes/interactive/grok/chrome-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/grok/chrome-tokens.js +27 -0
- package/dist/modes/interactive/grok/chrome-tokens.js.map +1 -0
- package/dist/modes/interactive/grok/chrome.d.ts +51 -0
- package/dist/modes/interactive/grok/chrome.d.ts.map +1 -0
- package/dist/modes/interactive/grok/chrome.js +105 -0
- package/dist/modes/interactive/grok/chrome.js.map +1 -0
- package/dist/modes/interactive/grok/footer.d.ts +14 -0
- package/dist/modes/interactive/grok/footer.d.ts.map +1 -0
- package/dist/modes/interactive/grok/footer.js +27 -0
- package/dist/modes/interactive/grok/footer.js.map +1 -0
- package/dist/modes/interactive/grok/input-card.d.ts +9 -0
- package/dist/modes/interactive/grok/input-card.d.ts.map +1 -0
- package/dist/modes/interactive/grok/input-card.js +30 -0
- package/dist/modes/interactive/grok/input-card.js.map +1 -0
- package/dist/modes/interactive/grok/palette.d.ts +145 -0
- package/dist/modes/interactive/grok/palette.d.ts.map +1 -0
- package/dist/modes/interactive/grok/palette.js +92 -0
- package/dist/modes/interactive/grok/palette.js.map +1 -0
- package/dist/modes/interactive/grok/tool-row.d.ts +17 -0
- package/dist/modes/interactive/grok/tool-row.d.ts.map +1 -0
- package/dist/modes/interactive/grok/tool-row.js +26 -0
- package/dist/modes/interactive/grok/tool-row.js.map +1 -0
- package/dist/modes/interactive/grok/welcome-card.d.ts +10 -0
- package/dist/modes/interactive/grok/welcome-card.d.ts.map +1 -0
- package/dist/modes/interactive/grok/welcome-card.js +30 -0
- package/dist/modes/interactive/grok/welcome-card.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +108 -52
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/grok-day.json +77 -0
- package/dist/modes/interactive/theme/grok-night.json +93 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +4 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts +3 -3
- package/dist/modes/rpc/connection-handler.js +6 -6
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/custom-capability.d.ts +6 -7
- package/dist/modes/rpc/custom-capability.d.ts.map +1 -1
- package/dist/modes/rpc/custom-capability.js +6 -7
- package/dist/modes/rpc/custom-capability.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +2 -2
- package/dist/modes/rpc/rpc-mode.js +5 -5
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/senpi +2 -0
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +1 -0
- package/docs/grok-neo.md +77 -0
- package/docs/keybindings.md +0 -1
- package/docs/settings.md +3 -3
- package/docs/terminal-tools.md +6 -3
- package/docs/usage.md +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +39 -19
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +3 -3
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridge/http-server.ts +6 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/output-bridge.ts +0 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/eval-notifier.ts +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +46 -66
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/context-manager.ts +5 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel-contract.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel.ts +19 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/prelude.py +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/subprocess-kernel.ts +8 -5
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +23 -5
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +322 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +253 -18
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/interrupt-note.ts +58 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +28 -6
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/status-events.ts +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +65 -22
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +4 -41
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts +10 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js +38 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +5 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +135 -16
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.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 +1 -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/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +2 -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-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 +67 -31
- 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.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.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/openrouter.json +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 +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/stop-details.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/stop-details.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/stop-details.js +7 -3
- package/node_modules/@earendil-works/pi-ai/dist/utils/stop-details.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-call-id.d.ts +9 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-call-id.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-call-id.js +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-call-id.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +35 -3
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +32 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +15 -7
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +8 -8
- package/dist/cli/neo/build-argv.d.ts +0 -19
- package/dist/cli/neo/build-argv.d.ts.map +0 -1
- package/dist/cli/neo/build-argv.js +0 -84
- package/dist/cli/neo/build-argv.js.map +0 -1
- package/dist/cli/neo/daemon-launch.d.ts +0 -25
- package/dist/cli/neo/daemon-launch.d.ts.map +0 -1
- package/dist/cli/neo/daemon-launch.js +0 -97
- package/dist/cli/neo/daemon-launch.js.map +0 -1
- package/dist/cli/neo/gate.d.ts +0 -15
- package/dist/cli/neo/gate.d.ts.map +0 -1
- package/dist/cli/neo/gate.js +0 -21
- package/dist/cli/neo/gate.js.map +0 -1
- package/dist/cli/neo/launch.d.ts +0 -24
- package/dist/cli/neo/launch.d.ts.map +0 -1
- package/dist/cli/neo/launch.js +0 -66
- package/dist/cli/neo/launch.js.map +0 -1
- package/dist/cli/neo/platform.d.ts +0 -38
- package/dist/cli/neo/platform.d.ts.map +0 -1
- package/dist/cli/neo/platform.js +0 -54
- package/dist/cli/neo/platform.js.map +0 -1
- package/dist/cli/neo/resolve-binary.d.ts +0 -39
- package/dist/cli/neo/resolve-binary.d.ts.map +0 -1
- package/dist/cli/neo/resolve-binary.js +0 -66
- package/dist/cli/neo/resolve-binary.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/index.d.ts +0 -5
- package/dist/core/extensions/builtin/session-observer/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/index.js +0 -36
- package/dist/core/extensions/builtin/session-observer/index.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/loader.d.ts +0 -3
- package/dist/core/extensions/builtin/session-observer/loader.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/loader.js +0 -20
- package/dist/core/extensions/builtin/session-observer/loader.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.d.ts +0 -7
- package/dist/core/extensions/builtin/session-observer/overlay-format.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.js +0 -30
- package/dist/core/extensions/builtin/session-observer/overlay-format.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/overlay.d.ts +0 -51
- package/dist/core/extensions/builtin/session-observer/overlay.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/overlay.js +0 -229
- package/dist/core/extensions/builtin/session-observer/overlay.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/scanner.d.ts +0 -10
- package/dist/core/extensions/builtin/session-observer/scanner.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/scanner.js +0 -142
- package/dist/core/extensions/builtin/session-observer/scanner.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/text.d.ts +0 -7
- package/dist/core/extensions/builtin/session-observer/text.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/text.js +0 -37
- package/dist/core/extensions/builtin/session-observer/text.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.d.ts +0 -7
- package/dist/core/extensions/builtin/session-observer/transcript-entries.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.js +0 -71
- package/dist/core/extensions/builtin/session-observer/transcript-entries.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.d.ts +0 -11
- package/dist/core/extensions/builtin/session-observer/transcript-format.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.js +0 -65
- package/dist/core/extensions/builtin/session-observer/transcript-format.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/transcript.d.ts +0 -4
- package/dist/core/extensions/builtin/session-observer/transcript.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/transcript.js +0 -81
- package/dist/core/extensions/builtin/session-observer/transcript.js.map +0 -1
- package/dist/core/extensions/builtin/session-observer/types.d.ts +0 -33
- package/dist/core/extensions/builtin/session-observer/types.d.ts.map +0 -1
- package/dist/core/extensions/builtin/session-observer/types.js +0 -2
- package/dist/core/extensions/builtin/session-observer/types.js.map +0 -1
- package/dist/modes/rpc/neo-daemon-child-worker.d.ts +0 -29
- package/dist/modes/rpc/neo-daemon-child-worker.d.ts.map +0 -1
- package/dist/modes/rpc/neo-daemon-child-worker.js +0 -95
- package/dist/modes/rpc/neo-daemon-child-worker.js.map +0 -1
- package/dist/modes/rpc/neo-daemon-mode.d.ts +0 -110
- package/dist/modes/rpc/neo-daemon-mode.d.ts.map +0 -1
- package/dist/modes/rpc/neo-daemon-mode.js +0 -267
- package/dist/modes/rpc/neo-daemon-mode.js.map +0 -1
- package/dist/modes/rpc/neo-daemon-protocol.d.ts +0 -50
- package/dist/modes/rpc/neo-daemon-protocol.d.ts.map +0 -1
- package/dist/modes/rpc/neo-daemon-protocol.js +0 -66
- package/dist/modes/rpc/neo-daemon-protocol.js.map +0 -1
- package/dist/modes/rpc/neo-daemon-registry.d.ts +0 -98
- package/dist/modes/rpc/neo-daemon-registry.d.ts.map +0 -1
- package/dist/modes/rpc/neo-daemon-registry.js +0 -209
- package/dist/modes/rpc/neo-daemon-registry.js.map +0 -1
- package/dist/modes/rpc/neo-runtime-options-argv.d.ts +0 -17
- package/dist/modes/rpc/neo-runtime-options-argv.d.ts.map +0 -1
- package/dist/modes/rpc/neo-runtime-options-argv.js +0 -79
- package/dist/modes/rpc/neo-runtime-options-argv.js.map +0 -1
- package/dist/modes/rpc/neo-runtime-options.d.ts +0 -84
- package/dist/modes/rpc/neo-runtime-options.d.ts.map +0 -1
- package/dist/modes/rpc/neo-runtime-options.js +0 -92
- package/dist/modes/rpc/neo-runtime-options.js.map +0 -1
- package/docs/neo.md +0 -111
- package/node_modules/@code-yeongyu/senpi-codemode/src/codemode/runtime.ts +0 -258
- package/node_modules/@code-yeongyu/senpi-codemode/src/codemode/tools.ts +0 -106
package/dist/cli/neo/launch.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Launch the neo (Go-native) TUI as a child process and hand the terminal to it.
|
|
3
|
-
*
|
|
4
|
-
* The launcher resolves the platform binary, spawns it with inherited stdio so
|
|
5
|
-
* the Go TUI owns the terminal directly, forwards the signals a TUI cares about
|
|
6
|
-
* (SIGINT/SIGTERM/SIGWINCH), and propagates the child's exit code — or, if the
|
|
7
|
-
* child died from a signal, re-raises that signal on this process so the parent
|
|
8
|
-
* shell observes the same termination the classic path would produce.
|
|
9
|
-
*/
|
|
10
|
-
import { spawn } from "node:child_process";
|
|
11
|
-
import type { Args } from "../args.ts";
|
|
12
|
-
export interface NeoLauncherDeps {
|
|
13
|
-
/** Injectable for tests; defaults to node:child_process spawn. */
|
|
14
|
-
readonly spawnFn?: typeof spawn;
|
|
15
|
-
/** Injectable sink for the actionable resolution error; defaults to console.error. */
|
|
16
|
-
readonly errorSink?: (message: string) => void;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Resolve + spawn the neo binary. Resolves to the exit code the launcher process
|
|
20
|
-
* should adopt. On a fatal resolution error, prints a single actionable message
|
|
21
|
-
* (no stack) and resolves to 1 so the caller can exit cleanly.
|
|
22
|
-
*/
|
|
23
|
-
export declare function runNeoLauncher(parsed: Args, deps?: NeoLauncherDeps): Promise<number>;
|
|
24
|
-
//# sourceMappingURL=launch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../src/cli/neo/launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAQvC,MAAM,WAAW,eAAe;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IAChC,sFAAsF;IACtF,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAc9F"}
|
package/dist/cli/neo/launch.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Launch the neo (Go-native) TUI as a child process and hand the terminal to it.
|
|
3
|
-
*
|
|
4
|
-
* The launcher resolves the platform binary, spawns it with inherited stdio so
|
|
5
|
-
* the Go TUI owns the terminal directly, forwards the signals a TUI cares about
|
|
6
|
-
* (SIGINT/SIGTERM/SIGWINCH), and propagates the child's exit code — or, if the
|
|
7
|
-
* child died from a signal, re-raises that signal on this process so the parent
|
|
8
|
-
* shell observes the same termination the classic path would produce.
|
|
9
|
-
*/
|
|
10
|
-
import { spawn } from "node:child_process";
|
|
11
|
-
import { buildNeoArgv } from "./build-argv.js";
|
|
12
|
-
import { resolveNeoBinary } from "./resolve-binary.js";
|
|
13
|
-
/** Signals forwarded from the launcher to the neo child while it runs. */
|
|
14
|
-
const FORWARDED_SIGNALS = ["SIGINT", "SIGTERM", "SIGWINCH"];
|
|
15
|
-
/**
|
|
16
|
-
* Resolve + spawn the neo binary. Resolves to the exit code the launcher process
|
|
17
|
-
* should adopt. On a fatal resolution error, prints a single actionable message
|
|
18
|
-
* (no stack) and resolves to 1 so the caller can exit cleanly.
|
|
19
|
-
*/
|
|
20
|
-
export async function runNeoLauncher(parsed, deps = {}) {
|
|
21
|
-
const spawnFn = deps.spawnFn ?? spawn;
|
|
22
|
-
const errorSink = deps.errorSink ?? ((message) => console.error(message));
|
|
23
|
-
const resolution = resolveNeoBinary({ devBinPath: parsed.neoBin });
|
|
24
|
-
if (!resolution.ok) {
|
|
25
|
-
errorSink(resolution.message);
|
|
26
|
-
return 1;
|
|
27
|
-
}
|
|
28
|
-
const argv = buildNeoArgv(parsed, { isolated: parsed.neoIsolated === true });
|
|
29
|
-
const child = spawnFn(resolution.path, argv, { stdio: "inherit" });
|
|
30
|
-
return await superviseNeoChild(child);
|
|
31
|
-
}
|
|
32
|
-
function superviseNeoChild(child) {
|
|
33
|
-
return new Promise((resolve, reject) => {
|
|
34
|
-
const forwarders = new Map();
|
|
35
|
-
for (const signal of FORWARDED_SIGNALS) {
|
|
36
|
-
const forward = () => {
|
|
37
|
-
// Best-effort: the child may already be gone.
|
|
38
|
-
child.kill(signal);
|
|
39
|
-
};
|
|
40
|
-
forwarders.set(signal, forward);
|
|
41
|
-
process.on(signal, forward);
|
|
42
|
-
}
|
|
43
|
-
const cleanup = () => {
|
|
44
|
-
for (const [signal, forward] of forwarders) {
|
|
45
|
-
process.removeListener(signal, forward);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
child.on("error", (error) => {
|
|
49
|
-
cleanup();
|
|
50
|
-
reject(error);
|
|
51
|
-
});
|
|
52
|
-
child.on("close", (code, signal) => {
|
|
53
|
-
cleanup();
|
|
54
|
-
if (signal) {
|
|
55
|
-
// Re-raise the child's terminating signal so the parent shell sees the
|
|
56
|
-
// same cause of death. Node's default disposition then ends this process.
|
|
57
|
-
process.kill(process.pid, signal);
|
|
58
|
-
// If we're still alive (signal was intercepted), fall back to a code.
|
|
59
|
-
resolve(1);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
resolve(code ?? 1);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=launch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../src/cli/neo/launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,0EAA0E;AAC1E,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AAUrE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAY,EAAE,IAAI,GAAoB,EAAE;IAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC;IACtC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAElF,MAAM,UAAU,GAAG,gBAAgB,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACnE,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QACpB,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC9B,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC,CAAC;IAC7E,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAEnE,OAAO,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAmB;IAC7C,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC9C,MAAM,UAAU,GAAG,IAAI,GAAG,EAA+B,CAAC;QAC1D,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE,CAAC;YACxC,MAAM,OAAO,GAAG,GAAG,EAAE;gBACpB,8CAA8C;gBAC9C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC,CAAC;YACF,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAChC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,CAAC;QAED,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,UAAU,EAAE,CAAC;gBAC5C,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACzC,CAAC;QACF,CAAC,CAAC;QAEF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YAC3B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,KAAK,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YAClC,OAAO,EAAE,CAAC;YACV,IAAI,MAAM,EAAE,CAAC;gBACZ,uEAAuE;gBACvE,0EAA0E;gBAC1E,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;gBAClC,sEAAsE;gBACtE,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","sourcesContent":["/**\n * Launch the neo (Go-native) TUI as a child process and hand the terminal to it.\n *\n * The launcher resolves the platform binary, spawns it with inherited stdio so\n * the Go TUI owns the terminal directly, forwards the signals a TUI cares about\n * (SIGINT/SIGTERM/SIGWINCH), and propagates the child's exit code — or, if the\n * child died from a signal, re-raises that signal on this process so the parent\n * shell observes the same termination the classic path would produce.\n */\n\nimport { type ChildProcess, spawn } from \"node:child_process\";\nimport type { Args } from \"../args.ts\";\nimport { buildNeoArgv } from \"./build-argv.ts\";\nimport { resolveNeoBinary } from \"./resolve-binary.ts\";\n\n/** Signals forwarded from the launcher to the neo child while it runs. */\nconst FORWARDED_SIGNALS = [\"SIGINT\", \"SIGTERM\", \"SIGWINCH\"] as const;\ntype ForwardedSignal = (typeof FORWARDED_SIGNALS)[number];\n\nexport interface NeoLauncherDeps {\n\t/** Injectable for tests; defaults to node:child_process spawn. */\n\treadonly spawnFn?: typeof spawn;\n\t/** Injectable sink for the actionable resolution error; defaults to console.error. */\n\treadonly errorSink?: (message: string) => void;\n}\n\n/**\n * Resolve + spawn the neo binary. Resolves to the exit code the launcher process\n * should adopt. On a fatal resolution error, prints a single actionable message\n * (no stack) and resolves to 1 so the caller can exit cleanly.\n */\nexport async function runNeoLauncher(parsed: Args, deps: NeoLauncherDeps = {}): Promise<number> {\n\tconst spawnFn = deps.spawnFn ?? spawn;\n\tconst errorSink = deps.errorSink ?? ((message: string) => console.error(message));\n\n\tconst resolution = resolveNeoBinary({ devBinPath: parsed.neoBin });\n\tif (!resolution.ok) {\n\t\terrorSink(resolution.message);\n\t\treturn 1;\n\t}\n\n\tconst argv = buildNeoArgv(parsed, { isolated: parsed.neoIsolated === true });\n\tconst child = spawnFn(resolution.path, argv, { stdio: \"inherit\" });\n\n\treturn await superviseNeoChild(child);\n}\n\nfunction superviseNeoChild(child: ChildProcess): Promise<number> {\n\treturn new Promise<number>((resolve, reject) => {\n\t\tconst forwarders = new Map<ForwardedSignal, () => void>();\n\t\tfor (const signal of FORWARDED_SIGNALS) {\n\t\t\tconst forward = () => {\n\t\t\t\t// Best-effort: the child may already be gone.\n\t\t\t\tchild.kill(signal);\n\t\t\t};\n\t\t\tforwarders.set(signal, forward);\n\t\t\tprocess.on(signal, forward);\n\t\t}\n\n\t\tconst cleanup = () => {\n\t\t\tfor (const [signal, forward] of forwarders) {\n\t\t\t\tprocess.removeListener(signal, forward);\n\t\t\t}\n\t\t};\n\n\t\tchild.on(\"error\", (error) => {\n\t\t\tcleanup();\n\t\t\treject(error);\n\t\t});\n\n\t\tchild.on(\"close\", (code, signal) => {\n\t\t\tcleanup();\n\t\t\tif (signal) {\n\t\t\t\t// Re-raise the child's terminating signal so the parent shell sees the\n\t\t\t\t// same cause of death. Node's default disposition then ends this process.\n\t\t\t\tprocess.kill(process.pid, signal);\n\t\t\t\t// If we're still alive (signal was intercepted), fall back to a code.\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"]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared platform/arch mapping for the neo (Go TUI) distribution.
|
|
3
|
-
*
|
|
4
|
-
* The neo binary ships as per-platform npm packages named
|
|
5
|
-
* `@code-yeongyu/senpi-neo-tui-<platform>-<arch>`. This module is the SINGLE
|
|
6
|
-
* source of truth for how Node's `process.platform`/`process.arch` map to the
|
|
7
|
-
* package-name spellings, and is consumed both by the `--neo` launcher (this
|
|
8
|
-
* package) and by the cross-compile / packaging pipeline. Keep it dependency-free
|
|
9
|
-
* so both sides can import it without pulling in runtime state.
|
|
10
|
-
*
|
|
11
|
-
* Note: package names use the npm spellings (`windows`, `x64`), NOT the Go
|
|
12
|
-
* toolchain spellings (`amd64`). The GOARCH `amd64` translation lives on the
|
|
13
|
-
* build side only.
|
|
14
|
-
*/
|
|
15
|
-
export type NeoPlatform = "darwin" | "linux" | "windows";
|
|
16
|
-
export type NeoArch = "x64" | "arm64";
|
|
17
|
-
/** Package scope + base name for the neo distribution. */
|
|
18
|
-
export declare const NEO_PACKAGE_SCOPE = "@code-yeongyu";
|
|
19
|
-
export declare const NEO_PACKAGE_BASE = "senpi-neo-tui";
|
|
20
|
-
export interface NeoTarget {
|
|
21
|
-
readonly platform: NeoPlatform;
|
|
22
|
-
readonly arch: NeoArch;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Map a Node `process.platform`/`process.arch` pair to a neo target, or return
|
|
26
|
-
* undefined when the current host is not a supported neo target.
|
|
27
|
-
*/
|
|
28
|
-
export declare function resolveNeoTarget(nodePlatform: string, nodeArch: string): NeoTarget | undefined;
|
|
29
|
-
/** Full package name for a neo target, e.g. `@code-yeongyu/senpi-neo-tui-darwin-arm64`. */
|
|
30
|
-
export declare function neoPackageName(target: NeoTarget): string;
|
|
31
|
-
/** Binary basename inside the platform package (`.exe` on Windows). */
|
|
32
|
-
export declare function neoBinaryFilename(platform: NeoPlatform): string;
|
|
33
|
-
/**
|
|
34
|
-
* The `require.resolve` sub-path for a target's binary inside its platform
|
|
35
|
-
* package, e.g. `@code-yeongyu/senpi-neo-tui-linux-x64/bin/senpi-neo`.
|
|
36
|
-
*/
|
|
37
|
-
export declare function neoBinaryRequirePath(target: NeoTarget): string;
|
|
38
|
-
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/cli/neo/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AACzD,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AAEtC,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AACjD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAahD,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAO9F;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAExD;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAE/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAE9D"}
|
package/dist/cli/neo/platform.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared platform/arch mapping for the neo (Go TUI) distribution.
|
|
3
|
-
*
|
|
4
|
-
* The neo binary ships as per-platform npm packages named
|
|
5
|
-
* `@code-yeongyu/senpi-neo-tui-<platform>-<arch>`. This module is the SINGLE
|
|
6
|
-
* source of truth for how Node's `process.platform`/`process.arch` map to the
|
|
7
|
-
* package-name spellings, and is consumed both by the `--neo` launcher (this
|
|
8
|
-
* package) and by the cross-compile / packaging pipeline. Keep it dependency-free
|
|
9
|
-
* so both sides can import it without pulling in runtime state.
|
|
10
|
-
*
|
|
11
|
-
* Note: package names use the npm spellings (`windows`, `x64`), NOT the Go
|
|
12
|
-
* toolchain spellings (`amd64`). The GOARCH `amd64` translation lives on the
|
|
13
|
-
* build side only.
|
|
14
|
-
*/
|
|
15
|
-
/** Package scope + base name for the neo distribution. */
|
|
16
|
-
export const NEO_PACKAGE_SCOPE = "@code-yeongyu";
|
|
17
|
-
export const NEO_PACKAGE_BASE = "senpi-neo-tui";
|
|
18
|
-
const PLATFORM_MAP = {
|
|
19
|
-
win32: "windows",
|
|
20
|
-
darwin: "darwin",
|
|
21
|
-
linux: "linux",
|
|
22
|
-
};
|
|
23
|
-
const ARCH_MAP = {
|
|
24
|
-
x64: "x64",
|
|
25
|
-
arm64: "arm64",
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Map a Node `process.platform`/`process.arch` pair to a neo target, or return
|
|
29
|
-
* undefined when the current host is not a supported neo target.
|
|
30
|
-
*/
|
|
31
|
-
export function resolveNeoTarget(nodePlatform, nodeArch) {
|
|
32
|
-
const platform = PLATFORM_MAP[nodePlatform];
|
|
33
|
-
const arch = ARCH_MAP[nodeArch];
|
|
34
|
-
if (platform === undefined || arch === undefined) {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
return { platform, arch };
|
|
38
|
-
}
|
|
39
|
-
/** Full package name for a neo target, e.g. `@code-yeongyu/senpi-neo-tui-darwin-arm64`. */
|
|
40
|
-
export function neoPackageName(target) {
|
|
41
|
-
return `${NEO_PACKAGE_SCOPE}/${NEO_PACKAGE_BASE}-${target.platform}-${target.arch}`;
|
|
42
|
-
}
|
|
43
|
-
/** Binary basename inside the platform package (`.exe` on Windows). */
|
|
44
|
-
export function neoBinaryFilename(platform) {
|
|
45
|
-
return platform === "windows" ? "senpi-neo.exe" : "senpi-neo";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* The `require.resolve` sub-path for a target's binary inside its platform
|
|
49
|
-
* package, e.g. `@code-yeongyu/senpi-neo-tui-linux-x64/bin/senpi-neo`.
|
|
50
|
-
*/
|
|
51
|
-
export function neoBinaryRequirePath(target) {
|
|
52
|
-
return `${neoPackageName(target)}/bin/${neoBinaryFilename(target.platform)}`;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=platform.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../src/cli/neo/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEhD,MAAM,YAAY,GAA0C;IAC3D,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACd,CAAC;AAEF,MAAM,QAAQ,GAAsC;IACnD,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;CACd,CAAC;AAOF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,YAAoB,EAAE,QAAgB;IACtE,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChC,IAAI,QAAQ,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAClD,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,cAAc,CAAC,MAAiB;IAC/C,OAAO,GAAG,iBAAiB,IAAI,gBAAgB,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;AACrF,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,QAAqB;IACtD,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACrD,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,QAAQ,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC9E,CAAC","sourcesContent":["/**\n * Shared platform/arch mapping for the neo (Go TUI) distribution.\n *\n * The neo binary ships as per-platform npm packages named\n * `@code-yeongyu/senpi-neo-tui-<platform>-<arch>`. This module is the SINGLE\n * source of truth for how Node's `process.platform`/`process.arch` map to the\n * package-name spellings, and is consumed both by the `--neo` launcher (this\n * package) and by the cross-compile / packaging pipeline. Keep it dependency-free\n * so both sides can import it without pulling in runtime state.\n *\n * Note: package names use the npm spellings (`windows`, `x64`), NOT the Go\n * toolchain spellings (`amd64`). The GOARCH `amd64` translation lives on the\n * build side only.\n */\n\nexport type NeoPlatform = \"darwin\" | \"linux\" | \"windows\";\nexport type NeoArch = \"x64\" | \"arm64\";\n\n/** Package scope + base name for the neo distribution. */\nexport const NEO_PACKAGE_SCOPE = \"@code-yeongyu\";\nexport const NEO_PACKAGE_BASE = \"senpi-neo-tui\";\n\nconst PLATFORM_MAP: Readonly<Record<string, NeoPlatform>> = {\n\twin32: \"windows\",\n\tdarwin: \"darwin\",\n\tlinux: \"linux\",\n};\n\nconst ARCH_MAP: Readonly<Record<string, NeoArch>> = {\n\tx64: \"x64\",\n\tarm64: \"arm64\",\n};\n\nexport interface NeoTarget {\n\treadonly platform: NeoPlatform;\n\treadonly arch: NeoArch;\n}\n\n/**\n * Map a Node `process.platform`/`process.arch` pair to a neo target, or return\n * undefined when the current host is not a supported neo target.\n */\nexport function resolveNeoTarget(nodePlatform: string, nodeArch: string): NeoTarget | undefined {\n\tconst platform = PLATFORM_MAP[nodePlatform];\n\tconst arch = ARCH_MAP[nodeArch];\n\tif (platform === undefined || arch === undefined) {\n\t\treturn undefined;\n\t}\n\treturn { platform, arch };\n}\n\n/** Full package name for a neo target, e.g. `@code-yeongyu/senpi-neo-tui-darwin-arm64`. */\nexport function neoPackageName(target: NeoTarget): string {\n\treturn `${NEO_PACKAGE_SCOPE}/${NEO_PACKAGE_BASE}-${target.platform}-${target.arch}`;\n}\n\n/** Binary basename inside the platform package (`.exe` on Windows). */\nexport function neoBinaryFilename(platform: NeoPlatform): string {\n\treturn platform === \"windows\" ? \"senpi-neo.exe\" : \"senpi-neo\";\n}\n\n/**\n * The `require.resolve` sub-path for a target's binary inside its platform\n * package, e.g. `@code-yeongyu/senpi-neo-tui-linux-x64/bin/senpi-neo`.\n */\nexport function neoBinaryRequirePath(target: NeoTarget): string {\n\treturn `${neoPackageName(target)}/bin/${neoBinaryFilename(target.platform)}`;\n}\n"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the neo (Go TUI) binary for the current host.
|
|
3
|
-
*
|
|
4
|
-
* Resolution order (first hit wins):
|
|
5
|
-
* 1. SENPI_NEO_BIN env override (dev / packagers) — used as-is.
|
|
6
|
-
* 2. `--neo-bin <path>` dev override (passed in explicitly by the launcher).
|
|
7
|
-
* 3. require.resolve of the per-platform package
|
|
8
|
-
* `@code-yeongyu/senpi-neo-tui-<platform>-<arch>/bin/senpi-neo[.exe]`,
|
|
9
|
-
* tried from both this module's resolution root and the installed
|
|
10
|
-
* executable's directory (mirrors the clipboard-native optional-dep
|
|
11
|
-
* precedent in utils/clipboard-native.ts).
|
|
12
|
-
*
|
|
13
|
-
* On failure, returns a single actionable error message (no stack trace) so the
|
|
14
|
-
* launcher can print it and exit 1.
|
|
15
|
-
*/
|
|
16
|
-
type NeoRequire = (id: string) => string;
|
|
17
|
-
export type NeoBinaryResolution = {
|
|
18
|
-
readonly ok: true;
|
|
19
|
-
readonly path: string;
|
|
20
|
-
readonly source: "env" | "dev-flag" | "package";
|
|
21
|
-
} | {
|
|
22
|
-
readonly ok: false;
|
|
23
|
-
readonly message: string;
|
|
24
|
-
};
|
|
25
|
-
export interface ResolveNeoBinaryOptions {
|
|
26
|
-
/** Explicit dev override from `--neo-bin` (takes precedence over package resolution). */
|
|
27
|
-
readonly devBinPath?: string;
|
|
28
|
-
/** Value of SENPI_NEO_BIN (highest precedence). Defaults to process.env at call time. */
|
|
29
|
-
readonly envBinPath?: string;
|
|
30
|
-
/** Overridable for tests: defaults to process.platform. */
|
|
31
|
-
readonly nodePlatform?: string;
|
|
32
|
-
/** Overridable for tests: defaults to process.arch. */
|
|
33
|
-
readonly nodeArch?: string;
|
|
34
|
-
/** Overridable for tests: resolution roots tried in order. */
|
|
35
|
-
readonly requires?: readonly NeoRequire[];
|
|
36
|
-
}
|
|
37
|
-
export declare function resolveNeoBinary(options?: ResolveNeoBinaryOptions): NeoBinaryResolution;
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=resolve-binary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-binary.d.ts","sourceRoot":"","sources":["../../../src/cli/neo/resolve-binary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,KAAK,UAAU,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;AAKzC,MAAM,MAAM,mBAAmB,GAC5B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAA;CAAE,GAC7F;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD,MAAM,WAAW,uBAAuB;IACvC,yFAAyF;IACzF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAC1C;AAED,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,mBAAmB,CA+B3F"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the neo (Go TUI) binary for the current host.
|
|
3
|
-
*
|
|
4
|
-
* Resolution order (first hit wins):
|
|
5
|
-
* 1. SENPI_NEO_BIN env override (dev / packagers) — used as-is.
|
|
6
|
-
* 2. `--neo-bin <path>` dev override (passed in explicitly by the launcher).
|
|
7
|
-
* 3. require.resolve of the per-platform package
|
|
8
|
-
* `@code-yeongyu/senpi-neo-tui-<platform>-<arch>/bin/senpi-neo[.exe]`,
|
|
9
|
-
* tried from both this module's resolution root and the installed
|
|
10
|
-
* executable's directory (mirrors the clipboard-native optional-dep
|
|
11
|
-
* precedent in utils/clipboard-native.ts).
|
|
12
|
-
*
|
|
13
|
-
* On failure, returns a single actionable error message (no stack trace) so the
|
|
14
|
-
* launcher can print it and exit 1.
|
|
15
|
-
*/
|
|
16
|
-
import { createRequire } from "node:module";
|
|
17
|
-
import { dirname, join } from "node:path";
|
|
18
|
-
import { pathToFileURL } from "node:url";
|
|
19
|
-
import { neoBinaryRequirePath, neoPackageName, resolveNeoTarget } from "./platform.js";
|
|
20
|
-
const moduleRequire = createRequire(import.meta.url);
|
|
21
|
-
const executableDirRequire = createRequire(pathToFileURL(join(dirname(process.execPath), "package.json")).href);
|
|
22
|
-
export function resolveNeoBinary(options = {}) {
|
|
23
|
-
const envBinPath = options.envBinPath ?? process.env.SENPI_NEO_BIN;
|
|
24
|
-
if (envBinPath !== undefined && envBinPath.length > 0) {
|
|
25
|
-
return { ok: true, path: envBinPath, source: "env" };
|
|
26
|
-
}
|
|
27
|
-
if (options.devBinPath !== undefined && options.devBinPath.length > 0) {
|
|
28
|
-
return { ok: true, path: options.devBinPath, source: "dev-flag" };
|
|
29
|
-
}
|
|
30
|
-
const nodePlatform = options.nodePlatform ?? process.platform;
|
|
31
|
-
const nodeArch = options.nodeArch ?? process.arch;
|
|
32
|
-
const target = resolveNeoTarget(nodePlatform, nodeArch);
|
|
33
|
-
if (target === undefined) {
|
|
34
|
-
return {
|
|
35
|
-
ok: false,
|
|
36
|
-
message: unsupportedHostMessage(nodePlatform, nodeArch),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
const requires = options.requires ?? [moduleRequire, executableDirRequire];
|
|
40
|
-
const requirePath = neoBinaryRequirePath(target);
|
|
41
|
-
for (const requireNeo of requires) {
|
|
42
|
-
try {
|
|
43
|
-
return { ok: true, path: requireNeo(requirePath), source: "package" };
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
// Try the next resolution root.
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return { ok: false, message: missingPackageMessage(neoPackageName(target)) };
|
|
50
|
-
}
|
|
51
|
-
function unsupportedHostMessage(nodePlatform, nodeArch) {
|
|
52
|
-
return [
|
|
53
|
-
`The neo TUI (--neo) has no prebuilt binary for this host (${nodePlatform}/${nodeArch}).`,
|
|
54
|
-
"Supported targets: darwin/linux/windows on x64/arm64.",
|
|
55
|
-
"Run senpi without --neo to use the classic TUI.",
|
|
56
|
-
].join("\n");
|
|
57
|
-
}
|
|
58
|
-
function missingPackageMessage(packageName) {
|
|
59
|
-
return [
|
|
60
|
-
`The neo TUI (--neo) requires the platform package "${packageName}", which is not installed.`,
|
|
61
|
-
`Install it with: npm install -g ${packageName}`,
|
|
62
|
-
"Or set SENPI_NEO_BIN to the path of a senpi-neo binary.",
|
|
63
|
-
"Run senpi without --neo to use the classic TUI.",
|
|
64
|
-
].join("\n");
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=resolve-binary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-binary.js","sourceRoot":"","sources":["../../../src/cli/neo/resolve-binary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIvF,MAAM,aAAa,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACrD,MAAM,oBAAoB,GAAG,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAmBhH,MAAM,UAAU,gBAAgB,CAAC,OAAO,GAA4B,EAAE;IACrE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IACnE,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACtD,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IACnE,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAClD,MAAM,MAAM,GAAG,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACxD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO;YACN,EAAE,EAAE,KAAK;YACT,OAAO,EAAE,sBAAsB,CAAC,YAAY,EAAE,QAAQ,CAAC;SACvD,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACjD,KAAK,MAAM,UAAU,IAAI,QAAQ,EAAE,CAAC;QACnC,IAAI,CAAC;YACJ,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACvE,CAAC;QAAC,MAAM,CAAC;YACR,gCAAgC;QACjC,CAAC;IACF,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,sBAAsB,CAAC,YAAoB,EAAE,QAAgB;IACrE,OAAO;QACN,6DAA6D,YAAY,IAAI,QAAQ,IAAI;QACzF,uDAAuD;QACvD,iDAAiD;KACjD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC;AAED,SAAS,qBAAqB,CAAC,WAAmB;IACjD,OAAO;QACN,sDAAsD,WAAW,4BAA4B;QAC7F,oCAAoC,WAAW,EAAE;QACjD,yDAAyD;QACzD,iDAAiD;KACjD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC","sourcesContent":["/**\n * Resolve the neo (Go TUI) binary for the current host.\n *\n * Resolution order (first hit wins):\n * 1. SENPI_NEO_BIN env override (dev / packagers) — used as-is.\n * 2. `--neo-bin <path>` dev override (passed in explicitly by the launcher).\n * 3. require.resolve of the per-platform package\n * `@code-yeongyu/senpi-neo-tui-<platform>-<arch>/bin/senpi-neo[.exe]`,\n * tried from both this module's resolution root and the installed\n * executable's directory (mirrors the clipboard-native optional-dep\n * precedent in utils/clipboard-native.ts).\n *\n * On failure, returns a single actionable error message (no stack trace) so the\n * launcher can print it and exit 1.\n */\n\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { neoBinaryRequirePath, neoPackageName, resolveNeoTarget } from \"./platform.ts\";\n\ntype NeoRequire = (id: string) => string;\n\nconst moduleRequire = createRequire(import.meta.url);\nconst executableDirRequire = createRequire(pathToFileURL(join(dirname(process.execPath), \"package.json\")).href);\n\nexport type NeoBinaryResolution =\n\t| { readonly ok: true; readonly path: string; readonly source: \"env\" | \"dev-flag\" | \"package\" }\n\t| { readonly ok: false; readonly message: string };\n\nexport interface ResolveNeoBinaryOptions {\n\t/** Explicit dev override from `--neo-bin` (takes precedence over package resolution). */\n\treadonly devBinPath?: string;\n\t/** Value of SENPI_NEO_BIN (highest precedence). Defaults to process.env at call time. */\n\treadonly envBinPath?: string;\n\t/** Overridable for tests: defaults to process.platform. */\n\treadonly nodePlatform?: string;\n\t/** Overridable for tests: defaults to process.arch. */\n\treadonly nodeArch?: string;\n\t/** Overridable for tests: resolution roots tried in order. */\n\treadonly requires?: readonly NeoRequire[];\n}\n\nexport function resolveNeoBinary(options: ResolveNeoBinaryOptions = {}): NeoBinaryResolution {\n\tconst envBinPath = options.envBinPath ?? process.env.SENPI_NEO_BIN;\n\tif (envBinPath !== undefined && envBinPath.length > 0) {\n\t\treturn { ok: true, path: envBinPath, source: \"env\" };\n\t}\n\n\tif (options.devBinPath !== undefined && options.devBinPath.length > 0) {\n\t\treturn { ok: true, path: options.devBinPath, source: \"dev-flag\" };\n\t}\n\n\tconst nodePlatform = options.nodePlatform ?? process.platform;\n\tconst nodeArch = options.nodeArch ?? process.arch;\n\tconst target = resolveNeoTarget(nodePlatform, nodeArch);\n\tif (target === undefined) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tmessage: unsupportedHostMessage(nodePlatform, nodeArch),\n\t\t};\n\t}\n\n\tconst requires = options.requires ?? [moduleRequire, executableDirRequire];\n\tconst requirePath = neoBinaryRequirePath(target);\n\tfor (const requireNeo of requires) {\n\t\ttry {\n\t\t\treturn { ok: true, path: requireNeo(requirePath), source: \"package\" };\n\t\t} catch {\n\t\t\t// Try the next resolution root.\n\t\t}\n\t}\n\n\treturn { ok: false, message: missingPackageMessage(neoPackageName(target)) };\n}\n\nfunction unsupportedHostMessage(nodePlatform: string, nodeArch: string): string {\n\treturn [\n\t\t`The neo TUI (--neo) has no prebuilt binary for this host (${nodePlatform}/${nodeArch}).`,\n\t\t\"Supported targets: darwin/linux/windows on x64/arm64.\",\n\t\t\"Run senpi without --neo to use the classic TUI.\",\n\t].join(\"\\n\");\n}\n\nfunction missingPackageMessage(packageName: string): string {\n\treturn [\n\t\t`The neo TUI (--neo) requires the platform package \"${packageName}\", which is not installed.`,\n\t\t`Install it with: npm install -g ${packageName}`,\n\t\t\"Or set SENPI_NEO_BIN to the path of a senpi-neo binary.\",\n\t\t\"Run senpi without --neo to use the classic TUI.\",\n\t].join(\"\\n\");\n}\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "../../types.ts";
|
|
2
|
-
export { resolveSessionHudRoot, scanSessionHudEntries } from "./scanner.ts";
|
|
3
|
-
export { renderTranscript } from "./transcript.ts";
|
|
4
|
-
export default function sessionHudExtension(pi: ExtensionAPI): void;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAmClE"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { getSessionsDir } from "../../../../config.js";
|
|
2
|
-
import { SessionHudOverlay } from "./overlay.js";
|
|
3
|
-
import { resolveSessionHudRoot, scanSessionHudEntries } from "./scanner.js";
|
|
4
|
-
export { resolveSessionHudRoot, scanSessionHudEntries } from "./scanner.js";
|
|
5
|
-
export { renderTranscript } from "./transcript.js";
|
|
6
|
-
export default function sessionHudExtension(pi) {
|
|
7
|
-
pi.registerCommand("sessions", {
|
|
8
|
-
description: "Peek at previous session transcripts in a HUD",
|
|
9
|
-
handler: async (_args, ctx) => {
|
|
10
|
-
if (!ctx.hasUI) {
|
|
11
|
-
ctx.ui.notify("No UI available", "info");
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
let sessions;
|
|
15
|
-
try {
|
|
16
|
-
const root = resolveSessionHudRoot(ctx.sessionManager.getSessionDir(), getSessionsDir());
|
|
17
|
-
sessions = await scanSessionHudEntries(root, ctx.sessionManager.getSessionFile());
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
21
|
-
ctx.ui.notify(`Failed to read sessions: ${message}`, "error");
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (sessions.length === 0) {
|
|
25
|
-
ctx.ui.notify("No sessions found", "info");
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
await ctx.ui.custom((tui, _theme, _keybindings, done) => new SessionHudOverlay({
|
|
29
|
-
sessions,
|
|
30
|
-
done,
|
|
31
|
-
requestRender: () => tui.requestRender(),
|
|
32
|
-
}), { overlay: true, overlayOptions: { width: "94%", maxHeight: "90%", minWidth: 72, margin: 1 } });
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG5E,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAgB;IAC3D,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE;QAC9B,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC7B,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBAChB,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;gBACzC,OAAO;YACR,CAAC;YAED,IAAI,QAAoC,CAAC;YACzC,IAAI,CAAC;gBACJ,MAAM,IAAI,GAAG,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,aAAa,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;gBACzF,QAAQ,GAAG,MAAM,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,CAAC;YACnF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACvE,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,4BAA4B,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;gBAC9D,OAAO;YACR,CAAC;YAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3B,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;gBAC3C,OAAO;YACR,CAAC;YAED,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAClB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,CACnC,IAAI,iBAAiB,CAAC;gBACrB,QAAQ;gBACR,IAAI;gBACJ,aAAa,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE;aACxC,CAAC,EACH,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAC9F,CAAC;QACH,CAAC;KACD,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { getSessionsDir } from \"../../../../config.ts\";\nimport type { ExtensionAPI } from \"../../types.ts\";\nimport { SessionHudOverlay } from \"./overlay.ts\";\nimport { resolveSessionHudRoot, scanSessionHudEntries } from \"./scanner.ts\";\nimport type { SessionHudEntry } from \"./types.ts\";\n\nexport { resolveSessionHudRoot, scanSessionHudEntries } from \"./scanner.ts\";\nexport { renderTranscript } from \"./transcript.ts\";\n\nexport default function sessionHudExtension(pi: ExtensionAPI): void {\n\tpi.registerCommand(\"sessions\", {\n\t\tdescription: \"Peek at previous session transcripts in a HUD\",\n\t\thandler: async (_args, ctx) => {\n\t\t\tif (!ctx.hasUI) {\n\t\t\t\tctx.ui.notify(\"No UI available\", \"info\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet sessions: readonly SessionHudEntry[];\n\t\t\ttry {\n\t\t\t\tconst root = resolveSessionHudRoot(ctx.sessionManager.getSessionDir(), getSessionsDir());\n\t\t\t\tsessions = await scanSessionHudEntries(root, ctx.sessionManager.getSessionFile());\n\t\t\t} catch (error) {\n\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\tctx.ui.notify(`Failed to read sessions: ${message}`, \"error\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (sessions.length === 0) {\n\t\t\t\tctx.ui.notify(\"No sessions found\", \"info\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tawait ctx.ui.custom<void>(\n\t\t\t\t(tui, _theme, _keybindings, done) =>\n\t\t\t\t\tnew SessionHudOverlay({\n\t\t\t\t\t\tsessions,\n\t\t\t\t\t\tdone,\n\t\t\t\t\t\trequestRender: () => tui.requestRender(),\n\t\t\t\t\t}),\n\t\t\t\t{ overlay: true, overlayOptions: { width: \"94%\", maxHeight: \"90%\", minWidth: 72, margin: 1 } },\n\t\t\t);\n\t\t},\n\t});\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAc1F"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { parseSessionEntries } from "../../../session-manager.js";
|
|
3
|
-
export async function loadTranscriptSnapshot(filePath) {
|
|
4
|
-
const content = await readFile(filePath, "utf-8");
|
|
5
|
-
const entries = parseSessionEntries(content);
|
|
6
|
-
const messages = [];
|
|
7
|
-
let model;
|
|
8
|
-
for (const entry of entries) {
|
|
9
|
-
if (entry.type === "message") {
|
|
10
|
-
messages.push(entry);
|
|
11
|
-
if (!model && entry.message.role === "assistant")
|
|
12
|
-
model = entry.message.responseModel ?? entry.message.model;
|
|
13
|
-
}
|
|
14
|
-
else if (entry.type === "model_change") {
|
|
15
|
-
model = `${entry.provider}/${entry.modelId}`;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return { entries: messages, model };
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=loader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,QAAgB;IAC5D,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAA0B,EAAE,CAAC;IAC3C,IAAI,KAAyB,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAAE,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC9G,CAAC;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;YAC1C,KAAK,GAAG,GAAG,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAC9C,CAAC;IACF,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACrC,CAAC","sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport type { SessionMessageEntry } from \"../../../session-manager.ts\";\nimport { parseSessionEntries } from \"../../../session-manager.ts\";\nimport type { TranscriptSnapshot } from \"./types.ts\";\n\nexport async function loadTranscriptSnapshot(filePath: string): Promise<TranscriptSnapshot> {\n\tconst content = await readFile(filePath, \"utf-8\");\n\tconst entries = parseSessionEntries(content);\n\tconst messages: SessionMessageEntry[] = [];\n\tlet model: string | undefined;\n\tfor (const entry of entries) {\n\t\tif (entry.type === \"message\") {\n\t\t\tmessages.push(entry);\n\t\t\tif (!model && entry.message.role === \"assistant\") model = entry.message.responseModel ?? entry.message.model;\n\t\t} else if (entry.type === \"model_change\") {\n\t\t\tmodel = `${entry.provider}/${entry.modelId}`;\n\t\t}\n\t}\n\treturn { entries: messages, model };\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SessionHudEntry } from "./types.ts";
|
|
2
|
-
export declare function sessionAge(session: SessionHudEntry): string;
|
|
3
|
-
export declare function describeSession(session: SessionHudEntry): string;
|
|
4
|
-
export declare function pickerLabel(session: SessionHudEntry): string;
|
|
5
|
-
export declare function renderLine(text: string, width: number): string;
|
|
6
|
-
export declare function viewerFooter(scroll: string): string;
|
|
7
|
-
//# sourceMappingURL=overlay-format.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-format.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/overlay-format.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAE3D;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAGhE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAE5D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnD"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { TruncatedText } from "@earendil-works/pi-tui";
|
|
2
|
-
import { keyHint, keyText } from "../../../../modes/interactive/components/keybinding-hints.js";
|
|
3
|
-
import { theme } from "../../../../modes/interactive/theme/theme.js";
|
|
4
|
-
import { shortenPath } from "../../../../utils/paths.js";
|
|
5
|
-
import { compactWhitespace, formatSessionDate } from "./text.js";
|
|
6
|
-
export function sessionAge(session) {
|
|
7
|
-
return session.isCurrent ? "live" : formatSessionDate(new Date(session.modifiedAt));
|
|
8
|
-
}
|
|
9
|
-
export function describeSession(session) {
|
|
10
|
-
const cwd = shortenPath(session.cwd) || "unknown";
|
|
11
|
-
return `${cwd} · ${sessionAge(session)} · ${session.messageCount} msg`;
|
|
12
|
-
}
|
|
13
|
-
export function pickerLabel(session) {
|
|
14
|
-
return compactWhitespace(session.lastUserText) || "(no user prompt)";
|
|
15
|
-
}
|
|
16
|
-
export function renderLine(text, width) {
|
|
17
|
-
return new TruncatedText(text, 0, 0).render(width)[0] ?? "";
|
|
18
|
-
}
|
|
19
|
-
export function viewerFooter(scroll) {
|
|
20
|
-
const scrollKeys = `${theme.fg("dim", `${keyText("tui.select.up")}/${keyText("tui.select.down")}`)}${theme.fg("muted", " scroll")}`;
|
|
21
|
-
return [
|
|
22
|
-
scrollKeys,
|
|
23
|
-
keyHint("tui.select.confirm", "expand"),
|
|
24
|
-
keyHint("tui.select.cancel", "sessions"),
|
|
25
|
-
keyHint("app.sessions.observe", "close"),
|
|
26
|
-
]
|
|
27
|
-
.join(theme.fg("muted", " · "))
|
|
28
|
-
.concat(scroll);
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=overlay-format.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-format.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/overlay-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,8DAA8D,CAAC;AAChG,OAAO,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGjE,MAAM,UAAU,UAAU,CAAC,OAAwB;IAClD,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AACrF,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAwB;IACvD,MAAM,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;IAClD,OAAO,GAAG,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,OAAO,CAAC,YAAY,MAAM,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAwB;IACnD,OAAO,iBAAiB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,kBAAkB,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,KAAa;IACrD,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAc;IAC1C,MAAM,UAAU,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;IACpI,OAAO;QACN,UAAU;QACV,OAAO,CAAC,oBAAoB,EAAE,QAAQ,CAAC;QACvC,OAAO,CAAC,mBAAmB,EAAE,UAAU,CAAC;QACxC,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;KACxC;SACC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC9B,MAAM,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import { TruncatedText } from \"@earendil-works/pi-tui\";\nimport { keyHint, keyText } from \"../../../../modes/interactive/components/keybinding-hints.ts\";\nimport { theme } from \"../../../../modes/interactive/theme/theme.ts\";\nimport { shortenPath } from \"../../../../utils/paths.ts\";\nimport type {} from \"../../../keybindings.ts\";\nimport { compactWhitespace, formatSessionDate } from \"./text.ts\";\nimport type { SessionHudEntry } from \"./types.ts\";\n\nexport function sessionAge(session: SessionHudEntry): string {\n\treturn session.isCurrent ? \"live\" : formatSessionDate(new Date(session.modifiedAt));\n}\n\nexport function describeSession(session: SessionHudEntry): string {\n\tconst cwd = shortenPath(session.cwd) || \"unknown\";\n\treturn `${cwd} · ${sessionAge(session)} · ${session.messageCount} msg`;\n}\n\nexport function pickerLabel(session: SessionHudEntry): string {\n\treturn compactWhitespace(session.lastUserText) || \"(no user prompt)\";\n}\n\nexport function renderLine(text: string, width: number): string {\n\treturn new TruncatedText(text, 0, 0).render(width)[0] ?? \"\";\n}\n\nexport function viewerFooter(scroll: string): string {\n\tconst scrollKeys = `${theme.fg(\"dim\", `${keyText(\"tui.select.up\")}/${keyText(\"tui.select.down\")}`)}${theme.fg(\"muted\", \" scroll\")}`;\n\treturn [\n\t\tscrollKeys,\n\t\tkeyHint(\"tui.select.confirm\", \"expand\"),\n\t\tkeyHint(\"tui.select.cancel\", \"sessions\"),\n\t\tkeyHint(\"app.sessions.observe\", \"close\"),\n\t]\n\t\t.join(theme.fg(\"muted\", \" · \"))\n\t\t.concat(scroll);\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Container, type Focusable } from "@earendil-works/pi-tui";
|
|
2
|
-
import type { SessionHudEntry } from "./types.ts";
|
|
3
|
-
type Mode = "picker" | "viewer";
|
|
4
|
-
interface SessionHudOverlayOptions {
|
|
5
|
-
readonly sessions: readonly SessionHudEntry[];
|
|
6
|
-
readonly done: () => void;
|
|
7
|
-
readonly requestRender: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare class SessionHudOverlay extends Container implements Focusable {
|
|
10
|
-
private readonly options;
|
|
11
|
-
private readonly sessionsByValue;
|
|
12
|
-
private readonly topBorder;
|
|
13
|
-
private readonly middleBorder;
|
|
14
|
-
private readonly bottomBorder;
|
|
15
|
-
private list;
|
|
16
|
-
private mode;
|
|
17
|
-
private selectedSession;
|
|
18
|
-
private snapshot;
|
|
19
|
-
private renderedLines;
|
|
20
|
-
private ranges;
|
|
21
|
-
private selectedEntryIndex;
|
|
22
|
-
private shouldSelectLastOnLoad;
|
|
23
|
-
private expandedEntries;
|
|
24
|
-
private scrollOffset;
|
|
25
|
-
private viewportHeight;
|
|
26
|
-
private loadingText;
|
|
27
|
-
private _focused;
|
|
28
|
-
constructor(options: SessionHudOverlayOptions);
|
|
29
|
-
get focused(): boolean;
|
|
30
|
-
set focused(value: boolean);
|
|
31
|
-
handleInput(input: string): void;
|
|
32
|
-
render(width: number): string[];
|
|
33
|
-
getMode(): Mode;
|
|
34
|
-
getSelectedEntryIndex(): number;
|
|
35
|
-
getExpandedEntryCount(): number;
|
|
36
|
-
private handlePickerInput;
|
|
37
|
-
private rebuildPicker;
|
|
38
|
-
private toPickerItem;
|
|
39
|
-
private openSession;
|
|
40
|
-
private resetViewerState;
|
|
41
|
-
private rebuildTranscript;
|
|
42
|
-
private renderViewer;
|
|
43
|
-
private handleViewerInput;
|
|
44
|
-
private backToPicker;
|
|
45
|
-
private moveSelection;
|
|
46
|
-
private jumpTo;
|
|
47
|
-
private toggleExpanded;
|
|
48
|
-
private scrollToSelected;
|
|
49
|
-
}
|
|
50
|
-
export {};
|
|
51
|
-
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/session-observer/overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,SAAS,EAOd,MAAM,wBAAwB,CAAC;AAUhC,OAAO,KAAK,EAAE,eAAe,EAAwC,MAAM,YAAY,CAAC;AAIxF,KAAK,IAAI,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAUhC,UAAU,wBAAwB;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;CACnC;AAED,qBAAa,iBAAkB,SAAQ,SAAU,YAAW,SAAS;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2B;IACnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsC;IACtE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyD;IACnF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyD;IACtF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyD;IACtF,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,IAAI,CAAkB;IAC9B,OAAO,CAAC,eAAe,CAA8B;IACrD,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,sBAAsB,CAAS;IACvC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,cAAc,CAAM;IAC5B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAS;IAEzB,YAAY,OAAO,EAAE,wBAAwB,EAI5C;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAEzB;IAED,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAM/B;IAEQ,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAGvC;IAED,OAAO,IAAI,IAAI,CAEd;IAED,qBAAqB,IAAI,MAAM,CAE9B;IAED,qBAAqB,IAAI,MAAM,CAE9B;IAED,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,YAAY;YAMN,WAAW;IAiBzB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;CAQxB"}
|