@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,33 @@
|
|
|
1
|
+
import { type PatchPlan, type PatchPlanDraft, type PatchPlanStatus, type TestStatus } from "./patch-plan.js";
|
|
2
|
+
export declare class VascendPatchPlanStore {
|
|
3
|
+
private readonly file;
|
|
4
|
+
private readonly memory;
|
|
5
|
+
private plans;
|
|
6
|
+
private seq;
|
|
7
|
+
private constructor();
|
|
8
|
+
static open(sessionDir: string, sessionId: string): VascendPatchPlanStore;
|
|
9
|
+
has(planId: string): boolean;
|
|
10
|
+
get(planId: string): PatchPlan | undefined;
|
|
11
|
+
all(): readonly PatchPlan[];
|
|
12
|
+
list(status?: PatchPlanStatus): readonly PatchPlan[];
|
|
13
|
+
nextId(): string;
|
|
14
|
+
create(draft: PatchPlanDraft, opts?: {
|
|
15
|
+
readonly now?: string;
|
|
16
|
+
}): PatchPlan;
|
|
17
|
+
update(planId: string, patch: Partial<Pick<PatchPlan, "goal" | "status" | "files" | "contracts" | "risks" | "tests" | "taskRef">>, opts?: {
|
|
18
|
+
readonly now?: string;
|
|
19
|
+
}): PatchPlan | undefined;
|
|
20
|
+
private transition;
|
|
21
|
+
approve(planId: string): PatchPlan | undefined;
|
|
22
|
+
markApplied(planId: string): PatchPlan | undefined;
|
|
23
|
+
abandon(planId: string): PatchPlan | undefined;
|
|
24
|
+
recordTest(planId: string, testId: string, status: TestStatus, text?: string): PatchPlan | undefined;
|
|
25
|
+
markVerified(planId: string): PatchPlan | undefined;
|
|
26
|
+
remove(planId: string): boolean;
|
|
27
|
+
clear(): void;
|
|
28
|
+
recall(query: string, limit?: number): readonly PatchPlan[];
|
|
29
|
+
private save;
|
|
30
|
+
private persist;
|
|
31
|
+
}
|
|
32
|
+
export { buildPatchPlanBlock, createPatchPlan, isPatchPlanValid, parsePatchPlan, patchPlanSummary, patchPlanToJSON, patchPlanVerification, validatePatchPlan, } from "./patch-plan.js";
|
|
33
|
+
export type { PatchContract, PatchFile, PatchPlan, PatchPlanDraft, PatchPlanStatus, PatchRisk, PatchTest, } from "./patch-plan.js";
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { MemoryStore } from "./memory-store.js";
|
|
4
|
+
import { buildPatchPlanBlock, createPatchPlan, parsePatchPlan, patchPlanSummary, patchPlanToJSON, patchPlanVerification, updatePatchPlan, validatePatchPlan, } from "./patch-plan.js";
|
|
5
|
+
// VascendPatchPlanStore: persiste i Patch Plan per sessione e li proietta sul
|
|
6
|
+
// MemoryStore (dominio "patches") cosi' che siano richiamabili via recall. Si
|
|
7
|
+
// inserisce nel flusso analisi-repo -> recall -> [PATCH PLAN] -> edit -> verify:
|
|
8
|
+
//
|
|
9
|
+
// create() l'agente, prima di editare, dichiara il piano (status draft)
|
|
10
|
+
// approve() il piano e' pronto: si puo' editare (status approved)
|
|
11
|
+
// markApplied() l'edit e' stato fatto (status applied)
|
|
12
|
+
// recordTest() si registra l'esito di un test (passed/failed)
|
|
13
|
+
// markVerified() tutti i test passati: la patch e' verificata (status verified)
|
|
14
|
+
// abandon() il piano e' scartato (status abandoned)
|
|
15
|
+
//
|
|
16
|
+
// File `<sessionId>.patches.json` -> mappa { [planId]: PatchPlan }. Stesso stile
|
|
17
|
+
// di VascendPlanStore/VascendVisionStore: API immutabile, persistenza su
|
|
18
|
+
// mutazione, eventi append-only sul MemoryStore.
|
|
19
|
+
export class VascendPatchPlanStore {
|
|
20
|
+
file;
|
|
21
|
+
memory;
|
|
22
|
+
plans = {};
|
|
23
|
+
seq = 0;
|
|
24
|
+
constructor(file, memory) {
|
|
25
|
+
this.file = file;
|
|
26
|
+
this.memory = memory;
|
|
27
|
+
}
|
|
28
|
+
static open(sessionDir, sessionId) {
|
|
29
|
+
const store = new VascendPatchPlanStore(join(sessionDir, `${sessionId}.patches.json`), MemoryStore.open(sessionDir, sessionId));
|
|
30
|
+
if (existsSync(store.file)) {
|
|
31
|
+
try {
|
|
32
|
+
const raw = JSON.parse(readFileSync(store.file, "utf8"));
|
|
33
|
+
const out = {};
|
|
34
|
+
for (const [planId, val] of Object.entries(raw ?? {})) {
|
|
35
|
+
const parsed = parsePatchPlan(JSON.stringify(val));
|
|
36
|
+
if (parsed)
|
|
37
|
+
out[planId] = { ...parsed, id: parsed.id || planId };
|
|
38
|
+
}
|
|
39
|
+
store.plans = out;
|
|
40
|
+
store.seq = highestSeq(Object.keys(out));
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// file corrotto: si riparte vuoti
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return store;
|
|
47
|
+
}
|
|
48
|
+
// --- lettura ----------------------------------------------------------
|
|
49
|
+
has(planId) {
|
|
50
|
+
return Boolean(this.plans[planId.trim()]);
|
|
51
|
+
}
|
|
52
|
+
get(planId) {
|
|
53
|
+
return this.plans[planId.trim()];
|
|
54
|
+
}
|
|
55
|
+
all() {
|
|
56
|
+
return Object.values(this.plans);
|
|
57
|
+
}
|
|
58
|
+
// Tutti i piani in un dato stato (es. "draft"/"applied"), per la dashboard
|
|
59
|
+
// del flusso (cosa resta da verificare).
|
|
60
|
+
list(status) {
|
|
61
|
+
const out = Object.values(this.plans);
|
|
62
|
+
return status ? out.filter((p) => p.status === status) : out;
|
|
63
|
+
}
|
|
64
|
+
// Genera un id "P<n>" libero (progressivo, non in uso).
|
|
65
|
+
nextId() {
|
|
66
|
+
let n = this.seq + 1;
|
|
67
|
+
while (this.plans[`P${n}`])
|
|
68
|
+
n += 1;
|
|
69
|
+
return `P${n}`;
|
|
70
|
+
}
|
|
71
|
+
// --- creazione + ciclo di vita ---------------------------------------
|
|
72
|
+
// Crea e persiste un nuovo Patch Plan da un draft. Se manca l'id ne genera uno.
|
|
73
|
+
// Status iniziale "draft" salvo diverso. Ritorna il piano salvato.
|
|
74
|
+
create(draft, opts) {
|
|
75
|
+
const id = (draft.id ?? "").trim() || this.nextId();
|
|
76
|
+
const plan = createPatchPlan({ ...draft, id, status: draft.status ?? "draft" }, opts);
|
|
77
|
+
return this.save(plan, "patch.plan.created");
|
|
78
|
+
}
|
|
79
|
+
// Aggiorna immutabilmente un piano con una patch parziale. No-op (undefined)
|
|
80
|
+
// se non esiste.
|
|
81
|
+
update(planId, patch, opts) {
|
|
82
|
+
const cur = this.plans[planId.trim()];
|
|
83
|
+
if (!cur)
|
|
84
|
+
return undefined;
|
|
85
|
+
return this.save(updatePatchPlan(cur, patch, opts), "patch.plan.updated");
|
|
86
|
+
}
|
|
87
|
+
// Transizione di stato sicura (draft->approved->applied->verified, o abandoned).
|
|
88
|
+
// No-op se il piano non esiste.
|
|
89
|
+
transition(planId, status, type) {
|
|
90
|
+
const cur = this.plans[planId.trim()];
|
|
91
|
+
if (!cur)
|
|
92
|
+
return undefined;
|
|
93
|
+
return this.save(updatePatchPlan(cur, { status }), type);
|
|
94
|
+
}
|
|
95
|
+
approve(planId) {
|
|
96
|
+
return this.transition(planId, "approved", "patch.plan.approved");
|
|
97
|
+
}
|
|
98
|
+
markApplied(planId) {
|
|
99
|
+
return this.transition(planId, "applied", "patch.plan.applied");
|
|
100
|
+
}
|
|
101
|
+
abandon(planId) {
|
|
102
|
+
return this.transition(planId, "abandoned", "patch.plan.abandoned");
|
|
103
|
+
}
|
|
104
|
+
// Registra l'esito di un test del piano (per id del test). Se l'id non esiste
|
|
105
|
+
// viene aggiunto. Ritorna il piano aggiornato o undefined se il piano manca.
|
|
106
|
+
recordTest(planId, testId, status, text) {
|
|
107
|
+
const cur = this.plans[planId.trim()];
|
|
108
|
+
if (!cur)
|
|
109
|
+
return undefined;
|
|
110
|
+
const tid = testId.trim();
|
|
111
|
+
let found = false;
|
|
112
|
+
const tests = cur.tests.map((t) => {
|
|
113
|
+
if (t.id.toLowerCase() === tid.toLowerCase()) {
|
|
114
|
+
found = true;
|
|
115
|
+
return { ...t, status, ...(text ? { text } : {}) };
|
|
116
|
+
}
|
|
117
|
+
return t;
|
|
118
|
+
});
|
|
119
|
+
if (!found)
|
|
120
|
+
tests.push({ id: tid || `T${cur.tests.length + 1}`, text: text ?? tid, status });
|
|
121
|
+
return this.save(updatePatchPlan(cur, { tests }), "patch.plan.test");
|
|
122
|
+
}
|
|
123
|
+
// Marca il piano "verified" SOLO se tutti i suoi test sono passati (e ne
|
|
124
|
+
// esiste almeno uno). Se i test non sono tutti passati ritorna il piano
|
|
125
|
+
// invariato (non lo promuove). Undefined se il piano non esiste.
|
|
126
|
+
markVerified(planId) {
|
|
127
|
+
const cur = this.plans[planId.trim()];
|
|
128
|
+
if (!cur)
|
|
129
|
+
return undefined;
|
|
130
|
+
if (!patchPlanVerification(cur).verified)
|
|
131
|
+
return cur;
|
|
132
|
+
return this.transition(planId, "verified", "patch.plan.verified");
|
|
133
|
+
}
|
|
134
|
+
remove(planId) {
|
|
135
|
+
const id = planId.trim();
|
|
136
|
+
if (!this.plans[id])
|
|
137
|
+
return false;
|
|
138
|
+
const { [id]: _drop, ...rest } = this.plans;
|
|
139
|
+
this.plans = rest;
|
|
140
|
+
this.persist();
|
|
141
|
+
this.memory.append({
|
|
142
|
+
type: "patch.plan.removed",
|
|
143
|
+
domain: "patches",
|
|
144
|
+
subject: id,
|
|
145
|
+
summary: `Patch Plan rimosso: ${id}`,
|
|
146
|
+
body: "",
|
|
147
|
+
terms: [id, "patch", "plan", "rimosso"],
|
|
148
|
+
payload: { planId: id },
|
|
149
|
+
});
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
clear() {
|
|
153
|
+
this.plans = {};
|
|
154
|
+
this.seq = 0;
|
|
155
|
+
try {
|
|
156
|
+
if (existsSync(this.file))
|
|
157
|
+
rmSync(this.file);
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
// best effort
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// --- recall + persistenza --------------------------------------------
|
|
164
|
+
// Recupera i piani richiamabili via ricerca testuale sul MemoryStore (vista
|
|
165
|
+
// derivata dal dominio "patches"). Ritorna i piani corrispondenti agli eventi
|
|
166
|
+
// trovati, piu' recenti prima, deduplicati per id.
|
|
167
|
+
recall(query, limit = 5) {
|
|
168
|
+
const hits = this.memory.search(query, { domain: "patches", limit: limit * 3 });
|
|
169
|
+
const seen = new Set();
|
|
170
|
+
const out = [];
|
|
171
|
+
for (const hit of hits) {
|
|
172
|
+
const planId = String(hit.event.payload?.plan?.id ?? hit.event.subject).trim();
|
|
173
|
+
if (!planId || seen.has(planId))
|
|
174
|
+
continue;
|
|
175
|
+
seen.add(planId);
|
|
176
|
+
const plan = this.plans[planId];
|
|
177
|
+
if (plan)
|
|
178
|
+
out.push(plan);
|
|
179
|
+
if (out.length >= limit)
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
save(plan, type) {
|
|
185
|
+
const id = plan.id.trim();
|
|
186
|
+
this.plans = { ...this.plans, [id]: { ...plan, id } };
|
|
187
|
+
this.seq = Math.max(this.seq, seqOf(id));
|
|
188
|
+
this.persist();
|
|
189
|
+
this.memory.append(patchEvent(type, this.plans[id]));
|
|
190
|
+
return this.plans[id];
|
|
191
|
+
}
|
|
192
|
+
persist() {
|
|
193
|
+
mkdirSync(dirname(this.file), { recursive: true });
|
|
194
|
+
const ordered = {};
|
|
195
|
+
for (const [id, p] of Object.entries(this.plans)) {
|
|
196
|
+
ordered[id] = JSON.parse(patchPlanToJSON(p));
|
|
197
|
+
}
|
|
198
|
+
writeFileSync(this.file, JSON.stringify(ordered, null, 2) + "\n", "utf8");
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// --- helper interni -----------------------------------------------------
|
|
202
|
+
function seqOf(id) {
|
|
203
|
+
const m = /^P(\d+)$/i.exec(id.trim());
|
|
204
|
+
return m ? Number(m[1]) : 0;
|
|
205
|
+
}
|
|
206
|
+
function highestSeq(ids) {
|
|
207
|
+
return ids.reduce((max, id) => Math.max(max, seqOf(id)), 0);
|
|
208
|
+
}
|
|
209
|
+
// Evento di memoria per un Patch Plan: indicizzato sui termini di goal, file,
|
|
210
|
+
// contratti, rischi e test cosi' che recall lo trovi per qualunque di questi.
|
|
211
|
+
function patchEvent(type, plan) {
|
|
212
|
+
const sum = patchPlanSummary(plan);
|
|
213
|
+
const terms = [
|
|
214
|
+
plan.id,
|
|
215
|
+
plan.status,
|
|
216
|
+
...plan.goal.split(/\s+/),
|
|
217
|
+
...plan.files.flatMap((f) => [f.path, f.kind]),
|
|
218
|
+
...plan.contracts.flatMap((c) => [c.id, c.name, c.impact]),
|
|
219
|
+
...plan.risks.flatMap((r) => [r.id, r.severity]),
|
|
220
|
+
...plan.tests.flatMap((t) => [t.id, t.status]),
|
|
221
|
+
"patch", "plan",
|
|
222
|
+
];
|
|
223
|
+
return {
|
|
224
|
+
type,
|
|
225
|
+
domain: "patches",
|
|
226
|
+
subject: plan.id,
|
|
227
|
+
summary: `[${plan.status}] ${plan.goal}`,
|
|
228
|
+
body: buildPatchPlanBlock(plan),
|
|
229
|
+
terms,
|
|
230
|
+
links: [
|
|
231
|
+
...(plan.taskRef ? [{ rel: "for", target: plan.taskRef, domain: "plan" }] : []),
|
|
232
|
+
...plan.files.map((f) => ({ rel: "touches", target: f.path, domain: "files" })),
|
|
233
|
+
...plan.contracts.map((c) => ({ rel: c.impact, target: c.name, domain: "patches" })),
|
|
234
|
+
...plan.tests.map((t) => ({ rel: "verified_by", target: t.id, domain: "patches" })),
|
|
235
|
+
],
|
|
236
|
+
payload: { plan, summary: sum },
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// Riesporta il modello per comodita' dei consumatori (un solo import).
|
|
240
|
+
export { buildPatchPlanBlock, createPatchPlan, isPatchPlanValid, parsePatchPlan, patchPlanSummary, patchPlanToJSON, patchPlanVerification, validatePatchPlan, } from "./patch-plan.js";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export type PatchPlanStatus = "draft" | "approved" | "applied" | "verified" | "abandoned";
|
|
2
|
+
export type RiskSeverity = "low" | "medium" | "high";
|
|
3
|
+
export type TestStatus = "pending" | "passed" | "failed";
|
|
4
|
+
export type FileChangeKind = "create" | "modify" | "delete" | "rename";
|
|
5
|
+
export interface PatchFile {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly kind: FileChangeKind;
|
|
8
|
+
readonly reason?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PatchContract {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly impact: "uses" | "changes" | "breaks";
|
|
14
|
+
readonly note?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PatchRisk {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly text: string;
|
|
19
|
+
readonly severity: RiskSeverity;
|
|
20
|
+
readonly mitigation?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PatchTest {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly text: string;
|
|
25
|
+
readonly status: TestStatus;
|
|
26
|
+
}
|
|
27
|
+
export interface PatchPlan {
|
|
28
|
+
readonly version: 1;
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly taskRef?: string;
|
|
31
|
+
readonly goal: string;
|
|
32
|
+
readonly status: PatchPlanStatus;
|
|
33
|
+
readonly files: readonly PatchFile[];
|
|
34
|
+
readonly contracts: readonly PatchContract[];
|
|
35
|
+
readonly risks: readonly PatchRisk[];
|
|
36
|
+
readonly tests: readonly PatchTest[];
|
|
37
|
+
readonly createdAt: string;
|
|
38
|
+
readonly updatedAt: string;
|
|
39
|
+
}
|
|
40
|
+
export interface PatchPlanDraft {
|
|
41
|
+
readonly id?: string;
|
|
42
|
+
readonly taskRef?: string;
|
|
43
|
+
readonly goal: string;
|
|
44
|
+
readonly status?: PatchPlanStatus;
|
|
45
|
+
readonly files?: ReadonlyArray<Partial<PatchFile> & {
|
|
46
|
+
readonly path: string;
|
|
47
|
+
}>;
|
|
48
|
+
readonly contracts?: ReadonlyArray<Partial<PatchContract> & {
|
|
49
|
+
readonly name: string;
|
|
50
|
+
}>;
|
|
51
|
+
readonly risks?: ReadonlyArray<Partial<PatchRisk> & {
|
|
52
|
+
readonly text: string;
|
|
53
|
+
}>;
|
|
54
|
+
readonly tests?: ReadonlyArray<Partial<PatchTest> & {
|
|
55
|
+
readonly text: string;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
export declare const PATCH_PLAN_SCHEMA_VERSION: 1;
|
|
59
|
+
export interface PatchPlanIssue {
|
|
60
|
+
readonly field: string;
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}
|
|
63
|
+
export declare function validatePatchPlan(p: PatchPlan): readonly PatchPlanIssue[];
|
|
64
|
+
export declare function isPatchPlanValid(p: PatchPlan): boolean;
|
|
65
|
+
export declare function createPatchPlan(draft: PatchPlanDraft, opts?: {
|
|
66
|
+
readonly now?: string;
|
|
67
|
+
readonly id?: string;
|
|
68
|
+
}): PatchPlan;
|
|
69
|
+
export declare function parsePatchPlan(text: string, opts?: {
|
|
70
|
+
readonly now?: string;
|
|
71
|
+
}): PatchPlan | null;
|
|
72
|
+
export declare function updatePatchPlan(p: PatchPlan, patch: Partial<Pick<PatchPlan, "goal" | "status" | "files" | "contracts" | "risks" | "tests" | "taskRef">>, opts?: {
|
|
73
|
+
readonly now?: string;
|
|
74
|
+
}): PatchPlan;
|
|
75
|
+
export declare function patchPlanToJSON(p: PatchPlan): string;
|
|
76
|
+
export declare function patchPlanFromJSON(json: string, opts?: {
|
|
77
|
+
readonly now?: string;
|
|
78
|
+
}): PatchPlan | null;
|
|
79
|
+
export interface PatchPlanSummary {
|
|
80
|
+
readonly files: number;
|
|
81
|
+
readonly contracts: number;
|
|
82
|
+
readonly breakingContracts: number;
|
|
83
|
+
readonly risks: number;
|
|
84
|
+
readonly highRisks: number;
|
|
85
|
+
readonly tests: number;
|
|
86
|
+
readonly testsPassed: number;
|
|
87
|
+
}
|
|
88
|
+
export declare function patchPlanSummary(p: PatchPlan): PatchPlanSummary;
|
|
89
|
+
export interface PatchPlanVerification {
|
|
90
|
+
readonly ratio: number;
|
|
91
|
+
readonly verified: boolean;
|
|
92
|
+
readonly testsPassed: number;
|
|
93
|
+
readonly testsTotal: number;
|
|
94
|
+
readonly testsFailed: number;
|
|
95
|
+
}
|
|
96
|
+
export declare function patchPlanVerification(p: PatchPlan): PatchPlanVerification;
|
|
97
|
+
export declare function buildPatchPlanBlock(p: PatchPlan): string;
|