@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,169 @@
|
|
|
1
|
+
// Definizione delle route REST. Collega Router, AuthService, ConversationStore
|
|
2
|
+
// ed EngineBridge. Le risposte sono JSON; gli errori passano da HttpError.
|
|
3
|
+
import { Router, readJson, readBinary, sendJson, sendBinary } from "./http.js";
|
|
4
|
+
import { HttpError, toPublicAsset } from "./types.js";
|
|
5
|
+
import { timingSafeEqual } from "node:crypto";
|
|
6
|
+
function str(body, key) {
|
|
7
|
+
const v = body[key];
|
|
8
|
+
if (typeof v !== "string" || !v.trim()) {
|
|
9
|
+
throw new HttpError(400, `campo "${key}" mancante o non valido`, "invalid_field");
|
|
10
|
+
}
|
|
11
|
+
return v;
|
|
12
|
+
}
|
|
13
|
+
// Legge un header HTTP come stringa (primo valore se multiplo).
|
|
14
|
+
function header(req, name) {
|
|
15
|
+
const v = req.headers[name.toLowerCase()];
|
|
16
|
+
return Array.isArray(v) ? v[0] : v;
|
|
17
|
+
}
|
|
18
|
+
const ASSET_KINDS = ["image", "file", "snippet"];
|
|
19
|
+
function parseKind(raw, fallback) {
|
|
20
|
+
if (raw && ASSET_KINDS.includes(raw))
|
|
21
|
+
return raw;
|
|
22
|
+
return fallback;
|
|
23
|
+
}
|
|
24
|
+
export function buildRouter(deps) {
|
|
25
|
+
const { auth, conversations, assets, engine, config } = deps;
|
|
26
|
+
const r = new Router();
|
|
27
|
+
// --- Health --------------------------------------------------------------
|
|
28
|
+
r.get("/api/health", (_req, res) => {
|
|
29
|
+
sendJson(res, 200, { status: "ok", model: config.model, ts: Date.now() });
|
|
30
|
+
});
|
|
31
|
+
// --- Auth ----------------------------------------------------------------
|
|
32
|
+
r.post("/api/auth/register", async (req, res) => {
|
|
33
|
+
const supplied = Buffer.from(header(req, "x-talos-registration-token") ?? "");
|
|
34
|
+
const expected = Buffer.from(config.registrationToken);
|
|
35
|
+
if (!expected.length || supplied.length !== expected.length || !timingSafeEqual(supplied, expected)) {
|
|
36
|
+
throw new HttpError(403, "registration requires the server owner's token", "registration_disabled");
|
|
37
|
+
}
|
|
38
|
+
const body = await readJson(req);
|
|
39
|
+
const result = auth.register(str(body, "email"), str(body, "password"), typeof body["displayName"] === "string" ? body["displayName"] : undefined);
|
|
40
|
+
sendJson(res, 201, result);
|
|
41
|
+
});
|
|
42
|
+
r.post("/api/auth/login", async (req, res) => {
|
|
43
|
+
const body = await readJson(req);
|
|
44
|
+
const result = auth.login(str(body, "email"), str(body, "password"));
|
|
45
|
+
sendJson(res, 200, result);
|
|
46
|
+
});
|
|
47
|
+
r.get("/api/auth/me", (req, res) => {
|
|
48
|
+
const user = auth.requireUser(req);
|
|
49
|
+
sendJson(res, 200, { id: user.id, email: user.email, displayName: user.displayName, createdAt: user.createdAt });
|
|
50
|
+
});
|
|
51
|
+
// --- Conversazioni -------------------------------------------------------
|
|
52
|
+
r.get("/api/conversations", (req, res) => {
|
|
53
|
+
const user = auth.requireUser(req);
|
|
54
|
+
sendJson(res, 200, { conversations: conversations.listFor(user.id) });
|
|
55
|
+
});
|
|
56
|
+
r.post("/api/conversations", async (req, res) => {
|
|
57
|
+
const user = auth.requireUser(req);
|
|
58
|
+
const body = await readJson(req);
|
|
59
|
+
const conv = conversations.create(user.id, {
|
|
60
|
+
title: typeof body["title"] === "string" ? body["title"] : undefined,
|
|
61
|
+
model: typeof body["model"] === "string" && body["model"] ? body["model"] : config.model,
|
|
62
|
+
});
|
|
63
|
+
sendJson(res, 201, conv);
|
|
64
|
+
});
|
|
65
|
+
r.get("/api/conversations/:id", (req, res, m) => {
|
|
66
|
+
const user = auth.requireUser(req);
|
|
67
|
+
const conv = conversations.require(m.params["id"], user.id);
|
|
68
|
+
const messages = conversations.messages(conv.id, user.id);
|
|
69
|
+
sendJson(res, 200, { conversation: conv, messages });
|
|
70
|
+
});
|
|
71
|
+
r.patch("/api/conversations/:id", async (req, res, m) => {
|
|
72
|
+
const user = auth.requireUser(req);
|
|
73
|
+
const body = await readJson(req);
|
|
74
|
+
const conv = conversations.rename(m.params["id"], user.id, str(body, "title"));
|
|
75
|
+
sendJson(res, 200, conv);
|
|
76
|
+
});
|
|
77
|
+
r.delete("/api/conversations/:id", (req, res, m) => {
|
|
78
|
+
const user = auth.requireUser(req);
|
|
79
|
+
const id = m.params["id"];
|
|
80
|
+
conversations.delete(id, user.id);
|
|
81
|
+
engine.evict(id);
|
|
82
|
+
sendJson(res, 200, { deleted: id });
|
|
83
|
+
});
|
|
84
|
+
// --- Messaggi (prompt sincrono: accumula gli eventi del giro) -------------
|
|
85
|
+
// Per lo streaming in tempo reale usare il WebSocket /ws. Questa rotta esegue
|
|
86
|
+
// il giro e ritorna gli eventi raccolti + i messaggi finali del dialogo.
|
|
87
|
+
r.post("/api/conversations/:id/messages", async (req, res, m) => {
|
|
88
|
+
const user = auth.requireUser(req);
|
|
89
|
+
const id = m.params["id"];
|
|
90
|
+
const conv = conversations.require(id, user.id);
|
|
91
|
+
const body = await readJson(req);
|
|
92
|
+
const text = str(body, "text");
|
|
93
|
+
if (engine.isBusy(id))
|
|
94
|
+
throw new HttpError(409, "giro gia' in corso", "busy");
|
|
95
|
+
const events = await engine.promptCollect(id, conv.model, text);
|
|
96
|
+
conversations.touch(id);
|
|
97
|
+
const messages = conversations.messages(id, user.id);
|
|
98
|
+
sendJson(res, 200, { events, messages });
|
|
99
|
+
});
|
|
100
|
+
// --- Asset di una Vision -------------------------------------------------
|
|
101
|
+
// Asset di esempio (immagini, file campione, snippet) associati a una Vision.
|
|
102
|
+
// Lista degli asset di una Vision (solo metadati pubblici).
|
|
103
|
+
r.get("/api/visions/:visionId/assets", (req, res, m) => {
|
|
104
|
+
const user = auth.requireUser(req);
|
|
105
|
+
const visionId = m.params["visionId"];
|
|
106
|
+
const list = assets.listFor(visionId, user.id).map(toPublicAsset);
|
|
107
|
+
sendJson(res, 200, { assets: list });
|
|
108
|
+
});
|
|
109
|
+
// Upload di un asset. Due modalita':
|
|
110
|
+
// - snippet: body JSON { name, snippet, mime?, description? }
|
|
111
|
+
// - image/file: body BINARIO grezzo; metadati dagli header:
|
|
112
|
+
// X-Asset-Kind (image|file), X-Asset-Name, Content-Type, X-Asset-Description
|
|
113
|
+
r.post("/api/visions/:visionId/assets", async (req, res, m) => {
|
|
114
|
+
const user = auth.requireUser(req);
|
|
115
|
+
const visionId = m.params["visionId"];
|
|
116
|
+
const contentType = (header(req, "content-type") ?? "").split(";")[0].trim();
|
|
117
|
+
if (contentType === "application/json") {
|
|
118
|
+
const body = await readJson(req);
|
|
119
|
+
const kind = parseKind(typeof body["kind"] === "string" ? body["kind"] : undefined, "snippet");
|
|
120
|
+
const asset = assets.create(visionId, user.id, {
|
|
121
|
+
kind,
|
|
122
|
+
name: str(body, "name"),
|
|
123
|
+
...(typeof body["snippet"] === "string" ? { snippet: body["snippet"] } : {}),
|
|
124
|
+
...(typeof body["mime"] === "string" ? { mime: body["mime"] } : {}),
|
|
125
|
+
...(typeof body["description"] === "string" ? { description: body["description"] } : {}),
|
|
126
|
+
});
|
|
127
|
+
sendJson(res, 201, toPublicAsset(asset));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
// Upload binario.
|
|
131
|
+
const kind = parseKind(header(req, "x-asset-kind"), "file");
|
|
132
|
+
if (kind === "snippet") {
|
|
133
|
+
throw new HttpError(400, "uno snippet va caricato come application/json", "invalid_field");
|
|
134
|
+
}
|
|
135
|
+
const name = header(req, "x-asset-name");
|
|
136
|
+
if (!name)
|
|
137
|
+
throw new HttpError(400, 'header "X-Asset-Name" mancante', "invalid_field");
|
|
138
|
+
const data = await readBinary(req);
|
|
139
|
+
const asset = assets.create(visionId, user.id, {
|
|
140
|
+
kind,
|
|
141
|
+
name,
|
|
142
|
+
data,
|
|
143
|
+
...(contentType ? { mime: contentType } : {}),
|
|
144
|
+
...(header(req, "x-asset-description") ? { description: header(req, "x-asset-description") } : {}),
|
|
145
|
+
});
|
|
146
|
+
sendJson(res, 201, toPublicAsset(asset));
|
|
147
|
+
});
|
|
148
|
+
// Metadati di un singolo asset.
|
|
149
|
+
r.get("/api/assets/:id", (req, res, m) => {
|
|
150
|
+
const user = auth.requireUser(req);
|
|
151
|
+
const asset = assets.require(m.params["id"], user.id);
|
|
152
|
+
sendJson(res, 200, toPublicAsset(asset));
|
|
153
|
+
});
|
|
154
|
+
// Download del contenuto binario di un asset image/file.
|
|
155
|
+
r.get("/api/assets/:id/blob", (req, res, m) => {
|
|
156
|
+
const user = auth.requireUser(req);
|
|
157
|
+
const asset = assets.require(m.params["id"], user.id);
|
|
158
|
+
const data = assets.readBlob(asset.id, user.id);
|
|
159
|
+
sendBinary(res, 200, data, asset.mime, asset.name);
|
|
160
|
+
});
|
|
161
|
+
// Cancellazione di un asset (metadati + eventuale blob).
|
|
162
|
+
r.delete("/api/assets/:id", (req, res, m) => {
|
|
163
|
+
const user = auth.requireUser(req);
|
|
164
|
+
const id = m.params["id"];
|
|
165
|
+
assets.delete(id, user.id);
|
|
166
|
+
sendJson(res, 200, { deleted: id });
|
|
167
|
+
});
|
|
168
|
+
return r;
|
|
169
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createBackend } from "./server.js";
|
|
2
|
+
export type { BackendServer } from "./server.js";
|
|
3
|
+
export { buildBackendConfig } from "./config.js";
|
|
4
|
+
export type { BackendConfig } from "./config.js";
|
|
5
|
+
export { UserStore } from "./users.js";
|
|
6
|
+
export { ConversationStore } from "./conversations.js";
|
|
7
|
+
export { AuthService } from "./auth.js";
|
|
8
|
+
export { EngineBridge } from "./engine.js";
|
|
9
|
+
export { buildRouter } from "./routes.js";
|
|
10
|
+
export { Router } from "./http.js";
|
|
11
|
+
export { HttpError, toPublicUser, } from "./types.js";
|
|
12
|
+
export type { User, PublicUser, Conversation, ConversationMessage, AuthResult, AuthTokenPayload, WsClientMessage, WsServerMessage, ApiError, } from "./types.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Superficie pubblica del backend, per embeddarlo in un altro processo o per
|
|
2
|
+
// i test. Riesporta i servizi e i tipi del protocollo.
|
|
3
|
+
export { createBackend } from "./server.js";
|
|
4
|
+
export { buildBackendConfig } from "./config.js";
|
|
5
|
+
export { UserStore } from "./users.js";
|
|
6
|
+
export { ConversationStore } from "./conversations.js";
|
|
7
|
+
export { AuthService } from "./auth.js";
|
|
8
|
+
export { EngineBridge } from "./engine.js";
|
|
9
|
+
export { buildRouter } from "./routes.js";
|
|
10
|
+
export { Router } from "./http.js";
|
|
11
|
+
export { HttpError, toPublicUser, } from "./types.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Server } from "node:http";
|
|
2
|
+
import { type BackendConfig } from "./config.js";
|
|
3
|
+
export interface BackendServer {
|
|
4
|
+
readonly config: BackendConfig;
|
|
5
|
+
readonly server: Server;
|
|
6
|
+
listen(): Promise<{
|
|
7
|
+
host: string;
|
|
8
|
+
port: number;
|
|
9
|
+
}>;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createBackend(env?: NodeJS.ProcessEnv): BackendServer;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Assemblaggio del backend: HTTP server (node:http) con router REST e upgrade
|
|
2
|
+
// WebSocket sullo stesso listener. Costruisce tutti i servizi e li collega.
|
|
3
|
+
// Zero dipendenze a runtime.
|
|
4
|
+
import { createServer } from "node:http";
|
|
5
|
+
import { randomBytes } from "node:crypto";
|
|
6
|
+
import { buildBackendConfig } from "./config.js";
|
|
7
|
+
import { UserStore } from "./users.js";
|
|
8
|
+
import { ConversationStore } from "./conversations.js";
|
|
9
|
+
import { AssetStore } from "./assets.js";
|
|
10
|
+
import { RoomMemoryAssetSink } from "./asset-events.js";
|
|
11
|
+
import { AuthService } from "./auth.js";
|
|
12
|
+
import { EngineBridge } from "./engine.js";
|
|
13
|
+
import { buildRouter } from "./routes.js";
|
|
14
|
+
import { applyCors, sendError, sendJson } from "./http.js";
|
|
15
|
+
import { handleUpgrade, isChatUpgrade } from "./ws-handler.js";
|
|
16
|
+
export function createBackend(env = process.env) {
|
|
17
|
+
const config = buildBackendConfig(env);
|
|
18
|
+
if (!config.jwtSecret) {
|
|
19
|
+
// Segreto effimero: i token non sopravvivono al riavvio. Avviso esplicito.
|
|
20
|
+
config.jwtSecret = randomSecret();
|
|
21
|
+
process.stderr.write("[backend] TALOS_BACKEND_JWT_SECRET non impostato: uso un segreto effimero (i token non sopravvivono al riavvio)\n");
|
|
22
|
+
}
|
|
23
|
+
const users = UserStore.open(config.dataDir);
|
|
24
|
+
const conversations = ConversationStore.open(config.dataDir, config.sessionDir);
|
|
25
|
+
// Sink degli eventi asset: ogni upload/link/analisi/versione diventa una
|
|
26
|
+
// stanza di memoria (RoomMemory) richiamabile via recall, in uno store
|
|
27
|
+
// dedicato "assets" sotto sessionDir.
|
|
28
|
+
const assetSink = RoomMemoryAssetSink.open(config.sessionDir, "assets");
|
|
29
|
+
const assets = AssetStore.open(config.dataDir, assetSink);
|
|
30
|
+
const auth = new AuthService(users, config);
|
|
31
|
+
const engine = new EngineBridge(config);
|
|
32
|
+
const router = buildRouter({ auth, conversations, assets, engine, config });
|
|
33
|
+
const server = createServer((req, res) => {
|
|
34
|
+
const origin = req.headers["origin"];
|
|
35
|
+
if (origin && !config.corsOrigins.includes(origin)) {
|
|
36
|
+
sendJson(res, 403, { error: "origin not allowed" });
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
applyCors(res, typeof origin === "string" ? origin : undefined, config);
|
|
40
|
+
if (req.method === "OPTIONS") {
|
|
41
|
+
res.writeHead(204);
|
|
42
|
+
res.end();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
void handleRequest(req, res, router);
|
|
46
|
+
});
|
|
47
|
+
// Upgrade WebSocket sullo stesso listener (path /ws).
|
|
48
|
+
server.on("upgrade", (req, socket) => {
|
|
49
|
+
const origin = req.headers["origin"];
|
|
50
|
+
if (origin && !config.corsOrigins.includes(origin)) {
|
|
51
|
+
socket.end("HTTP/1.1 403 Forbidden\r\n\r\n");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (!isChatUpgrade(req)) {
|
|
55
|
+
socket.end("HTTP/1.1 404 Not Found\r\n\r\n");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
handleUpgrade(req, socket, { auth, conversations, engine });
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
config,
|
|
62
|
+
server,
|
|
63
|
+
listen() {
|
|
64
|
+
return new Promise((resolve) => {
|
|
65
|
+
server.listen(config.port, config.host, () => resolve({ host: config.host, port: config.port }));
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
close() {
|
|
69
|
+
return new Promise((resolve, reject) => {
|
|
70
|
+
server.close((err) => (err ? reject(err) : resolve()));
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
async function handleRequest(req, res, router) {
|
|
76
|
+
try {
|
|
77
|
+
const url = new URL(req.url ?? "", "http://localhost");
|
|
78
|
+
const resolved = router.resolve(req.method ?? "GET", url.pathname);
|
|
79
|
+
if (!resolved) {
|
|
80
|
+
sendJson(res, 404, { error: "rotta non trovata", code: "not_found" });
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
await resolved.handler(req, res, resolved.match);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
sendError(res, err);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function randomSecret() {
|
|
90
|
+
return randomBytes(32).toString("base64url");
|
|
91
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const DEFAULT_TTL_MS: number;
|
|
2
|
+
export declare const DEFAULT_MAX_BYTES: number;
|
|
3
|
+
export interface TempImageStoreOptions {
|
|
4
|
+
readonly dir?: string;
|
|
5
|
+
readonly ttlMs?: number;
|
|
6
|
+
readonly maxBytes?: number;
|
|
7
|
+
readonly sweepIntervalMs?: number;
|
|
8
|
+
readonly now?: () => number;
|
|
9
|
+
}
|
|
10
|
+
export interface StoreInput {
|
|
11
|
+
readonly mime?: string;
|
|
12
|
+
readonly ttlMs?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface TempImageRef {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly size: number;
|
|
18
|
+
readonly mime: string;
|
|
19
|
+
readonly createdAt: number;
|
|
20
|
+
readonly expiresAt: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class TempStorageError extends Error {
|
|
23
|
+
readonly code: string;
|
|
24
|
+
constructor(message: string, code: string);
|
|
25
|
+
}
|
|
26
|
+
export declare class TempImageStore {
|
|
27
|
+
private readonly dir;
|
|
28
|
+
private readonly ttlMs;
|
|
29
|
+
private readonly maxBytes;
|
|
30
|
+
private readonly now;
|
|
31
|
+
private readonly byId;
|
|
32
|
+
private sweeper;
|
|
33
|
+
private constructor();
|
|
34
|
+
static open(opts?: TempImageStoreOptions): TempImageStore;
|
|
35
|
+
store(bytes: Buffer | Uint8Array, input?: StoreInput): TempImageRef;
|
|
36
|
+
getPath(id: string): string | null;
|
|
37
|
+
get(id: string): TempImageRef | null;
|
|
38
|
+
read(id: string): Buffer;
|
|
39
|
+
delete(id: string): boolean;
|
|
40
|
+
sweep(): number;
|
|
41
|
+
clear(): number;
|
|
42
|
+
get size(): number;
|
|
43
|
+
startSweeper(intervalMs: number): void;
|
|
44
|
+
stopSweeper(): void;
|
|
45
|
+
private resolveLive;
|
|
46
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// Servizio di storage TEMPORANEO per i bytes di un'immagine. Salva i byte in un
|
|
2
|
+
// file con path univoco sotto una directory temporanea dedicata e ne restituisce
|
|
3
|
+
// il path; gestisce scadenza (TTL) e cleanup. Pensato per dati effimeri (es.
|
|
4
|
+
// immagini intercettate/incollate da trasformare prima dell'uso), NON per
|
|
5
|
+
// persistenza durevole.
|
|
6
|
+
//
|
|
7
|
+
// Stile allineato a AssetStore: zero dipendenze a runtime, solo API native di
|
|
8
|
+
// Node (node:fs, node:os, node:path, node:crypto). Immutabilita' verso l'esterno:
|
|
9
|
+
// i metadati restituiti sono oggetti freschi.
|
|
10
|
+
import { mkdirSync, writeFileSync, readFileSync, existsSync, rmSync, readdirSync, } from "node:fs";
|
|
11
|
+
import { tmpdir } from "node:os";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
import { randomUUID } from "node:crypto";
|
|
14
|
+
// TTL di default: 10 minuti. Sufficiente per un round-trip di elaborazione.
|
|
15
|
+
export const DEFAULT_TTL_MS = 10 * 60 * 1000;
|
|
16
|
+
// Limite per un singolo file temporaneo (16 MB).
|
|
17
|
+
export const DEFAULT_MAX_BYTES = 16 * 1024 * 1024;
|
|
18
|
+
// Prefisso del nome dei file temporanei: facilita lo sweep e l'isolamento.
|
|
19
|
+
const FILE_PREFIX = "tmpimg_";
|
|
20
|
+
// Mappa minima da mime a estensione, solo per leggibilita' del path (il
|
|
21
|
+
// contenuto resta autoritativo). Sconosciuti -> ".bin".
|
|
22
|
+
const EXT_BY_MIME = {
|
|
23
|
+
"image/png": "png",
|
|
24
|
+
"image/jpeg": "jpg",
|
|
25
|
+
"image/jpg": "jpg",
|
|
26
|
+
"image/gif": "gif",
|
|
27
|
+
"image/webp": "webp",
|
|
28
|
+
"image/svg+xml": "svg",
|
|
29
|
+
"image/avif": "avif",
|
|
30
|
+
"image/bmp": "bmp",
|
|
31
|
+
"image/x-icon": "ico",
|
|
32
|
+
"image/tiff": "tiff",
|
|
33
|
+
};
|
|
34
|
+
export class TempStorageError extends Error {
|
|
35
|
+
code;
|
|
36
|
+
constructor(message, code) {
|
|
37
|
+
super(message);
|
|
38
|
+
this.code = code;
|
|
39
|
+
this.name = "TempStorageError";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function extForMime(mime) {
|
|
43
|
+
if (!mime)
|
|
44
|
+
return "bin";
|
|
45
|
+
return EXT_BY_MIME[mime.toLowerCase()] ?? "bin";
|
|
46
|
+
}
|
|
47
|
+
export class TempImageStore {
|
|
48
|
+
dir;
|
|
49
|
+
ttlMs;
|
|
50
|
+
maxBytes;
|
|
51
|
+
now;
|
|
52
|
+
// Indice in memoria dei file vivi, per id. La fonte di verita' del contenuto
|
|
53
|
+
// resta il filesystem; questo accelera lookup e scadenza.
|
|
54
|
+
byId = new Map();
|
|
55
|
+
sweeper = null;
|
|
56
|
+
constructor(dir, ttlMs, maxBytes, now) {
|
|
57
|
+
this.dir = dir;
|
|
58
|
+
this.ttlMs = ttlMs;
|
|
59
|
+
this.maxBytes = maxBytes;
|
|
60
|
+
this.now = now;
|
|
61
|
+
}
|
|
62
|
+
// Apre (e crea) lo store. Avvia opzionalmente lo sweeper periodico.
|
|
63
|
+
static open(opts = {}) {
|
|
64
|
+
const dir = opts.dir ?? join(tmpdir(), "talos-temp-images");
|
|
65
|
+
mkdirSync(dir, { recursive: true });
|
|
66
|
+
const store = new TempImageStore(dir, opts.ttlMs && opts.ttlMs > 0 ? opts.ttlMs : DEFAULT_TTL_MS, opts.maxBytes && opts.maxBytes > 0 ? opts.maxBytes : DEFAULT_MAX_BYTES, opts.now ?? Date.now);
|
|
67
|
+
if (opts.sweepIntervalMs && opts.sweepIntervalMs > 0) {
|
|
68
|
+
store.startSweeper(opts.sweepIntervalMs);
|
|
69
|
+
}
|
|
70
|
+
return store;
|
|
71
|
+
}
|
|
72
|
+
// Salva i bytes in un path temporaneo univoco e ritorna i metadati (incluso
|
|
73
|
+
// il path). Questo e' il punto centrale del servizio.
|
|
74
|
+
store(bytes, input = {}) {
|
|
75
|
+
const data = Buffer.isBuffer(bytes) ? bytes : Buffer.from(bytes);
|
|
76
|
+
if (data.length === 0) {
|
|
77
|
+
throw new TempStorageError("nessun byte da salvare", "empty");
|
|
78
|
+
}
|
|
79
|
+
if (data.length > this.maxBytes) {
|
|
80
|
+
throw new TempStorageError("immagine troppo grande", "payload_too_large");
|
|
81
|
+
}
|
|
82
|
+
const id = randomUUID().replace(/-/g, "");
|
|
83
|
+
const mime = input.mime ?? "application/octet-stream";
|
|
84
|
+
const ext = extForMime(input.mime);
|
|
85
|
+
const path = join(this.dir, `${FILE_PREFIX}${id}.${ext}`);
|
|
86
|
+
const now = this.now();
|
|
87
|
+
const ttl = input.ttlMs && input.ttlMs > 0 ? input.ttlMs : this.ttlMs;
|
|
88
|
+
writeFileSync(path, data);
|
|
89
|
+
const ref = {
|
|
90
|
+
id,
|
|
91
|
+
path,
|
|
92
|
+
size: data.length,
|
|
93
|
+
mime,
|
|
94
|
+
createdAt: now,
|
|
95
|
+
expiresAt: now + ttl,
|
|
96
|
+
};
|
|
97
|
+
this.byId.set(id, ref);
|
|
98
|
+
return { ...ref };
|
|
99
|
+
}
|
|
100
|
+
// Ritorna il path del file se ancora vivo (non scaduto e presente su disco).
|
|
101
|
+
// Se scaduto, lo elimina e ritorna null.
|
|
102
|
+
getPath(id) {
|
|
103
|
+
const ref = this.resolveLive(id);
|
|
104
|
+
return ref ? ref.path : null;
|
|
105
|
+
}
|
|
106
|
+
// Ritorna i metadati del file se vivo, altrimenti null (cleanup se scaduto).
|
|
107
|
+
get(id) {
|
|
108
|
+
const ref = this.resolveLive(id);
|
|
109
|
+
return ref ? { ...ref } : null;
|
|
110
|
+
}
|
|
111
|
+
// Legge i bytes del file se vivo. Lancia se mancante/scaduto.
|
|
112
|
+
read(id) {
|
|
113
|
+
const ref = this.resolveLive(id);
|
|
114
|
+
if (!ref)
|
|
115
|
+
throw new TempStorageError("file temporaneo non trovato o scaduto", "not_found");
|
|
116
|
+
return readFileSync(ref.path);
|
|
117
|
+
}
|
|
118
|
+
// Cancella un singolo file (idempotente). Ritorna true se qualcosa e' stato
|
|
119
|
+
// rimosso dall'indice.
|
|
120
|
+
delete(id) {
|
|
121
|
+
const ref = this.byId.get(id);
|
|
122
|
+
this.byId.delete(id);
|
|
123
|
+
if (ref && existsSync(ref.path))
|
|
124
|
+
rmSync(ref.path, { force: true });
|
|
125
|
+
return ref !== undefined;
|
|
126
|
+
}
|
|
127
|
+
// Elimina tutti i file scaduti rispetto a `now`. Ritorna il numero rimosso.
|
|
128
|
+
// Considera sia l'indice in memoria sia eventuali orfani su disco col prefisso.
|
|
129
|
+
sweep() {
|
|
130
|
+
const now = this.now();
|
|
131
|
+
let removed = 0;
|
|
132
|
+
for (const [id, ref] of this.byId) {
|
|
133
|
+
if (ref.expiresAt <= now) {
|
|
134
|
+
this.byId.delete(id);
|
|
135
|
+
if (existsSync(ref.path))
|
|
136
|
+
rmSync(ref.path, { force: true });
|
|
137
|
+
removed += 1;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return removed;
|
|
141
|
+
}
|
|
142
|
+
// Cancella TUTTI i file temporanei gestiti (indice + file col prefisso nella
|
|
143
|
+
// dir). Ritorna il numero di file rimossi dal disco.
|
|
144
|
+
clear() {
|
|
145
|
+
let removed = 0;
|
|
146
|
+
for (const ref of this.byId.values()) {
|
|
147
|
+
if (existsSync(ref.path)) {
|
|
148
|
+
rmSync(ref.path, { force: true });
|
|
149
|
+
removed += 1;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
this.byId.clear();
|
|
153
|
+
// Rimuove anche eventuali orfani col nostro prefisso.
|
|
154
|
+
if (existsSync(this.dir)) {
|
|
155
|
+
for (const name of readdirSync(this.dir)) {
|
|
156
|
+
if (name.startsWith(FILE_PREFIX)) {
|
|
157
|
+
rmSync(join(this.dir, name), { force: true });
|
|
158
|
+
removed += 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return removed;
|
|
163
|
+
}
|
|
164
|
+
// Numero di file vivi nell'indice (senza tener conto della scadenza).
|
|
165
|
+
get size() {
|
|
166
|
+
return this.byId.size;
|
|
167
|
+
}
|
|
168
|
+
// Avvia lo sweeper periodico. unref() per non tenere vivo il processo.
|
|
169
|
+
startSweeper(intervalMs) {
|
|
170
|
+
if (this.sweeper)
|
|
171
|
+
return;
|
|
172
|
+
this.sweeper = setInterval(() => this.sweep(), intervalMs);
|
|
173
|
+
if (typeof this.sweeper.unref === "function")
|
|
174
|
+
this.sweeper.unref();
|
|
175
|
+
}
|
|
176
|
+
// Ferma lo sweeper periodico (se attivo).
|
|
177
|
+
stopSweeper() {
|
|
178
|
+
if (this.sweeper) {
|
|
179
|
+
clearInterval(this.sweeper);
|
|
180
|
+
this.sweeper = null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// Risolve un id a un ref VIVO: se scaduto o mancante su disco, fa cleanup e
|
|
184
|
+
// ritorna undefined.
|
|
185
|
+
resolveLive(id) {
|
|
186
|
+
const ref = this.byId.get(id);
|
|
187
|
+
if (!ref)
|
|
188
|
+
return undefined;
|
|
189
|
+
if (ref.expiresAt <= this.now() || !existsSync(ref.path)) {
|
|
190
|
+
this.byId.delete(id);
|
|
191
|
+
if (existsSync(ref.path))
|
|
192
|
+
rmSync(ref.path, { force: true });
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
return ref;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { AgentEvent } from "../core/types.js";
|
|
2
|
+
export interface User {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly email: string;
|
|
5
|
+
readonly displayName: string;
|
|
6
|
+
readonly passwordHash: string;
|
|
7
|
+
readonly createdAt: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PublicUser {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly email: string;
|
|
12
|
+
readonly displayName: string;
|
|
13
|
+
readonly createdAt: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function toPublicUser(u: User): PublicUser;
|
|
16
|
+
export interface Conversation {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly userId: string;
|
|
19
|
+
readonly title: string;
|
|
20
|
+
readonly model: string;
|
|
21
|
+
readonly createdAt: number;
|
|
22
|
+
readonly updatedAt: number;
|
|
23
|
+
}
|
|
24
|
+
export interface ConversationMessage {
|
|
25
|
+
readonly role: "user" | "assistant" | "tool";
|
|
26
|
+
readonly text: string;
|
|
27
|
+
readonly toolCalls?: ReadonlyArray<{
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
input: unknown;
|
|
31
|
+
}>;
|
|
32
|
+
readonly toolResults?: ReadonlyArray<{
|
|
33
|
+
callId: string;
|
|
34
|
+
output: string;
|
|
35
|
+
isError: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
readonly ts: number;
|
|
38
|
+
}
|
|
39
|
+
export type AssetKind = "image" | "file" | "snippet";
|
|
40
|
+
export interface Asset {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly visionId: string;
|
|
43
|
+
readonly userId: string;
|
|
44
|
+
readonly kind: AssetKind;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly mime: string;
|
|
47
|
+
readonly size: number;
|
|
48
|
+
readonly snippet?: string;
|
|
49
|
+
readonly description?: string;
|
|
50
|
+
readonly createdAt: number;
|
|
51
|
+
}
|
|
52
|
+
export interface PublicAsset {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly visionId: string;
|
|
55
|
+
readonly kind: AssetKind;
|
|
56
|
+
readonly name: string;
|
|
57
|
+
readonly mime: string;
|
|
58
|
+
readonly size: number;
|
|
59
|
+
readonly snippet?: string;
|
|
60
|
+
readonly description?: string;
|
|
61
|
+
readonly createdAt: number;
|
|
62
|
+
}
|
|
63
|
+
export declare function toPublicAsset(a: Asset): PublicAsset;
|
|
64
|
+
export interface AuthTokenPayload {
|
|
65
|
+
readonly sub: string;
|
|
66
|
+
readonly email: string;
|
|
67
|
+
readonly iat: number;
|
|
68
|
+
readonly exp: number;
|
|
69
|
+
}
|
|
70
|
+
export interface AuthResult {
|
|
71
|
+
readonly token: string;
|
|
72
|
+
readonly user: PublicUser;
|
|
73
|
+
readonly expiresAt: number;
|
|
74
|
+
}
|
|
75
|
+
export type WsClientMessage = {
|
|
76
|
+
readonly type: "prompt";
|
|
77
|
+
readonly text: string;
|
|
78
|
+
} | {
|
|
79
|
+
readonly type: "abort";
|
|
80
|
+
} | {
|
|
81
|
+
readonly type: "ping";
|
|
82
|
+
};
|
|
83
|
+
export type WsServerMessage = {
|
|
84
|
+
readonly type: "ready";
|
|
85
|
+
readonly conversationId: string;
|
|
86
|
+
} | {
|
|
87
|
+
readonly type: "agent";
|
|
88
|
+
readonly event: AgentEvent;
|
|
89
|
+
} | {
|
|
90
|
+
readonly type: "pong";
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: "error";
|
|
93
|
+
readonly message: string;
|
|
94
|
+
};
|
|
95
|
+
export interface ApiError {
|
|
96
|
+
readonly error: string;
|
|
97
|
+
readonly code?: string;
|
|
98
|
+
}
|
|
99
|
+
export declare class HttpError extends Error {
|
|
100
|
+
readonly status: number;
|
|
101
|
+
readonly code?: string | undefined;
|
|
102
|
+
constructor(status: number, message: string, code?: string | undefined);
|
|
103
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Tipi condivisi del backend della piattaforma vascend-talos.
|
|
2
|
+
// Immutabili per convenzione (come il resto del harness): si creano nuovi
|
|
3
|
+
// oggetti, non si muta. Zero dipendenze a runtime.
|
|
4
|
+
export function toPublicUser(u) {
|
|
5
|
+
return { id: u.id, email: u.email, displayName: u.displayName, createdAt: u.createdAt };
|
|
6
|
+
}
|
|
7
|
+
export function toPublicAsset(a) {
|
|
8
|
+
return {
|
|
9
|
+
id: a.id,
|
|
10
|
+
visionId: a.visionId,
|
|
11
|
+
kind: a.kind,
|
|
12
|
+
name: a.name,
|
|
13
|
+
mime: a.mime,
|
|
14
|
+
size: a.size,
|
|
15
|
+
...(a.snippet !== undefined ? { snippet: a.snippet } : {}),
|
|
16
|
+
...(a.description !== undefined ? { description: a.description } : {}),
|
|
17
|
+
createdAt: a.createdAt,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export class HttpError extends Error {
|
|
21
|
+
status;
|
|
22
|
+
code;
|
|
23
|
+
constructor(status, message, code) {
|
|
24
|
+
super(message);
|
|
25
|
+
this.status = status;
|
|
26
|
+
this.code = code;
|
|
27
|
+
this.name = "HttpError";
|
|
28
|
+
}
|
|
29
|
+
}
|