@code-yeongyu/senpi 2026.9.26 → 2026.9.27-3
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 +66 -0
- package/dist/bun-runtime.d.ts +18 -2
- package/dist/bun-runtime.d.ts.map +1 -1
- package/dist/bun-runtime.js +60 -8
- package/dist/bun-runtime.js.map +1 -1
- package/dist/bundle/chunks/anthropic-messages-3FGAXYJS.js +8 -0
- package/dist/bundle/chunks/{app-server-command-ZRCKWY2X.js → app-server-command-ZVB35UIJ.js} +1 -1
- package/dist/bundle/chunks/azure-openai-responses-4SUOOZZ4.js +2 -0
- package/dist/bundle/chunks/bun-extension-importer-R4HXF3GD.js +14 -0
- package/dist/bundle/chunks/{chunk-KMJXSXRX.js → chunk-357I4IUU.js} +2 -2
- package/dist/bundle/chunks/chunk-3SIQIY57.js +8 -0
- package/dist/bundle/chunks/chunk-45SZOLCU.js +2 -0
- package/dist/bundle/chunks/{chunk-77ACEMYL.js → chunk-6J6RDMBY.js} +1 -1
- package/dist/bundle/chunks/{chunk-BSOJHK4W.js → chunk-7FXXRPB3.js} +2 -1
- package/dist/bundle/chunks/{chunk-FD34HSJJ.js → chunk-C6LQNMRB.js} +1 -1
- package/dist/bundle/chunks/chunk-ELM77A26.js +2 -0
- package/dist/bundle/chunks/chunk-GZVCRV7I.js +3 -0
- package/dist/bundle/chunks/{chunk-TTY5BHCG.js → chunk-H2SGCPMD.js} +1 -1
- package/dist/bundle/chunks/chunk-KLBKUBDV.js +2 -0
- package/dist/bundle/chunks/chunk-L6QV7NZI.js +2 -0
- package/dist/bundle/chunks/{chunk-ZKZAATFM.js → chunk-LDB5UMH2.js} +2 -2
- package/dist/bundle/chunks/{chunk-HZAKOVHN.js → chunk-LGKKU4VM.js} +1 -1
- package/dist/bundle/chunks/{chunk-6Q6DGME2.js → chunk-NMDALHXH.js} +1 -1
- package/dist/bundle/chunks/chunk-NNILBBOH.js +18 -0
- package/dist/bundle/chunks/{chunk-SUQDU5KM.js → chunk-OQRUK2DK.js} +1 -1
- package/dist/bundle/chunks/{chunk-OZCB6BP3.js → chunk-OZN2KUPR.js} +7 -7
- package/dist/bundle/chunks/{chunk-X3T45623.js → chunk-QK4QKRTF.js} +1 -1
- package/dist/bundle/chunks/{chunk-WM5FVFAP.js → chunk-QPZVJQC5.js} +1 -1
- package/dist/bundle/chunks/{chunk-Y54V65MS.js → chunk-QYAO24GB.js} +1 -1
- package/dist/bundle/chunks/{chunk-MKAM7IRH.js → chunk-RULGEHQM.js} +1 -1
- package/dist/bundle/chunks/{chunk-QGC46CGK.js → chunk-RYI6XR6Z.js} +63 -58
- package/dist/bundle/chunks/chunk-U3VOXCGP.js +2 -0
- package/dist/bundle/chunks/chunk-W3D3ZYDS.js +2 -0
- package/dist/bundle/chunks/{chunk-UBPMXBOJ.js → chunk-XKLR7C5B.js} +1 -1
- package/dist/bundle/chunks/{chunk-CLZVNQW3.js → chunk-Y7EIVDHZ.js} +1 -1
- package/dist/bundle/chunks/chunk-ZIVYE5YK.js +2 -0
- package/dist/bundle/chunks/cli-main-RONHLFWZ.js +3 -0
- package/dist/bundle/chunks/google-generative-ai-ZTGKZTGU.js +2 -0
- package/dist/bundle/chunks/google-vertex-CCZ376YK.js +2 -0
- package/dist/bundle/chunks/help-fast-path-5LRG6FCG.js +2 -0
- package/dist/bundle/chunks/host-command-JVPGQR74.js +2 -0
- package/dist/bundle/chunks/host-lifecycle-R4HLXLBM.js +3 -0
- package/dist/bundle/chunks/host-lifecycle.js +4 -4
- package/dist/bundle/chunks/interactive-host-runtime-FES2G62G.js +4 -0
- package/dist/bundle/chunks/interactive-mode-45EP2FVL.js +2 -0
- package/dist/bundle/chunks/{list-tips-EBRNBPBM.js → list-tips-XXMRDHN6.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-7YX2I7UK.js → multi-session-host-EFCMD5OT.js} +6 -6
- package/dist/bundle/chunks/{openai-completions-4CLXDDHJ.js → openai-completions-OP6VFNUR.js} +1 -1
- package/dist/bundle/chunks/openai-images-6U5FCN5S.js +2 -0
- package/dist/bundle/chunks/openai-responses-7PWMBGYX.js +2 -0
- package/dist/bundle/chunks/openrouter-images-QIKWQZUD.js +2 -0
- package/dist/bundle/chunks/{package-manager-cli-3ISYTEL2.js → package-manager-cli-5XJS3TYM.js} +1 -1
- package/dist/bundle/chunks/rotation-stream-KW7PTEC4.js +2 -0
- package/dist/bundle/chunks/rpc-mode-ZHYECU24.js +2 -0
- package/dist/bundle/chunks/session-picker-QHIYVQP4.js +2 -0
- package/dist/bundle/chunks/session-worker.js +281 -270
- package/dist/bundle/chunks/{state-store-Q5EWEAFG.js → state-store-D4GGGT3J.js} +1 -1
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/continue-moved.d.ts +15 -0
- package/dist/cli/continue-moved.d.ts.map +1 -0
- package/dist/cli/continue-moved.js +26 -0
- package/dist/cli/continue-moved.js.map +1 -0
- package/dist/cli/cross-project-session.d.ts +22 -0
- package/dist/cli/cross-project-session.d.ts.map +1 -0
- package/dist/cli/cross-project-session.js +38 -0
- package/dist/cli/cross-project-session.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +3 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +43 -10
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +19 -5
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-pump.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-pump.js +5 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-registry-pump.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.d.ts +13 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.js +25 -2
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-claim.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-types.d.ts +1 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/session-turn-types.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/mcp/catalog.d.ts +3 -0
- package/dist/core/extensions/builtin/mcp/catalog.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/catalog.js +9 -0
- package/dist/core/extensions/builtin/mcp/catalog.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/connection-types.d.ts +2 -0
- package/dist/core/extensions/builtin/mcp/connection-types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/connection-types.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/connection.d.ts +1 -1
- package/dist/core/extensions/builtin/mcp/connection.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/connection.js +3 -2
- package/dist/core/extensions/builtin/mcp/connection.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/expose/session.d.ts +3 -0
- package/dist/core/extensions/builtin/mcp/expose/session.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/expose/session.js +9 -2
- package/dist/core/extensions/builtin/mcp/expose/session.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/service-register.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/service-register.js +7 -1
- package/dist/core/extensions/builtin/mcp/service-register.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/service-tools-changed.d.ts +18 -0
- package/dist/core/extensions/builtin/mcp/service-tools-changed.d.ts.map +1 -0
- package/dist/core/extensions/builtin/mcp/service-tools-changed.js +61 -0
- package/dist/core/extensions/builtin/mcp/service-tools-changed.js.map +1 -0
- package/dist/core/extensions/builtin/mcp/service-types.d.ts +13 -0
- package/dist/core/extensions/builtin/mcp/service-types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/service-types.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/service.js +4 -37
- package/dist/core/extensions/builtin/mcp/service.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/shared-lease.js +1 -1
- package/dist/core/extensions/builtin/mcp/shared-lease.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/startup-race.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/startup-race.js +11 -1
- package/dist/core/extensions/builtin/mcp/startup-race.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.js +5 -2
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts +5 -0
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +13 -0
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/repository-identity.d.ts +6 -0
- package/dist/core/extensions/builtin/repository-identity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/repository-identity.js +33 -0
- package/dist/core/extensions/builtin/repository-identity.js.map +1 -0
- package/dist/core/extensions/bun-extension-importer.d.ts.map +1 -1
- package/dist/core/extensions/bun-extension-importer.js +10 -4
- package/dist/core/extensions/bun-extension-importer.js.map +1 -1
- package/dist/core/extensions/bun-extension-registry.js +6 -5
- package/dist/core/extensions/bun-extension-registry.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/kernel-prelude.d.ts +13 -0
- package/dist/core/extensions/kernel-prelude.d.ts.map +1 -0
- package/dist/core/extensions/kernel-prelude.js +38 -0
- package/dist/core/extensions/kernel-prelude.js.map +1 -0
- package/dist/core/extensions/types.d.ts +44 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +4 -2
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/moved-sessions.d.ts +10 -0
- package/dist/core/moved-sessions.d.ts.map +1 -0
- package/dist/core/moved-sessions.js +84 -0
- package/dist/core/moved-sessions.js.map +1 -0
- package/dist/core/process-crash-record.d.ts +62 -0
- package/dist/core/process-crash-record.d.ts.map +1 -0
- package/dist/core/process-crash-record.js +216 -0
- package/dist/core/process-crash-record.js.map +1 -0
- package/dist/core/provider-rejected-images.d.ts +18 -0
- package/dist/core/provider-rejected-images.d.ts.map +1 -0
- package/dist/core/provider-rejected-images.js +107 -0
- package/dist/core/provider-rejected-images.js.map +1 -0
- package/dist/core/repository-identity.d.ts +18 -0
- package/dist/core/repository-identity.d.ts.map +1 -0
- package/dist/core/repository-identity.js +75 -0
- package/dist/core/repository-identity.js.map +1 -0
- package/dist/core/resume-target.d.ts +20 -0
- package/dist/core/resume-target.d.ts.map +1 -0
- package/dist/core/resume-target.js +30 -0
- package/dist/core/resume-target.js.map +1 -0
- package/dist/core/session-discovery.d.ts.map +1 -1
- package/dist/core/session-discovery.js +1 -0
- package/dist/core/session-discovery.js.map +1 -1
- package/dist/core/session-hold-errors.d.ts +20 -0
- package/dist/core/session-hold-errors.d.ts.map +1 -0
- package/dist/core/session-hold-errors.js +28 -0
- package/dist/core/session-hold-errors.js.map +1 -0
- package/dist/core/session-holders.d.ts +22 -0
- package/dist/core/session-holders.d.ts.map +1 -0
- package/dist/core/session-holders.js +234 -0
- package/dist/core/session-holders.js.map +1 -0
- package/dist/core/session-manager.d.ts +5 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-rebind.d.ts +23 -0
- package/dist/core/session-rebind.d.ts.map +1 -0
- package/dist/core/session-rebind.js +127 -0
- package/dist/core/session-rebind.js.map +1 -0
- package/dist/core/session-summary-index-file.d.ts.map +1 -1
- package/dist/core/session-summary-index-file.js +5 -2
- package/dist/core/session-summary-index-file.js.map +1 -1
- package/dist/core/session-summary.d.ts +3 -0
- package/dist/core/session-summary.d.ts.map +1 -1
- package/dist/core/session-summary.js +7 -0
- package/dist/core/session-summary.js.map +1 -1
- package/dist/core/session-title-generator.d.ts.map +1 -1
- package/dist/core/session-title-generator.js +21 -3
- package/dist/core/session-title-generator.js.map +1 -1
- package/dist/core/session-title-reasoning.d.ts +14 -0
- package/dist/core/session-title-reasoning.d.ts.map +1 -0
- package/dist/core/session-title-reasoning.js +31 -0
- package/dist/core/session-title-reasoning.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js +13 -0
- package/dist/core/tools/path-utils.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/legacy-dir-copy.d.ts +9 -0
- package/dist/legacy-dir-copy.d.ts.map +1 -0
- package/dist/legacy-dir-copy.js +69 -0
- package/dist/legacy-dir-copy.js.map +1 -0
- package/dist/legacy-senpi-dir-migration.d.ts.map +1 -1
- package/dist/legacy-senpi-dir-migration.js +64 -48
- package/dist/legacy-senpi-dir-migration.js.map +1 -1
- package/dist/main.d.ts +6 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +129 -22
- package/dist/main.js.map +1 -1
- package/dist/migrations-state.d.ts +1 -1
- package/dist/migrations-state.d.ts.map +1 -1
- package/dist/migrations-state.js +5 -1
- package/dist/migrations-state.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/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +5 -3
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +10 -4
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/resume-rebind.d.ts +12 -0
- package/dist/modes/interactive/resume-rebind.d.ts.map +1 -0
- package/dist/modes/interactive/resume-rebind.js +37 -0
- package/dist/modes/interactive/resume-rebind.js.map +1 -0
- package/dist/modes/interactive/runtime-notice-presenter.d.ts +8 -0
- package/dist/modes/interactive/runtime-notice-presenter.d.ts.map +1 -0
- package/dist/modes/interactive/runtime-notice-presenter.js +69 -0
- package/dist/modes/interactive/runtime-notice-presenter.js.map +1 -0
- package/dist/modes/interactive/runtime-notice.d.ts +50 -0
- package/dist/modes/interactive/runtime-notice.d.ts.map +1 -0
- package/dist/modes/interactive/runtime-notice.js +104 -0
- package/dist/modes/interactive/runtime-notice.js.map +1 -0
- package/dist/modes/interactive/tips/catalog/computer-tips.d.ts +7 -0
- package/dist/modes/interactive/tips/catalog/computer-tips.d.ts.map +1 -0
- package/dist/modes/interactive/tips/catalog/computer-tips.js +36 -0
- package/dist/modes/interactive/tips/catalog/computer-tips.js.map +1 -0
- package/dist/modes/interactive/tips/registry.d.ts.map +1 -1
- package/dist/modes/interactive/tips/registry.js +2 -0
- package/dist/modes/interactive/tips/registry.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +3 -0
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/host-child-exit.d.ts.map +1 -1
- package/dist/modes/rpc/host-child-exit.js +4 -0
- package/dist/modes/rpc/host-child-exit.js.map +1 -1
- package/dist/modes/rpc/host-crash-record.d.ts +8 -0
- package/dist/modes/rpc/host-crash-record.d.ts.map +1 -1
- package/dist/modes/rpc/host-crash-record.js.map +1 -1
- package/dist/modes/rpc/host-crash-record.test.js +11 -0
- package/dist/modes/rpc/host-crash-record.test.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +2 -2
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +14 -6
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-request-deadline.d.ts +17 -0
- package/dist/modes/rpc/rpc-request-deadline.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-request-deadline.js +27 -0
- package/dist/modes/rpc/rpc-request-deadline.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +9 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-command-router.d.ts +3 -6
- package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
- package/dist/modes/rpc/session-command-router.js +9 -22
- package/dist/modes/rpc/session-command-router.js.map +1 -1
- package/dist/modes/rpc/session-path-key.d.ts +10 -0
- package/dist/modes/rpc/session-path-key.d.ts.map +1 -0
- package/dist/modes/rpc/session-path-key.js +33 -0
- package/dist/modes/rpc/session-path-key.js.map +1 -0
- package/dist/modes/rpc/session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.js +6 -10
- package/dist/modes/rpc/session-registry.js.map +1 -1
- package/dist/modes/rpc/session-sweep.d.ts +18 -0
- package/dist/modes/rpc/session-sweep.d.ts.map +1 -0
- package/dist/modes/rpc/session-sweep.js +32 -0
- package/dist/modes/rpc/session-sweep.js.map +1 -0
- package/dist/pi-dir-restore.d.ts +4 -0
- package/dist/pi-dir-restore.d.ts.map +1 -0
- package/dist/pi-dir-restore.js +92 -0
- package/dist/pi-dir-restore.js.map +1 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +27 -1
- package/docs/quickstart.md +7 -1
- package/docs/rpc.md +8 -3
- package/docs/sdk.md +29 -0
- package/docs/sessions.md +13 -0
- package/docs/usage.md +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/README.md +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridge/protocol.ts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/bridges/schema-bridge.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/extension/kernel-preludes.ts +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +15 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/context-manager.ts +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/local-module-loader.ts +16 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/kernel.ts +6 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/prelude.py +15 -2
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/py/transport.ts +7 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/shared/kernel-prelude-plan.ts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt-template.ts +2 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +11 -1
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/run-eval-cell.ts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +2 -2
- 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 +7 -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.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +3 -1
- 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 +3 -3
- 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 +10 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.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 +9 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/provider-diagnostic.d.ts +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/provider-diagnostic.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/provider-diagnostic.js +56 -0
- package/node_modules/@earendil-works/pi-ai/dist/provider-diagnostic.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +3 -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/provider-diagnostic-carrier.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-carrier.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-carrier.js +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-carrier.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-sources.d.ts +26 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-sources.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-sources.js +103 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-sources.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-vocabulary.d.ts +36 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-vocabulary.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-vocabulary.js +129 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-diagnostic-vocabulary.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- 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-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +7 -7
- package/dist/bundle/chunks/anthropic-messages-UYDVRFAS.js +0 -8
- package/dist/bundle/chunks/azure-openai-responses-DODWR4W6.js +0 -2
- package/dist/bundle/chunks/bun-extension-importer-H4IJCWWQ.js +0 -14
- package/dist/bundle/chunks/chunk-34HMVB33.js +0 -2
- package/dist/bundle/chunks/chunk-3WBSBDBX.js +0 -13
- package/dist/bundle/chunks/chunk-L6JO4M6J.js +0 -3
- package/dist/bundle/chunks/chunk-SFYHCFRO.js +0 -2
- package/dist/bundle/chunks/chunk-T3JBT2IK.js +0 -8
- package/dist/bundle/chunks/chunk-TTHMOL5G.js +0 -2
- package/dist/bundle/chunks/chunk-UYCGOK6M.js +0 -2
- package/dist/bundle/chunks/chunk-ZTVQY5V6.js +0 -2
- package/dist/bundle/chunks/cli-main-H6JAXAXV.js +0 -3
- package/dist/bundle/chunks/google-generative-ai-VIEFECKJ.js +0 -2
- package/dist/bundle/chunks/google-vertex-Q64CKFID.js +0 -2
- package/dist/bundle/chunks/help-fast-path-ZGKPSDFO.js +0 -2
- package/dist/bundle/chunks/host-command-BMHJ4YUD.js +0 -2
- package/dist/bundle/chunks/host-lifecycle-2GZAGSGW.js +0 -3
- package/dist/bundle/chunks/interactive-host-runtime-YI75GFD5.js +0 -4
- package/dist/bundle/chunks/interactive-mode-HM7UQYRC.js +0 -2
- package/dist/bundle/chunks/openai-images-JA5N5DUU.js +0 -2
- package/dist/bundle/chunks/openai-responses-IBFGBAJP.js +0 -2
- package/dist/bundle/chunks/openrouter-images-MW5TXV7L.js +0 -2
- package/dist/bundle/chunks/rotation-stream-NATO6IMN.js +0 -2
- package/dist/bundle/chunks/rpc-mode-6PY4TN5F.js +0 -2
- package/dist/bundle/chunks/session-picker-BP7THCWF.js +0 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SessionInfo, type SessionListProgress, SessionManager } from "../../core/session-manager.ts";
|
|
2
|
+
type SessionScopeSource = Pick<SessionManager, "getCwd" | "getSessionDir" | "usesDefaultSessionDir">;
|
|
3
|
+
export interface ResumeRebindUi {
|
|
4
|
+
readonly confirm: (title: string, message: string) => Promise<boolean>;
|
|
5
|
+
readonly showError: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function currentScopeSessions(source: SessionScopeSource, onProgress?: SessionListProgress): Promise<SessionInfo[]>;
|
|
8
|
+
export declare function allScopeSessions(source: SessionScopeSource, onProgress?: SessionListProgress): Promise<SessionInfo[]>;
|
|
9
|
+
/** The path `/resume` should open for a picked session, or undefined when moving it failed (already reported). */
|
|
10
|
+
export declare function chooseResumePath(sessionPath: string, source: SessionScopeSource, ui: ResumeRebindUi): Promise<string | undefined>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=resume-rebind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume-rebind.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/resume-rebind.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE3G,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,eAAe,GAAG,uBAAuB,CAAC,CAAC;AAErG,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAMD,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,kBAAkB,EAC1B,UAAU,CAAC,EAAE,mBAAmB,GAC9B,OAAO,CAAC,WAAW,EAAE,CAAC,CAOxB;AAED,wBAAsB,gBAAgB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,UAAU,CAAC,EAAE,mBAAmB,GAC9B,OAAO,CAAC,WAAW,EAAE,CAAC,CAKxB;AAED,kHAAkH;AAClH,wBAAsB,gBAAgB,CACrC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,EAAE,EAAE,cAAc,GAChB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { REBIND_PROMPT } from "../../cli/cross-project-session.js";
|
|
2
|
+
import { markMovedSessions, withMovedSessions } from "../../core/moved-sessions.js";
|
|
3
|
+
import { resolveResumeTarget } from "../../core/resume-target.js";
|
|
4
|
+
import { SessionManager } from "../../core/session-manager.js";
|
|
5
|
+
function sharedSessionDir(source) {
|
|
6
|
+
return source.usesDefaultSessionDir() ? {} : { sessionDir: source.getSessionDir() };
|
|
7
|
+
}
|
|
8
|
+
export function currentScopeSessions(source, onProgress) {
|
|
9
|
+
const cwd = source.getCwd();
|
|
10
|
+
return withMovedSessions(SessionManager.list(cwd, source.getSessionDir(), onProgress), cwd, sharedSessionDir(source));
|
|
11
|
+
}
|
|
12
|
+
export async function allScopeSessions(source, onProgress) {
|
|
13
|
+
const sessions = source.usesDefaultSessionDir()
|
|
14
|
+
? await SessionManager.listAll(onProgress)
|
|
15
|
+
: await SessionManager.listAll(source.getSessionDir(), onProgress);
|
|
16
|
+
return markMovedSessions(sessions, source.getCwd());
|
|
17
|
+
}
|
|
18
|
+
/** The path `/resume` should open for a picked session, or undefined when moving it failed (already reported). */
|
|
19
|
+
export async function chooseResumePath(sessionPath, source, ui) {
|
|
20
|
+
const cwd = source.getCwd();
|
|
21
|
+
try {
|
|
22
|
+
const target = await resolveResumeTarget({
|
|
23
|
+
sessionPath,
|
|
24
|
+
cwd,
|
|
25
|
+
...sharedSessionDir(source),
|
|
26
|
+
confirm: (sessionCwd) => ui.confirm(REBIND_PROMPT, `Session found in different project: ${sessionCwd}\nThis directory is the same git repository: ${cwd}\nChoose No to open it where it is.`),
|
|
27
|
+
});
|
|
28
|
+
return target.path;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (!(error instanceof Error))
|
|
32
|
+
throw error;
|
|
33
|
+
ui.showError(`Could not move session: ${error.message}`);
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=resume-rebind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume-rebind.js","sourceRoot":"","sources":["../../../src/modes/interactive/resume-rebind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAA8C,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAS3G,SAAS,gBAAgB,CAAC,MAA0B;IACnD,OAAO,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC;AACrF,CAAC;AAED,MAAM,UAAU,oBAAoB,CACnC,MAA0B,EAC1B,UAAgC;IAEhC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IAC5B,OAAO,iBAAiB,CACvB,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,EAC5D,GAAG,EACH,gBAAgB,CAAC,MAAM,CAAC,CACxB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,MAA0B,EAC1B,UAAgC;IAEhC,MAAM,QAAQ,GAAG,MAAM,CAAC,qBAAqB,EAAE;QAC9C,CAAC,CAAC,MAAM,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC;QAC1C,CAAC,CAAC,MAAM,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,CAAC;IACpE,OAAO,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,kHAAkH;AAClH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,WAAmB,EACnB,MAA0B,EAC1B,EAAkB;IAElB,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IAC5B,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC;YACxC,WAAW;YACX,GAAG;YACH,GAAG,gBAAgB,CAAC,MAAM,CAAC;YAC3B,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE,CACvB,EAAE,CAAC,OAAO,CACT,aAAa,EACb,uCAAuC,UAAU,gDAAgD,GAAG,qCAAqC,CACzI;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3C,EAAE,CAAC,SAAS,CAAC,2BAA2B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACzD,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC","sourcesContent":["import { REBIND_PROMPT } from \"../../cli/cross-project-session.ts\";\nimport { markMovedSessions, withMovedSessions } from \"../../core/moved-sessions.ts\";\nimport { resolveResumeTarget } from \"../../core/resume-target.ts\";\nimport { type SessionInfo, type SessionListProgress, SessionManager } from \"../../core/session-manager.ts\";\n\ntype SessionScopeSource = Pick<SessionManager, \"getCwd\" | \"getSessionDir\" | \"usesDefaultSessionDir\">;\n\nexport interface ResumeRebindUi {\n\treadonly confirm: (title: string, message: string) => Promise<boolean>;\n\treadonly showError: (message: string) => void;\n}\n\nfunction sharedSessionDir(source: SessionScopeSource): { readonly sessionDir?: string } {\n\treturn source.usesDefaultSessionDir() ? {} : { sessionDir: source.getSessionDir() };\n}\n\nexport function currentScopeSessions(\n\tsource: SessionScopeSource,\n\tonProgress?: SessionListProgress,\n): Promise<SessionInfo[]> {\n\tconst cwd = source.getCwd();\n\treturn withMovedSessions(\n\t\tSessionManager.list(cwd, source.getSessionDir(), onProgress),\n\t\tcwd,\n\t\tsharedSessionDir(source),\n\t);\n}\n\nexport async function allScopeSessions(\n\tsource: SessionScopeSource,\n\tonProgress?: SessionListProgress,\n): Promise<SessionInfo[]> {\n\tconst sessions = source.usesDefaultSessionDir()\n\t\t? await SessionManager.listAll(onProgress)\n\t\t: await SessionManager.listAll(source.getSessionDir(), onProgress);\n\treturn markMovedSessions(sessions, source.getCwd());\n}\n\n/** The path `/resume` should open for a picked session, or undefined when moving it failed (already reported). */\nexport async function chooseResumePath(\n\tsessionPath: string,\n\tsource: SessionScopeSource,\n\tui: ResumeRebindUi,\n): Promise<string | undefined> {\n\tconst cwd = source.getCwd();\n\ttry {\n\t\tconst target = await resolveResumeTarget({\n\t\t\tsessionPath,\n\t\t\tcwd,\n\t\t\t...sharedSessionDir(source),\n\t\t\tconfirm: (sessionCwd) =>\n\t\t\t\tui.confirm(\n\t\t\t\t\tREBIND_PROMPT,\n\t\t\t\t\t`Session found in different project: ${sessionCwd}\\nThis directory is the same git repository: ${cwd}\\nChoose No to open it where it is.`,\n\t\t\t\t),\n\t\t});\n\t\treturn target.path;\n\t} catch (error) {\n\t\tif (!(error instanceof Error)) throw error;\n\t\tui.showError(`Could not move session: ${error.message}`);\n\t\treturn undefined;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BunRuntimeOptions } from "../../bun-runtime.ts";
|
|
2
|
+
import type { NoticeSpec } from "../../core/extensions/notice/index.ts";
|
|
3
|
+
import { type BunAvailability } from "./runtime-notice.ts";
|
|
4
|
+
export declare const RUNTIME_NOTICE_STATE_FILE = "runtime-notice.json";
|
|
5
|
+
export declare function readShownVersion(agentDir: string): string | undefined;
|
|
6
|
+
export declare function detectBunAvailability(options: BunRuntimeOptions): BunAvailability;
|
|
7
|
+
export declare function maybeShowRuntimeNotice(show: (spec: NoticeSpec) => void): void;
|
|
8
|
+
//# sourceMappingURL=runtime-notice-presenter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-notice-presenter.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/runtime-notice-presenter.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,iBAAiB,EAItB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EACN,KAAK,eAAe,EAMpB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUrE;AAYD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe,CAOjF;AAOD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI,CAwB7E"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { bunVersionSatisfies, findBunBinary, processBunRuntimeOptions, } from "../../bun-runtime.js";
|
|
4
|
+
import { APP_COMMAND, APP_NAME, BRAND, detectInstallMethod, getAgentDir, PACKAGE_NAME, VERSION } from "../../config.js";
|
|
5
|
+
import { envValue } from "../../core/brand.js";
|
|
6
|
+
import { hasInheritedInspectorOption } from "../../inspector-policy.js";
|
|
7
|
+
import { buildRuntimeNotice, reinstallTarget, runtimeNoticeSkipReason, runtimePinEnvName, SKIP_RUNTIME_NOTICE_ENV_SUFFIX, } from "./runtime-notice.js";
|
|
8
|
+
export const RUNTIME_NOTICE_STATE_FILE = "runtime-notice.json";
|
|
9
|
+
export function readShownVersion(agentDir) {
|
|
10
|
+
let parsed;
|
|
11
|
+
try {
|
|
12
|
+
parsed = JSON.parse(readFileSync(join(agentDir, RUNTIME_NOTICE_STATE_FILE), "utf8"));
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
// Missing or unreadable state means the notice was never recorded as shown.
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
if (typeof parsed !== "object" || parsed === null || !("shownVersion" in parsed))
|
|
19
|
+
return undefined;
|
|
20
|
+
return typeof parsed.shownVersion === "string" ? parsed.shownVersion : undefined;
|
|
21
|
+
}
|
|
22
|
+
function recordShownVersion(agentDir, version) {
|
|
23
|
+
try {
|
|
24
|
+
mkdirSync(agentDir, { recursive: true });
|
|
25
|
+
writeFileSync(join(agentDir, RUNTIME_NOTICE_STATE_FILE), `${JSON.stringify({ shownVersion: version })}\n`);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// Best effort: a read-only agent dir only means the notice shows again next launch,
|
|
29
|
+
// which must never fail the interactive startup that is already underway.
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function detectBunAvailability(options) {
|
|
33
|
+
const bunPath = findBunBinary(options);
|
|
34
|
+
if (bunPath === undefined)
|
|
35
|
+
return { kind: "missing" };
|
|
36
|
+
const version = options.bunVersion(bunPath);
|
|
37
|
+
return version !== undefined && bunVersionSatisfies(version)
|
|
38
|
+
? { kind: "ready", version }
|
|
39
|
+
: { kind: "outdated", version };
|
|
40
|
+
}
|
|
41
|
+
function skipRequested() {
|
|
42
|
+
const value = envValue(SKIP_RUNTIME_NOTICE_ENV_SUFFIX);
|
|
43
|
+
return value !== undefined && value !== "" && value !== "0";
|
|
44
|
+
}
|
|
45
|
+
export function maybeShowRuntimeNotice(show) {
|
|
46
|
+
const agentDir = getAgentDir();
|
|
47
|
+
const skip = runtimeNoticeSkipReason({
|
|
48
|
+
versions: process.versions,
|
|
49
|
+
env: process.env,
|
|
50
|
+
hasInheritedInspectorOption: hasInheritedInspectorOption(),
|
|
51
|
+
skipRequested: skipRequested(),
|
|
52
|
+
engineVersion: VERSION,
|
|
53
|
+
shownVersion: readShownVersion(agentDir),
|
|
54
|
+
});
|
|
55
|
+
if (skip !== undefined)
|
|
56
|
+
return;
|
|
57
|
+
show(buildRuntimeNotice({
|
|
58
|
+
appName: APP_NAME,
|
|
59
|
+
appCommand: APP_COMMAND,
|
|
60
|
+
nodeVersion: process.version,
|
|
61
|
+
platform: process.platform,
|
|
62
|
+
installMethod: detectInstallMethod(),
|
|
63
|
+
target: reinstallTarget(BRAND, PACKAGE_NAME),
|
|
64
|
+
bun: detectBunAvailability(processBunRuntimeOptions(existsSync, realpathSync)),
|
|
65
|
+
pinEnvName: runtimePinEnvName(process.env),
|
|
66
|
+
}));
|
|
67
|
+
recordShownVersion(agentDir, VERSION);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=runtime-notice-presenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-notice-presenter.js","sourceRoot":"","sources":["../../../src/modes/interactive/runtime-notice-presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAEN,mBAAmB,EACnB,aAAa,EACb,wBAAwB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE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,YAAY,CAAC;QAC5C,GAAG,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAC9E,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC;KAC1C,CAAC,CACF,CAAC;IACF,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport {\n\ttype BunRuntimeOptions,\n\tbunVersionSatisfies,\n\tfindBunBinary,\n\tprocessBunRuntimeOptions,\n} from \"../../bun-runtime.ts\";\nimport { APP_COMMAND, APP_NAME, BRAND, detectInstallMethod, getAgentDir, PACKAGE_NAME, VERSION } from \"../../config.ts\";\nimport { envValue } from \"../../core/brand.ts\";\nimport type { NoticeSpec } from \"../../core/extensions/notice/index.ts\";\nimport { hasInheritedInspectorOption } from \"../../inspector-policy.ts\";\nimport {\n\ttype BunAvailability,\n\tbuildRuntimeNotice,\n\treinstallTarget,\n\truntimeNoticeSkipReason,\n\truntimePinEnvName,\n\tSKIP_RUNTIME_NOTICE_ENV_SUFFIX,\n} from \"./runtime-notice.ts\";\n\nexport const RUNTIME_NOTICE_STATE_FILE = \"runtime-notice.json\";\n\nexport function readShownVersion(agentDir: string): string | undefined {\n\tlet parsed: unknown;\n\ttry {\n\t\tparsed = JSON.parse(readFileSync(join(agentDir, RUNTIME_NOTICE_STATE_FILE), \"utf8\"));\n\t} catch {\n\t\t// Missing or unreadable state means the notice was never recorded as shown.\n\t\treturn undefined;\n\t}\n\tif (typeof parsed !== \"object\" || parsed === null || !(\"shownVersion\" in parsed)) return undefined;\n\treturn typeof parsed.shownVersion === \"string\" ? parsed.shownVersion : undefined;\n}\n\nfunction recordShownVersion(agentDir: string, version: string): void {\n\ttry {\n\t\tmkdirSync(agentDir, { recursive: true });\n\t\twriteFileSync(join(agentDir, RUNTIME_NOTICE_STATE_FILE), `${JSON.stringify({ shownVersion: version })}\\n`);\n\t} catch {\n\t\t// Best effort: a read-only agent dir only means the notice shows again next launch,\n\t\t// which must never fail the interactive startup that is already underway.\n\t}\n}\n\nexport function detectBunAvailability(options: BunRuntimeOptions): BunAvailability {\n\tconst bunPath = findBunBinary(options);\n\tif (bunPath === undefined) return { kind: \"missing\" };\n\tconst version = options.bunVersion(bunPath);\n\treturn version !== undefined && bunVersionSatisfies(version)\n\t\t? { kind: \"ready\", version }\n\t\t: { kind: \"outdated\", version };\n}\n\nfunction skipRequested(): boolean {\n\tconst value = envValue(SKIP_RUNTIME_NOTICE_ENV_SUFFIX);\n\treturn value !== undefined && value !== \"\" && value !== \"0\";\n}\n\nexport function maybeShowRuntimeNotice(show: (spec: NoticeSpec) => void): void {\n\tconst agentDir = getAgentDir();\n\tconst skip = runtimeNoticeSkipReason({\n\t\tversions: process.versions,\n\t\tenv: process.env,\n\t\thasInheritedInspectorOption: hasInheritedInspectorOption(),\n\t\tskipRequested: skipRequested(),\n\t\tengineVersion: VERSION,\n\t\tshownVersion: readShownVersion(agentDir),\n\t});\n\tif (skip !== undefined) return;\n\tshow(\n\t\tbuildRuntimeNotice({\n\t\t\tappName: APP_NAME,\n\t\t\tappCommand: APP_COMMAND,\n\t\t\tnodeVersion: process.version,\n\t\t\tplatform: process.platform,\n\t\t\tinstallMethod: detectInstallMethod(),\n\t\t\ttarget: reinstallTarget(BRAND, PACKAGE_NAME),\n\t\t\tbun: detectBunAvailability(processBunRuntimeOptions(existsSync, realpathSync)),\n\t\t\tpinEnvName: runtimePinEnvName(process.env),\n\t\t}),\n\t);\n\trecordShownVersion(agentDir, VERSION);\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { InstallMethod } from "../../config.ts";
|
|
2
|
+
import type { BrandProfile } from "../../core/brand.ts";
|
|
3
|
+
import type { NoticeSpec } from "../../core/extensions/notice/index.ts";
|
|
4
|
+
export declare const SKIP_RUNTIME_NOTICE_ENV_SUFFIX = "SKIP_RUNTIME_NOTICE";
|
|
5
|
+
export type RuntimeNoticeSkip = "bun-runtime" | "node-pinned" | "inspector" | "skip-requested" | "already-shown";
|
|
6
|
+
export interface RuntimeNoticeGate {
|
|
7
|
+
readonly versions: Readonly<Record<string, string | undefined>>;
|
|
8
|
+
readonly env: NodeJS.ProcessEnv;
|
|
9
|
+
readonly hasInheritedInspectorOption: boolean;
|
|
10
|
+
readonly skipRequested: boolean;
|
|
11
|
+
readonly engineVersion: string;
|
|
12
|
+
readonly shownVersion: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The variable that pins the runtime from the user's side. The OmO Native launcher always
|
|
16
|
+
* forwards its own runtime as `SENPI_RUNTIME`, so under OmO Native only `OMO_RUNTIME` is the
|
|
17
|
+
* user's choice; a forwarded `SENPI_RUNTIME=node` just means the launcher could not use Bun.
|
|
18
|
+
*/
|
|
19
|
+
export declare function runtimePinEnvName(env: NodeJS.ProcessEnv): string;
|
|
20
|
+
export declare function runtimeNoticeSkipReason(gate: RuntimeNoticeGate): RuntimeNoticeSkip | undefined;
|
|
21
|
+
export type BunAvailability = {
|
|
22
|
+
readonly kind: "missing";
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: "outdated";
|
|
25
|
+
readonly version: string | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
readonly kind: "ready";
|
|
28
|
+
readonly version: string;
|
|
29
|
+
};
|
|
30
|
+
export interface ReinstallTarget {
|
|
31
|
+
readonly packageName: string;
|
|
32
|
+
readonly installSpec: string;
|
|
33
|
+
readonly ignoreScripts: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function reinstallTarget(brand: BrandProfile | undefined, packageName: string): ReinstallTarget | undefined;
|
|
36
|
+
/** Clean reinstall: remove the Node-managed copy so PATH cannot keep resolving it, then add it with Bun. */
|
|
37
|
+
export declare function bunReinstallCommand(method: InstallMethod, target: ReinstallTarget): string;
|
|
38
|
+
export declare function installBunCommand(platform: NodeJS.Platform): string;
|
|
39
|
+
export interface RuntimeNoticeInput {
|
|
40
|
+
readonly appName: string;
|
|
41
|
+
readonly appCommand: string;
|
|
42
|
+
readonly nodeVersion: string;
|
|
43
|
+
readonly platform: NodeJS.Platform;
|
|
44
|
+
readonly installMethod: InstallMethod;
|
|
45
|
+
readonly target: ReinstallTarget | undefined;
|
|
46
|
+
readonly bun: BunAvailability;
|
|
47
|
+
readonly pinEnvName: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function buildRuntimeNotice(input: RuntimeNoticeInput): NoticeSpec;
|
|
50
|
+
//# sourceMappingURL=runtime-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-notice.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/runtime-notice.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEpF,eAAO,MAAM,8BAA8B,wBAAwB,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAEjH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAChE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,iBAAi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G,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAyBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,UAAU,CAaxE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "running on Node.js" startup notice: when to show it and what it says.
|
|
3
|
+
*
|
|
4
|
+
* The only trigger is the runtime itself. Every install path that can run on Bun already
|
|
5
|
+
* re-execs there (`bun-runtime.ts` for senpi, the OmO Native launcher for omo), so a process
|
|
6
|
+
* still on Node here is one the user can fix: Bun is missing or too old, or the package was
|
|
7
|
+
* installed by a manager that keeps it on Node. Everything in this file is pure; the
|
|
8
|
+
* interactive mode supplies the facts through `runtime-notice-presenter.ts`.
|
|
9
|
+
*/
|
|
10
|
+
import { MIN_BUN_VERSION, RUNTIME_ENV_VAR } from "../../bun-runtime.js";
|
|
11
|
+
export const SKIP_RUNTIME_NOTICE_ENV_SUFFIX = "SKIP_RUNTIME_NOTICE";
|
|
12
|
+
/**
|
|
13
|
+
* The variable that pins the runtime from the user's side. The OmO Native launcher always
|
|
14
|
+
* forwards its own runtime as `SENPI_RUNTIME`, so under OmO Native only `OMO_RUNTIME` is the
|
|
15
|
+
* user's choice; a forwarded `SENPI_RUNTIME=node` just means the launcher could not use Bun.
|
|
16
|
+
*/
|
|
17
|
+
export function runtimePinEnvName(env) {
|
|
18
|
+
return env.OMO_NATIVE === "1" ? "OMO_RUNTIME" : RUNTIME_ENV_VAR;
|
|
19
|
+
}
|
|
20
|
+
export function runtimeNoticeSkipReason(gate) {
|
|
21
|
+
if (gate.versions.bun !== undefined)
|
|
22
|
+
return "bun-runtime";
|
|
23
|
+
if (gate.env[runtimePinEnvName(gate.env)] === "node")
|
|
24
|
+
return "node-pinned";
|
|
25
|
+
if (gate.hasInheritedInspectorOption)
|
|
26
|
+
return "inspector";
|
|
27
|
+
if (gate.skipRequested)
|
|
28
|
+
return "skip-requested";
|
|
29
|
+
if (gate.shownVersion === gate.engineVersion)
|
|
30
|
+
return "already-shown";
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
export function reinstallTarget(brand, packageName) {
|
|
34
|
+
if (brand === undefined)
|
|
35
|
+
return { packageName, installSpec: packageName, ignoreScripts: true };
|
|
36
|
+
const update = brand.update;
|
|
37
|
+
// A brand without an update channel manages its own installs; there is no command to offer.
|
|
38
|
+
if (update === undefined)
|
|
39
|
+
return undefined;
|
|
40
|
+
const installSpec = update.distTag === "latest" ? update.packageName : `${update.packageName}@${update.distTag}`;
|
|
41
|
+
// Branded products may rely on their install script; senpi documents --ignore-scripts.
|
|
42
|
+
return { packageName: update.packageName, installSpec, ignoreScripts: false };
|
|
43
|
+
}
|
|
44
|
+
function uninstallCommand(method, packageName) {
|
|
45
|
+
switch (method) {
|
|
46
|
+
case "npm":
|
|
47
|
+
return `npm uninstall -g ${packageName}`;
|
|
48
|
+
case "pnpm":
|
|
49
|
+
return `pnpm remove -g ${packageName}`;
|
|
50
|
+
case "yarn":
|
|
51
|
+
return `yarn global remove ${packageName}`;
|
|
52
|
+
case "bun":
|
|
53
|
+
case "bun-binary":
|
|
54
|
+
case "unknown":
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Clean reinstall: remove the Node-managed copy so PATH cannot keep resolving it, then add it with Bun. */
|
|
59
|
+
export function bunReinstallCommand(method, target) {
|
|
60
|
+
const install = `bun add -g ${target.ignoreScripts ? "--ignore-scripts " : ""}${target.installSpec}`;
|
|
61
|
+
const uninstall = uninstallCommand(method, target.packageName);
|
|
62
|
+
return uninstall === undefined ? install : `${uninstall} && ${install}`;
|
|
63
|
+
}
|
|
64
|
+
export function installBunCommand(platform) {
|
|
65
|
+
return platform === "win32"
|
|
66
|
+
? `powershell -c "irm bun.sh/install.ps1 | iex"`
|
|
67
|
+
: "curl -fsSL https://bun.sh/install | bash";
|
|
68
|
+
}
|
|
69
|
+
function bunStep(input) {
|
|
70
|
+
switch (input.bun.kind) {
|
|
71
|
+
case "missing":
|
|
72
|
+
return { text: `Install Bun: ${installBunCommand(input.platform)}`, tone: "accent" };
|
|
73
|
+
case "outdated":
|
|
74
|
+
return {
|
|
75
|
+
text: `Upgrade Bun (found ${input.bun.version ?? "an unreadable version"}, needs ${MIN_BUN_VERSION}+): bun upgrade`,
|
|
76
|
+
tone: "accent",
|
|
77
|
+
};
|
|
78
|
+
case "ready":
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function reinstallStep(input, afterBunStep) {
|
|
83
|
+
const lead = afterBunStep ? "Then reinstall" : "Reinstall";
|
|
84
|
+
// A Bun-global install needs no reinstall: a current Bun takes it over on the next launch.
|
|
85
|
+
if (input.installMethod === "bun" || input.target === undefined) {
|
|
86
|
+
return { text: `${afterBunStep ? "Then restart" : "Restart"} ${input.appCommand}.`, tone: "accent" };
|
|
87
|
+
}
|
|
88
|
+
return { text: `${lead} with Bun: ${bunReinstallCommand(input.installMethod, input.target)}`, tone: "accent" };
|
|
89
|
+
}
|
|
90
|
+
export function buildRuntimeNotice(input) {
|
|
91
|
+
const first = bunStep(input);
|
|
92
|
+
const extra = [
|
|
93
|
+
...(first === undefined ? [] : [first]),
|
|
94
|
+
reinstallStep(input, first !== undefined),
|
|
95
|
+
{ text: `To stay on Node.js and hide this notice, set ${input.pinEnvName}=node.` },
|
|
96
|
+
];
|
|
97
|
+
return {
|
|
98
|
+
title: "Running on Node.js",
|
|
99
|
+
tone: "warning",
|
|
100
|
+
why: `${input.appName} is running on Node.js ${input.nodeVersion}. It starts faster and every feature works on Bun ${MIN_BUN_VERSION}+.`,
|
|
101
|
+
extra,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=runtime-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-notice.js","sourceRoot":"","sources":["../../../src/modes/interactive/runtime-notice.ts"],"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,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,0BAA0B,KAAK,CAAC,WAAW,qDAAqD,eAAe,IAAI;QACxI,KAAK;KACL,CAAC;AACH,CAAC","sourcesContent":["/**\n * The \"running on Node.js\" startup notice: when to show it and what it says.\n *\n * The only trigger is the runtime itself. Every install path that can run on Bun already\n * re-execs there (`bun-runtime.ts` for senpi, the OmO Native launcher for omo), so a process\n * still on Node here is one the user can fix: Bun is missing or too old, or the package was\n * installed by a manager that keeps it on Node. Everything in this file is pure; the\n * interactive mode supplies the facts through `runtime-notice-presenter.ts`.\n */\nimport { MIN_BUN_VERSION, RUNTIME_ENV_VAR } from \"../../bun-runtime.ts\";\nimport type { InstallMethod } from \"../../config.ts\";\nimport type { BrandProfile } from \"../../core/brand.ts\";\nimport type { NoticeLine, NoticeSpec } from \"../../core/extensions/notice/index.ts\";\n\nexport const SKIP_RUNTIME_NOTICE_ENV_SUFFIX = \"SKIP_RUNTIME_NOTICE\";\n\nexport type RuntimeNoticeSkip = \"bun-runtime\" | \"node-pinned\" | \"inspector\" | \"skip-requested\" | \"already-shown\";\n\nexport interface RuntimeNoticeGate {\n\treadonly versions: Readonly<Record<string, string | undefined>>;\n\treadonly env: NodeJS.ProcessEnv;\n\treadonly hasInheritedInspectorOption: boolean;\n\treadonly skipRequested: boolean;\n\treadonly engineVersion: string;\n\treadonly shownVersion: string | undefined;\n}\n\n/**\n * The variable that pins the runtime from the user's side. The OmO Native launcher always\n * forwards its own runtime as `SENPI_RUNTIME`, so under OmO Native only `OMO_RUNTIME` is the\n * user's choice; a forwarded `SENPI_RUNTIME=node` just means the launcher could not use Bun.\n */\nexport function runtimePinEnvName(env: NodeJS.ProcessEnv): string {\n\treturn env.OMO_NATIVE === \"1\" ? \"OMO_RUNTIME\" : RUNTIME_ENV_VAR;\n}\n\nexport function runtimeNoticeSkipReason(gate: RuntimeNoticeGate): RuntimeNoticeSkip | undefined {\n\tif (gate.versions.bun !== undefined) return \"bun-runtime\";\n\tif (gate.env[runtimePinEnvName(gate.env)] === \"node\") return \"node-pinned\";\n\tif (gate.hasInheritedInspectorOption) return \"inspector\";\n\tif (gate.skipRequested) return \"skip-requested\";\n\tif (gate.shownVersion === gate.engineVersion) return \"already-shown\";\n\treturn undefined;\n}\n\nexport type BunAvailability =\n\t| { readonly kind: \"missing\" }\n\t| { readonly kind: \"outdated\"; readonly version: string | undefined }\n\t| { readonly kind: \"ready\"; readonly version: string };\n\nexport interface ReinstallTarget {\n\treadonly packageName: string;\n\treadonly installSpec: string;\n\treadonly ignoreScripts: boolean;\n}\n\nexport function reinstallTarget(brand: BrandProfile | undefined, packageName: string): ReinstallTarget | undefined {\n\tif (brand === undefined) return { packageName, installSpec: packageName, ignoreScripts: true };\n\tconst update = brand.update;\n\t// A brand without an update channel manages its own installs; there is no command to offer.\n\tif (update === undefined) return undefined;\n\tconst installSpec = update.distTag === \"latest\" ? update.packageName : `${update.packageName}@${update.distTag}`;\n\t// Branded products may rely on their install script; senpi documents --ignore-scripts.\n\treturn { packageName: update.packageName, installSpec, ignoreScripts: false };\n}\n\nfunction uninstallCommand(method: InstallMethod, packageName: string): string | undefined {\n\tswitch (method) {\n\t\tcase \"npm\":\n\t\t\treturn `npm uninstall -g ${packageName}`;\n\t\tcase \"pnpm\":\n\t\t\treturn `pnpm remove -g ${packageName}`;\n\t\tcase \"yarn\":\n\t\t\treturn `yarn global remove ${packageName}`;\n\t\tcase \"bun\":\n\t\tcase \"bun-binary\":\n\t\tcase \"unknown\":\n\t\t\treturn undefined;\n\t}\n}\n\n/** Clean reinstall: remove the Node-managed copy so PATH cannot keep resolving it, then add it with Bun. */\nexport function bunReinstallCommand(method: InstallMethod, target: ReinstallTarget): string {\n\tconst install = `bun add -g ${target.ignoreScripts ? \"--ignore-scripts \" : \"\"}${target.installSpec}`;\n\tconst uninstall = uninstallCommand(method, target.packageName);\n\treturn uninstall === undefined ? install : `${uninstall} && ${install}`;\n}\n\nexport function installBunCommand(platform: NodeJS.Platform): string {\n\treturn platform === \"win32\"\n\t\t? `powershell -c \"irm bun.sh/install.ps1 | iex\"`\n\t\t: \"curl -fsSL https://bun.sh/install | bash\";\n}\n\nexport interface RuntimeNoticeInput {\n\treadonly appName: string;\n\treadonly appCommand: string;\n\treadonly nodeVersion: string;\n\treadonly platform: NodeJS.Platform;\n\treadonly installMethod: InstallMethod;\n\treadonly target: ReinstallTarget | undefined;\n\treadonly bun: BunAvailability;\n\treadonly pinEnvName: string;\n}\n\nfunction bunStep(input: RuntimeNoticeInput): NoticeLine | undefined {\n\tswitch (input.bun.kind) {\n\t\tcase \"missing\":\n\t\t\treturn { text: `Install Bun: ${installBunCommand(input.platform)}`, tone: \"accent\" };\n\t\tcase \"outdated\":\n\t\t\treturn {\n\t\t\t\ttext: `Upgrade Bun (found ${input.bun.version ?? \"an unreadable version\"}, needs ${MIN_BUN_VERSION}+): bun upgrade`,\n\t\t\t\ttone: \"accent\",\n\t\t\t};\n\t\tcase \"ready\":\n\t\t\treturn undefined;\n\t}\n}\n\nfunction reinstallStep(input: RuntimeNoticeInput, afterBunStep: boolean): NoticeLine {\n\tconst lead = afterBunStep ? \"Then reinstall\" : \"Reinstall\";\n\t// A Bun-global install needs no reinstall: a current Bun takes it over on the next launch.\n\tif (input.installMethod === \"bun\" || input.target === undefined) {\n\t\treturn { text: `${afterBunStep ? \"Then restart\" : \"Restart\"} ${input.appCommand}.`, tone: \"accent\" };\n\t}\n\treturn { text: `${lead} with Bun: ${bunReinstallCommand(input.installMethod, input.target)}`, tone: \"accent\" };\n}\n\nexport function buildRuntimeNotice(input: RuntimeNoticeInput): NoticeSpec {\n\tconst first = bunStep(input);\n\tconst extra: NoticeLine[] = [\n\t\t...(first === undefined ? [] : [first]),\n\t\treinstallStep(input, first !== undefined),\n\t\t{ text: `To stay on Node.js and hide this notice, set ${input.pinEnvName}=node.` },\n\t];\n\treturn {\n\t\ttitle: \"Running on Node.js\",\n\t\ttone: \"warning\",\n\t\twhy: `${input.appName} is running on Node.js ${input.nodeVersion}. It starts faster and every feature works on Bun ${MIN_BUN_VERSION}+.`,\n\t\textra,\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/computer-tips.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;GAoCU,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function stopChord() {
|
|
2
|
+
return process.platform === "darwin" ? "Control+Option+Command+Escape" : "Ctrl+Alt+Shift+Escape";
|
|
3
|
+
}
|
|
4
|
+
export const COMPUTER_TIPS = [
|
|
5
|
+
{
|
|
6
|
+
id: "computer.what-it-is",
|
|
7
|
+
bindings: [],
|
|
8
|
+
requiresCommand: "computer",
|
|
9
|
+
render: () => "Your agent can use native apps too: screenshots, windows, clicks and typing. Run /computer to see whether this machine is ready.",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "computer.stop-chord",
|
|
13
|
+
bindings: [],
|
|
14
|
+
requiresCommand: "computer",
|
|
15
|
+
render: () => `Press ${stopChord()} at any moment to stop computer input. It stays stopped until you run /computer resume; the agent cannot resume it.`,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "computer.background-input",
|
|
19
|
+
bindings: [],
|
|
20
|
+
requiresCommand: "computer",
|
|
21
|
+
render: () => "Computer use clicks and types into the target app in the background, so your frontmost app, keyboard focus and cursor stay where you left them.",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "computer.look-dont-touch",
|
|
25
|
+
bindings: [],
|
|
26
|
+
requiresCommand: "computer",
|
|
27
|
+
render: () => "Want the agent to look but not touch? Start with --permission computer:exec=deny: screenshots and accessibility reads still work, clicks and typing are refused.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "computer.permissions",
|
|
31
|
+
bindings: [],
|
|
32
|
+
requiresCommand: "computer",
|
|
33
|
+
render: () => "On macOS, computer use needs Screen Recording and Accessibility for the app you launch from. /computer status shows which one is missing.",
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
//# sourceMappingURL=computer-tips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/computer-tips.ts"],"names":[],"mappings":"AAEA,SAAS,SAAS;IACjB,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,uBAAuB,CAAC;AAClG,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;QACC,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,GAAG,EAAE,CACZ,kIAAkI;KACnI;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,GAAG,EAAE,CACZ,SAAS,SAAS,EAAE,qHAAqH;KAC1I;IACD;QACC,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,GAAG,EAAE,CACZ,iJAAiJ;KAClJ;IACD;QACC,EAAE,EAAE,0BAA0B;QAC9B,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,GAAG,EAAE,CACZ,kKAAkK;KACnK;IACD;QACC,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,GAAG,EAAE,CACZ,2IAA2I;KAC5I;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nfunction stopChord(): string {\n\treturn process.platform === \"darwin\" ? \"Control+Option+Command+Escape\" : \"Ctrl+Alt+Shift+Escape\";\n}\n\nexport const COMPUTER_TIPS = [\n\t{\n\t\tid: \"computer.what-it-is\",\n\t\tbindings: [],\n\t\trequiresCommand: \"computer\",\n\t\trender: () =>\n\t\t\t\"Your agent can use native apps too: screenshots, windows, clicks and typing. Run /computer to see whether this machine is ready.\",\n\t},\n\t{\n\t\tid: \"computer.stop-chord\",\n\t\tbindings: [],\n\t\trequiresCommand: \"computer\",\n\t\trender: () =>\n\t\t\t`Press ${stopChord()} at any moment to stop computer input. It stays stopped until you run /computer resume; the agent cannot resume it.`,\n\t},\n\t{\n\t\tid: \"computer.background-input\",\n\t\tbindings: [],\n\t\trequiresCommand: \"computer\",\n\t\trender: () =>\n\t\t\t\"Computer use clicks and types into the target app in the background, so your frontmost app, keyboard focus and cursor stay where you left them.\",\n\t},\n\t{\n\t\tid: \"computer.look-dont-touch\",\n\t\tbindings: [],\n\t\trequiresCommand: \"computer\",\n\t\trender: () =>\n\t\t\t\"Want the agent to look but not touch? Start with --permission computer:exec=deny: screenshots and accessibility reads still work, clicks and typing are refused.\",\n\t},\n\t{\n\t\tid: \"computer.permissions\",\n\t\tbindings: [],\n\t\trequiresCommand: \"computer\",\n\t\trender: () =>\n\t\t\t\"On macOS, computer use needs Screen Recording and Accessibility for the app you launch from. /computer status shows which one is missing.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/tips/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/tips/registry.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAYnD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CLI_TIPS } from "./catalog/cli-tips.js";
|
|
2
|
+
import { COMPUTER_TIPS } from "./catalog/computer-tips.js";
|
|
2
3
|
import { DAG_TIPS } from "./catalog/dag-tips.js";
|
|
3
4
|
import { ETHOS_TIPS } from "./catalog/ethos-tips.js";
|
|
4
5
|
import { INPUT_TIPS } from "./catalog/input-tips.js";
|
|
@@ -18,6 +19,7 @@ export const TIP_DEFINITIONS = [
|
|
|
18
19
|
...SUBAGENT_TIPS,
|
|
19
20
|
...MEMORY_TIPS,
|
|
20
21
|
...DAG_TIPS,
|
|
22
|
+
...COMPUTER_TIPS,
|
|
21
23
|
...ETHOS_TIPS,
|
|
22
24
|
];
|
|
23
25
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/modes/interactive/tips/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D,MAAM,CAAC,MAAM,eAAe,GAA6B;IACxD,GAAG,UAAU;IACb,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,cAAc;IACjB,GAAG,aAAa;IAChB,GAAG,QAAQ;IACX,GAAG,aAAa;IAChB,GAAG,WAAW;IACd,GAAG,QAAQ;IACX,GAAG,UAAU;CACb,CAAC","sourcesContent":["import { CLI_TIPS } from \"./catalog/cli-tips.ts\";\nimport { DAG_TIPS } from \"./catalog/dag-tips.ts\";\nimport { ETHOS_TIPS } from \"./catalog/ethos-tips.ts\";\nimport { INPUT_TIPS } from \"./catalog/input-tips.ts\";\nimport { MEMORY_TIPS } from \"./catalog/memory-tips.ts\";\nimport { MODEL_TIPS } from \"./catalog/model-tips.ts\";\nimport { SESSION_TIPS } from \"./catalog/session-tips.ts\";\nimport { SETTINGS_TIPS } from \"./catalog/settings-tips.ts\";\nimport { SUBAGENT_TIPS } from \"./catalog/subagent-tips.ts\";\nimport type { TipDefinition } from \"./catalog/types.ts\";\nimport { WORKSPACE_TIPS } from \"./catalog/workspace-tips.ts\";\n\nexport type { TipDefinition } from \"./catalog/types.ts\";\n\nexport const TIP_DEFINITIONS: readonly TipDefinition[] = [\n\t...MODEL_TIPS,\n\t...INPUT_TIPS,\n\t...SESSION_TIPS,\n\t...WORKSPACE_TIPS,\n\t...SETTINGS_TIPS,\n\t...CLI_TIPS,\n\t...SUBAGENT_TIPS,\n\t...MEMORY_TIPS,\n\t...DAG_TIPS,\n\t...ETHOS_TIPS,\n];\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/modes/interactive/tips/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D,MAAM,CAAC,MAAM,eAAe,GAA6B;IACxD,GAAG,UAAU;IACb,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,cAAc;IACjB,GAAG,aAAa;IAChB,GAAG,QAAQ;IACX,GAAG,aAAa;IAChB,GAAG,WAAW;IACd,GAAG,QAAQ;IACX,GAAG,aAAa;IAChB,GAAG,UAAU;CACb,CAAC","sourcesContent":["import { CLI_TIPS } from \"./catalog/cli-tips.ts\";\nimport { COMPUTER_TIPS } from \"./catalog/computer-tips.ts\";\nimport { DAG_TIPS } from \"./catalog/dag-tips.ts\";\nimport { ETHOS_TIPS } from \"./catalog/ethos-tips.ts\";\nimport { INPUT_TIPS } from \"./catalog/input-tips.ts\";\nimport { MEMORY_TIPS } from \"./catalog/memory-tips.ts\";\nimport { MODEL_TIPS } from \"./catalog/model-tips.ts\";\nimport { SESSION_TIPS } from \"./catalog/session-tips.ts\";\nimport { SETTINGS_TIPS } from \"./catalog/settings-tips.ts\";\nimport { SUBAGENT_TIPS } from \"./catalog/subagent-tips.ts\";\nimport type { TipDefinition } from \"./catalog/types.ts\";\nimport { WORKSPACE_TIPS } from \"./catalog/workspace-tips.ts\";\n\nexport type { TipDefinition } from \"./catalog/types.ts\";\n\nexport const TIP_DEFINITIONS: readonly TipDefinition[] = [\n\t...MODEL_TIPS,\n\t...INPUT_TIPS,\n\t...SESSION_TIPS,\n\t...WORKSPACE_TIPS,\n\t...SETTINGS_TIPS,\n\t...CLI_TIPS,\n\t...SUBAGENT_TIPS,\n\t...MEMORY_TIPS,\n\t...DAG_TIPS,\n\t...COMPUTER_TIPS,\n\t...ETHOS_TIPS,\n];\n"]}
|
|
@@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,IAAI,CAAC,CAAC;IAC9B,sEAAsE;IACtE,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,kBAAkB,IAAI,IAAI,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC;IAC/B,4EAA4E;IAC5E,gCAAgC,IAAI,IAAI,CAAC;IACzC,iFAAiF;IACjF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AA4BD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,eAAe,CAAC,EAAE,gBAAgB,GAAG,eAAe,CA0D/G;AAkED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACzC,WAAW,EAAE,mBAAmB,EAChC,IAAI,EAAE,iBAAiB,EACvB,OAAO,GAAE,oBAAyB,GAChC,oBAAoB,CA+jDtB"}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import * as crypto from "node:crypto";
|
|
18
18
|
import { existsSync } from "node:fs";
|
|
19
19
|
import { basename, dirname, extname } from "node:path";
|
|
20
|
+
import { sanitizeProviderDiagnostic } from "@earendil-works/pi-ai";
|
|
20
21
|
import { VERSION } from "../../config.js";
|
|
21
22
|
import { buildLoginProviderInfos } from "../../core/auth-providers.js";
|
|
22
23
|
import { getCredentialAccounts, pinCredentialAccount, removeCredentialAccount, } from "../../core/credential-accounts.js";
|
|
@@ -96,12 +97,14 @@ export function buildRpcSessionState(session, lastAbortSource) {
|
|
|
96
97
|
throw new Error("RPC session invariant violated: agentDir is required");
|
|
97
98
|
}
|
|
98
99
|
const projectTrusted = new ProjectTrustStore(session.agentDir).get(cwd) === true;
|
|
100
|
+
const lastProviderDiagnostic = sanitizeProviderDiagnostic(session.agent.state.providerDiagnostic);
|
|
99
101
|
return {
|
|
100
102
|
pendingQuestions: sessionQuestionBridges.get(session)?.pendingQuestions(),
|
|
101
103
|
model: session.model,
|
|
102
104
|
thinkingLevel: session.thinkingLevel,
|
|
103
105
|
...(session.thinkingSelection ? { thinkingSelection: session.thinkingSelection } : {}),
|
|
104
106
|
...(lastAbortSource ? { lastAbortSource } : {}),
|
|
107
|
+
...(lastProviderDiagnostic ? { lastProviderDiagnostic } : {}),
|
|
105
108
|
serviceTier: session.effectiveServiceTier,
|
|
106
109
|
fastMode: session.isFastModeActive(),
|
|
107
110
|
isStreaming: session.isStreaming,
|