@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,84 @@
|
|
|
1
|
+
import type { Message } from "../core/types.js";
|
|
2
|
+
import { type VisionLike } from "./long-term-context.js";
|
|
3
|
+
export type VascendMode = "off" | "sticky";
|
|
4
|
+
export type VascendPromptMode = "one-shot" | "sticky";
|
|
5
|
+
export type VascendTaskStatus = "pending" | "running" | "completed" | "failed";
|
|
6
|
+
export interface VascendTask {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly bit: number;
|
|
9
|
+
readonly mask: string;
|
|
10
|
+
readonly title: string;
|
|
11
|
+
readonly status: VascendTaskStatus;
|
|
12
|
+
readonly tokens?: number;
|
|
13
|
+
readonly ms?: number;
|
|
14
|
+
readonly notes?: readonly string[];
|
|
15
|
+
readonly skills?: readonly string[];
|
|
16
|
+
readonly weight?: number;
|
|
17
|
+
readonly files?: readonly string[];
|
|
18
|
+
readonly evidence?: readonly string[];
|
|
19
|
+
readonly compact?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface VascendCastle {
|
|
22
|
+
readonly slug: string;
|
|
23
|
+
readonly title: string;
|
|
24
|
+
readonly maskTarget: string;
|
|
25
|
+
readonly tasks: readonly VascendTask[];
|
|
26
|
+
readonly notes?: readonly string[];
|
|
27
|
+
readonly skills?: readonly string[];
|
|
28
|
+
readonly after?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface VascendKingdom {
|
|
31
|
+
readonly castles: readonly VascendCastle[];
|
|
32
|
+
}
|
|
33
|
+
export interface VascendState {
|
|
34
|
+
readonly mode: VascendMode;
|
|
35
|
+
readonly goal: string | null;
|
|
36
|
+
readonly kingdom: VascendKingdom;
|
|
37
|
+
readonly vision?: VisionLike | null;
|
|
38
|
+
}
|
|
39
|
+
export interface PreparedVascendInput {
|
|
40
|
+
readonly active: boolean;
|
|
41
|
+
readonly input: string;
|
|
42
|
+
}
|
|
43
|
+
export type VascendCommandResult = {
|
|
44
|
+
readonly kind: "status";
|
|
45
|
+
readonly message: string;
|
|
46
|
+
} | {
|
|
47
|
+
readonly kind: "input";
|
|
48
|
+
readonly message: string;
|
|
49
|
+
readonly input: string;
|
|
50
|
+
};
|
|
51
|
+
export interface VascendCheckpoint {
|
|
52
|
+
readonly path: string;
|
|
53
|
+
readonly text: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const VASCEND_SYSTEM_BLOCK = "# Lista delle attivita\nComunica in italiano naturale, con spiegazioni chiare e Markdown leggibile.\nDescrivi il lavoro con una to-do list: attivita, gruppi, dipendenze e stati\nda fare, in corso, completata o fallita. I riepiloghi della memoria sono solo\ncontesto interno: all'utente mostra le attivita e i risultati pertinenti.\nPer lavori con piu passi usa vascend_plan: un piano contiene gruppi di attivita,\nogni gruppo contiene attivita con stato, dipendenze e prove di verifica.\nAggiorna gli stati con vascend_mark; completa solo dopo le verifiche.\nUsa vascend_note per decisioni e blocchi e recall per recuperare il passato.\nPer lavori indipendenti valuta collaboratori tramite gli strumenti del team.\nPer domande o richieste semplici non creare un piano inutile.";
|
|
56
|
+
export interface VascendVerdict {
|
|
57
|
+
readonly ok: boolean;
|
|
58
|
+
readonly total: number;
|
|
59
|
+
readonly done: number;
|
|
60
|
+
readonly pending: readonly string[];
|
|
61
|
+
readonly failed: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
export declare function validateKingdom(state: VascendState): VascendVerdict;
|
|
64
|
+
export declare function buildValidationSteer(v: VascendVerdict): string;
|
|
65
|
+
export declare function createVascendState(): VascendState;
|
|
66
|
+
export declare function createVascendGoal(state: VascendState, goal: string): VascendState;
|
|
67
|
+
export declare function setVascendMode(state: VascendState, mode: VascendMode): VascendState;
|
|
68
|
+
export declare function setVascendVision(state: VascendState, vision: VisionLike | null): VascendState;
|
|
69
|
+
export declare function wrapVascendPrompt(state: VascendState, userText: string, mode: VascendPromptMode, checkpoint?: string): string;
|
|
70
|
+
export declare function formatVascendCompact(state: VascendState, messages?: readonly Message[]): string;
|
|
71
|
+
export declare class VascendRuntime {
|
|
72
|
+
private readonly cwd;
|
|
73
|
+
private stateValue;
|
|
74
|
+
private customPlan;
|
|
75
|
+
constructor(cwd: string, initialMode?: VascendMode);
|
|
76
|
+
state(): VascendState;
|
|
77
|
+
hasCustomPlan(): boolean;
|
|
78
|
+
loadPlan(sessionDir: string, sessionId: string): boolean;
|
|
79
|
+
resetPlan(sessionDir: string, sessionId: string): void;
|
|
80
|
+
handleCommand(args: string): VascendCommandResult;
|
|
81
|
+
prepareUserInput(userText: string): PreparedVascendInput;
|
|
82
|
+
compact(messages: readonly Message[]): VascendCheckpoint;
|
|
83
|
+
private wrap;
|
|
84
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { sanitizeText } from "../core/text-sanitize.js";
|
|
4
|
+
import { VascendPlanStore } from "./plan-store.js";
|
|
5
|
+
import { injectLongTermContext } from "./long-term-context.js";
|
|
6
|
+
export const VASCEND_SYSTEM_BLOCK = `# Lista delle attivita
|
|
7
|
+
Comunica in italiano naturale, con spiegazioni chiare e Markdown leggibile.
|
|
8
|
+
Descrivi il lavoro con una to-do list: attivita, gruppi, dipendenze e stati
|
|
9
|
+
da fare, in corso, completata o fallita. I riepiloghi della memoria sono solo
|
|
10
|
+
contesto interno: all'utente mostra le attivita e i risultati pertinenti.
|
|
11
|
+
Per lavori con piu passi usa vascend_plan: un piano contiene gruppi di attivita,
|
|
12
|
+
ogni gruppo contiene attivita con stato, dipendenze e prove di verifica.
|
|
13
|
+
Aggiorna gli stati con vascend_mark; completa solo dopo le verifiche.
|
|
14
|
+
Usa vascend_note per decisioni e blocchi e recall per recuperare il passato.
|
|
15
|
+
Per lavori indipendenti valuta collaboratori tramite gli strumenti del team.
|
|
16
|
+
Per domande o richieste semplici non creare un piano inutile.`;
|
|
17
|
+
export function validateKingdom(state) {
|
|
18
|
+
const castles = state.kingdom.castles;
|
|
19
|
+
const multi = castles.length > 1;
|
|
20
|
+
let total = 0;
|
|
21
|
+
let done = 0;
|
|
22
|
+
const pending = [];
|
|
23
|
+
const failed = [];
|
|
24
|
+
for (const c of castles) {
|
|
25
|
+
for (const t of c.tasks) {
|
|
26
|
+
total += 1;
|
|
27
|
+
const id = multi ? `${c.slug}/${t.id}` : t.id;
|
|
28
|
+
if (t.status === "completed")
|
|
29
|
+
done += 1;
|
|
30
|
+
else if (t.status === "failed")
|
|
31
|
+
failed.push(id);
|
|
32
|
+
else
|
|
33
|
+
pending.push(id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return { ok: total > 0 && done === total, total, done, pending, failed };
|
|
37
|
+
}
|
|
38
|
+
// Messaggio di steering per svegliare l'agente sulle stanze da completare.
|
|
39
|
+
export function buildValidationSteer(v) {
|
|
40
|
+
return `[VASCEND_VALIDAZIONE]
|
|
41
|
+
INDICE
|
|
42
|
+
1 = piano
|
|
43
|
+
2 = aperto
|
|
44
|
+
|
|
45
|
+
DEFINIZIONI
|
|
46
|
+
@stato[piano]: completate=${v.done}/${v.total}
|
|
47
|
+
@aperto[attivita]: ${v.pending.join(", ")} NON completate
|
|
48
|
+
|
|
49
|
+
RELAZIONI
|
|
50
|
+
@R: @aperto[attivita] -> @stato[piano] [ il piano NON valida finché restano attivita da completare ]
|
|
51
|
+
|
|
52
|
+
OUTPUT: completa le attivita non completate facendo il lavoro reale e segnandole con vascend_mark (status completed). Se una e' davvero impossibile, marcala failed indicando il motivo. Non concludere finché non sono tutte risolte.`;
|
|
53
|
+
}
|
|
54
|
+
export function createVascendState() {
|
|
55
|
+
return { mode: "off", goal: null, kingdom: { castles: [] } };
|
|
56
|
+
}
|
|
57
|
+
export function createVascendGoal(state, goal) {
|
|
58
|
+
const title = oneLine(goal) || "obiettivo";
|
|
59
|
+
// NIENTE castello automatico: il castello (con le sue stanze) si crea solo su
|
|
60
|
+
// richiesta (comando /castle) o quando l'agente pianifica con vascend_plan.
|
|
61
|
+
// Cosi' il riquadro non compare quando non serve (es. un saluto).
|
|
62
|
+
return { ...state, goal: title, kingdom: { castles: [] } };
|
|
63
|
+
}
|
|
64
|
+
export function setVascendMode(state, mode) {
|
|
65
|
+
return { ...state, mode };
|
|
66
|
+
}
|
|
67
|
+
// Imposta (o azzera con null) la VISION finale del task. Immutabile: crea un
|
|
68
|
+
// nuovo stato. Il goal momentaneo resta indipendente e non viene toccato.
|
|
69
|
+
export function setVascendVision(state, vision) {
|
|
70
|
+
return { ...state, vision };
|
|
71
|
+
}
|
|
72
|
+
export function wrapVascendPrompt(state, userText, mode, checkpoint) {
|
|
73
|
+
if (!state.goal)
|
|
74
|
+
return userText;
|
|
75
|
+
const checkpointBlock = checkpoint
|
|
76
|
+
? `\nCHECKPOINT_PRECEDENTE\n${checkpoint.trim()}\n`
|
|
77
|
+
: "";
|
|
78
|
+
const immediatePrompt = `[VASCEND_GOAL]
|
|
79
|
+
GOAL: ${state.goal}
|
|
80
|
+
MODE: ${mode}
|
|
81
|
+
${checkpointBlock}
|
|
82
|
+
Piano di lavoro:
|
|
83
|
+
- Comunica in modo naturale e leggibile, senza imporre notazioni speciali.
|
|
84
|
+
- Per lavori con piu passi crea o riprendi il piano con vascend_plan e vascend_status.
|
|
85
|
+
- Organizza il piano in gruppi e attivita; aggiorna gli stati con vascend_mark.
|
|
86
|
+
- Completa le attivita solo dopo verifiche concrete; registra decisioni e blocchi.
|
|
87
|
+
- Per lavori indipendenti valuta collaboratori; per domande semplici non serve un piano.
|
|
88
|
+
|
|
89
|
+
INPUT_UTENTE
|
|
90
|
+
${userText}`;
|
|
91
|
+
// Antepone il CONTESTO A LUNGO TERMINE (Vision finale) come piano SEPARATO
|
|
92
|
+
// dal goal immediato. Il goal corrente viene passato come "immediato" cosi'
|
|
93
|
+
// che il blocco espliciti la distinzione momentaneo/visione. Se non c'e'
|
|
94
|
+
// Vision con contenuto, injectLongTermContext ritorna il prompt invariato.
|
|
95
|
+
const currentCastle = state.kingdom.castles[0];
|
|
96
|
+
const currentRoom = currentCastle?.tasks.find((t) => t.status === "running");
|
|
97
|
+
return injectLongTermContext(immediatePrompt, {
|
|
98
|
+
vision: state.vision ?? null,
|
|
99
|
+
immediate: {
|
|
100
|
+
...(state.goal ? { goal: state.goal } : {}),
|
|
101
|
+
...(currentCastle ? { castle: currentCastle.title } : {}),
|
|
102
|
+
...(currentRoom ? { room: currentRoom.title } : {}),
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
export function formatVascendCompact(state, messages = []) {
|
|
107
|
+
const castle = state.kingdom.castles[0];
|
|
108
|
+
const multi = state.kingdom.castles.length > 1;
|
|
109
|
+
const tasks = state.kingdom.castles.flatMap(group => group.tasks.map(task => ({ ...task,
|
|
110
|
+
id: multi ? `${group.slug}/${task.id}` : task.id,
|
|
111
|
+
})));
|
|
112
|
+
const groups = state.kingdom.castles.map(group => `@gruppo[${group.slug}]: titolo="${escapeValue(group.title)}", dipendenza=${group.after ?? "none"}`).join("\n");
|
|
113
|
+
const taskRows = tasks.length
|
|
114
|
+
? tasks.map((task) => compactTaskRow(task)).join("\n")
|
|
115
|
+
: "@aperto[goal]: nessun_gruppo_attivo, blocco=none";
|
|
116
|
+
const recent = messagePreviews(messages)
|
|
117
|
+
.map((text, index) => `@stato[recent_${index + 1}]: ${text}`)
|
|
118
|
+
.join("\n");
|
|
119
|
+
const relations = tasks.length
|
|
120
|
+
? tasks.map((task, index) => `@R${index + 1}: @stato[goal] -> @${task.status === "completed" ? "fatto" : "aperto"}[${task.id}], task`).join("\n")
|
|
121
|
+
: "@R1: @stato[goal] -> @aperto[goal], crea_gruppo";
|
|
122
|
+
// The synthetic summary is usually older than the last four messages.
|
|
123
|
+
// Keep it in the cold-start checkpoint, not just 140-character previews.
|
|
124
|
+
const summary = messages.flatMap(message => message.content
|
|
125
|
+
.filter(part => part.type === "text" && part.text.startsWith("[Riepilogo del contesto precedente]"))
|
|
126
|
+
.map(part => part.type === "text" ? part.text : "")).at(-1);
|
|
127
|
+
return `INDICE
|
|
128
|
+
1 = goal
|
|
129
|
+
2 = gruppo
|
|
130
|
+
3 = task
|
|
131
|
+
4 = file
|
|
132
|
+
5 = contesto
|
|
133
|
+
|
|
134
|
+
DEFINIZIONI
|
|
135
|
+
@stato[goal]: valore="${escapeValue(state.goal ?? "nessun_goal")}", mode=${state.mode}
|
|
136
|
+
@stato[gruppo]: slug=${castle?.slug ?? "none"}, mask=${castle?.maskTarget ?? "0x0000"}
|
|
137
|
+
${groups}
|
|
138
|
+
${taskRows}
|
|
139
|
+
@file[checkpoint]: path=.vascend-compact.md, ruolo=checkpoint, stato=aggiornato${recent ? `\n${recent}` : ""}
|
|
140
|
+
|
|
141
|
+
RELAZIONI
|
|
142
|
+
${relations}
|
|
143
|
+
@R99: @file[checkpoint] -> @stato[goal], ripresa
|
|
144
|
+
|
|
145
|
+
OUTPUT: stato compatto della sessione, pronto a riprendere a freddo.${summary ? `\n\nCONTESTO DI RIPRESA\n${summary}` : ""}`;
|
|
146
|
+
}
|
|
147
|
+
export class VascendRuntime {
|
|
148
|
+
cwd;
|
|
149
|
+
stateValue;
|
|
150
|
+
customPlan = false;
|
|
151
|
+
// initialMode permette di rendere il metodo Vascend NATIVO (sticky) di
|
|
152
|
+
// default nella TUI, senza dover digitare /vascend on. Default "off" per
|
|
153
|
+
// mantenere puro il runtime fuori dalla TUI (test, print, SDK).
|
|
154
|
+
constructor(cwd, initialMode = "off") {
|
|
155
|
+
this.cwd = cwd;
|
|
156
|
+
this.stateValue = setVascendMode(createVascendState(), initialMode);
|
|
157
|
+
}
|
|
158
|
+
state() {
|
|
159
|
+
return this.stateValue;
|
|
160
|
+
}
|
|
161
|
+
hasCustomPlan() {
|
|
162
|
+
return this.customPlan;
|
|
163
|
+
}
|
|
164
|
+
// Carica il piano CUSTOM definito dall'agente (vascend_plan/vascend_mark) e lo
|
|
165
|
+
// riflette come castello master, con gli stati reali delle stanze. Ritorna
|
|
166
|
+
// true se esiste un piano custom: in tal caso la TUI mostra le stanze vere e
|
|
167
|
+
// si salta l'euristica di illuminazione (begin/record/finish).
|
|
168
|
+
loadPlan(sessionDir, sessionId) {
|
|
169
|
+
const planned = VascendPlanStore.open(sessionDir, sessionId).castles();
|
|
170
|
+
if (!planned.length) {
|
|
171
|
+
this.customPlan = false;
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
const castles = planned.map((c) => ({
|
|
175
|
+
slug: c.slug,
|
|
176
|
+
title: c.title,
|
|
177
|
+
maskTarget: c.maskTarget,
|
|
178
|
+
tasks: c.tasks.map((t) => ({
|
|
179
|
+
id: t.id, bit: t.bit, mask: t.mask, title: t.title, status: t.status,
|
|
180
|
+
...(t.tokens !== undefined ? { tokens: t.tokens } : {}),
|
|
181
|
+
...(t.ms !== undefined ? { ms: t.ms } : {}),
|
|
182
|
+
...(t.notes ? { notes: t.notes } : {}),
|
|
183
|
+
...(t.skills ? { skills: t.skills } : {}),
|
|
184
|
+
...(t.weight ? { weight: t.weight } : {}),
|
|
185
|
+
...(t.files ? { files: t.files } : {}),
|
|
186
|
+
...(t.evidence ? { evidence: t.evidence } : {}),
|
|
187
|
+
...(t.compact ? { compact: true } : {}),
|
|
188
|
+
})),
|
|
189
|
+
...(c.notes ? { notes: c.notes } : {}),
|
|
190
|
+
...(c.skills ? { skills: c.skills } : {}),
|
|
191
|
+
...(c.after ? { after: c.after } : {}),
|
|
192
|
+
}));
|
|
193
|
+
this.stateValue = {
|
|
194
|
+
...this.stateValue,
|
|
195
|
+
goal: this.stateValue.goal ?? castles[0]?.title ?? null,
|
|
196
|
+
kingdom: { castles },
|
|
197
|
+
};
|
|
198
|
+
this.customPlan = true;
|
|
199
|
+
return true;
|
|
200
|
+
}
|
|
201
|
+
// Azzera il piano custom del regno (nuovo obiettivo = regno pulito).
|
|
202
|
+
resetPlan(sessionDir, sessionId) {
|
|
203
|
+
VascendPlanStore.open(sessionDir, sessionId).clear();
|
|
204
|
+
this.customPlan = false;
|
|
205
|
+
}
|
|
206
|
+
handleCommand(args) {
|
|
207
|
+
const value = args.trim();
|
|
208
|
+
if (!value || value === "on") {
|
|
209
|
+
this.stateValue = setVascendMode(this.stateValue, "sticky");
|
|
210
|
+
return { kind: "status", message: "vascend sticky attivo" };
|
|
211
|
+
}
|
|
212
|
+
if (value === "off") {
|
|
213
|
+
this.stateValue = createVascendState();
|
|
214
|
+
return { kind: "status", message: "vascend spento; piano svuotato" };
|
|
215
|
+
}
|
|
216
|
+
if (value === "clear") {
|
|
217
|
+
this.stateValue = createVascendState();
|
|
218
|
+
return { kind: "status", message: "piano vascend svuotato" };
|
|
219
|
+
}
|
|
220
|
+
if (value === "status") {
|
|
221
|
+
return { kind: "status", message: this.stateValue.mode === "sticky" ? "vascend sticky attivo" : "vascend non sticky" };
|
|
222
|
+
}
|
|
223
|
+
this.stateValue = createVascendGoal(this.stateValue, value);
|
|
224
|
+
return {
|
|
225
|
+
kind: "input",
|
|
226
|
+
message: "goal vascend one-shot creato",
|
|
227
|
+
input: this.wrap(value, "one-shot"),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
prepareUserInput(userText) {
|
|
231
|
+
if (this.stateValue.mode !== "sticky")
|
|
232
|
+
return { active: false, input: userText };
|
|
233
|
+
this.stateValue = createVascendGoal(this.stateValue, userText);
|
|
234
|
+
return { active: true, input: this.wrap(userText, "sticky") };
|
|
235
|
+
}
|
|
236
|
+
compact(messages) {
|
|
237
|
+
const text = formatVascendCompact(this.stateValue, messages);
|
|
238
|
+
const path = checkpointPath(this.cwd);
|
|
239
|
+
writeFileSync(path, text + "\n", "utf8");
|
|
240
|
+
return { path, text };
|
|
241
|
+
}
|
|
242
|
+
wrap(userText, mode) {
|
|
243
|
+
return wrapVascendPrompt(this.stateValue, userText, mode, readCheckpoint(this.cwd));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function compactTaskRow(task) {
|
|
247
|
+
const kind = task.status === "completed" ? "fatto" : "aperto";
|
|
248
|
+
const block = task.status === "failed" ? ", blocco=failed" : "";
|
|
249
|
+
const evidence = task.evidence?.length
|
|
250
|
+
? `, prove="${escapeValue(task.evidence.slice(-3).join(" | "))}"`
|
|
251
|
+
: "";
|
|
252
|
+
return `@${kind}[${task.id}]: titolo="${escapeValue(task.title)}", bit=${task.bit}, mask=${task.mask}, esito=${task.status}${block}${evidence}`;
|
|
253
|
+
}
|
|
254
|
+
function messagePreviews(messages) {
|
|
255
|
+
return messages.slice(-4).flatMap((message) => {
|
|
256
|
+
const text = message.content
|
|
257
|
+
.map((part) => {
|
|
258
|
+
if (part.type === "text")
|
|
259
|
+
return part.text;
|
|
260
|
+
if (part.type === "tool_call")
|
|
261
|
+
return `${part.name} ${JSON.stringify(part.input)}`;
|
|
262
|
+
if (part.type === "image")
|
|
263
|
+
return `[immagine ${part.mime}]`;
|
|
264
|
+
return part.output;
|
|
265
|
+
})
|
|
266
|
+
.join(" ");
|
|
267
|
+
const compact = oneLine(text).slice(0, 140);
|
|
268
|
+
return compact ? [`role=${message.role}, text="${escapeValue(compact)}"`] : [];
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function checkpointPath(cwd) {
|
|
272
|
+
return join(cwd, ".vascend-compact.md");
|
|
273
|
+
}
|
|
274
|
+
function readCheckpoint(cwd) {
|
|
275
|
+
const path = checkpointPath(cwd);
|
|
276
|
+
return existsSync(path) ? readFileSync(path, "utf8") : undefined;
|
|
277
|
+
}
|
|
278
|
+
function oneLine(value) {
|
|
279
|
+
return sanitizeText(value).replace(/\s+/g, " ").trim();
|
|
280
|
+
}
|
|
281
|
+
function escapeValue(value) {
|
|
282
|
+
return oneLine(value).replace(/"/g, "'");
|
|
283
|
+
}
|
|
284
|
+
function hexMask(value) {
|
|
285
|
+
return `0x${value.toString(16).padStart(4, "0")}`;
|
|
286
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { Harness } from "../core/bootstrap.js";
|
|
2
|
+
export interface VisionFeatureLike {
|
|
3
|
+
readonly id?: string;
|
|
4
|
+
readonly title?: string;
|
|
5
|
+
readonly name?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
readonly priority?: string;
|
|
8
|
+
readonly done?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ReadinessCriterionLike {
|
|
11
|
+
readonly id?: string;
|
|
12
|
+
readonly text?: string;
|
|
13
|
+
readonly description?: string;
|
|
14
|
+
readonly met?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface VisionValueLike {
|
|
17
|
+
readonly statement?: string;
|
|
18
|
+
readonly text?: string;
|
|
19
|
+
readonly metrics?: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
export interface VisionLike {
|
|
22
|
+
readonly id?: string;
|
|
23
|
+
readonly title?: string;
|
|
24
|
+
readonly finalGoal?: string;
|
|
25
|
+
readonly value?: VisionValueLike | string;
|
|
26
|
+
readonly features?: readonly VisionFeatureLike[];
|
|
27
|
+
readonly readinessCriteria?: readonly ReadinessCriterionLike[];
|
|
28
|
+
readonly summary?: string;
|
|
29
|
+
}
|
|
30
|
+
export type ImprovementCategory = "feature" | "quality" | "ux" | "robustness" | "performance" | "alignment";
|
|
31
|
+
export type ImprovementPriority = "must" | "should" | "could";
|
|
32
|
+
export interface ImprovementProposal {
|
|
33
|
+
readonly text: string;
|
|
34
|
+
readonly category: ImprovementCategory;
|
|
35
|
+
readonly priority: ImprovementPriority;
|
|
36
|
+
readonly impact: number;
|
|
37
|
+
readonly effort?: "small" | "medium" | "large";
|
|
38
|
+
readonly visionRef?: string;
|
|
39
|
+
readonly rationale?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface SelfImproveReport {
|
|
42
|
+
readonly alignment: number;
|
|
43
|
+
readonly atVision: boolean;
|
|
44
|
+
readonly proposals: readonly ImprovementProposal[];
|
|
45
|
+
readonly summary: string;
|
|
46
|
+
readonly fallback: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare function selfImproveEnabled(env: NodeJS.ProcessEnv): boolean;
|
|
49
|
+
export declare function selfImproveRounds(env: NodeJS.ProcessEnv): number;
|
|
50
|
+
export declare function selfImproveThreshold(env: NodeJS.ProcessEnv): number;
|
|
51
|
+
export declare function selfImproveMaxProposals(env: NodeJS.ProcessEnv): number;
|
|
52
|
+
export interface SelfImproveOptions {
|
|
53
|
+
readonly enabled: boolean;
|
|
54
|
+
readonly rounds: number;
|
|
55
|
+
readonly threshold: number;
|
|
56
|
+
readonly maxProposals: number;
|
|
57
|
+
}
|
|
58
|
+
export declare function selfImproveOptions(env: NodeJS.ProcessEnv): SelfImproveOptions;
|
|
59
|
+
export declare function aggregateProposals(opts: {
|
|
60
|
+
readonly proposals: readonly ImprovementProposal[];
|
|
61
|
+
readonly alignment?: number;
|
|
62
|
+
readonly threshold?: number;
|
|
63
|
+
readonly maxProposals?: number;
|
|
64
|
+
readonly fallback?: boolean;
|
|
65
|
+
}): SelfImproveReport;
|
|
66
|
+
export declare function visionToText(vision: VisionLike | string | undefined): string;
|
|
67
|
+
interface RawProposal {
|
|
68
|
+
text?: unknown;
|
|
69
|
+
category?: unknown;
|
|
70
|
+
priority?: unknown;
|
|
71
|
+
impact?: unknown;
|
|
72
|
+
effort?: unknown;
|
|
73
|
+
visionRef?: unknown;
|
|
74
|
+
rationale?: unknown;
|
|
75
|
+
}
|
|
76
|
+
export declare function normalizeProposal(raw: RawProposal): ImprovementProposal | null;
|
|
77
|
+
export declare function parseProposals(text: string): ImprovementProposal[];
|
|
78
|
+
export declare function parseReport(text: string, opts?: {
|
|
79
|
+
readonly threshold?: number;
|
|
80
|
+
readonly maxProposals?: number;
|
|
81
|
+
}): SelfImproveReport;
|
|
82
|
+
export interface SelfImproveInput {
|
|
83
|
+
readonly harness: Harness;
|
|
84
|
+
readonly vision: VisionLike | string | undefined;
|
|
85
|
+
readonly evidence: string;
|
|
86
|
+
readonly goal?: string;
|
|
87
|
+
readonly signal: AbortSignal;
|
|
88
|
+
readonly threshold?: number;
|
|
89
|
+
readonly maxProposals?: number;
|
|
90
|
+
}
|
|
91
|
+
export declare function runSelfImprove(input: SelfImproveInput): Promise<SelfImproveReport>;
|
|
92
|
+
export declare function buildSelfImproveSteer(goal: string, report: SelfImproveReport): string;
|
|
93
|
+
export declare function selfImproveSummary(report: SelfImproveReport): string;
|
|
94
|
+
export declare function formatSelfImproveReport(report: SelfImproveReport): string;
|
|
95
|
+
interface RealVisionShape {
|
|
96
|
+
readonly id?: string;
|
|
97
|
+
readonly title?: string;
|
|
98
|
+
readonly finalGoal?: string;
|
|
99
|
+
readonly value?: VisionValueLike | string;
|
|
100
|
+
readonly features?: readonly VisionFeatureLike[];
|
|
101
|
+
readonly readinessCriteria?: readonly ReadinessCriterionLike[];
|
|
102
|
+
}
|
|
103
|
+
export declare function fromVision(vision: RealVisionShape | VisionLike, summary?: string): VisionLike;
|
|
104
|
+
export {};
|