@vascend/talos 0.1.0
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/README.md +202 -0
- package/dist/backend/asset-events.d.ts +31 -0
- package/dist/backend/asset-events.js +149 -0
- package/dist/backend/assets.d.ts +31 -0
- package/dist/backend/assets.js +210 -0
- package/dist/backend/auth.d.ts +18 -0
- package/dist/backend/auth.js +59 -0
- package/dist/backend/config.d.ts +14 -0
- package/dist/backend/config.js +41 -0
- package/dist/backend/conversations.d.ts +21 -0
- package/dist/backend/conversations.js +141 -0
- package/dist/backend/crypto.d.ts +9 -0
- package/dist/backend/crypto.js +68 -0
- package/dist/backend/engine.d.ts +13 -0
- package/dist/backend/engine.js +78 -0
- package/dist/backend/http.d.ts +25 -0
- package/dist/backend/http.js +112 -0
- package/dist/backend/index.d.ts +1 -0
- package/dist/backend/index.js +24 -0
- package/dist/backend/routes.d.ts +14 -0
- package/dist/backend/routes.js +169 -0
- package/dist/backend/sdk.d.ts +12 -0
- package/dist/backend/sdk.js +11 -0
- package/dist/backend/server.d.ts +12 -0
- package/dist/backend/server.js +91 -0
- package/dist/backend/temp-image-store.d.ts +46 -0
- package/dist/backend/temp-image-store.js +197 -0
- package/dist/backend/types.d.ts +103 -0
- package/dist/backend/types.js +29 -0
- package/dist/backend/users.d.ts +13 -0
- package/dist/backend/users.js +76 -0
- package/dist/backend/ws-handler.d.ts +14 -0
- package/dist/backend/ws-handler.js +72 -0
- package/dist/backend/ws.d.ts +19 -0
- package/dist/backend/ws.js +146 -0
- package/dist/core/agent.d.ts +56 -0
- package/dist/core/agent.js +1783 -0
- package/dist/core/background.d.ts +45 -0
- package/dist/core/background.js +140 -0
- package/dist/core/bootstrap.d.ts +45 -0
- package/dist/core/bootstrap.js +294 -0
- package/dist/core/cli-args.d.ts +41 -0
- package/dist/core/cli-args.js +282 -0
- package/dist/core/collapsible-output.d.ts +38 -0
- package/dist/core/collapsible-output.js +143 -0
- package/dist/core/compaction-checkpoint.d.ts +9 -0
- package/dist/core/compaction-checkpoint.js +58 -0
- package/dist/core/compaction.d.ts +42 -0
- package/dist/core/compaction.js +270 -0
- package/dist/core/config.d.ts +49 -0
- package/dist/core/config.js +417 -0
- package/dist/core/context-ledger.d.ts +99 -0
- package/dist/core/context-ledger.js +222 -0
- package/dist/core/context-policy.d.ts +17 -0
- package/dist/core/context-policy.js +81 -0
- package/dist/core/continuation-review.d.ts +23 -0
- package/dist/core/continuation-review.js +64 -0
- package/dist/core/crash-report.d.ts +3 -0
- package/dist/core/crash-report.js +27 -0
- package/dist/core/credentials.d.ts +11 -0
- package/dist/core/credentials.js +183 -0
- package/dist/core/doctor.d.ts +24 -0
- package/dist/core/doctor.js +125 -0
- package/dist/core/effort.d.ts +5 -0
- package/dist/core/effort.js +42 -0
- package/dist/core/env-paths.d.ts +3 -0
- package/dist/core/env-paths.js +38 -0
- package/dist/core/execution-guidance.d.ts +9 -0
- package/dist/core/execution-guidance.js +73 -0
- package/dist/core/execution-target.d.ts +41 -0
- package/dist/core/execution-target.js +69 -0
- package/dist/core/file-coordination.d.ts +66 -0
- package/dist/core/file-coordination.js +176 -0
- package/dist/core/file-lease-store.d.ts +14 -0
- package/dist/core/file-lease-store.js +89 -0
- package/dist/core/image-limits.d.ts +26 -0
- package/dist/core/image-limits.js +205 -0
- package/dist/core/interruptible-completion.d.ts +3 -0
- package/dist/core/interruptible-completion.js +42 -0
- package/dist/core/kingdoms-mode-state.d.ts +24 -0
- package/dist/core/kingdoms-mode-state.js +139 -0
- package/dist/core/licenza.d.ts +38 -0
- package/dist/core/licenza.js +125 -0
- package/dist/core/model-limits.d.ts +2 -0
- package/dist/core/model-limits.js +36 -0
- package/dist/core/output-lifecycle.d.ts +44 -0
- package/dist/core/output-lifecycle.js +190 -0
- package/dist/core/package-update.d.ts +15 -0
- package/dist/core/package-update.js +121 -0
- package/dist/core/permission-queue.d.ts +2 -0
- package/dist/core/permission-queue.js +20 -0
- package/dist/core/prompt-attachment.d.ts +21 -0
- package/dist/core/prompt-attachment.js +123 -0
- package/dist/core/request-plan.d.ts +16 -0
- package/dist/core/request-plan.js +36 -0
- package/dist/core/run-timing.d.ts +17 -0
- package/dist/core/run-timing.js +123 -0
- package/dist/core/self-update.d.ts +17 -0
- package/dist/core/self-update.js +54 -0
- package/dist/core/session-refs.d.ts +27 -0
- package/dist/core/session-refs.js +126 -0
- package/dist/core/session-storage.d.ts +4 -0
- package/dist/core/session-storage.js +48 -0
- package/dist/core/session-title.d.ts +1 -0
- package/dist/core/session-title.js +21 -0
- package/dist/core/session-usage.d.ts +17 -0
- package/dist/core/session-usage.js +74 -0
- package/dist/core/session.d.ts +58 -0
- package/dist/core/session.js +296 -0
- package/dist/core/settings.d.ts +17 -0
- package/dist/core/settings.js +107 -0
- package/dist/core/storage-retention.d.ts +21 -0
- package/dist/core/storage-retention.js +227 -0
- package/dist/core/text-sanitize.d.ts +1 -0
- package/dist/core/text-sanitize.js +35 -0
- package/dist/core/tool-artifacts.d.ts +6 -0
- package/dist/core/tool-artifacts.js +51 -0
- package/dist/core/tool-compress.d.ts +8 -0
- package/dist/core/tool-compress.js +111 -0
- package/dist/core/tool-executor.d.ts +16 -0
- package/dist/core/tool-executor.js +97 -0
- package/dist/core/tool-result-index.d.ts +52 -0
- package/dist/core/tool-result-index.js +327 -0
- package/dist/core/tool-result-store.d.ts +38 -0
- package/dist/core/tool-result-store.js +190 -0
- package/dist/core/tool-scheduler.d.ts +16 -0
- package/dist/core/tool-scheduler.js +35 -0
- package/dist/core/trust.d.ts +21 -0
- package/dist/core/trust.js +95 -0
- package/dist/core/types.d.ts +402 -0
- package/dist/core/types.js +1 -0
- package/dist/core/update-check.d.ts +26 -0
- package/dist/core/update-check.js +89 -0
- package/dist/core/update-process.d.ts +10 -0
- package/dist/core/update-process.js +31 -0
- package/dist/core/user-inbox.d.ts +23 -0
- package/dist/core/user-inbox.js +56 -0
- package/dist/core/user-input.d.ts +10 -0
- package/dist/core/user-input.js +35 -0
- package/dist/core/version.d.ts +1 -0
- package/dist/core/version.js +10 -0
- package/dist/core/vibe-modes.d.ts +38 -0
- package/dist/core/vibe-modes.js +383 -0
- package/dist/core/workspace-roots.d.ts +13 -0
- package/dist/core/workspace-roots.js +91 -0
- package/dist/core/workspace-sessions.d.ts +51 -0
- package/dist/core/workspace-sessions.js +243 -0
- package/dist/cowork/client.d.ts +29 -0
- package/dist/cowork/client.js +49 -0
- package/dist/cowork/engine-bridge.d.ts +22 -0
- package/dist/cowork/engine-bridge.js +98 -0
- package/dist/cowork/index.d.ts +11 -0
- package/dist/cowork/index.js +16 -0
- package/dist/cowork/ipc.d.ts +97 -0
- package/dist/cowork/ipc.js +96 -0
- package/dist/cowork/manager.d.ts +66 -0
- package/dist/cowork/manager.js +325 -0
- package/dist/cowork/store.d.ts +23 -0
- package/dist/cowork/store.js +182 -0
- package/dist/cowork/sync.d.ts +20 -0
- package/dist/cowork/sync.js +164 -0
- package/dist/cowork/types.d.ts +78 -0
- package/dist/cowork/types.js +21 -0
- package/dist/extensions/ext-tools.d.ts +3 -0
- package/dist/extensions/ext-tools.js +73 -0
- package/dist/extensions/loader.d.ts +91 -0
- package/dist/extensions/loader.js +474 -0
- package/dist/extensions/settings.d.ts +20 -0
- package/dist/extensions/settings.js +86 -0
- package/dist/extensions/types.d.ts +219 -0
- package/dist/extensions/types.js +1 -0
- package/dist/horizon/async-queue.d.ts +9 -0
- package/dist/horizon/async-queue.js +46 -0
- package/dist/horizon/engine.d.ts +85 -0
- package/dist/horizon/engine.js +603 -0
- package/dist/horizon/index.d.ts +4 -0
- package/dist/horizon/index.js +2 -0
- package/dist/horizon/main-team.d.ts +163 -0
- package/dist/horizon/main-team.js +774 -0
- package/dist/horizon/types.d.ts +233 -0
- package/dist/horizon/types.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +233 -0
- package/dist/mcp/protocol.d.ts +81 -0
- package/dist/mcp/protocol.js +122 -0
- package/dist/package.json +1 -0
- package/dist/packages/packages.d.ts +12 -0
- package/dist/packages/packages.js +323 -0
- package/dist/prompts/templates.d.ts +13 -0
- package/dist/prompts/templates.js +139 -0
- package/dist/providers/anthropic-oauth.d.ts +13 -0
- package/dist/providers/anthropic-oauth.js +124 -0
- package/dist/providers/anthropic.d.ts +27 -0
- package/dist/providers/anthropic.js +526 -0
- package/dist/providers/catalog.d.ts +15 -0
- package/dist/providers/catalog.js +166 -0
- package/dist/providers/effort.d.ts +12 -0
- package/dist/providers/effort.js +102 -0
- package/dist/providers/model-catalog.d.ts +43 -0
- package/dist/providers/model-catalog.js +70 -0
- package/dist/providers/model-effort.d.ts +5 -0
- package/dist/providers/model-effort.js +43 -0
- package/dist/providers/model-registry.d.ts +39 -0
- package/dist/providers/model-registry.js +142 -0
- package/dist/providers/models-dev.d.ts +9 -0
- package/dist/providers/models-dev.js +97 -0
- package/dist/providers/oauth-callback-server.d.ts +28 -0
- package/dist/providers/oauth-callback-server.js +184 -0
- package/dist/providers/oauth-orchestrator.d.ts +58 -0
- package/dist/providers/oauth-orchestrator.js +159 -0
- package/dist/providers/oauth-store.d.ts +12 -0
- package/dist/providers/oauth-store.js +139 -0
- package/dist/providers/open-browser.d.ts +20 -0
- package/dist/providers/open-browser.js +92 -0
- package/dist/providers/openai-compat.d.ts +14 -0
- package/dist/providers/openai-compat.js +523 -0
- package/dist/providers/openai-oauth.d.ts +15 -0
- package/dist/providers/openai-oauth.js +382 -0
- package/dist/providers/openrouter-auth.d.ts +73 -0
- package/dist/providers/openrouter-auth.js +321 -0
- package/dist/providers/openrouter-manual-fallback.d.ts +25 -0
- package/dist/providers/openrouter-manual-fallback.js +161 -0
- package/dist/providers/openrouter.d.ts +15 -0
- package/dist/providers/openrouter.js +107 -0
- package/dist/providers/plan-limits.d.ts +6 -0
- package/dist/providers/plan-limits.js +175 -0
- package/dist/providers/provider-reset.d.ts +4 -0
- package/dist/providers/provider-reset.js +83 -0
- package/dist/providers/quota-limits.d.ts +4 -0
- package/dist/providers/quota-limits.js +33 -0
- package/dist/providers/registry.d.ts +33 -0
- package/dist/providers/registry.js +213 -0
- package/dist/providers/retry.d.ts +37 -0
- package/dist/providers/retry.js +347 -0
- package/dist/rpc/server.d.ts +23 -0
- package/dist/rpc/server.js +222 -0
- package/dist/sdk.d.ts +67 -0
- package/dist/sdk.js +64 -0
- package/dist/skills/skills.d.ts +17 -0
- package/dist/skills/skills.js +155 -0
- package/dist/text-sanitize.js +28 -0
- package/dist/tools/ask-user.d.ts +2 -0
- package/dist/tools/ask-user.js +60 -0
- package/dist/tools/builtin.d.ts +48 -0
- package/dist/tools/builtin.js +2494 -0
- package/dist/tools/capabilities.d.ts +5 -0
- package/dist/tools/capabilities.js +55 -0
- package/dist/tools/computer-capture.d.ts +2 -0
- package/dist/tools/computer-capture.js +91 -0
- package/dist/tools/computer-posix.d.ts +5 -0
- package/dist/tools/computer-posix.js +136 -0
- package/dist/tools/computer-use.d.ts +14 -0
- package/dist/tools/computer-use.js +108 -0
- package/dist/tools/discovery.d.ts +12 -0
- package/dist/tools/discovery.js +205 -0
- package/dist/tools/execute.d.ts +2 -0
- package/dist/tools/execute.js +73 -0
- package/dist/tools/normalize-input.d.ts +17 -0
- package/dist/tools/normalize-input.js +174 -0
- package/dist/tools/output-artifact.d.ts +3 -0
- package/dist/tools/output-artifact.js +80 -0
- package/dist/tools/pagination.d.ts +15 -0
- package/dist/tools/pagination.js +93 -0
- package/dist/tools/plan-status.d.ts +2 -0
- package/dist/tools/plan-status.js +109 -0
- package/dist/tools/program-input.d.ts +3 -0
- package/dist/tools/program-input.js +19 -0
- package/dist/tools/program.d.ts +3 -0
- package/dist/tools/program.js +567 -0
- package/dist/tools/protocol-catalog.d.ts +12 -0
- package/dist/tools/protocol-catalog.js +46 -0
- package/dist/tools/ramification-tools.d.ts +12 -0
- package/dist/tools/ramification-tools.js +528 -0
- package/dist/tools/regex-compat.d.ts +9 -0
- package/dist/tools/regex-compat.js +96 -0
- package/dist/tools/registry.d.ts +51 -0
- package/dist/tools/registry.js +185 -0
- package/dist/tools/resolve.d.ts +2 -0
- package/dist/tools/resolve.js +107 -0
- package/dist/tools/shell-env.d.ts +2 -0
- package/dist/tools/shell-env.js +7 -0
- package/dist/tools/team-input.d.ts +3 -0
- package/dist/tools/team-input.js +129 -0
- package/dist/tools/team-tools.d.ts +7 -0
- package/dist/tools/team-tools.js +348 -0
- package/dist/tools/workspace-sessions.d.ts +2 -0
- package/dist/tools/workspace-sessions.js +35 -0
- package/dist/tui/account-entry.d.ts +1 -0
- package/dist/tui/account-entry.js +93 -0
- package/dist/tui/attachment-highlight.d.ts +1 -0
- package/dist/tui/attachment-highlight.js +24 -0
- package/dist/tui/attachment-refs.d.ts +2 -0
- package/dist/tui/attachment-refs.js +3 -0
- package/dist/tui/bottom-input.d.ts +219 -0
- package/dist/tui/bottom-input.js +1958 -0
- package/dist/tui/branding.d.ts +107 -0
- package/dist/tui/branding.js +750 -0
- package/dist/tui/clipboard-image.d.ts +10 -0
- package/dist/tui/clipboard-image.js +163 -0
- package/dist/tui/clipboard-text.d.ts +9 -0
- package/dist/tui/clipboard-text.js +51 -0
- package/dist/tui/clipboard-windows.d.ts +8 -0
- package/dist/tui/clipboard-windows.js +84 -0
- package/dist/tui/collapsible-command.d.ts +15 -0
- package/dist/tui/collapsible-command.js +48 -0
- package/dist/tui/command-feedback.d.ts +10 -0
- package/dist/tui/command-feedback.js +46 -0
- package/dist/tui/command-output-registry.d.ts +28 -0
- package/dist/tui/command-output-registry.js +103 -0
- package/dist/tui/command-transcript.d.ts +12 -0
- package/dist/tui/command-transcript.js +90 -0
- package/dist/tui/commands.d.ts +20 -0
- package/dist/tui/commands.js +131 -0
- package/dist/tui/context-bar.d.ts +4 -0
- package/dist/tui/context-bar.js +74 -0
- package/dist/tui/context-meter.d.ts +25 -0
- package/dist/tui/context-meter.js +81 -0
- package/dist/tui/cost-binding.d.ts +8 -0
- package/dist/tui/cost-binding.js +43 -0
- package/dist/tui/cost-tracker.d.ts +49 -0
- package/dist/tui/cost-tracker.js +122 -0
- package/dist/tui/diff.d.ts +9 -0
- package/dist/tui/diff.js +119 -0
- package/dist/tui/i18n-catalog.d.ts +5 -0
- package/dist/tui/i18n-catalog.js +184 -0
- package/dist/tui/i18n.d.ts +6 -0
- package/dist/tui/i18n.js +10 -0
- package/dist/tui/image-attachments.d.ts +46 -0
- package/dist/tui/image-attachments.js +167 -0
- package/dist/tui/images.d.ts +12 -0
- package/dist/tui/images.js +87 -0
- package/dist/tui/intro.d.ts +13 -0
- package/dist/tui/intro.js +109 -0
- package/dist/tui/language-preference.d.ts +6 -0
- package/dist/tui/language-preference.js +24 -0
- package/dist/tui/live-output.d.ts +2 -0
- package/dist/tui/live-output.js +18 -0
- package/dist/tui/locales.d.ts +19 -0
- package/dist/tui/locales.js +22 -0
- package/dist/tui/login-menu.d.ts +17 -0
- package/dist/tui/login-menu.js +58 -0
- package/dist/tui/logo.d.ts +8 -0
- package/dist/tui/logo.js +305 -0
- package/dist/tui/markdown-inline.d.ts +3 -0
- package/dist/tui/markdown-inline.js +99 -0
- package/dist/tui/markdown-table.d.ts +4 -0
- package/dist/tui/markdown-table.js +63 -0
- package/dist/tui/markdown.d.ts +11 -0
- package/dist/tui/markdown.js +257 -0
- package/dist/tui/mcp-transcript.d.ts +7 -0
- package/dist/tui/mcp-transcript.js +40 -0
- package/dist/tui/model-details.d.ts +2 -0
- package/dist/tui/model-details.js +21 -0
- package/dist/tui/model-selection.d.ts +7 -0
- package/dist/tui/model-selection.js +41 -0
- package/dist/tui/native-scrollback.d.ts +27 -0
- package/dist/tui/native-scrollback.js +134 -0
- package/dist/tui/onboarding.d.ts +72 -0
- package/dist/tui/onboarding.js +207 -0
- package/dist/tui/paste-collapse.d.ts +39 -0
- package/dist/tui/paste-collapse.js +117 -0
- package/dist/tui/perm-mode.d.ts +8 -0
- package/dist/tui/perm-mode.js +41 -0
- package/dist/tui/prompt-queue-store.d.ts +26 -0
- package/dist/tui/prompt-queue-store.js +87 -0
- package/dist/tui/prompt-queue.d.ts +47 -0
- package/dist/tui/prompt-queue.js +187 -0
- package/dist/tui/provider-menu.d.ts +33 -0
- package/dist/tui/provider-menu.js +175 -0
- package/dist/tui/question.d.ts +24 -0
- package/dist/tui/question.js +32 -0
- package/dist/tui/queue-screen.d.ts +25 -0
- package/dist/tui/queue-screen.js +152 -0
- package/dist/tui/queue-team.d.ts +3 -0
- package/dist/tui/queue-team.js +28 -0
- package/dist/tui/queued-questions.d.ts +20 -0
- package/dist/tui/queued-questions.js +163 -0
- package/dist/tui/quick-help.d.ts +1 -0
- package/dist/tui/quick-help.js +53 -0
- package/dist/tui/repl.d.ts +78 -0
- package/dist/tui/repl.js +4130 -0
- package/dist/tui/restore-queued-input.d.ts +3 -0
- package/dist/tui/restore-queued-input.js +20 -0
- package/dist/tui/review-detail.d.ts +6 -0
- package/dist/tui/review-detail.js +56 -0
- package/dist/tui/review-files.d.ts +3 -0
- package/dist/tui/review-files.js +22 -0
- package/dist/tui/review-render.d.ts +22 -0
- package/dist/tui/review-render.js +98 -0
- package/dist/tui/review-screen.d.ts +38 -0
- package/dist/tui/review-screen.js +358 -0
- package/dist/tui/review-store.d.ts +60 -0
- package/dist/tui/review-store.js +270 -0
- package/dist/tui/review-team.d.ts +2 -0
- package/dist/tui/review-team.js +27 -0
- package/dist/tui/selector-mouse.d.ts +26 -0
- package/dist/tui/selector-mouse.js +65 -0
- package/dist/tui/selector.d.ts +51 -0
- package/dist/tui/selector.js +299 -0
- package/dist/tui/session-replay.d.ts +10 -0
- package/dist/tui/session-replay.js +78 -0
- package/dist/tui/session-usage.d.ts +22 -0
- package/dist/tui/session-usage.js +55 -0
- package/dist/tui/skill-transcript.d.ts +5 -0
- package/dist/tui/skill-transcript.js +31 -0
- package/dist/tui/startup.d.ts +5 -0
- package/dist/tui/startup.js +61 -0
- package/dist/tui/status-line-loader.d.ts +8 -0
- package/dist/tui/status-line-loader.js +33 -0
- package/dist/tui/status-line.d.ts +38 -0
- package/dist/tui/status-line.js +213 -0
- package/dist/tui/system-language.d.ts +8 -0
- package/dist/tui/system-language.js +41 -0
- package/dist/tui/task-labels.d.ts +2 -0
- package/dist/tui/task-labels.js +7 -0
- package/dist/tui/term-bg.d.ts +4 -0
- package/dist/tui/term-bg.js +67 -0
- package/dist/tui/terminal-screen.d.ts +12 -0
- package/dist/tui/terminal-screen.js +1 -0
- package/dist/tui/terminal-text.d.ts +7 -0
- package/dist/tui/terminal-text.js +123 -0
- package/dist/tui/theme.d.ts +25 -0
- package/dist/tui/theme.js +383 -0
- package/dist/tui/tool-style.d.ts +7 -0
- package/dist/tui/tool-style.js +119 -0
- package/dist/tui/update-prompt.d.ts +14 -0
- package/dist/tui/update-prompt.js +104 -0
- package/dist/tui/usage-footer.d.ts +9 -0
- package/dist/tui/usage-footer.js +123 -0
- package/dist/tui/vascend-login.d.ts +68 -0
- package/dist/tui/vascend-login.js +355 -0
- package/dist/tui/web-login.d.ts +28 -0
- package/dist/tui/web-login.js +115 -0
- package/dist/vascend/activity-status.d.ts +12 -0
- package/dist/vascend/activity-status.js +68 -0
- package/dist/vascend/architecture-map.d.ts +73 -0
- package/dist/vascend/architecture-map.js +424 -0
- package/dist/vascend/attention-layout.d.ts +19 -0
- package/dist/vascend/attention-layout.js +141 -0
- package/dist/vascend/budget-allocator.d.ts +31 -0
- package/dist/vascend/budget-allocator.js +79 -0
- package/dist/vascend/candidate-collector.d.ts +20 -0
- package/dist/vascend/candidate-collector.js +220 -0
- package/dist/vascend/code-events.d.ts +24 -0
- package/dist/vascend/code-events.js +304 -0
- package/dist/vascend/code-graph-memory.d.ts +38 -0
- package/dist/vascend/code-graph-memory.js +334 -0
- package/dist/vascend/code-graph-runtime.d.ts +19 -0
- package/dist/vascend/code-graph-runtime.js +190 -0
- package/dist/vascend/code-graph-types.d.ts +58 -0
- package/dist/vascend/code-graph-types.js +50 -0
- package/dist/vascend/code-parser.d.ts +4 -0
- package/dist/vascend/code-parser.js +257 -0
- package/dist/vascend/competitor-knowledge.d.ts +53 -0
- package/dist/vascend/competitor-knowledge.js +262 -0
- package/dist/vascend/completeness.d.ts +16 -0
- package/dist/vascend/completeness.js +90 -0
- package/dist/vascend/context-autotuner.d.ts +45 -0
- package/dist/vascend/context-autotuner.js +231 -0
- package/dist/vascend/context-candidate.d.ts +45 -0
- package/dist/vascend/context-candidate.js +150 -0
- package/dist/vascend/context-capsule.d.ts +51 -0
- package/dist/vascend/context-capsule.js +133 -0
- package/dist/vascend/context-fabric.d.ts +108 -0
- package/dist/vascend/context-fabric.js +480 -0
- package/dist/vascend/context-feedback-loop.d.ts +56 -0
- package/dist/vascend/context-feedback-loop.js +204 -0
- package/dist/vascend/context-learning-identity.d.ts +4 -0
- package/dist/vascend/context-learning-identity.js +8 -0
- package/dist/vascend/context-links.d.ts +14 -0
- package/dist/vascend/context-links.js +83 -0
- package/dist/vascend/context-lint.d.ts +22 -0
- package/dist/vascend/context-lint.js +91 -0
- package/dist/vascend/context-market-selection.d.ts +17 -0
- package/dist/vascend/context-market-selection.js +50 -0
- package/dist/vascend/context-metrics.d.ts +25 -0
- package/dist/vascend/context-metrics.js +57 -0
- package/dist/vascend/context-pack-render.d.ts +16 -0
- package/dist/vascend/context-pack-render.js +52 -0
- package/dist/vascend/context-pareto.d.ts +33 -0
- package/dist/vascend/context-pareto.js +165 -0
- package/dist/vascend/context-pattern-explorer.d.ts +41 -0
- package/dist/vascend/context-pattern-explorer.js +276 -0
- package/dist/vascend/context-regret.d.ts +32 -0
- package/dist/vascend/context-regret.js +93 -0
- package/dist/vascend/context-retriever.d.ts +22 -0
- package/dist/vascend/context-retriever.js +243 -0
- package/dist/vascend/context-scope-index.d.ts +5 -0
- package/dist/vascend/context-scope-index.js +96 -0
- package/dist/vascend/context-scorer.d.ts +35 -0
- package/dist/vascend/context-scorer.js +162 -0
- package/dist/vascend/context-search-index.d.ts +12 -0
- package/dist/vascend/context-search-index.js +25 -0
- package/dist/vascend/context-snapshot.d.ts +22 -0
- package/dist/vascend/context-snapshot.js +135 -0
- package/dist/vascend/context-window-compiler.d.ts +42 -0
- package/dist/vascend/context-window-compiler.js +237 -0
- package/dist/vascend/contract-memory.d.ts +61 -0
- package/dist/vascend/contract-memory.js +435 -0
- package/dist/vascend/council.d.ts +58 -0
- package/dist/vascend/council.js +337 -0
- package/dist/vascend/decision-promotion.d.ts +48 -0
- package/dist/vascend/decision-promotion.js +410 -0
- package/dist/vascend/delta-context.d.ts +12 -0
- package/dist/vascend/delta-context.js +36 -0
- package/dist/vascend/dev-context-compiler.d.ts +27 -0
- package/dist/vascend/dev-context-compiler.js +133 -0
- package/dist/vascend/dev-context-layout.d.ts +30 -0
- package/dist/vascend/dev-context-layout.js +262 -0
- package/dist/vascend/evidence-slots.d.ts +14 -0
- package/dist/vascend/evidence-slots.js +55 -0
- package/dist/vascend/expansion-levels.d.ts +15 -0
- package/dist/vascend/expansion-levels.js +178 -0
- package/dist/vascend/file-lock.d.ts +7 -0
- package/dist/vascend/file-lock.js +95 -0
- package/dist/vascend/granular-kingdom.d.ts +25 -0
- package/dist/vascend/granular-kingdom.js +259 -0
- package/dist/vascend/granular-launcher.d.ts +48 -0
- package/dist/vascend/granular-launcher.js +202 -0
- package/dist/vascend/kingdom-bus.d.ts +25 -0
- package/dist/vascend/kingdom-bus.js +54 -0
- package/dist/vascend/kingdom-channel.d.ts +22 -0
- package/dist/vascend/kingdom-channel.js +180 -0
- package/dist/vascend/kingdom-kpi.d.ts +48 -0
- package/dist/vascend/kingdom-kpi.js +172 -0
- package/dist/vascend/kingdom-live.d.ts +28 -0
- package/dist/vascend/kingdom-live.js +61 -0
- package/dist/vascend/kingdom-run.d.ts +18 -0
- package/dist/vascend/kingdom-run.js +506 -0
- package/dist/vascend/kingdom-scribe.d.ts +20 -0
- package/dist/vascend/kingdom-scribe.js +52 -0
- package/dist/vascend/kingdom.d.ts +79 -0
- package/dist/vascend/kingdom.js +870 -0
- package/dist/vascend/lexical-index.d.ts +10 -0
- package/dist/vascend/lexical-index.js +99 -0
- package/dist/vascend/lexical-search.d.ts +29 -0
- package/dist/vascend/lexical-search.js +262 -0
- package/dist/vascend/long-term-context.d.ts +51 -0
- package/dist/vascend/long-term-context.js +194 -0
- package/dist/vascend/mandate.d.ts +33 -0
- package/dist/vascend/mandate.js +107 -0
- package/dist/vascend/memory-packet.d.ts +13 -0
- package/dist/vascend/memory-packet.js +155 -0
- package/dist/vascend/memory-status.d.ts +22 -0
- package/dist/vascend/memory-status.js +73 -0
- package/dist/vascend/memory-store.d.ts +62 -0
- package/dist/vascend/memory-store.js +273 -0
- package/dist/vascend/objective-revision.d.ts +69 -0
- package/dist/vascend/objective-revision.js +319 -0
- package/dist/vascend/patch-plan-store.d.ts +33 -0
- package/dist/vascend/patch-plan-store.js +240 -0
- package/dist/vascend/patch-plan.d.ts +97 -0
- package/dist/vascend/patch-plan.js +345 -0
- package/dist/vascend/plan-progress.d.ts +11 -0
- package/dist/vascend/plan-progress.js +68 -0
- package/dist/vascend/plan-store.d.ts +64 -0
- package/dist/vascend/plan-store.js +460 -0
- package/dist/vascend/proof-chains.d.ts +19 -0
- package/dist/vascend/proof-chains.js +120 -0
- package/dist/vascend/ramification-store.d.ts +25 -0
- package/dist/vascend/ramification-store.js +94 -0
- package/dist/vascend/ramification.d.ts +193 -0
- package/dist/vascend/ramification.js +583 -0
- package/dist/vascend/recall-planner.d.ts +17 -0
- package/dist/vascend/recall-planner.js +109 -0
- package/dist/vascend/requirements.d.ts +31 -0
- package/dist/vascend/requirements.js +151 -0
- package/dist/vascend/reviewer.d.ts +9 -0
- package/dist/vascend/reviewer.js +93 -0
- package/dist/vascend/room-graph.d.ts +29 -0
- package/dist/vascend/room-graph.js +242 -0
- package/dist/vascend/room-memory.d.ts +57 -0
- package/dist/vascend/room-memory.js +631 -0
- package/dist/vascend/runtime.d.ts +84 -0
- package/dist/vascend/runtime.js +286 -0
- package/dist/vascend/self-improve.d.ts +104 -0
- package/dist/vascend/self-improve.js +396 -0
- package/dist/vascend/session-search.d.ts +52 -0
- package/dist/vascend/session-search.js +349 -0
- package/dist/vascend/supersession-graph.d.ts +14 -0
- package/dist/vascend/supersession-graph.js +70 -0
- package/dist/vascend/team-areas.d.ts +9 -0
- package/dist/vascend/team-areas.js +28 -0
- package/dist/vascend/team-handoff.d.ts +24 -0
- package/dist/vascend/team-handoff.js +37 -0
- package/dist/vascend/team-scheduler.d.ts +13 -0
- package/dist/vascend/team-scheduler.js +74 -0
- package/dist/vascend/team-session.d.ts +42 -0
- package/dist/vascend/team-session.js +142 -0
- package/dist/vascend/test-failure-memory.d.ts +76 -0
- package/dist/vascend/test-failure-memory.js +354 -0
- package/dist/vascend/token-market.d.ts +42 -0
- package/dist/vascend/token-market.js +144 -0
- package/dist/vascend/tuner-baseline-store.d.ts +52 -0
- package/dist/vascend/tuner-baseline-store.js +446 -0
- package/dist/vascend/user-profile.d.ts +44 -0
- package/dist/vascend/user-profile.js +131 -0
- package/dist/vascend/vision.d.ts +94 -0
- package/dist/vascend/vision.js +375 -0
- package/dist/vascend/work-agent.d.ts +12 -0
- package/dist/vascend/work-agent.js +83 -0
- package/dist/vascend/work-queue.d.ts +62 -0
- package/dist/vascend/work-queue.js +255 -0
- package/dist/vascend/work-runner.d.ts +64 -0
- package/dist/vascend/work-runner.js +137 -0
- package/dist/vascend/worktree.d.ts +38 -0
- package/dist/vascend/worktree.js +206 -0
- package/dist/vendor/computer-use/README.md +7 -0
- package/dist/vendor/computer-use/computer-desktop.js +211 -0
- package/dist/vendor/computer-use/computer-observe.js +315 -0
- package/dist/vendor/computer-use/computer-scripts.js +1230 -0
- package/dist/vendor/computer-use/computer-tools.js +2136 -0
- package/dist/vendor/computer-use/package.json +1 -0
- package/dist/vendor/computer-use/rac/atomic-input.js +91 -0
- package/dist/vendor/computer-use/rac/grammatica.js +101 -0
- package/dist/vendor/computer-use/rac/parser.js +185 -0
- package/dist/vendor/computer-use/rac/protocol.js +136 -0
- package/install.ps1 +30 -0
- package/install.sh +50 -0
- package/package.json +56 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
// Sistema temi a token, parita' con Pi: ogni tema definisce tutti i token di
|
|
5
|
+
// colore; i valori sono hex (#rrggbb), indice palette 256 (0-255), riferimento
|
|
6
|
+
// a una var, o "" per il default del terminale. Default brand = argento/grafite.
|
|
7
|
+
export const THEME_TOKENS = [
|
|
8
|
+
"accent",
|
|
9
|
+
"border",
|
|
10
|
+
"borderAccent",
|
|
11
|
+
"borderMuted",
|
|
12
|
+
"success",
|
|
13
|
+
"error",
|
|
14
|
+
"warning",
|
|
15
|
+
"muted",
|
|
16
|
+
"dim",
|
|
17
|
+
"text",
|
|
18
|
+
"thinkingText",
|
|
19
|
+
"selectedBg",
|
|
20
|
+
"userMessageBg",
|
|
21
|
+
"userMessageText",
|
|
22
|
+
"attachmentRef",
|
|
23
|
+
"customMessageBg",
|
|
24
|
+
"customMessageText",
|
|
25
|
+
"customMessageLabel",
|
|
26
|
+
"toolPendingBg",
|
|
27
|
+
"toolSuccessBg",
|
|
28
|
+
"toolErrorBg",
|
|
29
|
+
"toolTitle",
|
|
30
|
+
"toolOutput",
|
|
31
|
+
"mdHeading",
|
|
32
|
+
"mdLink",
|
|
33
|
+
"mdLinkUrl",
|
|
34
|
+
"mdCode",
|
|
35
|
+
"mdCodeBlock",
|
|
36
|
+
"mdCodeBlockBorder",
|
|
37
|
+
"mdQuote",
|
|
38
|
+
"mdQuoteBorder",
|
|
39
|
+
"mdHr",
|
|
40
|
+
"mdListBullet",
|
|
41
|
+
"toolDiffAdded",
|
|
42
|
+
"toolDiffAddedBg",
|
|
43
|
+
"toolDiffRemoved",
|
|
44
|
+
"toolDiffRemovedBg",
|
|
45
|
+
"toolDiffContext",
|
|
46
|
+
"toolDiffContextBg",
|
|
47
|
+
"toolDiffHeaderBg",
|
|
48
|
+
"toolDiffBorder",
|
|
49
|
+
"syntaxComment",
|
|
50
|
+
"syntaxKeyword",
|
|
51
|
+
"syntaxFunction",
|
|
52
|
+
"syntaxVariable",
|
|
53
|
+
"syntaxString",
|
|
54
|
+
"syntaxNumber",
|
|
55
|
+
"syntaxType",
|
|
56
|
+
"syntaxOperator",
|
|
57
|
+
"syntaxPunctuation",
|
|
58
|
+
"thinkingOff",
|
|
59
|
+
"thinkingMinimal",
|
|
60
|
+
"thinkingLow",
|
|
61
|
+
"thinkingMedium",
|
|
62
|
+
"thinkingHigh",
|
|
63
|
+
"thinkingXhigh",
|
|
64
|
+
"bashMode",
|
|
65
|
+
];
|
|
66
|
+
const RESET = "\x1b[0m";
|
|
67
|
+
// Palette brand Vascend: argento chiaro, argento scuro (grafite), accenti.
|
|
68
|
+
// Gerarchia a 3 livelli del testo (per leggibilita' e raggruppamento):
|
|
69
|
+
// SILVER (accent/heading) > MUTED_SILVER (secondario) > DIM_SILVER (terziario)
|
|
70
|
+
// I toni "freddi" (bias blu-acciaio) restano coerenti col brand argento-gelido.
|
|
71
|
+
const SILVER = "#d2d6dc";
|
|
72
|
+
const DARK_SILVER = "#828b96"; // secondario: schiarito per leggibilita' (era #686f7a)
|
|
73
|
+
const DIM_SILVER = "#5a626c"; // terziario: chiaramente sotto il secondario, cool
|
|
74
|
+
const BORDER_SILVER = "#565d68"; // bordi: piu' definiti del terziario
|
|
75
|
+
const GRAPHITE = "#3d4346";
|
|
76
|
+
const CHAT_TEXT = "#e8ebef";
|
|
77
|
+
const VASCEND_DARK_COLORS = {
|
|
78
|
+
accent: "lime",
|
|
79
|
+
border: "silver",
|
|
80
|
+
borderAccent: "lime",
|
|
81
|
+
borderMuted: "borderSilver",
|
|
82
|
+
success: "#8fc79a",
|
|
83
|
+
error: "#e09a9a",
|
|
84
|
+
warning: "#e0cc8c",
|
|
85
|
+
muted: "darkSilver",
|
|
86
|
+
dim: "dimSilver",
|
|
87
|
+
text: CHAT_TEXT,
|
|
88
|
+
thinkingText: "darkSilver",
|
|
89
|
+
selectedBg: "#30445e",
|
|
90
|
+
userMessageBg: "#252c19",
|
|
91
|
+
userMessageText: CHAT_TEXT,
|
|
92
|
+
attachmentRef: "#28aacc",
|
|
93
|
+
customMessageBg: "#12151b",
|
|
94
|
+
customMessageText: CHAT_TEXT,
|
|
95
|
+
customMessageLabel: "silver",
|
|
96
|
+
toolPendingBg: "#14161c",
|
|
97
|
+
toolSuccessBg: "#121a14",
|
|
98
|
+
toolErrorBg: "#1c1314",
|
|
99
|
+
toolTitle: "silver",
|
|
100
|
+
toolOutput: CHAT_TEXT,
|
|
101
|
+
mdHeading: SILVER,
|
|
102
|
+
mdLink: "silver",
|
|
103
|
+
mdLinkUrl: "darkSilver",
|
|
104
|
+
mdCode: "#c8cdd4",
|
|
105
|
+
mdCodeBlock: CHAT_TEXT,
|
|
106
|
+
mdCodeBlockBorder: "darkSilver",
|
|
107
|
+
mdQuote: "darkSilver",
|
|
108
|
+
mdQuoteBorder: "darkSilver",
|
|
109
|
+
mdHr: "darkSilver",
|
|
110
|
+
mdListBullet: "silver",
|
|
111
|
+
toolDiffAdded: "#7fb98a",
|
|
112
|
+
toolDiffAddedBg: "#102117",
|
|
113
|
+
toolDiffRemoved: "#d98c8c",
|
|
114
|
+
toolDiffRemovedBg: "#251314",
|
|
115
|
+
toolDiffContext: "darkSilver",
|
|
116
|
+
toolDiffContextBg: "#0d1015",
|
|
117
|
+
toolDiffHeaderBg: "#151923",
|
|
118
|
+
toolDiffBorder: "#4d5561",
|
|
119
|
+
// Ruoli cromatici della notazione Danilov (oltre alla syntax del codice).
|
|
120
|
+
// Distinti ma tutti dentro il brand argento-gelido (bias blu-acciaio):
|
|
121
|
+
// keyword = parole-chiave di sezione INDICE/DEFINIZIONI/RELAZIONI/OUTPUT (silver pieno)
|
|
122
|
+
// function = il marcatore @tag (acciaio-azzurro chiaro)
|
|
123
|
+
// type = id tra [..] e id stanza T01 (ciano-acciaio)
|
|
124
|
+
// string = il valore/contenuto dopo i due punti (salvia fredda)
|
|
125
|
+
// number = maschere bit 0x.. e numeri (ottone tenue)
|
|
126
|
+
// operator = frecce/relazioni src->tgt (blu freddo)
|
|
127
|
+
// punct = parentesi, due punti, separatori (dim)
|
|
128
|
+
syntaxComment: "darkSilver",
|
|
129
|
+
syntaxKeyword: SILVER,
|
|
130
|
+
syntaxFunction: "#a9c2d9",
|
|
131
|
+
syntaxVariable: CHAT_TEXT,
|
|
132
|
+
syntaxString: "#a7bdaa",
|
|
133
|
+
syntaxNumber: "#c8bd9c",
|
|
134
|
+
syntaxType: "#86b2c6",
|
|
135
|
+
syntaxOperator: "#7f96b4",
|
|
136
|
+
syntaxPunctuation: "#6b7480",
|
|
137
|
+
thinkingOff: "darkSilver",
|
|
138
|
+
thinkingMinimal: "silver",
|
|
139
|
+
thinkingLow: "#9aa3ad",
|
|
140
|
+
thinkingMedium: "#b9c0c8",
|
|
141
|
+
thinkingHigh: SILVER,
|
|
142
|
+
thinkingXhigh: "#e8ebef",
|
|
143
|
+
bashMode: "#c2b89f",
|
|
144
|
+
};
|
|
145
|
+
const VASCEND_LIGHT_COLORS = {
|
|
146
|
+
...VASCEND_DARK_COLORS,
|
|
147
|
+
accent: "graphite",
|
|
148
|
+
border: "graphite",
|
|
149
|
+
borderAccent: GRAPHITE,
|
|
150
|
+
borderMuted: "#9aa1a8",
|
|
151
|
+
muted: "#6b727a",
|
|
152
|
+
dim: "#707780",
|
|
153
|
+
success: "#2e7146",
|
|
154
|
+
error: "#a33340",
|
|
155
|
+
warning: "#806117",
|
|
156
|
+
text: "#1c2024",
|
|
157
|
+
thinkingText: "#6b727a",
|
|
158
|
+
selectedBg: "#cbdcef",
|
|
159
|
+
userMessageBg: "#e5edf7",
|
|
160
|
+
userMessageText: "#1c2024",
|
|
161
|
+
attachmentRef: "#006d8f",
|
|
162
|
+
customMessageBg: "#eef0f2",
|
|
163
|
+
customMessageText: "#1c2024",
|
|
164
|
+
customMessageLabel: "graphite",
|
|
165
|
+
toolPendingBg: "#ecedf0",
|
|
166
|
+
toolSuccessBg: "#e7f0e9",
|
|
167
|
+
toolErrorBg: "#f3e7e8",
|
|
168
|
+
toolTitle: "graphite",
|
|
169
|
+
toolOutput: "#1c2024",
|
|
170
|
+
mdHeading: GRAPHITE,
|
|
171
|
+
mdLink: "graphite",
|
|
172
|
+
mdCode: "#2a2f33",
|
|
173
|
+
mdCodeBlock: "#1c2024",
|
|
174
|
+
toolDiffContext: "#6b727a",
|
|
175
|
+
toolDiffAdded: "#27643b",
|
|
176
|
+
toolDiffRemoved: "#963e45",
|
|
177
|
+
toolDiffAddedBg: "#e4f2e7",
|
|
178
|
+
toolDiffRemovedBg: "#f5e2e3",
|
|
179
|
+
toolDiffContextBg: "#f4f5f7",
|
|
180
|
+
toolDiffHeaderBg: "#e8ebef",
|
|
181
|
+
toolDiffBorder: "#a9b0b8",
|
|
182
|
+
syntaxKeyword: GRAPHITE,
|
|
183
|
+
syntaxFunction: "#3f6280",
|
|
184
|
+
syntaxString: "#4e6b54",
|
|
185
|
+
syntaxNumber: "#7a6c45",
|
|
186
|
+
syntaxType: "#2f6378",
|
|
187
|
+
syntaxOperator: "#445877",
|
|
188
|
+
syntaxPunctuation: "#8b9299",
|
|
189
|
+
};
|
|
190
|
+
// Accento lime del marchio, IDENTICO ai token di Horizon (styles.css: --lime,
|
|
191
|
+
// --lime-scuro, --su-lime; gli stessi della landing e del gestionale).
|
|
192
|
+
const LIME = "#d3e65d";
|
|
193
|
+
const LIME_SCURO = "#c2d64e";
|
|
194
|
+
const SU_LIME = "#101010";
|
|
195
|
+
const COMMON_VARS = {
|
|
196
|
+
silver: SILVER,
|
|
197
|
+
darkSilver: DARK_SILVER,
|
|
198
|
+
dimSilver: DIM_SILVER,
|
|
199
|
+
borderSilver: BORDER_SILVER,
|
|
200
|
+
graphite: GRAPHITE,
|
|
201
|
+
lime: LIME,
|
|
202
|
+
limeScuro: LIME_SCURO,
|
|
203
|
+
suLime: SU_LIME,
|
|
204
|
+
};
|
|
205
|
+
export const VASCEND_DARK = {
|
|
206
|
+
name: "vascend-dark",
|
|
207
|
+
mode: "dark",
|
|
208
|
+
vars: COMMON_VARS,
|
|
209
|
+
colors: VASCEND_DARK_COLORS,
|
|
210
|
+
};
|
|
211
|
+
export const VASCEND_LIGHT = {
|
|
212
|
+
name: "vascend-light",
|
|
213
|
+
mode: "light",
|
|
214
|
+
vars: COMMON_VARS,
|
|
215
|
+
colors: VASCEND_LIGHT_COLORS,
|
|
216
|
+
};
|
|
217
|
+
// Tema "vascend-lime": la base scura in vetro/argento con l'accento lime del
|
|
218
|
+
// marchio, usato come lo usa Horizon — per l'azione, non per lo stato: se
|
|
219
|
+
// finisce su dieci elementi non ne indica piu' nessuno. Quindi lime SOLO su
|
|
220
|
+
// accento/heading/link/selezione; testo, gerarchie e semantica (success/error/
|
|
221
|
+
// warning) restano quelli del tema scuro.
|
|
222
|
+
const VASCEND_LIME_COLORS = {
|
|
223
|
+
...VASCEND_DARK_COLORS,
|
|
224
|
+
accent: "lime",
|
|
225
|
+
borderAccent: LIME,
|
|
226
|
+
customMessageLabel: "lime",
|
|
227
|
+
mdHeading: LIME,
|
|
228
|
+
mdLink: "lime",
|
|
229
|
+
mdListBullet: "lime",
|
|
230
|
+
// Selezione con velo lime scuro: si vede DOVE sei senza gridare.
|
|
231
|
+
selectedBg: "#3b4420",
|
|
232
|
+
// La scala del reasoning culmina nel lime (l'intensita' massima e' l'azione).
|
|
233
|
+
thinkingXhigh: LIME,
|
|
234
|
+
// Le keyword della notazione restano argento; il marcatore @tag prende una
|
|
235
|
+
// punta di lime spento per legare la sintassi al tema senza saturarla.
|
|
236
|
+
syntaxFunction: "#b9c77f",
|
|
237
|
+
};
|
|
238
|
+
export const VASCEND_LIME = {
|
|
239
|
+
name: "vascend-lime",
|
|
240
|
+
mode: "dark",
|
|
241
|
+
vars: COMMON_VARS,
|
|
242
|
+
colors: VASCEND_LIME_COLORS,
|
|
243
|
+
};
|
|
244
|
+
export const BUILTIN_THEMES = [VASCEND_DARK, VASCEND_LIGHT, VASCEND_LIME];
|
|
245
|
+
function hexToRgb(hex) {
|
|
246
|
+
const m = /^#?([0-9a-f]{6})$/i.exec(hex.trim());
|
|
247
|
+
if (!m || !m[1])
|
|
248
|
+
return null;
|
|
249
|
+
const n = parseInt(m[1], 16);
|
|
250
|
+
return [(n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff];
|
|
251
|
+
}
|
|
252
|
+
// Risolve un valore di colore (hex / indice 256 / var / "") in un prefisso ANSI.
|
|
253
|
+
// `background` true -> codici di sfondo (48), altrimenti foreground (38).
|
|
254
|
+
export function ansiFor(spec, value, background = false) {
|
|
255
|
+
if (typeof value === "number") {
|
|
256
|
+
return Number.isInteger(value) && value >= 0 && value <= 255
|
|
257
|
+
? `\x1b[${background ? 48 : 38};5;${value}m`
|
|
258
|
+
: "";
|
|
259
|
+
}
|
|
260
|
+
const raw = value.trim();
|
|
261
|
+
if (raw === "")
|
|
262
|
+
return "";
|
|
263
|
+
if (raw.startsWith("#")) {
|
|
264
|
+
const rgb = hexToRgb(raw);
|
|
265
|
+
return rgb ? `\x1b[${background ? 48 : 38};2;${rgb[0]};${rgb[1]};${rgb[2]}m` : "";
|
|
266
|
+
}
|
|
267
|
+
// riferimento a una var (eventualmente annidato una volta)
|
|
268
|
+
const ref = spec.vars[raw];
|
|
269
|
+
if (ref !== undefined)
|
|
270
|
+
return ansiFor(spec, ref, background);
|
|
271
|
+
return "";
|
|
272
|
+
}
|
|
273
|
+
export function tokenAnsi(spec, token, background = false) {
|
|
274
|
+
return ansiFor(spec, spec.colors[token], background);
|
|
275
|
+
}
|
|
276
|
+
// Pittore di token pronto all'uso: avvolge una stringa col colore del token.
|
|
277
|
+
export function painter(spec) {
|
|
278
|
+
return (token, s, background = false) => {
|
|
279
|
+
const code = tokenAnsi(spec, token, background);
|
|
280
|
+
return code ? `${code}${s}${RESET}` : s;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function isThemeSpec(raw) {
|
|
284
|
+
return typeof raw === "object" && raw !== null;
|
|
285
|
+
}
|
|
286
|
+
function coerceColorMap(raw, base) {
|
|
287
|
+
if (typeof raw !== "object" || raw === null)
|
|
288
|
+
return { ...base };
|
|
289
|
+
const map = raw;
|
|
290
|
+
const out = { ...base };
|
|
291
|
+
for (const token of THEME_TOKENS) {
|
|
292
|
+
const v = map[token];
|
|
293
|
+
if (typeof v === "string" || typeof v === "number")
|
|
294
|
+
out[token] = v;
|
|
295
|
+
}
|
|
296
|
+
return out;
|
|
297
|
+
}
|
|
298
|
+
// Carica un tema da file JSON; i token mancanti ereditano dal tema base
|
|
299
|
+
// (vascend-dark) cosi' i custom non devono dichiarare tutti i 51 token.
|
|
300
|
+
export function parseThemeFile(path) {
|
|
301
|
+
try {
|
|
302
|
+
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
303
|
+
if (!isThemeSpec(raw))
|
|
304
|
+
return null;
|
|
305
|
+
const name = typeof raw.name === "string" && raw.name ? raw.name : path.replace(/.*[\\/]/, "").replace(/\.json$/i, "");
|
|
306
|
+
const mode = raw.mode === "light" ? "light" : "dark";
|
|
307
|
+
const baseColors = mode === "light" ? VASCEND_LIGHT_COLORS : VASCEND_DARK_COLORS;
|
|
308
|
+
const vars = typeof raw.vars === "object" && raw.vars !== null
|
|
309
|
+
? { ...COMMON_VARS, ...raw.vars }
|
|
310
|
+
: COMMON_VARS;
|
|
311
|
+
return { name, mode, vars, colors: coerceColorMap(raw.colors, baseColors) };
|
|
312
|
+
}
|
|
313
|
+
catch {
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function themeDirs(cwd, projectTrusted) {
|
|
318
|
+
const dirs = [join(homedir(), ".talos", "themes")];
|
|
319
|
+
if (projectTrusted)
|
|
320
|
+
dirs.push(join(cwd, ".talos", "themes"));
|
|
321
|
+
return dirs;
|
|
322
|
+
}
|
|
323
|
+
// Tutti i temi disponibili: builtin + custom dalle dir (custom con stesso nome
|
|
324
|
+
// sovrascrive il builtin). Ritorna anche i path per l'hot reload.
|
|
325
|
+
export function loadThemes(cwd, env, projectTrusted = true, extraDirs = []) {
|
|
326
|
+
const byName = new Map();
|
|
327
|
+
for (const t of BUILTIN_THEMES)
|
|
328
|
+
byName.set(t.name, t);
|
|
329
|
+
const paths = {};
|
|
330
|
+
for (const dir of [...themeDirs(cwd, projectTrusted), ...extraDirs]) {
|
|
331
|
+
if (!existsSync(dir))
|
|
332
|
+
continue;
|
|
333
|
+
if (dir.toLowerCase().endsWith(".json")) {
|
|
334
|
+
const spec = parseThemeFile(dir);
|
|
335
|
+
if (spec) {
|
|
336
|
+
byName.set(spec.name, spec);
|
|
337
|
+
paths[spec.name] = dir;
|
|
338
|
+
}
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
let entries;
|
|
342
|
+
try {
|
|
343
|
+
entries = readdirSync(dir);
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
for (const file of entries) {
|
|
349
|
+
if (!file.toLowerCase().endsWith(".json"))
|
|
350
|
+
continue;
|
|
351
|
+
const full = join(dir, file);
|
|
352
|
+
const spec = parseThemeFile(full);
|
|
353
|
+
if (spec) {
|
|
354
|
+
byName.set(spec.name, spec);
|
|
355
|
+
paths[spec.name] = full;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return { themes: [...byName.values()], paths };
|
|
360
|
+
}
|
|
361
|
+
export function findTheme(themes, name) {
|
|
362
|
+
return themes.find((t) => t.name === name);
|
|
363
|
+
}
|
|
364
|
+
// Auto-detect del background del terminale: COLORFGBG (es. "15;0" -> bg scuro),
|
|
365
|
+
// poi euristiche su variabili note. Default: dark (coerente col brand).
|
|
366
|
+
export function detectTerminalMode(env) {
|
|
367
|
+
const fgbg = env["COLORFGBG"];
|
|
368
|
+
if (fgbg) {
|
|
369
|
+
const parts = fgbg.split(";");
|
|
370
|
+
const bg = Number(parts[parts.length - 1]);
|
|
371
|
+
if (Number.isInteger(bg))
|
|
372
|
+
return bg <= 6 || bg === 0 ? "dark" : "light";
|
|
373
|
+
}
|
|
374
|
+
const theme = (env["TERM_BACKGROUND"] || env["APPLE_INTERFACE_STYLE"] || "").toLowerCase();
|
|
375
|
+
if (theme.includes("light"))
|
|
376
|
+
return "light";
|
|
377
|
+
if (theme.includes("dark"))
|
|
378
|
+
return "dark";
|
|
379
|
+
return "dark";
|
|
380
|
+
}
|
|
381
|
+
export function defaultThemeName(env) {
|
|
382
|
+
return detectTerminalMode(env) === "light" ? "vascend-light" : "vascend-dark";
|
|
383
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ToolCategory = "read" | "write" | "shell" | "search" | "web" | "danilov" | "kingdom" | "ask" | "image" | "misc";
|
|
2
|
+
export declare function toolCategory(name: string): ToolCategory;
|
|
3
|
+
export declare function paintToolName(name: string, label: string): string;
|
|
4
|
+
export declare function paintCategoryName(category: ToolCategory, label: string): string;
|
|
5
|
+
export declare function pulseGlyph(name: string, frame: number): string;
|
|
6
|
+
export declare function pulseToolName(name: string, label: string, frame: number): string;
|
|
7
|
+
export declare function pulseDot(name: string, frame: number): string;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Stile visivo dei NOMI dei tool in chat: ogni categoria di tool ha un colore
|
|
2
|
+
// distinto (cosi' a colpo d'occhio si capisce se l'agente legge, scrive, esegue
|
|
3
|
+
// comandi, cerca, ...) e un'animazione "pulse" abbinata mostrata sul tool in
|
|
4
|
+
// corso nella status-line (il colore respira tra una tinta tenue e quella piena
|
|
5
|
+
// al ritmo dei frame dello spinner).
|
|
6
|
+
//
|
|
7
|
+
// Truecolor (38;2;r;g;b). Niente dipendenze: solo escape ANSI.
|
|
8
|
+
const RESET = "\x1b[0m";
|
|
9
|
+
// Mappa nome-tool -> categoria. I nomi non elencati ricadono in "misc".
|
|
10
|
+
const CATEGORY = {
|
|
11
|
+
read_file: "read",
|
|
12
|
+
list_dir: "read",
|
|
13
|
+
bash_output: "read",
|
|
14
|
+
output_page: "read",
|
|
15
|
+
recall: "read",
|
|
16
|
+
write_file: "write",
|
|
17
|
+
edit_file: "write",
|
|
18
|
+
bash: "shell",
|
|
19
|
+
bash_bg: "shell",
|
|
20
|
+
reload_extensions: "shell",
|
|
21
|
+
grep: "search",
|
|
22
|
+
glob: "search",
|
|
23
|
+
tool_search: "search",
|
|
24
|
+
skill_search: "search",
|
|
25
|
+
skill_load: "search",
|
|
26
|
+
tool_invoke: "search",
|
|
27
|
+
web_fetch: "web",
|
|
28
|
+
vascend_plan: "danilov",
|
|
29
|
+
vascend_mark: "danilov",
|
|
30
|
+
vascend_note: "danilov",
|
|
31
|
+
vascend_skill: "danilov",
|
|
32
|
+
vascend_addtasks: "danilov",
|
|
33
|
+
kingdoms_warm: "kingdom",
|
|
34
|
+
kingdom_send: "kingdom",
|
|
35
|
+
kingdom_inbox: "kingdom",
|
|
36
|
+
kingdom_wait: "kingdom",
|
|
37
|
+
ask_user: "ask",
|
|
38
|
+
wait: "ask",
|
|
39
|
+
image_generate: "image",
|
|
40
|
+
};
|
|
41
|
+
export function toolCategory(name) {
|
|
42
|
+
return CATEGORY[name] ?? "misc";
|
|
43
|
+
}
|
|
44
|
+
// Colore PIENO di ogni categoria (tinta a cui punta il pulse), come tripla RGB.
|
|
45
|
+
// Scelti dentro un range vivido ma coerente con la TUI scura.
|
|
46
|
+
const CATEGORY_RGB = {
|
|
47
|
+
read: [122, 178, 198], // ciano-acciaio (ispezione)
|
|
48
|
+
write: [143, 199, 154], // verde salvia (mutazione)
|
|
49
|
+
shell: [200, 184, 159], // ottone (esecuzione)
|
|
50
|
+
search: [186, 162, 217], // viola tenue (ricerca)
|
|
51
|
+
web: [128, 170, 220], // azzurro (rete)
|
|
52
|
+
danilov: [210, 214, 220], // argento brand (metodo)
|
|
53
|
+
kingdom: [224, 196, 130], // oro (regno/vassalli)
|
|
54
|
+
ask: [224, 204, 140], // giallo (attesa utente)
|
|
55
|
+
image: [222, 150, 180], // rosa (immagini)
|
|
56
|
+
misc: [150, 160, 174], // argento freddo
|
|
57
|
+
};
|
|
58
|
+
// Glyph "battito" associato alla categoria del tool in corso: cambia col frame
|
|
59
|
+
// per dare il senso di movimento abbinato al nome.
|
|
60
|
+
const CATEGORY_PULSE = {
|
|
61
|
+
read: ["◌", "◎", "●", "◎"],
|
|
62
|
+
write: ["✎", "✐", "✏", "✐"],
|
|
63
|
+
shell: ["▹", "▸", "▶", "▸"],
|
|
64
|
+
search: ["·", "∴", "⁘", "∴"],
|
|
65
|
+
web: ["◜", "◝", "◞", "◟"],
|
|
66
|
+
danilov: ["✶", "✸", "✺", "✦"],
|
|
67
|
+
kingdom: ["♢", "♦", "♦", "♢"],
|
|
68
|
+
ask: ["?", "?", "?", "?"],
|
|
69
|
+
image: ["◍", "◐", "◑", "◒"],
|
|
70
|
+
misc: ["✶", "✸", "✺", "✦"],
|
|
71
|
+
};
|
|
72
|
+
function fg(rgb) {
|
|
73
|
+
return `\x1b[38;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
74
|
+
}
|
|
75
|
+
// Colore STATICO del nome del tool nel log (scrollback), per categoria.
|
|
76
|
+
export function paintToolName(name, label) {
|
|
77
|
+
return `${fg(CATEGORY_RGB[toolCategory(name)])}${label}${RESET}`;
|
|
78
|
+
}
|
|
79
|
+
export function paintCategoryName(category, label) {
|
|
80
|
+
return `${fg(CATEGORY_RGB[category])}${label}${RESET}`;
|
|
81
|
+
}
|
|
82
|
+
// Onda triangolare 0..1..0 in funzione del frame: e' la "respirazione" del
|
|
83
|
+
// pulse (il colore sale alla tinta piena e ridiscende a una versione attenuata).
|
|
84
|
+
function wave(frame, period) {
|
|
85
|
+
const p = period <= 0 ? 1 : period;
|
|
86
|
+
const x = ((frame % p) + p) % p;
|
|
87
|
+
const half = p / 2;
|
|
88
|
+
return x <= half ? x / half : (p - x) / half;
|
|
89
|
+
}
|
|
90
|
+
// Interpola tra una versione SCURA (attenuata) e quella PIENA del colore della
|
|
91
|
+
// categoria al livello t in [0,1]. t=0 -> ~40% di luminosita', t=1 -> pieno.
|
|
92
|
+
function pulseRgb(rgb, t) {
|
|
93
|
+
const lo = 0.42; // pavimento di luminosita' del battito
|
|
94
|
+
const k = lo + (1 - lo) * (t < 0 ? 0 : t > 1 ? 1 : t);
|
|
95
|
+
return [Math.round(rgb[0] * k), Math.round(rgb[1] * k), Math.round(rgb[2] * k)];
|
|
96
|
+
}
|
|
97
|
+
// Glyph animato del tool in corso (per la status-line), gia' colorato col pulse.
|
|
98
|
+
export function pulseGlyph(name, frame) {
|
|
99
|
+
const cat = toolCategory(name);
|
|
100
|
+
const seq = CATEGORY_PULSE[cat];
|
|
101
|
+
const glyph = seq[frame % seq.length] ?? seq[0];
|
|
102
|
+
const rgb = pulseRgb(CATEGORY_RGB[cat], wave(frame, 8));
|
|
103
|
+
return `${fg(rgb)}${glyph}${RESET}`;
|
|
104
|
+
}
|
|
105
|
+
// Nome del tool animato (per la status-line): il colore "respira" al ritmo dei
|
|
106
|
+
// frame, restando nella tinta della categoria.
|
|
107
|
+
export function pulseToolName(name, label, frame) {
|
|
108
|
+
const rgb = pulseRgb(CATEGORY_RGB[toolCategory(name)], wave(frame, 8));
|
|
109
|
+
return `${fg(rgb)}${label}${RESET}`;
|
|
110
|
+
}
|
|
111
|
+
// Puntino ● animato per la riga del tool IN CORSO nello scrollback (chat): lo
|
|
112
|
+
// stesso bullet ● che apre la riga "● Nome(arg)", ma colorato col pulse della
|
|
113
|
+
// categoria cosi' "respira" finche' il tool e' in esecuzione. A tool finito si
|
|
114
|
+
// torna al bullet statico (theme.accent) scritto da repl. Period piu' lungo (12)
|
|
115
|
+
// per un battito piu' lento e leggibile nello scrollback.
|
|
116
|
+
export function pulseDot(name, frame) {
|
|
117
|
+
const rgb = pulseRgb(CATEGORY_RGB[toolCategory(name)], wave(frame, 12));
|
|
118
|
+
return `${fg(rgb)}●${RESET}`;
|
|
119
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Readable, Writable } from "node:stream";
|
|
2
|
+
import type { CliArgs } from "../core/cli-args.js";
|
|
3
|
+
import { type TalosUpdate } from "../core/update-check.js";
|
|
4
|
+
import { type UpdateResult } from "../core/self-update.js";
|
|
5
|
+
export type UpdateChoice = "skip" | "update" | "cancel";
|
|
6
|
+
export declare function updatePromptText(update: TalosUpdate): string;
|
|
7
|
+
export declare function promptForUpdate(update: TalosUpdate, input?: Readable, output?: Writable): Promise<UpdateChoice>;
|
|
8
|
+
export declare function handleTalosUpdate(update: TalosUpdate, hooks: {
|
|
9
|
+
readonly prompt: (update: TalosUpdate) => Promise<UpdateChoice>;
|
|
10
|
+
readonly install: (update: TalosUpdate) => Promise<UpdateResult>;
|
|
11
|
+
readonly restart: () => Promise<number>;
|
|
12
|
+
readonly write: (text: string) => void;
|
|
13
|
+
}): Promise<number | null>;
|
|
14
|
+
export declare function offerStartupUpdate(args: CliArgs, env: NodeJS.ProcessEnv): Promise<number | null>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { createInterface } from "node:readline";
|
|
5
|
+
import { stdin, stdout } from "node:process";
|
|
6
|
+
import { TALOS_VERSION } from "../core/version.js";
|
|
7
|
+
import { checkForTalosUpdate, shouldCheckForUpdate, TALOS_RELEASES_URL } from "../core/update-check.js";
|
|
8
|
+
import { installTalosUpdate, TALOS_INSTALL_ROOT } from "../core/self-update.js";
|
|
9
|
+
import { initializeLanguage } from "./language-preference.js";
|
|
10
|
+
import { tr } from "./i18n.js";
|
|
11
|
+
export function updatePromptText(update) {
|
|
12
|
+
return `\n ${tr("Aggiornamento disponibile per Talos", "Talos update available")}\n\n`
|
|
13
|
+
+ ` ${update.currentVersion} → ${update.version}\n\n`
|
|
14
|
+
+ ` 1. ${tr("Salta per ora", "Skip for now")}\n`
|
|
15
|
+
+ ` 2. ${tr("Aggiorna subito", "Update now")}\n\n`;
|
|
16
|
+
}
|
|
17
|
+
export function promptForUpdate(update, input = stdin, output = stdout) {
|
|
18
|
+
output.write(updatePromptText(update));
|
|
19
|
+
const rl = createInterface({ input, output });
|
|
20
|
+
return new Promise(resolve => {
|
|
21
|
+
let settled = false;
|
|
22
|
+
const finish = (choice) => {
|
|
23
|
+
if (settled)
|
|
24
|
+
return;
|
|
25
|
+
settled = true;
|
|
26
|
+
rl.close();
|
|
27
|
+
resolve(choice);
|
|
28
|
+
};
|
|
29
|
+
rl.on("SIGINT", () => { output.write("\n"); finish("cancel"); });
|
|
30
|
+
rl.on("close", () => finish("cancel"));
|
|
31
|
+
const ask = () => {
|
|
32
|
+
rl.question(` ${tr("Scegli", "Choose")} [1/2] (1): `, answer => {
|
|
33
|
+
const value = answer.trim();
|
|
34
|
+
if (!value || value === "1")
|
|
35
|
+
finish("skip");
|
|
36
|
+
else if (value === "2")
|
|
37
|
+
finish("update");
|
|
38
|
+
else {
|
|
39
|
+
output.write(` ${tr("Inserisci 1 o 2.", "Enter 1 or 2.")}\n`);
|
|
40
|
+
ask();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
ask();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function failureMessage(reason) {
|
|
48
|
+
switch (reason) {
|
|
49
|
+
case "modified": return tr("Il repository di Talos contiene modifiche locali. Salvale prima di aggiornare.", "The Talos repository has local changes. Save them before updating.");
|
|
50
|
+
case "diverged": return tr("Il repository di Talos ha una cronologia divergente dalla release. Aggiornalo manualmente.", "The Talos repository has diverged from this release. Update it manually.");
|
|
51
|
+
case "unsupported": return tr("Installazione non riconosciuta. Aggiorna Talos con il gestore usato per installarlo.", "Installation not recognized. Update Talos with the package manager used to install it.");
|
|
52
|
+
case "install": return tr("Installazione non completata. Riprova l'aggiornamento con il gestore usato per installare Talos, poi riavvia talos.", "Installation did not complete. Retry the update with the package manager used to install Talos, then restart talos.");
|
|
53
|
+
case "version": return tr("La release non contiene il pacchetto Talos della versione richiesta.", "The release does not contain the requested Talos package version.");
|
|
54
|
+
case "download": return tr("Aggiornamento non riuscito. Verifica la connessione e l'accesso GitHub e riprova.", "Update failed. Check your connection and GitHub access, then try again.");
|
|
55
|
+
case "build": return tr("Release scaricata, ma installazione non completata. Nel repository di Talos esegui bun install --frozen-lockfile e bun run install:cli, poi riavvia talos.", "Release downloaded, but installation did not complete. In the Talos repository run bun install --frozen-lockfile and bun run install:cli, then restart talos.");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export async function handleTalosUpdate(update, hooks) {
|
|
59
|
+
const choice = await hooks.prompt(update);
|
|
60
|
+
if (choice === "cancel")
|
|
61
|
+
return 130;
|
|
62
|
+
if (choice === "skip")
|
|
63
|
+
return null;
|
|
64
|
+
hooks.write(`\n ${tr("Aggiornamento di Talos a {version}…", "Updating Talos to {version}…", { version: update.version })}\n`);
|
|
65
|
+
const result = await hooks.install(update);
|
|
66
|
+
if (!result.ok) {
|
|
67
|
+
hooks.write(`\n ${failureMessage(result.reason)}\n ${TALOS_RELEASES_URL}\n\n`);
|
|
68
|
+
// Once sources have changed, do not start a session with partially built code.
|
|
69
|
+
return result.changed ? 1 : null;
|
|
70
|
+
}
|
|
71
|
+
hooks.write(`\n ${tr("Talos aggiornato a {version}. Riavvio…", "Talos updated to {version}. Restarting…", { version: update.version })}\n\n`);
|
|
72
|
+
return hooks.restart();
|
|
73
|
+
}
|
|
74
|
+
function restartTalos(env) {
|
|
75
|
+
return new Promise(resolve => {
|
|
76
|
+
const child = spawn(process.execPath, process.argv.slice(1), {
|
|
77
|
+
cwd: process.cwd(), env: { ...env, TALOS_NO_UPDATE_CHECK: "1" }, stdio: "inherit", shell: false,
|
|
78
|
+
});
|
|
79
|
+
// The foreground child owns the terminal and receives its Ctrl+C directly.
|
|
80
|
+
const ignore = () => { };
|
|
81
|
+
process.on("SIGINT", ignore);
|
|
82
|
+
const finish = (code) => { process.off("SIGINT", ignore); resolve(code); };
|
|
83
|
+
child.on("error", () => {
|
|
84
|
+
stdout.write(` ${tr("Riavvia talos per usare la nuova versione.", "Restart talos to use the new version.")}\n`);
|
|
85
|
+
finish(1);
|
|
86
|
+
});
|
|
87
|
+
child.on("close", (code, signal) => finish(code ?? (signal === "SIGINT" ? 130 : 1)));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export async function offerStartupUpdate(args, env) {
|
|
91
|
+
if (!shouldCheckForUpdate(args, env, Boolean(stdin.isTTY), Boolean(stdout.isTTY)))
|
|
92
|
+
return null;
|
|
93
|
+
const update = await checkForTalosUpdate({ currentVersion: TALOS_VERSION, env, cwd: process.cwd(),
|
|
94
|
+
source: existsSync(join(TALOS_INSTALL_ROOT, ".git")) ? "github" : "npm" });
|
|
95
|
+
if (!update)
|
|
96
|
+
return null;
|
|
97
|
+
initializeLanguage(env);
|
|
98
|
+
return handleTalosUpdate(update, {
|
|
99
|
+
prompt: promptForUpdate,
|
|
100
|
+
install: update => installTalosUpdate(update, { env }),
|
|
101
|
+
restart: () => restartTalos(env),
|
|
102
|
+
write: text => { stdout.write(text); },
|
|
103
|
+
});
|
|
104
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PlanLimits } from "../core/types.js";
|
|
2
|
+
import type { TuiTheme } from "./branding.js";
|
|
3
|
+
import { type SessionUsageState } from "./session-usage.js";
|
|
4
|
+
import { type StatusData, type StatusOptions } from "./status-line.js";
|
|
5
|
+
export declare const SESSION_USAGE_EXPLANATION = "I token cumulati sono la somma delle chiamate della sessione, inclusi input ripetuti e cache: non sono il contesto di una singola richiesta. Talos seleziona informazioni rilevanti e gestisce la cronologia con recupero e compattazione secondo la configurazione. Questo non annulla i consumi registrati dal provider. \u2265 indica un totale parziale: il consumo noto \u00E8 almeno quello mostrato. Il contesto indicato \u00E8 una stima locale, non una misura esatta del payload inviato.";
|
|
6
|
+
type UsageState = Pick<SessionUsageState, "limits" | "incomplete" | "missing" | "unsaved">;
|
|
7
|
+
export declare function subscriptionDetails(providerId: string, limits: PlanLimits | undefined, t: TuiTheme, now?: number): string[];
|
|
8
|
+
export declare function buildUsageFooter(d: StatusData, t: TuiTheme, state: UsageState, providerId: string, opts?: StatusOptions, now?: number): readonly string[];
|
|
9
|
+
export {};
|