@yolk-sdk/agent 0.1.0-canary.102 → 0.1.0-canary.104

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.
Files changed (114) hide show
  1. package/README.md +63 -43
  2. package/dist/classification/errors.d.mts +1 -1
  3. package/dist/classification/errors.mjs +1 -1
  4. package/dist/client/transport.d.mts +1 -1
  5. package/dist/client/transport.mjs +1 -1
  6. package/dist/compaction/retry.d.mts +30 -30
  7. package/dist/compaction/retry.d.mts.map +1 -1
  8. package/dist/compaction/window.d.mts +39 -39
  9. package/dist/compaction/window.d.mts.map +1 -1
  10. package/dist/loop/error.d.mts +1 -1
  11. package/dist/loop/error.mjs +1 -1
  12. package/dist/loop/llm-event.d.mts +1 -1
  13. package/dist/loop/llm-event.mjs +1 -1
  14. package/dist/loop/run.d.mts +19 -3
  15. package/dist/loop/run.d.mts.map +1 -1
  16. package/dist/loop/run.mjs +49 -4
  17. package/dist/loop/run.mjs.map +1 -1
  18. package/dist/protocol/change-preview.d.mts +475 -0
  19. package/dist/protocol/change-preview.d.mts.map +1 -0
  20. package/dist/protocol/change-preview.mjs +164 -0
  21. package/dist/protocol/change-preview.mjs.map +1 -0
  22. package/dist/protocol/index.d.mts +3 -2
  23. package/dist/protocol/index.d.mts.map +1 -1
  24. package/dist/protocol/index.mjs +3 -2
  25. package/dist/protocol/tool.d.mts +157 -6
  26. package/dist/protocol/tool.d.mts.map +1 -1
  27. package/dist/protocol/tool.mjs +34 -12
  28. package/dist/protocol/tool.mjs.map +1 -1
  29. package/dist/providers/anthropic/conformance/cases.mjs +1 -1
  30. package/dist/providers/anthropic-messages-provider-internal.mjs +1 -1
  31. package/dist/providers/anthropic-provider-internal.mjs +1 -1
  32. package/dist/providers/openai/conformance/responses-cases-internal.mjs +1 -1
  33. package/dist/providers/openai/provider.d.mts +1 -1
  34. package/dist/providers/openai/provider.mjs +1 -1
  35. package/dist/providers/openai/realtime/client-codec.mjs +1 -1
  36. package/dist/providers/openai/realtime/session-config.d.mts +1 -1
  37. package/dist/providers/openai/realtime/session-config.mjs +1 -1
  38. package/dist/providers/openai-responses-provider-internal.d.mts +1 -1
  39. package/dist/providers/openai-responses-provider-internal.mjs +1 -1
  40. package/dist/providers/opencode/conformance/cases.mjs +1 -1
  41. package/dist/providers/vercel/ai-gateway-classifier.mjs +1 -1
  42. package/dist/react/chat-items.d.mts +13 -13
  43. package/dist/react/chat-items.mjs +1 -1
  44. package/dist/react/chat-messages.d.mts +12 -12
  45. package/dist/react/chat-session-events.d.mts +1 -1
  46. package/dist/react/chat-session-events.mjs +1 -1
  47. package/dist/runtime/error.d.mts +1 -1
  48. package/dist/runtime/error.mjs +1 -1
  49. package/dist/runtime/run-runtime.d.mts +3 -2
  50. package/dist/runtime/run-runtime.d.mts.map +1 -1
  51. package/dist/runtime/run-runtime.mjs +1 -0
  52. package/dist/runtime/run-runtime.mjs.map +1 -1
  53. package/dist/runtime/session-event-store.d.mts +1 -1
  54. package/dist/runtime/session-event-store.mjs +1 -1
  55. package/dist/tools/arguments.d.mts +1 -1
  56. package/dist/tools/arguments.mjs +1 -1
  57. package/dist/tools/background.d.mts +1 -1
  58. package/dist/tools/background.mjs +1 -1
  59. package/dist/tools/change-preview.d.mts +83 -0
  60. package/dist/tools/change-preview.d.mts.map +1 -0
  61. package/dist/tools/change-preview.mjs +374 -0
  62. package/dist/tools/change-preview.mjs.map +1 -0
  63. package/dist/tools/index.d.mts +6 -2
  64. package/dist/tools/index.mjs +5 -1
  65. package/dist/tools/input.d.mts +1 -1
  66. package/dist/tools/input.mjs +1 -1
  67. package/dist/tools/interaction.d.mts +1 -1
  68. package/dist/tools/interaction.mjs +4 -4
  69. package/dist/tools/interaction.mjs.map +1 -1
  70. package/dist/tools/ledger.d.mts +8 -3
  71. package/dist/tools/ledger.d.mts.map +1 -1
  72. package/dist/tools/ledger.mjs +9 -4
  73. package/dist/tools/ledger.mjs.map +1 -1
  74. package/dist/tools/plan-review.d.mts +76 -0
  75. package/dist/tools/plan-review.d.mts.map +1 -0
  76. package/dist/tools/plan-review.mjs +151 -0
  77. package/dist/tools/plan-review.mjs.map +1 -0
  78. package/dist/tools/plan-runtime.d.mts +60 -0
  79. package/dist/tools/plan-runtime.d.mts.map +1 -0
  80. package/dist/tools/plan-runtime.mjs +627 -0
  81. package/dist/tools/plan-runtime.mjs.map +1 -0
  82. package/dist/tools/plan.d.mts +672 -0
  83. package/dist/tools/plan.d.mts.map +1 -0
  84. package/dist/tools/plan.mjs +247 -0
  85. package/dist/tools/plan.mjs.map +1 -0
  86. package/dist/tools/registry.d.mts +97 -9
  87. package/dist/tools/registry.d.mts.map +1 -1
  88. package/dist/tools/registry.mjs +257 -66
  89. package/dist/tools/registry.mjs.map +1 -1
  90. package/dist/tools/subagent.mjs +1 -1
  91. package/dist/voice/projection.d.mts +1 -1
  92. package/dist/voice/projection.mjs +1 -1
  93. package/dist/voice/protocol.d.mts +1 -1
  94. package/dist/voice/protocol.mjs +1 -1
  95. package/dist/voice/session-log.d.mts +1 -1
  96. package/dist/voice/session-log.mjs +1 -1
  97. package/dist/voice/speech.d.mts +1 -1
  98. package/dist/voice/speech.mjs +1 -1
  99. package/dist/voice/tool-bridge.mjs +1 -1
  100. package/dist/voice/tool-server.mjs +1 -1
  101. package/package.json +2 -2
  102. package/src/loop/run.ts +120 -7
  103. package/src/protocol/change-preview.ts +216 -0
  104. package/src/protocol/index.ts +23 -0
  105. package/src/protocol/tool.ts +71 -25
  106. package/src/runtime/run-runtime.ts +4 -0
  107. package/src/tools/README.md +35 -1
  108. package/src/tools/change-preview.ts +699 -0
  109. package/src/tools/index.ts +90 -0
  110. package/src/tools/ledger.ts +13 -2
  111. package/src/tools/plan-review.ts +273 -0
  112. package/src/tools/plan-runtime.ts +1200 -0
  113. package/src/tools/plan.ts +535 -0
  114. package/src/tools/registry.ts +612 -68
package/README.md CHANGED
@@ -20,47 +20,47 @@ Published package metadata requires Node.js 22+.
20
20
 
21
21
  ## Subpaths
22
22
 
23
- | Subpath | Purpose |
24
- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
25
- | `@yolk-sdk/agent/protocol` | Wire messages, events, content, usage, tool schemas |
26
- | `@yolk-sdk/agent/loop` | Stateless LLM/tool loop |
27
- | `@yolk-sdk/agent/loop/testing` | Faux provider and tool executor test helpers |
28
- | `@yolk-sdk/agent/runtime` | Transcript or append-backed runtime orchestration |
29
- | `@yolk-sdk/agent/client` | HTTP/NDJSON transport, HITL resume, retry/error state helpers |
30
- | `@yolk-sdk/agent/compaction` | Host-owned compaction budgets, checkpoints, formatting, retry |
31
- | `@yolk-sdk/agent/classification` | Classifier model contract: typed questions, answers, usage, errors |
32
- | `@yolk-sdk/agent/tools` | Tool registry, typed inputs, interactions, subagents/questions, durable tool ledger |
33
- | `@yolk-sdk/agent/react` | Headless React chat hook, reducer, selectors, and render model |
34
- | `@yolk-sdk/agent/oauth` | Provider-neutral OAuth token and broker contracts |
35
- | `@yolk-sdk/agent/providers/openai` | OpenAI/Codex OAuth and broker helpers |
36
- | `@yolk-sdk/agent/providers/openai/codex` | OpenAI Codex request and auth helpers |
37
- | `@yolk-sdk/agent/providers/openai/codex-usage` | Codex subscription-allowance snapshots |
38
- | `@yolk-sdk/agent/providers/openai/codex-provider` | Codex LLM provider factory |
39
- | `@yolk-sdk/agent/providers/openai/provider` | OpenAI-compatible LLM provider factory |
40
- | `@yolk-sdk/agent/providers/openai/conformance` | Synthetic OpenAI chat, Codex Responses, and Codex usage fixtures and conformance cases |
41
- | `@yolk-sdk/agent/providers/openai/realtime` | OpenAI Realtime session config and event codecs |
42
- | `@yolk-sdk/agent/providers/openai/speech` | OpenAI text-to-speech and transcription adapters |
43
- | `@yolk-sdk/agent/providers/vercel/ai-gateway-provider` | Vercel AI Gateway Chat Completions provider factory |
44
- | `@yolk-sdk/agent/providers/vercel/ai-gateway-classifier` | Vercel AI Gateway classifier (`POST /v1/evaluate`) layer |
45
- | `@yolk-sdk/agent/providers/vercel/conformance` | Verified Gateway chat fixtures, synthetic classifier fixtures, and conformance cases |
46
- | `@yolk-sdk/agent/providers/opencode/go-provider` | OpenCode Go Chat Completions, Messages, and Responses provider |
47
- | `@yolk-sdk/agent/providers/opencode/usage` | OpenCode Go subscription-allowance snapshots |
48
- | `@yolk-sdk/agent/providers/opencode/conformance` | Synthetic OpenCode Go (per protocol, commentary replay, usage) fixtures and conformance cases |
49
- | `@yolk-sdk/agent/providers/anthropic` | Anthropic/Claude OAuth and broker helpers |
50
- | `@yolk-sdk/agent/providers/anthropic/claude` | Claude request and auth helpers |
51
- | `@yolk-sdk/agent/providers/anthropic/usage` | Claude subscription-allowance snapshots |
52
- | `@yolk-sdk/agent/providers/anthropic/claude-provider` | Claude LLM provider factory |
53
- | `@yolk-sdk/agent/providers/anthropic/conformance` | Synthetic Anthropic Messages and Claude usage fixtures and conformance cases |
54
- | `@yolk-sdk/agent/providers/xai` | Grok subscription OAuth and token broker helpers |
55
- | `@yolk-sdk/agent/providers/xai/grok` | Grok subscription request and auth helpers |
56
- | `@yolk-sdk/agent/providers/xai/grok-provider` | Grok subscription LLM provider factory |
57
- | `@yolk-sdk/agent/providers/xai/usage` | Grok subscription-allowance snapshots |
58
- | `@yolk-sdk/agent/providers/xai/conformance` | Synthetic Grok Responses and Grok usage fixtures and conformance cases |
59
- | `@yolk-sdk/agent/providers/subscription-usage` | Shared allowance snapshot and safe error schemas |
60
- | `@yolk-sdk/agent/skillset` | Portable skill and slash-command parsing/catalogs |
61
- | `@yolk-sdk/agent/voice` | Voice protocol, controller, tool handler, projection, speech |
62
- | `@yolk-sdk/agent/voice/browser` | Browser WebRTC voice transport |
63
- | `@yolk-sdk/agent/voice/react` | Headless browser voice React hook |
23
+ | Subpath | Purpose |
24
+ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
25
+ | `@yolk-sdk/agent/protocol` | Wire messages, events, content, usage, tool schemas |
26
+ | `@yolk-sdk/agent/loop` | Stateless LLM/tool loop |
27
+ | `@yolk-sdk/agent/loop/testing` | Faux provider and tool executor test helpers |
28
+ | `@yolk-sdk/agent/runtime` | Transcript or append-backed runtime orchestration |
29
+ | `@yolk-sdk/agent/client` | HTTP/NDJSON transport, HITL resume, retry/error state helpers |
30
+ | `@yolk-sdk/agent/compaction` | Host-owned compaction budgets, checkpoints, formatting, retry |
31
+ | `@yolk-sdk/agent/classification` | Classifier model contract: typed questions, answers, usage, errors |
32
+ | `@yolk-sdk/agent/tools` | Tool registry, typed inputs, interactions, subagents/questions, durable tool ledger, staged tool plans, tool change previews |
33
+ | `@yolk-sdk/agent/react` | Headless React chat hook, reducer, selectors, and render model |
34
+ | `@yolk-sdk/agent/oauth` | Provider-neutral OAuth token and broker contracts |
35
+ | `@yolk-sdk/agent/providers/openai` | OpenAI/Codex OAuth and broker helpers |
36
+ | `@yolk-sdk/agent/providers/openai/codex` | OpenAI Codex request and auth helpers |
37
+ | `@yolk-sdk/agent/providers/openai/codex-usage` | Codex subscription-allowance snapshots |
38
+ | `@yolk-sdk/agent/providers/openai/codex-provider` | Codex LLM provider factory |
39
+ | `@yolk-sdk/agent/providers/openai/provider` | OpenAI-compatible LLM provider factory |
40
+ | `@yolk-sdk/agent/providers/openai/conformance` | Synthetic OpenAI chat, Codex Responses, and Codex usage fixtures and conformance cases |
41
+ | `@yolk-sdk/agent/providers/openai/realtime` | OpenAI Realtime session config and event codecs |
42
+ | `@yolk-sdk/agent/providers/openai/speech` | OpenAI text-to-speech and transcription adapters |
43
+ | `@yolk-sdk/agent/providers/vercel/ai-gateway-provider` | Vercel AI Gateway Chat Completions provider factory |
44
+ | `@yolk-sdk/agent/providers/vercel/ai-gateway-classifier` | Vercel AI Gateway classifier (`POST /v1/evaluate`) layer |
45
+ | `@yolk-sdk/agent/providers/vercel/conformance` | Verified Gateway chat fixtures, synthetic classifier fixtures, and conformance cases |
46
+ | `@yolk-sdk/agent/providers/opencode/go-provider` | OpenCode Go Chat Completions, Messages, and Responses provider |
47
+ | `@yolk-sdk/agent/providers/opencode/usage` | OpenCode Go subscription-allowance snapshots |
48
+ | `@yolk-sdk/agent/providers/opencode/conformance` | Synthetic OpenCode Go (per protocol, commentary replay, usage) fixtures and conformance cases |
49
+ | `@yolk-sdk/agent/providers/anthropic` | Anthropic/Claude OAuth and broker helpers |
50
+ | `@yolk-sdk/agent/providers/anthropic/claude` | Claude request and auth helpers |
51
+ | `@yolk-sdk/agent/providers/anthropic/usage` | Claude subscription-allowance snapshots |
52
+ | `@yolk-sdk/agent/providers/anthropic/claude-provider` | Claude LLM provider factory |
53
+ | `@yolk-sdk/agent/providers/anthropic/conformance` | Synthetic Anthropic Messages and Claude usage fixtures and conformance cases |
54
+ | `@yolk-sdk/agent/providers/xai` | Grok subscription OAuth and token broker helpers |
55
+ | `@yolk-sdk/agent/providers/xai/grok` | Grok subscription request and auth helpers |
56
+ | `@yolk-sdk/agent/providers/xai/grok-provider` | Grok subscription LLM provider factory |
57
+ | `@yolk-sdk/agent/providers/xai/usage` | Grok subscription-allowance snapshots |
58
+ | `@yolk-sdk/agent/providers/xai/conformance` | Synthetic Grok Responses and Grok usage fixtures and conformance cases |
59
+ | `@yolk-sdk/agent/providers/subscription-usage` | Shared allowance snapshot and safe error schemas |
60
+ | `@yolk-sdk/agent/skillset` | Portable skill and slash-command parsing/catalogs |
61
+ | `@yolk-sdk/agent/voice` | Voice protocol, controller, tool handler, projection, speech |
62
+ | `@yolk-sdk/agent/voice/browser` | Browser WebRTC voice transport |
63
+ | `@yolk-sdk/agent/voice/react` | Headless browser voice React hook |
64
64
 
65
65
  ## Imports
66
66
 
@@ -680,6 +680,7 @@ HITL is protocol-level, not UI-level:
680
680
  `submitToolApprovalResponse` / `submitQuestionResponse`, or using client stream helpers like
681
681
  `streamToolApprovalResponseEventStream`.
682
682
  - Denials become model-visible `ToolResult` messages with `isError = true`.
683
+ - Give approval-gated tools a `changePreview` hook (`makeTool({ approval, changePreview })`) and pass `resolveTools(...).approvalPreviews` as `approvalPreviews` to loop/runtime configs: pending `ToolApprovalRequest`s then carry a tool-agnostic before → after `preview` (`ToolChangePreview`) or `previewError`. Previews are display only and never block the approval. See [ADR 0006](https://github.com/magoz/yolk-sdk/blob/main/docs/adr/0006-tool-change-previews.md).
683
684
  - Use `makeQuestionToolModule` to expose the package-owned `question` tool; answers resume as structured tool results and model-visible text with selected labels. The loop intercepts questions only when the tool is enabled in `tools`; omitted questions return an unavailable result without HITL or executor dispatch, even if a provider emits one.
684
685
  - Use `makeInputTool({ name, description, response, renderer })` for custom typed input. Apps own the response Effect schema and renderer; the SDK carries JSON data only. Pass `resolveTools(...).inputs` alongside `tools` to loop/runtime configs. The original `callParameters` and `response` schemas validate server-side, including refinements; display JSON Schema is not the validator. Invalid calls fail before prompting; invalid submissions remain pending for correction. The first valid submission or cancellation settles the request and cannot be overwritten by stale responses.
685
686
  - Resume custom inputs with `submitInputResponse`, `streamInputResponseEventStream`, or WebSocket `InputResponseInput`. Echo request/call IDs; do not reconstruct them. Input collection is not authorization: a draft composer never grants permission to send. Input tools cannot carry approval/background policy or execute directly.
@@ -866,6 +867,10 @@ not this marker. These child observations are separate from generic background t
866
867
  `prepareToolBatch` from `@yolk-sdk/agent/loop` exposes the same HITL preflight used by the loop.
867
868
  Durable orchestration must check `pendingRequests` before dispatching **any** tool, even calls
868
869
  listed in `callsToExecute`. Preserve synthetic results and original call ordering when committing.
870
+ It fails with `ToolError` `unavailable` only when host storage read by an interaction call
871
+ validator (for example a plan review's plan store) is unavailable; nothing runs, so fail the step
872
+ and retry it. Admission (`validateInteractionSubmission`) answers `InteractionAdmissionError`
873
+ `unavailable` for the same outage.
869
874
 
870
875
  Keep host-owned subagent execution wiring outside this package; pass only the package subagent contract across the boundary.
871
876
 
@@ -922,8 +927,8 @@ This package declares them; it does not run scripts.
922
927
  - `callableBy: 'all' | 'model' | 'codemode'` (default `all`) decides who may call a tool. For
923
928
  `codemode` only, `discovery: 'listed' | 'search'` (default `listed`) decides how scripts find it.
924
929
  Codemode-only tools never reach providers. Approval, input, interaction, activated background,
925
- `question`, `subagent`, and nested-access tools never run from code mode; `resolveTools` rejects
926
- `callableBy: 'codemode'` on them.
930
+ `question`, `subagent`, and nested-access tools never run from code mode (stageable approval tools
931
+ are only staged; see Staged tool plans); `resolveTools` rejects `callableBy: 'codemode'` on them.
927
932
  - `nestedToolAccess: true` gives a registration's `execute` a `nested` executor over the other
928
933
  code-mode-callable tools of the same resolution and host context. Nested calls run through the
929
934
  resolved execute path and fail closed with model-visible error results. Assign nested call ids as
@@ -955,6 +960,21 @@ keep their operations interruptible (the ledger's timeouts cannot cut uninterrup
955
960
  logs and metrics. Without the option behavior is unchanged. See
956
961
  [the tools README](https://github.com/magoz/yolk-sdk/blob/main/packages/agent/src/tools/README.md#durable-tool-ledger).
957
962
 
963
+ ## Staged tool plans
964
+
965
+ A code mode script can stage calls of approval-gated tools marked `staging`
966
+ (`makeTool({ approval, staging })`) instead of running them; a person reviews the saved plan once
967
+ through `makePlanReviewTool` (`review_plan({ planId, planDigest })`, response `{ selectedKeys }`),
968
+ and Yolk applies exactly the selected recorded calls, in staged order and at most once, through the
969
+ normal execute path and ledger. Enable it with
970
+ `resolveTools(modules, context, { interactionHost, plans: { store, planId? } })` and one review tool.
971
+ Applied calls bypass `beforeNestedCall` and `ToolExecutor` decorators: wire your per-call authorizer
972
+ as `makePlanReviewTool({ beforeCall })`. With a ledger, a redelivered review waits for an in-flight
973
+ apply and returns its real outcome. `previewStoredToolPlan` pages each staged call's arguments
974
+ with the tool's change preview (the same `changePreview` hook approvals use) for review screens;
975
+ `ToolPlanOutcome` and `ToolPlanPreviewPage` are Effect Schemas. See
976
+ [ADR 0005](https://github.com/magoz/yolk-sdk/blob/main/docs/adr/0005-staged-tool-plans.md).
977
+
958
978
  ## Tool failures
959
979
 
960
980
  Use `modelVisibleToolError(...)` for expected tool-domain failures the model can recover
@@ -1,5 +1,5 @@
1
- import * as Schema from "effect/Schema";
2
1
  import { ProviderErrorInfo } from "@yolk-sdk/agent/protocol";
2
+ import * as Schema from "effect/Schema";
3
3
 
4
4
  //#region src/classification/errors.d.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { ClassificationUsage } from "./schema.mjs";
2
- import * as Schema from "effect/Schema";
3
2
  import { ProviderErrorInfo } from "@yolk-sdk/agent/protocol";
3
+ import * as Schema from "effect/Schema";
4
4
  //#region src/classification/errors.ts
5
5
  /**
6
6
  * Why an answer does not fit its question:
@@ -1,7 +1,7 @@
1
1
  import { AgentTranscript } from "./state.mjs";
2
2
  import { Cause, Effect, Layer, Stream } from "effect";
3
- import * as Schema$1 from "effect/Schema";
4
3
  import { AgentEvent, AgentReasoningEffort, HitlResponse, InputResponse, InteractionResponse, QuestionResponse, ToolApprovalResponse } from "@yolk-sdk/agent/protocol";
4
+ import * as Schema$1 from "effect/Schema";
5
5
  import { HttpClient } from "effect/http";
6
6
 
7
7
  //#region src/client/transport.d.ts
@@ -1,6 +1,6 @@
1
1
  import { Cause, Channel, Data, Effect, Exit, Match, Predicate, Pull, Queue, Ref, Result, Scope, Stream } from "effect";
2
- import * as Schema$1 from "effect/Schema";
3
2
  import { AgentEvent, AgentWebSocketServerMessage, InputResponseInput, InteractionResponseInput, QuestionResponseInput, ToolApprovalResponseInput, UserInput, isTerminalAgentEvent } from "@yolk-sdk/agent/protocol";
3
+ import * as Schema$1 from "effect/Schema";
4
4
  import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/http";
5
5
  //#region src/client/transport.ts
6
6
  var AgentTransportError = class extends Schema$1.TaggedError()("AgentTransportError", {
@@ -12,58 +12,58 @@ type ContextOverflowRetryCompactionResult = Data.TaggedEnum<{
12
12
  };
13
13
  }>;
14
14
  declare const ContextOverflowRetryCompactionResult: {
15
- readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
16
- readonly _tag: "Skipped";
17
- readonly messages: ReadonlyArray<AgentMessage>;
18
- }, "_tag">;
19
15
  readonly Compacted: Data.TaggedEnum.ConstructorFrom<{
20
16
  readonly _tag: "Compacted";
21
17
  readonly messages: ReadonlyArray<AgentMessage>;
22
18
  }, "_tag">;
23
- readonly $is: <Tag extends "Skipped" | "Compacted">(tag: Tag) => (u: unknown) => u is Extract<{
19
+ readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
24
20
  readonly _tag: "Skipped";
25
21
  readonly messages: ReadonlyArray<AgentMessage>;
22
+ }, "_tag">;
23
+ readonly $is: <Tag extends "Compacted" | "Skipped">(tag: Tag) => (u: unknown) => u is Extract<{
24
+ readonly _tag: "Compacted";
25
+ readonly messages: ReadonlyArray<AgentMessage>;
26
26
  }, {
27
27
  readonly _tag: Tag;
28
28
  }> | Extract<{
29
- readonly _tag: "Compacted";
29
+ readonly _tag: "Skipped";
30
30
  readonly messages: ReadonlyArray<AgentMessage>;
31
31
  }, {
32
32
  readonly _tag: Tag;
33
33
  }>;
34
34
  readonly $match: {
35
35
  <Cases extends {
36
- readonly Skipped: (args: {
37
- readonly _tag: "Skipped";
38
- readonly messages: ReadonlyArray<AgentMessage>;
39
- }) => any;
40
36
  readonly Compacted: (args: {
41
37
  readonly _tag: "Compacted";
42
38
  readonly messages: ReadonlyArray<AgentMessage>;
43
39
  }) => any;
40
+ readonly Skipped: (args: {
41
+ readonly _tag: "Skipped";
42
+ readonly messages: ReadonlyArray<AgentMessage>;
43
+ }) => any;
44
44
  }>(cases: Cases): (value: {
45
- readonly _tag: "Skipped";
45
+ readonly _tag: "Compacted";
46
46
  readonly messages: ReadonlyArray<AgentMessage>;
47
47
  } | {
48
- readonly _tag: "Compacted";
48
+ readonly _tag: "Skipped";
49
49
  readonly messages: ReadonlyArray<AgentMessage>;
50
- }) => import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
50
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
51
51
  <Cases extends {
52
- readonly Skipped: (args: {
53
- readonly _tag: "Skipped";
54
- readonly messages: ReadonlyArray<AgentMessage>;
55
- }) => any;
56
52
  readonly Compacted: (args: {
57
53
  readonly _tag: "Compacted";
58
54
  readonly messages: ReadonlyArray<AgentMessage>;
59
55
  }) => any;
56
+ readonly Skipped: (args: {
57
+ readonly _tag: "Skipped";
58
+ readonly messages: ReadonlyArray<AgentMessage>;
59
+ }) => any;
60
60
  }>(value: {
61
- readonly _tag: "Skipped";
61
+ readonly _tag: "Compacted";
62
62
  readonly messages: ReadonlyArray<AgentMessage>;
63
63
  } | {
64
- readonly _tag: "Compacted";
64
+ readonly _tag: "Skipped";
65
65
  readonly messages: ReadonlyArray<AgentMessage>;
66
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
66
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
67
67
  };
68
68
  };
69
69
  type OverflowCompactionDecision = {
@@ -73,14 +73,14 @@ type OverflowCompactionDecision = {
73
73
  readonly _tag: 'Skipped';
74
74
  };
75
75
  declare const OverflowCompactionDecision: {
76
- readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
77
- readonly _tag: "Skipped";
78
- }, "_tag">;
79
76
  readonly Compacted: Data.TaggedEnum.ConstructorFrom<{
80
77
  readonly _tag: "Compacted";
81
78
  readonly messages: ReadonlyArray<AgentMessage>;
82
79
  }, "_tag">;
83
- readonly $is: <Tag extends "Skipped" | "Compacted">(tag: Tag) => (u: unknown) => u is Extract<{
80
+ readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
81
+ readonly _tag: "Skipped";
82
+ }, "_tag">;
83
+ readonly $is: <Tag extends "Compacted" | "Skipped">(tag: Tag) => (u: unknown) => u is Extract<{
84
84
  readonly _tag: "Compacted";
85
85
  readonly messages: ReadonlyArray<AgentMessage>;
86
86
  }, {
@@ -92,23 +92,23 @@ declare const OverflowCompactionDecision: {
92
92
  }>;
93
93
  readonly $match: {
94
94
  <Cases extends {
95
- readonly Skipped: (args: {
96
- readonly _tag: "Skipped";
97
- }) => any;
98
95
  readonly Compacted: (args: {
99
96
  readonly _tag: "Compacted";
100
97
  readonly messages: ReadonlyArray<AgentMessage>;
101
98
  }) => any;
102
- }>(cases: Cases): (value: OverflowCompactionDecision) => import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
103
- <Cases extends {
104
99
  readonly Skipped: (args: {
105
100
  readonly _tag: "Skipped";
106
101
  }) => any;
102
+ }>(cases: Cases): (value: OverflowCompactionDecision) => import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
103
+ <Cases extends {
107
104
  readonly Compacted: (args: {
108
105
  readonly _tag: "Compacted";
109
106
  readonly messages: ReadonlyArray<AgentMessage>;
110
107
  }) => any;
111
- }>(value: OverflowCompactionDecision, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
108
+ readonly Skipped: (args: {
109
+ readonly _tag: "Skipped";
110
+ }) => any;
111
+ }>(value: OverflowCompactionDecision, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
112
112
  };
113
113
  };
114
114
  type ContextOverflowRetryCompactor = (messages: ReadonlyArray<AgentMessage>) => Effect.Effect<ContextOverflowRetryCompactionResult, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.mts","names":[],"sources":["../../src/compaction/retry.ts"],"mappings":";;;;;KASY,oCAAA,GAAuC,IAAA,CAAK,UAAA;EACtD,SAAA;IAAA,SACW,QAAA,EAAU,aAAA,CAAc,YAAA;EAAA;EAEnC,OAAA;IAAA,SACW,QAAA,EAAU,aAAA,CAAc,YAAA;EAAA;AAAA;AAAA,cAIxB,oCAAA;EAAA;;uBAJU,aAAA,CAAc,YAAA;EAAA;EAAA;;uBAHd,aAAA,CAAc,YAAA;EAAA;EAAA;;uBAGd,aAAA,CAAc,YAAA;EAAA;IAAA;;;uBAHd,aAAA,CAAc,YAAA;EAAA;IAAA;;;;;;2BAGd,aAAA,CAAc,YAAA;MAAA;MAAA;;2BAHd,aAAA,CAAc,YAAA;MAAA;IAA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Q3B,6BAAA,IACV,QAAA,EAAU,aAAA,CAAc,YAAA,MACrB,MAAA,CAAO,MAAA,CAAO,oCAAA;AAAA,KAEP,iCAAA;EAAA,SACD,QAAA;IAAA,SACE,MAAA,GAAS,OAAA,EAAS,UAAA,KAAe,MAAA,CAAO,MAAA,CAAO,QAAA,EAAU,gBAAA;EAAA;EAAA,SAE3D,WAAA,GAAc,GAAA,CAAI,GAAA,CAAI,aAAA,CAAc,YAAA;EAAA,SACpC,OAAA,EAAS,6BAAA;AAAA;AAAA,KAGf,uBAAA,GAA0B,oCAAA,GAAuC,0BAA0B;;cAGnF,6BAAA;AAAA,cAEA,gCAAA,GAAoC,OAAe;AAAA,cAGnD,gCAAA,GAAoC,OAAe;AAAA,cAGnD,wBAAA,GAA4B,KAAA;EAAA,SAC9B,OAAA;EAAA,SACA,aAAA;AAAA;AAAA,cAkBE,uBAAA,SAAiC,KAAA;EAAA,SACnC,OAAA,GACP,QAAA,EAAU,aAAA,CAAc,YAAA,MACrB,MAAA,CAAO,MAAA,CAAO,uBAAA,EAAyB,CAAA,EAAG,CAAA;EAAA,SACtC,QAAA,EAAU,aAAA,CAAc,YAAA;EAAA,SACxB,OAAA;EAAA,SACA,aAAA;AAAA,MACP,MAAA,CAAO,MAAA,CAAO,0BAAA,EAA4B,CAAA,EAAG,CAAA;AAAA,cAuEpC,gCAAA,GAAoC,KAAA,EAAO,iCAAA,KAAiC,MAAA,CAAA,MAAA;EAAA"}
@@ -57,13 +57,6 @@ type CompletedCompactionResult = Extract<CompactionResult, {
57
57
  readonly _tag: 'Compacted';
58
58
  }>;
59
59
  declare const CompactionResult: {
60
- readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
61
- readonly _tag: "Skipped";
62
- readonly reason: CompactionSkipReason;
63
- readonly messages: ReadonlyArray<AgentMessage>;
64
- readonly events: ReadonlyArray<AgentEvent>;
65
- readonly beforeTokens: number;
66
- }, "_tag">;
67
60
  readonly Compacted: Data.TaggedEnum.ConstructorFrom<{
68
61
  readonly _tag: "Compacted";
69
62
  readonly strategy: string;
@@ -75,15 +68,14 @@ declare const CompactionResult: {
75
68
  readonly recentMessages: ReadonlyArray<AgentMessage>;
76
69
  readonly summaryMessage: AgentMessage;
77
70
  }, "_tag">;
78
- readonly $is: <Tag extends "Skipped" | "Compacted">(tag: Tag) => (u: unknown) => u is Extract<{
71
+ readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
79
72
  readonly _tag: "Skipped";
80
73
  readonly reason: CompactionSkipReason;
81
74
  readonly messages: ReadonlyArray<AgentMessage>;
82
75
  readonly events: ReadonlyArray<AgentEvent>;
83
76
  readonly beforeTokens: number;
84
- }, {
85
- readonly _tag: Tag;
86
- }> | Extract<{
77
+ }, "_tag">;
78
+ readonly $is: <Tag extends "Compacted" | "Skipped">(tag: Tag) => (u: unknown) => u is Extract<{
87
79
  readonly _tag: "Compacted";
88
80
  readonly strategy: string;
89
81
  readonly messages: ReadonlyArray<AgentMessage>;
@@ -95,16 +87,17 @@ declare const CompactionResult: {
95
87
  readonly summaryMessage: AgentMessage;
96
88
  }, {
97
89
  readonly _tag: Tag;
90
+ }> | Extract<{
91
+ readonly _tag: "Skipped";
92
+ readonly reason: CompactionSkipReason;
93
+ readonly messages: ReadonlyArray<AgentMessage>;
94
+ readonly events: ReadonlyArray<AgentEvent>;
95
+ readonly beforeTokens: number;
96
+ }, {
97
+ readonly _tag: Tag;
98
98
  }>;
99
99
  readonly $match: {
100
100
  <Cases extends {
101
- readonly Skipped: (args: {
102
- readonly _tag: "Skipped";
103
- readonly reason: CompactionSkipReason;
104
- readonly messages: ReadonlyArray<AgentMessage>;
105
- readonly events: ReadonlyArray<AgentEvent>;
106
- readonly beforeTokens: number;
107
- }) => any;
108
101
  readonly Compacted: (args: {
109
102
  readonly _tag: "Compacted";
110
103
  readonly strategy: string;
@@ -116,13 +109,14 @@ declare const CompactionResult: {
116
109
  readonly recentMessages: ReadonlyArray<AgentMessage>;
117
110
  readonly summaryMessage: AgentMessage;
118
111
  }) => any;
112
+ readonly Skipped: (args: {
113
+ readonly _tag: "Skipped";
114
+ readonly reason: CompactionSkipReason;
115
+ readonly messages: ReadonlyArray<AgentMessage>;
116
+ readonly events: ReadonlyArray<AgentEvent>;
117
+ readonly beforeTokens: number;
118
+ }) => any;
119
119
  }>(cases: Cases): (value: {
120
- readonly _tag: "Skipped";
121
- readonly reason: CompactionSkipReason;
122
- readonly messages: ReadonlyArray<AgentMessage>;
123
- readonly events: ReadonlyArray<AgentEvent>;
124
- readonly beforeTokens: number;
125
- } | {
126
120
  readonly _tag: "Compacted";
127
121
  readonly strategy: string;
128
122
  readonly messages: ReadonlyArray<AgentMessage>;
@@ -132,15 +126,14 @@ declare const CompactionResult: {
132
126
  readonly compactedMessages: ReadonlyArray<AgentMessage>;
133
127
  readonly recentMessages: ReadonlyArray<AgentMessage>;
134
128
  readonly summaryMessage: AgentMessage;
135
- }) => import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
129
+ } | {
130
+ readonly _tag: "Skipped";
131
+ readonly reason: CompactionSkipReason;
132
+ readonly messages: ReadonlyArray<AgentMessage>;
133
+ readonly events: ReadonlyArray<AgentEvent>;
134
+ readonly beforeTokens: number;
135
+ }) => import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
136
136
  <Cases extends {
137
- readonly Skipped: (args: {
138
- readonly _tag: "Skipped";
139
- readonly reason: CompactionSkipReason;
140
- readonly messages: ReadonlyArray<AgentMessage>;
141
- readonly events: ReadonlyArray<AgentEvent>;
142
- readonly beforeTokens: number;
143
- }) => any;
144
137
  readonly Compacted: (args: {
145
138
  readonly _tag: "Compacted";
146
139
  readonly strategy: string;
@@ -152,13 +145,14 @@ declare const CompactionResult: {
152
145
  readonly recentMessages: ReadonlyArray<AgentMessage>;
153
146
  readonly summaryMessage: AgentMessage;
154
147
  }) => any;
148
+ readonly Skipped: (args: {
149
+ readonly _tag: "Skipped";
150
+ readonly reason: CompactionSkipReason;
151
+ readonly messages: ReadonlyArray<AgentMessage>;
152
+ readonly events: ReadonlyArray<AgentEvent>;
153
+ readonly beforeTokens: number;
154
+ }) => any;
155
155
  }>(value: {
156
- readonly _tag: "Skipped";
157
- readonly reason: CompactionSkipReason;
158
- readonly messages: ReadonlyArray<AgentMessage>;
159
- readonly events: ReadonlyArray<AgentEvent>;
160
- readonly beforeTokens: number;
161
- } | {
162
156
  readonly _tag: "Compacted";
163
157
  readonly strategy: string;
164
158
  readonly messages: ReadonlyArray<AgentMessage>;
@@ -168,7 +162,13 @@ declare const CompactionResult: {
168
162
  readonly compactedMessages: ReadonlyArray<AgentMessage>;
169
163
  readonly recentMessages: ReadonlyArray<AgentMessage>;
170
164
  readonly summaryMessage: AgentMessage;
171
- }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
165
+ } | {
166
+ readonly _tag: "Skipped";
167
+ readonly reason: CompactionSkipReason;
168
+ readonly messages: ReadonlyArray<AgentMessage>;
169
+ readonly events: ReadonlyArray<AgentEvent>;
170
+ readonly beforeTokens: number;
171
+ }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
172
172
  };
173
173
  };
174
174
  type ApplyCompactionPlanOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.mts","names":[],"sources":["../../src/compaction/window.ts"],"mappings":";;;;;cASa,iCAAA;AAAA,cAEA,gCAAA;AAAA,KAED,oBAAA;AAAA,KAMA,2BAAA;EAAA,SACD,eAAA;EAAA,SACA,gBAAA;EAAA,SACA,WAAA;EAAA,SACA,cAAA,GAAiB,wBAAwB;AAAA;AAAA,KAGxC,oBAAA,GAAuB,IAAA,CAAK,UAAA;EACtC,IAAA;IAAA,SACW,MAAA,EAAQ,oBAAA;IAAA,SACR,QAAA,EAAU,aAAA,CAAc,YAAA;IAAA,SACxB,YAAA;EAAA;EAEX,OAAA;IAAA,SACW,QAAA,EAAU,aAAA,CAAc,YAAA;IAAA,SACxB,iB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R,oBAAA;MAAA,mBACE,aAAA,CAAc,YAAA;MAAA,iBAChB,aAAA,CAAc,UAAA;MAAA;;;;;;2BAKZ,aAAA,CAAc,YAAA;QAAA,iBAChB,aAAA,CAAc,UAAA;QAAA;;oCAGH,aAAA,CAAc,YAAA;QAAA,yBACjB,aAAA,CAAc,YAAA;QAAA,yBACd,YAAA;MAAA;MAAA;;yBAbR,oBAAA;QAAA,mBACE,aAAA,CAAc,YAAA;QAAA,iBAChB,aAAA,CAAc,UAAA;QAAA;;;;;yBAKZ,aAAA,CAAc,YAAA;MAAA,iBAChB,aAAA,CAAc,UAAA;MAAA;;kCAGH,aAAA,CAAc,YAAA;MAAA,yBACjB,aAAA,CAAc,YAAA;MAAA,yBACd,YAAA;IAAA;MAAA;uBAbR,oBAAA;MAAA,mBACE,aAAA,CAAc,YAAA;MAAA,iBAChB,aAAA,CAAc,UAAA;MAAA;;;;KAqBvB,0BAAA;EAAA,SACD,QAAA;EAAA,SACA,cAAA,EAAgB,YAAA;EAAA,SAChB,cAAA,GAAiB,wBAAwB;AAAA;AAAA,cAkBvC,oBAAA,GACX,QAAA,EAAU,aAAa,CAAC,YAAA,GACxB,gBAAA;AAAA,cAaW,oBAAA,GACX,QAAA,EAAU,aAAA,CAAc,YAAA,GACxB,OAAA,EAAS,2BAAA,KACR,oBAAA;AAAA,cA8CU,mBAAA,GACX,IAAA,EAAM,oBAAA,EACN,OAAA,EAAS,0BAAA,KACR,gBAAA"}
@@ -1,5 +1,5 @@
1
- import * as Schema from "effect/Schema";
2
1
  import { AgentError, ProviderErrorInfo } from "@yolk-sdk/agent/protocol";
2
+ import * as Schema from "effect/Schema";
3
3
 
4
4
  //#region src/loop/error.d.ts
5
5
  declare const LLMResponseIssue: Schema.Literal<"missing_done">;
@@ -1,6 +1,6 @@
1
1
  import { Match } from "effect";
2
- import * as Schema$1 from "effect/Schema";
3
2
  import { AgentError, ProviderErrorInfo } from "@yolk-sdk/agent/protocol";
3
+ import * as Schema$1 from "effect/Schema";
4
4
  //#region src/loop/error.ts
5
5
  const LLMResponseIssue = Schema$1.Literal("missing_done");
6
6
  var LLMError = class extends Schema$1.TaggedError()("LLMError", {
@@ -1,5 +1,5 @@
1
- import * as Schema from "effect/Schema";
2
1
  import { AgentUsage, ToolCall, ToolResult } from "@yolk-sdk/agent/protocol";
2
+ import * as Schema from "effect/Schema";
3
3
 
4
4
  //#region src/loop/llm-event.d.ts
5
5
  declare const LLMTextDelta_base: Schema.Class<LLMTextDelta, Schema.TaggedStruct<"TextDelta", {
@@ -1,5 +1,5 @@
1
- import * as Schema from "effect/Schema";
2
1
  import { AgentUsage, ToolCall, ToolResult } from "@yolk-sdk/agent/protocol";
2
+ import * as Schema from "effect/Schema";
3
3
  //#region src/loop/llm-event.ts
4
4
  var LLMTextDelta = class extends Schema.TaggedClass()("TextDelta", { text: Schema.String }) {};
5
5
  var LLMReasoningDelta = class extends Schema.TaggedClass()("ReasoningDelta", { text: Schema.String }) {};
@@ -4,7 +4,7 @@ import { LLMProvider } from "./services/llm-provider.mjs";
4
4
  import { LoopConfig } from "./services/loop-config.mjs";
5
5
  import { ToolExecutor } from "./services/tool-executor.mjs";
6
6
  import { Effect, Stream } from "effect";
7
- import { AgentEvent, AgentMessage, AgentModelCapabilities, AgentReasoningEffort, AgentUsage, HitlRequest, HitlResponse, InputToolHandler, InteractionHost, InteractionPreflight, InteractionReceipt, InteractionRef, ToolCall, ToolDef } from "@yolk-sdk/agent/protocol";
7
+ import { AgentEvent, AgentMessage, AgentModelCapabilities, AgentReasoningEffort, AgentUsage, HitlRequest, HitlResponse, InputToolHandler, InteractionHost, InteractionPreflight, InteractionReceipt, InteractionRef, ToolApprovalPreviewer, ToolCall, ToolDef } from "@yolk-sdk/agent/protocol";
8
8
 
9
9
  //#region src/loop/run.d.ts
10
10
  type AgentLoopRunId = string;
@@ -19,6 +19,10 @@ type RunConfig = {
19
19
  */
20
20
  readonly interactions?: Readonly<Record<string, InteractionPreflight>>;
21
21
  readonly interactionHost?: InteractionHost;
22
+ /** Change previewers of approval-gated tools by tool name (from
23
+ * ResolvedToolSet.approvalPreviews): pending approval requests carry their preview.
24
+ */
25
+ readonly approvalPreviews?: Readonly<Record<string, ToolApprovalPreviewer>>;
22
26
  readonly model: string;
23
27
  readonly reasoningEffort?: AgentReasoningEffort;
24
28
  readonly capabilities?: AgentModelCapabilities;
@@ -33,6 +37,10 @@ type ToolBatchConfig = {
33
37
  readonly inputs?: Readonly<Record<string, InputToolHandler>>; /** Server-side interaction preflight by tool name (from ResolvedToolSet.interactions). */
34
38
  readonly interactions?: Readonly<Record<string, InteractionPreflight>>;
35
39
  readonly interactionHost?: InteractionHost;
40
+ /** Change previewers of approval-gated tools by tool name (from
41
+ * ResolvedToolSet.approvalPreviews).
42
+ */
43
+ readonly approvalPreviews?: Readonly<Record<string, ToolApprovalPreviewer>>;
36
44
  readonly model?: string;
37
45
  readonly createdMessages?: ReadonlyArray<AgentMessage>;
38
46
  readonly turn?: number;
@@ -63,7 +71,10 @@ type PreparedToolBatch = {
63
71
  * this at each preflight boundary and pass the result as interactionReceipts. Reads
64
72
  * do not accept/claim/settle. A storage error fails the batch closed. */
65
73
  declare const loadInteractionReceipts: (calls: ReadonlyArray<ToolCall>, host: InteractionHost | undefined) => Effect.Effect<ReadonlyMap<string, InteractionReceipt>, ToolError>;
66
- /** Preflight the entire batch before dispatching ANY call. Pending requests fence all execution. */
74
+ /** Preflight the entire batch before dispatching ANY call. Pending requests fence all execution.
75
+ * Fails (`ToolError` `unavailable`) only when host storage an interaction call validator reads is
76
+ * unavailable: the batch fails closed, like `loadInteractionReceipts`, and nothing runs.
77
+ */
67
78
  declare const prepareToolBatch: (input: {
68
79
  readonly tools: ReadonlyArray<ToolDef>;
69
80
  readonly responses: ReadonlyArray<HitlResponse>;
@@ -71,7 +82,12 @@ declare const prepareToolBatch: (input: {
71
82
  readonly inputs?: Readonly<Record<string, InputToolHandler>>;
72
83
  readonly interactions?: Readonly<Record<string, InteractionPreflight>>;
73
84
  readonly interactionReceipts?: ReadonlyMap<string, InteractionReceipt>;
74
- }) => Effect.Effect<PreparedToolBatch>;
85
+ /** Change previewers by tool name (from ResolvedToolSet.approvalPreviews). Pending approval
86
+ * requests of these tools carry `preview` (or `previewError`); computed only while the request
87
+ * is pending, at most 8 at a time.
88
+ */
89
+ readonly approvalPreviews?: Readonly<Record<string, ToolApprovalPreviewer>>;
90
+ }) => Effect.Effect<PreparedToolBatch, ToolError>;
75
91
  declare const runModelTurn: (config: ModelTurnConfig) => Stream.Stream<AgentEvent, AgentLoopError, ContextTransformer | LLMProvider | LoopConfig>;
76
92
  declare const runToolBatch: (config: ToolBatchConfig) => Stream.Stream<AgentEvent, AgentLoopError, LoopConfig | ToolExecutor>;
77
93
  declare const run: (config: RunConfig) => Stream.Stream<AgentEvent, AgentLoopError, ContextTransformer | LLMProvider | LoopConfig | ToolExecutor>;
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.mts","names":[],"sources":["../../src/loop/run.ts"],"mappings":";;;;;;;;;KAuFY,cAAA;AAAA,KAEA,SAAA;EAAA,SACD,QAAA,EAAU,aAAA,CAAc,YAAA;EAAA,SACxB,YAAA;EAAA,SACA,KAAA,EAAO,aAAA,CAAc,OAAA;EAAA,SACrB,aAAA,GAAgB,aAAA,CAAc,YAAA,GANf;EAAA,SAQf,MAAA,GAAS,QAAA,CAAS,MAAA,SAAe,gBAAA;EANvB;;;EAAA,SAUV,YAAA,GAAe,QAAA,CAAS,MAAA,SAAe,oBAAA;EAAA,SACvC,eAAA,GAAkB,eAAA;EAAA,SAClB,KAAA;EAAA,SACA,eAAA,GAAkB,oBAAA;EAAA,SAClB,YAAA,GAAe,sBAAA;AAAA;AAAA,KAGd,eAAA,GAAkB,SAAS;EAAA,SAC5B,IAAI;AAAA;AAAA,KAGH,eAAA;EAAA,SACD,KAAA,EAAO,aAAA,CAAc,QAAA;EAAA,SACrB,KAAA,GAAQ,aAAA,CAAc,OAAA;EAAA,SACtB,aAAA,GAAgB,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