@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 @@
|
|
|
1
|
+
{"type":"commonjs","private":true}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const MAX_OPERATIONS = 12;
|
|
4
|
+
const MAX_TEXT = 4000;
|
|
5
|
+
|
|
6
|
+
const KEY_ALIASES = Object.freeze({
|
|
7
|
+
ctrl: 'Ctrl', control: 'Ctrl', shift: 'Shift', alt: 'Alt',
|
|
8
|
+
space: 'Space', tab: 'Tab', esc: 'Esc', escape: 'Esc',
|
|
9
|
+
enter: 'Enter', return: 'Enter', backspace: 'Backspace', delete: 'Delete', del: 'Delete',
|
|
10
|
+
home: 'Home', end: 'End', left: 'ArrowLeft', arrowleft: 'ArrowLeft',
|
|
11
|
+
up: 'ArrowUp', arrowup: 'ArrowUp', right: 'ArrowRight', arrowright: 'ArrowRight',
|
|
12
|
+
down: 'ArrowDown', arrowdown: 'ArrowDown',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
function normalizeKey(value) {
|
|
16
|
+
const raw = String(value || '').trim();
|
|
17
|
+
if (!raw) return null;
|
|
18
|
+
const alias = KEY_ALIASES[raw.toLowerCase()];
|
|
19
|
+
if (alias) return alias;
|
|
20
|
+
if (/^[a-z0-9]$/i.test(raw)) return raw.toUpperCase();
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function normalizeShortcut(keys) {
|
|
25
|
+
const source = Array.isArray(keys)
|
|
26
|
+
? keys
|
|
27
|
+
: String(keys || '').split(/[+\s]+/).filter(Boolean);
|
|
28
|
+
if (!source.length || source.length > 4) {
|
|
29
|
+
return { ok: false, code: 'BAD_SHORTCUT', error: 'Una scorciatoia richiede da uno a quattro tasti.' };
|
|
30
|
+
}
|
|
31
|
+
const normalized = [];
|
|
32
|
+
for (const value of source) {
|
|
33
|
+
const key = normalizeKey(value);
|
|
34
|
+
if (!key) return { ok: false, code: 'BAD_SHORTCUT', error: `Tasto non ammesso: ${String(value)}` };
|
|
35
|
+
if (!normalized.includes(key)) normalized.push(key);
|
|
36
|
+
}
|
|
37
|
+
return { ok: true, keys: normalized };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function normalizeAtomicOperations(value) {
|
|
41
|
+
if (!Array.isArray(value) || !value.length || value.length > MAX_OPERATIONS) {
|
|
42
|
+
return { ok: false, code: 'BAD_OPERATIONS', error: `Servono da 1 a ${MAX_OPERATIONS} operazioni.` };
|
|
43
|
+
}
|
|
44
|
+
const operations = [];
|
|
45
|
+
for (const raw of value) {
|
|
46
|
+
const type = String(raw && raw.type || '').trim().toLowerCase();
|
|
47
|
+
if (type === 'shortcut') {
|
|
48
|
+
const shortcut = normalizeShortcut(raw.keys);
|
|
49
|
+
if (!shortcut.ok) return shortcut;
|
|
50
|
+
operations.push({ type, keys: shortcut.keys });
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (type === 'text') {
|
|
54
|
+
const text = String(raw && raw.text != null ? raw.text : '');
|
|
55
|
+
if (!text || text.length > MAX_TEXT || /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/.test(text)) {
|
|
56
|
+
return { ok: false, code: 'BAD_TEXT', error: `Il testo deve contenere da 1 a ${MAX_TEXT} caratteri stampabili.` };
|
|
57
|
+
}
|
|
58
|
+
operations.push({ type, text });
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (type === 'mouse') {
|
|
62
|
+
const dx = Number(raw && raw.dx || 0);
|
|
63
|
+
const dy = Number(raw && raw.dy || 0);
|
|
64
|
+
const scroll = Number(raw && raw.scroll || 0);
|
|
65
|
+
if (![dx, dy, scroll].every(Number.isInteger)
|
|
66
|
+
|| Math.abs(dx) > 1000 || Math.abs(dy) > 1000 || Math.abs(scroll) > 5) {
|
|
67
|
+
return { ok: false, code: 'BAD_MOUSE', error: 'Mouse fuori range: dx/dy ±1000, scroll ±5.' };
|
|
68
|
+
}
|
|
69
|
+
operations.push({ type, dx, dy, scroll });
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (type === 'click') {
|
|
73
|
+
const button = String(raw && raw.button || 'left').toLowerCase();
|
|
74
|
+
if (!['left', 'right', 'middle'].includes(button)) {
|
|
75
|
+
return { ok: false, code: 'BAD_BUTTON', error: 'Pulsante ammesso: left, right o middle.' };
|
|
76
|
+
}
|
|
77
|
+
operations.push({ type, button });
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
return { ok: false, code: 'BAD_OPERATION', error: `Operazione non ammessa: ${type || '(vuota)'}` };
|
|
81
|
+
}
|
|
82
|
+
return { ok: true, operations };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
module.exports = {
|
|
86
|
+
MAX_OPERATIONS,
|
|
87
|
+
MAX_TEXT,
|
|
88
|
+
normalizeKey,
|
|
89
|
+
normalizeShortcut,
|
|
90
|
+
normalizeAtomicOperations,
|
|
91
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// MCP-RAC — grammatica computer-use v0.1 (spec §6.4).
|
|
4
|
+
//
|
|
5
|
+
// Un'azione e' un blocco:
|
|
6
|
+
//
|
|
7
|
+
// ACTION <observation_id> ttl=<ms>
|
|
8
|
+
// <dx> <dy> <scroll> ; K1 ; K2 ; ... ; K6 END
|
|
9
|
+
//
|
|
10
|
+
// Il primo segmento e' il MOVIMENTO (relativo, distribuito sull'orizzonte);
|
|
11
|
+
// i successivi sono KEYSET: l'insieme dei tasti tenuti premuti per 33 ms.
|
|
12
|
+
// `_` e' il keyset vuoto (tutto rilasciato). Le chiavi assenti si rilasciano.
|
|
13
|
+
//
|
|
14
|
+
// La grammatica e' volutamente povera: niente Enter, niente Canc, niente tasto
|
|
15
|
+
// Windows. Non e' una dimenticanza — e' il primo strato di sicurezza (spec §13):
|
|
16
|
+
// le azioni irreversibili non devono essere ESPRIMIBILI nel canale reattivo,
|
|
17
|
+
// prima ancora che vietate da una policy.
|
|
18
|
+
|
|
19
|
+
const LIMITI = Object.freeze({
|
|
20
|
+
MOUSE_DELTA: 1000, // dx, dy in [-1000, 1000]
|
|
21
|
+
SCROLL: 5, // scroll in [-5, 5]
|
|
22
|
+
TASTI_PER_CHUNK: 4, // spec §13: "max quattro tasti/chunk"
|
|
23
|
+
CHUNK_PER_AZIONE: 6, // 6 keyset da 33 ms = orizzonte 200 ms
|
|
24
|
+
TTL_MASSIMO_MS: 250, // oltre la lease il chunk non ha senso
|
|
25
|
+
CHUNK_MS: 33, // durata nominale di un keyset
|
|
26
|
+
ORIZZONTE_MS: 200,
|
|
27
|
+
BUFFER_MASSIMO: 16 * 1024,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// L'alfabeto completo dei tasti ammessi. Un token fuori da qui non e' "un tasto
|
|
31
|
+
// sconosciuto da inoltrare": e' un errore di grammatica che avvelena l'azione.
|
|
32
|
+
const TASTI_INTERNI = (() => {
|
|
33
|
+
const out = new Set(['Shift', 'Ctrl', 'Alt', 'Space', 'Tab', 'Esc', 'LB', 'RB', 'MB']);
|
|
34
|
+
for (let c = 65; c <= 90; c += 1) out.add(String.fromCharCode(c)); // A..Z
|
|
35
|
+
for (let d = 0; d <= 9; d += 1) out.add(String(d)); // 0..9
|
|
36
|
+
return out;
|
|
37
|
+
})();
|
|
38
|
+
// Un Set congelato resta modificabile tramite add/delete. Esponiamo quindi una
|
|
39
|
+
// fotografia realmente immutabile e teniamo il Set usato dalla validazione
|
|
40
|
+
// chiuso nel modulo.
|
|
41
|
+
const TASTI = Object.freeze([...TASTI_INTERNI].sort());
|
|
42
|
+
|
|
43
|
+
function interoIn(testo, min, max) {
|
|
44
|
+
if (!/^-?\d+$/.test(testo)) return null;
|
|
45
|
+
const n = Number(testo);
|
|
46
|
+
return n >= min && n <= max ? n : null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// "ACTION 184 ttl=250" -> { observationId, ttlMs } | { errore }
|
|
50
|
+
function analizzaIntestazione(riga) {
|
|
51
|
+
const m = /^ACTION\s+(\d+)\s+ttl=(\d+)$/.exec(String(riga || '').trim());
|
|
52
|
+
if (!m) return { errore: 'intestazione malformata' };
|
|
53
|
+
const observationNumber = Number(m[1]);
|
|
54
|
+
const ttlMs = Number(m[2]);
|
|
55
|
+
if (!Number.isSafeInteger(observationNumber)) return { errore: 'observation_id fuori limite' };
|
|
56
|
+
if (ttlMs <= 0 || ttlMs > LIMITI.TTL_MASSIMO_MS) {
|
|
57
|
+
return { errore: `ttl fuori limite (1..${LIMITI.TTL_MASSIMO_MS})` };
|
|
58
|
+
}
|
|
59
|
+
return { observationId: m[1], ttlMs };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// "92 0 0" -> { tipo: 'mouse', dx, dy, scroll } | { errore }
|
|
63
|
+
function analizzaMouse(segmento) {
|
|
64
|
+
const parti = String(segmento || '').trim().split(/\s+/);
|
|
65
|
+
if (parti.length !== 3) return { errore: 'il movimento vuole esattamente dx dy scroll' };
|
|
66
|
+
const dx = interoIn(parti[0], -LIMITI.MOUSE_DELTA, LIMITI.MOUSE_DELTA);
|
|
67
|
+
const dy = interoIn(parti[1], -LIMITI.MOUSE_DELTA, LIMITI.MOUSE_DELTA);
|
|
68
|
+
const scroll = interoIn(parti[2], -LIMITI.SCROLL, LIMITI.SCROLL);
|
|
69
|
+
if (dx === null || dy === null || scroll === null) return { errore: 'movimento fuori range' };
|
|
70
|
+
return { tipo: 'mouse', dx, dy, scroll };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// "Shift W" | "_" -> { tipo: 'keyset', tasti: [...] } | { errore }
|
|
74
|
+
// I tasti si normalizzano ordinati e senza duplicati: {W,Shift} e {Shift,W}
|
|
75
|
+
// sono lo stesso stato fisico, e l'esecutore confronta insiemi.
|
|
76
|
+
function analizzaKeyset(segmento) {
|
|
77
|
+
const testo = String(segmento || '').trim();
|
|
78
|
+
if (testo === '_') return { tipo: 'keyset', tasti: [] };
|
|
79
|
+
if (!testo) return { errore: 'keyset vuoto: usa _ per rilasciare tutti i tasti' };
|
|
80
|
+
const token = testo.split(/\s+/);
|
|
81
|
+
if (token.length > LIMITI.TASTI_PER_CHUNK) {
|
|
82
|
+
return { errore: `piu' di ${LIMITI.TASTI_PER_CHUNK} tasti in un chunk` };
|
|
83
|
+
}
|
|
84
|
+
const visti = new Set();
|
|
85
|
+
for (const t of token) {
|
|
86
|
+
if (!TASTI_INTERNI.has(t)) return { errore: `tasto fuori alfabeto: ${t}` };
|
|
87
|
+
visti.add(t);
|
|
88
|
+
}
|
|
89
|
+
return { tipo: 'keyset', tasti: [...visti].sort() };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Serializzazione, per il simulatore e i replay: da azione strutturata al testo
|
|
93
|
+
// che il decoder emetterebbe. Round-trip garantito dai test.
|
|
94
|
+
function serializza(azione) {
|
|
95
|
+
const testa = `ACTION ${azione.observationId} ttl=${azione.ttlMs}\n`;
|
|
96
|
+
const mouse = `${azione.mouse.dx} ${azione.mouse.dy} ${azione.mouse.scroll}`;
|
|
97
|
+
const keyset = azione.keyset.map((k) => (k.length ? k.join(' ') : '_'));
|
|
98
|
+
return testa + [mouse, ...keyset].join(' ; ') + ' ;\nEND';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports = { LIMITI, TASTI, analizzaIntestazione, analizzaMouse, analizzaKeyset, serializza };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Parser incrementale MCP-RAC. L'unica uscita eseguibile e' `chunk`, prodotta
|
|
4
|
+
// esclusivamente dopo `;`. END chiude l'azione ma non rende eseguibile il testo
|
|
5
|
+
// che lo precede: un ultimo segmento senza `;` viene rifiutato.
|
|
6
|
+
|
|
7
|
+
const G = require('./grammatica.js');
|
|
8
|
+
|
|
9
|
+
const PENSIERO_INIZIO = '<|thought_start|>';
|
|
10
|
+
const PENSIERO_FINE = '<|thought_end|>';
|
|
11
|
+
const CODA_MINIMA = Math.max(PENSIERO_INIZIO.length, PENSIERO_FINE.length, 'ACTION'.length);
|
|
12
|
+
|
|
13
|
+
function creaParser(options = {}) {
|
|
14
|
+
const bufferMassimo = Number.isInteger(options.bufferMassimo)
|
|
15
|
+
? Math.max(256, options.bufferMassimo) : G.LIMITI.BUFFER_MASSIMO;
|
|
16
|
+
let buffer = '';
|
|
17
|
+
let stato = 'fuori';
|
|
18
|
+
let azione = null;
|
|
19
|
+
let sequenza = 0;
|
|
20
|
+
|
|
21
|
+
const scartoCorrente = () => azione ? {
|
|
22
|
+
observationId: azione.observationId,
|
|
23
|
+
chunkEmessi: azione.mouseVisto + azione.keysetEmessi,
|
|
24
|
+
ultimaSequenza: sequenza,
|
|
25
|
+
} : null;
|
|
26
|
+
|
|
27
|
+
function errore(motivo) {
|
|
28
|
+
const scarto = scartoCorrente();
|
|
29
|
+
azione = null;
|
|
30
|
+
stato = 'avvelenato';
|
|
31
|
+
return { tipo: 'errore', motivo, scarto };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function commitSegmento(grezzo) {
|
|
35
|
+
if (!azione) return errore('segmento fuori da ACTION');
|
|
36
|
+
const testo = grezzo.trim();
|
|
37
|
+
let parsed;
|
|
38
|
+
let indice;
|
|
39
|
+
if (!azione.mouseVisto) {
|
|
40
|
+
parsed = G.analizzaMouse(testo);
|
|
41
|
+
indice = 0;
|
|
42
|
+
if (!parsed.errore) azione.mouseVisto = 1;
|
|
43
|
+
} else {
|
|
44
|
+
if (azione.keysetEmessi >= G.LIMITI.CHUNK_PER_AZIONE) {
|
|
45
|
+
return errore(`piu' di ${G.LIMITI.CHUNK_PER_AZIONE} keyset in un'azione`);
|
|
46
|
+
}
|
|
47
|
+
parsed = G.analizzaKeyset(testo);
|
|
48
|
+
indice = azione.keysetEmessi;
|
|
49
|
+
if (!parsed.errore) azione.keysetEmessi += 1;
|
|
50
|
+
}
|
|
51
|
+
if (parsed.errore) return errore(parsed.errore);
|
|
52
|
+
sequenza += 1;
|
|
53
|
+
return {
|
|
54
|
+
tipo: 'chunk',
|
|
55
|
+
chunk: {
|
|
56
|
+
...parsed,
|
|
57
|
+
observationId: azione.observationId,
|
|
58
|
+
ttlMs: azione.ttlMs,
|
|
59
|
+
sequenza,
|
|
60
|
+
indice,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function trovaAction() {
|
|
66
|
+
const match = /(?:^|\n)ACTION(?=\s)/.exec(buffer);
|
|
67
|
+
if (!match) return -1;
|
|
68
|
+
return match.index + (buffer[match.index] === '\n' ? 1 : 0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function passo(finale) {
|
|
72
|
+
if (stato === 'pensiero') {
|
|
73
|
+
const fine = buffer.indexOf(PENSIERO_FINE);
|
|
74
|
+
if (fine < 0) {
|
|
75
|
+
const sicuro = finale ? buffer.length : Math.max(0, buffer.length - CODA_MINIMA);
|
|
76
|
+
if (!sicuro) return null;
|
|
77
|
+
const testo = buffer.slice(0, sicuro);
|
|
78
|
+
buffer = buffer.slice(sicuro);
|
|
79
|
+
return { evento: { tipo: 'pensiero', testo } };
|
|
80
|
+
}
|
|
81
|
+
const testo = buffer.slice(0, fine);
|
|
82
|
+
buffer = buffer.slice(fine + PENSIERO_FINE.length);
|
|
83
|
+
stato = 'fuori';
|
|
84
|
+
return { evento: testo ? { tipo: 'pensiero', testo } : { tipo: 'pensiero_fine' } };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (stato !== 'corpo' && buffer.startsWith(PENSIERO_INIZIO)) {
|
|
88
|
+
buffer = buffer.slice(PENSIERO_INIZIO.length);
|
|
89
|
+
stato = 'pensiero';
|
|
90
|
+
return { avanzato: true };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (stato === 'fuori' || stato === 'avvelenato') {
|
|
94
|
+
const idx = trovaAction();
|
|
95
|
+
if (idx < 0) {
|
|
96
|
+
const tieni = finale ? 0 : CODA_MINIMA;
|
|
97
|
+
if (buffer.length > tieni) {
|
|
98
|
+
buffer = tieni ? buffer.slice(-tieni) : '';
|
|
99
|
+
return { avanzato: true };
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
if (idx > 0) {
|
|
104
|
+
buffer = buffer.slice(idx);
|
|
105
|
+
return { avanzato: true };
|
|
106
|
+
}
|
|
107
|
+
const aCapo = buffer.indexOf('\n');
|
|
108
|
+
if (aCapo < 0) return null;
|
|
109
|
+
const testa = G.analizzaIntestazione(buffer.slice(0, aCapo).replace(/\r$/, ''));
|
|
110
|
+
buffer = buffer.slice(aCapo + 1);
|
|
111
|
+
if (testa.errore) return { evento: errore(testa.errore) };
|
|
112
|
+
azione = {
|
|
113
|
+
observationId: testa.observationId,
|
|
114
|
+
ttlMs: testa.ttlMs,
|
|
115
|
+
mouseVisto: 0,
|
|
116
|
+
keysetEmessi: 0,
|
|
117
|
+
};
|
|
118
|
+
stato = 'corpo';
|
|
119
|
+
return { evento: { tipo: 'intestazione', ...testa } };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const punto = buffer.indexOf(';');
|
|
123
|
+
const endMatch = /(?:^|\n)\s*END(?=\s|$)/.exec(buffer);
|
|
124
|
+
const fine = endMatch ? endMatch.index : -1;
|
|
125
|
+
if (punto >= 0 && (fine < 0 || punto < fine)) {
|
|
126
|
+
const segmento = buffer.slice(0, punto);
|
|
127
|
+
buffer = buffer.slice(punto + 1);
|
|
128
|
+
return { evento: commitSegmento(segmento) };
|
|
129
|
+
}
|
|
130
|
+
if (fine >= 0) {
|
|
131
|
+
const prefisso = buffer.slice(0, fine).trim();
|
|
132
|
+
const conclusa = azione;
|
|
133
|
+
buffer = buffer.slice(fine + endMatch[0].length);
|
|
134
|
+
if (prefisso) return { evento: errore('segmento prima di END privo di delimitatore ;') };
|
|
135
|
+
if (!conclusa.mouseVisto || conclusa.keysetEmessi !== G.LIMITI.CHUNK_PER_AZIONE) {
|
|
136
|
+
return { evento: errore(`azione incompleta: attesi mouse + ${G.LIMITI.CHUNK_PER_AZIONE} keyset`) };
|
|
137
|
+
}
|
|
138
|
+
azione = null;
|
|
139
|
+
stato = 'fuori';
|
|
140
|
+
return { evento: { tipo: 'fine_azione', observationId: conclusa.observationId, ultimaSequenza: sequenza } };
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function estrai(finale) {
|
|
146
|
+
const eventi = [];
|
|
147
|
+
for (;;) {
|
|
148
|
+
const r = passo(finale);
|
|
149
|
+
if (!r) break;
|
|
150
|
+
if (r.evento) eventi.push(r.evento);
|
|
151
|
+
}
|
|
152
|
+
return eventi;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
push(delta) {
|
|
157
|
+
buffer += String(delta == null ? '' : delta);
|
|
158
|
+
if (buffer.length > bufferMassimo) {
|
|
159
|
+
const event = errore(`buffer oltre ${bufferMassimo} byte`);
|
|
160
|
+
buffer = buffer.slice(-CODA_MINIMA);
|
|
161
|
+
return [event, ...estrai(false)];
|
|
162
|
+
}
|
|
163
|
+
return estrai(false);
|
|
164
|
+
},
|
|
165
|
+
fine() {
|
|
166
|
+
const eventi = estrai(true);
|
|
167
|
+
if (stato === 'corpo' && azione) eventi.push({ tipo: 'troncata', ...scartoCorrente() });
|
|
168
|
+
azione = null;
|
|
169
|
+
stato = 'fuori';
|
|
170
|
+
buffer = '';
|
|
171
|
+
return eventi;
|
|
172
|
+
},
|
|
173
|
+
reset() {
|
|
174
|
+
const scarto = scartoCorrente();
|
|
175
|
+
buffer = '';
|
|
176
|
+
stato = 'fuori';
|
|
177
|
+
azione = null;
|
|
178
|
+
return scarto;
|
|
179
|
+
},
|
|
180
|
+
stato: () => stato,
|
|
181
|
+
diagnostica: () => ({ stato, bytesInBuffer: buffer.length, sequenza }),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
module.exports = { creaParser, PENSIERO_INIZIO, PENSIERO_FINE };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const crypto = require('node:crypto');
|
|
4
|
+
|
|
5
|
+
const EXTENSION_ID = 'io.vascend.mcp.reactive-control/0.1';
|
|
6
|
+
const MAGIC = Buffer.from('RAC1');
|
|
7
|
+
const VERSION = 1;
|
|
8
|
+
const HEADER_BYTES = 52;
|
|
9
|
+
|
|
10
|
+
const MESSAGE_TYPES = Object.freeze({
|
|
11
|
+
OBS_KEYFRAME: 1,
|
|
12
|
+
OBS_DELTA: 2,
|
|
13
|
+
ACTION_START: 3,
|
|
14
|
+
ACTION_CHUNK: 4,
|
|
15
|
+
ACTION_REVOKE: 5,
|
|
16
|
+
ACK: 6,
|
|
17
|
+
SAFETY_STOP: 7,
|
|
18
|
+
});
|
|
19
|
+
const MESSAGE_NAMES = Object.freeze(Object.fromEntries(
|
|
20
|
+
Object.entries(MESSAGE_TYPES).map(([name, value]) => [value, name]),
|
|
21
|
+
));
|
|
22
|
+
|
|
23
|
+
const SERVER_CAPABILITIES = Object.freeze({
|
|
24
|
+
extension: EXTENSION_ID,
|
|
25
|
+
version: VERSION,
|
|
26
|
+
transport: ['node-ipc'],
|
|
27
|
+
framing: ['rac-binary-v1'],
|
|
28
|
+
observation: ['keyframe', 'delta', 'checkpoint', 'revoke'],
|
|
29
|
+
actionRateHz: 30,
|
|
30
|
+
observationRateHz: 5,
|
|
31
|
+
maxActionHorizonMs: 200,
|
|
32
|
+
maxLeaseMs: 250,
|
|
33
|
+
strictObservationMaxAgeMs: 450,
|
|
34
|
+
cumulativeAck: true,
|
|
35
|
+
checksum: 'crc32',
|
|
36
|
+
duplexObservations: false,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
let crcTable = null;
|
|
40
|
+
function tableCrc32() {
|
|
41
|
+
if (crcTable) return crcTable;
|
|
42
|
+
crcTable = Array.from({ length: 256 }, (_, index) => {
|
|
43
|
+
let value = index;
|
|
44
|
+
for (let bit = 0; bit < 8; bit += 1) {
|
|
45
|
+
value = (value >>> 1) ^ ((value & 1) ? 0xedb88320 : 0);
|
|
46
|
+
}
|
|
47
|
+
return value >>> 0;
|
|
48
|
+
});
|
|
49
|
+
return crcTable;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function crc32(value) {
|
|
53
|
+
const bytes = Buffer.isBuffer(value) ? value : Buffer.from(value || '');
|
|
54
|
+
const table = tableCrc32();
|
|
55
|
+
let crc = 0xffffffff;
|
|
56
|
+
for (const byte of bytes) crc = (crc >>> 8) ^ table[(crc ^ byte) & 0xff];
|
|
57
|
+
return (crc ^ 0xffffffff) >>> 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function sessionDigest(sessionId) {
|
|
61
|
+
return crypto.createHash('sha256').update(String(sessionId || '')).digest().subarray(0, 16);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function safeBigInt(value, name) {
|
|
65
|
+
try {
|
|
66
|
+
const parsed = BigInt(value || 0);
|
|
67
|
+
if (parsed < 0n || parsed > 0xffffffffffffffffn) throw new RangeError(name);
|
|
68
|
+
return parsed;
|
|
69
|
+
} catch (_) {
|
|
70
|
+
throw new TypeError(`${name || 'value'} non valido`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function encodeFrame(input = {}) {
|
|
75
|
+
const type = typeof input.type === 'string' ? MESSAGE_TYPES[input.type] : Number(input.type);
|
|
76
|
+
if (!MESSAGE_NAMES[type]) throw new TypeError('RAC_MESSAGE_TYPE_INVALID');
|
|
77
|
+
const payload = Buffer.isBuffer(input.payload) ? input.payload : Buffer.from(String(input.payload || ''), 'utf8');
|
|
78
|
+
if (payload.length > 16 * 1024 * 1024) throw new RangeError('RAC_PAYLOAD_TOO_LARGE');
|
|
79
|
+
const header = Buffer.alloc(HEADER_BYTES);
|
|
80
|
+
MAGIC.copy(header, 0);
|
|
81
|
+
header.writeUInt8(VERSION, 4);
|
|
82
|
+
header.writeUInt8(type, 5);
|
|
83
|
+
header.writeUInt16BE(Number(input.flags || 0) & 0xffff, 6);
|
|
84
|
+
header.writeUInt32BE(Number(input.sequence || 0) >>> 0, 8);
|
|
85
|
+
header.writeBigUInt64BE(safeBigInt(input.monotonicUs, 'monotonicUs'), 12);
|
|
86
|
+
header.writeBigUInt64BE(safeBigInt(input.observationId, 'observationId'), 20);
|
|
87
|
+
header.writeUInt32BE(payload.length >>> 0, 28);
|
|
88
|
+
header.writeUInt32BE(crc32(payload), 32);
|
|
89
|
+
sessionDigest(input.sessionId).copy(header, 36);
|
|
90
|
+
return Buffer.concat([header, payload]);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function decodeFrame(value, expected = {}) {
|
|
94
|
+
const frame = Buffer.isBuffer(value) ? value : Buffer.from(value || '');
|
|
95
|
+
if (frame.length < HEADER_BYTES) return { ok: false, code: 'RAC_FRAME_TRUNCATED' };
|
|
96
|
+
if (!frame.subarray(0, 4).equals(MAGIC)) return { ok: false, code: 'RAC_FRAME_MAGIC' };
|
|
97
|
+
if (frame.readUInt8(4) !== VERSION) return { ok: false, code: 'RAC_FRAME_VERSION' };
|
|
98
|
+
const type = frame.readUInt8(5);
|
|
99
|
+
if (!MESSAGE_NAMES[type]) return { ok: false, code: 'RAC_FRAME_TYPE' };
|
|
100
|
+
const payloadLength = frame.readUInt32BE(28);
|
|
101
|
+
if (frame.length !== HEADER_BYTES + payloadLength) return { ok: false, code: 'RAC_FRAME_LENGTH' };
|
|
102
|
+
const payload = frame.subarray(HEADER_BYTES);
|
|
103
|
+
if (crc32(payload) !== frame.readUInt32BE(32)) return { ok: false, code: 'RAC_FRAME_CHECKSUM' };
|
|
104
|
+
if (expected.sessionId && !frame.subarray(36, 52).equals(sessionDigest(expected.sessionId))) {
|
|
105
|
+
return { ok: false, code: 'RAC_FRAME_SESSION' };
|
|
106
|
+
}
|
|
107
|
+
const observationId = frame.readBigUInt64BE(20).toString();
|
|
108
|
+
if (expected.observationId && String(expected.observationId) !== observationId) {
|
|
109
|
+
return { ok: false, code: 'STALE_OBSERVATION' };
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
ok: true,
|
|
113
|
+
type: MESSAGE_NAMES[type],
|
|
114
|
+
typeId: type,
|
|
115
|
+
flags: frame.readUInt16BE(6),
|
|
116
|
+
sequence: frame.readUInt32BE(8),
|
|
117
|
+
monotonicUs: frame.readBigUInt64BE(12),
|
|
118
|
+
observationId,
|
|
119
|
+
payload,
|
|
120
|
+
checksum: frame.readUInt32BE(32),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function negotiateCapabilities(client = {}) {
|
|
125
|
+
const extension = String(client.extension || EXTENSION_ID);
|
|
126
|
+
if (extension !== EXTENSION_ID) return { ok: false, code: 'RAC_EXTENSION_UNSUPPORTED' };
|
|
127
|
+
const requestedTransports = Array.isArray(client.transport) ? client.transport : ['node-ipc'];
|
|
128
|
+
const transport = SERVER_CAPABILITIES.transport.find((item) => requestedTransports.includes(item));
|
|
129
|
+
if (!transport) return { ok: false, code: 'RAC_TRANSPORT_UNSUPPORTED' };
|
|
130
|
+
return { ok: true, ...SERVER_CAPABILITIES, transport };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
module.exports = {
|
|
134
|
+
EXTENSION_ID, VERSION, HEADER_BYTES, MESSAGE_TYPES, SERVER_CAPABILITIES,
|
|
135
|
+
crc32, encodeFrame, decodeFrame, negotiateCapabilities,
|
|
136
|
+
};
|
package/install.ps1
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Public entry point: https://cdn.jsdelivr.net/npm/@vascend/talos@latest/install.ps1
|
|
2
|
+
& {
|
|
3
|
+
$ErrorActionPreference = 'Stop'
|
|
4
|
+
$node = Get-Command node.exe -ErrorAction SilentlyContinue
|
|
5
|
+
$npm = Get-Command npm.cmd -ErrorAction SilentlyContinue
|
|
6
|
+
if (-not $node -or -not $npm) {
|
|
7
|
+
throw 'Talos requires Node.js 20 or newer (including npm). Install it from https://nodejs.org and run this command again.'
|
|
8
|
+
}
|
|
9
|
+
& $node.Source -e 'process.exit(Number(process.versions.node.split(String.fromCharCode(46))[0]) >= 20 ? 0 : 1)'
|
|
10
|
+
if ($LASTEXITCODE -ne 0) { throw 'Please update Node.js to version 20 or newer.' }
|
|
11
|
+
$talosVersion = if ($env:TALOS_VERSION) { $env:TALOS_VERSION } else { 'latest' }
|
|
12
|
+
if ($talosVersion -notmatch '\A(?:latest|[0-9]+\.[0-9]+\.[0-9]+)\z') {
|
|
13
|
+
throw 'TALOS_VERSION must be latest or a stable version such as 0.1.0.'
|
|
14
|
+
}
|
|
15
|
+
$talosPrefix = if ($env:TALOS_INSTALL_DIR) { $env:TALOS_INSTALL_DIR } else { Join-Path $env:LOCALAPPDATA 'Programs\Talos' }
|
|
16
|
+
Write-Host "Installing Talos $talosVersion in $talosPrefix"
|
|
17
|
+
& $npm.Source install --global --prefix $talosPrefix --registry=https://registry.npmjs.org "@vascend/talos@$talosVersion"
|
|
18
|
+
if ($LASTEXITCODE -ne 0) { throw 'Talos installation failed. Check the npm output above.' }
|
|
19
|
+
$talosEntry = Join-Path $talosPrefix 'node_modules\@vascend\talos\dist\index.js'
|
|
20
|
+
& $node.Source $talosEntry --version
|
|
21
|
+
if ($LASTEXITCODE -ne 0) { throw 'Talos was installed but the startup check failed.' }
|
|
22
|
+
if ($env:TALOS_NO_MODIFY_PATH -ne '1') {
|
|
23
|
+
$talosUserPath = [Environment]::GetEnvironmentVariable('Path', 'User')
|
|
24
|
+
if (($talosUserPath -split ';') -notcontains $talosPrefix) {
|
|
25
|
+
[Environment]::SetEnvironmentVariable('Path', (([string]$talosUserPath).TrimEnd(';') + ';' + $talosPrefix).TrimStart(';'), 'User')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (($env:Path -split ';') -notcontains $talosPrefix) { $env:Path = "$talosPrefix;$env:Path" }
|
|
29
|
+
Write-Host 'Talos is ready. Run talos to sign in.'
|
|
30
|
+
}
|
package/install.sh
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Public entry point: https://cdn.jsdelivr.net/npm/@vascend/talos@latest/install.sh
|
|
5
|
+
main() {
|
|
6
|
+
if ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then
|
|
7
|
+
printf '%s\n' 'Talos requires Node.js 20 or newer (including npm). Install it from https://nodejs.org and run this command again.' >&2
|
|
8
|
+
return 1
|
|
9
|
+
fi
|
|
10
|
+
if ! node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)'; then
|
|
11
|
+
printf '%s\n' 'Please update Node.js to version 20 or newer before installing Talos.' >&2
|
|
12
|
+
return 1
|
|
13
|
+
fi
|
|
14
|
+
local version="${TALOS_VERSION:-latest}"
|
|
15
|
+
if [[ "$version" != latest && ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
16
|
+
printf '%s\n' 'TALOS_VERSION must be latest or a stable version such as 0.1.0.' >&2
|
|
17
|
+
return 1
|
|
18
|
+
fi
|
|
19
|
+
local install_dir="${TALOS_INSTALL_DIR:-$HOME/.local}"
|
|
20
|
+
local bin_dir="$install_dir/bin"
|
|
21
|
+
printf 'Installing Talos %s in %s\n' "$version" "$install_dir"
|
|
22
|
+
npm install --global --prefix "$install_dir" --registry=https://registry.npmjs.org "@vascend/talos@$version"
|
|
23
|
+
"$bin_dir/talos" --version
|
|
24
|
+
case ":$PATH:" in
|
|
25
|
+
*":$bin_dir:"*) ;;
|
|
26
|
+
*)
|
|
27
|
+
local profile=""
|
|
28
|
+
case "${SHELL:-}" in
|
|
29
|
+
*/zsh) profile="$HOME/.zshrc" ;;
|
|
30
|
+
*/bash)
|
|
31
|
+
if [[ "$(uname -s)" == Darwin ]]; then profile="$HOME/.bash_profile"; else profile="$HOME/.bashrc"; fi
|
|
32
|
+
;;
|
|
33
|
+
esac
|
|
34
|
+
if [[ -n "$profile" && "${TALOS_NO_MODIFY_PATH:-0}" != 1 ]]; then
|
|
35
|
+
local path_line
|
|
36
|
+
printf -v path_line 'export PATH=%q:"$PATH"' "$bin_dir"
|
|
37
|
+
if ! grep -Fqx "$path_line" "$profile" 2>/dev/null; then
|
|
38
|
+
printf '\n# Vascend Talos\n%s\n' "$path_line" >> "$profile"
|
|
39
|
+
fi
|
|
40
|
+
printf 'Open a new terminal, then run: talos\n'
|
|
41
|
+
else
|
|
42
|
+
printf 'Add %s to your PATH, then run: talos\n' "$bin_dir"
|
|
43
|
+
fi
|
|
44
|
+
printf 'To start immediately: %q\n' "$bin_dir/talos"
|
|
45
|
+
;;
|
|
46
|
+
esac
|
|
47
|
+
printf '%s\n' 'Talos is ready. Run talos to sign in.'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
main "$@"
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vascend/talos",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vascend Talos - extensible coding agent for your terminal",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/VascendTechnologies/vascend-talos.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://vascend.it/talos",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"horizon": "./dist/index.js",
|
|
13
|
+
"talos": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/sdk.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"install.sh",
|
|
21
|
+
"install.ps1"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "bun run src/index.ts",
|
|
25
|
+
"start": "bun run src/index.ts",
|
|
26
|
+
"install:cli": "bun run build && bun link",
|
|
27
|
+
"backend": "bun run src/backend/index.ts",
|
|
28
|
+
"backend:dev": "bun --watch run src/backend/index.ts",
|
|
29
|
+
"build": "tsc -p tsconfig.json && node scripts/copy-computer-use.mjs",
|
|
30
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
31
|
+
"test": "node scripts/run-unit-tests.mjs",
|
|
32
|
+
"test:unit": "node scripts/run-unit-tests.mjs",
|
|
33
|
+
"test:e2e": "E2E=1 bun test ./test/e2e",
|
|
34
|
+
"test:e2e:dry": "bun test ./test/e2e",
|
|
35
|
+
"bench": "bun run bench/index.ts",
|
|
36
|
+
"bench:context": "bun run bench/context-gap/index.ts",
|
|
37
|
+
"bench:retrieval": "bun run bench/hybrid-retrieval/index.ts",
|
|
38
|
+
"typecheck:bench": "tsc -p tsconfig.bench.json",
|
|
39
|
+
"prepack": "npm run build",
|
|
40
|
+
"bench:rollup": "bun run bench/rollup-quality/index.ts"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/bun": "^1.1.0",
|
|
47
|
+
"@types/node": "^22.10.0",
|
|
48
|
+
"@xterm/headless": "^6.0.0",
|
|
49
|
+
"typescript": "^5.7.0"
|
|
50
|
+
},
|
|
51
|
+
"license": "UNLICENSED",
|
|
52
|
+
"private": false,
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
}
|
|
56
|
+
}
|