talos-code 0.0.1 → 0.2.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/CHANGELOG.md +87 -0
- package/LICENSE +661 -0
- package/README.md +116 -3
- package/THIRD_PARTY_NOTICES.md +40 -0
- package/dist/archive/zip.js +73 -0
- package/dist/args.js +100 -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 +244 -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 +46 -0
- package/dist/i18n/en/common.js +9 -0
- package/dist/i18n/en/credentials.js +92 -0
- package/dist/i18n/en/errors.js +267 -0
- package/dist/i18n/en/firstrun.js +101 -0
- package/dist/i18n/en/providers.js +37 -0
- package/dist/i18n/en/screen.js +774 -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 +331 -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/openrouter-login.js +172 -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-archive.js +69 -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 +265 -0
- package/dist/runtime/talos-composition.js +1011 -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/agent-view.js +51 -0
- package/dist/tui/app.js +4098 -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 +560 -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 +38 -0
- package/dist/tui/components/terminal-shell.js +214 -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/descendant-approvals.js +104 -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 +148 -0
- package/dist/tui/line-diff.js +57 -0
- package/dist/tui/live-activity.js +56 -0
- package/dist/tui/metrics.js +123 -0
- package/dist/tui/onboarding.js +36 -0
- package/dist/tui/overlays/agent-tree.js +43 -0
- package/dist/tui/overlays/approval-dialog.js +642 -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 +77 -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 +171 -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 +289 -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 +791 -0
- package/dist/tui/session-export.js +54 -0
- package/dist/tui/setup-wizard.js +46 -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 +82 -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 +27 -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 +64 -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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { t } from "../i18n/index.js";
|
|
2
|
+
import { toolDisplay } from "./tool-display.js";
|
|
3
|
+
/*
|
|
4
|
+
* P14 (owner, 2026-09-25, "lo spinner thinking rimane in conteggio quando gli agenti vengono dispacciati"): a tool row is
|
|
5
|
+
* born `queued` (state.ts `tool.started`) and becomes `running` only after an approval, `streaming` only when it prints.
|
|
6
|
+
* A tool that runs silently without asking — the delegation, which waits for its sub-agents, a long read, a web fetch —
|
|
7
|
+
* stayed `queued`, was not counted as active, and the line said "thinking" with its clock running. `queued` is active
|
|
8
|
+
* now; and while delegations are running the line says how many agents are working.
|
|
9
|
+
*/
|
|
10
|
+
const ACTIVE_TOOL = new Set(['queued', 'running', 'streaming']);
|
|
11
|
+
const DELEGATION_TOOLS = new Set(['delega_sottotask']);
|
|
12
|
+
export function deriveLiveActivity(state, busySince) {
|
|
13
|
+
if (!state.running) {
|
|
14
|
+
if (typeof state.sentAt === 'number')
|
|
15
|
+
return { kind: 'starting', startedAt: state.sentAt };
|
|
16
|
+
if (state.lastTurn)
|
|
17
|
+
return { kind: state.lastTurn.outcome, startedAt: null, frozenMs: state.lastTurn.durationMs };
|
|
18
|
+
return { kind: 'idle', startedAt: null };
|
|
19
|
+
}
|
|
20
|
+
if (state.waitingForPerson === true)
|
|
21
|
+
return { kind: 'waiting', startedAt: busySince };
|
|
22
|
+
/* R5a S4 (E5): a retry is its own state, never "thinking": attempt 2 and later of a request the provider refused. */
|
|
23
|
+
if (isRetry(state.retry))
|
|
24
|
+
return { kind: 'retrying', startedAt: state.retry.at };
|
|
25
|
+
const delegations = state.tools.filter(row => ACTIVE_TOOL.has(row.status) && row.name !== undefined && DELEGATION_TOOLS.has(row.name)).length;
|
|
26
|
+
if (delegations > 0)
|
|
27
|
+
return { kind: 'agents', startedAt: busySince, agents: delegations };
|
|
28
|
+
const tool = [...state.tools].reverse().find(row => ACTIVE_TOOL.has(row.status));
|
|
29
|
+
if (tool)
|
|
30
|
+
return tool.name ? { kind: 'tool', startedAt: busySince, tool: toolDisplay(tool.name).label } : { kind: 'tool', startedAt: busySince };
|
|
31
|
+
if (state.streamingAssistant && state.streamingAssistant.text.length > 0)
|
|
32
|
+
return { kind: 'writing', startedAt: busySince };
|
|
33
|
+
return { kind: 'thinking', startedAt: busySince };
|
|
34
|
+
}
|
|
35
|
+
/*
|
|
36
|
+
* R5a S4 (owner decision Q-R5-6; gate E5): the retry line, `Retrying · attempt 2 of 4 · HTTP 429 · in 7 s` (Pi
|
|
37
|
+
* `status-indicator.ts:51-81`, 2026-09-07; OpenCode PR #47145, 2026-09-04). The countdown is shown only while the wait is
|
|
38
|
+
* known and not over; with no known wait the provider's own `Retry-After` is stated as asked, never counted down; with
|
|
39
|
+
* neither, no time at all. Esc interrupts it like any turn (the kernel's wait is abortable).
|
|
40
|
+
*/
|
|
41
|
+
export function isRetry(retry) { return Boolean(retry && retry.attempt >= 2); }
|
|
42
|
+
export function retryCountdownEnd(retry) { return isRetry(retry) && retry.waitMs !== null ? retry.at + retry.waitMs : null; }
|
|
43
|
+
export function retryLine(retry, nowMs) {
|
|
44
|
+
const parts = [t('screen.retry.title'), t('screen.retry.attempt', { attempt: retry.attempt, max: retry.maxAttempts }), retry.status === null ? t('screen.retry.noResponse') : t('screen.retry.http', { status: retry.status })];
|
|
45
|
+
const left = retry.waitMs === null ? null : retry.at + retry.waitMs - nowMs;
|
|
46
|
+
if (left !== null && left > 0)
|
|
47
|
+
parts.push(t('screen.retry.in', { seconds: Math.ceil(left / 1000) }));
|
|
48
|
+
else if (retry.waitMs === null && retry.retryAfterMs !== null)
|
|
49
|
+
parts.push(t('screen.retry.asked', { seconds: Math.ceil(retry.retryAfterMs / 1000) }));
|
|
50
|
+
return parts.join(' · ');
|
|
51
|
+
}
|
|
52
|
+
/** Kinds that change while you look at them: the only ones that start the motion clock (idle writes nothing, R1 E5).
|
|
53
|
+
* `retrying` is not one of them: its countdown ticks once a second, and only while the wait lasts (app.ts). */
|
|
54
|
+
export function isAnimatedActivity(kind) {
|
|
55
|
+
return kind === 'starting' || kind === 'thinking' || kind === 'writing' || kind === 'tool' || kind === 'agents' || kind === 'waiting' || kind === 'compacting' || kind === 'connecting' || kind === 'updating';
|
|
56
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export const NOOP_TUI_METRICS_SINK = Object.freeze({ record(_metric) { } });
|
|
2
|
+
export function createTuiMetricsCollector() {
|
|
3
|
+
const metrics = [];
|
|
4
|
+
return {
|
|
5
|
+
sink: { record(metric) { metrics.push(structuredClone(metric)); } },
|
|
6
|
+
snapshot: () => structuredClone(metrics),
|
|
7
|
+
reset: () => { metrics.length = 0; }
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function createTuiMetricsProfiler(options = {}) {
|
|
11
|
+
const sink = options.sink ?? NOOP_TUI_METRICS_SINK;
|
|
12
|
+
const clock = options.clock ?? (() => performance.now());
|
|
13
|
+
const receivedAt = new Map();
|
|
14
|
+
return {
|
|
15
|
+
eventReceived(eventId) { receivedAt.set(eventId, clock()); },
|
|
16
|
+
renderCoalesced(waitMs) { sink.record({ name: 'tui.render.coalesce_ms', value: Math.max(0, waitMs), unit: 'milliseconds' }); },
|
|
17
|
+
renderCommitted({ eventIds = [], reason }) {
|
|
18
|
+
sink.record({ name: 'tui.render.committed', value: 1, unit: 'count', tags: { reason } });
|
|
19
|
+
const visibleAt = clock();
|
|
20
|
+
for (const eventId of eventIds) {
|
|
21
|
+
const received = receivedAt.get(eventId);
|
|
22
|
+
if (received === undefined)
|
|
23
|
+
continue;
|
|
24
|
+
sink.record({ name: 'tui.event_to_visible_ms', value: Math.max(0, visibleAt - received), unit: 'milliseconds' });
|
|
25
|
+
receivedAt.delete(eventId);
|
|
26
|
+
}
|
|
27
|
+
if (reason === 'idle')
|
|
28
|
+
sink.record({ name: 'tui.render.idle', value: 1, unit: 'count' });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function percentile(values, fraction) {
|
|
33
|
+
if (values.length === 0)
|
|
34
|
+
return 0;
|
|
35
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
36
|
+
const rank = Math.max(1, Math.ceil(sorted.length * fraction));
|
|
37
|
+
return sorted[Math.min(sorted.length - 1, rank - 1)];
|
|
38
|
+
}
|
|
39
|
+
export function summarizeTuiMetrics(metrics) {
|
|
40
|
+
const visible = metrics.filter(row => row.name === 'tui.event_to_visible_ms').map(row => row.value);
|
|
41
|
+
const coalesced = metrics.filter(row => row.name === 'tui.render.coalesce_ms').map(row => row.value);
|
|
42
|
+
const renders = metrics.filter(row => row.name === 'tui.ink.render_ms').map(row => row.value);
|
|
43
|
+
const total = (name, kind) => metrics.reduce((sum, row) => row.name === name && (kind === undefined || row.tags?.kind === kind) ? sum + row.value : sum, 0);
|
|
44
|
+
return {
|
|
45
|
+
committed: metrics.filter(row => row.name === 'tui.render.committed').length,
|
|
46
|
+
idle: metrics.filter(row => row.name === 'tui.render.idle').length,
|
|
47
|
+
coalesceMaxMs: coalesced.length ? Math.max(...coalesced) : 0,
|
|
48
|
+
eventToVisible: {
|
|
49
|
+
count: visible.length,
|
|
50
|
+
p50: percentile(visible, 0.50),
|
|
51
|
+
p95: percentile(visible, 0.95),
|
|
52
|
+
max: visible.length ? Math.max(...visible) : 0,
|
|
53
|
+
},
|
|
54
|
+
/* Gate E6: what TALOS itself wrote (before ConPTY), and how often Ink rendered. Zero while idle is the target (E5). */
|
|
55
|
+
inkRenders: { count: renders.length, maxMs: renders.length ? Math.max(...renders) : 0 },
|
|
56
|
+
frames: total('tui.output.frame'),
|
|
57
|
+
bytes: total('tui.output.bytes'),
|
|
58
|
+
clears: { display: total('tui.output.clear', 'display'), scrollback: total('tui.output.clear', 'scrollback') },
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Gate E6, in-process: counts what TALOS writes to the terminal — bytes, DEC 2026 frames (one BSU per Ink frame) and
|
|
63
|
+
* the full clears `ESC[2J` / `ESC[3J` that Ink 7.1.1 writes on win32 for every commit of a frame at least as tall as the
|
|
64
|
+
* terminal (`ink/build/ink.js:83-112, 748-772`). A sequence split across two writes counts once: a match counts only
|
|
65
|
+
* when it ends in the newest chunk.
|
|
66
|
+
*/
|
|
67
|
+
const OUTPUT_SEQUENCES = [
|
|
68
|
+
['\u001B[?2026h', 'tui.output.frame', undefined],
|
|
69
|
+
['\u001B[2J', 'tui.output.clear', { kind: 'display' }],
|
|
70
|
+
['\u001B[3J', 'tui.output.clear', { kind: 'scrollback' }],
|
|
71
|
+
];
|
|
72
|
+
export function createTerminalOutputMeter(sink) {
|
|
73
|
+
let carry = '';
|
|
74
|
+
return { observe(chunk) {
|
|
75
|
+
const text = typeof chunk === 'string' ? chunk : chunk instanceof Uint8Array ? Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength).toString('latin1') : '';
|
|
76
|
+
const bytes = typeof chunk === 'string' ? Buffer.byteLength(chunk) : chunk instanceof Uint8Array ? chunk.byteLength : 0;
|
|
77
|
+
if (bytes === 0)
|
|
78
|
+
return;
|
|
79
|
+
sink.record({ name: 'tui.output.bytes', value: bytes, unit: 'count' });
|
|
80
|
+
const scan = carry + text;
|
|
81
|
+
for (const [sequence, name, tags] of OUTPUT_SEQUENCES) {
|
|
82
|
+
let found = 0;
|
|
83
|
+
for (let at = scan.indexOf(sequence); at >= 0; at = scan.indexOf(sequence, at + 1))
|
|
84
|
+
if (at + sequence.length > carry.length)
|
|
85
|
+
found++;
|
|
86
|
+
if (found)
|
|
87
|
+
sink.record({ name, value: found, unit: 'count', ...(tags ? { tags } : {}) });
|
|
88
|
+
}
|
|
89
|
+
carry = scan.slice(-7);
|
|
90
|
+
} };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Wires the E6 counters for `TALOS_TUI_RENDER_METRICS=1`: wraps `stdout.write` (every chunk still reaches the terminal)
|
|
94
|
+
* and gives the `onRender` option of Ink's `render()` (Ink 7.1.1 calls it once per rendered frame, after throttling;
|
|
95
|
+
* `ink/build/ink.js:349`), so Ink renders are counted in-process. `dispose()` restores the original `write`.
|
|
96
|
+
*/
|
|
97
|
+
export function createTuiRenderMetricsTap({ stdout, sink }) {
|
|
98
|
+
const meter = createTerminalOutputMeter(sink);
|
|
99
|
+
const original = stdout.write;
|
|
100
|
+
const tapped = function (...args) { meter.observe(args[0]); return original.apply(this ?? stdout, args); };
|
|
101
|
+
stdout.write = tapped;
|
|
102
|
+
return {
|
|
103
|
+
inkOptions: { onRender({ renderTime }) { sink.record({ name: 'tui.ink.render_ms', value: Math.max(0, renderTime), unit: 'milliseconds' }); } },
|
|
104
|
+
dispose() { if (stdout.write === tapped)
|
|
105
|
+
stdout.write = original; },
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export function currentProcessPerformanceSnapshot() {
|
|
109
|
+
const memory = process.memoryUsage();
|
|
110
|
+
const usage = process.resourceUsage();
|
|
111
|
+
let eventLoopUtilization = null;
|
|
112
|
+
try {
|
|
113
|
+
const p = performance;
|
|
114
|
+
const row = typeof p.eventLoopUtilization === 'function' ? p.eventLoopUtilization() : null;
|
|
115
|
+
eventLoopUtilization = typeof row?.utilization === 'number' && Number.isFinite(row.utilization) ? row.utilization : null;
|
|
116
|
+
}
|
|
117
|
+
catch { }
|
|
118
|
+
return {
|
|
119
|
+
rssBytes: memory.rss, heapUsedBytes: memory.heapUsed, externalBytes: memory.external,
|
|
120
|
+
userCPUTimeMicros: usage.userCPUTime, systemCPUTimeMicros: usage.systemCPUTime,
|
|
121
|
+
maxRSSKiB: usage.maxRSS, eventLoopUtilization,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { t } from "../i18n/index.js";
|
|
2
|
+
import { missingKeyText } from "../provider/missing-key.js";
|
|
3
|
+
import { inertProjectTrustText } from "./project-trust-prompt.js";
|
|
4
|
+
/* The words live in the dictionary (R4: moved from here to i18n/en/firstrun.ts, same words). */
|
|
5
|
+
export const ONBOARDING_COPY = Object.freeze({
|
|
6
|
+
en: Object.freeze({
|
|
7
|
+
trust: Object.freeze({ text: t('firstrun.setup.trust'), command: 'talos project trust --include-nested' }),
|
|
8
|
+
provider: Object.freeze({ text: t('firstrun.setup.provider'), command: '/provider' }),
|
|
9
|
+
model: Object.freeze({ text: t('firstrun.setup.model'), command: '/model' }),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
/*
|
|
13
|
+
* R4 CONTRACT (owner: lane F; lane N calls it from app.ts), owner decision Q-R4-13:
|
|
14
|
+
* - `keyMissing`: the chosen provider has no key usable now. `true` says so in general; a provider id says it with the one
|
|
15
|
+
* missing-key sentence (R2 E8, the same as -p, `provider test` and doctor), which names the provider's own variable. Either
|
|
16
|
+
* way the command is /provider. It follows the provider step (with no provider chosen, choosing one asks for the key).
|
|
17
|
+
* - `loadedFiles`: the instruction files TALOS loaded for this folder (main.ts, after trust), named relative to the project
|
|
18
|
+
* root; one `info` line first — `Loaded AGENTS.md` — even when nothing else is missing.
|
|
19
|
+
*/
|
|
20
|
+
export function onboardingSteps(input, locale = 'en') {
|
|
21
|
+
const copy = ONBOARDING_COPY[locale] ?? ONBOARDING_COPY.en;
|
|
22
|
+
const out = [];
|
|
23
|
+
const files = (input.loadedFiles ?? []).filter(file => typeof file === 'string' && file.length > 0);
|
|
24
|
+
if (files.length)
|
|
25
|
+
out.push({ id: 'loaded', kind: 'info', text: t('firstrun.setup.loaded', { files: files.map(inertProjectTrustText).join(', ') }), command: '' });
|
|
26
|
+
const step = (id) => out.push({ id, kind: 'step', text: copy[id].text, command: copy[id].command });
|
|
27
|
+
if (!input.projectTrusted)
|
|
28
|
+
step('trust');
|
|
29
|
+
if (!input.providerConfigured)
|
|
30
|
+
step('provider');
|
|
31
|
+
else if (input.keyMissing)
|
|
32
|
+
out.push({ id: 'key', kind: 'step', text: typeof input.keyMissing === 'string' ? missingKeyText(input.keyMissing) : t('firstrun.setup.key'), command: '/provider' });
|
|
33
|
+
if (!input.modelConfigured)
|
|
34
|
+
step('model');
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { t } from "../../i18n/index.js";
|
|
2
|
+
import { agentRosterLine, shellSafeText } from "../components/terminal-shell.js";
|
|
3
|
+
import { truncateDisplay } from "../text-width.js";
|
|
4
|
+
import { listOverlay } from "./scroll-window.js";
|
|
5
|
+
export function createAgentTreeOverlayModel(rows, selectedId) {
|
|
6
|
+
const copied = rows.map(row => ({ ...row, usage: row.usage ? { ...row.usage } : null, delegationEvidence: row.delegationEvidence ? { ...row.delegationEvidence } : null }));
|
|
7
|
+
const index = selectedId ? copied.findIndex(row => row.id === selectedId) : -1;
|
|
8
|
+
return { rows: copied, selected: index >= 0 ? index : 0 };
|
|
9
|
+
}
|
|
10
|
+
export function moveAgentTreeSelection(model, delta) {
|
|
11
|
+
if (model.rows.length === 0)
|
|
12
|
+
return { ...model, selected: 0 };
|
|
13
|
+
const next = Math.max(0, Math.min(model.rows.length - 1, model.selected + Math.trunc(delta)));
|
|
14
|
+
return next === model.selected ? model : { ...model, selected: next };
|
|
15
|
+
}
|
|
16
|
+
export function selectedAgentRow(model) {
|
|
17
|
+
return model.rows[model.selected] ?? null;
|
|
18
|
+
}
|
|
19
|
+
export function agentTreeOverlayLines(model, input) {
|
|
20
|
+
const width = Math.max(1, Math.floor(input.width));
|
|
21
|
+
const fit = (value) => truncateDisplay(shellSafeText(value), width);
|
|
22
|
+
const lines = [fit(t('screen.agents.title'))];
|
|
23
|
+
model.rows.forEach((row, index) => {
|
|
24
|
+
const display = { ...row, focused: index === model.selected };
|
|
25
|
+
lines.push(agentRosterLine({ row: display, width, nowMs: input.nowMs, marker: index === model.selected ? '›' : ' ' }));
|
|
26
|
+
});
|
|
27
|
+
const selected = selectedAgentRow(model);
|
|
28
|
+
if (!selected)
|
|
29
|
+
return [...lines, fit(t('screen.agents.empty'))];
|
|
30
|
+
/* P13: Enter watches the selected agent live; on the session in use it goes back to it (Claude Code's "Enter to view",
|
|
31
|
+
not offered on the agent already watched). */
|
|
32
|
+
const detail = selected.id === input.viewingId
|
|
33
|
+
? t('screen.agents.watchingHint')
|
|
34
|
+
: selected.id === input.currentSessionId
|
|
35
|
+
? (input.viewingId ? t('screen.agents.backHint') : input.running ? t('screen.agents.steerHint') : t('screen.agents.inspectOnly'))
|
|
36
|
+
: t('screen.agents.watchHint');
|
|
37
|
+
lines.push(fit(detail));
|
|
38
|
+
return lines;
|
|
39
|
+
}
|
|
40
|
+
// R1 Q-R1-3: the same lines as a capped, scrolling overlay (overlays/scroll-window.ts).
|
|
41
|
+
export function agentTreeOverlay(model, input) {
|
|
42
|
+
return listOverlay(agentTreeOverlayLines(model, input), { head: 1, list: model.rows.length, selected: model.selected, foot: 1, tones: (line, index) => index === 0 ? 'accent' : /COLLISION/u.test(line) ? 'strong' : 'dim' });
|
|
43
|
+
}
|