@orq-ai/node 4.14.0 → 4.14.3
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/evaluatorresponsefunction.js +2 -2
- package/models/components/evaluatorresponsehttp.js +2 -2
- package/models/components/evaluatorresponsejsonschema.js +2 -2
- package/models/components/evaluatorresponsellm.js +2 -2
- package/models/components/evaluatorresponsepython.js +2 -2
- package/models/components/evaluatorresponseragas.js +2 -2
- package/models/components/evaluatorresponsetypescript.js +2 -2
- package/models/components/modelmetadata.d.ts +2 -0
- package/models/components/modelmetadata.d.ts.map +1 -1
- package/models/components/modelmetadata.js +4 -0
- package/models/components/modelmetadata.js.map +1 -1
- package/models/components/pricing.d.ts +4 -0
- package/models/components/pricing.d.ts.map +1 -1
- package/models/components/pricing.js +8 -0
- package/models/components/pricing.js.map +1 -1
- package/models/components/pricingvariant.d.ts +4 -0
- package/models/components/pricingvariant.d.ts.map +1 -1
- package/models/components/pricingvariant.js +8 -0
- package/models/components/pricingvariant.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createannotationqueue.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createprompt.d.ts +2 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +2 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/deploymentinvoke.d.ts +2 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +2 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +2 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +2 -0
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +2 -0
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +2 -0
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/getallprompts.d.ts +2 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +2 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/geteval.js +16 -16
- package/models/operations/getoneprompt.d.ts +2 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +2 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +2 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +2 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listannotationqueues.js +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listpromptversions.d.ts +2 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +2 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveannotationqueue.js +1 -1
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updateannotationqueue.js +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updateprompt.d.ts +2 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +2 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +3 -3
- package/packages/orq-rc/src/funcs/{mcpServersTest.ts → fileSystemsCreate.ts} +13 -13
- package/packages/orq-rc/src/funcs/{deploymentsStream.ts → fileSystemsCreateFolder.ts} +27 -34
- package/packages/orq-rc/src/funcs/fileSystemsDelete.ts +169 -0
- package/packages/orq-rc/src/funcs/fileSystemsDeleteFile.ts +183 -0
- package/packages/orq-rc/src/funcs/fileSystemsList.ts +172 -0
- package/packages/orq-rc/src/funcs/fileSystemsListFiles.ts +177 -0
- package/packages/orq-rc/src/funcs/fileSystemsMoveFile.ts +173 -0
- package/packages/orq-rc/src/funcs/fileSystemsRetrieve.ts +168 -0
- package/packages/orq-rc/src/funcs/fileSystemsStatFile.ts +175 -0
- package/packages/orq-rc/src/funcs/{deploymentsInvoke.ts → fileSystemsUpdate.ts} +24 -23
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/models/components/agentresponserequest.ts +22 -31
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +43 -55
- package/packages/orq-rc/src/models/components/agenttoolinputcrud.ts +8 -0
- package/packages/orq-rc/src/models/components/createfilesystemfolderrequest.ts +36 -0
- package/packages/orq-rc/src/models/components/createfilesystemfolderresponse.ts +31 -0
- package/packages/orq-rc/src/models/components/createfilesystemrequest.ts +94 -0
- package/packages/orq-rc/src/models/components/deletefilesystemfileresponse.ts +49 -0
- package/packages/orq-rc/src/models/components/deletefilesystemresponse.ts +27 -0
- package/packages/orq-rc/src/models/components/evaluationcontext.ts +10 -15
- package/packages/orq-rc/src/models/components/evaluatorresponsefunction.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsehttp.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsejsonschema.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsellm.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsepython.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponseragas.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsetypescript.ts +2 -2
- package/packages/orq-rc/src/models/components/fileentry.ts +86 -0
- package/packages/orq-rc/src/models/components/filesystem.ts +116 -0
- package/packages/orq-rc/src/models/components/filesystemexternalaccess.ts +20 -0
- package/packages/orq-rc/src/models/components/filesystemtoolinput.ts +51 -0
- package/packages/orq-rc/src/models/components/index.ts +16 -4
- package/packages/orq-rc/src/models/components/knowledgebasesservicelistresponse.ts +9 -6
- package/packages/orq-rc/src/models/components/listfilesystemfilesresponse.ts +57 -0
- package/packages/orq-rc/src/models/components/listfilesystemsresponse.ts +51 -0
- package/packages/orq-rc/src/models/components/mcpaccess.ts +13 -0
- package/packages/orq-rc/src/models/components/movefilesystemfilerequest.ts +40 -0
- package/packages/orq-rc/src/models/components/movefilesystemfileresponse.ts +33 -0
- package/packages/orq-rc/src/models/components/orqsidekicktool.ts +22 -5
- package/packages/orq-rc/src/models/components/publicusage.ts +7 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/searchknowledgerequest.ts +469 -668
- package/packages/orq-rc/src/models/components/servertoolusedetails.ts +63 -0
- package/packages/orq-rc/src/models/components/statfilesystemfileresponse.ts +63 -0
- package/packages/orq-rc/src/models/components/updatefilesystemrequest.ts +83 -0
- package/packages/orq-rc/src/models/operations/createannotationqueue.ts +1 -1
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +248 -313
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
- package/packages/orq-rc/src/models/operations/createfolder.ts +43 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +7 -7
- package/packages/orq-rc/src/models/operations/createrouterresponse.ts +139 -9
- package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
- package/packages/orq-rc/src/models/operations/deletefile.ts +42 -0
- package/packages/orq-rc/src/models/operations/deletefilesystem.ts +36 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +1 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
- package/packages/orq-rc/src/models/operations/geteval.ts +16 -16
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +9 -2
- package/packages/orq-rc/src/models/operations/listannotationqueues.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listfiles.ts +46 -0
- package/packages/orq-rc/src/models/operations/listfilesystems.ts +50 -0
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
- package/packages/orq-rc/src/models/operations/movefile.ts +40 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveannotationqueue.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievefilesystem.ts +36 -0
- package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
- package/packages/orq-rc/src/models/operations/runagent.ts +15 -9
- package/packages/orq-rc/src/models/operations/statfile.ts +37 -0
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +15 -9
- package/packages/orq-rc/src/models/operations/updateannotationqueue.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatefilesystem.ts +41 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/sdk/deployments.ts +0 -38
- package/packages/orq-rc/src/sdk/filesystems.ts +190 -0
- package/packages/orq-rc/src/sdk/mcpservers.ts +0 -18
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/evaluatorresponsefunction.ts +2 -2
- package/src/models/components/evaluatorresponsehttp.ts +2 -2
- package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
- package/src/models/components/evaluatorresponsellm.ts +2 -2
- package/src/models/components/evaluatorresponsepython.ts +2 -2
- package/src/models/components/evaluatorresponseragas.ts +2 -2
- package/src/models/components/evaluatorresponsetypescript.ts +2 -2
- package/src/models/components/modelmetadata.ts +6 -0
- package/src/models/components/pricing.ts +12 -0
- package/src/models/components/pricingvariant.ts +12 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createannotationqueue.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createprompt.ts +2 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deploymentinvoke.ts +2 -0
- package/src/models/operations/deployments.ts +2 -0
- package/src/models/operations/deploymentstream.ts +2 -0
- package/src/models/operations/getallprompts.ts +2 -0
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/geteval.ts +16 -16
- package/src/models/operations/getoneprompt.ts +2 -0
- package/src/models/operations/getpromptversion.ts +2 -0
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listannotationqueues.ts +1 -1
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listpromptversions.ts +2 -0
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveannotationqueue.ts +1 -1
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updateannotationqueue.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updateprompt.ts +2 -0
- package/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3446
- package/packages/orq-rc/src/models/components/mcptestresult.ts +0 -61
- package/packages/orq-rc/src/models/components/testmcpserverrequest.ts +0 -67
- package/packages/orq-rc/src/models/components/testmcpserverresponse.ts +0 -32
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -731
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4562
|
@@ -29,29 +29,29 @@ import {
|
|
|
29
29
|
/**
|
|
30
30
|
* Message containing tool execution results
|
|
31
31
|
*/
|
|
32
|
-
export const
|
|
32
|
+
export const ToolMessage = {
|
|
33
33
|
Tool: "tool",
|
|
34
34
|
} as const;
|
|
35
35
|
/**
|
|
36
36
|
* Message containing tool execution results
|
|
37
37
|
*/
|
|
38
|
-
export type
|
|
38
|
+
export type ToolMessage = ClosedEnum<typeof ToolMessage>;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Message from the end user
|
|
42
42
|
*/
|
|
43
|
-
export const
|
|
43
|
+
export const UserMessage = {
|
|
44
44
|
User: "user",
|
|
45
45
|
} as const;
|
|
46
46
|
/**
|
|
47
47
|
* Message from the end user
|
|
48
48
|
*/
|
|
49
|
-
export type
|
|
49
|
+
export type UserMessage = ClosedEnum<typeof UserMessage>;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Message role (user or tool for continuing executions)
|
|
53
53
|
*/
|
|
54
|
-
export type AgentResponseRequestRole =
|
|
54
|
+
export type AgentResponseRequestRole = UserMessage | ToolMessage;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
@@ -73,7 +73,7 @@ export type A2AMessage = {
|
|
|
73
73
|
/**
|
|
74
74
|
* Message role (user or tool for continuing executions)
|
|
75
75
|
*/
|
|
76
|
-
role:
|
|
76
|
+
role: UserMessage | ToolMessage;
|
|
77
77
|
/**
|
|
78
78
|
* A2A message parts (text, file, or tool_result only). Note: Tool role messages must only contain tool_result parts.
|
|
79
79
|
*/
|
|
@@ -145,7 +145,7 @@ export type Contact = {
|
|
|
145
145
|
/**
|
|
146
146
|
* Thread information to group related requests
|
|
147
147
|
*/
|
|
148
|
-
export type
|
|
148
|
+
export type Thread = {
|
|
149
149
|
/**
|
|
150
150
|
* Unique thread identifier to group related invocations.
|
|
151
151
|
*/
|
|
@@ -228,7 +228,7 @@ export type AgentResponseRequest = {
|
|
|
228
228
|
/**
|
|
229
229
|
* Thread information to group related requests
|
|
230
230
|
*/
|
|
231
|
-
thread?:
|
|
231
|
+
thread?: Thread | undefined;
|
|
232
232
|
/**
|
|
233
233
|
* Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
|
|
234
234
|
*/
|
|
@@ -260,14 +260,12 @@ export type AgentResponseRequest = {
|
|
|
260
260
|
};
|
|
261
261
|
|
|
262
262
|
/** @internal */
|
|
263
|
-
export const
|
|
264
|
-
|
|
265
|
-
> = z.nativeEnum(RoleToolMessage);
|
|
263
|
+
export const ToolMessage$outboundSchema: z.ZodNativeEnum<typeof ToolMessage> = z
|
|
264
|
+
.nativeEnum(ToolMessage);
|
|
266
265
|
|
|
267
266
|
/** @internal */
|
|
268
|
-
export const
|
|
269
|
-
|
|
270
|
-
> = z.nativeEnum(RoleUserMessage);
|
|
267
|
+
export const UserMessage$outboundSchema: z.ZodNativeEnum<typeof UserMessage> = z
|
|
268
|
+
.nativeEnum(UserMessage);
|
|
271
269
|
|
|
272
270
|
/** @internal */
|
|
273
271
|
export type AgentResponseRequestRole$Outbound = string | string;
|
|
@@ -277,7 +275,7 @@ export const AgentResponseRequestRole$outboundSchema: z.ZodType<
|
|
|
277
275
|
AgentResponseRequestRole$Outbound,
|
|
278
276
|
z.ZodTypeDef,
|
|
279
277
|
AgentResponseRequestRole
|
|
280
|
-
> = z.union([
|
|
278
|
+
> = z.union([UserMessage$outboundSchema, ToolMessage$outboundSchema]);
|
|
281
279
|
|
|
282
280
|
export function agentResponseRequestRoleToJSON(
|
|
283
281
|
agentResponseRequestRole: AgentResponseRequestRole,
|
|
@@ -333,10 +331,7 @@ export const A2AMessage$outboundSchema: z.ZodType<
|
|
|
333
331
|
A2AMessage
|
|
334
332
|
> = z.object({
|
|
335
333
|
messageId: z.string().optional(),
|
|
336
|
-
role: z.union([
|
|
337
|
-
RoleUserMessage$outboundSchema,
|
|
338
|
-
RoleToolMessage$outboundSchema,
|
|
339
|
-
]),
|
|
334
|
+
role: z.union([UserMessage$outboundSchema, ToolMessage$outboundSchema]),
|
|
340
335
|
parts: z.array(
|
|
341
336
|
z.union([
|
|
342
337
|
TextPart$outboundSchema,
|
|
@@ -424,27 +419,23 @@ export function contactToJSON(contact: Contact): string {
|
|
|
424
419
|
}
|
|
425
420
|
|
|
426
421
|
/** @internal */
|
|
427
|
-
export type
|
|
422
|
+
export type Thread$Outbound = {
|
|
428
423
|
id: string;
|
|
429
424
|
tags?: Array<string> | undefined;
|
|
430
425
|
};
|
|
431
426
|
|
|
432
427
|
/** @internal */
|
|
433
|
-
export const
|
|
434
|
-
|
|
428
|
+
export const Thread$outboundSchema: z.ZodType<
|
|
429
|
+
Thread$Outbound,
|
|
435
430
|
z.ZodTypeDef,
|
|
436
|
-
|
|
431
|
+
Thread
|
|
437
432
|
> = z.object({
|
|
438
433
|
id: z.string(),
|
|
439
434
|
tags: z.array(z.string()).optional(),
|
|
440
435
|
});
|
|
441
436
|
|
|
442
|
-
export function
|
|
443
|
-
|
|
444
|
-
): string {
|
|
445
|
-
return JSON.stringify(
|
|
446
|
-
AgentResponseRequestThread$outboundSchema.parse(agentResponseRequestThread),
|
|
447
|
-
);
|
|
437
|
+
export function threadToJSON(thread: Thread): string {
|
|
438
|
+
return JSON.stringify(Thread$outboundSchema.parse(thread));
|
|
448
439
|
}
|
|
449
440
|
|
|
450
441
|
/** @internal */
|
|
@@ -524,7 +515,7 @@ export type AgentResponseRequest$Outbound = {
|
|
|
524
515
|
variables?: { [k: string]: any } | undefined;
|
|
525
516
|
identity?: AgentResponseRequestIdentity$Outbound | undefined;
|
|
526
517
|
contact?: Contact$Outbound | undefined;
|
|
527
|
-
thread?:
|
|
518
|
+
thread?: Thread$Outbound | undefined;
|
|
528
519
|
memory?: AgentResponseRequestMemory$Outbound | undefined;
|
|
529
520
|
metadata?: { [k: string]: any } | undefined;
|
|
530
521
|
engine?: string | undefined;
|
|
@@ -546,7 +537,7 @@ export const AgentResponseRequest$outboundSchema: z.ZodType<
|
|
|
546
537
|
identity: z.lazy(() => AgentResponseRequestIdentity$outboundSchema)
|
|
547
538
|
.optional(),
|
|
548
539
|
contact: z.lazy(() => Contact$outboundSchema).optional(),
|
|
549
|
-
thread: z.lazy(() =>
|
|
540
|
+
thread: z.lazy(() => Thread$outboundSchema).optional(),
|
|
550
541
|
memory: z.lazy(() => AgentResponseRequestMemory$outboundSchema).optional(),
|
|
551
542
|
metadata: z.record(z.any()).optional(),
|
|
552
543
|
engine: Engine$outboundSchema.optional(),
|
|
@@ -83,7 +83,7 @@ export type AgentThoughtStreamingEventFunction = {
|
|
|
83
83
|
arguments?: string | undefined;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
export type
|
|
86
|
+
export type ToolCalls = {
|
|
87
87
|
index?: number | undefined;
|
|
88
88
|
id?: string | undefined;
|
|
89
89
|
type?: AgentThoughtStreamingEventDataType | undefined;
|
|
@@ -104,7 +104,7 @@ export type AgentThoughtStreamingEventDataRole = ClosedEnum<
|
|
|
104
104
|
/**
|
|
105
105
|
* If the audio output modality is requested, this object contains data about the audio response from the model.
|
|
106
106
|
*/
|
|
107
|
-
export type
|
|
107
|
+
export type Audio = {
|
|
108
108
|
id: string;
|
|
109
109
|
expiresAt: number;
|
|
110
110
|
data: string;
|
|
@@ -117,7 +117,7 @@ export type AgentThoughtStreamingEventAudio = {
|
|
|
117
117
|
export type AgentThoughtStreamingEventMessage = {
|
|
118
118
|
content?: string | null | undefined;
|
|
119
119
|
refusal?: string | null | undefined;
|
|
120
|
-
toolCalls?: Array<
|
|
120
|
+
toolCalls?: Array<ToolCalls> | undefined;
|
|
121
121
|
role?: AgentThoughtStreamingEventDataRole | undefined;
|
|
122
122
|
/**
|
|
123
123
|
* Internal thought process of the model
|
|
@@ -134,7 +134,7 @@ export type AgentThoughtStreamingEventMessage = {
|
|
|
134
134
|
/**
|
|
135
135
|
* If the audio output modality is requested, this object contains data about the audio response from the model.
|
|
136
136
|
*/
|
|
137
|
-
audio?:
|
|
137
|
+
audio?: Audio | null | undefined;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
export type TopLogprobs = {
|
|
@@ -152,7 +152,7 @@ export type TopLogprobs = {
|
|
|
152
152
|
bytes: Array<number> | null;
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
-
export type
|
|
155
|
+
export type Content = {
|
|
156
156
|
/**
|
|
157
157
|
* The token.
|
|
158
158
|
*/
|
|
@@ -212,7 +212,7 @@ export type Logprobs = {
|
|
|
212
212
|
/**
|
|
213
213
|
* A list of message content tokens with log probability information.
|
|
214
214
|
*/
|
|
215
|
-
content: Array<
|
|
215
|
+
content: Array<Content> | null;
|
|
216
216
|
/**
|
|
217
217
|
* A list of message refusal tokens with log probability information.
|
|
218
218
|
*/
|
|
@@ -411,8 +411,8 @@ export function agentThoughtStreamingEventFunctionFromJSON(
|
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
/** @internal */
|
|
414
|
-
export const
|
|
415
|
-
|
|
414
|
+
export const ToolCalls$inboundSchema: z.ZodType<
|
|
415
|
+
ToolCalls,
|
|
416
416
|
z.ZodTypeDef,
|
|
417
417
|
unknown
|
|
418
418
|
> = z.object({
|
|
@@ -428,14 +428,13 @@ export const AgentThoughtStreamingEventToolCalls$inboundSchema: z.ZodType<
|
|
|
428
428
|
});
|
|
429
429
|
});
|
|
430
430
|
|
|
431
|
-
export function
|
|
431
|
+
export function toolCallsFromJSON(
|
|
432
432
|
jsonString: string,
|
|
433
|
-
): SafeParseResult<
|
|
433
|
+
): SafeParseResult<ToolCalls, SDKValidationError> {
|
|
434
434
|
return safeParse(
|
|
435
435
|
jsonString,
|
|
436
|
-
(x) =>
|
|
437
|
-
|
|
438
|
-
`Failed to parse 'AgentThoughtStreamingEventToolCalls' from JSON`,
|
|
436
|
+
(x) => ToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
437
|
+
`Failed to parse 'ToolCalls' from JSON`,
|
|
439
438
|
);
|
|
440
439
|
}
|
|
441
440
|
|
|
@@ -445,28 +444,25 @@ export const AgentThoughtStreamingEventDataRole$inboundSchema: z.ZodNativeEnum<
|
|
|
445
444
|
> = z.nativeEnum(AgentThoughtStreamingEventDataRole);
|
|
446
445
|
|
|
447
446
|
/** @internal */
|
|
448
|
-
export const
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
})
|
|
458
|
-
return remap$(v, {
|
|
459
|
-
"expires_at": "expiresAt",
|
|
447
|
+
export const Audio$inboundSchema: z.ZodType<Audio, z.ZodTypeDef, unknown> = z
|
|
448
|
+
.object({
|
|
449
|
+
id: z.string(),
|
|
450
|
+
expires_at: z.number().int(),
|
|
451
|
+
data: z.string(),
|
|
452
|
+
transcript: z.string(),
|
|
453
|
+
}).transform((v) => {
|
|
454
|
+
return remap$(v, {
|
|
455
|
+
"expires_at": "expiresAt",
|
|
456
|
+
});
|
|
460
457
|
});
|
|
461
|
-
});
|
|
462
458
|
|
|
463
|
-
export function
|
|
459
|
+
export function audioFromJSON(
|
|
464
460
|
jsonString: string,
|
|
465
|
-
): SafeParseResult<
|
|
461
|
+
): SafeParseResult<Audio, SDKValidationError> {
|
|
466
462
|
return safeParse(
|
|
467
463
|
jsonString,
|
|
468
|
-
(x) =>
|
|
469
|
-
`Failed to parse '
|
|
464
|
+
(x) => Audio$inboundSchema.parse(JSON.parse(x)),
|
|
465
|
+
`Failed to parse 'Audio' from JSON`,
|
|
470
466
|
);
|
|
471
467
|
}
|
|
472
468
|
|
|
@@ -478,15 +474,12 @@ export const AgentThoughtStreamingEventMessage$inboundSchema: z.ZodType<
|
|
|
478
474
|
> = z.object({
|
|
479
475
|
content: z.nullable(z.string()).optional(),
|
|
480
476
|
refusal: z.nullable(z.string()).optional(),
|
|
481
|
-
tool_calls: z.array(
|
|
482
|
-
z.lazy(() => AgentThoughtStreamingEventToolCalls$inboundSchema),
|
|
483
|
-
).optional(),
|
|
477
|
+
tool_calls: z.array(z.lazy(() => ToolCalls$inboundSchema)).optional(),
|
|
484
478
|
role: AgentThoughtStreamingEventDataRole$inboundSchema.optional(),
|
|
485
479
|
reasoning: z.nullable(z.string()).optional(),
|
|
486
480
|
reasoning_signature: z.nullable(z.string()).optional(),
|
|
487
481
|
redacted_reasoning: z.string().optional(),
|
|
488
|
-
audio: z.nullable(z.lazy(() =>
|
|
489
|
-
.optional(),
|
|
482
|
+
audio: z.nullable(z.lazy(() => Audio$inboundSchema)).optional(),
|
|
490
483
|
}).transform((v) => {
|
|
491
484
|
return remap$(v, {
|
|
492
485
|
"tool_calls": "toolCalls",
|
|
@@ -527,28 +520,25 @@ export function topLogprobsFromJSON(
|
|
|
527
520
|
}
|
|
528
521
|
|
|
529
522
|
/** @internal */
|
|
530
|
-
export const
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
})
|
|
540
|
-
return remap$(v, {
|
|
541
|
-
"top_logprobs": "topLogprobs",
|
|
523
|
+
export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
|
|
524
|
+
z.object({
|
|
525
|
+
token: z.string(),
|
|
526
|
+
logprob: z.number(),
|
|
527
|
+
bytes: z.nullable(z.array(z.number())),
|
|
528
|
+
top_logprobs: z.array(z.lazy(() => TopLogprobs$inboundSchema)),
|
|
529
|
+
}).transform((v) => {
|
|
530
|
+
return remap$(v, {
|
|
531
|
+
"top_logprobs": "topLogprobs",
|
|
532
|
+
});
|
|
542
533
|
});
|
|
543
|
-
});
|
|
544
534
|
|
|
545
|
-
export function
|
|
535
|
+
export function contentFromJSON(
|
|
546
536
|
jsonString: string,
|
|
547
|
-
): SafeParseResult<
|
|
537
|
+
): SafeParseResult<Content, SDKValidationError> {
|
|
548
538
|
return safeParse(
|
|
549
539
|
jsonString,
|
|
550
|
-
(x) =>
|
|
551
|
-
`Failed to parse '
|
|
540
|
+
(x) => Content$inboundSchema.parse(JSON.parse(x)),
|
|
541
|
+
`Failed to parse 'Content' from JSON`,
|
|
552
542
|
);
|
|
553
543
|
}
|
|
554
544
|
|
|
@@ -605,9 +595,7 @@ export const Logprobs$inboundSchema: z.ZodType<
|
|
|
605
595
|
z.ZodTypeDef,
|
|
606
596
|
unknown
|
|
607
597
|
> = z.object({
|
|
608
|
-
content: z.nullable(
|
|
609
|
-
z.array(z.lazy(() => AgentThoughtStreamingEventContent$inboundSchema)),
|
|
610
|
-
),
|
|
598
|
+
content: z.nullable(z.array(z.lazy(() => Content$inboundSchema))),
|
|
611
599
|
refusal: z.nullable(z.array(z.lazy(() => Refusal$inboundSchema))),
|
|
612
600
|
});
|
|
613
601
|
|
|
@@ -33,6 +33,11 @@ import {
|
|
|
33
33
|
DeleteMemoryDocumentToolInput$Outbound,
|
|
34
34
|
DeleteMemoryDocumentToolInput$outboundSchema,
|
|
35
35
|
} from "./deletememorydocumenttoolinput.js";
|
|
36
|
+
import {
|
|
37
|
+
FileSystemToolInput,
|
|
38
|
+
FileSystemToolInput$Outbound,
|
|
39
|
+
FileSystemToolInput$outboundSchema,
|
|
40
|
+
} from "./filesystemtoolinput.js";
|
|
36
41
|
import {
|
|
37
42
|
FunctionToolInput,
|
|
38
43
|
FunctionToolInput$Outbound,
|
|
@@ -117,6 +122,7 @@ export type AgentToolInputCRUD =
|
|
|
117
122
|
| AdvisorToolInput
|
|
118
123
|
| SidekickToolInput
|
|
119
124
|
| CodeInterpreterToolInput
|
|
125
|
+
| FileSystemToolInput
|
|
120
126
|
| HttpToolInput
|
|
121
127
|
| CodeToolInput
|
|
122
128
|
| FunctionToolInput
|
|
@@ -139,6 +145,7 @@ export type AgentToolInputCRUD$Outbound =
|
|
|
139
145
|
| AdvisorToolInput$Outbound
|
|
140
146
|
| SidekickToolInput$Outbound
|
|
141
147
|
| CodeInterpreterToolInput$Outbound
|
|
148
|
+
| FileSystemToolInput$Outbound
|
|
142
149
|
| HttpToolInput$Outbound
|
|
143
150
|
| CodeToolInput$Outbound
|
|
144
151
|
| FunctionToolInput$Outbound
|
|
@@ -165,6 +172,7 @@ export const AgentToolInputCRUD$outboundSchema: z.ZodType<
|
|
|
165
172
|
AdvisorToolInput$outboundSchema,
|
|
166
173
|
SidekickToolInput$outboundSchema,
|
|
167
174
|
CodeInterpreterToolInput$outboundSchema,
|
|
175
|
+
FileSystemToolInput$outboundSchema,
|
|
168
176
|
HttpToolInput$outboundSchema,
|
|
169
177
|
CodeToolInput$outboundSchema,
|
|
170
178
|
FunctionToolInput$outboundSchema,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type CreateFileSystemFolderRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Folder to create, relative to the file system root
|
|
10
|
+
*/
|
|
11
|
+
path: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type CreateFileSystemFolderRequest$Outbound = {
|
|
16
|
+
path: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const CreateFileSystemFolderRequest$outboundSchema: z.ZodType<
|
|
21
|
+
CreateFileSystemFolderRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
CreateFileSystemFolderRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
path: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function createFileSystemFolderRequestToJSON(
|
|
29
|
+
createFileSystemFolderRequest: CreateFileSystemFolderRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
CreateFileSystemFolderRequest$outboundSchema.parse(
|
|
33
|
+
createFileSystemFolderRequest,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type CreateFileSystemFolderResponse = {
|
|
11
|
+
path: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const CreateFileSystemFolderResponse$inboundSchema: z.ZodType<
|
|
16
|
+
CreateFileSystemFolderResponse,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
path: z.string(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export function createFileSystemFolderResponseFromJSON(
|
|
24
|
+
jsonString: string,
|
|
25
|
+
): SafeParseResult<CreateFileSystemFolderResponse, SDKValidationError> {
|
|
26
|
+
return safeParse(
|
|
27
|
+
jsonString,
|
|
28
|
+
(x) => CreateFileSystemFolderResponse$inboundSchema.parse(JSON.parse(x)),
|
|
29
|
+
`Failed to parse 'CreateFileSystemFolderResponse' from JSON`,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import {
|
|
9
|
+
Sharing,
|
|
10
|
+
Sharing$Outbound,
|
|
11
|
+
Sharing$outboundSchema,
|
|
12
|
+
} from "./sharing.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Whether external MCP clients may reach this file system. Defaults to disabled.
|
|
16
|
+
*/
|
|
17
|
+
export const ExternalAccess = {
|
|
18
|
+
Disabled: "disabled",
|
|
19
|
+
ReadOnly: "read_only",
|
|
20
|
+
ReadWrite: "read_write",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* Whether external MCP clients may reach this file system. Defaults to disabled.
|
|
24
|
+
*/
|
|
25
|
+
export type ExternalAccess = ClosedEnum<typeof ExternalAccess>;
|
|
26
|
+
|
|
27
|
+
export type CreateFileSystemRequest = {
|
|
28
|
+
/**
|
|
29
|
+
* The unique key of the file system. The key is unique and immutable and cannot be repeated within the same workspace.
|
|
30
|
+
*/
|
|
31
|
+
key: string;
|
|
32
|
+
/**
|
|
33
|
+
* Entity storage path. With workspace-level API keys, the first element identifies the project. With project-level API keys, the path is relative to that project.
|
|
34
|
+
*/
|
|
35
|
+
path: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human readable name shown in the UI. Defaults to the key.
|
|
38
|
+
*/
|
|
39
|
+
displayName?: string | undefined;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Whether external MCP clients may reach this file system. Defaults to disabled.
|
|
43
|
+
*/
|
|
44
|
+
externalAccess?: ExternalAccess | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Sharing controls which projects in the workspace may use this entity and
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* what they may do with it.
|
|
50
|
+
*/
|
|
51
|
+
sharing?: Sharing | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const ExternalAccess$outboundSchema: z.ZodNativeEnum<
|
|
56
|
+
typeof ExternalAccess
|
|
57
|
+
> = z.nativeEnum(ExternalAccess);
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type CreateFileSystemRequest$Outbound = {
|
|
61
|
+
key: string;
|
|
62
|
+
path: string;
|
|
63
|
+
display_name?: string | undefined;
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
external_access?: string | undefined;
|
|
66
|
+
sharing?: Sharing$Outbound | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const CreateFileSystemRequest$outboundSchema: z.ZodType<
|
|
71
|
+
CreateFileSystemRequest$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
CreateFileSystemRequest
|
|
74
|
+
> = z.object({
|
|
75
|
+
key: z.string(),
|
|
76
|
+
path: z.string(),
|
|
77
|
+
displayName: z.string().optional(),
|
|
78
|
+
description: z.string().optional(),
|
|
79
|
+
externalAccess: ExternalAccess$outboundSchema.optional(),
|
|
80
|
+
sharing: Sharing$outboundSchema.optional(),
|
|
81
|
+
}).transform((v) => {
|
|
82
|
+
return remap$(v, {
|
|
83
|
+
displayName: "display_name",
|
|
84
|
+
externalAccess: "external_access",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function createFileSystemRequestToJSON(
|
|
89
|
+
createFileSystemRequest: CreateFileSystemRequest,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
CreateFileSystemRequest$outboundSchema.parse(createFileSystemRequest),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const DeleteFileSystemFileResponseType = {
|
|
12
|
+
File: "file",
|
|
13
|
+
Dir: "dir",
|
|
14
|
+
Symlink: "symlink",
|
|
15
|
+
Other: "other",
|
|
16
|
+
} as const;
|
|
17
|
+
export type DeleteFileSystemFileResponseType = ClosedEnum<
|
|
18
|
+
typeof DeleteFileSystemFileResponseType
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export type DeleteFileSystemFileResponse = {
|
|
22
|
+
path: string;
|
|
23
|
+
type: DeleteFileSystemFileResponseType;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const DeleteFileSystemFileResponseType$inboundSchema: z.ZodNativeEnum<
|
|
28
|
+
typeof DeleteFileSystemFileResponseType
|
|
29
|
+
> = z.nativeEnum(DeleteFileSystemFileResponseType);
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const DeleteFileSystemFileResponse$inboundSchema: z.ZodType<
|
|
33
|
+
DeleteFileSystemFileResponse,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
path: z.string(),
|
|
38
|
+
type: DeleteFileSystemFileResponseType$inboundSchema,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function deleteFileSystemFileResponseFromJSON(
|
|
42
|
+
jsonString: string,
|
|
43
|
+
): SafeParseResult<DeleteFileSystemFileResponse, SDKValidationError> {
|
|
44
|
+
return safeParse(
|
|
45
|
+
jsonString,
|
|
46
|
+
(x) => DeleteFileSystemFileResponse$inboundSchema.parse(JSON.parse(x)),
|
|
47
|
+
`Failed to parse 'DeleteFileSystemFileResponse' from JSON`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type DeleteFileSystemResponse = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const DeleteFileSystemResponse$inboundSchema: z.ZodType<
|
|
14
|
+
DeleteFileSystemResponse,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
export function deleteFileSystemResponseFromJSON(
|
|
20
|
+
jsonString: string,
|
|
21
|
+
): SafeParseResult<DeleteFileSystemResponse, SDKValidationError> {
|
|
22
|
+
return safeParse(
|
|
23
|
+
jsonString,
|
|
24
|
+
(x) => DeleteFileSystemResponse$inboundSchema.parse(JSON.parse(x)),
|
|
25
|
+
`Failed to parse 'DeleteFileSystemResponse' from JSON`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
StructuredOutput$outboundSchema,
|
|
15
15
|
} from "./structuredoutput.js";
|
|
16
16
|
|
|
17
|
-
export type
|
|
17
|
+
export type Messages = {};
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The data to grade. When `messages` is present it is the conversation and
|
|
@@ -24,7 +24,7 @@ export type EvaluationContextMessages = {};
|
|
|
24
24
|
* conversation carries no assistant turn. Mirrors graders-api buildGraderRequest.
|
|
25
25
|
*/
|
|
26
26
|
export type EvaluationContext = {
|
|
27
|
-
messages?: Array<
|
|
27
|
+
messages?: Array<Messages> | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* StructuredInput names its fields after the template variables they feed, so
|
|
30
30
|
*
|
|
@@ -37,26 +37,22 @@ export type EvaluationContext = {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
/** @internal */
|
|
40
|
-
export type
|
|
40
|
+
export type Messages$Outbound = {};
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
|
-
export const
|
|
44
|
-
|
|
43
|
+
export const Messages$outboundSchema: z.ZodType<
|
|
44
|
+
Messages$Outbound,
|
|
45
45
|
z.ZodTypeDef,
|
|
46
|
-
|
|
46
|
+
Messages
|
|
47
47
|
> = z.object({});
|
|
48
48
|
|
|
49
|
-
export function
|
|
50
|
-
|
|
51
|
-
): string {
|
|
52
|
-
return JSON.stringify(
|
|
53
|
-
EvaluationContextMessages$outboundSchema.parse(evaluationContextMessages),
|
|
54
|
-
);
|
|
49
|
+
export function messagesToJSON(messages: Messages): string {
|
|
50
|
+
return JSON.stringify(Messages$outboundSchema.parse(messages));
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
/** @internal */
|
|
58
54
|
export type EvaluationContext$Outbound = {
|
|
59
|
-
messages?: Array<
|
|
55
|
+
messages?: Array<Messages$Outbound> | undefined;
|
|
60
56
|
input?: StructuredInput$Outbound | undefined;
|
|
61
57
|
output?: StructuredOutput$Outbound | undefined;
|
|
62
58
|
variables?: { [k: string]: any } | undefined;
|
|
@@ -68,8 +64,7 @@ export const EvaluationContext$outboundSchema: z.ZodType<
|
|
|
68
64
|
z.ZodTypeDef,
|
|
69
65
|
EvaluationContext
|
|
70
66
|
> = z.object({
|
|
71
|
-
messages: z.array(z.lazy(() =>
|
|
72
|
-
.optional(),
|
|
67
|
+
messages: z.array(z.lazy(() => Messages$outboundSchema)).optional(),
|
|
73
68
|
input: StructuredInput$outboundSchema.optional(),
|
|
74
69
|
output: StructuredOutput$outboundSchema.optional(),
|
|
75
70
|
variables: z.record(z.any()).optional(),
|