@code-yeongyu/senpi-agent-core 2026.9.12-3 → 2026.9.12
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 +0 -4
- package/dist/harness/agent-harness.d.ts +384 -639
- package/dist/harness/agent-harness.d.ts.map +1 -1
- package/dist/harness/agent-harness.js +250 -5
- package/dist/harness/agent-harness.js.map +1 -1
- package/dist/harness/compaction/branch-summarization.d.ts +6 -12
- package/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/harness/compaction/branch-summarization.js +27 -33
- package/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/dist/harness/compaction/compaction.d.ts +8 -30
- package/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/dist/harness/compaction/compaction.js +64 -53
- package/dist/harness/compaction/compaction.js.map +1 -1
- package/dist/harness/env/nodejs.d.ts +28 -25
- package/dist/harness/env/nodejs.d.ts.map +1 -1
- package/dist/harness/env/nodejs.js +125 -368
- package/dist/harness/env/nodejs.js.map +1 -1
- package/dist/harness/events.d.ts +38 -20
- package/dist/harness/events.d.ts.map +1 -1
- package/dist/harness/events.js +55 -233
- package/dist/harness/events.js.map +1 -1
- package/dist/harness/messages.d.ts +2 -2
- package/dist/harness/messages.d.ts.map +1 -1
- package/dist/harness/messages.js.map +1 -1
- package/dist/harness/prompt-templates.d.ts +2 -3
- package/dist/harness/prompt-templates.d.ts.map +1 -1
- package/dist/harness/prompt-templates.js +17 -17
- package/dist/harness/prompt-templates.js.map +1 -1
- package/dist/harness/reducer.d.ts +100 -0
- package/dist/harness/reducer.d.ts.map +1 -0
- package/dist/harness/reducer.js +420 -0
- package/dist/harness/reducer.js.map +1 -0
- package/dist/harness/result.d.ts +0 -93
- package/dist/harness/result.d.ts.map +1 -1
- package/dist/harness/result.js +0 -39
- package/dist/harness/result.js.map +1 -1
- package/dist/harness/session/context.d.ts +19 -6
- package/dist/harness/session/context.d.ts.map +1 -1
- package/dist/harness/session/context.js +53 -31
- package/dist/harness/session/context.js.map +1 -1
- package/dist/harness/session/index.d.ts +5 -9
- package/dist/harness/session/index.d.ts.map +1 -1
- package/dist/harness/session/index.js +4 -7
- package/dist/harness/session/index.js.map +1 -1
- package/dist/harness/session/jsonl/codec.d.ts +8 -19
- package/dist/harness/session/jsonl/codec.d.ts.map +1 -1
- package/dist/harness/session/jsonl/codec.js +219 -34
- package/dist/harness/session/jsonl/codec.js.map +1 -1
- package/dist/harness/session/jsonl/errors.d.ts +9 -0
- package/dist/harness/session/jsonl/errors.d.ts.map +1 -0
- package/dist/harness/session/jsonl/errors.js +18 -0
- package/dist/harness/session/jsonl/errors.js.map +1 -0
- package/dist/harness/session/jsonl/repo.d.ts +24 -27
- package/dist/harness/session/jsonl/repo.d.ts.map +1 -1
- package/dist/harness/session/jsonl/repo.js +151 -276
- package/dist/harness/session/jsonl/repo.js.map +1 -1
- package/dist/harness/session/jsonl/storage.d.ts +41 -39
- package/dist/harness/session/jsonl/storage.d.ts.map +1 -1
- package/dist/harness/session/jsonl/storage.js +196 -175
- package/dist/harness/session/jsonl/storage.js.map +1 -1
- package/dist/harness/session/jsonl/types.d.ts +22 -23
- package/dist/harness/session/jsonl/types.d.ts.map +1 -1
- package/dist/harness/session/jsonl/types.js +1 -2
- package/dist/harness/session/jsonl/types.js.map +1 -1
- package/dist/harness/session/jsonl.d.ts +3 -0
- package/dist/harness/session/jsonl.d.ts.map +1 -0
- package/dist/harness/session/jsonl.js +2 -0
- package/dist/harness/session/jsonl.js.map +1 -0
- package/dist/harness/session/memory.d.ts +40 -44
- package/dist/harness/session/memory.d.ts.map +1 -1
- package/dist/harness/session/memory.js +115 -333
- package/dist/harness/session/memory.js.map +1 -1
- package/dist/harness/session/session.d.ts +51 -78
- package/dist/harness/session/session.d.ts.map +1 -1
- package/dist/harness/session/session.js +207 -327
- package/dist/harness/session/session.js.map +1 -1
- package/dist/harness/session/state.d.ts +65 -0
- package/dist/harness/session/state.d.ts.map +1 -0
- package/dist/harness/session/state.js +320 -0
- package/dist/harness/session/state.js.map +1 -0
- package/dist/harness/session/testing/conformance.d.ts +4 -0
- package/dist/harness/session/testing/conformance.d.ts.map +1 -0
- package/dist/harness/session/testing/conformance.js +762 -0
- package/dist/harness/session/testing/conformance.js.map +1 -0
- package/dist/harness/session/testing/index.d.ts +2 -9
- package/dist/harness/session/testing/index.d.ts.map +1 -1
- package/dist/harness/session/testing/index.js +1 -8
- package/dist/harness/session/testing/index.js.map +1 -1
- package/dist/harness/session/testing/types.d.ts +7 -5
- package/dist/harness/session/testing/types.d.ts.map +1 -1
- package/dist/harness/session/testing/types.js.map +1 -1
- package/dist/harness/session/types.d.ts +265 -425
- package/dist/harness/session/types.d.ts.map +1 -1
- package/dist/harness/session/types.js +7 -7
- package/dist/harness/session/types.js.map +1 -1
- package/dist/harness/skills.d.ts +2 -3
- package/dist/harness/skills.d.ts.map +1 -1
- package/dist/harness/skills.js +26 -29
- package/dist/harness/skills.js.map +1 -1
- package/dist/harness/telemetry.d.ts +43 -64
- package/dist/harness/telemetry.d.ts.map +1 -1
- package/dist/harness/telemetry.js +26 -45
- package/dist/harness/telemetry.js.map +1 -1
- package/dist/harness/tools/bash.d.ts +4 -4
- package/dist/harness/tools/bash.d.ts.map +1 -1
- package/dist/harness/tools/bash.js +93 -66
- package/dist/harness/tools/bash.js.map +1 -1
- package/dist/harness/tools/edit.d.ts.map +1 -1
- package/dist/harness/tools/edit.js +13 -17
- package/dist/harness/tools/edit.js.map +1 -1
- package/dist/harness/tools/file-mutation-queue.d.ts +1 -2
- package/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/harness/tools/file-mutation-queue.js +5 -5
- package/dist/harness/tools/file-mutation-queue.js.map +1 -1
- package/dist/harness/tools/path-utils.d.ts +2 -3
- package/dist/harness/tools/path-utils.d.ts.map +1 -1
- package/dist/harness/tools/path-utils.js +5 -5
- package/dist/harness/tools/path-utils.js.map +1 -1
- package/dist/harness/tools/read.d.ts +1 -2
- package/dist/harness/tools/read.d.ts.map +1 -1
- package/dist/harness/tools/read.js +6 -4
- package/dist/harness/tools/read.js.map +1 -1
- package/dist/harness/tools/write.d.ts.map +1 -1
- package/dist/harness/tools/write.js +8 -12
- package/dist/harness/tools/write.js.map +1 -1
- package/dist/harness/types.d.ts +45 -128
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js.map +1 -1
- package/dist/harness/utils/shell-output.d.ts +5 -19
- package/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/dist/harness/utils/shell-output.js +192 -65
- package/dist/harness/utils/shell-output.js.map +1 -1
- package/dist/harness/utils/truncate.d.ts +0 -1
- package/dist/harness/utils/truncate.d.ts.map +1 -1
- package/dist/harness/utils/truncate.js +1 -1
- package/dist/harness/utils/truncate.js.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/search/index.d.ts +16 -24
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +1 -1
- package/dist/search/index.js.map +1 -1
- package/dist/search/scanning.d.ts +29 -0
- package/dist/search/scanning.d.ts.map +1 -0
- package/dist/search/scanning.js +103 -0
- package/dist/search/scanning.js.map +1 -0
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +6 -27
- package/dist/harness/config.d.ts +0 -9
- package/dist/harness/config.d.ts.map +0 -1
- package/dist/harness/config.js +0 -35
- package/dist/harness/config.js.map +0 -1
- package/dist/harness/context.d.ts +0 -9
- package/dist/harness/context.d.ts.map +0 -1
- package/dist/harness/context.js +0 -13
- package/dist/harness/context.js.map +0 -1
- package/dist/harness/execution/assistant.d.ts +0 -42
- package/dist/harness/execution/assistant.d.ts.map +0 -1
- package/dist/harness/execution/assistant.js +0 -82
- package/dist/harness/execution/assistant.js.map +0 -1
- package/dist/harness/execution/effect-gate.d.ts +0 -22
- package/dist/harness/execution/effect-gate.d.ts.map +0 -1
- package/dist/harness/execution/effect-gate.js +0 -48
- package/dist/harness/execution/effect-gate.js.map +0 -1
- package/dist/harness/execution/tools.d.ts +0 -67
- package/dist/harness/execution/tools.d.ts.map +0 -1
- package/dist/harness/execution/tools.js +0 -121
- package/dist/harness/execution/tools.js.map +0 -1
- package/dist/harness/hooks.d.ts +0 -38
- package/dist/harness/hooks.d.ts.map +0 -1
- package/dist/harness/hooks.js +0 -404
- package/dist/harness/hooks.js.map +0 -1
- package/dist/harness/runtime/drive/boundary.d.ts +0 -28
- package/dist/harness/runtime/drive/boundary.d.ts.map +0 -1
- package/dist/harness/runtime/drive/boundary.js +0 -173
- package/dist/harness/runtime/drive/boundary.js.map +0 -1
- package/dist/harness/runtime/drive/checkpoint.d.ts +0 -8
- package/dist/harness/runtime/drive/checkpoint.d.ts.map +0 -1
- package/dist/harness/runtime/drive/checkpoint.js +0 -133
- package/dist/harness/runtime/drive/checkpoint.js.map +0 -1
- package/dist/harness/runtime/drive/deferred.d.ts +0 -15
- package/dist/harness/runtime/drive/deferred.d.ts.map +0 -1
- package/dist/harness/runtime/drive/deferred.js +0 -179
- package/dist/harness/runtime/drive/deferred.js.map +0 -1
- package/dist/harness/runtime/drive/generation.d.ts +0 -8
- package/dist/harness/runtime/drive/generation.d.ts.map +0 -1
- package/dist/harness/runtime/drive/generation.js +0 -205
- package/dist/harness/runtime/drive/generation.js.map +0 -1
- package/dist/harness/runtime/drive/reconcile.d.ts +0 -5
- package/dist/harness/runtime/drive/reconcile.d.ts.map +0 -1
- package/dist/harness/runtime/drive/reconcile.js +0 -140
- package/dist/harness/runtime/drive/reconcile.js.map +0 -1
- package/dist/harness/runtime/drive/recovery.d.ts +0 -8
- package/dist/harness/runtime/drive/recovery.d.ts.map +0 -1
- package/dist/harness/runtime/drive/recovery.js +0 -85
- package/dist/harness/runtime/drive/recovery.js.map +0 -1
- package/dist/harness/runtime/drive/response.d.ts +0 -23
- package/dist/harness/runtime/drive/response.d.ts.map +0 -1
- package/dist/harness/runtime/drive/response.js +0 -394
- package/dist/harness/runtime/drive/response.js.map +0 -1
- package/dist/harness/runtime/drive/retry.d.ts +0 -4
- package/dist/harness/runtime/drive/retry.d.ts.map +0 -1
- package/dist/harness/runtime/drive/retry.js +0 -34
- package/dist/harness/runtime/drive/retry.js.map +0 -1
- package/dist/harness/runtime/drive/structural.d.ts +0 -32
- package/dist/harness/runtime/drive/structural.d.ts.map +0 -1
- package/dist/harness/runtime/drive/structural.js +0 -929
- package/dist/harness/runtime/drive/structural.js.map +0 -1
- package/dist/harness/runtime/drive/terminal.d.ts +0 -7
- package/dist/harness/runtime/drive/terminal.d.ts.map +0 -1
- package/dist/harness/runtime/drive/terminal.js +0 -49
- package/dist/harness/runtime/drive/terminal.js.map +0 -1
- package/dist/harness/runtime/drive/tool-placement.d.ts +0 -14
- package/dist/harness/runtime/drive/tool-placement.d.ts.map +0 -1
- package/dist/harness/runtime/drive/tool-placement.js +0 -244
- package/dist/harness/runtime/drive/tool-placement.js.map +0 -1
- package/dist/harness/runtime/drive/tools.d.ts +0 -6
- package/dist/harness/runtime/drive/tools.d.ts.map +0 -1
- package/dist/harness/runtime/drive/tools.js +0 -449
- package/dist/harness/runtime/drive/tools.js.map +0 -1
- package/dist/harness/runtime/drive.d.ts +0 -6
- package/dist/harness/runtime/drive.d.ts.map +0 -1
- package/dist/harness/runtime/drive.js +0 -93
- package/dist/harness/runtime/drive.js.map +0 -1
- package/dist/harness/runtime/harness.d.ts +0 -59
- package/dist/harness/runtime/harness.d.ts.map +0 -1
- package/dist/harness/runtime/harness.js +0 -302
- package/dist/harness/runtime/harness.js.map +0 -1
- package/dist/harness/runtime/index.d.ts +0 -2
- package/dist/harness/runtime/index.d.ts.map +0 -1
- package/dist/harness/runtime/index.js +0 -2
- package/dist/harness/runtime/index.js.map +0 -1
- package/dist/harness/runtime/lane.d.ts +0 -118
- package/dist/harness/runtime/lane.d.ts.map +0 -1
- package/dist/harness/runtime/lane.js +0 -1559
- package/dist/harness/runtime/lane.js.map +0 -1
- package/dist/harness/runtime/progress.d.ts +0 -15
- package/dist/harness/runtime/progress.d.ts.map +0 -1
- package/dist/harness/runtime/progress.js +0 -66
- package/dist/harness/runtime/progress.js.map +0 -1
- package/dist/harness/runtime/reducer.d.ts +0 -5
- package/dist/harness/runtime/reducer.d.ts.map +0 -1
- package/dist/harness/runtime/reducer.js +0 -240
- package/dist/harness/runtime/reducer.js.map +0 -1
- package/dist/harness/runtime/restore.d.ts +0 -24
- package/dist/harness/runtime/restore.d.ts.map +0 -1
- package/dist/harness/runtime/restore.js +0 -117
- package/dist/harness/runtime/restore.js.map +0 -1
- package/dist/harness/runtime/transcript.d.ts +0 -21
- package/dist/harness/runtime/transcript.d.ts.map +0 -1
- package/dist/harness/runtime/transcript.js +0 -72
- package/dist/harness/runtime/transcript.js.map +0 -1
- package/dist/harness/runtime/types.d.ts +0 -105
- package/dist/harness/runtime/types.d.ts.map +0 -1
- package/dist/harness/runtime/types.js +0 -50
- package/dist/harness/runtime/types.js.map +0 -1
- package/dist/harness/session/commit.d.ts +0 -53
- package/dist/harness/session/commit.d.ts.map +0 -1
- package/dist/harness/session/commit.js +0 -57
- package/dist/harness/session/commit.js.map +0 -1
- package/dist/harness/session/fork-policy.d.ts +0 -21
- package/dist/harness/session/fork-policy.d.ts.map +0 -1
- package/dist/harness/session/fork-policy.js +0 -55
- package/dist/harness/session/fork-policy.js.map +0 -1
- package/dist/harness/session/fork.d.ts +0 -16
- package/dist/harness/session/fork.d.ts.map +0 -1
- package/dist/harness/session/fork.js +0 -79
- package/dist/harness/session/fork.js.map +0 -1
- package/dist/harness/session/in-memory-storage-state.d.ts +0 -39
- package/dist/harness/session/in-memory-storage-state.d.ts.map +0 -1
- package/dist/harness/session/in-memory-storage-state.js +0 -269
- package/dist/harness/session/in-memory-storage-state.js.map +0 -1
- package/dist/harness/session/jsonl/fork.d.ts +0 -38
- package/dist/harness/session/jsonl/fork.d.ts.map +0 -1
- package/dist/harness/session/jsonl/fork.js +0 -266
- package/dist/harness/session/jsonl/fork.js.map +0 -1
- package/dist/harness/session/jsonl/index.d.ts +0 -4
- package/dist/harness/session/jsonl/index.d.ts.map +0 -1
- package/dist/harness/session/jsonl/index.js +0 -4
- package/dist/harness/session/jsonl/index.js.map +0 -1
- package/dist/harness/session/jsonl/io.d.ts +0 -14
- package/dist/harness/session/jsonl/io.d.ts.map +0 -1
- package/dist/harness/session/jsonl/io.js +0 -86
- package/dist/harness/session/jsonl/io.js.map +0 -1
- package/dist/harness/session/jsonl/legacy-v3.d.ts +0 -44
- package/dist/harness/session/jsonl/legacy-v3.d.ts.map +0 -1
- package/dist/harness/session/jsonl/legacy-v3.js +0 -454
- package/dist/harness/session/jsonl/legacy-v3.js.map +0 -1
- package/dist/harness/session/mutation-line.d.ts +0 -8
- package/dist/harness/session/mutation-line.d.ts.map +0 -1
- package/dist/harness/session/mutation-line.js +0 -22
- package/dist/harness/session/mutation-line.js.map +0 -1
- package/dist/harness/session/testing/benchmark/datasets.d.ts +0 -12
- package/dist/harness/session/testing/benchmark/datasets.d.ts.map +0 -1
- package/dist/harness/session/testing/benchmark/datasets.js +0 -24
- package/dist/harness/session/testing/benchmark/datasets.js.map +0 -1
- package/dist/harness/session/testing/benchmark/session-repo.d.ts +0 -42
- package/dist/harness/session/testing/benchmark/session-repo.d.ts.map +0 -1
- package/dist/harness/session/testing/benchmark/session-repo.js +0 -127
- package/dist/harness/session/testing/benchmark/session-repo.js.map +0 -1
- package/dist/harness/session/testing/benchmark/storage.d.ts +0 -25
- package/dist/harness/session/testing/benchmark/storage.d.ts.map +0 -1
- package/dist/harness/session/testing/benchmark/storage.js +0 -114
- package/dist/harness/session/testing/benchmark/storage.js.map +0 -1
- package/dist/harness/session/testing/conformance/session-repo.d.ts +0 -23
- package/dist/harness/session/testing/conformance/session-repo.d.ts.map +0 -1
- package/dist/harness/session/testing/conformance/session-repo.js +0 -809
- package/dist/harness/session/testing/conformance/session-repo.js.map +0 -1
- package/dist/harness/session/testing/conformance/storage.d.ts +0 -4
- package/dist/harness/session/testing/conformance/storage.d.ts.map +0 -1
- package/dist/harness/session/testing/conformance/storage.js +0 -600
- package/dist/harness/session/testing/conformance/storage.js.map +0 -1
- package/dist/harness/session/testing/gating-storage.d.ts +0 -26
- package/dist/harness/session/testing/gating-storage.d.ts.map +0 -1
- package/dist/harness/session/testing/gating-storage.js +0 -103
- package/dist/harness/session/testing/gating-storage.js.map +0 -1
- package/dist/harness/session/testing/instrumented-storage.d.ts +0 -11
- package/dist/harness/session/testing/instrumented-storage.d.ts.map +0 -1
- package/dist/harness/session/testing/instrumented-storage.js +0 -19
- package/dist/harness/session/testing/instrumented-storage.js.map +0 -1
- package/dist/harness/session/testing/storage-decorator.d.ts +0 -20
- package/dist/harness/session/testing/storage-decorator.d.ts.map +0 -1
- package/dist/harness/session/testing/storage-decorator.js +0 -40
- package/dist/harness/session/testing/storage-decorator.js.map +0 -1
- package/dist/harness/session/values.d.ts +0 -95
- package/dist/harness/session/values.d.ts.map +0 -1
- package/dist/harness/session/values.js +0 -81
- package/dist/harness/session/values.js.map +0 -1
- package/dist/harness/utils/adaptive-publisher.d.ts +0 -24
- package/dist/harness/utils/adaptive-publisher.d.ts.map +0 -1
- package/dist/harness/utils/adaptive-publisher.js +0 -79
- package/dist/harness/utils/adaptive-publisher.js.map +0 -1
- package/dist/harness/utils/output-capture.d.ts +0 -31
- package/dist/harness/utils/output-capture.d.ts.map +0 -1
- package/dist/harness/utils/output-capture.js +0 -217
- package/dist/harness/utils/output-capture.js.map +0 -1
- package/dist/harness/utils/usage.d.ts +0 -4
- package/dist/harness/utils/usage.d.ts.map +0 -1
- package/dist/harness/utils/usage.js +0 -33
- package/dist/harness/utils/usage.js.map +0 -1
|
@@ -1,716 +1,461 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
import type { BranchScan, Entry, EntryProjector, JsonValue, LaneConfiguration, OperationError, OperationResultRecord, Session, SessionStats, SettledAssistantMessage, UsageRow } from "./session/types.ts";
|
|
12
|
-
import type { AgentHarnessResources, AgentHarnessStreamOptions, AgentHarnessStreamOptionsPatch, AgentHarnessTool, PromptTemplate, Skill } from "./types.ts";
|
|
13
|
-
/** Convenience-only suspended run observation, constructed when M8 exposes public drive. */
|
|
14
|
-
export interface SuspendedRun {
|
|
1
|
+
import type { Api, AssistantMessage, DeferredHandle, ImageContent, Message, Model, Models, RetryPolicy, SimpleStreamOptions, Usage } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { AgentMessage, AgentTool, QueueMode, ThinkingLevel } from "../types.ts";
|
|
3
|
+
import type { CompactionSettings } from "./compaction/compaction.ts";
|
|
4
|
+
import { type Result as ResultValue } from "./result.ts";
|
|
5
|
+
import type { BranchSummaryEntry, CompactionEntry, Entry, JsonValue, ProvisionedEntry, Session, SessionTree } from "./session/index.ts";
|
|
6
|
+
import type { TelemetryContext } from "./telemetry.ts";
|
|
7
|
+
import type { AgentHarnessResources, PromptTemplate, Skill } from "./types.ts";
|
|
8
|
+
declare const LaneBusy_base: import("./result.ts").TaggedErrorFactory<"LaneBusy">;
|
|
9
|
+
export declare class LaneBusy extends LaneBusy_base<{
|
|
10
|
+
lane: string;
|
|
15
11
|
operationId: string;
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
operationKind: "run" | "compaction" | "navigation";
|
|
13
|
+
message: string;
|
|
14
|
+
}> {
|
|
18
15
|
}
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
run?: OperationResultRecord | SuspendedRun;
|
|
27
|
-
}, LaneBusy | InvalidNavigation | UnknownTarget | Closed>;
|
|
28
|
-
export type ResumeResult = Result<OperationResultRecord | SuspendedRun, NothingToResume | Closed>;
|
|
29
|
-
export type QueueResult = Result<{
|
|
30
|
-
entryId: string;
|
|
31
|
-
}, InvalidMessage | Closed>;
|
|
32
|
-
export type CancelQueuedResult = Result<{
|
|
33
|
-
kind: "cancelled" | "already_consumed" | "not_found";
|
|
34
|
-
}, Closed>;
|
|
35
|
-
export type AbortResult = Result<{
|
|
36
|
-
operationId: string;
|
|
37
|
-
steer: AgentMessage[];
|
|
38
|
-
followUp: AgentMessage[];
|
|
39
|
-
}, NoActiveOperation | Closed>;
|
|
40
|
-
export type RecordUsageResult = Result<{
|
|
41
|
-
usageId: string;
|
|
42
|
-
}, Closed>;
|
|
43
|
-
export interface NavigateOptions {
|
|
44
|
-
summarize?: boolean;
|
|
45
|
-
label?: string;
|
|
46
|
-
customInstructions?: string;
|
|
16
|
+
declare const MissingIdentities_base: import("./result.ts").TaggedErrorFactory<"MissingIdentities">;
|
|
17
|
+
export declare class MissingIdentities extends MissingIdentities_base<{
|
|
18
|
+
lane: string;
|
|
19
|
+
tools: string[];
|
|
20
|
+
models: string[];
|
|
21
|
+
message: string;
|
|
22
|
+
}> {
|
|
47
23
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
24
|
+
declare const NoActiveRun_base: import("./result.ts").TaggedErrorFactory<"NoActiveRun">;
|
|
25
|
+
export declare class NoActiveRun extends NoActiveRun_base<{
|
|
26
|
+
lane: string;
|
|
27
|
+
message: string;
|
|
28
|
+
}> {
|
|
29
|
+
}
|
|
30
|
+
declare const NoActiveOperation_base: import("./result.ts").TaggedErrorFactory<"NoActiveOperation">;
|
|
31
|
+
export declare class NoActiveOperation extends NoActiveOperation_base<{
|
|
32
|
+
lane: string;
|
|
33
|
+
message: string;
|
|
34
|
+
}> {
|
|
35
|
+
}
|
|
36
|
+
declare const NothingToResume_base: import("./result.ts").TaggedErrorFactory<"NothingToResume">;
|
|
37
|
+
export declare class NothingToResume extends NothingToResume_base<{
|
|
38
|
+
lane: string;
|
|
39
|
+
message: string;
|
|
40
|
+
}> {
|
|
41
|
+
}
|
|
42
|
+
declare const InvalidMessage_base: import("./result.ts").TaggedErrorFactory<"InvalidMessage">;
|
|
43
|
+
export declare class InvalidMessage extends InvalidMessage_base<{
|
|
44
|
+
lane: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
message: string;
|
|
47
|
+
}> {
|
|
48
|
+
}
|
|
49
|
+
declare const UnknownSkill_base: import("./result.ts").TaggedErrorFactory<"UnknownSkill">;
|
|
50
|
+
export declare class UnknownSkill extends UnknownSkill_base<{
|
|
61
51
|
name: string;
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
message: string;
|
|
53
|
+
}> {
|
|
54
|
+
}
|
|
55
|
+
declare const UnknownTemplate_base: import("./result.ts").TaggedErrorFactory<"UnknownTemplate">;
|
|
56
|
+
export declare class UnknownTemplate extends UnknownTemplate_base<{
|
|
66
57
|
name: string;
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
kind: "compaction";
|
|
70
|
-
operationId?: string;
|
|
71
|
-
customInstructions?: string;
|
|
72
|
-
} | {
|
|
73
|
-
kind: "navigation";
|
|
74
|
-
operationId?: string;
|
|
75
|
-
targetId: string | null;
|
|
76
|
-
options?: NavigateOptions;
|
|
77
|
-
};
|
|
78
|
-
export interface OperationAdmission {
|
|
79
|
-
operationId: string;
|
|
80
|
-
kind: "run" | "compaction" | "navigation";
|
|
81
|
-
startedAt: number;
|
|
58
|
+
message: string;
|
|
59
|
+
}> {
|
|
82
60
|
}
|
|
83
|
-
|
|
84
|
-
export
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
pollDeferred?: boolean;
|
|
61
|
+
declare const UnknownTarget_base: import("./result.ts").TaggedErrorFactory<"UnknownTarget">;
|
|
62
|
+
export declare class UnknownTarget extends UnknownTarget_base<{
|
|
63
|
+
targetId: string;
|
|
64
|
+
message: string;
|
|
65
|
+
}> {
|
|
89
66
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
67
|
+
declare const UnknownQueueItem_base: import("./result.ts").TaggedErrorFactory<"UnknownQueueItem">;
|
|
68
|
+
export declare class UnknownQueueItem extends UnknownQueueItem_base<{
|
|
69
|
+
lane: string;
|
|
70
|
+
entryId: string;
|
|
71
|
+
message: string;
|
|
72
|
+
}> {
|
|
93
73
|
}
|
|
94
|
-
|
|
95
|
-
export
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
status: OperationStatus;
|
|
100
|
-
capturedModel?: ModelIdentity;
|
|
74
|
+
declare const LaneExists_base: import("./result.ts").TaggedErrorFactory<"LaneExists">;
|
|
75
|
+
export declare class LaneExists extends LaneExists_base<{
|
|
76
|
+
lane: string;
|
|
77
|
+
message: string;
|
|
78
|
+
}> {
|
|
101
79
|
}
|
|
102
|
-
|
|
80
|
+
declare const InvalidLane_base: import("./result.ts").TaggedErrorFactory<"InvalidLane">;
|
|
81
|
+
export declare class InvalidLane extends InvalidLane_base<{
|
|
103
82
|
lane: string;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
lastOperationId: string | null;
|
|
83
|
+
reason: string;
|
|
84
|
+
message: string;
|
|
85
|
+
}> {
|
|
108
86
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
87
|
+
declare const NothingToCompact_base: import("./result.ts").TaggedErrorFactory<"NothingToCompact">;
|
|
88
|
+
export declare class NothingToCompact extends NothingToCompact_base<{
|
|
89
|
+
lane: string;
|
|
90
|
+
message: string;
|
|
91
|
+
}> {
|
|
92
|
+
}
|
|
93
|
+
declare const Closed_base: import("./result.ts").TaggedErrorFactory<"Closed">;
|
|
94
|
+
export declare class Closed extends Closed_base<{
|
|
95
|
+
message: string;
|
|
96
|
+
}> {
|
|
97
|
+
}
|
|
98
|
+
export declare class HarnessFault extends Error {
|
|
99
|
+
readonly cause: unknown;
|
|
100
|
+
constructor(message: string, cause: unknown);
|
|
101
|
+
}
|
|
102
|
+
export declare class HarnessClosed extends Error {
|
|
103
|
+
constructor();
|
|
104
|
+
}
|
|
105
|
+
export declare class HarnessNotImplemented extends Error {
|
|
106
|
+
readonly operation: string;
|
|
107
|
+
constructor(operation: string);
|
|
108
|
+
}
|
|
109
|
+
export interface OperationError {
|
|
110
|
+
code: string;
|
|
111
|
+
message: string;
|
|
112
|
+
}
|
|
113
|
+
export type RunOutcome = {
|
|
114
|
+
kind: "completed";
|
|
115
|
+
leafId: string;
|
|
116
|
+
finalEntryId: string;
|
|
117
|
+
finalMessage: AssistantMessage;
|
|
118
|
+
} | {
|
|
119
|
+
kind: "aborted";
|
|
120
|
+
leafId: string;
|
|
121
|
+
finalEntryId: string;
|
|
122
|
+
finalMessage: AssistantMessage;
|
|
123
|
+
} | {
|
|
124
|
+
kind: "failed";
|
|
125
|
+
leafId: string;
|
|
126
|
+
error: OperationError;
|
|
127
|
+
finalEntryId?: string;
|
|
128
|
+
finalMessage?: AssistantMessage;
|
|
117
129
|
} | {
|
|
118
|
-
kind: "
|
|
119
|
-
|
|
120
|
-
|
|
130
|
+
kind: "suspended";
|
|
131
|
+
leafId: string;
|
|
132
|
+
finalEntryId: string;
|
|
121
133
|
deferred: DeferredHandle;
|
|
122
134
|
};
|
|
123
|
-
export type
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
135
|
+
export type CompactionOutcome = {
|
|
136
|
+
kind: "completed";
|
|
137
|
+
leafId: string;
|
|
138
|
+
entry: CompactionEntry;
|
|
139
|
+
} | {
|
|
140
|
+
kind: "declined" | "aborted";
|
|
141
|
+
leafId: string;
|
|
142
|
+
} | {
|
|
143
|
+
kind: "failed";
|
|
144
|
+
leafId: string;
|
|
145
|
+
error: OperationError;
|
|
146
|
+
};
|
|
147
|
+
export type NavigationOutcome = {
|
|
148
|
+
kind: "completed";
|
|
149
|
+
newLeafId: string | null;
|
|
150
|
+
summaryEntry?: BranchSummaryEntry;
|
|
151
|
+
} | {
|
|
152
|
+
kind: "declined" | "aborted";
|
|
153
|
+
leafId: string | null;
|
|
154
|
+
} | {
|
|
155
|
+
kind: "failed";
|
|
156
|
+
leafId: string | null;
|
|
157
|
+
error: OperationError;
|
|
158
|
+
};
|
|
159
|
+
export type RunRejected = LaneBusy | InvalidMessage | UnknownSkill | UnknownTemplate | Closed;
|
|
160
|
+
export type CompactionRejected = LaneBusy | NothingToCompact | Closed;
|
|
161
|
+
export type NavigationRejected = LaneBusy | UnknownTarget | Closed;
|
|
162
|
+
export type ResumeRejected = LaneBusy | NothingToResume | MissingIdentities | Closed;
|
|
163
|
+
export type QueueRejected = NoActiveRun | InvalidMessage | Closed;
|
|
164
|
+
export type CancelQueuedRejected = UnknownQueueItem | Closed;
|
|
165
|
+
export type AbortRejected = NoActiveOperation | Closed;
|
|
166
|
+
export type RunResult = ResultValue<{
|
|
167
|
+
runId: string;
|
|
168
|
+
} & RunOutcome, RunRejected>;
|
|
169
|
+
export type CompactionResult = ResultValue<{
|
|
170
|
+
runId: string;
|
|
171
|
+
} & CompactionOutcome, CompactionRejected>;
|
|
172
|
+
export type NavigationResult = ResultValue<{
|
|
173
|
+
runId: string;
|
|
174
|
+
} & NavigationOutcome, NavigationRejected>;
|
|
175
|
+
export type QueueResult = ResultValue<{
|
|
176
|
+
entryId: string;
|
|
177
|
+
}, QueueRejected>;
|
|
178
|
+
export type CancelQueuedResult = ResultValue<{
|
|
179
|
+
outcome: "cancelled" | "already_consumed" | "already_cleared";
|
|
180
|
+
}, CancelQueuedRejected>;
|
|
181
|
+
export type RecordUsageResult = ResultValue<void, Closed>;
|
|
182
|
+
export type AbortResult = ResultValue<{
|
|
183
|
+
runId: string;
|
|
127
184
|
steer: AgentMessage[];
|
|
128
185
|
followUp: AgentMessage[];
|
|
129
|
-
},
|
|
130
|
-
export
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
186
|
+
}, AbortRejected>;
|
|
187
|
+
export type ResumeOutcome = ({
|
|
188
|
+
operation: "run";
|
|
189
|
+
runId: string;
|
|
190
|
+
} & RunOutcome) | ({
|
|
191
|
+
operation: "compaction";
|
|
192
|
+
runId: string;
|
|
193
|
+
} & CompactionOutcome) | ({
|
|
194
|
+
operation: "navigation";
|
|
195
|
+
runId: string;
|
|
196
|
+
} & NavigationOutcome);
|
|
197
|
+
export type ResumeResult = ResultValue<ResumeOutcome, ResumeRejected>;
|
|
198
|
+
export type CreateLaneResult = ResultValue<AgentLane, LaneExists | InvalidLane | UnknownTarget | Closed>;
|
|
199
|
+
export interface NavigateOptions {
|
|
200
|
+
summarize?: boolean;
|
|
201
|
+
customInstructions?: string;
|
|
202
|
+
label?: string;
|
|
140
203
|
}
|
|
141
|
-
export
|
|
142
|
-
status: "running";
|
|
143
|
-
toolCallId: string;
|
|
144
|
-
toolName: string;
|
|
145
|
-
args: unknown;
|
|
146
|
-
result?: AgentToolResult<unknown>;
|
|
147
|
-
} | {
|
|
148
|
-
status: "settled";
|
|
149
|
-
toolCallId: string;
|
|
150
|
-
toolName: string;
|
|
151
|
-
args: unknown;
|
|
152
|
-
result: AgentToolResult<unknown>;
|
|
153
|
-
isError: boolean;
|
|
154
|
-
};
|
|
155
|
-
export interface OpenOperation {
|
|
204
|
+
export interface SuspendedOperation {
|
|
156
205
|
lane: string;
|
|
157
|
-
operationId: string;
|
|
158
206
|
kind: "run" | "compaction" | "navigation";
|
|
207
|
+
id: string;
|
|
159
208
|
startedAt: number;
|
|
160
|
-
|
|
209
|
+
reason: "crash" | "deferred";
|
|
210
|
+
prompt?: AgentMessage[];
|
|
211
|
+
deferred?: DeferredHandle;
|
|
212
|
+
aborting?: {
|
|
213
|
+
steer: AgentMessage[];
|
|
214
|
+
followUp: AgentMessage[];
|
|
215
|
+
};
|
|
216
|
+
missing: {
|
|
217
|
+
tools: string[];
|
|
218
|
+
models: string[];
|
|
219
|
+
};
|
|
161
220
|
}
|
|
162
|
-
export
|
|
221
|
+
export interface LaneInfo {
|
|
222
|
+
name: string;
|
|
223
|
+
leafId: string | null;
|
|
224
|
+
operation: null | {
|
|
225
|
+
id: string;
|
|
226
|
+
kind: "run" | "compaction" | "navigation";
|
|
227
|
+
status: "running" | "suspended" | "aborting";
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
export interface QueuedItem {
|
|
163
231
|
entryId: string;
|
|
164
|
-
kind: "steer" | "followUp" | "nextRun" | "write";
|
|
165
|
-
type: "message";
|
|
166
232
|
message: AgentMessage;
|
|
167
|
-
}
|
|
168
|
-
entryId: string;
|
|
169
|
-
kind: "write";
|
|
170
|
-
type: "custom";
|
|
171
|
-
customType: string;
|
|
172
|
-
data?: JsonValue;
|
|
173
|
-
};
|
|
233
|
+
}
|
|
174
234
|
export interface LaneSnapshot {
|
|
175
235
|
lane: string;
|
|
176
236
|
transcript: Entry[];
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
kind: "run" | "compaction" | "navigation";
|
|
184
|
-
startedAt: number;
|
|
185
|
-
fromTipId: string | null;
|
|
186
|
-
status: OperationStatus;
|
|
187
|
-
retry?: {
|
|
188
|
-
attempt: number;
|
|
189
|
-
maxAttempts: number;
|
|
190
|
-
nextAttemptAt: number;
|
|
191
|
-
};
|
|
192
|
-
deferred?: {
|
|
193
|
-
handle: DeferredHandle;
|
|
194
|
-
poll: number;
|
|
195
|
-
};
|
|
196
|
-
streamingMessage?: AssistantMessage;
|
|
197
|
-
runningTools: LaneSnapshotTool[];
|
|
237
|
+
leafId: string | null;
|
|
238
|
+
operation: LaneInfo["operation"];
|
|
239
|
+
queues: {
|
|
240
|
+
steer: QueuedItem[];
|
|
241
|
+
followUp: QueuedItem[];
|
|
242
|
+
nextRun: QueuedItem[];
|
|
198
243
|
};
|
|
199
|
-
|
|
244
|
+
pendingWrites: {
|
|
245
|
+
id: string;
|
|
246
|
+
entry: ProvisionedEntry;
|
|
247
|
+
}[];
|
|
200
248
|
faulted: boolean;
|
|
201
249
|
}
|
|
202
250
|
export interface SessionSnapshot {
|
|
203
|
-
lanes: LaneInfo
|
|
251
|
+
lanes: (LaneInfo & {
|
|
252
|
+
suspended?: SuspendedOperation;
|
|
253
|
+
})[];
|
|
204
254
|
faulted: boolean;
|
|
205
255
|
}
|
|
206
|
-
export type
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
256
|
+
export type ActionInfo = {
|
|
257
|
+
kind: "append_entry";
|
|
258
|
+
entryType: Entry["type"];
|
|
259
|
+
entryId: string;
|
|
210
260
|
} | {
|
|
211
|
-
|
|
212
|
-
|
|
261
|
+
kind: "append_record";
|
|
262
|
+
recordType: string;
|
|
213
263
|
} | {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
reason: "deferred";
|
|
217
|
-
deferred: DeferredHandle;
|
|
218
|
-
poll: number;
|
|
264
|
+
kind: "move_lane";
|
|
265
|
+
to: string | null;
|
|
219
266
|
} | {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
steer: AgentMessage[];
|
|
223
|
-
followUp: AgentMessage[];
|
|
224
|
-
} | ({
|
|
225
|
-
type: "run_end";
|
|
226
|
-
runId: string;
|
|
227
|
-
fromTipId: string | null;
|
|
228
|
-
tipId: string | null;
|
|
229
|
-
endedAt: number;
|
|
230
|
-
} & ({
|
|
231
|
-
status: "completed" | "aborted";
|
|
232
|
-
error?: never;
|
|
267
|
+
kind: "set_fact";
|
|
268
|
+
fact: "name" | "label";
|
|
233
269
|
} | {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
})) | {
|
|
237
|
-
type: "fault";
|
|
238
|
-
code: string;
|
|
239
|
-
message: string;
|
|
240
|
-
} | ({
|
|
241
|
-
type: "handler_error";
|
|
242
|
-
error: string;
|
|
243
|
-
stack?: string;
|
|
244
|
-
} & ({
|
|
245
|
-
kind: "hook";
|
|
246
|
-
hook: string;
|
|
270
|
+
kind: "try_finish_run";
|
|
271
|
+
outcome: "completed" | "failed";
|
|
247
272
|
} | {
|
|
248
|
-
kind: "
|
|
249
|
-
|
|
250
|
-
})) | {
|
|
251
|
-
type: "turn_start";
|
|
252
|
-
runId: string;
|
|
253
|
-
turnId: string;
|
|
273
|
+
kind: "finish_operation";
|
|
274
|
+
outcome: "completed" | "declined" | "failed" | "aborted";
|
|
254
275
|
} | {
|
|
255
|
-
|
|
256
|
-
runId: string;
|
|
257
|
-
turnId: string;
|
|
258
|
-
message: AssistantMessage;
|
|
259
|
-
toolResults: ToolResultMessage[];
|
|
276
|
+
kind: "commit_follow_up";
|
|
260
277
|
} | {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
attempt: number;
|
|
265
|
-
maxAttempts: number;
|
|
266
|
-
delayMs: number;
|
|
267
|
-
notBefore: number;
|
|
268
|
-
errorMessage: string;
|
|
278
|
+
kind: "consume_queue_item";
|
|
279
|
+
queue: "steer" | "followUp";
|
|
280
|
+
entryId: string;
|
|
269
281
|
} | {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
step: string;
|
|
273
|
-
attempt: number;
|
|
282
|
+
kind: "apply_pending_write";
|
|
283
|
+
entryId: string;
|
|
274
284
|
} | {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
step: string;
|
|
285
|
+
kind: "stream_assistant";
|
|
286
|
+
step: "assistant" | "compaction" | "branch_summary";
|
|
278
287
|
attempt: number;
|
|
279
|
-
success: boolean;
|
|
280
|
-
finalError?: string;
|
|
281
|
-
} | {
|
|
282
|
-
type: "message_start";
|
|
283
|
-
runId?: string;
|
|
284
|
-
message: AgentMessage;
|
|
285
|
-
} | {
|
|
286
|
-
type: "message_update";
|
|
287
|
-
runId: string;
|
|
288
|
-
message: AgentMessage;
|
|
289
|
-
event: AssistantMessageEvent;
|
|
290
|
-
frame?: AssistantMessageFrame;
|
|
291
|
-
} | {
|
|
292
|
-
type: "message_end";
|
|
293
|
-
runId?: string;
|
|
294
|
-
message: AgentMessage;
|
|
295
|
-
entryId?: string;
|
|
296
288
|
} | {
|
|
297
|
-
|
|
298
|
-
runId: string;
|
|
299
|
-
turnId: string;
|
|
289
|
+
kind: "execute_tool";
|
|
300
290
|
toolCallId: string;
|
|
301
291
|
toolName: string;
|
|
302
|
-
args: unknown;
|
|
303
|
-
} | {
|
|
304
|
-
type: "tool_update";
|
|
305
|
-
runId: string;
|
|
306
|
-
turnId: string;
|
|
307
|
-
toolCallId: string;
|
|
308
|
-
toolName: string;
|
|
309
|
-
partialResult: AgentToolResult<unknown>;
|
|
310
|
-
} | {
|
|
311
|
-
type: "tool_end";
|
|
312
|
-
runId: string;
|
|
313
|
-
turnId: string;
|
|
314
|
-
toolCallId: string;
|
|
315
|
-
toolName: string;
|
|
316
|
-
result: AgentToolResult<unknown>;
|
|
317
|
-
isError: boolean;
|
|
318
|
-
terminate: boolean;
|
|
319
|
-
} | {
|
|
320
|
-
type: "entry_added";
|
|
321
|
-
entry: Entry;
|
|
322
|
-
} | {
|
|
323
|
-
type: "queue_update";
|
|
324
|
-
queues: LaneQueuedItem[];
|
|
325
|
-
} | ({
|
|
326
|
-
type: "value_update";
|
|
327
|
-
} & ({
|
|
328
|
-
value: "session_name";
|
|
329
|
-
name: string | undefined;
|
|
330
|
-
} | {
|
|
331
|
-
value: "entry_label";
|
|
332
|
-
targetId: string;
|
|
333
|
-
label: string | undefined;
|
|
334
|
-
})) | ({
|
|
335
|
-
type: "config_update";
|
|
336
|
-
} & ({
|
|
337
|
-
property: "model";
|
|
338
|
-
value: {
|
|
339
|
-
provider: string;
|
|
340
|
-
modelId: string;
|
|
341
|
-
};
|
|
342
|
-
previous: unknown;
|
|
343
|
-
} | {
|
|
344
|
-
property: "thinkingLevel";
|
|
345
|
-
value: ThinkingLevel;
|
|
346
|
-
previous: ThinkingLevel;
|
|
347
|
-
} | {
|
|
348
|
-
property: "activeTools";
|
|
349
|
-
value: string[];
|
|
350
|
-
previous: string[];
|
|
351
|
-
} | {
|
|
352
|
-
property: "tools" | "resources";
|
|
353
292
|
} | {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
} | {
|
|
358
|
-
property: "retryPolicy";
|
|
359
|
-
value: RetryPolicy;
|
|
360
|
-
previous: RetryPolicy;
|
|
361
|
-
} | {
|
|
362
|
-
property: "compactionSettings";
|
|
363
|
-
value: CompactionSettings;
|
|
364
|
-
previous: CompactionSettings;
|
|
365
|
-
} | {
|
|
366
|
-
property: "steeringMode";
|
|
367
|
-
value: QueueMode;
|
|
368
|
-
previous: QueueMode;
|
|
369
|
-
} | {
|
|
370
|
-
property: "followUpMode";
|
|
371
|
-
value: QueueMode;
|
|
372
|
-
previous: QueueMode;
|
|
373
|
-
})) | {
|
|
374
|
-
type: "compaction_start";
|
|
375
|
-
runId: string;
|
|
376
|
-
reason: "manual" | "threshold" | "overflow";
|
|
377
|
-
startedAt: number;
|
|
378
|
-
} | ({
|
|
379
|
-
type: "compaction_end";
|
|
380
|
-
runId: string;
|
|
381
|
-
reason: "manual" | "threshold" | "overflow";
|
|
382
|
-
endedAt: number;
|
|
383
|
-
} & ({
|
|
384
|
-
status: "completed";
|
|
385
|
-
entryId: string;
|
|
386
|
-
error?: never;
|
|
387
|
-
} | {
|
|
388
|
-
status: "declined" | "aborted";
|
|
389
|
-
entryId?: never;
|
|
390
|
-
error?: never;
|
|
391
|
-
} | {
|
|
392
|
-
status: "failed";
|
|
393
|
-
entryId?: never;
|
|
394
|
-
error: OperationError;
|
|
395
|
-
})) | {
|
|
396
|
-
type: "navigation_start";
|
|
397
|
-
runId: string;
|
|
398
|
-
targetId: string | null;
|
|
399
|
-
startedAt: number;
|
|
400
|
-
} | ({
|
|
401
|
-
type: "navigation_end";
|
|
402
|
-
runId: string;
|
|
403
|
-
fromTipId: string | null;
|
|
404
|
-
tipId: string | null;
|
|
405
|
-
endedAt: number;
|
|
406
|
-
} & ({
|
|
407
|
-
status: "completed" | "declined" | "aborted";
|
|
408
|
-
error?: never;
|
|
409
|
-
} | {
|
|
410
|
-
status: "failed";
|
|
411
|
-
error: OperationError;
|
|
412
|
-
})) | {
|
|
413
|
-
type: "lane_created";
|
|
414
|
-
at: string | null;
|
|
293
|
+
kind: "fetch_deferred" | "cancel_deferred";
|
|
294
|
+
provider: string;
|
|
295
|
+
id: string;
|
|
415
296
|
} | {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
row: UsageRow;
|
|
419
|
-
totals: Usage;
|
|
420
|
-
};
|
|
421
|
-
export type SpecialEventPayload = Extract<HarnessEventPayload, {
|
|
422
|
-
type: "fault" | "value_update" | "usage" | "config_update" | "handler_error";
|
|
423
|
-
}>;
|
|
424
|
-
export type LaneEventPayload = Exclude<HarnessEventPayload, SpecialEventPayload>;
|
|
425
|
-
export type ConfigEventPayload = Extract<HarnessEventPayload, {
|
|
426
|
-
type: "config_update";
|
|
427
|
-
}>;
|
|
428
|
-
export type LaneConfigEventPayload = Extract<ConfigEventPayload, {
|
|
429
|
-
property: "model" | "thinkingLevel" | "activeTools";
|
|
430
|
-
}>;
|
|
431
|
-
export type GlobalConfigEventPayload = Exclude<ConfigEventPayload, LaneConfigEventPayload>;
|
|
432
|
-
export type HandlerErrorPayload = Extract<HarnessEventPayload, {
|
|
433
|
-
type: "handler_error";
|
|
434
|
-
}>;
|
|
435
|
-
export type HarnessEvent = (LaneEventPayload & {
|
|
436
|
-
lane: string;
|
|
437
|
-
recovery?: true;
|
|
438
|
-
}) | (LaneConfigEventPayload & {
|
|
439
|
-
lane: string;
|
|
440
|
-
recovery?: true;
|
|
441
|
-
}) | (Extract<HarnessEventPayload, {
|
|
442
|
-
type: "fault" | "value_update";
|
|
443
|
-
}> & {
|
|
444
|
-
lane?: never;
|
|
445
|
-
recovery?: never;
|
|
446
|
-
}) | (Extract<HarnessEventPayload, {
|
|
447
|
-
type: "usage";
|
|
448
|
-
}> & {
|
|
449
|
-
recovery?: never;
|
|
450
|
-
}) | (GlobalConfigEventPayload & {
|
|
451
|
-
lane?: never;
|
|
452
|
-
recovery?: never;
|
|
453
|
-
}) | (HandlerErrorPayload & ({
|
|
454
|
-
lane: string;
|
|
455
|
-
recovery?: true;
|
|
297
|
+
kind: "hook";
|
|
298
|
+
name: HookName;
|
|
456
299
|
} | {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}));
|
|
460
|
-
type LaneWatchSourceEvent = Exclude<HarnessEvent, {
|
|
461
|
-
type: "handler_error" | "turn_start" | "turn_end" | "value_update" | "lane_created" | "message_update";
|
|
462
|
-
} | ({
|
|
463
|
-
type: "config_update";
|
|
464
|
-
} & {
|
|
465
|
-
property: string;
|
|
466
|
-
})> | Extract<HarnessEvent, {
|
|
467
|
-
type: "config_update";
|
|
468
|
-
property: "model" | "thinkingLevel" | "activeTools";
|
|
469
|
-
}> | Omit<Extract<HarnessEvent, {
|
|
470
|
-
type: "message_update";
|
|
471
|
-
}>, "event">;
|
|
472
|
-
/** Strict-JSON snapshot representation published to remote transcript consumers. */
|
|
473
|
-
export type LaneTranscriptSnapshot = JsonRepresentation<LaneSnapshot>;
|
|
474
|
-
/** Reducer-relevant strict-JSON Harness events published to remote transcript consumers. */
|
|
475
|
-
export type LaneWatchEvent = JsonRepresentation<LaneWatchSourceEvent>;
|
|
476
|
-
export type HarnessEventType = HarnessEvent["type"];
|
|
477
|
-
export type EventListener<TEvent extends HarnessEvent = HarnessEvent> = (event: TEvent, context: Context) => void | Promise<void>;
|
|
478
|
-
export interface Events {
|
|
479
|
-
on<TType extends HarnessEventType>(type: TType, listener: EventListener<Extract<HarnessEvent, {
|
|
480
|
-
type: TType;
|
|
481
|
-
}>>): () => void;
|
|
482
|
-
}
|
|
483
|
-
export type Resources = AgentHarnessResources<Skill, PromptTemplate>;
|
|
484
|
-
type VoidHookResult = ReturnType<() => void>;
|
|
485
|
-
export interface HookMap {
|
|
486
|
-
before_run: {
|
|
487
|
-
event: {
|
|
488
|
-
prompt: AgentMessage[];
|
|
489
|
-
resources: Resources;
|
|
490
|
-
};
|
|
491
|
-
result: {
|
|
492
|
-
messages?: AgentMessage[];
|
|
493
|
-
} | undefined;
|
|
494
|
-
};
|
|
495
|
-
before_drive: {
|
|
496
|
-
event: {
|
|
497
|
-
operation: "run" | "compaction" | "navigation";
|
|
498
|
-
};
|
|
499
|
-
result: VoidHookResult;
|
|
500
|
-
};
|
|
501
|
-
before_run_end: {
|
|
502
|
-
event: {
|
|
503
|
-
runId: string;
|
|
504
|
-
messages: AgentMessage[];
|
|
505
|
-
};
|
|
506
|
-
result: {
|
|
507
|
-
followUp?: string;
|
|
508
|
-
} | undefined;
|
|
509
|
-
};
|
|
510
|
-
transform_context: {
|
|
511
|
-
event: {
|
|
512
|
-
messages: AgentMessage[];
|
|
513
|
-
systemPrompt: string;
|
|
514
|
-
};
|
|
515
|
-
result: {
|
|
516
|
-
messages?: AgentMessage[];
|
|
517
|
-
systemPrompt?: string;
|
|
518
|
-
} | undefined;
|
|
519
|
-
};
|
|
520
|
-
before_request: {
|
|
521
|
-
event: {
|
|
522
|
-
model: Model<Api>;
|
|
523
|
-
step: "assistant" | "deferred" | "compaction" | "branch_summary";
|
|
524
|
-
attempt: number;
|
|
525
|
-
streamOptions: AgentHarnessStreamOptions;
|
|
526
|
-
};
|
|
527
|
-
result: {
|
|
528
|
-
streamOptions?: AgentHarnessStreamOptionsPatch;
|
|
529
|
-
} | undefined;
|
|
530
|
-
};
|
|
531
|
-
before_payload: {
|
|
532
|
-
event: {
|
|
533
|
-
model: Model<Api>;
|
|
534
|
-
payload: unknown;
|
|
535
|
-
};
|
|
536
|
-
result: {
|
|
537
|
-
payload: unknown;
|
|
538
|
-
} | undefined;
|
|
539
|
-
};
|
|
540
|
-
after_response: {
|
|
541
|
-
event: {
|
|
542
|
-
status?: number;
|
|
543
|
-
headers?: Record<string, string>;
|
|
544
|
-
message: SettledAssistantMessage;
|
|
545
|
-
};
|
|
546
|
-
result: {
|
|
547
|
-
message?: SettledAssistantMessage;
|
|
548
|
-
} | undefined;
|
|
549
|
-
};
|
|
550
|
-
before_tool: {
|
|
551
|
-
event: {
|
|
552
|
-
toolCallId: string;
|
|
553
|
-
toolName: string;
|
|
554
|
-
args: Record<string, JsonValue>;
|
|
555
|
-
};
|
|
556
|
-
result: {
|
|
557
|
-
args?: Record<string, JsonValue>;
|
|
558
|
-
block?: {
|
|
559
|
-
reason: string;
|
|
560
|
-
terminate?: boolean;
|
|
561
|
-
};
|
|
562
|
-
} | undefined;
|
|
563
|
-
};
|
|
564
|
-
after_tool: {
|
|
565
|
-
event: {
|
|
566
|
-
toolCallId: string;
|
|
567
|
-
toolName: string;
|
|
568
|
-
args: Record<string, JsonValue>;
|
|
569
|
-
content: AgentToolResult<unknown>["content"];
|
|
570
|
-
details?: JsonValue;
|
|
571
|
-
isError: boolean;
|
|
572
|
-
usage?: Usage;
|
|
573
|
-
};
|
|
574
|
-
result: {
|
|
575
|
-
content?: AgentToolResult<unknown>["content"];
|
|
576
|
-
details?: JsonValue;
|
|
577
|
-
isError?: boolean;
|
|
578
|
-
usage?: Usage;
|
|
579
|
-
terminate?: boolean;
|
|
580
|
-
} | undefined;
|
|
581
|
-
};
|
|
582
|
-
before_compaction: {
|
|
583
|
-
event: {
|
|
584
|
-
reason: "manual" | "threshold" | "overflow";
|
|
585
|
-
preparation: CompactionPreparation;
|
|
586
|
-
customInstructions?: string;
|
|
587
|
-
};
|
|
588
|
-
result: {
|
|
589
|
-
decline?: boolean;
|
|
590
|
-
compaction?: CompactResult;
|
|
591
|
-
} | undefined;
|
|
592
|
-
};
|
|
593
|
-
before_navigation: {
|
|
594
|
-
event: {
|
|
595
|
-
targetId: string;
|
|
596
|
-
preparation: BranchPreparation;
|
|
597
|
-
customInstructions?: string;
|
|
598
|
-
};
|
|
599
|
-
result: {
|
|
600
|
-
decline?: boolean;
|
|
601
|
-
summary?: BranchSummaryResult;
|
|
602
|
-
} | undefined;
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
export type HookName = keyof HookMap;
|
|
606
|
-
export type HookInvocation<TName extends HookName> = HookMap[TName]["event"] & {
|
|
607
|
-
lane: string;
|
|
608
|
-
runId: string;
|
|
300
|
+
kind: "sleep";
|
|
301
|
+
delayMs: number;
|
|
609
302
|
};
|
|
610
|
-
export type
|
|
303
|
+
export type HookName = "before_run" | "before_resume" | "before_run_end" | "transform_context" | "before_request" | "before_payload" | "after_response" | "before_tool" | "after_tool" | "before_compaction" | "before_navigation";
|
|
611
304
|
export interface Hooks {
|
|
612
|
-
on
|
|
305
|
+
on(name: HookName, handler: (event: unknown) => unknown | Promise<unknown>, options?: {
|
|
613
306
|
id?: string;
|
|
614
307
|
}): () => void;
|
|
615
308
|
}
|
|
616
|
-
export
|
|
617
|
-
|
|
309
|
+
export interface Events {
|
|
310
|
+
on(type: string, listener: (event: unknown) => void | Promise<void>): () => void;
|
|
311
|
+
}
|
|
312
|
+
export type HarnessTool = AgentTool & {
|
|
313
|
+
replay?: "never" | "safe";
|
|
314
|
+
};
|
|
315
|
+
export type Resources = AgentHarnessResources<Skill, PromptTemplate>;
|
|
316
|
+
export type StreamOptions = SimpleStreamOptions;
|
|
317
|
+
export type StreamOptionsPatch = Partial<SimpleStreamOptions>;
|
|
318
|
+
export type EntryProjector = (entry: Entry) => AgentMessage[] | Promise<AgentMessage[]>;
|
|
319
|
+
export interface AgentHarnessOptions {
|
|
618
320
|
session: Session;
|
|
619
321
|
models: Models;
|
|
620
322
|
model: Model<Api>;
|
|
621
323
|
thinkingLevel?: ThinkingLevel;
|
|
622
324
|
activeToolNames?: string[];
|
|
623
|
-
tools?:
|
|
624
|
-
toolContext?:
|
|
625
|
-
systemPrompt?: string | ((
|
|
325
|
+
tools?: HarnessTool[];
|
|
326
|
+
toolContext?: object | (() => object | Promise<object>);
|
|
327
|
+
systemPrompt?: string | (() => string | Promise<string>);
|
|
626
328
|
resources?: Resources;
|
|
627
|
-
streamOptions?:
|
|
329
|
+
streamOptions?: StreamOptions;
|
|
628
330
|
retry?: RetryPolicy;
|
|
629
331
|
compaction?: CompactionSettings;
|
|
630
332
|
steeringMode?: QueueMode;
|
|
631
333
|
followUpMode?: QueueMode;
|
|
632
334
|
toolExecution?: "sequential" | "parallel";
|
|
633
|
-
|
|
335
|
+
drive?: "automatic" | "manual";
|
|
336
|
+
toProviderMessages?: (messages: AgentMessage[]) => Message[] | Promise<Message[]>;
|
|
634
337
|
entryProjectors?: Record<string, EntryProjector>;
|
|
338
|
+
context?: TelemetryContext;
|
|
339
|
+
}
|
|
340
|
+
export interface WatchHandle<TSnapshot> {
|
|
341
|
+
snapshot: TSnapshot;
|
|
342
|
+
start(listener: (event: unknown) => void): void;
|
|
343
|
+
unsubscribe(): void;
|
|
635
344
|
}
|
|
636
345
|
export interface AgentLane {
|
|
637
346
|
readonly name: string;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
accept(request: OperationRequest, context: Context): Promise<OperationAdmissionResult>;
|
|
645
|
-
drive(options: DriveOptions, context: Context): Promise<DriveResult>;
|
|
646
|
-
requestAbort(operationId: string, context: Context): Promise<AbortRequestResult>;
|
|
647
|
-
inspectExecution(context: Context): Promise<LaneExecutionInfo>;
|
|
648
|
-
prompt(text: string, images: ImageContent[] | undefined, context: Context): Promise<RunResult>;
|
|
649
|
-
prompt(message: AgentMessage | AgentMessage[], context: Context): Promise<RunResult>;
|
|
650
|
-
skill(name: string, additionalInstructions: string | undefined, context: Context): Promise<RunResult>;
|
|
651
|
-
promptFromTemplate(name: string, args: string[] | undefined, context: Context): Promise<RunResult>;
|
|
652
|
-
compact(options: {
|
|
347
|
+
getLeafId(): Promise<string | null>;
|
|
348
|
+
prompt(text: string, images?: ImageContent[]): Promise<RunResult>;
|
|
349
|
+
prompt(message: AgentMessage | AgentMessage[]): Promise<RunResult>;
|
|
350
|
+
skill(name: string, additionalInstructions?: string): Promise<RunResult>;
|
|
351
|
+
promptFromTemplate(name: string, args?: string[]): Promise<RunResult>;
|
|
352
|
+
compact(options?: {
|
|
653
353
|
customInstructions?: string;
|
|
654
|
-
}
|
|
655
|
-
navigateTree(targetId: string | null, options
|
|
656
|
-
resume(
|
|
657
|
-
abort(
|
|
658
|
-
steer(
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
354
|
+
}): Promise<CompactionResult>;
|
|
355
|
+
navigateTree(targetId: string | null, options?: NavigateOptions): Promise<NavigationResult>;
|
|
356
|
+
resume(): Promise<ResumeResult>;
|
|
357
|
+
abort(): Promise<AbortResult>;
|
|
358
|
+
steer(text: string, images?: ImageContent[]): Promise<QueueResult>;
|
|
359
|
+
steer(message: AgentMessage): Promise<QueueResult>;
|
|
360
|
+
followUp(text: string, images?: ImageContent[]): Promise<QueueResult>;
|
|
361
|
+
followUp(message: AgentMessage): Promise<QueueResult>;
|
|
362
|
+
nextRun(text: string, images?: ImageContent[]): Promise<QueueResult>;
|
|
363
|
+
nextRun(message: AgentMessage): Promise<QueueResult>;
|
|
364
|
+
cancelQueued(entryId: string): Promise<CancelQueuedResult>;
|
|
365
|
+
recordUsage(usage: Usage, options?: {
|
|
663
366
|
entryId?: string;
|
|
664
367
|
details?: JsonValue;
|
|
665
|
-
}
|
|
666
|
-
waitForIdle(
|
|
667
|
-
runWhenIdle(callback: (
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
368
|
+
}): Promise<RecordUsageResult>;
|
|
369
|
+
waitForIdle(): Promise<void>;
|
|
370
|
+
runWhenIdle(callback: () => void | Promise<void>): Promise<void>;
|
|
371
|
+
peekAction(): Promise<ActionInfo | undefined>;
|
|
372
|
+
executeAction(): Promise<ActionInfo | undefined>;
|
|
373
|
+
runToCompletion(): Promise<void>;
|
|
374
|
+
getModel(): Promise<Model<Api>>;
|
|
375
|
+
setModel(model: Model<Api>): Promise<void>;
|
|
376
|
+
getThinkingLevel(): Promise<ThinkingLevel>;
|
|
377
|
+
setThinkingLevel(level: ThinkingLevel): Promise<void>;
|
|
378
|
+
getActiveTools(): Promise<string[]>;
|
|
379
|
+
setActiveTools(names: string[]): Promise<void>;
|
|
380
|
+
readonly session: SessionTree;
|
|
381
|
+
watch(): Promise<WatchHandle<LaneSnapshot>>;
|
|
675
382
|
}
|
|
676
|
-
export
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
export interface AgentHarness<TContext extends object | undefined = object | undefined> {
|
|
680
|
-
lane(name: string, context: Context): Promise<AgentLane>;
|
|
681
|
-
lane(name: string, options: AcquireLaneOptions, context: Context): Promise<AgentLane>;
|
|
682
|
-
lanes(context: Context): Promise<LaneInfo[]>;
|
|
683
|
-
getName(context: Context): Promise<string | undefined>;
|
|
684
|
-
setName(name: string | undefined, context: Context): Promise<void>;
|
|
685
|
-
getLabel(targetId: string, context: Context): Promise<string | undefined>;
|
|
686
|
-
setLabel(targetId: string, label: string | undefined, context: Context): Promise<void>;
|
|
687
|
-
getTools(context: Context): Promise<AgentHarnessTool<TContext>[]>;
|
|
688
|
-
setTools(tools: AgentHarnessTool<TContext>[], context: Context): Promise<void>;
|
|
689
|
-
getResources(context: Context): Promise<Resources>;
|
|
690
|
-
setResources(resources: Resources, context: Context): Promise<void>;
|
|
691
|
-
getStreamOptions(context: Context): Promise<AgentHarnessStreamOptions>;
|
|
692
|
-
setStreamOptions(options: AgentHarnessStreamOptions, context: Context): Promise<void>;
|
|
693
|
-
getRetryPolicy(context: Context): Promise<RetryPolicy>;
|
|
694
|
-
setRetryPolicy(policy: RetryPolicy, context: Context): Promise<void>;
|
|
695
|
-
getCompactionSettings(context: Context): Promise<CompactionSettings>;
|
|
696
|
-
setCompactionSettings(settings: CompactionSettings, context: Context): Promise<void>;
|
|
697
|
-
getSteeringMode(context: Context): Promise<QueueMode>;
|
|
698
|
-
setSteeringMode(mode: QueueMode, context: Context): Promise<void>;
|
|
699
|
-
getFollowUpMode(context: Context): Promise<QueueMode>;
|
|
700
|
-
setFollowUpMode(mode: QueueMode, context: Context): Promise<void>;
|
|
701
|
-
watchSession(context: Context): Promise<WatchHandle<SessionSnapshot>>;
|
|
383
|
+
export declare class AgentHarness implements AgentLane {
|
|
384
|
+
readonly name = "main";
|
|
385
|
+
readonly session: SessionTree;
|
|
702
386
|
readonly hooks: Hooks;
|
|
703
387
|
readonly events: Events;
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
388
|
+
private readonly durableSession;
|
|
389
|
+
private model;
|
|
390
|
+
private thinkingLevel;
|
|
391
|
+
private activeToolNames;
|
|
392
|
+
private tools;
|
|
393
|
+
private resources;
|
|
394
|
+
private streamOptions;
|
|
395
|
+
private retryPolicy;
|
|
396
|
+
private compactionSettings;
|
|
397
|
+
private steeringMode;
|
|
398
|
+
private followUpMode;
|
|
399
|
+
private closed;
|
|
400
|
+
private constructor();
|
|
401
|
+
static create(options: AgentHarnessOptions): Promise<{
|
|
402
|
+
harness: AgentHarness;
|
|
403
|
+
suspended: SuspendedOperation[];
|
|
710
404
|
}>;
|
|
405
|
+
private unavailable;
|
|
406
|
+
getLeafId(): Promise<string | null>;
|
|
407
|
+
prompt(_text: string, _images?: ImageContent[]): Promise<RunResult>;
|
|
408
|
+
prompt(_message: AgentMessage | AgentMessage[]): Promise<RunResult>;
|
|
409
|
+
skill(_name: string, _additionalInstructions?: string): Promise<RunResult>;
|
|
410
|
+
promptFromTemplate(_name: string, _args?: string[]): Promise<RunResult>;
|
|
411
|
+
compact(_options?: {
|
|
412
|
+
customInstructions?: string;
|
|
413
|
+
}): Promise<CompactionResult>;
|
|
414
|
+
navigateTree(_targetId: string | null, _options?: NavigateOptions): Promise<NavigationResult>;
|
|
415
|
+
resume(): Promise<ResumeResult>;
|
|
416
|
+
abort(): Promise<AbortResult>;
|
|
417
|
+
steer(_text: string, _images?: ImageContent[]): Promise<QueueResult>;
|
|
418
|
+
steer(_message: AgentMessage): Promise<QueueResult>;
|
|
419
|
+
followUp(_text: string, _images?: ImageContent[]): Promise<QueueResult>;
|
|
420
|
+
followUp(_message: AgentMessage): Promise<QueueResult>;
|
|
421
|
+
nextRun(_text: string, _images?: ImageContent[]): Promise<QueueResult>;
|
|
422
|
+
nextRun(_message: AgentMessage): Promise<QueueResult>;
|
|
423
|
+
cancelQueued(_entryId: string): Promise<CancelQueuedResult>;
|
|
424
|
+
recordUsage(_usage: Usage, _options?: {
|
|
425
|
+
entryId?: string;
|
|
426
|
+
details?: JsonValue;
|
|
427
|
+
}): Promise<RecordUsageResult>;
|
|
428
|
+
waitForIdle(): Promise<void>;
|
|
429
|
+
runWhenIdle(_callback: () => void | Promise<void>): Promise<void>;
|
|
430
|
+
peekAction(): Promise<ActionInfo | undefined>;
|
|
431
|
+
executeAction(): Promise<ActionInfo | undefined>;
|
|
432
|
+
runToCompletion(): Promise<void>;
|
|
433
|
+
getModel(): Promise<Model<Api>>;
|
|
434
|
+
setModel(model: Model<Api>): Promise<void>;
|
|
435
|
+
getThinkingLevel(): Promise<ThinkingLevel>;
|
|
436
|
+
setThinkingLevel(level: ThinkingLevel): Promise<void>;
|
|
437
|
+
getActiveTools(): Promise<string[]>;
|
|
438
|
+
setActiveTools(names: string[]): Promise<void>;
|
|
439
|
+
watch(): Promise<WatchHandle<LaneSnapshot>>;
|
|
440
|
+
lane(_name: string): Promise<AgentLane | undefined>;
|
|
441
|
+
createLane(_name: string, _at: string | null): Promise<CreateLaneResult>;
|
|
442
|
+
lanes(): Promise<LaneInfo[]>;
|
|
443
|
+
getTools(): Promise<HarnessTool[]>;
|
|
444
|
+
setTools(tools: HarnessTool[], activeNames?: string[]): Promise<void>;
|
|
445
|
+
getResources(): Promise<Resources>;
|
|
446
|
+
setResources(resources: Resources): Promise<void>;
|
|
447
|
+
getStreamOptions(): Promise<StreamOptions>;
|
|
448
|
+
setStreamOptions(options: StreamOptions): Promise<void>;
|
|
449
|
+
getRetryPolicy(): Promise<RetryPolicy>;
|
|
450
|
+
setRetryPolicy(policy: RetryPolicy): Promise<void>;
|
|
451
|
+
getCompactionSettings(): Promise<CompactionSettings>;
|
|
452
|
+
setCompactionSettings(settings: CompactionSettings): Promise<void>;
|
|
453
|
+
getSteeringMode(): Promise<QueueMode>;
|
|
454
|
+
setSteeringMode(mode: QueueMode): Promise<void>;
|
|
455
|
+
getFollowUpMode(): Promise<QueueMode>;
|
|
456
|
+
setFollowUpMode(mode: QueueMode): Promise<void>;
|
|
457
|
+
watchSession(): Promise<WatchHandle<SessionSnapshot>>;
|
|
458
|
+
close(): Promise<void>;
|
|
711
459
|
}
|
|
712
|
-
|
|
713
|
-
export declare const AgentHarness: {
|
|
714
|
-
create: typeof createAgentHarness;
|
|
715
|
-
};
|
|
460
|
+
export {};
|
|
716
461
|
//# sourceMappingURL=agent-harness.d.ts.map
|