@draht/agent-core 2026.10.20 → 2026.10.23
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/dist/agent-loop.d.ts +6 -1
- package/dist/agent-loop.d.ts.map +1 -1
- package/dist/agent-loop.js +16 -2
- package/dist/agent-loop.js.map +1 -1
- package/dist/agent.d.ts +8 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +4 -0
- package/dist/agent.js.map +1 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -20
- package/dist/index.js.map +1 -1
- package/dist/proxy.d.ts +2 -5
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +2 -14
- package/dist/proxy.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +4 -47
- package/dist/harness/agent-harness.d.ts +0 -716
- package/dist/harness/agent-harness.d.ts.map +0 -1
- package/dist/harness/agent-harness.js +0 -6
- package/dist/harness/agent-harness.js.map +0 -1
- package/dist/harness/compaction/branch-summarization.d.ts +0 -68
- package/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/harness/compaction/branch-summarization.js +0 -176
- package/dist/harness/compaction/branch-summarization.js.map +0 -1
- package/dist/harness/compaction/compaction.d.ts +0 -126
- package/dist/harness/compaction/compaction.d.ts.map +0 -1
- package/dist/harness/compaction/compaction.js +0 -561
- package/dist/harness/compaction/compaction.js.map +0 -1
- package/dist/harness/compaction/utils.d.ts +0 -28
- package/dist/harness/compaction/utils.d.ts.map +0 -1
- package/dist/harness/compaction/utils.js +0 -123
- package/dist/harness/compaction/utils.js.map +0 -1
- 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/env/nodejs.d.ts +0 -43
- package/dist/harness/env/nodejs.d.ts.map +0 -1
- package/dist/harness/env/nodejs.js +0 -865
- package/dist/harness/env/nodejs.js.map +0 -1
- package/dist/harness/events.d.ts +0 -24
- package/dist/harness/events.d.ts.map +0 -1
- package/dist/harness/events.js +0 -233
- package/dist/harness/events.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 -49
- 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 -119
- package/dist/harness/execution/tools.js.map +0 -1
- package/dist/harness/execution-env.d.ts +0 -4
- package/dist/harness/execution-env.d.ts.map +0 -1
- package/dist/harness/execution-env.js +0 -3
- package/dist/harness/execution-env.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 -406
- package/dist/harness/hooks.js.map +0 -1
- package/dist/harness/messages.d.ts +0 -51
- package/dist/harness/messages.d.ts.map +0 -1
- package/dist/harness/messages.js +0 -103
- package/dist/harness/messages.js.map +0 -1
- package/dist/harness/pico3/bash.d.ts +0 -10
- package/dist/harness/pico3/bash.d.ts.map +0 -1
- package/dist/harness/pico3/bash.js +0 -25
- package/dist/harness/pico3/bash.js.map +0 -1
- package/dist/harness/pico3/bounded.d.ts +0 -21
- package/dist/harness/pico3/bounded.d.ts.map +0 -1
- package/dist/harness/pico3/bounded.js +0 -98
- package/dist/harness/pico3/bounded.js.map +0 -1
- package/dist/harness/pico3/chord.d.ts +0 -41
- package/dist/harness/pico3/chord.d.ts.map +0 -1
- package/dist/harness/pico3/chord.js +0 -147
- package/dist/harness/pico3/chord.js.map +0 -1
- package/dist/harness/pico3/context.d.ts +0 -16
- package/dist/harness/pico3/context.d.ts.map +0 -1
- package/dist/harness/pico3/context.js +0 -88
- package/dist/harness/pico3/context.js.map +0 -1
- package/dist/harness/pico3/harness.d.ts +0 -198
- package/dist/harness/pico3/harness.d.ts.map +0 -1
- package/dist/harness/pico3/harness.js +0 -654
- package/dist/harness/pico3/harness.js.map +0 -1
- package/dist/harness/pico3/hooks.d.ts +0 -10
- package/dist/harness/pico3/hooks.d.ts.map +0 -1
- package/dist/harness/pico3/hooks.js +0 -33
- package/dist/harness/pico3/hooks.js.map +0 -1
- package/dist/harness/pico3/index.d.ts +0 -19
- package/dist/harness/pico3/index.d.ts.map +0 -1
- package/dist/harness/pico3/index.js +0 -15
- package/dist/harness/pico3/index.js.map +0 -1
- package/dist/harness/pico3/jsonl.d.ts +0 -58
- package/dist/harness/pico3/jsonl.d.ts.map +0 -1
- package/dist/harness/pico3/jsonl.js +0 -325
- package/dist/harness/pico3/jsonl.js.map +0 -1
- package/dist/harness/pico3/kinds/collapse.d.ts +0 -49
- package/dist/harness/pico3/kinds/collapse.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/collapse.js +0 -191
- package/dist/harness/pico3/kinds/collapse.js.map +0 -1
- package/dist/harness/pico3/kinds/entries.d.ts +0 -78
- package/dist/harness/pico3/kinds/entries.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/entries.js +0 -13
- package/dist/harness/pico3/kinds/entries.js.map +0 -1
- package/dist/harness/pico3/kinds/frames.d.ts +0 -9
- package/dist/harness/pico3/kinds/frames.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/frames.js +0 -75
- package/dist/harness/pico3/kinds/frames.js.map +0 -1
- package/dist/harness/pico3/kinds/generation.d.ts +0 -94
- package/dist/harness/pico3/kinds/generation.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/generation.js +0 -504
- package/dist/harness/pico3/kinds/generation.js.map +0 -1
- package/dist/harness/pico3/kinds/job.d.ts +0 -44
- package/dist/harness/pico3/kinds/job.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/job.js +0 -143
- package/dist/harness/pico3/kinds/job.js.map +0 -1
- package/dist/harness/pico3/kinds/plugin.d.ts +0 -15
- package/dist/harness/pico3/kinds/plugin.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/plugin.js +0 -35
- package/dist/harness/pico3/kinds/plugin.js.map +0 -1
- package/dist/harness/pico3/kinds/post-tools.d.ts +0 -22
- package/dist/harness/pico3/kinds/post-tools.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/post-tools.js +0 -145
- package/dist/harness/pico3/kinds/post-tools.js.map +0 -1
- package/dist/harness/pico3/kinds/task-api.d.ts +0 -3
- package/dist/harness/pico3/kinds/task-api.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/task-api.js +0 -45
- package/dist/harness/pico3/kinds/task-api.js.map +0 -1
- package/dist/harness/pico3/kinds/tool.d.ts +0 -43
- package/dist/harness/pico3/kinds/tool.d.ts.map +0 -1
- package/dist/harness/pico3/kinds/tool.js +0 -373
- package/dist/harness/pico3/kinds/tool.js.map +0 -1
- package/dist/harness/pico3/legacy-tracker.d.ts +0 -11
- package/dist/harness/pico3/legacy-tracker.d.ts.map +0 -1
- package/dist/harness/pico3/legacy-tracker.js +0 -41
- package/dist/harness/pico3/legacy-tracker.js.map +0 -1
- package/dist/harness/pico3/membrane.d.ts +0 -23
- package/dist/harness/pico3/membrane.d.ts.map +0 -1
- package/dist/harness/pico3/membrane.js +0 -141
- package/dist/harness/pico3/membrane.js.map +0 -1
- package/dist/harness/pico3/memory.d.ts +0 -53
- package/dist/harness/pico3/memory.d.ts.map +0 -1
- package/dist/harness/pico3/memory.js +0 -264
- package/dist/harness/pico3/memory.js.map +0 -1
- package/dist/harness/pico3/scheduler.d.ts +0 -49
- package/dist/harness/pico3/scheduler.d.ts.map +0 -1
- package/dist/harness/pico3/scheduler.js +0 -438
- package/dist/harness/pico3/scheduler.js.map +0 -1
- package/dist/harness/pico3/session.d.ts +0 -264
- package/dist/harness/pico3/session.d.ts.map +0 -1
- package/dist/harness/pico3/session.js +0 -1348
- package/dist/harness/pico3/session.js.map +0 -1
- package/dist/harness/pico3/system.d.ts +0 -126
- package/dist/harness/pico3/system.d.ts.map +0 -1
- package/dist/harness/pico3/system.js +0 -244
- package/dist/harness/pico3/system.js.map +0 -1
- package/dist/harness/pico3/types.d.ts +0 -973
- package/dist/harness/pico3/types.d.ts.map +0 -1
- package/dist/harness/pico3/types.js +0 -106
- package/dist/harness/pico3/types.js.map +0 -1
- package/dist/harness/pico3/view.d.ts +0 -34
- package/dist/harness/pico3/view.d.ts.map +0 -1
- package/dist/harness/pico3/view.js +0 -411
- package/dist/harness/pico3/view.js.map +0 -1
- package/dist/harness/prompt-templates.d.ts +0 -49
- package/dist/harness/prompt-templates.d.ts.map +0 -1
- package/dist/harness/prompt-templates.js +0 -225
- package/dist/harness/prompt-templates.js.map +0 -1
- package/dist/harness/result.d.ts +0 -133
- package/dist/harness/result.d.ts.map +0 -1
- package/dist/harness/result.js +0 -81
- package/dist/harness/result.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 -219
- 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 -311
- 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 -1575
- 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 -61
- 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/context.d.ts +0 -10
- package/dist/harness/session/context.d.ts.map +0 -1
- package/dist/harness/session/context.js +0 -49
- package/dist/harness/session/context.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 -276
- package/dist/harness/session/in-memory-storage-state.js.map +0 -1
- package/dist/harness/session/index.d.ts +0 -11
- package/dist/harness/session/index.d.ts.map +0 -1
- package/dist/harness/session/index.js +0 -9
- package/dist/harness/session/index.js.map +0 -1
- package/dist/harness/session/jsonl/codec.d.ts +0 -21
- package/dist/harness/session/jsonl/codec.d.ts.map +0 -1
- package/dist/harness/session/jsonl/codec.js +0 -45
- package/dist/harness/session/jsonl/codec.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 -264
- 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 -462
- package/dist/harness/session/jsonl/legacy-v3.js.map +0 -1
- package/dist/harness/session/jsonl/repo.d.ts +0 -35
- package/dist/harness/session/jsonl/repo.d.ts.map +0 -1
- package/dist/harness/session/jsonl/repo.js +0 -301
- package/dist/harness/session/jsonl/repo.js.map +0 -1
- package/dist/harness/session/jsonl/storage.d.ts +0 -41
- package/dist/harness/session/jsonl/storage.d.ts.map +0 -1
- package/dist/harness/session/jsonl/storage.js +0 -200
- package/dist/harness/session/jsonl/storage.js.map +0 -1
- package/dist/harness/session/jsonl/types.d.ts +0 -39
- package/dist/harness/session/jsonl/types.d.ts.map +0 -1
- package/dist/harness/session/jsonl/types.js +0 -3
- package/dist/harness/session/jsonl/types.js.map +0 -1
- package/dist/harness/session/memory.d.ts +0 -48
- package/dist/harness/session/memory.d.ts.map +0 -1
- package/dist/harness/session/memory.js +0 -369
- package/dist/harness/session/memory.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 -21
- package/dist/harness/session/mutation-line.js.map +0 -1
- package/dist/harness/session/session.d.ts +0 -82
- package/dist/harness/session/session.d.ts.map +0 -1
- package/dist/harness/session/session.js +0 -361
- package/dist/harness/session/session.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 -100
- package/dist/harness/session/testing/gating-storage.js.map +0 -1
- package/dist/harness/session/testing/index.d.ts +0 -10
- package/dist/harness/session/testing/index.d.ts.map +0 -1
- package/dist/harness/session/testing/index.js +0 -9
- package/dist/harness/session/testing/index.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 -16
- 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 -41
- package/dist/harness/session/testing/storage-decorator.js.map +0 -1
- package/dist/harness/session/testing/types.d.ts +0 -12
- package/dist/harness/session/testing/types.d.ts.map +0 -1
- package/dist/harness/session/testing/types.js +0 -2
- package/dist/harness/session/testing/types.js.map +0 -1
- package/dist/harness/session/types.d.ts +0 -512
- package/dist/harness/session/types.d.ts.map +0 -1
- package/dist/harness/session/types.js +0 -9
- package/dist/harness/session/types.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/skills.d.ts +0 -46
- package/dist/harness/skills.d.ts.map +0 -1
- package/dist/harness/skills.js +0 -326
- package/dist/harness/skills.js.map +0 -1
- package/dist/harness/system-prompt.d.ts +0 -3
- package/dist/harness/system-prompt.d.ts.map +0 -1
- package/dist/harness/system-prompt.js +0 -30
- package/dist/harness/system-prompt.js.map +0 -1
- package/dist/harness/telemetry.d.ts +0 -1242
- package/dist/harness/telemetry.d.ts.map +0 -1
- package/dist/harness/telemetry.js +0 -527
- package/dist/harness/telemetry.js.map +0 -1
- package/dist/harness/tools/bash.d.ts +0 -27
- package/dist/harness/tools/bash.d.ts.map +0 -1
- package/dist/harness/tools/bash.js +0 -105
- package/dist/harness/tools/bash.js.map +0 -1
- package/dist/harness/tools/edit-diff.d.ts +0 -89
- package/dist/harness/tools/edit-diff.d.ts.map +0 -1
- package/dist/harness/tools/edit-diff.js +0 -386
- package/dist/harness/tools/edit-diff.js.map +0 -1
- package/dist/harness/tools/edit.d.ts +0 -19
- package/dist/harness/tools/edit.d.ts.map +0 -1
- package/dist/harness/tools/edit.js +0 -108
- package/dist/harness/tools/edit.js.map +0 -1
- package/dist/harness/tools/file-mutation-queue.d.ts +0 -5
- package/dist/harness/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/harness/tools/file-mutation-queue.js +0 -46
- package/dist/harness/tools/file-mutation-queue.js.map +0 -1
- package/dist/harness/tools/image.d.ts +0 -3
- package/dist/harness/tools/image.d.ts.map +0 -1
- package/dist/harness/tools/image.js +0 -106
- package/dist/harness/tools/image.js.map +0 -1
- package/dist/harness/tools/index.d.ts +0 -6
- package/dist/harness/tools/index.d.ts.map +0 -1
- package/dist/harness/tools/index.js +0 -5
- package/dist/harness/tools/index.js.map +0 -1
- package/dist/harness/tools/path-utils.d.ts +0 -5
- package/dist/harness/tools/path-utils.d.ts.map +0 -1
- package/dist/harness/tools/path-utils.js +0 -26
- package/dist/harness/tools/path-utils.js.map +0 -1
- package/dist/harness/tools/read.d.ts +0 -35
- package/dist/harness/tools/read.d.ts.map +0 -1
- package/dist/harness/tools/read.js +0 -108
- package/dist/harness/tools/read.js.map +0 -1
- package/dist/harness/tools/tool-context.d.ts +0 -6
- package/dist/harness/tools/tool-context.d.ts.map +0 -1
- package/dist/harness/tools/tool-context.js +0 -2
- package/dist/harness/tools/tool-context.js.map +0 -1
- package/dist/harness/tools/write.d.ts +0 -11
- package/dist/harness/tools/write.d.ts.map +0 -1
- package/dist/harness/tools/write.js +0 -31
- package/dist/harness/tools/write.js.map +0 -1
- package/dist/harness/types.d.ts +0 -305
- package/dist/harness/types.d.ts.map +0 -1
- package/dist/harness/types.js +0 -75
- package/dist/harness/types.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/shell-output.d.ts +0 -29
- package/dist/harness/utils/shell-output.d.ts.map +0 -1
- package/dist/harness/utils/shell-output.js +0 -71
- package/dist/harness/utils/shell-output.js.map +0 -1
- package/dist/harness/utils/truncate.d.ts +0 -71
- package/dist/harness/utils/truncate.d.ts.map +0 -1
- package/dist/harness/utils/truncate.js +0 -296
- package/dist/harness/utils/truncate.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
- package/dist/node.d.ts +0 -3
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -3
- package/dist/node.js.map +0 -1
- package/dist/search/index.d.ts +0 -29
- package/dist/search/index.d.ts.map +0 -1
- package/dist/search/index.js +0 -2
- package/dist/search/index.js.map +0 -1
|
@@ -1,716 +0,0 @@
|
|
|
1
|
-
import type { Api, AssistantMessage, AssistantMessageEvent, AssistantMessageFrame, DeferredHandle, ImageContent, Message, Model, Models, RetryPolicy, ToolResultMessage, Usage } from "@draht/ai";
|
|
2
|
-
import type { JsonRepresentation } from "@draht/chord";
|
|
3
|
-
import type { AgentMessage, AgentToolResult, QueueMode, ThinkingLevel } from "../types.ts";
|
|
4
|
-
import type { BranchPreparation, BranchSummaryResult } from "./compaction/branch-summarization.ts";
|
|
5
|
-
import type { CompactionPreparation, CompactionSettings, CompactResult } from "./compaction/compaction.ts";
|
|
6
|
-
import type { Context } from "./context.ts";
|
|
7
|
-
import type { Closed, InvalidMessage, InvalidNavigation, LaneBusy, NoActiveOperation, NothingToCompact, NothingToResume, OperationMismatch, Result, UnknownSkill, UnknownTarget, UnknownTemplate } from "./result.ts";
|
|
8
|
-
export { Closed, HarnessClosed, HarnessFault, InvalidLane, InvalidMessage, InvalidNavigation, LaneBusy, NoActiveOperation, NoActiveRun, NothingToCompact, NothingToResume, OperationMismatch, UnknownSkill, UnknownTarget, UnknownTemplate, } from "./result.ts";
|
|
9
|
-
export { SliceNotImplemented } from "./runtime/types.ts";
|
|
10
|
-
import { createAgentHarness } from "./runtime/harness.ts";
|
|
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 {
|
|
15
|
-
operationId: string;
|
|
16
|
-
status: "suspended";
|
|
17
|
-
deferred: DeferredHandle;
|
|
18
|
-
}
|
|
19
|
-
export type RunResult = Result<OperationResultRecord | SuspendedRun, LaneBusy | InvalidMessage | UnknownSkill | UnknownTemplate | Closed>;
|
|
20
|
-
export type CompactionResult = Result<{
|
|
21
|
-
compaction: OperationResultRecord;
|
|
22
|
-
run?: OperationResultRecord | SuspendedRun;
|
|
23
|
-
}, LaneBusy | NothingToCompact | Closed>;
|
|
24
|
-
export type NavigationResult = Result<{
|
|
25
|
-
navigation: OperationResultRecord;
|
|
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;
|
|
47
|
-
}
|
|
48
|
-
export type OperationRequest = {
|
|
49
|
-
kind: "prompt";
|
|
50
|
-
operationId?: string;
|
|
51
|
-
prompt: string;
|
|
52
|
-
images?: ImageContent[];
|
|
53
|
-
} | {
|
|
54
|
-
kind: "prompt";
|
|
55
|
-
operationId?: string;
|
|
56
|
-
prompt: AgentMessage | AgentMessage[];
|
|
57
|
-
images?: never;
|
|
58
|
-
} | {
|
|
59
|
-
kind: "skill";
|
|
60
|
-
operationId?: string;
|
|
61
|
-
name: string;
|
|
62
|
-
additionalInstructions?: string;
|
|
63
|
-
} | {
|
|
64
|
-
kind: "prompt_template";
|
|
65
|
-
operationId?: string;
|
|
66
|
-
name: string;
|
|
67
|
-
args?: string[];
|
|
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;
|
|
82
|
-
}
|
|
83
|
-
export type OperationAdmissionError = LaneBusy | InvalidMessage | UnknownSkill | UnknownTemplate | NothingToCompact | InvalidNavigation | UnknownTarget | Closed;
|
|
84
|
-
export type OperationAdmissionResult = Result<OperationAdmission, OperationAdmissionError>;
|
|
85
|
-
export interface DriveOptions {
|
|
86
|
-
operationId: string;
|
|
87
|
-
waitForRetry?: boolean;
|
|
88
|
-
pollDeferred?: boolean;
|
|
89
|
-
}
|
|
90
|
-
export interface ModelIdentity {
|
|
91
|
-
provider: string;
|
|
92
|
-
modelId: string;
|
|
93
|
-
}
|
|
94
|
-
export type OperationStatus = "running" | "open" | "aborting";
|
|
95
|
-
export interface CurrentOperationInfo {
|
|
96
|
-
id: string;
|
|
97
|
-
kind: "run" | "compaction" | "navigation";
|
|
98
|
-
startedAt: number;
|
|
99
|
-
status: OperationStatus;
|
|
100
|
-
capturedModel?: ModelIdentity;
|
|
101
|
-
}
|
|
102
|
-
export interface LaneExecutionInfo {
|
|
103
|
-
lane: string;
|
|
104
|
-
tipId: string | null;
|
|
105
|
-
configuredModel: ModelIdentity;
|
|
106
|
-
current: CurrentOperationInfo | null;
|
|
107
|
-
lastOperationId: string | null;
|
|
108
|
-
}
|
|
109
|
-
export type DriveOutcome = {
|
|
110
|
-
kind: "settled";
|
|
111
|
-
outcome: OperationResultRecord;
|
|
112
|
-
} | {
|
|
113
|
-
kind: "waiting";
|
|
114
|
-
operationId: string;
|
|
115
|
-
reason: "retry";
|
|
116
|
-
notBefore: number;
|
|
117
|
-
} | {
|
|
118
|
-
kind: "waiting";
|
|
119
|
-
operationId: string;
|
|
120
|
-
reason: "deferred";
|
|
121
|
-
deferred: DeferredHandle;
|
|
122
|
-
};
|
|
123
|
-
export type DriveResult = Result<DriveOutcome, OperationMismatch | Closed>;
|
|
124
|
-
export type AbortRequestResult = Result<{
|
|
125
|
-
operationId: string;
|
|
126
|
-
newlyRequested: boolean;
|
|
127
|
-
steer: AgentMessage[];
|
|
128
|
-
followUp: AgentMessage[];
|
|
129
|
-
}, OperationMismatch | Closed>;
|
|
130
|
-
export interface WatchHandle<T> {
|
|
131
|
-
snapshot: T;
|
|
132
|
-
start(listener: EventListener): void;
|
|
133
|
-
resnapshot(context: Context): Promise<T>;
|
|
134
|
-
unsubscribe(): void;
|
|
135
|
-
}
|
|
136
|
-
export interface LaneInfo {
|
|
137
|
-
name: string;
|
|
138
|
-
tipId: string | null;
|
|
139
|
-
operation: CurrentOperationInfo | null;
|
|
140
|
-
}
|
|
141
|
-
export type LaneSnapshotTool = {
|
|
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 {
|
|
156
|
-
lane: string;
|
|
157
|
-
operationId: string;
|
|
158
|
-
kind: "run" | "compaction" | "navigation";
|
|
159
|
-
startedAt: number;
|
|
160
|
-
aborting?: true;
|
|
161
|
-
}
|
|
162
|
-
export type LaneQueuedItem = {
|
|
163
|
-
entryId: string;
|
|
164
|
-
kind: "steer" | "followUp" | "nextRun" | "write";
|
|
165
|
-
type: "message";
|
|
166
|
-
message: AgentMessage;
|
|
167
|
-
} | {
|
|
168
|
-
entryId: string;
|
|
169
|
-
kind: "write";
|
|
170
|
-
type: "custom";
|
|
171
|
-
customType: string;
|
|
172
|
-
data?: JsonValue;
|
|
173
|
-
};
|
|
174
|
-
export interface LaneSnapshot {
|
|
175
|
-
lane: string;
|
|
176
|
-
transcript: Entry[];
|
|
177
|
-
tipId: string | null;
|
|
178
|
-
lastResult?: OperationResultRecord;
|
|
179
|
-
configuration: LaneConfiguration;
|
|
180
|
-
stats: SessionStats;
|
|
181
|
-
operation: null | {
|
|
182
|
-
id: string;
|
|
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[];
|
|
198
|
-
};
|
|
199
|
-
queues: LaneQueuedItem[];
|
|
200
|
-
faulted: boolean;
|
|
201
|
-
}
|
|
202
|
-
export interface SessionSnapshot {
|
|
203
|
-
lanes: LaneInfo[];
|
|
204
|
-
faulted: boolean;
|
|
205
|
-
}
|
|
206
|
-
export type HarnessEventPayload = {
|
|
207
|
-
type: "run_start";
|
|
208
|
-
runId: string;
|
|
209
|
-
startedAt: number;
|
|
210
|
-
} | {
|
|
211
|
-
type: "run_resume";
|
|
212
|
-
runId: string;
|
|
213
|
-
} | {
|
|
214
|
-
type: "run_suspend";
|
|
215
|
-
runId: string;
|
|
216
|
-
reason: "deferred";
|
|
217
|
-
deferred: DeferredHandle;
|
|
218
|
-
poll: number;
|
|
219
|
-
} | {
|
|
220
|
-
type: "operation_abort";
|
|
221
|
-
operationId: string;
|
|
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;
|
|
233
|
-
} | {
|
|
234
|
-
status: "failed";
|
|
235
|
-
error: OperationError;
|
|
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;
|
|
247
|
-
} | {
|
|
248
|
-
kind: "event";
|
|
249
|
-
event: string;
|
|
250
|
-
})) | {
|
|
251
|
-
type: "turn_start";
|
|
252
|
-
runId: string;
|
|
253
|
-
turnId: string;
|
|
254
|
-
} | {
|
|
255
|
-
type: "turn_end";
|
|
256
|
-
runId: string;
|
|
257
|
-
turnId: string;
|
|
258
|
-
message: AssistantMessage;
|
|
259
|
-
toolResults: ToolResultMessage[];
|
|
260
|
-
} | {
|
|
261
|
-
type: "retry_scheduled";
|
|
262
|
-
runId: string;
|
|
263
|
-
step: string;
|
|
264
|
-
attempt: number;
|
|
265
|
-
maxAttempts: number;
|
|
266
|
-
delayMs: number;
|
|
267
|
-
notBefore: number;
|
|
268
|
-
errorMessage: string;
|
|
269
|
-
} | {
|
|
270
|
-
type: "retry_start";
|
|
271
|
-
runId: string;
|
|
272
|
-
step: string;
|
|
273
|
-
attempt: number;
|
|
274
|
-
} | {
|
|
275
|
-
type: "retry_end";
|
|
276
|
-
runId: string;
|
|
277
|
-
step: string;
|
|
278
|
-
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
|
-
} | {
|
|
297
|
-
type: "tool_start";
|
|
298
|
-
runId: string;
|
|
299
|
-
turnId: string;
|
|
300
|
-
toolCallId: string;
|
|
301
|
-
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
|
-
} | {
|
|
354
|
-
property: "streamOptions";
|
|
355
|
-
value: AgentHarnessStreamOptions;
|
|
356
|
-
previous: AgentHarnessStreamOptions;
|
|
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;
|
|
415
|
-
} | {
|
|
416
|
-
type: "usage";
|
|
417
|
-
lane: string;
|
|
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;
|
|
456
|
-
} | {
|
|
457
|
-
lane?: never;
|
|
458
|
-
recovery?: never;
|
|
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;
|
|
609
|
-
};
|
|
610
|
-
export type HookHandler<TName extends HookName> = (event: HookInvocation<TName>, context: Context) => Promise<HookMap[TName]["result"]> | HookMap[TName]["result"];
|
|
611
|
-
export interface Hooks {
|
|
612
|
-
on<TName extends HookName>(name: TName, handler: HookHandler<TName>, options?: {
|
|
613
|
-
id?: string;
|
|
614
|
-
}): () => void;
|
|
615
|
-
}
|
|
616
|
-
export type { EntryProjector } from "./session/types.ts";
|
|
617
|
-
export interface AgentHarnessOptions<TContext extends object | undefined = object | undefined> {
|
|
618
|
-
session: Session;
|
|
619
|
-
models: Models;
|
|
620
|
-
model: Model<Api>;
|
|
621
|
-
thinkingLevel?: ThinkingLevel;
|
|
622
|
-
activeToolNames?: string[];
|
|
623
|
-
tools?: AgentHarnessTool<TContext>[];
|
|
624
|
-
toolContext?: TContext | ((context: Context) => TContext | Promise<TContext>);
|
|
625
|
-
systemPrompt?: string | ((toolContext: TContext, context: Context) => string | Promise<string>);
|
|
626
|
-
resources?: Resources;
|
|
627
|
-
streamOptions?: AgentHarnessStreamOptions;
|
|
628
|
-
retry?: RetryPolicy;
|
|
629
|
-
compaction?: CompactionSettings;
|
|
630
|
-
steeringMode?: QueueMode;
|
|
631
|
-
followUpMode?: QueueMode;
|
|
632
|
-
toolExecution?: "sequential" | "parallel";
|
|
633
|
-
toProviderMessages?: (messages: AgentMessage[], context: Context) => Message[] | Promise<Message[]>;
|
|
634
|
-
entryProjectors?: Record<string, EntryProjector>;
|
|
635
|
-
}
|
|
636
|
-
export interface AgentLane {
|
|
637
|
-
readonly name: string;
|
|
638
|
-
getTipId(context: Context): Promise<string | null>;
|
|
639
|
-
findEntries(query: BranchScan | undefined, context: Context): Promise<Entry[]>;
|
|
640
|
-
findEntry(query: BranchScan | undefined, context: Context): Promise<Entry | undefined>;
|
|
641
|
-
appendMessage(message: AgentMessage, context: Context): Promise<string>;
|
|
642
|
-
appendCustomEntry(customType: string, data: JsonValue | undefined, context: Context): Promise<string>;
|
|
643
|
-
getResult(operationId: string, context: Context): Promise<OperationResultRecord | undefined>;
|
|
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: {
|
|
653
|
-
customInstructions?: string;
|
|
654
|
-
} | undefined, context: Context): Promise<CompactionResult>;
|
|
655
|
-
navigateTree(targetId: string | null, options: NavigateOptions | undefined, context: Context): Promise<NavigationResult>;
|
|
656
|
-
resume(context: Context): Promise<ResumeResult>;
|
|
657
|
-
abort(context: Context): Promise<AbortResult>;
|
|
658
|
-
steer(message: string | AgentMessage, images: ImageContent[] | undefined, context: Context): Promise<QueueResult>;
|
|
659
|
-
followUp(message: string | AgentMessage, images: ImageContent[] | undefined, context: Context): Promise<QueueResult>;
|
|
660
|
-
nextRun(message: string | AgentMessage, images: ImageContent[] | undefined, context: Context): Promise<QueueResult>;
|
|
661
|
-
cancelQueued(entryId: string, context: Context): Promise<CancelQueuedResult>;
|
|
662
|
-
recordUsage(usage: Usage, options: {
|
|
663
|
-
entryId?: string;
|
|
664
|
-
details?: JsonValue;
|
|
665
|
-
} | undefined, context: Context): Promise<RecordUsageResult>;
|
|
666
|
-
waitForIdle(context: Context): Promise<void>;
|
|
667
|
-
runWhenIdle(callback: (context: Context) => void | Promise<void>, context: Context): Promise<void>;
|
|
668
|
-
getModel(context: Context): Promise<Model<Api> | undefined>;
|
|
669
|
-
setModel(model: ModelIdentity, context: Context): Promise<void>;
|
|
670
|
-
getThinkingLevel(context: Context): Promise<ThinkingLevel>;
|
|
671
|
-
setThinkingLevel(level: ThinkingLevel, context: Context): Promise<void>;
|
|
672
|
-
getActiveTools(context: Context): Promise<string[]>;
|
|
673
|
-
setActiveTools(names: string[], context: Context): Promise<void>;
|
|
674
|
-
watch(context: Context): Promise<WatchHandle<LaneSnapshot>>;
|
|
675
|
-
}
|
|
676
|
-
export interface AcquireLaneOptions {
|
|
677
|
-
createAt?: string | null;
|
|
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>>;
|
|
702
|
-
readonly hooks: Hooks;
|
|
703
|
-
readonly events: Events;
|
|
704
|
-
close(context: Context): Promise<void>;
|
|
705
|
-
}
|
|
706
|
-
export interface AgentHarnessConstructor {
|
|
707
|
-
create<TContext extends object | undefined = object | undefined>(options: AgentHarnessOptions<TContext>, context: Context): Promise<{
|
|
708
|
-
harness: AgentHarness<TContext>;
|
|
709
|
-
open: OpenOperation[];
|
|
710
|
-
}>;
|
|
711
|
-
}
|
|
712
|
-
/** Runtime constructor for attaching the durable harness to one open session. */
|
|
713
|
-
export declare const AgentHarness: {
|
|
714
|
-
create: typeof createAgentHarness;
|
|
715
|
-
};
|
|
716
|
-
//# sourceMappingURL=agent-harness.d.ts.map
|