@yolk-sdk/agent 0.1.0-canary.107 → 0.1.0-canary.109
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 +97 -45
- package/dist/client/state.d.mts +76 -76
- 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/compaction/window.mjs +8 -2
- package/dist/compaction/window.mjs.map +1 -1
- package/dist/loop/index.d.mts +2 -1
- package/dist/loop/index.mjs +2 -1
- package/dist/loop/instructions.d.mts +39 -0
- package/dist/loop/instructions.d.mts.map +1 -0
- package/dist/loop/instructions.mjs +42 -0
- package/dist/loop/instructions.mjs.map +1 -0
- package/dist/loop/run.d.mts +13 -1
- package/dist/loop/run.d.mts.map +1 -1
- package/dist/loop/run.mjs +26 -7
- package/dist/loop/run.mjs.map +1 -1
- package/dist/loop/services/llm-provider.d.mts +3 -2
- package/dist/loop/services/llm-provider.d.mts.map +1 -1
- package/dist/loop/services/llm-provider.mjs.map +1 -1
- package/dist/protocol/index.d.mts +4 -3
- package/dist/protocol/index.d.mts.map +1 -1
- package/dist/protocol/index.mjs +4 -3
- package/dist/protocol/message.d.mts +34 -1
- package/dist/protocol/message.d.mts.map +1 -1
- package/dist/protocol/message.mjs +39 -2
- package/dist/protocol/message.mjs.map +1 -1
- package/dist/protocol/tool-search.d.mts +31 -0
- package/dist/protocol/tool-search.d.mts.map +1 -0
- package/dist/protocol/tool-search.mjs +42 -0
- package/dist/protocol/tool-search.mjs.map +1 -0
- package/dist/protocol/tool.d.mts +19 -6
- package/dist/protocol/tool.d.mts.map +1 -1
- package/dist/protocol/tool.mjs +17 -4
- package/dist/protocol/tool.mjs.map +1 -1
- package/dist/providers/anthropic/claude.d.mts +8 -2
- package/dist/providers/anthropic/claude.d.mts.map +1 -1
- package/dist/providers/anthropic/claude.mjs +7 -1
- package/dist/providers/anthropic/claude.mjs.map +1 -1
- package/dist/providers/anthropic-provider-internal.d.mts.map +1 -1
- package/dist/providers/anthropic-provider-internal.mjs +8 -2
- package/dist/providers/anthropic-provider-internal.mjs.map +1 -1
- package/dist/react/chat-items.d.mts +51 -51
- package/dist/react/chat-items.d.mts.map +1 -1
- package/dist/react/chat-messages.d.mts +83 -77
- package/dist/react/chat-messages.d.mts.map +1 -1
- package/dist/react/chat-messages.mjs +18 -4
- package/dist/react/chat-messages.mjs.map +1 -1
- package/dist/runtime/run-runtime.d.mts +5 -1
- package/dist/runtime/run-runtime.d.mts.map +1 -1
- package/dist/runtime/run-runtime.mjs +1 -0
- package/dist/runtime/run-runtime.mjs.map +1 -1
- package/dist/skillset/merge.d.mts +1 -1
- package/dist/tools/index.d.mts +3 -2
- package/dist/tools/index.mjs +2 -1
- package/dist/tools/plan-runtime.d.mts.map +1 -1
- package/dist/tools/plan-runtime.mjs +20 -5
- package/dist/tools/plan-runtime.mjs.map +1 -1
- package/dist/tools/registry.d.mts +26 -5
- package/dist/tools/registry.d.mts.map +1 -1
- package/dist/tools/registry.mjs +58 -8
- package/dist/tools/registry.mjs.map +1 -1
- package/dist/tools/tool-search.d.mts +33 -0
- package/dist/tools/tool-search.d.mts.map +1 -0
- package/dist/tools/tool-search.mjs +119 -0
- package/dist/tools/tool-search.mjs.map +1 -0
- package/package.json +2 -2
- package/src/compaction/window.ts +16 -1
- package/src/loop/index.ts +2 -0
- package/src/loop/instructions.ts +76 -0
- package/src/loop/run.ts +49 -7
- package/src/loop/services/llm-provider.ts +3 -2
- package/src/protocol/index.ts +13 -0
- package/src/protocol/message.ts +61 -1
- package/src/protocol/tool-search.ts +72 -0
- package/src/protocol/tool.ts +30 -6
- package/src/providers/anthropic/claude.ts +7 -1
- package/src/providers/anthropic-provider-internal.ts +12 -2
- package/src/react/chat-messages.ts +42 -3
- package/src/runtime/run-runtime.ts +9 -0
- package/src/tools/index.ts +10 -0
- package/src/tools/plan-runtime.ts +27 -9
- package/src/tools/registry.ts +184 -14
- package/src/tools/tool-search.ts +183 -0
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, 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
|
|
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, host instructions |
|
|
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, deferred loading (`tool_search`), 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
|
|
|
@@ -431,6 +431,8 @@ policy and emits protocol-visible retry/error state:
|
|
|
431
431
|
[stream diagnostics guide](https://github.com/magoz/yolk-sdk/blob/main/apps/docs/content/docs/troubleshooting.mdx#diagnose-chat-stream-failures-with-stream-diagnostics).
|
|
432
432
|
- Chat Completions and Responses HTTP failures copy the envelope string `code` (falling back to
|
|
433
433
|
`type`) into `provider.providerCode`; free-text upstream bodies stay out of `LLMError`.
|
|
434
|
+
- Claude subscription (`anthropic_claude`) HTTP and stream errors use `error.details.error_code`
|
|
435
|
+
(for example `claude_code_version_too_old`), then `error.type`, then `error.code`.
|
|
434
436
|
- `AgentRetry.provider` exposes current retry metadata and chosen `delayMs`.
|
|
435
437
|
- `AgentError.provider` preserves final terminal metadata.
|
|
436
438
|
- `AgentErrorCode` includes `rate_limit`, `overloaded`, `context_overflow`, and generic
|
|
@@ -940,10 +942,15 @@ This package declares them; it does not run scripts.
|
|
|
940
942
|
|
|
941
943
|
- `makeTool({ output })` adds declaration-only `ToolDef.outputSchema`, lowered like `parameters`.
|
|
942
944
|
- `callableBy: 'all' | 'model' | 'codemode'` (default `all`) decides who may call a tool. For
|
|
943
|
-
`codemode` only, `discovery: 'listed' | 'search'` (default `listed`
|
|
945
|
+
`codemode` only, `discovery: 'listed' | 'search' | 'pinned'` (default `listed`; `pinned` is
|
|
946
|
+
always listed, outside the catalog budget) decides how scripts find it.
|
|
944
947
|
Codemode-only tools never reach providers. Approval, input, interaction, activated background,
|
|
945
948
|
`question`, `subagent`, and nested-access tools never run from code mode (stageable approval tools
|
|
946
|
-
are only staged; see Staged tool plans); `resolveTools` rejects `callableBy: 'codemode'` on them
|
|
949
|
+
are only staged; see Staged tool plans); `resolveTools` rejects `callableBy: 'codemode'` on them,
|
|
950
|
+
except a stageable approval tool, which may be stage-only: never declared, only `stage()`d from
|
|
951
|
+
scripts (see [ADR 0007](https://github.com/magoz/yolk-sdk/blob/main/docs/adr/0007-tool-exposure-and-catalog.md)).
|
|
952
|
+
- `instruct: ({ tools }) => RunInstruction` on a nested-access registration contributes a host
|
|
953
|
+
instruction (see Host instructions), collected in `ResolvedToolSet.instructions`.
|
|
947
954
|
- `nestedToolAccess: true` gives a registration's `execute` a `nested` executor over the other
|
|
948
955
|
code-mode-callable tools of the same resolution and host context. Nested calls run through the
|
|
949
956
|
resolved execute path and fail closed with model-visible error results. Assign nested call ids as
|
|
@@ -957,6 +964,48 @@ This package declares them; it does not run scripts.
|
|
|
957
964
|
Size the record with `makeNestedToolCallRecorder({ maxCalls })`; per-status `counts` cover
|
|
958
965
|
every call, dropped ones included.
|
|
959
966
|
|
|
967
|
+
## Deferred tools
|
|
968
|
+
|
|
969
|
+
`loading: 'deferred'` (on `makeTool`, `ToolDef`, or the MCP/connector `exposure` resolvers) keeps a
|
|
970
|
+
model-callable tool out of provider requests until the model loads it, so hosts can connect many
|
|
971
|
+
tools without spending context on them ([ADR 0007](https://github.com/magoz/yolk-sdk/blob/main/docs/adr/0007-tool-exposure-and-catalog.md)).
|
|
972
|
+
|
|
973
|
+
- When any tool is deferred, `resolveTools` adds the package `tool_search` tool (read access,
|
|
974
|
+
model-only; `makeToolSearchTool`). Its result names the tools it loaded; opt out with
|
|
975
|
+
`resolveTools(modules, context, { toolSearch: false })`, or register your own `tool_search`.
|
|
976
|
+
- Activation is derived from the transcript, never stored: each request declares
|
|
977
|
+
`declaredToolDefs(tools, messages)`, the eager tools plus deferred tools a `tool_search` result
|
|
978
|
+
activated, so replayed and resumed steps declare the same tools. Loading a tool changes the
|
|
979
|
+
declared tools, which start the request, so that request misses the prompt cache once; later
|
|
980
|
+
requests reuse the new prefix. Prefer code mode scripts for exploratory use.
|
|
981
|
+
- Deferral saves context; it is not authority. Approval-gated tools keep their approval when
|
|
982
|
+
deferred. `loading` on a `callableBy: 'codemode'` tool is a type error (`invalid_tool_exposure` at
|
|
983
|
+
resolution for raw definitions); `tool_search`, `question`, `subagent`, input, interaction, plan
|
|
984
|
+
review, background, and nested-access tools cannot be deferred (`deferred_unsupported_tool`).
|
|
985
|
+
|
|
986
|
+
## Host instructions
|
|
987
|
+
|
|
988
|
+
A `RunInstruction` (`{ key, state, render }`) is host context kept current in the conversation,
|
|
989
|
+
for example the code mode catalog (`ResolvedToolSet.instructions`). Pass it as
|
|
990
|
+
`RunConfig.instructions` or `RuntimeConfig.instructions`.
|
|
991
|
+
|
|
992
|
+
- Before each model request the loop compares `state` with the latest instruction message of the
|
|
993
|
+
same `key` and, only when it changed, appends a user-role message with `render(state)` and the
|
|
994
|
+
non-model-visible `instruction: { key, state }` envelope. Earlier messages never change, so a
|
|
995
|
+
changing instruction never invalidates the cached request prefix. `state: undefined` appends a
|
|
996
|
+
removal notice once.
|
|
997
|
+
- `render` gets only the current state: compaction keeps the latest message of each key
|
|
998
|
+
(`latestInstructionMessages`), so each one must stand alone.
|
|
999
|
+
- The appended messages join the run's created messages (persist them with the turn) but emit no
|
|
1000
|
+
`UserMessage` event. Durable hosts driving `runModelTurn` append and persist
|
|
1001
|
+
`instructionMessages(transcript, instructions)` before each step themselves; `runModelTurn` does
|
|
1002
|
+
not accept `instructions`.
|
|
1003
|
+
- Window compaction keeps instruction messages after its summary; custom compaction must keep
|
|
1004
|
+
`latestInstructionMessages(...)` too. Chat projections hide them (`isInstructionMessage`) and
|
|
1005
|
+
`toAgentMessages` round-trips them. Duplicate keys fail resolution (`duplicate_instruction`).
|
|
1006
|
+
- Hosts that cannot append messages to their conversation may put `render(state)` into the system
|
|
1007
|
+
prompt instead, only while `state` is defined (`undefined` renders the removal notice).
|
|
1008
|
+
|
|
960
1009
|
## Durable tool ledger
|
|
961
1010
|
|
|
962
1011
|
Steps that hosts re-execute (Vercel Workflow's queue is at-least-once) must not repeat writes.
|
|
@@ -1024,8 +1073,11 @@ aborts, and implementation bugs outside typed tool execution.
|
|
|
1024
1073
|
or step when call ids can repeat), keep its operations interruptible, and reserve about 15 s of
|
|
1025
1074
|
the step budget after `deadline` for recording outcomes.
|
|
1026
1075
|
- If you send `ToolDef`s to providers yourself (outside `run`/`runModelTurn`), filter them with
|
|
1027
|
-
protocol `
|
|
1028
|
-
|
|
1076
|
+
protocol `declaredToolDefs(tools, messages)`: codemode-only tools must never reach providers, and
|
|
1077
|
+
deferred tools only once a `tool_search` result activated them.
|
|
1078
|
+
- Durable hosts driving `runModelTurn` append and persist `instructionMessages(...)` before each
|
|
1079
|
+
model step (see Host instructions).
|
|
1080
|
+
- Executor decorators outside `ResolvedToolSet.execute` do not see nested code mode calls.
|
|
1029
1081
|
- Compact context and decide memory/search policy.
|
|
1030
1082
|
|
|
1031
1083
|
## Boundaries
|
package/dist/client/state.d.mts
CHANGED
|
@@ -80,6 +80,26 @@ type AgentToolRun = {
|
|
|
80
80
|
readonly result: ToolResult;
|
|
81
81
|
};
|
|
82
82
|
declare const AgentToolRun: {
|
|
83
|
+
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
84
|
+
readonly _tag: "InputStreaming";
|
|
85
|
+
readonly id: string;
|
|
86
|
+
readonly name?: string;
|
|
87
|
+
readonly input: string;
|
|
88
|
+
}, "_tag">;
|
|
89
|
+
readonly InputReady: Data.TaggedEnum.ConstructorFrom<{
|
|
90
|
+
readonly _tag: "InputReady";
|
|
91
|
+
readonly call: ToolCall;
|
|
92
|
+
}, "_tag">;
|
|
93
|
+
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
94
|
+
readonly _tag: "ApprovalRequested";
|
|
95
|
+
readonly call: ToolCall;
|
|
96
|
+
readonly request?: ToolApprovalRequest;
|
|
97
|
+
}, "_tag">;
|
|
98
|
+
readonly Denied: Data.TaggedEnum.ConstructorFrom<{
|
|
99
|
+
readonly _tag: "Denied";
|
|
100
|
+
readonly toolCallId: string;
|
|
101
|
+
readonly reason: string;
|
|
102
|
+
}, "_tag">;
|
|
83
103
|
readonly QuestionRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
84
104
|
readonly _tag: "QuestionRequested";
|
|
85
105
|
readonly request: QuestionRequest;
|
|
@@ -122,6 +142,12 @@ declare const AgentToolRun: {
|
|
|
122
142
|
readonly response: InteractionResponse;
|
|
123
143
|
readonly request?: InteractionRequest;
|
|
124
144
|
}, "_tag">;
|
|
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;
|
|
150
|
+
}, "_tag">;
|
|
125
151
|
readonly Completed: Data.TaggedEnum.ConstructorFrom<{
|
|
126
152
|
readonly _tag: "Completed";
|
|
127
153
|
readonly call: ToolCall;
|
|
@@ -136,22 +162,6 @@ declare const AgentToolRun: {
|
|
|
136
162
|
readonly startedAtMs: number;
|
|
137
163
|
readonly endedAtMs: number;
|
|
138
164
|
}, "_tag">;
|
|
139
|
-
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
140
|
-
readonly _tag: "InputStreaming";
|
|
141
|
-
readonly id: string;
|
|
142
|
-
readonly name?: string;
|
|
143
|
-
readonly input: string;
|
|
144
|
-
}, "_tag">;
|
|
145
|
-
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
146
|
-
readonly _tag: "ApprovalRequested";
|
|
147
|
-
readonly call: ToolCall;
|
|
148
|
-
readonly request?: ToolApprovalRequest;
|
|
149
|
-
}, "_tag">;
|
|
150
|
-
readonly Denied: Data.TaggedEnum.ConstructorFrom<{
|
|
151
|
-
readonly _tag: "Denied";
|
|
152
|
-
readonly toolCallId: string;
|
|
153
|
-
readonly reason: string;
|
|
154
|
-
}, "_tag">;
|
|
155
165
|
readonly Errored: Data.TaggedEnum.ConstructorFrom<{
|
|
156
166
|
readonly _tag: "Errored";
|
|
157
167
|
readonly call: ToolCall;
|
|
@@ -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" | "Completed" | "Accepted" | "InputStreaming" | "ApprovalRequested" | "Denied" | "Errored" | "ProviderCompleted" | "InputReady" | "Executing">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
176
|
+
readonly $is: <Tag extends "InputStreaming" | "InputReady" | "ApprovalRequested" | "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "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,26 @@ declare const AgentToolRun: {
|
|
|
287
287
|
}>;
|
|
288
288
|
readonly $match: {
|
|
289
289
|
<Cases extends {
|
|
290
|
+
readonly InputStreaming: (args: {
|
|
291
|
+
readonly _tag: "InputStreaming";
|
|
292
|
+
readonly id: string;
|
|
293
|
+
readonly name?: string;
|
|
294
|
+
readonly input: string;
|
|
295
|
+
}) => any;
|
|
296
|
+
readonly InputReady: (args: {
|
|
297
|
+
readonly _tag: "InputReady";
|
|
298
|
+
readonly call: ToolCall;
|
|
299
|
+
}) => any;
|
|
300
|
+
readonly ApprovalRequested: (args: {
|
|
301
|
+
readonly _tag: "ApprovalRequested";
|
|
302
|
+
readonly call: ToolCall;
|
|
303
|
+
readonly request?: ToolApprovalRequest;
|
|
304
|
+
}) => any;
|
|
305
|
+
readonly Denied: (args: {
|
|
306
|
+
readonly _tag: "Denied";
|
|
307
|
+
readonly toolCallId: string;
|
|
308
|
+
readonly reason: string;
|
|
309
|
+
}) => any;
|
|
290
310
|
readonly QuestionRequested: (args: {
|
|
291
311
|
readonly _tag: "QuestionRequested";
|
|
292
312
|
readonly request: QuestionRequest;
|
|
@@ -329,6 +349,12 @@ declare const AgentToolRun: {
|
|
|
329
349
|
readonly response: InteractionResponse;
|
|
330
350
|
readonly request?: InteractionRequest;
|
|
331
351
|
}) => any;
|
|
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;
|
|
357
|
+
}) => any;
|
|
332
358
|
readonly Completed: (args: {
|
|
333
359
|
readonly _tag: "Completed";
|
|
334
360
|
readonly call: ToolCall;
|
|
@@ -343,22 +369,6 @@ declare const AgentToolRun: {
|
|
|
343
369
|
readonly startedAtMs: number;
|
|
344
370
|
readonly endedAtMs: number;
|
|
345
371
|
}) => any;
|
|
346
|
-
readonly InputStreaming: (args: {
|
|
347
|
-
readonly _tag: "InputStreaming";
|
|
348
|
-
readonly id: string;
|
|
349
|
-
readonly name?: string;
|
|
350
|
-
readonly input: string;
|
|
351
|
-
}) => any;
|
|
352
|
-
readonly ApprovalRequested: (args: {
|
|
353
|
-
readonly _tag: "ApprovalRequested";
|
|
354
|
-
readonly call: ToolCall;
|
|
355
|
-
readonly request?: ToolApprovalRequest;
|
|
356
|
-
}) => any;
|
|
357
|
-
readonly Denied: (args: {
|
|
358
|
-
readonly _tag: "Denied";
|
|
359
|
-
readonly toolCallId: string;
|
|
360
|
-
readonly reason: string;
|
|
361
|
-
}) => any;
|
|
362
372
|
readonly Errored: (args: {
|
|
363
373
|
readonly _tag: "Errored";
|
|
364
374
|
readonly call: ToolCall;
|
|
@@ -370,18 +380,28 @@ declare const AgentToolRun: {
|
|
|
370
380
|
readonly call: ToolCall;
|
|
371
381
|
readonly result: ToolResult;
|
|
372
382
|
}) => any;
|
|
383
|
+
}>(cases: Cases): (value: AgentToolRun) => import("effect/Unify").Unify<ReturnType<Cases["InputStreaming" | "InputReady" | "ApprovalRequested" | "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted"]>>;
|
|
384
|
+
<Cases extends {
|
|
385
|
+
readonly InputStreaming: (args: {
|
|
386
|
+
readonly _tag: "InputStreaming";
|
|
387
|
+
readonly id: string;
|
|
388
|
+
readonly name?: string;
|
|
389
|
+
readonly input: string;
|
|
390
|
+
}) => any;
|
|
373
391
|
readonly InputReady: (args: {
|
|
374
392
|
readonly _tag: "InputReady";
|
|
375
393
|
readonly call: ToolCall;
|
|
376
394
|
}) => any;
|
|
377
|
-
readonly
|
|
378
|
-
readonly _tag: "
|
|
395
|
+
readonly ApprovalRequested: (args: {
|
|
396
|
+
readonly _tag: "ApprovalRequested";
|
|
379
397
|
readonly call: ToolCall;
|
|
380
|
-
readonly
|
|
381
|
-
|
|
398
|
+
readonly request?: ToolApprovalRequest;
|
|
399
|
+
}) => any;
|
|
400
|
+
readonly Denied: (args: {
|
|
401
|
+
readonly _tag: "Denied";
|
|
402
|
+
readonly toolCallId: string;
|
|
403
|
+
readonly reason: string;
|
|
382
404
|
}) => any;
|
|
383
|
-
}>(cases: Cases): (value: AgentToolRun) => import("effect/Unify").Unify<ReturnType<Cases["QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "Completed" | "Accepted" | "InputStreaming" | "ApprovalRequested" | "Denied" | "Errored" | "ProviderCompleted" | "InputReady" | "Executing"]>>;
|
|
384
|
-
<Cases extends {
|
|
385
405
|
readonly QuestionRequested: (args: {
|
|
386
406
|
readonly _tag: "QuestionRequested";
|
|
387
407
|
readonly request: QuestionRequest;
|
|
@@ -424,6 +444,12 @@ declare const AgentToolRun: {
|
|
|
424
444
|
readonly response: InteractionResponse;
|
|
425
445
|
readonly request?: InteractionRequest;
|
|
426
446
|
}) => any;
|
|
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;
|
|
452
|
+
}) => any;
|
|
427
453
|
readonly Completed: (args: {
|
|
428
454
|
readonly _tag: "Completed";
|
|
429
455
|
readonly call: ToolCall;
|
|
@@ -438,22 +464,6 @@ declare const AgentToolRun: {
|
|
|
438
464
|
readonly startedAtMs: number;
|
|
439
465
|
readonly endedAtMs: number;
|
|
440
466
|
}) => any;
|
|
441
|
-
readonly InputStreaming: (args: {
|
|
442
|
-
readonly _tag: "InputStreaming";
|
|
443
|
-
readonly id: string;
|
|
444
|
-
readonly name?: string;
|
|
445
|
-
readonly input: string;
|
|
446
|
-
}) => any;
|
|
447
|
-
readonly ApprovalRequested: (args: {
|
|
448
|
-
readonly _tag: "ApprovalRequested";
|
|
449
|
-
readonly call: ToolCall;
|
|
450
|
-
readonly request?: ToolApprovalRequest;
|
|
451
|
-
}) => any;
|
|
452
|
-
readonly Denied: (args: {
|
|
453
|
-
readonly _tag: "Denied";
|
|
454
|
-
readonly toolCallId: string;
|
|
455
|
-
readonly reason: string;
|
|
456
|
-
}) => any;
|
|
457
467
|
readonly Errored: (args: {
|
|
458
468
|
readonly _tag: "Errored";
|
|
459
469
|
readonly call: ToolCall;
|
|
@@ -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" | "Completed" | "Accepted" | "InputStreaming" | "ApprovalRequested" | "Denied" | "Errored" | "ProviderCompleted" | "InputReady" | "Executing"]>>;
|
|
478
|
+
}>(value: AgentToolRun, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["InputStreaming" | "InputReady" | "ApprovalRequested" | "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InteractionRequested" | "InteractionSubmitted" | "InteractionCancelled" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted"]>>;
|
|
479
479
|
};
|
|
480
480
|
};
|
|
481
481
|
type AgentClientState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.mts","names":[],"sources":["../../src/client/state.ts"],"mappings":";;;;KAoBY,cAAA;AAAA,KAEA,YAAA;EAAA,SAEG,IAAA;EAAA,SACA,EAAA;EAAA,SACA,IAAA;EAAA,SACA,KAAA;AAAA;EAAA,SAEA,IAAA;EAAA,SAA6B,IAAA,EAAM,QAAA;AAAA;EAAA,SAEnC,IAAA;EAAA,SACA,IAAA,EAAM,QAAA;EAAA,SACN,OAAA,GAAU,mBAAA;AAAA;EAAA,SAEV,IAAA;EAAA,SAAyB,UAAA;EAAA,SAA6B,MAAA;AAAA;EAAA,SACtD,IAAA;EAAA,SAAoC,OAAA,EAAS,eAAA;AAAA;EAAA,SAE7C,IAAA;EAAA,SACA,QAAA,EAAU,gBAAA;EAAA,SACV,OAAA,GAAU,eAAA;AAAA;EAAA,SAGV,IAAA;EAAA,SACA,QAAA,EAAU,gBAAA;EAAA,SACV,OAAA,GAAU,eAAA;AAAA;EAAA,SAEV,IAAA;EAAA,SAAiC,OAAA,EAAS,YAAA;AAAA;EAAA,SAE1C,IAAA;EAAA,SACA,QAAA,EAAU,aAAA;EAAA,SACV,OAAA,GAAU,YAAA;AAAA;EAAA,SAGV,IAAA;EAAA,SACA,QAAA,EAAU,aAAA;EAAA,SACV,OAAA,GAAU,YAAA;AAAA;EAAA,SAEV,IAAA;EAAA,SAAuC,OAAA,EAAS,kBAAA;AAAA;EAAA,SAEhD,IAAA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GAAW,UAAA,YACV,gBAAA;AAAA,cASU,gBAAA,GAAoB,KAAA,EAAO,gBAAA,KAAmB,gBAOzD;AAAA,cAEW,iBAAA,GACX,MAAA,EAAQ,aAAA,CAAc,UAAA,GACtB,YAAA,GAAc,gBAAA,EACd,OAAA,GAAS,sBAAA,KAA2B,gBAAA"}
|
|
@@ -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
|
|
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: "
|
|
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: "
|
|
45
|
+
readonly _tag: "Compacted";
|
|
46
46
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
47
47
|
} | {
|
|
48
|
-
readonly _tag: "
|
|
48
|
+
readonly _tag: "Skipped";
|
|
49
49
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
50
|
-
}) => import("effect/Unify").Unify<ReturnType<Cases["
|
|
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: "
|
|
61
|
+
readonly _tag: "Compacted";
|
|
62
62
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
63
63
|
} | {
|
|
64
|
-
readonly _tag: "
|
|
64
|
+
readonly _tag: "Skipped";
|
|
65
65
|
readonly messages: ReadonlyArray<AgentMessage>;
|
|
66
|
-
}, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["
|
|
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
|
|
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
|
-
|
|
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;;
|
|
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;;uBAPU,aAAA,CAAc,YAAA;EAAA;EAAA;;uBAGd,aAAA,CAAc,YAAA;EAAA;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