@nylorun/core 0.19.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 +115 -0
  2. package/dist/compatibility.d.ts +74 -32
  3. package/dist/compatibility.js +80 -33
  4. package/dist/contracts.d.ts +1496 -495
  5. package/dist/contracts.js +889 -374
  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 +353 -31
  35. package/dist/harness-api/schema.js +138 -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,14 +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>;
175
278
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
176
279
  }, z.core.$strict>>;
177
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>;
178
315
  /** What a run starts from: `turn.start` (message, continue, resume) or `approval.answer`. */
179
316
  export declare const TurnStartSchema: z.ZodObject<{
180
317
  type: z.ZodEnum<{
@@ -209,18 +346,52 @@ export declare const TurnStartSchema: z.ZodObject<{
209
346
  }, z.core.$strict>;
210
347
  routing: z.ZodObject<{
211
348
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
212
- 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>>;
213
374
  sandbox: z.ZodOptional<z.ZodObject<{
214
375
  ownerId: z.ZodString;
215
- sandboxId: z.ZodOptional<z.ZodString>;
376
+ environmentId: z.ZodOptional<z.ZodString>;
216
377
  spec: z.ZodOptional<z.ZodUnknown>;
217
378
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
218
379
  }, z.core.$strict>>;
219
380
  }, z.core.$strict>;
381
+ trace: z.ZodOptional<z.ZodObject<{
382
+ traceparent: z.ZodString;
383
+ tracestate: z.ZodOptional<z.ZodString>;
384
+ }, z.core.$strict>>;
220
385
  }, z.core.$strict>;
221
386
  /**
222
- * A segment's end. `state` is the agent's engine state without its transcript; `transcript`
223
- * 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.
224
395
  */
225
396
  export declare const TurnOutputSchema: z.ZodObject<{
226
397
  runId: z.ZodString;
@@ -269,6 +440,7 @@ export declare const IntentAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
269
440
  }, z.core.$strict>, z.ZodObject<{
270
441
  status: z.ZodLiteral<"execute">;
271
442
  rejoin: z.ZodOptional<z.ZodLiteral<true>>;
443
+ traceparent: z.ZodOptional<z.ZodString>;
272
444
  }, z.core.$strict>]>;
273
445
  export declare const OutcomeAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
274
446
  status: z.ZodLiteral<"completed">;
@@ -304,6 +476,11 @@ export declare const harnessRequests: {
304
476
  version: z.ZodString;
305
477
  capabilities: z.ZodObject<{
306
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>>>;
307
484
  }, z.core.$strict>;
308
485
  }, z.core.$strict>;
309
486
  result: z.ZodObject<{
@@ -361,14 +538,42 @@ export declare const harnessRequests: {
361
538
  }, z.core.$strict>;
362
539
  routing: z.ZodObject<{
363
540
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
364
- 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>>;
365
566
  sandbox: z.ZodOptional<z.ZodObject<{
366
567
  ownerId: z.ZodString;
367
- sandboxId: z.ZodOptional<z.ZodString>;
568
+ environmentId: z.ZodOptional<z.ZodString>;
368
569
  spec: z.ZodOptional<z.ZodUnknown>;
369
570
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
370
571
  }, z.core.$strict>>;
371
572
  }, z.core.$strict>;
573
+ trace: z.ZodOptional<z.ZodObject<{
574
+ traceparent: z.ZodString;
575
+ tracestate: z.ZodOptional<z.ZodString>;
576
+ }, z.core.$strict>>;
372
577
  }, z.core.$strict>;
373
578
  }, z.core.$strict>;
374
579
  };
@@ -439,6 +644,7 @@ export declare const harnessRequests: {
439
644
  }, z.core.$strict>, z.ZodObject<{
440
645
  status: z.ZodLiteral<"execute">;
441
646
  rejoin: z.ZodOptional<z.ZodLiteral<true>>;
647
+ traceparent: z.ZodOptional<z.ZodString>;
442
648
  }, z.core.$strict>]>;
443
649
  };
444
650
  "effect.outcome": {
@@ -476,14 +682,14 @@ export declare const harnessRequests: {
476
682
  sessionId: z.ZodString;
477
683
  turnId: z.ZodNullable<z.ZodString>;
478
684
  type: z.ZodEnum<{
479
- "sandbox.exec": "sandbox.exec";
480
- "sandbox.state": "sandbox.state";
685
+ "environment.exec": "environment.exec";
686
+ "environment.state": "environment.state";
481
687
  }>;
482
688
  payload: z.ZodUnknown;
483
689
  record: z.ZodOptional<z.ZodObject<{
484
690
  key: z.ZodString;
485
691
  sessionId: z.ZodString;
486
- sandboxId: z.ZodOptional<z.ZodString>;
692
+ environmentId: z.ZodOptional<z.ZodString>;
487
693
  backend: z.ZodString;
488
694
  image: z.ZodString;
489
695
  state: z.ZodEnum<{
@@ -500,11 +706,59 @@ export declare const harnessRequests: {
500
706
  "session.mcp": {
501
707
  params: z.ZodObject<{
502
708
  runId: z.ZodString;
503
- 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>>;
504
734
  diagnostics: z.ZodArray<z.ZodUnknown>;
505
735
  }, z.core.$strict>;
506
736
  result: z.ZodObject<{
507
- 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>>;
508
762
  sessionTools: z.ZodArray<z.ZodUnknown>;
509
763
  }, z.core.$strict>;
510
764
  };
@@ -685,7 +939,7 @@ export declare const harnessRequests: {
685
939
  };
686
940
  /**
687
941
  * Requests core sends to a harness that declared `workspace` (F6.2), with their answers. A
688
- * 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
689
943
  * while the request is in flight. `workspace.read` stays generic: F8.2 exports outputs
690
944
  * through it.
691
945
  */
@@ -694,7 +948,7 @@ export declare const coreRequests: {
694
948
  params: z.ZodUnion<readonly [z.ZodObject<{
695
949
  session: z.ZodObject<{
696
950
  ownerId: z.ZodString;
697
- sandboxId: z.ZodOptional<z.ZodString>;
951
+ environmentId: z.ZodOptional<z.ZodString>;
698
952
  activeTurnId: z.ZodNullable<z.ZodString>;
699
953
  }, z.core.$strict>;
700
954
  spec: z.ZodUnknown;
@@ -710,7 +964,7 @@ export declare const coreRequests: {
710
964
  }, z.core.$strict>, z.ZodObject<{
711
965
  session: z.ZodObject<{
712
966
  ownerId: z.ZodString;
713
- sandboxId: z.ZodOptional<z.ZodString>;
967
+ environmentId: z.ZodOptional<z.ZodString>;
714
968
  activeTurnId: z.ZodNullable<z.ZodString>;
715
969
  }, z.core.$strict>;
716
970
  spec: z.ZodUnknown;
@@ -721,7 +975,7 @@ export declare const coreRequests: {
721
975
  }, z.core.$strict>, z.ZodObject<{
722
976
  session: z.ZodObject<{
723
977
  ownerId: z.ZodString;
724
- sandboxId: z.ZodOptional<z.ZodString>;
978
+ environmentId: z.ZodOptional<z.ZodString>;
725
979
  activeTurnId: z.ZodNullable<z.ZodString>;
726
980
  }, z.core.$strict>;
727
981
  spec: z.ZodUnknown;
@@ -729,14 +983,48 @@ export declare const coreRequests: {
729
983
  dir: z.ZodString;
730
984
  maxEntries: z.ZodNumber;
731
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>]>;
732
1020
  }, z.core.$strict>]>;
733
1021
  result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
734
1022
  };
735
1023
  "workspace.write": {
736
- params: z.ZodObject<{
1024
+ params: z.ZodUnion<readonly [z.ZodObject<{
737
1025
  session: z.ZodObject<{
738
1026
  ownerId: z.ZodString;
739
- sandboxId: z.ZodOptional<z.ZodString>;
1027
+ environmentId: z.ZodOptional<z.ZodString>;
740
1028
  activeTurnId: z.ZodNullable<z.ZodString>;
741
1029
  }, z.core.$strict>;
742
1030
  spec: z.ZodUnknown;
@@ -749,14 +1037,48 @@ export declare const coreRequests: {
749
1037
  write: "write";
750
1038
  }>;
751
1039
  input: z.ZodUnknown;
752
- }, 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>]>;
753
1075
  result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
754
1076
  };
755
1077
  "workspace.exec": {
756
1078
  params: z.ZodObject<{
757
1079
  session: z.ZodObject<{
758
1080
  ownerId: z.ZodString;
759
- sandboxId: z.ZodOptional<z.ZodString>;
1081
+ environmentId: z.ZodOptional<z.ZodString>;
760
1082
  activeTurnId: z.ZodNullable<z.ZodString>;
761
1083
  }, z.core.$strict>;
762
1084
  spec: z.ZodUnknown;
@@ -786,7 +1108,7 @@ export declare const coreRequests: {
786
1108
  workspaces: z.ZodArray<z.ZodObject<{
787
1109
  key: z.ZodString;
788
1110
  sessionId: z.ZodString;
789
- sandboxId: z.ZodOptional<z.ZodString>;
1111
+ environmentId: z.ZodOptional<z.ZodString>;
790
1112
  backend: z.ZodString;
791
1113
  image: z.ZodString;
792
1114
  state: z.ZodEnum<{
@@ -799,11 +1121,11 @@ export declare const coreRequests: {
799
1121
  }, z.core.$strict>>;
800
1122
  }, z.core.$strict>;
801
1123
  };
802
- /** 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. */
803
1125
  "workspace.remove": {
804
1126
  params: z.ZodObject<{
805
1127
  keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
806
- sandboxIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1128
+ environmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
807
1129
  all: z.ZodOptional<z.ZodLiteral<true>>;
808
1130
  }, z.core.$strict>;
809
1131
  result: z.ZodObject<{}, z.core.$strict>;