@andorra-labs/code 0.1.6 → 0.1.8
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 +3 -3
- package/dist/src/agent-execution.js +450 -40
- package/dist/src/agent-mcp-catalog.d.ts +21 -0
- package/dist/src/agent-mcp-catalog.js +40 -0
- package/dist/src/agent-mcp.d.ts +19 -3
- package/dist/src/agent-mcp.js +18 -44
- package/dist/src/app-server/protocol.d.ts +31 -3
- package/dist/src/app-server/protocol.js +8 -1
- package/dist/src/app-server/workspace.d.ts +8 -1
- package/dist/src/app-server/workspace.js +43 -2
- package/dist/src/app-server.d.ts +38 -0
- package/dist/src/app-server.js +373 -57
- package/dist/src/auth/AuthManager.d.ts +33 -1
- package/dist/src/auth/AuthManager.js +138 -10
- package/dist/src/auth/callback-page.d.ts +4 -0
- package/dist/src/auth/callback-page.js +70 -0
- package/dist/src/auth/callback.d.ts +39 -0
- package/dist/src/auth/callback.js +146 -22
- package/dist/src/auth/deployment.d.ts +6 -0
- package/dist/src/auth/deployment.js +8 -2
- package/dist/src/auth/index.d.ts +10 -6
- package/dist/src/auth/index.js +2 -2
- package/dist/src/auth/store.d.ts +142 -3
- package/dist/src/auth/store.js +334 -13
- package/dist/src/auth/types.d.ts +17 -1
- package/dist/src/auth-commands.d.ts +11 -2
- package/dist/src/auth-commands.js +14 -7
- package/dist/src/automation-service.d.ts +7 -2
- package/dist/src/automation-service.js +12 -19
- package/dist/src/automation-tool.js +10 -2
- package/dist/src/automations.d.ts +5 -0
- package/dist/src/automations.js +10 -0
- package/dist/src/background-tasks.d.ts +40 -0
- package/dist/src/background-tasks.js +54 -0
- package/dist/src/browser-view.d.ts +10 -0
- package/dist/src/browser-view.js +22 -0
- package/dist/src/capabilities.d.ts +9 -3
- package/dist/src/capabilities.js +7 -3
- package/dist/src/claude-provider.d.ts +8 -0
- package/dist/src/claude-provider.js +133 -24
- package/dist/src/cli.js +82 -4
- package/dist/src/code-intelligence/CodeIntelligenceManager.d.ts +21 -0
- package/dist/src/code-intelligence/CodeIntelligenceManager.js +51 -0
- package/dist/src/codex-provider.js +12 -0
- package/dist/src/coding-tools.d.ts +5 -0
- package/dist/src/coding-tools.js +220 -51
- package/dist/src/commands.d.ts +5 -1
- package/dist/src/commands.js +9 -8
- package/dist/src/completion.js +96 -1
- package/dist/src/config.d.ts +60 -3
- package/dist/src/config.js +280 -47
- package/dist/src/context-budget.d.ts +7 -0
- package/dist/src/context-budget.js +18 -1
- package/dist/src/decision/FactContinuations.d.ts +41 -6
- package/dist/src/decision/FactContinuations.js +211 -64
- package/dist/src/decision/PreparedSteps.js +3 -1
- package/dist/src/decision/checks.d.ts +25 -0
- package/dist/src/decision/checks.js +77 -6
- package/dist/src/delegation-changes.d.ts +109 -0
- package/dist/src/delegation-changes.js +431 -0
- package/dist/src/extensions.d.ts +2 -0
- package/dist/src/extensions.js +42 -22
- package/dist/src/firefox-cookies.d.ts +78 -0
- package/dist/src/firefox-cookies.js +261 -0
- package/dist/src/graph-health.d.ts +10 -0
- package/dist/src/graph-health.js +5 -0
- package/dist/src/graph-runner.js +8 -1
- package/dist/src/graph-server.d.ts +1 -0
- package/dist/src/graph-server.js +15 -3
- package/dist/src/graph-sync.d.ts +15 -0
- package/dist/src/graph-sync.js +50 -1
- package/dist/src/graph-tool.d.ts +52 -0
- package/dist/src/graph-tool.js +136 -0
- package/dist/src/graph-ui/app.js +212 -43
- package/dist/src/graph-ui/controls.js +6 -0
- package/dist/src/graph-ui/drafts.js +39 -0
- package/dist/src/graph-ui/embed.js +1 -1
- package/dist/src/graph-ui/index.html +2 -2
- package/dist/src/graph-ui/studio.css +7 -5
- package/dist/src/graph-ui/style.css +46 -12
- package/dist/src/graph-ui/tokens.css +23 -23
- package/dist/src/graphs.d.ts +15 -2
- package/dist/src/graphs.js +42 -13
- package/dist/src/hardened-runtime.d.ts +9 -4
- package/dist/src/hardened-runtime.js +121 -9
- package/dist/src/host-process-guard.d.ts +62 -0
- package/dist/src/host-process-guard.js +2859 -0
- package/dist/src/mcp.d.ts +55 -2
- package/dist/src/mcp.js +360 -88
- package/dist/src/memory/MemoryManager.js +7 -13
- package/dist/src/memory/MemoryProvider.d.ts +1 -1
- package/dist/src/memory/index.d.ts +0 -2
- package/dist/src/memory/index.js +0 -2
- package/dist/src/memory/repository.d.ts +1 -1
- package/dist/src/memory/repository.js +2 -2
- package/dist/src/memory/types.d.ts +1 -8
- package/dist/src/memory/types.js +1 -1
- package/dist/src/model-health-cache.d.ts +62 -0
- package/dist/src/model-health-cache.js +161 -0
- package/dist/src/powershell-pool.d.ts +9 -0
- package/dist/src/powershell-pool.js +16 -0
- package/dist/src/provider-engine.d.ts +21 -0
- package/dist/src/provider-engine.js +63 -5
- package/dist/src/provider-keys.d.ts +48 -0
- package/dist/src/provider-keys.js +121 -0
- package/dist/src/provider-settings.js +1 -1
- package/dist/src/providers.d.ts +22 -0
- package/dist/src/providers.js +81 -32
- package/dist/src/pull-requests.d.ts +14 -5
- package/dist/src/pull-requests.js +28 -10
- package/dist/src/qa/index.d.ts +3 -2
- package/dist/src/qa/index.js +3 -2
- package/dist/src/qa/qa-authorize.js +6 -0
- package/dist/src/qa/runtime/ProcessManager.d.ts +16 -0
- package/dist/src/qa/runtime/ProcessManager.js +37 -2
- package/dist/src/qa/runtime/PtyManager.d.ts +9 -0
- package/dist/src/qa/runtime/PtyManager.js +18 -0
- package/dist/src/qa/runtime/changes.d.ts +15 -0
- package/dist/src/qa/runtime/changes.js +15 -0
- package/dist/src/qa/tools.js +4 -0
- package/dist/src/react-runtime.js +52 -7
- package/dist/src/read-image.d.ts +30 -0
- package/dist/src/read-image.js +97 -0
- package/dist/src/remote/engine-pool.js +3 -1
- package/dist/src/remote/network.js +1 -1
- package/dist/src/run-control.d.ts +9 -0
- package/dist/src/run-control.js +15 -0
- package/dist/src/runtime.d.ts +1 -1
- package/dist/src/runtime.js +2 -1
- package/dist/src/secret-redaction.d.ts +13 -0
- package/dist/src/secret-redaction.js +71 -0
- package/dist/src/session-summary.d.ts +10 -4
- package/dist/src/session-summary.js +14 -7
- package/dist/src/sessions.js +4 -1
- package/dist/src/skills/bundled/create-skill/SKILL.md +17 -3
- package/dist/src/skills/bundled/diagram/SKILL.md +144 -0
- package/dist/src/skills/bundled/graph-manager/SKILL.md +17 -12
- package/dist/src/skills/bundled/manage-skills/SKILL.md +6 -1
- package/dist/src/skills/bundled/provenance.json +8 -3
- package/dist/src/skills/runtime-skills.d.ts +7 -0
- package/dist/src/skills/runtime-skills.js +12 -3
- package/dist/src/subagent-run.js +1 -1
- package/dist/src/telemetry/schema.d.ts +1 -1
- package/dist/src/telemetry/schema.js +1 -1
- package/dist/src/terminal-ui.d.ts +9 -0
- package/dist/src/terminal-ui.js +14 -0
- package/dist/src/tool-availability.d.ts +16 -0
- package/dist/src/tool-availability.js +28 -0
- package/dist/src/tool-dependencies.js +4 -0
- package/dist/src/tools.d.ts +9 -0
- package/dist/src/tools.js +116 -11
- package/dist/src/transcript.js +5 -0
- package/dist/src/types.d.ts +32 -5
- package/dist/src/update-check.d.ts +35 -0
- package/dist/src/update-check.js +104 -0
- package/dist/src/usage-analytics.d.ts +6 -0
- package/dist/src/usage-analytics.js +47 -4
- package/dist/src/web-search.d.ts +65 -0
- package/dist/src/web-search.js +228 -0
- package/dist/src/workspace-instructions.d.ts +10 -0
- package/dist/src/workspace-instructions.js +26 -21
- package/dist/vendor/engine/provenance.json +3088 -17923
- package/dist/vendor/engine/runtime/agent/types.d.ts +1 -1
- package/dist/vendor/engine/runtime/ai/types.d.ts +8 -14
- package/dist/vendor/engine/runtime/coding-agent/core/tools/bash.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/bash.js +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/edit.d.ts +3 -4
- package/dist/vendor/engine/runtime/coding-agent/core/tools/edit.js +0 -3
- package/dist/vendor/engine/runtime/coding-agent/core/tools/find.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/find.js +0 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/grep.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/grep.js +0 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/index.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/ls.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/ls.js +0 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/read.d.ts +3 -3
- package/dist/vendor/engine/runtime/coding-agent/core/tools/read.js +0 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/tool-definition-wrapper.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/tool-definition.d.ts +40 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/write.d.ts +2 -2
- package/dist/vendor/engine/runtime/coding-agent/core/tools/write.js +0 -2
- package/docs/README.md +1 -1
- package/docs/agents/README.md +7 -7
- package/docs/agents/install-for-agents.md +7 -6
- package/docs/agents/mcp-server.md +18 -5
- package/docs/agents/subagent-mode.md +6 -6
- package/docs/concepts/README.md +4 -4
- package/docs/concepts/jev-efficiency.md +2 -1
- package/docs/concepts/limits.md +3 -3
- package/docs/concepts/memory.md +5 -25
- package/docs/concepts/security.md +15 -7
- package/docs/concepts/workspace-instructions.md +3 -2
- package/docs/getting-started/README.md +3 -3
- package/docs/getting-started/accounts.md +19 -8
- package/docs/getting-started/configure-providers.md +5 -3
- package/docs/guides/README.md +1 -0
- package/docs/guides/browser.md +13 -1
- package/docs/guides/desktop-app.md +72 -19
- package/docs/guides/extensions.md +4 -2
- package/docs/guides/graph-builder.md +2 -2
- package/docs/guides/headless.md +5 -4
- package/docs/guides/update.md +3 -1
- package/docs/guides/web-search.md +51 -0
- package/docs/guides/windows-code-signing.md +13 -10
- package/docs/llms.txt +2 -2
- package/docs/reference/cli.md +13 -7
- package/docs/reference/config.md +17 -11
- package/docs/reference/slash-commands.md +7 -3
- package/docs/superpowers/plans/2026-11-09-orchestrator-delegation.md +295 -0
- package/docs/superpowers/specs/2026-11-09-orchestrator-delegation-design.md +291 -0
- package/package.json +3 -22
- package/tests/harness-extensions-test-plan.md +4 -1
- package/dist/src/memory/providers/graphiti/GraphitiClient.d.ts +0 -27
- package/dist/src/memory/providers/graphiti/GraphitiClient.js +0 -76
- package/dist/src/memory/providers/graphiti/GraphitiMapper.d.ts +0 -6
- package/dist/src/memory/providers/graphiti/GraphitiMapper.js +0 -116
- package/dist/src/memory/providers/graphiti/GraphitiMemoryProvider.d.ts +0 -27
- package/dist/src/memory/providers/graphiti/GraphitiMemoryProvider.js +0 -137
- package/dist/src/memory/providers/graphiti/GraphitiTypes.d.ts +0 -57
- package/dist/src/memory/providers/graphiti/GraphitiTypes.js +0 -2
- package/dist/vendor/engine/runtime/agent/agent-loop.d.ts +0 -23
- package/dist/vendor/engine/runtime/agent/agent-loop.js +0 -601
- package/dist/vendor/engine/runtime/agent/agent.d.ts +0 -130
- package/dist/vendor/engine/runtime/agent/agent.js +0 -430
- package/dist/vendor/engine/runtime/agent/harness/agent-harness.d.ts +0 -715
- package/dist/vendor/engine/runtime/agent/harness/agent-harness.js +0 -5
- package/dist/vendor/engine/runtime/agent/harness/compaction/branch-summarization.d.ts +0 -67
- package/dist/vendor/engine/runtime/agent/harness/compaction/branch-summarization.js +0 -175
- package/dist/vendor/engine/runtime/agent/harness/compaction/compaction.d.ts +0 -125
- package/dist/vendor/engine/runtime/agent/harness/compaction/compaction.js +0 -559
- package/dist/vendor/engine/runtime/agent/harness/compaction/utils.d.ts +0 -24
- package/dist/vendor/engine/runtime/agent/harness/compaction/utils.js +0 -119
- package/dist/vendor/engine/runtime/agent/harness/config.d.ts +0 -8
- package/dist/vendor/engine/runtime/agent/harness/config.js +0 -34
- package/dist/vendor/engine/runtime/agent/harness/context.d.ts +0 -8
- package/dist/vendor/engine/runtime/agent/harness/context.js +0 -12
- package/dist/vendor/engine/runtime/agent/harness/events.d.ts +0 -24
- package/dist/vendor/engine/runtime/agent/harness/events.js +0 -249
- package/dist/vendor/engine/runtime/agent/harness/execution/assistant.d.ts +0 -41
- package/dist/vendor/engine/runtime/agent/harness/execution/assistant.js +0 -81
- package/dist/vendor/engine/runtime/agent/harness/execution/effect-gate.d.ts +0 -21
- package/dist/vendor/engine/runtime/agent/harness/execution/effect-gate.js +0 -48
- package/dist/vendor/engine/runtime/agent/harness/execution/tools.d.ts +0 -66
- package/dist/vendor/engine/runtime/agent/harness/execution/tools.js +0 -118
- package/dist/vendor/engine/runtime/agent/harness/hooks.d.ts +0 -37
- package/dist/vendor/engine/runtime/agent/harness/hooks.js +0 -405
- package/dist/vendor/engine/runtime/agent/harness/messages.d.ts +0 -50
- package/dist/vendor/engine/runtime/agent/harness/messages.js +0 -102
- package/dist/vendor/engine/runtime/agent/harness/prompt-templates.d.ts +0 -48
- package/dist/vendor/engine/runtime/agent/harness/prompt-templates.js +0 -224
- package/dist/vendor/engine/runtime/agent/harness/result.d.ts +0 -132
- package/dist/vendor/engine/runtime/agent/harness/result.js +0 -80
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/boundary.d.ts +0 -27
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/boundary.js +0 -172
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/checkpoint.d.ts +0 -7
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/checkpoint.js +0 -132
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/deferred.d.ts +0 -14
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/deferred.js +0 -178
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/generation.d.ts +0 -7
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/generation.js +0 -204
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/reconcile.d.ts +0 -4
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/reconcile.js +0 -139
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/recovery.d.ts +0 -7
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/recovery.js +0 -84
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/response.d.ts +0 -22
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/response.js +0 -393
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/retry.d.ts +0 -3
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/retry.js +0 -33
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/structural.d.ts +0 -31
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/structural.js +0 -928
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/terminal.d.ts +0 -6
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/terminal.js +0 -48
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tool-placement.d.ts +0 -13
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tool-placement.js +0 -218
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tools.d.ts +0 -5
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tools.js +0 -448
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive.d.ts +0 -5
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive.js +0 -92
- package/dist/vendor/engine/runtime/agent/harness/runtime/harness.d.ts +0 -58
- package/dist/vendor/engine/runtime/agent/harness/runtime/harness.js +0 -310
- package/dist/vendor/engine/runtime/agent/harness/runtime/lane.d.ts +0 -117
- package/dist/vendor/engine/runtime/agent/harness/runtime/lane.js +0 -1574
- package/dist/vendor/engine/runtime/agent/harness/runtime/progress.d.ts +0 -14
- package/dist/vendor/engine/runtime/agent/harness/runtime/progress.js +0 -65
- package/dist/vendor/engine/runtime/agent/harness/runtime/reducer.d.ts +0 -4
- package/dist/vendor/engine/runtime/agent/harness/runtime/reducer.js +0 -239
- package/dist/vendor/engine/runtime/agent/harness/runtime/restore.d.ts +0 -23
- package/dist/vendor/engine/runtime/agent/harness/runtime/restore.js +0 -116
- package/dist/vendor/engine/runtime/agent/harness/runtime/transcript.d.ts +0 -20
- package/dist/vendor/engine/runtime/agent/harness/runtime/transcript.js +0 -71
- package/dist/vendor/engine/runtime/agent/harness/runtime/types.d.ts +0 -104
- package/dist/vendor/engine/runtime/agent/harness/runtime/types.js +0 -60
- package/dist/vendor/engine/runtime/agent/harness/session/commit.d.ts +0 -52
- package/dist/vendor/engine/runtime/agent/harness/session/commit.js +0 -56
- package/dist/vendor/engine/runtime/agent/harness/session/context.d.ts +0 -9
- package/dist/vendor/engine/runtime/agent/harness/session/context.js +0 -48
- package/dist/vendor/engine/runtime/agent/harness/session/fork-policy.d.ts +0 -20
- package/dist/vendor/engine/runtime/agent/harness/session/fork-policy.js +0 -54
- package/dist/vendor/engine/runtime/agent/harness/session/fork.d.ts +0 -15
- package/dist/vendor/engine/runtime/agent/harness/session/fork.js +0 -78
- package/dist/vendor/engine/runtime/agent/harness/session/in-memory-storage-state.d.ts +0 -38
- package/dist/vendor/engine/runtime/agent/harness/session/in-memory-storage-state.js +0 -275
- package/dist/vendor/engine/runtime/agent/harness/session/index.d.ts +0 -10
- package/dist/vendor/engine/runtime/agent/harness/session/index.js +0 -8
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/codec.d.ts +0 -20
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/codec.js +0 -44
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/fork.d.ts +0 -37
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/fork.js +0 -263
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/index.d.ts +0 -3
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/index.js +0 -3
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/io.d.ts +0 -13
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/io.js +0 -85
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/legacy-v3.d.ts +0 -43
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/legacy-v3.js +0 -461
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/repo.d.ts +0 -34
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/repo.js +0 -300
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/storage.d.ts +0 -40
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/storage.js +0 -199
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/types.d.ts +0 -38
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/types.js +0 -2
- package/dist/vendor/engine/runtime/agent/harness/session/memory.d.ts +0 -47
- package/dist/vendor/engine/runtime/agent/harness/session/memory.js +0 -368
- package/dist/vendor/engine/runtime/agent/harness/session/mutation-line.d.ts +0 -7
- package/dist/vendor/engine/runtime/agent/harness/session/mutation-line.js +0 -20
- package/dist/vendor/engine/runtime/agent/harness/session/session.d.ts +0 -81
- package/dist/vendor/engine/runtime/agent/harness/session/session.js +0 -360
- package/dist/vendor/engine/runtime/agent/harness/session/types.d.ts +0 -511
- package/dist/vendor/engine/runtime/agent/harness/session/types.js +0 -8
- package/dist/vendor/engine/runtime/agent/harness/session/values.d.ts +0 -94
- package/dist/vendor/engine/runtime/agent/harness/session/values.js +0 -80
- package/dist/vendor/engine/runtime/agent/harness/skills.d.ts +0 -45
- package/dist/vendor/engine/runtime/agent/harness/skills.js +0 -325
- package/dist/vendor/engine/runtime/agent/harness/system-prompt.d.ts +0 -2
- package/dist/vendor/engine/runtime/agent/harness/system-prompt.js +0 -29
- package/dist/vendor/engine/runtime/agent/harness/telemetry.d.ts +0 -1241
- package/dist/vendor/engine/runtime/agent/harness/telemetry.js +0 -526
- package/dist/vendor/engine/runtime/agent/harness/tools/bash.d.ts +0 -26
- package/dist/vendor/engine/runtime/agent/harness/tools/bash.js +0 -104
- package/dist/vendor/engine/runtime/agent/harness/tools/edit-diff.d.ts +0 -88
- package/dist/vendor/engine/runtime/agent/harness/tools/edit-diff.js +0 -385
- package/dist/vendor/engine/runtime/agent/harness/tools/edit.d.ts +0 -18
- package/dist/vendor/engine/runtime/agent/harness/tools/edit.js +0 -107
- package/dist/vendor/engine/runtime/agent/harness/tools/file-mutation-queue.d.ts +0 -4
- package/dist/vendor/engine/runtime/agent/harness/tools/file-mutation-queue.js +0 -45
- package/dist/vendor/engine/runtime/agent/harness/tools/image.d.ts +0 -2
- package/dist/vendor/engine/runtime/agent/harness/tools/image.js +0 -105
- package/dist/vendor/engine/runtime/agent/harness/tools/index.d.ts +0 -5
- package/dist/vendor/engine/runtime/agent/harness/tools/index.js +0 -4
- package/dist/vendor/engine/runtime/agent/harness/tools/path-utils.d.ts +0 -4
- package/dist/vendor/engine/runtime/agent/harness/tools/path-utils.js +0 -25
- package/dist/vendor/engine/runtime/agent/harness/tools/read.d.ts +0 -34
- package/dist/vendor/engine/runtime/agent/harness/tools/read.js +0 -107
- package/dist/vendor/engine/runtime/agent/harness/tools/tool-context.d.ts +0 -5
- package/dist/vendor/engine/runtime/agent/harness/tools/write.d.ts +0 -10
- package/dist/vendor/engine/runtime/agent/harness/tools/write.js +0 -30
- package/dist/vendor/engine/runtime/agent/harness/types.d.ts +0 -304
- package/dist/vendor/engine/runtime/agent/harness/types.js +0 -74
- package/dist/vendor/engine/runtime/agent/harness/utils/adaptive-publisher.d.ts +0 -23
- package/dist/vendor/engine/runtime/agent/harness/utils/adaptive-publisher.js +0 -78
- package/dist/vendor/engine/runtime/agent/harness/utils/output-capture.d.ts +0 -30
- package/dist/vendor/engine/runtime/agent/harness/utils/output-capture.js +0 -216
- package/dist/vendor/engine/runtime/agent/harness/utils/shell-output.d.ts +0 -28
- package/dist/vendor/engine/runtime/agent/harness/utils/shell-output.js +0 -70
- package/dist/vendor/engine/runtime/agent/harness/utils/truncate.d.ts +0 -70
- package/dist/vendor/engine/runtime/agent/harness/utils/truncate.js +0 -295
- package/dist/vendor/engine/runtime/agent/harness/utils/usage.d.ts +0 -3
- package/dist/vendor/engine/runtime/agent/harness/utils/usage.js +0 -32
- package/dist/vendor/engine/runtime/agent/index.d.ts +0 -27
- package/dist/vendor/engine/runtime/agent/index.js +0 -25
- package/dist/vendor/engine/runtime/agent/proxy.d.ts +0 -71
- package/dist/vendor/engine/runtime/agent/proxy.js +0 -309
- package/dist/vendor/engine/runtime/agent/search/index.d.ts +0 -28
- package/dist/vendor/engine/runtime/agent/search/index.js +0 -1
- package/dist/vendor/engine/runtime/agent/stream-fn.d.ts +0 -9
- package/dist/vendor/engine/runtime/agent/stream-fn.js +0 -16
- package/dist/vendor/engine/runtime/ai/api/anthropic-messages.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/anthropic-messages.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.d.ts +0 -16
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.js +0 -260
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.d.ts +0 -37
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.js +0 -1091
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.lazy.d.ts +0 -9
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.lazy.js +0 -21
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.d.ts +0 -12
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.js +0 -368
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/google-vertex.d.ts +0 -14
- package/dist/vendor/engine/runtime/ai/api/google-vertex.js +0 -429
- package/dist/vendor/engine/runtime/ai/api/google-vertex.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/google-vertex.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.d.ts +0 -24
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.js +0 -747
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.d.ts +0 -30
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.js +0 -1302
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/openai-completions.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/openai-completions.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/openai-responses.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/openai-responses.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.js +0 -131
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.lazy.js +0 -3
- package/dist/vendor/engine/runtime/ai/api/pi-messages.d.ts +0 -98
- package/dist/vendor/engine/runtime/ai/api/pi-messages.js +0 -312
- package/dist/vendor/engine/runtime/ai/api/pi-messages.lazy.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/api/pi-messages.lazy.js +0 -2
- package/dist/vendor/engine/runtime/ai/auth/helpers.d.ts +0 -21
- package/dist/vendor/engine/runtime/ai/auth/helpers.js +0 -52
- package/dist/vendor/engine/runtime/ai/auth/oauth/load.d.ts +0 -28
- package/dist/vendor/engine/runtime/ai/auth/oauth/load.js +0 -55
- package/dist/vendor/engine/runtime/ai/compat/extension-oauth-types.d.ts +0 -38
- package/dist/vendor/engine/runtime/ai/compat/extension-oauth-types.js +0 -1
- package/dist/vendor/engine/runtime/ai/compat.d.ts +0 -66
- package/dist/vendor/engine/runtime/ai/compat.js +0 -201
- package/dist/vendor/engine/runtime/ai/env-api-keys.d.ts +0 -20
- package/dist/vendor/engine/runtime/ai/env-api-keys.js +0 -148
- package/dist/vendor/engine/runtime/ai/image-models.d.ts +0 -9
- package/dist/vendor/engine/runtime/ai/image-models.generated.d.ts +0 -814
- package/dist/vendor/engine/runtime/ai/image-models.generated.js +0 -816
- package/dist/vendor/engine/runtime/ai/image-models.js +0 -22
- package/dist/vendor/engine/runtime/ai/images-api-registry.d.ts +0 -13
- package/dist/vendor/engine/runtime/ai/images-api-registry.js +0 -21
- package/dist/vendor/engine/runtime/ai/images-models.d.ts +0 -94
- package/dist/vendor/engine/runtime/ai/images-models.js +0 -142
- package/dist/vendor/engine/runtime/ai/images.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/images.js +0 -13
- package/dist/vendor/engine/runtime/ai/index.d.ts +0 -36
- package/dist/vendor/engine/runtime/ai/index.js +0 -23
- package/dist/vendor/engine/runtime/ai/legacy-api-aliases.d.ts +0 -41
- package/dist/vendor/engine/runtime/ai/legacy-api-aliases.js +0 -48
- package/dist/vendor/engine/runtime/ai/models.generated.d.ts +0 -84
- package/dist/vendor/engine/runtime/ai/models.generated.js +0 -86
- package/dist/vendor/engine/runtime/ai/oauth.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/oauth.js +0 -1
- package/dist/vendor/engine/runtime/ai/providers/all.d.ts +0 -27
- package/dist/vendor/engine/runtime/ai/providers/all.js +0 -132
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.js +0 -92
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/anthropic.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/anthropic.js +0 -55
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.js +0 -13
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/baseten.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/baseten.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/baseten.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/baseten.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/cerebras.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/cerebras.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/cerebras.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/cerebras.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.d.ts +0 -4
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.js +0 -24
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-auth.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-auth.js +0 -85
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-stream.d.ts +0 -7
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-stream.js +0 -20
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/data/.manifest.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/amazon-bedrock.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/ant-ling.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/azure-openai-responses.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/baseten.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/cerebras.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/cloudflare-ai-gateway.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/cloudflare-workers-ai.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/deepseek.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/fireworks.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/github-copilot.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/google-vertex.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/google.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/groq.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/huggingface.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/kimi-coding.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/meta.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/minimax-cn.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/minimax.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/mistral.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/moonshotai-cn.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/moonshotai.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/nvidia.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/openai-codex.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/openai.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/opencode-go.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/opencode.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/openrouter.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/qwen-token-plan-cn.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/qwen-token-plan-individual.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/qwen-token-plan.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/radius.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/together.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/vercel-ai-gateway.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/xai.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi-token-plan-ams.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi-token-plan-cn.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi-token-plan-sgp.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/zai-coding-cn.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/data/zai.json +0 -1
- package/dist/vendor/engine/runtime/ai/providers/deepseek.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/deepseek.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/deepseek.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/deepseek.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/faux.d.ts +0 -102
- package/dist/vendor/engine/runtime/ai/providers/faux.js +0 -488
- package/dist/vendor/engine/runtime/ai/providers/fireworks.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/fireworks.js +0 -18
- package/dist/vendor/engine/runtime/ai/providers/fireworks.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/fireworks.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.js +0 -34
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.js +0 -93
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/google.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/google.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/google.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/google.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/groq.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/groq.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/groq.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/groq.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/huggingface.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/huggingface.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/huggingface.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/huggingface.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/images/register-builtins.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/images/register-builtins.js +0 -33
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.js +0 -23
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/meta.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/meta.js +0 -23
- package/dist/vendor/engine/runtime/ai/providers/meta.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/meta.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/minimax.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/minimax.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/minimax.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/minimax.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/mistral.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/mistral.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/mistral.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/mistral.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/nvidia.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/nvidia.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/nvidia.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/nvidia.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.js +0 -21
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/openai.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/openai.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/openai.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/openai.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.js +0 -20
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/opencode-headers.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/opencode-headers.js +0 -21
- package/dist/vendor/engine/runtime/ai/providers/opencode.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/opencode.js +0 -22
- package/dist/vendor/engine/runtime/ai/providers/opencode.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/opencode.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/openrouter-images.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/openrouter-images.js +0 -21
- package/dist/vendor/engine/runtime/ai/providers/openrouter.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/openrouter.js +0 -26
- package/dist/vendor/engine/runtime/ai/providers/openrouter.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/openrouter.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/radius-config.d.ts +0 -25
- package/dist/vendor/engine/runtime/ai/providers/radius-config.js +0 -62
- package/dist/vendor/engine/runtime/ai/providers/radius.d.ts +0 -8
- package/dist/vendor/engine/runtime/ai/providers/radius.js +0 -77
- package/dist/vendor/engine/runtime/ai/providers/radius.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/radius.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/together.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/together.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/together.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/together.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/xai.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/xai.js +0 -23
- package/dist/vendor/engine/runtime/ai/providers/xai.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/xai.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/providers/zai.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/providers/zai.js +0 -14
- package/dist/vendor/engine/runtime/ai/providers/zai.models.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/providers/zai.models.js +0 -5
- package/dist/vendor/engine/runtime/ai/session-resources.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/session-resources.js +0 -21
- package/dist/vendor/engine/runtime/ai/utils/abort-signals.d.ts +0 -5
- package/dist/vendor/engine/runtime/ai/utils/abort-signals.js +0 -33
- package/dist/vendor/engine/runtime/ai/utils/assistant-message-frame.d.ts +0 -76
- package/dist/vendor/engine/runtime/ai/utils/assistant-message-frame.js +0 -424
- package/dist/vendor/engine/runtime/ai/utils/node-http-proxy.d.ts +0 -3
- package/dist/vendor/engine/runtime/ai/utils/node-http-proxy.js +0 -132
- package/dist/vendor/engine/runtime/ai/utils/retry.d.ts +0 -57
- package/dist/vendor/engine/runtime/ai/utils/retry.js +0 -182
- package/dist/vendor/engine/runtime/ai/utils/typebox-helpers.d.ts +0 -16
- package/dist/vendor/engine/runtime/ai/utils/typebox-helpers.js +0 -20
- package/dist/vendor/engine/runtime/ai/utils/uuid.d.ts +0 -2
- package/dist/vendor/engine/runtime/ai/utils/uuid.js +0 -41
- package/dist/vendor/engine/runtime/ai/utils/validation.d.ts +0 -17
- package/dist/vendor/engine/runtime/ai/utils/validation.js +0 -308
- package/dist/vendor/engine/runtime/chord/api.d.ts +0 -14
- package/dist/vendor/engine/runtime/chord/api.js +0 -71
- package/dist/vendor/engine/runtime/chord/context/index.d.ts +0 -23
- package/dist/vendor/engine/runtime/chord/context/index.js +0 -96
- package/dist/vendor/engine/runtime/chord/delta/index.d.ts +0 -118
- package/dist/vendor/engine/runtime/chord/delta/index.js +0 -1903
- package/dist/vendor/engine/runtime/chord/facets/host.d.ts +0 -11
- package/dist/vendor/engine/runtime/chord/facets/host.js +0 -762
- package/dist/vendor/engine/runtime/chord/facets/loader.d.ts +0 -2
- package/dist/vendor/engine/runtime/chord/facets/loader.js +0 -4
- package/dist/vendor/engine/runtime/chord/index.d.ts +0 -10
- package/dist/vendor/engine/runtime/chord/index.js +0 -9
- package/dist/vendor/engine/runtime/chord/json.d.ts +0 -3
- package/dist/vendor/engine/runtime/chord/json.js +0 -56
- package/dist/vendor/engine/runtime/chord/services/consumer.d.ts +0 -10
- package/dist/vendor/engine/runtime/chord/services/consumer.js +0 -536
- package/dist/vendor/engine/runtime/chord/services/errors.d.ts +0 -7
- package/dist/vendor/engine/runtime/chord/services/errors.js +0 -21
- package/dist/vendor/engine/runtime/chord/services/handle.d.ts +0 -14
- package/dist/vendor/engine/runtime/chord/services/handle.js +0 -100
- package/dist/vendor/engine/runtime/chord/services/instances.d.ts +0 -24
- package/dist/vendor/engine/runtime/chord/services/instances.js +0 -136
- package/dist/vendor/engine/runtime/chord/services/loopback.d.ts +0 -4
- package/dist/vendor/engine/runtime/chord/services/loopback.js +0 -14
- package/dist/vendor/engine/runtime/chord/services/provider.d.ts +0 -36
- package/dist/vendor/engine/runtime/chord/services/provider.js +0 -471
- package/dist/vendor/engine/runtime/chord/services/state-codec.d.ts +0 -14
- package/dist/vendor/engine/runtime/chord/services/state-codec.js +0 -114
- package/dist/vendor/engine/runtime/chord/services/state-internals.d.ts +0 -10
- package/dist/vendor/engine/runtime/chord/services/state-internals.js +0 -9
- package/dist/vendor/engine/runtime/chord/services/state.d.ts +0 -22
- package/dist/vendor/engine/runtime/chord/services/state.js +0 -123
- package/dist/vendor/engine/runtime/chord/services/wire.d.ts +0 -59
- package/dist/vendor/engine/runtime/chord/services/wire.js +0 -172
- package/dist/vendor/engine/runtime/chord/types.d.ts +0 -202
- package/dist/vendor/engine/runtime/chord/types.js +0 -1
- package/dist/vendor/engine/runtime/coding-agent/cli/args.d.ts +0 -60
- package/dist/vendor/engine/runtime/coding-agent/cli/args.js +0 -439
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-check.d.ts +0 -18
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-check.js +0 -49
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-command.d.ts +0 -23
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-command.js +0 -102
- package/dist/vendor/engine/runtime/coding-agent/cli/config-selector.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/cli/config-selector.js +0 -31
- package/dist/vendor/engine/runtime/coding-agent/cli/credential-print.d.ts +0 -12
- package/dist/vendor/engine/runtime/coding-agent/cli/credential-print.js +0 -75
- package/dist/vendor/engine/runtime/coding-agent/cli/file-processor.d.ts +0 -14
- package/dist/vendor/engine/runtime/coding-agent/cli/file-processor.js +0 -70
- package/dist/vendor/engine/runtime/coding-agent/cli/initial-message.d.ts +0 -17
- package/dist/vendor/engine/runtime/coding-agent/cli/initial-message.js +0 -21
- package/dist/vendor/engine/runtime/coding-agent/cli/list-models.d.ts +0 -8
- package/dist/vendor/engine/runtime/coding-agent/cli/list-models.js +0 -97
- package/dist/vendor/engine/runtime/coding-agent/cli/project-trust.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/cli/project-trust.js +0 -47
- package/dist/vendor/engine/runtime/coding-agent/cli/session-picker.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/cli/session-picker.js +0 -35
- package/dist/vendor/engine/runtime/coding-agent/cli/startup-ui.d.ts +0 -19
- package/dist/vendor/engine/runtime/coding-agent/cli/startup-ui.js +0 -184
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-runtime.d.ts +0 -118
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-runtime.js +0 -316
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-services.d.ts +0 -85
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-services.js +0 -133
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session.d.ts +0 -771
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session.js +0 -2990
- package/dist/vendor/engine/runtime/coding-agent/core/auth-guidance.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/core/auth-guidance.js +0 -20
- package/dist/vendor/engine/runtime/coding-agent/core/auth-storage.d.ts +0 -71
- package/dist/vendor/engine/runtime/coding-agent/core/auth-storage.js +0 -425
- package/dist/vendor/engine/runtime/coding-agent/core/bash-executor.d.ts +0 -31
- package/dist/vendor/engine/runtime/coding-agent/core/bash-executor.js +0 -110
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report-upload.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report-upload.js +0 -21
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report.d.ts +0 -175
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report.js +0 -291
- package/dist/vendor/engine/runtime/coding-agent/core/cache-stats.d.ts +0 -48
- package/dist/vendor/engine/runtime/coding-agent/core/cache-stats.js +0 -111
- package/dist/vendor/engine/runtime/coding-agent/core/cache-warmer.d.ts +0 -102
- package/dist/vendor/engine/runtime/coding-agent/core/cache-warmer.js +0 -355
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/branch-summarization.d.ts +0 -97
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/branch-summarization.js +0 -250
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/compaction.d.ts +0 -142
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/compaction.js +0 -666
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/index.d.ts +0 -6
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/index.js +0 -6
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/utils.d.ts +0 -37
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/utils.js +0 -141
- package/dist/vendor/engine/runtime/coding-agent/core/crash-log.d.ts +0 -26
- package/dist/vendor/engine/runtime/coding-agent/core/crash-log.js +0 -138
- package/dist/vendor/engine/runtime/coding-agent/core/defaults.d.ts +0 -3
- package/dist/vendor/engine/runtime/coding-agent/core/defaults.js +0 -10
- package/dist/vendor/engine/runtime/coding-agent/core/diagnostics.d.ts +0 -14
- package/dist/vendor/engine/runtime/coding-agent/core/diagnostics.js +0 -1
- package/dist/vendor/engine/runtime/coding-agent/core/event-bus.d.ts +0 -8
- package/dist/vendor/engine/runtime/coding-agent/core/event-bus.js +0 -24
- package/dist/vendor/engine/runtime/coding-agent/core/exec.d.ts +0 -28
- package/dist/vendor/engine/runtime/coding-agent/core/exec.js +0 -74
- package/dist/vendor/engine/runtime/coding-agent/core/experimental.d.ts +0 -1
- package/dist/vendor/engine/runtime/coding-agent/core/experimental.js +0 -3
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/ansi-to-html.d.ts +0 -21
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/ansi-to-html.js +0 -248
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/index.d.ts +0 -36
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/index.js +0 -225
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/template.css +0 -1066
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/template.html +0 -55
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/template.js +0 -1864
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/tool-renderer.d.ts +0 -33
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/tool-renderer.js +0 -107
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/vendor/highlight.min.js +0 -1213
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/vendor/marked.min.js +0 -78
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/index.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/index.js +0 -8
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-loader.d.ts +0 -1
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-loader.js +0 -3
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-static-loader.d.ts +0 -1
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-static-loader.js +0 -3
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/loader.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/loader.js +0 -633
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/runner.d.ts +0 -180
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/runner.js +0 -1028
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/types.d.ts +0 -1362
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/types.js +0 -47
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/virtual-modules.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/virtual-modules.js +0 -37
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/wrapper.d.ts +0 -19
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/wrapper.js +0 -21
- package/dist/vendor/engine/runtime/coding-agent/core/footer-data-provider.d.ts +0 -63
- package/dist/vendor/engine/runtime/coding-agent/core/footer-data-provider.js +0 -337
- package/dist/vendor/engine/runtime/coding-agent/core/http-dispatcher.d.ts +0 -21
- package/dist/vendor/engine/runtime/coding-agent/core/http-dispatcher.js +0 -97
- package/dist/vendor/engine/runtime/coding-agent/core/keybindings.d.ts +0 -427
- package/dist/vendor/engine/runtime/coding-agent/core/keybindings.js +0 -320
- package/dist/vendor/engine/runtime/coding-agent/core/messages.d.ts +0 -76
- package/dist/vendor/engine/runtime/coding-agent/core/messages.js +0 -123
- package/dist/vendor/engine/runtime/coding-agent/core/model-config.d.ts +0 -723
- package/dist/vendor/engine/runtime/coding-agent/core/model-config.js +0 -281
- package/dist/vendor/engine/runtime/coding-agent/core/model-registry.d.ts +0 -48
- package/dist/vendor/engine/runtime/coding-agent/core/model-registry.js +0 -114
- package/dist/vendor/engine/runtime/coding-agent/core/model-resolver.d.ts +0 -123
- package/dist/vendor/engine/runtime/coding-agent/core/model-resolver.js +0 -589
- package/dist/vendor/engine/runtime/coding-agent/core/model-runtime.d.ts +0 -100
- package/dist/vendor/engine/runtime/coding-agent/core/model-runtime.js +0 -603
- package/dist/vendor/engine/runtime/coding-agent/core/models-store.d.ts +0 -21
- package/dist/vendor/engine/runtime/coding-agent/core/models-store.js +0 -114
- package/dist/vendor/engine/runtime/coding-agent/core/output-guard.d.ts +0 -6
- package/dist/vendor/engine/runtime/coding-agent/core/output-guard.js +0 -88
- package/dist/vendor/engine/runtime/coding-agent/core/package-manager.d.ts +0 -212
- package/dist/vendor/engine/runtime/coding-agent/core/package-manager.js +0 -2176
- package/dist/vendor/engine/runtime/coding-agent/core/pi-manifest.d.ts +0 -7
- package/dist/vendor/engine/runtime/coding-agent/core/pi-manifest.js +0 -25
- package/dist/vendor/engine/runtime/coding-agent/core/project-trust.d.ts +0 -14
- package/dist/vendor/engine/runtime/coding-agent/core/project-trust.js +0 -58
- package/dist/vendor/engine/runtime/coding-agent/core/prompt-templates.d.ts +0 -53
- package/dist/vendor/engine/runtime/coding-agent/core/prompt-templates.js +0 -235
- package/dist/vendor/engine/runtime/coding-agent/core/provider-attribution.d.ts +0 -3
- package/dist/vendor/engine/runtime/coding-agent/core/provider-attribution.js +0 -71
- package/dist/vendor/engine/runtime/coding-agent/core/provider-composer.d.ts +0 -59
- package/dist/vendor/engine/runtime/coding-agent/core/provider-composer.js +0 -422
- package/dist/vendor/engine/runtime/coding-agent/core/radius.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/core/radius.js +0 -7
- package/dist/vendor/engine/runtime/coding-agent/core/remote-catalog-provider.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/core/remote-catalog-provider.js +0 -121
- package/dist/vendor/engine/runtime/coding-agent/core/resolve-config-value.d.ts +0 -29
- package/dist/vendor/engine/runtime/coding-agent/core/resolve-config-value.js +0 -246
- package/dist/vendor/engine/runtime/coding-agent/core/resource-loader.d.ts +0 -220
- package/dist/vendor/engine/runtime/coding-agent/core/resource-loader.js +0 -874
- package/dist/vendor/engine/runtime/coding-agent/core/runtime-credentials.d.ts +0 -14
- package/dist/vendor/engine/runtime/coding-agent/core/runtime-credentials.js +0 -38
- package/dist/vendor/engine/runtime/coding-agent/core/sdk.d.ts +0 -107
- package/dist/vendor/engine/runtime/coding-agent/core/sdk.js +0 -296
- package/dist/vendor/engine/runtime/coding-agent/core/session-cwd.d.ts +0 -18
- package/dist/vendor/engine/runtime/coding-agent/core/session-cwd.js +0 -37
- package/dist/vendor/engine/runtime/coding-agent/core/session-export.d.ts +0 -7
- package/dist/vendor/engine/runtime/coding-agent/core/session-export.js +0 -32
- package/dist/vendor/engine/runtime/coding-agent/core/session-manager.d.ts +0 -379
- package/dist/vendor/engine/runtime/coding-agent/core/session-manager.js +0 -1432
- package/dist/vendor/engine/runtime/coding-agent/core/settings-diagnostics.d.ts +0 -8
- package/dist/vendor/engine/runtime/coding-agent/core/settings-diagnostics.js +0 -20
- package/dist/vendor/engine/runtime/coding-agent/core/settings-manager.d.ts +0 -346
- package/dist/vendor/engine/runtime/coding-agent/core/settings-manager.js +0 -1032
- package/dist/vendor/engine/runtime/coding-agent/core/skills.d.ts +0 -59
- package/dist/vendor/engine/runtime/coding-agent/core/skills.js +0 -406
- package/dist/vendor/engine/runtime/coding-agent/core/slash-commands.d.ts +0 -14
- package/dist/vendor/engine/runtime/coding-agent/core/slash-commands.js +0 -27
- package/dist/vendor/engine/runtime/coding-agent/core/source-info.d.ts +0 -17
- package/dist/vendor/engine/runtime/coding-agent/core/source-info.js +0 -18
- package/dist/vendor/engine/runtime/coding-agent/core/system-prompt.d.ts +0 -70
- package/dist/vendor/engine/runtime/coding-agent/core/system-prompt.js +0 -146
- package/dist/vendor/engine/runtime/coding-agent/core/telemetry.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/core/telemetry.js +0 -8
- package/dist/vendor/engine/runtime/coding-agent/core/timings.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/core/timings.js +0 -40
- package/dist/vendor/engine/runtime/coding-agent/core/tools/render-utils.d.ts +0 -23
- package/dist/vendor/engine/runtime/coding-agent/core/tools/render-utils.js +0 -64
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/bash.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/bash.js +0 -137
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/edit.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/edit.js +0 -166
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/find.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/find.js +0 -63
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/grep.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/grep.js +0 -68
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/index.d.ts +0 -27
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/index.js +0 -46
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/ls.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/ls.js +0 -57
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/read.d.ts +0 -10
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/read.js +0 -128
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/write.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/write.js +0 -152
- package/dist/vendor/engine/runtime/coding-agent/core/trust-manager.d.ts +0 -35
- package/dist/vendor/engine/runtime/coding-agent/core/trust-manager.js +0 -202
- package/dist/vendor/engine/runtime/coding-agent/core/usage-totals.d.ts +0 -18
- package/dist/vendor/engine/runtime/coding-agent/core/usage-totals.js +0 -55
- package/dist/vendor/engine/runtime/coding-agent/extensions/index.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/extensions/index.js +0 -2
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/client.d.ts +0 -68
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/client.js +0 -312
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/huggingface.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/huggingface.js +0 -140
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/index.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/index.js +0 -218
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/provider.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/provider.js +0 -160
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/ui.d.ts +0 -41
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/ui.js +0 -415
- package/dist/vendor/engine/runtime/coding-agent/index.d.ts +0 -36
- package/dist/vendor/engine/runtime/coding-agent/index.js +0 -47
- package/dist/vendor/engine/runtime/coding-agent/main.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/main.js +0 -808
- package/dist/vendor/engine/runtime/coding-agent/migrations.d.ts +0 -32
- package/dist/vendor/engine/runtime/coding-agent/migrations.js +0 -281
- package/dist/vendor/engine/runtime/coding-agent/modes/index.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/modes/index.js +0 -7
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/bug-report.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/bug-report.js +0 -209
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/chat-viewport.d.ts +0 -19
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/chat-viewport.js +0 -27
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/armin.d.ts +0 -33
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/armin.js +0 -332
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/assistant-message.d.ts +0 -25
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/assistant-message.js +0 -157
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bash-execution.d.ts +0 -33
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bash-execution.js +0 -174
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bordered-loader.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bordered-loader.js +0 -53
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/branch-summary-message.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/branch-summary-message.js +0 -50
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/compaction-summary-message.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/compaction-summary-message.js +0 -51
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/config-selector.d.ts +0 -101
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/config-selector.js +0 -760
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/countdown-timer.d.ts +0 -13
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/countdown-timer.js +0 -32
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-editor.d.ts +0 -29
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-editor.js +0 -114
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-entry.d.ts +0 -18
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-entry.js +0 -51
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-message.d.ts +0 -21
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-message.js +0 -86
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/daxnuts.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/daxnuts.js +0 -139
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/diff.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/diff.js +0 -132
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/dynamic-border.d.ts +0 -14
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/dynamic-border.js +0 -20
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/earendil-announcement.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/earendil-announcement.js +0 -39
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-editor.d.ts +0 -23
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-editor.js +0 -102
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-input.d.ts +0 -24
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-input.js +0 -66
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-selector.d.ts +0 -26
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-selector.js +0 -86
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/first-time-setup.d.ts +0 -24
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/first-time-setup.js +0 -102
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/footer.d.ts +0 -31
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/footer.js +0 -224
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/index.d.ts +0 -33
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/index.js +0 -34
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/keybinding-hints.d.ts +0 -12
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/keybinding-hints.js +0 -35
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/login-dialog.d.ts +0 -51
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/login-dialog.js +0 -187
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/markdown-transform.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/markdown-transform.js +0 -18
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/mermaid.d.ts +0 -10
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/mermaid.js +0 -74
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/model-selector.d.ts +0 -59
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/model-selector.js +0 -360
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/oauth-selector.d.ts +0 -32
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/oauth-selector.js +0 -162
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/scoped-models-selector.d.ts +0 -45
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/scoped-models-selector.js +0 -325
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector-search.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector-search.js +0 -154
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector.d.ts +0 -94
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector.js +0 -892
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-selector.d.ts +0 -93
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-selector.js +0 -719
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-submenu.d.ts +0 -71
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-submenu.js +0 -164
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/show-images-selector.d.ts +0 -9
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/show-images-selector.js +0 -38
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/skill-invocation-message.d.ts +0 -16
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/skill-invocation-message.js +0 -53
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/status-indicator.d.ts +0 -29
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/status-indicator.js +0 -66
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/theme-selector.d.ts +0 -10
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/theme-selector.js +0 -49
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/thinking-selector.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/thinking-selector.js +0 -108
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tool-execution.d.ts +0 -79
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tool-execution.js +0 -336
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tree-selector.d.ts +0 -93
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tree-selector.js +0 -1246
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/trust-selector.d.ts +0 -22
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/trust-selector.js +0 -90
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message-selector.d.ts +0 -29
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message-selector.js +0 -113
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message.d.ts +0 -15
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message.js +0 -48
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/visual-truncate.d.ts +0 -23
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/visual-truncate.js +0 -32
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/external-editor.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/external-editor.js +0 -37
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/interactive-mode.d.ts +0 -467
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/interactive-mode.js +0 -5720
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-catalog-refresh.d.ts +0 -6
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-catalog-refresh.js +0 -33
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-search.d.ts +0 -11
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-search.js +0 -14
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/session-share.d.ts +0 -17
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/session-share.js +0 -187
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/dark.json +0 -91
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/light.json +0 -90
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-controller.d.ts +0 -40
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-controller.js +0 -129
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-json.d.ts +0 -83
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-json.js +0 -129
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-schema.json +0 -356
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme.d.ts +0 -130
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme.js +0 -990
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/tui-renderer.d.ts +0 -20
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/tui-renderer.js +0 -65
- package/dist/vendor/engine/runtime/coding-agent/modes/json-event.d.ts +0 -33
- package/dist/vendor/engine/runtime/coding-agent/modes/json-event.js +0 -28
- package/dist/vendor/engine/runtime/coding-agent/modes/print-mode.d.ts +0 -27
- package/dist/vendor/engine/runtime/coding-agent/modes/print-mode.js +0 -141
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/jsonl.d.ts +0 -16
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/jsonl.js +0 -48
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-client.d.ts +0 -253
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-client.js +0 -494
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-mode.d.ts +0 -19
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-mode.js +0 -656
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-types.d.ts +0 -468
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-types.js +0 -7
- package/dist/vendor/engine/runtime/coding-agent/package-manager-cli.d.ts +0 -8
- package/dist/vendor/engine/runtime/coding-agent/package-manager-cli.js +0 -960
- package/dist/vendor/engine/runtime/coding-agent/utils/abort.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/utils/abort.js +0 -47
- package/dist/vendor/engine/runtime/coding-agent/utils/ansi.d.ts +0 -1
- package/dist/vendor/engine/runtime/coding-agent/utils/ansi.js +0 -51
- package/dist/vendor/engine/runtime/coding-agent/utils/changelog.d.ts +0 -21
- package/dist/vendor/engine/runtime/coding-agent/utils/changelog.js +0 -164
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-command.d.ts +0 -6
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-command.js +0 -44
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-image.d.ts +0 -10
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-image.js +0 -216
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard.d.ts +0 -3
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard.js +0 -150
- package/dist/vendor/engine/runtime/coding-agent/utils/frontmatter.d.ts +0 -7
- package/dist/vendor/engine/runtime/coding-agent/utils/frontmatter.js +0 -26
- package/dist/vendor/engine/runtime/coding-agent/utils/fs-watch.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/utils/fs-watch.js +0 -24
- package/dist/vendor/engine/runtime/coding-agent/utils/git.d.ts +0 -25
- package/dist/vendor/engine/runtime/coding-agent/utils/git.js +0 -194
- package/dist/vendor/engine/runtime/coding-agent/utils/html.d.ts +0 -6
- package/dist/vendor/engine/runtime/coding-agent/utils/html.js +0 -39
- package/dist/vendor/engine/runtime/coding-agent/utils/json.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/utils/json.js +0 -6
- package/dist/vendor/engine/runtime/coding-agent/utils/open-browser.d.ts +0 -8
- package/dist/vendor/engine/runtime/coding-agent/utils/open-browser.js +0 -21
- package/dist/vendor/engine/runtime/coding-agent/utils/pi-user-agent.d.ts +0 -1
- package/dist/vendor/engine/runtime/coding-agent/utils/pi-user-agent.js +0 -4
- package/dist/vendor/engine/runtime/coding-agent/utils/sleep.d.ts +0 -4
- package/dist/vendor/engine/runtime/coding-agent/utils/sleep.js +0 -16
- package/dist/vendor/engine/runtime/coding-agent/utils/syntax-highlight.d.ts +0 -12
- package/dist/vendor/engine/runtime/coding-agent/utils/syntax-highlight.js +0 -176
- package/dist/vendor/engine/runtime/coding-agent/utils/tool-result-images.d.ts +0 -20
- package/dist/vendor/engine/runtime/coding-agent/utils/tool-result-images.js +0 -47
- package/dist/vendor/engine/runtime/coding-agent/utils/version-check.d.ts +0 -18
- package/dist/vendor/engine/runtime/coding-agent/utils/version-check.js +0 -78
- package/dist/vendor/engine/runtime/coding-agent/utils/windows-self-update.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/utils/windows-self-update.js +0 -76
- package/dist/vendor/engine/runtime/coding-agent/utils/wsl.d.ts +0 -2
- package/dist/vendor/engine/runtime/coding-agent/utils/wsl.js +0 -14
- package/dist/vendor/engine/runtime/coding-agent/utils/zip.d.ts +0 -6
- package/dist/vendor/engine/runtime/coding-agent/utils/zip.js +0 -59
- package/dist/vendor/engine/runtime/tui/alt-screen-search.d.ts +0 -45
- package/dist/vendor/engine/runtime/tui/alt-screen-search.js +0 -281
- package/dist/vendor/engine/runtime/tui/autocomplete.d.ts +0 -56
- package/dist/vendor/engine/runtime/tui/autocomplete.js +0 -671
- package/dist/vendor/engine/runtime/tui/components/alt-screen-flash.d.ts +0 -12
- package/dist/vendor/engine/runtime/tui/components/alt-screen-flash.js +0 -36
- package/dist/vendor/engine/runtime/tui/components/box.d.ts +0 -23
- package/dist/vendor/engine/runtime/tui/components/box.js +0 -132
- package/dist/vendor/engine/runtime/tui/components/cancellable-loader.d.ts +0 -21
- package/dist/vendor/engine/runtime/tui/components/cancellable-loader.js +0 -34
- package/dist/vendor/engine/runtime/tui/components/editor.d.ts +0 -259
- package/dist/vendor/engine/runtime/tui/components/editor.js +0 -2041
- package/dist/vendor/engine/runtime/tui/components/h-stack.d.ts +0 -6
- package/dist/vendor/engine/runtime/tui/components/h-stack.js +0 -42
- package/dist/vendor/engine/runtime/tui/components/image.d.ts +0 -27
- package/dist/vendor/engine/runtime/tui/components/image.js +0 -89
- package/dist/vendor/engine/runtime/tui/components/input.d.ts +0 -47
- package/dist/vendor/engine/runtime/tui/components/input.js +0 -416
- package/dist/vendor/engine/runtime/tui/components/loader.d.ts +0 -32
- package/dist/vendor/engine/runtime/tui/components/loader.js +0 -75
- package/dist/vendor/engine/runtime/tui/components/markdown.d.ts +0 -102
- package/dist/vendor/engine/runtime/tui/components/markdown.js +0 -810
- package/dist/vendor/engine/runtime/tui/components/mouse-region.d.ts +0 -11
- package/dist/vendor/engine/runtime/tui/components/mouse-region.js +0 -20
- package/dist/vendor/engine/runtime/tui/components/scroll-view.d.ts +0 -58
- package/dist/vendor/engine/runtime/tui/components/scroll-view.js +0 -194
- package/dist/vendor/engine/runtime/tui/components/select-list.d.ts +0 -52
- package/dist/vendor/engine/runtime/tui/components/select-list.js +0 -205
- package/dist/vendor/engine/runtime/tui/components/settings-list.d.ts +0 -59
- package/dist/vendor/engine/runtime/tui/components/settings-list.js +0 -251
- package/dist/vendor/engine/runtime/tui/components/spacer.d.ts +0 -11
- package/dist/vendor/engine/runtime/tui/components/spacer.js +0 -22
- package/dist/vendor/engine/runtime/tui/components/stack.d.ts +0 -31
- package/dist/vendor/engine/runtime/tui/components/stack.js +0 -110
- package/dist/vendor/engine/runtime/tui/components/text.d.ts +0 -18
- package/dist/vendor/engine/runtime/tui/components/text.js +0 -89
- package/dist/vendor/engine/runtime/tui/components/truncated-text.d.ts +0 -12
- package/dist/vendor/engine/runtime/tui/components/truncated-text.js +0 -50
- package/dist/vendor/engine/runtime/tui/components/v-stack.d.ts +0 -7
- package/dist/vendor/engine/runtime/tui/components/v-stack.js +0 -25
- package/dist/vendor/engine/runtime/tui/editor-component.d.ts +0 -38
- package/dist/vendor/engine/runtime/tui/editor-component.js +0 -1
- package/dist/vendor/engine/runtime/tui/fuzzy.d.ts +0 -15
- package/dist/vendor/engine/runtime/tui/fuzzy.js +0 -110
- package/dist/vendor/engine/runtime/tui/index.d.ts +0 -32
- package/dist/vendor/engine/runtime/tui/index.js +0 -44
- package/dist/vendor/engine/runtime/tui/keybindings.d.ts +0 -272
- package/dist/vendor/engine/runtime/tui/keybindings.js +0 -232
- package/dist/vendor/engine/runtime/tui/keys.d.ts +0 -183
- package/dist/vendor/engine/runtime/tui/keys.js +0 -1173
- package/dist/vendor/engine/runtime/tui/kill-ring.d.ts +0 -27
- package/dist/vendor/engine/runtime/tui/kill-ring.js +0 -43
- package/dist/vendor/engine/runtime/tui/latex.d.ts +0 -9
- package/dist/vendor/engine/runtime/tui/latex.js +0 -1377
- package/dist/vendor/engine/runtime/tui/layout-node.d.ts +0 -39
- package/dist/vendor/engine/runtime/tui/layout-node.js +0 -5
- package/dist/vendor/engine/runtime/tui/layout.d.ts +0 -41
- package/dist/vendor/engine/runtime/tui/layout.js +0 -343
- package/dist/vendor/engine/runtime/tui/native-modifiers.d.ts +0 -3
- package/dist/vendor/engine/runtime/tui/native-modifiers.js +0 -12
- package/dist/vendor/engine/runtime/tui/native-module-path.d.ts +0 -6
- package/dist/vendor/engine/runtime/tui/native-module-path.js +0 -18
- package/dist/vendor/engine/runtime/tui/native-platform.d.ts +0 -17
- package/dist/vendor/engine/runtime/tui/native-platform.js +0 -41
- package/dist/vendor/engine/runtime/tui/stdin-buffer.d.ts +0 -55
- package/dist/vendor/engine/runtime/tui/stdin-buffer.js +0 -365
- package/dist/vendor/engine/runtime/tui/terminal-colors.d.ts +0 -9
- package/dist/vendor/engine/runtime/tui/terminal-colors.js +0 -58
- package/dist/vendor/engine/runtime/tui/terminal-image.d.ts +0 -117
- package/dist/vendor/engine/runtime/tui/terminal-image.js +0 -549
- package/dist/vendor/engine/runtime/tui/terminal.d.ts +0 -122
- package/dist/vendor/engine/runtime/tui/terminal.js +0 -441
- package/dist/vendor/engine/runtime/tui/tui-alt-screen.d.ts +0 -159
- package/dist/vendor/engine/runtime/tui/tui-alt-screen.js +0 -1507
- package/dist/vendor/engine/runtime/tui/tui-main-screen.d.ts +0 -38
- package/dist/vendor/engine/runtime/tui/tui-main-screen.js +0 -593
- package/dist/vendor/engine/runtime/tui/tui.d.ts +0 -385
- package/dist/vendor/engine/runtime/tui/tui.js +0 -1054
- package/dist/vendor/engine/runtime/tui/undo-stack.d.ts +0 -16
- package/dist/vendor/engine/runtime/tui/undo-stack.js +0 -24
- package/dist/vendor/engine/runtime/tui/utils.d.ts +0 -100
- package/dist/vendor/engine/runtime/tui/utils.js +0 -1203
- package/dist/vendor/engine/runtime/tui/word-navigation.d.ts +0 -24
- package/dist/vendor/engine/runtime/tui/word-navigation.js +0 -95
- package/tests/graphiti-test-plan.md +0 -359
- package/tests/mock-graphiti.mjs +0 -106
- /package/dist/vendor/engine/runtime/{agent/harness/tools/tool-context.js → coding-agent/core/tools/tool-definition.js} +0 -0
|
@@ -1,39 +1,72 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { commandLine, declaredCheckKind, isCheckCall, isReplaySafeCheck, isVerificationCheck, replayableCheck, stripOutputFilter } from './checks.js';
|
|
3
3
|
export const PREPARE_FINISH = 'prepare_finish';
|
|
4
|
-
export const FACT_CONTINUATION_GUIDANCE = 'Minimize model turns: batch independent reads and related file writes. Do not spend a turn only announcing a plan. When prepare_finish is available,
|
|
4
|
+
export const FACT_CONTINUATION_GUIDANCE = 'Minimize model turns: batch independent reads and related file writes. Do not spend a turn only announcing a plan. When prepare_finish is available, finish through it: put it LAST in the batch that makes your final edits, with the commands that verify the work and your final summary. The runtime runs them and completes the task without another model call, so do not run those commands yourself first, do not call complete_agent afterwards and do not add discretionary QA: one passing run of the checks the project already has is sufficient, so do not write throwaway scripts to prove the same thing again. If the verification is not a command, verify first, then call prepare_finish alone with checks []. After you edit files the runtime runs your latest check again by itself, so do not spend a turn rerunning it or marking todos done. Keep the final summary short, whatever other formatting guidance says: one or two sentences with the outcome, then at most five short bullets on what changed and how it was verified, about 100 words in all, with no headings, no code blocks, no restated diff and no remarks on things the task did not ask about (such as a pull request that was never requested), unless the user asked for that content. User instructions, workspace requirements and graph completion contracts still apply.';
|
|
5
|
+
/** What the model writes once as its final answer; a retry reuses it instead of sending it again. */
|
|
6
|
+
export const FINISH_SUMMARY_DESCRIPTION = 'Final answer shown to the user, as Markdown with \\n line breaks: one or two sentences with the outcome, then at most five short bullets on what changed and how it was verified. About 100 words, no headings. Omit it on a retry to reuse the one already saved.';
|
|
5
7
|
/** The tool description, naming the shell the model actually has. */
|
|
6
8
|
export function prepareFinishDescription(shell = 'PowerShell') {
|
|
7
|
-
return `
|
|
9
|
+
return `Finish the task. Call LAST in the batch that makes your final edits. checks: the commands that verify the work (tests, build, lint, typecheck), one command per entry, written exactly as you would run them with ${shell}, e.g. ["npm run build", "npm test"]; chain steps with && if needed, but no pipes, ";" or "||" (output is already bounded). summary: your final answer. The runtime runs the checks through normal approvals and, when all pass, closes the open todos and submits the summary without another coding-model call. If a check fails you receive its output: fix the problem and call prepare_finish again with the checks only, and the saved summary is reused unless you send a new one. After verifying some other way, call it alone with checks [] to submit.`;
|
|
8
10
|
}
|
|
11
|
+
const DEFAULT_CHECK_TIMEOUT_MS = 300_000;
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
13
|
+
* Brings what a model sends into the one shape `stage` validates, repairing slips that would
|
|
14
|
+
* otherwise cost a whole coding-model turn without changing what is verified: a check written as a
|
|
15
|
+
* command line (the advertised form), as `{command}`, with its arguments beside its name or with a
|
|
16
|
+
* note beside it; an output filter that would hide the exit status; the final answer written flat
|
|
17
|
+
* (`summary`) or as a JSON string; and evidence lines in `tests`, which the runtime fills in itself.
|
|
18
|
+
* Everything else is left for validation to reject.
|
|
14
19
|
*/
|
|
15
20
|
export function prepareFinishArguments(args, tools) {
|
|
16
21
|
if (!object(args))
|
|
17
22
|
return args;
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
const { checks: rawChecks, completion: nested, summary, outcome, output, artifacts, tests: _tests, timeoutMs, ...rest } = args;
|
|
24
|
+
const next = { ...rest };
|
|
25
|
+
const timeout = typeof timeoutMs === 'number' && Number.isInteger(timeoutMs) && timeoutMs > 0 ? timeoutMs : DEFAULT_CHECK_TIMEOUT_MS;
|
|
26
|
+
const shellCall = (command) => !tools.shell || !command.trim() ? command : tools.shell === 'shell'
|
|
27
|
+
? { name: 'shell', arguments: { command: stripOutputFilter(command), timeout_ms: Math.min(timeout, 120_000) } }
|
|
28
|
+
: { name: tools.shell, arguments: { command: stripOutputFilter(command), timeout: Math.min(timeout, 600_000) } };
|
|
29
|
+
const list = typeof rawChecks === 'string' ? [rawChecks] : rawChecks ?? [];
|
|
30
|
+
next.checks = !Array.isArray(list) ? list : list.map((raw) => {
|
|
31
|
+
if (typeof raw === 'string')
|
|
32
|
+
return shellCall(raw);
|
|
33
|
+
if (!object(raw))
|
|
34
|
+
return raw;
|
|
35
|
+
if (typeof raw.name !== 'string')
|
|
36
|
+
return typeof raw.command === 'string' && Object.keys(raw).every(k => ['command', 'timeout', 'description', 'justification'].includes(k)) ? shellCall(raw.command) : raw;
|
|
37
|
+
const { justification: _justification, description: _description, ...item } = raw;
|
|
38
|
+
let { name, arguments: given, ...fields } = item;
|
|
39
|
+
if (given === undefined) {
|
|
40
|
+
given = fields;
|
|
41
|
+
fields = {};
|
|
42
|
+
}
|
|
43
|
+
if (!tools.has(name) && tools.shell && object(given) && !Object.keys(given).length && /\s/.test(name.trim())) {
|
|
44
|
+
given = { command: name.trim() };
|
|
45
|
+
name = tools.shell;
|
|
46
|
+
}
|
|
47
|
+
// A label where the tool name belongs, with the command beside it: the shell is what was meant.
|
|
48
|
+
if (!tools.has(name) && tools.shell && object(given) && typeof given.command === 'string')
|
|
49
|
+
name = tools.shell;
|
|
50
|
+
if (name === tools.shell && object(given) && typeof given.command === 'string')
|
|
51
|
+
given = { ...given, command: stripOutputFilter(given.command) };
|
|
52
|
+
return { name, arguments: given, ...fields };
|
|
53
|
+
});
|
|
54
|
+
let completion = nested;
|
|
55
|
+
if (typeof completion === 'string') {
|
|
56
|
+
const text = completion;
|
|
57
|
+
try {
|
|
58
|
+
const parsed = JSON.parse(text);
|
|
59
|
+
completion = object(parsed) ? parsed : { summary: text };
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
completion = { summary: text };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const flat = Object.fromEntries(Object.entries({ summary, outcome, output, artifacts }).filter(([, value]) => value !== undefined));
|
|
66
|
+
if (object(completion) || Object.keys(flat).length)
|
|
67
|
+
next.completion = { ...(object(completion) ? completion : {}), ...flat, tests: [] };
|
|
68
|
+
else if (completion !== undefined)
|
|
69
|
+
next.completion = completion;
|
|
37
70
|
return next;
|
|
38
71
|
}
|
|
39
72
|
const object = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
@@ -47,6 +80,8 @@ const metadata = new Set([PREPARE_FINISH, 'update_todos', 'update_widget']);
|
|
|
47
80
|
const probability = (value, bar) => value === undefined || !Number.isFinite(value) || value < 0 || value > 1 ? undefined : value >= bar - 1e-9 ? true : value <= 1 - bar + 1e-9 ? false : undefined;
|
|
48
81
|
const concrete = (o) => ({ name: o.call.name, arguments: structuredClone(o.args) });
|
|
49
82
|
const description = (call) => commandLine(call.arguments) ?? call.name;
|
|
83
|
+
/** What a failure looks like in the output of a command no runner pattern recognizes, even when it exits 0. */
|
|
84
|
+
const OPAQUE_FAILURE_TEXT = /Traceback \(most recent call last\)|\b(?:AssertionError|assertion failed|Segmentation fault|core dumped|panicked at|Unhandled(?:Promise)?Rejection|not ok)\b|(?:^|\n)\s*(?:error|fatal)\b[:\s]|\b[1-9]\d* (?:errors?|failures?)\b/i;
|
|
50
85
|
const FAILURE_TEXT = /(?:^|\n)\s*(?:Exit code: [1-9]\d*|[ℹ#]\s*fail\s+[1-9]\d*|Test Suites:\s*[1-9]\d* failed)|\b[1-9]\d* failed\b|\b(?:FAIL|FAILED)\b|error TS\d+/m;
|
|
51
86
|
/** A JSON report's own verdict; null when the output is not a report that decides one. */
|
|
52
87
|
function structuredVerdict(text) {
|
|
@@ -145,6 +180,10 @@ export function taskConstraints(task, nodeInstruction = '') {
|
|
|
145
180
|
kinds.add('typecheck');
|
|
146
181
|
return { noTests, noChecks, commands: noChecks ? [] : commands.filter(c => !noTests || checkKind(c) !== 'test'), kinds };
|
|
147
182
|
}
|
|
183
|
+
/** A follow-up check is worth a turn only while it is cheap: at most this often, and only a quick one. */
|
|
184
|
+
const FOLLOW_UP_LIMIT = 8;
|
|
185
|
+
const FOLLOW_UP_MAX_MS = 60_000;
|
|
186
|
+
const VERIFICATION_TODO = /^(?:run|rerun|re-run|verify|test|check|lint|build|typecheck|smoke)(?:[ :\-]|$)/i;
|
|
148
187
|
function checkKind(line) {
|
|
149
188
|
if (/\b(?:tsc|typecheck|type-check|mypy)\b/.test(line))
|
|
150
189
|
return 'typecheck';
|
|
@@ -175,6 +214,15 @@ export class FactContinuations {
|
|
|
175
214
|
constraints;
|
|
176
215
|
syntheticCount = 0;
|
|
177
216
|
finishHint = false;
|
|
217
|
+
/** The model's own most recent check, in the form the runtime may run again after an edit. */
|
|
218
|
+
lastCheck;
|
|
219
|
+
followUps = 0;
|
|
220
|
+
followUpPassed;
|
|
221
|
+
nextNudge;
|
|
222
|
+
/** The final answer the model already wrote; a later plan may omit it instead of sending it again. */
|
|
223
|
+
draft;
|
|
224
|
+
/** Commands the model named as its verification that no runner pattern recognizes, by check key. */
|
|
225
|
+
declared = new Map();
|
|
178
226
|
constructor(options) {
|
|
179
227
|
this.options = options;
|
|
180
228
|
this.task = options.task;
|
|
@@ -182,6 +230,16 @@ export class FactContinuations {
|
|
|
182
230
|
}
|
|
183
231
|
get finishing() { return this.finishHint; }
|
|
184
232
|
get proposed() { return !!this.plan || !!this.staged; }
|
|
233
|
+
/**
|
|
234
|
+
* Where the model stands when nothing was run for it: it just edited files and has not checked
|
|
235
|
+
* them, or its own check just failed. In both places the cheapest next move is one plan that
|
|
236
|
+
* carries the checks and the answer, and a reminder there is what makes the model take it.
|
|
237
|
+
*/
|
|
238
|
+
get nudge() { return this.nextNudge; }
|
|
239
|
+
/** The check the runtime ran after the latest edits, when it passed on the current workspace. */
|
|
240
|
+
get followUp() { return this.followUpPassed; }
|
|
241
|
+
/** The model already wrote its final answer in an earlier plan. */
|
|
242
|
+
get hasDraft() { return !!this.draft; }
|
|
185
243
|
async emit(action, data = {}) {
|
|
186
244
|
await this.options.emit('efficiency.facts.action', { action, ...data });
|
|
187
245
|
}
|
|
@@ -197,6 +255,10 @@ export class FactContinuations {
|
|
|
197
255
|
this.taskNeedsChecksSource = 'deterministic';
|
|
198
256
|
this.checks.clear();
|
|
199
257
|
this.revision++;
|
|
258
|
+
this.draft = undefined;
|
|
259
|
+
this.declared.clear();
|
|
260
|
+
this.lastCheck = undefined;
|
|
261
|
+
this.followUpPassed = undefined;
|
|
200
262
|
if (update)
|
|
201
263
|
this.task += `\nLatest task update:\n${update}`;
|
|
202
264
|
this.constraints = taskConstraints(this.task, [this.options.nodeInstruction, this.options.workspaceInstructions].filter(Boolean).join('\n'));
|
|
@@ -209,7 +271,7 @@ export class FactContinuations {
|
|
|
209
271
|
this.pendingAutomatic = undefined;
|
|
210
272
|
this.syntheticCount = 0;
|
|
211
273
|
}
|
|
212
|
-
stage(args, lastInBatch) {
|
|
274
|
+
stage(args, lastInBatch, alone = false) {
|
|
213
275
|
this.plan = this.staged = undefined;
|
|
214
276
|
this.queued = undefined;
|
|
215
277
|
if (this.taskUpdated)
|
|
@@ -222,26 +284,46 @@ export class FactContinuations {
|
|
|
222
284
|
if (!lastInBatch)
|
|
223
285
|
throw new Error('prepare_finish must be the final call in the batch.');
|
|
224
286
|
if (Object.keys(args).some(k => !['checks', 'completion', 'verificationTodoIds'].includes(k)) || !Array.isArray(args.checks)
|
|
225
|
-
|| args.checks.length > 8 || !object(args.completion) || Buffer.byteLength(JSON.stringify(args)) > 16_384)
|
|
287
|
+
|| args.checks.length > 8 || (args.completion !== undefined && !object(args.completion)) || Buffer.byteLength(JSON.stringify(args)) > 16_384)
|
|
226
288
|
throw new Error('Invalid finish plan (maximum 8 checks and 16 KiB).');
|
|
227
|
-
const
|
|
228
|
-
if (Object.keys(
|
|
289
|
+
const given = args.completion;
|
|
290
|
+
if (given && Object.keys(given).some(k => !['summary', 'tests', 'outcome', 'output', 'artifacts'].includes(k)))
|
|
229
291
|
throw new Error('Unknown completion field.');
|
|
292
|
+
// A retry sends only what changed: the saved answer supplies the rest.
|
|
293
|
+
const value = { ...this.draft, ...given, tests: given?.tests ?? [] };
|
|
230
294
|
if (typeof value.summary !== 'string' || !value.summary.trim() || !Array.isArray(value.tests) || value.tests.length) {
|
|
231
295
|
throw new Error('Provide the complete proposed summary and tests: []; observed check evidence is filled in by the runtime.');
|
|
232
296
|
}
|
|
297
|
+
this.draft = structuredClone(value);
|
|
298
|
+
try {
|
|
299
|
+
this.stagePlan(args, value, alone);
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
// The answer is already written and kept, so the retry costs a few tokens, not the answer again.
|
|
303
|
+
throw new Error(`${error instanceof Error ? error.message : String(error)} Your summary is saved: call prepare_finish again with only the corrected checks.`);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
stagePlan(args, value, alone) {
|
|
307
|
+
const declared = new Map();
|
|
233
308
|
const checks = args.checks.map((input) => {
|
|
234
309
|
if (!object(input) || Object.keys(input).some(k => !['name', 'arguments'].includes(k)) || typeof input.name !== 'string' || !object(input.arguments))
|
|
235
310
|
throw new Error('A check needs a name and exact arguments.');
|
|
236
311
|
const tool = this.options.catalog(input.name);
|
|
237
312
|
if (!tool)
|
|
238
313
|
throw new Error(`Unknown or unavailable tool "${input.name.slice(0, 80)}": a check is the shell tool's name with its arguments, e.g. {"name": "<shell>", "arguments": {"command": "npm test"}}.`);
|
|
314
|
+
const call = { name: input.name, arguments: structuredClone(input.arguments) };
|
|
239
315
|
if (!isVerificationCheck(input.name, tool.family, input.arguments)) {
|
|
240
|
-
//
|
|
241
|
-
|
|
242
|
-
|
|
316
|
+
// A command the model names as its verification can still be prepared when its exit status
|
|
317
|
+
// is faithful; what an exit 0 then proves depends on whether a known runner is in the line.
|
|
318
|
+
const line = commandLine(input.arguments);
|
|
319
|
+
const kind = tool.family === 'shell' && line && !('action' in input.arguments) ? declaredCheckKind(line) : undefined;
|
|
320
|
+
if (!kind) {
|
|
321
|
+
// Say which check and what to do instead: a retried plan costs a whole coding-model turn.
|
|
322
|
+
const shown = (line ?? input.name).replace(/\s+/g, ' ').slice(0, 160);
|
|
323
|
+
throw new Error(`"${shown}" is not a standalone command whose exit status reports the result, so it cannot be prepared. Give each command its own check and chain steps with && only: no ;, ||, pipes, redirects or substitutions, and no mode that changes files (--fix, --write, -u); run such a command yourself before preparing.`);
|
|
324
|
+
}
|
|
325
|
+
declared.set(checkKey(call), kind);
|
|
243
326
|
}
|
|
244
|
-
const call = { name: input.name, arguments: structuredClone(input.arguments) };
|
|
245
327
|
if (this.constraints.noChecks || this.constraints.noTests && (checkKind(description(call)) === 'test' || /^qa\.(?:fast|test|deep)$/.test(call.name))) {
|
|
246
328
|
throw new Error('This check conflicts with the user\'s explicit verification opt-out.');
|
|
247
329
|
}
|
|
@@ -253,46 +335,53 @@ export class FactContinuations {
|
|
|
253
335
|
if (!Array.isArray(ids) || ids.length > 32 || ids.some(id => typeof id !== 'string') || new Set(ids).size !== ids.length)
|
|
254
336
|
throw new Error('Invalid verification todo ids.');
|
|
255
337
|
const todos = this.options.todos();
|
|
256
|
-
if (ids.some(id => { const todo = todos.find(t => t.id === id); return todo && !/^(?:run|rerun|re-run|verify|test|check|lint|build|typecheck|smoke)[ :\-]/i.test(todo.text); }))
|
|
257
|
-
throw new Error('Only explicitly verification-only todos may be completed automatically.');
|
|
258
338
|
if (ids.some(id => !todos.some(todo => todo.id === id)))
|
|
259
339
|
throw new Error('Verification todo does not exist.');
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
if (
|
|
263
|
-
throw new Error('
|
|
340
|
+
// Calling prepare_finish says the work is done, so the item in progress closes with it. An item
|
|
341
|
+
// that was never started is unfinished work unless it only names the verification itself.
|
|
342
|
+
if (todos.some(todo => todo.status === 'pending' && !VERIFICATION_TODO.test(todo.text)))
|
|
343
|
+
throw new Error('A todo was never started. Finish it, or update the todo list, before preparing completion.');
|
|
344
|
+
const closing = todos.filter(todo => todo.status !== 'completed').map(todo => todo.id);
|
|
345
|
+
const direct = alone && !checks.length;
|
|
264
346
|
const alreadyPassed = [...this.checks.values()].filter(e => e.passed && e.pure && e.revision === this.revision).map(e => e.call);
|
|
265
|
-
if (!this.coversRequirements([...alreadyPassed, ...checks]))
|
|
347
|
+
if (!direct && !this.coversRequirements([...alreadyPassed, ...checks]))
|
|
266
348
|
throw new Error('The plan omits verification explicitly required by the task or node.');
|
|
267
|
-
|
|
349
|
+
for (const [key, kind] of declared)
|
|
350
|
+
this.declared.set(key, kind);
|
|
351
|
+
this.staged = { checks, completion: structuredClone(value), verificationTodoIds: closing, permission: this.options.permission(), revision: this.revision, direct };
|
|
268
352
|
}
|
|
269
353
|
coversRequirements(calls) {
|
|
270
354
|
const commands = new Set(calls.map(description));
|
|
271
355
|
const kinds = new Set(calls.map(c => checkKind(description(c))));
|
|
272
356
|
return this.constraints.commands.every(command => commands.has(command)) && [...this.constraints.kinds].every(kind => kinds.has(kind));
|
|
273
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* The current workspace is verified: a check passed on it, and no earlier failure is left
|
|
360
|
+
* unanswered. A failed test, lint or typecheck is answered by a later pass of the same kind on the
|
|
361
|
+
* current workspace; a failed build or other command by any later pass, since a check that ran
|
|
362
|
+
* built what it needed. A command whose result is unknown proves nothing either way: the model
|
|
363
|
+
* saw its output and named the checks that decide.
|
|
364
|
+
*/
|
|
274
365
|
verified() {
|
|
275
366
|
const rows = [...this.checks.values()];
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const superseded = (e) => {
|
|
281
|
-
const runners = checkRunners(commandLine(e.call.arguments) ?? '');
|
|
282
|
-
return !!runners?.length && runners.every(command => rows.some(r => current(r) && r.seq > e.seq
|
|
283
|
-
&& r.call.name === e.call.name && description(r.call) === command));
|
|
284
|
-
};
|
|
285
|
-
return rows.length > 0 && rows.every(e => current(e) || !e.pure && superseded(e)) && this.coversRequirements(rows.map(e => e.call));
|
|
367
|
+
const passing = rows.filter(e => e.passed === true && e.pure && e.revision === this.revision);
|
|
368
|
+
const kind = (e) => checkKind(description(e.call));
|
|
369
|
+
const answered = (e) => passing.some(p => p.seq > e.seq && (kind(p) === kind(e) || ['check', 'build'].includes(kind(e))));
|
|
370
|
+
return passing.length > 0 && rows.every(e => e.passed !== false || answered(e)) && this.coversRequirements(passing.map(e => e.call));
|
|
286
371
|
}
|
|
287
372
|
async ask(input, signal) {
|
|
373
|
+
return (await this.consult(input, signal)).value;
|
|
374
|
+
}
|
|
375
|
+
/** `answered` is false when the service gave no answer at all, as opposed to an unsure one. */
|
|
376
|
+
async consult(input, signal) {
|
|
288
377
|
signal.throwIfAborted();
|
|
289
378
|
if (this.options.remoteFactsEnabled === false)
|
|
290
|
-
return undefined;
|
|
379
|
+
return { answered: false, value: undefined };
|
|
291
380
|
const start = performance.now();
|
|
292
381
|
const value = await this.options.fact(input, signal);
|
|
293
382
|
signal.throwIfAborted();
|
|
294
383
|
await this.options.emit('efficiency.facts.answered', { waitMs: Math.round(performance.now() - start), asked: [input.id], answered: value === undefined ? 0 : 1 });
|
|
295
|
-
return probability(value, input.id === 'checks_passed' ? .95 : .9);
|
|
384
|
+
return { answered: value !== undefined, value: probability(value, input.id === 'checks_passed' ? .95 : .9) };
|
|
296
385
|
}
|
|
297
386
|
async needsChecks(signal) {
|
|
298
387
|
if (this.constraints.noChecks) {
|
|
@@ -316,42 +405,72 @@ export class FactContinuations {
|
|
|
316
405
|
async observe(batch, signal) {
|
|
317
406
|
signal.throwIfAborted();
|
|
318
407
|
this.finishHint = false;
|
|
408
|
+
this.followUpPassed = undefined;
|
|
409
|
+
this.nextNudge = undefined;
|
|
319
410
|
const automatic = this.pendingAutomatic;
|
|
320
411
|
this.pendingAutomatic = undefined;
|
|
321
412
|
const failed = batch.filter(o => o.isError || !o.executionSucceeded);
|
|
322
413
|
if (failed.some(o => o.readOnly || metadata.has(o.call.name)))
|
|
323
414
|
this.revision++;
|
|
324
415
|
const work = batch.filter(o => !metadata.has(o.call.name));
|
|
325
|
-
let wrote = false;
|
|
416
|
+
let wrote = false, modelChecked = false;
|
|
326
417
|
for (const observation of work) {
|
|
327
418
|
const call = concrete(observation);
|
|
328
|
-
const
|
|
329
|
-
const
|
|
419
|
+
const key = checkKey(call);
|
|
420
|
+
const declared = this.declared.get(key);
|
|
421
|
+
const check = !!declared || isCheckCall(call.name, observation.family, call.arguments);
|
|
422
|
+
const pure = !!declared || isVerificationCheck(call.name, observation.family, call.arguments);
|
|
330
423
|
if (!observation.readOnly && !pure) {
|
|
331
424
|
this.revision++; // Failed writes/commands may have partially mutated the workspace too.
|
|
332
425
|
wrote ||= observation.family === 'filesystem-write' && !observation.isError && observation.executionSucceeded;
|
|
333
426
|
}
|
|
334
427
|
if (!check)
|
|
335
428
|
continue;
|
|
429
|
+
if (!automatic) {
|
|
430
|
+
modelChecked = true;
|
|
431
|
+
// What a later edit is followed by: the model's own latest check, never one the runtime chose.
|
|
432
|
+
const line = observation.family === 'shell' && typeof call.arguments.command === 'string' ? call.arguments.command : undefined;
|
|
433
|
+
const replay = line ? replayableCheck(line) : undefined;
|
|
434
|
+
if (replay)
|
|
435
|
+
this.lastCheck = { call: { name: call.name, arguments: { ...call.arguments, command: replay } }, durationMs: observation.durationMs };
|
|
436
|
+
}
|
|
336
437
|
let passed = pure ? localCheckResult(observation) : undefined;
|
|
438
|
+
// Exit 0 of a command nothing recognizes does not settle it: its output has to say it passed.
|
|
439
|
+
// Only a clean exit qualifies at all; a report that leaves its own verdict open (every check
|
|
440
|
+
// skipped) or names a failure never reaches this point as a pass.
|
|
441
|
+
const cleanExit = declared === 'opaque' && passed === true;
|
|
442
|
+
if (cleanExit)
|
|
443
|
+
passed = undefined;
|
|
337
444
|
let source = 'deterministic';
|
|
338
445
|
// Only a result that can enable a continuation merits an external interpretation. A failed
|
|
339
446
|
// execution is known false; a compound command never proves the final workspace verified.
|
|
340
447
|
if (pure && passed === undefined && !observation.truncated && !failed.length && (this.plan || this.staged || this.options.todos().length > 0)) {
|
|
341
|
-
|
|
448
|
+
const answer = await this.consult({ id: 'checks_passed', state: { tool_results: [{ tool: call.name, command: description(call), succeeded: observation.executionSucceeded && !observation.isError, output: observation.output }] } }, signal);
|
|
449
|
+
passed = answer.value;
|
|
342
450
|
if (passed !== undefined)
|
|
343
451
|
source = 'jev';
|
|
452
|
+
// No answer at all (the service is off, unreachable or does not speak this protocol) is not
|
|
453
|
+
// an unsure answer. What remains is what the model itself would go by: the command it named
|
|
454
|
+
// as its check exited 0 and nothing in its output reads as a failure.
|
|
455
|
+
else if (!answer.answered && cleanExit && !OPAQUE_FAILURE_TEXT.test(observation.output))
|
|
456
|
+
passed = true;
|
|
344
457
|
}
|
|
345
|
-
const key = checkKey(call);
|
|
346
458
|
this.checks.delete(key); // Re-inserted last, so the map's order is the order checks ran.
|
|
347
|
-
this.checks.set(key, { call, passed, pure, source, revision: this.revision, seq: ++this.checkSeq, evidence: `${description(call)}: ${passed === true ? 'passed' : passed === false ? 'failed' : 'unconfirmed'}` });
|
|
459
|
+
this.checks.set(key, { call, passed, pure, source, revision: this.revision, seq: ++this.checkSeq, evidence: `${description(call).split('\n')[0].slice(0, 200)}: ${passed === true ? 'passed' : passed === false ? 'failed' : 'unconfirmed'}` });
|
|
460
|
+
}
|
|
461
|
+
if (automatic?.kind === 'recheck' && automatic.tool && !failed.length) {
|
|
462
|
+
const evidence = this.checks.get(checkKey(automatic.tool));
|
|
463
|
+
if (evidence?.passed === true && evidence.revision === this.revision)
|
|
464
|
+
this.followUpPassed = description(automatic.tool).split('\n')[0].slice(0, 160);
|
|
348
465
|
}
|
|
349
466
|
if (failed.length)
|
|
350
467
|
this.plan = this.staged = undefined;
|
|
351
468
|
if (this.staged) {
|
|
352
469
|
const declaration = batch.findIndex(o => o.call.name === PREPARE_FINISH);
|
|
470
|
+
// The answer was written before these results existed, so the batch may only write files and
|
|
471
|
+
// run checks: a read or another command in it is something the model has not seen yet.
|
|
353
472
|
if (declaration < 0 || declaration !== batch.length - 1 || failed.length
|
|
354
|
-
|| work.some(o => o.family !== 'filesystem-write' && !isVerificationCheck(o.call.name, o.family, o.args)))
|
|
473
|
+
|| work.some(o => o.family !== 'filesystem-write' && !this.declared.has(checkKey(concrete(o))) && !isVerificationCheck(o.call.name, o.family, o.args)))
|
|
355
474
|
this.staged = undefined;
|
|
356
475
|
else {
|
|
357
476
|
this.staged.revision = this.revision;
|
|
@@ -384,9 +503,10 @@ export class FactContinuations {
|
|
|
384
503
|
this.queue('check', next, this.verificationSource());
|
|
385
504
|
return;
|
|
386
505
|
}
|
|
387
|
-
const
|
|
506
|
+
const direct = this.plan.direct;
|
|
507
|
+
const noChecks = !direct && !this.checks.size && await this.needsChecks(signal) === false
|
|
388
508
|
&& (!this.options.workspaceInstructions?.trim() || this.constraints.noChecks);
|
|
389
|
-
if (this.verified() || noChecks) {
|
|
509
|
+
if (direct || this.verified() || noChecks) {
|
|
390
510
|
const ids = this.plan.verificationTodoIds;
|
|
391
511
|
if (todos.some(t => ids.includes(t.id) && t.status !== 'completed')) {
|
|
392
512
|
this.queue('todos', { name: 'update_todos', arguments: { todos: todos.map(t => ids.includes(t.id) ? { ...t, status: 'completed' } : t) } }, noChecks ? this.taskNeedsChecksSource : this.verificationSource());
|
|
@@ -413,6 +533,33 @@ export class FactContinuations {
|
|
|
413
533
|
}
|
|
414
534
|
}
|
|
415
535
|
}
|
|
536
|
+
const unstarted = this.options.todos().some(t => t.status === 'pending' && !VERIFICATION_TODO.test(t.text));
|
|
537
|
+
if (!this.taskUpdated && !this.plan && !this.staged && !unstarted && !this.constraints.noChecks) {
|
|
538
|
+
if (!automatic && [...this.checks.values()].some(e => e.passed === false && e.revision === this.revision && e.seq > this.checkSeq - work.length) && modelChecked)
|
|
539
|
+
this.nextNudge = 'after_failed_check';
|
|
540
|
+
else if (!failed.length && wrote && !modelChecked)
|
|
541
|
+
this.nextNudge = 'after_write';
|
|
542
|
+
}
|
|
543
|
+
// After edits the model's next move is most often its own check again. Running it here costs
|
|
544
|
+
// the check; having the model ask for it costs a whole turn. Only a check that was quick, in a
|
|
545
|
+
// batch where the model did not already check, never twice for one state of the workspace, and
|
|
546
|
+
// not while a todo was never started: the edit is then one step of several, and on real runs the
|
|
547
|
+
// model went on writing twice as often as it checked.
|
|
548
|
+
const follow = this.lastCheck;
|
|
549
|
+
if (follow && !this.options.todos().some(t => t.status === 'pending' && !VERIFICATION_TODO.test(t.text)) && !this.taskUpdated && !failed.length && wrote && !modelChecked && !this.plan && !this.staged
|
|
550
|
+
&& this.syntheticCount < 3 && this.followUps < FOLLOW_UP_LIMIT && (follow.durationMs ?? 0) <= FOLLOW_UP_MAX_MS
|
|
551
|
+
&& !this.constraints.noChecks && !(this.constraints.noTests && checkKind(description(follow.call)) === 'test')) {
|
|
552
|
+
const key = `${this.revision}:${checkKey(follow.call)}`;
|
|
553
|
+
if (!this.rechecked.has(key)) {
|
|
554
|
+
this.rechecked.add(key);
|
|
555
|
+
this.followUps++;
|
|
556
|
+
if (!isVerificationCheck(follow.call.name, this.options.catalog(follow.call.name)?.family, follow.call.arguments))
|
|
557
|
+
this.declared.set(checkKey(follow.call), 'chain');
|
|
558
|
+
this.nextNudge = undefined;
|
|
559
|
+
this.queue('recheck', follow.call);
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
416
563
|
const open = this.options.todos().filter(t => t.status !== 'completed');
|
|
417
564
|
const implementationOpen = open.some(t => !/^(?:run|rerun|re-run|verify|test|check|lint|build|typecheck|smoke)(?:[ :\-]|$)/i.test(t.text));
|
|
418
565
|
if (!this.taskUpdated && !failed.length && wrote && !implementationOpen && this.syntheticCount < 3) {
|
|
@@ -468,5 +615,5 @@ export class FactContinuations {
|
|
|
468
615
|
this.pendingAutomatic = next;
|
|
469
616
|
return next;
|
|
470
617
|
}
|
|
471
|
-
completionAccepted() { this.plan = this.staged = undefined; this.finishHint = false; }
|
|
618
|
+
completionAccepted() { this.plan = this.staged = undefined; this.finishHint = false; this.draft = undefined; }
|
|
472
619
|
}
|
|
@@ -5,7 +5,9 @@ export const PREPARE_STEPS = 'prepare_steps';
|
|
|
5
5
|
export const PREPARED_TRIGGERS = ['success', 'failure', 'always'];
|
|
6
6
|
const kinds = ['investigate', 'retry', 'change_strategy', 'verify', 'complete'];
|
|
7
7
|
const triggerKinds = new Set(['investigate', 'verify']);
|
|
8
|
-
|
|
8
|
+
// Landing or dropping a delegated change is a decision taken after reviewing it, so neither can be
|
|
9
|
+
// prepared ahead and run before the review.
|
|
10
|
+
const forbidden = new Set([PREPARE_STEPS, 'complete_agent', 'update_todos', 'ask_user', 'spawn_subagent', 'accept_change', 'discard_change']);
|
|
9
11
|
const object = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
10
12
|
export function boundedDecisionText(text, bytes) {
|
|
11
13
|
const value = redactSecrets(text).text;
|
|
@@ -11,3 +11,28 @@ export declare function isCheckCall(name: string, family: string | undefined, ar
|
|
|
11
11
|
export declare function isReplaySafeCheck(name: string, family: string | undefined, args: unknown): boolean;
|
|
12
12
|
/** A check that can establish a pass on the final workspace, not merely contain a check. */
|
|
13
13
|
export declare function isVerificationCheck(name: string, family: string | undefined, args: unknown): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A declared check without the output filter that would hide its exit status: `pytest -q 2>&1 |
|
|
16
|
+
* tail -20` verifies exactly what `pytest -q 2>&1` verifies, and only the second reports it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function stripOutputFilter(line: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* What a command the model named as its own verification can prove by exiting 0.
|
|
21
|
+
*
|
|
22
|
+
* `chain`: every step runs only if the one before succeeded (`&&`) and at least one step is a
|
|
23
|
+
* recognized check runner, so exit 0 means that runner passed (`cd build && ctest`,
|
|
24
|
+
* `PYTHONPATH=. python -m pytest -q`, `gcc -o t t.c && ./t`). `opaque`: the exit status is
|
|
25
|
+
* faithful but nothing in the line is a known runner (`./run_tests.sh`), so exit 0 alone does not
|
|
26
|
+
* settle it and the output has to be interpreted. One command fed by a here-document (`python3 -
|
|
27
|
+
* <<'PY' ... PY`) is opaque too: the script is its input, not more shell. Undefined when the line
|
|
28
|
+
* can hide a failure: a pipe, `;`, `||`, a background job, a substitution or a redirect.
|
|
29
|
+
*/
|
|
30
|
+
export declare function declaredCheckKind(line: string): 'chain' | 'opaque' | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The form of a check the model ran in which the runtime may run it again after an edit, or
|
|
33
|
+
* undefined when it may not. Every step is a known runner or a `cd`, chained with `&&` only, so
|
|
34
|
+
* running it twice does what running it once did and its exit status reports the result. An output
|
|
35
|
+
* filter and the no-op `cd "$(pwd)" &&` are dropped; a mutating mode (`--fix`, `-u`) or anything
|
|
36
|
+
* else in the line (setup, cleanup, a script) leaves the next run to the model.
|
|
37
|
+
*/
|
|
38
|
+
export declare function replayableCheck(line: string): string | undefined;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/** Recognition is deliberately broader than replay/verification authority. */
|
|
2
|
-
|
|
3
|
-
const
|
|
2
|
+
/** A directory in front of an executable: `.venv/bin/`, `/tmp/qa-venv/bin/`, `./node_modules/.bin/`. */
|
|
3
|
+
const BIN = String.raw `(?:[\w.~@+\-\\/:]*[\\/])?`;
|
|
4
|
+
/** Wrappers that run the same check under a deadline or inside a project environment (`timeout 120 uv run --with pytest ...`). */
|
|
5
|
+
const LAUNCH = String.raw `(?:time\s+)?(?:timeout\s+(?:-[\w-]+\s+)*\d+[smh]?\s+)?(?:(?:uv|poetry|pipenv|pdm|hatch|rye)\s+run\s+(?:(?:--with(?:-[\w-]+)?|--python|-p|--extra|--group|--project|--directory)[=\s]\S+\s+|--(?:frozen|locked|no-sync|no-project|isolated|quiet|offline|all-extras|no-dev|dev)\s+|-q\s+)*(?:--\s+)?)?`;
|
|
6
|
+
const PYTHON = String.raw `(?:${BIN}python[\d.]*\s+(?:-[BEIOsSuX]+\s+)*-m\s+)?`;
|
|
7
|
+
const RUNNER = String.raw `${LAUNCH}(?:${BIN}node\s+--test\b|${PYTHON}${BIN}(?:pytest|py\.test|unittest|mypy|compileall|py_compile)\b|(?:(?:npx|bunx)\s+(?:--no-install\s+|--yes\s+|-y\s+)?|pnpm\s+exec\s+)?${BIN}(?:jest|vitest|tsc|eslint|mocha|ava|ruff|ctest)\b|npx\s+playwright\s+test\b|(?:npm|pnpm|yarn|bun)\s+(?:run\s+)?(?:test|build|lint|typecheck|type-check|check|verify)\b|cargo\s+(?:\+[\w.-]+\s+)?(?:test|build|check|clippy)\b|go\s+(?:test|build|vet)\b|dotnet\s+(?:test|build)\b|mvn\s+(?:test|verify)\b|\.?[\\/]?gradlew?(?:\.bat)?\s+(?:test|build|check)\b|make\s+(?:test|check)\b|make(?:\s+-C\s+\S+|\s+-j\s*\d*)*\s*$|cmake\s+--build\b|${BIN}(?:gcc|g\+\+|cc|c\+\+|clang|clang\+\+)\s)`;
|
|
8
|
+
const RUNNER_AT_START = new RegExp(`^${RUNNER}`, 'i');
|
|
9
|
+
/** A known check runner at the start of a command. `pytest --version` or `tsc --help` starts like one and checks nothing. */
|
|
10
|
+
const runner = (part) => RUNNER_AT_START.test(part) && !/(?:^|\s)(?:--version|-V|--help)(?:\s|$)/.test(part);
|
|
4
11
|
/**
|
|
5
12
|
* Glue that can sit between runners without changing what they verify: messages, exit, block ends,
|
|
6
13
|
* output filters, and a test only as the condition of if/elif/while/until. On its own a test is an
|
|
@@ -34,7 +41,7 @@ export function checkRunners(line) {
|
|
|
34
41
|
const negated = /^!\s*/.test(part);
|
|
35
42
|
part = part.replace(/^!\s*/, '');
|
|
36
43
|
// `! npm run build` expects a failure: a standalone pass of the same command cannot stand in for it.
|
|
37
|
-
if (
|
|
44
|
+
if (runner(part)) {
|
|
38
45
|
if (negated)
|
|
39
46
|
return undefined;
|
|
40
47
|
runners.push(part);
|
|
@@ -64,7 +71,7 @@ export function isCheckCall(name, family, args) {
|
|
|
64
71
|
if (family !== 'shell' || !object(args) || 'action' in args)
|
|
65
72
|
return false;
|
|
66
73
|
const line = commandLine(args);
|
|
67
|
-
return !!line && line.split(/&&|\|\||[;|\n\r]/).some(part =>
|
|
74
|
+
return !!line && line.split(/&&|\|\||[;|\n\r]/).some(part => runner(part.trim()));
|
|
68
75
|
}
|
|
69
76
|
/** Closed, argument-aware output filters. In particular, sort -o and sort /O write files. */
|
|
70
77
|
function outputFilter(stage) {
|
|
@@ -82,13 +89,13 @@ export function isReplaySafeCheck(name, family, args) {
|
|
|
82
89
|
if (/(?:^|\s)(?:--(?:fix|write|update(?:-snapshots?)?|eval|require|import)(?:[=\s]|$)|-u(?:\s|$))/.test(line))
|
|
83
90
|
return false;
|
|
84
91
|
if (typeof args.program === 'string' && args.command === undefined && args.cmd === undefined) {
|
|
85
|
-
return Array.isArray(args.args) && args.args.every(a => typeof a === 'string') &&
|
|
92
|
+
return Array.isArray(args.args) && args.args.every(a => typeof a === 'string') && runner(line.trim());
|
|
86
93
|
}
|
|
87
94
|
const folded = line.replace(/2>&1/g, ' ').trim();
|
|
88
95
|
if (/[;\n\r`<>$&(){}]|\|\|/.test(folded))
|
|
89
96
|
return false;
|
|
90
97
|
const [check, ...stages] = folded.split('|').map(s => s.trim());
|
|
91
|
-
return
|
|
98
|
+
return runner(check) && stages.every(outputFilter);
|
|
92
99
|
}
|
|
93
100
|
/** A check that can establish a pass on the final workspace, not merely contain a check. */
|
|
94
101
|
export function isVerificationCheck(name, family, args) {
|
|
@@ -102,3 +109,67 @@ export function isVerificationCheck(name, family, args) {
|
|
|
102
109
|
// automatic completion; let the model inspect it or use a plain/native check instead.
|
|
103
110
|
return !commandLine(args)?.replace(/2>&1/g, '').includes('|');
|
|
104
111
|
}
|
|
112
|
+
const ENV_PREFIX = /^(?:env\s+)?(?:[A-Za-z_]\w*=(?:"[^"]*"|'[^']*'|[^\s"'`$;&|<>()]*)\s+)+/;
|
|
113
|
+
/** Output-only suffixes the shell tool makes redundant (its output is already tail-bounded). */
|
|
114
|
+
const OUTPUT_FILTER = /\s*(?:2>&1\s*)?\|\s*(?:tail|head)(?:\s+-n\s*\d+|\s+-\d+)?\s*$|\s*(?:2>&1\s*)?\|\s*cat\s*$/i;
|
|
115
|
+
/**
|
|
116
|
+
* A declared check without the output filter that would hide its exit status: `pytest -q 2>&1 |
|
|
117
|
+
* tail -20` verifies exactly what `pytest -q 2>&1` verifies, and only the second reports it.
|
|
118
|
+
*/
|
|
119
|
+
export function stripOutputFilter(line) {
|
|
120
|
+
let next = line.trim();
|
|
121
|
+
for (let i = 0; i < 2 && OUTPUT_FILTER.test(next); i++)
|
|
122
|
+
next = next.replace(OUTPUT_FILTER, '').trim();
|
|
123
|
+
return next;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* What a command the model named as its own verification can prove by exiting 0.
|
|
127
|
+
*
|
|
128
|
+
* `chain`: every step runs only if the one before succeeded (`&&`) and at least one step is a
|
|
129
|
+
* recognized check runner, so exit 0 means that runner passed (`cd build && ctest`,
|
|
130
|
+
* `PYTHONPATH=. python -m pytest -q`, `gcc -o t t.c && ./t`). `opaque`: the exit status is
|
|
131
|
+
* faithful but nothing in the line is a known runner (`./run_tests.sh`), so exit 0 alone does not
|
|
132
|
+
* settle it and the output has to be interpreted. One command fed by a here-document (`python3 -
|
|
133
|
+
* <<'PY' ... PY`) is opaque too: the script is its input, not more shell. Undefined when the line
|
|
134
|
+
* can hide a failure: a pipe, `;`, `||`, a background job, a substitution or a redirect.
|
|
135
|
+
*/
|
|
136
|
+
export function declaredCheckKind(line) {
|
|
137
|
+
// A mode that rewrites files (`eslint --fix`, `jest -u`) is an edit, not a check: admitting it
|
|
138
|
+
// would leave the passes recorded before it standing for a workspace it then changed.
|
|
139
|
+
if (MUTATING_FLAG.test(line))
|
|
140
|
+
return undefined;
|
|
141
|
+
const heredoc = /^([^\n]*?)<<-?\s*(['"]?)([A-Za-z_]\w*)\2([^\n]*)\n[\s\S]*\n\3\s*$/.exec(line.trim());
|
|
142
|
+
if (heredoc)
|
|
143
|
+
return declaredCheckKind(`${heredoc[1]} ${heredoc[4]}`) ? 'opaque' : undefined;
|
|
144
|
+
// Quoted text is an argument, not shell syntax: `python3 -c "import m; m.run()"` is one command.
|
|
145
|
+
// A double-quoted string that can expand (`$`, a backtick) is left in place and judged as written.
|
|
146
|
+
const folded = line.replace(/'[^']*'/g, "''").replace(/"(?:[^"\\$`]|\\.)*"/g, '""')
|
|
147
|
+
.replace(/\d?>&\d|(?:\d|&)?>\s*\/dev\/null/g, ' ').trim();
|
|
148
|
+
if (!folded || /[;\n\r`<>|]|\$\(/.test(folded) || /&/.test(folded.replace(/&&/g, ' ')))
|
|
149
|
+
return undefined;
|
|
150
|
+
const parts = folded.split('&&').map(part => part.trim().replace(ENV_PREFIX, ''));
|
|
151
|
+
if (parts.some(part => !part))
|
|
152
|
+
return undefined;
|
|
153
|
+
return parts.some(part => runner(part)) ? 'chain' : 'opaque';
|
|
154
|
+
}
|
|
155
|
+
const MUTATING_FLAG = /(?:^|\s)(?:--(?:fix|write|update(?:-snapshots?)?|eval|require|import)(?:[=\s]|$)|-u(?:\s|$))/;
|
|
156
|
+
/**
|
|
157
|
+
* The form of a check the model ran in which the runtime may run it again after an edit, or
|
|
158
|
+
* undefined when it may not. Every step is a known runner or a `cd`, chained with `&&` only, so
|
|
159
|
+
* running it twice does what running it once did and its exit status reports the result. An output
|
|
160
|
+
* filter and the no-op `cd "$(pwd)" &&` are dropped; a mutating mode (`--fix`, `-u`) or anything
|
|
161
|
+
* else in the line (setup, cleanup, a script) leaves the next run to the model.
|
|
162
|
+
*/
|
|
163
|
+
export function replayableCheck(line) {
|
|
164
|
+
const next = stripOutputFilter(line.trim().replace(/^cd\s+"?\$\(pwd\)"?\s*&&\s*/, ''));
|
|
165
|
+
if (MUTATING_FLAG.test(next) || next.includes('<<'))
|
|
166
|
+
return undefined;
|
|
167
|
+
const folded = next.replace(/'[^']*'/g, "''").replace(/"(?:[^"\\$`]|\\.)*"/g, '""')
|
|
168
|
+
.replace(/\d?>&\d|(?:\d|&)?>\s*\/dev\/null/g, ' ').trim();
|
|
169
|
+
if (!folded || /[;\n\r`<>|]|\$\(/.test(folded) || /&/.test(folded.replace(/&&/g, ' ')))
|
|
170
|
+
return undefined;
|
|
171
|
+
const parts = folded.split('&&').map(part => part.trim().replace(ENV_PREFIX, ''));
|
|
172
|
+
if (parts.some(part => !part) || !parts.some(part => runner(part)))
|
|
173
|
+
return undefined;
|
|
174
|
+
return parts.every(part => runner(part) || /^cd\s+\S+$/.test(part)) ? next : undefined;
|
|
175
|
+
}
|