@yolk-sdk/agent 0.1.0-canary.82 → 0.1.0-canary.83
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 +1 -2
- package/dist/client/state.d.mts +48 -48
- package/dist/client/state.d.mts.map +1 -1
- package/dist/compaction/checkpoint.d.mts +2 -2
- package/dist/compaction/checkpoint.d.mts.map +1 -1
- package/dist/providers/vercel/ai-gateway-provider.d.mts +13 -0
- package/dist/providers/vercel/ai-gateway-provider.d.mts.map +1 -1
- package/dist/providers/vercel/ai-gateway-provider.mjs +2 -1
- package/dist/providers/vercel/ai-gateway-provider.mjs.map +1 -1
- package/dist/react/chat-actions.d.mts +35 -35
- package/dist/react/chat-actions.d.mts.map +1 -1
- package/dist/react/chat-items.d.mts +54 -54
- package/dist/react/chat-items.d.mts.map +1 -1
- package/dist/react/chat-messages.d.mts +85 -85
- package/dist/react/chat-messages.d.mts.map +1 -1
- package/dist/react/use-agent-chat.d.mts +1 -1
- package/dist/skillset/merge.d.mts +2 -2
- package/package.json +1 -1
- package/src/providers/vercel/ai-gateway-provider.ts +17 -2
package/README.md
CHANGED
|
@@ -262,8 +262,7 @@ Gateway API key or Vercel OIDC token as `apiKey`; `maxCompletionTokens` is sent
|
|
|
262
262
|
`VERCEL_OIDC_TOKEN`, and requires integer
|
|
263
263
|
`AI_GATEWAY_MAX_COMPLETION_TOKENS`. Model ids are opaque `provider/model` strings. Hosts may set
|
|
264
264
|
`fallbackModels`, provider `routing`, and optional `http-referer` / `x-title` attribution headers.
|
|
265
|
-
A request `reasoningEffort` is sent as Gateway `{ reasoning: { effort } }` for
|
|
266
|
-
hosts remain responsible for offering only efforts supported by the selected model. Required
|
|
265
|
+
A request `reasoningEffort` is sent as Gateway `{ reasoning: { effort } }` by default; `reasoningEffortFormat: 'reasoning-effort'` sends the literal field instead (e.g. for DeepSeek-style hosts, with an optional `thinking` toggle merged into the request body). Hosts remain responsible for offering only efforts supported by the selected model. Required
|
|
267
266
|
authorization and JSON headers cannot be replaced through `extraHeaders`. Only override
|
|
268
267
|
`chatCompletionsUrl` with a trusted proxy because it receives the bearer credential.
|
|
269
268
|
|
package/dist/client/state.d.mts
CHANGED
|
@@ -68,21 +68,6 @@ type AgentToolRun = {
|
|
|
68
68
|
readonly result: ToolResult;
|
|
69
69
|
};
|
|
70
70
|
declare const AgentToolRun: {
|
|
71
|
-
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
72
|
-
readonly _tag: "InputStreaming";
|
|
73
|
-
readonly id: string;
|
|
74
|
-
readonly name?: string;
|
|
75
|
-
readonly input: string;
|
|
76
|
-
}, "_tag">;
|
|
77
|
-
readonly InputReady: Data.TaggedEnum.ConstructorFrom<{
|
|
78
|
-
readonly _tag: "InputReady";
|
|
79
|
-
readonly call: ToolCall;
|
|
80
|
-
}, "_tag">;
|
|
81
|
-
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
82
|
-
readonly _tag: "ApprovalRequested";
|
|
83
|
-
readonly call: ToolCall;
|
|
84
|
-
readonly request?: ToolApprovalRequest;
|
|
85
|
-
}, "_tag">;
|
|
86
71
|
readonly Denied: Data.TaggedEnum.ConstructorFrom<{
|
|
87
72
|
readonly _tag: "Denied";
|
|
88
73
|
readonly toolCallId: string;
|
|
@@ -116,6 +101,21 @@ declare const AgentToolRun: {
|
|
|
116
101
|
readonly response: InputResponse;
|
|
117
102
|
readonly request?: InputRequest;
|
|
118
103
|
}, "_tag">;
|
|
104
|
+
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
105
|
+
readonly _tag: "InputStreaming";
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly name?: string;
|
|
108
|
+
readonly input: string;
|
|
109
|
+
}, "_tag">;
|
|
110
|
+
readonly InputReady: Data.TaggedEnum.ConstructorFrom<{
|
|
111
|
+
readonly _tag: "InputReady";
|
|
112
|
+
readonly call: ToolCall;
|
|
113
|
+
}, "_tag">;
|
|
114
|
+
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
115
|
+
readonly _tag: "ApprovalRequested";
|
|
116
|
+
readonly call: ToolCall;
|
|
117
|
+
readonly request?: ToolApprovalRequest;
|
|
118
|
+
}, "_tag">;
|
|
119
119
|
readonly Executing: Data.TaggedEnum.ConstructorFrom<{
|
|
120
120
|
readonly _tag: "Executing";
|
|
121
121
|
readonly call: ToolCall;
|
|
@@ -146,7 +146,7 @@ declare const AgentToolRun: {
|
|
|
146
146
|
readonly call: ToolCall;
|
|
147
147
|
readonly result: ToolResult;
|
|
148
148
|
}, "_tag">;
|
|
149
|
-
readonly $is: <Tag extends "
|
|
149
|
+
readonly $is: <Tag extends "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "InputReady" | "ApprovalRequested" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
150
150
|
readonly _tag: "InputStreaming";
|
|
151
151
|
readonly id: string;
|
|
152
152
|
readonly name?: string;
|
|
@@ -242,21 +242,6 @@ declare const AgentToolRun: {
|
|
|
242
242
|
}>;
|
|
243
243
|
readonly $match: {
|
|
244
244
|
<Cases extends {
|
|
245
|
-
readonly InputStreaming: (args: {
|
|
246
|
-
readonly _tag: "InputStreaming";
|
|
247
|
-
readonly id: string;
|
|
248
|
-
readonly name?: string;
|
|
249
|
-
readonly input: string;
|
|
250
|
-
}) => any;
|
|
251
|
-
readonly InputReady: (args: {
|
|
252
|
-
readonly _tag: "InputReady";
|
|
253
|
-
readonly call: ToolCall;
|
|
254
|
-
}) => any;
|
|
255
|
-
readonly ApprovalRequested: (args: {
|
|
256
|
-
readonly _tag: "ApprovalRequested";
|
|
257
|
-
readonly call: ToolCall;
|
|
258
|
-
readonly request?: ToolApprovalRequest;
|
|
259
|
-
}) => any;
|
|
260
245
|
readonly Denied: (args: {
|
|
261
246
|
readonly _tag: "Denied";
|
|
262
247
|
readonly toolCallId: string;
|
|
@@ -290,6 +275,21 @@ declare const AgentToolRun: {
|
|
|
290
275
|
readonly response: InputResponse;
|
|
291
276
|
readonly request?: InputRequest;
|
|
292
277
|
}) => any;
|
|
278
|
+
readonly InputStreaming: (args: {
|
|
279
|
+
readonly _tag: "InputStreaming";
|
|
280
|
+
readonly id: string;
|
|
281
|
+
readonly name?: string;
|
|
282
|
+
readonly input: string;
|
|
283
|
+
}) => any;
|
|
284
|
+
readonly InputReady: (args: {
|
|
285
|
+
readonly _tag: "InputReady";
|
|
286
|
+
readonly call: ToolCall;
|
|
287
|
+
}) => any;
|
|
288
|
+
readonly ApprovalRequested: (args: {
|
|
289
|
+
readonly _tag: "ApprovalRequested";
|
|
290
|
+
readonly call: ToolCall;
|
|
291
|
+
readonly request?: ToolApprovalRequest;
|
|
292
|
+
}) => any;
|
|
293
293
|
readonly Executing: (args: {
|
|
294
294
|
readonly _tag: "Executing";
|
|
295
295
|
readonly call: ToolCall;
|
|
@@ -320,23 +320,8 @@ declare const AgentToolRun: {
|
|
|
320
320
|
readonly call: ToolCall;
|
|
321
321
|
readonly result: ToolResult;
|
|
322
322
|
}) => any;
|
|
323
|
-
}>(cases: Cases): (value: AgentToolRun) => import("effect/Unify").Unify<ReturnType<Cases["
|
|
323
|
+
}>(cases: Cases): (value: AgentToolRun) => import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "InputReady" | "ApprovalRequested" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted"]>>;
|
|
324
324
|
<Cases extends {
|
|
325
|
-
readonly InputStreaming: (args: {
|
|
326
|
-
readonly _tag: "InputStreaming";
|
|
327
|
-
readonly id: string;
|
|
328
|
-
readonly name?: string;
|
|
329
|
-
readonly input: string;
|
|
330
|
-
}) => any;
|
|
331
|
-
readonly InputReady: (args: {
|
|
332
|
-
readonly _tag: "InputReady";
|
|
333
|
-
readonly call: ToolCall;
|
|
334
|
-
}) => any;
|
|
335
|
-
readonly ApprovalRequested: (args: {
|
|
336
|
-
readonly _tag: "ApprovalRequested";
|
|
337
|
-
readonly call: ToolCall;
|
|
338
|
-
readonly request?: ToolApprovalRequest;
|
|
339
|
-
}) => any;
|
|
340
325
|
readonly Denied: (args: {
|
|
341
326
|
readonly _tag: "Denied";
|
|
342
327
|
readonly toolCallId: string;
|
|
@@ -370,6 +355,21 @@ declare const AgentToolRun: {
|
|
|
370
355
|
readonly response: InputResponse;
|
|
371
356
|
readonly request?: InputRequest;
|
|
372
357
|
}) => any;
|
|
358
|
+
readonly InputStreaming: (args: {
|
|
359
|
+
readonly _tag: "InputStreaming";
|
|
360
|
+
readonly id: string;
|
|
361
|
+
readonly name?: string;
|
|
362
|
+
readonly input: string;
|
|
363
|
+
}) => any;
|
|
364
|
+
readonly InputReady: (args: {
|
|
365
|
+
readonly _tag: "InputReady";
|
|
366
|
+
readonly call: ToolCall;
|
|
367
|
+
}) => any;
|
|
368
|
+
readonly ApprovalRequested: (args: {
|
|
369
|
+
readonly _tag: "ApprovalRequested";
|
|
370
|
+
readonly call: ToolCall;
|
|
371
|
+
readonly request?: ToolApprovalRequest;
|
|
372
|
+
}) => any;
|
|
373
373
|
readonly Executing: (args: {
|
|
374
374
|
readonly _tag: "Executing";
|
|
375
375
|
readonly call: ToolCall;
|
|
@@ -400,7 +400,7 @@ declare const AgentToolRun: {
|
|
|
400
400
|
readonly call: ToolCall;
|
|
401
401
|
readonly result: ToolResult;
|
|
402
402
|
}) => any;
|
|
403
|
-
}>(value: AgentToolRun, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["
|
|
403
|
+
}>(value: AgentToolRun, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "InputReady" | "ApprovalRequested" | "Executing" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted"]>>;
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
406
|
type AgentClientState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.mts","names":[],"sources":["../../src/client/state.ts"],"mappings":";;;;KAkBY,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,SAA4B,IAAA,EAAM,QAAA;EAAA,SAAmB,WAAA;AAAA;EAAA,SAErD,IAAA;EAAA,SACA,IAAA,EAAM,QAAA;EAAA,SACN,MAAA,EAAQ,UAAA;EAAA,SACR,WAAA;EAAA,SACA,SAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,IAAA,EAAM,QAAA;EAAA,SACN,MAAA,EAAQ,UAAA;EAAA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A,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"}
|
|
@@ -18,8 +18,8 @@ declare const makeCompactionCheckpointText: (input: CompactionCheckpointInput) =
|
|
|
18
18
|
declare const makeCompactionCheckpointMessage: (input: CompactionCheckpointInput) => UserMessage;
|
|
19
19
|
declare const isCompactionCheckpointText: (value: string) => boolean;
|
|
20
20
|
declare const isCompactionCheckpointMessage: (message: AgentMessage) => boolean;
|
|
21
|
-
declare const dropLeadingCompactionCheckpointMessage: (messages: ReadonlyArray<AgentMessage>) => readonly (
|
|
22
|
-
declare const compactionSummarySourceMessages: (input: CompactionSummarySourceMessageOptions) => readonly (
|
|
21
|
+
declare const dropLeadingCompactionCheckpointMessage: (messages: ReadonlyArray<AgentMessage>) => readonly (import("@yolk-sdk/agent/protocol").ToolResultMessage | UserMessage | import("@yolk-sdk/agent/protocol").AssistantAgentMessage)[];
|
|
22
|
+
declare const compactionSummarySourceMessages: (input: CompactionSummarySourceMessageOptions) => readonly (import("@yolk-sdk/agent/protocol").ToolResultMessage | UserMessage | import("@yolk-sdk/agent/protocol").AssistantAgentMessage)[];
|
|
23
23
|
//#endregion
|
|
24
24
|
export { CompactionCheckpointInput, CompactionSummarySourceMessageOptions, compactionCheckpointCloseTag, compactionCheckpointOpenTag, compactionSummarySourceMessages, defaultCompactionCheckpointHeader, dropLeadingCompactionCheckpointMessage, isCompactionCheckpointMessage, isCompactionCheckpointText, makeCompactionCheckpointMessage, makeCompactionCheckpointText };
|
|
25
25
|
//# sourceMappingURL=checkpoint.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint.d.mts","names":[],"sources":["../../src/compaction/checkpoint.ts"],"mappings":";;;cAGa,2BAAA;AAAA,cAEA,4BAAA;AAAA,cAEA,iCAAA;AAAA,KAGD,yBAAA;EAAA,SACD,OAAA;EAAA,SACA,MAAA;EAAA,SACA,MAAA;EAAA,SACA,WAAA;AAAA;AAAA,KAGC,qCAAA;EAAA,SACD,kBAAA;EAAA,SACA,QAAA,EAAU,aAAa,CAAC,YAAA;AAAA;AAAA,cAGtB,4BAAA,GAAgC,KAAgC,EAAzB,yBAAyB;AAAA,cAkBhE,+BAAA,GAAmC,KAAA,EAAO,yBAAA,KAAyB,WAa7E;AAAA,cAEU,0BAAA,GAA8B,KAAa;AAAA,cAG3C,6BAAA,GAAiC,OAAqB,EAAZ,YAAY;AAAA,cAGtD,sCAAA,GAA0C,QAAA,EAAU,aAAA,CAAc,YAAA,
|
|
1
|
+
{"version":3,"file":"checkpoint.d.mts","names":[],"sources":["../../src/compaction/checkpoint.ts"],"mappings":";;;cAGa,2BAAA;AAAA,cAEA,4BAAA;AAAA,cAEA,iCAAA;AAAA,KAGD,yBAAA;EAAA,SACD,OAAA;EAAA,SACA,MAAA;EAAA,SACA,MAAA;EAAA,SACA,WAAA;AAAA;AAAA,KAGC,qCAAA;EAAA,SACD,kBAAA;EAAA,SACA,QAAA,EAAU,aAAa,CAAC,YAAA;AAAA;AAAA,cAGtB,4BAAA,GAAgC,KAAgC,EAAzB,yBAAyB;AAAA,cAkBhE,+BAAA,GAAmC,KAAA,EAAO,yBAAA,KAAyB,WAa7E;AAAA,cAEU,0BAAA,GAA8B,KAAa;AAAA,cAG3C,6BAAA,GAAiC,OAAqB,EAAZ,YAAY;AAAA,cAGtD,sCAAA,GAA0C,QAAA,EAAU,aAAA,CAAc,YAAA,mDAAa,iBAAA,GAAA,WAAA,sCAAA,qBAAA;AAAA,cAM/E,+BAAA,GAAmC,KAAA,EAAO,qCAAA,kDAAqC,iBAAA,GAAA,WAAA,sCAAA,qBAAA"}
|
|
@@ -30,6 +30,19 @@ type VercelAiGatewayProviderConfig = {
|
|
|
30
30
|
* Defaults to false; reasoning output is otherwise dropped.
|
|
31
31
|
*/
|
|
32
32
|
readonly reasoningContent?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Override the reasoning-effort wire format. Defaults to the Anthropic
|
|
35
|
+
* `reasoning` object; DeepSeek-style hosts expect the literal
|
|
36
|
+
* `reasoning_effort` field instead.
|
|
37
|
+
*/
|
|
38
|
+
readonly reasoningEffortFormat?: 'reasoning-object' | 'reasoning-effort';
|
|
39
|
+
/**
|
|
40
|
+
* DeepSeek-style thinking toggle, merged into the request body (e.g.
|
|
41
|
+
* `{ type: 'enabled' }`). Omitted unless a host documents it.
|
|
42
|
+
*/
|
|
43
|
+
readonly thinking?: {
|
|
44
|
+
readonly type: 'enabled' | 'disabled';
|
|
45
|
+
};
|
|
33
46
|
};
|
|
34
47
|
declare const makeVercelAiGatewayProviderLayer: (config: VercelAiGatewayProviderConfig) => Layer.Layer<import("@yolk-sdk/agent/loop").LLMProvider, never, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
35
48
|
declare const VercelAiGatewayProviderLayer: Layer.Layer<import("@yolk-sdk/agent/loop").LLMProvider, LLMError, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-gateway-provider.d.mts","names":[],"sources":["../../../src/providers/vercel/ai-gateway-provider.ts"],"mappings":";;;;cAMa,yBAAA;AAAA,cAEA,iCAAA;AAAA,KAED,2BAAA;AAAA,KAEA,6BAAA;EAAA,SACD,KAAA,GAAQ,aAAA;EAAA,SACR,IAAA,GAAO,aAAA;EAAA,SACP,IAAA,GAAO,2BAAA;AAAA;AAAA,KAGN,6BAAA;8EAED,MAAA,EAAQ,QAAA,CAAS,QAAA;EAAA,SACjB,mBAAA;EAAA,SACA,cAAA,GAAiB,aAAA;EAAA,SACjB,OAAA,GAAU,6BAAA;EAAA,SACV,YAAA,GAAe,QAAA,CAAS,MAAA,mBAdI;EAAA,SAgB5B,kBAAA;EAdC;;;;;EAAA,SAoBD,SAAA;EAjBkC;;;;;;EAAA,SAwBlC,gBAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ai-gateway-provider.d.mts","names":[],"sources":["../../../src/providers/vercel/ai-gateway-provider.ts"],"mappings":";;;;cAMa,yBAAA;AAAA,cAEA,iCAAA;AAAA,KAED,2BAAA;AAAA,KAEA,6BAAA;EAAA,SACD,KAAA,GAAQ,aAAA;EAAA,SACR,IAAA,GAAO,aAAA;EAAA,SACP,IAAA,GAAO,2BAAA;AAAA;AAAA,KAGN,6BAAA;8EAED,MAAA,EAAQ,QAAA,CAAS,QAAA;EAAA,SACjB,mBAAA;EAAA,SACA,cAAA,GAAiB,aAAA;EAAA,SACjB,OAAA,GAAU,6BAAA;EAAA,SACV,YAAA,GAAe,QAAA,CAAS,MAAA,mBAdI;EAAA,SAgB5B,kBAAA;EAdC;;;;;EAAA,SAoBD,SAAA;EAjBkC;;;;;;EAAA,SAwBlC,gBAAA;EAxBO;;AAA2B;AAG7C;;EAHkB,SA8BP,qBAAA;EAzBQ;;;;EAAA,SA8BR,QAAA;IAAA,SAAsB,IAAA;EAAA;AAAA;AAAA,cAqDpB,gCAAA,GAAoC,MAAA,EAAQ,6BAAA,KAA6B,KAAA,CAAA,KAAA,gCAAA,WAAA,mDAAA,UAAA;AAAA,cAgDzE,4BAAA,EAA4B,KAAA,CAAA,KAAA,gCAAA,WAAA,EAAA,QAAA"}
|
|
@@ -11,6 +11,7 @@ const vercelAiGatewayProviderIdentity = {
|
|
|
11
11
|
};
|
|
12
12
|
const gatewayExtraBody = (config) => {
|
|
13
13
|
const extras = {};
|
|
14
|
+
if (config.thinking !== void 0) extras.thinking = { type: config.thinking.type };
|
|
14
15
|
if (config.fallbackModels !== void 0) extras.models = [...config.fallbackModels];
|
|
15
16
|
if (config.routing !== void 0) {
|
|
16
17
|
const gateway = {};
|
|
@@ -26,7 +27,7 @@ const makeVercelAiGatewayProviderLayer = (config) => makeOpenAiProviderLayer((()
|
|
|
26
27
|
apiKey: config.apiKey,
|
|
27
28
|
maxCompletionTokens: config.maxCompletionTokens,
|
|
28
29
|
completionTokenField: "max_tokens",
|
|
29
|
-
reasoningEffortFormat: "reasoning-object",
|
|
30
|
+
reasoningEffortFormat: config.reasoningEffortFormat ?? "reasoning-object",
|
|
30
31
|
chatCompletionsUrl: config.chatCompletionsUrl ?? "https://ai-gateway.vercel.sh/v1/chat/completions",
|
|
31
32
|
providerIdentity: vercelAiGatewayProviderIdentity,
|
|
32
33
|
extraBody: gatewayExtraBody(config)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-gateway-provider.mjs","names":[],"sources":["../../../src/providers/vercel/ai-gateway-provider.ts"],"sourcesContent":["import { Config, Effect, Layer, type Redacted } from 'effect'\nimport type * as Schema from 'effect/Schema'\nimport { FetchHttpClient } from 'effect/unstable/http'\nimport { LLMError } from '@yolk-sdk/agent/loop'\nimport { makeOpenAiProviderLayer, type OpenAiRequestExtras } from '../openai/provider.ts'\n\nexport const vercelAiGatewayProviderId = 'vercel_ai_gateway'\n\nexport const vercelAiGatewayChatCompletionsUrl = 'https://ai-gateway.vercel.sh/v1/chat/completions'\n\nexport type VercelAiGatewayProviderSort = 'cost' | 'ttft' | 'tps'\n\nexport type VercelAiGatewayRoutingOptions = {\n readonly order?: ReadonlyArray<string>\n readonly only?: ReadonlyArray<string>\n readonly sort?: VercelAiGatewayProviderSort\n}\n\nexport type VercelAiGatewayProviderConfig = {\n /** Accepts either an AI Gateway API key or a Vercel OIDC token. */\n readonly apiKey: Redacted.Redacted<string>\n readonly maxCompletionTokens: number\n readonly fallbackModels?: ReadonlyArray<string>\n readonly routing?: VercelAiGatewayRoutingOptions\n readonly extraHeaders?: Readonly<Record<string, string>>\n /** Override only with a trusted proxy because the bearer credential is sent to this URL. */\n readonly chatCompletionsUrl?: string\n /**\n * Forwarded to the OpenAI-compatible transport: true streams SSE deltas,\n * otherwise the provider resolves a single JSON completion. Defaults to\n * false to preserve existing non-streaming consumers.\n */\n readonly streaming?: boolean\n /**\n * Preserve compatible models' reasoning_content output and assistant\n * replay. When true, streamed reasoning deltas surface as reasoning\n * events (and replay into later requests, which spends input tokens).\n * Defaults to false; reasoning output is otherwise dropped.\n */\n readonly reasoningContent?: boolean\n}\n\nconst vercelAiGatewayProviderIdentity = {\n id: vercelAiGatewayProviderId,\n name: 'Vercel AI Gateway'\n}\n\nconst gatewayExtraBody = (config: VercelAiGatewayProviderConfig): OpenAiRequestExtras => {\n const extras: { [key: string]: Schema.Json } = {}\n\n if (config.fallbackModels !== undefined) {\n extras.models = [...config.fallbackModels]\n }\n\n if (config.routing !== undefined) {\n const gateway: { [key: string]: Schema.Json } = {}\n\n if (config.routing.order !== undefined) {\n gateway.order = [...config.routing.order]\n }\n\n if (config.routing.only !== undefined) {\n gateway.only = [...config.routing.only]\n }\n\n if (config.routing.sort !== undefined) {\n gateway.sort = config.routing.sort\n }\n\n extras.providerOptions = { gateway }\n }\n\n return extras\n}\n\ntype VercelAiGatewayOpenAiLayerFields = {\n apiKey: VercelAiGatewayProviderConfig['apiKey']\n maxCompletionTokens: number\n completionTokenField: 'max_tokens'\n reasoningEffortFormat: 'reasoning-object'\n chatCompletionsUrl: string\n providerIdentity: typeof vercelAiGatewayProviderIdentity\n extraBody: OpenAiRequestExtras\n extraHeaders?: VercelAiGatewayProviderConfig['extraHeaders']\n streaming?: VercelAiGatewayProviderConfig['streaming']\n reasoningContent?: VercelAiGatewayProviderConfig['reasoningContent']\n}\n\nexport const makeVercelAiGatewayProviderLayer = (config: VercelAiGatewayProviderConfig) =>\n makeOpenAiProviderLayer(\n (() => {\n const fields: VercelAiGatewayOpenAiLayerFields = {\n apiKey: config.apiKey,\n maxCompletionTokens: config.maxCompletionTokens,\n completionTokenField: 'max_tokens',\n reasoningEffortFormat: 'reasoning-object',\n chatCompletionsUrl: config.chatCompletionsUrl ?? vercelAiGatewayChatCompletionsUrl,\n providerIdentity: vercelAiGatewayProviderIdentity,\n extraBody: gatewayExtraBody(config)\n }\n\n if (config.extraHeaders !== undefined) {\n fields.extraHeaders = config.extraHeaders\n }\n\n if (config.streaming !== undefined) {\n fields.streaming = config.streaming\n }\n\n if (config.reasoningContent !== undefined) {\n fields.reasoningContent = config.reasoningContent\n }\n\n return fields\n })()\n )\n\nconst vercelAiGatewayEnvironmentConfig = Effect.gen(function* () {\n const apiKey = yield* Config.Redacted('AI_GATEWAY_API_KEY').pipe(\n Config.orElse(() => Config.Redacted('VERCEL_OIDC_TOKEN'))\n )\n\n const maxCompletionTokens = yield* Config.Int('AI_GATEWAY_MAX_COMPLETION_TOKENS')\n\n return { apiKey, maxCompletionTokens }\n}).pipe(\n Effect.mapError(\n () =>\n new LLMError({\n cause: 'provider_error',\n message: 'Vercel AI Gateway environment configuration missing',\n retryable: false\n })\n )\n)\n\nexport const VercelAiGatewayProviderLayer = Layer.unwrap(\n vercelAiGatewayEnvironmentConfig.pipe(Effect.map(makeVercelAiGatewayProviderLayer))\n).pipe(Layer.provide(FetchHttpClient.layer))\n"],"mappings":";;;;;AAMA,MAAa,4BAA4B;AAEzC,MAAa,oCAAoC;
|
|
1
|
+
{"version":3,"file":"ai-gateway-provider.mjs","names":[],"sources":["../../../src/providers/vercel/ai-gateway-provider.ts"],"sourcesContent":["import { Config, Effect, Layer, type Redacted } from 'effect'\nimport type * as Schema from 'effect/Schema'\nimport { FetchHttpClient } from 'effect/unstable/http'\nimport { LLMError } from '@yolk-sdk/agent/loop'\nimport { makeOpenAiProviderLayer, type OpenAiRequestExtras } from '../openai/provider.ts'\n\nexport const vercelAiGatewayProviderId = 'vercel_ai_gateway'\n\nexport const vercelAiGatewayChatCompletionsUrl = 'https://ai-gateway.vercel.sh/v1/chat/completions'\n\nexport type VercelAiGatewayProviderSort = 'cost' | 'ttft' | 'tps'\n\nexport type VercelAiGatewayRoutingOptions = {\n readonly order?: ReadonlyArray<string>\n readonly only?: ReadonlyArray<string>\n readonly sort?: VercelAiGatewayProviderSort\n}\n\nexport type VercelAiGatewayProviderConfig = {\n /** Accepts either an AI Gateway API key or a Vercel OIDC token. */\n readonly apiKey: Redacted.Redacted<string>\n readonly maxCompletionTokens: number\n readonly fallbackModels?: ReadonlyArray<string>\n readonly routing?: VercelAiGatewayRoutingOptions\n readonly extraHeaders?: Readonly<Record<string, string>>\n /** Override only with a trusted proxy because the bearer credential is sent to this URL. */\n readonly chatCompletionsUrl?: string\n /**\n * Forwarded to the OpenAI-compatible transport: true streams SSE deltas,\n * otherwise the provider resolves a single JSON completion. Defaults to\n * false to preserve existing non-streaming consumers.\n */\n readonly streaming?: boolean\n /**\n * Preserve compatible models' reasoning_content output and assistant\n * replay. When true, streamed reasoning deltas surface as reasoning\n * events (and replay into later requests, which spends input tokens).\n * Defaults to false; reasoning output is otherwise dropped.\n */\n readonly reasoningContent?: boolean\n /**\n * Override the reasoning-effort wire format. Defaults to the Anthropic\n * `reasoning` object; DeepSeek-style hosts expect the literal\n * `reasoning_effort` field instead.\n */\n readonly reasoningEffortFormat?: 'reasoning-object' | 'reasoning-effort'\n /**\n * DeepSeek-style thinking toggle, merged into the request body (e.g.\n * `{ type: 'enabled' }`). Omitted unless a host documents it.\n */\n readonly thinking?: { readonly type: 'enabled' | 'disabled' }\n}\n\nconst vercelAiGatewayProviderIdentity = {\n id: vercelAiGatewayProviderId,\n name: 'Vercel AI Gateway'\n}\n\nconst gatewayExtraBody = (config: VercelAiGatewayProviderConfig): OpenAiRequestExtras => {\n const extras: { [key: string]: Schema.Json } = {}\n\n if (config.thinking !== undefined) {\n extras.thinking = { type: config.thinking.type }\n }\n\n if (config.fallbackModels !== undefined) {\n extras.models = [...config.fallbackModels]\n }\n\n if (config.routing !== undefined) {\n const gateway: { [key: string]: Schema.Json } = {}\n\n if (config.routing.order !== undefined) {\n gateway.order = [...config.routing.order]\n }\n\n if (config.routing.only !== undefined) {\n gateway.only = [...config.routing.only]\n }\n\n if (config.routing.sort !== undefined) {\n gateway.sort = config.routing.sort\n }\n\n extras.providerOptions = { gateway }\n }\n\n return extras\n}\n\ntype VercelAiGatewayOpenAiLayerFields = {\n apiKey: VercelAiGatewayProviderConfig['apiKey']\n maxCompletionTokens: number\n completionTokenField: 'max_tokens'\n reasoningEffortFormat: 'reasoning-object' | 'reasoning-effort'\n chatCompletionsUrl: string\n providerIdentity: typeof vercelAiGatewayProviderIdentity\n extraBody: OpenAiRequestExtras\n extraHeaders?: VercelAiGatewayProviderConfig['extraHeaders']\n streaming?: VercelAiGatewayProviderConfig['streaming']\n reasoningContent?: VercelAiGatewayProviderConfig['reasoningContent']\n}\n\nexport const makeVercelAiGatewayProviderLayer = (config: VercelAiGatewayProviderConfig) =>\n makeOpenAiProviderLayer(\n (() => {\n const fields: VercelAiGatewayOpenAiLayerFields = {\n apiKey: config.apiKey,\n maxCompletionTokens: config.maxCompletionTokens,\n completionTokenField: 'max_tokens',\n reasoningEffortFormat: config.reasoningEffortFormat ?? 'reasoning-object',\n chatCompletionsUrl: config.chatCompletionsUrl ?? vercelAiGatewayChatCompletionsUrl,\n providerIdentity: vercelAiGatewayProviderIdentity,\n extraBody: gatewayExtraBody(config)\n }\n\n if (config.extraHeaders !== undefined) {\n fields.extraHeaders = config.extraHeaders\n }\n\n if (config.streaming !== undefined) {\n fields.streaming = config.streaming\n }\n\n if (config.reasoningContent !== undefined) {\n fields.reasoningContent = config.reasoningContent\n }\n\n return fields\n })()\n )\n\nconst vercelAiGatewayEnvironmentConfig = Effect.gen(function* () {\n const apiKey = yield* Config.Redacted('AI_GATEWAY_API_KEY').pipe(\n Config.orElse(() => Config.Redacted('VERCEL_OIDC_TOKEN'))\n )\n\n const maxCompletionTokens = yield* Config.Int('AI_GATEWAY_MAX_COMPLETION_TOKENS')\n\n return { apiKey, maxCompletionTokens }\n}).pipe(\n Effect.mapError(\n () =>\n new LLMError({\n cause: 'provider_error',\n message: 'Vercel AI Gateway environment configuration missing',\n retryable: false\n })\n )\n)\n\nexport const VercelAiGatewayProviderLayer = Layer.unwrap(\n vercelAiGatewayEnvironmentConfig.pipe(Effect.map(makeVercelAiGatewayProviderLayer))\n).pipe(Layer.provide(FetchHttpClient.layer))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AS,mBAAmB,CAAC,CAC1D;EAIiB,qBAAA,OAFkB,OAAO,IAAI,kCAAkC;CAE3C;AACvC,CAAC,EAAE,KACD,OAAO,eAEH,IAAI,SAAS;CACX,OAAO;CACP,SAAS;CACT,WAAW;AACb,CAAC,CACL,CACF;AAEA,MAAa,+BAA+B,MAAM,OAChD,iCAAiC,KAAK,OAAO,IAAI,gCAAgC,CAAC,CACpF,EAAE,KAAK,MAAM,QAAQ,gBAAgB,KAAK,CAAC"}
|
|
@@ -15,6 +15,10 @@ declare const AgentChatAction: {
|
|
|
15
15
|
readonly _tag: "Error";
|
|
16
16
|
readonly message: string;
|
|
17
17
|
}, "_tag">;
|
|
18
|
+
readonly SubmitHitlResponse: Data.TaggedEnum.ConstructorFrom<{
|
|
19
|
+
readonly _tag: "SubmitHitlResponse";
|
|
20
|
+
readonly response: HitlResponse;
|
|
21
|
+
}, "_tag">;
|
|
18
22
|
readonly HydrateMessage: Data.TaggedEnum.ConstructorFrom<{
|
|
19
23
|
readonly _tag: "HydrateMessage";
|
|
20
24
|
readonly message: AgentMessage;
|
|
@@ -27,10 +31,6 @@ declare const AgentChatAction: {
|
|
|
27
31
|
readonly _tag: "AppendMessage";
|
|
28
32
|
readonly message: AgentMessage;
|
|
29
33
|
}, "_tag">;
|
|
30
|
-
readonly SubmitHitlResponse: Data.TaggedEnum.ConstructorFrom<{
|
|
31
|
-
readonly _tag: "SubmitHitlResponse";
|
|
32
|
-
readonly response: HitlResponse;
|
|
33
|
-
}, "_tag">;
|
|
34
34
|
readonly DeleteTurn: Data.TaggedEnum.ConstructorFrom<{
|
|
35
35
|
readonly _tag: "DeleteTurn";
|
|
36
36
|
readonly messageId: string;
|
|
@@ -51,7 +51,7 @@ declare const AgentChatAction: {
|
|
|
51
51
|
readonly Abort: Data.TaggedEnum.ConstructorFrom<{
|
|
52
52
|
readonly _tag: "Abort";
|
|
53
53
|
}, "_tag">;
|
|
54
|
-
readonly $is: <Tag extends "Error" | "
|
|
54
|
+
readonly $is: <Tag extends "Error" | "SubmitHitlResponse" | "HydrateMessage" | "Submit" | "AppendMessage" | "DeleteTurn" | "RegenerateFrom" | "EditUserMessage" | "Event" | "Abort">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
55
55
|
readonly _tag: "HydrateMessage";
|
|
56
56
|
readonly message: AgentMessage;
|
|
57
57
|
}, {
|
|
@@ -108,6 +108,10 @@ declare const AgentChatAction: {
|
|
|
108
108
|
readonly _tag: "Error";
|
|
109
109
|
readonly message: string;
|
|
110
110
|
}) => any;
|
|
111
|
+
readonly SubmitHitlResponse: (args: {
|
|
112
|
+
readonly _tag: "SubmitHitlResponse";
|
|
113
|
+
readonly response: HitlResponse;
|
|
114
|
+
}) => any;
|
|
111
115
|
readonly HydrateMessage: (args: {
|
|
112
116
|
readonly _tag: "HydrateMessage";
|
|
113
117
|
readonly message: AgentMessage;
|
|
@@ -120,10 +124,6 @@ declare const AgentChatAction: {
|
|
|
120
124
|
readonly _tag: "AppendMessage";
|
|
121
125
|
readonly message: AgentMessage;
|
|
122
126
|
}) => any;
|
|
123
|
-
readonly SubmitHitlResponse: (args: {
|
|
124
|
-
readonly _tag: "SubmitHitlResponse";
|
|
125
|
-
readonly response: HitlResponse;
|
|
126
|
-
}) => any;
|
|
127
127
|
readonly DeleteTurn: (args: {
|
|
128
128
|
readonly _tag: "DeleteTurn";
|
|
129
129
|
readonly messageId: string;
|
|
@@ -144,12 +144,16 @@ declare const AgentChatAction: {
|
|
|
144
144
|
readonly Abort: (args: {
|
|
145
145
|
readonly _tag: "Abort";
|
|
146
146
|
}) => any;
|
|
147
|
-
}>(cases: Cases): (value: AgentChatAction$1) => import("effect/Unify").Unify<ReturnType<Cases["Error" | "
|
|
147
|
+
}>(cases: Cases): (value: AgentChatAction$1) => import("effect/Unify").Unify<ReturnType<Cases["Error" | "SubmitHitlResponse" | "HydrateMessage" | "Submit" | "AppendMessage" | "DeleteTurn" | "RegenerateFrom" | "EditUserMessage" | "Event" | "Abort"]>>;
|
|
148
148
|
<Cases extends {
|
|
149
149
|
readonly Error: (args: {
|
|
150
150
|
readonly _tag: "Error";
|
|
151
151
|
readonly message: string;
|
|
152
152
|
}) => any;
|
|
153
|
+
readonly SubmitHitlResponse: (args: {
|
|
154
|
+
readonly _tag: "SubmitHitlResponse";
|
|
155
|
+
readonly response: HitlResponse;
|
|
156
|
+
}) => any;
|
|
153
157
|
readonly HydrateMessage: (args: {
|
|
154
158
|
readonly _tag: "HydrateMessage";
|
|
155
159
|
readonly message: AgentMessage;
|
|
@@ -162,10 +166,6 @@ declare const AgentChatAction: {
|
|
|
162
166
|
readonly _tag: "AppendMessage";
|
|
163
167
|
readonly message: AgentMessage;
|
|
164
168
|
}) => any;
|
|
165
|
-
readonly SubmitHitlResponse: (args: {
|
|
166
|
-
readonly _tag: "SubmitHitlResponse";
|
|
167
|
-
readonly response: HitlResponse;
|
|
168
|
-
}) => any;
|
|
169
169
|
readonly DeleteTurn: (args: {
|
|
170
170
|
readonly _tag: "DeleteTurn";
|
|
171
171
|
readonly messageId: string;
|
|
@@ -186,21 +186,21 @@ declare const AgentChatAction: {
|
|
|
186
186
|
readonly Abort: (args: {
|
|
187
187
|
readonly _tag: "Abort";
|
|
188
188
|
}) => any;
|
|
189
|
-
}>(value: AgentChatAction$1, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Error" | "
|
|
189
|
+
}>(value: AgentChatAction$1, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Error" | "SubmitHitlResponse" | "HydrateMessage" | "Submit" | "AppendMessage" | "DeleteTurn" | "RegenerateFrom" | "EditUserMessage" | "Event" | "Abort"]>>;
|
|
190
190
|
};
|
|
191
191
|
};
|
|
192
192
|
type AgentChatSubmitResult = AgentChatSubmitResult$1;
|
|
193
193
|
declare const AgentChatSubmitResult: {
|
|
194
|
+
readonly Ignored: Data.TaggedEnum.ConstructorFrom<{
|
|
195
|
+
readonly _tag: "Ignored";
|
|
196
|
+
}, "_tag">;
|
|
194
197
|
readonly Submitted: Data.TaggedEnum.ConstructorFrom<{
|
|
195
198
|
readonly _tag: "Submitted";
|
|
196
199
|
readonly content: Content;
|
|
197
200
|
readonly message: UserMessage;
|
|
198
201
|
readonly messages: AgentTranscript;
|
|
199
202
|
}, "_tag">;
|
|
200
|
-
readonly Ignored:
|
|
201
|
-
readonly _tag: "Ignored";
|
|
202
|
-
}, "_tag">;
|
|
203
|
-
readonly $is: <Tag extends "Submitted" | "Ignored">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
203
|
+
readonly $is: <Tag extends "Ignored" | "Submitted">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
204
204
|
readonly _tag: "Submitted";
|
|
205
205
|
readonly content: Content;
|
|
206
206
|
readonly message: UserMessage;
|
|
@@ -214,27 +214,27 @@ declare const AgentChatSubmitResult: {
|
|
|
214
214
|
}>;
|
|
215
215
|
readonly $match: {
|
|
216
216
|
<Cases extends {
|
|
217
|
+
readonly Ignored: (args: {
|
|
218
|
+
readonly _tag: "Ignored";
|
|
219
|
+
}) => any;
|
|
217
220
|
readonly Submitted: (args: {
|
|
218
221
|
readonly _tag: "Submitted";
|
|
219
222
|
readonly content: Content;
|
|
220
223
|
readonly message: UserMessage;
|
|
221
224
|
readonly messages: AgentTranscript;
|
|
222
225
|
}) => any;
|
|
226
|
+
}>(cases: Cases): (value: AgentChatSubmitResult$1) => import("effect/Unify").Unify<ReturnType<Cases["Ignored" | "Submitted"]>>;
|
|
227
|
+
<Cases extends {
|
|
223
228
|
readonly Ignored: (args: {
|
|
224
229
|
readonly _tag: "Ignored";
|
|
225
230
|
}) => any;
|
|
226
|
-
}>(cases: Cases): (value: AgentChatSubmitResult$1) => import("effect/Unify").Unify<ReturnType<Cases["Submitted" | "Ignored"]>>;
|
|
227
|
-
<Cases extends {
|
|
228
231
|
readonly Submitted: (args: {
|
|
229
232
|
readonly _tag: "Submitted";
|
|
230
233
|
readonly content: Content;
|
|
231
234
|
readonly message: UserMessage;
|
|
232
235
|
readonly messages: AgentTranscript;
|
|
233
236
|
}) => any;
|
|
234
|
-
|
|
235
|
-
readonly _tag: "Ignored";
|
|
236
|
-
}) => any;
|
|
237
|
-
}>(value: AgentChatSubmitResult$1, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Submitted" | "Ignored"]>>;
|
|
237
|
+
}>(value: AgentChatSubmitResult$1, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Ignored" | "Submitted"]>>;
|
|
238
238
|
};
|
|
239
239
|
};
|
|
240
240
|
type AgentChatDeleteTurnResult = AgentChatDeleteTurnResult$1;
|
|
@@ -371,15 +371,15 @@ declare const AgentChatEditUserMessageResult: {
|
|
|
371
371
|
};
|
|
372
372
|
type AgentChatHitlResponseResult = AgentChatHitlResponseResult$1;
|
|
373
373
|
declare const AgentChatHitlResponseResult: {
|
|
374
|
+
readonly Ignored: Data.TaggedEnum.ConstructorFrom<{
|
|
375
|
+
readonly _tag: "Ignored";
|
|
376
|
+
}, "_tag">;
|
|
374
377
|
readonly Submitted: Data.TaggedEnum.ConstructorFrom<{
|
|
375
378
|
readonly _tag: "Submitted";
|
|
376
379
|
readonly response: HitlResponse;
|
|
377
380
|
readonly messages: AgentTranscript;
|
|
378
381
|
}, "_tag">;
|
|
379
|
-
readonly Ignored:
|
|
380
|
-
readonly _tag: "Ignored";
|
|
381
|
-
}, "_tag">;
|
|
382
|
-
readonly $is: <Tag extends "Submitted" | "Ignored">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
382
|
+
readonly $is: <Tag extends "Ignored" | "Submitted">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
383
383
|
readonly _tag: "Submitted";
|
|
384
384
|
readonly response: HitlResponse;
|
|
385
385
|
readonly messages: AgentTranscript;
|
|
@@ -392,25 +392,25 @@ declare const AgentChatHitlResponseResult: {
|
|
|
392
392
|
}>;
|
|
393
393
|
readonly $match: {
|
|
394
394
|
<Cases extends {
|
|
395
|
+
readonly Ignored: (args: {
|
|
396
|
+
readonly _tag: "Ignored";
|
|
397
|
+
}) => any;
|
|
395
398
|
readonly Submitted: (args: {
|
|
396
399
|
readonly _tag: "Submitted";
|
|
397
400
|
readonly response: HitlResponse;
|
|
398
401
|
readonly messages: AgentTranscript;
|
|
399
402
|
}) => any;
|
|
403
|
+
}>(cases: Cases): (value: AgentChatHitlResponseResult$1) => import("effect/Unify").Unify<ReturnType<Cases["Ignored" | "Submitted"]>>;
|
|
404
|
+
<Cases extends {
|
|
400
405
|
readonly Ignored: (args: {
|
|
401
406
|
readonly _tag: "Ignored";
|
|
402
407
|
}) => any;
|
|
403
|
-
}>(cases: Cases): (value: AgentChatHitlResponseResult$1) => import("effect/Unify").Unify<ReturnType<Cases["Submitted" | "Ignored"]>>;
|
|
404
|
-
<Cases extends {
|
|
405
408
|
readonly Submitted: (args: {
|
|
406
409
|
readonly _tag: "Submitted";
|
|
407
410
|
readonly response: HitlResponse;
|
|
408
411
|
readonly messages: AgentTranscript;
|
|
409
412
|
}) => any;
|
|
410
|
-
|
|
411
|
-
readonly _tag: "Ignored";
|
|
412
|
-
}) => any;
|
|
413
|
-
}>(value: AgentChatHitlResponseResult$1, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Submitted" | "Ignored"]>>;
|
|
413
|
+
}>(value: AgentChatHitlResponseResult$1, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Ignored" | "Submitted"]>>;
|
|
414
414
|
};
|
|
415
415
|
};
|
|
416
416
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-actions.d.mts","names":[],"sources":["../../src/react/chat-actions.ts"],"mappings":";;;;;;;;;;;KAUY,eAAA,GAAkB,iBAAmB;AAAA,cAEpC,eAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAED,qBAAA,GAAwB,uBAAyB;AAAA,cAEhD,qBAAA;EAAA
|
|
1
|
+
{"version":3,"file":"chat-actions.d.mts","names":[],"sources":["../../src/react/chat-actions.ts"],"mappings":";;;;;;;;;;;KAUY,eAAA,GAAkB,iBAAmB;AAAA,cAEpC,eAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAED,qBAAA,GAAwB,uBAAyB;AAAA,cAEhD,qBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAED,yBAAA,GAA4B,2BAA6B;AAAA,cAExD,yBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAED,yBAAA,GAA4B,2BAA6B;AAAA,cAExD,yBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAED,8BAAA,GAAiC,gCAAkC;AAAA,cAElE,8BAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAED,2BAAA,GAA8B,6BAA+B;AAAA,cAE5D,2BAAA;EAAA"}
|
|
@@ -87,14 +87,6 @@ type ToolRunState = ({
|
|
|
87
87
|
readonly result: ToolResult;
|
|
88
88
|
} & ToolRunNoTiming);
|
|
89
89
|
declare const ToolRunState: {
|
|
90
|
-
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
91
|
-
readonly _tag: "InputStreaming";
|
|
92
|
-
readonly input: string;
|
|
93
|
-
} & ToolRunNoTiming, "_tag">;
|
|
94
|
-
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
95
|
-
readonly _tag: "ApprovalRequested";
|
|
96
|
-
readonly request?: ToolApprovalRequest;
|
|
97
|
-
} & ToolRunNoTiming, "_tag">;
|
|
98
90
|
readonly Denied: Data.TaggedEnum.ConstructorFrom<{
|
|
99
91
|
readonly _tag: "Denied";
|
|
100
92
|
readonly reason: string;
|
|
@@ -127,6 +119,14 @@ declare const ToolRunState: {
|
|
|
127
119
|
readonly response: InputResponse;
|
|
128
120
|
readonly request?: InputRequest;
|
|
129
121
|
} & ToolRunNoTiming, "_tag">;
|
|
122
|
+
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
123
|
+
readonly _tag: "InputStreaming";
|
|
124
|
+
readonly input: string;
|
|
125
|
+
} & ToolRunNoTiming, "_tag">;
|
|
126
|
+
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
127
|
+
readonly _tag: "ApprovalRequested";
|
|
128
|
+
readonly request?: ToolApprovalRequest;
|
|
129
|
+
} & ToolRunNoTiming, "_tag">;
|
|
130
130
|
readonly Completed: Data.TaggedEnum.ConstructorFrom<{
|
|
131
131
|
readonly _tag: "Completed";
|
|
132
132
|
readonly result: ToolResult;
|
|
@@ -143,13 +143,13 @@ declare const ToolRunState: {
|
|
|
143
143
|
readonly _tag: "ProviderCompleted";
|
|
144
144
|
readonly result: ToolResult;
|
|
145
145
|
} & ToolRunNoTiming, "_tag">;
|
|
146
|
-
readonly Called: Data.TaggedEnum.ConstructorFrom<{
|
|
147
|
-
readonly _tag: "Called";
|
|
148
|
-
} & ToolRunNoTiming, "_tag">;
|
|
149
146
|
readonly Running: Data.TaggedEnum.ConstructorFrom<{
|
|
150
147
|
readonly _tag: "Running";
|
|
151
148
|
} & ToolRunStartedTiming, "_tag">;
|
|
152
|
-
readonly
|
|
149
|
+
readonly Called: Data.TaggedEnum.ConstructorFrom<{
|
|
150
|
+
readonly _tag: "Called";
|
|
151
|
+
} & ToolRunNoTiming, "_tag">;
|
|
152
|
+
readonly $is: <Tag extends "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "ApprovalRequested" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted" | "Running" | "Called">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
153
153
|
readonly _tag: "Running";
|
|
154
154
|
} & ToolRunStartedTiming, {
|
|
155
155
|
readonly _tag: Tag;
|
|
@@ -259,14 +259,6 @@ declare const ToolRunState: {
|
|
|
259
259
|
}>;
|
|
260
260
|
readonly $match: {
|
|
261
261
|
<Cases extends {
|
|
262
|
-
readonly InputStreaming: (args: {
|
|
263
|
-
readonly _tag: "InputStreaming";
|
|
264
|
-
readonly input: string;
|
|
265
|
-
} & ToolRunNoTiming) => any;
|
|
266
|
-
readonly ApprovalRequested: (args: {
|
|
267
|
-
readonly _tag: "ApprovalRequested";
|
|
268
|
-
readonly request?: ToolApprovalRequest;
|
|
269
|
-
} & ToolRunNoTiming) => any;
|
|
270
262
|
readonly Denied: (args: {
|
|
271
263
|
readonly _tag: "Denied";
|
|
272
264
|
readonly reason: string;
|
|
@@ -299,6 +291,14 @@ declare const ToolRunState: {
|
|
|
299
291
|
readonly response: InputResponse;
|
|
300
292
|
readonly request?: InputRequest;
|
|
301
293
|
} & ToolRunNoTiming) => any;
|
|
294
|
+
readonly InputStreaming: (args: {
|
|
295
|
+
readonly _tag: "InputStreaming";
|
|
296
|
+
readonly input: string;
|
|
297
|
+
} & ToolRunNoTiming) => any;
|
|
298
|
+
readonly ApprovalRequested: (args: {
|
|
299
|
+
readonly _tag: "ApprovalRequested";
|
|
300
|
+
readonly request?: ToolApprovalRequest;
|
|
301
|
+
} & ToolRunNoTiming) => any;
|
|
302
302
|
readonly Completed: (args: {
|
|
303
303
|
readonly _tag: "Completed";
|
|
304
304
|
readonly result: ToolResult;
|
|
@@ -315,22 +315,14 @@ declare const ToolRunState: {
|
|
|
315
315
|
readonly _tag: "ProviderCompleted";
|
|
316
316
|
readonly result: ToolResult;
|
|
317
317
|
} & ToolRunNoTiming) => any;
|
|
318
|
-
readonly Called: (args: {
|
|
319
|
-
readonly _tag: "Called";
|
|
320
|
-
} & ToolRunNoTiming) => any;
|
|
321
318
|
readonly Running: (args: {
|
|
322
319
|
readonly _tag: "Running";
|
|
323
320
|
} & ToolRunStartedTiming) => any;
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
readonly InputStreaming: (args: {
|
|
327
|
-
readonly _tag: "InputStreaming";
|
|
328
|
-
readonly input: string;
|
|
329
|
-
} & ToolRunNoTiming) => any;
|
|
330
|
-
readonly ApprovalRequested: (args: {
|
|
331
|
-
readonly _tag: "ApprovalRequested";
|
|
332
|
-
readonly request?: ToolApprovalRequest;
|
|
321
|
+
readonly Called: (args: {
|
|
322
|
+
readonly _tag: "Called";
|
|
333
323
|
} & ToolRunNoTiming) => any;
|
|
324
|
+
}>(cases: Cases): (value: ToolRunState) => import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "ApprovalRequested" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted" | "Running" | "Called"]>>;
|
|
325
|
+
<Cases extends {
|
|
334
326
|
readonly Denied: (args: {
|
|
335
327
|
readonly _tag: "Denied";
|
|
336
328
|
readonly reason: string;
|
|
@@ -363,6 +355,14 @@ declare const ToolRunState: {
|
|
|
363
355
|
readonly response: InputResponse;
|
|
364
356
|
readonly request?: InputRequest;
|
|
365
357
|
} & ToolRunNoTiming) => any;
|
|
358
|
+
readonly InputStreaming: (args: {
|
|
359
|
+
readonly _tag: "InputStreaming";
|
|
360
|
+
readonly input: string;
|
|
361
|
+
} & ToolRunNoTiming) => any;
|
|
362
|
+
readonly ApprovalRequested: (args: {
|
|
363
|
+
readonly _tag: "ApprovalRequested";
|
|
364
|
+
readonly request?: ToolApprovalRequest;
|
|
365
|
+
} & ToolRunNoTiming) => any;
|
|
366
366
|
readonly Completed: (args: {
|
|
367
367
|
readonly _tag: "Completed";
|
|
368
368
|
readonly result: ToolResult;
|
|
@@ -379,13 +379,13 @@ declare const ToolRunState: {
|
|
|
379
379
|
readonly _tag: "ProviderCompleted";
|
|
380
380
|
readonly result: ToolResult;
|
|
381
381
|
} & ToolRunNoTiming) => any;
|
|
382
|
-
readonly Called: (args: {
|
|
383
|
-
readonly _tag: "Called";
|
|
384
|
-
} & ToolRunNoTiming) => any;
|
|
385
382
|
readonly Running: (args: {
|
|
386
383
|
readonly _tag: "Running";
|
|
387
384
|
} & ToolRunStartedTiming) => any;
|
|
388
|
-
|
|
385
|
+
readonly Called: (args: {
|
|
386
|
+
readonly _tag: "Called";
|
|
387
|
+
} & ToolRunNoTiming) => any;
|
|
388
|
+
}>(value: ToolRunState, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "ApprovalRequested" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted" | "Running" | "Called"]>>;
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
391
|
type AgentChatItem = {
|
|
@@ -439,6 +439,11 @@ type AgentChatItem = {
|
|
|
439
439
|
readonly message: string;
|
|
440
440
|
};
|
|
441
441
|
declare const AgentChatItem: {
|
|
442
|
+
readonly Error: Data.TaggedEnum.ConstructorFrom<{
|
|
443
|
+
readonly _tag: "Error";
|
|
444
|
+
readonly id: string;
|
|
445
|
+
readonly message: string;
|
|
446
|
+
}, "_tag">;
|
|
442
447
|
readonly ToolResult: Data.TaggedEnum.ConstructorFrom<{
|
|
443
448
|
readonly _tag: "ToolResult";
|
|
444
449
|
readonly id: string;
|
|
@@ -466,11 +471,6 @@ declare const AgentChatItem: {
|
|
|
466
471
|
readonly messageId: string;
|
|
467
472
|
readonly content: Content;
|
|
468
473
|
}, "_tag">;
|
|
469
|
-
readonly Error: Data.TaggedEnum.ConstructorFrom<{
|
|
470
|
-
readonly _tag: "Error";
|
|
471
|
-
readonly id: string;
|
|
472
|
-
readonly message: string;
|
|
473
|
-
}, "_tag">;
|
|
474
474
|
readonly ToolRun: Data.TaggedEnum.ConstructorFrom<{
|
|
475
475
|
readonly _tag: "ToolRun";
|
|
476
476
|
readonly id: string;
|
|
@@ -498,7 +498,7 @@ declare const AgentChatItem: {
|
|
|
498
498
|
readonly id: string;
|
|
499
499
|
readonly label: string;
|
|
500
500
|
}, "_tag">;
|
|
501
|
-
readonly $is: <Tag extends "
|
|
501
|
+
readonly $is: <Tag extends "Error" | "ToolResult" | "Reasoning" | "UserMessage" | "AssistantMessage" | "ToolRun" | "UserDraft" | "AssistantDraft" | "Retry" | "AssistantStatus">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
502
502
|
readonly _tag: "UserMessage";
|
|
503
503
|
readonly id: string;
|
|
504
504
|
readonly messageId: string;
|
|
@@ -570,6 +570,11 @@ declare const AgentChatItem: {
|
|
|
570
570
|
}>;
|
|
571
571
|
readonly $match: {
|
|
572
572
|
<Cases extends {
|
|
573
|
+
readonly Error: (args: {
|
|
574
|
+
readonly _tag: "Error";
|
|
575
|
+
readonly id: string;
|
|
576
|
+
readonly message: string;
|
|
577
|
+
}) => any;
|
|
573
578
|
readonly ToolResult: (args: {
|
|
574
579
|
readonly _tag: "ToolResult";
|
|
575
580
|
readonly id: string;
|
|
@@ -597,11 +602,6 @@ declare const AgentChatItem: {
|
|
|
597
602
|
readonly messageId: string;
|
|
598
603
|
readonly content: Content;
|
|
599
604
|
}) => any;
|
|
600
|
-
readonly Error: (args: {
|
|
601
|
-
readonly _tag: "Error";
|
|
602
|
-
readonly id: string;
|
|
603
|
-
readonly message: string;
|
|
604
|
-
}) => any;
|
|
605
605
|
readonly ToolRun: (args: {
|
|
606
606
|
readonly _tag: "ToolRun";
|
|
607
607
|
readonly id: string;
|
|
@@ -629,8 +629,13 @@ declare const AgentChatItem: {
|
|
|
629
629
|
readonly id: string;
|
|
630
630
|
readonly label: string;
|
|
631
631
|
}) => any;
|
|
632
|
-
}>(cases: Cases): (value: AgentChatItem) => import("effect/Unify").Unify<ReturnType<Cases["
|
|
632
|
+
}>(cases: Cases): (value: AgentChatItem) => import("effect/Unify").Unify<ReturnType<Cases["Error" | "ToolResult" | "Reasoning" | "UserMessage" | "AssistantMessage" | "ToolRun" | "UserDraft" | "AssistantDraft" | "Retry" | "AssistantStatus"]>>;
|
|
633
633
|
<Cases extends {
|
|
634
|
+
readonly Error: (args: {
|
|
635
|
+
readonly _tag: "Error";
|
|
636
|
+
readonly id: string;
|
|
637
|
+
readonly message: string;
|
|
638
|
+
}) => any;
|
|
634
639
|
readonly ToolResult: (args: {
|
|
635
640
|
readonly _tag: "ToolResult";
|
|
636
641
|
readonly id: string;
|
|
@@ -658,11 +663,6 @@ declare const AgentChatItem: {
|
|
|
658
663
|
readonly messageId: string;
|
|
659
664
|
readonly content: Content;
|
|
660
665
|
}) => any;
|
|
661
|
-
readonly Error: (args: {
|
|
662
|
-
readonly _tag: "Error";
|
|
663
|
-
readonly id: string;
|
|
664
|
-
readonly message: string;
|
|
665
|
-
}) => any;
|
|
666
666
|
readonly ToolRun: (args: {
|
|
667
667
|
readonly _tag: "ToolRun";
|
|
668
668
|
readonly id: string;
|
|
@@ -690,7 +690,7 @@ declare const AgentChatItem: {
|
|
|
690
690
|
readonly id: string;
|
|
691
691
|
readonly label: string;
|
|
692
692
|
}) => any;
|
|
693
|
-
}>(value: AgentChatItem, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["
|
|
693
|
+
}>(value: AgentChatItem, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Error" | "ToolResult" | "Reasoning" | "UserMessage" | "AssistantMessage" | "ToolRun" | "UserDraft" | "AssistantDraft" | "Retry" | "AssistantStatus"]>>;
|
|
694
694
|
};
|
|
695
695
|
};
|
|
696
696
|
type BuildAgentChatItemsInput = {
|
|
@@ -1 +1 @@
|
|
|
1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;IAAA;;;;;;;sBAQE,OAAA;IAAA;;;;;;;;;;;;;;;;;;oBAK2C,UAAA;EAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAL3C,OAAA;QAAA;;;;;;;;;;;;0BA3BA,OAAA;MAAA;MAAA;;;;0BAMA,OAAA;MAAA;MAAA;;;;uBAYH,QAAA;QAAA,gBACC,YAAA;MAAA;MAAA;;;;;;;;;;;;;wBAa6C,UAAA;MAAA;MAAA;;;;;;;;;;;;;;;;;;0BAL3C,OAAA;QAAA;;;;;;;;;;;;0BA3BA,OAAA;MAAA;MAAA;;;;0BAMA,OAAA;MAAA;MAAA;;;;uBAYH,QAAA;QAAA,gBACC,YAAA;MAAA;MAAA;;;;;;;;;;;;;wBAa6C,UAAA;MAAA;MAAA;;;;;;;;KAMvD,wBAAA;EAAA,SACD,QAAA,EAAU,aAAA,CAAc,gBAAA;EAAA,SACxB,SAAA;EAAA,SACA,eAAA,EAAiB,MAAA,CAAO,MAAA;EAAA,SACxB,SAAA,GAAY,UAAA;AAAA;AAAA,cAGV,2BAAA,GACX,KAAA,EAAO,aAAA,CAAc,aAAA,MACpB,aAAA,CAAc,aAAA;AAAA,cAiPJ,mBAAA;EAAuB,QAAA;EAAA,SAAA;EAAA,eAAA;EAAA;AAAA,GAKjC,wBAAA,KAA2B,aAAA,CAAc,aAAA"}
|
|
@@ -61,14 +61,6 @@ type ChatToolState = {
|
|
|
61
61
|
readonly result: ToolResult;
|
|
62
62
|
};
|
|
63
63
|
declare const ChatToolState: {
|
|
64
|
-
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
65
|
-
readonly _tag: "InputStreaming";
|
|
66
|
-
readonly input: string;
|
|
67
|
-
}, "_tag">;
|
|
68
|
-
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
69
|
-
readonly _tag: "ApprovalRequested";
|
|
70
|
-
readonly request?: ToolApprovalRequest;
|
|
71
|
-
}, "_tag">;
|
|
72
64
|
readonly Denied: Data.TaggedEnum.ConstructorFrom<{
|
|
73
65
|
readonly _tag: "Denied";
|
|
74
66
|
readonly reason: string;
|
|
@@ -101,6 +93,14 @@ declare const ChatToolState: {
|
|
|
101
93
|
readonly response: InputResponse;
|
|
102
94
|
readonly request?: InputRequest;
|
|
103
95
|
}, "_tag">;
|
|
96
|
+
readonly InputStreaming: Data.TaggedEnum.ConstructorFrom<{
|
|
97
|
+
readonly _tag: "InputStreaming";
|
|
98
|
+
readonly input: string;
|
|
99
|
+
}, "_tag">;
|
|
100
|
+
readonly ApprovalRequested: Data.TaggedEnum.ConstructorFrom<{
|
|
101
|
+
readonly _tag: "ApprovalRequested";
|
|
102
|
+
readonly request?: ToolApprovalRequest;
|
|
103
|
+
}, "_tag">;
|
|
104
104
|
readonly Completed: Data.TaggedEnum.ConstructorFrom<{
|
|
105
105
|
readonly _tag: "Completed";
|
|
106
106
|
readonly result: ToolResult;
|
|
@@ -124,14 +124,14 @@ declare const ChatToolState: {
|
|
|
124
124
|
readonly _tag: "ProviderCompleted";
|
|
125
125
|
readonly result: ToolResult;
|
|
126
126
|
}, "_tag">;
|
|
127
|
-
readonly Called: Data.TaggedEnum.ConstructorFrom<{
|
|
128
|
-
readonly _tag: "Called";
|
|
129
|
-
}, "_tag">;
|
|
130
127
|
readonly Running: Data.TaggedEnum.ConstructorFrom<{
|
|
131
128
|
readonly _tag: "Running";
|
|
132
129
|
readonly startedAtMs: number;
|
|
133
130
|
}, "_tag">;
|
|
134
|
-
readonly
|
|
131
|
+
readonly Called: Data.TaggedEnum.ConstructorFrom<{
|
|
132
|
+
readonly _tag: "Called";
|
|
133
|
+
}, "_tag">;
|
|
134
|
+
readonly $is: <Tag extends "Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "ApprovalRequested" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted" | "Running" | "Called">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
135
135
|
readonly _tag: "Called";
|
|
136
136
|
}, {
|
|
137
137
|
readonly _tag: Tag;
|
|
@@ -219,14 +219,6 @@ declare const ChatToolState: {
|
|
|
219
219
|
}>;
|
|
220
220
|
readonly $match: {
|
|
221
221
|
<Cases extends {
|
|
222
|
-
readonly InputStreaming: (args: {
|
|
223
|
-
readonly _tag: "InputStreaming";
|
|
224
|
-
readonly input: string;
|
|
225
|
-
}) => any;
|
|
226
|
-
readonly ApprovalRequested: (args: {
|
|
227
|
-
readonly _tag: "ApprovalRequested";
|
|
228
|
-
readonly request?: ToolApprovalRequest;
|
|
229
|
-
}) => any;
|
|
230
222
|
readonly Denied: (args: {
|
|
231
223
|
readonly _tag: "Denied";
|
|
232
224
|
readonly reason: string;
|
|
@@ -259,6 +251,14 @@ declare const ChatToolState: {
|
|
|
259
251
|
readonly response: InputResponse;
|
|
260
252
|
readonly request?: InputRequest;
|
|
261
253
|
}) => any;
|
|
254
|
+
readonly InputStreaming: (args: {
|
|
255
|
+
readonly _tag: "InputStreaming";
|
|
256
|
+
readonly input: string;
|
|
257
|
+
}) => any;
|
|
258
|
+
readonly ApprovalRequested: (args: {
|
|
259
|
+
readonly _tag: "ApprovalRequested";
|
|
260
|
+
readonly request?: ToolApprovalRequest;
|
|
261
|
+
}) => any;
|
|
262
262
|
readonly Completed: (args: {
|
|
263
263
|
readonly _tag: "Completed";
|
|
264
264
|
readonly result: ToolResult;
|
|
@@ -282,23 +282,15 @@ declare const ChatToolState: {
|
|
|
282
282
|
readonly _tag: "ProviderCompleted";
|
|
283
283
|
readonly result: ToolResult;
|
|
284
284
|
}) => any;
|
|
285
|
-
readonly Called: (args: {
|
|
286
|
-
readonly _tag: "Called";
|
|
287
|
-
}) => any;
|
|
288
285
|
readonly Running: (args: {
|
|
289
286
|
readonly _tag: "Running";
|
|
290
287
|
readonly startedAtMs: number;
|
|
291
288
|
}) => any;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
readonly InputStreaming: (args: {
|
|
295
|
-
readonly _tag: "InputStreaming";
|
|
296
|
-
readonly input: string;
|
|
297
|
-
}) => any;
|
|
298
|
-
readonly ApprovalRequested: (args: {
|
|
299
|
-
readonly _tag: "ApprovalRequested";
|
|
300
|
-
readonly request?: ToolApprovalRequest;
|
|
289
|
+
readonly Called: (args: {
|
|
290
|
+
readonly _tag: "Called";
|
|
301
291
|
}) => any;
|
|
292
|
+
}>(cases: Cases): (value: ChatToolState) => import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "ApprovalRequested" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted" | "Running" | "Called"]>>;
|
|
293
|
+
<Cases extends {
|
|
302
294
|
readonly Denied: (args: {
|
|
303
295
|
readonly _tag: "Denied";
|
|
304
296
|
readonly reason: string;
|
|
@@ -331,6 +323,14 @@ declare const ChatToolState: {
|
|
|
331
323
|
readonly response: InputResponse;
|
|
332
324
|
readonly request?: InputRequest;
|
|
333
325
|
}) => any;
|
|
326
|
+
readonly InputStreaming: (args: {
|
|
327
|
+
readonly _tag: "InputStreaming";
|
|
328
|
+
readonly input: string;
|
|
329
|
+
}) => any;
|
|
330
|
+
readonly ApprovalRequested: (args: {
|
|
331
|
+
readonly _tag: "ApprovalRequested";
|
|
332
|
+
readonly request?: ToolApprovalRequest;
|
|
333
|
+
}) => any;
|
|
334
334
|
readonly Completed: (args: {
|
|
335
335
|
readonly _tag: "Completed";
|
|
336
336
|
readonly result: ToolResult;
|
|
@@ -354,14 +354,14 @@ declare const ChatToolState: {
|
|
|
354
354
|
readonly _tag: "ProviderCompleted";
|
|
355
355
|
readonly result: ToolResult;
|
|
356
356
|
}) => any;
|
|
357
|
-
readonly Called: (args: {
|
|
358
|
-
readonly _tag: "Called";
|
|
359
|
-
}) => any;
|
|
360
357
|
readonly Running: (args: {
|
|
361
358
|
readonly _tag: "Running";
|
|
362
359
|
readonly startedAtMs: number;
|
|
363
360
|
}) => any;
|
|
364
|
-
|
|
361
|
+
readonly Called: (args: {
|
|
362
|
+
readonly _tag: "Called";
|
|
363
|
+
}) => any;
|
|
364
|
+
}>(value: ChatToolState, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Denied" | "QuestionRequested" | "QuestionAnswered" | "QuestionCancelled" | "InputRequested" | "InputSubmitted" | "InputCancelled" | "InputStreaming" | "ApprovalRequested" | "Completed" | "Accepted" | "Errored" | "ProviderCompleted" | "Running" | "Called"]>>;
|
|
365
365
|
};
|
|
366
366
|
};
|
|
367
367
|
type AgentChatPart = {
|
|
@@ -394,6 +394,11 @@ type AgentChatPart = {
|
|
|
394
394
|
readonly message: string;
|
|
395
395
|
};
|
|
396
396
|
declare const AgentChatPart: {
|
|
397
|
+
readonly Error: Data.TaggedEnum.ConstructorFrom<{
|
|
398
|
+
readonly _tag: "Error";
|
|
399
|
+
readonly id: string;
|
|
400
|
+
readonly message: string;
|
|
401
|
+
}, "_tag">;
|
|
397
402
|
readonly ToolCall: Data.TaggedEnum.ConstructorFrom<{
|
|
398
403
|
readonly _tag: "ToolCall";
|
|
399
404
|
readonly id: string;
|
|
@@ -422,12 +427,7 @@ declare const AgentChatPart: {
|
|
|
422
427
|
readonly text: string;
|
|
423
428
|
readonly state: ChatPartState;
|
|
424
429
|
}, "_tag">;
|
|
425
|
-
readonly Error:
|
|
426
|
-
readonly _tag: "Error";
|
|
427
|
-
readonly id: string;
|
|
428
|
-
readonly message: string;
|
|
429
|
-
}, "_tag">;
|
|
430
|
-
readonly $is: <Tag extends "ToolCall" | "ToolResult" | "Text" | "Reasoning" | "Error">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
430
|
+
readonly $is: <Tag extends "Error" | "ToolCall" | "ToolResult" | "Text" | "Reasoning">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
431
431
|
readonly _tag: "Text";
|
|
432
432
|
readonly id: string;
|
|
433
433
|
readonly content: Content;
|
|
@@ -468,6 +468,11 @@ declare const AgentChatPart: {
|
|
|
468
468
|
}>;
|
|
469
469
|
readonly $match: {
|
|
470
470
|
<Cases extends {
|
|
471
|
+
readonly Error: (args: {
|
|
472
|
+
readonly _tag: "Error";
|
|
473
|
+
readonly id: string;
|
|
474
|
+
readonly message: string;
|
|
475
|
+
}) => any;
|
|
471
476
|
readonly ToolCall: (args: {
|
|
472
477
|
readonly _tag: "ToolCall";
|
|
473
478
|
readonly id: string;
|
|
@@ -496,13 +501,13 @@ declare const AgentChatPart: {
|
|
|
496
501
|
readonly text: string;
|
|
497
502
|
readonly state: ChatPartState;
|
|
498
503
|
}) => any;
|
|
504
|
+
}>(cases: Cases): (value: AgentChatPart) => import("effect/Unify").Unify<ReturnType<Cases["Error" | "ToolCall" | "ToolResult" | "Text" | "Reasoning"]>>;
|
|
505
|
+
<Cases extends {
|
|
499
506
|
readonly Error: (args: {
|
|
500
507
|
readonly _tag: "Error";
|
|
501
508
|
readonly id: string;
|
|
502
509
|
readonly message: string;
|
|
503
510
|
}) => any;
|
|
504
|
-
}>(cases: Cases): (value: AgentChatPart) => import("effect/Unify").Unify<ReturnType<Cases["ToolCall" | "ToolResult" | "Text" | "Reasoning" | "Error"]>>;
|
|
505
|
-
<Cases extends {
|
|
506
511
|
readonly ToolCall: (args: {
|
|
507
512
|
readonly _tag: "ToolCall";
|
|
508
513
|
readonly id: string;
|
|
@@ -531,12 +536,7 @@ declare const AgentChatPart: {
|
|
|
531
536
|
readonly text: string;
|
|
532
537
|
readonly state: ChatPartState;
|
|
533
538
|
}) => any;
|
|
534
|
-
|
|
535
|
-
readonly _tag: "Error";
|
|
536
|
-
readonly id: string;
|
|
537
|
-
readonly message: string;
|
|
538
|
-
}) => any;
|
|
539
|
-
}>(value: AgentChatPart, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["ToolCall" | "ToolResult" | "Text" | "Reasoning" | "Error"]>>;
|
|
539
|
+
}>(value: AgentChatPart, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Error" | "ToolCall" | "ToolResult" | "Text" | "Reasoning"]>>;
|
|
540
540
|
};
|
|
541
541
|
};
|
|
542
542
|
type AgentChatMessage = {
|
|
@@ -558,16 +558,16 @@ type DeleteChatTurnResult = {
|
|
|
558
558
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
559
559
|
};
|
|
560
560
|
declare const DeleteChatTurnResult: {
|
|
561
|
+
readonly NotFound: Data.TaggedEnum.ConstructorFrom<{
|
|
562
|
+
readonly _tag: "NotFound";
|
|
563
|
+
}, "_tag">;
|
|
561
564
|
readonly Deleted: Data.TaggedEnum.ConstructorFrom<{
|
|
562
565
|
readonly _tag: "Deleted";
|
|
563
566
|
readonly turnStartMessageId: string;
|
|
564
567
|
readonly deletedMessageIds: ReadonlyArray<string>;
|
|
565
568
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
566
569
|
}, "_tag">;
|
|
567
|
-
readonly NotFound:
|
|
568
|
-
readonly _tag: "NotFound";
|
|
569
|
-
}, "_tag">;
|
|
570
|
-
readonly $is: <Tag extends "Deleted" | "NotFound">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
570
|
+
readonly $is: <Tag extends "NotFound" | "Deleted">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
571
571
|
readonly _tag: "NotFound";
|
|
572
572
|
}, {
|
|
573
573
|
readonly _tag: Tag;
|
|
@@ -581,27 +581,27 @@ declare const DeleteChatTurnResult: {
|
|
|
581
581
|
}>;
|
|
582
582
|
readonly $match: {
|
|
583
583
|
<Cases extends {
|
|
584
|
+
readonly NotFound: (args: {
|
|
585
|
+
readonly _tag: "NotFound";
|
|
586
|
+
}) => any;
|
|
584
587
|
readonly Deleted: (args: {
|
|
585
588
|
readonly _tag: "Deleted";
|
|
586
589
|
readonly turnStartMessageId: string;
|
|
587
590
|
readonly deletedMessageIds: ReadonlyArray<string>;
|
|
588
591
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
589
592
|
}) => any;
|
|
593
|
+
}>(cases: Cases): (value: DeleteChatTurnResult) => import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "Deleted"]>>;
|
|
594
|
+
<Cases extends {
|
|
590
595
|
readonly NotFound: (args: {
|
|
591
596
|
readonly _tag: "NotFound";
|
|
592
597
|
}) => any;
|
|
593
|
-
}>(cases: Cases): (value: DeleteChatTurnResult) => import("effect/Unify").Unify<ReturnType<Cases["Deleted" | "NotFound"]>>;
|
|
594
|
-
<Cases extends {
|
|
595
598
|
readonly Deleted: (args: {
|
|
596
599
|
readonly _tag: "Deleted";
|
|
597
600
|
readonly turnStartMessageId: string;
|
|
598
601
|
readonly deletedMessageIds: ReadonlyArray<string>;
|
|
599
602
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
600
603
|
}) => any;
|
|
601
|
-
|
|
602
|
-
readonly _tag: "NotFound";
|
|
603
|
-
}) => any;
|
|
604
|
-
}>(value: DeleteChatTurnResult, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Deleted" | "NotFound"]>>;
|
|
604
|
+
}>(value: DeleteChatTurnResult, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "Deleted"]>>;
|
|
605
605
|
};
|
|
606
606
|
};
|
|
607
607
|
type EditChatUserMessageResult = {
|
|
@@ -614,18 +614,18 @@ type EditChatUserMessageResult = {
|
|
|
614
614
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
615
615
|
};
|
|
616
616
|
declare const EditChatUserMessageResult: {
|
|
617
|
-
readonly Edited: Data.TaggedEnum.ConstructorFrom<{
|
|
618
|
-
readonly _tag: "Edited";
|
|
619
|
-
readonly messageId: string;
|
|
620
|
-
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
621
|
-
}, "_tag">;
|
|
622
617
|
readonly NotFound: Data.TaggedEnum.ConstructorFrom<{
|
|
623
618
|
readonly _tag: "NotFound";
|
|
624
619
|
}, "_tag">;
|
|
625
620
|
readonly NotUserMessage: Data.TaggedEnum.ConstructorFrom<{
|
|
626
621
|
readonly _tag: "NotUserMessage";
|
|
627
622
|
}, "_tag">;
|
|
628
|
-
readonly
|
|
623
|
+
readonly Edited: Data.TaggedEnum.ConstructorFrom<{
|
|
624
|
+
readonly _tag: "Edited";
|
|
625
|
+
readonly messageId: string;
|
|
626
|
+
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
627
|
+
}, "_tag">;
|
|
628
|
+
readonly $is: <Tag extends "NotFound" | "NotUserMessage" | "Edited">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
629
629
|
readonly _tag: "NotFound";
|
|
630
630
|
}, {
|
|
631
631
|
readonly _tag: Tag;
|
|
@@ -642,31 +642,31 @@ declare const EditChatUserMessageResult: {
|
|
|
642
642
|
}>;
|
|
643
643
|
readonly $match: {
|
|
644
644
|
<Cases extends {
|
|
645
|
-
readonly Edited: (args: {
|
|
646
|
-
readonly _tag: "Edited";
|
|
647
|
-
readonly messageId: string;
|
|
648
|
-
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
649
|
-
}) => any;
|
|
650
645
|
readonly NotFound: (args: {
|
|
651
646
|
readonly _tag: "NotFound";
|
|
652
647
|
}) => any;
|
|
653
648
|
readonly NotUserMessage: (args: {
|
|
654
649
|
readonly _tag: "NotUserMessage";
|
|
655
650
|
}) => any;
|
|
656
|
-
}>(cases: Cases): (value: EditChatUserMessageResult) => import("effect/Unify").Unify<ReturnType<Cases["Edited" | "NotFound" | "NotUserMessage"]>>;
|
|
657
|
-
<Cases extends {
|
|
658
651
|
readonly Edited: (args: {
|
|
659
652
|
readonly _tag: "Edited";
|
|
660
653
|
readonly messageId: string;
|
|
661
654
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
662
655
|
}) => any;
|
|
656
|
+
}>(cases: Cases): (value: EditChatUserMessageResult) => import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "NotUserMessage" | "Edited"]>>;
|
|
657
|
+
<Cases extends {
|
|
663
658
|
readonly NotFound: (args: {
|
|
664
659
|
readonly _tag: "NotFound";
|
|
665
660
|
}) => any;
|
|
666
661
|
readonly NotUserMessage: (args: {
|
|
667
662
|
readonly _tag: "NotUserMessage";
|
|
668
663
|
}) => any;
|
|
669
|
-
|
|
664
|
+
readonly Edited: (args: {
|
|
665
|
+
readonly _tag: "Edited";
|
|
666
|
+
readonly messageId: string;
|
|
667
|
+
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
668
|
+
}) => any;
|
|
669
|
+
}>(value: EditChatUserMessageResult, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "NotUserMessage" | "Edited"]>>;
|
|
670
670
|
};
|
|
671
671
|
};
|
|
672
672
|
type RegenerateChatMessagesResult = {
|
|
@@ -676,14 +676,14 @@ type RegenerateChatMessagesResult = {
|
|
|
676
676
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
677
677
|
};
|
|
678
678
|
declare const RegenerateChatMessagesResult: {
|
|
679
|
+
readonly NotFound: Data.TaggedEnum.ConstructorFrom<{
|
|
680
|
+
readonly _tag: "NotFound";
|
|
681
|
+
}, "_tag">;
|
|
679
682
|
readonly Regenerated: Data.TaggedEnum.ConstructorFrom<{
|
|
680
683
|
readonly _tag: "Regenerated";
|
|
681
684
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
682
685
|
}, "_tag">;
|
|
683
|
-
readonly NotFound:
|
|
684
|
-
readonly _tag: "NotFound";
|
|
685
|
-
}, "_tag">;
|
|
686
|
-
readonly $is: <Tag extends "Regenerated" | "NotFound">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
686
|
+
readonly $is: <Tag extends "NotFound" | "Regenerated">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
687
687
|
readonly _tag: "NotFound";
|
|
688
688
|
}, {
|
|
689
689
|
readonly _tag: Tag;
|
|
@@ -695,23 +695,23 @@ declare const RegenerateChatMessagesResult: {
|
|
|
695
695
|
}>;
|
|
696
696
|
readonly $match: {
|
|
697
697
|
<Cases extends {
|
|
698
|
+
readonly NotFound: (args: {
|
|
699
|
+
readonly _tag: "NotFound";
|
|
700
|
+
}) => any;
|
|
698
701
|
readonly Regenerated: (args: {
|
|
699
702
|
readonly _tag: "Regenerated";
|
|
700
703
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
701
704
|
}) => any;
|
|
705
|
+
}>(cases: Cases): (value: RegenerateChatMessagesResult) => import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "Regenerated"]>>;
|
|
706
|
+
<Cases extends {
|
|
702
707
|
readonly NotFound: (args: {
|
|
703
708
|
readonly _tag: "NotFound";
|
|
704
709
|
}) => any;
|
|
705
|
-
}>(cases: Cases): (value: RegenerateChatMessagesResult) => import("effect/Unify").Unify<ReturnType<Cases["Regenerated" | "NotFound"]>>;
|
|
706
|
-
<Cases extends {
|
|
707
710
|
readonly Regenerated: (args: {
|
|
708
711
|
readonly _tag: "Regenerated";
|
|
709
712
|
readonly messages: ReadonlyArray<AgentChatMessage>;
|
|
710
713
|
}) => any;
|
|
711
|
-
|
|
712
|
-
readonly _tag: "NotFound";
|
|
713
|
-
}) => any;
|
|
714
|
-
}>(value: RegenerateChatMessagesResult, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Regenerated" | "NotFound"]>>;
|
|
714
|
+
}>(value: RegenerateChatMessagesResult, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["NotFound" | "Regenerated"]>>;
|
|
715
715
|
};
|
|
716
716
|
};
|
|
717
717
|
type ApplyAgentEventToChatMessagesOptions = {
|
|
@@ -745,7 +745,7 @@ declare const buildAgentChatMessages: ({
|
|
|
745
745
|
toolRuns,
|
|
746
746
|
error
|
|
747
747
|
}: BuildAgentChatMessagesInput) => ReadonlyArray<AgentChatMessage>;
|
|
748
|
-
declare const toAgentMessages: (messages: ReadonlyArray<AgentChatMessage>) => (
|
|
748
|
+
declare const toAgentMessages: (messages: ReadonlyArray<AgentChatMessage>) => (ToolResultMessage | UserMessage | AssistantAgentMessage)[];
|
|
749
749
|
//#endregion
|
|
750
750
|
export { AgentChatMessage, AgentChatPart, ApplyAgentEventToChatMessagesOptions, BuildAgentChatMessagesInput, ChatPartState, ChatToolState, DeleteChatTurnResult, EditChatUserMessageResult, RegenerateChatMessagesResult, appendProtocolMessage, applyAgentEventToChatMessages, buildAgentChatMessages, deleteChatTurn, editChatUserMessage, markChatError, regenerateChatMessagesFrom, toAgentMessages };
|
|
751
751
|
//# sourceMappingURL=chat-messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-messages.d.mts","names":[],"sources":["../../src/react/chat-messages.ts"],"mappings":";;;;;KAmCY,aAAA;AAAA,KAEA,aAAA;EAAA,SACG,IAAA;AAAA;EAAA,SACA,IAAA;EAAA,SAAiC,KAAA;AAAA;EAAA,SACjC,IAAA;EAAA,SAAoC,OAAA,GAAU,mBAAA;AAAA;EAAA,SAC9C,IAAA;EAAA,SAAyB,MAAA;AAAA;EAAA,SACzB,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,SAA0B,WAAA;AAAA;EAAA,SAE1B,IAAA;EAAA,SACA,MAAA,EAAQ,UAAA;EAAA,SACR,WAAA;EAAA,SACA,SAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,MAAA,EAAQ,UAAA;EAAA,SACR,cAAA,GAAiB,eAAA;EAAA,S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A,aACC,aAAA,CAAc,gBAAA;;;;;;;cAmBJ,6BAAA,GACX,QAAA,EAAU,aAAA,CAAc,gBAAA,GACxB,KAAA,EAAO,UAAA,EACP,OAAA,GAAS,oCAAA,KACR,aAAA,CAAc,gBAAA;AAAA,cAwVJ,sBAAA;EAA0B,QAAA;EAAA,SAAA;EAAA,cAAA;EAAA,cAAA;EAAA,QAAA;EAAA;AAAA,GAOpC,2BAAA,KAA8B,aAAA,CAAc,gBAAA;AAAA,cA4LlC,eAAA,GAAmB,QAAA,EAAU,aAAA,CAAc,gBAAA,OAAiB,iBAAA,GAAA,WAAA,GAAA,qBAAA"}
|
|
@@ -70,7 +70,7 @@ declare function useAgentChat({
|
|
|
70
70
|
}: UseAgentChatOptions): {
|
|
71
71
|
state: AgentChatState;
|
|
72
72
|
chatMessages: readonly AgentChatMessage[];
|
|
73
|
-
messages: (
|
|
73
|
+
messages: (import("@yolk-sdk/agent/protocol").ToolResultMessage | UserMessage | import("@yolk-sdk/agent/protocol").AssistantAgentMessage)[];
|
|
74
74
|
hasReasoningSummary: boolean;
|
|
75
75
|
status: AgentRunStatus;
|
|
76
76
|
error: string | null;
|
|
@@ -16,8 +16,8 @@ type MergedSkillset = {
|
|
|
16
16
|
declare const mergeSkillsets: (sources: ReadonlyArray<SkillsetSource>) => Effect.Effect<{
|
|
17
17
|
skills: {
|
|
18
18
|
readonly name: string;
|
|
19
|
-
readonly content: string;
|
|
20
19
|
readonly description: string;
|
|
20
|
+
readonly content: string;
|
|
21
21
|
readonly location: string;
|
|
22
22
|
readonly source?: string | undefined;
|
|
23
23
|
}[];
|
|
@@ -25,8 +25,8 @@ declare const mergeSkillsets: (sources: ReadonlyArray<SkillsetSource>) => Effect
|
|
|
25
25
|
readonly name: string;
|
|
26
26
|
readonly hints: readonly string[];
|
|
27
27
|
readonly template: string;
|
|
28
|
-
readonly source?: string | undefined;
|
|
29
28
|
readonly description?: string | undefined;
|
|
29
|
+
readonly source?: string | undefined;
|
|
30
30
|
readonly arguments?: readonly {
|
|
31
31
|
readonly required: boolean;
|
|
32
32
|
readonly name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolk-sdk/agent",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.83",
|
|
4
4
|
"description": "Agent protocol, loop, runtime, Effect-native client, compaction, tools, React, providers, OAuth, skillset, and voice primitives.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,6 +38,17 @@ export type VercelAiGatewayProviderConfig = {
|
|
|
38
38
|
* Defaults to false; reasoning output is otherwise dropped.
|
|
39
39
|
*/
|
|
40
40
|
readonly reasoningContent?: boolean
|
|
41
|
+
/**
|
|
42
|
+
* Override the reasoning-effort wire format. Defaults to the Anthropic
|
|
43
|
+
* `reasoning` object; DeepSeek-style hosts expect the literal
|
|
44
|
+
* `reasoning_effort` field instead.
|
|
45
|
+
*/
|
|
46
|
+
readonly reasoningEffortFormat?: 'reasoning-object' | 'reasoning-effort'
|
|
47
|
+
/**
|
|
48
|
+
* DeepSeek-style thinking toggle, merged into the request body (e.g.
|
|
49
|
+
* `{ type: 'enabled' }`). Omitted unless a host documents it.
|
|
50
|
+
*/
|
|
51
|
+
readonly thinking?: { readonly type: 'enabled' | 'disabled' }
|
|
41
52
|
}
|
|
42
53
|
|
|
43
54
|
const vercelAiGatewayProviderIdentity = {
|
|
@@ -48,6 +59,10 @@ const vercelAiGatewayProviderIdentity = {
|
|
|
48
59
|
const gatewayExtraBody = (config: VercelAiGatewayProviderConfig): OpenAiRequestExtras => {
|
|
49
60
|
const extras: { [key: string]: Schema.Json } = {}
|
|
50
61
|
|
|
62
|
+
if (config.thinking !== undefined) {
|
|
63
|
+
extras.thinking = { type: config.thinking.type }
|
|
64
|
+
}
|
|
65
|
+
|
|
51
66
|
if (config.fallbackModels !== undefined) {
|
|
52
67
|
extras.models = [...config.fallbackModels]
|
|
53
68
|
}
|
|
@@ -77,7 +92,7 @@ type VercelAiGatewayOpenAiLayerFields = {
|
|
|
77
92
|
apiKey: VercelAiGatewayProviderConfig['apiKey']
|
|
78
93
|
maxCompletionTokens: number
|
|
79
94
|
completionTokenField: 'max_tokens'
|
|
80
|
-
reasoningEffortFormat: 'reasoning-object'
|
|
95
|
+
reasoningEffortFormat: 'reasoning-object' | 'reasoning-effort'
|
|
81
96
|
chatCompletionsUrl: string
|
|
82
97
|
providerIdentity: typeof vercelAiGatewayProviderIdentity
|
|
83
98
|
extraBody: OpenAiRequestExtras
|
|
@@ -93,7 +108,7 @@ export const makeVercelAiGatewayProviderLayer = (config: VercelAiGatewayProvider
|
|
|
93
108
|
apiKey: config.apiKey,
|
|
94
109
|
maxCompletionTokens: config.maxCompletionTokens,
|
|
95
110
|
completionTokenField: 'max_tokens',
|
|
96
|
-
reasoningEffortFormat: 'reasoning-object',
|
|
111
|
+
reasoningEffortFormat: config.reasoningEffortFormat ?? 'reasoning-object',
|
|
97
112
|
chatCompletionsUrl: config.chatCompletionsUrl ?? vercelAiGatewayChatCompletionsUrl,
|
|
98
113
|
providerIdentity: vercelAiGatewayProviderIdentity,
|
|
99
114
|
extraBody: gatewayExtraBody(config)
|