@effect-uai/core 0.17.0 → 0.19.0-dev-20261109183959
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 +5 -5
- package/dist/Content-D_Qfn8Ja.d.mts +48 -0
- package/dist/Content-D_Qfn8Ja.d.mts.map +1 -0
- package/dist/File-B923KvZ9.d.mts +46 -0
- package/dist/File-B923KvZ9.d.mts.map +1 -0
- package/dist/{Image-Cv6iBLTy.d.mts → Image-Bzc1H_UK.d.mts} +19 -8
- package/dist/Image-Bzc1H_UK.d.mts.map +1 -0
- package/dist/{Items-C7MyrYPX.d.mts → Items-Bvx8s9QH.d.mts} +109 -16
- package/dist/Items-Bvx8s9QH.d.mts.map +1 -0
- package/dist/{Loop-ChpaO-ya.d.mts → Loop-CeA0AelN.d.mts} +7 -6
- package/dist/Loop-CeA0AelN.d.mts.map +1 -0
- package/dist/Tool-Bkryw6-h.d.mts +206 -0
- package/dist/Tool-Bkryw6-h.d.mts.map +1 -0
- package/dist/ToolEvent-9inLx5cI.d.mts +22 -0
- package/dist/ToolEvent-9inLx5cI.d.mts.map +1 -0
- package/dist/ToolOutput-BNTIQgGB.d.mts +151 -0
- package/dist/ToolOutput-BNTIQgGB.d.mts.map +1 -0
- package/dist/Toolkit-D2VGeD5R.d.mts +212 -0
- package/dist/Toolkit-D2VGeD5R.d.mts.map +1 -0
- package/dist/browser/BrowserTool.d.mts +84 -22
- package/dist/browser/BrowserTool.d.mts.map +1 -1
- package/dist/browser/BrowserTool.mjs +5 -0
- package/dist/browser/BrowserTool.mjs.map +1 -1
- package/dist/capabilities/Capabilities.d.mts +1 -1
- package/dist/decision-model/Decision.test.mjs +4 -4
- package/dist/dist-B5K-y4Be.mjs +191 -0
- package/dist/dist-B5K-y4Be.mjs.map +1 -0
- package/dist/dist-CorQTQL-.mjs +1533 -0
- package/dist/dist-CorQTQL-.mjs.map +1 -0
- package/dist/dist-DNeuh84d.mjs +7 -0
- package/dist/dist-DNeuh84d.mjs.map +1 -0
- package/dist/dist-DzeSyeYF.mjs +10253 -0
- package/dist/dist-DzeSyeYF.mjs.map +1 -0
- package/dist/domain/File.d.mts +2 -0
- package/dist/domain/File.mjs +51 -0
- package/dist/domain/File.mjs.map +1 -0
- package/dist/domain/Image.d.mts +2 -2
- package/dist/domain/Image.mjs +12 -2
- package/dist/domain/Image.mjs.map +1 -1
- package/dist/domain/Items.d.mts +2 -2
- package/dist/domain/Items.mjs +65 -4
- package/dist/domain/Items.mjs.map +1 -1
- package/dist/domain/Realtime.d.mts +72 -490
- package/dist/domain/Realtime.d.mts.map +1 -1
- package/dist/domain/Research.d.mts +1 -1
- package/dist/domain/Transcript.test.mjs +3 -3
- package/dist/domain/Turn.d.mts +57 -262
- package/dist/domain/Turn.d.mts.map +1 -1
- package/dist/domain/Turn.mjs +1 -1
- package/dist/domain/Turn.test.mjs +2 -2
- package/dist/embedding-model/Embedding.d.mts +1 -1
- package/dist/embedding-model/EmbeddingModel.test.mjs +2 -2
- package/dist/embedding-model/EmbeddingModel.test.mjs.map +1 -1
- package/dist/image-generator/ImageGenerator.d.mts +10 -66
- package/dist/image-generator/ImageGenerator.d.mts.map +1 -1
- package/dist/index.C4tKZ0yW-LuFnBtmu.mjs +7042 -0
- package/dist/index.C4tKZ0yW-LuFnBtmu.mjs.map +1 -0
- package/dist/index.d.mts +10 -9
- package/dist/index.mjs +7 -6
- package/dist/language-model/LanguageModel.d.mts +2 -2
- package/dist/language-model/LanguageModel.test.mjs +2 -2
- package/dist/loop/Loop.d.mts +1 -1
- package/dist/loop/Loop.mjs.map +1 -1
- package/dist/loop/Loop.test.mjs +3 -3
- package/dist/math/Probability.test.mjs +2 -2
- package/dist/messenger/Messenger.d.mts +43 -289
- package/dist/messenger/Messenger.d.mts.map +1 -1
- package/dist/messenger/MessengerAdapter.test.mjs +3 -3
- package/dist/music-generator/MusicGenerator.test.mjs +3 -3
- package/dist/observability/Metrics.d.mts +1 -1
- package/dist/observability/Metrics.test.mjs +3 -3
- package/dist/observability/Telemetry.d.mts +1 -1
- package/dist/observability/Telemetry.mjs +1 -1
- package/dist/observability/Telemetry.mjs.map +1 -1
- package/dist/observability/Telemetry.test.mjs +4 -4
- package/dist/observability/Telemetry.test.mjs.map +1 -1
- package/dist/realtime/RealtimeSession.d.mts +1 -1
- package/dist/realtime/RealtimeSession.test.mjs +4 -4
- package/dist/retry/Retry.test.mjs +2 -2
- package/dist/sandbox/Sandbox.d.mts +32 -237
- package/dist/sandbox/Sandbox.d.mts.map +1 -1
- package/dist/speech-synthesizer/SpeechSynthesizer.test.mjs +3 -3
- package/dist/streaming/JSONL.test.mjs +2 -2
- package/dist/streaming/Multipart.d.mts +1 -1
- package/dist/streaming/Multipart.mjs +3 -2
- package/dist/streaming/Multipart.mjs.map +1 -1
- package/dist/streaming/Multipart.test.mjs +28 -0
- package/dist/streaming/Multipart.test.mjs.map +1 -0
- package/dist/streaming/SSE.d.mts +1 -1
- package/dist/streaming/SSE.mjs +2 -2
- package/dist/streaming/SSE.mjs.map +1 -1
- package/dist/streaming/SSE.test.mjs +2 -2
- package/dist/streaming/Settle.test.mjs +3 -3
- package/dist/streaming/WebSocketSession.d.mts +5 -3
- package/dist/streaming/WebSocketSession.d.mts.map +1 -1
- package/dist/streaming/WebSocketSession.mjs +22 -10
- package/dist/streaming/WebSocketSession.mjs.map +1 -1
- package/dist/streaming/WebSocketSession.test.mjs +41 -5
- package/dist/streaming/WebSocketSession.test.mjs.map +1 -1
- package/dist/structured-format/StructuredFormat.mjs.map +1 -1
- package/dist/structured-format/StructuredFormat.test.mjs +2 -2
- package/dist/testing/FakeWebSocket.d.mts +5 -1
- package/dist/testing/FakeWebSocket.d.mts.map +1 -1
- package/dist/testing/FakeWebSocket.mjs +12 -6
- package/dist/testing/FakeWebSocket.mjs.map +1 -1
- package/dist/testing/MockMessenger.d.mts +19 -134
- package/dist/testing/MockMessenger.d.mts.map +1 -1
- package/dist/testing/MockProvider.d.mts +1 -1
- package/dist/testing/MockSandbox.d.mts +65 -446
- package/dist/testing/MockSandbox.d.mts.map +1 -1
- package/dist/tool/Content.d.mts +2 -0
- package/dist/tool/Content.mjs +46 -0
- package/dist/tool/Content.mjs.map +1 -0
- package/dist/tool/Content.test.d.mts +1 -0
- package/dist/tool/Content.test.mjs +48 -0
- package/dist/tool/Content.test.mjs.map +1 -0
- package/dist/tool/HistoryCheck.d.mts +6 -15
- package/dist/tool/HistoryCheck.d.mts.map +1 -1
- package/dist/tool/HistoryCheck.mjs +10 -24
- package/dist/tool/HistoryCheck.mjs.map +1 -1
- package/dist/tool/Tool.d.mts +2 -2
- package/dist/tool/Tool.mjs +55 -130
- package/dist/tool/Tool.mjs.map +1 -1
- package/dist/tool/Tool.test.mjs +222 -178
- package/dist/tool/Tool.test.mjs.map +1 -1
- package/dist/tool/ToolDecision.d.mts +164 -0
- package/dist/tool/ToolDecision.d.mts.map +1 -0
- package/dist/tool/ToolDecision.mjs +146 -0
- package/dist/tool/ToolDecision.mjs.map +1 -0
- package/dist/tool/ToolDecision.test.d.mts +1 -0
- package/dist/tool/ToolDecision.test.mjs +330 -0
- package/dist/tool/ToolDecision.test.mjs.map +1 -0
- package/dist/tool/ToolEvent.d.mts +2 -2
- package/dist/tool/ToolEvent.mjs +2 -34
- package/dist/tool/ToolEvent.mjs.map +1 -1
- package/dist/tool/ToolOutput.d.mts +2 -0
- package/dist/tool/ToolOutput.mjs +128 -0
- package/dist/tool/ToolOutput.mjs.map +1 -0
- package/dist/tool/ToolOutput.test.d.mts +1 -0
- package/dist/tool/ToolOutput.test.mjs +153 -0
- package/dist/tool/ToolOutput.test.mjs.map +1 -0
- package/dist/tool/Toolkit.d.mts +2 -2
- package/dist/tool/Toolkit.mjs +230 -165
- package/dist/tool/Toolkit.mjs.map +1 -1
- package/dist/tool/Toolkit.test.mjs +433 -391
- package/dist/tool/Toolkit.test.mjs.map +1 -1
- package/dist/transcriber/Transcriber.test.mjs +3 -3
- package/dist/web-read/WebReadTool.d.mts +2 -2
- package/dist/web-read/WebReadTool.mjs +1 -0
- package/dist/web-read/WebReadTool.mjs.map +1 -1
- package/dist/web-search/WebSearchTool.d.mts +2 -2
- package/dist/web-search/WebSearchTool.mjs +1 -0
- package/dist/web-search/WebSearchTool.mjs.map +1 -1
- package/package.json +18 -10
- package/src/browser/BrowserTool.ts +5 -0
- package/src/domain/File.ts +79 -0
- package/src/domain/Image.ts +14 -4
- package/src/domain/Items.ts +39 -3
- package/src/embedding-model/EmbeddingModel.test.ts +2 -2
- package/src/index.ts +3 -2
- package/src/loop/Loop.ts +25 -14
- package/src/observability/Telemetry.test.ts +1 -1
- package/src/observability/Telemetry.ts +2 -2
- package/src/streaming/Multipart.test.ts +26 -0
- package/src/streaming/Multipart.ts +6 -5
- package/src/streaming/SSE.ts +2 -2
- package/src/streaming/WebSocketSession.test.ts +54 -2
- package/src/streaming/WebSocketSession.ts +27 -6
- package/src/structured-format/StructuredFormat.ts +1 -1
- package/src/testing/FakeWebSocket.ts +21 -6
- package/src/tool/Content.test.ts +40 -0
- package/src/tool/Content.ts +38 -0
- package/src/tool/HistoryCheck.ts +21 -26
- package/src/tool/Tool.test.ts +240 -241
- package/src/tool/Tool.ts +204 -309
- package/src/tool/ToolDecision.test.ts +301 -0
- package/src/tool/ToolDecision.ts +360 -0
- package/src/tool/ToolEvent.ts +21 -41
- package/src/tool/ToolOutput.test.ts +132 -0
- package/src/tool/ToolOutput.ts +198 -0
- package/src/tool/Toolkit.test.ts +594 -454
- package/src/tool/Toolkit.ts +631 -356
- package/src/web-read/WebReadTool.ts +2 -1
- package/src/web-search/WebSearchTool.ts +2 -1
- package/dist/Image-Cv6iBLTy.d.mts.map +0 -1
- package/dist/Items-C7MyrYPX.d.mts.map +0 -1
- package/dist/Loop-ChpaO-ya.d.mts.map +0 -1
- package/dist/Tool-BF78QWtn.d.mts +0 -314
- package/dist/Tool-BF78QWtn.d.mts.map +0 -1
- package/dist/ToolEvent-Di4a723B.d.mts +0 -144
- package/dist/ToolEvent-Di4a723B.d.mts.map +0 -1
- package/dist/ToolResult-BsYQRjmW.d.mts +0 -152
- package/dist/ToolResult-BsYQRjmW.d.mts.map +0 -1
- package/dist/Toolkit-tlL0F2YR.d.mts +0 -193
- package/dist/Toolkit-tlL0F2YR.d.mts.map +0 -1
- package/dist/dist-BaenoU1A.mjs +0 -145
- package/dist/dist-BaenoU1A.mjs.map +0 -1
- package/dist/dist-nohcnkD6.mjs +0 -182
- package/dist/dist-nohcnkD6.mjs.map +0 -1
- package/dist/magic-string.es-CB2hOw9v.mjs +0 -1014
- package/dist/magic-string.es-CB2hOw9v.mjs.map +0 -1
- package/dist/test.DNmyFkvJ-YPzDR0Co.mjs +0 -10254
- package/dist/test.DNmyFkvJ-YPzDR0Co.mjs.map +0 -1
- package/dist/tool/Approval.d.mts +0 -113
- package/dist/tool/Approval.d.mts.map +0 -1
- package/dist/tool/Approval.mjs +0 -80
- package/dist/tool/Approval.mjs.map +0 -1
- package/dist/tool/Approval.test.mjs +0 -371
- package/dist/tool/Approval.test.mjs.map +0 -1
- package/dist/tool/ToolResult.d.mts +0 -2
- package/dist/tool/ToolResult.mjs +0 -85
- package/dist/tool/ToolResult.mjs.map +0 -1
- package/dist/utils-CiH_DjFW.mjs +0 -3918
- package/dist/utils-CiH_DjFW.mjs.map +0 -1
- package/src/tool/Approval.test.ts +0 -400
- package/src/tool/Approval.ts +0 -181
- package/src/tool/ToolResult.ts +0 -114
- /package/dist/{tool/Approval.test.d.mts → streaming/Multipart.test.d.mts} +0 -0
package/dist/tool/ToolResult.mjs
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { n as __exportAll } from "../rolldown-runtime-EAsCxrDo.mjs";
|
|
2
|
-
import { toolCallOutput } from "../domain/Items.mjs";
|
|
3
|
-
import { Data } from "effect";
|
|
4
|
-
//#region src/tool/ToolResult.ts
|
|
5
|
-
/**
|
|
6
|
-
* Post-execution and synthetic tool results.
|
|
7
|
-
*
|
|
8
|
-
* - Executed tools emit ToolResult.Ok.
|
|
9
|
-
* - Approval/cancellation policy emits synthetic ToolResult.Failure.
|
|
10
|
-
*
|
|
11
|
-
* Wire conversion stays at the recipe boundary via `toToolCallOutput`
|
|
12
|
-
* so recipes can inspect, redact, or audit values before serialization.
|
|
13
|
-
*
|
|
14
|
-
* `output` and `reason` are `string`, not `unknown`: the wire wants strings,
|
|
15
|
-
* and `unknown` would invite non-serializable values (Date, Map, BigInt,
|
|
16
|
-
* fn). Recipes that want structured detail JSON.stringify themselves.
|
|
17
|
-
*/
|
|
18
|
-
var ToolResult_exports = /* @__PURE__ */ __exportAll({
|
|
19
|
-
ToolResult: () => ToolResult,
|
|
20
|
-
cancelled: () => cancelled,
|
|
21
|
-
denied: () => denied,
|
|
22
|
-
executionError: () => executionError,
|
|
23
|
-
failed: () => failed,
|
|
24
|
-
isFailure: () => isFailure,
|
|
25
|
-
isOk: () => isOk,
|
|
26
|
-
nonLocalTool: () => nonLocalTool,
|
|
27
|
-
serializeValue: () => serializeValue,
|
|
28
|
-
toToolCallOutput: () => toToolCallOutput,
|
|
29
|
-
validationError: () => validationError
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* Namespace of constructors, type guards, and matchers for `ToolResult`,
|
|
33
|
-
* provided by `Data.taggedEnum`. Use `ToolResult.$is("Ok")` for type
|
|
34
|
-
* narrowing and `ToolResult.$match({ Ok, Failure })` for exhaustive
|
|
35
|
-
* pattern matching. Synthetic-result helpers (`denied`, `cancelled`,
|
|
36
|
-
* `executionError`, `failed`) below are kinder constructors than the
|
|
37
|
-
* raw `ToolResult.Failure(...)`.
|
|
38
|
-
*/
|
|
39
|
-
const ToolResult = Data.taggedEnum();
|
|
40
|
-
const isOk = ToolResult.$is("Ok");
|
|
41
|
-
const isFailure = ToolResult.$is("Failure");
|
|
42
|
-
const failed = (call, kind, reason) => ToolResult.Failure({
|
|
43
|
-
call_id: call.call_id,
|
|
44
|
-
tool: call.name,
|
|
45
|
-
kind,
|
|
46
|
-
...reason !== void 0 ? { reason } : {}
|
|
47
|
-
});
|
|
48
|
-
/** Explicit user/policy rejection. */
|
|
49
|
-
const denied = (call, reason) => failed(call, "denied", reason);
|
|
50
|
-
/** Implicit non-answer (follow-up, inactivity, abort). */
|
|
51
|
-
const cancelled = (call, reason) => failed(call, "cancelled", reason);
|
|
52
|
-
/** Tool's own execution failed (JSON parse error, runtime crash). */
|
|
53
|
-
const executionError = (call, reason) => failed(call, "execution_error", reason);
|
|
54
|
-
/**
|
|
55
|
-
* The model called a tool that is visible to it but has no local executor — a
|
|
56
|
-
* provider-hosted, signal, or interaction tool routed through `Toolkit.run`.
|
|
57
|
-
* Distinct from `unknown_tool` (no such tool at all): the loop is expected to
|
|
58
|
-
* intercept these kinds before execution, so this kind flags a missing handler.
|
|
59
|
-
*/
|
|
60
|
-
const nonLocalTool = (call, reason) => failed(call, "non_local_tool", reason ?? `Tool "${call.name}" is visible to the model but has no local executor`);
|
|
61
|
-
/**
|
|
62
|
-
* The model's `arguments` failed the tool's input schema. Distinct kind from
|
|
63
|
-
* `execution_error` so recipes can tell a contract violation apart from a
|
|
64
|
-
* runtime crash.
|
|
65
|
-
*/
|
|
66
|
-
const validationError = (call, reason) => failed(call, "input_validation_error", reason ?? "Tool input failed schema validation");
|
|
67
|
-
/**
|
|
68
|
-
* Serialize a success value for the wire. A `string` passes through raw
|
|
69
|
-
* (models read plain text best; JSON.stringify would quote and escape it);
|
|
70
|
-
* `undefined` becomes `"null"`; anything else is JSON.
|
|
71
|
-
*/
|
|
72
|
-
const serializeValue = (value) => typeof value === "string" ? value : JSON.stringify(value ?? null);
|
|
73
|
-
/** The one failure shape the model sees: `{"error":{"kind","message"}}`. */
|
|
74
|
-
const failureBody = (kind, message) => JSON.stringify({ error: message !== void 0 ? {
|
|
75
|
-
kind,
|
|
76
|
-
message
|
|
77
|
-
} : { kind } });
|
|
78
|
-
const toToolCallOutput = (r) => ToolResult.$match(r, {
|
|
79
|
-
Ok: (v) => toolCallOutput(v.call_id, serializeValue(v.value)),
|
|
80
|
-
Failure: (f) => toolCallOutput(f.call_id, failureBody(f.kind, f.reason))
|
|
81
|
-
});
|
|
82
|
-
//#endregion
|
|
83
|
-
export { ToolResult, cancelled, denied, executionError, failed, isFailure, isOk, nonLocalTool, serializeValue, ToolResult_exports as t, toToolCallOutput, validationError };
|
|
84
|
-
|
|
85
|
-
//# sourceMappingURL=ToolResult.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolResult.mjs","names":[],"sources":["../../src/tool/ToolResult.ts"],"sourcesContent":["/**\n * Post-execution and synthetic tool results.\n *\n * - Executed tools emit ToolResult.Ok.\n * - Approval/cancellation policy emits synthetic ToolResult.Failure.\n *\n * Wire conversion stays at the recipe boundary via `toToolCallOutput`\n * so recipes can inspect, redact, or audit values before serialization.\n *\n * `output` and `reason` are `string`, not `unknown`: the wire wants strings,\n * and `unknown` would invite non-serializable values (Date, Map, BigInt,\n * fn). Recipes that want structured detail JSON.stringify themselves.\n */\nimport { Data } from \"effect\"\nimport type { ToolCall, ToolCallOutput } from \"../domain/Items.js\"\nimport { toolCallOutput } from \"../domain/Items.js\"\n\n// ---------------------------------------------------------------------------\n// ToolResult\n// ---------------------------------------------------------------------------\n\nexport type ToolResult = Data.TaggedEnum<{\n Ok: {\n readonly call_id: string\n readonly tool: string\n readonly value: unknown\n }\n Failure: {\n readonly call_id: string\n readonly tool: string\n readonly kind: string\n readonly reason?: string\n }\n}>\n\n/**\n * Namespace of constructors, type guards, and matchers for `ToolResult`,\n * provided by `Data.taggedEnum`. Use `ToolResult.$is(\"Ok\")` for type\n * narrowing and `ToolResult.$match({ Ok, Failure })` for exhaustive\n * pattern matching. Synthetic-result helpers (`denied`, `cancelled`,\n * `executionError`, `failed`) below are kinder constructors than the\n * raw `ToolResult.Failure(...)`.\n */\nexport const ToolResult = Data.taggedEnum<ToolResult>()\n\nexport const isOk = ToolResult.$is(\"Ok\")\nexport const isFailure = ToolResult.$is(\"Failure\")\n\n// Synthesizers. `denied` and `cancelled` are operationally distinct;\n// anything else is just a recipe-chosen `kind` via `failed`.\n// ---------------------------------------------------------------------------\n\nexport const failed = (call: ToolCall, kind: string, reason?: string): ToolResult =>\n ToolResult.Failure({\n call_id: call.call_id,\n tool: call.name,\n kind,\n ...(reason !== undefined ? { reason } : {}),\n })\n\n/** Explicit user/policy rejection. */\nexport const denied = (call: ToolCall, reason?: string): ToolResult =>\n failed(call, \"denied\", reason)\n\n/** Implicit non-answer (follow-up, inactivity, abort). */\nexport const cancelled = (call: ToolCall, reason?: string): ToolResult =>\n failed(call, \"cancelled\", reason)\n\n/** Tool's own execution failed (JSON parse error, runtime crash). */\nexport const executionError = (call: ToolCall, reason: string): ToolResult =>\n failed(call, \"execution_error\", reason)\n\n/**\n * The model called a tool that is visible to it but has no local executor — a\n * provider-hosted, signal, or interaction tool routed through `Toolkit.run`.\n * Distinct from `unknown_tool` (no such tool at all): the loop is expected to\n * intercept these kinds before execution, so this kind flags a missing handler.\n */\nexport const nonLocalTool = (call: ToolCall, reason?: string): ToolResult =>\n failed(\n call,\n \"non_local_tool\",\n reason ?? `Tool \"${call.name}\" is visible to the model but has no local executor`,\n )\n\n/**\n * The model's `arguments` failed the tool's input schema. Distinct kind from\n * `execution_error` so recipes can tell a contract violation apart from a\n * runtime crash.\n */\nexport const validationError = (call: ToolCall, reason?: string): ToolResult =>\n failed(call, \"input_validation_error\", reason ?? \"Tool input failed schema validation\")\n\n// ---------------------------------------------------------------------------\n// Wire conversion - the one place structured → string happens.\n// ---------------------------------------------------------------------------\n\n/**\n * Serialize a success value for the wire. A `string` passes through raw\n * (models read plain text best; JSON.stringify would quote and escape it);\n * `undefined` becomes `\"null\"`; anything else is JSON.\n */\nexport const serializeValue = (value: unknown): string =>\n typeof value === \"string\" ? value : JSON.stringify(value ?? null)\n\n/** The one failure shape the model sees: `{\"error\":{\"kind\",\"message\"}}`. */\nconst failureBody = (kind: string, message?: string): string =>\n JSON.stringify({ error: message !== undefined ? { kind, message } : { kind } })\n\nexport const toToolCallOutput = (r: ToolResult): ToolCallOutput =>\n ToolResult.$match(r, {\n Ok: (v) => toolCallOutput(v.call_id, serializeValue(v.value)),\n Failure: (f) => toolCallOutput(f.call_id, failureBody(f.kind, f.reason)),\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,aAAa,KAAK,WAAuB;AAEtD,MAAa,OAAO,WAAW,IAAI,IAAI;AACvC,MAAa,YAAY,WAAW,IAAI,SAAS;AAMjD,MAAa,UAAU,MAAgB,MAAc,WACnD,WAAW,QAAQ;CACjB,SAAS,KAAK;CACd,MAAM,KAAK;CACX;CACA,GAAI,WAAW,KAAA,IAAY,EAAE,OAAO,IAAI,CAAC;AAC3C,CAAC;;AAGH,MAAa,UAAU,MAAgB,WACrC,OAAO,MAAM,UAAU,MAAM;;AAG/B,MAAa,aAAa,MAAgB,WACxC,OAAO,MAAM,aAAa,MAAM;;AAGlC,MAAa,kBAAkB,MAAgB,WAC7C,OAAO,MAAM,mBAAmB,MAAM;;;;;;;AAQxC,MAAa,gBAAgB,MAAgB,WAC3C,OACE,MACA,kBACA,UAAU,SAAS,KAAK,KAAK,oDAC/B;;;;;;AAOF,MAAa,mBAAmB,MAAgB,WAC9C,OAAO,MAAM,0BAA0B,UAAU,qCAAqC;;;;;;AAWxF,MAAa,kBAAkB,UAC7B,OAAO,UAAU,WAAW,QAAQ,KAAK,UAAU,SAAS,IAAI;;AAGlE,MAAM,eAAe,MAAc,YACjC,KAAK,UAAU,EAAE,OAAO,YAAY,KAAA,IAAY;CAAE;CAAM;AAAQ,IAAI,EAAE,KAAK,EAAE,CAAC;AAEhF,MAAa,oBAAoB,MAC/B,WAAW,OAAO,GAAG;CACnB,KAAK,MAAM,eAAe,EAAE,SAAS,eAAe,EAAE,KAAK,CAAC;CAC5D,UAAU,MAAM,eAAe,EAAE,SAAS,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC;AACzE,CAAC"}
|