@nylorun/runtime 0.15.1-beta → 0.16.0-beta

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 (220) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +33 -6
  3. package/dist/adapters/execution/restate.d.ts +9 -1
  4. package/dist/adapters/execution/restate.js +64 -5
  5. package/dist/adapters/replication/pgoutput.js +3 -1
  6. package/dist/adapters/sandbox/local.d.ts +10 -0
  7. package/dist/adapters/sandbox/local.js +195 -0
  8. package/dist/adapters/sandbox/virtual.js +36 -1
  9. package/dist/admin-openapi.json +37 -3
  10. package/dist/api/a2a/tasks.js +6 -1
  11. package/dist/api/ag-ui/history.js +6 -1
  12. package/dist/api/ag-ui/routes.js +5 -1
  13. package/dist/api/components.d.ts +2673 -655
  14. package/dist/api/components.js +17 -1
  15. package/dist/api/gate/keys.d.ts +4 -3
  16. package/dist/api/gate/routes.d.ts +19 -3
  17. package/dist/api/gate/routes.js +162 -53
  18. package/dist/api/http/app.js +4 -0
  19. package/dist/api/http/define.d.ts +10 -0
  20. package/dist/api/http/define.js +2 -1
  21. package/dist/api/http/routes/artifacts.d.ts +11 -0
  22. package/dist/api/http/routes/artifacts.js +518 -0
  23. package/dist/api/http/routes/sandboxes.d.ts +9 -0
  24. package/dist/api/http/routes/sandboxes.js +152 -0
  25. package/dist/api/http/routes/sessions.js +3 -1
  26. package/dist/api/http/routes/tenant.js +36 -2
  27. package/dist/artifacts/config.d.ts +23 -0
  28. package/dist/artifacts/config.js +27 -0
  29. package/dist/artifacts/export.d.ts +8 -0
  30. package/dist/artifacts/export.js +205 -0
  31. package/dist/artifacts/files.d.ts +36 -0
  32. package/dist/artifacts/files.js +45 -0
  33. package/dist/artifacts/folders.d.ts +60 -0
  34. package/dist/artifacts/folders.js +209 -0
  35. package/dist/artifacts/links.d.ts +28 -0
  36. package/dist/artifacts/links.js +92 -0
  37. package/dist/artifacts/media-types.d.ts +13 -0
  38. package/dist/artifacts/media-types.js +80 -0
  39. package/dist/artifacts/parts.d.ts +34 -0
  40. package/dist/artifacts/parts.js +38 -0
  41. package/dist/artifacts/service.d.ts +74 -0
  42. package/dist/artifacts/service.js +301 -0
  43. package/dist/artifacts/workspace.d.ts +60 -0
  44. package/dist/artifacts/workspace.js +57 -0
  45. package/dist/artifacts/zip.d.ts +10 -0
  46. package/dist/artifacts/zip.js +126 -0
  47. package/dist/blob/fs.d.ts +13 -0
  48. package/dist/blob/fs.js +194 -0
  49. package/dist/blob/index.d.ts +9 -0
  50. package/dist/blob/index.js +9 -0
  51. package/dist/blob/s3.d.ts +42 -0
  52. package/dist/blob/s3.js +366 -0
  53. package/dist/blob/types.d.ts +108 -0
  54. package/dist/blob/types.js +85 -0
  55. package/dist/core/sandbox-routes.d.ts +2 -2
  56. package/dist/core/sandbox-routes.js +4 -3
  57. package/dist/execution/memory.d.ts +11 -1
  58. package/dist/execution/memory.js +77 -3
  59. package/dist/execution/types.d.ts +54 -1
  60. package/dist/execution/types.js +31 -0
  61. package/dist/gates/contract.d.ts +14 -13
  62. package/dist/gates/contract.js +13 -12
  63. package/dist/gates/egress.d.ts +72 -0
  64. package/dist/gates/egress.js +319 -0
  65. package/dist/gates/handler.d.ts +3 -0
  66. package/dist/gates/handler.js +3 -2
  67. package/dist/gates/http-client.d.ts +3 -2
  68. package/dist/gates/http-client.js +17 -6
  69. package/dist/gates/in-process.d.ts +13 -1
  70. package/dist/gates/in-process.js +11 -0
  71. package/dist/gates/inflight.d.ts +23 -4
  72. package/dist/gates/inflight.js +18 -4
  73. package/dist/gates/model-gate.d.ts +6 -2
  74. package/dist/gates/tool-calls.d.ts +9 -5
  75. package/dist/gates/tool-calls.js +6 -6
  76. package/dist/gates/tool-client.d.ts +9 -2
  77. package/dist/gates/tool-client.js +56 -22
  78. package/dist/gates/tool-contract.d.ts +12 -7
  79. package/dist/gates/tool-contract.js +10 -4
  80. package/dist/gates/tool-gate.d.ts +1 -0
  81. package/dist/harness/calls.d.ts +52 -0
  82. package/dist/harness/calls.js +113 -0
  83. package/dist/harness/executors.d.ts +22 -0
  84. package/dist/harness/executors.js +96 -0
  85. package/dist/harness/main.d.ts +6 -0
  86. package/dist/harness/main.js +103 -0
  87. package/dist/harness/pod.d.ts +21 -0
  88. package/dist/harness/pod.js +119 -0
  89. package/dist/harness/run-tokens.d.ts +18 -0
  90. package/dist/harness/run-tokens.js +15 -0
  91. package/dist/harness/service.d.ts +46 -0
  92. package/dist/harness/service.js +179 -0
  93. package/dist/harness/ws-client.d.ts +43 -0
  94. package/dist/harness/ws-client.js +122 -0
  95. package/dist/harness/ws-port.d.ts +22 -0
  96. package/dist/harness/ws-port.js +78 -0
  97. package/dist/harness-api/in-process.d.ts +24 -0
  98. package/dist/harness-api/in-process.js +119 -0
  99. package/dist/harness-api/record.d.ts +44 -0
  100. package/dist/harness-api/record.js +250 -0
  101. package/dist/harness-api/renew.d.ts +37 -0
  102. package/dist/harness-api/renew.js +77 -0
  103. package/dist/harness-api/server.d.ts +104 -0
  104. package/dist/harness-api/server.js +408 -0
  105. package/dist/harness-api/start.d.ts +36 -0
  106. package/dist/harness-api/start.js +118 -0
  107. package/dist/harness-api/workspace.d.ts +53 -0
  108. package/dist/harness-api/workspace.js +201 -0
  109. package/dist/harness-api/ws-server.d.ts +34 -0
  110. package/dist/harness-api/ws-server.js +227 -0
  111. package/dist/host/app.js +23 -2
  112. package/dist/host/gates.d.ts +27 -2
  113. package/dist/host/gates.js +46 -1
  114. package/dist/host/http.d.ts +4 -1
  115. package/dist/host/http.js +6 -1
  116. package/dist/host/main.js +135 -27
  117. package/dist/host/stack-config.d.ts +101 -1
  118. package/dist/host/stack-config.js +199 -8
  119. package/dist/mcp/snapshot.d.ts +8 -1
  120. package/dist/mcp/snapshot.js +28 -0
  121. package/dist/media.d.ts +5 -24
  122. package/dist/media.js +5 -0
  123. package/dist/model/pi-model.d.ts +6 -2
  124. package/dist/model/pi-model.js +39 -22
  125. package/dist/node/index.d.ts +1 -1
  126. package/dist/node/index.js +1 -1
  127. package/dist/openapi.json +15245 -8850
  128. package/dist/record/index.d.ts +1 -0
  129. package/dist/record/index.js +1 -0
  130. package/dist/record/sandbox.d.ts +25 -0
  131. package/dist/record/sandbox.js +43 -0
  132. package/dist/sandbox/capability.d.ts +3 -0
  133. package/dist/sandbox/capability.js +10 -0
  134. package/dist/sandbox/egress-token.d.ts +26 -0
  135. package/dist/sandbox/egress-token.js +8 -0
  136. package/dist/sandbox/join.d.ts +37 -0
  137. package/dist/sandbox/join.js +165 -0
  138. package/dist/sandbox/manager.d.ts +99 -34
  139. package/dist/sandbox/manager.js +216 -84
  140. package/dist/sandbox/placement.d.ts +27 -0
  141. package/dist/sandbox/placement.js +44 -0
  142. package/dist/sandbox/pods/client.d.ts +90 -0
  143. package/dist/sandbox/pods/client.js +79 -0
  144. package/dist/sandbox/pods/lifecycle.d.ts +91 -0
  145. package/dist/sandbox/pods/lifecycle.js +178 -0
  146. package/dist/sandbox/pods/name.d.ts +1 -0
  147. package/dist/sandbox/pods/name.js +28 -0
  148. package/dist/sandbox/pods/network-gate.d.ts +25 -0
  149. package/dist/sandbox/pods/network-gate.js +71 -0
  150. package/dist/sandbox/pods/reconcile.d.ts +11 -0
  151. package/dist/sandbox/pods/reconcile.js +152 -0
  152. package/dist/sandbox/pods/spec.d.ts +45 -0
  153. package/dist/sandbox/pods/spec.js +62 -0
  154. package/dist/sandbox/records.d.ts +29 -0
  155. package/dist/sandbox/records.js +79 -0
  156. package/dist/sandbox/resolve.d.ts +5 -0
  157. package/dist/sandbox/resolve.js +3 -2
  158. package/dist/sandbox/session-sandbox.js +7 -5
  159. package/dist/sandbox/share.d.ts +11 -0
  160. package/dist/sandbox/share.js +10 -0
  161. package/dist/sandbox/tenant-config.d.ts +16 -1
  162. package/dist/sandbox/tenant-config.js +9 -0
  163. package/dist/sandbox/types.d.ts +29 -1
  164. package/dist/sandbox/types.js +13 -1
  165. package/dist/store/postgres/drizzle/0004_sandbox_resources.sql +20 -0
  166. package/dist/store/postgres/drizzle/0005_artifacts.sql +27 -0
  167. package/dist/store/postgres/drizzle/0006_folder_artifacts.sql +12 -0
  168. package/dist/store/postgres/drizzle/0007_sandbox_pods.sql +14 -0
  169. package/dist/store/postgres/drizzle/meta/_journal.json +28 -0
  170. package/dist/store/postgres/record-writer.d.ts +6 -1
  171. package/dist/store/postgres/record-writer.js +20 -2
  172. package/dist/store/postgres/schema.d.ts +894 -0
  173. package/dist/store/postgres/schema.js +130 -2
  174. package/dist/store/postgres/store.js +289 -4
  175. package/dist/store/types.d.ts +143 -6
  176. package/dist/streams/control.d.ts +2 -0
  177. package/dist/streams/control.js +5 -0
  178. package/dist/streams/types.d.ts +10 -1
  179. package/dist/tenant/advance.js +218 -160
  180. package/dist/tenant/artifact-tool.d.ts +5 -0
  181. package/dist/tenant/artifact-tool.js +119 -0
  182. package/dist/tenant/commands.js +30 -5
  183. package/dist/tenant/context.d.ts +64 -5
  184. package/dist/tenant/effects.d.ts +19 -13
  185. package/dist/tenant/effects.js +5 -382
  186. package/dist/tenant/history.d.ts +13 -23
  187. package/dist/tenant/history.js +14 -62
  188. package/dist/tenant/host-token.d.ts +92 -0
  189. package/dist/tenant/host-token.js +179 -0
  190. package/dist/tenant/module.js +1 -0
  191. package/dist/tenant/paths.d.ts +2 -1
  192. package/dist/tenant/paths.js +3 -1
  193. package/dist/tenant/reset.d.ts +5 -2
  194. package/dist/tenant/reset.js +22 -2
  195. package/dist/tenant/run-grants.d.ts +49 -0
  196. package/dist/tenant/run-grants.js +62 -0
  197. package/dist/tenant/run-token.d.ts +70 -0
  198. package/dist/tenant/run-token.js +138 -0
  199. package/dist/tenant/runtime.d.ts +38 -0
  200. package/dist/tenant/runtime.js +120 -32
  201. package/dist/tenant/sandboxes.d.ts +119 -0
  202. package/dist/tenant/sandboxes.js +551 -0
  203. package/dist/tenant/session.d.ts +2 -13
  204. package/dist/tenant/session.js +4 -28
  205. package/dist/tenant/sessions.d.ts +5 -0
  206. package/dist/tenant/sessions.js +28 -1
  207. package/dist/tenant/status.d.ts +8 -3
  208. package/dist/tenant/status.js +5 -0
  209. package/dist/tenant/streams.d.ts +7 -0
  210. package/dist/tenant/streams.js +24 -1
  211. package/dist/tenant/sweep.js +37 -4
  212. package/dist/tenant/tokens.js +9 -2
  213. package/dist/tenant/types.d.ts +18 -1
  214. package/dist/tenant/worker.d.ts +11 -5
  215. package/dist/tenant/worker.js +12 -6
  216. package/dist/version.d.ts +1 -1
  217. package/dist/version.js +1 -1
  218. package/package.json +13 -10
  219. package/dist/adapters/media.d.ts +0 -24
  220. package/dist/adapters/media.js +0 -111
@@ -17,8 +17,14 @@ export declare const Rejected: z.ZodObject<{
17
17
  limit_exceeded: "limit_exceeded";
18
18
  not_found: "not_found";
19
19
  origin_rejected: "origin_rejected";
20
+ placement_refused: "placement_refused";
20
21
  protocol_unsupported: "protocol_unsupported";
21
22
  request_rejected: "request_rejected";
23
+ sandbox_busy: "sandbox_busy";
24
+ sandbox_expired: "sandbox_expired";
25
+ sandbox_lost: "sandbox_lost";
26
+ sandbox_not_granted: "sandbox_not_granted";
27
+ sandbox_unavailable: "sandbox_unavailable";
22
28
  scope_required: "scope_required";
23
29
  subject_invalid: "subject_invalid";
24
30
  subject_required: "subject_required";
@@ -90,6 +96,14 @@ export declare const AdminStatus: z.ZodObject<{
90
96
  lastError: z.ZodNullable<z.ZodString>;
91
97
  lagBytes: z.ZodOptional<z.ZodNumber>;
92
98
  }, z.core.$strict>>;
99
+ harness: z.ZodOptional<z.ZodObject<{
100
+ mode: z.ZodEnum<{
101
+ "in-process": "in-process";
102
+ remote: "remote";
103
+ }>;
104
+ connected: z.ZodNumber;
105
+ workspace: z.ZodBoolean;
106
+ }, z.core.$strict>>;
93
107
  }, z.core.$strict>;
94
108
  host: z.ZodOptional<z.ZodObject<{
95
109
  hostId: z.ZodString;
@@ -108,6 +122,317 @@ export declare const SandboxToolOutcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
108
122
  code: z.ZodString;
109
123
  message: z.ZodString;
110
124
  }, z.core.$strict>], "kind">;
125
+ export declare const PutSandboxRequest: z.ZodObject<{
126
+ requestId: z.ZodOptional<z.ZodString>;
127
+ kind: z.ZodOptional<z.ZodEnum<{
128
+ pod: "pod";
129
+ virtual: "virtual";
130
+ }>>;
131
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
132
+ image: z.ZodOptional<z.ZodString>;
133
+ network: z.ZodOptional<z.ZodObject<{
134
+ allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
135
+ }, z.core.$strict>>;
136
+ resources: z.ZodOptional<z.ZodObject<{
137
+ cpus: z.ZodOptional<z.ZodNumber>;
138
+ memory: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strict>>;
140
+ storage: z.ZodOptional<z.ZodString>;
141
+ lifecycle: z.ZodOptional<z.ZodObject<{
142
+ ttl: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strict>>;
144
+ }, z.core.$strict>;
145
+ export declare const SandboxView: z.ZodObject<{
146
+ id: z.ZodString;
147
+ kind: z.ZodEnum<{
148
+ pod: "pod";
149
+ virtual: "virtual";
150
+ }>;
151
+ labels: z.ZodRecord<z.ZodString, z.ZodString>;
152
+ spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
153
+ state: z.ZodEnum<{
154
+ creating: "creating";
155
+ ready: "ready";
156
+ running: "running";
157
+ stopped: "stopped";
158
+ }>;
159
+ pod: z.ZodOptional<z.ZodObject<{
160
+ desired: z.ZodEnum<{
161
+ deleted: "deleted";
162
+ running: "running";
163
+ suspended: "suspended";
164
+ }>;
165
+ observed: z.ZodEnum<{
166
+ creating: "creating";
167
+ deleting: "deleting";
168
+ expired: "expired";
169
+ failed: "failed";
170
+ lost: "lost";
171
+ running: "running";
172
+ suspended: "suspended";
173
+ }>;
174
+ volumeGeneration: z.ZodNumber;
175
+ hostEpoch: z.ZodNumber;
176
+ expiresAt: z.ZodOptional<z.ZodString>;
177
+ reason: z.ZodOptional<z.ZodString>;
178
+ }, z.core.$strict>>;
179
+ sessions: z.ZodArray<z.ZodObject<{
180
+ id: z.ZodString;
181
+ activeTurnId: z.ZodNullable<z.ZodString>;
182
+ }, z.core.$strict>>;
183
+ createdAt: z.ZodString;
184
+ updatedAt: z.ZodString;
185
+ }, z.core.$strict>;
186
+ export declare const ListSandboxesResponse: z.ZodObject<{
187
+ sandboxes: z.ZodArray<z.ZodObject<{
188
+ id: z.ZodString;
189
+ kind: z.ZodEnum<{
190
+ pod: "pod";
191
+ virtual: "virtual";
192
+ }>;
193
+ labels: z.ZodRecord<z.ZodString, z.ZodString>;
194
+ spec: z.ZodRecord<z.ZodString, z.ZodUnknown>;
195
+ state: z.ZodEnum<{
196
+ creating: "creating";
197
+ ready: "ready";
198
+ running: "running";
199
+ stopped: "stopped";
200
+ }>;
201
+ pod: z.ZodOptional<z.ZodObject<{
202
+ desired: z.ZodEnum<{
203
+ deleted: "deleted";
204
+ running: "running";
205
+ suspended: "suspended";
206
+ }>;
207
+ observed: z.ZodEnum<{
208
+ creating: "creating";
209
+ deleting: "deleting";
210
+ expired: "expired";
211
+ failed: "failed";
212
+ lost: "lost";
213
+ running: "running";
214
+ suspended: "suspended";
215
+ }>;
216
+ volumeGeneration: z.ZodNumber;
217
+ hostEpoch: z.ZodNumber;
218
+ expiresAt: z.ZodOptional<z.ZodString>;
219
+ reason: z.ZodOptional<z.ZodString>;
220
+ }, z.core.$strict>>;
221
+ sessions: z.ZodArray<z.ZodObject<{
222
+ id: z.ZodString;
223
+ activeTurnId: z.ZodNullable<z.ZodString>;
224
+ }, z.core.$strict>>;
225
+ createdAt: z.ZodString;
226
+ updatedAt: z.ZodString;
227
+ }, z.core.$strict>>;
228
+ }, z.core.$strict>;
229
+ export declare const DeleteSandboxResponse: z.ZodObject<{
230
+ id: z.ZodString;
231
+ deleted: z.ZodBoolean;
232
+ }, z.core.$strict>;
233
+ export declare const ListSandboxEventsResponse: z.ZodObject<{
234
+ events: z.ZodArray<z.ZodObject<{
235
+ schema: z.ZodLiteral<"nylorun.sandbox-event/1">;
236
+ eventId: z.ZodString;
237
+ tenantId: z.ZodString;
238
+ sandboxId: z.ZodString;
239
+ seq: z.ZodNumber;
240
+ time: z.ZodString;
241
+ type: z.ZodEnum<{
242
+ "sandbox.attached": "sandbox.attached";
243
+ "sandbox.created": "sandbox.created";
244
+ "sandbox.deleted": "sandbox.deleted";
245
+ "sandbox.detached": "sandbox.detached";
246
+ "sandbox.expired": "sandbox.expired";
247
+ "sandbox.failed": "sandbox.failed";
248
+ "sandbox.lost": "sandbox.lost";
249
+ "sandbox.relaunched": "sandbox.relaunched";
250
+ "sandbox.reset": "sandbox.reset";
251
+ "sandbox.running": "sandbox.running";
252
+ "sandbox.suspended": "sandbox.suspended";
253
+ }>;
254
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
255
+ }, z.core.$strict>>;
256
+ }, z.core.$strict>;
257
+ export declare const ArtifactVersionView: z.ZodObject<{
258
+ version: z.ZodNumber;
259
+ size: z.ZodNumber;
260
+ sha256: z.ZodString;
261
+ contentType: z.ZodString;
262
+ source: z.ZodEnum<{
263
+ engine: "engine";
264
+ export: "export";
265
+ upload: "upload";
266
+ }>;
267
+ createdAt: z.ZodString;
268
+ }, z.core.$strict>;
269
+ export declare const ArtifactView: z.ZodObject<{
270
+ artifactId: z.ZodString;
271
+ kind: z.ZodEnum<{
272
+ file: "file";
273
+ folder: "folder";
274
+ }>;
275
+ name: z.ZodString;
276
+ contentType: z.ZodString;
277
+ sessionId: z.ZodOptional<z.ZodString>;
278
+ latestVersion: z.ZodNumber;
279
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
280
+ createdAt: z.ZodString;
281
+ updatedAt: z.ZodString;
282
+ versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
283
+ version: z.ZodNumber;
284
+ size: z.ZodNumber;
285
+ sha256: z.ZodString;
286
+ contentType: z.ZodString;
287
+ source: z.ZodEnum<{
288
+ engine: "engine";
289
+ export: "export";
290
+ upload: "upload";
291
+ }>;
292
+ createdAt: z.ZodString;
293
+ }, z.core.$strict>>>;
294
+ }, z.core.$strict>;
295
+ export declare const ListArtifactsResponse: z.ZodObject<{
296
+ artifacts: z.ZodArray<z.ZodObject<{
297
+ artifactId: z.ZodString;
298
+ kind: z.ZodEnum<{
299
+ file: "file";
300
+ folder: "folder";
301
+ }>;
302
+ name: z.ZodString;
303
+ contentType: z.ZodString;
304
+ sessionId: z.ZodOptional<z.ZodString>;
305
+ latestVersion: z.ZodNumber;
306
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
307
+ createdAt: z.ZodString;
308
+ updatedAt: z.ZodString;
309
+ versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
310
+ version: z.ZodNumber;
311
+ size: z.ZodNumber;
312
+ sha256: z.ZodString;
313
+ contentType: z.ZodString;
314
+ source: z.ZodEnum<{
315
+ engine: "engine";
316
+ export: "export";
317
+ upload: "upload";
318
+ }>;
319
+ createdAt: z.ZodString;
320
+ }, z.core.$strict>>>;
321
+ }, z.core.$strict>>;
322
+ }, z.core.$strict>;
323
+ export declare const UploadArtifactResponse: z.ZodObject<{
324
+ artifact: z.ZodObject<{
325
+ artifactId: z.ZodString;
326
+ kind: z.ZodEnum<{
327
+ file: "file";
328
+ folder: "folder";
329
+ }>;
330
+ name: z.ZodString;
331
+ contentType: z.ZodString;
332
+ sessionId: z.ZodOptional<z.ZodString>;
333
+ latestVersion: z.ZodNumber;
334
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
335
+ createdAt: z.ZodString;
336
+ updatedAt: z.ZodString;
337
+ versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
+ version: z.ZodNumber;
339
+ size: z.ZodNumber;
340
+ sha256: z.ZodString;
341
+ contentType: z.ZodString;
342
+ source: z.ZodEnum<{
343
+ engine: "engine";
344
+ export: "export";
345
+ upload: "upload";
346
+ }>;
347
+ createdAt: z.ZodString;
348
+ }, z.core.$strict>>>;
349
+ }, z.core.$strict>;
350
+ version: z.ZodObject<{
351
+ version: z.ZodNumber;
352
+ size: z.ZodNumber;
353
+ sha256: z.ZodString;
354
+ contentType: z.ZodString;
355
+ source: z.ZodEnum<{
356
+ engine: "engine";
357
+ export: "export";
358
+ upload: "upload";
359
+ }>;
360
+ createdAt: z.ZodString;
361
+ }, z.core.$strict>;
362
+ }, z.core.$strict>;
363
+ export declare const DeleteArtifactResponse: z.ZodObject<{
364
+ artifactId: z.ZodString;
365
+ deleted: z.ZodBoolean;
366
+ }, z.core.$strict>;
367
+ export declare const CreateArtifactLinkRequest: z.ZodObject<{
368
+ requestId: z.ZodOptional<z.ZodString>;
369
+ version: z.ZodOptional<z.ZodNumber>;
370
+ expiresIn: z.ZodOptional<z.ZodNumber>;
371
+ file: z.ZodOptional<z.ZodString>;
372
+ }, z.core.$strict>;
373
+ export declare const ArtifactLink: z.ZodObject<{
374
+ path: z.ZodString;
375
+ artifactId: z.ZodString;
376
+ version: z.ZodNumber;
377
+ file: z.ZodOptional<z.ZodString>;
378
+ expiresAt: z.ZodString;
379
+ }, z.core.$strict>;
380
+ export declare const PutTenantArtifactsRequest: z.ZodObject<{
381
+ limits: z.ZodOptional<z.ZodObject<{
382
+ fileBytes: z.ZodOptional<z.ZodNumber>;
383
+ totalBytes: z.ZodOptional<z.ZodNumber>;
384
+ }, z.core.$strict>>;
385
+ requestId: z.ZodOptional<z.ZodString>;
386
+ }, z.core.$strict>;
387
+ export declare const TenantArtifactsView: z.ZodObject<{
388
+ limits: z.ZodObject<{
389
+ fileBytes: z.ZodNumber;
390
+ totalBytes: z.ZodNumber;
391
+ }, z.core.$strict>;
392
+ usedBytes: z.ZodNumber;
393
+ }, z.core.$strict>;
394
+ export declare const ArtifactTree: z.ZodObject<{
395
+ artifactId: z.ZodString;
396
+ version: z.ZodNumber;
397
+ entries: z.ZodArray<z.ZodObject<{
398
+ path: z.ZodString;
399
+ size: z.ZodNumber;
400
+ sha256: z.ZodString;
401
+ contentType: z.ZodString;
402
+ }, z.core.$strict>>;
403
+ }, z.core.$strict>;
404
+ export declare const ArtifactDiff: z.ZodObject<{
405
+ artifactId: z.ZodString;
406
+ from: z.ZodOptional<z.ZodNumber>;
407
+ to: z.ZodNumber;
408
+ added: z.ZodArray<z.ZodObject<{
409
+ path: z.ZodString;
410
+ size: z.ZodNumber;
411
+ sha256: z.ZodString;
412
+ contentType: z.ZodString;
413
+ }, z.core.$strict>>;
414
+ removed: z.ZodArray<z.ZodObject<{
415
+ path: z.ZodString;
416
+ size: z.ZodNumber;
417
+ sha256: z.ZodString;
418
+ contentType: z.ZodString;
419
+ }, z.core.$strict>>;
420
+ changed: z.ZodArray<z.ZodObject<{
421
+ path: z.ZodString;
422
+ from: z.ZodObject<{
423
+ path: z.ZodString;
424
+ size: z.ZodNumber;
425
+ sha256: z.ZodString;
426
+ contentType: z.ZodString;
427
+ }, z.core.$strict>;
428
+ to: z.ZodObject<{
429
+ path: z.ZodString;
430
+ size: z.ZodNumber;
431
+ sha256: z.ZodString;
432
+ contentType: z.ZodString;
433
+ }, z.core.$strict>;
434
+ }, z.core.$strict>>;
435
+ }, z.core.$strict>;
111
436
  export declare const PutEndpointsRequest: z.ZodObject<{
112
437
  endpoints: z.ZodArray<z.ZodObject<{
113
438
  agentId: z.ZodString;
@@ -171,6 +496,19 @@ export declare const SessionCommand: z.ZodUnion<readonly [z.ZodUnion<readonly [z
171
496
  type: z.ZodLiteral<"message">;
172
497
  manifest: z.ZodOptional<z.ZodType<import("@nylorun/core/contracts").AgentManifest, unknown, z.core.$ZodTypeInternals<import("@nylorun/core/contracts").AgentManifest, unknown>>>;
173
498
  data: z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>;
499
+ }, z.core.$strict>, z.ZodObject<{
500
+ requestId: z.ZodString;
501
+ idempotencyKey: z.ZodString;
502
+ type: z.ZodLiteral<"message">;
503
+ manifest: z.ZodOptional<z.ZodType<import("@nylorun/core/contracts").AgentManifest, unknown, z.core.$ZodTypeInternals<import("@nylorun/core/contracts").AgentManifest, unknown>>>;
504
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
505
+ type: z.ZodLiteral<"text">;
506
+ text: z.ZodString;
507
+ }, z.core.$strict>, z.ZodObject<{
508
+ type: z.ZodLiteral<"file">;
509
+ artifactId: z.ZodString;
510
+ version: z.ZodOptional<z.ZodNumber>;
511
+ }, z.core.$strict>], "type">>;
174
512
  }, z.core.$strict>]>, z.ZodObject<{
175
513
  requestId: z.ZodString;
176
514
  idempotencyKey: z.ZodString;
@@ -256,6 +594,8 @@ export declare const PutSessionRequest: z.ZodObject<{
256
594
  credentialId: z.ZodString;
257
595
  }, z.core.$strict>>>;
258
596
  sandbox: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
597
+ id: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
598
+ }, z.core.$strict>, z.ZodObject<{
259
599
  session: z.ZodString;
260
600
  }, z.core.$strict>, z.ZodObject<{
261
601
  image: z.ZodOptional<z.ZodString>;
@@ -292,10 +632,12 @@ export declare const SessionView: z.ZodObject<{
292
632
  credentialId: z.ZodString;
293
633
  }, z.core.$strict>>;
294
634
  sandboxOwnerId: z.ZodNullable<z.ZodString>;
635
+ sandboxId: z.ZodOptional<z.ZodString>;
295
636
  sandbox: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
296
637
  sandboxSource: z.ZodOptional<z.ZodEnum<{
297
638
  default: "default";
298
639
  inline: "inline";
640
+ sandbox: "sandbox";
299
641
  shared: "shared";
300
642
  }>>;
301
643
  mcpSnapshot: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -895,13 +1237,26 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
895
1237
  metadata: "metadata";
896
1238
  }>;
897
1239
  } & {
898
- type: z.ZodLiteral<"command.approve">;
1240
+ type: z.ZodLiteral<"artifact.created">;
899
1241
  payload: z.ZodObject<{
900
- requestId: z.ZodString;
901
- idempotencyKey: z.ZodString;
902
- type: z.ZodLiteral<"approve">;
903
- interactionId: z.ZodString;
904
- approved: z.ZodBoolean;
1242
+ artifactId: z.ZodString;
1243
+ kind: z.ZodEnum<{
1244
+ file: "file";
1245
+ folder: "folder";
1246
+ }>;
1247
+ name: z.ZodString;
1248
+ contentType: z.ZodString;
1249
+ version: z.ZodNumber;
1250
+ size: z.ZodNumber;
1251
+ sha256: z.ZodString;
1252
+ source: z.ZodEnum<{
1253
+ engine: "engine";
1254
+ export: "export";
1255
+ upload: "upload";
1256
+ }>;
1257
+ callId: z.ZodOptional<z.ZodString>;
1258
+ fileCount: z.ZodOptional<z.ZodNumber>;
1259
+ claimed: z.ZodOptional<z.ZodBoolean>;
905
1260
  }, z.core.$loose>;
906
1261
  }, z.core.$strip> | z.ZodObject<{
907
1262
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -957,14 +1312,10 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
957
1312
  metadata: "metadata";
958
1313
  }>;
959
1314
  } & {
960
- type: z.ZodLiteral<"command.message">;
1315
+ type: z.ZodLiteral<"artifact.deleted">;
961
1316
  payload: z.ZodObject<{
962
- requestId: z.ZodString;
963
- idempotencyKey: z.ZodString;
964
- type: z.ZodLiteral<"message">;
965
- content: z.ZodOptional<z.ZodString>;
966
- data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
967
- manifest: z.ZodOptional<z.ZodUnknown>;
1317
+ artifactId: z.ZodString;
1318
+ name: z.ZodString;
968
1319
  }, z.core.$loose>;
969
1320
  }, z.core.$strip> | z.ZodObject<{
970
1321
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1020,13 +1371,10 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1020
1371
  metadata: "metadata";
1021
1372
  }>;
1022
1373
  } & {
1023
- type: z.ZodLiteral<"command.respond">;
1374
+ type: z.ZodLiteral<"artifact.export.failed">;
1024
1375
  payload: z.ZodObject<{
1025
- requestId: z.ZodString;
1026
- idempotencyKey: z.ZodString;
1027
- type: z.ZodLiteral<"respond">;
1028
- interactionId: z.ZodString;
1029
- value: z.ZodUnknown;
1376
+ name: z.ZodString;
1377
+ message: z.ZodString;
1030
1378
  }, z.core.$loose>;
1031
1379
  }, z.core.$strip> | z.ZodObject<{
1032
1380
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1082,20 +1430,18 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1082
1430
  metadata: "metadata";
1083
1431
  }>;
1084
1432
  } & {
1085
- type: z.ZodLiteral<"context.compacted">;
1433
+ type: z.ZodLiteral<"artifact.export.skipped">;
1086
1434
  payload: z.ZodObject<{
1087
- agent: z.ZodOptional<z.ZodObject<{
1088
- id: z.ZodString;
1089
- path: z.ZodString;
1090
- delegationId: z.ZodOptional<z.ZodString>;
1091
- }, z.core.$loose>>;
1092
- invocationId: z.ZodOptional<z.ZodString>;
1093
- trigger: z.ZodEnum<{
1094
- overflow: "overflow";
1095
- threshold: "threshold";
1435
+ name: z.ZodString;
1436
+ reason: z.ZodEnum<{
1437
+ file_too_large: "file_too_large";
1438
+ tenant_total: "tenant_total";
1439
+ too_large: "too_large";
1440
+ too_many_files: "too_many_files";
1096
1441
  }>;
1097
- tokensBefore: z.ZodNumber;
1098
- tokensAfter: z.ZodNumber;
1442
+ message: z.ZodString;
1443
+ limit: z.ZodOptional<z.ZodNumber>;
1444
+ path: z.ZodOptional<z.ZodString>;
1099
1445
  }, z.core.$loose>;
1100
1446
  }, z.core.$strip> | z.ZodObject<{
1101
1447
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1151,14 +1497,26 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1151
1497
  metadata: "metadata";
1152
1498
  }>;
1153
1499
  } & {
1154
- type: z.ZodLiteral<"delegation.completed">;
1500
+ type: z.ZodLiteral<"artifact.version.created">;
1155
1501
  payload: z.ZodObject<{
1156
- agent: z.ZodObject<{
1157
- id: z.ZodString;
1158
- path: z.ZodString;
1159
- delegationId: z.ZodOptional<z.ZodString>;
1160
- }, z.core.$loose>;
1502
+ artifactId: z.ZodString;
1503
+ kind: z.ZodEnum<{
1504
+ file: "file";
1505
+ folder: "folder";
1506
+ }>;
1507
+ name: z.ZodString;
1508
+ contentType: z.ZodString;
1509
+ version: z.ZodNumber;
1510
+ size: z.ZodNumber;
1511
+ sha256: z.ZodString;
1512
+ source: z.ZodEnum<{
1513
+ engine: "engine";
1514
+ export: "export";
1515
+ upload: "upload";
1516
+ }>;
1161
1517
  callId: z.ZodOptional<z.ZodString>;
1518
+ fileCount: z.ZodOptional<z.ZodNumber>;
1519
+ claimed: z.ZodOptional<z.ZodBoolean>;
1162
1520
  }, z.core.$loose>;
1163
1521
  }, z.core.$strip> | z.ZodObject<{
1164
1522
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1214,14 +1572,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1214
1572
  metadata: "metadata";
1215
1573
  }>;
1216
1574
  } & {
1217
- type: z.ZodLiteral<"delegation.started">;
1575
+ type: z.ZodLiteral<"command.approve">;
1218
1576
  payload: z.ZodObject<{
1219
- agent: z.ZodObject<{
1220
- id: z.ZodString;
1221
- path: z.ZodString;
1222
- delegationId: z.ZodOptional<z.ZodString>;
1223
- }, z.core.$loose>;
1224
- callId: z.ZodOptional<z.ZodString>;
1577
+ requestId: z.ZodString;
1578
+ idempotencyKey: z.ZodString;
1579
+ type: z.ZodLiteral<"approve">;
1580
+ interactionId: z.ZodString;
1581
+ approved: z.ZodBoolean;
1225
1582
  }, z.core.$loose>;
1226
1583
  }, z.core.$strip> | z.ZodObject<{
1227
1584
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1277,10 +1634,22 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1277
1634
  metadata: "metadata";
1278
1635
  }>;
1279
1636
  } & {
1280
- type: z.ZodLiteral<"effect.uncertain">;
1637
+ type: z.ZodLiteral<"command.message">;
1281
1638
  payload: z.ZodObject<{
1282
- effectId: z.ZodString;
1283
- message: z.ZodOptional<z.ZodString>;
1639
+ requestId: z.ZodString;
1640
+ idempotencyKey: z.ZodString;
1641
+ type: z.ZodLiteral<"message">;
1642
+ content: z.ZodOptional<z.ZodString>;
1643
+ data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
1644
+ parts: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1645
+ type: z.ZodLiteral<"text">;
1646
+ text: z.ZodString;
1647
+ }, z.core.$strict>, z.ZodObject<{
1648
+ type: z.ZodLiteral<"file">;
1649
+ artifactId: z.ZodString;
1650
+ version: z.ZodOptional<z.ZodNumber>;
1651
+ }, z.core.$strict>], "type">>>;
1652
+ manifest: z.ZodOptional<z.ZodUnknown>;
1284
1653
  }, z.core.$loose>;
1285
1654
  }, z.core.$strip> | z.ZodObject<{
1286
1655
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1336,15 +1705,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1336
1705
  metadata: "metadata";
1337
1706
  }>;
1338
1707
  } & {
1339
- type: z.ZodLiteral<"loop.decided">;
1708
+ type: z.ZodLiteral<"command.respond">;
1340
1709
  payload: z.ZodObject<{
1341
- path: z.ZodString;
1342
- n: z.ZodNumber;
1343
- next: z.ZodEnum<{
1344
- input: "input";
1345
- output: "output";
1346
- }>;
1347
- patched: z.ZodBoolean;
1710
+ requestId: z.ZodString;
1711
+ idempotencyKey: z.ZodString;
1712
+ type: z.ZodLiteral<"respond">;
1713
+ interactionId: z.ZodString;
1714
+ value: z.ZodUnknown;
1348
1715
  }, z.core.$loose>;
1349
1716
  }, z.core.$strip> | z.ZodObject<{
1350
1717
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1400,13 +1767,20 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1400
1767
  metadata: "metadata";
1401
1768
  }>;
1402
1769
  } & {
1403
- type: z.ZodLiteral<"loop.iteration">;
1770
+ type: z.ZodLiteral<"context.compacted">;
1404
1771
  payload: z.ZodObject<{
1405
- path: z.ZodString;
1406
- n: z.ZodNumber;
1407
- sessionId: z.ZodOptional<z.ZodString>;
1408
- turnId: z.ZodOptional<z.ZodString>;
1409
- manifestHash: z.ZodOptional<z.ZodString>;
1772
+ agent: z.ZodOptional<z.ZodObject<{
1773
+ id: z.ZodString;
1774
+ path: z.ZodString;
1775
+ delegationId: z.ZodOptional<z.ZodString>;
1776
+ }, z.core.$loose>>;
1777
+ invocationId: z.ZodOptional<z.ZodString>;
1778
+ trigger: z.ZodEnum<{
1779
+ overflow: "overflow";
1780
+ threshold: "threshold";
1781
+ }>;
1782
+ tokensBefore: z.ZodNumber;
1783
+ tokensAfter: z.ZodNumber;
1410
1784
  }, z.core.$loose>;
1411
1785
  }, z.core.$strip> | z.ZodObject<{
1412
1786
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1462,13 +1836,14 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1462
1836
  metadata: "metadata";
1463
1837
  }>;
1464
1838
  } & {
1465
- type: z.ZodLiteral<"loop.verified">;
1839
+ type: z.ZodLiteral<"delegation.completed">;
1466
1840
  payload: z.ZodObject<{
1467
- path: z.ZodString;
1468
- n: z.ZodNumber;
1469
- pass: z.ZodBoolean;
1470
- feedback: z.ZodOptional<z.ZodString>;
1471
- data: z.ZodOptional<z.ZodUnknown>;
1841
+ agent: z.ZodObject<{
1842
+ id: z.ZodString;
1843
+ path: z.ZodString;
1844
+ delegationId: z.ZodOptional<z.ZodString>;
1845
+ }, z.core.$loose>;
1846
+ callId: z.ZodOptional<z.ZodString>;
1472
1847
  }, z.core.$loose>;
1473
1848
  }, z.core.$strip> | z.ZodObject<{
1474
1849
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1524,26 +1899,14 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1524
1899
  metadata: "metadata";
1525
1900
  }>;
1526
1901
  } & {
1527
- type: z.ZodLiteral<"message.assistant">;
1902
+ type: z.ZodLiteral<"delegation.started">;
1528
1903
  payload: z.ZodObject<{
1529
- agent: z.ZodOptional<z.ZodObject<{
1904
+ agent: z.ZodObject<{
1530
1905
  id: z.ZodString;
1531
1906
  path: z.ZodString;
1532
1907
  delegationId: z.ZodOptional<z.ZodString>;
1533
- }, z.core.$loose>>;
1534
- invocationId: z.ZodString;
1535
- text: z.ZodString;
1536
- model: z.ZodOptional<z.ZodObject<{
1537
- provider: z.ZodString;
1538
- model: z.ZodString;
1539
- }, z.core.$loose>>;
1540
- finishReason: z.ZodOptional<z.ZodString>;
1541
- usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1542
- toolCalls: z.ZodArray<z.ZodObject<{
1543
- callId: z.ZodString;
1544
- name: z.ZodString;
1545
- input: z.ZodUnknown;
1546
- }, z.core.$loose>>;
1908
+ }, z.core.$loose>;
1909
+ callId: z.ZodOptional<z.ZodString>;
1547
1910
  }, z.core.$loose>;
1548
1911
  }, z.core.$strip> | z.ZodObject<{
1549
1912
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1599,17 +1962,10 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1599
1962
  metadata: "metadata";
1600
1963
  }>;
1601
1964
  } & {
1602
- type: z.ZodLiteral<"model.failed">;
1965
+ type: z.ZodLiteral<"effect.uncertain">;
1603
1966
  payload: z.ZodObject<{
1604
- agent: z.ZodOptional<z.ZodObject<{
1605
- id: z.ZodString;
1606
- path: z.ZodString;
1607
- delegationId: z.ZodOptional<z.ZodString>;
1608
- }, z.core.$loose>>;
1609
- invocationId: z.ZodOptional<z.ZodString>;
1610
- code: z.ZodString;
1611
- message: z.ZodString;
1612
- retryable: z.ZodBoolean;
1967
+ effectId: z.ZodString;
1968
+ message: z.ZodOptional<z.ZodString>;
1613
1969
  }, z.core.$loose>;
1614
1970
  }, z.core.$strip> | z.ZodObject<{
1615
1971
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1665,12 +2021,15 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1665
2021
  metadata: "metadata";
1666
2022
  }>;
1667
2023
  } & {
1668
- type: z.ZodLiteral<"node.agent">;
2024
+ type: z.ZodLiteral<"loop.decided">;
1669
2025
  payload: z.ZodObject<{
1670
2026
  path: z.ZodString;
1671
- iterations: z.ZodOptional<z.ZodString>;
1672
- sessionId: z.ZodString;
1673
- turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2027
+ n: z.ZodNumber;
2028
+ next: z.ZodEnum<{
2029
+ input: "input";
2030
+ output: "output";
2031
+ }>;
2032
+ patched: z.ZodBoolean;
1674
2033
  }, z.core.$loose>;
1675
2034
  }, z.core.$strip> | z.ZodObject<{
1676
2035
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1726,12 +2085,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1726
2085
  metadata: "metadata";
1727
2086
  }>;
1728
2087
  } & {
1729
- type: z.ZodLiteral<"node.started">;
2088
+ type: z.ZodLiteral<"loop.iteration">;
1730
2089
  payload: z.ZodObject<{
1731
2090
  path: z.ZodString;
1732
- kind: z.ZodString;
1733
- key: z.ZodString;
1734
- iterations: z.ZodOptional<z.ZodString>;
2091
+ n: z.ZodNumber;
2092
+ sessionId: z.ZodOptional<z.ZodString>;
2093
+ turnId: z.ZodOptional<z.ZodString>;
2094
+ manifestHash: z.ZodOptional<z.ZodString>;
1735
2095
  }, z.core.$loose>;
1736
2096
  }, z.core.$strip> | z.ZodObject<{
1737
2097
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1787,13 +2147,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1787
2147
  metadata: "metadata";
1788
2148
  }>;
1789
2149
  } & {
1790
- type: z.ZodLiteral<"sandbox.exec">;
2150
+ type: z.ZodLiteral<"loop.verified">;
1791
2151
  payload: z.ZodObject<{
1792
- tool: z.ZodString;
1793
- command: z.ZodOptional<z.ZodString>;
1794
- outcome: z.ZodString;
1795
- code: z.ZodOptional<z.ZodString>;
1796
- durationMs: z.ZodNumber;
2152
+ path: z.ZodString;
2153
+ n: z.ZodNumber;
2154
+ pass: z.ZodBoolean;
2155
+ feedback: z.ZodOptional<z.ZodString>;
2156
+ data: z.ZodOptional<z.ZodUnknown>;
1797
2157
  }, z.core.$loose>;
1798
2158
  }, z.core.$strip> | z.ZodObject<{
1799
2159
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1849,21 +2209,26 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1849
2209
  metadata: "metadata";
1850
2210
  }>;
1851
2211
  } & {
1852
- type: z.ZodLiteral<"sandbox.state">;
2212
+ type: z.ZodLiteral<"message.assistant">;
1853
2213
  payload: z.ZodObject<{
1854
- state: z.ZodEnum<{
1855
- creating: "creating";
1856
- running: "running";
1857
- stopped: "stopped";
1858
- }>;
1859
- backend: z.ZodString;
1860
- isolation: z.ZodOptional<z.ZodString>;
1861
- image: z.ZodOptional<z.ZodString>;
1862
- network: z.ZodOptional<z.ZodUnknown>;
1863
- reattach: z.ZodOptional<z.ZodBoolean>;
1864
- lost: z.ZodOptional<z.ZodBoolean>;
1865
- note: z.ZodOptional<z.ZodString>;
1866
- error: z.ZodOptional<z.ZodString>;
2214
+ agent: z.ZodOptional<z.ZodObject<{
2215
+ id: z.ZodString;
2216
+ path: z.ZodString;
2217
+ delegationId: z.ZodOptional<z.ZodString>;
2218
+ }, z.core.$loose>>;
2219
+ invocationId: z.ZodString;
2220
+ text: z.ZodString;
2221
+ model: z.ZodOptional<z.ZodObject<{
2222
+ provider: z.ZodString;
2223
+ model: z.ZodString;
2224
+ }, z.core.$loose>>;
2225
+ finishReason: z.ZodOptional<z.ZodString>;
2226
+ usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2227
+ toolCalls: z.ZodArray<z.ZodObject<{
2228
+ callId: z.ZodString;
2229
+ name: z.ZodString;
2230
+ input: z.ZodUnknown;
2231
+ }, z.core.$loose>>;
1867
2232
  }, z.core.$loose>;
1868
2233
  }, z.core.$strip> | z.ZodObject<{
1869
2234
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1919,22 +2284,17 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1919
2284
  metadata: "metadata";
1920
2285
  }>;
1921
2286
  } & {
1922
- type: z.ZodLiteral<"tool.completed">;
2287
+ type: z.ZodLiteral<"model.failed">;
1923
2288
  payload: z.ZodObject<{
1924
2289
  agent: z.ZodOptional<z.ZodObject<{
1925
2290
  id: z.ZodString;
1926
2291
  path: z.ZodString;
1927
2292
  delegationId: z.ZodOptional<z.ZodString>;
1928
2293
  }, z.core.$loose>>;
1929
- callId: z.ZodString;
1930
- invocationId: z.ZodString;
1931
- capabilityId: z.ZodString;
1932
- toolName: z.ZodString;
1933
- output: z.ZodOptional<z.ZodUnknown>;
1934
- error: z.ZodOptional<z.ZodObject<{
1935
- code: z.ZodString;
1936
- message: z.ZodString;
1937
- }, z.core.$loose>>;
2294
+ invocationId: z.ZodOptional<z.ZodString>;
2295
+ code: z.ZodString;
2296
+ message: z.ZodString;
2297
+ retryable: z.ZodBoolean;
1938
2298
  }, z.core.$loose>;
1939
2299
  }, z.core.$strip> | z.ZodObject<{
1940
2300
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -1990,11 +2350,12 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1990
2350
  metadata: "metadata";
1991
2351
  }>;
1992
2352
  } & {
1993
- type: z.ZodLiteral<"transcript.updated">;
2353
+ type: z.ZodLiteral<"node.agent">;
1994
2354
  payload: z.ZodObject<{
1995
- keep: z.ZodNumber;
1996
- entries: z.ZodArray<z.ZodUnknown>;
1997
- length: z.ZodNumber;
2355
+ path: z.ZodString;
2356
+ iterations: z.ZodOptional<z.ZodString>;
2357
+ sessionId: z.ZodString;
2358
+ turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1998
2359
  }, z.core.$loose>;
1999
2360
  }, z.core.$strip> | z.ZodObject<{
2000
2361
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2050,9 +2411,12 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2050
2411
  metadata: "metadata";
2051
2412
  }>;
2052
2413
  } & {
2053
- type: z.ZodLiteral<"turn.cancelled">;
2414
+ type: z.ZodLiteral<"node.started">;
2054
2415
  payload: z.ZodObject<{
2055
- reason: z.ZodOptional<z.ZodString>;
2416
+ path: z.ZodString;
2417
+ kind: z.ZodString;
2418
+ key: z.ZodString;
2419
+ iterations: z.ZodOptional<z.ZodString>;
2056
2420
  }, z.core.$loose>;
2057
2421
  }, z.core.$strip> | z.ZodObject<{
2058
2422
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2108,9 +2472,9 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2108
2472
  metadata: "metadata";
2109
2473
  }>;
2110
2474
  } & {
2111
- type: z.ZodLiteral<"turn.completed">;
2475
+ type: z.ZodLiteral<"sandbox.attached">;
2112
2476
  payload: z.ZodObject<{
2113
- output: z.ZodUnknown;
2477
+ sandboxId: z.ZodString;
2114
2478
  }, z.core.$loose>;
2115
2479
  }, z.core.$strip> | z.ZodObject<{
2116
2480
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2166,13 +2530,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2166
2530
  metadata: "metadata";
2167
2531
  }>;
2168
2532
  } & {
2169
- type: z.ZodLiteral<"turn.failed">;
2533
+ type: z.ZodLiteral<"sandbox.exec">;
2170
2534
  payload: z.ZodObject<{
2171
- error: z.ZodOptional<z.ZodObject<{
2172
- code: z.ZodOptional<z.ZodString>;
2173
- message: z.ZodOptional<z.ZodString>;
2174
- }, z.core.$loose>>;
2175
- message: z.ZodOptional<z.ZodString>;
2535
+ tool: z.ZodString;
2536
+ command: z.ZodOptional<z.ZodString>;
2537
+ outcome: z.ZodString;
2538
+ code: z.ZodOptional<z.ZodString>;
2539
+ durationMs: z.ZodNumber;
2176
2540
  }, z.core.$loose>;
2177
2541
  }, z.core.$strip> | z.ZodObject<{
2178
2542
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2228,18 +2592,23 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2228
2592
  metadata: "metadata";
2229
2593
  }>;
2230
2594
  } & {
2231
- type: z.ZodLiteral<"turn.paused">;
2595
+ type: z.ZodLiteral<"sandbox.state">;
2232
2596
  payload: z.ZodObject<{
2233
- interactions: z.ZodArray<z.ZodObject<{
2234
- invocationId: z.ZodString;
2235
- interaction: z.ZodObject<{
2236
- id: z.ZodString;
2237
- kind: z.ZodString;
2238
- }, z.core.$loose>;
2239
- status: z.ZodOptional<z.ZodString>;
2240
- }, z.core.$loose>>;
2597
+ state: z.ZodEnum<{
2598
+ creating: "creating";
2599
+ running: "running";
2600
+ stopped: "stopped";
2601
+ }>;
2602
+ backend: z.ZodString;
2603
+ isolation: z.ZodOptional<z.ZodString>;
2604
+ image: z.ZodOptional<z.ZodString>;
2605
+ network: z.ZodOptional<z.ZodUnknown>;
2606
+ reattach: z.ZodOptional<z.ZodBoolean>;
2607
+ lost: z.ZodOptional<z.ZodBoolean>;
2608
+ note: z.ZodOptional<z.ZodString>;
2609
+ error: z.ZodOptional<z.ZodString>;
2241
2610
  }, z.core.$loose>;
2242
- }, z.core.$strip>, ...(z.ZodObject<{
2611
+ }, z.core.$strip> | z.ZodObject<{
2243
2612
  schema: z.ZodLiteral<"nylorun.event/2">;
2244
2613
  eventId: z.ZodString;
2245
2614
  tenantId: z.ZodString;
@@ -2293,21 +2662,22 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2293
2662
  metadata: "metadata";
2294
2663
  }>;
2295
2664
  } & {
2296
- type: z.ZodLiteral<"action.completed">;
2665
+ type: z.ZodLiteral<"tool.completed">;
2297
2666
  payload: z.ZodObject<{
2298
2667
  agent: z.ZodOptional<z.ZodObject<{
2299
2668
  id: z.ZodString;
2300
2669
  path: z.ZodString;
2301
2670
  delegationId: z.ZodOptional<z.ZodString>;
2302
2671
  }, z.core.$loose>>;
2303
- actionId: z.ZodString;
2304
- kind: z.ZodString;
2305
- toolName: z.ZodOptional<z.ZodString>;
2306
- path: z.ZodOptional<z.ZodString>;
2307
- key: z.ZodOptional<z.ZodString>;
2308
- callId: z.ZodOptional<z.ZodString>;
2309
- invocationId: z.ZodOptional<z.ZodString>;
2310
- result: z.ZodUnknown;
2672
+ callId: z.ZodString;
2673
+ invocationId: z.ZodString;
2674
+ capabilityId: z.ZodString;
2675
+ toolName: z.ZodString;
2676
+ output: z.ZodOptional<z.ZodUnknown>;
2677
+ error: z.ZodOptional<z.ZodObject<{
2678
+ code: z.ZodString;
2679
+ message: z.ZodString;
2680
+ }, z.core.$loose>>;
2311
2681
  }, z.core.$loose>;
2312
2682
  }, z.core.$strip> | z.ZodObject<{
2313
2683
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2363,15 +2733,11 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2363
2733
  metadata: "metadata";
2364
2734
  }>;
2365
2735
  } & {
2366
- type: z.ZodLiteral<"action.delivered">;
2736
+ type: z.ZodLiteral<"transcript.updated">;
2367
2737
  payload: z.ZodObject<{
2368
- agent: z.ZodOptional<z.ZodObject<{
2369
- id: z.ZodString;
2370
- path: z.ZodString;
2371
- delegationId: z.ZodOptional<z.ZodString>;
2372
- }, z.core.$loose>>;
2373
- actionId: z.ZodString;
2374
- generation: z.ZodNumber;
2738
+ keep: z.ZodNumber;
2739
+ entries: z.ZodArray<z.ZodUnknown>;
2740
+ length: z.ZodNumber;
2375
2741
  }, z.core.$loose>;
2376
2742
  }, z.core.$strip> | z.ZodObject<{
2377
2743
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2427,13 +2793,9 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2427
2793
  metadata: "metadata";
2428
2794
  }>;
2429
2795
  } & {
2430
- type: z.ZodLiteral<"action.delivery_failed">;
2796
+ type: z.ZodLiteral<"turn.cancelled">;
2431
2797
  payload: z.ZodObject<{
2432
- actionId: z.ZodString;
2433
- generation: z.ZodNumber;
2434
- reason: z.ZodString;
2435
- message: z.ZodOptional<z.ZodString>;
2436
- retryInMs: z.ZodNumber;
2798
+ reason: z.ZodOptional<z.ZodString>;
2437
2799
  }, z.core.$loose>;
2438
2800
  }, z.core.$strip> | z.ZodObject<{
2439
2801
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2489,21 +2851,9 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2489
2851
  metadata: "metadata";
2490
2852
  }>;
2491
2853
  } & {
2492
- type: z.ZodLiteral<"action.pending">;
2854
+ type: z.ZodLiteral<"turn.completed">;
2493
2855
  payload: z.ZodObject<{
2494
- agent: z.ZodOptional<z.ZodObject<{
2495
- id: z.ZodString;
2496
- path: z.ZodString;
2497
- delegationId: z.ZodOptional<z.ZodString>;
2498
- }, z.core.$loose>>;
2499
- actionId: z.ZodString;
2500
- kind: z.ZodString;
2501
- toolName: z.ZodOptional<z.ZodString>;
2502
- path: z.ZodOptional<z.ZodString>;
2503
- key: z.ZodOptional<z.ZodString>;
2504
- callId: z.ZodOptional<z.ZodString>;
2505
- invocationId: z.ZodOptional<z.ZodString>;
2506
- input: z.ZodUnknown;
2856
+ output: z.ZodUnknown;
2507
2857
  }, z.core.$loose>;
2508
2858
  }, z.core.$strip> | z.ZodObject<{
2509
2859
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2559,14 +2909,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2559
2909
  metadata: "metadata";
2560
2910
  }>;
2561
2911
  } & {
2562
- type: z.ZodLiteral<"action.uncertain">;
2912
+ type: z.ZodLiteral<"turn.failed">;
2563
2913
  payload: z.ZodObject<{
2564
- agent: z.ZodOptional<z.ZodObject<{
2565
- id: z.ZodString;
2566
- path: z.ZodString;
2567
- delegationId: z.ZodOptional<z.ZodString>;
2914
+ error: z.ZodOptional<z.ZodObject<{
2915
+ code: z.ZodOptional<z.ZodString>;
2916
+ message: z.ZodOptional<z.ZodString>;
2568
2917
  }, z.core.$loose>>;
2569
- actionId: z.ZodString;
2918
+ message: z.ZodOptional<z.ZodString>;
2570
2919
  }, z.core.$loose>;
2571
2920
  }, z.core.$strip> | z.ZodObject<{
2572
2921
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2622,15 +2971,18 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2622
2971
  metadata: "metadata";
2623
2972
  }>;
2624
2973
  } & {
2625
- type: z.ZodLiteral<"command.approve">;
2974
+ type: z.ZodLiteral<"turn.paused">;
2626
2975
  payload: z.ZodObject<{
2627
- requestId: z.ZodString;
2628
- idempotencyKey: z.ZodString;
2629
- type: z.ZodLiteral<"approve">;
2630
- interactionId: z.ZodString;
2631
- approved: z.ZodBoolean;
2976
+ interactions: z.ZodArray<z.ZodObject<{
2977
+ invocationId: z.ZodString;
2978
+ interaction: z.ZodObject<{
2979
+ id: z.ZodString;
2980
+ kind: z.ZodString;
2981
+ }, z.core.$loose>;
2982
+ status: z.ZodOptional<z.ZodString>;
2983
+ }, z.core.$loose>>;
2632
2984
  }, z.core.$loose>;
2633
- }, z.core.$strip> | z.ZodObject<{
2985
+ }, z.core.$strip>, ...(z.ZodObject<{
2634
2986
  schema: z.ZodLiteral<"nylorun.event/2">;
2635
2987
  eventId: z.ZodString;
2636
2988
  tenantId: z.ZodString;
@@ -2684,16 +3036,23 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2684
3036
  metadata: "metadata";
2685
3037
  }>;
2686
3038
  } & {
2687
- type: z.ZodLiteral<"command.message">;
3039
+ type: z.ZodLiteral<"action.completed">;
2688
3040
  payload: z.ZodObject<{
2689
- requestId: z.ZodString;
2690
- idempotencyKey: z.ZodString;
2691
- type: z.ZodLiteral<"message">;
2692
- content: z.ZodOptional<z.ZodString>;
2693
- data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
2694
- manifest: z.ZodOptional<z.ZodUnknown>;
2695
- }, z.core.$loose>;
2696
- }, z.core.$strip> | z.ZodObject<{
3041
+ agent: z.ZodOptional<z.ZodObject<{
3042
+ id: z.ZodString;
3043
+ path: z.ZodString;
3044
+ delegationId: z.ZodOptional<z.ZodString>;
3045
+ }, z.core.$loose>>;
3046
+ actionId: z.ZodString;
3047
+ kind: z.ZodString;
3048
+ toolName: z.ZodOptional<z.ZodString>;
3049
+ path: z.ZodOptional<z.ZodString>;
3050
+ key: z.ZodOptional<z.ZodString>;
3051
+ callId: z.ZodOptional<z.ZodString>;
3052
+ invocationId: z.ZodOptional<z.ZodString>;
3053
+ result: z.ZodUnknown;
3054
+ }, z.core.$loose>;
3055
+ }, z.core.$strip> | z.ZodObject<{
2697
3056
  schema: z.ZodLiteral<"nylorun.event/2">;
2698
3057
  eventId: z.ZodString;
2699
3058
  tenantId: z.ZodString;
@@ -2747,13 +3106,15 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2747
3106
  metadata: "metadata";
2748
3107
  }>;
2749
3108
  } & {
2750
- type: z.ZodLiteral<"command.respond">;
3109
+ type: z.ZodLiteral<"action.delivered">;
2751
3110
  payload: z.ZodObject<{
2752
- requestId: z.ZodString;
2753
- idempotencyKey: z.ZodString;
2754
- type: z.ZodLiteral<"respond">;
2755
- interactionId: z.ZodString;
2756
- value: z.ZodUnknown;
3111
+ agent: z.ZodOptional<z.ZodObject<{
3112
+ id: z.ZodString;
3113
+ path: z.ZodString;
3114
+ delegationId: z.ZodOptional<z.ZodString>;
3115
+ }, z.core.$loose>>;
3116
+ actionId: z.ZodString;
3117
+ generation: z.ZodNumber;
2757
3118
  }, z.core.$loose>;
2758
3119
  }, z.core.$strip> | z.ZodObject<{
2759
3120
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2809,20 +3170,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2809
3170
  metadata: "metadata";
2810
3171
  }>;
2811
3172
  } & {
2812
- type: z.ZodLiteral<"context.compacted">;
3173
+ type: z.ZodLiteral<"action.delivery_failed">;
2813
3174
  payload: z.ZodObject<{
2814
- agent: z.ZodOptional<z.ZodObject<{
2815
- id: z.ZodString;
2816
- path: z.ZodString;
2817
- delegationId: z.ZodOptional<z.ZodString>;
2818
- }, z.core.$loose>>;
2819
- invocationId: z.ZodOptional<z.ZodString>;
2820
- trigger: z.ZodEnum<{
2821
- overflow: "overflow";
2822
- threshold: "threshold";
2823
- }>;
2824
- tokensBefore: z.ZodNumber;
2825
- tokensAfter: z.ZodNumber;
3175
+ actionId: z.ZodString;
3176
+ generation: z.ZodNumber;
3177
+ reason: z.ZodString;
3178
+ message: z.ZodOptional<z.ZodString>;
3179
+ retryInMs: z.ZodNumber;
2826
3180
  }, z.core.$loose>;
2827
3181
  }, z.core.$strip> | z.ZodObject<{
2828
3182
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2878,14 +3232,21 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2878
3232
  metadata: "metadata";
2879
3233
  }>;
2880
3234
  } & {
2881
- type: z.ZodLiteral<"delegation.completed">;
3235
+ type: z.ZodLiteral<"action.pending">;
2882
3236
  payload: z.ZodObject<{
2883
- agent: z.ZodObject<{
3237
+ agent: z.ZodOptional<z.ZodObject<{
2884
3238
  id: z.ZodString;
2885
3239
  path: z.ZodString;
2886
3240
  delegationId: z.ZodOptional<z.ZodString>;
2887
- }, z.core.$loose>;
3241
+ }, z.core.$loose>>;
3242
+ actionId: z.ZodString;
3243
+ kind: z.ZodString;
3244
+ toolName: z.ZodOptional<z.ZodString>;
3245
+ path: z.ZodOptional<z.ZodString>;
3246
+ key: z.ZodOptional<z.ZodString>;
2888
3247
  callId: z.ZodOptional<z.ZodString>;
3248
+ invocationId: z.ZodOptional<z.ZodString>;
3249
+ input: z.ZodUnknown;
2889
3250
  }, z.core.$loose>;
2890
3251
  }, z.core.$strip> | z.ZodObject<{
2891
3252
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -2941,14 +3302,14 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2941
3302
  metadata: "metadata";
2942
3303
  }>;
2943
3304
  } & {
2944
- type: z.ZodLiteral<"delegation.started">;
3305
+ type: z.ZodLiteral<"action.uncertain">;
2945
3306
  payload: z.ZodObject<{
2946
- agent: z.ZodObject<{
3307
+ agent: z.ZodOptional<z.ZodObject<{
2947
3308
  id: z.ZodString;
2948
3309
  path: z.ZodString;
2949
3310
  delegationId: z.ZodOptional<z.ZodString>;
2950
- }, z.core.$loose>;
2951
- callId: z.ZodOptional<z.ZodString>;
3311
+ }, z.core.$loose>>;
3312
+ actionId: z.ZodString;
2952
3313
  }, z.core.$loose>;
2953
3314
  }, z.core.$strip> | z.ZodObject<{
2954
3315
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3004,10 +3365,26 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3004
3365
  metadata: "metadata";
3005
3366
  }>;
3006
3367
  } & {
3007
- type: z.ZodLiteral<"effect.uncertain">;
3368
+ type: z.ZodLiteral<"artifact.created">;
3008
3369
  payload: z.ZodObject<{
3009
- effectId: z.ZodString;
3010
- message: z.ZodOptional<z.ZodString>;
3370
+ artifactId: z.ZodString;
3371
+ kind: z.ZodEnum<{
3372
+ file: "file";
3373
+ folder: "folder";
3374
+ }>;
3375
+ name: z.ZodString;
3376
+ contentType: z.ZodString;
3377
+ version: z.ZodNumber;
3378
+ size: z.ZodNumber;
3379
+ sha256: z.ZodString;
3380
+ source: z.ZodEnum<{
3381
+ engine: "engine";
3382
+ export: "export";
3383
+ upload: "upload";
3384
+ }>;
3385
+ callId: z.ZodOptional<z.ZodString>;
3386
+ fileCount: z.ZodOptional<z.ZodNumber>;
3387
+ claimed: z.ZodOptional<z.ZodBoolean>;
3011
3388
  }, z.core.$loose>;
3012
3389
  }, z.core.$strip> | z.ZodObject<{
3013
3390
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3063,15 +3440,10 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3063
3440
  metadata: "metadata";
3064
3441
  }>;
3065
3442
  } & {
3066
- type: z.ZodLiteral<"loop.decided">;
3443
+ type: z.ZodLiteral<"artifact.deleted">;
3067
3444
  payload: z.ZodObject<{
3068
- path: z.ZodString;
3069
- n: z.ZodNumber;
3070
- next: z.ZodEnum<{
3071
- input: "input";
3072
- output: "output";
3073
- }>;
3074
- patched: z.ZodBoolean;
3445
+ artifactId: z.ZodString;
3446
+ name: z.ZodString;
3075
3447
  }, z.core.$loose>;
3076
3448
  }, z.core.$strip> | z.ZodObject<{
3077
3449
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3127,13 +3499,10 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3127
3499
  metadata: "metadata";
3128
3500
  }>;
3129
3501
  } & {
3130
- type: z.ZodLiteral<"loop.iteration">;
3502
+ type: z.ZodLiteral<"artifact.export.failed">;
3131
3503
  payload: z.ZodObject<{
3132
- path: z.ZodString;
3133
- n: z.ZodNumber;
3134
- sessionId: z.ZodOptional<z.ZodString>;
3135
- turnId: z.ZodOptional<z.ZodString>;
3136
- manifestHash: z.ZodOptional<z.ZodString>;
3504
+ name: z.ZodString;
3505
+ message: z.ZodString;
3137
3506
  }, z.core.$loose>;
3138
3507
  }, z.core.$strip> | z.ZodObject<{
3139
3508
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3189,13 +3558,18 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3189
3558
  metadata: "metadata";
3190
3559
  }>;
3191
3560
  } & {
3192
- type: z.ZodLiteral<"loop.verified">;
3561
+ type: z.ZodLiteral<"artifact.export.skipped">;
3193
3562
  payload: z.ZodObject<{
3194
- path: z.ZodString;
3195
- n: z.ZodNumber;
3196
- pass: z.ZodBoolean;
3197
- feedback: z.ZodOptional<z.ZodString>;
3198
- data: z.ZodOptional<z.ZodUnknown>;
3563
+ name: z.ZodString;
3564
+ reason: z.ZodEnum<{
3565
+ file_too_large: "file_too_large";
3566
+ tenant_total: "tenant_total";
3567
+ too_large: "too_large";
3568
+ too_many_files: "too_many_files";
3569
+ }>;
3570
+ message: z.ZodString;
3571
+ limit: z.ZodOptional<z.ZodNumber>;
3572
+ path: z.ZodOptional<z.ZodString>;
3199
3573
  }, z.core.$loose>;
3200
3574
  }, z.core.$strip> | z.ZodObject<{
3201
3575
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3251,26 +3625,26 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3251
3625
  metadata: "metadata";
3252
3626
  }>;
3253
3627
  } & {
3254
- type: z.ZodLiteral<"message.assistant">;
3628
+ type: z.ZodLiteral<"artifact.version.created">;
3255
3629
  payload: z.ZodObject<{
3256
- agent: z.ZodOptional<z.ZodObject<{
3257
- id: z.ZodString;
3258
- path: z.ZodString;
3259
- delegationId: z.ZodOptional<z.ZodString>;
3260
- }, z.core.$loose>>;
3261
- invocationId: z.ZodString;
3262
- text: z.ZodString;
3263
- model: z.ZodOptional<z.ZodObject<{
3264
- provider: z.ZodString;
3265
- model: z.ZodString;
3266
- }, z.core.$loose>>;
3267
- finishReason: z.ZodOptional<z.ZodString>;
3268
- usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
3269
- toolCalls: z.ZodArray<z.ZodObject<{
3270
- callId: z.ZodString;
3271
- name: z.ZodString;
3272
- input: z.ZodUnknown;
3273
- }, z.core.$loose>>;
3630
+ artifactId: z.ZodString;
3631
+ kind: z.ZodEnum<{
3632
+ file: "file";
3633
+ folder: "folder";
3634
+ }>;
3635
+ name: z.ZodString;
3636
+ contentType: z.ZodString;
3637
+ version: z.ZodNumber;
3638
+ size: z.ZodNumber;
3639
+ sha256: z.ZodString;
3640
+ source: z.ZodEnum<{
3641
+ engine: "engine";
3642
+ export: "export";
3643
+ upload: "upload";
3644
+ }>;
3645
+ callId: z.ZodOptional<z.ZodString>;
3646
+ fileCount: z.ZodOptional<z.ZodNumber>;
3647
+ claimed: z.ZodOptional<z.ZodBoolean>;
3274
3648
  }, z.core.$loose>;
3275
3649
  }, z.core.$strip> | z.ZodObject<{
3276
3650
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3326,17 +3700,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3326
3700
  metadata: "metadata";
3327
3701
  }>;
3328
3702
  } & {
3329
- type: z.ZodLiteral<"model.failed">;
3703
+ type: z.ZodLiteral<"command.approve">;
3330
3704
  payload: z.ZodObject<{
3331
- agent: z.ZodOptional<z.ZodObject<{
3332
- id: z.ZodString;
3333
- path: z.ZodString;
3334
- delegationId: z.ZodOptional<z.ZodString>;
3335
- }, z.core.$loose>>;
3336
- invocationId: z.ZodOptional<z.ZodString>;
3337
- code: z.ZodString;
3338
- message: z.ZodString;
3339
- retryable: z.ZodBoolean;
3705
+ requestId: z.ZodString;
3706
+ idempotencyKey: z.ZodString;
3707
+ type: z.ZodLiteral<"approve">;
3708
+ interactionId: z.ZodString;
3709
+ approved: z.ZodBoolean;
3340
3710
  }, z.core.$loose>;
3341
3711
  }, z.core.$strip> | z.ZodObject<{
3342
3712
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3392,12 +3762,22 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3392
3762
  metadata: "metadata";
3393
3763
  }>;
3394
3764
  } & {
3395
- type: z.ZodLiteral<"node.agent">;
3765
+ type: z.ZodLiteral<"command.message">;
3396
3766
  payload: z.ZodObject<{
3397
- path: z.ZodString;
3398
- iterations: z.ZodOptional<z.ZodString>;
3399
- sessionId: z.ZodString;
3400
- turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3767
+ requestId: z.ZodString;
3768
+ idempotencyKey: z.ZodString;
3769
+ type: z.ZodLiteral<"message">;
3770
+ content: z.ZodOptional<z.ZodString>;
3771
+ data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
3772
+ parts: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3773
+ type: z.ZodLiteral<"text">;
3774
+ text: z.ZodString;
3775
+ }, z.core.$strict>, z.ZodObject<{
3776
+ type: z.ZodLiteral<"file">;
3777
+ artifactId: z.ZodString;
3778
+ version: z.ZodOptional<z.ZodNumber>;
3779
+ }, z.core.$strict>], "type">>>;
3780
+ manifest: z.ZodOptional<z.ZodUnknown>;
3401
3781
  }, z.core.$loose>;
3402
3782
  }, z.core.$strip> | z.ZodObject<{
3403
3783
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3453,12 +3833,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3453
3833
  metadata: "metadata";
3454
3834
  }>;
3455
3835
  } & {
3456
- type: z.ZodLiteral<"node.started">;
3836
+ type: z.ZodLiteral<"command.respond">;
3457
3837
  payload: z.ZodObject<{
3458
- path: z.ZodString;
3459
- kind: z.ZodString;
3460
- key: z.ZodString;
3461
- iterations: z.ZodOptional<z.ZodString>;
3838
+ requestId: z.ZodString;
3839
+ idempotencyKey: z.ZodString;
3840
+ type: z.ZodLiteral<"respond">;
3841
+ interactionId: z.ZodString;
3842
+ value: z.ZodUnknown;
3462
3843
  }, z.core.$loose>;
3463
3844
  }, z.core.$strip> | z.ZodObject<{
3464
3845
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3514,13 +3895,20 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3514
3895
  metadata: "metadata";
3515
3896
  }>;
3516
3897
  } & {
3517
- type: z.ZodLiteral<"sandbox.exec">;
3898
+ type: z.ZodLiteral<"context.compacted">;
3518
3899
  payload: z.ZodObject<{
3519
- tool: z.ZodString;
3520
- command: z.ZodOptional<z.ZodString>;
3521
- outcome: z.ZodString;
3522
- code: z.ZodOptional<z.ZodString>;
3523
- durationMs: z.ZodNumber;
3900
+ agent: z.ZodOptional<z.ZodObject<{
3901
+ id: z.ZodString;
3902
+ path: z.ZodString;
3903
+ delegationId: z.ZodOptional<z.ZodString>;
3904
+ }, z.core.$loose>>;
3905
+ invocationId: z.ZodOptional<z.ZodString>;
3906
+ trigger: z.ZodEnum<{
3907
+ overflow: "overflow";
3908
+ threshold: "threshold";
3909
+ }>;
3910
+ tokensBefore: z.ZodNumber;
3911
+ tokensAfter: z.ZodNumber;
3524
3912
  }, z.core.$loose>;
3525
3913
  }, z.core.$strip> | z.ZodObject<{
3526
3914
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3576,21 +3964,14 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3576
3964
  metadata: "metadata";
3577
3965
  }>;
3578
3966
  } & {
3579
- type: z.ZodLiteral<"sandbox.state">;
3967
+ type: z.ZodLiteral<"delegation.completed">;
3580
3968
  payload: z.ZodObject<{
3581
- state: z.ZodEnum<{
3582
- creating: "creating";
3583
- running: "running";
3584
- stopped: "stopped";
3585
- }>;
3586
- backend: z.ZodString;
3587
- isolation: z.ZodOptional<z.ZodString>;
3588
- image: z.ZodOptional<z.ZodString>;
3589
- network: z.ZodOptional<z.ZodUnknown>;
3590
- reattach: z.ZodOptional<z.ZodBoolean>;
3591
- lost: z.ZodOptional<z.ZodBoolean>;
3592
- note: z.ZodOptional<z.ZodString>;
3593
- error: z.ZodOptional<z.ZodString>;
3969
+ agent: z.ZodObject<{
3970
+ id: z.ZodString;
3971
+ path: z.ZodString;
3972
+ delegationId: z.ZodOptional<z.ZodString>;
3973
+ }, z.core.$loose>;
3974
+ callId: z.ZodOptional<z.ZodString>;
3594
3975
  }, z.core.$loose>;
3595
3976
  }, z.core.$strip> | z.ZodObject<{
3596
3977
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3646,22 +4027,14 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3646
4027
  metadata: "metadata";
3647
4028
  }>;
3648
4029
  } & {
3649
- type: z.ZodLiteral<"tool.completed">;
4030
+ type: z.ZodLiteral<"delegation.started">;
3650
4031
  payload: z.ZodObject<{
3651
- agent: z.ZodOptional<z.ZodObject<{
4032
+ agent: z.ZodObject<{
3652
4033
  id: z.ZodString;
3653
4034
  path: z.ZodString;
3654
4035
  delegationId: z.ZodOptional<z.ZodString>;
3655
- }, z.core.$loose>>;
3656
- callId: z.ZodString;
3657
- invocationId: z.ZodString;
3658
- capabilityId: z.ZodString;
3659
- toolName: z.ZodString;
3660
- output: z.ZodOptional<z.ZodUnknown>;
3661
- error: z.ZodOptional<z.ZodObject<{
3662
- code: z.ZodString;
3663
- message: z.ZodString;
3664
- }, z.core.$loose>>;
4036
+ }, z.core.$loose>;
4037
+ callId: z.ZodOptional<z.ZodString>;
3665
4038
  }, z.core.$loose>;
3666
4039
  }, z.core.$strip> | z.ZodObject<{
3667
4040
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3717,11 +4090,10 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3717
4090
  metadata: "metadata";
3718
4091
  }>;
3719
4092
  } & {
3720
- type: z.ZodLiteral<"transcript.updated">;
4093
+ type: z.ZodLiteral<"effect.uncertain">;
3721
4094
  payload: z.ZodObject<{
3722
- keep: z.ZodNumber;
3723
- entries: z.ZodArray<z.ZodUnknown>;
3724
- length: z.ZodNumber;
4095
+ effectId: z.ZodString;
4096
+ message: z.ZodOptional<z.ZodString>;
3725
4097
  }, z.core.$loose>;
3726
4098
  }, z.core.$strip> | z.ZodObject<{
3727
4099
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3777,9 +4149,15 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3777
4149
  metadata: "metadata";
3778
4150
  }>;
3779
4151
  } & {
3780
- type: z.ZodLiteral<"turn.cancelled">;
4152
+ type: z.ZodLiteral<"loop.decided">;
3781
4153
  payload: z.ZodObject<{
3782
- reason: z.ZodOptional<z.ZodString>;
4154
+ path: z.ZodString;
4155
+ n: z.ZodNumber;
4156
+ next: z.ZodEnum<{
4157
+ input: "input";
4158
+ output: "output";
4159
+ }>;
4160
+ patched: z.ZodBoolean;
3783
4161
  }, z.core.$loose>;
3784
4162
  }, z.core.$strip> | z.ZodObject<{
3785
4163
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3835,9 +4213,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3835
4213
  metadata: "metadata";
3836
4214
  }>;
3837
4215
  } & {
3838
- type: z.ZodLiteral<"turn.completed">;
4216
+ type: z.ZodLiteral<"loop.iteration">;
3839
4217
  payload: z.ZodObject<{
3840
- output: z.ZodUnknown;
4218
+ path: z.ZodString;
4219
+ n: z.ZodNumber;
4220
+ sessionId: z.ZodOptional<z.ZodString>;
4221
+ turnId: z.ZodOptional<z.ZodString>;
4222
+ manifestHash: z.ZodOptional<z.ZodString>;
3841
4223
  }, z.core.$loose>;
3842
4224
  }, z.core.$strip> | z.ZodObject<{
3843
4225
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3893,13 +4275,13 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3893
4275
  metadata: "metadata";
3894
4276
  }>;
3895
4277
  } & {
3896
- type: z.ZodLiteral<"turn.failed">;
4278
+ type: z.ZodLiteral<"loop.verified">;
3897
4279
  payload: z.ZodObject<{
3898
- error: z.ZodOptional<z.ZodObject<{
3899
- code: z.ZodOptional<z.ZodString>;
3900
- message: z.ZodOptional<z.ZodString>;
3901
- }, z.core.$loose>>;
3902
- message: z.ZodOptional<z.ZodString>;
4280
+ path: z.ZodString;
4281
+ n: z.ZodNumber;
4282
+ pass: z.ZodBoolean;
4283
+ feedback: z.ZodOptional<z.ZodString>;
4284
+ data: z.ZodOptional<z.ZodUnknown>;
3903
4285
  }, z.core.$loose>;
3904
4286
  }, z.core.$strip> | z.ZodObject<{
3905
4287
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -3955,89 +4337,1578 @@ export declare const SessionEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
3955
4337
  metadata: "metadata";
3956
4338
  }>;
3957
4339
  } & {
3958
- type: z.ZodLiteral<"turn.paused">;
4340
+ type: z.ZodLiteral<"message.assistant">;
3959
4341
  payload: z.ZodObject<{
3960
- interactions: z.ZodArray<z.ZodObject<{
3961
- invocationId: z.ZodString;
3962
- interaction: z.ZodObject<{
3963
- id: z.ZodString;
3964
- kind: z.ZodString;
3965
- }, z.core.$loose>;
3966
- status: z.ZodOptional<z.ZodString>;
4342
+ agent: z.ZodOptional<z.ZodObject<{
4343
+ id: z.ZodString;
4344
+ path: z.ZodString;
4345
+ delegationId: z.ZodOptional<z.ZodString>;
4346
+ }, z.core.$loose>>;
4347
+ invocationId: z.ZodString;
4348
+ text: z.ZodString;
4349
+ model: z.ZodOptional<z.ZodObject<{
4350
+ provider: z.ZodString;
4351
+ model: z.ZodString;
4352
+ }, z.core.$loose>>;
4353
+ finishReason: z.ZodOptional<z.ZodString>;
4354
+ usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
4355
+ toolCalls: z.ZodArray<z.ZodObject<{
4356
+ callId: z.ZodString;
4357
+ name: z.ZodString;
4358
+ input: z.ZodUnknown;
3967
4359
  }, z.core.$loose>>;
3968
4360
  }, z.core.$loose>;
3969
- }, z.core.$strip>)[]], "type">;
3970
- export declare const SessionItemsResponse: z.ZodObject<{
3971
- cursor: z.ZodNullable<z.ZodString>;
3972
- items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3973
- schema: z.ZodLiteral<"nylorun.event/2">;
3974
- eventId: z.ZodString;
3975
- tenantId: z.ZodString;
3976
- sessionId: z.ZodString;
3977
- runId: z.ZodNullable<z.ZodString>;
3978
- turnId: z.ZodNullable<z.ZodString>;
3979
- incarnation: z.ZodNumber;
3980
- epoch: z.ZodNumber;
3981
- seq: z.ZodNumber;
3982
- cursor: z.ZodString;
3983
- time: z.ZodString;
3984
- schemaVersion: z.ZodNumber;
3985
- source: z.ZodObject<{
3986
- kind: z.ZodEnum<{
3987
- api: "api";
3988
- controller: "controller";
3989
- edge: "edge";
3990
- "egress-gate": "egress-gate";
3991
- evidence: "evidence";
3992
- harness: "harness";
3993
- human: "human";
3994
- init: "init";
3995
- loop: "loop";
3996
- "model-gate": "model-gate";
3997
- operator: "operator";
3998
- sandboxd: "sandboxd";
3999
- supervisor: "supervisor";
4000
- "tool-gate": "tool-gate";
4001
- }>;
4002
- id: z.ZodString;
4003
- }, z.core.$strip>;
4004
- evidence: z.ZodEnum<{
4005
- asserted: "asserted";
4006
- attested: "attested";
4007
- claimed: "claimed";
4008
- measured: "measured";
4009
- observed: "observed";
4361
+ }, z.core.$strip> | z.ZodObject<{
4362
+ schema: z.ZodLiteral<"nylorun.event/2">;
4363
+ eventId: z.ZodString;
4364
+ tenantId: z.ZodString;
4365
+ sessionId: z.ZodString;
4366
+ runId: z.ZodNullable<z.ZodString>;
4367
+ turnId: z.ZodNullable<z.ZodString>;
4368
+ incarnation: z.ZodNumber;
4369
+ epoch: z.ZodNumber;
4370
+ seq: z.ZodNumber;
4371
+ cursor: z.ZodString;
4372
+ time: z.ZodString;
4373
+ schemaVersion: z.ZodNumber;
4374
+ source: z.ZodObject<{
4375
+ kind: z.ZodEnum<{
4376
+ api: "api";
4377
+ controller: "controller";
4378
+ edge: "edge";
4379
+ "egress-gate": "egress-gate";
4380
+ evidence: "evidence";
4381
+ harness: "harness";
4382
+ human: "human";
4383
+ init: "init";
4384
+ loop: "loop";
4385
+ "model-gate": "model-gate";
4386
+ operator: "operator";
4387
+ sandboxd: "sandboxd";
4388
+ supervisor: "supervisor";
4389
+ "tool-gate": "tool-gate";
4010
4390
  }>;
4011
- trace: z.ZodOptional<z.ZodObject<{
4012
- traceId: z.ZodString;
4013
- spanId: z.ZodString;
4014
- parentSpanId: z.ZodOptional<z.ZodString>;
4015
- }, z.core.$strip>>;
4016
- visibility: z.ZodEnum<{
4017
- internal: "internal";
4018
- public: "public";
4019
- restricted: "restricted";
4391
+ id: z.ZodString;
4392
+ }, z.core.$strip>;
4393
+ evidence: z.ZodEnum<{
4394
+ asserted: "asserted";
4395
+ attested: "attested";
4396
+ claimed: "claimed";
4397
+ measured: "measured";
4398
+ observed: "observed";
4399
+ }>;
4400
+ trace: z.ZodOptional<z.ZodObject<{
4401
+ traceId: z.ZodString;
4402
+ spanId: z.ZodString;
4403
+ parentSpanId: z.ZodOptional<z.ZodString>;
4404
+ }, z.core.$strip>>;
4405
+ visibility: z.ZodEnum<{
4406
+ internal: "internal";
4407
+ public: "public";
4408
+ restricted: "restricted";
4409
+ }>;
4410
+ retention: z.ZodEnum<{
4411
+ full: "full";
4412
+ metadata: "metadata";
4413
+ }>;
4414
+ } & {
4415
+ type: z.ZodLiteral<"model.failed">;
4416
+ payload: z.ZodObject<{
4417
+ agent: z.ZodOptional<z.ZodObject<{
4418
+ id: z.ZodString;
4419
+ path: z.ZodString;
4420
+ delegationId: z.ZodOptional<z.ZodString>;
4421
+ }, z.core.$loose>>;
4422
+ invocationId: z.ZodOptional<z.ZodString>;
4423
+ code: z.ZodString;
4424
+ message: z.ZodString;
4425
+ retryable: z.ZodBoolean;
4426
+ }, z.core.$loose>;
4427
+ }, z.core.$strip> | z.ZodObject<{
4428
+ schema: z.ZodLiteral<"nylorun.event/2">;
4429
+ eventId: z.ZodString;
4430
+ tenantId: z.ZodString;
4431
+ sessionId: z.ZodString;
4432
+ runId: z.ZodNullable<z.ZodString>;
4433
+ turnId: z.ZodNullable<z.ZodString>;
4434
+ incarnation: z.ZodNumber;
4435
+ epoch: z.ZodNumber;
4436
+ seq: z.ZodNumber;
4437
+ cursor: z.ZodString;
4438
+ time: z.ZodString;
4439
+ schemaVersion: z.ZodNumber;
4440
+ source: z.ZodObject<{
4441
+ kind: z.ZodEnum<{
4442
+ api: "api";
4443
+ controller: "controller";
4444
+ edge: "edge";
4445
+ "egress-gate": "egress-gate";
4446
+ evidence: "evidence";
4447
+ harness: "harness";
4448
+ human: "human";
4449
+ init: "init";
4450
+ loop: "loop";
4451
+ "model-gate": "model-gate";
4452
+ operator: "operator";
4453
+ sandboxd: "sandboxd";
4454
+ supervisor: "supervisor";
4455
+ "tool-gate": "tool-gate";
4020
4456
  }>;
4021
- retention: z.ZodEnum<{
4022
- full: "full";
4023
- metadata: "metadata";
4457
+ id: z.ZodString;
4458
+ }, z.core.$strip>;
4459
+ evidence: z.ZodEnum<{
4460
+ asserted: "asserted";
4461
+ attested: "attested";
4462
+ claimed: "claimed";
4463
+ measured: "measured";
4464
+ observed: "observed";
4465
+ }>;
4466
+ trace: z.ZodOptional<z.ZodObject<{
4467
+ traceId: z.ZodString;
4468
+ spanId: z.ZodString;
4469
+ parentSpanId: z.ZodOptional<z.ZodString>;
4470
+ }, z.core.$strip>>;
4471
+ visibility: z.ZodEnum<{
4472
+ internal: "internal";
4473
+ public: "public";
4474
+ restricted: "restricted";
4475
+ }>;
4476
+ retention: z.ZodEnum<{
4477
+ full: "full";
4478
+ metadata: "metadata";
4479
+ }>;
4480
+ } & {
4481
+ type: z.ZodLiteral<"node.agent">;
4482
+ payload: z.ZodObject<{
4483
+ path: z.ZodString;
4484
+ iterations: z.ZodOptional<z.ZodString>;
4485
+ sessionId: z.ZodString;
4486
+ turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4487
+ }, z.core.$loose>;
4488
+ }, z.core.$strip> | z.ZodObject<{
4489
+ schema: z.ZodLiteral<"nylorun.event/2">;
4490
+ eventId: z.ZodString;
4491
+ tenantId: z.ZodString;
4492
+ sessionId: z.ZodString;
4493
+ runId: z.ZodNullable<z.ZodString>;
4494
+ turnId: z.ZodNullable<z.ZodString>;
4495
+ incarnation: z.ZodNumber;
4496
+ epoch: z.ZodNumber;
4497
+ seq: z.ZodNumber;
4498
+ cursor: z.ZodString;
4499
+ time: z.ZodString;
4500
+ schemaVersion: z.ZodNumber;
4501
+ source: z.ZodObject<{
4502
+ kind: z.ZodEnum<{
4503
+ api: "api";
4504
+ controller: "controller";
4505
+ edge: "edge";
4506
+ "egress-gate": "egress-gate";
4507
+ evidence: "evidence";
4508
+ harness: "harness";
4509
+ human: "human";
4510
+ init: "init";
4511
+ loop: "loop";
4512
+ "model-gate": "model-gate";
4513
+ operator: "operator";
4514
+ sandboxd: "sandboxd";
4515
+ supervisor: "supervisor";
4516
+ "tool-gate": "tool-gate";
4024
4517
  }>;
4025
- } & {
4026
- type: z.ZodLiteral<"action.completed">;
4027
- payload: z.ZodObject<{
4028
- agent: z.ZodOptional<z.ZodObject<{
4029
- id: z.ZodString;
4030
- path: z.ZodString;
4031
- delegationId: z.ZodOptional<z.ZodString>;
4032
- }, z.core.$loose>>;
4033
- actionId: z.ZodString;
4034
- kind: z.ZodString;
4035
- toolName: z.ZodOptional<z.ZodString>;
4036
- path: z.ZodOptional<z.ZodString>;
4037
- key: z.ZodOptional<z.ZodString>;
4038
- callId: z.ZodOptional<z.ZodString>;
4039
- invocationId: z.ZodOptional<z.ZodString>;
4040
- result: z.ZodUnknown;
4518
+ id: z.ZodString;
4519
+ }, z.core.$strip>;
4520
+ evidence: z.ZodEnum<{
4521
+ asserted: "asserted";
4522
+ attested: "attested";
4523
+ claimed: "claimed";
4524
+ measured: "measured";
4525
+ observed: "observed";
4526
+ }>;
4527
+ trace: z.ZodOptional<z.ZodObject<{
4528
+ traceId: z.ZodString;
4529
+ spanId: z.ZodString;
4530
+ parentSpanId: z.ZodOptional<z.ZodString>;
4531
+ }, z.core.$strip>>;
4532
+ visibility: z.ZodEnum<{
4533
+ internal: "internal";
4534
+ public: "public";
4535
+ restricted: "restricted";
4536
+ }>;
4537
+ retention: z.ZodEnum<{
4538
+ full: "full";
4539
+ metadata: "metadata";
4540
+ }>;
4541
+ } & {
4542
+ type: z.ZodLiteral<"node.started">;
4543
+ payload: z.ZodObject<{
4544
+ path: z.ZodString;
4545
+ kind: z.ZodString;
4546
+ key: z.ZodString;
4547
+ iterations: z.ZodOptional<z.ZodString>;
4548
+ }, z.core.$loose>;
4549
+ }, z.core.$strip> | z.ZodObject<{
4550
+ schema: z.ZodLiteral<"nylorun.event/2">;
4551
+ eventId: z.ZodString;
4552
+ tenantId: z.ZodString;
4553
+ sessionId: z.ZodString;
4554
+ runId: z.ZodNullable<z.ZodString>;
4555
+ turnId: z.ZodNullable<z.ZodString>;
4556
+ incarnation: z.ZodNumber;
4557
+ epoch: z.ZodNumber;
4558
+ seq: z.ZodNumber;
4559
+ cursor: z.ZodString;
4560
+ time: z.ZodString;
4561
+ schemaVersion: z.ZodNumber;
4562
+ source: z.ZodObject<{
4563
+ kind: z.ZodEnum<{
4564
+ api: "api";
4565
+ controller: "controller";
4566
+ edge: "edge";
4567
+ "egress-gate": "egress-gate";
4568
+ evidence: "evidence";
4569
+ harness: "harness";
4570
+ human: "human";
4571
+ init: "init";
4572
+ loop: "loop";
4573
+ "model-gate": "model-gate";
4574
+ operator: "operator";
4575
+ sandboxd: "sandboxd";
4576
+ supervisor: "supervisor";
4577
+ "tool-gate": "tool-gate";
4578
+ }>;
4579
+ id: z.ZodString;
4580
+ }, z.core.$strip>;
4581
+ evidence: z.ZodEnum<{
4582
+ asserted: "asserted";
4583
+ attested: "attested";
4584
+ claimed: "claimed";
4585
+ measured: "measured";
4586
+ observed: "observed";
4587
+ }>;
4588
+ trace: z.ZodOptional<z.ZodObject<{
4589
+ traceId: z.ZodString;
4590
+ spanId: z.ZodString;
4591
+ parentSpanId: z.ZodOptional<z.ZodString>;
4592
+ }, z.core.$strip>>;
4593
+ visibility: z.ZodEnum<{
4594
+ internal: "internal";
4595
+ public: "public";
4596
+ restricted: "restricted";
4597
+ }>;
4598
+ retention: z.ZodEnum<{
4599
+ full: "full";
4600
+ metadata: "metadata";
4601
+ }>;
4602
+ } & {
4603
+ type: z.ZodLiteral<"sandbox.attached">;
4604
+ payload: z.ZodObject<{
4605
+ sandboxId: z.ZodString;
4606
+ }, z.core.$loose>;
4607
+ }, z.core.$strip> | z.ZodObject<{
4608
+ schema: z.ZodLiteral<"nylorun.event/2">;
4609
+ eventId: z.ZodString;
4610
+ tenantId: z.ZodString;
4611
+ sessionId: z.ZodString;
4612
+ runId: z.ZodNullable<z.ZodString>;
4613
+ turnId: z.ZodNullable<z.ZodString>;
4614
+ incarnation: z.ZodNumber;
4615
+ epoch: z.ZodNumber;
4616
+ seq: z.ZodNumber;
4617
+ cursor: z.ZodString;
4618
+ time: z.ZodString;
4619
+ schemaVersion: z.ZodNumber;
4620
+ source: z.ZodObject<{
4621
+ kind: z.ZodEnum<{
4622
+ api: "api";
4623
+ controller: "controller";
4624
+ edge: "edge";
4625
+ "egress-gate": "egress-gate";
4626
+ evidence: "evidence";
4627
+ harness: "harness";
4628
+ human: "human";
4629
+ init: "init";
4630
+ loop: "loop";
4631
+ "model-gate": "model-gate";
4632
+ operator: "operator";
4633
+ sandboxd: "sandboxd";
4634
+ supervisor: "supervisor";
4635
+ "tool-gate": "tool-gate";
4636
+ }>;
4637
+ id: z.ZodString;
4638
+ }, z.core.$strip>;
4639
+ evidence: z.ZodEnum<{
4640
+ asserted: "asserted";
4641
+ attested: "attested";
4642
+ claimed: "claimed";
4643
+ measured: "measured";
4644
+ observed: "observed";
4645
+ }>;
4646
+ trace: z.ZodOptional<z.ZodObject<{
4647
+ traceId: z.ZodString;
4648
+ spanId: z.ZodString;
4649
+ parentSpanId: z.ZodOptional<z.ZodString>;
4650
+ }, z.core.$strip>>;
4651
+ visibility: z.ZodEnum<{
4652
+ internal: "internal";
4653
+ public: "public";
4654
+ restricted: "restricted";
4655
+ }>;
4656
+ retention: z.ZodEnum<{
4657
+ full: "full";
4658
+ metadata: "metadata";
4659
+ }>;
4660
+ } & {
4661
+ type: z.ZodLiteral<"sandbox.exec">;
4662
+ payload: z.ZodObject<{
4663
+ tool: z.ZodString;
4664
+ command: z.ZodOptional<z.ZodString>;
4665
+ outcome: z.ZodString;
4666
+ code: z.ZodOptional<z.ZodString>;
4667
+ durationMs: z.ZodNumber;
4668
+ }, z.core.$loose>;
4669
+ }, z.core.$strip> | z.ZodObject<{
4670
+ schema: z.ZodLiteral<"nylorun.event/2">;
4671
+ eventId: z.ZodString;
4672
+ tenantId: z.ZodString;
4673
+ sessionId: z.ZodString;
4674
+ runId: z.ZodNullable<z.ZodString>;
4675
+ turnId: z.ZodNullable<z.ZodString>;
4676
+ incarnation: z.ZodNumber;
4677
+ epoch: z.ZodNumber;
4678
+ seq: z.ZodNumber;
4679
+ cursor: z.ZodString;
4680
+ time: z.ZodString;
4681
+ schemaVersion: z.ZodNumber;
4682
+ source: z.ZodObject<{
4683
+ kind: z.ZodEnum<{
4684
+ api: "api";
4685
+ controller: "controller";
4686
+ edge: "edge";
4687
+ "egress-gate": "egress-gate";
4688
+ evidence: "evidence";
4689
+ harness: "harness";
4690
+ human: "human";
4691
+ init: "init";
4692
+ loop: "loop";
4693
+ "model-gate": "model-gate";
4694
+ operator: "operator";
4695
+ sandboxd: "sandboxd";
4696
+ supervisor: "supervisor";
4697
+ "tool-gate": "tool-gate";
4698
+ }>;
4699
+ id: z.ZodString;
4700
+ }, z.core.$strip>;
4701
+ evidence: z.ZodEnum<{
4702
+ asserted: "asserted";
4703
+ attested: "attested";
4704
+ claimed: "claimed";
4705
+ measured: "measured";
4706
+ observed: "observed";
4707
+ }>;
4708
+ trace: z.ZodOptional<z.ZodObject<{
4709
+ traceId: z.ZodString;
4710
+ spanId: z.ZodString;
4711
+ parentSpanId: z.ZodOptional<z.ZodString>;
4712
+ }, z.core.$strip>>;
4713
+ visibility: z.ZodEnum<{
4714
+ internal: "internal";
4715
+ public: "public";
4716
+ restricted: "restricted";
4717
+ }>;
4718
+ retention: z.ZodEnum<{
4719
+ full: "full";
4720
+ metadata: "metadata";
4721
+ }>;
4722
+ } & {
4723
+ type: z.ZodLiteral<"sandbox.state">;
4724
+ payload: z.ZodObject<{
4725
+ state: z.ZodEnum<{
4726
+ creating: "creating";
4727
+ running: "running";
4728
+ stopped: "stopped";
4729
+ }>;
4730
+ backend: z.ZodString;
4731
+ isolation: z.ZodOptional<z.ZodString>;
4732
+ image: z.ZodOptional<z.ZodString>;
4733
+ network: z.ZodOptional<z.ZodUnknown>;
4734
+ reattach: z.ZodOptional<z.ZodBoolean>;
4735
+ lost: z.ZodOptional<z.ZodBoolean>;
4736
+ note: z.ZodOptional<z.ZodString>;
4737
+ error: z.ZodOptional<z.ZodString>;
4738
+ }, z.core.$loose>;
4739
+ }, z.core.$strip> | z.ZodObject<{
4740
+ schema: z.ZodLiteral<"nylorun.event/2">;
4741
+ eventId: z.ZodString;
4742
+ tenantId: z.ZodString;
4743
+ sessionId: z.ZodString;
4744
+ runId: z.ZodNullable<z.ZodString>;
4745
+ turnId: z.ZodNullable<z.ZodString>;
4746
+ incarnation: z.ZodNumber;
4747
+ epoch: z.ZodNumber;
4748
+ seq: z.ZodNumber;
4749
+ cursor: z.ZodString;
4750
+ time: z.ZodString;
4751
+ schemaVersion: z.ZodNumber;
4752
+ source: z.ZodObject<{
4753
+ kind: z.ZodEnum<{
4754
+ api: "api";
4755
+ controller: "controller";
4756
+ edge: "edge";
4757
+ "egress-gate": "egress-gate";
4758
+ evidence: "evidence";
4759
+ harness: "harness";
4760
+ human: "human";
4761
+ init: "init";
4762
+ loop: "loop";
4763
+ "model-gate": "model-gate";
4764
+ operator: "operator";
4765
+ sandboxd: "sandboxd";
4766
+ supervisor: "supervisor";
4767
+ "tool-gate": "tool-gate";
4768
+ }>;
4769
+ id: z.ZodString;
4770
+ }, z.core.$strip>;
4771
+ evidence: z.ZodEnum<{
4772
+ asserted: "asserted";
4773
+ attested: "attested";
4774
+ claimed: "claimed";
4775
+ measured: "measured";
4776
+ observed: "observed";
4777
+ }>;
4778
+ trace: z.ZodOptional<z.ZodObject<{
4779
+ traceId: z.ZodString;
4780
+ spanId: z.ZodString;
4781
+ parentSpanId: z.ZodOptional<z.ZodString>;
4782
+ }, z.core.$strip>>;
4783
+ visibility: z.ZodEnum<{
4784
+ internal: "internal";
4785
+ public: "public";
4786
+ restricted: "restricted";
4787
+ }>;
4788
+ retention: z.ZodEnum<{
4789
+ full: "full";
4790
+ metadata: "metadata";
4791
+ }>;
4792
+ } & {
4793
+ type: z.ZodLiteral<"tool.completed">;
4794
+ payload: z.ZodObject<{
4795
+ agent: z.ZodOptional<z.ZodObject<{
4796
+ id: z.ZodString;
4797
+ path: z.ZodString;
4798
+ delegationId: z.ZodOptional<z.ZodString>;
4799
+ }, z.core.$loose>>;
4800
+ callId: z.ZodString;
4801
+ invocationId: z.ZodString;
4802
+ capabilityId: z.ZodString;
4803
+ toolName: z.ZodString;
4804
+ output: z.ZodOptional<z.ZodUnknown>;
4805
+ error: z.ZodOptional<z.ZodObject<{
4806
+ code: z.ZodString;
4807
+ message: z.ZodString;
4808
+ }, z.core.$loose>>;
4809
+ }, z.core.$loose>;
4810
+ }, z.core.$strip> | z.ZodObject<{
4811
+ schema: z.ZodLiteral<"nylorun.event/2">;
4812
+ eventId: z.ZodString;
4813
+ tenantId: z.ZodString;
4814
+ sessionId: z.ZodString;
4815
+ runId: z.ZodNullable<z.ZodString>;
4816
+ turnId: z.ZodNullable<z.ZodString>;
4817
+ incarnation: z.ZodNumber;
4818
+ epoch: z.ZodNumber;
4819
+ seq: z.ZodNumber;
4820
+ cursor: z.ZodString;
4821
+ time: z.ZodString;
4822
+ schemaVersion: z.ZodNumber;
4823
+ source: z.ZodObject<{
4824
+ kind: z.ZodEnum<{
4825
+ api: "api";
4826
+ controller: "controller";
4827
+ edge: "edge";
4828
+ "egress-gate": "egress-gate";
4829
+ evidence: "evidence";
4830
+ harness: "harness";
4831
+ human: "human";
4832
+ init: "init";
4833
+ loop: "loop";
4834
+ "model-gate": "model-gate";
4835
+ operator: "operator";
4836
+ sandboxd: "sandboxd";
4837
+ supervisor: "supervisor";
4838
+ "tool-gate": "tool-gate";
4839
+ }>;
4840
+ id: z.ZodString;
4841
+ }, z.core.$strip>;
4842
+ evidence: z.ZodEnum<{
4843
+ asserted: "asserted";
4844
+ attested: "attested";
4845
+ claimed: "claimed";
4846
+ measured: "measured";
4847
+ observed: "observed";
4848
+ }>;
4849
+ trace: z.ZodOptional<z.ZodObject<{
4850
+ traceId: z.ZodString;
4851
+ spanId: z.ZodString;
4852
+ parentSpanId: z.ZodOptional<z.ZodString>;
4853
+ }, z.core.$strip>>;
4854
+ visibility: z.ZodEnum<{
4855
+ internal: "internal";
4856
+ public: "public";
4857
+ restricted: "restricted";
4858
+ }>;
4859
+ retention: z.ZodEnum<{
4860
+ full: "full";
4861
+ metadata: "metadata";
4862
+ }>;
4863
+ } & {
4864
+ type: z.ZodLiteral<"transcript.updated">;
4865
+ payload: z.ZodObject<{
4866
+ keep: z.ZodNumber;
4867
+ entries: z.ZodArray<z.ZodUnknown>;
4868
+ length: z.ZodNumber;
4869
+ }, z.core.$loose>;
4870
+ }, z.core.$strip> | z.ZodObject<{
4871
+ schema: z.ZodLiteral<"nylorun.event/2">;
4872
+ eventId: z.ZodString;
4873
+ tenantId: z.ZodString;
4874
+ sessionId: z.ZodString;
4875
+ runId: z.ZodNullable<z.ZodString>;
4876
+ turnId: z.ZodNullable<z.ZodString>;
4877
+ incarnation: z.ZodNumber;
4878
+ epoch: z.ZodNumber;
4879
+ seq: z.ZodNumber;
4880
+ cursor: z.ZodString;
4881
+ time: z.ZodString;
4882
+ schemaVersion: z.ZodNumber;
4883
+ source: z.ZodObject<{
4884
+ kind: z.ZodEnum<{
4885
+ api: "api";
4886
+ controller: "controller";
4887
+ edge: "edge";
4888
+ "egress-gate": "egress-gate";
4889
+ evidence: "evidence";
4890
+ harness: "harness";
4891
+ human: "human";
4892
+ init: "init";
4893
+ loop: "loop";
4894
+ "model-gate": "model-gate";
4895
+ operator: "operator";
4896
+ sandboxd: "sandboxd";
4897
+ supervisor: "supervisor";
4898
+ "tool-gate": "tool-gate";
4899
+ }>;
4900
+ id: z.ZodString;
4901
+ }, z.core.$strip>;
4902
+ evidence: z.ZodEnum<{
4903
+ asserted: "asserted";
4904
+ attested: "attested";
4905
+ claimed: "claimed";
4906
+ measured: "measured";
4907
+ observed: "observed";
4908
+ }>;
4909
+ trace: z.ZodOptional<z.ZodObject<{
4910
+ traceId: z.ZodString;
4911
+ spanId: z.ZodString;
4912
+ parentSpanId: z.ZodOptional<z.ZodString>;
4913
+ }, z.core.$strip>>;
4914
+ visibility: z.ZodEnum<{
4915
+ internal: "internal";
4916
+ public: "public";
4917
+ restricted: "restricted";
4918
+ }>;
4919
+ retention: z.ZodEnum<{
4920
+ full: "full";
4921
+ metadata: "metadata";
4922
+ }>;
4923
+ } & {
4924
+ type: z.ZodLiteral<"turn.cancelled">;
4925
+ payload: z.ZodObject<{
4926
+ reason: z.ZodOptional<z.ZodString>;
4927
+ }, z.core.$loose>;
4928
+ }, z.core.$strip> | z.ZodObject<{
4929
+ schema: z.ZodLiteral<"nylorun.event/2">;
4930
+ eventId: z.ZodString;
4931
+ tenantId: z.ZodString;
4932
+ sessionId: z.ZodString;
4933
+ runId: z.ZodNullable<z.ZodString>;
4934
+ turnId: z.ZodNullable<z.ZodString>;
4935
+ incarnation: z.ZodNumber;
4936
+ epoch: z.ZodNumber;
4937
+ seq: z.ZodNumber;
4938
+ cursor: z.ZodString;
4939
+ time: z.ZodString;
4940
+ schemaVersion: z.ZodNumber;
4941
+ source: z.ZodObject<{
4942
+ kind: z.ZodEnum<{
4943
+ api: "api";
4944
+ controller: "controller";
4945
+ edge: "edge";
4946
+ "egress-gate": "egress-gate";
4947
+ evidence: "evidence";
4948
+ harness: "harness";
4949
+ human: "human";
4950
+ init: "init";
4951
+ loop: "loop";
4952
+ "model-gate": "model-gate";
4953
+ operator: "operator";
4954
+ sandboxd: "sandboxd";
4955
+ supervisor: "supervisor";
4956
+ "tool-gate": "tool-gate";
4957
+ }>;
4958
+ id: z.ZodString;
4959
+ }, z.core.$strip>;
4960
+ evidence: z.ZodEnum<{
4961
+ asserted: "asserted";
4962
+ attested: "attested";
4963
+ claimed: "claimed";
4964
+ measured: "measured";
4965
+ observed: "observed";
4966
+ }>;
4967
+ trace: z.ZodOptional<z.ZodObject<{
4968
+ traceId: z.ZodString;
4969
+ spanId: z.ZodString;
4970
+ parentSpanId: z.ZodOptional<z.ZodString>;
4971
+ }, z.core.$strip>>;
4972
+ visibility: z.ZodEnum<{
4973
+ internal: "internal";
4974
+ public: "public";
4975
+ restricted: "restricted";
4976
+ }>;
4977
+ retention: z.ZodEnum<{
4978
+ full: "full";
4979
+ metadata: "metadata";
4980
+ }>;
4981
+ } & {
4982
+ type: z.ZodLiteral<"turn.completed">;
4983
+ payload: z.ZodObject<{
4984
+ output: z.ZodUnknown;
4985
+ }, z.core.$loose>;
4986
+ }, z.core.$strip> | z.ZodObject<{
4987
+ schema: z.ZodLiteral<"nylorun.event/2">;
4988
+ eventId: z.ZodString;
4989
+ tenantId: z.ZodString;
4990
+ sessionId: z.ZodString;
4991
+ runId: z.ZodNullable<z.ZodString>;
4992
+ turnId: z.ZodNullable<z.ZodString>;
4993
+ incarnation: z.ZodNumber;
4994
+ epoch: z.ZodNumber;
4995
+ seq: z.ZodNumber;
4996
+ cursor: z.ZodString;
4997
+ time: z.ZodString;
4998
+ schemaVersion: z.ZodNumber;
4999
+ source: z.ZodObject<{
5000
+ kind: z.ZodEnum<{
5001
+ api: "api";
5002
+ controller: "controller";
5003
+ edge: "edge";
5004
+ "egress-gate": "egress-gate";
5005
+ evidence: "evidence";
5006
+ harness: "harness";
5007
+ human: "human";
5008
+ init: "init";
5009
+ loop: "loop";
5010
+ "model-gate": "model-gate";
5011
+ operator: "operator";
5012
+ sandboxd: "sandboxd";
5013
+ supervisor: "supervisor";
5014
+ "tool-gate": "tool-gate";
5015
+ }>;
5016
+ id: z.ZodString;
5017
+ }, z.core.$strip>;
5018
+ evidence: z.ZodEnum<{
5019
+ asserted: "asserted";
5020
+ attested: "attested";
5021
+ claimed: "claimed";
5022
+ measured: "measured";
5023
+ observed: "observed";
5024
+ }>;
5025
+ trace: z.ZodOptional<z.ZodObject<{
5026
+ traceId: z.ZodString;
5027
+ spanId: z.ZodString;
5028
+ parentSpanId: z.ZodOptional<z.ZodString>;
5029
+ }, z.core.$strip>>;
5030
+ visibility: z.ZodEnum<{
5031
+ internal: "internal";
5032
+ public: "public";
5033
+ restricted: "restricted";
5034
+ }>;
5035
+ retention: z.ZodEnum<{
5036
+ full: "full";
5037
+ metadata: "metadata";
5038
+ }>;
5039
+ } & {
5040
+ type: z.ZodLiteral<"turn.failed">;
5041
+ payload: z.ZodObject<{
5042
+ error: z.ZodOptional<z.ZodObject<{
5043
+ code: z.ZodOptional<z.ZodString>;
5044
+ message: z.ZodOptional<z.ZodString>;
5045
+ }, z.core.$loose>>;
5046
+ message: z.ZodOptional<z.ZodString>;
5047
+ }, z.core.$loose>;
5048
+ }, z.core.$strip> | z.ZodObject<{
5049
+ schema: z.ZodLiteral<"nylorun.event/2">;
5050
+ eventId: z.ZodString;
5051
+ tenantId: z.ZodString;
5052
+ sessionId: z.ZodString;
5053
+ runId: z.ZodNullable<z.ZodString>;
5054
+ turnId: z.ZodNullable<z.ZodString>;
5055
+ incarnation: z.ZodNumber;
5056
+ epoch: z.ZodNumber;
5057
+ seq: z.ZodNumber;
5058
+ cursor: z.ZodString;
5059
+ time: z.ZodString;
5060
+ schemaVersion: z.ZodNumber;
5061
+ source: z.ZodObject<{
5062
+ kind: z.ZodEnum<{
5063
+ api: "api";
5064
+ controller: "controller";
5065
+ edge: "edge";
5066
+ "egress-gate": "egress-gate";
5067
+ evidence: "evidence";
5068
+ harness: "harness";
5069
+ human: "human";
5070
+ init: "init";
5071
+ loop: "loop";
5072
+ "model-gate": "model-gate";
5073
+ operator: "operator";
5074
+ sandboxd: "sandboxd";
5075
+ supervisor: "supervisor";
5076
+ "tool-gate": "tool-gate";
5077
+ }>;
5078
+ id: z.ZodString;
5079
+ }, z.core.$strip>;
5080
+ evidence: z.ZodEnum<{
5081
+ asserted: "asserted";
5082
+ attested: "attested";
5083
+ claimed: "claimed";
5084
+ measured: "measured";
5085
+ observed: "observed";
5086
+ }>;
5087
+ trace: z.ZodOptional<z.ZodObject<{
5088
+ traceId: z.ZodString;
5089
+ spanId: z.ZodString;
5090
+ parentSpanId: z.ZodOptional<z.ZodString>;
5091
+ }, z.core.$strip>>;
5092
+ visibility: z.ZodEnum<{
5093
+ internal: "internal";
5094
+ public: "public";
5095
+ restricted: "restricted";
5096
+ }>;
5097
+ retention: z.ZodEnum<{
5098
+ full: "full";
5099
+ metadata: "metadata";
5100
+ }>;
5101
+ } & {
5102
+ type: z.ZodLiteral<"turn.paused">;
5103
+ payload: z.ZodObject<{
5104
+ interactions: z.ZodArray<z.ZodObject<{
5105
+ invocationId: z.ZodString;
5106
+ interaction: z.ZodObject<{
5107
+ id: z.ZodString;
5108
+ kind: z.ZodString;
5109
+ }, z.core.$loose>;
5110
+ status: z.ZodOptional<z.ZodString>;
5111
+ }, z.core.$loose>>;
5112
+ }, z.core.$loose>;
5113
+ }, z.core.$strip>)[]], "type">;
5114
+ export declare const SessionItemsResponse: z.ZodObject<{
5115
+ cursor: z.ZodNullable<z.ZodString>;
5116
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
5117
+ schema: z.ZodLiteral<"nylorun.event/2">;
5118
+ eventId: z.ZodString;
5119
+ tenantId: z.ZodString;
5120
+ sessionId: z.ZodString;
5121
+ runId: z.ZodNullable<z.ZodString>;
5122
+ turnId: z.ZodNullable<z.ZodString>;
5123
+ incarnation: z.ZodNumber;
5124
+ epoch: z.ZodNumber;
5125
+ seq: z.ZodNumber;
5126
+ cursor: z.ZodString;
5127
+ time: z.ZodString;
5128
+ schemaVersion: z.ZodNumber;
5129
+ source: z.ZodObject<{
5130
+ kind: z.ZodEnum<{
5131
+ api: "api";
5132
+ controller: "controller";
5133
+ edge: "edge";
5134
+ "egress-gate": "egress-gate";
5135
+ evidence: "evidence";
5136
+ harness: "harness";
5137
+ human: "human";
5138
+ init: "init";
5139
+ loop: "loop";
5140
+ "model-gate": "model-gate";
5141
+ operator: "operator";
5142
+ sandboxd: "sandboxd";
5143
+ supervisor: "supervisor";
5144
+ "tool-gate": "tool-gate";
5145
+ }>;
5146
+ id: z.ZodString;
5147
+ }, z.core.$strip>;
5148
+ evidence: z.ZodEnum<{
5149
+ asserted: "asserted";
5150
+ attested: "attested";
5151
+ claimed: "claimed";
5152
+ measured: "measured";
5153
+ observed: "observed";
5154
+ }>;
5155
+ trace: z.ZodOptional<z.ZodObject<{
5156
+ traceId: z.ZodString;
5157
+ spanId: z.ZodString;
5158
+ parentSpanId: z.ZodOptional<z.ZodString>;
5159
+ }, z.core.$strip>>;
5160
+ visibility: z.ZodEnum<{
5161
+ internal: "internal";
5162
+ public: "public";
5163
+ restricted: "restricted";
5164
+ }>;
5165
+ retention: z.ZodEnum<{
5166
+ full: "full";
5167
+ metadata: "metadata";
5168
+ }>;
5169
+ } & {
5170
+ type: z.ZodLiteral<"action.completed">;
5171
+ payload: z.ZodObject<{
5172
+ agent: z.ZodOptional<z.ZodObject<{
5173
+ id: z.ZodString;
5174
+ path: z.ZodString;
5175
+ delegationId: z.ZodOptional<z.ZodString>;
5176
+ }, z.core.$loose>>;
5177
+ actionId: z.ZodString;
5178
+ kind: z.ZodString;
5179
+ toolName: z.ZodOptional<z.ZodString>;
5180
+ path: z.ZodOptional<z.ZodString>;
5181
+ key: z.ZodOptional<z.ZodString>;
5182
+ callId: z.ZodOptional<z.ZodString>;
5183
+ invocationId: z.ZodOptional<z.ZodString>;
5184
+ result: z.ZodUnknown;
5185
+ }, z.core.$loose>;
5186
+ }, z.core.$strip> | z.ZodObject<{
5187
+ schema: z.ZodLiteral<"nylorun.event/2">;
5188
+ eventId: z.ZodString;
5189
+ tenantId: z.ZodString;
5190
+ sessionId: z.ZodString;
5191
+ runId: z.ZodNullable<z.ZodString>;
5192
+ turnId: z.ZodNullable<z.ZodString>;
5193
+ incarnation: z.ZodNumber;
5194
+ epoch: z.ZodNumber;
5195
+ seq: z.ZodNumber;
5196
+ cursor: z.ZodString;
5197
+ time: z.ZodString;
5198
+ schemaVersion: z.ZodNumber;
5199
+ source: z.ZodObject<{
5200
+ kind: z.ZodEnum<{
5201
+ api: "api";
5202
+ controller: "controller";
5203
+ edge: "edge";
5204
+ "egress-gate": "egress-gate";
5205
+ evidence: "evidence";
5206
+ harness: "harness";
5207
+ human: "human";
5208
+ init: "init";
5209
+ loop: "loop";
5210
+ "model-gate": "model-gate";
5211
+ operator: "operator";
5212
+ sandboxd: "sandboxd";
5213
+ supervisor: "supervisor";
5214
+ "tool-gate": "tool-gate";
5215
+ }>;
5216
+ id: z.ZodString;
5217
+ }, z.core.$strip>;
5218
+ evidence: z.ZodEnum<{
5219
+ asserted: "asserted";
5220
+ attested: "attested";
5221
+ claimed: "claimed";
5222
+ measured: "measured";
5223
+ observed: "observed";
5224
+ }>;
5225
+ trace: z.ZodOptional<z.ZodObject<{
5226
+ traceId: z.ZodString;
5227
+ spanId: z.ZodString;
5228
+ parentSpanId: z.ZodOptional<z.ZodString>;
5229
+ }, z.core.$strip>>;
5230
+ visibility: z.ZodEnum<{
5231
+ internal: "internal";
5232
+ public: "public";
5233
+ restricted: "restricted";
5234
+ }>;
5235
+ retention: z.ZodEnum<{
5236
+ full: "full";
5237
+ metadata: "metadata";
5238
+ }>;
5239
+ } & {
5240
+ type: z.ZodLiteral<"action.delivered">;
5241
+ payload: z.ZodObject<{
5242
+ agent: z.ZodOptional<z.ZodObject<{
5243
+ id: z.ZodString;
5244
+ path: z.ZodString;
5245
+ delegationId: z.ZodOptional<z.ZodString>;
5246
+ }, z.core.$loose>>;
5247
+ actionId: z.ZodString;
5248
+ generation: z.ZodNumber;
5249
+ }, z.core.$loose>;
5250
+ }, z.core.$strip> | z.ZodObject<{
5251
+ schema: z.ZodLiteral<"nylorun.event/2">;
5252
+ eventId: z.ZodString;
5253
+ tenantId: z.ZodString;
5254
+ sessionId: z.ZodString;
5255
+ runId: z.ZodNullable<z.ZodString>;
5256
+ turnId: z.ZodNullable<z.ZodString>;
5257
+ incarnation: z.ZodNumber;
5258
+ epoch: z.ZodNumber;
5259
+ seq: z.ZodNumber;
5260
+ cursor: z.ZodString;
5261
+ time: z.ZodString;
5262
+ schemaVersion: z.ZodNumber;
5263
+ source: z.ZodObject<{
5264
+ kind: z.ZodEnum<{
5265
+ api: "api";
5266
+ controller: "controller";
5267
+ edge: "edge";
5268
+ "egress-gate": "egress-gate";
5269
+ evidence: "evidence";
5270
+ harness: "harness";
5271
+ human: "human";
5272
+ init: "init";
5273
+ loop: "loop";
5274
+ "model-gate": "model-gate";
5275
+ operator: "operator";
5276
+ sandboxd: "sandboxd";
5277
+ supervisor: "supervisor";
5278
+ "tool-gate": "tool-gate";
5279
+ }>;
5280
+ id: z.ZodString;
5281
+ }, z.core.$strip>;
5282
+ evidence: z.ZodEnum<{
5283
+ asserted: "asserted";
5284
+ attested: "attested";
5285
+ claimed: "claimed";
5286
+ measured: "measured";
5287
+ observed: "observed";
5288
+ }>;
5289
+ trace: z.ZodOptional<z.ZodObject<{
5290
+ traceId: z.ZodString;
5291
+ spanId: z.ZodString;
5292
+ parentSpanId: z.ZodOptional<z.ZodString>;
5293
+ }, z.core.$strip>>;
5294
+ visibility: z.ZodEnum<{
5295
+ internal: "internal";
5296
+ public: "public";
5297
+ restricted: "restricted";
5298
+ }>;
5299
+ retention: z.ZodEnum<{
5300
+ full: "full";
5301
+ metadata: "metadata";
5302
+ }>;
5303
+ } & {
5304
+ type: z.ZodLiteral<"action.delivery_failed">;
5305
+ payload: z.ZodObject<{
5306
+ actionId: z.ZodString;
5307
+ generation: z.ZodNumber;
5308
+ reason: z.ZodString;
5309
+ message: z.ZodOptional<z.ZodString>;
5310
+ retryInMs: z.ZodNumber;
5311
+ }, z.core.$loose>;
5312
+ }, z.core.$strip> | z.ZodObject<{
5313
+ schema: z.ZodLiteral<"nylorun.event/2">;
5314
+ eventId: z.ZodString;
5315
+ tenantId: z.ZodString;
5316
+ sessionId: z.ZodString;
5317
+ runId: z.ZodNullable<z.ZodString>;
5318
+ turnId: z.ZodNullable<z.ZodString>;
5319
+ incarnation: z.ZodNumber;
5320
+ epoch: z.ZodNumber;
5321
+ seq: z.ZodNumber;
5322
+ cursor: z.ZodString;
5323
+ time: z.ZodString;
5324
+ schemaVersion: z.ZodNumber;
5325
+ source: z.ZodObject<{
5326
+ kind: z.ZodEnum<{
5327
+ api: "api";
5328
+ controller: "controller";
5329
+ edge: "edge";
5330
+ "egress-gate": "egress-gate";
5331
+ evidence: "evidence";
5332
+ harness: "harness";
5333
+ human: "human";
5334
+ init: "init";
5335
+ loop: "loop";
5336
+ "model-gate": "model-gate";
5337
+ operator: "operator";
5338
+ sandboxd: "sandboxd";
5339
+ supervisor: "supervisor";
5340
+ "tool-gate": "tool-gate";
5341
+ }>;
5342
+ id: z.ZodString;
5343
+ }, z.core.$strip>;
5344
+ evidence: z.ZodEnum<{
5345
+ asserted: "asserted";
5346
+ attested: "attested";
5347
+ claimed: "claimed";
5348
+ measured: "measured";
5349
+ observed: "observed";
5350
+ }>;
5351
+ trace: z.ZodOptional<z.ZodObject<{
5352
+ traceId: z.ZodString;
5353
+ spanId: z.ZodString;
5354
+ parentSpanId: z.ZodOptional<z.ZodString>;
5355
+ }, z.core.$strip>>;
5356
+ visibility: z.ZodEnum<{
5357
+ internal: "internal";
5358
+ public: "public";
5359
+ restricted: "restricted";
5360
+ }>;
5361
+ retention: z.ZodEnum<{
5362
+ full: "full";
5363
+ metadata: "metadata";
5364
+ }>;
5365
+ } & {
5366
+ type: z.ZodLiteral<"action.pending">;
5367
+ payload: z.ZodObject<{
5368
+ agent: z.ZodOptional<z.ZodObject<{
5369
+ id: z.ZodString;
5370
+ path: z.ZodString;
5371
+ delegationId: z.ZodOptional<z.ZodString>;
5372
+ }, z.core.$loose>>;
5373
+ actionId: z.ZodString;
5374
+ kind: z.ZodString;
5375
+ toolName: z.ZodOptional<z.ZodString>;
5376
+ path: z.ZodOptional<z.ZodString>;
5377
+ key: z.ZodOptional<z.ZodString>;
5378
+ callId: z.ZodOptional<z.ZodString>;
5379
+ invocationId: z.ZodOptional<z.ZodString>;
5380
+ input: z.ZodUnknown;
5381
+ }, z.core.$loose>;
5382
+ }, z.core.$strip> | z.ZodObject<{
5383
+ schema: z.ZodLiteral<"nylorun.event/2">;
5384
+ eventId: z.ZodString;
5385
+ tenantId: z.ZodString;
5386
+ sessionId: z.ZodString;
5387
+ runId: z.ZodNullable<z.ZodString>;
5388
+ turnId: z.ZodNullable<z.ZodString>;
5389
+ incarnation: z.ZodNumber;
5390
+ epoch: z.ZodNumber;
5391
+ seq: z.ZodNumber;
5392
+ cursor: z.ZodString;
5393
+ time: z.ZodString;
5394
+ schemaVersion: z.ZodNumber;
5395
+ source: z.ZodObject<{
5396
+ kind: z.ZodEnum<{
5397
+ api: "api";
5398
+ controller: "controller";
5399
+ edge: "edge";
5400
+ "egress-gate": "egress-gate";
5401
+ evidence: "evidence";
5402
+ harness: "harness";
5403
+ human: "human";
5404
+ init: "init";
5405
+ loop: "loop";
5406
+ "model-gate": "model-gate";
5407
+ operator: "operator";
5408
+ sandboxd: "sandboxd";
5409
+ supervisor: "supervisor";
5410
+ "tool-gate": "tool-gate";
5411
+ }>;
5412
+ id: z.ZodString;
5413
+ }, z.core.$strip>;
5414
+ evidence: z.ZodEnum<{
5415
+ asserted: "asserted";
5416
+ attested: "attested";
5417
+ claimed: "claimed";
5418
+ measured: "measured";
5419
+ observed: "observed";
5420
+ }>;
5421
+ trace: z.ZodOptional<z.ZodObject<{
5422
+ traceId: z.ZodString;
5423
+ spanId: z.ZodString;
5424
+ parentSpanId: z.ZodOptional<z.ZodString>;
5425
+ }, z.core.$strip>>;
5426
+ visibility: z.ZodEnum<{
5427
+ internal: "internal";
5428
+ public: "public";
5429
+ restricted: "restricted";
5430
+ }>;
5431
+ retention: z.ZodEnum<{
5432
+ full: "full";
5433
+ metadata: "metadata";
5434
+ }>;
5435
+ } & {
5436
+ type: z.ZodLiteral<"action.uncertain">;
5437
+ payload: z.ZodObject<{
5438
+ agent: z.ZodOptional<z.ZodObject<{
5439
+ id: z.ZodString;
5440
+ path: z.ZodString;
5441
+ delegationId: z.ZodOptional<z.ZodString>;
5442
+ }, z.core.$loose>>;
5443
+ actionId: z.ZodString;
5444
+ }, z.core.$loose>;
5445
+ }, z.core.$strip> | z.ZodObject<{
5446
+ schema: z.ZodLiteral<"nylorun.event/2">;
5447
+ eventId: z.ZodString;
5448
+ tenantId: z.ZodString;
5449
+ sessionId: z.ZodString;
5450
+ runId: z.ZodNullable<z.ZodString>;
5451
+ turnId: z.ZodNullable<z.ZodString>;
5452
+ incarnation: z.ZodNumber;
5453
+ epoch: z.ZodNumber;
5454
+ seq: z.ZodNumber;
5455
+ cursor: z.ZodString;
5456
+ time: z.ZodString;
5457
+ schemaVersion: z.ZodNumber;
5458
+ source: z.ZodObject<{
5459
+ kind: z.ZodEnum<{
5460
+ api: "api";
5461
+ controller: "controller";
5462
+ edge: "edge";
5463
+ "egress-gate": "egress-gate";
5464
+ evidence: "evidence";
5465
+ harness: "harness";
5466
+ human: "human";
5467
+ init: "init";
5468
+ loop: "loop";
5469
+ "model-gate": "model-gate";
5470
+ operator: "operator";
5471
+ sandboxd: "sandboxd";
5472
+ supervisor: "supervisor";
5473
+ "tool-gate": "tool-gate";
5474
+ }>;
5475
+ id: z.ZodString;
5476
+ }, z.core.$strip>;
5477
+ evidence: z.ZodEnum<{
5478
+ asserted: "asserted";
5479
+ attested: "attested";
5480
+ claimed: "claimed";
5481
+ measured: "measured";
5482
+ observed: "observed";
5483
+ }>;
5484
+ trace: z.ZodOptional<z.ZodObject<{
5485
+ traceId: z.ZodString;
5486
+ spanId: z.ZodString;
5487
+ parentSpanId: z.ZodOptional<z.ZodString>;
5488
+ }, z.core.$strip>>;
5489
+ visibility: z.ZodEnum<{
5490
+ internal: "internal";
5491
+ public: "public";
5492
+ restricted: "restricted";
5493
+ }>;
5494
+ retention: z.ZodEnum<{
5495
+ full: "full";
5496
+ metadata: "metadata";
5497
+ }>;
5498
+ } & {
5499
+ type: z.ZodLiteral<"artifact.created">;
5500
+ payload: z.ZodObject<{
5501
+ artifactId: z.ZodString;
5502
+ kind: z.ZodEnum<{
5503
+ file: "file";
5504
+ folder: "folder";
5505
+ }>;
5506
+ name: z.ZodString;
5507
+ contentType: z.ZodString;
5508
+ version: z.ZodNumber;
5509
+ size: z.ZodNumber;
5510
+ sha256: z.ZodString;
5511
+ source: z.ZodEnum<{
5512
+ engine: "engine";
5513
+ export: "export";
5514
+ upload: "upload";
5515
+ }>;
5516
+ callId: z.ZodOptional<z.ZodString>;
5517
+ fileCount: z.ZodOptional<z.ZodNumber>;
5518
+ claimed: z.ZodOptional<z.ZodBoolean>;
5519
+ }, z.core.$loose>;
5520
+ }, z.core.$strip> | z.ZodObject<{
5521
+ schema: z.ZodLiteral<"nylorun.event/2">;
5522
+ eventId: z.ZodString;
5523
+ tenantId: z.ZodString;
5524
+ sessionId: z.ZodString;
5525
+ runId: z.ZodNullable<z.ZodString>;
5526
+ turnId: z.ZodNullable<z.ZodString>;
5527
+ incarnation: z.ZodNumber;
5528
+ epoch: z.ZodNumber;
5529
+ seq: z.ZodNumber;
5530
+ cursor: z.ZodString;
5531
+ time: z.ZodString;
5532
+ schemaVersion: z.ZodNumber;
5533
+ source: z.ZodObject<{
5534
+ kind: z.ZodEnum<{
5535
+ api: "api";
5536
+ controller: "controller";
5537
+ edge: "edge";
5538
+ "egress-gate": "egress-gate";
5539
+ evidence: "evidence";
5540
+ harness: "harness";
5541
+ human: "human";
5542
+ init: "init";
5543
+ loop: "loop";
5544
+ "model-gate": "model-gate";
5545
+ operator: "operator";
5546
+ sandboxd: "sandboxd";
5547
+ supervisor: "supervisor";
5548
+ "tool-gate": "tool-gate";
5549
+ }>;
5550
+ id: z.ZodString;
5551
+ }, z.core.$strip>;
5552
+ evidence: z.ZodEnum<{
5553
+ asserted: "asserted";
5554
+ attested: "attested";
5555
+ claimed: "claimed";
5556
+ measured: "measured";
5557
+ observed: "observed";
5558
+ }>;
5559
+ trace: z.ZodOptional<z.ZodObject<{
5560
+ traceId: z.ZodString;
5561
+ spanId: z.ZodString;
5562
+ parentSpanId: z.ZodOptional<z.ZodString>;
5563
+ }, z.core.$strip>>;
5564
+ visibility: z.ZodEnum<{
5565
+ internal: "internal";
5566
+ public: "public";
5567
+ restricted: "restricted";
5568
+ }>;
5569
+ retention: z.ZodEnum<{
5570
+ full: "full";
5571
+ metadata: "metadata";
5572
+ }>;
5573
+ } & {
5574
+ type: z.ZodLiteral<"artifact.deleted">;
5575
+ payload: z.ZodObject<{
5576
+ artifactId: z.ZodString;
5577
+ name: z.ZodString;
5578
+ }, z.core.$loose>;
5579
+ }, z.core.$strip> | z.ZodObject<{
5580
+ schema: z.ZodLiteral<"nylorun.event/2">;
5581
+ eventId: z.ZodString;
5582
+ tenantId: z.ZodString;
5583
+ sessionId: z.ZodString;
5584
+ runId: z.ZodNullable<z.ZodString>;
5585
+ turnId: z.ZodNullable<z.ZodString>;
5586
+ incarnation: z.ZodNumber;
5587
+ epoch: z.ZodNumber;
5588
+ seq: z.ZodNumber;
5589
+ cursor: z.ZodString;
5590
+ time: z.ZodString;
5591
+ schemaVersion: z.ZodNumber;
5592
+ source: z.ZodObject<{
5593
+ kind: z.ZodEnum<{
5594
+ api: "api";
5595
+ controller: "controller";
5596
+ edge: "edge";
5597
+ "egress-gate": "egress-gate";
5598
+ evidence: "evidence";
5599
+ harness: "harness";
5600
+ human: "human";
5601
+ init: "init";
5602
+ loop: "loop";
5603
+ "model-gate": "model-gate";
5604
+ operator: "operator";
5605
+ sandboxd: "sandboxd";
5606
+ supervisor: "supervisor";
5607
+ "tool-gate": "tool-gate";
5608
+ }>;
5609
+ id: z.ZodString;
5610
+ }, z.core.$strip>;
5611
+ evidence: z.ZodEnum<{
5612
+ asserted: "asserted";
5613
+ attested: "attested";
5614
+ claimed: "claimed";
5615
+ measured: "measured";
5616
+ observed: "observed";
5617
+ }>;
5618
+ trace: z.ZodOptional<z.ZodObject<{
5619
+ traceId: z.ZodString;
5620
+ spanId: z.ZodString;
5621
+ parentSpanId: z.ZodOptional<z.ZodString>;
5622
+ }, z.core.$strip>>;
5623
+ visibility: z.ZodEnum<{
5624
+ internal: "internal";
5625
+ public: "public";
5626
+ restricted: "restricted";
5627
+ }>;
5628
+ retention: z.ZodEnum<{
5629
+ full: "full";
5630
+ metadata: "metadata";
5631
+ }>;
5632
+ } & {
5633
+ type: z.ZodLiteral<"artifact.export.failed">;
5634
+ payload: z.ZodObject<{
5635
+ name: z.ZodString;
5636
+ message: z.ZodString;
5637
+ }, z.core.$loose>;
5638
+ }, z.core.$strip> | z.ZodObject<{
5639
+ schema: z.ZodLiteral<"nylorun.event/2">;
5640
+ eventId: z.ZodString;
5641
+ tenantId: z.ZodString;
5642
+ sessionId: z.ZodString;
5643
+ runId: z.ZodNullable<z.ZodString>;
5644
+ turnId: z.ZodNullable<z.ZodString>;
5645
+ incarnation: z.ZodNumber;
5646
+ epoch: z.ZodNumber;
5647
+ seq: z.ZodNumber;
5648
+ cursor: z.ZodString;
5649
+ time: z.ZodString;
5650
+ schemaVersion: z.ZodNumber;
5651
+ source: z.ZodObject<{
5652
+ kind: z.ZodEnum<{
5653
+ api: "api";
5654
+ controller: "controller";
5655
+ edge: "edge";
5656
+ "egress-gate": "egress-gate";
5657
+ evidence: "evidence";
5658
+ harness: "harness";
5659
+ human: "human";
5660
+ init: "init";
5661
+ loop: "loop";
5662
+ "model-gate": "model-gate";
5663
+ operator: "operator";
5664
+ sandboxd: "sandboxd";
5665
+ supervisor: "supervisor";
5666
+ "tool-gate": "tool-gate";
5667
+ }>;
5668
+ id: z.ZodString;
5669
+ }, z.core.$strip>;
5670
+ evidence: z.ZodEnum<{
5671
+ asserted: "asserted";
5672
+ attested: "attested";
5673
+ claimed: "claimed";
5674
+ measured: "measured";
5675
+ observed: "observed";
5676
+ }>;
5677
+ trace: z.ZodOptional<z.ZodObject<{
5678
+ traceId: z.ZodString;
5679
+ spanId: z.ZodString;
5680
+ parentSpanId: z.ZodOptional<z.ZodString>;
5681
+ }, z.core.$strip>>;
5682
+ visibility: z.ZodEnum<{
5683
+ internal: "internal";
5684
+ public: "public";
5685
+ restricted: "restricted";
5686
+ }>;
5687
+ retention: z.ZodEnum<{
5688
+ full: "full";
5689
+ metadata: "metadata";
5690
+ }>;
5691
+ } & {
5692
+ type: z.ZodLiteral<"artifact.export.skipped">;
5693
+ payload: z.ZodObject<{
5694
+ name: z.ZodString;
5695
+ reason: z.ZodEnum<{
5696
+ file_too_large: "file_too_large";
5697
+ tenant_total: "tenant_total";
5698
+ too_large: "too_large";
5699
+ too_many_files: "too_many_files";
5700
+ }>;
5701
+ message: z.ZodString;
5702
+ limit: z.ZodOptional<z.ZodNumber>;
5703
+ path: z.ZodOptional<z.ZodString>;
5704
+ }, z.core.$loose>;
5705
+ }, z.core.$strip> | z.ZodObject<{
5706
+ schema: z.ZodLiteral<"nylorun.event/2">;
5707
+ eventId: z.ZodString;
5708
+ tenantId: z.ZodString;
5709
+ sessionId: z.ZodString;
5710
+ runId: z.ZodNullable<z.ZodString>;
5711
+ turnId: z.ZodNullable<z.ZodString>;
5712
+ incarnation: z.ZodNumber;
5713
+ epoch: z.ZodNumber;
5714
+ seq: z.ZodNumber;
5715
+ cursor: z.ZodString;
5716
+ time: z.ZodString;
5717
+ schemaVersion: z.ZodNumber;
5718
+ source: z.ZodObject<{
5719
+ kind: z.ZodEnum<{
5720
+ api: "api";
5721
+ controller: "controller";
5722
+ edge: "edge";
5723
+ "egress-gate": "egress-gate";
5724
+ evidence: "evidence";
5725
+ harness: "harness";
5726
+ human: "human";
5727
+ init: "init";
5728
+ loop: "loop";
5729
+ "model-gate": "model-gate";
5730
+ operator: "operator";
5731
+ sandboxd: "sandboxd";
5732
+ supervisor: "supervisor";
5733
+ "tool-gate": "tool-gate";
5734
+ }>;
5735
+ id: z.ZodString;
5736
+ }, z.core.$strip>;
5737
+ evidence: z.ZodEnum<{
5738
+ asserted: "asserted";
5739
+ attested: "attested";
5740
+ claimed: "claimed";
5741
+ measured: "measured";
5742
+ observed: "observed";
5743
+ }>;
5744
+ trace: z.ZodOptional<z.ZodObject<{
5745
+ traceId: z.ZodString;
5746
+ spanId: z.ZodString;
5747
+ parentSpanId: z.ZodOptional<z.ZodString>;
5748
+ }, z.core.$strip>>;
5749
+ visibility: z.ZodEnum<{
5750
+ internal: "internal";
5751
+ public: "public";
5752
+ restricted: "restricted";
5753
+ }>;
5754
+ retention: z.ZodEnum<{
5755
+ full: "full";
5756
+ metadata: "metadata";
5757
+ }>;
5758
+ } & {
5759
+ type: z.ZodLiteral<"artifact.version.created">;
5760
+ payload: z.ZodObject<{
5761
+ artifactId: z.ZodString;
5762
+ kind: z.ZodEnum<{
5763
+ file: "file";
5764
+ folder: "folder";
5765
+ }>;
5766
+ name: z.ZodString;
5767
+ contentType: z.ZodString;
5768
+ version: z.ZodNumber;
5769
+ size: z.ZodNumber;
5770
+ sha256: z.ZodString;
5771
+ source: z.ZodEnum<{
5772
+ engine: "engine";
5773
+ export: "export";
5774
+ upload: "upload";
5775
+ }>;
5776
+ callId: z.ZodOptional<z.ZodString>;
5777
+ fileCount: z.ZodOptional<z.ZodNumber>;
5778
+ claimed: z.ZodOptional<z.ZodBoolean>;
5779
+ }, z.core.$loose>;
5780
+ }, z.core.$strip> | z.ZodObject<{
5781
+ schema: z.ZodLiteral<"nylorun.event/2">;
5782
+ eventId: z.ZodString;
5783
+ tenantId: z.ZodString;
5784
+ sessionId: z.ZodString;
5785
+ runId: z.ZodNullable<z.ZodString>;
5786
+ turnId: z.ZodNullable<z.ZodString>;
5787
+ incarnation: z.ZodNumber;
5788
+ epoch: z.ZodNumber;
5789
+ seq: z.ZodNumber;
5790
+ cursor: z.ZodString;
5791
+ time: z.ZodString;
5792
+ schemaVersion: z.ZodNumber;
5793
+ source: z.ZodObject<{
5794
+ kind: z.ZodEnum<{
5795
+ api: "api";
5796
+ controller: "controller";
5797
+ edge: "edge";
5798
+ "egress-gate": "egress-gate";
5799
+ evidence: "evidence";
5800
+ harness: "harness";
5801
+ human: "human";
5802
+ init: "init";
5803
+ loop: "loop";
5804
+ "model-gate": "model-gate";
5805
+ operator: "operator";
5806
+ sandboxd: "sandboxd";
5807
+ supervisor: "supervisor";
5808
+ "tool-gate": "tool-gate";
5809
+ }>;
5810
+ id: z.ZodString;
5811
+ }, z.core.$strip>;
5812
+ evidence: z.ZodEnum<{
5813
+ asserted: "asserted";
5814
+ attested: "attested";
5815
+ claimed: "claimed";
5816
+ measured: "measured";
5817
+ observed: "observed";
5818
+ }>;
5819
+ trace: z.ZodOptional<z.ZodObject<{
5820
+ traceId: z.ZodString;
5821
+ spanId: z.ZodString;
5822
+ parentSpanId: z.ZodOptional<z.ZodString>;
5823
+ }, z.core.$strip>>;
5824
+ visibility: z.ZodEnum<{
5825
+ internal: "internal";
5826
+ public: "public";
5827
+ restricted: "restricted";
5828
+ }>;
5829
+ retention: z.ZodEnum<{
5830
+ full: "full";
5831
+ metadata: "metadata";
5832
+ }>;
5833
+ } & {
5834
+ type: z.ZodLiteral<"command.approve">;
5835
+ payload: z.ZodObject<{
5836
+ requestId: z.ZodString;
5837
+ idempotencyKey: z.ZodString;
5838
+ type: z.ZodLiteral<"approve">;
5839
+ interactionId: z.ZodString;
5840
+ approved: z.ZodBoolean;
5841
+ }, z.core.$loose>;
5842
+ }, z.core.$strip> | z.ZodObject<{
5843
+ schema: z.ZodLiteral<"nylorun.event/2">;
5844
+ eventId: z.ZodString;
5845
+ tenantId: z.ZodString;
5846
+ sessionId: z.ZodString;
5847
+ runId: z.ZodNullable<z.ZodString>;
5848
+ turnId: z.ZodNullable<z.ZodString>;
5849
+ incarnation: z.ZodNumber;
5850
+ epoch: z.ZodNumber;
5851
+ seq: z.ZodNumber;
5852
+ cursor: z.ZodString;
5853
+ time: z.ZodString;
5854
+ schemaVersion: z.ZodNumber;
5855
+ source: z.ZodObject<{
5856
+ kind: z.ZodEnum<{
5857
+ api: "api";
5858
+ controller: "controller";
5859
+ edge: "edge";
5860
+ "egress-gate": "egress-gate";
5861
+ evidence: "evidence";
5862
+ harness: "harness";
5863
+ human: "human";
5864
+ init: "init";
5865
+ loop: "loop";
5866
+ "model-gate": "model-gate";
5867
+ operator: "operator";
5868
+ sandboxd: "sandboxd";
5869
+ supervisor: "supervisor";
5870
+ "tool-gate": "tool-gate";
5871
+ }>;
5872
+ id: z.ZodString;
5873
+ }, z.core.$strip>;
5874
+ evidence: z.ZodEnum<{
5875
+ asserted: "asserted";
5876
+ attested: "attested";
5877
+ claimed: "claimed";
5878
+ measured: "measured";
5879
+ observed: "observed";
5880
+ }>;
5881
+ trace: z.ZodOptional<z.ZodObject<{
5882
+ traceId: z.ZodString;
5883
+ spanId: z.ZodString;
5884
+ parentSpanId: z.ZodOptional<z.ZodString>;
5885
+ }, z.core.$strip>>;
5886
+ visibility: z.ZodEnum<{
5887
+ internal: "internal";
5888
+ public: "public";
5889
+ restricted: "restricted";
5890
+ }>;
5891
+ retention: z.ZodEnum<{
5892
+ full: "full";
5893
+ metadata: "metadata";
5894
+ }>;
5895
+ } & {
5896
+ type: z.ZodLiteral<"command.message">;
5897
+ payload: z.ZodObject<{
5898
+ requestId: z.ZodString;
5899
+ idempotencyKey: z.ZodString;
5900
+ type: z.ZodLiteral<"message">;
5901
+ content: z.ZodOptional<z.ZodString>;
5902
+ data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
5903
+ parts: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
5904
+ type: z.ZodLiteral<"text">;
5905
+ text: z.ZodString;
5906
+ }, z.core.$strict>, z.ZodObject<{
5907
+ type: z.ZodLiteral<"file">;
5908
+ artifactId: z.ZodString;
5909
+ version: z.ZodOptional<z.ZodNumber>;
5910
+ }, z.core.$strict>], "type">>>;
5911
+ manifest: z.ZodOptional<z.ZodUnknown>;
4041
5912
  }, z.core.$loose>;
4042
5913
  }, z.core.$strip> | z.ZodObject<{
4043
5914
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4093,15 +5964,13 @@ export declare const SessionItemsResponse: z.ZodObject<{
4093
5964
  metadata: "metadata";
4094
5965
  }>;
4095
5966
  } & {
4096
- type: z.ZodLiteral<"action.delivered">;
5967
+ type: z.ZodLiteral<"command.respond">;
4097
5968
  payload: z.ZodObject<{
4098
- agent: z.ZodOptional<z.ZodObject<{
4099
- id: z.ZodString;
4100
- path: z.ZodString;
4101
- delegationId: z.ZodOptional<z.ZodString>;
4102
- }, z.core.$loose>>;
4103
- actionId: z.ZodString;
4104
- generation: z.ZodNumber;
5969
+ requestId: z.ZodString;
5970
+ idempotencyKey: z.ZodString;
5971
+ type: z.ZodLiteral<"respond">;
5972
+ interactionId: z.ZodString;
5973
+ value: z.ZodUnknown;
4105
5974
  }, z.core.$loose>;
4106
5975
  }, z.core.$strip> | z.ZodObject<{
4107
5976
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4157,13 +6026,20 @@ export declare const SessionItemsResponse: z.ZodObject<{
4157
6026
  metadata: "metadata";
4158
6027
  }>;
4159
6028
  } & {
4160
- type: z.ZodLiteral<"action.delivery_failed">;
6029
+ type: z.ZodLiteral<"context.compacted">;
4161
6030
  payload: z.ZodObject<{
4162
- actionId: z.ZodString;
4163
- generation: z.ZodNumber;
4164
- reason: z.ZodString;
4165
- message: z.ZodOptional<z.ZodString>;
4166
- retryInMs: z.ZodNumber;
6031
+ agent: z.ZodOptional<z.ZodObject<{
6032
+ id: z.ZodString;
6033
+ path: z.ZodString;
6034
+ delegationId: z.ZodOptional<z.ZodString>;
6035
+ }, z.core.$loose>>;
6036
+ invocationId: z.ZodOptional<z.ZodString>;
6037
+ trigger: z.ZodEnum<{
6038
+ overflow: "overflow";
6039
+ threshold: "threshold";
6040
+ }>;
6041
+ tokensBefore: z.ZodNumber;
6042
+ tokensAfter: z.ZodNumber;
4167
6043
  }, z.core.$loose>;
4168
6044
  }, z.core.$strip> | z.ZodObject<{
4169
6045
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4219,21 +6095,14 @@ export declare const SessionItemsResponse: z.ZodObject<{
4219
6095
  metadata: "metadata";
4220
6096
  }>;
4221
6097
  } & {
4222
- type: z.ZodLiteral<"action.pending">;
6098
+ type: z.ZodLiteral<"delegation.completed">;
4223
6099
  payload: z.ZodObject<{
4224
- agent: z.ZodOptional<z.ZodObject<{
6100
+ agent: z.ZodObject<{
4225
6101
  id: z.ZodString;
4226
6102
  path: z.ZodString;
4227
6103
  delegationId: z.ZodOptional<z.ZodString>;
4228
- }, z.core.$loose>>;
4229
- actionId: z.ZodString;
4230
- kind: z.ZodString;
4231
- toolName: z.ZodOptional<z.ZodString>;
4232
- path: z.ZodOptional<z.ZodString>;
4233
- key: z.ZodOptional<z.ZodString>;
6104
+ }, z.core.$loose>;
4234
6105
  callId: z.ZodOptional<z.ZodString>;
4235
- invocationId: z.ZodOptional<z.ZodString>;
4236
- input: z.ZodUnknown;
4237
6106
  }, z.core.$loose>;
4238
6107
  }, z.core.$strip> | z.ZodObject<{
4239
6108
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4289,14 +6158,14 @@ export declare const SessionItemsResponse: z.ZodObject<{
4289
6158
  metadata: "metadata";
4290
6159
  }>;
4291
6160
  } & {
4292
- type: z.ZodLiteral<"action.uncertain">;
6161
+ type: z.ZodLiteral<"delegation.started">;
4293
6162
  payload: z.ZodObject<{
4294
- agent: z.ZodOptional<z.ZodObject<{
6163
+ agent: z.ZodObject<{
4295
6164
  id: z.ZodString;
4296
6165
  path: z.ZodString;
4297
6166
  delegationId: z.ZodOptional<z.ZodString>;
4298
- }, z.core.$loose>>;
4299
- actionId: z.ZodString;
6167
+ }, z.core.$loose>;
6168
+ callId: z.ZodOptional<z.ZodString>;
4300
6169
  }, z.core.$loose>;
4301
6170
  }, z.core.$strip> | z.ZodObject<{
4302
6171
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4352,13 +6221,10 @@ export declare const SessionItemsResponse: z.ZodObject<{
4352
6221
  metadata: "metadata";
4353
6222
  }>;
4354
6223
  } & {
4355
- type: z.ZodLiteral<"command.approve">;
6224
+ type: z.ZodLiteral<"effect.uncertain">;
4356
6225
  payload: z.ZodObject<{
4357
- requestId: z.ZodString;
4358
- idempotencyKey: z.ZodString;
4359
- type: z.ZodLiteral<"approve">;
4360
- interactionId: z.ZodString;
4361
- approved: z.ZodBoolean;
6226
+ effectId: z.ZodString;
6227
+ message: z.ZodOptional<z.ZodString>;
4362
6228
  }, z.core.$loose>;
4363
6229
  }, z.core.$strip> | z.ZodObject<{
4364
6230
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4414,14 +6280,15 @@ export declare const SessionItemsResponse: z.ZodObject<{
4414
6280
  metadata: "metadata";
4415
6281
  }>;
4416
6282
  } & {
4417
- type: z.ZodLiteral<"command.message">;
6283
+ type: z.ZodLiteral<"loop.decided">;
4418
6284
  payload: z.ZodObject<{
4419
- requestId: z.ZodString;
4420
- idempotencyKey: z.ZodString;
4421
- type: z.ZodLiteral<"message">;
4422
- content: z.ZodOptional<z.ZodString>;
4423
- data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
4424
- manifest: z.ZodOptional<z.ZodUnknown>;
6285
+ path: z.ZodString;
6286
+ n: z.ZodNumber;
6287
+ next: z.ZodEnum<{
6288
+ input: "input";
6289
+ output: "output";
6290
+ }>;
6291
+ patched: z.ZodBoolean;
4425
6292
  }, z.core.$loose>;
4426
6293
  }, z.core.$strip> | z.ZodObject<{
4427
6294
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4477,13 +6344,13 @@ export declare const SessionItemsResponse: z.ZodObject<{
4477
6344
  metadata: "metadata";
4478
6345
  }>;
4479
6346
  } & {
4480
- type: z.ZodLiteral<"command.respond">;
6347
+ type: z.ZodLiteral<"loop.iteration">;
4481
6348
  payload: z.ZodObject<{
4482
- requestId: z.ZodString;
4483
- idempotencyKey: z.ZodString;
4484
- type: z.ZodLiteral<"respond">;
4485
- interactionId: z.ZodString;
4486
- value: z.ZodUnknown;
6349
+ path: z.ZodString;
6350
+ n: z.ZodNumber;
6351
+ sessionId: z.ZodOptional<z.ZodString>;
6352
+ turnId: z.ZodOptional<z.ZodString>;
6353
+ manifestHash: z.ZodOptional<z.ZodString>;
4487
6354
  }, z.core.$loose>;
4488
6355
  }, z.core.$strip> | z.ZodObject<{
4489
6356
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4539,20 +6406,13 @@ export declare const SessionItemsResponse: z.ZodObject<{
4539
6406
  metadata: "metadata";
4540
6407
  }>;
4541
6408
  } & {
4542
- type: z.ZodLiteral<"context.compacted">;
6409
+ type: z.ZodLiteral<"loop.verified">;
4543
6410
  payload: z.ZodObject<{
4544
- agent: z.ZodOptional<z.ZodObject<{
4545
- id: z.ZodString;
4546
- path: z.ZodString;
4547
- delegationId: z.ZodOptional<z.ZodString>;
4548
- }, z.core.$loose>>;
4549
- invocationId: z.ZodOptional<z.ZodString>;
4550
- trigger: z.ZodEnum<{
4551
- overflow: "overflow";
4552
- threshold: "threshold";
4553
- }>;
4554
- tokensBefore: z.ZodNumber;
4555
- tokensAfter: z.ZodNumber;
6411
+ path: z.ZodString;
6412
+ n: z.ZodNumber;
6413
+ pass: z.ZodBoolean;
6414
+ feedback: z.ZodOptional<z.ZodString>;
6415
+ data: z.ZodOptional<z.ZodUnknown>;
4556
6416
  }, z.core.$loose>;
4557
6417
  }, z.core.$strip> | z.ZodObject<{
4558
6418
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4608,14 +6468,26 @@ export declare const SessionItemsResponse: z.ZodObject<{
4608
6468
  metadata: "metadata";
4609
6469
  }>;
4610
6470
  } & {
4611
- type: z.ZodLiteral<"delegation.completed">;
6471
+ type: z.ZodLiteral<"message.assistant">;
4612
6472
  payload: z.ZodObject<{
4613
- agent: z.ZodObject<{
6473
+ agent: z.ZodOptional<z.ZodObject<{
4614
6474
  id: z.ZodString;
4615
6475
  path: z.ZodString;
4616
6476
  delegationId: z.ZodOptional<z.ZodString>;
4617
- }, z.core.$loose>;
4618
- callId: z.ZodOptional<z.ZodString>;
6477
+ }, z.core.$loose>>;
6478
+ invocationId: z.ZodString;
6479
+ text: z.ZodString;
6480
+ model: z.ZodOptional<z.ZodObject<{
6481
+ provider: z.ZodString;
6482
+ model: z.ZodString;
6483
+ }, z.core.$loose>>;
6484
+ finishReason: z.ZodOptional<z.ZodString>;
6485
+ usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
6486
+ toolCalls: z.ZodArray<z.ZodObject<{
6487
+ callId: z.ZodString;
6488
+ name: z.ZodString;
6489
+ input: z.ZodUnknown;
6490
+ }, z.core.$loose>>;
4619
6491
  }, z.core.$loose>;
4620
6492
  }, z.core.$strip> | z.ZodObject<{
4621
6493
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4671,14 +6543,17 @@ export declare const SessionItemsResponse: z.ZodObject<{
4671
6543
  metadata: "metadata";
4672
6544
  }>;
4673
6545
  } & {
4674
- type: z.ZodLiteral<"delegation.started">;
6546
+ type: z.ZodLiteral<"model.failed">;
4675
6547
  payload: z.ZodObject<{
4676
- agent: z.ZodObject<{
6548
+ agent: z.ZodOptional<z.ZodObject<{
4677
6549
  id: z.ZodString;
4678
6550
  path: z.ZodString;
4679
6551
  delegationId: z.ZodOptional<z.ZodString>;
4680
- }, z.core.$loose>;
4681
- callId: z.ZodOptional<z.ZodString>;
6552
+ }, z.core.$loose>>;
6553
+ invocationId: z.ZodOptional<z.ZodString>;
6554
+ code: z.ZodString;
6555
+ message: z.ZodString;
6556
+ retryable: z.ZodBoolean;
4682
6557
  }, z.core.$loose>;
4683
6558
  }, z.core.$strip> | z.ZodObject<{
4684
6559
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4734,10 +6609,12 @@ export declare const SessionItemsResponse: z.ZodObject<{
4734
6609
  metadata: "metadata";
4735
6610
  }>;
4736
6611
  } & {
4737
- type: z.ZodLiteral<"effect.uncertain">;
6612
+ type: z.ZodLiteral<"node.agent">;
4738
6613
  payload: z.ZodObject<{
4739
- effectId: z.ZodString;
4740
- message: z.ZodOptional<z.ZodString>;
6614
+ path: z.ZodString;
6615
+ iterations: z.ZodOptional<z.ZodString>;
6616
+ sessionId: z.ZodString;
6617
+ turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4741
6618
  }, z.core.$loose>;
4742
6619
  }, z.core.$strip> | z.ZodObject<{
4743
6620
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4793,15 +6670,12 @@ export declare const SessionItemsResponse: z.ZodObject<{
4793
6670
  metadata: "metadata";
4794
6671
  }>;
4795
6672
  } & {
4796
- type: z.ZodLiteral<"loop.decided">;
6673
+ type: z.ZodLiteral<"node.started">;
4797
6674
  payload: z.ZodObject<{
4798
6675
  path: z.ZodString;
4799
- n: z.ZodNumber;
4800
- next: z.ZodEnum<{
4801
- input: "input";
4802
- output: "output";
4803
- }>;
4804
- patched: z.ZodBoolean;
6676
+ kind: z.ZodString;
6677
+ key: z.ZodString;
6678
+ iterations: z.ZodOptional<z.ZodString>;
4805
6679
  }, z.core.$loose>;
4806
6680
  }, z.core.$strip> | z.ZodObject<{
4807
6681
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4857,13 +6731,9 @@ export declare const SessionItemsResponse: z.ZodObject<{
4857
6731
  metadata: "metadata";
4858
6732
  }>;
4859
6733
  } & {
4860
- type: z.ZodLiteral<"loop.iteration">;
6734
+ type: z.ZodLiteral<"sandbox.attached">;
4861
6735
  payload: z.ZodObject<{
4862
- path: z.ZodString;
4863
- n: z.ZodNumber;
4864
- sessionId: z.ZodOptional<z.ZodString>;
4865
- turnId: z.ZodOptional<z.ZodString>;
4866
- manifestHash: z.ZodOptional<z.ZodString>;
6736
+ sandboxId: z.ZodString;
4867
6737
  }, z.core.$loose>;
4868
6738
  }, z.core.$strip> | z.ZodObject<{
4869
6739
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4919,13 +6789,13 @@ export declare const SessionItemsResponse: z.ZodObject<{
4919
6789
  metadata: "metadata";
4920
6790
  }>;
4921
6791
  } & {
4922
- type: z.ZodLiteral<"loop.verified">;
6792
+ type: z.ZodLiteral<"sandbox.exec">;
4923
6793
  payload: z.ZodObject<{
4924
- path: z.ZodString;
4925
- n: z.ZodNumber;
4926
- pass: z.ZodBoolean;
4927
- feedback: z.ZodOptional<z.ZodString>;
4928
- data: z.ZodOptional<z.ZodUnknown>;
6794
+ tool: z.ZodString;
6795
+ command: z.ZodOptional<z.ZodString>;
6796
+ outcome: z.ZodString;
6797
+ code: z.ZodOptional<z.ZodString>;
6798
+ durationMs: z.ZodNumber;
4929
6799
  }, z.core.$loose>;
4930
6800
  }, z.core.$strip> | z.ZodObject<{
4931
6801
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -4981,26 +6851,21 @@ export declare const SessionItemsResponse: z.ZodObject<{
4981
6851
  metadata: "metadata";
4982
6852
  }>;
4983
6853
  } & {
4984
- type: z.ZodLiteral<"message.assistant">;
6854
+ type: z.ZodLiteral<"sandbox.state">;
4985
6855
  payload: z.ZodObject<{
4986
- agent: z.ZodOptional<z.ZodObject<{
4987
- id: z.ZodString;
4988
- path: z.ZodString;
4989
- delegationId: z.ZodOptional<z.ZodString>;
4990
- }, z.core.$loose>>;
4991
- invocationId: z.ZodString;
4992
- text: z.ZodString;
4993
- model: z.ZodOptional<z.ZodObject<{
4994
- provider: z.ZodString;
4995
- model: z.ZodString;
4996
- }, z.core.$loose>>;
4997
- finishReason: z.ZodOptional<z.ZodString>;
4998
- usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
4999
- toolCalls: z.ZodArray<z.ZodObject<{
5000
- callId: z.ZodString;
5001
- name: z.ZodString;
5002
- input: z.ZodUnknown;
5003
- }, z.core.$loose>>;
6856
+ state: z.ZodEnum<{
6857
+ creating: "creating";
6858
+ running: "running";
6859
+ stopped: "stopped";
6860
+ }>;
6861
+ backend: z.ZodString;
6862
+ isolation: z.ZodOptional<z.ZodString>;
6863
+ image: z.ZodOptional<z.ZodString>;
6864
+ network: z.ZodOptional<z.ZodUnknown>;
6865
+ reattach: z.ZodOptional<z.ZodBoolean>;
6866
+ lost: z.ZodOptional<z.ZodBoolean>;
6867
+ note: z.ZodOptional<z.ZodString>;
6868
+ error: z.ZodOptional<z.ZodString>;
5004
6869
  }, z.core.$loose>;
5005
6870
  }, z.core.$strip> | z.ZodObject<{
5006
6871
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5056,17 +6921,22 @@ export declare const SessionItemsResponse: z.ZodObject<{
5056
6921
  metadata: "metadata";
5057
6922
  }>;
5058
6923
  } & {
5059
- type: z.ZodLiteral<"model.failed">;
6924
+ type: z.ZodLiteral<"tool.completed">;
5060
6925
  payload: z.ZodObject<{
5061
6926
  agent: z.ZodOptional<z.ZodObject<{
5062
6927
  id: z.ZodString;
5063
6928
  path: z.ZodString;
5064
6929
  delegationId: z.ZodOptional<z.ZodString>;
5065
6930
  }, z.core.$loose>>;
5066
- invocationId: z.ZodOptional<z.ZodString>;
5067
- code: z.ZodString;
5068
- message: z.ZodString;
5069
- retryable: z.ZodBoolean;
6931
+ callId: z.ZodString;
6932
+ invocationId: z.ZodString;
6933
+ capabilityId: z.ZodString;
6934
+ toolName: z.ZodString;
6935
+ output: z.ZodOptional<z.ZodUnknown>;
6936
+ error: z.ZodOptional<z.ZodObject<{
6937
+ code: z.ZodString;
6938
+ message: z.ZodString;
6939
+ }, z.core.$loose>>;
5070
6940
  }, z.core.$loose>;
5071
6941
  }, z.core.$strip> | z.ZodObject<{
5072
6942
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5122,12 +6992,11 @@ export declare const SessionItemsResponse: z.ZodObject<{
5122
6992
  metadata: "metadata";
5123
6993
  }>;
5124
6994
  } & {
5125
- type: z.ZodLiteral<"node.agent">;
6995
+ type: z.ZodLiteral<"transcript.updated">;
5126
6996
  payload: z.ZodObject<{
5127
- path: z.ZodString;
5128
- iterations: z.ZodOptional<z.ZodString>;
5129
- sessionId: z.ZodString;
5130
- turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6997
+ keep: z.ZodNumber;
6998
+ entries: z.ZodArray<z.ZodUnknown>;
6999
+ length: z.ZodNumber;
5131
7000
  }, z.core.$loose>;
5132
7001
  }, z.core.$strip> | z.ZodObject<{
5133
7002
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5182,13 +7051,10 @@ export declare const SessionItemsResponse: z.ZodObject<{
5182
7051
  full: "full";
5183
7052
  metadata: "metadata";
5184
7053
  }>;
5185
- } & {
5186
- type: z.ZodLiteral<"node.started">;
5187
- payload: z.ZodObject<{
5188
- path: z.ZodString;
5189
- kind: z.ZodString;
5190
- key: z.ZodString;
5191
- iterations: z.ZodOptional<z.ZodString>;
7054
+ } & {
7055
+ type: z.ZodLiteral<"turn.cancelled">;
7056
+ payload: z.ZodObject<{
7057
+ reason: z.ZodOptional<z.ZodString>;
5192
7058
  }, z.core.$loose>;
5193
7059
  }, z.core.$strip> | z.ZodObject<{
5194
7060
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5244,13 +7110,9 @@ export declare const SessionItemsResponse: z.ZodObject<{
5244
7110
  metadata: "metadata";
5245
7111
  }>;
5246
7112
  } & {
5247
- type: z.ZodLiteral<"sandbox.exec">;
7113
+ type: z.ZodLiteral<"turn.completed">;
5248
7114
  payload: z.ZodObject<{
5249
- tool: z.ZodString;
5250
- command: z.ZodOptional<z.ZodString>;
5251
- outcome: z.ZodString;
5252
- code: z.ZodOptional<z.ZodString>;
5253
- durationMs: z.ZodNumber;
7115
+ output: z.ZodUnknown;
5254
7116
  }, z.core.$loose>;
5255
7117
  }, z.core.$strip> | z.ZodObject<{
5256
7118
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5306,21 +7168,13 @@ export declare const SessionItemsResponse: z.ZodObject<{
5306
7168
  metadata: "metadata";
5307
7169
  }>;
5308
7170
  } & {
5309
- type: z.ZodLiteral<"sandbox.state">;
7171
+ type: z.ZodLiteral<"turn.failed">;
5310
7172
  payload: z.ZodObject<{
5311
- state: z.ZodEnum<{
5312
- creating: "creating";
5313
- running: "running";
5314
- stopped: "stopped";
5315
- }>;
5316
- backend: z.ZodString;
5317
- isolation: z.ZodOptional<z.ZodString>;
5318
- image: z.ZodOptional<z.ZodString>;
5319
- network: z.ZodOptional<z.ZodUnknown>;
5320
- reattach: z.ZodOptional<z.ZodBoolean>;
5321
- lost: z.ZodOptional<z.ZodBoolean>;
5322
- note: z.ZodOptional<z.ZodString>;
5323
- error: z.ZodOptional<z.ZodString>;
7173
+ error: z.ZodOptional<z.ZodObject<{
7174
+ code: z.ZodOptional<z.ZodString>;
7175
+ message: z.ZodOptional<z.ZodString>;
7176
+ }, z.core.$loose>>;
7177
+ message: z.ZodOptional<z.ZodString>;
5324
7178
  }, z.core.$loose>;
5325
7179
  }, z.core.$strip> | z.ZodObject<{
5326
7180
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5376,24 +7230,18 @@ export declare const SessionItemsResponse: z.ZodObject<{
5376
7230
  metadata: "metadata";
5377
7231
  }>;
5378
7232
  } & {
5379
- type: z.ZodLiteral<"tool.completed">;
7233
+ type: z.ZodLiteral<"turn.paused">;
5380
7234
  payload: z.ZodObject<{
5381
- agent: z.ZodOptional<z.ZodObject<{
5382
- id: z.ZodString;
5383
- path: z.ZodString;
5384
- delegationId: z.ZodOptional<z.ZodString>;
5385
- }, z.core.$loose>>;
5386
- callId: z.ZodString;
5387
- invocationId: z.ZodString;
5388
- capabilityId: z.ZodString;
5389
- toolName: z.ZodString;
5390
- output: z.ZodOptional<z.ZodUnknown>;
5391
- error: z.ZodOptional<z.ZodObject<{
5392
- code: z.ZodString;
5393
- message: z.ZodString;
7235
+ interactions: z.ZodArray<z.ZodObject<{
7236
+ invocationId: z.ZodString;
7237
+ interaction: z.ZodObject<{
7238
+ id: z.ZodString;
7239
+ kind: z.ZodString;
7240
+ }, z.core.$loose>;
7241
+ status: z.ZodOptional<z.ZodString>;
5394
7242
  }, z.core.$loose>>;
5395
7243
  }, z.core.$loose>;
5396
- }, z.core.$strip> | z.ZodObject<{
7244
+ }, z.core.$strip>, ...(z.ZodObject<{
5397
7245
  schema: z.ZodLiteral<"nylorun.event/2">;
5398
7246
  eventId: z.ZodString;
5399
7247
  tenantId: z.ZodString;
@@ -5447,11 +7295,21 @@ export declare const SessionItemsResponse: z.ZodObject<{
5447
7295
  metadata: "metadata";
5448
7296
  }>;
5449
7297
  } & {
5450
- type: z.ZodLiteral<"transcript.updated">;
7298
+ type: z.ZodLiteral<"action.completed">;
5451
7299
  payload: z.ZodObject<{
5452
- keep: z.ZodNumber;
5453
- entries: z.ZodArray<z.ZodUnknown>;
5454
- length: z.ZodNumber;
7300
+ agent: z.ZodOptional<z.ZodObject<{
7301
+ id: z.ZodString;
7302
+ path: z.ZodString;
7303
+ delegationId: z.ZodOptional<z.ZodString>;
7304
+ }, z.core.$loose>>;
7305
+ actionId: z.ZodString;
7306
+ kind: z.ZodString;
7307
+ toolName: z.ZodOptional<z.ZodString>;
7308
+ path: z.ZodOptional<z.ZodString>;
7309
+ key: z.ZodOptional<z.ZodString>;
7310
+ callId: z.ZodOptional<z.ZodString>;
7311
+ invocationId: z.ZodOptional<z.ZodString>;
7312
+ result: z.ZodUnknown;
5455
7313
  }, z.core.$loose>;
5456
7314
  }, z.core.$strip> | z.ZodObject<{
5457
7315
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5507,9 +7365,15 @@ export declare const SessionItemsResponse: z.ZodObject<{
5507
7365
  metadata: "metadata";
5508
7366
  }>;
5509
7367
  } & {
5510
- type: z.ZodLiteral<"turn.cancelled">;
7368
+ type: z.ZodLiteral<"action.delivered">;
5511
7369
  payload: z.ZodObject<{
5512
- reason: z.ZodOptional<z.ZodString>;
7370
+ agent: z.ZodOptional<z.ZodObject<{
7371
+ id: z.ZodString;
7372
+ path: z.ZodString;
7373
+ delegationId: z.ZodOptional<z.ZodString>;
7374
+ }, z.core.$loose>>;
7375
+ actionId: z.ZodString;
7376
+ generation: z.ZodNumber;
5513
7377
  }, z.core.$loose>;
5514
7378
  }, z.core.$strip> | z.ZodObject<{
5515
7379
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5565,9 +7429,13 @@ export declare const SessionItemsResponse: z.ZodObject<{
5565
7429
  metadata: "metadata";
5566
7430
  }>;
5567
7431
  } & {
5568
- type: z.ZodLiteral<"turn.completed">;
7432
+ type: z.ZodLiteral<"action.delivery_failed">;
5569
7433
  payload: z.ZodObject<{
5570
- output: z.ZodUnknown;
7434
+ actionId: z.ZodString;
7435
+ generation: z.ZodNumber;
7436
+ reason: z.ZodString;
7437
+ message: z.ZodOptional<z.ZodString>;
7438
+ retryInMs: z.ZodNumber;
5571
7439
  }, z.core.$loose>;
5572
7440
  }, z.core.$strip> | z.ZodObject<{
5573
7441
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5623,13 +7491,21 @@ export declare const SessionItemsResponse: z.ZodObject<{
5623
7491
  metadata: "metadata";
5624
7492
  }>;
5625
7493
  } & {
5626
- type: z.ZodLiteral<"turn.failed">;
7494
+ type: z.ZodLiteral<"action.pending">;
5627
7495
  payload: z.ZodObject<{
5628
- error: z.ZodOptional<z.ZodObject<{
5629
- code: z.ZodOptional<z.ZodString>;
5630
- message: z.ZodOptional<z.ZodString>;
7496
+ agent: z.ZodOptional<z.ZodObject<{
7497
+ id: z.ZodString;
7498
+ path: z.ZodString;
7499
+ delegationId: z.ZodOptional<z.ZodString>;
5631
7500
  }, z.core.$loose>>;
5632
- message: z.ZodOptional<z.ZodString>;
7501
+ actionId: z.ZodString;
7502
+ kind: z.ZodString;
7503
+ toolName: z.ZodOptional<z.ZodString>;
7504
+ path: z.ZodOptional<z.ZodString>;
7505
+ key: z.ZodOptional<z.ZodString>;
7506
+ callId: z.ZodOptional<z.ZodString>;
7507
+ invocationId: z.ZodOptional<z.ZodString>;
7508
+ input: z.ZodUnknown;
5633
7509
  }, z.core.$loose>;
5634
7510
  }, z.core.$strip> | z.ZodObject<{
5635
7511
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5685,18 +7561,16 @@ export declare const SessionItemsResponse: z.ZodObject<{
5685
7561
  metadata: "metadata";
5686
7562
  }>;
5687
7563
  } & {
5688
- type: z.ZodLiteral<"turn.paused">;
7564
+ type: z.ZodLiteral<"action.uncertain">;
5689
7565
  payload: z.ZodObject<{
5690
- interactions: z.ZodArray<z.ZodObject<{
5691
- invocationId: z.ZodString;
5692
- interaction: z.ZodObject<{
5693
- id: z.ZodString;
5694
- kind: z.ZodString;
5695
- }, z.core.$loose>;
5696
- status: z.ZodOptional<z.ZodString>;
7566
+ agent: z.ZodOptional<z.ZodObject<{
7567
+ id: z.ZodString;
7568
+ path: z.ZodString;
7569
+ delegationId: z.ZodOptional<z.ZodString>;
5697
7570
  }, z.core.$loose>>;
7571
+ actionId: z.ZodString;
5698
7572
  }, z.core.$loose>;
5699
- }, z.core.$strip>, ...(z.ZodObject<{
7573
+ }, z.core.$strip> | z.ZodObject<{
5700
7574
  schema: z.ZodLiteral<"nylorun.event/2">;
5701
7575
  eventId: z.ZodString;
5702
7576
  tenantId: z.ZodString;
@@ -5750,21 +7624,26 @@ export declare const SessionItemsResponse: z.ZodObject<{
5750
7624
  metadata: "metadata";
5751
7625
  }>;
5752
7626
  } & {
5753
- type: z.ZodLiteral<"action.completed">;
7627
+ type: z.ZodLiteral<"artifact.created">;
5754
7628
  payload: z.ZodObject<{
5755
- agent: z.ZodOptional<z.ZodObject<{
5756
- id: z.ZodString;
5757
- path: z.ZodString;
5758
- delegationId: z.ZodOptional<z.ZodString>;
5759
- }, z.core.$loose>>;
5760
- actionId: z.ZodString;
5761
- kind: z.ZodString;
5762
- toolName: z.ZodOptional<z.ZodString>;
5763
- path: z.ZodOptional<z.ZodString>;
5764
- key: z.ZodOptional<z.ZodString>;
7629
+ artifactId: z.ZodString;
7630
+ kind: z.ZodEnum<{
7631
+ file: "file";
7632
+ folder: "folder";
7633
+ }>;
7634
+ name: z.ZodString;
7635
+ contentType: z.ZodString;
7636
+ version: z.ZodNumber;
7637
+ size: z.ZodNumber;
7638
+ sha256: z.ZodString;
7639
+ source: z.ZodEnum<{
7640
+ engine: "engine";
7641
+ export: "export";
7642
+ upload: "upload";
7643
+ }>;
5765
7644
  callId: z.ZodOptional<z.ZodString>;
5766
- invocationId: z.ZodOptional<z.ZodString>;
5767
- result: z.ZodUnknown;
7645
+ fileCount: z.ZodOptional<z.ZodNumber>;
7646
+ claimed: z.ZodOptional<z.ZodBoolean>;
5768
7647
  }, z.core.$loose>;
5769
7648
  }, z.core.$strip> | z.ZodObject<{
5770
7649
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5820,15 +7699,10 @@ export declare const SessionItemsResponse: z.ZodObject<{
5820
7699
  metadata: "metadata";
5821
7700
  }>;
5822
7701
  } & {
5823
- type: z.ZodLiteral<"action.delivered">;
7702
+ type: z.ZodLiteral<"artifact.deleted">;
5824
7703
  payload: z.ZodObject<{
5825
- agent: z.ZodOptional<z.ZodObject<{
5826
- id: z.ZodString;
5827
- path: z.ZodString;
5828
- delegationId: z.ZodOptional<z.ZodString>;
5829
- }, z.core.$loose>>;
5830
- actionId: z.ZodString;
5831
- generation: z.ZodNumber;
7704
+ artifactId: z.ZodString;
7705
+ name: z.ZodString;
5832
7706
  }, z.core.$loose>;
5833
7707
  }, z.core.$strip> | z.ZodObject<{
5834
7708
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5884,13 +7758,10 @@ export declare const SessionItemsResponse: z.ZodObject<{
5884
7758
  metadata: "metadata";
5885
7759
  }>;
5886
7760
  } & {
5887
- type: z.ZodLiteral<"action.delivery_failed">;
7761
+ type: z.ZodLiteral<"artifact.export.failed">;
5888
7762
  payload: z.ZodObject<{
5889
- actionId: z.ZodString;
5890
- generation: z.ZodNumber;
5891
- reason: z.ZodString;
5892
- message: z.ZodOptional<z.ZodString>;
5893
- retryInMs: z.ZodNumber;
7763
+ name: z.ZodString;
7764
+ message: z.ZodString;
5894
7765
  }, z.core.$loose>;
5895
7766
  }, z.core.$strip> | z.ZodObject<{
5896
7767
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -5946,21 +7817,18 @@ export declare const SessionItemsResponse: z.ZodObject<{
5946
7817
  metadata: "metadata";
5947
7818
  }>;
5948
7819
  } & {
5949
- type: z.ZodLiteral<"action.pending">;
7820
+ type: z.ZodLiteral<"artifact.export.skipped">;
5950
7821
  payload: z.ZodObject<{
5951
- agent: z.ZodOptional<z.ZodObject<{
5952
- id: z.ZodString;
5953
- path: z.ZodString;
5954
- delegationId: z.ZodOptional<z.ZodString>;
5955
- }, z.core.$loose>>;
5956
- actionId: z.ZodString;
5957
- kind: z.ZodString;
5958
- toolName: z.ZodOptional<z.ZodString>;
7822
+ name: z.ZodString;
7823
+ reason: z.ZodEnum<{
7824
+ file_too_large: "file_too_large";
7825
+ tenant_total: "tenant_total";
7826
+ too_large: "too_large";
7827
+ too_many_files: "too_many_files";
7828
+ }>;
7829
+ message: z.ZodString;
7830
+ limit: z.ZodOptional<z.ZodNumber>;
5959
7831
  path: z.ZodOptional<z.ZodString>;
5960
- key: z.ZodOptional<z.ZodString>;
5961
- callId: z.ZodOptional<z.ZodString>;
5962
- invocationId: z.ZodOptional<z.ZodString>;
5963
- input: z.ZodUnknown;
5964
7832
  }, z.core.$loose>;
5965
7833
  }, z.core.$strip> | z.ZodObject<{
5966
7834
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -6016,14 +7884,26 @@ export declare const SessionItemsResponse: z.ZodObject<{
6016
7884
  metadata: "metadata";
6017
7885
  }>;
6018
7886
  } & {
6019
- type: z.ZodLiteral<"action.uncertain">;
7887
+ type: z.ZodLiteral<"artifact.version.created">;
6020
7888
  payload: z.ZodObject<{
6021
- agent: z.ZodOptional<z.ZodObject<{
6022
- id: z.ZodString;
6023
- path: z.ZodString;
6024
- delegationId: z.ZodOptional<z.ZodString>;
6025
- }, z.core.$loose>>;
6026
- actionId: z.ZodString;
7889
+ artifactId: z.ZodString;
7890
+ kind: z.ZodEnum<{
7891
+ file: "file";
7892
+ folder: "folder";
7893
+ }>;
7894
+ name: z.ZodString;
7895
+ contentType: z.ZodString;
7896
+ version: z.ZodNumber;
7897
+ size: z.ZodNumber;
7898
+ sha256: z.ZodString;
7899
+ source: z.ZodEnum<{
7900
+ engine: "engine";
7901
+ export: "export";
7902
+ upload: "upload";
7903
+ }>;
7904
+ callId: z.ZodOptional<z.ZodString>;
7905
+ fileCount: z.ZodOptional<z.ZodNumber>;
7906
+ claimed: z.ZodOptional<z.ZodBoolean>;
6027
7907
  }, z.core.$loose>;
6028
7908
  }, z.core.$strip> | z.ZodObject<{
6029
7909
  schema: z.ZodLiteral<"nylorun.event/2">;
@@ -6148,6 +8028,14 @@ export declare const SessionItemsResponse: z.ZodObject<{
6148
8028
  type: z.ZodLiteral<"message">;
6149
8029
  content: z.ZodOptional<z.ZodString>;
6150
8030
  data: z.ZodOptional<z.ZodType<import("@nylorun/core").JsonValue, unknown, z.core.$ZodTypeInternals<import("@nylorun/core").JsonValue, unknown>>>;
8031
+ parts: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
8032
+ type: z.ZodLiteral<"text">;
8033
+ text: z.ZodString;
8034
+ }, z.core.$strict>, z.ZodObject<{
8035
+ type: z.ZodLiteral<"file">;
8036
+ artifactId: z.ZodString;
8037
+ version: z.ZodOptional<z.ZodNumber>;
8038
+ }, z.core.$strict>], "type">>>;
6151
8039
  manifest: z.ZodOptional<z.ZodUnknown>;
6152
8040
  }, z.core.$loose>;
6153
8041
  }, z.core.$strip> | z.ZodObject<{
@@ -6970,6 +8858,64 @@ export declare const SessionItemsResponse: z.ZodObject<{
6970
8858
  full: "full";
6971
8859
  metadata: "metadata";
6972
8860
  }>;
8861
+ } & {
8862
+ type: z.ZodLiteral<"sandbox.attached">;
8863
+ payload: z.ZodObject<{
8864
+ sandboxId: z.ZodString;
8865
+ }, z.core.$loose>;
8866
+ }, z.core.$strip> | z.ZodObject<{
8867
+ schema: z.ZodLiteral<"nylorun.event/2">;
8868
+ eventId: z.ZodString;
8869
+ tenantId: z.ZodString;
8870
+ sessionId: z.ZodString;
8871
+ runId: z.ZodNullable<z.ZodString>;
8872
+ turnId: z.ZodNullable<z.ZodString>;
8873
+ incarnation: z.ZodNumber;
8874
+ epoch: z.ZodNumber;
8875
+ seq: z.ZodNumber;
8876
+ cursor: z.ZodString;
8877
+ time: z.ZodString;
8878
+ schemaVersion: z.ZodNumber;
8879
+ source: z.ZodObject<{
8880
+ kind: z.ZodEnum<{
8881
+ api: "api";
8882
+ controller: "controller";
8883
+ edge: "edge";
8884
+ "egress-gate": "egress-gate";
8885
+ evidence: "evidence";
8886
+ harness: "harness";
8887
+ human: "human";
8888
+ init: "init";
8889
+ loop: "loop";
8890
+ "model-gate": "model-gate";
8891
+ operator: "operator";
8892
+ sandboxd: "sandboxd";
8893
+ supervisor: "supervisor";
8894
+ "tool-gate": "tool-gate";
8895
+ }>;
8896
+ id: z.ZodString;
8897
+ }, z.core.$strip>;
8898
+ evidence: z.ZodEnum<{
8899
+ asserted: "asserted";
8900
+ attested: "attested";
8901
+ claimed: "claimed";
8902
+ measured: "measured";
8903
+ observed: "observed";
8904
+ }>;
8905
+ trace: z.ZodOptional<z.ZodObject<{
8906
+ traceId: z.ZodString;
8907
+ spanId: z.ZodString;
8908
+ parentSpanId: z.ZodOptional<z.ZodString>;
8909
+ }, z.core.$strip>>;
8910
+ visibility: z.ZodEnum<{
8911
+ internal: "internal";
8912
+ public: "public";
8913
+ restricted: "restricted";
8914
+ }>;
8915
+ retention: z.ZodEnum<{
8916
+ full: "full";
8917
+ metadata: "metadata";
8918
+ }>;
6973
8919
  } & {
6974
8920
  type: z.ZodLiteral<"sandbox.exec">;
6975
8921
  payload: z.ZodObject<{
@@ -7480,6 +9426,14 @@ export declare const TenantStatus: z.ZodObject<{
7480
9426
  backend: z.ZodNullable<z.ZodString>;
7481
9427
  retained: z.ZodNumber;
7482
9428
  }, z.core.$strict>;
9429
+ harness: z.ZodOptional<z.ZodObject<{
9430
+ mode: z.ZodEnum<{
9431
+ "in-process": "in-process";
9432
+ remote: "remote";
9433
+ }>;
9434
+ connected: z.ZodNumber;
9435
+ workspace: z.ZodBoolean;
9436
+ }, z.core.$strict>>;
7483
9437
  execution: z.ZodOptional<z.ZodObject<{
7484
9438
  stuckInvocations: z.ZodArray<z.ZodObject<{
7485
9439
  id: z.ZodString;
@@ -7556,7 +9510,22 @@ export declare const SeedTenantConfigRequest: z.ZodObject<{
7556
9510
  memory: z.ZodOptional<z.ZodString>;
7557
9511
  }, z.core.$strict>>;
7558
9512
  idle: z.ZodOptional<z.ZodString>;
9513
+ sandboxes: z.ZodOptional<z.ZodNumber>;
9514
+ ttl: z.ZodOptional<z.ZodString>;
9515
+ }, z.core.$strict>>;
9516
+ lifecycle: z.ZodOptional<z.ZodObject<{
9517
+ onExpiry: z.ZodOptional<z.ZodEnum<{
9518
+ delete: "delete";
9519
+ retain: "retain";
9520
+ }>>;
9521
+ stopGrace: z.ZodOptional<z.ZodString>;
7559
9522
  }, z.core.$strict>>;
9523
+ placement: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
9524
+ hosts: z.ZodArray<z.ZodEnum<{
9525
+ "harness-container": "harness-container";
9526
+ sandbox: "sandbox";
9527
+ }>>;
9528
+ }, z.core.$strict>>>;
7560
9529
  }, z.core.$strict>>;
7561
9530
  }, z.core.$strict>>;
7562
9531
  model: z.ZodOptional<z.ZodObject<{
@@ -7598,9 +9567,11 @@ export declare const HostModelCatalog: z.ZodObject<{
7598
9567
  }, z.core.$strict>;
7599
9568
  export declare const TenantSandboxView: z.ZodObject<{
7600
9569
  preference: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodEnum<{
9570
+ local: "local";
7601
9571
  virtual: "virtual";
7602
9572
  }>]>;
7603
9573
  backend: z.ZodNullable<z.ZodEnum<{
9574
+ local: "local";
7604
9575
  virtual: "virtual";
7605
9576
  }>>;
7606
9577
  isolation: z.ZodNullable<z.ZodEnum<{
@@ -7610,6 +9581,7 @@ export declare const TenantSandboxView: z.ZodObject<{
7610
9581
  reason: z.ZodString;
7611
9582
  probes: z.ZodArray<z.ZodObject<{
7612
9583
  name: z.ZodEnum<{
9584
+ local: "local";
7613
9585
  virtual: "virtual";
7614
9586
  }>;
7615
9587
  available: z.ZodBoolean;
@@ -7643,8 +9615,33 @@ export declare const TenantSandboxView: z.ZodObject<{
7643
9615
  memoryMiB: z.ZodNumber;
7644
9616
  }, z.core.$strict>;
7645
9617
  idle: z.ZodString;
9618
+ sandboxes: z.ZodOptional<z.ZodNumber>;
9619
+ ttl: z.ZodOptional<z.ZodString>;
7646
9620
  }, z.core.$strict>;
9621
+ lifecycle: z.ZodOptional<z.ZodObject<{
9622
+ onExpiry: z.ZodEnum<{
9623
+ delete: "delete";
9624
+ retain: "retain";
9625
+ }>;
9626
+ stopGrace: z.ZodString;
9627
+ }, z.core.$strict>>;
9628
+ placement: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
9629
+ hosts: z.ZodArray<z.ZodEnum<{
9630
+ "harness-container": "harness-container";
9631
+ sandbox: "sandbox";
9632
+ }>>;
9633
+ }, z.core.$strict>>>;
7647
9634
  }, z.core.$strict>;
9635
+ cluster: z.ZodOptional<z.ZodNullable<z.ZodObject<{
9636
+ namespace: z.ZodString;
9637
+ context: z.ZodString;
9638
+ ready: z.ZodBoolean;
9639
+ controllerVersion: z.ZodOptional<z.ZodString>;
9640
+ networkPolicy: z.ZodOptional<z.ZodObject<{
9641
+ enforced: z.ZodBoolean;
9642
+ probedAt: z.ZodOptional<z.ZodString>;
9643
+ }, z.core.$strip>>;
9644
+ }, z.core.$strip>>>;
7648
9645
  }, z.core.$strict>;
7649
9646
  export declare const ModelUsageTotals: z.ZodObject<{
7650
9647
  scope: z.ZodEnum<{
@@ -7718,7 +9715,22 @@ export declare const PutTenantSandboxRequest: z.ZodObject<{
7718
9715
  memory: z.ZodOptional<z.ZodString>;
7719
9716
  }, z.core.$strict>>;
7720
9717
  idle: z.ZodOptional<z.ZodString>;
9718
+ sandboxes: z.ZodOptional<z.ZodNumber>;
9719
+ ttl: z.ZodOptional<z.ZodString>;
7721
9720
  }, z.core.$strict>>;
9721
+ lifecycle: z.ZodOptional<z.ZodObject<{
9722
+ onExpiry: z.ZodOptional<z.ZodEnum<{
9723
+ delete: "delete";
9724
+ retain: "retain";
9725
+ }>>;
9726
+ stopGrace: z.ZodOptional<z.ZodString>;
9727
+ }, z.core.$strict>>;
9728
+ placement: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
9729
+ hosts: z.ZodArray<z.ZodEnum<{
9730
+ "harness-container": "harness-container";
9731
+ sandbox: "sandbox";
9732
+ }>>;
9733
+ }, z.core.$strict>>>;
7722
9734
  requestId: z.ZodOptional<z.ZodString>;
7723
9735
  }, z.core.$strict>;
7724
9736
  export declare const ListProvidersResponse: z.ZodObject<{
@@ -7905,10 +9917,12 @@ export declare const CreateTokenRequest: z.ZodObject<{
7905
9917
  role: z.ZodString;
7906
9918
  scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
7907
9919
  "agents:read": "agents:read";
9920
+ "sandboxes:write": "sandboxes:write";
7908
9921
  "sessions:own": "sessions:own";
7909
9922
  "vaults:own": "vaults:own";
7910
9923
  }>>>;
7911
9924
  agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
9925
+ sandboxes: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
7912
9926
  ttlSeconds: z.ZodOptional<z.ZodNumber>;
7913
9927
  }, z.core.$strict>;
7914
9928
  export declare const CreateTokenResponse: z.ZodObject<{
@@ -7918,10 +9932,12 @@ export declare const CreateTokenResponse: z.ZodObject<{
7918
9932
  role: z.ZodString;
7919
9933
  scopes: z.ZodArray<z.ZodEnum<{
7920
9934
  "agents:read": "agents:read";
9935
+ "sandboxes:write": "sandboxes:write";
7921
9936
  "sessions:own": "sessions:own";
7922
9937
  "vaults:own": "vaults:own";
7923
9938
  }>>;
7924
9939
  agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
9940
+ sandboxes: z.ZodOptional<z.ZodArray<z.ZodString>>;
7925
9941
  keyId: z.ZodString;
7926
9942
  }, z.core.$strict>;
7927
9943
  export declare const AccessPolicyResponse: z.ZodObject<{
@@ -7930,6 +9946,7 @@ export declare const AccessPolicyResponse: z.ZodObject<{
7930
9946
  roles: z.ZodRecord<z.ZodString, z.ZodObject<{
7931
9947
  scopes: z.ZodArray<z.ZodEnum<{
7932
9948
  "agents:read": "agents:read";
9949
+ "sandboxes:write": "sandboxes:write";
7933
9950
  "sessions:own": "sessions:own";
7934
9951
  "vaults:own": "vaults:own";
7935
9952
  }>>;
@@ -7955,6 +9972,7 @@ export declare const PutAccessPolicyRequest: z.ZodObject<{
7955
9972
  roles: z.ZodRecord<z.ZodString, z.ZodObject<{
7956
9973
  scopes: z.ZodArray<z.ZodEnum<{
7957
9974
  "agents:read": "agents:read";
9975
+ "sandboxes:write": "sandboxes:write";
7958
9976
  "sessions:own": "sessions:own";
7959
9977
  "vaults:own": "vaults:own";
7960
9978
  }>>;