@orq-ai/node 4.1.0-rc.4 → 4.1.0-rc.5
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 +25494 -27422
- package/bin/mcp-server.js.map +64 -47
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/actionreviewedstreamingevent.d.ts +76 -0
- package/models/components/actionreviewedstreamingevent.d.ts.map +1 -0
- package/models/components/actionreviewedstreamingevent.js +127 -0
- package/models/components/actionreviewedstreamingevent.js.map +1 -0
- package/models/components/actionreviewrequestedstreamingevent.d.ts +135 -0
- package/models/components/actionreviewrequestedstreamingevent.d.ts.map +1 -0
- package/models/components/actionreviewrequestedstreamingevent.js +180 -0
- package/models/components/actionreviewrequestedstreamingevent.js.map +1 -0
- package/models/components/agenterroredstreamingevent.d.ts +58 -0
- package/models/components/agenterroredstreamingevent.d.ts.map +1 -0
- package/models/components/agenterroredstreamingevent.js +91 -0
- package/models/components/agenterroredstreamingevent.js.map +1 -0
- package/models/components/agentexecutionstartedstreamingevent.d.ts +62 -0
- package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -0
- package/models/components/agentexecutionstartedstreamingevent.js +103 -0
- package/models/components/agentexecutionstartedstreamingevent.js.map +1 -0
- package/models/components/agenthandedoffstreamingevent.d.ts +51 -0
- package/models/components/agenthandedoffstreamingevent.d.ts.map +1 -0
- package/models/components/agenthandedoffstreamingevent.js +96 -0
- package/models/components/agenthandedoffstreamingevent.js.map +1 -0
- package/models/components/agentinactivestreamingevent.d.ts +309 -0
- package/models/components/agentinactivestreamingevent.d.ts.map +1 -0
- package/models/components/agentinactivestreamingevent.js +385 -0
- package/models/components/agentinactivestreamingevent.js.map +1 -0
- package/models/components/agentmessagecreatedstreamingevent.d.ts +141 -0
- package/models/components/agentmessagecreatedstreamingevent.d.ts.map +1 -0
- package/models/components/agentmessagecreatedstreamingevent.js +190 -0
- package/models/components/agentmessagecreatedstreamingevent.js.map +1 -0
- package/models/components/agentstartedstreamingevent.d.ts +382 -0
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -0
- package/models/components/agentstartedstreamingevent.js +441 -0
- package/models/components/agentstartedstreamingevent.js.map +1 -0
- package/models/components/agentthoughtstreamingevent.d.ts +542 -0
- package/models/components/agentthoughtstreamingevent.d.ts.map +1 -0
- package/models/components/agentthoughtstreamingevent.js +626 -0
- package/models/components/agentthoughtstreamingevent.js.map +1 -0
- package/models/components/errorstreamingevent.d.ts +51 -0
- package/models/components/errorstreamingevent.d.ts.map +1 -0
- package/models/components/errorstreamingevent.js +87 -0
- package/models/components/errorstreamingevent.js.map +1 -0
- package/models/components/executionnamedstreamingevent.d.ts +51 -0
- package/models/components/executionnamedstreamingevent.d.ts.map +1 -0
- package/models/components/executionnamedstreamingevent.js +96 -0
- package/models/components/executionnamedstreamingevent.js.map +1 -0
- package/models/components/executionreviewedstreamingevent.d.ts +45 -0
- package/models/components/executionreviewedstreamingevent.d.ts.map +1 -0
- package/models/components/executionreviewedstreamingevent.js +81 -0
- package/models/components/executionreviewedstreamingevent.js.map +1 -0
- package/models/components/executionreviewrequiredstreamingevent.d.ts +45 -0
- package/models/components/executionreviewrequiredstreamingevent.d.ts.map +1 -0
- package/models/components/executionreviewrequiredstreamingevent.js +82 -0
- package/models/components/executionreviewrequiredstreamingevent.js.map +1 -0
- package/models/components/filepart.d.ts +1 -1
- package/models/components/index.d.ts +17 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +17 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +13 -13
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +17 -17
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/timeoutstreamingevent.d.ts +49 -0
- package/models/components/timeoutstreamingevent.d.ts.map +1 -0
- package/models/components/timeoutstreamingevent.js +85 -0
- package/models/components/timeoutstreamingevent.js.map +1 -0
- package/models/components/toolexecutionfailedstreamingevent.d.ts +144 -0
- package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionfailedstreamingevent.js +223 -0
- package/models/components/toolexecutionfailedstreamingevent.js.map +1 -0
- package/models/components/toolexecutionfinishedstreamingevent.d.ts +129 -0
- package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionfinishedstreamingevent.js +205 -0
- package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts +139 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -0
- package/models/components/toolexecutionstartedstreamingevent.js +217 -0
- package/models/components/toolexecutionstartedstreamingevent.js.map +1 -0
- package/models/components/toolresultpart.d.ts +1 -1
- package/models/operations/createagentresponserequest.d.ts +4 -137
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +9 -138
- package/models/operations/createagentresponserequest.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- 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.d.ts +80 -145
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +190 -266
- package/models/operations/createeval.js.map +1 -1
- 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/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.d.ts +14 -79
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +49 -132
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/invokeagent.d.ts +14 -147
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +19 -148
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- 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/listknowledgebases.d.ts +16 -16
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +27 -25
- package/models/operations/listknowledgebases.js.map +1 -1
- 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/retrievetool.js +12 -12
- package/models/operations/runagent.d.ts +4 -137
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +17 -145
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +241 -2491
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +172 -2826
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +889 -3139
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +175 -2825
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.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.d.ts +14 -79
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +51 -134
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/actionreviewedstreamingevent.ts +189 -0
- package/src/models/components/actionreviewrequestedstreamingevent.ts +326 -0
- package/src/models/components/agenterroredstreamingevent.ts +142 -0
- package/src/models/components/agentexecutionstartedstreamingevent.ts +145 -0
- package/src/models/components/agenthandedoffstreamingevent.ts +142 -0
- package/src/models/components/agentinactivestreamingevent.ts +857 -0
- package/src/models/components/agentmessagecreatedstreamingevent.ts +396 -0
- package/src/models/components/agentstartedstreamingevent.ts +909 -0
- package/src/models/components/agentthoughtstreamingevent.ts +1419 -0
- package/src/models/components/errorstreamingevent.ts +129 -0
- package/src/models/components/executionnamedstreamingevent.ts +142 -0
- package/src/models/components/executionreviewedstreamingevent.ts +122 -0
- package/src/models/components/executionreviewrequiredstreamingevent.ts +130 -0
- package/src/models/components/filepart.ts +1 -1
- package/src/models/components/index.ts +17 -0
- package/src/models/components/invokedeploymentrequest.ts +32 -27
- package/src/models/components/timeoutstreamingevent.ts +125 -0
- package/src/models/components/toolexecutionfailedstreamingevent.ts +406 -0
- package/src/models/components/toolexecutionfinishedstreamingevent.ts +373 -0
- package/src/models/components/toolexecutionstartedstreamingevent.ts +350 -0
- package/src/models/components/toolresultpart.ts +1 -1
- package/src/models/operations/createagentresponserequest.ts +20 -321
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- 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 +318 -615
- 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/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +52 -287
- package/src/models/operations/invokeagent.ts +36 -373
- package/src/models/operations/listbudgets.ts +2 -2
- 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/listknowledgebases.ts +82 -102
- 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/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +17 -365
- package/src/models/operations/streamagent.ts +794 -6985
- package/src/models/operations/streamrunagent.ts +3939 -9983
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.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 +52 -287
- package/src/models/operations/updatetool.ts +14 -14
|
@@ -0,0 +1,129 @@
|
|
|
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 ErrorStreamingEventType = {
|
|
12
|
+
AgentsError: "agents.error",
|
|
13
|
+
} as const;
|
|
14
|
+
export type ErrorStreamingEventType = ClosedEnum<
|
|
15
|
+
typeof ErrorStreamingEventType
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type ErrorStreamingEventData = {
|
|
19
|
+
error: string;
|
|
20
|
+
code: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when a streaming error occurs outside of normal agent execution. Contains the error message and error code for debugging.
|
|
25
|
+
*/
|
|
26
|
+
export type ErrorStreamingEvent = {
|
|
27
|
+
type: ErrorStreamingEventType;
|
|
28
|
+
/**
|
|
29
|
+
* ISO timestamp of the event
|
|
30
|
+
*/
|
|
31
|
+
timestamp: string;
|
|
32
|
+
data: ErrorStreamingEventData;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const ErrorStreamingEventType$inboundSchema: z.ZodNativeEnum<
|
|
37
|
+
typeof ErrorStreamingEventType
|
|
38
|
+
> = z.nativeEnum(ErrorStreamingEventType);
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const ErrorStreamingEventType$outboundSchema: z.ZodNativeEnum<
|
|
41
|
+
typeof ErrorStreamingEventType
|
|
42
|
+
> = ErrorStreamingEventType$inboundSchema;
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ErrorStreamingEventData$inboundSchema: z.ZodType<
|
|
46
|
+
ErrorStreamingEventData,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
error: z.string(),
|
|
51
|
+
code: z.string(),
|
|
52
|
+
});
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type ErrorStreamingEventData$Outbound = {
|
|
55
|
+
error: string;
|
|
56
|
+
code: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const ErrorStreamingEventData$outboundSchema: z.ZodType<
|
|
61
|
+
ErrorStreamingEventData$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
ErrorStreamingEventData
|
|
64
|
+
> = z.object({
|
|
65
|
+
error: z.string(),
|
|
66
|
+
code: z.string(),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function errorStreamingEventDataToJSON(
|
|
70
|
+
errorStreamingEventData: ErrorStreamingEventData,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
ErrorStreamingEventData$outboundSchema.parse(errorStreamingEventData),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export function errorStreamingEventDataFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<ErrorStreamingEventData, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => ErrorStreamingEventData$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'ErrorStreamingEventData' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ErrorStreamingEvent$inboundSchema: z.ZodType<
|
|
88
|
+
ErrorStreamingEvent,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
type: ErrorStreamingEventType$inboundSchema,
|
|
93
|
+
timestamp: z.string(),
|
|
94
|
+
data: z.lazy(() => ErrorStreamingEventData$inboundSchema),
|
|
95
|
+
});
|
|
96
|
+
/** @internal */
|
|
97
|
+
export type ErrorStreamingEvent$Outbound = {
|
|
98
|
+
type: string;
|
|
99
|
+
timestamp: string;
|
|
100
|
+
data: ErrorStreamingEventData$Outbound;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const ErrorStreamingEvent$outboundSchema: z.ZodType<
|
|
105
|
+
ErrorStreamingEvent$Outbound,
|
|
106
|
+
z.ZodTypeDef,
|
|
107
|
+
ErrorStreamingEvent
|
|
108
|
+
> = z.object({
|
|
109
|
+
type: ErrorStreamingEventType$outboundSchema,
|
|
110
|
+
timestamp: z.string(),
|
|
111
|
+
data: z.lazy(() => ErrorStreamingEventData$outboundSchema),
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export function errorStreamingEventToJSON(
|
|
115
|
+
errorStreamingEvent: ErrorStreamingEvent,
|
|
116
|
+
): string {
|
|
117
|
+
return JSON.stringify(
|
|
118
|
+
ErrorStreamingEvent$outboundSchema.parse(errorStreamingEvent),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
export function errorStreamingEventFromJSON(
|
|
122
|
+
jsonString: string,
|
|
123
|
+
): SafeParseResult<ErrorStreamingEvent, SDKValidationError> {
|
|
124
|
+
return safeParse(
|
|
125
|
+
jsonString,
|
|
126
|
+
(x) => ErrorStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
127
|
+
`Failed to parse 'ErrorStreamingEvent' from JSON`,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
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 { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const ExecutionNamedStreamingEventType = {
|
|
13
|
+
EventAgentsExecutionNamed: "event.agents.execution_named",
|
|
14
|
+
} as const;
|
|
15
|
+
export type ExecutionNamedStreamingEventType = ClosedEnum<
|
|
16
|
+
typeof ExecutionNamedStreamingEventType
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export type ExecutionNamedStreamingEventData = {
|
|
20
|
+
name: string;
|
|
21
|
+
agentManifestId: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when the agent execution is assigned a human-readable name, typically generated based on the conversation content.
|
|
26
|
+
*/
|
|
27
|
+
export type ExecutionNamedStreamingEvent = {
|
|
28
|
+
type: ExecutionNamedStreamingEventType;
|
|
29
|
+
/**
|
|
30
|
+
* ISO timestamp of the event
|
|
31
|
+
*/
|
|
32
|
+
timestamp: string;
|
|
33
|
+
data: ExecutionNamedStreamingEventData;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ExecutionNamedStreamingEventType$inboundSchema: z.ZodNativeEnum<
|
|
38
|
+
typeof ExecutionNamedStreamingEventType
|
|
39
|
+
> = z.nativeEnum(ExecutionNamedStreamingEventType);
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ExecutionNamedStreamingEventType$outboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof ExecutionNamedStreamingEventType
|
|
43
|
+
> = ExecutionNamedStreamingEventType$inboundSchema;
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ExecutionNamedStreamingEventData$inboundSchema: z.ZodType<
|
|
47
|
+
ExecutionNamedStreamingEventData,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
name: z.string(),
|
|
52
|
+
agent_manifest_id: z.string(),
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
"agent_manifest_id": "agentManifestId",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type ExecutionNamedStreamingEventData$Outbound = {
|
|
60
|
+
name: string;
|
|
61
|
+
agent_manifest_id: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const ExecutionNamedStreamingEventData$outboundSchema: z.ZodType<
|
|
66
|
+
ExecutionNamedStreamingEventData$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
ExecutionNamedStreamingEventData
|
|
69
|
+
> = z.object({
|
|
70
|
+
name: z.string(),
|
|
71
|
+
agentManifestId: z.string(),
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
agentManifestId: "agent_manifest_id",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function executionNamedStreamingEventDataToJSON(
|
|
79
|
+
executionNamedStreamingEventData: ExecutionNamedStreamingEventData,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
ExecutionNamedStreamingEventData$outboundSchema.parse(
|
|
83
|
+
executionNamedStreamingEventData,
|
|
84
|
+
),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
export function executionNamedStreamingEventDataFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<ExecutionNamedStreamingEventData, SDKValidationError> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) => ExecutionNamedStreamingEventData$inboundSchema.parse(JSON.parse(x)),
|
|
93
|
+
`Failed to parse 'ExecutionNamedStreamingEventData' from JSON`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const ExecutionNamedStreamingEvent$inboundSchema: z.ZodType<
|
|
99
|
+
ExecutionNamedStreamingEvent,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
unknown
|
|
102
|
+
> = z.object({
|
|
103
|
+
type: ExecutionNamedStreamingEventType$inboundSchema,
|
|
104
|
+
timestamp: z.string(),
|
|
105
|
+
data: z.lazy(() => ExecutionNamedStreamingEventData$inboundSchema),
|
|
106
|
+
});
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type ExecutionNamedStreamingEvent$Outbound = {
|
|
109
|
+
type: string;
|
|
110
|
+
timestamp: string;
|
|
111
|
+
data: ExecutionNamedStreamingEventData$Outbound;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const ExecutionNamedStreamingEvent$outboundSchema: z.ZodType<
|
|
116
|
+
ExecutionNamedStreamingEvent$Outbound,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
ExecutionNamedStreamingEvent
|
|
119
|
+
> = z.object({
|
|
120
|
+
type: ExecutionNamedStreamingEventType$outboundSchema,
|
|
121
|
+
timestamp: z.string(),
|
|
122
|
+
data: z.lazy(() => ExecutionNamedStreamingEventData$outboundSchema),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
export function executionNamedStreamingEventToJSON(
|
|
126
|
+
executionNamedStreamingEvent: ExecutionNamedStreamingEvent,
|
|
127
|
+
): string {
|
|
128
|
+
return JSON.stringify(
|
|
129
|
+
ExecutionNamedStreamingEvent$outboundSchema.parse(
|
|
130
|
+
executionNamedStreamingEvent,
|
|
131
|
+
),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
export function executionNamedStreamingEventFromJSON(
|
|
135
|
+
jsonString: string,
|
|
136
|
+
): SafeParseResult<ExecutionNamedStreamingEvent, SDKValidationError> {
|
|
137
|
+
return safeParse(
|
|
138
|
+
jsonString,
|
|
139
|
+
(x) => ExecutionNamedStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
140
|
+
`Failed to parse 'ExecutionNamedStreamingEvent' from JSON`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 ExecutionReviewedStreamingEventType = {
|
|
12
|
+
EventAgentsExecutionReviewed: "event.agents.execution_reviewed",
|
|
13
|
+
} as const;
|
|
14
|
+
export type ExecutionReviewedStreamingEventType = ClosedEnum<
|
|
15
|
+
typeof ExecutionReviewedStreamingEventType
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type ExecutionReviewedStreamingEventData = {};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Emitted after the agent execution has been reviewed. The execution will resume processing after this event.
|
|
22
|
+
*/
|
|
23
|
+
export type ExecutionReviewedStreamingEvent = {
|
|
24
|
+
type: ExecutionReviewedStreamingEventType;
|
|
25
|
+
/**
|
|
26
|
+
* ISO timestamp of the event
|
|
27
|
+
*/
|
|
28
|
+
timestamp: string;
|
|
29
|
+
data: ExecutionReviewedStreamingEventData;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ExecutionReviewedStreamingEventType$inboundSchema: z.ZodNativeEnum<
|
|
34
|
+
typeof ExecutionReviewedStreamingEventType
|
|
35
|
+
> = z.nativeEnum(ExecutionReviewedStreamingEventType);
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ExecutionReviewedStreamingEventType$outboundSchema:
|
|
38
|
+
z.ZodNativeEnum<typeof ExecutionReviewedStreamingEventType> =
|
|
39
|
+
ExecutionReviewedStreamingEventType$inboundSchema;
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ExecutionReviewedStreamingEventData$inboundSchema: z.ZodType<
|
|
43
|
+
ExecutionReviewedStreamingEventData,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({});
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type ExecutionReviewedStreamingEventData$Outbound = {};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const ExecutionReviewedStreamingEventData$outboundSchema: z.ZodType<
|
|
52
|
+
ExecutionReviewedStreamingEventData$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
ExecutionReviewedStreamingEventData
|
|
55
|
+
> = z.object({});
|
|
56
|
+
|
|
57
|
+
export function executionReviewedStreamingEventDataToJSON(
|
|
58
|
+
executionReviewedStreamingEventData: ExecutionReviewedStreamingEventData,
|
|
59
|
+
): string {
|
|
60
|
+
return JSON.stringify(
|
|
61
|
+
ExecutionReviewedStreamingEventData$outboundSchema.parse(
|
|
62
|
+
executionReviewedStreamingEventData,
|
|
63
|
+
),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export function executionReviewedStreamingEventDataFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<ExecutionReviewedStreamingEventData, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) =>
|
|
72
|
+
ExecutionReviewedStreamingEventData$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'ExecutionReviewedStreamingEventData' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ExecutionReviewedStreamingEvent$inboundSchema: z.ZodType<
|
|
79
|
+
ExecutionReviewedStreamingEvent,
|
|
80
|
+
z.ZodTypeDef,
|
|
81
|
+
unknown
|
|
82
|
+
> = z.object({
|
|
83
|
+
type: ExecutionReviewedStreamingEventType$inboundSchema,
|
|
84
|
+
timestamp: z.string(),
|
|
85
|
+
data: z.lazy(() => ExecutionReviewedStreamingEventData$inboundSchema),
|
|
86
|
+
});
|
|
87
|
+
/** @internal */
|
|
88
|
+
export type ExecutionReviewedStreamingEvent$Outbound = {
|
|
89
|
+
type: string;
|
|
90
|
+
timestamp: string;
|
|
91
|
+
data: ExecutionReviewedStreamingEventData$Outbound;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const ExecutionReviewedStreamingEvent$outboundSchema: z.ZodType<
|
|
96
|
+
ExecutionReviewedStreamingEvent$Outbound,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
ExecutionReviewedStreamingEvent
|
|
99
|
+
> = z.object({
|
|
100
|
+
type: ExecutionReviewedStreamingEventType$outboundSchema,
|
|
101
|
+
timestamp: z.string(),
|
|
102
|
+
data: z.lazy(() => ExecutionReviewedStreamingEventData$outboundSchema),
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export function executionReviewedStreamingEventToJSON(
|
|
106
|
+
executionReviewedStreamingEvent: ExecutionReviewedStreamingEvent,
|
|
107
|
+
): string {
|
|
108
|
+
return JSON.stringify(
|
|
109
|
+
ExecutionReviewedStreamingEvent$outboundSchema.parse(
|
|
110
|
+
executionReviewedStreamingEvent,
|
|
111
|
+
),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
export function executionReviewedStreamingEventFromJSON(
|
|
115
|
+
jsonString: string,
|
|
116
|
+
): SafeParseResult<ExecutionReviewedStreamingEvent, SDKValidationError> {
|
|
117
|
+
return safeParse(
|
|
118
|
+
jsonString,
|
|
119
|
+
(x) => ExecutionReviewedStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
120
|
+
`Failed to parse 'ExecutionReviewedStreamingEvent' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
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 ExecutionReviewRequiredStreamingEventType = {
|
|
12
|
+
EventAgentsExecutionReviewRequired: "event.agents.execution_review_required",
|
|
13
|
+
} as const;
|
|
14
|
+
export type ExecutionReviewRequiredStreamingEventType = ClosedEnum<
|
|
15
|
+
typeof ExecutionReviewRequiredStreamingEventType
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type ExecutionReviewRequiredStreamingEventData = {};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Emitted when the entire agent execution requires human review before proceeding. The execution will pause until reviewed.
|
|
22
|
+
*/
|
|
23
|
+
export type ExecutionReviewRequiredStreamingEvent = {
|
|
24
|
+
type: ExecutionReviewRequiredStreamingEventType;
|
|
25
|
+
/**
|
|
26
|
+
* ISO timestamp of the event
|
|
27
|
+
*/
|
|
28
|
+
timestamp: string;
|
|
29
|
+
data: ExecutionReviewRequiredStreamingEventData;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ExecutionReviewRequiredStreamingEventType$inboundSchema:
|
|
34
|
+
z.ZodNativeEnum<typeof ExecutionReviewRequiredStreamingEventType> = z
|
|
35
|
+
.nativeEnum(ExecutionReviewRequiredStreamingEventType);
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ExecutionReviewRequiredStreamingEventType$outboundSchema:
|
|
38
|
+
z.ZodNativeEnum<typeof ExecutionReviewRequiredStreamingEventType> =
|
|
39
|
+
ExecutionReviewRequiredStreamingEventType$inboundSchema;
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ExecutionReviewRequiredStreamingEventData$inboundSchema: z.ZodType<
|
|
43
|
+
ExecutionReviewRequiredStreamingEventData,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({});
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type ExecutionReviewRequiredStreamingEventData$Outbound = {};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const ExecutionReviewRequiredStreamingEventData$outboundSchema:
|
|
52
|
+
z.ZodType<
|
|
53
|
+
ExecutionReviewRequiredStreamingEventData$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
ExecutionReviewRequiredStreamingEventData
|
|
56
|
+
> = z.object({});
|
|
57
|
+
|
|
58
|
+
export function executionReviewRequiredStreamingEventDataToJSON(
|
|
59
|
+
executionReviewRequiredStreamingEventData:
|
|
60
|
+
ExecutionReviewRequiredStreamingEventData,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
ExecutionReviewRequiredStreamingEventData$outboundSchema.parse(
|
|
64
|
+
executionReviewRequiredStreamingEventData,
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export function executionReviewRequiredStreamingEventDataFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<
|
|
71
|
+
ExecutionReviewRequiredStreamingEventData,
|
|
72
|
+
SDKValidationError
|
|
73
|
+
> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) =>
|
|
77
|
+
ExecutionReviewRequiredStreamingEventData$inboundSchema.parse(
|
|
78
|
+
JSON.parse(x),
|
|
79
|
+
),
|
|
80
|
+
`Failed to parse 'ExecutionReviewRequiredStreamingEventData' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const ExecutionReviewRequiredStreamingEvent$inboundSchema: z.ZodType<
|
|
86
|
+
ExecutionReviewRequiredStreamingEvent,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({
|
|
90
|
+
type: ExecutionReviewRequiredStreamingEventType$inboundSchema,
|
|
91
|
+
timestamp: z.string(),
|
|
92
|
+
data: z.lazy(() => ExecutionReviewRequiredStreamingEventData$inboundSchema),
|
|
93
|
+
});
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type ExecutionReviewRequiredStreamingEvent$Outbound = {
|
|
96
|
+
type: string;
|
|
97
|
+
timestamp: string;
|
|
98
|
+
data: ExecutionReviewRequiredStreamingEventData$Outbound;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const ExecutionReviewRequiredStreamingEvent$outboundSchema: z.ZodType<
|
|
103
|
+
ExecutionReviewRequiredStreamingEvent$Outbound,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
ExecutionReviewRequiredStreamingEvent
|
|
106
|
+
> = z.object({
|
|
107
|
+
type: ExecutionReviewRequiredStreamingEventType$outboundSchema,
|
|
108
|
+
timestamp: z.string(),
|
|
109
|
+
data: z.lazy(() => ExecutionReviewRequiredStreamingEventData$outboundSchema),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export function executionReviewRequiredStreamingEventToJSON(
|
|
113
|
+
executionReviewRequiredStreamingEvent: ExecutionReviewRequiredStreamingEvent,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
ExecutionReviewRequiredStreamingEvent$outboundSchema.parse(
|
|
117
|
+
executionReviewRequiredStreamingEvent,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
export function executionReviewRequiredStreamingEventFromJSON(
|
|
122
|
+
jsonString: string,
|
|
123
|
+
): SafeParseResult<ExecutionReviewRequiredStreamingEvent, SDKValidationError> {
|
|
124
|
+
return safeParse(
|
|
125
|
+
jsonString,
|
|
126
|
+
(x) =>
|
|
127
|
+
ExecutionReviewRequiredStreamingEvent$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
+
`Failed to parse 'ExecutionReviewRequiredStreamingEvent' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
@@ -52,7 +52,7 @@ export type BinaryFormat = {
|
|
|
52
52
|
export type FileT = BinaryFormat | FileInURIFormat;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
|
|
56
56
|
*/
|
|
57
57
|
export type FilePart = {
|
|
58
58
|
kind: FilePartKind;
|
|
@@ -2,10 +2,27 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./actionreviewedstreamingevent.js";
|
|
6
|
+
export * from "./actionreviewrequestedstreamingevent.js";
|
|
7
|
+
export * from "./agenterroredstreamingevent.js";
|
|
8
|
+
export * from "./agentexecutionstartedstreamingevent.js";
|
|
9
|
+
export * from "./agenthandedoffstreamingevent.js";
|
|
10
|
+
export * from "./agentinactivestreamingevent.js";
|
|
11
|
+
export * from "./agentmessagecreatedstreamingevent.js";
|
|
12
|
+
export * from "./agentstartedstreamingevent.js";
|
|
13
|
+
export * from "./agentthoughtstreamingevent.js";
|
|
5
14
|
export * from "./datapart.js";
|
|
15
|
+
export * from "./errorstreamingevent.js";
|
|
16
|
+
export * from "./executionnamedstreamingevent.js";
|
|
17
|
+
export * from "./executionreviewedstreamingevent.js";
|
|
18
|
+
export * from "./executionreviewrequiredstreamingevent.js";
|
|
6
19
|
export * from "./filepart.js";
|
|
7
20
|
export * from "./invokedeploymentrequest.js";
|
|
8
21
|
export * from "./security.js";
|
|
9
22
|
export * from "./textpart.js";
|
|
23
|
+
export * from "./timeoutstreamingevent.js";
|
|
10
24
|
export * from "./toolcallpart.js";
|
|
25
|
+
export * from "./toolexecutionfailedstreamingevent.js";
|
|
26
|
+
export * from "./toolexecutionfinishedstreamingevent.js";
|
|
27
|
+
export * from "./toolexecutionstartedstreamingevent.js";
|
|
11
28
|
export * from "./toolresultpart.js";
|
|
@@ -170,15 +170,15 @@ export type Audio = {
|
|
|
170
170
|
/**
|
|
171
171
|
* The type of the tool. Currently, only `function` is supported.
|
|
172
172
|
*/
|
|
173
|
-
export const
|
|
173
|
+
export const PrefixMessagesType = {
|
|
174
174
|
Function: "function",
|
|
175
175
|
} as const;
|
|
176
176
|
/**
|
|
177
177
|
* The type of the tool. Currently, only `function` is supported.
|
|
178
178
|
*/
|
|
179
|
-
export type
|
|
179
|
+
export type PrefixMessagesType = ClosedEnum<typeof PrefixMessagesType>;
|
|
180
180
|
|
|
181
|
-
export type
|
|
181
|
+
export type PrefixMessagesFunction = {
|
|
182
182
|
/**
|
|
183
183
|
* The name of the function to call.
|
|
184
184
|
*/
|
|
@@ -197,8 +197,8 @@ export type ToolCalls = {
|
|
|
197
197
|
/**
|
|
198
198
|
* The type of the tool. Currently, only `function` is supported.
|
|
199
199
|
*/
|
|
200
|
-
type:
|
|
201
|
-
function:
|
|
200
|
+
type: PrefixMessagesType;
|
|
201
|
+
function: PrefixMessagesFunction;
|
|
202
202
|
};
|
|
203
203
|
|
|
204
204
|
export type AssistantMessage = {
|
|
@@ -1954,16 +1954,17 @@ export function audioFromJSON(
|
|
|
1954
1954
|
}
|
|
1955
1955
|
|
|
1956
1956
|
/** @internal */
|
|
1957
|
-
export const
|
|
1958
|
-
|
|
1959
|
-
);
|
|
1957
|
+
export const PrefixMessagesType$inboundSchema: z.ZodNativeEnum<
|
|
1958
|
+
typeof PrefixMessagesType
|
|
1959
|
+
> = z.nativeEnum(PrefixMessagesType);
|
|
1960
1960
|
/** @internal */
|
|
1961
|
-
export const
|
|
1962
|
-
|
|
1961
|
+
export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
|
|
1962
|
+
typeof PrefixMessagesType
|
|
1963
|
+
> = PrefixMessagesType$inboundSchema;
|
|
1963
1964
|
|
|
1964
1965
|
/** @internal */
|
|
1965
|
-
export const
|
|
1966
|
-
|
|
1966
|
+
export const PrefixMessagesFunction$inboundSchema: z.ZodType<
|
|
1967
|
+
PrefixMessagesFunction,
|
|
1967
1968
|
z.ZodTypeDef,
|
|
1968
1969
|
unknown
|
|
1969
1970
|
> = z.object({
|
|
@@ -1971,31 +1972,35 @@ export const FunctionT$inboundSchema: z.ZodType<
|
|
|
1971
1972
|
arguments: z.string().optional(),
|
|
1972
1973
|
});
|
|
1973
1974
|
/** @internal */
|
|
1974
|
-
export type
|
|
1975
|
+
export type PrefixMessagesFunction$Outbound = {
|
|
1975
1976
|
name?: string | undefined;
|
|
1976
1977
|
arguments?: string | undefined;
|
|
1977
1978
|
};
|
|
1978
1979
|
|
|
1979
1980
|
/** @internal */
|
|
1980
|
-
export const
|
|
1981
|
-
|
|
1981
|
+
export const PrefixMessagesFunction$outboundSchema: z.ZodType<
|
|
1982
|
+
PrefixMessagesFunction$Outbound,
|
|
1982
1983
|
z.ZodTypeDef,
|
|
1983
|
-
|
|
1984
|
+
PrefixMessagesFunction
|
|
1984
1985
|
> = z.object({
|
|
1985
1986
|
name: z.string().optional(),
|
|
1986
1987
|
arguments: z.string().optional(),
|
|
1987
1988
|
});
|
|
1988
1989
|
|
|
1989
|
-
export function
|
|
1990
|
-
|
|
1990
|
+
export function prefixMessagesFunctionToJSON(
|
|
1991
|
+
prefixMessagesFunction: PrefixMessagesFunction,
|
|
1992
|
+
): string {
|
|
1993
|
+
return JSON.stringify(
|
|
1994
|
+
PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
|
|
1995
|
+
);
|
|
1991
1996
|
}
|
|
1992
|
-
export function
|
|
1997
|
+
export function prefixMessagesFunctionFromJSON(
|
|
1993
1998
|
jsonString: string,
|
|
1994
|
-
): SafeParseResult<
|
|
1999
|
+
): SafeParseResult<PrefixMessagesFunction, SDKValidationError> {
|
|
1995
2000
|
return safeParse(
|
|
1996
2001
|
jsonString,
|
|
1997
|
-
(x) =>
|
|
1998
|
-
`Failed to parse '
|
|
2002
|
+
(x) => PrefixMessagesFunction$inboundSchema.parse(JSON.parse(x)),
|
|
2003
|
+
`Failed to parse 'PrefixMessagesFunction' from JSON`,
|
|
1999
2004
|
);
|
|
2000
2005
|
}
|
|
2001
2006
|
|
|
@@ -2006,14 +2011,14 @@ export const ToolCalls$inboundSchema: z.ZodType<
|
|
|
2006
2011
|
unknown
|
|
2007
2012
|
> = z.object({
|
|
2008
2013
|
id: z.string(),
|
|
2009
|
-
type:
|
|
2010
|
-
function: z.lazy(() =>
|
|
2014
|
+
type: PrefixMessagesType$inboundSchema,
|
|
2015
|
+
function: z.lazy(() => PrefixMessagesFunction$inboundSchema),
|
|
2011
2016
|
});
|
|
2012
2017
|
/** @internal */
|
|
2013
2018
|
export type ToolCalls$Outbound = {
|
|
2014
2019
|
id: string;
|
|
2015
2020
|
type: string;
|
|
2016
|
-
function:
|
|
2021
|
+
function: PrefixMessagesFunction$Outbound;
|
|
2017
2022
|
};
|
|
2018
2023
|
|
|
2019
2024
|
/** @internal */
|
|
@@ -2023,8 +2028,8 @@ export const ToolCalls$outboundSchema: z.ZodType<
|
|
|
2023
2028
|
ToolCalls
|
|
2024
2029
|
> = z.object({
|
|
2025
2030
|
id: z.string(),
|
|
2026
|
-
type:
|
|
2027
|
-
function: z.lazy(() =>
|
|
2031
|
+
type: PrefixMessagesType$outboundSchema,
|
|
2032
|
+
function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
|
|
2028
2033
|
});
|
|
2029
2034
|
|
|
2030
2035
|
export function toolCallsToJSON(toolCalls: ToolCalls): string {
|