@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,12 @@
|
|
|
1
|
+
export interface PackageResources {
|
|
2
|
+
readonly skills: readonly string[];
|
|
3
|
+
readonly prompts: readonly string[];
|
|
4
|
+
readonly themeDirs: readonly string[];
|
|
5
|
+
readonly extensions: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export interface ResolvePackageOptions {
|
|
8
|
+
readonly cwd?: string;
|
|
9
|
+
readonly projectTrusted?: boolean;
|
|
10
|
+
readonly homeDir?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolvePackages(env: NodeJS.ProcessEnv, explicit?: readonly string[], options?: ResolvePackageOptions): PackageResources;
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
+
function emptyResources() {
|
|
5
|
+
return { skills: [], prompts: [], themeDirs: [], extensions: [] };
|
|
6
|
+
}
|
|
7
|
+
function stringArray(value) {
|
|
8
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : undefined;
|
|
9
|
+
}
|
|
10
|
+
function manifestFrom(value) {
|
|
11
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
12
|
+
return undefined;
|
|
13
|
+
const row = value;
|
|
14
|
+
return {
|
|
15
|
+
skills: stringArray(row["skills"]),
|
|
16
|
+
prompts: stringArray(row["prompts"]),
|
|
17
|
+
themes: stringArray(row["themes"]),
|
|
18
|
+
extensions: stringArray(row["extensions"]),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function readManifest(dir) {
|
|
22
|
+
const pkgJson = join(dir, "package.json");
|
|
23
|
+
if (!existsSync(pkgJson))
|
|
24
|
+
return undefined;
|
|
25
|
+
try {
|
|
26
|
+
const raw = JSON.parse(readFileSync(pkgJson, "utf8"));
|
|
27
|
+
// Un autore puo' pubblicare un unico bundle per entrambi gli agenti. Il
|
|
28
|
+
// manifest Talos, quando presente, puo' specializzare quello Pi.
|
|
29
|
+
return manifestFrom(raw["talos"]) ?? manifestFrom(raw["pi"]);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function isFile(path) {
|
|
36
|
+
try {
|
|
37
|
+
return statSync(path).isFile();
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function isDirectory(path) {
|
|
44
|
+
try {
|
|
45
|
+
return statSync(path).isDirectory();
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function walkFiles(root, accept, depth = 8) {
|
|
52
|
+
if (!existsSync(root))
|
|
53
|
+
return [];
|
|
54
|
+
if (isFile(root))
|
|
55
|
+
return accept(root) ? [root] : [];
|
|
56
|
+
if (!isDirectory(root) || depth < 0)
|
|
57
|
+
return [];
|
|
58
|
+
const out = [];
|
|
59
|
+
let entries = [];
|
|
60
|
+
try {
|
|
61
|
+
entries = readdirSync(root);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return out;
|
|
65
|
+
}
|
|
66
|
+
for (const entry of entries.sort()) {
|
|
67
|
+
if (entry === "node_modules" && basename(root) !== "node_modules")
|
|
68
|
+
continue;
|
|
69
|
+
const full = join(root, entry);
|
|
70
|
+
if (isDirectory(full))
|
|
71
|
+
out.push(...walkFiles(full, accept, depth - 1));
|
|
72
|
+
else if (accept(full))
|
|
73
|
+
out.push(full);
|
|
74
|
+
}
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
77
|
+
function conventionSkills(root) {
|
|
78
|
+
const out = [];
|
|
79
|
+
if (!existsSync(root))
|
|
80
|
+
return out;
|
|
81
|
+
if (isFile(root))
|
|
82
|
+
return root.toLowerCase().endsWith(".md") ? [root] : [];
|
|
83
|
+
if (existsSync(join(root, "SKILL.md")))
|
|
84
|
+
return [root];
|
|
85
|
+
let entries = [];
|
|
86
|
+
try {
|
|
87
|
+
entries = readdirSync(root);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return out;
|
|
91
|
+
}
|
|
92
|
+
for (const entry of entries.sort()) {
|
|
93
|
+
const full = join(root, entry);
|
|
94
|
+
if (isDirectory(full))
|
|
95
|
+
out.push(...conventionSkills(full));
|
|
96
|
+
else if (entry.toLowerCase().endsWith(".md"))
|
|
97
|
+
out.push(full);
|
|
98
|
+
}
|
|
99
|
+
return out;
|
|
100
|
+
}
|
|
101
|
+
function globRegex(pattern) {
|
|
102
|
+
const normalized = pattern.replace(/\\/g, "/").replace(/^\.\//, "").replace(/^\+/, "");
|
|
103
|
+
let source = "";
|
|
104
|
+
for (let index = 0; index < normalized.length; index += 1) {
|
|
105
|
+
const char = normalized[index];
|
|
106
|
+
if (char === "*" && normalized[index + 1] === "*") {
|
|
107
|
+
source += ".*";
|
|
108
|
+
index += 1;
|
|
109
|
+
}
|
|
110
|
+
else if (char === "*")
|
|
111
|
+
source += "[^/]*";
|
|
112
|
+
else if (char === "?")
|
|
113
|
+
source += "[^/]";
|
|
114
|
+
else
|
|
115
|
+
source += char.replace(/[|\\{}()[\]^$+?.]/g, "\\$&");
|
|
116
|
+
}
|
|
117
|
+
return new RegExp(`^${source}(?:/.*)?$`, "i");
|
|
118
|
+
}
|
|
119
|
+
function matchesFilters(root, path, filters) {
|
|
120
|
+
if (filters === undefined)
|
|
121
|
+
return true;
|
|
122
|
+
if (!filters.length)
|
|
123
|
+
return false;
|
|
124
|
+
const rel = relative(root, path).replace(/\\/g, "/");
|
|
125
|
+
const positive = filters.filter((item) => !item.startsWith("!") && !item.startsWith("-") && !item.startsWith("+"));
|
|
126
|
+
let included = positive.length === 0 || positive.some((item) => globRegex(item).test(rel));
|
|
127
|
+
for (const item of filters) {
|
|
128
|
+
if ((item.startsWith("!") || item.startsWith("-")) && globRegex(item.slice(1)).test(rel))
|
|
129
|
+
included = false;
|
|
130
|
+
if (item.startsWith("+") && globRegex(item).test(rel))
|
|
131
|
+
included = true;
|
|
132
|
+
}
|
|
133
|
+
return included;
|
|
134
|
+
}
|
|
135
|
+
function staticGlobRoot(root, pattern) {
|
|
136
|
+
const clean = pattern.replace(/^\+/, "").replace(/\\/g, "/");
|
|
137
|
+
const wildcard = clean.search(/[?*]/);
|
|
138
|
+
if (wildcard < 0)
|
|
139
|
+
return isAbsolute(clean) ? clean : join(root, clean);
|
|
140
|
+
const slash = clean.slice(0, wildcard).lastIndexOf("/");
|
|
141
|
+
const prefix = slash < 0 ? "." : clean.slice(0, slash);
|
|
142
|
+
return isAbsolute(prefix) ? prefix : join(root, prefix);
|
|
143
|
+
}
|
|
144
|
+
function rootsForManifest(root, values, fallback) {
|
|
145
|
+
const entries = values === undefined ? [fallback] : values.filter((item) => !item.startsWith("!") && !item.startsWith("-"));
|
|
146
|
+
return unique(entries.map((entry) => staticGlobRoot(root, entry)).filter(existsSync));
|
|
147
|
+
}
|
|
148
|
+
function resolveOne(root, filter) {
|
|
149
|
+
if (!existsSync(root))
|
|
150
|
+
return emptyResources();
|
|
151
|
+
if (isFile(root)) {
|
|
152
|
+
return /\.(?:ts|js|mjs)$/i.test(root)
|
|
153
|
+
? { ...emptyResources(), extensions: [root] }
|
|
154
|
+
: emptyResources();
|
|
155
|
+
}
|
|
156
|
+
const manifest = readManifest(root);
|
|
157
|
+
// Le directory convenzionali valgono soltanto quando manca un manifest;
|
|
158
|
+
// dentro un manifest, una categoria omessa resta disabilitata.
|
|
159
|
+
const skillSelection = manifest ? manifest.skills ?? [] : undefined;
|
|
160
|
+
const promptSelection = manifest ? manifest.prompts ?? [] : undefined;
|
|
161
|
+
const themeSelection = manifest ? manifest.themes ?? [] : undefined;
|
|
162
|
+
const extensionSelection = manifest ? manifest.extensions ?? [] : undefined;
|
|
163
|
+
const skills = rootsForManifest(root, skillSelection, "skills")
|
|
164
|
+
.flatMap((path) => conventionSkills(path))
|
|
165
|
+
.filter((path) => matchesFilters(root, path, skillSelection))
|
|
166
|
+
.filter((path) => matchesFilters(root, path, filter?.skills));
|
|
167
|
+
const prompts = rootsForManifest(root, promptSelection, "prompts")
|
|
168
|
+
.flatMap((path) => walkFiles(path, (file) => file.toLowerCase().endsWith(".md")))
|
|
169
|
+
.filter((path) => matchesFilters(root, path, promptSelection))
|
|
170
|
+
.filter((path) => matchesFilters(root, path, filter?.prompts));
|
|
171
|
+
const themeFiles = rootsForManifest(root, themeSelection, "themes")
|
|
172
|
+
.flatMap((path) => walkFiles(path, (file) => file.toLowerCase().endsWith(".json")))
|
|
173
|
+
.filter((path) => matchesFilters(root, path, themeSelection))
|
|
174
|
+
.filter((path) => matchesFilters(root, path, filter?.themes));
|
|
175
|
+
const extensions = rootsForManifest(root, extensionSelection, "extensions")
|
|
176
|
+
.flatMap((path) => walkFiles(path, (file) => /\.(?:ts|js|mjs)$/i.test(file)))
|
|
177
|
+
.filter((path) => matchesFilters(root, path, extensionSelection))
|
|
178
|
+
.filter((path) => matchesFilters(root, path, filter?.extensions));
|
|
179
|
+
// Il nome storico del campo resta `themeDirs`, ma per i package conserviamo
|
|
180
|
+
// i file esatti: in questo modo filtri ed esclusioni Pi non riaprono per
|
|
181
|
+
// sbaglio tutti gli altri temi presenti nella stessa cartella.
|
|
182
|
+
return { skills, prompts, themeDirs: themeFiles, extensions };
|
|
183
|
+
}
|
|
184
|
+
function readPiSettings(file) {
|
|
185
|
+
if (!existsSync(file))
|
|
186
|
+
return [];
|
|
187
|
+
try {
|
|
188
|
+
const raw = JSON.parse(readFileSync(file, "utf8"));
|
|
189
|
+
return (Array.isArray(raw["packages"]) ? raw["packages"] : []).filter((entry) => typeof entry === "string" || Boolean(entry && typeof entry === "object" && typeof entry["source"] === "string"));
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return [];
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function npmName(source) {
|
|
196
|
+
const spec = source.replace(/^npm:/, "");
|
|
197
|
+
if (spec.startsWith("@")) {
|
|
198
|
+
const slash = spec.indexOf("/");
|
|
199
|
+
const version = spec.indexOf("@", slash + 1);
|
|
200
|
+
return version < 0 ? spec : spec.slice(0, version);
|
|
201
|
+
}
|
|
202
|
+
const version = spec.indexOf("@");
|
|
203
|
+
return version < 0 ? spec : spec.slice(0, version);
|
|
204
|
+
}
|
|
205
|
+
function isNpmSource(source) {
|
|
206
|
+
return source.startsWith("npm:") || (!source.includes(":") && !source.startsWith(".") && !isAbsolute(source));
|
|
207
|
+
}
|
|
208
|
+
function gitRelativePath(source) {
|
|
209
|
+
let value = source.replace(/^git:/, "").replace(/^git@([^:]+):/, "$1/");
|
|
210
|
+
value = value.replace(/^(?:https?|ssh|git):\/\/(?:git@)?/, "");
|
|
211
|
+
const at = value.lastIndexOf("@");
|
|
212
|
+
if (at > value.indexOf("/"))
|
|
213
|
+
value = value.slice(0, at);
|
|
214
|
+
return value.replace(/\.git$/, "").replace(/^\/+|\/+$/g, "");
|
|
215
|
+
}
|
|
216
|
+
function packageIdentity(entry, settingsDir) {
|
|
217
|
+
const source = typeof entry === "string" ? entry : entry.source;
|
|
218
|
+
if (isNpmSource(source)) {
|
|
219
|
+
return "npm:" + npmName(source);
|
|
220
|
+
}
|
|
221
|
+
if (/^(?:git:|https?:|ssh:|git@)/.test(source))
|
|
222
|
+
return "git:" + gitRelativePath(source).toLowerCase();
|
|
223
|
+
return "local:" + resolve(settingsDir, source).toLowerCase();
|
|
224
|
+
}
|
|
225
|
+
function locatePiPackage(entry, settingsDir, piRoot) {
|
|
226
|
+
const source = typeof entry === "string" ? entry : entry.source;
|
|
227
|
+
if (isNpmSource(source)) {
|
|
228
|
+
return join(piRoot, "npm", "node_modules", ...npmName(source).split("/"));
|
|
229
|
+
}
|
|
230
|
+
if (/^(?:git:|https?:|ssh:|git@)/.test(source))
|
|
231
|
+
return join(piRoot, "git", ...gitRelativePath(source).split("/"));
|
|
232
|
+
return resolve(settingsDir, source);
|
|
233
|
+
}
|
|
234
|
+
function piEntries(cwd, trusted, home) {
|
|
235
|
+
const globalRoot = join(home, ".pi", "agent");
|
|
236
|
+
const projectRoot = join(cwd, ".pi");
|
|
237
|
+
const merged = new Map();
|
|
238
|
+
const add = (file, root, project = false) => {
|
|
239
|
+
const settingsDir = dirname(file);
|
|
240
|
+
for (const entry of readPiSettings(file)) {
|
|
241
|
+
const identity = packageIdentity(entry, settingsDir);
|
|
242
|
+
const previous = merged.get(identity);
|
|
243
|
+
if (project && typeof entry === "object" && entry.autoload === false) {
|
|
244
|
+
if (!previous)
|
|
245
|
+
continue;
|
|
246
|
+
const base = typeof previous.entry === "string" ? { source: previous.entry } : previous.entry;
|
|
247
|
+
const combine = (kind) => {
|
|
248
|
+
const before = base[kind];
|
|
249
|
+
const delta = entry[kind];
|
|
250
|
+
return delta === undefined ? before : [...(before ?? []), ...delta];
|
|
251
|
+
};
|
|
252
|
+
merged.set(identity, {
|
|
253
|
+
root: previous.root,
|
|
254
|
+
entry: {
|
|
255
|
+
source: base.source,
|
|
256
|
+
skills: combine("skills"), prompts: combine("prompts"),
|
|
257
|
+
themes: combine("themes"), extensions: combine("extensions"),
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
merged.set(identity, { entry, root });
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
add(join(globalRoot, "settings.json"), globalRoot);
|
|
266
|
+
if (trusted)
|
|
267
|
+
add(join(projectRoot, "settings.json"), projectRoot, true);
|
|
268
|
+
return [...merged.values()];
|
|
269
|
+
}
|
|
270
|
+
function unique(values) {
|
|
271
|
+
const seen = new Set();
|
|
272
|
+
return values.filter((value) => {
|
|
273
|
+
const key = resolve(value).toLowerCase();
|
|
274
|
+
if (seen.has(key))
|
|
275
|
+
return false;
|
|
276
|
+
seen.add(key);
|
|
277
|
+
return true;
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
export function resolvePackages(env, explicit = [], options = {}) {
|
|
281
|
+
const cwd = resolve(options.cwd ?? process.cwd());
|
|
282
|
+
const home = options.homeDir ?? homedir();
|
|
283
|
+
const trusted = options.projectTrusted !== false;
|
|
284
|
+
const roots = [];
|
|
285
|
+
const talosHome = join(home, ".talos", "packages");
|
|
286
|
+
if (existsSync(talosHome)) {
|
|
287
|
+
for (const entry of readdirSync(talosHome).sort()) {
|
|
288
|
+
const path = join(talosHome, entry);
|
|
289
|
+
if (isDirectory(path))
|
|
290
|
+
roots.push({ path });
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
const envEntries = (env["TALOS_PACKAGES"] ?? "").split(",").map((item) => item.trim()).filter(Boolean);
|
|
294
|
+
for (const source of [...envEntries, ...explicit]) {
|
|
295
|
+
const fake = source;
|
|
296
|
+
const piRoot = isNpmSource(source) ? join(home, ".pi", "agent") : cwd;
|
|
297
|
+
roots.push({ path: locatePiPackage(fake, cwd, piRoot) });
|
|
298
|
+
}
|
|
299
|
+
// Directory convenzionali Pi, anche senza package installati.
|
|
300
|
+
roots.push({ path: join(home, ".pi", "agent") });
|
|
301
|
+
if (trusted)
|
|
302
|
+
roots.push({ path: join(cwd, ".pi") });
|
|
303
|
+
for (const row of piEntries(cwd, trusted, home)) {
|
|
304
|
+
const settingsDir = row.root;
|
|
305
|
+
const path = locatePiPackage(row.entry, settingsDir, row.root);
|
|
306
|
+
roots.push({ path, ...(typeof row.entry === "object" ? { filter: row.entry } : {}) });
|
|
307
|
+
}
|
|
308
|
+
const skills = [];
|
|
309
|
+
const prompts = [];
|
|
310
|
+
const themeDirs = [];
|
|
311
|
+
const extensions = [];
|
|
312
|
+
for (const row of roots) {
|
|
313
|
+
const resources = resolveOne(row.path, row.filter);
|
|
314
|
+
skills.push(...resources.skills);
|
|
315
|
+
prompts.push(...resources.prompts);
|
|
316
|
+
themeDirs.push(...resources.themeDirs);
|
|
317
|
+
extensions.push(...resources.extensions);
|
|
318
|
+
}
|
|
319
|
+
return {
|
|
320
|
+
skills: unique(skills), prompts: unique(prompts),
|
|
321
|
+
themeDirs: unique(themeDirs), extensions: unique(extensions),
|
|
322
|
+
};
|
|
323
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PromptTemplate {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly argumentHint: string;
|
|
5
|
+
readonly body: string;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseTemplateFile(path: string): PromptTemplate | null;
|
|
9
|
+
export declare function splitArgs(input: string): readonly string[];
|
|
10
|
+
export declare function expandTemplate(body: string, args: readonly string[]): string;
|
|
11
|
+
export declare function loadTemplates(cwd: string, extraPaths?: readonly string[], projectTrusted?: boolean): readonly PromptTemplate[];
|
|
12
|
+
export declare function findTemplate(templates: readonly PromptTemplate[], name: string): PromptTemplate | undefined;
|
|
13
|
+
export declare function renderTemplate(tpl: PromptTemplate, rawArgs: string): string;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
// Frontmatter YAML minimale (solo chiavi piatte stringa): description e
|
|
5
|
+
// argument-hint. Tutto il resto e' il corpo del template.
|
|
6
|
+
function parseFrontmatter(raw) {
|
|
7
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/.exec(raw);
|
|
8
|
+
if (!m)
|
|
9
|
+
return { body: raw };
|
|
10
|
+
const head = m[1] ?? "";
|
|
11
|
+
const body = m[2] ?? "";
|
|
12
|
+
let description;
|
|
13
|
+
let argumentHint;
|
|
14
|
+
for (const line of head.split(/\r?\n/)) {
|
|
15
|
+
const kv = /^([A-Za-z0-9_-]+)\s*:\s*(.*)$/.exec(line.trim());
|
|
16
|
+
if (!kv)
|
|
17
|
+
continue;
|
|
18
|
+
const key = (kv[1] ?? "").toLowerCase();
|
|
19
|
+
const value = unquote((kv[2] ?? "").trim());
|
|
20
|
+
if (key === "description")
|
|
21
|
+
description = value;
|
|
22
|
+
else if (key === "argument-hint" || key === "argumenthint")
|
|
23
|
+
argumentHint = value;
|
|
24
|
+
}
|
|
25
|
+
return { description, argumentHint, body };
|
|
26
|
+
}
|
|
27
|
+
function unquote(s) {
|
|
28
|
+
if (s.length >= 2 && ((s[0] === '"' && s.at(-1) === '"') || (s[0] === "'" && s.at(-1) === "'"))) {
|
|
29
|
+
return s.slice(1, -1);
|
|
30
|
+
}
|
|
31
|
+
return s;
|
|
32
|
+
}
|
|
33
|
+
function firstNonEmptyLine(text) {
|
|
34
|
+
for (const line of text.split(/\r?\n/)) {
|
|
35
|
+
const t = line.trim();
|
|
36
|
+
if (t)
|
|
37
|
+
return t.length > 80 ? t.slice(0, 77) + "..." : t;
|
|
38
|
+
}
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
export function parseTemplateFile(path) {
|
|
42
|
+
try {
|
|
43
|
+
const raw = readFileSync(path, "utf8");
|
|
44
|
+
const fm = parseFrontmatter(raw);
|
|
45
|
+
const name = path.replace(/.*[\\/]/, "").replace(/\.md$/i, "");
|
|
46
|
+
const body = fm.body.replace(/^\s+/, "");
|
|
47
|
+
return {
|
|
48
|
+
name,
|
|
49
|
+
description: fm.description ?? firstNonEmptyLine(body),
|
|
50
|
+
argumentHint: fm.argumentHint ?? "",
|
|
51
|
+
body,
|
|
52
|
+
path,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Suddivide la riga di argomenti rispettando le virgolette: `Button "click handler"`
|
|
60
|
+
// -> ["Button", "click handler"].
|
|
61
|
+
export function splitArgs(input) {
|
|
62
|
+
const out = [];
|
|
63
|
+
const re = /"([^"]*)"|'([^']*)'|(\S+)/g;
|
|
64
|
+
let m;
|
|
65
|
+
while ((m = re.exec(input)) !== null) {
|
|
66
|
+
out.push(m[1] ?? m[2] ?? m[3] ?? "");
|
|
67
|
+
}
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
70
|
+
// Espande le sostituzioni: $1..$N posizionali, $@ / $ARGUMENTS tutti gli
|
|
71
|
+
// argomenti, ${1:-default} con fallback, ${@:N} e ${@:N:L} slice (1-indexed).
|
|
72
|
+
export function expandTemplate(body, args) {
|
|
73
|
+
const all = args.join(" ");
|
|
74
|
+
let out = body;
|
|
75
|
+
// ${@:N:L} e ${@:N}
|
|
76
|
+
out = out.replace(/\$\{@:(\d+)(?::(\d+))?\}/g, (_full, nRaw, lRaw) => {
|
|
77
|
+
const start = Math.max(1, parseInt(nRaw, 10));
|
|
78
|
+
const slice = lRaw !== undefined
|
|
79
|
+
? args.slice(start - 1, start - 1 + parseInt(lRaw, 10))
|
|
80
|
+
: args.slice(start - 1);
|
|
81
|
+
return slice.join(" ");
|
|
82
|
+
});
|
|
83
|
+
// ${N:-default}
|
|
84
|
+
out = out.replace(/\$\{(\d+):-([^}]*)\}/g, (_full, nRaw, def) => {
|
|
85
|
+
const v = args[parseInt(nRaw, 10) - 1];
|
|
86
|
+
return v !== undefined && v !== "" ? v : def;
|
|
87
|
+
});
|
|
88
|
+
// $@ e $ARGUMENTS
|
|
89
|
+
out = out.replace(/\$ARGUMENTS\b/g, all).replace(/\$@/g, all);
|
|
90
|
+
// $1..$N
|
|
91
|
+
out = out.replace(/\$(\d+)/g, (_full, nRaw) => args[parseInt(nRaw, 10) - 1] ?? "");
|
|
92
|
+
return out;
|
|
93
|
+
}
|
|
94
|
+
function templateDirs(cwd, projectTrusted) {
|
|
95
|
+
const dirs = [
|
|
96
|
+
join(homedir(), ".talos", "agent", "prompts"),
|
|
97
|
+
join(homedir(), ".talos", "prompts"),
|
|
98
|
+
];
|
|
99
|
+
if (projectTrusted)
|
|
100
|
+
dirs.push(join(cwd, ".talos", "prompts"));
|
|
101
|
+
return dirs;
|
|
102
|
+
}
|
|
103
|
+
// Discovery non ricorsiva (come Pi) dei template da tutte le dir + path extra
|
|
104
|
+
// (es. --prompt-template). I path extra sovrascrivono per nome. Le dir di
|
|
105
|
+
// progetto richiedono project trust.
|
|
106
|
+
export function loadTemplates(cwd, extraPaths = [], projectTrusted = true) {
|
|
107
|
+
const byName = new Map();
|
|
108
|
+
for (const dir of templateDirs(cwd, projectTrusted)) {
|
|
109
|
+
if (!existsSync(dir))
|
|
110
|
+
continue;
|
|
111
|
+
let files;
|
|
112
|
+
try {
|
|
113
|
+
files = readdirSync(dir);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
for (const file of files) {
|
|
119
|
+
if (!file.toLowerCase().endsWith(".md"))
|
|
120
|
+
continue;
|
|
121
|
+
const tpl = parseTemplateFile(join(dir, file));
|
|
122
|
+
if (tpl)
|
|
123
|
+
byName.set(tpl.name, tpl);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
for (const path of extraPaths) {
|
|
127
|
+
const tpl = parseTemplateFile(path);
|
|
128
|
+
if (tpl)
|
|
129
|
+
byName.set(tpl.name, tpl);
|
|
130
|
+
}
|
|
131
|
+
return [...byName.values()];
|
|
132
|
+
}
|
|
133
|
+
export function findTemplate(templates, name) {
|
|
134
|
+
return templates.find((t) => t.name === name);
|
|
135
|
+
}
|
|
136
|
+
// Espande un template in input pronto per il modello dato l'argomento grezzo.
|
|
137
|
+
export function renderTemplate(tpl, rawArgs) {
|
|
138
|
+
return expandTemplate(tpl.body, splitArgs(rawArgs)).trim();
|
|
139
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CompletionRequest, ModelTurn, Provider } from "../core/types.js";
|
|
2
|
+
import { type OAuthCreds } from "./oauth-store.js";
|
|
3
|
+
export declare class AnthropicOAuthProvider implements Provider {
|
|
4
|
+
private creds;
|
|
5
|
+
private readonly env;
|
|
6
|
+
private readonly now;
|
|
7
|
+
readonly id = "claude-code";
|
|
8
|
+
readonly label = "Claude Code (abbonamento)";
|
|
9
|
+
readonly models: readonly ["claude-fable-5-1", "claude-fable-5", "claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5-20251001", "claude-opus-4-8", "claude-sonnet-4-6"];
|
|
10
|
+
constructor(creds: OAuthCreds, env: NodeJS.ProcessEnv, now?: () => number);
|
|
11
|
+
private ensureToken;
|
|
12
|
+
complete(req: CompletionRequest): Promise<ModelTurn>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { messaggioErroreTurno } from "../core/image-limits.js";
|
|
2
|
+
import { planLimitsFromHeaders } from "./plan-limits.js";
|
|
3
|
+
import { toApiMessages, parseStream, applyMessageCache, wants1m, CONTEXT_1M_BETA } from "./anthropic.js";
|
|
4
|
+
import { anthropicEffort } from "./effort.js";
|
|
5
|
+
import { resolveMaxTokens } from "../core/model-limits.js";
|
|
6
|
+
import { ANTHROPIC_MODELS } from "./catalog.js";
|
|
7
|
+
import { isExpired, writeClaudeCreds, } from "./oauth-store.js";
|
|
8
|
+
const API_URL = "https://api.anthropic.com/v1/messages";
|
|
9
|
+
const TOKEN_URL = "https://console.anthropic.com/v1/oauth/token";
|
|
10
|
+
const VERSION = "2023-06-01";
|
|
11
|
+
const OAUTH_BETA = "oauth-2025-04-20";
|
|
12
|
+
// Client id pubblico del CLI Claude Code (necessario al refresh del token).
|
|
13
|
+
const CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
14
|
+
// L'API OAuth degli abbonamenti accetta la richiesta solo se il primo blocco
|
|
15
|
+
// di system e' quello del CLI ufficiale. Le regole di Talos seguono come
|
|
16
|
+
// secondo blocco.
|
|
17
|
+
// HANDSHAKE OAuth: l'API dell'abbonamento Claude Code verifica che il PRIMO
|
|
18
|
+
// blocco di system sia ESATTAMENTE questa stringa (misura anti-abuso). Non e'
|
|
19
|
+
// un prompt di comportamento (quello, in notazione Danilov, e' il blocco
|
|
20
|
+
// successivo = req.system): e' un token di protocollo, va lasciato byte-esatto
|
|
21
|
+
// o le richieste vengono rifiutate.
|
|
22
|
+
const CLAUDE_CODE_SYSTEM = "You are Claude Code, Anthropic's official CLI for Claude.";
|
|
23
|
+
// Provider Claude Code (abbonamento Claude Pro/Max). Usa il token OAuth del
|
|
24
|
+
// login gia' fatto dal CLI `claude`, NON una API key a consumo. Mantiene i tool
|
|
25
|
+
// di Talos: e' una normale chiamata all'API Messages con auth Bearer.
|
|
26
|
+
export class AnthropicOAuthProvider {
|
|
27
|
+
creds;
|
|
28
|
+
env;
|
|
29
|
+
now;
|
|
30
|
+
id = "claude-code";
|
|
31
|
+
label = "Claude Code (abbonamento)";
|
|
32
|
+
models = ANTHROPIC_MODELS;
|
|
33
|
+
constructor(creds, env, now = () => Date.now()) {
|
|
34
|
+
this.creds = creds;
|
|
35
|
+
this.env = env;
|
|
36
|
+
this.now = now;
|
|
37
|
+
}
|
|
38
|
+
async ensureToken(signal) {
|
|
39
|
+
if (!isExpired(this.creds, this.now()) || !this.creds.refreshToken) {
|
|
40
|
+
return this.creds.accessToken;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const res = await fetch(TOKEN_URL, {
|
|
44
|
+
method: "POST",
|
|
45
|
+
signal,
|
|
46
|
+
headers: { "content-type": "application/json" },
|
|
47
|
+
body: JSON.stringify({
|
|
48
|
+
grant_type: "refresh_token",
|
|
49
|
+
refresh_token: this.creds.refreshToken,
|
|
50
|
+
client_id: CLIENT_ID,
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
if (!res.ok)
|
|
54
|
+
return null;
|
|
55
|
+
const j = (await res.json());
|
|
56
|
+
this.creds = {
|
|
57
|
+
accessToken: String(j["access_token"] ?? ""),
|
|
58
|
+
refreshToken: String(j["refresh_token"] ?? this.creds.refreshToken),
|
|
59
|
+
expiresAt: this.now() + Number(j["expires_in"] ?? 0) * 1000,
|
|
60
|
+
};
|
|
61
|
+
writeClaudeCreds(this.env, this.creds);
|
|
62
|
+
return this.creds.accessToken;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async complete(req) {
|
|
69
|
+
const token = await this.ensureToken(req.signal);
|
|
70
|
+
if (!token) {
|
|
71
|
+
return {
|
|
72
|
+
text: "Token Claude Code non valido o scaduto. Esegui `claude` e accedi al tuo abbonamento.",
|
|
73
|
+
toolCalls: [],
|
|
74
|
+
stopReason: "error",
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const body = {
|
|
78
|
+
model: req.model,
|
|
79
|
+
max_tokens: resolveMaxTokens(req.maxTokens, `anthropic/${req.model}`),
|
|
80
|
+
system: [
|
|
81
|
+
{ type: "text", text: CLAUDE_CODE_SYSTEM },
|
|
82
|
+
{ type: "text", text: req.system, cache_control: { type: "ephemeral" } },
|
|
83
|
+
...(req.turnContext ? [{
|
|
84
|
+
type: "text",
|
|
85
|
+
text: `[HORIZON_TURN_CONTEXT]\n${req.turnContext}\n[/HORIZON_TURN_CONTEXT]`,
|
|
86
|
+
}] : []),
|
|
87
|
+
],
|
|
88
|
+
messages: applyMessageCache(toApiMessages(req)),
|
|
89
|
+
stream: true,
|
|
90
|
+
tools: req.tools.map((t) => ({
|
|
91
|
+
name: t.name,
|
|
92
|
+
description: t.description,
|
|
93
|
+
input_schema: t.inputSchema,
|
|
94
|
+
})),
|
|
95
|
+
};
|
|
96
|
+
const effort = anthropicEffort(req.effort, req.model);
|
|
97
|
+
if (effort)
|
|
98
|
+
Object.assign(body, effort);
|
|
99
|
+
const beta = wants1m(req.model, this.env) ? `${OAUTH_BETA},${CONTEXT_1M_BETA}` : OAUTH_BETA;
|
|
100
|
+
const res = await fetch(API_URL, {
|
|
101
|
+
method: "POST",
|
|
102
|
+
signal: req.signal,
|
|
103
|
+
headers: {
|
|
104
|
+
"content-type": "application/json",
|
|
105
|
+
authorization: `Bearer ${token}`,
|
|
106
|
+
"anthropic-version": VERSION,
|
|
107
|
+
"anthropic-beta": beta,
|
|
108
|
+
},
|
|
109
|
+
body: JSON.stringify(body),
|
|
110
|
+
});
|
|
111
|
+
const limits = planLimitsFromHeaders(this.id, res.headers);
|
|
112
|
+
if (!res.ok || !res.body) {
|
|
113
|
+
const detail = await res.text().catch(() => res.statusText);
|
|
114
|
+
return {
|
|
115
|
+
text: messaggioErroreTurno("Claude Code OAuth", res.status, detail),
|
|
116
|
+
toolCalls: [],
|
|
117
|
+
stopReason: "error",
|
|
118
|
+
...(limits ? { limits } : {}),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const turn = await parseStream(res.body, req.onDelta, req.onActivity, req.onReasoning);
|
|
122
|
+
return limits ? { ...turn, limits } : turn;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CompletionRequest, ModelTurn, Provider } from "../core/types.js";
|
|
2
|
+
interface ApiBlock {
|
|
3
|
+
type: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
tool_use_id?: string;
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
interface ApiMessage {
|
|
9
|
+
role: string;
|
|
10
|
+
content: ApiBlock[];
|
|
11
|
+
}
|
|
12
|
+
export declare function toApiMessages(req: CompletionRequest): unknown[];
|
|
13
|
+
export declare function normalizeToolPairing(messages: ApiMessage[]): ApiMessage[];
|
|
14
|
+
export declare function withSystemCache(system: string, turnContext?: string): unknown[];
|
|
15
|
+
export declare function applyMessageCache(messages: unknown[]): unknown[];
|
|
16
|
+
export declare const CONTEXT_1M_BETA = "context-1m-2025-08-07";
|
|
17
|
+
export declare function wants1m(model: string, env: NodeJS.ProcessEnv): boolean;
|
|
18
|
+
export declare class AnthropicProvider implements Provider {
|
|
19
|
+
private readonly apiKey;
|
|
20
|
+
readonly id = "anthropic";
|
|
21
|
+
readonly label = "Anthropic";
|
|
22
|
+
readonly models: readonly ["claude-fable-5-1", "claude-fable-5", "claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5-20251001", "claude-opus-4-8", "claude-sonnet-4-6"];
|
|
23
|
+
constructor(apiKey: string);
|
|
24
|
+
complete(req: CompletionRequest): Promise<ModelTurn>;
|
|
25
|
+
}
|
|
26
|
+
export declare function parseStream(body: ReadableStream<Uint8Array>, onDelta?: (chunk: string) => void, onActivity?: (label: string) => void, onReasoning?: (chunk: string) => void, onToolDelta?: CompletionRequest["onToolDelta"]): Promise<ModelTurn>;
|
|
27
|
+
export {};
|