talos-code 0.0.1 → 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/LICENSE +661 -0
- package/README.md +111 -3
- package/THIRD_PARTY_NOTICES.md +40 -0
- package/dist/archive/zip.js +73 -0
- package/dist/args.js +97 -0
- package/dist/automations/history-store.js +34 -0
- package/dist/automations/policy-store.js +43 -0
- package/dist/automations/runner.js +107 -0
- package/dist/automations/schedule.js +85 -0
- package/dist/automations/windows-task.js +53 -0
- package/dist/commands/advanced-cli.js +233 -0
- package/dist/commands/checkpoint-cli.js +45 -0
- package/dist/commands/config-cli.js +107 -0
- package/dist/commands/context.js +17 -0
- package/dist/commands/extensions-cli.js +207 -0
- package/dist/commands/project-cli.js +74 -0
- package/dist/commands/project-commands.js +143 -0
- package/dist/commands/provider-cli.js +185 -0
- package/dist/commands/services-cli.js +248 -0
- package/dist/commands/session-cli.js +171 -0
- package/dist/commands/system-cli.js +405 -0
- package/dist/config/commands.js +60 -0
- package/dist/config/load.js +382 -0
- package/dist/config/migrations.js +48 -0
- package/dist/config/types.js +11 -0
- package/dist/diagnostics/development-log.js +154 -0
- package/dist/diagnostics/doctor.js +104 -0
- package/dist/diagnostics/redact.js +80 -0
- package/dist/diagnostics/zip.js +52 -0
- package/dist/errors.js +156 -0
- package/dist/events/bridge.js +130 -0
- package/dist/extensions/installer.js +178 -0
- package/dist/extensions/package-schema.js +24 -0
- package/dist/headless/result.js +84 -0
- package/dist/headless/run.js +230 -0
- package/dist/i18n/en/approval.js +43 -0
- package/dist/i18n/en/common.js +9 -0
- package/dist/i18n/en/credentials.js +82 -0
- package/dist/i18n/en/errors.js +246 -0
- package/dist/i18n/en/firstrun.js +89 -0
- package/dist/i18n/en/providers.js +37 -0
- package/dist/i18n/en/screen.js +736 -0
- package/dist/i18n/en/tools.js +127 -0
- package/dist/i18n/en.js +14 -0
- package/dist/i18n/error-view.js +307 -0
- package/dist/i18n/index.js +19 -0
- package/dist/i18n/kernel-map.js +139 -0
- package/dist/io.js +45 -0
- package/dist/main.js +330 -0
- package/dist/paths.js +41 -0
- package/dist/protocol/v2/codec.js +9 -0
- package/dist/protocol/v2/events.js +555 -0
- package/dist/protocol/v2/index.js +4 -0
- package/dist/protocol/v2/replay.js +28 -0
- package/dist/protocol/v2/types.js +1 -0
- package/dist/provider/control-plane.js +135 -0
- package/dist/provider/environment-keys.js +275 -0
- package/dist/provider/health.js +110 -0
- package/dist/provider/missing-key.js +48 -0
- package/dist/provider/model-catalog.js +168 -0
- package/dist/provider/provider-text.js +13 -0
- package/dist/provider/store.js +95 -0
- package/dist/provider/system-keyring.js +214 -0
- package/dist/runtime/active-run.js +63 -0
- package/dist/runtime/agent-tree.js +74 -0
- package/dist/runtime/attachments.js +84 -0
- package/dist/runtime/brokered-executor.js +395 -0
- package/dist/runtime/context-status.js +76 -0
- package/dist/runtime/create-runtime.js +111 -0
- package/dist/runtime/model-profile.js +361 -0
- package/dist/runtime/output-store.js +137 -0
- package/dist/runtime/provider-attempts.js +185 -0
- package/dist/runtime/replay-buffer.js +153 -0
- package/dist/runtime/repo.js +95 -0
- package/dist/runtime/session-facade.js +135 -0
- package/dist/runtime/session-summary.js +125 -0
- package/dist/runtime/supervisor.js +262 -0
- package/dist/runtime/talos-composition.js +1006 -0
- package/dist/runtime/types.js +5 -0
- package/dist/runtime/usage-snapshot.js +82 -0
- package/dist/security/auto-classifier.js +38 -0
- package/dist/security/credential-free-environment.js +54 -0
- package/dist/security/evaluate.js +243 -0
- package/dist/security/execution-backends.js +236 -0
- package/dist/security/execution-broker.js +102 -0
- package/dist/security/forge-scan.js +74 -0
- package/dist/security/from-approval.js +39 -0
- package/dist/security/mxc-execution-backend.js +281 -0
- package/dist/security/permission-engine.js +138 -0
- package/dist/security/permission-explanation.js +54 -0
- package/dist/security/persist.js +179 -0
- package/dist/security/plugin-guard.js +230 -0
- package/dist/security/process-tree-evidence-store.js +74 -0
- package/dist/security/process-tree-probe.js +554 -0
- package/dist/security/project-resource-inventory.js +186 -0
- package/dist/security/project-trust-gate.js +38 -0
- package/dist/security/project-trust.js +367 -0
- package/dist/security/rule-parser.js +201 -0
- package/dist/security/shell-segmentation.js +68 -0
- package/dist/security/trust-authority.js +324 -0
- package/dist/security/types.js +1 -0
- package/dist/security/workspace-identity.js +102 -0
- package/dist/services/automation-facade.js +59 -0
- package/dist/services/forge-facade.js +77 -0
- package/dist/services/hook-facade.js +240 -0
- package/dist/services/index.js +16 -0
- package/dist/services/library-facade.js +174 -0
- package/dist/services/mcp-facade.js +348 -0
- package/dist/services/memory-facade.js +126 -0
- package/dist/services/notes-facade.js +157 -0
- package/dist/services/plugin-facade.js +308 -0
- package/dist/services/research-facade.js +110 -0
- package/dist/services/task-board-facade.js +236 -0
- package/dist/services/workflow-catalog.js +246 -0
- package/dist/sessions/export-format.js +98 -0
- package/dist/sessions/metadata-store.js +160 -0
- package/dist/sessions/share.js +122 -0
- package/dist/sessions/transfer.js +16 -0
- package/dist/subcommands.js +62 -0
- package/dist/tui/agent-roster.js +36 -0
- package/dist/tui/app.js +3761 -0
- package/dist/tui/approval.js +36 -0
- package/dist/tui/boot/boot-sequence.js +76 -0
- package/dist/tui/boot/cinematic.js +243 -0
- package/dist/tui/boot/desktop-logo.js +82 -0
- package/dist/tui/boot.js +3 -0
- package/dist/tui/busy-input.js +58 -0
- package/dist/tui/catalog-service.js +559 -0
- package/dist/tui/components/assistant-stream.js +1 -0
- package/dist/tui/components/command-menu.js +68 -0
- package/dist/tui/components/composer.js +219 -0
- package/dist/tui/components/diff.js +35 -0
- package/dist/tui/components/footer.js +48 -0
- package/dist/tui/components/header.js +6 -0
- package/dist/tui/components/markdown.js +305 -0
- package/dist/tui/components/status-indicator.js +32 -0
- package/dist/tui/components/terminal-shell.js +205 -0
- package/dist/tui/components/thinking-row.js +19 -0
- package/dist/tui/components/tool-row.js +97 -0
- package/dist/tui/components/transcript-virtualizer.js +165 -0
- package/dist/tui/components/transcript.js +43 -0
- package/dist/tui/diff-model.js +77 -0
- package/dist/tui/editor-history.js +21 -0
- package/dist/tui/editor.js +210 -0
- package/dist/tui/event-adapter.js +436 -0
- package/dist/tui/exit-output.js +58 -0
- package/dist/tui/external-editor.js +53 -0
- package/dist/tui/file-completion.js +89 -0
- package/dist/tui/focus-manager.js +5 -0
- package/dist/tui/highlight.js +30 -0
- package/dist/tui/input-router.js +18 -0
- package/dist/tui/interrupt.js +99 -0
- package/dist/tui/keybindings.js +194 -0
- package/dist/tui/keymap-resolver.js +91 -0
- package/dist/tui/launch-state.js +139 -0
- package/dist/tui/line-diff.js +57 -0
- package/dist/tui/live-activity.js +45 -0
- package/dist/tui/metrics.js +123 -0
- package/dist/tui/onboarding.js +36 -0
- package/dist/tui/overlays/agent-tree.js +39 -0
- package/dist/tui/overlays/approval-dialog.js +640 -0
- package/dist/tui/overlays/automation-center.js +51 -0
- package/dist/tui/overlays/checkpoint-picker.js +47 -0
- package/dist/tui/overlays/context-inspector.js +36 -0
- package/dist/tui/overlays/effort-line.js +110 -0
- package/dist/tui/overlays/forge-center.js +46 -0
- package/dist/tui/overlays/help-dialog.js +16 -0
- package/dist/tui/overlays/history-picker.js +37 -0
- package/dist/tui/overlays/hook-center.js +70 -0
- package/dist/tui/overlays/library-center.js +55 -0
- package/dist/tui/overlays/mcp-center.js +60 -0
- package/dist/tui/overlays/memory-center.js +63 -0
- package/dist/tui/overlays/model-picker.js +72 -0
- package/dist/tui/overlays/notes-center.js +53 -0
- package/dist/tui/overlays/overlay-host.js +8 -0
- package/dist/tui/overlays/plugin-center.js +76 -0
- package/dist/tui/overlays/provider-picker.js +145 -0
- package/dist/tui/overlays/queue-editor.js +32 -0
- package/dist/tui/overlays/research-center.js +59 -0
- package/dist/tui/overlays/scroll-window.js +234 -0
- package/dist/tui/overlays/session-picker.js +115 -0
- package/dist/tui/overlays/tasks-center.js +83 -0
- package/dist/tui/overlays/theme-picker.js +21 -0
- package/dist/tui/overlays/transcript-search.js +58 -0
- package/dist/tui/overlays/trust-center.js +29 -0
- package/dist/tui/overlays/workflow-center.js +46 -0
- package/dist/tui/project-file-index.js +214 -0
- package/dist/tui/project-references.js +85 -0
- package/dist/tui/project-trust-prompt.js +287 -0
- package/dist/tui/prompt-history-store.js +116 -0
- package/dist/tui/queue-store.js +110 -0
- package/dist/tui/regions/budget.js +59 -0
- package/dist/tui/regions/views.js +96 -0
- package/dist/tui/render-coordinator.js +148 -0
- package/dist/tui/render-scheduler.js +4 -0
- package/dist/tui/run.js +69 -0
- package/dist/tui/selection-list.js +29 -0
- package/dist/tui/session-controller.js +778 -0
- package/dist/tui/session-export.js +54 -0
- package/dist/tui/shell-input.js +35 -0
- package/dist/tui/shell-layout.js +48 -0
- package/dist/tui/shell-model.js +98 -0
- package/dist/tui/slash-commands.js +80 -0
- package/dist/tui/state.js +151 -0
- package/dist/tui/status-bar.js +125 -0
- package/dist/tui/status-view.js +40 -0
- package/dist/tui/terminal-capabilities.js +9 -0
- package/dist/tui/terminal-session.js +11 -0
- package/dist/tui/text-width.js +66 -0
- package/dist/tui/theme-catalog.js +25 -0
- package/dist/tui/theme-store.js +23 -0
- package/dist/tui/theme.js +23 -0
- package/dist/tui/tool-display.js +135 -0
- package/dist/tui/tool-facts.js +1 -0
- package/dist/tui/tools/bash-renderer.js +32 -0
- package/dist/tui/tools/change.js +61 -0
- package/dist/tui/tools/edit-renderer.js +17 -0
- package/dist/tui/tools/generic-renderer.js +13 -0
- package/dist/tui/tools/list-renderer.js +14 -0
- package/dist/tui/tools/read-renderer.js +13 -0
- package/dist/tui/tools/registry.js +20 -0
- package/dist/tui/tools/row-format.js +187 -0
- package/dist/tui/tools/search-renderer.js +38 -0
- package/dist/tui/tools/shared.js +97 -0
- package/dist/tui/tools/write-renderer.js +15 -0
- package/dist/tui/transcript-model.js +441 -0
- package/dist/tui/ui-preferences.js +79 -0
- package/dist/tui/usage-view.js +77 -0
- package/dist/tui/vim-mode.js +99 -0
- package/dist/update/check.js +15 -0
- package/dist/update/npm.js +51 -0
- package/dist/update/run.js +129 -0
- package/dist/version.js +2 -0
- package/dist/workspace/checkpoint-store.js +210 -0
- package/dist/workspace/checkpoint.js +413 -0
- package/dist/workspace/restore.js +232 -0
- package/package.json +63 -5
- package/vendor/context-engine/package.json +11 -0
- package/vendor/context-engine/src/compaction-planner.mjs +57 -0
- package/vendor/context-engine/src/contracts.mjs +48 -0
- package/vendor/context-engine/src/engine.mjs +445 -0
- package/vendor/context-engine/src/node/context-export.mjs +164 -0
- package/vendor/context-engine/src/node/legacy-import.mjs +92 -0
- package/vendor/context-engine/src/node/migrations/001-context.sql +126 -0
- package/vendor/context-engine/src/node/sqlite-store.mjs +85 -0
- package/vendor/context-engine/src/node/sqlite-worker.mjs +559 -0
- package/vendor/context-engine/src/profiles.mjs +10 -0
- package/vendor/context-engine/src/retrieval.mjs +104 -0
- package/vendor/context-engine/src/summary.mjs +97 -0
- package/vendor/context-engine/src/usage.mjs +34 -0
- package/vendor/harness-ui/package.json +38 -0
- package/vendor/harness-ui/src/acp-agent.mjs +350 -0
- package/vendor/harness-ui/src/agent-service.mjs +2188 -0
- package/vendor/harness-ui/src/agui-events.mjs +452 -0
- package/vendor/harness-ui/src/ambiente-solo-server.mjs +121 -0
- package/vendor/harness-ui/src/artifact-store.mjs +39 -0
- package/vendor/harness-ui/src/assistenza.mjs +123 -0
- package/vendor/harness-ui/src/automation-scheduler.mjs +69 -0
- package/vendor/harness-ui/src/automation-store.mjs +145 -0
- package/vendor/harness-ui/src/browser-annota.mjs +639 -0
- package/vendor/harness-ui/src/browser-frame.mjs +211 -0
- package/vendor/harness-ui/src/browser-proxy-universale.mjs +519 -0
- package/vendor/harness-ui/src/browser-proxy.mjs +87 -0
- package/vendor/harness-ui/src/browser-sessione-viva.mjs +329 -0
- package/vendor/harness-ui/src/browser-stream.mjs +445 -0
- package/vendor/harness-ui/src/browser-vivo.mjs +694 -0
- package/vendor/harness-ui/src/chat-image-attachments.mjs +72 -0
- package/vendor/harness-ui/src/config.mjs +697 -0
- package/vendor/harness-ui/src/contesto-del-progetto.mjs +385 -0
- package/vendor/harness-ui/src/context-asset-adapter.mjs +72 -0
- package/vendor/harness-ui/src/context-desktop-service.mjs +253 -0
- package/vendor/harness-ui/src/context-embedding-runtime.mjs +252 -0
- package/vendor/harness-ui/src/context-inference-scheduler.mjs +81 -0
- package/vendor/harness-ui/src/context-native-compaction.mjs +75 -0
- package/vendor/harness-ui/src/context-provider-adapter.mjs +141 -0
- package/vendor/harness-ui/src/context-runtime.mjs +118 -0
- package/vendor/harness-ui/src/context-token-counters.mjs +184 -0
- package/vendor/harness-ui/src/context-tool-catalog.mjs +86 -0
- package/vendor/harness-ui/src/context-tool-output.mjs +72 -0
- package/vendor/harness-ui/src/costo-elenco.mjs +252 -0
- package/vendor/harness-ui/src/custom-task.mjs +171 -0
- package/vendor/harness-ui/src/doctor.mjs +142 -0
- package/vendor/harness-ui/src/document-filename.mjs +97 -0
- package/vendor/harness-ui/src/document-generator.mjs +493 -0
- package/vendor/harness-ui/src/document-report.mjs +331 -0
- package/vendor/harness-ui/src/duckduckgo-search.mjs +155 -0
- package/vendor/harness-ui/src/elenco-profondo.mjs +337 -0
- package/vendor/harness-ui/src/favicon-proxy.mjs +113 -0
- package/vendor/harness-ui/src/forge-contract.mjs +221 -0
- package/vendor/harness-ui/src/frequent-dirs.mjs +134 -0
- package/vendor/harness-ui/src/generated-image-store.mjs +147 -0
- package/vendor/harness-ui/src/generation-idle.mjs +332 -0
- package/vendor/harness-ui/src/gguf-header.mjs +207 -0
- package/vendor/harness-ui/src/git-service.mjs +626 -0
- package/vendor/harness-ui/src/gitignore-elenco.mjs +604 -0
- package/vendor/harness-ui/src/harness-receipt-keypair.mjs +207 -0
- package/vendor/harness-ui/src/hf-direct-transfer.mjs +170 -0
- package/vendor/harness-ui/src/hf-hub-client.mjs +106 -0
- package/vendor/harness-ui/src/hf-image-proxy.mjs +105 -0
- package/vendor/harness-ui/src/hf-model-transfer.mjs +245 -0
- package/vendor/harness-ui/src/hook-registry.mjs +186 -0
- package/vendor/harness-ui/src/http-app.mjs +6259 -0
- package/vendor/harness-ui/src/http-lifecycle.mjs +132 -0
- package/vendor/harness-ui/src/id-archivio.mjs +27 -0
- package/vendor/harness-ui/src/image-generator.mjs +143 -0
- package/vendor/harness-ui/src/istruzioni-di-progetto.mjs +234 -0
- package/vendor/harness-ui/src/kernel/dist/kernelPerIlBanco.js +518 -0
- package/vendor/harness-ui/src/kernel/talosHarness.mjs +10437 -0
- package/vendor/harness-ui/src/library-policy-store.mjs +175 -0
- package/vendor/harness-ui/src/library-store.mjs +652 -0
- package/vendor/harness-ui/src/llama-server-supervisor.mjs +629 -0
- package/vendor/harness-ui/src/local-model-store.mjs +339 -0
- package/vendor/harness-ui/src/local-runtime-contract.mjs +66 -0
- package/vendor/harness-ui/src/local-runtime-events.mjs +44 -0
- package/vendor/harness-ui/src/local-runtime-llama-server.mjs +244 -0
- package/vendor/harness-ui/src/local-runtime-probe.mjs +401 -0
- package/vendor/harness-ui/src/machine-capacity.mjs +66 -0
- package/vendor/harness-ui/src/mappa-cartelle.mjs +491 -0
- package/vendor/harness-ui/src/mcp-client.mjs +98 -0
- package/vendor/harness-ui/src/mcp-registry.mjs +157 -0
- package/vendor/harness-ui/src/mcp-session.mjs +177 -0
- package/vendor/harness-ui/src/memory-store.mjs +227 -0
- package/vendor/harness-ui/src/model-catalog-models-dev.mjs +276 -0
- package/vendor/harness-ui/src/model-catalog.mjs +129 -0
- package/vendor/harness-ui/src/model-destination.mjs +189 -0
- package/vendor/harness-ui/src/modifica-ancorata.mjs +177 -0
- package/vendor/harness-ui/src/native-provider-adapter.mjs +205 -0
- package/vendor/harness-ui/src/notes-store.mjs +250 -0
- package/vendor/harness-ui/src/openai-compatible-runtime.mjs +428 -0
- package/vendor/harness-ui/src/openrouter-oauth.mjs +339 -0
- package/vendor/harness-ui/src/path-policy.mjs +442 -0
- package/vendor/harness-ui/src/plugin-registry.mjs +780 -0
- package/vendor/harness-ui/src/plugin-session.mjs +180 -0
- package/vendor/harness-ui/src/process-policy.mjs +345 -0
- package/vendor/harness-ui/src/prompt-enhancer-provider.mjs +94 -0
- package/vendor/harness-ui/src/provider-auth-cloud.mjs +95 -0
- package/vendor/harness-ui/src/provider-credential-store.mjs +541 -0
- package/vendor/harness-ui/src/provider-probe.mjs +582 -0
- package/vendor/harness-ui/src/provider-registry.mjs +1633 -0
- package/vendor/harness-ui/src/pty-terminal.mjs +312 -0
- package/vendor/harness-ui/src/public-problem.mjs +109 -0
- package/vendor/harness-ui/src/research/card.mjs +235 -0
- package/vendor/harness-ui/src/research/citations.mjs +142 -0
- package/vendor/harness-ui/src/research/collector.mjs +275 -0
- package/vendor/harness-ui/src/research/deposito-a-pezzi.mjs +139 -0
- package/vendor/harness-ui/src/research/dossier.mjs +114 -0
- package/vendor/harness-ui/src/research/esportazioni.mjs +560 -0
- package/vendor/harness-ui/src/research/fetch-cache.mjs +465 -0
- package/vendor/harness-ui/src/research/fidelity.mjs +122 -0
- package/vendor/harness-ui/src/research/independence.mjs +159 -0
- package/vendor/harness-ui/src/research/ledger.mjs +166 -0
- package/vendor/harness-ui/src/research/markdown-server.mjs +565 -0
- package/vendor/harness-ui/src/research/narration.mjs +181 -0
- package/vendor/harness-ui/src/research/open-cards.mjs +131 -0
- package/vendor/harness-ui/src/research/opposing.mjs +305 -0
- package/vendor/harness-ui/src/research/outline.mjs +111 -0
- package/vendor/harness-ui/src/research/page-budget.mjs +209 -0
- package/vendor/harness-ui/src/research/pdf.mjs +291 -0
- package/vendor/harness-ui/src/research/plan.mjs +301 -0
- package/vendor/harness-ui/src/research/raccolta-viva.mjs +452 -0
- package/vendor/harness-ui/src/research/recheck-document.mjs +69 -0
- package/vendor/harness-ui/src/research/recheck-history.mjs +192 -0
- package/vendor/harness-ui/src/research/recheck.mjs +194 -0
- package/vendor/harness-ui/src/research/report.mjs +203 -0
- package/vendor/harness-ui/src/research/run.mjs +527 -0
- package/vendor/harness-ui/src/research/synthesis.mjs +318 -0
- package/vendor/harness-ui/src/research/verification.mjs +572 -0
- package/vendor/harness-ui/src/research-orchestrator.mjs +2679 -0
- package/vendor/harness-ui/src/research-store.mjs +1133 -0
- package/vendor/harness-ui/src/runtime-build-manifest.mjs +26 -0
- package/vendor/harness-ui/src/runtime-contract.mjs +59 -0
- package/vendor/harness-ui/src/runtime-owner-adapter.mjs +1348 -0
- package/vendor/harness-ui/src/runtime-owner-contract.mjs +32 -0
- package/vendor/harness-ui/src/scheda-di-lavoro.mjs +249 -0
- package/vendor/harness-ui/src/search-source-store.mjs +172 -0
- package/vendor/harness-ui/src/session-registry.mjs +6095 -0
- package/vendor/harness-ui/src/session-store.mjs +220 -0
- package/vendor/harness-ui/src/sessione-pronta.mjs +73 -0
- package/vendor/harness-ui/src/setup-stato.mjs +31 -0
- package/vendor/harness-ui/src/sezioni-istruzioni.mjs +204 -0
- package/vendor/harness-ui/src/skill-registry.mjs +120 -0
- package/vendor/harness-ui/src/sse-replay-coalescente.mjs +0 -0
- package/vendor/harness-ui/src/static-files.mjs +96 -0
- package/vendor/harness-ui/src/stream-partition.mjs +123 -0
- package/vendor/harness-ui/src/subagent-orchestrator.mjs +453 -0
- package/vendor/harness-ui/src/task-catalog.mjs +65 -0
- package/vendor/harness-ui/src/tasks-store.mjs +220 -0
- package/vendor/harness-ui/src/terminal-registry.mjs +312 -0
- package/vendor/harness-ui/src/terminal-ws.mjs +170 -0
- package/vendor/harness-ui/src/tool-forge-store.mjs +299 -0
- package/vendor/harness-ui/src/tool-schema-normalize.mjs +100 -0
- package/vendor/harness-ui/src/usage-cache.mjs +315 -0
- package/vendor/harness-ui/src/workspace-browser.mjs +213 -0
- package/vendor/harness-ui/src/workspace-context.mjs +124 -0
- package/vendor/harness-ui/src/workspace-disk.mjs +62 -0
- package/vendor/harness-ui/src/workspace-files.mjs +589 -0
- package/vendor/harness-ui/src/workspace-info.mjs +189 -0
- package/vendor/harness-ui/src/workspace-launch-store.mjs +150 -0
- package/vendor/harness-ui/src/workspace-tree.mjs +67 -0
- package/vendor/harness-ui/src/workspace-watcher.mjs +161 -0
- package/vendor/manifest.json +170 -0
package/package.json
CHANGED
|
@@ -1,9 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "talos-code",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "TALOS
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TALOS in the terminal: a coding agent with per-tool permissions, file checkpoints and resumable sessions, on the model you choose.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"coding-agent",
|
|
7
|
+
"cli",
|
|
8
|
+
"terminal",
|
|
9
|
+
"llm",
|
|
10
|
+
"ai",
|
|
11
|
+
"agent"
|
|
12
|
+
],
|
|
7
13
|
"license": "AGPL-3.0-only",
|
|
8
|
-
"
|
|
14
|
+
"type": "module",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=24.18.0 <25"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"talos": "dist/main.js"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc -p tsconfig.json",
|
|
23
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
24
|
+
"test": "node scripts/run-tests.mjs \"test/**/*.test.ts\"",
|
|
25
|
+
"test:local": "node scripts/run-tests.mjs \"test/**/*.test.ts\"",
|
|
26
|
+
"test:tui": "node scripts/run-tests.mjs \"test/tui/**/*.test.ts\"",
|
|
27
|
+
"test:acceptance": "npm run build && node scripts/run-tests.mjs --test-concurrency=1 --test-timeout=300000 \"test/acceptance/**/*.scenario.ts\"",
|
|
28
|
+
"prepack": "node scripts/clean-dist.mjs && npm run build && node scripts/pack-vendor.mjs"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@ai-sdk/anthropic": "4.0.49",
|
|
32
|
+
"@ai-sdk/google": "4.0.64",
|
|
33
|
+
"@ai-sdk/openai": "4.0.61",
|
|
34
|
+
"@microsoft/mxc-sdk": "0.8.0",
|
|
35
|
+
"@modelcontextprotocol/client": "2.0.0",
|
|
36
|
+
"@napi-rs/keyring": "1.3.0",
|
|
37
|
+
"ai": "7.0.93",
|
|
38
|
+
"diff": "9.0.0",
|
|
39
|
+
"docx": "9.5.1",
|
|
40
|
+
"eventsource-parser": "4.1.0",
|
|
41
|
+
"ink": "7.1.1",
|
|
42
|
+
"jszip": "3.10.1",
|
|
43
|
+
"pdf-lib": "1.17.1",
|
|
44
|
+
"pdfmake": "0.3.11",
|
|
45
|
+
"pptxgenjs": "4.0.1",
|
|
46
|
+
"react": "19.3.0",
|
|
47
|
+
"sqlite-vec": "0.1.9",
|
|
48
|
+
"string-width": "8.2.2",
|
|
49
|
+
"typescript": "5.9.2",
|
|
50
|
+
"unicode-segmenter": "0.15.0",
|
|
51
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
|
|
52
|
+
"zod": "4.5.4"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@types/node": "24.13.4",
|
|
56
|
+
"@types/react": "19.2.17",
|
|
57
|
+
"@xterm/headless": "6.0.0",
|
|
58
|
+
"node-pty": "1.2.0-beta.15"
|
|
59
|
+
},
|
|
60
|
+
"files": [
|
|
61
|
+
"dist/",
|
|
62
|
+
"vendor/",
|
|
63
|
+
"README.md",
|
|
64
|
+
"LICENSE",
|
|
65
|
+
"THIRD_PARTY_NOTICES.md"
|
|
66
|
+
]
|
|
9
67
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@talos/context-engine",
|
|
3
|
+
"license": "AGPL-3.0-only",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"private": true,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": { ".": "./src/engine.mjs", "./contracts": "./src/contracts.mjs", "./sqlite": "./src/node/sqlite-store.mjs", "./retrieval": "./src/retrieval.mjs" },
|
|
8
|
+
"scripts": { "test": "node --test" },
|
|
9
|
+
"engines": { "node": ">=24.18.0 <27" },
|
|
10
|
+
"dependencies": { "zod": "4.5.4", "sqlite-vec": "0.1.9" }
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ContextEngineError, parseContextSettings } from './contracts.mjs';
|
|
2
|
+
import { validateContextProfile } from './profiles.mjs';
|
|
3
|
+
|
|
4
|
+
export function computeContextBudget(options) {
|
|
5
|
+
const profile = validateContextProfile(options);
|
|
6
|
+
const settings = parseContextSettings(options.settings ?? {});
|
|
7
|
+
const inputLimit = profile.windowTokens - profile.responseReserve - profile.safetyMarginTokens;
|
|
8
|
+
const inputTokens = options.inputTokens ?? 0;
|
|
9
|
+
if (!Number.isInteger(inputTokens) || inputTokens < 0) throw new ContextEngineError('Conteggio del contesto non valido.', 'CTX_INVALID_PROFILE');
|
|
10
|
+
return { ...profile, inputLimit, inputTokens, headroom: inputLimit - inputTokens, targetTokens: Math.floor(inputLimit * settings.targetRatio), triggerTokens: Math.floor(inputLimit * settings.triggerRatio), fits: inputTokens <= inputLimit, shouldPrepare: inputTokens >= inputLimit * settings.triggerRatio };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function selectClosedPrefix(records, { retainRecentTurns = 2, force = false } = {}) {
|
|
14
|
+
const userIndices = records.flatMap((record, index) => record.message.role === 'user' ? [index] : []);
|
|
15
|
+
const desired = userIndices.length > retainRecentTurns ? userIndices[userIndices.length - retainRecentTurns] ?? records.length : 0;
|
|
16
|
+
const pending = new Set();
|
|
17
|
+
const boundaries = [];
|
|
18
|
+
let hasConversation = false;
|
|
19
|
+
for (let index = 0; index < records.length; index++) {
|
|
20
|
+
const message = records[index].message;
|
|
21
|
+
if (!['system', 'developer'].includes(message.role)) hasConversation = true;
|
|
22
|
+
for (const call of message.tool_calls ?? []) pending.add(call.id);
|
|
23
|
+
if (message.role === 'tool') pending.delete(message.tool_call_id);
|
|
24
|
+
if (pending.size === 0 && hasConversation) boundaries.push(index + 1);
|
|
25
|
+
}
|
|
26
|
+
let cut = boundaries.filter(value => value <= desired).at(-1) ?? 0;
|
|
27
|
+
// A manual request may retain fewer turns, but never half of the latest exchange.
|
|
28
|
+
if (!cut && force) cut = boundaries.filter(value => value <= (userIndices.at(-1) ?? 0)).at(-1) ?? 0;
|
|
29
|
+
return { prefix: records.slice(0, cut), tail: records.slice(cut), pendingCalls: [...pending], coveredThrough: records[cut - 1]?.sequence ?? 0 };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function planCompaction(records, options) {
|
|
33
|
+
const selection = selectClosedPrefix(records, options);
|
|
34
|
+
const budget = computeContextBudget(options);
|
|
35
|
+
// Segment size is a conservative planning estimate, checked by the real counter before inference.
|
|
36
|
+
const maxSegmentChars = Math.max(256, Math.floor((budget.inputLimit - 1024) * 2));
|
|
37
|
+
const segments = [];
|
|
38
|
+
let text = ''; let sourceIds = [];
|
|
39
|
+
const flush = () => { if (text) segments.push({ id: `segment-${segments.length}`, text, sourceIds: [...new Set(sourceIds)] }); text = ''; sourceIds = []; };
|
|
40
|
+
for (const record of selection.prefix) {
|
|
41
|
+
if (['system', 'developer'].includes(record.message.role)) continue;
|
|
42
|
+
const content = record.message.content;
|
|
43
|
+
const plain = typeof content === 'string' ? content : Array.isArray(content) ? content.filter(p => ['text', 'input_text', 'output_text'].includes(p?.type) && typeof p.text === 'string').map(p => p.text).join('\n') : '';
|
|
44
|
+
const body = `${record.id} (${record.message.role})\n${plain}${record.message.tool_calls?.length ? '\nTool calls: ' + JSON.stringify(record.message.tool_calls) : ''}\n`;
|
|
45
|
+
let offset = 0;
|
|
46
|
+
while (offset < body.length) {
|
|
47
|
+
const remaining = maxSegmentChars - text.length;
|
|
48
|
+
let length = Math.min(remaining, body.length - offset);
|
|
49
|
+
if (length > 1 && /[\uD800-\uDBFF]/u.test(body[offset + length - 1])) length--;
|
|
50
|
+
if (!length) { flush(); continue; }
|
|
51
|
+
text += body.slice(offset, offset + length); sourceIds.push(record.id); offset += length;
|
|
52
|
+
if (text.length >= maxSegmentChars - 1) flush();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
flush();
|
|
56
|
+
return { ...selection, segments, maxSegmentChars, budget };
|
|
57
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export class ContextEngineError extends Error {
|
|
4
|
+
constructor(message, code = 'CTX_INVALID_INPUT', details) {
|
|
5
|
+
super(message); this.name = 'ContextEngineError'; this.code = code;
|
|
6
|
+
if (details !== undefined) this.details = details;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const id = z.string().min(1).max(256);
|
|
11
|
+
const text = z.string().refine(value => value.trim().length > 0, 'Testo vuoto');
|
|
12
|
+
const revision = z.number().int().nonnegative();
|
|
13
|
+
const date = z.iso.datetime({ offset: true });
|
|
14
|
+
const model = z.object({ provider: id, model: id }).catchall(z.json());
|
|
15
|
+
const toolCall = z.object({ id, type: z.literal('function'), function: z.object({ name: id, arguments: z.string() }).catchall(z.json()) }).catchall(z.json());
|
|
16
|
+
const message = z.object({ role: z.enum(['system', 'developer', 'user', 'assistant', 'tool']), content: z.json().optional(), tool_call_id: id.optional(), tool_calls: z.array(toolCall).optional() }).catchall(z.json()).superRefine((value, ctx) => {
|
|
17
|
+
if (value.role === 'tool' && !value.tool_call_id) ctx.addIssue({ code: 'custom', path: ['tool_call_id'], message: 'Identità della chiamata mancante' });
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const ContextRecordV1 = z.strictObject({ schema: z.literal('talos.context.record.v1').optional(), id, sessionId: id.optional(), sequence: revision.optional(), message, createdAt: date, origin: z.string().optional(), assetRefs: z.array(id).default([]), sha256: z.string().regex(/^[a-f0-9]{64}$/u).optional() });
|
|
21
|
+
export const ContextSettingsV1 = z.strictObject({
|
|
22
|
+
auto: z.boolean().default(true),
|
|
23
|
+
model: z.discriminatedUnion('mode', [z.strictObject({ mode: z.literal('follow-session') }), z.strictObject({ mode: z.literal('explicit'), provider: id, model: id })]).default({ mode: 'follow-session' }),
|
|
24
|
+
triggerRatio: z.number().gt(0).lt(1).default(0.75), targetRatio: z.number().gt(0).lt(1).default(0.55),
|
|
25
|
+
retainRecentTurns: z.number().int().min(0).max(100).default(2), focus: z.string().max(8000).default(''),
|
|
26
|
+
nativeMode: z.enum(['off', 'qualified']).default('off'), semanticSearch: z.boolean().default(true),
|
|
27
|
+
}).refine(value => value.targetRatio < value.triggerRatio, { message: 'Obiettivo inferiore alla soglia di avvio richiesto', path: ['targetRatio'] });
|
|
28
|
+
|
|
29
|
+
export const ContextSourceRefV1 = z.strictObject({ recordId: id, quote: text, start: revision.optional(), end: revision.optional() });
|
|
30
|
+
/** 09/09 — una citazione che non si è potuta verificare non sparisce in silenzio: resta qui, con il motivo. */
|
|
31
|
+
export const ContextUnverifiedSourceV1 = z.strictObject({ recordId: z.string(), quote: z.string(), reason: z.enum(['not-found', 'unknown-record', 'out-of-order']) });
|
|
32
|
+
export const ContextSummaryV1 = z.strictObject({ schema: z.literal('talos.context.summary.v1'), text, goal: text, decisions: z.array(z.string()), constraints: z.array(z.string()), completed: z.array(z.string()), pending: z.array(z.string()), resources: z.array(z.string()), sources: z.array(ContextSourceRefV1), unverifiedSources: z.array(ContextUnverifiedSourceV1).optional() });
|
|
33
|
+
export const TokenMeasurementV1 = z.strictObject({ schema: z.literal('talos.context.tokens.v1'), inputTokens: revision, windowTokens: z.number().int().positive(), responseReserve: revision, method: z.enum(['runtime', 'provider', 'heuristic']), exact: z.boolean(), requestHash: z.string(), provider: id, model: id, estimatedMarginTokens: revision.optional() }).refine(value => value.method !== 'heuristic' || !value.exact, 'La stima euristica non è esatta');
|
|
34
|
+
export const ContextVersionV1 = z.strictObject({ schema: z.literal('talos.context.version.v1'), id, sessionId: id, coveredThrough: revision, sourceIds: z.array(id), sourceHash: z.string().regex(/^[a-f0-9]{64}$/u), summary: ContextSummaryV1, activeMessages: z.array(message), model, measurement: TokenMeasurementV1, createdAt: date, restoredFrom: id.optional() });
|
|
35
|
+
export const ContextJobV1 = z.strictObject({ schema: z.literal('talos.context.job.v1'), id, sessionId: id, idempotencyKey: id, requestFingerprint: z.string(), kind: z.enum(['compact', 'regenerate', 'restore']), state: z.enum(['queued', 'preparing', 'summarizing', 'validating', 'ready', 'committed', 'paused', 'cancelled', 'failed']), baseRevision: revision, baseStateRevision: revision, coveredThrough: revision, model, createdAt: date, updatedAt: date, completedSegments: z.array(z.json()), progress: z.strictObject({ completed: revision, total: revision, phase: z.string() }), error: z.strictObject({ code: id, message: z.string() }).optional(), versionId: id.optional() });
|
|
36
|
+
export const ContextEventV1 = z.strictObject({ schema: z.literal('talos.context.event.v1'), id, sessionId: id, jobId: id.optional(), versionId: id.optional(), kind: id, state: z.string().optional(), createdAt: date, payload: z.json() });
|
|
37
|
+
/** 09/09 — l'ultima misura preparata per la richiesta, con la revisione a cui apparteneva: la UI la mostra come «misurata alle …», e dice se il contesto è cambiato dopo. */
|
|
38
|
+
export const ContextMeasurementV1 = z.strictObject({ schema: z.literal('talos.context.measurement.v1'), revision, measuredAt: date, tokens: TokenMeasurementV1 });
|
|
39
|
+
export const ContextSnapshotV1 = z.object({ schema: z.literal('talos.context.snapshot.v1'), sessionId: id, revision, stateRevision: revision, headSequence: revision, settings: ContextSettingsV1, metadata: z.json(), activeVersion: ContextVersionV1.nullable(), facts: z.array(z.json()), jobs: z.array(ContextJobV1), measurement: ContextMeasurementV1.nullable().optional() }).catchall(z.json());
|
|
40
|
+
|
|
41
|
+
function parse(schema, value, label) {
|
|
42
|
+
const result = schema.safeParse(value);
|
|
43
|
+
if (!result.success) throw new ContextEngineError(`${label} non valido.`, 'CTX_INVALID_INPUT', result.error.issues.map(issue => ({ path: issue.path.join('.'), message: issue.message })));
|
|
44
|
+
return result.data;
|
|
45
|
+
}
|
|
46
|
+
export function parseContextRecord(value) { return parse(ContextRecordV1, value, 'Messaggio'); }
|
|
47
|
+
export function parseContextSettings(value) { return parse(ContextSettingsV1, value, 'Impostazioni'); }
|
|
48
|
+
export function parseContextSummary(value) { return parse(ContextSummaryV1, value, 'Sintesi'); }
|