@orion-agents/orion-code 0.3.66 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +78 -361
- package/README.zh-CN.md +71 -262
- package/bin/orion +4 -1
- package/dist/acp/session-updates.d.ts +35 -0
- package/dist/acp/session-updates.js +183 -0
- package/dist/acp/sessions.d.ts +32 -0
- package/dist/acp/sessions.js +328 -0
- package/dist/acp/stdio.d.ts +3 -0
- package/dist/acp/stdio.js +59 -0
- package/dist/cli.js +136 -185
- package/dist/commands/context-tool-command-handlers.d.ts +1 -1
- package/dist/commands/context-tool-command-handlers.js +24 -3
- package/dist/commands/core-command-handlers.js +10 -18
- package/dist/commands/diagnostic-command-handlers.js +58 -48
- package/dist/commands/diagnostic-commands.js +0 -12
- package/dist/commands/init-command.d.ts +3 -0
- package/dist/commands/init-command.js +131 -0
- package/dist/commands/model-command-handlers.d.ts +1 -2
- package/dist/commands/model-command-handlers.js +15 -100
- package/dist/commands/model-commands.js +0 -11
- package/dist/commands/registry.js +1 -19
- package/dist/commands/rsi-command.d.ts +2 -0
- package/dist/commands/rsi-command.js +180 -0
- package/dist/commands/session-command-handlers.js +28 -19
- package/dist/commands/system-commands.js +0 -1
- package/dist/commands/target-command.js +49 -6
- package/dist/commands/tool-commands.js +1 -1
- package/dist/commands/types.d.ts +4 -10
- package/dist/commands/types.js +1 -21
- package/dist/commands/workflow-command-handlers.js +13 -4
- package/dist/commands/workflow-commands.js +2 -2
- package/dist/framework/loop-budget-contract.d.ts +2 -8
- package/dist/framework/loop-budget-contract.js +0 -3
- package/dist/framework/loop-progress.d.ts +18 -0
- package/dist/framework/loop-progress.js +63 -0
- package/dist/framework/prompt.d.ts +0 -2
- package/dist/framework/prompt.js +9 -27
- package/dist/framework/query.d.ts +26 -31
- package/dist/framework/query.js +451 -292
- package/dist/framework/store.d.ts +6 -10
- package/dist/framework/store.js +2 -21
- package/dist/framework/tool-call-orchestrator.d.ts +7 -0
- package/dist/framework/tool-call-orchestrator.js +8 -3
- package/dist/framework/tool-state.d.ts +2 -0
- package/dist/framework/tool.d.ts +0 -23
- package/dist/framework/verification-command.d.ts +15 -0
- package/dist/framework/verification-command.js +32 -0
- package/dist/harness/assembler.d.ts +1 -0
- package/dist/harness/assembler.js +24 -0
- package/dist/harness/capsule.d.ts +1 -1
- package/dist/harness/capsule.js +33 -14
- package/dist/harness/context-harness.d.ts +37 -12
- package/dist/harness/context-harness.js +545 -35
- package/dist/harness/contract.js +1 -1
- package/dist/harness/drift-guard.d.ts +4 -0
- package/dist/harness/drift-guard.js +68 -16
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/intent.js +21 -0
- package/dist/harness/ledger.d.ts +7 -11
- package/dist/harness/ledger.js +50 -9
- package/dist/harness/progress-controller.d.ts +12 -7
- package/dist/harness/progress-controller.js +96 -29
- package/dist/harness/state.js +10 -1
- package/dist/harness/stop-controller.d.ts +0 -5
- package/dist/harness/stop-controller.js +11 -31
- package/dist/harness/task-checklist.d.ts +16 -0
- package/dist/harness/task-checklist.js +92 -0
- package/dist/harness/types.d.ts +78 -1
- package/dist/harness/verification.d.ts +19 -1
- package/dist/harness/verification.js +116 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -3
- package/dist/print-ui/event-stream.d.ts +43 -0
- package/dist/print-ui/event-stream.js +204 -0
- package/dist/print-ui/launch.d.ts +12 -1
- package/dist/print-ui/launch.js +173 -11
- package/dist/product/environment.d.ts +1 -1
- package/dist/product/environment.js +1 -1
- package/dist/product/identity.d.ts +1 -1
- package/dist/product/identity.js +1 -1
- package/dist/product/paths.d.ts +3 -2
- package/dist/product/paths.js +6 -2
- package/dist/runtime/agent-loop.d.ts +12 -2
- package/dist/runtime/agent-loop.js +172 -29
- package/dist/runtime/agent-runtime-controller.d.ts +14 -4
- package/dist/runtime/agent-runtime-controller.js +366 -192
- package/dist/runtime/agent-runtime-protocol.d.ts +10 -18
- package/dist/runtime/agent-runtime-runner.d.ts +10 -0
- package/dist/runtime/builtin-tool-provider.js +5 -1
- package/dist/runtime/capability-receipt-journal.js +1 -0
- package/dist/runtime/durable-tool-receipt-reader.js +2 -1
- package/dist/runtime/first-party-tool-services.d.ts +1 -0
- package/dist/runtime/first-party-tool-services.js +2 -12
- package/dist/runtime/first-party-tool-universe.d.ts +1 -0
- package/dist/runtime/first-party-tool-universe.js +1 -1
- package/dist/runtime/followup-queue-store.d.ts +16 -0
- package/dist/runtime/followup-queue-store.js +75 -0
- package/dist/runtime/goal-lifecycle-v2.d.ts +16 -4
- package/dist/runtime/goal-lifecycle-v2.js +217 -39
- package/dist/runtime/goal-runtime-coordinator.d.ts +14 -2
- package/dist/runtime/goal-runtime-coordinator.js +147 -36
- package/dist/runtime/goals/presentation.js +3 -1
- package/dist/runtime/goals/types.d.ts +1 -3
- package/dist/runtime/goals/types.js +0 -3
- package/dist/runtime/loop-budget.d.ts +0 -7
- package/dist/runtime/loop-budget.js +8 -52
- package/dist/runtime/mcp/first-party-mcp-adapter.d.ts +2 -0
- package/dist/runtime/mcp/first-party-mcp-adapter.js +23 -19
- package/dist/runtime/model-coordinator.js +2 -5
- package/dist/runtime/orion-runtime-v1.d.ts +18 -2
- package/dist/runtime/orion-runtime-v1.js +183 -46
- package/dist/runtime/orion-session-runner.d.ts +7 -0
- package/dist/runtime/orion-session-runner.js +82 -0
- package/dist/runtime/plan-review.d.ts +1 -0
- package/dist/runtime/plan-review.js +8 -4
- package/dist/runtime/product-bootstrap.d.ts +6 -0
- package/dist/runtime/product-bootstrap.js +41 -51
- package/dist/runtime/product-orion-runtime.js +129 -58
- package/dist/runtime/release-receipts.d.ts +24 -133
- package/dist/runtime/release-receipts.js +129 -693
- package/dist/runtime/rich-text/layout.js +108 -65
- package/dist/runtime/rsi/contracts.d.ts +50 -0
- package/dist/runtime/rsi/contracts.js +17 -0
- package/dist/runtime/rsi/diagnosis.d.ts +46 -0
- package/dist/runtime/rsi/diagnosis.js +98 -0
- package/dist/runtime/rsi/evaluation-suite.d.ts +25 -0
- package/dist/runtime/rsi/evaluation-suite.js +141 -0
- package/dist/runtime/rsi/evaluation-worker.d.ts +19 -0
- package/dist/runtime/rsi/evaluation-worker.js +64 -0
- package/dist/runtime/rsi/evaluation.d.ts +49 -0
- package/dist/runtime/rsi/evaluation.js +345 -0
- package/dist/runtime/rsi/lifecycle.d.ts +54 -0
- package/dist/runtime/rsi/lifecycle.js +279 -0
- package/dist/runtime/rsi/proposal.d.ts +39 -0
- package/dist/runtime/rsi/proposal.js +312 -0
- package/dist/runtime/rsi/receipt.d.ts +28 -0
- package/dist/runtime/rsi/receipt.js +138 -0
- package/dist/runtime/rsi/skill-state.d.ts +7 -0
- package/dist/runtime/rsi/skill-state.js +50 -0
- package/dist/runtime/rsi/trajectory.d.ts +19 -0
- package/dist/runtime/rsi/trajectory.js +314 -0
- package/dist/runtime/rsi/triage.d.ts +274 -0
- package/dist/runtime/rsi/triage.js +58 -0
- package/dist/runtime/session-composer-control.d.ts +5 -24
- package/dist/runtime/session-composer-control.js +27 -189
- package/dist/runtime/step-snapshot.d.ts +4 -1
- package/dist/runtime/step-snapshot.js +11 -1
- package/dist/runtime/subagent-thread-runtime.js +27 -5
- package/dist/runtime/subagents/policy.js +0 -1
- package/dist/runtime/subagents/production.js +1 -5
- package/dist/runtime/subagents/runtime-integration.js +2 -4
- package/dist/runtime/subagents/types.d.ts +0 -5
- package/dist/runtime/subagents/types.js +0 -2
- package/dist/runtime/task-context-recovery.d.ts +55 -0
- package/dist/runtime/task-context-recovery.js +349 -0
- package/dist/runtime/task-context-service.d.ts +20 -10
- package/dist/runtime/task-context-service.js +69 -9
- package/dist/runtime/thread-admission.d.ts +3 -1
- package/dist/runtime/thread-admission.js +21 -7
- package/dist/runtime/thread-event-store.d.ts +2 -2
- package/dist/runtime/thread-event-store.js +7 -2
- package/dist/runtime/thread-projection.js +4 -2
- package/dist/runtime/thread-runtime.d.ts +10 -0
- package/dist/runtime/thread-runtime.js +85 -3
- package/dist/runtime/thread-session-index.d.ts +8 -0
- package/dist/runtime/thread-session-index.js +50 -1
- package/dist/runtime/thread-session-view.d.ts +2 -1
- package/dist/runtime/thread-session-view.js +4 -0
- package/dist/runtime/thread-tool-journal.d.ts +1 -0
- package/dist/runtime/thread-tool-journal.js +6 -2
- package/dist/runtime/thread-ui-adapter.d.ts +1 -0
- package/dist/runtime/thread-ui-adapter.js +89 -22
- package/dist/runtime/tool-gateway.d.ts +9 -0
- package/dist/runtime/tool-gateway.js +24 -0
- package/dist/runtime/tool-receipt-validator.js +4 -0
- package/dist/runtime/tool-transcript-entry.d.ts +16 -0
- package/dist/runtime/tool-transcript-entry.js +73 -0
- package/dist/runtime/turn-commit.d.ts +4 -1
- package/dist/runtime/turn-commit.js +19 -15
- package/dist/runtime/ui-events.d.ts +15 -1
- package/dist/runtime/ui-view-model.d.ts +6 -5
- package/dist/runtime/ui-view-model.js +78 -61
- package/dist/runtime/workspace-runtime-kernel.js +0 -1
- package/dist/runtime/workspace-verification.d.ts +7 -0
- package/dist/runtime/workspace-verification.js +83 -0
- package/dist/services/atomic-write.d.ts +2 -0
- package/dist/services/atomic-write.js +12 -1
- package/dist/services/code-review/format.d.ts +4 -1
- package/dist/services/code-review/format.js +5 -1
- package/dist/services/code-review/runner.d.ts +2 -2
- package/dist/services/code-review/runner.js +86 -64
- package/dist/services/code-review/snapshot.d.ts +9 -9
- package/dist/services/code-review/snapshot.js +182 -166
- package/dist/services/compact/auto-compact.d.ts +21 -6
- package/dist/services/compact/auto-compact.js +148 -22
- package/dist/services/compact/background-candidate.d.ts +33 -0
- package/dist/services/compact/background-candidate.js +184 -0
- package/dist/services/compact/compact.d.ts +4 -1
- package/dist/services/compact/compact.js +30 -3
- package/dist/services/compact/coordinator.d.ts +10 -4
- package/dist/services/compact/coordinator.js +17 -7
- package/dist/services/compact/summary-generator.d.ts +4 -2
- package/dist/services/compact/summary-generator.js +17 -3
- package/dist/services/config.d.ts +5 -5
- package/dist/services/config.js +29 -48
- package/dist/services/doctor.js +85 -13
- package/dist/services/effort.d.ts +5 -5
- package/dist/services/effort.js +5 -11
- package/dist/services/file-lock.d.ts +9 -3
- package/dist/services/file-lock.js +92 -26
- package/dist/services/global-config.d.ts +26 -64
- package/dist/services/global-config.js +233 -193
- package/dist/services/llm.d.ts +42 -4
- package/dist/services/llm.js +177 -45
- package/dist/services/model-client-pool.d.ts +15 -9
- package/dist/services/model-client-pool.js +62 -33
- package/dist/services/model-context.d.ts +2 -1
- package/dist/services/model-context.js +15 -9
- package/dist/services/model-registry.d.ts +4 -15
- package/dist/services/model-registry.js +32 -101
- package/dist/services/provider-diagnostics.d.ts +8 -0
- package/dist/services/provider-diagnostics.js +17 -12
- package/dist/services/provider-resilience/coordinator.d.ts +1 -1
- package/dist/services/provider-resilience/coordinator.js +10 -6
- package/dist/services/provider-resilience/request-gate.d.ts +3 -0
- package/dist/services/provider-resilience/request-gate.js +29 -18
- package/dist/services/provider-resilience/types.d.ts +2 -0
- package/dist/services/session-storage.d.ts +7 -10
- package/dist/services/session-storage.js +57 -30
- package/dist/services/settings-coordinator.d.ts +0 -6
- package/dist/services/settings-coordinator.js +19 -56
- package/dist/services/settings-document-repository.d.ts +3 -10
- package/dist/services/settings-document-repository.js +7 -85
- package/dist/services/usage-state.d.ts +3 -3
- package/dist/services/usage-state.js +11 -42
- package/dist/terminal-ui/answer-format.d.ts +14 -0
- package/dist/terminal-ui/answer-format.js +119 -0
- package/dist/terminal-ui/launch.d.ts +7 -6
- package/dist/terminal-ui/launch.js +160 -70
- package/dist/terminal-ui/output-queue.d.ts +2 -1
- package/dist/terminal-ui/output-queue.js +1 -1
- package/dist/terminal-ui/raw-editor.d.ts +2 -1
- package/dist/terminal-ui/raw-editor.js +56 -15
- package/dist/tools/core/edit-file.js +6 -2
- package/dist/tools/core/write-file.js +9 -2
- package/dist/tools/lsp.d.ts +16 -1
- package/dist/tools/lsp.js +60 -19
- package/dist/tools/sandbox.d.ts +1 -1
- package/dist/tools/sandbox.js +3 -16
- package/dist/tools/todo.d.ts +4 -2
- package/dist/tools/todo.js +91 -30
- package/dist/tui-core/input-parser.d.ts +1 -0
- package/dist/tui-core/input-parser.js +6 -0
- package/dist/tui-core/style.d.ts +1 -8
- package/dist/tui-core/style.js +3 -110
- package/dist/tui-ui/chrome-view-model.d.ts +1 -1
- package/dist/tui-ui/chrome-view-model.js +36 -32
- package/dist/tui-ui/launch.js +14 -14
- package/dist/tui-ui/layout.d.ts +5 -7
- package/dist/tui-ui/layout.js +129 -124
- package/dist/tui-ui/runner.d.ts +11 -12
- package/dist/tui-ui/runner.js +88 -67
- package/dist/tui-ui/state.d.ts +0 -11
- package/dist/tui-ui/state.js +22 -33
- package/dist/tui-ui/terminal-image.js +22 -4
- package/dist/tui-ui/transcript-inspector-layout.js +6 -3
- package/dist/tui-ui/transcript-inspector.d.ts +1 -0
- package/dist/tui-ui/transcript-inspector.js +7 -1
- package/dist/tui-ui/transcript-layout.js +42 -6
- package/dist/utils/terminal-text.d.ts +11 -0
- package/dist/utils/terminal-text.js +114 -0
- package/docs/cli-guide.md +575 -0
- package/docs/orion.example.yaml +43 -0
- package/docs/readme.md +12 -57
- package/npm-shrinkwrap.json +484 -1855
- package/package.json +13 -63
- package/dist/migration/command.d.ts +0 -9
- package/dist/migration/command.js +0 -100
- package/dist/migration/index.d.ts +0 -7
- package/dist/migration/index.js +0 -14
- package/dist/migration/migrate.d.ts +0 -19
- package/dist/migration/migrate.js +0 -406
- package/dist/migration/types.d.ts +0 -55
- package/dist/migration/types.js +0 -6
- package/dist/services/tool-allowlist.d.ts +0 -110
- package/dist/services/tool-allowlist.js +0 -299
- package/dist/services/yaml-config.d.ts +0 -57
- package/dist/services/yaml-config.js +0 -178
- package/dist/web/cli-options.d.ts +0 -17
- package/dist/web/cli-options.js +0 -51
- package/dist/web/code-review-run-service.d.ts +0 -68
- package/dist/web/code-review-run-service.js +0 -228
- package/dist/web/context-text.d.ts +0 -17
- package/dist/web/context-text.js +0 -40
- package/dist/web/errors.d.ts +0 -6
- package/dist/web/errors.js +0 -13
- package/dist/web/event-hub.d.ts +0 -45
- package/dist/web/event-hub.js +0 -370
- package/dist/web/file-read-service.d.ts +0 -101
- package/dist/web/file-read-service.js +0 -593
- package/dist/web/file-write-service.d.ts +0 -16
- package/dist/web/file-write-service.js +0 -103
- package/dist/web/git-compare-service.d.ts +0 -45
- package/dist/web/git-compare-service.js +0 -160
- package/dist/web/git-diff-document.d.ts +0 -102
- package/dist/web/git-diff-document.js +0 -258
- package/dist/web/git-file-source.d.ts +0 -25
- package/dist/web/git-file-source.js +0 -21
- package/dist/web/git-history-service.d.ts +0 -151
- package/dist/web/git-history-service.js +0 -619
- package/dist/web/git-index-transaction.d.ts +0 -45
- package/dist/web/git-index-transaction.js +0 -174
- package/dist/web/git-patch-builder.d.ts +0 -30
- package/dist/web/git-patch-builder.js +0 -138
- package/dist/web/git-read-model-service.d.ts +0 -452
- package/dist/web/git-read-model-service.js +0 -1833
- package/dist/web/git-version-service.d.ts +0 -79
- package/dist/web/git-version-service.js +0 -279
- package/dist/web/host-daemon.d.ts +0 -70
- package/dist/web/host-daemon.js +0 -237
- package/dist/web/index.d.ts +0 -6
- package/dist/web/index.js +0 -28
- package/dist/web/launch.d.ts +0 -12
- package/dist/web/launch.js +0 -89
- package/dist/web/native-directory-picker.d.ts +0 -63
- package/dist/web/native-directory-picker.js +0 -169
- package/dist/web/protocol.d.ts +0 -705
- package/dist/web/protocol.js +0 -639
- package/dist/web/review-service.d.ts +0 -22
- package/dist/web/review-service.js +0 -68
- package/dist/web/server.d.ts +0 -20
- package/dist/web/server.js +0 -1453
- package/dist/web/session-runtime-registry.d.ts +0 -138
- package/dist/web/session-runtime-registry.js +0 -471
- package/dist/web/terminal-manager.d.ts +0 -156
- package/dist/web/terminal-manager.js +0 -779
- package/dist/web/terminal-server.d.ts +0 -8
- package/dist/web/terminal-server.js +0 -304
- package/dist/web/workbench-controller.d.ts +0 -395
- package/dist/web/workbench-controller.js +0 -3077
- package/dist/web/workspace-discovery.d.ts +0 -92
- package/dist/web/workspace-discovery.js +0 -324
- package/dist/web/workspace-mutation-arbiter.d.ts +0 -54
- package/dist/web/workspace-mutation-arbiter.js +0 -267
- package/dist/web/workspace-open-telemetry.d.ts +0 -55
- package/dist/web/workspace-open-telemetry.js +0 -73
- package/dist/web-client/assets/FilesPanel-CPDovK_K.js +0 -1
- package/dist/web-client/assets/GitPanel-DtU_TD61.js +0 -4
- package/dist/web-client/assets/ReviewPanel-vMO7BEA3.js +0 -6
- package/dist/web-client/assets/TerminalPanel-C9vDTAlS.js +0 -23
- package/dist/web-client/assets/TerminalPanel-DLuoa74B.css +0 -1
- package/dist/web-client/assets/index-CABdwh4l.css +0 -1
- package/dist/web-client/assets/index-KvshfEbl.js +0 -20
- package/dist/web-client/assets/useAutoNotice-IE1g2wcb.js +0 -1
- package/dist/web-client/favicon.svg +0 -9
- package/dist/web-client/index.html +0 -17
- package/docs/architecture/agent-mode-permission-contract.md +0 -87
- package/docs/architecture/v0.3.0-web-api.yaml +0 -1340
- package/docs/architecture/v0.3.1-web-api.yaml +0 -2338
- package/docs/architecture/v0.3.2-web-api.yaml +0 -3029
- package/docs/architecture/v0.3.3-web-api.yaml +0 -3205
- package/docs/architecture/v0.3.4-stabilization-contract.md +0 -32
- package/docs/migration/v0.1.9-to-v0.2.0.md +0 -98
- package/docs/migration/v0.2.2-to-v0.3.0-settings.md +0 -114
- package/docs/migration/v0.2.2-to-v0.3.0.md +0 -55
- package/docs/migration/v0.3.0-to-v0.3.1.md +0 -88
- package/docs/migration/v0.3.1-to-v0.3.2.md +0 -94
- package/docs/migration/v0.3.2-to-v0.3.3.md +0 -62
- package/docs/migration/v0.3.3-to-v0.3.4.md +0 -36
- package/docs/orion.example.json +0 -86
- package/docs/plan/v0.2.0-dsh-harness-redesign-plan.md +0 -1234
- package/docs/plan/v0.2.0-release-checklist.md +0 -91
- package/docs/plan/v0.3.0-node-runtime-compatibility-plan.md +0 -57
- package/docs/plan/v0.3.0-settings-integration-plan.md +0 -740
- package/docs/plan/v0.3.0-web-workbench-plan.md +0 -376
- package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +0 -848
- package/docs/plan/v0.3.2-web-workbench-layout-and-composer-plan.md +0 -869
- package/docs/plan/v0.3.3-plan.md +0 -1113
- package/docs/plan/v0.3.4-stabilization-plan.md +0 -89
- package/docs/test/v0.3.1-web-workbench-e2e-plan.md +0 -140
- package/docs/test/v0.3.2-web-workbench-e2e-plan.md +0 -100
- package/docs/test/v0.3.3-web-workbench-e2e-plan.md +0 -79
- package/docs/test/v0.3.4-stabilization-e2e-plan.md +0 -54
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ThreadStepSnapshotJournalV1 = exports.AgentLoopV1 = void 0;
|
|
4
|
+
exports.isFailedLoopStats = isFailedLoopStats;
|
|
5
|
+
exports.serializeAgentLoopOutcome = serializeAgentLoopOutcome;
|
|
4
6
|
exports.deterministicRuntimeId = deterministicRuntimeId;
|
|
5
7
|
const crypto_1 = require("crypto");
|
|
6
8
|
const query_1 = require("../framework/query");
|
|
9
|
+
const terminal_text_1 = require("../utils/terminal-text");
|
|
10
|
+
const task_checklist_1 = require("../harness/task-checklist");
|
|
11
|
+
const ui_view_model_1 = require("./ui-view-model");
|
|
7
12
|
const tool_serializer_1 = require("../framework/tool-serializer");
|
|
13
|
+
const redaction_1 = require("../services/redaction");
|
|
14
|
+
const bash_security_1 = require("../tools/bash_security");
|
|
8
15
|
const canonical_1 = require("./protocol/canonical");
|
|
9
16
|
const thread_compact_persistence_1 = require("./thread-compact-persistence");
|
|
17
|
+
const task_context_recovery_1 = require("./task-context-recovery");
|
|
10
18
|
const step_snapshot_1 = require("./step-snapshot");
|
|
19
|
+
const MAX_REASONING_TRANSCRIPT_CHARS = 16 * 1024;
|
|
20
|
+
function isFailedLoopStats(stats) {
|
|
21
|
+
return stats?.finishReason === 'failed' || stats?.stopDecision?.status === 'failed';
|
|
22
|
+
}
|
|
23
|
+
function serializeAgentLoopOutcome(stats, showBudgetStop) {
|
|
24
|
+
return (0, canonical_1.canonicalRuntimeJson)({
|
|
25
|
+
finishReason: stats?.finishReason ?? 'completed',
|
|
26
|
+
stopDecision: stats?.stopDecision,
|
|
27
|
+
...(showBudgetStop &&
|
|
28
|
+
stats?.finishReason === 'budget_exceeded' &&
|
|
29
|
+
stats.stopDecision?.status === 'stopped'
|
|
30
|
+
? { budgetStop: (0, ui_view_model_1.createLoopBudgetStopView)(stats) }
|
|
31
|
+
: {}),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
11
34
|
/**
|
|
12
35
|
* The single production model -> tool recursion adapter.
|
|
13
36
|
*
|
|
@@ -21,7 +44,12 @@ class AgentLoopV1 {
|
|
|
21
44
|
this.serviceId = 'agent-loop';
|
|
22
45
|
}
|
|
23
46
|
async run(context) {
|
|
24
|
-
this.options.taskContext.
|
|
47
|
+
const progressAtAdmission = this.options.taskContext.progressState();
|
|
48
|
+
const bindRecovery = this.options.previousCommitDigest
|
|
49
|
+
? (0, task_context_recovery_1.createTaskRecoveryBinder)(this.options.taskContext, this.options.previousCommitDigest, progressAtAdmission)
|
|
50
|
+
: undefined;
|
|
51
|
+
const goal = context.mode === 'goal' ? this.options.resolveGoalTask?.() : undefined;
|
|
52
|
+
this.options.taskContext.observeUserInput(goal?.objective ?? context.input, goal?.goalId);
|
|
25
53
|
const messages = (await this.options.loadBaseMessages(context)).map(message => ({
|
|
26
54
|
...message,
|
|
27
55
|
}));
|
|
@@ -30,13 +58,24 @@ class AgentLoopV1 {
|
|
|
30
58
|
let assistantItem;
|
|
31
59
|
let assistantContent = '';
|
|
32
60
|
let reasoningItem;
|
|
61
|
+
let reasoningText = '';
|
|
33
62
|
let completeEvent;
|
|
34
63
|
let taskContextCompletion;
|
|
35
64
|
const finishReasoning = () => {
|
|
36
65
|
if (!reasoningItem)
|
|
37
66
|
return;
|
|
38
|
-
|
|
67
|
+
const text = (0, redaction_1.redactTraceText)(reasoningText.trim());
|
|
68
|
+
// Reasoning is display-only. Bound the durable item without losing the
|
|
69
|
+
// final text that the renderer receives from ephemeral stream events.
|
|
70
|
+
const content = text.length > MAX_REASONING_TRANSCRIPT_CHARS
|
|
71
|
+
? text.slice(0, MAX_REASONING_TRANSCRIPT_CHARS - 1).replace(/[\uD800-\uDBFF]$/u, '') + '…'
|
|
72
|
+
: text;
|
|
73
|
+
context.completeItem(reasoningItem, {
|
|
74
|
+
...(content ? { content } : {}),
|
|
75
|
+
summary: content ? compactSummary(content) : 'Model reasoning started',
|
|
76
|
+
});
|
|
39
77
|
reasoningItem = undefined;
|
|
78
|
+
reasoningText = '';
|
|
40
79
|
};
|
|
41
80
|
const ensureAssistantItem = () => {
|
|
42
81
|
if (assistantItem)
|
|
@@ -49,12 +88,12 @@ class AgentLoopV1 {
|
|
|
49
88
|
return assistantItem;
|
|
50
89
|
};
|
|
51
90
|
const completeAssistant = (content) => {
|
|
52
|
-
|
|
91
|
+
assistantContent = '';
|
|
92
|
+
if (!assistantItem && !(0, terminal_text_1.hasVisibleAssistantText)(content))
|
|
53
93
|
return;
|
|
54
94
|
const item = ensureAssistantItem();
|
|
55
95
|
context.completeItem(item, { content, summary: compactSummary(content) });
|
|
56
96
|
assistantItem = undefined;
|
|
57
|
-
assistantContent = '';
|
|
58
97
|
};
|
|
59
98
|
const streamCallbacks = {
|
|
60
99
|
onThinking: () => {
|
|
@@ -63,16 +102,29 @@ class AgentLoopV1 {
|
|
|
63
102
|
reasoningItem = context.startItem({ kind: 'reasoning', stepId: activeStep?.stepId });
|
|
64
103
|
}
|
|
65
104
|
},
|
|
105
|
+
onThinkingText: text => {
|
|
106
|
+
this.options.streamCallbacks?.onThinkingText?.(text);
|
|
107
|
+
if (!reasoningItem) {
|
|
108
|
+
reasoningItem = context.startItem({ kind: 'reasoning', stepId: activeStep?.stepId });
|
|
109
|
+
}
|
|
110
|
+
reasoningText += text;
|
|
111
|
+
context.emitDelta(reasoningItem, text, 'reasoning');
|
|
112
|
+
},
|
|
66
113
|
onChunk: chunk => {
|
|
67
114
|
finishReasoning();
|
|
68
115
|
assistantContent += chunk;
|
|
69
|
-
|
|
70
|
-
|
|
116
|
+
if (!assistantItem &&
|
|
117
|
+
(!(0, terminal_text_1.hasVisibleAssistantText)(chunk) || !(0, terminal_text_1.hasVisibleAssistantText)(assistantContent)))
|
|
118
|
+
return;
|
|
119
|
+
const text = assistantItem ? chunk : assistantContent;
|
|
120
|
+
context.emitDelta(ensureAssistantItem(), text, 'content');
|
|
121
|
+
this.options.streamCallbacks?.onChunk?.(text);
|
|
71
122
|
},
|
|
72
123
|
};
|
|
124
|
+
const executionChecklist = this.options.enableTaskTodos === true && (0, task_checklist_1.supportsExecutionChecklist)(context.mode);
|
|
73
125
|
const harness = createQueryTaskContextAdapter(this.options.taskContext, decision => {
|
|
74
126
|
taskContextCompletion = decision;
|
|
75
|
-
}, context.mode === 'plan');
|
|
127
|
+
}, context.mode === 'plan', executionChecklist, context.mode === 'goal');
|
|
76
128
|
try {
|
|
77
129
|
for await (const event of (0, query_1.query)({
|
|
78
130
|
messages,
|
|
@@ -85,7 +137,7 @@ class AgentLoopV1 {
|
|
|
85
137
|
threadId: context.threadId,
|
|
86
138
|
turnId: context.turnId,
|
|
87
139
|
requestIndex: stepInput.requestIndex,
|
|
88
|
-
input: context.input,
|
|
140
|
+
input: stepInput.input ?? context.input,
|
|
89
141
|
mode: context.mode,
|
|
90
142
|
messages: stepInput.messages,
|
|
91
143
|
taskContextRevision: this.options.taskContext.revision,
|
|
@@ -102,7 +154,7 @@ class AgentLoopV1 {
|
|
|
102
154
|
activeStep = await this.bindStep(context, prepared, router, bindingInput);
|
|
103
155
|
return {
|
|
104
156
|
receiptDigest: activeStep.digest,
|
|
105
|
-
toolExecutor: (name, args, abortSignal, metadata) => this.invokeTool(context, activeStep, name, args, abortSignal, metadata),
|
|
157
|
+
toolExecutor: (name, args, abortSignal, metadata) => this.invokeTool(context, activeStep, name, args, bindRecovery, abortSignal, metadata),
|
|
106
158
|
};
|
|
107
159
|
},
|
|
108
160
|
};
|
|
@@ -110,6 +162,15 @@ class AgentLoopV1 {
|
|
|
110
162
|
llm: this.options.llm,
|
|
111
163
|
abortSignal: context.abortSignal,
|
|
112
164
|
streamCallbacks,
|
|
165
|
+
holdAssistantUntilCompletionCheck: () => context.mode !== 'plan' &&
|
|
166
|
+
(context.mode === 'goal' ||
|
|
167
|
+
this.options.taskContext.requiresVerification() ||
|
|
168
|
+
(executionChecklist &&
|
|
169
|
+
(this.options.taskContext.hasTaskTodos() ||
|
|
170
|
+
!!this.options.taskContext.missingExecutionChecklist()))),
|
|
171
|
+
...(executionChecklist
|
|
172
|
+
? { checkTaskPlanStop: this.options.taskContext.prepareTaskPlanStopCheck() }
|
|
173
|
+
: {}),
|
|
113
174
|
harness,
|
|
114
175
|
input: context.input,
|
|
115
176
|
toolContext: {
|
|
@@ -117,6 +178,18 @@ class AgentLoopV1 {
|
|
|
117
178
|
config: { name: 'orion-code', mode: context.mode },
|
|
118
179
|
},
|
|
119
180
|
loopBudget: this.options.loopBudget,
|
|
181
|
+
remainingGoalTokens: this.options.remainingGoalTokens,
|
|
182
|
+
goalDeadlineAt: this.options.goalDeadlineAt,
|
|
183
|
+
allowToolPressureCompaction: this.options.allowToolPressureCompaction === true &&
|
|
184
|
+
(context.mode === 'build' || context.mode === 'auto'),
|
|
185
|
+
takePendingSteering: closeIfEmpty => {
|
|
186
|
+
const inputs = context.takePendingSteering?.(closeIfEmpty) ?? [];
|
|
187
|
+
for (const input of inputs) {
|
|
188
|
+
taskContextCompletion = undefined;
|
|
189
|
+
this.options.taskContext.observeUserInput(input, goal?.goalId);
|
|
190
|
+
}
|
|
191
|
+
return inputs;
|
|
192
|
+
},
|
|
120
193
|
onContextUsage: this.options.onContextUsage,
|
|
121
194
|
compactCoordinator: this.options.compactCoordinator,
|
|
122
195
|
})) {
|
|
@@ -125,23 +198,29 @@ class AgentLoopV1 {
|
|
|
125
198
|
finishReasoning();
|
|
126
199
|
completeAssistant(assistantContent);
|
|
127
200
|
activeStep = undefined;
|
|
201
|
+
taskContextCompletion = undefined;
|
|
128
202
|
break;
|
|
129
203
|
case 'assistant_tool_calls':
|
|
130
|
-
finishReasoning();
|
|
131
|
-
completeAssistant(assistantContent || event.content);
|
|
132
|
-
break;
|
|
133
204
|
case 'message':
|
|
134
205
|
finishReasoning();
|
|
135
|
-
completeAssistant(
|
|
206
|
+
completeAssistant(event.content);
|
|
136
207
|
break;
|
|
137
|
-
case 'warning':
|
|
138
|
-
|
|
139
|
-
const content = event.type === 'warning' ? event.message : event.suggestion;
|
|
208
|
+
case 'warning': {
|
|
209
|
+
const content = event.message;
|
|
140
210
|
const item = context.startItem({ kind: 'reasoning', stepId: activeStep?.stepId });
|
|
141
211
|
context.completeItem(item, { content, summary: compactSummary(content) });
|
|
142
212
|
break;
|
|
143
213
|
}
|
|
144
214
|
case 'complete':
|
|
215
|
+
if (executionChecklist &&
|
|
216
|
+
(event.stats?.finishReason === 'completion_gate' ||
|
|
217
|
+
event.stats?.stopDecision?.reason.code === 'task_step_blocked')) {
|
|
218
|
+
const item = context.startItem({ kind: 'message', role: 'system' });
|
|
219
|
+
context.completeItem(item, {
|
|
220
|
+
content: event.content,
|
|
221
|
+
summary: compactSummary(event.content),
|
|
222
|
+
});
|
|
223
|
+
}
|
|
145
224
|
completeEvent = event;
|
|
146
225
|
break;
|
|
147
226
|
case 'prompt_assembly':
|
|
@@ -161,12 +240,35 @@ class AgentLoopV1 {
|
|
|
161
240
|
: { status: 'failed', error: errorMessage(error) };
|
|
162
241
|
}
|
|
163
242
|
finishReasoning();
|
|
164
|
-
|
|
243
|
+
const stats = completeEvent?.stats;
|
|
244
|
+
// Commit the same terminal result that ThreadRuntime will publish.
|
|
245
|
+
if (completeEvent &&
|
|
246
|
+
stats &&
|
|
247
|
+
context.abortSignal.aborted &&
|
|
248
|
+
stats.finishReason !== 'cancelled') {
|
|
249
|
+
completeEvent = {
|
|
250
|
+
...completeEvent,
|
|
251
|
+
content: 'Operation cancelled.',
|
|
252
|
+
stats: (0, query_1.withLoopFinishReason)(stats, 'cancelled'),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const failed = isFailedLoopStats(completeEvent?.stats);
|
|
256
|
+
const failureMessage = completeEvent?.content || 'AgentLoop failed';
|
|
257
|
+
if (failed && assistantItem)
|
|
258
|
+
context.failItem(assistantItem, failureMessage);
|
|
259
|
+
else
|
|
260
|
+
completeAssistant(assistantContent);
|
|
165
261
|
if (!completeEvent) {
|
|
166
262
|
return context.abortSignal.aborted
|
|
167
263
|
? { status: 'interrupted', reason: abortReason(context.abortSignal) }
|
|
168
264
|
: { status: 'failed', error: 'AgentLoop ended without a terminal Query event' };
|
|
169
265
|
}
|
|
266
|
+
// The completion audit can precede the final visible answer or be bypassed
|
|
267
|
+
// by a terminal provider/tool outcome. Account for the entire committed turn.
|
|
268
|
+
this.options.taskContext.recordProgress(progressAtAdmission);
|
|
269
|
+
if (completeEvent.stats?.finishReason === 'budget_exceeded') {
|
|
270
|
+
taskContextCompletion = undefined;
|
|
271
|
+
}
|
|
170
272
|
const commitContent = {
|
|
171
273
|
threadId: context.threadId,
|
|
172
274
|
turnId: context.turnId,
|
|
@@ -182,21 +284,18 @@ class AgentLoopV1 {
|
|
|
182
284
|
...commitContent,
|
|
183
285
|
digest: (0, canonical_1.digestRuntimeValue)(commitContent),
|
|
184
286
|
});
|
|
185
|
-
if (
|
|
287
|
+
if (completeEvent.stats?.finishReason === 'cancelled') {
|
|
186
288
|
return { status: 'interrupted', reason: abortReason(context.abortSignal) };
|
|
187
289
|
}
|
|
188
|
-
if (
|
|
189
|
-
return { status: 'failed', error:
|
|
290
|
+
if (failed) {
|
|
291
|
+
return { status: 'failed', error: failureMessage };
|
|
190
292
|
}
|
|
191
293
|
const maintenance = completeEvent.compact
|
|
192
294
|
? createAutomaticCompactMaintenance(completeEvent.compact)
|
|
193
295
|
: undefined;
|
|
194
296
|
return {
|
|
195
297
|
status: 'completed',
|
|
196
|
-
outcome: (
|
|
197
|
-
finishReason: completeEvent.stats?.finishReason ?? 'completed',
|
|
198
|
-
stopDecision: completeEvent.stats?.stopDecision,
|
|
199
|
-
}),
|
|
298
|
+
outcome: serializeAgentLoopOutcome(completeEvent.stats, context.mode !== 'goal'),
|
|
200
299
|
...(maintenance ? { maintenance } : {}),
|
|
201
300
|
};
|
|
202
301
|
}
|
|
@@ -220,9 +319,22 @@ class AgentLoopV1 {
|
|
|
220
319
|
await this.options.onStepCaptured?.(snapshot);
|
|
221
320
|
return snapshot;
|
|
222
321
|
}
|
|
223
|
-
async invokeTool(context, snapshot, name, args, abortSignal, metadata) {
|
|
322
|
+
async invokeTool(context, snapshot, name, args, bindRecovery, abortSignal, metadata) {
|
|
224
323
|
if (!metadata)
|
|
225
324
|
throw new Error('ToolGateway execution requires provider call identity');
|
|
325
|
+
const executionChecklist = this.options.enableTaskTodos === true && (0, task_checklist_1.supportsExecutionChecklist)(context.mode);
|
|
326
|
+
const descriptor = snapshot.toolRouter.resolveDescriptor(name);
|
|
327
|
+
const prerequisiteFailure = executionChecklist && mayChangeWorkspace(descriptor, args)
|
|
328
|
+
? this.options.taskContext.missingExecutionChecklist({
|
|
329
|
+
path: (name === 'write_file' || name === 'edit_file') && typeof args.path === 'string'
|
|
330
|
+
? args.path
|
|
331
|
+
: undefined,
|
|
332
|
+
command: name === 'exec_command' && typeof args.command === 'string'
|
|
333
|
+
? args.command
|
|
334
|
+
: undefined,
|
|
335
|
+
cwd: typeof args.cwd === 'string' ? args.cwd : undefined,
|
|
336
|
+
})
|
|
337
|
+
: undefined;
|
|
226
338
|
const invocationId = deterministicRuntimeId([
|
|
227
339
|
context.threadId,
|
|
228
340
|
context.turnId,
|
|
@@ -234,6 +346,9 @@ class AgentLoopV1 {
|
|
|
234
346
|
cwd: snapshot.environment.cwd,
|
|
235
347
|
config: { name: 'orion-code', mode: context.mode },
|
|
236
348
|
};
|
|
349
|
+
const activeTodo = executionChecklist && name !== 'todo_write'
|
|
350
|
+
? this.options.taskContext.activeTaskTodo()
|
|
351
|
+
: undefined;
|
|
237
352
|
const invoked = await this.options.gateway.invoke({
|
|
238
353
|
invocationId,
|
|
239
354
|
snapshot,
|
|
@@ -241,15 +356,40 @@ class AgentLoopV1 {
|
|
|
241
356
|
args,
|
|
242
357
|
context: toolContext,
|
|
243
358
|
abortSignal,
|
|
359
|
+
prerequisiteFailure,
|
|
360
|
+
taskRecovery: bindRecovery?.({
|
|
361
|
+
descriptor,
|
|
362
|
+
name,
|
|
363
|
+
args,
|
|
364
|
+
cwd: toolContext.cwd,
|
|
365
|
+
activeTodoId: activeTodo,
|
|
366
|
+
}),
|
|
244
367
|
});
|
|
368
|
+
const receipt = invoked.receipt;
|
|
369
|
+
const evidence = (0, task_context_recovery_1.projectTaskToolEvidence)(receipt, args, toolContext.cwd);
|
|
370
|
+
(0, task_context_recovery_1.recordTaskTodoToolReceipt)(this.options.taskContext, activeTodo, receipt, evidence);
|
|
371
|
+
const { changedFile, verification } = evidence;
|
|
245
372
|
const permissionDecision = projectPermissionDecision(invoked.receipt);
|
|
246
373
|
return {
|
|
247
374
|
result: (0, tool_serializer_1.serializeToolResult)(invoked.result),
|
|
248
375
|
...(permissionDecision ? { permissionDecision } : {}),
|
|
376
|
+
...(verification ? { verification } : {}),
|
|
377
|
+
...(receipt.terminalPhase === 'execute' ? { toolReceiptDigest: receipt.digest } : {}),
|
|
378
|
+
...(changedFile ? { changedFile } : {}),
|
|
249
379
|
};
|
|
250
380
|
}
|
|
251
381
|
}
|
|
252
382
|
exports.AgentLoopV1 = AgentLoopV1;
|
|
383
|
+
function mayChangeWorkspace(descriptor, args) {
|
|
384
|
+
if (descriptor?.risk.effect !== 'workspace_write')
|
|
385
|
+
return false;
|
|
386
|
+
if (descriptor.name === 'edit_file' && args.preview === true)
|
|
387
|
+
return false;
|
|
388
|
+
if (descriptor.name === 'exec_command' && typeof args.command === 'string') {
|
|
389
|
+
return !(0, bash_security_1.isReadOnlyCommand)(args.command);
|
|
390
|
+
}
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
253
393
|
function projectPermissionDecision(receipt) {
|
|
254
394
|
const policy = receipt.policy;
|
|
255
395
|
if (!policy)
|
|
@@ -379,10 +519,10 @@ function createSnapshotToolFacade(descriptor) {
|
|
|
379
519
|
isFileEdit: () => descriptor.risk.fileEdit,
|
|
380
520
|
};
|
|
381
521
|
}
|
|
382
|
-
function createQueryTaskContextAdapter(taskContext, onCompletion, planningPhase
|
|
522
|
+
function createQueryTaskContextAdapter(taskContext, onCompletion, planningPhase, enforceTaskTodos, requireEveryCriterion) {
|
|
383
523
|
return {
|
|
384
524
|
updateCapabilityProfile: input => structuredClone(taskContext.observeCapability(input)),
|
|
385
|
-
assembleMessages: (messages, options) => taskContext.assembleMessages(messages, options),
|
|
525
|
+
assembleMessages: (messages, options) => taskContext.assembleMessages(messages, { ...options, includeTaskTodos: enforceTaskTodos }),
|
|
386
526
|
getCapsule: () => {
|
|
387
527
|
const capsule = taskContext.getCapsule();
|
|
388
528
|
return capsule
|
|
@@ -393,9 +533,12 @@ function createQueryTaskContextAdapter(taskContext, onCompletion, planningPhase
|
|
|
393
533
|
recordAssistantResponse: response => taskContext.observeAssistantResponse(response),
|
|
394
534
|
beforeToolUse: input => structuredClone(taskContext.checkToolUse(input)),
|
|
395
535
|
asToolBlockedResult: result => taskContext.toolBlockedResult(result),
|
|
396
|
-
recordToolResult: input =>
|
|
536
|
+
recordToolResult: input => {
|
|
537
|
+
if (input.name !== 'todo_write')
|
|
538
|
+
taskContext.observeToolResult(input);
|
|
539
|
+
},
|
|
397
540
|
beforeComplete: () => {
|
|
398
|
-
const decision = taskContext.auditCompletion();
|
|
541
|
+
const decision = taskContext.auditCompletion(enforceTaskTodos, requireEveryCriterion);
|
|
399
542
|
onCompletion(decision);
|
|
400
543
|
// PLAN completes a planning phase, not the parent implementation task.
|
|
401
544
|
// Persist the unmodified audit for the PlanReceipt, while allowing the
|
|
@@ -74,16 +74,21 @@ export declare class AgentRuntimeController {
|
|
|
74
74
|
private readonly agentModeLifecycle;
|
|
75
75
|
private readonly pendingPermissions;
|
|
76
76
|
private activeRun;
|
|
77
|
+
private activeReview?;
|
|
77
78
|
private pendingAgentMode;
|
|
78
79
|
private readonly goalControlRuns;
|
|
79
80
|
private activeGoalRuntimeTransitions;
|
|
80
81
|
private goalRuntimeActive;
|
|
82
|
+
private goalEventRevision;
|
|
81
83
|
private settingsBoundarySynchronizations;
|
|
84
|
+
private reportedInvalidConfigRevision?;
|
|
82
85
|
private stopping;
|
|
83
86
|
private nextPermissionRequestId;
|
|
84
87
|
private readonly queuedCommands;
|
|
85
|
-
private
|
|
86
|
-
private
|
|
88
|
+
private followupQueue;
|
|
89
|
+
private followupSessionId?;
|
|
90
|
+
private followupsPaused;
|
|
91
|
+
private compacting;
|
|
87
92
|
private nextFollowupId;
|
|
88
93
|
constructor(options: AgentRuntimeControllerOptions);
|
|
89
94
|
hasActiveTurn(): boolean;
|
|
@@ -117,9 +122,15 @@ export declare class AgentRuntimeController {
|
|
|
117
122
|
/** Set an exact mode immediately while idle, or at the next logical-request boundary. */
|
|
118
123
|
setAgentMode(mode: AgentMode): AgentRuntimeInputResult;
|
|
119
124
|
private queueFollowup;
|
|
125
|
+
private checkFollowupSize;
|
|
126
|
+
private loadFollowupQueue;
|
|
127
|
+
private saveFollowupQueue;
|
|
128
|
+
private reportFollowupFailure;
|
|
129
|
+
private nextPendingFollowup;
|
|
120
130
|
private manageFollowupQueue;
|
|
121
131
|
submit(input: string): AgentRuntimeSubmitResult;
|
|
122
132
|
private emitImmediateCommandSnapshot;
|
|
133
|
+
private runTrackedReview;
|
|
123
134
|
private runCommand;
|
|
124
135
|
private createCommandContext;
|
|
125
136
|
private submitTurnRequest;
|
|
@@ -127,6 +138,7 @@ export declare class AgentRuntimeController {
|
|
|
127
138
|
stopActiveTurn(): Promise<void>;
|
|
128
139
|
waitForIdle(): Promise<void>;
|
|
129
140
|
compactContext(): Promise<import('./agent-runtime-runner').AgentRuntimeCompactResultV1>;
|
|
141
|
+
private runTrackedCompact;
|
|
130
142
|
canCompactContext(): boolean;
|
|
131
143
|
planReviewState(): Promise<import('./thread-projection').PlanReviewProjectionV1 | undefined>;
|
|
132
144
|
reviewPlan(input: Parameters<NonNullable<import('./agent-runtime-runner').AgentRuntimeRunnerV1['reviewPlan']>>[0]): Promise<import('./plan-review').PlanReviewResolutionReceiptV1>;
|
|
@@ -146,10 +158,8 @@ export declare class AgentRuntimeController {
|
|
|
146
158
|
requestToolPermission(request: AgentRuntimeToolPermissionRequest): Promise<boolean>;
|
|
147
159
|
private startGoalControl;
|
|
148
160
|
private renderGoalControl;
|
|
149
|
-
private observeGoalControlResult;
|
|
150
161
|
private observeGoalRuntimeEvent;
|
|
151
162
|
private recordPermissionDecision;
|
|
152
|
-
private applyPermissionModeChange;
|
|
153
163
|
private rejectPendingPermissions;
|
|
154
164
|
}
|
|
155
165
|
//# sourceMappingURL=agent-runtime-controller.d.ts.map
|