@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,270 @@
|
|
|
1
|
+
import { modelCapabilities } from "../providers/models-dev.js";
|
|
2
|
+
export const DEFAULT_COMPACTION = {
|
|
3
|
+
enabled: true,
|
|
4
|
+
reserveTokens: 16_384,
|
|
5
|
+
keepRecentTokens: 20_000,
|
|
6
|
+
perRoom: true,
|
|
7
|
+
roomFanout: 8,
|
|
8
|
+
};
|
|
9
|
+
// Stima grezza dei token: ~4 caratteri per token (euristica comune).
|
|
10
|
+
export function estimateTokens(text) {
|
|
11
|
+
return Math.ceil(text.length / 4);
|
|
12
|
+
}
|
|
13
|
+
// Costo in token di UN'IMMAGINE nel contesto. Un'immagine non e' la sua
|
|
14
|
+
// didascalia: uno screenshot 1280x800 vale ~1400 token per i modelli Anthropic
|
|
15
|
+
// (larghezza*altezza/750, con tetto a 1600). Contarla come "[immagine png]" —
|
|
16
|
+
// cinque token — faceva sballare la stima proprio nelle sessioni Computer Use,
|
|
17
|
+
// dove sei screenshot pesano piu' di tutta la conversazione.
|
|
18
|
+
export const IMAGE_TOKEN_ESTIMATE = 1_400;
|
|
19
|
+
function messageText(message) {
|
|
20
|
+
return message.content
|
|
21
|
+
.map((part) => {
|
|
22
|
+
if (part.type === "text")
|
|
23
|
+
return part.text;
|
|
24
|
+
if (part.type === "tool_call")
|
|
25
|
+
return part.name + JSON.stringify(part.input);
|
|
26
|
+
if (part.type === "image")
|
|
27
|
+
return `[immagine ${part.mime}]`;
|
|
28
|
+
return part.output;
|
|
29
|
+
})
|
|
30
|
+
.join("\n");
|
|
31
|
+
}
|
|
32
|
+
// Quante immagini viaggiano in un messaggio, comprese quelle allegate a un tool
|
|
33
|
+
// result (screenshot di Computer Use): il provider le manda al modello come
|
|
34
|
+
// input visivo, quindi occupano la finestra come tutto il resto.
|
|
35
|
+
function messageImages(message) {
|
|
36
|
+
return message.content.reduce((count, part) => {
|
|
37
|
+
if (part.type === "image")
|
|
38
|
+
return count + 1;
|
|
39
|
+
if (part.type === "tool_result")
|
|
40
|
+
return count + (part.media?.length ?? 0);
|
|
41
|
+
return count;
|
|
42
|
+
}, 0);
|
|
43
|
+
}
|
|
44
|
+
export function estimateMessagesTokens(messages) {
|
|
45
|
+
return messages.reduce((acc, m) => acc + estimateTokens(messageText(m)) + messageImages(m) * IMAGE_TOKEN_ESTIMATE + 4, 0);
|
|
46
|
+
}
|
|
47
|
+
// Gli schemi dei tool sono parte del prompt inviato a ogni chiamata. La stima
|
|
48
|
+
// del contesto li deve includere, pur restando distinta dall'usage reale che
|
|
49
|
+
// arriva dal provider con il suo tokenizer.
|
|
50
|
+
export function estimateToolDefinitionTokens(tools) {
|
|
51
|
+
// Providers send one input schema. `schema` is an SDK compatibility alias;
|
|
52
|
+
// serializing the registry itself counted it twice and compacted too early.
|
|
53
|
+
// Use the OpenAI function envelope as a common estimate, not provider usage.
|
|
54
|
+
return tools.length ? estimateTokens(JSON.stringify(tools.map((tool) => ({
|
|
55
|
+
type: "function",
|
|
56
|
+
function: { name: tool.name, description: tool.description, parameters: tool.inputSchema ?? tool.schema ?? {} },
|
|
57
|
+
})))) : 0;
|
|
58
|
+
}
|
|
59
|
+
// Finestra di contesto per modello (token). `override` (>0) ha la precedenza:
|
|
60
|
+
// serve a forzare il valore reale quando non e' deducibile dall'id (es. la
|
|
61
|
+
// variante 1M di Opus/Sonnet, abilitata via beta header, ha lo stesso id del
|
|
62
|
+
// modello da 200k). L'id che contiene "1m" viene comunque riconosciuto.
|
|
63
|
+
export function contextWindowFor(model, override = 0) {
|
|
64
|
+
if (override > 0)
|
|
65
|
+
return override;
|
|
66
|
+
const catalogLimit = modelCapabilities(model)?.context;
|
|
67
|
+
if (catalogLimit && catalogLimit > 0)
|
|
68
|
+
return catalogLimit;
|
|
69
|
+
const m = model.toLowerCase();
|
|
70
|
+
if (m.includes("1m"))
|
|
71
|
+
return 1_000_000;
|
|
72
|
+
if (m.includes("gpt-5.6") || m.includes("gpt-6-astra"))
|
|
73
|
+
return 1_050_000;
|
|
74
|
+
if (/claude-(?:fable|opus|sonnet)-5(?:\b|[-.])/.test(m))
|
|
75
|
+
return 1_000_000;
|
|
76
|
+
if (m.includes("gpt-5") || m.includes("codex"))
|
|
77
|
+
return 272_000;
|
|
78
|
+
// Opus 4.x / Sonnet 4.x: finestra 1M (beta) disponibile su abbonamento.
|
|
79
|
+
if (/opus-4|sonnet-4/.test(m))
|
|
80
|
+
return 1_000_000;
|
|
81
|
+
if (m.includes("claude"))
|
|
82
|
+
return 200_000;
|
|
83
|
+
if (m.includes("gemini"))
|
|
84
|
+
return 1_000_000;
|
|
85
|
+
if (m.includes("llama") || m.includes("mistral") || m.includes("deepseek"))
|
|
86
|
+
return 128_000;
|
|
87
|
+
return 128_000;
|
|
88
|
+
}
|
|
89
|
+
export function shouldCompact(contextTokens, contextWindow, reserveTokens) {
|
|
90
|
+
return contextTokens > contextWindow - reserveTokens;
|
|
91
|
+
}
|
|
92
|
+
// Frazione della soglia dura oltre la quale conviene gia' cominciare.
|
|
93
|
+
export const SPECULATIVE_FRACTION = 0.8;
|
|
94
|
+
export function planCompactionMove(input) {
|
|
95
|
+
if (!input.enabled)
|
|
96
|
+
return "none";
|
|
97
|
+
if (shouldCompact(input.tokens, input.contextWindow, input.reserveTokens)) {
|
|
98
|
+
return input.inFlight ? "await" : "now";
|
|
99
|
+
}
|
|
100
|
+
if (input.inFlight)
|
|
101
|
+
return "none";
|
|
102
|
+
const fraction = input.speculativeFraction ?? SPECULATIVE_FRACTION;
|
|
103
|
+
const threshold = Math.max(0, input.contextWindow - input.reserveTokens);
|
|
104
|
+
return input.tokens > threshold * fraction ? "speculative" : "none";
|
|
105
|
+
}
|
|
106
|
+
// Cammina all'indietro accumulando token fino a keepRecentTokens, poi allinea
|
|
107
|
+
// il taglio a un confine di turno (messaggio utente). Ritorna null se non c'e'
|
|
108
|
+
// abbastanza da riassumere.
|
|
109
|
+
export function planCompaction(messages, keepRecentTokens) {
|
|
110
|
+
if (messages.length < 2)
|
|
111
|
+
return null;
|
|
112
|
+
let acc = 0;
|
|
113
|
+
let cut = messages.length;
|
|
114
|
+
for (let i = messages.length - 1; i >= 0; i -= 1) {
|
|
115
|
+
const msg = messages[i];
|
|
116
|
+
if (!msg)
|
|
117
|
+
continue;
|
|
118
|
+
acc += estimateMessagesTokens([msg]);
|
|
119
|
+
cut = i;
|
|
120
|
+
if (acc >= keepRecentTokens)
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
// Allinea a un confine di turno: arretra fino a un messaggio utente.
|
|
124
|
+
let boundary = cut;
|
|
125
|
+
while (boundary > 0) {
|
|
126
|
+
const message = messages[boundary];
|
|
127
|
+
if (message?.role === "user" && !message.content.some((part) => part.type === "tool_result"))
|
|
128
|
+
break;
|
|
129
|
+
boundary -= 1;
|
|
130
|
+
}
|
|
131
|
+
if (boundary <= 0 || estimateMessagesTokens(messages.slice(boundary)) > Math.max(keepRecentTokens * 2, keepRecentTokens + 4_000)) {
|
|
132
|
+
// Un singolo turno lungo puo' attraversare molti waypoint. Non conservare
|
|
133
|
+
// l'intero turno soltanto per raggiungere il suo messaggio utente.
|
|
134
|
+
if (cut <= 0)
|
|
135
|
+
return null;
|
|
136
|
+
boundary = cut;
|
|
137
|
+
}
|
|
138
|
+
// In un singolo turno lungo il cut grezzo puo' cadere tra una chiamata e
|
|
139
|
+
// il risultato. Risali alle chiamate dei risultati conservati, includendo
|
|
140
|
+
// l'intero batch anche quando i risultati occupano messaggi separati.
|
|
141
|
+
const resultPositions = new Map();
|
|
142
|
+
for (let i = messages.length - 1; i >= 0; i -= 1) {
|
|
143
|
+
for (const part of messages[i].content) {
|
|
144
|
+
if (part.type === "tool_result" && !resultPositions.has(part.callId))
|
|
145
|
+
resultPositions.set(part.callId, i);
|
|
146
|
+
if (part.type === "tool_call" && i < boundary && (resultPositions.get(part.id) ?? -1) >= boundary) {
|
|
147
|
+
boundary = i;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (boundary <= 0 || boundary >= messages.length)
|
|
152
|
+
return null;
|
|
153
|
+
return {
|
|
154
|
+
cutIndex: boundary,
|
|
155
|
+
toSummarize: messages.slice(0, boundary),
|
|
156
|
+
toKeep: messages.slice(boundary),
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
// --- cio' che una compattazione non ha il diritto di perdere -----------------
|
|
160
|
+
//
|
|
161
|
+
// Il taglio e' posizionale: guarda l'eta' dei messaggi, non il loro legame col
|
|
162
|
+
// lavoro in corso. Cosi' una decisione ancora viva puo' finire dissolta in
|
|
163
|
+
// prosa mentre 20k token di output stantio sopravvivono solo perche' recenti.
|
|
164
|
+
// Le funzioni qui sotto danno al compattatore un secondo criterio: un elenco
|
|
165
|
+
// di ANCORE (task attivo, termini pinnati, simboli dei contratti aperti) che
|
|
166
|
+
// devono restare leggibili dopo la compattazione.
|
|
167
|
+
//
|
|
168
|
+
// Sono pure: la politica su cosa sia un'ancora sta nel chiamante.
|
|
169
|
+
// Righe verbatim al massimo estratte per ancora, e loro lunghezza.
|
|
170
|
+
const EXCERPT_MAX_CHARS = 1_400;
|
|
171
|
+
const EXCERPT_LINE_MAX = 220;
|
|
172
|
+
// Ancore assenti dal riassunto (confronto case-insensitive).
|
|
173
|
+
export function verifySummary(summary, anchors, preservedMessages = []) {
|
|
174
|
+
const hay = [summary, ...preservedMessages.map(messageText)].join("\n").toLowerCase();
|
|
175
|
+
return anchors
|
|
176
|
+
.map((a) => a.trim())
|
|
177
|
+
.filter((a) => a.length > 1 && !hay.includes(a.toLowerCase()));
|
|
178
|
+
}
|
|
179
|
+
// Per ogni ancora, l'ULTIMA riga dei messaggi che la nomina: e' quella che
|
|
180
|
+
// racconta lo stato piu' aggiornato di quel riferimento.
|
|
181
|
+
export function protectedExcerpts(messages, anchors, maxChars = EXCERPT_MAX_CHARS) {
|
|
182
|
+
if (!anchors.length)
|
|
183
|
+
return [];
|
|
184
|
+
const lines = messages.flatMap((m) => messageText(m).split("\n")).map((l) => l.trim()).filter(Boolean);
|
|
185
|
+
const out = [];
|
|
186
|
+
let used = 0;
|
|
187
|
+
for (const anchor of anchors) {
|
|
188
|
+
const needle = anchor.trim().toLowerCase();
|
|
189
|
+
if (needle.length <= 1)
|
|
190
|
+
continue;
|
|
191
|
+
let found = "";
|
|
192
|
+
for (let i = lines.length - 1; i >= 0; i -= 1) {
|
|
193
|
+
const line = lines[i];
|
|
194
|
+
if (line.toLowerCase().includes(needle)) {
|
|
195
|
+
found = line.length > EXCERPT_LINE_MAX ? `${line.slice(0, EXCERPT_LINE_MAX)}…` : line;
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const entry = `@ancora[${anchor}]: ${found || "(nessun dettaglio nei messaggi compattati)"}`;
|
|
200
|
+
if (used + entry.length > maxChars)
|
|
201
|
+
break;
|
|
202
|
+
out.push(entry);
|
|
203
|
+
used += entry.length;
|
|
204
|
+
}
|
|
205
|
+
return out;
|
|
206
|
+
}
|
|
207
|
+
// Innesta gli stralci in coda al riassunto. Verbatim e separati, cosi' non
|
|
208
|
+
// possono essere parafrasati via da una rigenerazione.
|
|
209
|
+
export function withProtectedExcerpts(summary, excerpts) {
|
|
210
|
+
if (!excerpts.length)
|
|
211
|
+
return summary;
|
|
212
|
+
return `${summary}\n\nANCORE PRESERVATE (verbatim, non riassunte)\n${excerpts.join("\n")}`;
|
|
213
|
+
}
|
|
214
|
+
// Istruzioni di RIPARAZIONE per il secondo tentativo: dice al compressore cosa
|
|
215
|
+
// ha perso, senza rifare tutto da capo.
|
|
216
|
+
export function repairInstructions(missing, base) {
|
|
217
|
+
const list = missing.join(", ");
|
|
218
|
+
const head = `Il riassunto precedente ha PERSO questi riferimenti, che sono ancora attivi e vanno mantenuti espliciti: ${list}.`;
|
|
219
|
+
return base ? `${base}\n${head}` : head;
|
|
220
|
+
}
|
|
221
|
+
const SUMMARY_SYSTEM = `Sei un compressore di contesto Danilov. Comprimi la conversazione in NOTAZIONE
|
|
222
|
+
Danilov, mai in prosa. Preserva lo stato operativo necessario a riprendere il
|
|
223
|
+
lavoro senza reinterpretarlo. Tre piani separati e chiusura OUTPUT:
|
|
224
|
+
|
|
225
|
+
INDICE
|
|
226
|
+
<concetti chiave, una parola per voce, numerati da 1>
|
|
227
|
+
|
|
228
|
+
DEFINIZIONI
|
|
229
|
+
@goal[current]: obiettivo corrente e sue revisioni esplicite; marca come superate le versioni precedenti
|
|
230
|
+
@stato[done]: lavoro completato, solo con evidenze concrete (file, tool, test o risultato osservato)
|
|
231
|
+
@stato[pending]: lavoro richiesto ma non ancora completato
|
|
232
|
+
@blocker[..]: impedimento o errore ancora aperto e relativo effetto
|
|
233
|
+
@vincolo[user]: preferenze, divieti e criteri imposti dall'utente
|
|
234
|
+
@scelta[..]: decisione=motivo
|
|
235
|
+
@file[..]: path, stato
|
|
236
|
+
@next[action]: prossima azione esatta, eseguibile e fondata nella conversazione
|
|
237
|
+
|
|
238
|
+
RELAZIONI
|
|
239
|
+
@R: <dipendenze e legami tra le voci>
|
|
240
|
+
|
|
241
|
+
OUTPUT: stato compatto per continuare il lavoro. Completo ma asciutto. Se una
|
|
242
|
+
categoria non e' presente, omettila. Non inventare fatti, evidenze, vincoli,
|
|
243
|
+
blocker o azioni; non trasformare intenzioni o tentativi in lavoro completato.
|
|
244
|
+
Ai waypoint conserva obiettivo, vincoli, attivita aperte, file in lavorazione,
|
|
245
|
+
decisioni, verifiche e prossimo passo. Riassumi il lavoro concluso senza
|
|
246
|
+
duplicarne i log. Conserva gli identificativi degli output archiviati e i
|
|
247
|
+
riferimenti utili a recuperarli con output_page o recall.`;
|
|
248
|
+
// Genera il riassunto strutturato dei messaggi da compattare, dato l'eventuale
|
|
249
|
+
// riassunto precedente e istruzioni opzionali dell'utente.
|
|
250
|
+
export async function summarizeMessages(provider, toSummarize, opts) {
|
|
251
|
+
const transcript = toSummarize
|
|
252
|
+
.map((m) => `[${m.role}] ${messageText(m)}`)
|
|
253
|
+
.join("\n\n");
|
|
254
|
+
const prev = opts.previousSummary ? `Riassunto precedente:\n${opts.previousSummary}\n\n` : "";
|
|
255
|
+
const extra = opts.instructions ? `Istruzioni aggiuntive: ${opts.instructions}\n\n` : "";
|
|
256
|
+
const userText = `${prev}${extra}Conversazione da riassumere:\n\n${transcript}`;
|
|
257
|
+
const result = await provider.complete({
|
|
258
|
+
system: SUMMARY_SYSTEM,
|
|
259
|
+
messages: [{ role: "user", content: [{ type: "text", text: userText }] }],
|
|
260
|
+
tools: [],
|
|
261
|
+
model: opts.model,
|
|
262
|
+
maxTokens: opts.maxTokens,
|
|
263
|
+
signal: opts.signal,
|
|
264
|
+
});
|
|
265
|
+
// Un riassunto e' utilizzabile soltanto dopo una chiusura semantica completa.
|
|
266
|
+
// Testo parziale accompagnato da max_tokens/error/tool_use non deve mai
|
|
267
|
+
// sostituire il prefisso della sessione: compactNow interpreta la stringa
|
|
268
|
+
// vuota come compattazione fallita e lascia intatta la cronologia corrente.
|
|
269
|
+
return result.stopReason === "end" ? result.text.trim() : "";
|
|
270
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type CompactionConfig } from "./compaction.js";
|
|
2
|
+
import { type VibeModeSelection } from "./vibe-modes.js";
|
|
3
|
+
export declare const BASE_SYSTEM = "# Vascend Talos\n\nINDICE\n1 = agente\n2 = workspace\n3 = strumento\n4 = azione\n\nDEFINIZIONI\n@agente[ruolo]: coding_agent in terminale, conciso, diretto\n@workspace[fonte]: ispeziona coi tool invece di indovinare\n@strumento[uso]: read/edit/bash per agire sul workspace, non descrivere\n@strumento[terminale]: per ricerca e ispezione del codice preferisci bash con rg e rg --files, git diff/status e comandi nativi della shell selezionata. Limita path e output a cio' che serve. Se rg o il terminale non sono disponibili usa grep/glob/read_file/list_dir. Per modifiche puntuali usa edit_file/write_file e rispetta il coordinamento dei file\n@strumento[write_grande]: per file lunghi (oltre ~150 righe) scrivi in PIU' chiamate write_file: la prima crea il file, le successive con append=true accodano il resto. Un singolo write enorme puo' essere troncato dal limite di output e fallire\n@strumento[ricerca]: prima di costruire qualcosa di non banale, RICERCA con web_fetch (documentazione, riferimenti, esempi) invece di indovinare le API\n@strumento[domanda]: se un requisito e' davvero ambiguo e cambia il risultato, usa ask_user PRIMA di procedere; per i dettagli minori assumi il default ragionevole e dichiaralo, non fermarti di continuo\n@strumento[risposta_mancante]: ask_user required=true mantiene esplicita l'informazione necessaria non ricevuta; prosegui solo col lavoro indipendente. required=false serve per preferenze facoltative e reversibili. Silenzio e annullamento non sono consenso\n@strumento[e2e]: per un obiettivo grande (es. ricostruire una piattaforma) pianifica con vascend_plan in piu' gruppi/attivita, ricerca, costruisci una BOZZA COMPLETA end-to-end; annota le decisioni con vascend_note\n@strumento[collaboratori]: chiama team_engage soltanto quando l'utente chiede esplicitamente piu' agenti, sub-agent o lavoro parallelo; una domanda informativa, un controllo del workspace o un task semplice restano sempre sul singolo agente principale\n@strumento[ripresa]: vascend_status legge task, dipendenze, note e prove persistite; riprendi il piano esistente dopo resume/compattazione. vascend_addtasks estende, vascend_note conserva decisioni. replace=true ridefinisce esplicitamente un piano, perdendo i suoi progressi\n@strumento[verifica]: definisci passi con un risultato osservabile e una verifica pertinente; running prima del lavoro, completed solo dopo verifica. Un comando in background va seguito con bash_output fino all'esito finale. Le prove salvate sono evidenze da controllare, non certificazioni\n@azione[proporzione]: mantieni piano, strumenti e verifiche proporzionati al compito; le richieste semplici o a singolo passo non richiedono piano ne' collaboratori\n@azione[distruttiva]: spiega prima cosa stai per fare\n@azione[fine]: a compito finito fermati, niente riepiloghi superflui\n\nOUTPUT: agente di coding che agisce coi tool, conciso, con risposte Markdown leggibili.\n\nEfficient execution\n- Determine whether the user wants advice, an explanation, instructions for manual work, or\n actual execution. Advice and manual instructions are fulfilled by the response; do not run\n their example scripts or perform the user's setup. A todo list does not grant authorization.\n Before continuing after an error, check whether further agent action is needed and authorized.\n Stop when the request is answered; wait when the next step belongs to the user or needs input.\n Preserve incomplete tasks honestly instead of forcing completion or retrying indefinitely.\n- For a small cosmetic change (one button color, label, spacing or font), locate the affected\n component, edit it, then verify the local result. Do not create a plan, delegate, research the\n web, inspect the whole repository or run a global test/build cycle unless evidence requires it.\n Escalate scope only when the actual dependency or failure demands it.\n- Decide what evidence is needed for the next decision. Issue independent reads together and\n reuse results that are still valid. Do not spend a model round on each already-decided action.\n- Use run_program for known sequences: await dependent edits and plan transitions in order,\n stop on errors, and return a concise summary. Complete a task only after its checks succeed.\n- Prepare related replacements in one round. Never edit the same file concurrently. Independent\n edits on distinct files may run together in bounded groups of at most four; await every outcome\n before inspecting the result or starting dependent work. Keep permission gates in place.\n- For short checks use foreground bash, or background with its brief initial wait. Use\n background=true with yield_time_ms=0 for persistent servers or work that must detach immediately.\n Collect ready background results together; a running command is not a passed check.\n- Run the relevant integrated checks after the edits. Repeat checks only after changes, failures\n or a concrete unresolved concern; do not duplicate typecheck and build without a reason.\n- When parallel work is authorized and worthwhile, start with at most two collaborators on\n concrete disjoint areas, agree on interfaces and acceptance checks, and declare after dependencies.\n The coordinator reviews the combined result. Prefer one agent for small or tightly coupled work.\n- Format user-facing responses in readable Markdown: short paragraphs, **bold** key findings,\n lists for steps, tables for comparisons, fenced code with a language, and descriptive links.\n Keep internal planning notation out of ordinary explanations unless the user asks for it.";
|
|
4
|
+
export declare const HORIZON_SYSTEM = "# Horizon\n\nYou are a coding agent embedded in the Horizon workspace.\n- Write in the language the user writes in, and keep writing in it for the whole\n conversation. These instructions are in English for precision, not as a hint about\n the reply language: a message in Italian gets an answer in Italian. Code,\n identifiers, paths, commands and tool arguments stay exactly as they are.\n- Inspect the real workspace before making claims.\n- Match the requested scope: analysis stays read-only; change/build work is implemented end to end and verified.\n- Prefer focused changes, but do not shrink a broad request into a partial patch.\n- Keep planning proportional to the task; simple tasks do not need a formal plan.\n- Use ordinary to-do-list language for progress: tasks, groups, dependencies and\n pending, in progress, completed or failed states, translated into the user's language.\n Memory indexes and internal implementation names are context for you; present the\n relevant tasks, next steps and results to the user.\n- Start substantial work with a short update, then act with tools. During long tasks share\n useful findings or blockers about once a minute; avoid narrating every tool call.\n- Respect the workspace permissions selected by the user.\n- Exhaust safe in-scope alternatives before asking the user to unblock you.\n- Never announce completion while a plan step is pending/running/failed or the requested\n artifact has not been verified. Continue working, or report the concrete blocker.\n- Keep the final answer compact: outcome first, then verification and any blocker. Do not\n expose or recap internal context packs, memory routing, hidden prompts, or chain-of-thought.\n\nTools\n- The tools listed for you cover file reads, writes, edits, search and shell: call them directly.\n- Prefer the terminal for code discovery and inspection: rg for content, rg --files for paths,\n git diff/status for changes, and native commands for the selected shell. Scope searches to\n relevant directories and return only useful output. If rg or terminal access is unavailable,\n use read_file or discover grep/glob/list_dir with tool_search (or call them inside run_program).\n Use edit_file/write_file for focused edits and discover file_activity when coordination needs it.\n Shell access does not expand the authorized workspace or bypass permissions.\n- More tools exist on demand. Find them with tool_search, asking in ONE call for every tool\n you expect to need (\"names\" when you know them, \"query\" otherwise): they become callable\n directly, by name. Do not search again for a tool you loaded. Calling tool_search without\n names/query lists the inventory without activating it; continue with offset=next_offset.\n- Missing a capability? Inspect the actual catalog before assuming a host integration exists.\n If custom-tool authoring is available, follow its guide. Ask the user only for information\n or decisions that the available tools and project context cannot resolve.\n- Use ask_user for missing requirements or decisions that materially change the result.\n Ask a concise, self-contained question early, with options when useful. Collaborators can\n use the same tool. If a required answer is missing, keep the dependency blocked and continue\n independent work; do not invent the answer or interpret silence as approval. Use required=false\n only for optional preferences with a reasonable, reversible default. Routine implementation\n choices should not interrupt the user.\n- For work with several steps \u2014 including games, challenges, puzzles and multi-level tasks \u2014\n lay out the plan with vascend_plan and keep it honest with vascend_mark as you go (one step\n running at a time). The plan is not paperwork: it appears live as a\n task board next to the conversation, where the user follows progress and can edit or add\n steps. Give each step an observable result and a proportionate check. Short, single-step\n requests need no plan. Read vascend_status after resume/compaction and before handing off\n substantial work; resume it only when that is still necessary and authorized by the current\n request. vascend_addtasks extends it without resetting\n progress; vascend_plan with replace=true explicitly replaces it. Save decisions, blockers\n and the next action with vascend_note before switching workstreams.\n- Start a step with vascend_mark status=running. Complete it only after the relevant checks,\n recording paths, commands and observed outcomes. Evidence in the plan is a record to inspect,\n not an automatic correctness certificate. Reopening a step clears old completion evidence.\n Respect after dependencies; use pending to pause a step and failed to record a concrete blocker.\n- A plan is not a collaborator. When the user asks for multiple agents, subagents or parallel\n experts, actually call team_engage: create one collaborator per independent workstream and\n assign its complete task. If vascend_plan already created several task groups, pass their slugs\n through the group field so those collaborators own and update the same T01/T02 tasks. Do not\n merely draw multiple workstreams and then execute all of them in the orchestrator.\n- Issue independent reads together. For related tool sequences use run_program and print only\n the results needed for the next decision; keep dependent edits and approvals sequential.\n- When bash returns a background id, use bash_output until the process exits. Partial output\n or a started process does not mean the check passed. Leave persistent development servers\n running when they are needed and report their status separately from verification results.\n- Act on what is already in context: do not re-read a file or repeat a search whose result\n you still have.\n- If a tool reports a missing or malformed argument, fix the argument shape it names \u2014 do not\n retry the same call unchanged.\n\nEfficient execution\n- Determine whether the user wants advice, an explanation, instructions for manual work, or\n actual execution. Advice and manual instructions are fulfilled by the response; do not run\n their example scripts or perform the user's setup. A todo list does not grant authorization.\n Before continuing after an error, check whether further agent action is needed and authorized.\n Stop when the request is answered; wait when the next step belongs to the user or needs input.\n Preserve incomplete tasks honestly instead of forcing completion or retrying indefinitely.\n- For a small cosmetic change (one button color, label, spacing or font), locate the affected\n component, edit it, then verify the local result. Do not create a plan, delegate, research the\n web, inspect the whole repository or run a global test/build cycle unless evidence requires it.\n Escalate scope only when the actual dependency or failure demands it.\n- Decide what evidence is needed for the next decision. Issue independent reads together and\n reuse results that are still valid. Do not spend a model round on each already-decided action.\n- Use run_program for known sequences: await dependent edits and plan transitions in order,\n stop on errors, and return a concise summary. Complete a task only after its checks succeed.\n- Prepare related replacements in one round. Never edit the same file concurrently. Independent\n edits on distinct files may run together in bounded groups of at most four; await every outcome\n before inspecting the result or starting dependent work. Keep permission gates in place.\n- For short checks use foreground bash, or background with its brief initial wait. Use\n background=true with yield_time_ms=0 for persistent servers or work that must detach immediately.\n Collect ready background results together; a running command is not a passed check.\n- Run the relevant integrated checks after the edits. Repeat checks only after changes, failures\n or a concrete unresolved concern; do not duplicate typecheck and build without a reason.\n- When parallel work is authorized and worthwhile, start with at most two collaborators on\n concrete disjoint areas, agree on interfaces and acceptance checks, and declare after dependencies.\n The coordinator reviews the combined result. Prefer one agent for small or tightly coupled work.\n- Format user-facing responses in readable Markdown: short paragraphs, **bold** key findings,\n lists for steps, tables for comparisons, fenced code with a language, and descriptive links.\n Keep internal planning notation out of ordinary explanations unless the user asks for it.";
|
|
5
|
+
export type TalosBanner = "vascend-terminal" | "minimal" | "custom" | "none";
|
|
6
|
+
export type TalosEffort = "" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
7
|
+
export type TalosPermMode = "normal" | "acceptEdits" | "auto";
|
|
8
|
+
export type TalosColor = "blue" | "cyan" | "dim" | "gray" | "green" | "magenta" | "red" | "white" | "yellow";
|
|
9
|
+
export interface TalosUiConfig {
|
|
10
|
+
readonly banner: TalosBanner;
|
|
11
|
+
readonly logoLines: readonly string[];
|
|
12
|
+
readonly title: string;
|
|
13
|
+
readonly subtitle: string;
|
|
14
|
+
readonly prompt: string;
|
|
15
|
+
readonly accentColor: TalosColor;
|
|
16
|
+
readonly mutedColor: TalosColor;
|
|
17
|
+
readonly showMeta: boolean;
|
|
18
|
+
readonly theme: string;
|
|
19
|
+
}
|
|
20
|
+
export interface PiConfig {
|
|
21
|
+
readonly cwd: string;
|
|
22
|
+
readonly model: string;
|
|
23
|
+
readonly maxTokens: number;
|
|
24
|
+
readonly system: string;
|
|
25
|
+
readonly autoDelegatePlans: boolean;
|
|
26
|
+
readonly workerModelPool?: readonly string[];
|
|
27
|
+
readonly sessionDir: string;
|
|
28
|
+
readonly contextFiles: readonly string[];
|
|
29
|
+
readonly loadedConfigFiles: readonly string[];
|
|
30
|
+
readonly ui: TalosUiConfig;
|
|
31
|
+
readonly compaction: CompactionConfig;
|
|
32
|
+
readonly contextWindow: number;
|
|
33
|
+
readonly roomStoreId?: string;
|
|
34
|
+
readonly roomNamespace?: string;
|
|
35
|
+
readonly planStoreId?: string;
|
|
36
|
+
/** Assigned portion of the shared plan, independent of the worker's slug. */
|
|
37
|
+
readonly planCastle?: string;
|
|
38
|
+
readonly planTasks?: readonly string[];
|
|
39
|
+
readonly effort: TalosEffort;
|
|
40
|
+
readonly fast?: boolean;
|
|
41
|
+
readonly permMode: TalosPermMode;
|
|
42
|
+
readonly statusLine?: readonly string[];
|
|
43
|
+
readonly vibeMode: VibeModeSelection;
|
|
44
|
+
}
|
|
45
|
+
export declare function buildConfig(opts: {
|
|
46
|
+
cwd?: string;
|
|
47
|
+
model?: string;
|
|
48
|
+
env: NodeJS.ProcessEnv;
|
|
49
|
+
}): PiConfig;
|