@yolk-sdk/agent 0.1.0-canary.101 → 0.1.0-canary.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -43
- package/dist/client/state.d.mts +57 -57
- package/dist/client/state.d.mts.map +1 -1
- package/dist/compaction/retry.d.mts +30 -30
- package/dist/compaction/retry.d.mts.map +1 -1
- package/dist/compaction/window.d.mts +39 -39
- package/dist/compaction/window.d.mts.map +1 -1
- package/dist/loop/run.d.mts +5 -2
- package/dist/loop/run.d.mts.map +1 -1
- package/dist/loop/run.mjs +10 -2
- package/dist/loop/run.mjs.map +1 -1
- package/dist/protocol/index.d.mts +2 -2
- package/dist/protocol/index.d.mts.map +1 -1
- package/dist/protocol/index.mjs +2 -2
- package/dist/protocol/tool.d.mts +26 -6
- package/dist/protocol/tool.d.mts.map +1 -1
- package/dist/protocol/tool.mjs +23 -11
- package/dist/protocol/tool.mjs.map +1 -1
- package/dist/providers/openai/conformance/codex-usage-cases.mjs +1 -1
- package/dist/react/chat-actions.d.mts +26 -26
- package/dist/react/chat-actions.d.mts.map +1 -1
- package/dist/react/chat-items.d.mts +45 -45
- package/dist/react/chat-items.d.mts.map +1 -1
- package/dist/react/chat-messages.d.mts +72 -72
- package/dist/react/chat-messages.d.mts.map +1 -1
- package/dist/skillset/merge.d.mts +2 -2
- package/dist/tools/index.d.mts +4 -2
- package/dist/tools/index.mjs +3 -1
- package/dist/tools/interaction.mjs +3 -3
- package/dist/tools/interaction.mjs.map +1 -1
- package/dist/tools/ledger.d.mts +7 -2
- package/dist/tools/ledger.d.mts.map +1 -1
- package/dist/tools/ledger.mjs +8 -3
- package/dist/tools/ledger.mjs.map +1 -1
- package/dist/tools/plan-review.d.mts +75 -0
- package/dist/tools/plan-review.d.mts.map +1 -0
- package/dist/tools/plan-review.mjs +150 -0
- package/dist/tools/plan-review.mjs.map +1 -0
- package/dist/tools/plan-runtime.d.mts +59 -0
- package/dist/tools/plan-runtime.d.mts.map +1 -0
- package/dist/tools/plan-runtime.mjs +629 -0
- package/dist/tools/plan-runtime.mjs.map +1 -0
- package/dist/tools/plan.d.mts +406 -0
- package/dist/tools/plan.d.mts.map +1 -0
- package/dist/tools/plan.mjs +228 -0
- package/dist/tools/plan.mjs.map +1 -0
- package/dist/tools/registry.d.mts +64 -9
- package/dist/tools/registry.d.mts.map +1 -1
- package/dist/tools/registry.mjs +218 -65
- package/dist/tools/registry.mjs.map +1 -1
- package/package.json +2 -2
- package/src/loop/run.ts +26 -6
- package/src/protocol/index.ts +2 -0
- package/src/protocol/tool.ts +60 -24
- package/src/tools/README.md +20 -1
- package/src/tools/index.ts +57 -0
- package/src/tools/ledger.ts +13 -2
- package/src/tools/plan-review.ts +272 -0
- package/src/tools/plan-runtime.ts +1212 -0
- package/src/tools/plan.ts +537 -0
- package/src/tools/registry.ts +494 -67
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 |
|
|
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
|
|
|
@@ -866,6 +866,10 @@ not this marker. These child observations are separate from generic background t
|
|
|
866
866
|
`prepareToolBatch` from `@yolk-sdk/agent/loop` exposes the same HITL preflight used by the loop.
|
|
867
867
|
Durable orchestration must check `pendingRequests` before dispatching **any** tool, even calls
|
|
868
868
|
listed in `callsToExecute`. Preserve synthetic results and original call ordering when committing.
|
|
869
|
+
It fails with `ToolError` `unavailable` only when host storage read by an interaction call
|
|
870
|
+
validator (for example a plan review's plan store) is unavailable; nothing runs, so fail the step
|
|
871
|
+
and retry it. Admission (`validateInteractionSubmission`) answers `InteractionAdmissionError`
|
|
872
|
+
`unavailable` for the same outage.
|
|
869
873
|
|
|
870
874
|
Keep host-owned subagent execution wiring outside this package; pass only the package subagent contract across the boundary.
|
|
871
875
|
|
|
@@ -922,8 +926,8 @@ This package declares them; it does not run scripts.
|
|
|
922
926
|
- `callableBy: 'all' | 'model' | 'codemode'` (default `all`) decides who may call a tool. For
|
|
923
927
|
`codemode` only, `discovery: 'listed' | 'search'` (default `listed`) decides how scripts find it.
|
|
924
928
|
Codemode-only tools never reach providers. Approval, input, interaction, activated background,
|
|
925
|
-
`question`, `subagent`, and nested-access tools never run from code mode
|
|
926
|
-
`callableBy: 'codemode'` on them.
|
|
929
|
+
`question`, `subagent`, and nested-access tools never run from code mode (stageable approval tools
|
|
930
|
+
are only staged; see Staged tool plans); `resolveTools` rejects `callableBy: 'codemode'` on them.
|
|
927
931
|
- `nestedToolAccess: true` gives a registration's `execute` a `nested` executor over the other
|
|
928
932
|
code-mode-callable tools of the same resolution and host context. Nested calls run through the
|
|
929
933
|
resolved execute path and fail closed with model-visible error results. Assign nested call ids as
|
|
@@ -955,6 +959,20 @@ keep their operations interruptible (the ledger's timeouts cannot cut uninterrup
|
|
|
955
959
|
logs and metrics. Without the option behavior is unchanged. See
|
|
956
960
|
[the tools README](https://github.com/magoz/yolk-sdk/blob/main/packages/agent/src/tools/README.md#durable-tool-ledger).
|
|
957
961
|
|
|
962
|
+
## Staged tool plans
|
|
963
|
+
|
|
964
|
+
A code mode script can stage calls of approval-gated tools marked `staging`
|
|
965
|
+
(`makeTool({ approval, staging })`) instead of running them; a person reviews the saved plan once
|
|
966
|
+
through `makePlanReviewTool` (`review_plan({ planId, planDigest })`, response `{ selectedKeys }`),
|
|
967
|
+
and Yolk applies exactly the selected recorded calls, in staged order and at most once, through the
|
|
968
|
+
normal execute path and ledger. Enable it with
|
|
969
|
+
`resolveTools(modules, context, { interactionHost, plans: { store, planId? } })` and one review tool.
|
|
970
|
+
Applied calls bypass `beforeNestedCall` and `ToolExecutor` decorators: wire your per-call authorizer
|
|
971
|
+
as `makePlanReviewTool({ beforeCall })`. With a ledger, a redelivered review waits for an in-flight
|
|
972
|
+
apply and returns its real outcome. `previewStoredToolPlan` pages previews for review screens;
|
|
973
|
+
`ToolPlanOutcome` and `ToolPlanPreviewPage` are Effect Schemas. See
|
|
974
|
+
[ADR 0005](https://github.com/magoz/yolk-sdk/blob/main/docs/adr/0005-staged-tool-plans.md).
|
|
975
|
+
|
|
958
976
|
## Tool failures
|
|
959
977
|
|
|
960
978
|
Use `modelVisibleToolError(...)` for expected tool-domain failures the model can recover
|
package/dist/client/state.d.mts
CHANGED
|
@@ -80,6 +80,11 @@ type AgentToolRun = {
|
|
|
80
80
|
readonly result: ToolResult;
|
|
81
81
|
};
|
|
82
82
|
declare const AgentToolRun: {
|
|
83
|
+
readonly Denied: Data.TaggedEnum.ConstructorFrom<{
|
|
84
|
+
readonly _tag: "Denied";
|
|
85
|
+
readonly toolCallId: string;
|
|
86
|
+
readonly reason: string;
|
|
87
|
+
}, "_tag">;
|
|
83
88
|
readonly QuestionRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
84
89
|
readonly _tag: "QuestionRequested";
|
|
85
90
|
readonly request: QuestionRequest;
|
|
@@ -128,25 +133,30 @@ declare const AgentToolRun: {
|
|
|
128
133
|
readonly name?: string;
|
|
129
134
|
readonly input: string;
|
|
130
135
|
}, "_tag">;
|
|
136
|
+
readonly InputReady: Data.TaggedEnum.ConstructorFrom<{
|
|
137
|
+
readonly _tag: "InputReady";
|
|
138
|
+
readonly call: ToolCall;
|
|
139
|
+
}, "_tag">;
|
|
131
140
|
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
132
141
|
readonly _tag: "ApprovalRequested";
|
|
133
142
|
readonly call: ToolCall;
|
|
134
143
|
readonly request?: ToolApprovalRequest;
|
|
135
144
|
}, "_tag">;
|
|
136
|
-
readonly
|
|
137
|
-
readonly _tag: "
|
|
138
|
-
readonly
|
|
139
|
-
readonly
|
|
145
|
+
readonly Executing: Data.TaggedEnum.ConstructorFrom<{
|
|
146
|
+
readonly _tag: "Executing";
|
|
147
|
+
readonly call: ToolCall;
|
|
148
|
+
readonly startedAtMs: number; /** Preserve witnessed interaction acceptance across transport interruptions. */
|
|
149
|
+
readonly interaction?: true;
|
|
140
150
|
}, "_tag">;
|
|
141
|
-
readonly
|
|
142
|
-
readonly _tag: "
|
|
151
|
+
readonly Completed: Data.TaggedEnum.ConstructorFrom<{
|
|
152
|
+
readonly _tag: "Completed";
|
|
143
153
|
readonly call: ToolCall;
|
|
144
154
|
readonly result: ToolResult;
|
|
145
155
|
readonly startedAtMs: number;
|
|
146
156
|
readonly endedAtMs: number;
|
|
147
157
|
}, "_tag">;
|
|
148
|
-
readonly
|
|
149
|
-
readonly _tag: "
|
|
158
|
+
readonly Accepted: Data.TaggedEnum.ConstructorFrom<{
|
|
159
|
+
readonly _tag: "Accepted";
|
|
150
160
|
readonly call: ToolCall;
|
|
151
161
|
readonly result: ToolResult;
|
|
152
162
|
readonly startedAtMs: number;
|
|
@@ -163,17 +173,7 @@ declare const AgentToolRun: {
|
|
|
163
173
|
readonly call: ToolCall;
|
|
164
174
|
readonly result: ToolResult;
|
|
165
175
|
}, "_tag">;
|
|
166
|
-
readonly InputReady:
|
|
167
|
-
readonly _tag: "InputReady";
|
|
168
|
-
readonly call: ToolCall;
|
|
169
|
-
}, "_tag">;
|
|
170
|
-
readonly Executing: Data.TaggedEnum.ConstructorFrom<{
|
|
171
|
-
readonly _tag: "Executing";
|
|
172
|
-
readonly call: ToolCall;
|
|
173
|
-
readonly startedAtMs: number; /** Preserve witnessed interaction acceptance across transport interruptions. */
|
|
174
|
-
readonly interaction?: true;
|
|
175
|
-
}, "_tag">;
|
|
176
|
-
readonly $is: <Tag extends "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "InputStreaming" | "ApprovalRequested" | "Denied" | "Accepted" | "Completed" | "Errored" | "ProviderCompleted" | "InputReady" | "Executing">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
176
|
+
readonly $is: <Tag extends "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "InputStreaming" | "InputReady" | "ApprovalRequested" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
177
177
|
readonly _tag: "InputStreaming";
|
|
178
178
|
readonly id: string;
|
|
179
179
|
readonly name?: string;
|
|
@@ -287,6 +287,11 @@ declare const AgentToolRun: {
|
|
|
287
287
|
}>;
|
|
288
288
|
readonly $match: {
|
|
289
289
|
<Cases extends {
|
|
290
|
+
readonly Denied: (args: {
|
|
291
|
+
readonly _tag: "Denied";
|
|
292
|
+
readonly toolCallId: string;
|
|
293
|
+
readonly reason: string;
|
|
294
|
+
}) => any;
|
|
290
295
|
readonly QuestionRequested: (args: {
|
|
291
296
|
readonly _tag: "QuestionRequested";
|
|
292
297
|
readonly request: QuestionRequest;
|
|
@@ -335,25 +340,30 @@ declare const AgentToolRun: {
|
|
|
335
340
|
readonly name?: string;
|
|
336
341
|
readonly input: string;
|
|
337
342
|
}) => any;
|
|
343
|
+
readonly InputReady: (args: {
|
|
344
|
+
readonly _tag: "InputReady";
|
|
345
|
+
readonly call: ToolCall;
|
|
346
|
+
}) => any;
|
|
338
347
|
readonly ApprovalRequested: (args: {
|
|
339
348
|
readonly _tag: "ApprovalRequested";
|
|
340
349
|
readonly call: ToolCall;
|
|
341
350
|
readonly request?: ToolApprovalRequest;
|
|
342
351
|
}) => any;
|
|
343
|
-
readonly
|
|
344
|
-
readonly _tag: "
|
|
345
|
-
readonly
|
|
346
|
-
readonly
|
|
352
|
+
readonly Executing: (args: {
|
|
353
|
+
readonly _tag: "Executing";
|
|
354
|
+
readonly call: ToolCall;
|
|
355
|
+
readonly startedAtMs: number; /** Preserve witnessed interaction acceptance across transport interruptions. */
|
|
356
|
+
readonly interaction?: true;
|
|
347
357
|
}) => any;
|
|
348
|
-
readonly
|
|
349
|
-
readonly _tag: "
|
|
358
|
+
readonly Completed: (args: {
|
|
359
|
+
readonly _tag: "Completed";
|
|
350
360
|
readonly call: ToolCall;
|
|
351
361
|
readonly result: ToolResult;
|
|
352
362
|
readonly startedAtMs: number;
|
|
353
363
|
readonly endedAtMs: number;
|
|
354
364
|
}) => any;
|
|
355
|
-
readonly
|
|
356
|
-
readonly _tag: "
|
|
365
|
+
readonly Accepted: (args: {
|
|
366
|
+
readonly _tag: "Accepted";
|
|
357
367
|
readonly call: ToolCall;
|
|
358
368
|
readonly result: ToolResult;
|
|
359
369
|
readonly startedAtMs: number;
|
|
@@ -370,18 +380,13 @@ declare const AgentToolRun: {
|
|
|
370
380
|
readonly call: ToolCall;
|
|
371
381
|
readonly result: ToolResult;
|
|
372
382
|
}) => any;
|
|
373
|
-
|
|
374
|
-
readonly _tag: "InputReady";
|
|
375
|
-
readonly call: ToolCall;
|
|
376
|
-
}) => any;
|
|
377
|
-
readonly Executing: (args: {
|
|
378
|
-
readonly _tag: "Executing";
|
|
379
|
-
readonly call: ToolCall;
|
|
380
|
-
readonly startedAtMs: number; /** Preserve witnessed interaction acceptance across transport interruptions. */
|
|
381
|
-
readonly interaction?: true;
|
|
382
|
-
}) => any;
|
|
383
|
-
}>(cases: Cases): (value: AgentToolRun) => import("effect/Unify").Unify<ReturnType<Cases["QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "InputStreaming" | "ApprovalRequested" | "Denied" | "Accepted" | "Completed" | "Errored" | "ProviderCompleted" | "InputReady" | "Executing"]>>;
|
|
383
|
+
}>(cases: Cases): (value: AgentToolRun) => import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "InputStreaming" | "InputReady" | "ApprovalRequested" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted"]>>;
|
|
384
384
|
<Cases extends {
|
|
385
|
+
readonly Denied: (args: {
|
|
386
|
+
readonly _tag: "Denied";
|
|
387
|
+
readonly toolCallId: string;
|
|
388
|
+
readonly reason: string;
|
|
389
|
+
}) => any;
|
|
385
390
|
readonly QuestionRequested: (args: {
|
|
386
391
|
readonly _tag: "QuestionRequested";
|
|
387
392
|
readonly request: QuestionRequest;
|
|
@@ -430,25 +435,30 @@ declare const AgentToolRun: {
|
|
|
430
435
|
readonly name?: string;
|
|
431
436
|
readonly input: string;
|
|
432
437
|
}) => any;
|
|
438
|
+
readonly InputReady: (args: {
|
|
439
|
+
readonly _tag: "InputReady";
|
|
440
|
+
readonly call: ToolCall;
|
|
441
|
+
}) => any;
|
|
433
442
|
readonly ApprovalRequested: (args: {
|
|
434
443
|
readonly _tag: "ApprovalRequested";
|
|
435
444
|
readonly call: ToolCall;
|
|
436
445
|
readonly request?: ToolApprovalRequest;
|
|
437
446
|
}) => any;
|
|
438
|
-
readonly
|
|
439
|
-
readonly _tag: "
|
|
440
|
-
readonly
|
|
441
|
-
readonly
|
|
447
|
+
readonly Executing: (args: {
|
|
448
|
+
readonly _tag: "Executing";
|
|
449
|
+
readonly call: ToolCall;
|
|
450
|
+
readonly startedAtMs: number; /** Preserve witnessed interaction acceptance across transport interruptions. */
|
|
451
|
+
readonly interaction?: true;
|
|
442
452
|
}) => any;
|
|
443
|
-
readonly
|
|
444
|
-
readonly _tag: "
|
|
453
|
+
readonly Completed: (args: {
|
|
454
|
+
readonly _tag: "Completed";
|
|
445
455
|
readonly call: ToolCall;
|
|
446
456
|
readonly result: ToolResult;
|
|
447
457
|
readonly startedAtMs: number;
|
|
448
458
|
readonly endedAtMs: number;
|
|
449
459
|
}) => any;
|
|
450
|
-
readonly
|
|
451
|
-
readonly _tag: "
|
|
460
|
+
readonly Accepted: (args: {
|
|
461
|
+
readonly _tag: "Accepted";
|
|
452
462
|
readonly call: ToolCall;
|
|
453
463
|
readonly result: ToolResult;
|
|
454
464
|
readonly startedAtMs: number;
|
|
@@ -465,17 +475,7 @@ declare const AgentToolRun: {
|
|
|
465
475
|
readonly call: ToolCall;
|
|
466
476
|
readonly result: ToolResult;
|
|
467
477
|
}) => any;
|
|
468
|
-
|
|
469
|
-
readonly _tag: "InputReady";
|
|
470
|
-
readonly call: ToolCall;
|
|
471
|
-
}) => any;
|
|
472
|
-
readonly Executing: (args: {
|
|
473
|
-
readonly _tag: "Executing";
|
|
474
|
-
readonly call: ToolCall;
|
|
475
|
-
readonly startedAtMs: number; /** Preserve witnessed interaction acceptance across transport interruptions. */
|
|
476
|
-
readonly interaction?: true;
|
|
477
|
-
}) => any;
|
|
478
|
-
}>(value: AgentToolRun, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "InputStreaming" | "ApprovalRequested" | "Denied" | "Accepted" | "Completed" | "Errored" | "ProviderCompleted" | "InputReady" | "Executing"]>>;
|
|
478
|
+
}>(value: AgentToolRun, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "InputStreaming" | "InputReady" | "ApprovalRequested" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted"]>>;
|
|
479
479
|
};
|
|
480
480
|
};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
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
14
14
|
declare const ContextOverflowRetryCompactionResult: {
|
|
15
|
-
readonly Compacted: Data.TaggedEnum.ConstructorFrom<{
|
|
16
|
-
readonly _tag: "Compacted";
|
|
17
|
-
readonly messages: ReadonlyArray<AgentMessage>;
|
|
18
|
-
}, "_tag">;
|
|
19
15
|
readonly Skipped: Data.TaggedEnum.ConstructorFrom<{
|
|
20
16
|
readonly _tag: "Skipped";
|
|
21
17
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
22
18
|
}, "_tag">;
|
|
23
|
-
readonly
|
|
19
|
+
readonly Compacted: Data.TaggedEnum.ConstructorFrom<{
|
|
24
20
|
readonly _tag: "Compacted";
|
|
25
21
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
22
|
+
}, "_tag">;
|
|
23
|
+
readonly $is: <Tag extends "Skipped" | "Compacted">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
24
|
+
readonly _tag: "Skipped";
|
|
25
|
+
readonly messages: ReadonlyArray<AgentMessage>;
|
|
26
26
|
}, {
|
|
27
27
|
readonly _tag: Tag;
|
|
28
28
|
}> | Extract<{
|
|
29
|
-
readonly _tag: "
|
|
29
|
+
readonly _tag: "Compacted";
|
|
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 Compacted: (args: {
|
|
37
|
-
readonly _tag: "Compacted";
|
|
38
|
-
readonly messages: ReadonlyArray<AgentMessage>;
|
|
39
|
-
}) => any;
|
|
40
36
|
readonly Skipped: (args: {
|
|
41
37
|
readonly _tag: "Skipped";
|
|
42
38
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
43
39
|
}) => any;
|
|
40
|
+
readonly Compacted: (args: {
|
|
41
|
+
readonly _tag: "Compacted";
|
|
42
|
+
readonly messages: ReadonlyArray<AgentMessage>;
|
|
43
|
+
}) => any;
|
|
44
44
|
}>(cases: Cases): (value: {
|
|
45
|
-
readonly _tag: "
|
|
45
|
+
readonly _tag: "Skipped";
|
|
46
46
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
47
47
|
} | {
|
|
48
|
-
readonly _tag: "
|
|
48
|
+
readonly _tag: "Compacted";
|
|
49
49
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
50
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["
|
|
50
|
+
}) => import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
|
|
51
51
|
<Cases extends {
|
|
52
|
-
readonly Compacted: (args: {
|
|
53
|
-
readonly _tag: "Compacted";
|
|
54
|
-
readonly messages: ReadonlyArray<AgentMessage>;
|
|
55
|
-
}) => any;
|
|
56
52
|
readonly Skipped: (args: {
|
|
57
53
|
readonly _tag: "Skipped";
|
|
58
54
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
59
55
|
}) => any;
|
|
56
|
+
readonly Compacted: (args: {
|
|
57
|
+
readonly _tag: "Compacted";
|
|
58
|
+
readonly messages: ReadonlyArray<AgentMessage>;
|
|
59
|
+
}) => any;
|
|
60
60
|
}>(value: {
|
|
61
|
-
readonly _tag: "
|
|
61
|
+
readonly _tag: "Skipped";
|
|
62
62
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
63
63
|
} | {
|
|
64
|
-
readonly _tag: "
|
|
64
|
+
readonly _tag: "Compacted";
|
|
65
65
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
66
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["
|
|
66
|
+
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
|
|
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">;
|
|
76
79
|
readonly Compacted: Data.TaggedEnum.ConstructorFrom<{
|
|
77
80
|
readonly _tag: "Compacted";
|
|
78
81
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
79
82
|
}, "_tag">;
|
|
80
|
-
readonly Skipped:
|
|
81
|
-
readonly _tag: "Skipped";
|
|
82
|
-
}, "_tag">;
|
|
83
|
-
readonly $is: <Tag extends "Compacted" | "Skipped">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
83
|
+
readonly $is: <Tag extends "Skipped" | "Compacted">(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;
|
|
95
98
|
readonly Compacted: (args: {
|
|
96
99
|
readonly _tag: "Compacted";
|
|
97
100
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
98
101
|
}) => any;
|
|
102
|
+
}>(cases: Cases): (value: OverflowCompactionDecision) => import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
|
|
103
|
+
<Cases extends {
|
|
99
104
|
readonly Skipped: (args: {
|
|
100
105
|
readonly _tag: "Skipped";
|
|
101
106
|
}) => any;
|
|
102
|
-
}>(cases: Cases): (value: OverflowCompactionDecision) => import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
|
|
103
|
-
<Cases extends {
|
|
104
107
|
readonly Compacted: (args: {
|
|
105
108
|
readonly _tag: "Compacted";
|
|
106
109
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
107
110
|
}) => any;
|
|
108
|
-
|
|
109
|
-
readonly _tag: "Skipped";
|
|
110
|
-
}) => any;
|
|
111
|
-
}>(value: OverflowCompactionDecision, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Compacted" | "Skipped"]>>;
|
|
111
|
+
}>(value: OverflowCompactionDecision, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Skipped" | "Compacted"]>>;
|
|
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;;
|
|
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;IAAA;;yBAGd,aA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