@nylorun/core 0.18.0-beta → 0.20.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 (42) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/dist/compatibility.d.ts +78 -30
  3. package/dist/compatibility.js +83 -30
  4. package/dist/contracts.d.ts +1531 -461
  5. package/dist/contracts.js +972 -344
  6. package/dist/define.d.ts +1 -0
  7. package/dist/define.js +1 -0
  8. package/dist/definition/approval.d.ts +16 -0
  9. package/dist/definition/approval.js +35 -0
  10. package/dist/definition/code-tools.d.ts +1 -1
  11. package/dist/definition/code-tools.js +1 -1
  12. package/dist/definition/flow/compile.js +0 -2
  13. package/dist/definition/http-tool.d.ts +7 -4
  14. package/dist/definition/http-tool.js +6 -10
  15. package/dist/definition/manifest.js +1 -0
  16. package/dist/definition/mcp.d.ts +4 -4
  17. package/dist/definition/mcp.js +15 -12
  18. package/dist/definition/removed.js +1 -1
  19. package/dist/definition/variant.d.ts +1 -1
  20. package/dist/definition/variant.js +6 -5
  21. package/dist/harness-api/entries.d.ts +241 -0
  22. package/dist/harness-api/entries.js +117 -0
  23. package/dist/harness-api/gates.d.ts +172 -0
  24. package/dist/harness-api/gates.js +119 -0
  25. package/dist/harness-api/harness-api.schema.json +5056 -0
  26. package/dist/harness-api/index.d.ts +19 -3
  27. package/dist/harness-api/index.js +16 -3
  28. package/dist/harness-api/json-schema.d.ts +12 -0
  29. package/dist/harness-api/json-schema.js +61 -0
  30. package/dist/harness-api/mcp.d.ts +61 -0
  31. package/dist/harness-api/mcp.js +41 -0
  32. package/dist/harness-api/messages.d.ts +12 -4
  33. package/dist/harness-api/messages.js +6 -2
  34. package/dist/harness-api/schema.d.ts +356 -31
  35. package/dist/harness-api/schema.js +147 -20
  36. package/dist/harness-api/transport.d.ts +55 -0
  37. package/dist/harness-api/transport.js +61 -0
  38. package/dist/types/manifest.d.ts +15 -9
  39. package/dist/types/observe.d.ts +3 -2
  40. package/dist/utils/harness-id.d.ts +9 -0
  41. package/dist/utils/harness-id.js +11 -0
  42. package/package.json +5 -4
@@ -47,7 +47,17 @@ export declare const FrameSchema: z.ZodUnion<readonly [z.ZodObject<{
47
47
  }, z.core.$strict>, z.ZodObject<{
48
48
  t: z.ZodLiteral<"ping">;
49
49
  }, z.core.$strict>]>;
50
- /** One effect the engine asks for: a `HostEffect`, by structure. Model intents carry no `input`. */
50
+ /**
51
+ * One effect the engine asks for: a `HostEffect`, by structure. Model intents carry no `input`.
52
+ * `context` carries the ids the record derives its events from: a model effect's
53
+ * `invocationId` (the step), and a tool effect's `callId` (the model's tool call id) and
54
+ * `invocationId`; without them the call is journaled but no `tool.completed` is written. A
55
+ * tool effect may name its step (`stepId`), which shares one result budget among its calls.
56
+ *
57
+ * `requestHash` (`effectRequestHash`) covers the whole request: for a model effect, the intent
58
+ * with `input` set to its `ModelCall`, though the intent is sent without it. A replay that asks
59
+ * for the same id with another hash is `effect_drift`.
60
+ */
51
61
  export declare const EffectIntentSchema: z.ZodObject<{
52
62
  effectId: z.ZodString;
53
63
  sessionId: z.ZodString;
@@ -86,7 +96,7 @@ export declare const RecordedOutcomeSchema: z.ZodObject<{
86
96
  export declare const WorkspaceRecordSchema: z.ZodObject<{
87
97
  key: z.ZodString;
88
98
  sessionId: z.ZodString;
89
- sandboxId: z.ZodOptional<z.ZodString>;
99
+ environmentId: z.ZodOptional<z.ZodString>;
90
100
  backend: z.ZodString;
91
101
  image: z.ZodString;
92
102
  state: z.ZodEnum<{
@@ -97,17 +107,17 @@ export declare const WorkspaceRecordSchema: z.ZodObject<{
97
107
  createdAt: z.ZodString;
98
108
  updatedAt: z.ZodString;
99
109
  }, z.core.$strict>;
100
- /** The session a workspace request acts for: the workspace's owner and its sandbox resource. */
110
+ /** The session a workspace request acts for, and the Environment whose workspace it is. */
101
111
  export declare const WorkspaceSessionSchema: z.ZodObject<{
102
112
  ownerId: z.ZodString;
103
- sandboxId: z.ZodOptional<z.ZodString>;
113
+ environmentId: z.ZodOptional<z.ZodString>;
104
114
  activeTurnId: z.ZodNullable<z.ZodString>;
105
115
  }, z.core.$strict>;
106
116
  /** A sandbox tool call core sends to the harness that serves workspaces. */
107
117
  export declare const WorkspaceCallSchema: z.ZodObject<{
108
118
  session: z.ZodObject<{
109
119
  ownerId: z.ZodString;
110
- sandboxId: z.ZodOptional<z.ZodString>;
120
+ environmentId: z.ZodOptional<z.ZodString>;
111
121
  activeTurnId: z.ZodNullable<z.ZodString>;
112
122
  }, z.core.$strict>;
113
123
  spec: z.ZodUnknown;
@@ -128,7 +138,7 @@ export declare const WorkspaceCallSchema: z.ZodObject<{
128
138
  export declare const WorkspaceBytesCallSchema: z.ZodObject<{
129
139
  session: z.ZodObject<{
130
140
  ownerId: z.ZodString;
131
- sandboxId: z.ZodOptional<z.ZodString>;
141
+ environmentId: z.ZodOptional<z.ZodString>;
132
142
  activeTurnId: z.ZodNullable<z.ZodString>;
133
143
  }, z.core.$strict>;
134
144
  spec: z.ZodUnknown;
@@ -146,7 +156,7 @@ export declare const WorkspaceBytesCallSchema: z.ZodObject<{
146
156
  export declare const WorkspaceListCallSchema: z.ZodObject<{
147
157
  session: z.ZodObject<{
148
158
  ownerId: z.ZodString;
149
- sandboxId: z.ZodOptional<z.ZodString>;
159
+ environmentId: z.ZodOptional<z.ZodString>;
150
160
  activeTurnId: z.ZodNullable<z.ZodString>;
151
161
  }, z.core.$strict>;
152
162
  spec: z.ZodUnknown;
@@ -155,6 +165,75 @@ export declare const WorkspaceListCallSchema: z.ZodObject<{
155
165
  maxEntries: z.ZodNumber;
156
166
  }, z.core.$strict>;
157
167
  }, z.core.$strict>;
168
+ /**
169
+ * One operation on the disk of a workspace (R2d step 3): `list` its entries (files with mode and
170
+ * modification time, links, empty directories; paths relative to the volume, `workspace/…` and
171
+ * in a pod `harness/…`), `read` a range of one file (answered `{kind: "read", base64, eof}`),
172
+ * `clear` it (the engine's own files stay), or `put` entries back in order. A `workspace.read`
173
+ * carries `list` or `read`; a `workspace.write` `clear` or `put`.
174
+ */
175
+ export declare const DiskOpSchema: z.ZodUnion<readonly [z.ZodObject<{
176
+ list: z.ZodObject<{
177
+ maxEntries: z.ZodNumber;
178
+ }, z.core.$strict>;
179
+ }, z.core.$strict>, z.ZodObject<{
180
+ read: z.ZodObject<{
181
+ path: z.ZodString;
182
+ offset: z.ZodNumber;
183
+ length: z.ZodNumber;
184
+ }, z.core.$strict>;
185
+ }, z.core.$strict>, z.ZodObject<{
186
+ clear: z.ZodLiteral<true>;
187
+ }, z.core.$strict>, z.ZodObject<{
188
+ put: z.ZodArray<z.ZodObject<{
189
+ path: z.ZodString;
190
+ type: z.ZodEnum<{
191
+ dir: "dir";
192
+ file: "file";
193
+ link: "link";
194
+ }>;
195
+ mode: z.ZodOptional<z.ZodNumber>;
196
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
197
+ base64: z.ZodOptional<z.ZodString>;
198
+ append: z.ZodOptional<z.ZodBoolean>;
199
+ target: z.ZodOptional<z.ZodString>;
200
+ }, z.core.$strict>>;
201
+ }, z.core.$strict>]>;
202
+ export declare const WorkspaceDiskCallSchema: z.ZodObject<{
203
+ session: z.ZodObject<{
204
+ ownerId: z.ZodString;
205
+ environmentId: z.ZodOptional<z.ZodString>;
206
+ activeTurnId: z.ZodNullable<z.ZodString>;
207
+ }, z.core.$strict>;
208
+ spec: z.ZodUnknown;
209
+ disk: z.ZodUnion<readonly [z.ZodObject<{
210
+ list: z.ZodObject<{
211
+ maxEntries: z.ZodNumber;
212
+ }, z.core.$strict>;
213
+ }, z.core.$strict>, z.ZodObject<{
214
+ read: z.ZodObject<{
215
+ path: z.ZodString;
216
+ offset: z.ZodNumber;
217
+ length: z.ZodNumber;
218
+ }, z.core.$strict>;
219
+ }, z.core.$strict>, z.ZodObject<{
220
+ clear: z.ZodLiteral<true>;
221
+ }, z.core.$strict>, z.ZodObject<{
222
+ put: z.ZodArray<z.ZodObject<{
223
+ path: z.ZodString;
224
+ type: z.ZodEnum<{
225
+ dir: "dir";
226
+ file: "file";
227
+ link: "link";
228
+ }>;
229
+ mode: z.ZodOptional<z.ZodNumber>;
230
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
231
+ base64: z.ZodOptional<z.ZodString>;
232
+ append: z.ZodOptional<z.ZodBoolean>;
233
+ target: z.ZodOptional<z.ZodString>;
234
+ }, z.core.$strict>>;
235
+ }, z.core.$strict>]>;
236
+ }, z.core.$strict>;
158
237
  /** The lease on one run. `token` is the run token (F5) when the gates require one. */
159
238
  export declare const RunGrantSchema: z.ZodObject<{
160
239
  runId: z.ZodString;
@@ -167,13 +246,72 @@ export declare const RunGrantSchema: z.ZodObject<{
167
246
  /** Where a harness sends the session's tool calls. */
168
247
  export declare const RunRoutingSchema: z.ZodObject<{
169
248
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
170
- mcpSnapshot: z.ZodOptional<z.ZodUnknown>;
249
+ mcpSnapshot: z.ZodOptional<z.ZodObject<{
250
+ snapshotSchemaVersion: z.ZodLiteral<1>;
251
+ manifestHash: z.ZodString;
252
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
253
+ agentId: z.ZodOptional<z.ZodString>;
254
+ capabilityId: z.ZodString;
255
+ serverName: z.ZodString;
256
+ serverToolName: z.ZodString;
257
+ name: z.ZodString;
258
+ description: z.ZodOptional<z.ZodString>;
259
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
260
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
261
+ annotations: z.ZodOptional<z.ZodObject<{
262
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
263
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
264
+ }, z.core.$strip>>;
265
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
266
+ }, z.core.$strip>>>;
267
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
268
+ agentId: z.ZodOptional<z.ZodString>;
269
+ capabilityId: z.ZodString;
270
+ serverName: z.ZodString;
271
+ instructions: z.ZodString;
272
+ }, z.core.$strip>>>>;
273
+ }, z.core.$strip>>;
171
274
  sandbox: z.ZodOptional<z.ZodObject<{
172
275
  ownerId: z.ZodString;
173
- sandboxId: z.ZodOptional<z.ZodString>;
276
+ environmentId: z.ZodOptional<z.ZodString>;
174
277
  spec: z.ZodOptional<z.ZodUnknown>;
278
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
175
279
  }, z.core.$strict>>;
176
280
  }, z.core.$strict>;
281
+ /**
282
+ * The fields of `TurnStart.checkpoint` a harness reads (R4.2); the rest are our engine's. An
283
+ * agent turn's `input` is the turn's message: a string, `{text, metadata?}`, `{content,
284
+ * metadata?}` with user content parts, `{kind: "continue"}` for the next segment of a yielded
285
+ * turn, or an approval or response event. Effect ids are prefixed `<turnId>:<segment>:`
286
+ * (`effectIdOf`), and every intent carries `manifestHash`. `state` is the harness's own, as its
287
+ * last output left it: core stores it unread (at most `MAX_HARNESS_STATE_BYTES` for a harness
288
+ * other than ours) and folds the transcript every segment, whatever the state holds. A model
289
+ * call's `executionId` is the session id.
290
+ */
291
+ export declare const HarnessCheckpointSchema: z.ZodObject<{
292
+ sessionId: z.ZodString;
293
+ turnId: z.ZodString;
294
+ segment: z.ZodNumber;
295
+ manifestHash: z.ZodString;
296
+ input: z.ZodOptional<z.ZodUnknown>;
297
+ state: z.ZodOptional<z.ZodUnknown>;
298
+ }, z.core.$loose>;
299
+ /** W3C trace context: `traceparent`, and `tracestate` when the trace carries one. */
300
+ export declare const TraceContextSchema: z.ZodObject<{
301
+ traceparent: z.ZodString;
302
+ tracestate: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strict>;
304
+ /**
305
+ * A tool a harness runs itself (R4.2, Q3), declared in `hello`: the model may call it, and the
306
+ * harness journals each call as a `tool` effect of capability `harness` (`HARNESS_TOOLS_CAPABILITY`)
307
+ * with intent and outcome, like a sandbox tool, so the log records what really ran. It runs in
308
+ * the harness's own process or pod: the egress gate is its only control.
309
+ */
310
+ export declare const NativeToolSchema: z.ZodObject<{
311
+ name: z.ZodString;
312
+ description: z.ZodOptional<z.ZodString>;
313
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
314
+ }, z.core.$strict>;
177
315
  /** What a run starts from: `turn.start` (message, continue, resume) or `approval.answer`. */
178
316
  export declare const TurnStartSchema: z.ZodObject<{
179
317
  type: z.ZodEnum<{
@@ -208,17 +346,52 @@ export declare const TurnStartSchema: z.ZodObject<{
208
346
  }, z.core.$strict>;
209
347
  routing: z.ZodObject<{
210
348
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
211
- mcpSnapshot: z.ZodOptional<z.ZodUnknown>;
349
+ mcpSnapshot: z.ZodOptional<z.ZodObject<{
350
+ snapshotSchemaVersion: z.ZodLiteral<1>;
351
+ manifestHash: z.ZodString;
352
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
353
+ agentId: z.ZodOptional<z.ZodString>;
354
+ capabilityId: z.ZodString;
355
+ serverName: z.ZodString;
356
+ serverToolName: z.ZodString;
357
+ name: z.ZodString;
358
+ description: z.ZodOptional<z.ZodString>;
359
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
360
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
361
+ annotations: z.ZodOptional<z.ZodObject<{
362
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
363
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
364
+ }, z.core.$strip>>;
365
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
366
+ }, z.core.$strip>>>;
367
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
368
+ agentId: z.ZodOptional<z.ZodString>;
369
+ capabilityId: z.ZodString;
370
+ serverName: z.ZodString;
371
+ instructions: z.ZodString;
372
+ }, z.core.$strip>>>>;
373
+ }, z.core.$strip>>;
212
374
  sandbox: z.ZodOptional<z.ZodObject<{
213
375
  ownerId: z.ZodString;
214
- sandboxId: z.ZodOptional<z.ZodString>;
376
+ environmentId: z.ZodOptional<z.ZodString>;
215
377
  spec: z.ZodOptional<z.ZodUnknown>;
378
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
216
379
  }, z.core.$strict>>;
217
380
  }, z.core.$strict>;
381
+ trace: z.ZodOptional<z.ZodObject<{
382
+ traceparent: z.ZodString;
383
+ tracestate: z.ZodOptional<z.ZodString>;
384
+ }, z.core.$strict>>;
218
385
  }, z.core.$strict>;
219
386
  /**
220
- * A segment's end. `state` is the agent's engine state without its transcript; `transcript`
221
- * edits the transcript the segment started from. `thrown` reports an engine that threw.
387
+ * A segment's end. `state` is the harness's state for the next segment (our engine's has no
388
+ * transcript); `transcript` edits the transcript the segment started from. `thrown` reports an
389
+ * engine that threw. The method follows the status: `completed` is `turn.completed`, `failed`
390
+ * and `cancelled` are `turn.failed` (after a cancel, report `cancelled`), `waiting` and
391
+ * `uncertain` are `turn.waiting` (an effect is pending or uncertain), `yielded` is `checkpoint`
392
+ * (the turn goes on in a new segment), `paused` is `turn.paused` (our engine only, in v2). An
393
+ * `execute` answer with `rejoin` re-sends a call its previous owner left running at a gate,
394
+ * same key and body, to join it or collect its outcome.
222
395
  */
223
396
  export declare const TurnOutputSchema: z.ZodObject<{
224
397
  runId: z.ZodString;
@@ -267,6 +440,7 @@ export declare const IntentAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
267
440
  }, z.core.$strict>, z.ZodObject<{
268
441
  status: z.ZodLiteral<"execute">;
269
442
  rejoin: z.ZodOptional<z.ZodLiteral<true>>;
443
+ traceparent: z.ZodOptional<z.ZodString>;
270
444
  }, z.core.$strict>]>;
271
445
  export declare const OutcomeAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
272
446
  status: z.ZodLiteral<"completed">;
@@ -302,6 +476,11 @@ export declare const harnessRequests: {
302
476
  version: z.ZodString;
303
477
  capabilities: z.ZodObject<{
304
478
  workspace: z.ZodOptional<z.ZodUnknown>;
479
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
480
+ name: z.ZodString;
481
+ description: z.ZodOptional<z.ZodString>;
482
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
483
+ }, z.core.$strict>>>;
305
484
  }, z.core.$strict>;
306
485
  }, z.core.$strict>;
307
486
  result: z.ZodObject<{
@@ -359,13 +538,42 @@ export declare const harnessRequests: {
359
538
  }, z.core.$strict>;
360
539
  routing: z.ZodObject<{
361
540
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
362
- mcpSnapshot: z.ZodOptional<z.ZodUnknown>;
541
+ mcpSnapshot: z.ZodOptional<z.ZodObject<{
542
+ snapshotSchemaVersion: z.ZodLiteral<1>;
543
+ manifestHash: z.ZodString;
544
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
545
+ agentId: z.ZodOptional<z.ZodString>;
546
+ capabilityId: z.ZodString;
547
+ serverName: z.ZodString;
548
+ serverToolName: z.ZodString;
549
+ name: z.ZodString;
550
+ description: z.ZodOptional<z.ZodString>;
551
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
552
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
553
+ annotations: z.ZodOptional<z.ZodObject<{
554
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
555
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
556
+ }, z.core.$strip>>;
557
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
558
+ }, z.core.$strip>>>;
559
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
560
+ agentId: z.ZodOptional<z.ZodString>;
561
+ capabilityId: z.ZodString;
562
+ serverName: z.ZodString;
563
+ instructions: z.ZodString;
564
+ }, z.core.$strip>>>>;
565
+ }, z.core.$strip>>;
363
566
  sandbox: z.ZodOptional<z.ZodObject<{
364
567
  ownerId: z.ZodString;
365
- sandboxId: z.ZodOptional<z.ZodString>;
568
+ environmentId: z.ZodOptional<z.ZodString>;
366
569
  spec: z.ZodOptional<z.ZodUnknown>;
570
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
367
571
  }, z.core.$strict>>;
368
572
  }, z.core.$strict>;
573
+ trace: z.ZodOptional<z.ZodObject<{
574
+ traceparent: z.ZodString;
575
+ tracestate: z.ZodOptional<z.ZodString>;
576
+ }, z.core.$strict>>;
369
577
  }, z.core.$strict>;
370
578
  }, z.core.$strict>;
371
579
  };
@@ -436,6 +644,7 @@ export declare const harnessRequests: {
436
644
  }, z.core.$strict>, z.ZodObject<{
437
645
  status: z.ZodLiteral<"execute">;
438
646
  rejoin: z.ZodOptional<z.ZodLiteral<true>>;
647
+ traceparent: z.ZodOptional<z.ZodString>;
439
648
  }, z.core.$strict>]>;
440
649
  };
441
650
  "effect.outcome": {
@@ -473,14 +682,14 @@ export declare const harnessRequests: {
473
682
  sessionId: z.ZodString;
474
683
  turnId: z.ZodNullable<z.ZodString>;
475
684
  type: z.ZodEnum<{
476
- "sandbox.exec": "sandbox.exec";
477
- "sandbox.state": "sandbox.state";
685
+ "environment.exec": "environment.exec";
686
+ "environment.state": "environment.state";
478
687
  }>;
479
688
  payload: z.ZodUnknown;
480
689
  record: z.ZodOptional<z.ZodObject<{
481
690
  key: z.ZodString;
482
691
  sessionId: z.ZodString;
483
- sandboxId: z.ZodOptional<z.ZodString>;
692
+ environmentId: z.ZodOptional<z.ZodString>;
484
693
  backend: z.ZodString;
485
694
  image: z.ZodString;
486
695
  state: z.ZodEnum<{
@@ -497,11 +706,59 @@ export declare const harnessRequests: {
497
706
  "session.mcp": {
498
707
  params: z.ZodObject<{
499
708
  runId: z.ZodString;
500
- snapshot: z.ZodOptional<z.ZodUnknown>;
709
+ snapshot: z.ZodOptional<z.ZodObject<{
710
+ snapshotSchemaVersion: z.ZodLiteral<1>;
711
+ manifestHash: z.ZodString;
712
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
713
+ agentId: z.ZodOptional<z.ZodString>;
714
+ capabilityId: z.ZodString;
715
+ serverName: z.ZodString;
716
+ serverToolName: z.ZodString;
717
+ name: z.ZodString;
718
+ description: z.ZodOptional<z.ZodString>;
719
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
720
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
721
+ annotations: z.ZodOptional<z.ZodObject<{
722
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
723
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
724
+ }, z.core.$strip>>;
725
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
726
+ }, z.core.$strip>>>;
727
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
728
+ agentId: z.ZodOptional<z.ZodString>;
729
+ capabilityId: z.ZodString;
730
+ serverName: z.ZodString;
731
+ instructions: z.ZodString;
732
+ }, z.core.$strip>>>>;
733
+ }, z.core.$strip>>;
501
734
  diagnostics: z.ZodArray<z.ZodUnknown>;
502
735
  }, z.core.$strict>;
503
736
  result: z.ZodObject<{
504
- snapshot: z.ZodUnknown;
737
+ snapshot: z.ZodOptional<z.ZodObject<{
738
+ snapshotSchemaVersion: z.ZodLiteral<1>;
739
+ manifestHash: z.ZodString;
740
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
741
+ agentId: z.ZodOptional<z.ZodString>;
742
+ capabilityId: z.ZodString;
743
+ serverName: z.ZodString;
744
+ serverToolName: z.ZodString;
745
+ name: z.ZodString;
746
+ description: z.ZodOptional<z.ZodString>;
747
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
748
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
749
+ annotations: z.ZodOptional<z.ZodObject<{
750
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
751
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
752
+ }, z.core.$strip>>;
753
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
754
+ }, z.core.$strip>>>;
755
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
756
+ agentId: z.ZodOptional<z.ZodString>;
757
+ capabilityId: z.ZodString;
758
+ serverName: z.ZodString;
759
+ instructions: z.ZodString;
760
+ }, z.core.$strip>>>>;
761
+ }, z.core.$strip>>;
505
762
  sessionTools: z.ZodArray<z.ZodUnknown>;
506
763
  }, z.core.$strict>;
507
764
  };
@@ -682,7 +939,7 @@ export declare const harnessRequests: {
682
939
  };
683
940
  /**
684
941
  * Requests core sends to a harness that declared `workspace` (F6.2), with their answers. A
685
- * sandbox tool's answer is its `SandboxToolOutcome`; the harness claims its `sandbox.*` events
942
+ * sandbox tool's answer is its `SandboxToolOutcome`; the harness claims its `environment.*` events
686
943
  * while the request is in flight. `workspace.read` stays generic: F8.2 exports outputs
687
944
  * through it.
688
945
  */
@@ -691,7 +948,7 @@ export declare const coreRequests: {
691
948
  params: z.ZodUnion<readonly [z.ZodObject<{
692
949
  session: z.ZodObject<{
693
950
  ownerId: z.ZodString;
694
- sandboxId: z.ZodOptional<z.ZodString>;
951
+ environmentId: z.ZodOptional<z.ZodString>;
695
952
  activeTurnId: z.ZodNullable<z.ZodString>;
696
953
  }, z.core.$strict>;
697
954
  spec: z.ZodUnknown;
@@ -707,7 +964,7 @@ export declare const coreRequests: {
707
964
  }, z.core.$strict>, z.ZodObject<{
708
965
  session: z.ZodObject<{
709
966
  ownerId: z.ZodString;
710
- sandboxId: z.ZodOptional<z.ZodString>;
967
+ environmentId: z.ZodOptional<z.ZodString>;
711
968
  activeTurnId: z.ZodNullable<z.ZodString>;
712
969
  }, z.core.$strict>;
713
970
  spec: z.ZodUnknown;
@@ -718,7 +975,7 @@ export declare const coreRequests: {
718
975
  }, z.core.$strict>, z.ZodObject<{
719
976
  session: z.ZodObject<{
720
977
  ownerId: z.ZodString;
721
- sandboxId: z.ZodOptional<z.ZodString>;
978
+ environmentId: z.ZodOptional<z.ZodString>;
722
979
  activeTurnId: z.ZodNullable<z.ZodString>;
723
980
  }, z.core.$strict>;
724
981
  spec: z.ZodUnknown;
@@ -726,14 +983,48 @@ export declare const coreRequests: {
726
983
  dir: z.ZodString;
727
984
  maxEntries: z.ZodNumber;
728
985
  }, z.core.$strict>;
986
+ }, z.core.$strict>, z.ZodObject<{
987
+ session: z.ZodObject<{
988
+ ownerId: z.ZodString;
989
+ environmentId: z.ZodOptional<z.ZodString>;
990
+ activeTurnId: z.ZodNullable<z.ZodString>;
991
+ }, z.core.$strict>;
992
+ spec: z.ZodUnknown;
993
+ disk: z.ZodUnion<readonly [z.ZodObject<{
994
+ list: z.ZodObject<{
995
+ maxEntries: z.ZodNumber;
996
+ }, z.core.$strict>;
997
+ }, z.core.$strict>, z.ZodObject<{
998
+ read: z.ZodObject<{
999
+ path: z.ZodString;
1000
+ offset: z.ZodNumber;
1001
+ length: z.ZodNumber;
1002
+ }, z.core.$strict>;
1003
+ }, z.core.$strict>, z.ZodObject<{
1004
+ clear: z.ZodLiteral<true>;
1005
+ }, z.core.$strict>, z.ZodObject<{
1006
+ put: z.ZodArray<z.ZodObject<{
1007
+ path: z.ZodString;
1008
+ type: z.ZodEnum<{
1009
+ dir: "dir";
1010
+ file: "file";
1011
+ link: "link";
1012
+ }>;
1013
+ mode: z.ZodOptional<z.ZodNumber>;
1014
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
1015
+ base64: z.ZodOptional<z.ZodString>;
1016
+ append: z.ZodOptional<z.ZodBoolean>;
1017
+ target: z.ZodOptional<z.ZodString>;
1018
+ }, z.core.$strict>>;
1019
+ }, z.core.$strict>]>;
729
1020
  }, z.core.$strict>]>;
730
1021
  result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
731
1022
  };
732
1023
  "workspace.write": {
733
- params: z.ZodObject<{
1024
+ params: z.ZodUnion<readonly [z.ZodObject<{
734
1025
  session: z.ZodObject<{
735
1026
  ownerId: z.ZodString;
736
- sandboxId: z.ZodOptional<z.ZodString>;
1027
+ environmentId: z.ZodOptional<z.ZodString>;
737
1028
  activeTurnId: z.ZodNullable<z.ZodString>;
738
1029
  }, z.core.$strict>;
739
1030
  spec: z.ZodUnknown;
@@ -746,14 +1037,48 @@ export declare const coreRequests: {
746
1037
  write: "write";
747
1038
  }>;
748
1039
  input: z.ZodUnknown;
749
- }, z.core.$strict>;
1040
+ }, z.core.$strict>, z.ZodObject<{
1041
+ session: z.ZodObject<{
1042
+ ownerId: z.ZodString;
1043
+ environmentId: z.ZodOptional<z.ZodString>;
1044
+ activeTurnId: z.ZodNullable<z.ZodString>;
1045
+ }, z.core.$strict>;
1046
+ spec: z.ZodUnknown;
1047
+ disk: z.ZodUnion<readonly [z.ZodObject<{
1048
+ list: z.ZodObject<{
1049
+ maxEntries: z.ZodNumber;
1050
+ }, z.core.$strict>;
1051
+ }, z.core.$strict>, z.ZodObject<{
1052
+ read: z.ZodObject<{
1053
+ path: z.ZodString;
1054
+ offset: z.ZodNumber;
1055
+ length: z.ZodNumber;
1056
+ }, z.core.$strict>;
1057
+ }, z.core.$strict>, z.ZodObject<{
1058
+ clear: z.ZodLiteral<true>;
1059
+ }, z.core.$strict>, z.ZodObject<{
1060
+ put: z.ZodArray<z.ZodObject<{
1061
+ path: z.ZodString;
1062
+ type: z.ZodEnum<{
1063
+ dir: "dir";
1064
+ file: "file";
1065
+ link: "link";
1066
+ }>;
1067
+ mode: z.ZodOptional<z.ZodNumber>;
1068
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
1069
+ base64: z.ZodOptional<z.ZodString>;
1070
+ append: z.ZodOptional<z.ZodBoolean>;
1071
+ target: z.ZodOptional<z.ZodString>;
1072
+ }, z.core.$strict>>;
1073
+ }, z.core.$strict>]>;
1074
+ }, z.core.$strict>]>;
750
1075
  result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
751
1076
  };
752
1077
  "workspace.exec": {
753
1078
  params: z.ZodObject<{
754
1079
  session: z.ZodObject<{
755
1080
  ownerId: z.ZodString;
756
- sandboxId: z.ZodOptional<z.ZodString>;
1081
+ environmentId: z.ZodOptional<z.ZodString>;
757
1082
  activeTurnId: z.ZodNullable<z.ZodString>;
758
1083
  }, z.core.$strict>;
759
1084
  spec: z.ZodUnknown;
@@ -783,7 +1108,7 @@ export declare const coreRequests: {
783
1108
  workspaces: z.ZodArray<z.ZodObject<{
784
1109
  key: z.ZodString;
785
1110
  sessionId: z.ZodString;
786
- sandboxId: z.ZodOptional<z.ZodString>;
1111
+ environmentId: z.ZodOptional<z.ZodString>;
787
1112
  backend: z.ZodString;
788
1113
  image: z.ZodString;
789
1114
  state: z.ZodEnum<{
@@ -796,11 +1121,11 @@ export declare const coreRequests: {
796
1121
  }, z.core.$strict>>;
797
1122
  }, z.core.$strict>;
798
1123
  };
799
- /** Deletes workspaces with their files: by key, by sandbox resource, or all of them. */
1124
+ /** Deletes workspaces with their files: by key, by Environment, or all of them. */
800
1125
  "workspace.remove": {
801
1126
  params: z.ZodObject<{
802
1127
  keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
803
- sandboxIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1128
+ environmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
804
1129
  all: z.ZodOptional<z.ZodLiteral<true>>;
805
1130
  }, z.core.$strict>;
806
1131
  result: z.ZodObject<{}, z.core.$strict>;