@sixb/server 0.0.1

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 (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -0
  3. package/dist/auth/access-token-boundary.d.ts +23 -0
  4. package/dist/auth/access-token-boundary.d.ts.map +1 -0
  5. package/dist/auth/application-access.d.ts +4 -0
  6. package/dist/auth/application-access.d.ts.map +1 -0
  7. package/dist/auth/browser-origin.d.ts +62 -0
  8. package/dist/auth/browser-origin.d.ts.map +1 -0
  9. package/dist/auth/csrf.d.ts +2 -0
  10. package/dist/auth/csrf.d.ts.map +1 -0
  11. package/dist/auth/guard.d.ts +35 -0
  12. package/dist/auth/guard.d.ts.map +1 -0
  13. package/dist/auth/public-routes.d.ts +8 -0
  14. package/dist/auth/public-routes.d.ts.map +1 -0
  15. package/dist/auth/responses.d.ts +11 -0
  16. package/dist/auth/responses.d.ts.map +1 -0
  17. package/dist/auth/return-to.d.ts +3 -0
  18. package/dist/auth/return-to.d.ts.map +1 -0
  19. package/dist/auth/scope.d.ts +43 -0
  20. package/dist/auth/scope.d.ts.map +1 -0
  21. package/dist/auth/session-activity.d.ts +4 -0
  22. package/dist/auth/session-activity.d.ts.map +1 -0
  23. package/dist/auth/session-cookies.d.ts +12 -0
  24. package/dist/auth/session-cookies.d.ts.map +1 -0
  25. package/dist/files/content.d.ts +141 -0
  26. package/dist/files/content.d.ts.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +11522 -0
  30. package/dist/index.js.map +78 -0
  31. package/dist/openapi/security.d.ts +26 -0
  32. package/dist/openapi/security.d.ts.map +1 -0
  33. package/dist/openapi/tags.d.ts +151 -0
  34. package/dist/openapi/tags.d.ts.map +1 -0
  35. package/dist/registerRoutes.d.ts +31 -0
  36. package/dist/registerRoutes.d.ts.map +1 -0
  37. package/dist/routes/action-runs.d.ts +244 -0
  38. package/dist/routes/action-runs.d.ts.map +1 -0
  39. package/dist/routes/actions.d.ts +183 -0
  40. package/dist/routes/actions.d.ts.map +1 -0
  41. package/dist/routes/agent-api-gateway.d.ts +4 -0
  42. package/dist/routes/agent-api-gateway.d.ts.map +1 -0
  43. package/dist/routes/agents.d.ts +1061 -0
  44. package/dist/routes/agents.d.ts.map +1 -0
  45. package/dist/routes/auth.d.ts +1366 -0
  46. package/dist/routes/auth.d.ts.map +1 -0
  47. package/dist/routes/connectors.d.ts +108 -0
  48. package/dist/routes/connectors.d.ts.map +1 -0
  49. package/dist/routes/datasets.d.ts +339 -0
  50. package/dist/routes/datasets.d.ts.map +1 -0
  51. package/dist/routes/events.d.ts +116 -0
  52. package/dist/routes/events.d.ts.map +1 -0
  53. package/dist/routes/files.d.ts +340 -0
  54. package/dist/routes/files.d.ts.map +1 -0
  55. package/dist/routes/links.d.ts +175 -0
  56. package/dist/routes/links.d.ts.map +1 -0
  57. package/dist/routes/logs.d.ts +88 -0
  58. package/dist/routes/logs.d.ts.map +1 -0
  59. package/dist/routes/objects.d.ts +450 -0
  60. package/dist/routes/objects.d.ts.map +1 -0
  61. package/dist/routes/ontology.d.ts +240 -0
  62. package/dist/routes/ontology.d.ts.map +1 -0
  63. package/dist/routes/pipelines.d.ts +399 -0
  64. package/dist/routes/pipelines.d.ts.map +1 -0
  65. package/dist/routes/project.d.ts +56 -0
  66. package/dist/routes/project.d.ts.map +1 -0
  67. package/dist/routes/projections.d.ts +916 -0
  68. package/dist/routes/projections.d.ts.map +1 -0
  69. package/dist/routes/rules.d.ts +165 -0
  70. package/dist/routes/rules.d.ts.map +1 -0
  71. package/dist/routes/status.d.ts +81 -0
  72. package/dist/routes/status.d.ts.map +1 -0
  73. package/dist/routes/syncs.d.ts +294 -0
  74. package/dist/routes/syncs.d.ts.map +1 -0
  75. package/dist/routes/telemetry.d.ts +241 -0
  76. package/dist/routes/telemetry.d.ts.map +1 -0
  77. package/dist/routes/webhook-runs.d.ts +89 -0
  78. package/dist/routes/webhook-runs.d.ts.map +1 -0
  79. package/dist/routes/webhooks.d.ts +60 -0
  80. package/dist/routes/webhooks.d.ts.map +1 -0
  81. package/dist/routes/workflows.d.ts +973 -0
  82. package/dist/routes/workflows.d.ts.map +1 -0
  83. package/dist/routes/ws/agents.d.ts +99 -0
  84. package/dist/routes/ws/agents.d.ts.map +1 -0
  85. package/dist/routes/ws/events.d.ts +89 -0
  86. package/dist/routes/ws/events.d.ts.map +1 -0
  87. package/dist/routes/ws/index.d.ts +31 -0
  88. package/dist/routes/ws/index.d.ts.map +1 -0
  89. package/dist/routes/ws/log-subscription-hub.d.ts +47 -0
  90. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -0
  91. package/dist/routes/ws/logs.d.ts +110 -0
  92. package/dist/routes/ws/logs.d.ts.map +1 -0
  93. package/dist/schemas/actions.d.ts +644 -0
  94. package/dist/schemas/actions.d.ts.map +1 -0
  95. package/dist/schemas/agents.d.ts +3157 -0
  96. package/dist/schemas/agents.d.ts.map +1 -0
  97. package/dist/schemas/auth.d.ts +2023 -0
  98. package/dist/schemas/auth.d.ts.map +1 -0
  99. package/dist/schemas/common.d.ts +30 -0
  100. package/dist/schemas/common.d.ts.map +1 -0
  101. package/dist/schemas/connectors.d.ts +82 -0
  102. package/dist/schemas/connectors.d.ts.map +1 -0
  103. package/dist/schemas/datasets.d.ts +744 -0
  104. package/dist/schemas/datasets.d.ts.map +1 -0
  105. package/dist/schemas/event-payloads.d.ts +477 -0
  106. package/dist/schemas/event-payloads.d.ts.map +1 -0
  107. package/dist/schemas/events.d.ts +665 -0
  108. package/dist/schemas/events.d.ts.map +1 -0
  109. package/dist/schemas/files.d.ts +241 -0
  110. package/dist/schemas/files.d.ts.map +1 -0
  111. package/dist/schemas/links.d.ts +90 -0
  112. package/dist/schemas/links.d.ts.map +1 -0
  113. package/dist/schemas/logs.d.ts +231 -0
  114. package/dist/schemas/logs.d.ts.map +1 -0
  115. package/dist/schemas/objects.d.ts +288 -0
  116. package/dist/schemas/objects.d.ts.map +1 -0
  117. package/dist/schemas/ontology.d.ts +778 -0
  118. package/dist/schemas/ontology.d.ts.map +1 -0
  119. package/dist/schemas/pipelines.d.ts +1373 -0
  120. package/dist/schemas/pipelines.d.ts.map +1 -0
  121. package/dist/schemas/project.d.ts +9 -0
  122. package/dist/schemas/project.d.ts.map +1 -0
  123. package/dist/schemas/projections.d.ts +6992 -0
  124. package/dist/schemas/projections.d.ts.map +1 -0
  125. package/dist/schemas/rules.d.ts +204 -0
  126. package/dist/schemas/rules.d.ts.map +1 -0
  127. package/dist/schemas/status.d.ts +189 -0
  128. package/dist/schemas/status.d.ts.map +1 -0
  129. package/dist/schemas/syncs.d.ts +538 -0
  130. package/dist/schemas/syncs.d.ts.map +1 -0
  131. package/dist/schemas/telemetry.d.ts +265 -0
  132. package/dist/schemas/telemetry.d.ts.map +1 -0
  133. package/dist/schemas/webhook-runs.d.ts +169 -0
  134. package/dist/schemas/webhook-runs.d.ts.map +1 -0
  135. package/dist/schemas/workflows.d.ts +1720 -0
  136. package/dist/schemas/workflows.d.ts.map +1 -0
  137. package/dist/server.d.ts +64 -0
  138. package/dist/server.d.ts.map +1 -0
  139. package/dist/tsconfig.json +5 -0
  140. package/dist/utils/http.d.ts +23 -0
  141. package/dist/utils/http.d.ts.map +1 -0
  142. package/dist/utils/request-body.d.ts +15 -0
  143. package/dist/utils/request-body.d.ts.map +1 -0
  144. package/dist/utils/ws.d.ts +10 -0
  145. package/dist/utils/ws.d.ts.map +1 -0
  146. package/package.json +68 -0
  147. package/src/auth/access-token-boundary.ts +68 -0
  148. package/src/auth/application-access.ts +16 -0
  149. package/src/auth/browser-origin.ts +367 -0
  150. package/src/auth/csrf.ts +1 -0
  151. package/src/auth/guard.ts +169 -0
  152. package/src/auth/public-routes.ts +87 -0
  153. package/src/auth/responses.ts +54 -0
  154. package/src/auth/return-to.ts +21 -0
  155. package/src/auth/scope.ts +64 -0
  156. package/src/auth/session-activity.ts +19 -0
  157. package/src/auth/session-cookies.ts +43 -0
  158. package/src/files/content.ts +419 -0
  159. package/src/index.ts +2 -0
  160. package/src/openapi/security.ts +37 -0
  161. package/src/openapi/tags.ts +151 -0
  162. package/src/registerRoutes.ts +49 -0
  163. package/src/routes/action-runs.ts +238 -0
  164. package/src/routes/actions.ts +126 -0
  165. package/src/routes/agent-api-gateway.ts +260 -0
  166. package/src/routes/agents.ts +943 -0
  167. package/src/routes/auth.ts +2233 -0
  168. package/src/routes/connectors.ts +69 -0
  169. package/src/routes/datasets.ts +402 -0
  170. package/src/routes/events.ts +55 -0
  171. package/src/routes/files.ts +675 -0
  172. package/src/routes/links.ts +143 -0
  173. package/src/routes/logs.ts +65 -0
  174. package/src/routes/objects.ts +838 -0
  175. package/src/routes/ontology.ts +138 -0
  176. package/src/routes/pipelines.ts +332 -0
  177. package/src/routes/project.ts +16 -0
  178. package/src/routes/projections.ts +251 -0
  179. package/src/routes/rules.ts +124 -0
  180. package/src/routes/status.ts +53 -0
  181. package/src/routes/syncs.ts +243 -0
  182. package/src/routes/telemetry.ts +207 -0
  183. package/src/routes/webhook-runs.ts +81 -0
  184. package/src/routes/webhooks.ts +508 -0
  185. package/src/routes/workflows.ts +1333 -0
  186. package/src/routes/ws/agents.ts +301 -0
  187. package/src/routes/ws/events.ts +278 -0
  188. package/src/routes/ws/index.ts +12 -0
  189. package/src/routes/ws/log-subscription-hub.ts +375 -0
  190. package/src/routes/ws/logs.ts +117 -0
  191. package/src/schemas/actions.ts +123 -0
  192. package/src/schemas/agents.ts +293 -0
  193. package/src/schemas/auth.ts +317 -0
  194. package/src/schemas/common.ts +60 -0
  195. package/src/schemas/connectors.ts +21 -0
  196. package/src/schemas/datasets.ts +107 -0
  197. package/src/schemas/event-payloads.ts +79 -0
  198. package/src/schemas/events.ts +117 -0
  199. package/src/schemas/files.ts +82 -0
  200. package/src/schemas/links.ts +38 -0
  201. package/src/schemas/logs.ts +76 -0
  202. package/src/schemas/objects.ts +759 -0
  203. package/src/schemas/ontology.ts +77 -0
  204. package/src/schemas/pipelines.ts +150 -0
  205. package/src/schemas/project.ts +5 -0
  206. package/src/schemas/projections.ts +144 -0
  207. package/src/schemas/rules.ts +98 -0
  208. package/src/schemas/status.ts +51 -0
  209. package/src/schemas/syncs.ts +83 -0
  210. package/src/schemas/telemetry.ts +59 -0
  211. package/src/schemas/webhook-runs.ts +40 -0
  212. package/src/schemas/workflows.ts +229 -0
  213. package/src/server.ts +383 -0
  214. package/src/utils/http.ts +108 -0
  215. package/src/utils/request-body.ts +62 -0
  216. package/src/utils/ws.ts +59 -0
@@ -0,0 +1,3157 @@
1
+ import { z } from "zod";
2
+ export declare const AgentIdParamsSchema: z.ZodObject<{
3
+ agentId: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ agentId: string;
6
+ }, {
7
+ agentId: string;
8
+ }>;
9
+ export declare const AgentThreadParamsSchema: z.ZodObject<{
10
+ threadId: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ threadId: string;
13
+ }, {
14
+ threadId: string;
15
+ }>;
16
+ export declare const AgentRunParamsSchema: z.ZodObject<{
17
+ runId: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ runId: string;
20
+ }, {
21
+ runId: string;
22
+ }>;
23
+ export declare const AgentMessageFileContentParamsSchema: z.ZodObject<{
24
+ threadId: z.ZodString;
25
+ } & {
26
+ messageId: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ threadId: string;
29
+ messageId: string;
30
+ }, {
31
+ threadId: string;
32
+ messageId: string;
33
+ }>;
34
+ export declare const AgentPrincipalSchema: z.ZodObject<{
35
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
36
+ id: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ type: "serviceAccount" | "user" | "system";
39
+ id: string;
40
+ }, {
41
+ type: "serviceAccount" | "user" | "system";
42
+ id: string;
43
+ }>;
44
+ export declare const AgentObjectContextSchema: z.ZodObject<{
45
+ kind: z.ZodLiteral<"object">;
46
+ ref: z.ZodObject<{
47
+ objectTypeId: z.ZodString;
48
+ primaryId: z.ZodString;
49
+ }, "strip", z.ZodTypeAny, {
50
+ objectTypeId: string;
51
+ primaryId: string;
52
+ }, {
53
+ objectTypeId: string;
54
+ primaryId: string;
55
+ }>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ kind: "object";
58
+ ref: {
59
+ objectTypeId: string;
60
+ primaryId: string;
61
+ };
62
+ }, {
63
+ kind: "object";
64
+ ref: {
65
+ objectTypeId: string;
66
+ primaryId: string;
67
+ };
68
+ }>;
69
+ export declare const AgentAppStateContextSchema: z.ZodObject<{
70
+ kind: z.ZodLiteral<"app-state">;
71
+ id: z.ZodString;
72
+ label: z.ZodString;
73
+ description: z.ZodString;
74
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
75
+ }, "strip", z.ZodTypeAny, {
76
+ kind: "app-state";
77
+ description: string;
78
+ value: import("./common").JsonValue;
79
+ id: string;
80
+ label: string;
81
+ }, {
82
+ kind: "app-state";
83
+ description: string;
84
+ value: import("./common").JsonValue;
85
+ id: string;
86
+ label: string;
87
+ }>;
88
+ export declare const AgentContextInputSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
89
+ kind: z.ZodLiteral<"object">;
90
+ ref: z.ZodObject<{
91
+ objectTypeId: z.ZodString;
92
+ primaryId: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ objectTypeId: string;
95
+ primaryId: string;
96
+ }, {
97
+ objectTypeId: string;
98
+ primaryId: string;
99
+ }>;
100
+ }, "strip", z.ZodTypeAny, {
101
+ kind: "object";
102
+ ref: {
103
+ objectTypeId: string;
104
+ primaryId: string;
105
+ };
106
+ }, {
107
+ kind: "object";
108
+ ref: {
109
+ objectTypeId: string;
110
+ primaryId: string;
111
+ };
112
+ }>, z.ZodObject<{
113
+ kind: z.ZodLiteral<"app-state">;
114
+ id: z.ZodString;
115
+ label: z.ZodString;
116
+ description: z.ZodString;
117
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ kind: "app-state";
120
+ description: string;
121
+ value: import("./common").JsonValue;
122
+ id: string;
123
+ label: string;
124
+ }, {
125
+ kind: "app-state";
126
+ description: string;
127
+ value: import("./common").JsonValue;
128
+ id: string;
129
+ label: string;
130
+ }>]>;
131
+ export declare const AgentContextOriginSchema: z.ZodEnum<["ambient", "explicit"]>;
132
+ export declare const AgentContextEntryInputSchema: z.ZodObject<{
133
+ context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
134
+ kind: z.ZodLiteral<"object">;
135
+ ref: z.ZodObject<{
136
+ objectTypeId: z.ZodString;
137
+ primaryId: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ objectTypeId: string;
140
+ primaryId: string;
141
+ }, {
142
+ objectTypeId: string;
143
+ primaryId: string;
144
+ }>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ kind: "object";
147
+ ref: {
148
+ objectTypeId: string;
149
+ primaryId: string;
150
+ };
151
+ }, {
152
+ kind: "object";
153
+ ref: {
154
+ objectTypeId: string;
155
+ primaryId: string;
156
+ };
157
+ }>, z.ZodObject<{
158
+ kind: z.ZodLiteral<"app-state">;
159
+ id: z.ZodString;
160
+ label: z.ZodString;
161
+ description: z.ZodString;
162
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ kind: "app-state";
165
+ description: string;
166
+ value: import("./common").JsonValue;
167
+ id: string;
168
+ label: string;
169
+ }, {
170
+ kind: "app-state";
171
+ description: string;
172
+ value: import("./common").JsonValue;
173
+ id: string;
174
+ label: string;
175
+ }>]>;
176
+ origin: z.ZodEnum<["ambient", "explicit"]>;
177
+ }, "strip", z.ZodTypeAny, {
178
+ origin: "ambient" | "explicit";
179
+ context: {
180
+ kind: "object";
181
+ ref: {
182
+ objectTypeId: string;
183
+ primaryId: string;
184
+ };
185
+ } | {
186
+ kind: "app-state";
187
+ description: string;
188
+ value: import("./common").JsonValue;
189
+ id: string;
190
+ label: string;
191
+ };
192
+ }, {
193
+ origin: "ambient" | "explicit";
194
+ context: {
195
+ kind: "object";
196
+ ref: {
197
+ objectTypeId: string;
198
+ primaryId: string;
199
+ };
200
+ } | {
201
+ kind: "app-state";
202
+ description: string;
203
+ value: import("./common").JsonValue;
204
+ id: string;
205
+ label: string;
206
+ };
207
+ }>;
208
+ export declare const AgentContextPartSchema: z.ZodObject<{
209
+ context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
210
+ kind: z.ZodLiteral<"object">;
211
+ ref: z.ZodObject<{
212
+ objectTypeId: z.ZodString;
213
+ primaryId: z.ZodString;
214
+ }, "strip", z.ZodTypeAny, {
215
+ objectTypeId: string;
216
+ primaryId: string;
217
+ }, {
218
+ objectTypeId: string;
219
+ primaryId: string;
220
+ }>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ kind: "object";
223
+ ref: {
224
+ objectTypeId: string;
225
+ primaryId: string;
226
+ };
227
+ }, {
228
+ kind: "object";
229
+ ref: {
230
+ objectTypeId: string;
231
+ primaryId: string;
232
+ };
233
+ }>, z.ZodObject<{
234
+ kind: z.ZodLiteral<"app-state">;
235
+ id: z.ZodString;
236
+ label: z.ZodString;
237
+ description: z.ZodString;
238
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
239
+ }, "strip", z.ZodTypeAny, {
240
+ kind: "app-state";
241
+ description: string;
242
+ value: import("./common").JsonValue;
243
+ id: string;
244
+ label: string;
245
+ }, {
246
+ kind: "app-state";
247
+ description: string;
248
+ value: import("./common").JsonValue;
249
+ id: string;
250
+ label: string;
251
+ }>]>;
252
+ origin: z.ZodEnum<["ambient", "explicit"]>;
253
+ } & {
254
+ type: z.ZodLiteral<"context">;
255
+ }, "strip", z.ZodTypeAny, {
256
+ origin: "ambient" | "explicit";
257
+ type: "context";
258
+ context: {
259
+ kind: "object";
260
+ ref: {
261
+ objectTypeId: string;
262
+ primaryId: string;
263
+ };
264
+ } | {
265
+ kind: "app-state";
266
+ description: string;
267
+ value: import("./common").JsonValue;
268
+ id: string;
269
+ label: string;
270
+ };
271
+ }, {
272
+ origin: "ambient" | "explicit";
273
+ type: "context";
274
+ context: {
275
+ kind: "object";
276
+ ref: {
277
+ objectTypeId: string;
278
+ primaryId: string;
279
+ };
280
+ } | {
281
+ kind: "app-state";
282
+ description: string;
283
+ value: import("./common").JsonValue;
284
+ id: string;
285
+ label: string;
286
+ };
287
+ }>;
288
+ export declare const AgentLoopConfigSchema: z.ZodObject<{
289
+ stopWhen: z.ZodOptional<z.ZodObject<{
290
+ maxSteps: z.ZodOptional<z.ZodNumber>;
291
+ }, "strip", z.ZodTypeAny, {
292
+ maxSteps?: number | undefined;
293
+ }, {
294
+ maxSteps?: number | undefined;
295
+ }>>;
296
+ }, "strip", z.ZodTypeAny, {
297
+ stopWhen?: {
298
+ maxSteps?: number | undefined;
299
+ } | undefined;
300
+ }, {
301
+ stopWhen?: {
302
+ maxSteps?: number | undefined;
303
+ } | undefined;
304
+ }>;
305
+ export declare const AgentReasoningLevelSchema: z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh"]>;
306
+ export declare const AgentCatalogItemSchema: z.ZodObject<{
307
+ id: z.ZodString;
308
+ name: z.ZodString;
309
+ description: z.ZodOptional<z.ZodString>;
310
+ modelId: z.ZodOptional<z.ZodString>;
311
+ reasoning: z.ZodOptional<z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh"]>>;
312
+ groupIds: z.ZodArray<z.ZodString, "many">;
313
+ loop: z.ZodOptional<z.ZodObject<{
314
+ stopWhen: z.ZodOptional<z.ZodObject<{
315
+ maxSteps: z.ZodOptional<z.ZodNumber>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ maxSteps?: number | undefined;
318
+ }, {
319
+ maxSteps?: number | undefined;
320
+ }>>;
321
+ }, "strip", z.ZodTypeAny, {
322
+ stopWhen?: {
323
+ maxSteps?: number | undefined;
324
+ } | undefined;
325
+ }, {
326
+ stopWhen?: {
327
+ maxSteps?: number | undefined;
328
+ } | undefined;
329
+ }>>;
330
+ }, "strip", z.ZodTypeAny, {
331
+ name: string;
332
+ id: string;
333
+ groupIds: string[];
334
+ description?: string | undefined;
335
+ modelId?: string | undefined;
336
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
337
+ loop?: {
338
+ stopWhen?: {
339
+ maxSteps?: number | undefined;
340
+ } | undefined;
341
+ } | undefined;
342
+ }, {
343
+ name: string;
344
+ id: string;
345
+ groupIds: string[];
346
+ description?: string | undefined;
347
+ modelId?: string | undefined;
348
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
349
+ loop?: {
350
+ stopWhen?: {
351
+ maxSteps?: number | undefined;
352
+ } | undefined;
353
+ } | undefined;
354
+ }>;
355
+ export declare const AgentThreadStatusSchema: z.ZodEnum<["active", "archived"]>;
356
+ export declare const AgentThreadListQuerySchema: z.ZodObject<{
357
+ agentId: z.ZodOptional<z.ZodString>;
358
+ status: z.ZodOptional<z.ZodEnum<["active", "archived"]>>;
359
+ limit: z.ZodOptional<z.ZodString>;
360
+ offset: z.ZodOptional<z.ZodString>;
361
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
362
+ }, "strip", z.ZodTypeAny, {
363
+ status?: "active" | "archived" | undefined;
364
+ agentId?: string | undefined;
365
+ limit?: string | undefined;
366
+ offset?: string | undefined;
367
+ order?: "asc" | "desc" | undefined;
368
+ }, {
369
+ status?: "active" | "archived" | undefined;
370
+ agentId?: string | undefined;
371
+ limit?: string | undefined;
372
+ offset?: string | undefined;
373
+ order?: "asc" | "desc" | undefined;
374
+ }>;
375
+ export declare const CreateAgentThreadBodySchema: z.ZodObject<{
376
+ agentId: z.ZodString;
377
+ title: z.ZodOptional<z.ZodString>;
378
+ threadId: z.ZodOptional<z.ZodString>;
379
+ }, "strip", z.ZodTypeAny, {
380
+ agentId: string;
381
+ title?: string | undefined;
382
+ threadId?: string | undefined;
383
+ }, {
384
+ agentId: string;
385
+ title?: string | undefined;
386
+ threadId?: string | undefined;
387
+ }>;
388
+ export declare const AgentThreadSchema: z.ZodObject<{
389
+ id: z.ZodString;
390
+ projectId: z.ZodString;
391
+ agentId: z.ZodString;
392
+ ownerPrincipal: z.ZodObject<{
393
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
394
+ id: z.ZodString;
395
+ }, "strip", z.ZodTypeAny, {
396
+ type: "serviceAccount" | "user" | "system";
397
+ id: string;
398
+ }, {
399
+ type: "serviceAccount" | "user" | "system";
400
+ id: string;
401
+ }>;
402
+ title: z.ZodOptional<z.ZodString>;
403
+ status: z.ZodEnum<["active", "archived"]>;
404
+ activeRunId: z.ZodNullable<z.ZodString>;
405
+ lastMessageAt: z.ZodOptional<z.ZodString>;
406
+ messageCount: z.ZodNumber;
407
+ createdAt: z.ZodString;
408
+ updatedAt: z.ZodString;
409
+ }, "strip", z.ZodTypeAny, {
410
+ status: "active" | "archived";
411
+ projectId: string;
412
+ ownerPrincipal: {
413
+ type: "serviceAccount" | "user" | "system";
414
+ id: string;
415
+ };
416
+ agentId: string;
417
+ id: string;
418
+ activeRunId: string | null;
419
+ messageCount: number;
420
+ createdAt: string;
421
+ updatedAt: string;
422
+ title?: string | undefined;
423
+ lastMessageAt?: string | undefined;
424
+ }, {
425
+ status: "active" | "archived";
426
+ projectId: string;
427
+ ownerPrincipal: {
428
+ type: "serviceAccount" | "user" | "system";
429
+ id: string;
430
+ };
431
+ agentId: string;
432
+ id: string;
433
+ activeRunId: string | null;
434
+ messageCount: number;
435
+ createdAt: string;
436
+ updatedAt: string;
437
+ title?: string | undefined;
438
+ lastMessageAt?: string | undefined;
439
+ }>;
440
+ export declare const AgentThreadListResponseSchema: z.ZodObject<{
441
+ threads: z.ZodArray<z.ZodObject<{
442
+ id: z.ZodString;
443
+ projectId: z.ZodString;
444
+ agentId: z.ZodString;
445
+ ownerPrincipal: z.ZodObject<{
446
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
447
+ id: z.ZodString;
448
+ }, "strip", z.ZodTypeAny, {
449
+ type: "serviceAccount" | "user" | "system";
450
+ id: string;
451
+ }, {
452
+ type: "serviceAccount" | "user" | "system";
453
+ id: string;
454
+ }>;
455
+ title: z.ZodOptional<z.ZodString>;
456
+ status: z.ZodEnum<["active", "archived"]>;
457
+ activeRunId: z.ZodNullable<z.ZodString>;
458
+ lastMessageAt: z.ZodOptional<z.ZodString>;
459
+ messageCount: z.ZodNumber;
460
+ createdAt: z.ZodString;
461
+ updatedAt: z.ZodString;
462
+ }, "strip", z.ZodTypeAny, {
463
+ status: "active" | "archived";
464
+ projectId: string;
465
+ ownerPrincipal: {
466
+ type: "serviceAccount" | "user" | "system";
467
+ id: string;
468
+ };
469
+ agentId: string;
470
+ id: string;
471
+ activeRunId: string | null;
472
+ messageCount: number;
473
+ createdAt: string;
474
+ updatedAt: string;
475
+ title?: string | undefined;
476
+ lastMessageAt?: string | undefined;
477
+ }, {
478
+ status: "active" | "archived";
479
+ projectId: string;
480
+ ownerPrincipal: {
481
+ type: "serviceAccount" | "user" | "system";
482
+ id: string;
483
+ };
484
+ agentId: string;
485
+ id: string;
486
+ activeRunId: string | null;
487
+ messageCount: number;
488
+ createdAt: string;
489
+ updatedAt: string;
490
+ title?: string | undefined;
491
+ lastMessageAt?: string | undefined;
492
+ }>, "many">;
493
+ hasMore: z.ZodBoolean;
494
+ total: z.ZodNumber;
495
+ }, "strip", z.ZodTypeAny, {
496
+ hasMore: boolean;
497
+ total: number;
498
+ threads: {
499
+ status: "active" | "archived";
500
+ projectId: string;
501
+ ownerPrincipal: {
502
+ type: "serviceAccount" | "user" | "system";
503
+ id: string;
504
+ };
505
+ agentId: string;
506
+ id: string;
507
+ activeRunId: string | null;
508
+ messageCount: number;
509
+ createdAt: string;
510
+ updatedAt: string;
511
+ title?: string | undefined;
512
+ lastMessageAt?: string | undefined;
513
+ }[];
514
+ }, {
515
+ hasMore: boolean;
516
+ total: number;
517
+ threads: {
518
+ status: "active" | "archived";
519
+ projectId: string;
520
+ ownerPrincipal: {
521
+ type: "serviceAccount" | "user" | "system";
522
+ id: string;
523
+ };
524
+ agentId: string;
525
+ id: string;
526
+ activeRunId: string | null;
527
+ messageCount: number;
528
+ createdAt: string;
529
+ updatedAt: string;
530
+ title?: string | undefined;
531
+ lastMessageAt?: string | undefined;
532
+ }[];
533
+ }>;
534
+ export declare const CreateAgentThreadResponseSchema: z.ZodObject<{
535
+ thread: z.ZodObject<{
536
+ id: z.ZodString;
537
+ projectId: z.ZodString;
538
+ agentId: z.ZodString;
539
+ ownerPrincipal: z.ZodObject<{
540
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
541
+ id: z.ZodString;
542
+ }, "strip", z.ZodTypeAny, {
543
+ type: "serviceAccount" | "user" | "system";
544
+ id: string;
545
+ }, {
546
+ type: "serviceAccount" | "user" | "system";
547
+ id: string;
548
+ }>;
549
+ title: z.ZodOptional<z.ZodString>;
550
+ status: z.ZodEnum<["active", "archived"]>;
551
+ activeRunId: z.ZodNullable<z.ZodString>;
552
+ lastMessageAt: z.ZodOptional<z.ZodString>;
553
+ messageCount: z.ZodNumber;
554
+ createdAt: z.ZodString;
555
+ updatedAt: z.ZodString;
556
+ }, "strip", z.ZodTypeAny, {
557
+ status: "active" | "archived";
558
+ projectId: string;
559
+ ownerPrincipal: {
560
+ type: "serviceAccount" | "user" | "system";
561
+ id: string;
562
+ };
563
+ agentId: string;
564
+ id: string;
565
+ activeRunId: string | null;
566
+ messageCount: number;
567
+ createdAt: string;
568
+ updatedAt: string;
569
+ title?: string | undefined;
570
+ lastMessageAt?: string | undefined;
571
+ }, {
572
+ status: "active" | "archived";
573
+ projectId: string;
574
+ ownerPrincipal: {
575
+ type: "serviceAccount" | "user" | "system";
576
+ id: string;
577
+ };
578
+ agentId: string;
579
+ id: string;
580
+ activeRunId: string | null;
581
+ messageCount: number;
582
+ createdAt: string;
583
+ updatedAt: string;
584
+ title?: string | undefined;
585
+ lastMessageAt?: string | undefined;
586
+ }>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ thread: {
589
+ status: "active" | "archived";
590
+ projectId: string;
591
+ ownerPrincipal: {
592
+ type: "serviceAccount" | "user" | "system";
593
+ id: string;
594
+ };
595
+ agentId: string;
596
+ id: string;
597
+ activeRunId: string | null;
598
+ messageCount: number;
599
+ createdAt: string;
600
+ updatedAt: string;
601
+ title?: string | undefined;
602
+ lastMessageAt?: string | undefined;
603
+ };
604
+ }, {
605
+ thread: {
606
+ status: "active" | "archived";
607
+ projectId: string;
608
+ ownerPrincipal: {
609
+ type: "serviceAccount" | "user" | "system";
610
+ id: string;
611
+ };
612
+ agentId: string;
613
+ id: string;
614
+ activeRunId: string | null;
615
+ messageCount: number;
616
+ createdAt: string;
617
+ updatedAt: string;
618
+ title?: string | undefined;
619
+ lastMessageAt?: string | undefined;
620
+ };
621
+ }>;
622
+ export declare const AgentMessageRoleSchema: z.ZodEnum<["system", "user", "assistant"]>;
623
+ export declare const AgentMessagePartSchema: z.ZodUnion<[z.ZodObject<{
624
+ type: z.ZodLiteral<"text">;
625
+ text: z.ZodString;
626
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ type: "text";
629
+ text: string;
630
+ providerMetadata?: import("./common").JsonValue | undefined;
631
+ }, {
632
+ type: "text";
633
+ text: string;
634
+ providerMetadata?: import("./common").JsonValue | undefined;
635
+ }>, z.ZodObject<{
636
+ type: z.ZodLiteral<"reasoning">;
637
+ text: z.ZodString;
638
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
639
+ }, "strip", z.ZodTypeAny, {
640
+ type: "reasoning";
641
+ text: string;
642
+ providerMetadata?: import("./common").JsonValue | undefined;
643
+ }, {
644
+ type: "reasoning";
645
+ text: string;
646
+ providerMetadata?: import("./common").JsonValue | undefined;
647
+ }>, z.ZodObject<{
648
+ type: z.ZodLiteral<"step-start">;
649
+ }, "strip", z.ZodTypeAny, {
650
+ type: "step-start";
651
+ }, {
652
+ type: "step-start";
653
+ }>, z.ZodObject<{
654
+ type: z.ZodLiteral<"file">;
655
+ fileRef: z.ZodObject<{
656
+ blobId: z.ZodString;
657
+ digest: z.ZodString;
658
+ sizeBytes: z.ZodNumber;
659
+ fileName: z.ZodOptional<z.ZodString>;
660
+ mediaType: z.ZodOptional<z.ZodString>;
661
+ logicalPath: z.ZodOptional<z.ZodString>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ blobId: string;
664
+ digest: string;
665
+ sizeBytes: number;
666
+ fileName?: string | undefined;
667
+ mediaType?: string | undefined;
668
+ logicalPath?: string | undefined;
669
+ }, {
670
+ blobId: string;
671
+ digest: string;
672
+ sizeBytes: number;
673
+ fileName?: string | undefined;
674
+ mediaType?: string | undefined;
675
+ logicalPath?: string | undefined;
676
+ }>;
677
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
678
+ }, "strip", z.ZodTypeAny, {
679
+ type: "file";
680
+ fileRef: {
681
+ blobId: string;
682
+ digest: string;
683
+ sizeBytes: number;
684
+ fileName?: string | undefined;
685
+ mediaType?: string | undefined;
686
+ logicalPath?: string | undefined;
687
+ };
688
+ providerMetadata?: import("./common").JsonValue | undefined;
689
+ }, {
690
+ type: "file";
691
+ fileRef: {
692
+ blobId: string;
693
+ digest: string;
694
+ sizeBytes: number;
695
+ fileName?: string | undefined;
696
+ mediaType?: string | undefined;
697
+ logicalPath?: string | undefined;
698
+ };
699
+ providerMetadata?: import("./common").JsonValue | undefined;
700
+ }>, z.ZodObject<{
701
+ context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
702
+ kind: z.ZodLiteral<"object">;
703
+ ref: z.ZodObject<{
704
+ objectTypeId: z.ZodString;
705
+ primaryId: z.ZodString;
706
+ }, "strip", z.ZodTypeAny, {
707
+ objectTypeId: string;
708
+ primaryId: string;
709
+ }, {
710
+ objectTypeId: string;
711
+ primaryId: string;
712
+ }>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ kind: "object";
715
+ ref: {
716
+ objectTypeId: string;
717
+ primaryId: string;
718
+ };
719
+ }, {
720
+ kind: "object";
721
+ ref: {
722
+ objectTypeId: string;
723
+ primaryId: string;
724
+ };
725
+ }>, z.ZodObject<{
726
+ kind: z.ZodLiteral<"app-state">;
727
+ id: z.ZodString;
728
+ label: z.ZodString;
729
+ description: z.ZodString;
730
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
731
+ }, "strip", z.ZodTypeAny, {
732
+ kind: "app-state";
733
+ description: string;
734
+ value: import("./common").JsonValue;
735
+ id: string;
736
+ label: string;
737
+ }, {
738
+ kind: "app-state";
739
+ description: string;
740
+ value: import("./common").JsonValue;
741
+ id: string;
742
+ label: string;
743
+ }>]>;
744
+ origin: z.ZodEnum<["ambient", "explicit"]>;
745
+ } & {
746
+ type: z.ZodLiteral<"context">;
747
+ }, "strip", z.ZodTypeAny, {
748
+ origin: "ambient" | "explicit";
749
+ type: "context";
750
+ context: {
751
+ kind: "object";
752
+ ref: {
753
+ objectTypeId: string;
754
+ primaryId: string;
755
+ };
756
+ } | {
757
+ kind: "app-state";
758
+ description: string;
759
+ value: import("./common").JsonValue;
760
+ id: string;
761
+ label: string;
762
+ };
763
+ }, {
764
+ origin: "ambient" | "explicit";
765
+ type: "context";
766
+ context: {
767
+ kind: "object";
768
+ ref: {
769
+ objectTypeId: string;
770
+ primaryId: string;
771
+ };
772
+ } | {
773
+ kind: "app-state";
774
+ description: string;
775
+ value: import("./common").JsonValue;
776
+ id: string;
777
+ label: string;
778
+ };
779
+ }>, z.ZodObject<{
780
+ type: z.ZodLiteral<"tool-call">;
781
+ toolCallId: z.ZodString;
782
+ toolName: z.ZodString;
783
+ dynamic: z.ZodOptional<z.ZodBoolean>;
784
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
785
+ input: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
786
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
787
+ } & {
788
+ state: z.ZodLiteral<"output-available">;
789
+ output: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
790
+ }, "strip", z.ZodTypeAny, {
791
+ type: "tool-call";
792
+ output: import("./common").JsonValue;
793
+ toolCallId: string;
794
+ toolName: string;
795
+ input: import("./common").JsonValue;
796
+ state: "output-available";
797
+ providerMetadata?: import("./common").JsonValue | undefined;
798
+ dynamic?: boolean | undefined;
799
+ providerExecuted?: boolean | undefined;
800
+ }, {
801
+ type: "tool-call";
802
+ output: import("./common").JsonValue;
803
+ toolCallId: string;
804
+ toolName: string;
805
+ input: import("./common").JsonValue;
806
+ state: "output-available";
807
+ providerMetadata?: import("./common").JsonValue | undefined;
808
+ dynamic?: boolean | undefined;
809
+ providerExecuted?: boolean | undefined;
810
+ }>, z.ZodObject<{
811
+ type: z.ZodLiteral<"tool-call">;
812
+ toolCallId: z.ZodString;
813
+ toolName: z.ZodString;
814
+ dynamic: z.ZodOptional<z.ZodBoolean>;
815
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
816
+ input: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
817
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
818
+ } & {
819
+ state: z.ZodLiteral<"output-error">;
820
+ errorText: z.ZodString;
821
+ }, "strip", z.ZodTypeAny, {
822
+ type: "tool-call";
823
+ toolCallId: string;
824
+ toolName: string;
825
+ input: import("./common").JsonValue;
826
+ state: "output-error";
827
+ errorText: string;
828
+ providerMetadata?: import("./common").JsonValue | undefined;
829
+ dynamic?: boolean | undefined;
830
+ providerExecuted?: boolean | undefined;
831
+ }, {
832
+ type: "tool-call";
833
+ toolCallId: string;
834
+ toolName: string;
835
+ input: import("./common").JsonValue;
836
+ state: "output-error";
837
+ errorText: string;
838
+ providerMetadata?: import("./common").JsonValue | undefined;
839
+ dynamic?: boolean | undefined;
840
+ providerExecuted?: boolean | undefined;
841
+ }>]>;
842
+ export declare const AgentRunDiagnosticSchema: z.ZodObject<{
843
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
844
+ severity: z.ZodEnum<["warning", "error"]>;
845
+ scope: z.ZodLiteral<"output">;
846
+ path: z.ZodOptional<z.ZodString>;
847
+ message: z.ZodString;
848
+ }, "strip", z.ZodTypeAny, {
849
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
850
+ message: string;
851
+ severity: "error" | "warning";
852
+ scope: "output";
853
+ path?: string | undefined;
854
+ }, {
855
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
856
+ message: string;
857
+ severity: "error" | "warning";
858
+ scope: "output";
859
+ path?: string | undefined;
860
+ }>;
861
+ export declare const AgentMessageSchema: z.ZodObject<{
862
+ id: z.ZodString;
863
+ projectId: z.ZodString;
864
+ threadId: z.ZodString;
865
+ runId: z.ZodNullable<z.ZodString>;
866
+ role: z.ZodEnum<["system", "user", "assistant"]>;
867
+ authorPrincipal: z.ZodOptional<z.ZodObject<{
868
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
869
+ id: z.ZodString;
870
+ }, "strip", z.ZodTypeAny, {
871
+ type: "serviceAccount" | "user" | "system";
872
+ id: string;
873
+ }, {
874
+ type: "serviceAccount" | "user" | "system";
875
+ id: string;
876
+ }>>;
877
+ seq: z.ZodNumber;
878
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
879
+ type: z.ZodLiteral<"text">;
880
+ text: z.ZodString;
881
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
882
+ }, "strip", z.ZodTypeAny, {
883
+ type: "text";
884
+ text: string;
885
+ providerMetadata?: import("./common").JsonValue | undefined;
886
+ }, {
887
+ type: "text";
888
+ text: string;
889
+ providerMetadata?: import("./common").JsonValue | undefined;
890
+ }>, z.ZodObject<{
891
+ type: z.ZodLiteral<"reasoning">;
892
+ text: z.ZodString;
893
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
894
+ }, "strip", z.ZodTypeAny, {
895
+ type: "reasoning";
896
+ text: string;
897
+ providerMetadata?: import("./common").JsonValue | undefined;
898
+ }, {
899
+ type: "reasoning";
900
+ text: string;
901
+ providerMetadata?: import("./common").JsonValue | undefined;
902
+ }>, z.ZodObject<{
903
+ type: z.ZodLiteral<"step-start">;
904
+ }, "strip", z.ZodTypeAny, {
905
+ type: "step-start";
906
+ }, {
907
+ type: "step-start";
908
+ }>, z.ZodObject<{
909
+ type: z.ZodLiteral<"file">;
910
+ fileRef: z.ZodObject<{
911
+ blobId: z.ZodString;
912
+ digest: z.ZodString;
913
+ sizeBytes: z.ZodNumber;
914
+ fileName: z.ZodOptional<z.ZodString>;
915
+ mediaType: z.ZodOptional<z.ZodString>;
916
+ logicalPath: z.ZodOptional<z.ZodString>;
917
+ }, "strip", z.ZodTypeAny, {
918
+ blobId: string;
919
+ digest: string;
920
+ sizeBytes: number;
921
+ fileName?: string | undefined;
922
+ mediaType?: string | undefined;
923
+ logicalPath?: string | undefined;
924
+ }, {
925
+ blobId: string;
926
+ digest: string;
927
+ sizeBytes: number;
928
+ fileName?: string | undefined;
929
+ mediaType?: string | undefined;
930
+ logicalPath?: string | undefined;
931
+ }>;
932
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
933
+ }, "strip", z.ZodTypeAny, {
934
+ type: "file";
935
+ fileRef: {
936
+ blobId: string;
937
+ digest: string;
938
+ sizeBytes: number;
939
+ fileName?: string | undefined;
940
+ mediaType?: string | undefined;
941
+ logicalPath?: string | undefined;
942
+ };
943
+ providerMetadata?: import("./common").JsonValue | undefined;
944
+ }, {
945
+ type: "file";
946
+ fileRef: {
947
+ blobId: string;
948
+ digest: string;
949
+ sizeBytes: number;
950
+ fileName?: string | undefined;
951
+ mediaType?: string | undefined;
952
+ logicalPath?: string | undefined;
953
+ };
954
+ providerMetadata?: import("./common").JsonValue | undefined;
955
+ }>, z.ZodObject<{
956
+ context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
957
+ kind: z.ZodLiteral<"object">;
958
+ ref: z.ZodObject<{
959
+ objectTypeId: z.ZodString;
960
+ primaryId: z.ZodString;
961
+ }, "strip", z.ZodTypeAny, {
962
+ objectTypeId: string;
963
+ primaryId: string;
964
+ }, {
965
+ objectTypeId: string;
966
+ primaryId: string;
967
+ }>;
968
+ }, "strip", z.ZodTypeAny, {
969
+ kind: "object";
970
+ ref: {
971
+ objectTypeId: string;
972
+ primaryId: string;
973
+ };
974
+ }, {
975
+ kind: "object";
976
+ ref: {
977
+ objectTypeId: string;
978
+ primaryId: string;
979
+ };
980
+ }>, z.ZodObject<{
981
+ kind: z.ZodLiteral<"app-state">;
982
+ id: z.ZodString;
983
+ label: z.ZodString;
984
+ description: z.ZodString;
985
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
986
+ }, "strip", z.ZodTypeAny, {
987
+ kind: "app-state";
988
+ description: string;
989
+ value: import("./common").JsonValue;
990
+ id: string;
991
+ label: string;
992
+ }, {
993
+ kind: "app-state";
994
+ description: string;
995
+ value: import("./common").JsonValue;
996
+ id: string;
997
+ label: string;
998
+ }>]>;
999
+ origin: z.ZodEnum<["ambient", "explicit"]>;
1000
+ } & {
1001
+ type: z.ZodLiteral<"context">;
1002
+ }, "strip", z.ZodTypeAny, {
1003
+ origin: "ambient" | "explicit";
1004
+ type: "context";
1005
+ context: {
1006
+ kind: "object";
1007
+ ref: {
1008
+ objectTypeId: string;
1009
+ primaryId: string;
1010
+ };
1011
+ } | {
1012
+ kind: "app-state";
1013
+ description: string;
1014
+ value: import("./common").JsonValue;
1015
+ id: string;
1016
+ label: string;
1017
+ };
1018
+ }, {
1019
+ origin: "ambient" | "explicit";
1020
+ type: "context";
1021
+ context: {
1022
+ kind: "object";
1023
+ ref: {
1024
+ objectTypeId: string;
1025
+ primaryId: string;
1026
+ };
1027
+ } | {
1028
+ kind: "app-state";
1029
+ description: string;
1030
+ value: import("./common").JsonValue;
1031
+ id: string;
1032
+ label: string;
1033
+ };
1034
+ }>, z.ZodObject<{
1035
+ type: z.ZodLiteral<"tool-call">;
1036
+ toolCallId: z.ZodString;
1037
+ toolName: z.ZodString;
1038
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1039
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1040
+ input: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1041
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1042
+ } & {
1043
+ state: z.ZodLiteral<"output-available">;
1044
+ output: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1045
+ }, "strip", z.ZodTypeAny, {
1046
+ type: "tool-call";
1047
+ output: import("./common").JsonValue;
1048
+ toolCallId: string;
1049
+ toolName: string;
1050
+ input: import("./common").JsonValue;
1051
+ state: "output-available";
1052
+ providerMetadata?: import("./common").JsonValue | undefined;
1053
+ dynamic?: boolean | undefined;
1054
+ providerExecuted?: boolean | undefined;
1055
+ }, {
1056
+ type: "tool-call";
1057
+ output: import("./common").JsonValue;
1058
+ toolCallId: string;
1059
+ toolName: string;
1060
+ input: import("./common").JsonValue;
1061
+ state: "output-available";
1062
+ providerMetadata?: import("./common").JsonValue | undefined;
1063
+ dynamic?: boolean | undefined;
1064
+ providerExecuted?: boolean | undefined;
1065
+ }>, z.ZodObject<{
1066
+ type: z.ZodLiteral<"tool-call">;
1067
+ toolCallId: z.ZodString;
1068
+ toolName: z.ZodString;
1069
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1070
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1071
+ input: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1072
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1073
+ } & {
1074
+ state: z.ZodLiteral<"output-error">;
1075
+ errorText: z.ZodString;
1076
+ }, "strip", z.ZodTypeAny, {
1077
+ type: "tool-call";
1078
+ toolCallId: string;
1079
+ toolName: string;
1080
+ input: import("./common").JsonValue;
1081
+ state: "output-error";
1082
+ errorText: string;
1083
+ providerMetadata?: import("./common").JsonValue | undefined;
1084
+ dynamic?: boolean | undefined;
1085
+ providerExecuted?: boolean | undefined;
1086
+ }, {
1087
+ type: "tool-call";
1088
+ toolCallId: string;
1089
+ toolName: string;
1090
+ input: import("./common").JsonValue;
1091
+ state: "output-error";
1092
+ errorText: string;
1093
+ providerMetadata?: import("./common").JsonValue | undefined;
1094
+ dynamic?: boolean | undefined;
1095
+ providerExecuted?: boolean | undefined;
1096
+ }>]>, "many">;
1097
+ /** Platform-authored annotations associated with this message's run. */
1098
+ annotations: z.ZodArray<z.ZodObject<{
1099
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
1100
+ severity: z.ZodEnum<["warning", "error"]>;
1101
+ scope: z.ZodLiteral<"output">;
1102
+ path: z.ZodOptional<z.ZodString>;
1103
+ message: z.ZodString;
1104
+ }, "strip", z.ZodTypeAny, {
1105
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1106
+ message: string;
1107
+ severity: "error" | "warning";
1108
+ scope: "output";
1109
+ path?: string | undefined;
1110
+ }, {
1111
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1112
+ message: string;
1113
+ severity: "error" | "warning";
1114
+ scope: "output";
1115
+ path?: string | undefined;
1116
+ }>, "many">;
1117
+ metadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1118
+ contentVersion: z.ZodNumber;
1119
+ createdAt: z.ZodString;
1120
+ completedAt: z.ZodOptional<z.ZodString>;
1121
+ }, "strip", z.ZodTypeAny, {
1122
+ projectId: string;
1123
+ id: string;
1124
+ runId: string | null;
1125
+ parts: ({
1126
+ origin: "ambient" | "explicit";
1127
+ type: "context";
1128
+ context: {
1129
+ kind: "object";
1130
+ ref: {
1131
+ objectTypeId: string;
1132
+ primaryId: string;
1133
+ };
1134
+ } | {
1135
+ kind: "app-state";
1136
+ description: string;
1137
+ value: import("./common").JsonValue;
1138
+ id: string;
1139
+ label: string;
1140
+ };
1141
+ } | {
1142
+ type: "text";
1143
+ text: string;
1144
+ providerMetadata?: import("./common").JsonValue | undefined;
1145
+ } | {
1146
+ type: "reasoning";
1147
+ text: string;
1148
+ providerMetadata?: import("./common").JsonValue | undefined;
1149
+ } | {
1150
+ type: "step-start";
1151
+ } | {
1152
+ type: "file";
1153
+ fileRef: {
1154
+ blobId: string;
1155
+ digest: string;
1156
+ sizeBytes: number;
1157
+ fileName?: string | undefined;
1158
+ mediaType?: string | undefined;
1159
+ logicalPath?: string | undefined;
1160
+ };
1161
+ providerMetadata?: import("./common").JsonValue | undefined;
1162
+ } | {
1163
+ type: "tool-call";
1164
+ output: import("./common").JsonValue;
1165
+ toolCallId: string;
1166
+ toolName: string;
1167
+ input: import("./common").JsonValue;
1168
+ state: "output-available";
1169
+ providerMetadata?: import("./common").JsonValue | undefined;
1170
+ dynamic?: boolean | undefined;
1171
+ providerExecuted?: boolean | undefined;
1172
+ } | {
1173
+ type: "tool-call";
1174
+ toolCallId: string;
1175
+ toolName: string;
1176
+ input: import("./common").JsonValue;
1177
+ state: "output-error";
1178
+ errorText: string;
1179
+ providerMetadata?: import("./common").JsonValue | undefined;
1180
+ dynamic?: boolean | undefined;
1181
+ providerExecuted?: boolean | undefined;
1182
+ })[];
1183
+ threadId: string;
1184
+ createdAt: string;
1185
+ role: "user" | "system" | "assistant";
1186
+ seq: number;
1187
+ annotations: {
1188
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1189
+ message: string;
1190
+ severity: "error" | "warning";
1191
+ scope: "output";
1192
+ path?: string | undefined;
1193
+ }[];
1194
+ contentVersion: number;
1195
+ completedAt?: string | undefined;
1196
+ authorPrincipal?: {
1197
+ type: "serviceAccount" | "user" | "system";
1198
+ id: string;
1199
+ } | undefined;
1200
+ metadata?: import("./common").JsonValue | undefined;
1201
+ }, {
1202
+ projectId: string;
1203
+ id: string;
1204
+ runId: string | null;
1205
+ parts: ({
1206
+ origin: "ambient" | "explicit";
1207
+ type: "context";
1208
+ context: {
1209
+ kind: "object";
1210
+ ref: {
1211
+ objectTypeId: string;
1212
+ primaryId: string;
1213
+ };
1214
+ } | {
1215
+ kind: "app-state";
1216
+ description: string;
1217
+ value: import("./common").JsonValue;
1218
+ id: string;
1219
+ label: string;
1220
+ };
1221
+ } | {
1222
+ type: "text";
1223
+ text: string;
1224
+ providerMetadata?: import("./common").JsonValue | undefined;
1225
+ } | {
1226
+ type: "reasoning";
1227
+ text: string;
1228
+ providerMetadata?: import("./common").JsonValue | undefined;
1229
+ } | {
1230
+ type: "step-start";
1231
+ } | {
1232
+ type: "file";
1233
+ fileRef: {
1234
+ blobId: string;
1235
+ digest: string;
1236
+ sizeBytes: number;
1237
+ fileName?: string | undefined;
1238
+ mediaType?: string | undefined;
1239
+ logicalPath?: string | undefined;
1240
+ };
1241
+ providerMetadata?: import("./common").JsonValue | undefined;
1242
+ } | {
1243
+ type: "tool-call";
1244
+ output: import("./common").JsonValue;
1245
+ toolCallId: string;
1246
+ toolName: string;
1247
+ input: import("./common").JsonValue;
1248
+ state: "output-available";
1249
+ providerMetadata?: import("./common").JsonValue | undefined;
1250
+ dynamic?: boolean | undefined;
1251
+ providerExecuted?: boolean | undefined;
1252
+ } | {
1253
+ type: "tool-call";
1254
+ toolCallId: string;
1255
+ toolName: string;
1256
+ input: import("./common").JsonValue;
1257
+ state: "output-error";
1258
+ errorText: string;
1259
+ providerMetadata?: import("./common").JsonValue | undefined;
1260
+ dynamic?: boolean | undefined;
1261
+ providerExecuted?: boolean | undefined;
1262
+ })[];
1263
+ threadId: string;
1264
+ createdAt: string;
1265
+ role: "user" | "system" | "assistant";
1266
+ seq: number;
1267
+ annotations: {
1268
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1269
+ message: string;
1270
+ severity: "error" | "warning";
1271
+ scope: "output";
1272
+ path?: string | undefined;
1273
+ }[];
1274
+ contentVersion: number;
1275
+ completedAt?: string | undefined;
1276
+ authorPrincipal?: {
1277
+ type: "serviceAccount" | "user" | "system";
1278
+ id: string;
1279
+ } | undefined;
1280
+ metadata?: import("./common").JsonValue | undefined;
1281
+ }>;
1282
+ export declare const AgentMessagesQuerySchema: z.ZodObject<{
1283
+ role: z.ZodOptional<z.ZodEnum<["system", "user", "assistant"]>>;
1284
+ limit: z.ZodOptional<z.ZodString>;
1285
+ offset: z.ZodOptional<z.ZodString>;
1286
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
1287
+ }, "strip", z.ZodTypeAny, {
1288
+ limit?: string | undefined;
1289
+ offset?: string | undefined;
1290
+ order?: "asc" | "desc" | undefined;
1291
+ role?: "user" | "system" | "assistant" | undefined;
1292
+ }, {
1293
+ limit?: string | undefined;
1294
+ offset?: string | undefined;
1295
+ order?: "asc" | "desc" | undefined;
1296
+ role?: "user" | "system" | "assistant" | undefined;
1297
+ }>;
1298
+ export declare const AgentMessageListResponseSchema: z.ZodObject<{
1299
+ messages: z.ZodArray<z.ZodObject<{
1300
+ id: z.ZodString;
1301
+ projectId: z.ZodString;
1302
+ threadId: z.ZodString;
1303
+ runId: z.ZodNullable<z.ZodString>;
1304
+ role: z.ZodEnum<["system", "user", "assistant"]>;
1305
+ authorPrincipal: z.ZodOptional<z.ZodObject<{
1306
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
1307
+ id: z.ZodString;
1308
+ }, "strip", z.ZodTypeAny, {
1309
+ type: "serviceAccount" | "user" | "system";
1310
+ id: string;
1311
+ }, {
1312
+ type: "serviceAccount" | "user" | "system";
1313
+ id: string;
1314
+ }>>;
1315
+ seq: z.ZodNumber;
1316
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1317
+ type: z.ZodLiteral<"text">;
1318
+ text: z.ZodString;
1319
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1320
+ }, "strip", z.ZodTypeAny, {
1321
+ type: "text";
1322
+ text: string;
1323
+ providerMetadata?: import("./common").JsonValue | undefined;
1324
+ }, {
1325
+ type: "text";
1326
+ text: string;
1327
+ providerMetadata?: import("./common").JsonValue | undefined;
1328
+ }>, z.ZodObject<{
1329
+ type: z.ZodLiteral<"reasoning">;
1330
+ text: z.ZodString;
1331
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1332
+ }, "strip", z.ZodTypeAny, {
1333
+ type: "reasoning";
1334
+ text: string;
1335
+ providerMetadata?: import("./common").JsonValue | undefined;
1336
+ }, {
1337
+ type: "reasoning";
1338
+ text: string;
1339
+ providerMetadata?: import("./common").JsonValue | undefined;
1340
+ }>, z.ZodObject<{
1341
+ type: z.ZodLiteral<"step-start">;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ type: "step-start";
1344
+ }, {
1345
+ type: "step-start";
1346
+ }>, z.ZodObject<{
1347
+ type: z.ZodLiteral<"file">;
1348
+ fileRef: z.ZodObject<{
1349
+ blobId: z.ZodString;
1350
+ digest: z.ZodString;
1351
+ sizeBytes: z.ZodNumber;
1352
+ fileName: z.ZodOptional<z.ZodString>;
1353
+ mediaType: z.ZodOptional<z.ZodString>;
1354
+ logicalPath: z.ZodOptional<z.ZodString>;
1355
+ }, "strip", z.ZodTypeAny, {
1356
+ blobId: string;
1357
+ digest: string;
1358
+ sizeBytes: number;
1359
+ fileName?: string | undefined;
1360
+ mediaType?: string | undefined;
1361
+ logicalPath?: string | undefined;
1362
+ }, {
1363
+ blobId: string;
1364
+ digest: string;
1365
+ sizeBytes: number;
1366
+ fileName?: string | undefined;
1367
+ mediaType?: string | undefined;
1368
+ logicalPath?: string | undefined;
1369
+ }>;
1370
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1371
+ }, "strip", z.ZodTypeAny, {
1372
+ type: "file";
1373
+ fileRef: {
1374
+ blobId: string;
1375
+ digest: string;
1376
+ sizeBytes: number;
1377
+ fileName?: string | undefined;
1378
+ mediaType?: string | undefined;
1379
+ logicalPath?: string | undefined;
1380
+ };
1381
+ providerMetadata?: import("./common").JsonValue | undefined;
1382
+ }, {
1383
+ type: "file";
1384
+ fileRef: {
1385
+ blobId: string;
1386
+ digest: string;
1387
+ sizeBytes: number;
1388
+ fileName?: string | undefined;
1389
+ mediaType?: string | undefined;
1390
+ logicalPath?: string | undefined;
1391
+ };
1392
+ providerMetadata?: import("./common").JsonValue | undefined;
1393
+ }>, z.ZodObject<{
1394
+ context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1395
+ kind: z.ZodLiteral<"object">;
1396
+ ref: z.ZodObject<{
1397
+ objectTypeId: z.ZodString;
1398
+ primaryId: z.ZodString;
1399
+ }, "strip", z.ZodTypeAny, {
1400
+ objectTypeId: string;
1401
+ primaryId: string;
1402
+ }, {
1403
+ objectTypeId: string;
1404
+ primaryId: string;
1405
+ }>;
1406
+ }, "strip", z.ZodTypeAny, {
1407
+ kind: "object";
1408
+ ref: {
1409
+ objectTypeId: string;
1410
+ primaryId: string;
1411
+ };
1412
+ }, {
1413
+ kind: "object";
1414
+ ref: {
1415
+ objectTypeId: string;
1416
+ primaryId: string;
1417
+ };
1418
+ }>, z.ZodObject<{
1419
+ kind: z.ZodLiteral<"app-state">;
1420
+ id: z.ZodString;
1421
+ label: z.ZodString;
1422
+ description: z.ZodString;
1423
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1424
+ }, "strip", z.ZodTypeAny, {
1425
+ kind: "app-state";
1426
+ description: string;
1427
+ value: import("./common").JsonValue;
1428
+ id: string;
1429
+ label: string;
1430
+ }, {
1431
+ kind: "app-state";
1432
+ description: string;
1433
+ value: import("./common").JsonValue;
1434
+ id: string;
1435
+ label: string;
1436
+ }>]>;
1437
+ origin: z.ZodEnum<["ambient", "explicit"]>;
1438
+ } & {
1439
+ type: z.ZodLiteral<"context">;
1440
+ }, "strip", z.ZodTypeAny, {
1441
+ origin: "ambient" | "explicit";
1442
+ type: "context";
1443
+ context: {
1444
+ kind: "object";
1445
+ ref: {
1446
+ objectTypeId: string;
1447
+ primaryId: string;
1448
+ };
1449
+ } | {
1450
+ kind: "app-state";
1451
+ description: string;
1452
+ value: import("./common").JsonValue;
1453
+ id: string;
1454
+ label: string;
1455
+ };
1456
+ }, {
1457
+ origin: "ambient" | "explicit";
1458
+ type: "context";
1459
+ context: {
1460
+ kind: "object";
1461
+ ref: {
1462
+ objectTypeId: string;
1463
+ primaryId: string;
1464
+ };
1465
+ } | {
1466
+ kind: "app-state";
1467
+ description: string;
1468
+ value: import("./common").JsonValue;
1469
+ id: string;
1470
+ label: string;
1471
+ };
1472
+ }>, z.ZodObject<{
1473
+ type: z.ZodLiteral<"tool-call">;
1474
+ toolCallId: z.ZodString;
1475
+ toolName: z.ZodString;
1476
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1477
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1478
+ input: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1479
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1480
+ } & {
1481
+ state: z.ZodLiteral<"output-available">;
1482
+ output: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1483
+ }, "strip", z.ZodTypeAny, {
1484
+ type: "tool-call";
1485
+ output: import("./common").JsonValue;
1486
+ toolCallId: string;
1487
+ toolName: string;
1488
+ input: import("./common").JsonValue;
1489
+ state: "output-available";
1490
+ providerMetadata?: import("./common").JsonValue | undefined;
1491
+ dynamic?: boolean | undefined;
1492
+ providerExecuted?: boolean | undefined;
1493
+ }, {
1494
+ type: "tool-call";
1495
+ output: import("./common").JsonValue;
1496
+ toolCallId: string;
1497
+ toolName: string;
1498
+ input: import("./common").JsonValue;
1499
+ state: "output-available";
1500
+ providerMetadata?: import("./common").JsonValue | undefined;
1501
+ dynamic?: boolean | undefined;
1502
+ providerExecuted?: boolean | undefined;
1503
+ }>, z.ZodObject<{
1504
+ type: z.ZodLiteral<"tool-call">;
1505
+ toolCallId: z.ZodString;
1506
+ toolName: z.ZodString;
1507
+ dynamic: z.ZodOptional<z.ZodBoolean>;
1508
+ providerExecuted: z.ZodOptional<z.ZodBoolean>;
1509
+ input: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1510
+ providerMetadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1511
+ } & {
1512
+ state: z.ZodLiteral<"output-error">;
1513
+ errorText: z.ZodString;
1514
+ }, "strip", z.ZodTypeAny, {
1515
+ type: "tool-call";
1516
+ toolCallId: string;
1517
+ toolName: string;
1518
+ input: import("./common").JsonValue;
1519
+ state: "output-error";
1520
+ errorText: string;
1521
+ providerMetadata?: import("./common").JsonValue | undefined;
1522
+ dynamic?: boolean | undefined;
1523
+ providerExecuted?: boolean | undefined;
1524
+ }, {
1525
+ type: "tool-call";
1526
+ toolCallId: string;
1527
+ toolName: string;
1528
+ input: import("./common").JsonValue;
1529
+ state: "output-error";
1530
+ errorText: string;
1531
+ providerMetadata?: import("./common").JsonValue | undefined;
1532
+ dynamic?: boolean | undefined;
1533
+ providerExecuted?: boolean | undefined;
1534
+ }>]>, "many">;
1535
+ /** Platform-authored annotations associated with this message's run. */
1536
+ annotations: z.ZodArray<z.ZodObject<{
1537
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
1538
+ severity: z.ZodEnum<["warning", "error"]>;
1539
+ scope: z.ZodLiteral<"output">;
1540
+ path: z.ZodOptional<z.ZodString>;
1541
+ message: z.ZodString;
1542
+ }, "strip", z.ZodTypeAny, {
1543
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1544
+ message: string;
1545
+ severity: "error" | "warning";
1546
+ scope: "output";
1547
+ path?: string | undefined;
1548
+ }, {
1549
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1550
+ message: string;
1551
+ severity: "error" | "warning";
1552
+ scope: "output";
1553
+ path?: string | undefined;
1554
+ }>, "many">;
1555
+ metadata: z.ZodOptional<z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>>;
1556
+ contentVersion: z.ZodNumber;
1557
+ createdAt: z.ZodString;
1558
+ completedAt: z.ZodOptional<z.ZodString>;
1559
+ }, "strip", z.ZodTypeAny, {
1560
+ projectId: string;
1561
+ id: string;
1562
+ runId: string | null;
1563
+ parts: ({
1564
+ origin: "ambient" | "explicit";
1565
+ type: "context";
1566
+ context: {
1567
+ kind: "object";
1568
+ ref: {
1569
+ objectTypeId: string;
1570
+ primaryId: string;
1571
+ };
1572
+ } | {
1573
+ kind: "app-state";
1574
+ description: string;
1575
+ value: import("./common").JsonValue;
1576
+ id: string;
1577
+ label: string;
1578
+ };
1579
+ } | {
1580
+ type: "text";
1581
+ text: string;
1582
+ providerMetadata?: import("./common").JsonValue | undefined;
1583
+ } | {
1584
+ type: "reasoning";
1585
+ text: string;
1586
+ providerMetadata?: import("./common").JsonValue | undefined;
1587
+ } | {
1588
+ type: "step-start";
1589
+ } | {
1590
+ type: "file";
1591
+ fileRef: {
1592
+ blobId: string;
1593
+ digest: string;
1594
+ sizeBytes: number;
1595
+ fileName?: string | undefined;
1596
+ mediaType?: string | undefined;
1597
+ logicalPath?: string | undefined;
1598
+ };
1599
+ providerMetadata?: import("./common").JsonValue | undefined;
1600
+ } | {
1601
+ type: "tool-call";
1602
+ output: import("./common").JsonValue;
1603
+ toolCallId: string;
1604
+ toolName: string;
1605
+ input: import("./common").JsonValue;
1606
+ state: "output-available";
1607
+ providerMetadata?: import("./common").JsonValue | undefined;
1608
+ dynamic?: boolean | undefined;
1609
+ providerExecuted?: boolean | undefined;
1610
+ } | {
1611
+ type: "tool-call";
1612
+ toolCallId: string;
1613
+ toolName: string;
1614
+ input: import("./common").JsonValue;
1615
+ state: "output-error";
1616
+ errorText: string;
1617
+ providerMetadata?: import("./common").JsonValue | undefined;
1618
+ dynamic?: boolean | undefined;
1619
+ providerExecuted?: boolean | undefined;
1620
+ })[];
1621
+ threadId: string;
1622
+ createdAt: string;
1623
+ role: "user" | "system" | "assistant";
1624
+ seq: number;
1625
+ annotations: {
1626
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1627
+ message: string;
1628
+ severity: "error" | "warning";
1629
+ scope: "output";
1630
+ path?: string | undefined;
1631
+ }[];
1632
+ contentVersion: number;
1633
+ completedAt?: string | undefined;
1634
+ authorPrincipal?: {
1635
+ type: "serviceAccount" | "user" | "system";
1636
+ id: string;
1637
+ } | undefined;
1638
+ metadata?: import("./common").JsonValue | undefined;
1639
+ }, {
1640
+ projectId: string;
1641
+ id: string;
1642
+ runId: string | null;
1643
+ parts: ({
1644
+ origin: "ambient" | "explicit";
1645
+ type: "context";
1646
+ context: {
1647
+ kind: "object";
1648
+ ref: {
1649
+ objectTypeId: string;
1650
+ primaryId: string;
1651
+ };
1652
+ } | {
1653
+ kind: "app-state";
1654
+ description: string;
1655
+ value: import("./common").JsonValue;
1656
+ id: string;
1657
+ label: string;
1658
+ };
1659
+ } | {
1660
+ type: "text";
1661
+ text: string;
1662
+ providerMetadata?: import("./common").JsonValue | undefined;
1663
+ } | {
1664
+ type: "reasoning";
1665
+ text: string;
1666
+ providerMetadata?: import("./common").JsonValue | undefined;
1667
+ } | {
1668
+ type: "step-start";
1669
+ } | {
1670
+ type: "file";
1671
+ fileRef: {
1672
+ blobId: string;
1673
+ digest: string;
1674
+ sizeBytes: number;
1675
+ fileName?: string | undefined;
1676
+ mediaType?: string | undefined;
1677
+ logicalPath?: string | undefined;
1678
+ };
1679
+ providerMetadata?: import("./common").JsonValue | undefined;
1680
+ } | {
1681
+ type: "tool-call";
1682
+ output: import("./common").JsonValue;
1683
+ toolCallId: string;
1684
+ toolName: string;
1685
+ input: import("./common").JsonValue;
1686
+ state: "output-available";
1687
+ providerMetadata?: import("./common").JsonValue | undefined;
1688
+ dynamic?: boolean | undefined;
1689
+ providerExecuted?: boolean | undefined;
1690
+ } | {
1691
+ type: "tool-call";
1692
+ toolCallId: string;
1693
+ toolName: string;
1694
+ input: import("./common").JsonValue;
1695
+ state: "output-error";
1696
+ errorText: string;
1697
+ providerMetadata?: import("./common").JsonValue | undefined;
1698
+ dynamic?: boolean | undefined;
1699
+ providerExecuted?: boolean | undefined;
1700
+ })[];
1701
+ threadId: string;
1702
+ createdAt: string;
1703
+ role: "user" | "system" | "assistant";
1704
+ seq: number;
1705
+ annotations: {
1706
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1707
+ message: string;
1708
+ severity: "error" | "warning";
1709
+ scope: "output";
1710
+ path?: string | undefined;
1711
+ }[];
1712
+ contentVersion: number;
1713
+ completedAt?: string | undefined;
1714
+ authorPrincipal?: {
1715
+ type: "serviceAccount" | "user" | "system";
1716
+ id: string;
1717
+ } | undefined;
1718
+ metadata?: import("./common").JsonValue | undefined;
1719
+ }>, "many">;
1720
+ hasMore: z.ZodBoolean;
1721
+ total: z.ZodNumber;
1722
+ }, "strip", z.ZodTypeAny, {
1723
+ hasMore: boolean;
1724
+ total: number;
1725
+ messages: {
1726
+ projectId: string;
1727
+ id: string;
1728
+ runId: string | null;
1729
+ parts: ({
1730
+ origin: "ambient" | "explicit";
1731
+ type: "context";
1732
+ context: {
1733
+ kind: "object";
1734
+ ref: {
1735
+ objectTypeId: string;
1736
+ primaryId: string;
1737
+ };
1738
+ } | {
1739
+ kind: "app-state";
1740
+ description: string;
1741
+ value: import("./common").JsonValue;
1742
+ id: string;
1743
+ label: string;
1744
+ };
1745
+ } | {
1746
+ type: "text";
1747
+ text: string;
1748
+ providerMetadata?: import("./common").JsonValue | undefined;
1749
+ } | {
1750
+ type: "reasoning";
1751
+ text: string;
1752
+ providerMetadata?: import("./common").JsonValue | undefined;
1753
+ } | {
1754
+ type: "step-start";
1755
+ } | {
1756
+ type: "file";
1757
+ fileRef: {
1758
+ blobId: string;
1759
+ digest: string;
1760
+ sizeBytes: number;
1761
+ fileName?: string | undefined;
1762
+ mediaType?: string | undefined;
1763
+ logicalPath?: string | undefined;
1764
+ };
1765
+ providerMetadata?: import("./common").JsonValue | undefined;
1766
+ } | {
1767
+ type: "tool-call";
1768
+ output: import("./common").JsonValue;
1769
+ toolCallId: string;
1770
+ toolName: string;
1771
+ input: import("./common").JsonValue;
1772
+ state: "output-available";
1773
+ providerMetadata?: import("./common").JsonValue | undefined;
1774
+ dynamic?: boolean | undefined;
1775
+ providerExecuted?: boolean | undefined;
1776
+ } | {
1777
+ type: "tool-call";
1778
+ toolCallId: string;
1779
+ toolName: string;
1780
+ input: import("./common").JsonValue;
1781
+ state: "output-error";
1782
+ errorText: string;
1783
+ providerMetadata?: import("./common").JsonValue | undefined;
1784
+ dynamic?: boolean | undefined;
1785
+ providerExecuted?: boolean | undefined;
1786
+ })[];
1787
+ threadId: string;
1788
+ createdAt: string;
1789
+ role: "user" | "system" | "assistant";
1790
+ seq: number;
1791
+ annotations: {
1792
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1793
+ message: string;
1794
+ severity: "error" | "warning";
1795
+ scope: "output";
1796
+ path?: string | undefined;
1797
+ }[];
1798
+ contentVersion: number;
1799
+ completedAt?: string | undefined;
1800
+ authorPrincipal?: {
1801
+ type: "serviceAccount" | "user" | "system";
1802
+ id: string;
1803
+ } | undefined;
1804
+ metadata?: import("./common").JsonValue | undefined;
1805
+ }[];
1806
+ }, {
1807
+ hasMore: boolean;
1808
+ total: number;
1809
+ messages: {
1810
+ projectId: string;
1811
+ id: string;
1812
+ runId: string | null;
1813
+ parts: ({
1814
+ origin: "ambient" | "explicit";
1815
+ type: "context";
1816
+ context: {
1817
+ kind: "object";
1818
+ ref: {
1819
+ objectTypeId: string;
1820
+ primaryId: string;
1821
+ };
1822
+ } | {
1823
+ kind: "app-state";
1824
+ description: string;
1825
+ value: import("./common").JsonValue;
1826
+ id: string;
1827
+ label: string;
1828
+ };
1829
+ } | {
1830
+ type: "text";
1831
+ text: string;
1832
+ providerMetadata?: import("./common").JsonValue | undefined;
1833
+ } | {
1834
+ type: "reasoning";
1835
+ text: string;
1836
+ providerMetadata?: import("./common").JsonValue | undefined;
1837
+ } | {
1838
+ type: "step-start";
1839
+ } | {
1840
+ type: "file";
1841
+ fileRef: {
1842
+ blobId: string;
1843
+ digest: string;
1844
+ sizeBytes: number;
1845
+ fileName?: string | undefined;
1846
+ mediaType?: string | undefined;
1847
+ logicalPath?: string | undefined;
1848
+ };
1849
+ providerMetadata?: import("./common").JsonValue | undefined;
1850
+ } | {
1851
+ type: "tool-call";
1852
+ output: import("./common").JsonValue;
1853
+ toolCallId: string;
1854
+ toolName: string;
1855
+ input: import("./common").JsonValue;
1856
+ state: "output-available";
1857
+ providerMetadata?: import("./common").JsonValue | undefined;
1858
+ dynamic?: boolean | undefined;
1859
+ providerExecuted?: boolean | undefined;
1860
+ } | {
1861
+ type: "tool-call";
1862
+ toolCallId: string;
1863
+ toolName: string;
1864
+ input: import("./common").JsonValue;
1865
+ state: "output-error";
1866
+ errorText: string;
1867
+ providerMetadata?: import("./common").JsonValue | undefined;
1868
+ dynamic?: boolean | undefined;
1869
+ providerExecuted?: boolean | undefined;
1870
+ })[];
1871
+ threadId: string;
1872
+ createdAt: string;
1873
+ role: "user" | "system" | "assistant";
1874
+ seq: number;
1875
+ annotations: {
1876
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
1877
+ message: string;
1878
+ severity: "error" | "warning";
1879
+ scope: "output";
1880
+ path?: string | undefined;
1881
+ }[];
1882
+ contentVersion: number;
1883
+ completedAt?: string | undefined;
1884
+ authorPrincipal?: {
1885
+ type: "serviceAccount" | "user" | "system";
1886
+ id: string;
1887
+ } | undefined;
1888
+ metadata?: import("./common").JsonValue | undefined;
1889
+ }[];
1890
+ }>;
1891
+ export declare const PostAgentMessageBodySchema: z.ZodObject<{
1892
+ text: z.ZodString;
1893
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1894
+ blobId: z.ZodString;
1895
+ digest: z.ZodString;
1896
+ sizeBytes: z.ZodNumber;
1897
+ fileName: z.ZodOptional<z.ZodString>;
1898
+ mediaType: z.ZodOptional<z.ZodString>;
1899
+ logicalPath: z.ZodOptional<z.ZodString>;
1900
+ }, "strip", z.ZodTypeAny, {
1901
+ blobId: string;
1902
+ digest: string;
1903
+ sizeBytes: number;
1904
+ fileName?: string | undefined;
1905
+ mediaType?: string | undefined;
1906
+ logicalPath?: string | undefined;
1907
+ }, {
1908
+ blobId: string;
1909
+ digest: string;
1910
+ sizeBytes: number;
1911
+ fileName?: string | undefined;
1912
+ mediaType?: string | undefined;
1913
+ logicalPath?: string | undefined;
1914
+ }>, "many">>;
1915
+ context: z.ZodOptional<z.ZodArray<z.ZodObject<{
1916
+ context: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1917
+ kind: z.ZodLiteral<"object">;
1918
+ ref: z.ZodObject<{
1919
+ objectTypeId: z.ZodString;
1920
+ primaryId: z.ZodString;
1921
+ }, "strip", z.ZodTypeAny, {
1922
+ objectTypeId: string;
1923
+ primaryId: string;
1924
+ }, {
1925
+ objectTypeId: string;
1926
+ primaryId: string;
1927
+ }>;
1928
+ }, "strip", z.ZodTypeAny, {
1929
+ kind: "object";
1930
+ ref: {
1931
+ objectTypeId: string;
1932
+ primaryId: string;
1933
+ };
1934
+ }, {
1935
+ kind: "object";
1936
+ ref: {
1937
+ objectTypeId: string;
1938
+ primaryId: string;
1939
+ };
1940
+ }>, z.ZodObject<{
1941
+ kind: z.ZodLiteral<"app-state">;
1942
+ id: z.ZodString;
1943
+ label: z.ZodString;
1944
+ description: z.ZodString;
1945
+ value: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
1946
+ }, "strip", z.ZodTypeAny, {
1947
+ kind: "app-state";
1948
+ description: string;
1949
+ value: import("./common").JsonValue;
1950
+ id: string;
1951
+ label: string;
1952
+ }, {
1953
+ kind: "app-state";
1954
+ description: string;
1955
+ value: import("./common").JsonValue;
1956
+ id: string;
1957
+ label: string;
1958
+ }>]>;
1959
+ origin: z.ZodEnum<["ambient", "explicit"]>;
1960
+ }, "strip", z.ZodTypeAny, {
1961
+ origin: "ambient" | "explicit";
1962
+ context: {
1963
+ kind: "object";
1964
+ ref: {
1965
+ objectTypeId: string;
1966
+ primaryId: string;
1967
+ };
1968
+ } | {
1969
+ kind: "app-state";
1970
+ description: string;
1971
+ value: import("./common").JsonValue;
1972
+ id: string;
1973
+ label: string;
1974
+ };
1975
+ }, {
1976
+ origin: "ambient" | "explicit";
1977
+ context: {
1978
+ kind: "object";
1979
+ ref: {
1980
+ objectTypeId: string;
1981
+ primaryId: string;
1982
+ };
1983
+ } | {
1984
+ kind: "app-state";
1985
+ description: string;
1986
+ value: import("./common").JsonValue;
1987
+ id: string;
1988
+ label: string;
1989
+ };
1990
+ }>, "many">>;
1991
+ messageId: z.ZodOptional<z.ZodString>;
1992
+ }, "strip", z.ZodTypeAny, {
1993
+ text: string;
1994
+ messageId?: string | undefined;
1995
+ context?: {
1996
+ origin: "ambient" | "explicit";
1997
+ context: {
1998
+ kind: "object";
1999
+ ref: {
2000
+ objectTypeId: string;
2001
+ primaryId: string;
2002
+ };
2003
+ } | {
2004
+ kind: "app-state";
2005
+ description: string;
2006
+ value: import("./common").JsonValue;
2007
+ id: string;
2008
+ label: string;
2009
+ };
2010
+ }[] | undefined;
2011
+ attachments?: {
2012
+ blobId: string;
2013
+ digest: string;
2014
+ sizeBytes: number;
2015
+ fileName?: string | undefined;
2016
+ mediaType?: string | undefined;
2017
+ logicalPath?: string | undefined;
2018
+ }[] | undefined;
2019
+ }, {
2020
+ text: string;
2021
+ messageId?: string | undefined;
2022
+ context?: {
2023
+ origin: "ambient" | "explicit";
2024
+ context: {
2025
+ kind: "object";
2026
+ ref: {
2027
+ objectTypeId: string;
2028
+ primaryId: string;
2029
+ };
2030
+ } | {
2031
+ kind: "app-state";
2032
+ description: string;
2033
+ value: import("./common").JsonValue;
2034
+ id: string;
2035
+ label: string;
2036
+ };
2037
+ }[] | undefined;
2038
+ attachments?: {
2039
+ blobId: string;
2040
+ digest: string;
2041
+ sizeBytes: number;
2042
+ fileName?: string | undefined;
2043
+ mediaType?: string | undefined;
2044
+ logicalPath?: string | undefined;
2045
+ }[] | undefined;
2046
+ }>;
2047
+ export declare const CancelAgentRunBodySchema: z.ZodObject<{
2048
+ runId: z.ZodString;
2049
+ }, "strip", z.ZodTypeAny, {
2050
+ runId: string;
2051
+ }, {
2052
+ runId: string;
2053
+ }>;
2054
+ export declare const AgentRunStatusSchema: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2055
+ export declare const AgentRunFinishReasonSchema: z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>;
2056
+ export declare const AgentRunUsageSchema: z.ZodObject<{
2057
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2058
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2059
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2060
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2061
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2062
+ }, "strip", z.ZodTypeAny, {
2063
+ inputTokens?: number | undefined;
2064
+ outputTokens?: number | undefined;
2065
+ totalTokens?: number | undefined;
2066
+ reasoningTokens?: number | undefined;
2067
+ cachedInputTokens?: number | undefined;
2068
+ }, {
2069
+ inputTokens?: number | undefined;
2070
+ outputTokens?: number | undefined;
2071
+ totalTokens?: number | undefined;
2072
+ reasoningTokens?: number | undefined;
2073
+ cachedInputTokens?: number | undefined;
2074
+ }>;
2075
+ export declare const AgentRunSchema: z.ZodObject<{
2076
+ id: z.ZodString;
2077
+ projectId: z.ZodString;
2078
+ threadId: z.ZodString;
2079
+ agentId: z.ZodString;
2080
+ triggerMessageId: z.ZodString;
2081
+ requestedByPrincipal: z.ZodObject<{
2082
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2083
+ id: z.ZodString;
2084
+ }, "strip", z.ZodTypeAny, {
2085
+ type: "serviceAccount" | "user" | "system";
2086
+ id: string;
2087
+ }, {
2088
+ type: "serviceAccount" | "user" | "system";
2089
+ id: string;
2090
+ }>;
2091
+ executionPrincipal: z.ZodOptional<z.ZodObject<{
2092
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2093
+ id: z.ZodString;
2094
+ }, "strip", z.ZodTypeAny, {
2095
+ type: "serviceAccount" | "user" | "system";
2096
+ id: string;
2097
+ }, {
2098
+ type: "serviceAccount" | "user" | "system";
2099
+ id: string;
2100
+ }>>;
2101
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2102
+ modelId: z.ZodOptional<z.ZodString>;
2103
+ finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>>;
2104
+ usage: z.ZodOptional<z.ZodObject<{
2105
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2106
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2107
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2108
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2109
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2110
+ }, "strip", z.ZodTypeAny, {
2111
+ inputTokens?: number | undefined;
2112
+ outputTokens?: number | undefined;
2113
+ totalTokens?: number | undefined;
2114
+ reasoningTokens?: number | undefined;
2115
+ cachedInputTokens?: number | undefined;
2116
+ }, {
2117
+ inputTokens?: number | undefined;
2118
+ outputTokens?: number | undefined;
2119
+ totalTokens?: number | undefined;
2120
+ reasoningTokens?: number | undefined;
2121
+ cachedInputTokens?: number | undefined;
2122
+ }>>;
2123
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2124
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
2125
+ severity: z.ZodEnum<["warning", "error"]>;
2126
+ scope: z.ZodLiteral<"output">;
2127
+ path: z.ZodOptional<z.ZodString>;
2128
+ message: z.ZodString;
2129
+ }, "strip", z.ZodTypeAny, {
2130
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2131
+ message: string;
2132
+ severity: "error" | "warning";
2133
+ scope: "output";
2134
+ path?: string | undefined;
2135
+ }, {
2136
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2137
+ message: string;
2138
+ severity: "error" | "warning";
2139
+ scope: "output";
2140
+ path?: string | undefined;
2141
+ }>, "many">>;
2142
+ error: z.ZodOptional<z.ZodString>;
2143
+ attempt: z.ZodNumber;
2144
+ streamId: z.ZodString;
2145
+ createdAt: z.ZodString;
2146
+ startedAt: z.ZodOptional<z.ZodString>;
2147
+ completedAt: z.ZodOptional<z.ZodString>;
2148
+ }, "strip", z.ZodTypeAny, {
2149
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2150
+ projectId: string;
2151
+ agentId: string;
2152
+ id: string;
2153
+ threadId: string;
2154
+ createdAt: string;
2155
+ triggerMessageId: string;
2156
+ requestedByPrincipal: {
2157
+ type: "serviceAccount" | "user" | "system";
2158
+ id: string;
2159
+ };
2160
+ attempt: number;
2161
+ streamId: string;
2162
+ error?: string | undefined;
2163
+ startedAt?: string | undefined;
2164
+ completedAt?: string | undefined;
2165
+ executionPrincipal?: {
2166
+ type: "serviceAccount" | "user" | "system";
2167
+ id: string;
2168
+ } | undefined;
2169
+ modelId?: string | undefined;
2170
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2171
+ usage?: {
2172
+ inputTokens?: number | undefined;
2173
+ outputTokens?: number | undefined;
2174
+ totalTokens?: number | undefined;
2175
+ reasoningTokens?: number | undefined;
2176
+ cachedInputTokens?: number | undefined;
2177
+ } | undefined;
2178
+ diagnostics?: {
2179
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2180
+ message: string;
2181
+ severity: "error" | "warning";
2182
+ scope: "output";
2183
+ path?: string | undefined;
2184
+ }[] | undefined;
2185
+ }, {
2186
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2187
+ projectId: string;
2188
+ agentId: string;
2189
+ id: string;
2190
+ threadId: string;
2191
+ createdAt: string;
2192
+ triggerMessageId: string;
2193
+ requestedByPrincipal: {
2194
+ type: "serviceAccount" | "user" | "system";
2195
+ id: string;
2196
+ };
2197
+ attempt: number;
2198
+ streamId: string;
2199
+ error?: string | undefined;
2200
+ startedAt?: string | undefined;
2201
+ completedAt?: string | undefined;
2202
+ executionPrincipal?: {
2203
+ type: "serviceAccount" | "user" | "system";
2204
+ id: string;
2205
+ } | undefined;
2206
+ modelId?: string | undefined;
2207
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2208
+ usage?: {
2209
+ inputTokens?: number | undefined;
2210
+ outputTokens?: number | undefined;
2211
+ totalTokens?: number | undefined;
2212
+ reasoningTokens?: number | undefined;
2213
+ cachedInputTokens?: number | undefined;
2214
+ } | undefined;
2215
+ diagnostics?: {
2216
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2217
+ message: string;
2218
+ severity: "error" | "warning";
2219
+ scope: "output";
2220
+ path?: string | undefined;
2221
+ }[] | undefined;
2222
+ }>;
2223
+ export declare const PostAgentMessageResponseSchema: z.ZodObject<{
2224
+ run: z.ZodObject<{
2225
+ id: z.ZodString;
2226
+ projectId: z.ZodString;
2227
+ threadId: z.ZodString;
2228
+ agentId: z.ZodString;
2229
+ triggerMessageId: z.ZodString;
2230
+ requestedByPrincipal: z.ZodObject<{
2231
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2232
+ id: z.ZodString;
2233
+ }, "strip", z.ZodTypeAny, {
2234
+ type: "serviceAccount" | "user" | "system";
2235
+ id: string;
2236
+ }, {
2237
+ type: "serviceAccount" | "user" | "system";
2238
+ id: string;
2239
+ }>;
2240
+ executionPrincipal: z.ZodOptional<z.ZodObject<{
2241
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2242
+ id: z.ZodString;
2243
+ }, "strip", z.ZodTypeAny, {
2244
+ type: "serviceAccount" | "user" | "system";
2245
+ id: string;
2246
+ }, {
2247
+ type: "serviceAccount" | "user" | "system";
2248
+ id: string;
2249
+ }>>;
2250
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2251
+ modelId: z.ZodOptional<z.ZodString>;
2252
+ finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>>;
2253
+ usage: z.ZodOptional<z.ZodObject<{
2254
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2255
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2256
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2257
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2258
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2259
+ }, "strip", z.ZodTypeAny, {
2260
+ inputTokens?: number | undefined;
2261
+ outputTokens?: number | undefined;
2262
+ totalTokens?: number | undefined;
2263
+ reasoningTokens?: number | undefined;
2264
+ cachedInputTokens?: number | undefined;
2265
+ }, {
2266
+ inputTokens?: number | undefined;
2267
+ outputTokens?: number | undefined;
2268
+ totalTokens?: number | undefined;
2269
+ reasoningTokens?: number | undefined;
2270
+ cachedInputTokens?: number | undefined;
2271
+ }>>;
2272
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2273
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
2274
+ severity: z.ZodEnum<["warning", "error"]>;
2275
+ scope: z.ZodLiteral<"output">;
2276
+ path: z.ZodOptional<z.ZodString>;
2277
+ message: z.ZodString;
2278
+ }, "strip", z.ZodTypeAny, {
2279
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2280
+ message: string;
2281
+ severity: "error" | "warning";
2282
+ scope: "output";
2283
+ path?: string | undefined;
2284
+ }, {
2285
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2286
+ message: string;
2287
+ severity: "error" | "warning";
2288
+ scope: "output";
2289
+ path?: string | undefined;
2290
+ }>, "many">>;
2291
+ error: z.ZodOptional<z.ZodString>;
2292
+ attempt: z.ZodNumber;
2293
+ streamId: z.ZodString;
2294
+ createdAt: z.ZodString;
2295
+ startedAt: z.ZodOptional<z.ZodString>;
2296
+ completedAt: z.ZodOptional<z.ZodString>;
2297
+ }, "strip", z.ZodTypeAny, {
2298
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2299
+ projectId: string;
2300
+ agentId: string;
2301
+ id: string;
2302
+ threadId: string;
2303
+ createdAt: string;
2304
+ triggerMessageId: string;
2305
+ requestedByPrincipal: {
2306
+ type: "serviceAccount" | "user" | "system";
2307
+ id: string;
2308
+ };
2309
+ attempt: number;
2310
+ streamId: string;
2311
+ error?: string | undefined;
2312
+ startedAt?: string | undefined;
2313
+ completedAt?: string | undefined;
2314
+ executionPrincipal?: {
2315
+ type: "serviceAccount" | "user" | "system";
2316
+ id: string;
2317
+ } | undefined;
2318
+ modelId?: string | undefined;
2319
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2320
+ usage?: {
2321
+ inputTokens?: number | undefined;
2322
+ outputTokens?: number | undefined;
2323
+ totalTokens?: number | undefined;
2324
+ reasoningTokens?: number | undefined;
2325
+ cachedInputTokens?: number | undefined;
2326
+ } | undefined;
2327
+ diagnostics?: {
2328
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2329
+ message: string;
2330
+ severity: "error" | "warning";
2331
+ scope: "output";
2332
+ path?: string | undefined;
2333
+ }[] | undefined;
2334
+ }, {
2335
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2336
+ projectId: string;
2337
+ agentId: string;
2338
+ id: string;
2339
+ threadId: string;
2340
+ createdAt: string;
2341
+ triggerMessageId: string;
2342
+ requestedByPrincipal: {
2343
+ type: "serviceAccount" | "user" | "system";
2344
+ id: string;
2345
+ };
2346
+ attempt: number;
2347
+ streamId: string;
2348
+ error?: string | undefined;
2349
+ startedAt?: string | undefined;
2350
+ completedAt?: string | undefined;
2351
+ executionPrincipal?: {
2352
+ type: "serviceAccount" | "user" | "system";
2353
+ id: string;
2354
+ } | undefined;
2355
+ modelId?: string | undefined;
2356
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2357
+ usage?: {
2358
+ inputTokens?: number | undefined;
2359
+ outputTokens?: number | undefined;
2360
+ totalTokens?: number | undefined;
2361
+ reasoningTokens?: number | undefined;
2362
+ cachedInputTokens?: number | undefined;
2363
+ } | undefined;
2364
+ diagnostics?: {
2365
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2366
+ message: string;
2367
+ severity: "error" | "warning";
2368
+ scope: "output";
2369
+ path?: string | undefined;
2370
+ }[] | undefined;
2371
+ }>;
2372
+ }, "strip", z.ZodTypeAny, {
2373
+ run: {
2374
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2375
+ projectId: string;
2376
+ agentId: string;
2377
+ id: string;
2378
+ threadId: string;
2379
+ createdAt: string;
2380
+ triggerMessageId: string;
2381
+ requestedByPrincipal: {
2382
+ type: "serviceAccount" | "user" | "system";
2383
+ id: string;
2384
+ };
2385
+ attempt: number;
2386
+ streamId: string;
2387
+ error?: string | undefined;
2388
+ startedAt?: string | undefined;
2389
+ completedAt?: string | undefined;
2390
+ executionPrincipal?: {
2391
+ type: "serviceAccount" | "user" | "system";
2392
+ id: string;
2393
+ } | undefined;
2394
+ modelId?: string | undefined;
2395
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2396
+ usage?: {
2397
+ inputTokens?: number | undefined;
2398
+ outputTokens?: number | undefined;
2399
+ totalTokens?: number | undefined;
2400
+ reasoningTokens?: number | undefined;
2401
+ cachedInputTokens?: number | undefined;
2402
+ } | undefined;
2403
+ diagnostics?: {
2404
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2405
+ message: string;
2406
+ severity: "error" | "warning";
2407
+ scope: "output";
2408
+ path?: string | undefined;
2409
+ }[] | undefined;
2410
+ };
2411
+ }, {
2412
+ run: {
2413
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2414
+ projectId: string;
2415
+ agentId: string;
2416
+ id: string;
2417
+ threadId: string;
2418
+ createdAt: string;
2419
+ triggerMessageId: string;
2420
+ requestedByPrincipal: {
2421
+ type: "serviceAccount" | "user" | "system";
2422
+ id: string;
2423
+ };
2424
+ attempt: number;
2425
+ streamId: string;
2426
+ error?: string | undefined;
2427
+ startedAt?: string | undefined;
2428
+ completedAt?: string | undefined;
2429
+ executionPrincipal?: {
2430
+ type: "serviceAccount" | "user" | "system";
2431
+ id: string;
2432
+ } | undefined;
2433
+ modelId?: string | undefined;
2434
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2435
+ usage?: {
2436
+ inputTokens?: number | undefined;
2437
+ outputTokens?: number | undefined;
2438
+ totalTokens?: number | undefined;
2439
+ reasoningTokens?: number | undefined;
2440
+ cachedInputTokens?: number | undefined;
2441
+ } | undefined;
2442
+ diagnostics?: {
2443
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2444
+ message: string;
2445
+ severity: "error" | "warning";
2446
+ scope: "output";
2447
+ path?: string | undefined;
2448
+ }[] | undefined;
2449
+ };
2450
+ }>;
2451
+ export declare const CancelAgentRunResponseSchema: z.ZodObject<{
2452
+ run: z.ZodObject<{
2453
+ id: z.ZodString;
2454
+ projectId: z.ZodString;
2455
+ threadId: z.ZodString;
2456
+ agentId: z.ZodString;
2457
+ triggerMessageId: z.ZodString;
2458
+ requestedByPrincipal: z.ZodObject<{
2459
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2460
+ id: z.ZodString;
2461
+ }, "strip", z.ZodTypeAny, {
2462
+ type: "serviceAccount" | "user" | "system";
2463
+ id: string;
2464
+ }, {
2465
+ type: "serviceAccount" | "user" | "system";
2466
+ id: string;
2467
+ }>;
2468
+ executionPrincipal: z.ZodOptional<z.ZodObject<{
2469
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2470
+ id: z.ZodString;
2471
+ }, "strip", z.ZodTypeAny, {
2472
+ type: "serviceAccount" | "user" | "system";
2473
+ id: string;
2474
+ }, {
2475
+ type: "serviceAccount" | "user" | "system";
2476
+ id: string;
2477
+ }>>;
2478
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2479
+ modelId: z.ZodOptional<z.ZodString>;
2480
+ finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>>;
2481
+ usage: z.ZodOptional<z.ZodObject<{
2482
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2483
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2484
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2485
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2486
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2487
+ }, "strip", z.ZodTypeAny, {
2488
+ inputTokens?: number | undefined;
2489
+ outputTokens?: number | undefined;
2490
+ totalTokens?: number | undefined;
2491
+ reasoningTokens?: number | undefined;
2492
+ cachedInputTokens?: number | undefined;
2493
+ }, {
2494
+ inputTokens?: number | undefined;
2495
+ outputTokens?: number | undefined;
2496
+ totalTokens?: number | undefined;
2497
+ reasoningTokens?: number | undefined;
2498
+ cachedInputTokens?: number | undefined;
2499
+ }>>;
2500
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2501
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
2502
+ severity: z.ZodEnum<["warning", "error"]>;
2503
+ scope: z.ZodLiteral<"output">;
2504
+ path: z.ZodOptional<z.ZodString>;
2505
+ message: z.ZodString;
2506
+ }, "strip", z.ZodTypeAny, {
2507
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2508
+ message: string;
2509
+ severity: "error" | "warning";
2510
+ scope: "output";
2511
+ path?: string | undefined;
2512
+ }, {
2513
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2514
+ message: string;
2515
+ severity: "error" | "warning";
2516
+ scope: "output";
2517
+ path?: string | undefined;
2518
+ }>, "many">>;
2519
+ error: z.ZodOptional<z.ZodString>;
2520
+ attempt: z.ZodNumber;
2521
+ streamId: z.ZodString;
2522
+ createdAt: z.ZodString;
2523
+ startedAt: z.ZodOptional<z.ZodString>;
2524
+ completedAt: z.ZodOptional<z.ZodString>;
2525
+ }, "strip", z.ZodTypeAny, {
2526
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2527
+ projectId: string;
2528
+ agentId: string;
2529
+ id: string;
2530
+ threadId: string;
2531
+ createdAt: string;
2532
+ triggerMessageId: string;
2533
+ requestedByPrincipal: {
2534
+ type: "serviceAccount" | "user" | "system";
2535
+ id: string;
2536
+ };
2537
+ attempt: number;
2538
+ streamId: string;
2539
+ error?: string | undefined;
2540
+ startedAt?: string | undefined;
2541
+ completedAt?: string | undefined;
2542
+ executionPrincipal?: {
2543
+ type: "serviceAccount" | "user" | "system";
2544
+ id: string;
2545
+ } | undefined;
2546
+ modelId?: string | undefined;
2547
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2548
+ usage?: {
2549
+ inputTokens?: number | undefined;
2550
+ outputTokens?: number | undefined;
2551
+ totalTokens?: number | undefined;
2552
+ reasoningTokens?: number | undefined;
2553
+ cachedInputTokens?: number | undefined;
2554
+ } | undefined;
2555
+ diagnostics?: {
2556
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2557
+ message: string;
2558
+ severity: "error" | "warning";
2559
+ scope: "output";
2560
+ path?: string | undefined;
2561
+ }[] | undefined;
2562
+ }, {
2563
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2564
+ projectId: string;
2565
+ agentId: string;
2566
+ id: string;
2567
+ threadId: string;
2568
+ createdAt: string;
2569
+ triggerMessageId: string;
2570
+ requestedByPrincipal: {
2571
+ type: "serviceAccount" | "user" | "system";
2572
+ id: string;
2573
+ };
2574
+ attempt: number;
2575
+ streamId: string;
2576
+ error?: string | undefined;
2577
+ startedAt?: string | undefined;
2578
+ completedAt?: string | undefined;
2579
+ executionPrincipal?: {
2580
+ type: "serviceAccount" | "user" | "system";
2581
+ id: string;
2582
+ } | undefined;
2583
+ modelId?: string | undefined;
2584
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2585
+ usage?: {
2586
+ inputTokens?: number | undefined;
2587
+ outputTokens?: number | undefined;
2588
+ totalTokens?: number | undefined;
2589
+ reasoningTokens?: number | undefined;
2590
+ cachedInputTokens?: number | undefined;
2591
+ } | undefined;
2592
+ diagnostics?: {
2593
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2594
+ message: string;
2595
+ severity: "error" | "warning";
2596
+ scope: "output";
2597
+ path?: string | undefined;
2598
+ }[] | undefined;
2599
+ }>;
2600
+ }, "strip", z.ZodTypeAny, {
2601
+ run: {
2602
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2603
+ projectId: string;
2604
+ agentId: string;
2605
+ id: string;
2606
+ threadId: string;
2607
+ createdAt: string;
2608
+ triggerMessageId: string;
2609
+ requestedByPrincipal: {
2610
+ type: "serviceAccount" | "user" | "system";
2611
+ id: string;
2612
+ };
2613
+ attempt: number;
2614
+ streamId: string;
2615
+ error?: string | undefined;
2616
+ startedAt?: string | undefined;
2617
+ completedAt?: string | undefined;
2618
+ executionPrincipal?: {
2619
+ type: "serviceAccount" | "user" | "system";
2620
+ id: string;
2621
+ } | undefined;
2622
+ modelId?: string | undefined;
2623
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2624
+ usage?: {
2625
+ inputTokens?: number | undefined;
2626
+ outputTokens?: number | undefined;
2627
+ totalTokens?: number | undefined;
2628
+ reasoningTokens?: number | undefined;
2629
+ cachedInputTokens?: number | undefined;
2630
+ } | undefined;
2631
+ diagnostics?: {
2632
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2633
+ message: string;
2634
+ severity: "error" | "warning";
2635
+ scope: "output";
2636
+ path?: string | undefined;
2637
+ }[] | undefined;
2638
+ };
2639
+ }, {
2640
+ run: {
2641
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2642
+ projectId: string;
2643
+ agentId: string;
2644
+ id: string;
2645
+ threadId: string;
2646
+ createdAt: string;
2647
+ triggerMessageId: string;
2648
+ requestedByPrincipal: {
2649
+ type: "serviceAccount" | "user" | "system";
2650
+ id: string;
2651
+ };
2652
+ attempt: number;
2653
+ streamId: string;
2654
+ error?: string | undefined;
2655
+ startedAt?: string | undefined;
2656
+ completedAt?: string | undefined;
2657
+ executionPrincipal?: {
2658
+ type: "serviceAccount" | "user" | "system";
2659
+ id: string;
2660
+ } | undefined;
2661
+ modelId?: string | undefined;
2662
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2663
+ usage?: {
2664
+ inputTokens?: number | undefined;
2665
+ outputTokens?: number | undefined;
2666
+ totalTokens?: number | undefined;
2667
+ reasoningTokens?: number | undefined;
2668
+ cachedInputTokens?: number | undefined;
2669
+ } | undefined;
2670
+ diagnostics?: {
2671
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2672
+ message: string;
2673
+ severity: "error" | "warning";
2674
+ scope: "output";
2675
+ path?: string | undefined;
2676
+ }[] | undefined;
2677
+ };
2678
+ }>;
2679
+ export declare const RetryAgentRunResponseSchema: z.ZodObject<{
2680
+ run: z.ZodObject<{
2681
+ id: z.ZodString;
2682
+ projectId: z.ZodString;
2683
+ threadId: z.ZodString;
2684
+ agentId: z.ZodString;
2685
+ triggerMessageId: z.ZodString;
2686
+ requestedByPrincipal: z.ZodObject<{
2687
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2688
+ id: z.ZodString;
2689
+ }, "strip", z.ZodTypeAny, {
2690
+ type: "serviceAccount" | "user" | "system";
2691
+ id: string;
2692
+ }, {
2693
+ type: "serviceAccount" | "user" | "system";
2694
+ id: string;
2695
+ }>;
2696
+ executionPrincipal: z.ZodOptional<z.ZodObject<{
2697
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2698
+ id: z.ZodString;
2699
+ }, "strip", z.ZodTypeAny, {
2700
+ type: "serviceAccount" | "user" | "system";
2701
+ id: string;
2702
+ }, {
2703
+ type: "serviceAccount" | "user" | "system";
2704
+ id: string;
2705
+ }>>;
2706
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2707
+ modelId: z.ZodOptional<z.ZodString>;
2708
+ finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>>;
2709
+ usage: z.ZodOptional<z.ZodObject<{
2710
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2711
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2712
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2713
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2714
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2715
+ }, "strip", z.ZodTypeAny, {
2716
+ inputTokens?: number | undefined;
2717
+ outputTokens?: number | undefined;
2718
+ totalTokens?: number | undefined;
2719
+ reasoningTokens?: number | undefined;
2720
+ cachedInputTokens?: number | undefined;
2721
+ }, {
2722
+ inputTokens?: number | undefined;
2723
+ outputTokens?: number | undefined;
2724
+ totalTokens?: number | undefined;
2725
+ reasoningTokens?: number | undefined;
2726
+ cachedInputTokens?: number | undefined;
2727
+ }>>;
2728
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2729
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
2730
+ severity: z.ZodEnum<["warning", "error"]>;
2731
+ scope: z.ZodLiteral<"output">;
2732
+ path: z.ZodOptional<z.ZodString>;
2733
+ message: z.ZodString;
2734
+ }, "strip", z.ZodTypeAny, {
2735
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2736
+ message: string;
2737
+ severity: "error" | "warning";
2738
+ scope: "output";
2739
+ path?: string | undefined;
2740
+ }, {
2741
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2742
+ message: string;
2743
+ severity: "error" | "warning";
2744
+ scope: "output";
2745
+ path?: string | undefined;
2746
+ }>, "many">>;
2747
+ error: z.ZodOptional<z.ZodString>;
2748
+ attempt: z.ZodNumber;
2749
+ streamId: z.ZodString;
2750
+ createdAt: z.ZodString;
2751
+ startedAt: z.ZodOptional<z.ZodString>;
2752
+ completedAt: z.ZodOptional<z.ZodString>;
2753
+ }, "strip", z.ZodTypeAny, {
2754
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2755
+ projectId: string;
2756
+ agentId: string;
2757
+ id: string;
2758
+ threadId: string;
2759
+ createdAt: string;
2760
+ triggerMessageId: string;
2761
+ requestedByPrincipal: {
2762
+ type: "serviceAccount" | "user" | "system";
2763
+ id: string;
2764
+ };
2765
+ attempt: number;
2766
+ streamId: string;
2767
+ error?: string | undefined;
2768
+ startedAt?: string | undefined;
2769
+ completedAt?: string | undefined;
2770
+ executionPrincipal?: {
2771
+ type: "serviceAccount" | "user" | "system";
2772
+ id: string;
2773
+ } | undefined;
2774
+ modelId?: string | undefined;
2775
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2776
+ usage?: {
2777
+ inputTokens?: number | undefined;
2778
+ outputTokens?: number | undefined;
2779
+ totalTokens?: number | undefined;
2780
+ reasoningTokens?: number | undefined;
2781
+ cachedInputTokens?: number | undefined;
2782
+ } | undefined;
2783
+ diagnostics?: {
2784
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2785
+ message: string;
2786
+ severity: "error" | "warning";
2787
+ scope: "output";
2788
+ path?: string | undefined;
2789
+ }[] | undefined;
2790
+ }, {
2791
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2792
+ projectId: string;
2793
+ agentId: string;
2794
+ id: string;
2795
+ threadId: string;
2796
+ createdAt: string;
2797
+ triggerMessageId: string;
2798
+ requestedByPrincipal: {
2799
+ type: "serviceAccount" | "user" | "system";
2800
+ id: string;
2801
+ };
2802
+ attempt: number;
2803
+ streamId: string;
2804
+ error?: string | undefined;
2805
+ startedAt?: string | undefined;
2806
+ completedAt?: string | undefined;
2807
+ executionPrincipal?: {
2808
+ type: "serviceAccount" | "user" | "system";
2809
+ id: string;
2810
+ } | undefined;
2811
+ modelId?: string | undefined;
2812
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2813
+ usage?: {
2814
+ inputTokens?: number | undefined;
2815
+ outputTokens?: number | undefined;
2816
+ totalTokens?: number | undefined;
2817
+ reasoningTokens?: number | undefined;
2818
+ cachedInputTokens?: number | undefined;
2819
+ } | undefined;
2820
+ diagnostics?: {
2821
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2822
+ message: string;
2823
+ severity: "error" | "warning";
2824
+ scope: "output";
2825
+ path?: string | undefined;
2826
+ }[] | undefined;
2827
+ }>;
2828
+ }, "strip", z.ZodTypeAny, {
2829
+ run: {
2830
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2831
+ projectId: string;
2832
+ agentId: string;
2833
+ id: string;
2834
+ threadId: string;
2835
+ createdAt: string;
2836
+ triggerMessageId: string;
2837
+ requestedByPrincipal: {
2838
+ type: "serviceAccount" | "user" | "system";
2839
+ id: string;
2840
+ };
2841
+ attempt: number;
2842
+ streamId: string;
2843
+ error?: string | undefined;
2844
+ startedAt?: string | undefined;
2845
+ completedAt?: string | undefined;
2846
+ executionPrincipal?: {
2847
+ type: "serviceAccount" | "user" | "system";
2848
+ id: string;
2849
+ } | undefined;
2850
+ modelId?: string | undefined;
2851
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2852
+ usage?: {
2853
+ inputTokens?: number | undefined;
2854
+ outputTokens?: number | undefined;
2855
+ totalTokens?: number | undefined;
2856
+ reasoningTokens?: number | undefined;
2857
+ cachedInputTokens?: number | undefined;
2858
+ } | undefined;
2859
+ diagnostics?: {
2860
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2861
+ message: string;
2862
+ severity: "error" | "warning";
2863
+ scope: "output";
2864
+ path?: string | undefined;
2865
+ }[] | undefined;
2866
+ };
2867
+ }, {
2868
+ run: {
2869
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2870
+ projectId: string;
2871
+ agentId: string;
2872
+ id: string;
2873
+ threadId: string;
2874
+ createdAt: string;
2875
+ triggerMessageId: string;
2876
+ requestedByPrincipal: {
2877
+ type: "serviceAccount" | "user" | "system";
2878
+ id: string;
2879
+ };
2880
+ attempt: number;
2881
+ streamId: string;
2882
+ error?: string | undefined;
2883
+ startedAt?: string | undefined;
2884
+ completedAt?: string | undefined;
2885
+ executionPrincipal?: {
2886
+ type: "serviceAccount" | "user" | "system";
2887
+ id: string;
2888
+ } | undefined;
2889
+ modelId?: string | undefined;
2890
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
2891
+ usage?: {
2892
+ inputTokens?: number | undefined;
2893
+ outputTokens?: number | undefined;
2894
+ totalTokens?: number | undefined;
2895
+ reasoningTokens?: number | undefined;
2896
+ cachedInputTokens?: number | undefined;
2897
+ } | undefined;
2898
+ diagnostics?: {
2899
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2900
+ message: string;
2901
+ severity: "error" | "warning";
2902
+ scope: "output";
2903
+ path?: string | undefined;
2904
+ }[] | undefined;
2905
+ };
2906
+ }>;
2907
+ export declare const AgentRunListQuerySchema: z.ZodObject<{
2908
+ status: z.ZodOptional<z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>>;
2909
+ limit: z.ZodOptional<z.ZodString>;
2910
+ offset: z.ZodOptional<z.ZodString>;
2911
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
2912
+ }, "strip", z.ZodTypeAny, {
2913
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
2914
+ limit?: string | undefined;
2915
+ offset?: string | undefined;
2916
+ order?: "asc" | "desc" | undefined;
2917
+ }, {
2918
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
2919
+ limit?: string | undefined;
2920
+ offset?: string | undefined;
2921
+ order?: "asc" | "desc" | undefined;
2922
+ }>;
2923
+ export declare const AgentRunListResponseSchema: z.ZodObject<{
2924
+ runs: z.ZodArray<z.ZodObject<{
2925
+ id: z.ZodString;
2926
+ projectId: z.ZodString;
2927
+ threadId: z.ZodString;
2928
+ agentId: z.ZodString;
2929
+ triggerMessageId: z.ZodString;
2930
+ requestedByPrincipal: z.ZodObject<{
2931
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2932
+ id: z.ZodString;
2933
+ }, "strip", z.ZodTypeAny, {
2934
+ type: "serviceAccount" | "user" | "system";
2935
+ id: string;
2936
+ }, {
2937
+ type: "serviceAccount" | "user" | "system";
2938
+ id: string;
2939
+ }>;
2940
+ executionPrincipal: z.ZodOptional<z.ZodObject<{
2941
+ type: z.ZodEnum<["user", "serviceAccount", "system"]>;
2942
+ id: z.ZodString;
2943
+ }, "strip", z.ZodTypeAny, {
2944
+ type: "serviceAccount" | "user" | "system";
2945
+ id: string;
2946
+ }, {
2947
+ type: "serviceAccount" | "user" | "system";
2948
+ id: string;
2949
+ }>>;
2950
+ status: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
2951
+ modelId: z.ZodOptional<z.ZodString>;
2952
+ finishReason: z.ZodOptional<z.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>>;
2953
+ usage: z.ZodOptional<z.ZodObject<{
2954
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2955
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2956
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2957
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2958
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
2959
+ }, "strip", z.ZodTypeAny, {
2960
+ inputTokens?: number | undefined;
2961
+ outputTokens?: number | undefined;
2962
+ totalTokens?: number | undefined;
2963
+ reasoningTokens?: number | undefined;
2964
+ cachedInputTokens?: number | undefined;
2965
+ }, {
2966
+ inputTokens?: number | undefined;
2967
+ outputTokens?: number | undefined;
2968
+ totalTokens?: number | undefined;
2969
+ reasoningTokens?: number | undefined;
2970
+ cachedInputTokens?: number | undefined;
2971
+ }>>;
2972
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2973
+ code: z.ZodEnum<["output_file_limit_exceeded", "output_file_too_large", "output_budget_exhausted", "output_collection_failed", "output_file_changed", "output_storage_failed"]>;
2974
+ severity: z.ZodEnum<["warning", "error"]>;
2975
+ scope: z.ZodLiteral<"output">;
2976
+ path: z.ZodOptional<z.ZodString>;
2977
+ message: z.ZodString;
2978
+ }, "strip", z.ZodTypeAny, {
2979
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2980
+ message: string;
2981
+ severity: "error" | "warning";
2982
+ scope: "output";
2983
+ path?: string | undefined;
2984
+ }, {
2985
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
2986
+ message: string;
2987
+ severity: "error" | "warning";
2988
+ scope: "output";
2989
+ path?: string | undefined;
2990
+ }>, "many">>;
2991
+ error: z.ZodOptional<z.ZodString>;
2992
+ attempt: z.ZodNumber;
2993
+ streamId: z.ZodString;
2994
+ createdAt: z.ZodString;
2995
+ startedAt: z.ZodOptional<z.ZodString>;
2996
+ completedAt: z.ZodOptional<z.ZodString>;
2997
+ }, "strip", z.ZodTypeAny, {
2998
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2999
+ projectId: string;
3000
+ agentId: string;
3001
+ id: string;
3002
+ threadId: string;
3003
+ createdAt: string;
3004
+ triggerMessageId: string;
3005
+ requestedByPrincipal: {
3006
+ type: "serviceAccount" | "user" | "system";
3007
+ id: string;
3008
+ };
3009
+ attempt: number;
3010
+ streamId: string;
3011
+ error?: string | undefined;
3012
+ startedAt?: string | undefined;
3013
+ completedAt?: string | undefined;
3014
+ executionPrincipal?: {
3015
+ type: "serviceAccount" | "user" | "system";
3016
+ id: string;
3017
+ } | undefined;
3018
+ modelId?: string | undefined;
3019
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3020
+ usage?: {
3021
+ inputTokens?: number | undefined;
3022
+ outputTokens?: number | undefined;
3023
+ totalTokens?: number | undefined;
3024
+ reasoningTokens?: number | undefined;
3025
+ cachedInputTokens?: number | undefined;
3026
+ } | undefined;
3027
+ diagnostics?: {
3028
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
3029
+ message: string;
3030
+ severity: "error" | "warning";
3031
+ scope: "output";
3032
+ path?: string | undefined;
3033
+ }[] | undefined;
3034
+ }, {
3035
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3036
+ projectId: string;
3037
+ agentId: string;
3038
+ id: string;
3039
+ threadId: string;
3040
+ createdAt: string;
3041
+ triggerMessageId: string;
3042
+ requestedByPrincipal: {
3043
+ type: "serviceAccount" | "user" | "system";
3044
+ id: string;
3045
+ };
3046
+ attempt: number;
3047
+ streamId: string;
3048
+ error?: string | undefined;
3049
+ startedAt?: string | undefined;
3050
+ completedAt?: string | undefined;
3051
+ executionPrincipal?: {
3052
+ type: "serviceAccount" | "user" | "system";
3053
+ id: string;
3054
+ } | undefined;
3055
+ modelId?: string | undefined;
3056
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3057
+ usage?: {
3058
+ inputTokens?: number | undefined;
3059
+ outputTokens?: number | undefined;
3060
+ totalTokens?: number | undefined;
3061
+ reasoningTokens?: number | undefined;
3062
+ cachedInputTokens?: number | undefined;
3063
+ } | undefined;
3064
+ diagnostics?: {
3065
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
3066
+ message: string;
3067
+ severity: "error" | "warning";
3068
+ scope: "output";
3069
+ path?: string | undefined;
3070
+ }[] | undefined;
3071
+ }>, "many">;
3072
+ hasMore: z.ZodBoolean;
3073
+ total: z.ZodNumber;
3074
+ }, "strip", z.ZodTypeAny, {
3075
+ runs: {
3076
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3077
+ projectId: string;
3078
+ agentId: string;
3079
+ id: string;
3080
+ threadId: string;
3081
+ createdAt: string;
3082
+ triggerMessageId: string;
3083
+ requestedByPrincipal: {
3084
+ type: "serviceAccount" | "user" | "system";
3085
+ id: string;
3086
+ };
3087
+ attempt: number;
3088
+ streamId: string;
3089
+ error?: string | undefined;
3090
+ startedAt?: string | undefined;
3091
+ completedAt?: string | undefined;
3092
+ executionPrincipal?: {
3093
+ type: "serviceAccount" | "user" | "system";
3094
+ id: string;
3095
+ } | undefined;
3096
+ modelId?: string | undefined;
3097
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3098
+ usage?: {
3099
+ inputTokens?: number | undefined;
3100
+ outputTokens?: number | undefined;
3101
+ totalTokens?: number | undefined;
3102
+ reasoningTokens?: number | undefined;
3103
+ cachedInputTokens?: number | undefined;
3104
+ } | undefined;
3105
+ diagnostics?: {
3106
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
3107
+ message: string;
3108
+ severity: "error" | "warning";
3109
+ scope: "output";
3110
+ path?: string | undefined;
3111
+ }[] | undefined;
3112
+ }[];
3113
+ hasMore: boolean;
3114
+ total: number;
3115
+ }, {
3116
+ runs: {
3117
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3118
+ projectId: string;
3119
+ agentId: string;
3120
+ id: string;
3121
+ threadId: string;
3122
+ createdAt: string;
3123
+ triggerMessageId: string;
3124
+ requestedByPrincipal: {
3125
+ type: "serviceAccount" | "user" | "system";
3126
+ id: string;
3127
+ };
3128
+ attempt: number;
3129
+ streamId: string;
3130
+ error?: string | undefined;
3131
+ startedAt?: string | undefined;
3132
+ completedAt?: string | undefined;
3133
+ executionPrincipal?: {
3134
+ type: "serviceAccount" | "user" | "system";
3135
+ id: string;
3136
+ } | undefined;
3137
+ modelId?: string | undefined;
3138
+ finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
3139
+ usage?: {
3140
+ inputTokens?: number | undefined;
3141
+ outputTokens?: number | undefined;
3142
+ totalTokens?: number | undefined;
3143
+ reasoningTokens?: number | undefined;
3144
+ cachedInputTokens?: number | undefined;
3145
+ } | undefined;
3146
+ diagnostics?: {
3147
+ code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
3148
+ message: string;
3149
+ severity: "error" | "warning";
3150
+ scope: "output";
3151
+ path?: string | undefined;
3152
+ }[] | undefined;
3153
+ }[];
3154
+ hasMore: boolean;
3155
+ total: number;
3156
+ }>;
3157
+ //# sourceMappingURL=agents.d.ts.map