@orq-ai/node 4.2.0-rc.53 → 4.2.0-rc.54
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/bin/mcp-server.js +292 -250
- package/bin/mcp-server.js.map +47 -47
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/conversationresponse.js +2 -2
- package/models/components/conversationwithmessagesresponse.js +2 -2
- package/models/components/createagentresponse.d.ts +71 -0
- package/models/components/createagentresponse.d.ts.map +1 -1
- package/models/components/createagentresponse.js +72 -1
- package/models/components/createagentresponse.js.map +1 -1
- package/models/components/partdoneevent.js +2 -2
- package/models/components/reasoningpart.js +2 -2
- package/models/components/responsedoneevent.d.ts +21 -21
- package/models/components/responsedoneevent.d.ts.map +1 -1
- package/models/components/responsedoneevent.js +26 -28
- package/models/components/responsedoneevent.js.map +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createconversation.js +2 -2
- package/models/operations/createconversationresponse.js +4 -4
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createidentity.js +2 -2
- package/models/operations/createtool.js +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/generateconversationname.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listidentities.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrieveidentity.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updateconversation.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updateidentity.js +2 -2
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/conversationresponse.ts +2 -2
- package/src/models/components/conversationwithmessagesresponse.ts +2 -2
- package/src/models/components/createagentresponse.ts +155 -0
- package/src/models/components/partdoneevent.ts +2 -2
- package/src/models/components/reasoningpart.ts +2 -2
- package/src/models/components/responsedoneevent.ts +60 -46
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createconversation.ts +2 -2
- package/src/models/operations/createconversationresponse.ts +4 -4
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createidentity.ts +2 -2
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/generateconversationname.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listidentities.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrieveidentity.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updateconversation.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updateidentity.ts +2 -2
- package/src/models/operations/updatetool.ts +14 -14
|
@@ -155,7 +155,7 @@ export const ConversationWithMessagesResponse$inboundSchema: z.ZodType<
|
|
|
155
155
|
z.ZodTypeDef,
|
|
156
156
|
unknown
|
|
157
157
|
> = z.object({
|
|
158
|
-
_id: z.string().default("
|
|
158
|
+
_id: z.string().default("conv_01kfg037989m13dewbgt6gzfvx"),
|
|
159
159
|
kind: ConversationWithMessagesResponseKind$inboundSchema,
|
|
160
160
|
displayName: z.string(),
|
|
161
161
|
createdAt: z.number(),
|
|
@@ -189,7 +189,7 @@ export const ConversationWithMessagesResponse$outboundSchema: z.ZodType<
|
|
|
189
189
|
z.ZodTypeDef,
|
|
190
190
|
ConversationWithMessagesResponse
|
|
191
191
|
> = z.object({
|
|
192
|
-
id: z.string().default("
|
|
192
|
+
id: z.string().default("conv_01kfg037989m13dewbgt6gzfvx"),
|
|
193
193
|
kind: ConversationWithMessagesResponseKind$outboundSchema,
|
|
194
194
|
displayName: z.string(),
|
|
195
195
|
createdAt: z.number(),
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -53,6 +54,41 @@ export type Usage = {
|
|
|
53
54
|
completionTokensDetails?: CompletionTokensDetails | null | undefined;
|
|
54
55
|
};
|
|
55
56
|
|
|
57
|
+
/**
|
|
58
|
+
* The reason why the agent stopped generating
|
|
59
|
+
*/
|
|
60
|
+
export const FinishReason = {
|
|
61
|
+
Stop: "stop",
|
|
62
|
+
Length: "length",
|
|
63
|
+
ToolCalls: "tool_calls",
|
|
64
|
+
ContentFilter: "content_filter",
|
|
65
|
+
FunctionCall: "function_call",
|
|
66
|
+
MaxIterations: "max_iterations",
|
|
67
|
+
MaxTime: "max_time",
|
|
68
|
+
} as const;
|
|
69
|
+
/**
|
|
70
|
+
* The reason why the agent stopped generating
|
|
71
|
+
*/
|
|
72
|
+
export type FinishReason = ClosedEnum<typeof FinishReason>;
|
|
73
|
+
|
|
74
|
+
export const CreateAgentResponseType = {
|
|
75
|
+
Function: "function",
|
|
76
|
+
} as const;
|
|
77
|
+
export type CreateAgentResponseType = ClosedEnum<
|
|
78
|
+
typeof CreateAgentResponseType
|
|
79
|
+
>;
|
|
80
|
+
|
|
81
|
+
export type FunctionT = {
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
arguments?: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type PendingToolCalls = {
|
|
87
|
+
id: string;
|
|
88
|
+
type: CreateAgentResponseType;
|
|
89
|
+
function: FunctionT;
|
|
90
|
+
};
|
|
91
|
+
|
|
56
92
|
/**
|
|
57
93
|
* Response type from the create-response endpoint.
|
|
58
94
|
*/
|
|
@@ -81,6 +117,14 @@ export type CreateAgentResponse = {
|
|
|
81
117
|
* Token usage from the agent execution
|
|
82
118
|
*/
|
|
83
119
|
usage?: Usage | null | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* The reason why the agent stopped generating
|
|
122
|
+
*/
|
|
123
|
+
finishReason?: FinishReason | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Tool calls awaiting user response (when finish_reason is function_call)
|
|
126
|
+
*/
|
|
127
|
+
pendingToolCalls?: Array<PendingToolCalls> | undefined;
|
|
84
128
|
};
|
|
85
129
|
|
|
86
130
|
/** @internal */
|
|
@@ -273,6 +317,105 @@ export function usageFromJSON(
|
|
|
273
317
|
);
|
|
274
318
|
}
|
|
275
319
|
|
|
320
|
+
/** @internal */
|
|
321
|
+
export const FinishReason$inboundSchema: z.ZodNativeEnum<typeof FinishReason> =
|
|
322
|
+
z.nativeEnum(FinishReason);
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const FinishReason$outboundSchema: z.ZodNativeEnum<typeof FinishReason> =
|
|
325
|
+
FinishReason$inboundSchema;
|
|
326
|
+
|
|
327
|
+
/** @internal */
|
|
328
|
+
export const CreateAgentResponseType$inboundSchema: z.ZodNativeEnum<
|
|
329
|
+
typeof CreateAgentResponseType
|
|
330
|
+
> = z.nativeEnum(CreateAgentResponseType);
|
|
331
|
+
/** @internal */
|
|
332
|
+
export const CreateAgentResponseType$outboundSchema: z.ZodNativeEnum<
|
|
333
|
+
typeof CreateAgentResponseType
|
|
334
|
+
> = CreateAgentResponseType$inboundSchema;
|
|
335
|
+
|
|
336
|
+
/** @internal */
|
|
337
|
+
export const FunctionT$inboundSchema: z.ZodType<
|
|
338
|
+
FunctionT,
|
|
339
|
+
z.ZodTypeDef,
|
|
340
|
+
unknown
|
|
341
|
+
> = z.object({
|
|
342
|
+
name: z.string().optional(),
|
|
343
|
+
arguments: z.string().optional(),
|
|
344
|
+
});
|
|
345
|
+
/** @internal */
|
|
346
|
+
export type FunctionT$Outbound = {
|
|
347
|
+
name?: string | undefined;
|
|
348
|
+
arguments?: string | undefined;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
/** @internal */
|
|
352
|
+
export const FunctionT$outboundSchema: z.ZodType<
|
|
353
|
+
FunctionT$Outbound,
|
|
354
|
+
z.ZodTypeDef,
|
|
355
|
+
FunctionT
|
|
356
|
+
> = z.object({
|
|
357
|
+
name: z.string().optional(),
|
|
358
|
+
arguments: z.string().optional(),
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
export function functionToJSON(functionT: FunctionT): string {
|
|
362
|
+
return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
|
|
363
|
+
}
|
|
364
|
+
export function functionFromJSON(
|
|
365
|
+
jsonString: string,
|
|
366
|
+
): SafeParseResult<FunctionT, SDKValidationError> {
|
|
367
|
+
return safeParse(
|
|
368
|
+
jsonString,
|
|
369
|
+
(x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
|
|
370
|
+
`Failed to parse 'FunctionT' from JSON`,
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/** @internal */
|
|
375
|
+
export const PendingToolCalls$inboundSchema: z.ZodType<
|
|
376
|
+
PendingToolCalls,
|
|
377
|
+
z.ZodTypeDef,
|
|
378
|
+
unknown
|
|
379
|
+
> = z.object({
|
|
380
|
+
id: z.string(),
|
|
381
|
+
type: CreateAgentResponseType$inboundSchema,
|
|
382
|
+
function: z.lazy(() => FunctionT$inboundSchema),
|
|
383
|
+
});
|
|
384
|
+
/** @internal */
|
|
385
|
+
export type PendingToolCalls$Outbound = {
|
|
386
|
+
id: string;
|
|
387
|
+
type: string;
|
|
388
|
+
function: FunctionT$Outbound;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
/** @internal */
|
|
392
|
+
export const PendingToolCalls$outboundSchema: z.ZodType<
|
|
393
|
+
PendingToolCalls$Outbound,
|
|
394
|
+
z.ZodTypeDef,
|
|
395
|
+
PendingToolCalls
|
|
396
|
+
> = z.object({
|
|
397
|
+
id: z.string(),
|
|
398
|
+
type: CreateAgentResponseType$outboundSchema,
|
|
399
|
+
function: z.lazy(() => FunctionT$outboundSchema),
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
export function pendingToolCallsToJSON(
|
|
403
|
+
pendingToolCalls: PendingToolCalls,
|
|
404
|
+
): string {
|
|
405
|
+
return JSON.stringify(
|
|
406
|
+
PendingToolCalls$outboundSchema.parse(pendingToolCalls),
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
export function pendingToolCallsFromJSON(
|
|
410
|
+
jsonString: string,
|
|
411
|
+
): SafeParseResult<PendingToolCalls, SDKValidationError> {
|
|
412
|
+
return safeParse(
|
|
413
|
+
jsonString,
|
|
414
|
+
(x) => PendingToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
415
|
+
`Failed to parse 'PendingToolCalls' from JSON`,
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
276
419
|
/** @internal */
|
|
277
420
|
export const CreateAgentResponse$inboundSchema: z.ZodType<
|
|
278
421
|
CreateAgentResponse,
|
|
@@ -285,11 +428,16 @@ export const CreateAgentResponse$inboundSchema: z.ZodType<
|
|
|
285
428
|
created_at: z.string(),
|
|
286
429
|
model: z.string(),
|
|
287
430
|
usage: z.nullable(z.lazy(() => Usage$inboundSchema)).optional(),
|
|
431
|
+
finish_reason: FinishReason$inboundSchema.optional(),
|
|
432
|
+
pending_tool_calls: z.array(z.lazy(() => PendingToolCalls$inboundSchema))
|
|
433
|
+
.optional(),
|
|
288
434
|
}).transform((v) => {
|
|
289
435
|
return remap$(v, {
|
|
290
436
|
"_id": "id",
|
|
291
437
|
"task_id": "taskId",
|
|
292
438
|
"created_at": "createdAt",
|
|
439
|
+
"finish_reason": "finishReason",
|
|
440
|
+
"pending_tool_calls": "pendingToolCalls",
|
|
293
441
|
});
|
|
294
442
|
});
|
|
295
443
|
/** @internal */
|
|
@@ -300,6 +448,8 @@ export type CreateAgentResponse$Outbound = {
|
|
|
300
448
|
created_at: string;
|
|
301
449
|
model: string;
|
|
302
450
|
usage?: Usage$Outbound | null | undefined;
|
|
451
|
+
finish_reason?: string | undefined;
|
|
452
|
+
pending_tool_calls?: Array<PendingToolCalls$Outbound> | undefined;
|
|
303
453
|
};
|
|
304
454
|
|
|
305
455
|
/** @internal */
|
|
@@ -314,11 +464,16 @@ export const CreateAgentResponse$outboundSchema: z.ZodType<
|
|
|
314
464
|
createdAt: z.string(),
|
|
315
465
|
model: z.string(),
|
|
316
466
|
usage: z.nullable(z.lazy(() => Usage$outboundSchema)).optional(),
|
|
467
|
+
finishReason: FinishReason$outboundSchema.optional(),
|
|
468
|
+
pendingToolCalls: z.array(z.lazy(() => PendingToolCalls$outboundSchema))
|
|
469
|
+
.optional(),
|
|
317
470
|
}).transform((v) => {
|
|
318
471
|
return remap$(v, {
|
|
319
472
|
id: "_id",
|
|
320
473
|
taskId: "task_id",
|
|
321
474
|
createdAt: "created_at",
|
|
475
|
+
finishReason: "finish_reason",
|
|
476
|
+
pendingToolCalls: "pending_tool_calls",
|
|
322
477
|
});
|
|
323
478
|
});
|
|
324
479
|
|
|
@@ -79,7 +79,7 @@ export const PartReasoningPart$inboundSchema: z.ZodType<
|
|
|
79
79
|
z.ZodTypeDef,
|
|
80
80
|
unknown
|
|
81
81
|
> = z.object({
|
|
82
|
-
_id: z.string().default("
|
|
82
|
+
_id: z.string().default("reasoning_01kfg036xgkrepbh43thtavq3f"),
|
|
83
83
|
metadata: z.record(z.any()).optional(),
|
|
84
84
|
kind: PartKind$inboundSchema,
|
|
85
85
|
reasoning: z.string(),
|
|
@@ -104,7 +104,7 @@ export const PartReasoningPart$outboundSchema: z.ZodType<
|
|
|
104
104
|
z.ZodTypeDef,
|
|
105
105
|
PartReasoningPart
|
|
106
106
|
> = z.object({
|
|
107
|
-
id: z.string().default("
|
|
107
|
+
id: z.string().default("reasoning_01kfg036xgkrepbh43thtavq3f"),
|
|
108
108
|
metadata: z.record(z.any()).optional(),
|
|
109
109
|
kind: PartKind$outboundSchema,
|
|
110
110
|
reasoning: z.string(),
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01kfg036x3m6xskhdmjrkz2jjg"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -65,7 +65,7 @@ export const ReasoningPart$outboundSchema: z.ZodType<
|
|
|
65
65
|
z.ZodTypeDef,
|
|
66
66
|
ReasoningPart
|
|
67
67
|
> = z.object({
|
|
68
|
-
id: z.string().default("
|
|
68
|
+
id: z.string().default("reasoning_01kfg036x3m6xskhdmjrkz2jjg"),
|
|
69
69
|
metadata: z.record(z.any()).optional(),
|
|
70
70
|
kind: z.literal("reasoning"),
|
|
71
71
|
reasoning: z.string(),
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* The reason why the agent stopped generating
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const ResponseDoneEventFinishReason = {
|
|
16
16
|
Stop: "stop",
|
|
17
17
|
Length: "length",
|
|
18
18
|
ToolCalls: "tool_calls",
|
|
@@ -24,7 +24,9 @@ export const FinishReason = {
|
|
|
24
24
|
/**
|
|
25
25
|
* The reason why the agent stopped generating
|
|
26
26
|
*/
|
|
27
|
-
export type
|
|
27
|
+
export type ResponseDoneEventFinishReason = ClosedEnum<
|
|
28
|
+
typeof ResponseDoneEventFinishReason
|
|
29
|
+
>;
|
|
28
30
|
|
|
29
31
|
export type ResponseDoneEventPromptTokensDetails = {
|
|
30
32
|
cachedTokens?: number | null | undefined;
|
|
@@ -75,7 +77,7 @@ export type ResponseDoneEventDataType = ClosedEnum<
|
|
|
75
77
|
typeof ResponseDoneEventDataType
|
|
76
78
|
>;
|
|
77
79
|
|
|
78
|
-
export type
|
|
80
|
+
export type ResponseDoneEventFunction = {
|
|
79
81
|
/**
|
|
80
82
|
* The name of the function to call
|
|
81
83
|
*/
|
|
@@ -86,20 +88,20 @@ export type FunctionT = {
|
|
|
86
88
|
arguments?: string | undefined;
|
|
87
89
|
};
|
|
88
90
|
|
|
89
|
-
export type
|
|
91
|
+
export type ResponseDoneEventPendingToolCalls = {
|
|
90
92
|
/**
|
|
91
93
|
* Unique identifier for the tool call
|
|
92
94
|
*/
|
|
93
95
|
id: string;
|
|
94
96
|
type: ResponseDoneEventDataType;
|
|
95
|
-
function:
|
|
97
|
+
function: ResponseDoneEventFunction;
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
export type ResponseDoneEventData = {
|
|
99
101
|
/**
|
|
100
102
|
* The reason why the agent stopped generating
|
|
101
103
|
*/
|
|
102
|
-
finishReason:
|
|
104
|
+
finishReason: ResponseDoneEventFinishReason;
|
|
103
105
|
/**
|
|
104
106
|
* Token usage statistics for the complete response
|
|
105
107
|
*/
|
|
@@ -107,7 +109,7 @@ export type ResponseDoneEventData = {
|
|
|
107
109
|
/**
|
|
108
110
|
* Tool calls awaiting user response (when finishReason is function_call)
|
|
109
111
|
*/
|
|
110
|
-
pendingToolCalls?: Array<
|
|
112
|
+
pendingToolCalls?: Array<ResponseDoneEventPendingToolCalls> | undefined;
|
|
111
113
|
};
|
|
112
114
|
|
|
113
115
|
/**
|
|
@@ -123,11 +125,13 @@ export type ResponseDoneEvent = {
|
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
/** @internal */
|
|
126
|
-
export const
|
|
127
|
-
|
|
128
|
+
export const ResponseDoneEventFinishReason$inboundSchema: z.ZodNativeEnum<
|
|
129
|
+
typeof ResponseDoneEventFinishReason
|
|
130
|
+
> = z.nativeEnum(ResponseDoneEventFinishReason);
|
|
128
131
|
/** @internal */
|
|
129
|
-
export const
|
|
130
|
-
|
|
132
|
+
export const ResponseDoneEventFinishReason$outboundSchema: z.ZodNativeEnum<
|
|
133
|
+
typeof ResponseDoneEventFinishReason
|
|
134
|
+
> = ResponseDoneEventFinishReason$inboundSchema;
|
|
131
135
|
|
|
132
136
|
/** @internal */
|
|
133
137
|
export const ResponseDoneEventPromptTokensDetails$inboundSchema: z.ZodType<
|
|
@@ -351,8 +355,8 @@ export const ResponseDoneEventDataType$outboundSchema: z.ZodNativeEnum<
|
|
|
351
355
|
> = ResponseDoneEventDataType$inboundSchema;
|
|
352
356
|
|
|
353
357
|
/** @internal */
|
|
354
|
-
export const
|
|
355
|
-
|
|
358
|
+
export const ResponseDoneEventFunction$inboundSchema: z.ZodType<
|
|
359
|
+
ResponseDoneEventFunction,
|
|
356
360
|
z.ZodTypeDef,
|
|
357
361
|
unknown
|
|
358
362
|
> = z.object({
|
|
@@ -360,76 +364,82 @@ export const FunctionT$inboundSchema: z.ZodType<
|
|
|
360
364
|
arguments: z.string().optional(),
|
|
361
365
|
});
|
|
362
366
|
/** @internal */
|
|
363
|
-
export type
|
|
367
|
+
export type ResponseDoneEventFunction$Outbound = {
|
|
364
368
|
name?: string | undefined;
|
|
365
369
|
arguments?: string | undefined;
|
|
366
370
|
};
|
|
367
371
|
|
|
368
372
|
/** @internal */
|
|
369
|
-
export const
|
|
370
|
-
|
|
373
|
+
export const ResponseDoneEventFunction$outboundSchema: z.ZodType<
|
|
374
|
+
ResponseDoneEventFunction$Outbound,
|
|
371
375
|
z.ZodTypeDef,
|
|
372
|
-
|
|
376
|
+
ResponseDoneEventFunction
|
|
373
377
|
> = z.object({
|
|
374
378
|
name: z.string().optional(),
|
|
375
379
|
arguments: z.string().optional(),
|
|
376
380
|
});
|
|
377
381
|
|
|
378
|
-
export function
|
|
379
|
-
|
|
382
|
+
export function responseDoneEventFunctionToJSON(
|
|
383
|
+
responseDoneEventFunction: ResponseDoneEventFunction,
|
|
384
|
+
): string {
|
|
385
|
+
return JSON.stringify(
|
|
386
|
+
ResponseDoneEventFunction$outboundSchema.parse(responseDoneEventFunction),
|
|
387
|
+
);
|
|
380
388
|
}
|
|
381
|
-
export function
|
|
389
|
+
export function responseDoneEventFunctionFromJSON(
|
|
382
390
|
jsonString: string,
|
|
383
|
-
): SafeParseResult<
|
|
391
|
+
): SafeParseResult<ResponseDoneEventFunction, SDKValidationError> {
|
|
384
392
|
return safeParse(
|
|
385
393
|
jsonString,
|
|
386
|
-
(x) =>
|
|
387
|
-
`Failed to parse '
|
|
394
|
+
(x) => ResponseDoneEventFunction$inboundSchema.parse(JSON.parse(x)),
|
|
395
|
+
`Failed to parse 'ResponseDoneEventFunction' from JSON`,
|
|
388
396
|
);
|
|
389
397
|
}
|
|
390
398
|
|
|
391
399
|
/** @internal */
|
|
392
|
-
export const
|
|
393
|
-
|
|
400
|
+
export const ResponseDoneEventPendingToolCalls$inboundSchema: z.ZodType<
|
|
401
|
+
ResponseDoneEventPendingToolCalls,
|
|
394
402
|
z.ZodTypeDef,
|
|
395
403
|
unknown
|
|
396
404
|
> = z.object({
|
|
397
405
|
id: z.string(),
|
|
398
406
|
type: ResponseDoneEventDataType$inboundSchema,
|
|
399
|
-
function: z.lazy(() =>
|
|
407
|
+
function: z.lazy(() => ResponseDoneEventFunction$inboundSchema),
|
|
400
408
|
});
|
|
401
409
|
/** @internal */
|
|
402
|
-
export type
|
|
410
|
+
export type ResponseDoneEventPendingToolCalls$Outbound = {
|
|
403
411
|
id: string;
|
|
404
412
|
type: string;
|
|
405
|
-
function:
|
|
413
|
+
function: ResponseDoneEventFunction$Outbound;
|
|
406
414
|
};
|
|
407
415
|
|
|
408
416
|
/** @internal */
|
|
409
|
-
export const
|
|
410
|
-
|
|
417
|
+
export const ResponseDoneEventPendingToolCalls$outboundSchema: z.ZodType<
|
|
418
|
+
ResponseDoneEventPendingToolCalls$Outbound,
|
|
411
419
|
z.ZodTypeDef,
|
|
412
|
-
|
|
420
|
+
ResponseDoneEventPendingToolCalls
|
|
413
421
|
> = z.object({
|
|
414
422
|
id: z.string(),
|
|
415
423
|
type: ResponseDoneEventDataType$outboundSchema,
|
|
416
|
-
function: z.lazy(() =>
|
|
424
|
+
function: z.lazy(() => ResponseDoneEventFunction$outboundSchema),
|
|
417
425
|
});
|
|
418
426
|
|
|
419
|
-
export function
|
|
420
|
-
|
|
427
|
+
export function responseDoneEventPendingToolCallsToJSON(
|
|
428
|
+
responseDoneEventPendingToolCalls: ResponseDoneEventPendingToolCalls,
|
|
421
429
|
): string {
|
|
422
430
|
return JSON.stringify(
|
|
423
|
-
|
|
431
|
+
ResponseDoneEventPendingToolCalls$outboundSchema.parse(
|
|
432
|
+
responseDoneEventPendingToolCalls,
|
|
433
|
+
),
|
|
424
434
|
);
|
|
425
435
|
}
|
|
426
|
-
export function
|
|
436
|
+
export function responseDoneEventPendingToolCallsFromJSON(
|
|
427
437
|
jsonString: string,
|
|
428
|
-
): SafeParseResult<
|
|
438
|
+
): SafeParseResult<ResponseDoneEventPendingToolCalls, SDKValidationError> {
|
|
429
439
|
return safeParse(
|
|
430
440
|
jsonString,
|
|
431
|
-
(x) =>
|
|
432
|
-
`Failed to parse '
|
|
441
|
+
(x) => ResponseDoneEventPendingToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
442
|
+
`Failed to parse 'ResponseDoneEventPendingToolCalls' from JSON`,
|
|
433
443
|
);
|
|
434
444
|
}
|
|
435
445
|
|
|
@@ -439,16 +449,19 @@ export const ResponseDoneEventData$inboundSchema: z.ZodType<
|
|
|
439
449
|
z.ZodTypeDef,
|
|
440
450
|
unknown
|
|
441
451
|
> = z.object({
|
|
442
|
-
finishReason:
|
|
452
|
+
finishReason: ResponseDoneEventFinishReason$inboundSchema,
|
|
443
453
|
usage: z.lazy(() => ResponseDoneEventUsage$inboundSchema).optional(),
|
|
444
|
-
pendingToolCalls: z.array(
|
|
445
|
-
.
|
|
454
|
+
pendingToolCalls: z.array(
|
|
455
|
+
z.lazy(() => ResponseDoneEventPendingToolCalls$inboundSchema),
|
|
456
|
+
).optional(),
|
|
446
457
|
});
|
|
447
458
|
/** @internal */
|
|
448
459
|
export type ResponseDoneEventData$Outbound = {
|
|
449
460
|
finishReason: string;
|
|
450
461
|
usage?: ResponseDoneEventUsage$Outbound | undefined;
|
|
451
|
-
pendingToolCalls?:
|
|
462
|
+
pendingToolCalls?:
|
|
463
|
+
| Array<ResponseDoneEventPendingToolCalls$Outbound>
|
|
464
|
+
| undefined;
|
|
452
465
|
};
|
|
453
466
|
|
|
454
467
|
/** @internal */
|
|
@@ -457,10 +470,11 @@ export const ResponseDoneEventData$outboundSchema: z.ZodType<
|
|
|
457
470
|
z.ZodTypeDef,
|
|
458
471
|
ResponseDoneEventData
|
|
459
472
|
> = z.object({
|
|
460
|
-
finishReason:
|
|
473
|
+
finishReason: ResponseDoneEventFinishReason$outboundSchema,
|
|
461
474
|
usage: z.lazy(() => ResponseDoneEventUsage$outboundSchema).optional(),
|
|
462
|
-
pendingToolCalls: z.array(
|
|
463
|
-
.
|
|
475
|
+
pendingToolCalls: z.array(
|
|
476
|
+
z.lazy(() => ResponseDoneEventPendingToolCalls$outboundSchema),
|
|
477
|
+
).optional(),
|
|
464
478
|
});
|
|
465
479
|
|
|
466
480
|
export function responseDoneEventDataToJSON(
|
|
@@ -167,7 +167,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
167
167
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
168
168
|
.optional(),
|
|
169
169
|
updated: z.string().datetime({ offset: true }).default(
|
|
170
|
-
"2026-01-
|
|
170
|
+
"2026-01-21T10:02:27.374Z",
|
|
171
171
|
).transform(v => new Date(v)),
|
|
172
172
|
}).transform((v) => {
|
|
173
173
|
return remap$(v, {
|
|
@@ -207,7 +207,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
207
207
|
tags: z.array(z.string()).optional(),
|
|
208
208
|
metadata: z.record(z.any()).optional(),
|
|
209
209
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
210
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
210
|
+
updated: z.date().default(() => new Date("2026-01-21T10:02:27.374Z"))
|
|
211
211
|
.transform(v => v.toISOString()),
|
|
212
212
|
}).transform((v) => {
|
|
213
213
|
return remap$(v, {
|
|
@@ -270,7 +270,7 @@ export const CreateConversationResponseBody$inboundSchema: z.ZodType<
|
|
|
270
270
|
z.ZodTypeDef,
|
|
271
271
|
unknown
|
|
272
272
|
> = z.object({
|
|
273
|
-
_id: z.string().default("
|
|
273
|
+
_id: z.string().default("conv_01kfg037957qts609ny87x1bp8"),
|
|
274
274
|
kind: CreateConversationKind$inboundSchema,
|
|
275
275
|
displayName: z.string(),
|
|
276
276
|
createdAt: z.number(),
|
|
@@ -302,7 +302,7 @@ export const CreateConversationResponseBody$outboundSchema: z.ZodType<
|
|
|
302
302
|
z.ZodTypeDef,
|
|
303
303
|
CreateConversationResponseBody
|
|
304
304
|
> = z.object({
|
|
305
|
-
id: z.string().default("
|
|
305
|
+
id: z.string().default("conv_01kfg037957qts609ny87x1bp8"),
|
|
306
306
|
kind: CreateConversationKind$outboundSchema,
|
|
307
307
|
displayName: z.string(),
|
|
308
308
|
createdAt: z.number(),
|
|
@@ -337,7 +337,7 @@ export const PartReasoningPart$inboundSchema: z.ZodType<
|
|
|
337
337
|
z.ZodTypeDef,
|
|
338
338
|
unknown
|
|
339
339
|
> = z.object({
|
|
340
|
-
_id: z.string().default("
|
|
340
|
+
_id: z.string().default("reasoning_01kfg0379v46kd78p305h27zg4"),
|
|
341
341
|
metadata: z.record(z.any()).optional(),
|
|
342
342
|
kind: PartKind$inboundSchema,
|
|
343
343
|
reasoning: z.string(),
|
|
@@ -362,7 +362,7 @@ export const PartReasoningPart$outboundSchema: z.ZodType<
|
|
|
362
362
|
z.ZodTypeDef,
|
|
363
363
|
PartReasoningPart
|
|
364
364
|
> = z.object({
|
|
365
|
-
id: z.string().default("
|
|
365
|
+
id: z.string().default("reasoning_01kfg0379v46kd78p305h27zg4"),
|
|
366
366
|
metadata: z.record(z.any()).optional(),
|
|
367
367
|
kind: PartKind$outboundSchema,
|
|
368
368
|
reasoning: z.string(),
|
|
@@ -510,7 +510,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
510
510
|
z.ZodTypeDef,
|
|
511
511
|
unknown
|
|
512
512
|
> = z.object({
|
|
513
|
-
_id: z.string().default("
|
|
513
|
+
_id: z.string().default("reasoning_01kfg0379meegwa9t23tne9pmj"),
|
|
514
514
|
metadata: z.record(z.any()).optional(),
|
|
515
515
|
kind: DeltaKind$inboundSchema,
|
|
516
516
|
reasoning: z.string(),
|
|
@@ -535,7 +535,7 @@ export const ReasoningPart$outboundSchema: z.ZodType<
|
|
|
535
535
|
z.ZodTypeDef,
|
|
536
536
|
ReasoningPart
|
|
537
537
|
> = z.object({
|
|
538
|
-
id: z.string().default("
|
|
538
|
+
id: z.string().default("reasoning_01kfg0379meegwa9t23tne9pmj"),
|
|
539
539
|
metadata: z.record(z.any()).optional(),
|
|
540
540
|
kind: DeltaKind$outboundSchema,
|
|
541
541
|
reasoning: z.string(),
|
|
@@ -187,7 +187,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
187
187
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
188
188
|
.optional(),
|
|
189
189
|
updated: z.string().datetime({ offset: true }).default(
|
|
190
|
-
"2026-01-
|
|
190
|
+
"2026-01-21T10:02:27.374Z",
|
|
191
191
|
).transform(v => new Date(v)),
|
|
192
192
|
}).transform((v) => {
|
|
193
193
|
return remap$(v, {
|
|
@@ -226,7 +226,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
226
226
|
createdById: z.string().optional(),
|
|
227
227
|
updatedById: z.string().optional(),
|
|
228
228
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
229
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
229
|
+
updated: z.date().default(() => new Date("2026-01-21T10:02:27.374Z"))
|
|
230
230
|
.transform(v => v.toISOString()),
|
|
231
231
|
}).transform((v) => {
|
|
232
232
|
return remap$(v, {
|
|
@@ -3616,7 +3616,7 @@ export const Evaluations3$inboundSchema: z.ZodType<
|
|
|
3616
3616
|
),
|
|
3617
3617
|
reviewed_by_id: z.string(),
|
|
3618
3618
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
3619
|
-
"2026-01-
|
|
3619
|
+
"2026-01-21T10:02:41.523Z",
|
|
3620
3620
|
).transform(v => new Date(v)),
|
|
3621
3621
|
type: z.literal("string_array"),
|
|
3622
3622
|
values: z.array(z.string()),
|
|
@@ -3653,7 +3653,7 @@ export const Evaluations3$outboundSchema: z.ZodType<
|
|
|
3653
3653
|
"orq",
|
|
3654
3654
|
),
|
|
3655
3655
|
reviewedById: z.string(),
|
|
3656
|
-
reviewedAt: z.date().default(() => new Date("2026-01-
|
|
3656
|
+
reviewedAt: z.date().default(() => new Date("2026-01-21T10:02:41.523Z"))
|
|
3657
3657
|
.transform(v => v.toISOString()),
|
|
3658
3658
|
type: z.literal("string_array"),
|
|
3659
3659
|
values: z.array(z.string()),
|
|
@@ -3709,7 +3709,7 @@ export const Evaluations2$inboundSchema: z.ZodType<
|
|
|
3709
3709
|
source: CreateDatasetItemEvaluationsSource$inboundSchema.default("orq"),
|
|
3710
3710
|
reviewed_by_id: z.string(),
|
|
3711
3711
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
3712
|
-
"2026-01-
|
|
3712
|
+
"2026-01-21T10:02:41.522Z",
|
|
3713
3713
|
).transform(v => new Date(v)),
|
|
3714
3714
|
type: z.literal("number"),
|
|
3715
3715
|
value: z.number(),
|
|
@@ -3744,7 +3744,7 @@ export const Evaluations2$outboundSchema: z.ZodType<
|
|
|
3744
3744
|
humanReviewId: z.string(),
|
|
3745
3745
|
source: CreateDatasetItemEvaluationsSource$outboundSchema.default("orq"),
|
|
3746
3746
|
reviewedById: z.string(),
|
|
3747
|
-
reviewedAt: z.date().default(() => new Date("2026-01-
|
|
3747
|
+
reviewedAt: z.date().default(() => new Date("2026-01-21T10:02:41.522Z"))
|
|
3748
3748
|
.transform(v => v.toISOString()),
|
|
3749
3749
|
type: z.literal("number"),
|
|
3750
3750
|
value: z.number(),
|
|
@@ -3800,7 +3800,7 @@ export const Evaluations1$inboundSchema: z.ZodType<
|
|
|
3800
3800
|
source: EvaluationsSource$inboundSchema.default("orq"),
|
|
3801
3801
|
reviewed_by_id: z.string(),
|
|
3802
3802
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
3803
|
-
"2026-01-
|
|
3803
|
+
"2026-01-21T10:02:41.521Z",
|
|
3804
3804
|
).transform(v => new Date(v)),
|
|
3805
3805
|
type: z.literal("string"),
|
|
3806
3806
|
value: z.string(),
|
|
@@ -3835,7 +3835,7 @@ export const Evaluations1$outboundSchema: z.ZodType<
|
|
|
3835
3835
|
humanReviewId: z.string(),
|
|
3836
3836
|
source: EvaluationsSource$outboundSchema.default("orq"),
|
|
3837
3837
|
reviewedById: z.string(),
|
|
3838
|
-
reviewedAt: z.date().default(() => new Date("2026-01-
|
|
3838
|
+
reviewedAt: z.date().default(() => new Date("2026-01-21T10:02:41.521Z"))
|
|
3839
3839
|
.transform(v => v.toISOString()),
|
|
3840
3840
|
type: z.literal("string"),
|
|
3841
3841
|
value: z.string(),
|
|
@@ -3940,7 +3940,7 @@ export const CreateDatasetItemResponseBody$inboundSchema: z.ZodType<
|
|
|
3940
3940
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
3941
3941
|
.optional(),
|
|
3942
3942
|
updated: z.string().datetime({ offset: true }).default(
|
|
3943
|
-
"2026-01-
|
|
3943
|
+
"2026-01-21T10:02:27.374Z",
|
|
3944
3944
|
).transform(v => new Date(v)),
|
|
3945
3945
|
}).transform((v) => {
|
|
3946
3946
|
return remap$(v, {
|
|
@@ -4018,7 +4018,7 @@ export const CreateDatasetItemResponseBody$outboundSchema: z.ZodType<
|
|
|
4018
4018
|
createdById: z.string().optional(),
|
|
4019
4019
|
updatedById: z.string().optional(),
|
|
4020
4020
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
4021
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
4021
|
+
updated: z.date().default(() => new Date("2026-01-21T10:02:27.374Z"))
|
|
4022
4022
|
.transform(v => v.toISOString()),
|
|
4023
4023
|
}).transform((v) => {
|
|
4024
4024
|
return remap$(v, {
|