@orq-ai/node 4.1.0-rc.4 → 4.1.0-rc.7

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.
Files changed (226) hide show
  1. package/bin/mcp-server.js +25494 -27422
  2. package/bin/mcp-server.js.map +68 -51
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/actionreviewedstreamingevent.d.ts +76 -0
  10. package/models/components/actionreviewedstreamingevent.d.ts.map +1 -0
  11. package/models/components/actionreviewedstreamingevent.js +127 -0
  12. package/models/components/actionreviewedstreamingevent.js.map +1 -0
  13. package/models/components/actionreviewrequestedstreamingevent.d.ts +135 -0
  14. package/models/components/actionreviewrequestedstreamingevent.d.ts.map +1 -0
  15. package/models/components/actionreviewrequestedstreamingevent.js +180 -0
  16. package/models/components/actionreviewrequestedstreamingevent.js.map +1 -0
  17. package/models/components/agenterroredstreamingevent.d.ts +58 -0
  18. package/models/components/agenterroredstreamingevent.d.ts.map +1 -0
  19. package/models/components/agenterroredstreamingevent.js +91 -0
  20. package/models/components/agenterroredstreamingevent.js.map +1 -0
  21. package/models/components/agentexecutionstartedstreamingevent.d.ts +62 -0
  22. package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -0
  23. package/models/components/agentexecutionstartedstreamingevent.js +103 -0
  24. package/models/components/agentexecutionstartedstreamingevent.js.map +1 -0
  25. package/models/components/agenthandedoffstreamingevent.d.ts +51 -0
  26. package/models/components/agenthandedoffstreamingevent.d.ts.map +1 -0
  27. package/models/components/agenthandedoffstreamingevent.js +96 -0
  28. package/models/components/agenthandedoffstreamingevent.js.map +1 -0
  29. package/models/components/agentinactivestreamingevent.d.ts +309 -0
  30. package/models/components/agentinactivestreamingevent.d.ts.map +1 -0
  31. package/models/components/agentinactivestreamingevent.js +385 -0
  32. package/models/components/agentinactivestreamingevent.js.map +1 -0
  33. package/models/components/agentmessagecreatedstreamingevent.d.ts +141 -0
  34. package/models/components/agentmessagecreatedstreamingevent.d.ts.map +1 -0
  35. package/models/components/agentmessagecreatedstreamingevent.js +190 -0
  36. package/models/components/agentmessagecreatedstreamingevent.js.map +1 -0
  37. package/models/components/agentstartedstreamingevent.d.ts +382 -0
  38. package/models/components/agentstartedstreamingevent.d.ts.map +1 -0
  39. package/models/components/agentstartedstreamingevent.js +441 -0
  40. package/models/components/agentstartedstreamingevent.js.map +1 -0
  41. package/models/components/agentthoughtstreamingevent.d.ts +542 -0
  42. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -0
  43. package/models/components/agentthoughtstreamingevent.js +626 -0
  44. package/models/components/agentthoughtstreamingevent.js.map +1 -0
  45. package/models/components/errorstreamingevent.d.ts +51 -0
  46. package/models/components/errorstreamingevent.d.ts.map +1 -0
  47. package/models/components/errorstreamingevent.js +87 -0
  48. package/models/components/errorstreamingevent.js.map +1 -0
  49. package/models/components/executionnamedstreamingevent.d.ts +51 -0
  50. package/models/components/executionnamedstreamingevent.d.ts.map +1 -0
  51. package/models/components/executionnamedstreamingevent.js +96 -0
  52. package/models/components/executionnamedstreamingevent.js.map +1 -0
  53. package/models/components/executionreviewedstreamingevent.d.ts +45 -0
  54. package/models/components/executionreviewedstreamingevent.d.ts.map +1 -0
  55. package/models/components/executionreviewedstreamingevent.js +81 -0
  56. package/models/components/executionreviewedstreamingevent.js.map +1 -0
  57. package/models/components/executionreviewrequiredstreamingevent.d.ts +45 -0
  58. package/models/components/executionreviewrequiredstreamingevent.d.ts.map +1 -0
  59. package/models/components/executionreviewrequiredstreamingevent.js +82 -0
  60. package/models/components/executionreviewrequiredstreamingevent.js.map +1 -0
  61. package/models/components/filepart.d.ts +1 -1
  62. package/models/components/index.d.ts +17 -0
  63. package/models/components/index.d.ts.map +1 -1
  64. package/models/components/index.js +17 -0
  65. package/models/components/index.js.map +1 -1
  66. package/models/components/invokedeploymentrequest.d.ts +13 -13
  67. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  68. package/models/components/invokedeploymentrequest.js +17 -17
  69. package/models/components/invokedeploymentrequest.js.map +1 -1
  70. package/models/components/timeoutstreamingevent.d.ts +49 -0
  71. package/models/components/timeoutstreamingevent.d.ts.map +1 -0
  72. package/models/components/timeoutstreamingevent.js +85 -0
  73. package/models/components/timeoutstreamingevent.js.map +1 -0
  74. package/models/components/toolexecutionfailedstreamingevent.d.ts +144 -0
  75. package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -0
  76. package/models/components/toolexecutionfailedstreamingevent.js +223 -0
  77. package/models/components/toolexecutionfailedstreamingevent.js.map +1 -0
  78. package/models/components/toolexecutionfinishedstreamingevent.d.ts +129 -0
  79. package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -0
  80. package/models/components/toolexecutionfinishedstreamingevent.js +205 -0
  81. package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -0
  82. package/models/components/toolexecutionstartedstreamingevent.d.ts +139 -0
  83. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -0
  84. package/models/components/toolexecutionstartedstreamingevent.js +217 -0
  85. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -0
  86. package/models/components/toolresultpart.d.ts +1 -1
  87. package/models/operations/createagentrequest.d.ts +3 -0
  88. package/models/operations/createagentrequest.d.ts.map +1 -1
  89. package/models/operations/createagentrequest.js.map +1 -1
  90. package/models/operations/createagentresponserequest.d.ts +4 -137
  91. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  92. package/models/operations/createagentresponserequest.js +9 -138
  93. package/models/operations/createagentresponserequest.js.map +1 -1
  94. package/models/operations/createbudget.js +2 -2
  95. package/models/operations/createcontact.js +2 -2
  96. package/models/operations/createdataset.js +2 -2
  97. package/models/operations/createdatasetitem.js +8 -8
  98. package/models/operations/createdatasource.js +2 -2
  99. package/models/operations/createeval.d.ts +80 -145
  100. package/models/operations/createeval.d.ts.map +1 -1
  101. package/models/operations/createeval.js +190 -266
  102. package/models/operations/createeval.js.map +1 -1
  103. package/models/operations/createtool.js +12 -12
  104. package/models/operations/fileget.js +2 -2
  105. package/models/operations/filelist.js +2 -2
  106. package/models/operations/fileupload.js +2 -2
  107. package/models/operations/getalltools.js +12 -12
  108. package/models/operations/getbudget.js +2 -2
  109. package/models/operations/getevals.d.ts +14 -79
  110. package/models/operations/getevals.d.ts.map +1 -1
  111. package/models/operations/getevals.js +49 -132
  112. package/models/operations/getevals.js.map +1 -1
  113. package/models/operations/invokeagent.d.ts +14 -147
  114. package/models/operations/invokeagent.d.ts.map +1 -1
  115. package/models/operations/invokeagent.js +19 -148
  116. package/models/operations/invokeagent.js.map +1 -1
  117. package/models/operations/listagents.d.ts +3 -0
  118. package/models/operations/listagents.d.ts.map +1 -1
  119. package/models/operations/listagents.js.map +1 -1
  120. package/models/operations/listbudgets.js +2 -2
  121. package/models/operations/listcontacts.js +2 -2
  122. package/models/operations/listdatasetdatapoints.js +8 -8
  123. package/models/operations/listdatasets.js +2 -2
  124. package/models/operations/listdatasources.js +2 -2
  125. package/models/operations/listknowledgebases.d.ts +16 -16
  126. package/models/operations/listknowledgebases.d.ts.map +1 -1
  127. package/models/operations/listknowledgebases.js +27 -25
  128. package/models/operations/listknowledgebases.js.map +1 -1
  129. package/models/operations/retrieveagentrequest.d.ts +3 -0
  130. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  131. package/models/operations/retrieveagentrequest.js.map +1 -1
  132. package/models/operations/retrievecontact.js +2 -2
  133. package/models/operations/retrievedatapoint.js +8 -8
  134. package/models/operations/retrievedataset.js +2 -2
  135. package/models/operations/retrievedatasource.js +2 -2
  136. package/models/operations/retrievetool.js +12 -12
  137. package/models/operations/runagent.d.ts +4 -137
  138. package/models/operations/runagent.d.ts.map +1 -1
  139. package/models/operations/runagent.js +17 -145
  140. package/models/operations/runagent.js.map +1 -1
  141. package/models/operations/streamagent.d.ts +241 -2491
  142. package/models/operations/streamagent.d.ts.map +1 -1
  143. package/models/operations/streamagent.js +172 -2826
  144. package/models/operations/streamagent.js.map +1 -1
  145. package/models/operations/streamrunagent.d.ts +889 -3139
  146. package/models/operations/streamrunagent.d.ts.map +1 -1
  147. package/models/operations/streamrunagent.js +175 -2825
  148. package/models/operations/streamrunagent.js.map +1 -1
  149. package/models/operations/updateagent.d.ts +3 -0
  150. package/models/operations/updateagent.d.ts.map +1 -1
  151. package/models/operations/updateagent.js.map +1 -1
  152. package/models/operations/updatebudget.js +2 -2
  153. package/models/operations/updatecontact.js +2 -2
  154. package/models/operations/updatedatapoint.js +8 -8
  155. package/models/operations/updatedataset.js +2 -2
  156. package/models/operations/updatedatasource.js +2 -2
  157. package/models/operations/updateeval.d.ts +14 -79
  158. package/models/operations/updateeval.d.ts.map +1 -1
  159. package/models/operations/updateeval.js +51 -134
  160. package/models/operations/updateeval.js.map +1 -1
  161. package/models/operations/updatetool.js +14 -14
  162. package/package.json +1 -1
  163. package/src/lib/config.ts +3 -3
  164. package/src/mcp-server/mcp-server.ts +1 -1
  165. package/src/mcp-server/server.ts +1 -1
  166. package/src/models/components/actionreviewedstreamingevent.ts +189 -0
  167. package/src/models/components/actionreviewrequestedstreamingevent.ts +326 -0
  168. package/src/models/components/agenterroredstreamingevent.ts +142 -0
  169. package/src/models/components/agentexecutionstartedstreamingevent.ts +145 -0
  170. package/src/models/components/agenthandedoffstreamingevent.ts +142 -0
  171. package/src/models/components/agentinactivestreamingevent.ts +857 -0
  172. package/src/models/components/agentmessagecreatedstreamingevent.ts +396 -0
  173. package/src/models/components/agentstartedstreamingevent.ts +909 -0
  174. package/src/models/components/agentthoughtstreamingevent.ts +1419 -0
  175. package/src/models/components/errorstreamingevent.ts +129 -0
  176. package/src/models/components/executionnamedstreamingevent.ts +142 -0
  177. package/src/models/components/executionreviewedstreamingevent.ts +122 -0
  178. package/src/models/components/executionreviewrequiredstreamingevent.ts +130 -0
  179. package/src/models/components/filepart.ts +1 -1
  180. package/src/models/components/index.ts +17 -0
  181. package/src/models/components/invokedeploymentrequest.ts +32 -27
  182. package/src/models/components/timeoutstreamingevent.ts +125 -0
  183. package/src/models/components/toolexecutionfailedstreamingevent.ts +406 -0
  184. package/src/models/components/toolexecutionfinishedstreamingevent.ts +373 -0
  185. package/src/models/components/toolexecutionstartedstreamingevent.ts +350 -0
  186. package/src/models/components/toolresultpart.ts +1 -1
  187. package/src/models/operations/createagentrequest.ts +3 -0
  188. package/src/models/operations/createagentresponserequest.ts +20 -321
  189. package/src/models/operations/createbudget.ts +2 -2
  190. package/src/models/operations/createcontact.ts +2 -2
  191. package/src/models/operations/createdataset.ts +2 -2
  192. package/src/models/operations/createdatasetitem.ts +8 -8
  193. package/src/models/operations/createdatasource.ts +2 -2
  194. package/src/models/operations/createeval.ts +318 -615
  195. package/src/models/operations/createtool.ts +12 -12
  196. package/src/models/operations/fileget.ts +2 -2
  197. package/src/models/operations/filelist.ts +2 -2
  198. package/src/models/operations/fileupload.ts +2 -2
  199. package/src/models/operations/getalltools.ts +12 -12
  200. package/src/models/operations/getbudget.ts +2 -2
  201. package/src/models/operations/getevals.ts +52 -287
  202. package/src/models/operations/invokeagent.ts +36 -373
  203. package/src/models/operations/listagents.ts +3 -0
  204. package/src/models/operations/listbudgets.ts +2 -2
  205. package/src/models/operations/listcontacts.ts +2 -2
  206. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  207. package/src/models/operations/listdatasets.ts +2 -2
  208. package/src/models/operations/listdatasources.ts +2 -2
  209. package/src/models/operations/listknowledgebases.ts +82 -102
  210. package/src/models/operations/retrieveagentrequest.ts +3 -0
  211. package/src/models/operations/retrievecontact.ts +2 -2
  212. package/src/models/operations/retrievedatapoint.ts +8 -8
  213. package/src/models/operations/retrievedataset.ts +2 -2
  214. package/src/models/operations/retrievedatasource.ts +2 -2
  215. package/src/models/operations/retrievetool.ts +12 -12
  216. package/src/models/operations/runagent.ts +17 -365
  217. package/src/models/operations/streamagent.ts +794 -6985
  218. package/src/models/operations/streamrunagent.ts +3939 -9983
  219. package/src/models/operations/updateagent.ts +3 -0
  220. package/src/models/operations/updatebudget.ts +2 -2
  221. package/src/models/operations/updatecontact.ts +2 -2
  222. package/src/models/operations/updatedatapoint.ts +8 -8
  223. package/src/models/operations/updatedataset.ts +2 -2
  224. package/src/models/operations/updatedatasource.ts +2 -2
  225. package/src/models/operations/updateeval.ts +52 -287
  226. 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
- * A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
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 Type = {
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 Type = ClosedEnum<typeof Type>;
179
+ export type PrefixMessagesType = ClosedEnum<typeof PrefixMessagesType>;
180
180
 
181
- export type FunctionT = {
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: Type;
201
- function: FunctionT;
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 Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
1958
- Type,
1959
- );
1957
+ export const PrefixMessagesType$inboundSchema: z.ZodNativeEnum<
1958
+ typeof PrefixMessagesType
1959
+ > = z.nativeEnum(PrefixMessagesType);
1960
1960
  /** @internal */
1961
- export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
1962
- Type$inboundSchema;
1961
+ export const PrefixMessagesType$outboundSchema: z.ZodNativeEnum<
1962
+ typeof PrefixMessagesType
1963
+ > = PrefixMessagesType$inboundSchema;
1963
1964
 
1964
1965
  /** @internal */
1965
- export const FunctionT$inboundSchema: z.ZodType<
1966
- FunctionT,
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 FunctionT$Outbound = {
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 FunctionT$outboundSchema: z.ZodType<
1981
- FunctionT$Outbound,
1981
+ export const PrefixMessagesFunction$outboundSchema: z.ZodType<
1982
+ PrefixMessagesFunction$Outbound,
1982
1983
  z.ZodTypeDef,
1983
- FunctionT
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 functionToJSON(functionT: FunctionT): string {
1990
- return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
1990
+ export function prefixMessagesFunctionToJSON(
1991
+ prefixMessagesFunction: PrefixMessagesFunction,
1992
+ ): string {
1993
+ return JSON.stringify(
1994
+ PrefixMessagesFunction$outboundSchema.parse(prefixMessagesFunction),
1995
+ );
1991
1996
  }
1992
- export function functionFromJSON(
1997
+ export function prefixMessagesFunctionFromJSON(
1993
1998
  jsonString: string,
1994
- ): SafeParseResult<FunctionT, SDKValidationError> {
1999
+ ): SafeParseResult<PrefixMessagesFunction, SDKValidationError> {
1995
2000
  return safeParse(
1996
2001
  jsonString,
1997
- (x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
1998
- `Failed to parse 'FunctionT' from JSON`,
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: Type$inboundSchema,
2010
- function: z.lazy(() => FunctionT$inboundSchema),
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: FunctionT$Outbound;
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: Type$outboundSchema,
2027
- function: z.lazy(() => FunctionT$outboundSchema),
2031
+ type: PrefixMessagesType$outboundSchema,
2032
+ function: z.lazy(() => PrefixMessagesFunction$outboundSchema),
2028
2033
  });
2029
2034
 
2030
2035
  export function toolCallsToJSON(toolCalls: ToolCalls): string {