@nylorun/core 0.19.0-beta → 0.21.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 (98) hide show
  1. package/CHANGELOG.md +191 -0
  2. package/README.md +2 -2
  3. package/dist/compatibility.d.ts +148 -32
  4. package/dist/compatibility.js +154 -33
  5. package/dist/contracts.d.ts +2714 -495
  6. package/dist/contracts.js +1395 -493
  7. package/dist/define.d.ts +15 -12
  8. package/dist/define.js +11 -7
  9. package/dist/definition/approval.d.ts +16 -0
  10. package/dist/definition/approval.js +33 -0
  11. package/dist/definition/assemble.d.ts +6 -10
  12. package/dist/definition/assemble.js +48 -105
  13. package/dist/definition/bind-agent.d.ts +3 -4
  14. package/dist/definition/bind-agent.js +12 -30
  15. package/dist/definition/binding.d.ts +2 -2
  16. package/dist/definition/bound.d.ts +10 -10
  17. package/dist/definition/builder.d.ts +16 -20
  18. package/dist/definition/builder.js +29 -81
  19. package/dist/definition/code-tools.d.ts +4 -4
  20. package/dist/definition/code-tools.js +7 -22
  21. package/dist/definition/declaration.d.ts +4 -7
  22. package/dist/definition/declaration.js +29 -99
  23. package/dist/definition/{tools-capability.d.ts → deferred-tools.d.ts} +3 -13
  24. package/dist/definition/{tools-capability.js → deferred-tools.js} +2 -18
  25. package/dist/definition/delegate.d.ts +2 -4
  26. package/dist/definition/delegate.js +8 -10
  27. package/dist/definition/flow/compile.js +0 -2
  28. package/dist/definition/from.d.ts +7 -4
  29. package/dist/definition/from.js +72 -117
  30. package/dist/definition/helpers.d.ts +0 -7
  31. package/dist/definition/helpers.js +0 -5
  32. package/dist/definition/http-tool.d.ts +7 -4
  33. package/dist/definition/http-tool.js +6 -10
  34. package/dist/definition/implementations.d.ts +6 -8
  35. package/dist/definition/manifest.d.ts +11 -5
  36. package/dist/definition/manifest.js +27 -26
  37. package/dist/definition/mcp.d.ts +1 -52
  38. package/dist/definition/mcp.js +11 -60
  39. package/dist/definition/media-reference.d.ts +23 -0
  40. package/dist/definition/media-reference.js +26 -0
  41. package/dist/definition/removed.d.ts +3 -10
  42. package/dist/definition/removed.js +10 -17
  43. package/dist/definition/runtime-manifest.d.ts +30 -0
  44. package/dist/definition/runtime-manifest.js +132 -0
  45. package/dist/definition/sandbox-tools.d.ts +1 -1
  46. package/dist/definition/sandbox-tools.js +1 -1
  47. package/dist/definition/skill-tools.d.ts +13 -7
  48. package/dist/definition/skill-tools.js +23 -10
  49. package/dist/definition/trace.d.ts +18 -0
  50. package/dist/definition/trace.js +42 -0
  51. package/dist/definition/variant.d.ts +5 -4
  52. package/dist/definition/variant.js +23 -55
  53. package/dist/definition/workflow/runnable.js +1 -1
  54. package/dist/errors.d.ts +1 -1
  55. package/dist/harness-api/entries.d.ts +242 -0
  56. package/dist/harness-api/entries.js +118 -0
  57. package/dist/harness-api/gates.d.ts +167 -0
  58. package/dist/harness-api/gates.js +117 -0
  59. package/dist/harness-api/harness-api.schema.json +4975 -0
  60. package/dist/harness-api/index.d.ts +19 -3
  61. package/dist/harness-api/index.js +16 -3
  62. package/dist/harness-api/json-schema.d.ts +12 -0
  63. package/dist/harness-api/json-schema.js +61 -0
  64. package/dist/harness-api/mcp.d.ts +57 -0
  65. package/dist/harness-api/mcp.js +39 -0
  66. package/dist/harness-api/messages.d.ts +11 -5
  67. package/dist/harness-api/messages.js +5 -3
  68. package/dist/harness-api/schema.d.ts +346 -36
  69. package/dist/harness-api/schema.js +143 -22
  70. package/dist/harness-api/transport.d.ts +55 -0
  71. package/dist/harness-api/transport.js +61 -0
  72. package/dist/index.d.ts +1 -1
  73. package/dist/manifest-schemas.d.ts +6 -0
  74. package/dist/manifest-schemas.js +34 -0
  75. package/dist/schemas/agent-manifest.schema.json +897 -0
  76. package/dist/schemas/environment-manifest.schema.json +329 -0
  77. package/dist/types/agent.d.ts +1 -1
  78. package/dist/types/manifest.d.ts +48 -28
  79. package/dist/types/model.d.ts +2 -2
  80. package/dist/types/observe.d.ts +8 -20
  81. package/dist/types/part.d.ts +25 -0
  82. package/dist/types/tool.d.ts +1 -1
  83. package/dist/types/transcript.d.ts +5 -0
  84. package/dist/utils/definition-files.d.ts +11 -6
  85. package/dist/utils/definition-files.js +19 -9
  86. package/dist/utils/harness-id.d.ts +9 -0
  87. package/dist/utils/harness-id.js +11 -0
  88. package/dist/utils/runtime-tools.d.ts +19 -0
  89. package/dist/utils/runtime-tools.js +30 -0
  90. package/dist/utils/sandbox.d.ts +1 -1
  91. package/dist/utils/sandbox.js +1 -1
  92. package/package.json +11 -4
  93. package/dist/definition/capability.d.ts +0 -43
  94. package/dist/definition/capability.js +0 -82
  95. package/dist/definition/sandbox-capability.d.ts +0 -44
  96. package/dist/definition/sandbox-capability.js +0 -139
  97. package/dist/types/middleware.d.ts +0 -94
  98. /package/dist/types/{middleware.js → part.js} +0 -0
@@ -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;
@@ -65,7 +75,6 @@ export declare const EffectIntentSchema: z.ZodObject<{
65
75
  path: z.ZodString;
66
76
  delegationId: z.ZodOptional<z.ZodString>;
67
77
  }, z.core.$strict>>;
68
- capabilityId: z.ZodOptional<z.ZodString>;
69
78
  toolName: z.ZodOptional<z.ZodString>;
70
79
  path: z.ZodOptional<z.ZodString>;
71
80
  key: z.ZodOptional<z.ZodString>;
@@ -86,7 +95,7 @@ export declare const RecordedOutcomeSchema: z.ZodObject<{
86
95
  export declare const WorkspaceRecordSchema: z.ZodObject<{
87
96
  key: z.ZodString;
88
97
  sessionId: z.ZodString;
89
- sandboxId: z.ZodOptional<z.ZodString>;
98
+ environmentId: z.ZodOptional<z.ZodString>;
90
99
  backend: z.ZodString;
91
100
  image: z.ZodString;
92
101
  state: z.ZodEnum<{
@@ -97,17 +106,17 @@ export declare const WorkspaceRecordSchema: z.ZodObject<{
97
106
  createdAt: z.ZodString;
98
107
  updatedAt: z.ZodString;
99
108
  }, z.core.$strict>;
100
- /** The session a workspace request acts for: the workspace's owner and its sandbox resource. */
109
+ /** The session a workspace request acts for, and the Environment whose workspace it is. */
101
110
  export declare const WorkspaceSessionSchema: z.ZodObject<{
102
111
  ownerId: z.ZodString;
103
- sandboxId: z.ZodOptional<z.ZodString>;
112
+ environmentId: z.ZodOptional<z.ZodString>;
104
113
  activeTurnId: z.ZodNullable<z.ZodString>;
105
114
  }, z.core.$strict>;
106
115
  /** A sandbox tool call core sends to the harness that serves workspaces. */
107
116
  export declare const WorkspaceCallSchema: z.ZodObject<{
108
117
  session: z.ZodObject<{
109
118
  ownerId: z.ZodString;
110
- sandboxId: z.ZodOptional<z.ZodString>;
119
+ environmentId: z.ZodOptional<z.ZodString>;
111
120
  activeTurnId: z.ZodNullable<z.ZodString>;
112
121
  }, z.core.$strict>;
113
122
  spec: z.ZodUnknown;
@@ -128,7 +137,7 @@ export declare const WorkspaceCallSchema: z.ZodObject<{
128
137
  export declare const WorkspaceBytesCallSchema: z.ZodObject<{
129
138
  session: z.ZodObject<{
130
139
  ownerId: z.ZodString;
131
- sandboxId: z.ZodOptional<z.ZodString>;
140
+ environmentId: z.ZodOptional<z.ZodString>;
132
141
  activeTurnId: z.ZodNullable<z.ZodString>;
133
142
  }, z.core.$strict>;
134
143
  spec: z.ZodUnknown;
@@ -146,7 +155,7 @@ export declare const WorkspaceBytesCallSchema: z.ZodObject<{
146
155
  export declare const WorkspaceListCallSchema: z.ZodObject<{
147
156
  session: z.ZodObject<{
148
157
  ownerId: z.ZodString;
149
- sandboxId: z.ZodOptional<z.ZodString>;
158
+ environmentId: z.ZodOptional<z.ZodString>;
150
159
  activeTurnId: z.ZodNullable<z.ZodString>;
151
160
  }, z.core.$strict>;
152
161
  spec: z.ZodUnknown;
@@ -155,6 +164,75 @@ export declare const WorkspaceListCallSchema: z.ZodObject<{
155
164
  maxEntries: z.ZodNumber;
156
165
  }, z.core.$strict>;
157
166
  }, z.core.$strict>;
167
+ /**
168
+ * One operation on the disk of a workspace (R2d step 3): `list` its entries (files with mode and
169
+ * modification time, links, empty directories; paths relative to the volume, `workspace/…` and
170
+ * in a pod `harness/…`), `read` a range of one file (answered `{kind: "read", base64, eof}`),
171
+ * `clear` it (the engine's own files stay), or `put` entries back in order. A `workspace.read`
172
+ * carries `list` or `read`; a `workspace.write` `clear` or `put`.
173
+ */
174
+ export declare const DiskOpSchema: z.ZodUnion<readonly [z.ZodObject<{
175
+ list: z.ZodObject<{
176
+ maxEntries: z.ZodNumber;
177
+ }, z.core.$strict>;
178
+ }, z.core.$strict>, z.ZodObject<{
179
+ read: z.ZodObject<{
180
+ path: z.ZodString;
181
+ offset: z.ZodNumber;
182
+ length: z.ZodNumber;
183
+ }, z.core.$strict>;
184
+ }, z.core.$strict>, z.ZodObject<{
185
+ clear: z.ZodLiteral<true>;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ put: z.ZodArray<z.ZodObject<{
188
+ path: z.ZodString;
189
+ type: z.ZodEnum<{
190
+ dir: "dir";
191
+ file: "file";
192
+ link: "link";
193
+ }>;
194
+ mode: z.ZodOptional<z.ZodNumber>;
195
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
196
+ base64: z.ZodOptional<z.ZodString>;
197
+ append: z.ZodOptional<z.ZodBoolean>;
198
+ target: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strict>>;
200
+ }, z.core.$strict>]>;
201
+ export declare const WorkspaceDiskCallSchema: z.ZodObject<{
202
+ session: z.ZodObject<{
203
+ ownerId: z.ZodString;
204
+ environmentId: z.ZodOptional<z.ZodString>;
205
+ activeTurnId: z.ZodNullable<z.ZodString>;
206
+ }, z.core.$strict>;
207
+ spec: z.ZodUnknown;
208
+ disk: z.ZodUnion<readonly [z.ZodObject<{
209
+ list: z.ZodObject<{
210
+ maxEntries: z.ZodNumber;
211
+ }, z.core.$strict>;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ read: z.ZodObject<{
214
+ path: z.ZodString;
215
+ offset: z.ZodNumber;
216
+ length: z.ZodNumber;
217
+ }, z.core.$strict>;
218
+ }, z.core.$strict>, z.ZodObject<{
219
+ clear: z.ZodLiteral<true>;
220
+ }, z.core.$strict>, z.ZodObject<{
221
+ put: z.ZodArray<z.ZodObject<{
222
+ path: z.ZodString;
223
+ type: z.ZodEnum<{
224
+ dir: "dir";
225
+ file: "file";
226
+ link: "link";
227
+ }>;
228
+ mode: z.ZodOptional<z.ZodNumber>;
229
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
230
+ base64: z.ZodOptional<z.ZodString>;
231
+ append: z.ZodOptional<z.ZodBoolean>;
232
+ target: z.ZodOptional<z.ZodString>;
233
+ }, z.core.$strict>>;
234
+ }, z.core.$strict>]>;
235
+ }, z.core.$strict>;
158
236
  /** The lease on one run. `token` is the run token (F5) when the gates require one. */
159
237
  export declare const RunGrantSchema: z.ZodObject<{
160
238
  runId: z.ZodString;
@@ -167,14 +245,70 @@ export declare const RunGrantSchema: z.ZodObject<{
167
245
  /** Where a harness sends the session's tool calls. */
168
246
  export declare const RunRoutingSchema: z.ZodObject<{
169
247
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
170
- mcpSnapshot: z.ZodOptional<z.ZodUnknown>;
248
+ mcpSnapshot: z.ZodOptional<z.ZodObject<{
249
+ snapshotSchemaVersion: z.ZodLiteral<1>;
250
+ manifestHash: z.ZodString;
251
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
252
+ agentId: z.ZodOptional<z.ZodString>;
253
+ serverName: z.ZodString;
254
+ serverToolName: z.ZodString;
255
+ name: z.ZodString;
256
+ description: z.ZodOptional<z.ZodString>;
257
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
258
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
259
+ annotations: z.ZodOptional<z.ZodObject<{
260
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
261
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
262
+ }, z.core.$strip>>;
263
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
264
+ }, z.core.$strip>>>;
265
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
266
+ agentId: z.ZodOptional<z.ZodString>;
267
+ serverName: z.ZodString;
268
+ instructions: z.ZodString;
269
+ }, z.core.$strip>>>>;
270
+ }, z.core.$strip>>;
171
271
  sandbox: z.ZodOptional<z.ZodObject<{
172
272
  ownerId: z.ZodString;
173
- sandboxId: z.ZodOptional<z.ZodString>;
273
+ environmentId: z.ZodOptional<z.ZodString>;
174
274
  spec: z.ZodOptional<z.ZodUnknown>;
175
275
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
176
276
  }, z.core.$strict>>;
177
277
  }, z.core.$strict>;
278
+ /**
279
+ * The fields of `TurnStart.checkpoint` a harness reads (R4.2); the rest are our engine's. An
280
+ * agent turn's `input` is the turn's message: a string, `{text, metadata?}`, `{content,
281
+ * metadata?}` with user content parts, `{kind: "continue"}` for the next segment of a yielded
282
+ * turn, or an approval or response event. Effect ids are prefixed `<turnId>:<segment>:`
283
+ * (`effectIdOf`), and every intent carries `manifestHash`. `state` is the harness's own, as its
284
+ * last output left it: core stores it unread (at most `MAX_HARNESS_STATE_BYTES` for a harness
285
+ * other than ours) and folds the transcript every segment, whatever the state holds. A model
286
+ * call's `executionId` is the session id.
287
+ */
288
+ export declare const HarnessCheckpointSchema: z.ZodObject<{
289
+ sessionId: z.ZodString;
290
+ turnId: z.ZodString;
291
+ segment: z.ZodNumber;
292
+ manifestHash: z.ZodString;
293
+ input: z.ZodOptional<z.ZodUnknown>;
294
+ state: z.ZodOptional<z.ZodUnknown>;
295
+ }, z.core.$loose>;
296
+ /** W3C trace context: `traceparent`, and `tracestate` when the trace carries one. */
297
+ export declare const TraceContextSchema: z.ZodObject<{
298
+ traceparent: z.ZodString;
299
+ tracestate: z.ZodOptional<z.ZodString>;
300
+ }, z.core.$strict>;
301
+ /**
302
+ * A tool a harness runs itself (R4.2, Q3), declared in `hello`: the model may call it, and the
303
+ * harness journals each call as a `tool` effect with intent and outcome, like a sandbox tool, so
304
+ * the log records what really ran. Its name may not be one the agent or the Runtime already uses. It runs in
305
+ * the harness's own process or pod: the egress gate is its only control.
306
+ */
307
+ export declare const NativeToolSchema: z.ZodObject<{
308
+ name: z.ZodString;
309
+ description: z.ZodOptional<z.ZodString>;
310
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
311
+ }, z.core.$strict>;
178
312
  /** What a run starts from: `turn.start` (message, continue, resume) or `approval.answer`. */
179
313
  export declare const TurnStartSchema: z.ZodObject<{
180
314
  type: z.ZodEnum<{
@@ -209,18 +343,50 @@ export declare const TurnStartSchema: z.ZodObject<{
209
343
  }, z.core.$strict>;
210
344
  routing: z.ZodObject<{
211
345
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
212
- mcpSnapshot: z.ZodOptional<z.ZodUnknown>;
346
+ mcpSnapshot: z.ZodOptional<z.ZodObject<{
347
+ snapshotSchemaVersion: z.ZodLiteral<1>;
348
+ manifestHash: z.ZodString;
349
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
350
+ agentId: z.ZodOptional<z.ZodString>;
351
+ serverName: z.ZodString;
352
+ serverToolName: z.ZodString;
353
+ name: z.ZodString;
354
+ description: z.ZodOptional<z.ZodString>;
355
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
356
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
357
+ annotations: z.ZodOptional<z.ZodObject<{
358
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
359
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
360
+ }, z.core.$strip>>;
361
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
362
+ }, z.core.$strip>>>;
363
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
364
+ agentId: z.ZodOptional<z.ZodString>;
365
+ serverName: z.ZodString;
366
+ instructions: z.ZodString;
367
+ }, z.core.$strip>>>>;
368
+ }, z.core.$strip>>;
213
369
  sandbox: z.ZodOptional<z.ZodObject<{
214
370
  ownerId: z.ZodString;
215
- sandboxId: z.ZodOptional<z.ZodString>;
371
+ environmentId: z.ZodOptional<z.ZodString>;
216
372
  spec: z.ZodOptional<z.ZodUnknown>;
217
373
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
218
374
  }, z.core.$strict>>;
219
375
  }, z.core.$strict>;
376
+ trace: z.ZodOptional<z.ZodObject<{
377
+ traceparent: z.ZodString;
378
+ tracestate: z.ZodOptional<z.ZodString>;
379
+ }, z.core.$strict>>;
220
380
  }, z.core.$strict>;
221
381
  /**
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.
382
+ * A segment's end. `state` is the harness's state for the next segment (our engine's has no
383
+ * transcript); `transcript` edits the transcript the segment started from. `thrown` reports an
384
+ * engine that threw. The method follows the status: `completed` is `turn.completed`, `failed`
385
+ * and `cancelled` are `turn.failed` (after a cancel, report `cancelled`), `waiting` and
386
+ * `uncertain` are `turn.waiting` (an effect is pending or uncertain), `yielded` is `checkpoint`
387
+ * (the turn goes on in a new segment), `paused` is `turn.paused` (our engine only, in v2). An
388
+ * `execute` answer with `rejoin` re-sends a call its previous owner left running at a gate,
389
+ * same key and body, to join it or collect its outcome.
224
390
  */
225
391
  export declare const TurnOutputSchema: z.ZodObject<{
226
392
  runId: z.ZodString;
@@ -269,6 +435,7 @@ export declare const IntentAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
269
435
  }, z.core.$strict>, z.ZodObject<{
270
436
  status: z.ZodLiteral<"execute">;
271
437
  rejoin: z.ZodOptional<z.ZodLiteral<true>>;
438
+ traceparent: z.ZodOptional<z.ZodString>;
272
439
  }, z.core.$strict>]>;
273
440
  export declare const OutcomeAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
274
441
  status: z.ZodLiteral<"completed">;
@@ -293,7 +460,7 @@ export type RequestTypes<Schemas extends RequestSchemas> = {
293
460
  /** Requests a harness sends to core, with their answers. */
294
461
  export declare const harnessRequests: {
295
462
  /**
296
- * `capabilities.workspace` declares that the harness serves the Tenant's workspaces (F6.2):
463
+ * `features.workspace` declares that the harness serves the Tenant's workspaces (F6.2):
297
464
  * core then sends it the `workspace.*` requests. The answer names the Tenant (its workspace
298
465
  * keys are scoped by it) and the sandbox backend preference the harness selects with.
299
466
  */
@@ -302,12 +469,17 @@ export declare const harnessRequests: {
302
469
  api: z.ZodNumber;
303
470
  name: z.ZodString;
304
471
  version: z.ZodString;
305
- capabilities: z.ZodObject<{
472
+ features: z.ZodObject<{
306
473
  workspace: z.ZodOptional<z.ZodUnknown>;
474
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
475
+ name: z.ZodString;
476
+ description: z.ZodOptional<z.ZodString>;
477
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
478
+ }, z.core.$strict>>>;
307
479
  }, z.core.$strict>;
308
480
  }, z.core.$strict>;
309
481
  result: z.ZodObject<{
310
- api: z.ZodLiteral<2>;
482
+ api: z.ZodLiteral<3>;
311
483
  tenantId: z.ZodString;
312
484
  sandbox: z.ZodObject<{
313
485
  backend: z.ZodNullable<z.ZodString>;
@@ -361,14 +533,40 @@ export declare const harnessRequests: {
361
533
  }, z.core.$strict>;
362
534
  routing: z.ZodObject<{
363
535
  rootManifest: z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>;
364
- mcpSnapshot: z.ZodOptional<z.ZodUnknown>;
536
+ mcpSnapshot: z.ZodOptional<z.ZodObject<{
537
+ snapshotSchemaVersion: z.ZodLiteral<1>;
538
+ manifestHash: z.ZodString;
539
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
540
+ agentId: z.ZodOptional<z.ZodString>;
541
+ serverName: z.ZodString;
542
+ serverToolName: z.ZodString;
543
+ name: z.ZodString;
544
+ description: z.ZodOptional<z.ZodString>;
545
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
546
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
547
+ annotations: z.ZodOptional<z.ZodObject<{
548
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
549
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
550
+ }, z.core.$strip>>;
551
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
552
+ }, z.core.$strip>>>;
553
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
554
+ agentId: z.ZodOptional<z.ZodString>;
555
+ serverName: z.ZodString;
556
+ instructions: z.ZodString;
557
+ }, z.core.$strip>>>>;
558
+ }, z.core.$strip>>;
365
559
  sandbox: z.ZodOptional<z.ZodObject<{
366
560
  ownerId: z.ZodString;
367
- sandboxId: z.ZodOptional<z.ZodString>;
561
+ environmentId: z.ZodOptional<z.ZodString>;
368
562
  spec: z.ZodOptional<z.ZodUnknown>;
369
563
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
370
564
  }, z.core.$strict>>;
371
565
  }, z.core.$strict>;
566
+ trace: z.ZodOptional<z.ZodObject<{
567
+ traceparent: z.ZodString;
568
+ tracestate: z.ZodOptional<z.ZodString>;
569
+ }, z.core.$strict>>;
372
570
  }, z.core.$strict>;
373
571
  }, z.core.$strict>;
374
572
  };
@@ -415,7 +613,6 @@ export declare const harnessRequests: {
415
613
  path: z.ZodString;
416
614
  delegationId: z.ZodOptional<z.ZodString>;
417
615
  }, z.core.$strict>>;
418
- capabilityId: z.ZodOptional<z.ZodString>;
419
616
  toolName: z.ZodOptional<z.ZodString>;
420
617
  path: z.ZodOptional<z.ZodString>;
421
618
  key: z.ZodOptional<z.ZodString>;
@@ -439,6 +636,7 @@ export declare const harnessRequests: {
439
636
  }, z.core.$strict>, z.ZodObject<{
440
637
  status: z.ZodLiteral<"execute">;
441
638
  rejoin: z.ZodOptional<z.ZodLiteral<true>>;
639
+ traceparent: z.ZodOptional<z.ZodString>;
442
640
  }, z.core.$strict>]>;
443
641
  };
444
642
  "effect.outcome": {
@@ -476,14 +674,14 @@ export declare const harnessRequests: {
476
674
  sessionId: z.ZodString;
477
675
  turnId: z.ZodNullable<z.ZodString>;
478
676
  type: z.ZodEnum<{
479
- "sandbox.exec": "sandbox.exec";
480
- "sandbox.state": "sandbox.state";
677
+ "environment.exec": "environment.exec";
678
+ "environment.state": "environment.state";
481
679
  }>;
482
680
  payload: z.ZodUnknown;
483
681
  record: z.ZodOptional<z.ZodObject<{
484
682
  key: z.ZodString;
485
683
  sessionId: z.ZodString;
486
- sandboxId: z.ZodOptional<z.ZodString>;
684
+ environmentId: z.ZodOptional<z.ZodString>;
487
685
  backend: z.ZodString;
488
686
  image: z.ZodString;
489
687
  state: z.ZodEnum<{
@@ -500,11 +698,55 @@ export declare const harnessRequests: {
500
698
  "session.mcp": {
501
699
  params: z.ZodObject<{
502
700
  runId: z.ZodString;
503
- snapshot: z.ZodOptional<z.ZodUnknown>;
701
+ snapshot: z.ZodOptional<z.ZodObject<{
702
+ snapshotSchemaVersion: z.ZodLiteral<1>;
703
+ manifestHash: z.ZodString;
704
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
705
+ agentId: z.ZodOptional<z.ZodString>;
706
+ serverName: z.ZodString;
707
+ serverToolName: z.ZodString;
708
+ name: z.ZodString;
709
+ description: z.ZodOptional<z.ZodString>;
710
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
711
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
712
+ annotations: z.ZodOptional<z.ZodObject<{
713
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
714
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
715
+ }, z.core.$strip>>;
716
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
717
+ }, z.core.$strip>>>;
718
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
719
+ agentId: z.ZodOptional<z.ZodString>;
720
+ serverName: z.ZodString;
721
+ instructions: z.ZodString;
722
+ }, z.core.$strip>>>>;
723
+ }, z.core.$strip>>;
504
724
  diagnostics: z.ZodArray<z.ZodUnknown>;
505
725
  }, z.core.$strict>;
506
726
  result: z.ZodObject<{
507
- snapshot: z.ZodUnknown;
727
+ snapshot: z.ZodOptional<z.ZodObject<{
728
+ snapshotSchemaVersion: z.ZodLiteral<1>;
729
+ manifestHash: z.ZodString;
730
+ mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
731
+ agentId: z.ZodOptional<z.ZodString>;
732
+ serverName: z.ZodString;
733
+ serverToolName: z.ZodString;
734
+ name: z.ZodString;
735
+ description: z.ZodOptional<z.ZodString>;
736
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
737
+ outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
738
+ annotations: z.ZodOptional<z.ZodObject<{
739
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
740
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
741
+ }, z.core.$strip>>;
742
+ deferred: z.ZodOptional<z.ZodLiteral<true>>;
743
+ }, z.core.$strip>>>;
744
+ servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
745
+ agentId: z.ZodOptional<z.ZodString>;
746
+ serverName: z.ZodString;
747
+ instructions: z.ZodString;
748
+ }, z.core.$strip>>>>;
749
+ }, z.core.$strip>>;
508
750
  sessionTools: z.ZodArray<z.ZodUnknown>;
509
751
  }, z.core.$strict>;
510
752
  };
@@ -685,7 +927,7 @@ export declare const harnessRequests: {
685
927
  };
686
928
  /**
687
929
  * 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
930
+ * sandbox tool's answer is its `SandboxToolOutcome`; the harness claims its `environment.*` events
689
931
  * while the request is in flight. `workspace.read` stays generic: F8.2 exports outputs
690
932
  * through it.
691
933
  */
@@ -694,7 +936,7 @@ export declare const coreRequests: {
694
936
  params: z.ZodUnion<readonly [z.ZodObject<{
695
937
  session: z.ZodObject<{
696
938
  ownerId: z.ZodString;
697
- sandboxId: z.ZodOptional<z.ZodString>;
939
+ environmentId: z.ZodOptional<z.ZodString>;
698
940
  activeTurnId: z.ZodNullable<z.ZodString>;
699
941
  }, z.core.$strict>;
700
942
  spec: z.ZodUnknown;
@@ -710,7 +952,7 @@ export declare const coreRequests: {
710
952
  }, z.core.$strict>, z.ZodObject<{
711
953
  session: z.ZodObject<{
712
954
  ownerId: z.ZodString;
713
- sandboxId: z.ZodOptional<z.ZodString>;
955
+ environmentId: z.ZodOptional<z.ZodString>;
714
956
  activeTurnId: z.ZodNullable<z.ZodString>;
715
957
  }, z.core.$strict>;
716
958
  spec: z.ZodUnknown;
@@ -721,7 +963,7 @@ export declare const coreRequests: {
721
963
  }, z.core.$strict>, z.ZodObject<{
722
964
  session: z.ZodObject<{
723
965
  ownerId: z.ZodString;
724
- sandboxId: z.ZodOptional<z.ZodString>;
966
+ environmentId: z.ZodOptional<z.ZodString>;
725
967
  activeTurnId: z.ZodNullable<z.ZodString>;
726
968
  }, z.core.$strict>;
727
969
  spec: z.ZodUnknown;
@@ -729,14 +971,48 @@ export declare const coreRequests: {
729
971
  dir: z.ZodString;
730
972
  maxEntries: z.ZodNumber;
731
973
  }, z.core.$strict>;
974
+ }, z.core.$strict>, z.ZodObject<{
975
+ session: z.ZodObject<{
976
+ ownerId: z.ZodString;
977
+ environmentId: z.ZodOptional<z.ZodString>;
978
+ activeTurnId: z.ZodNullable<z.ZodString>;
979
+ }, z.core.$strict>;
980
+ spec: z.ZodUnknown;
981
+ disk: z.ZodUnion<readonly [z.ZodObject<{
982
+ list: z.ZodObject<{
983
+ maxEntries: z.ZodNumber;
984
+ }, z.core.$strict>;
985
+ }, z.core.$strict>, z.ZodObject<{
986
+ read: z.ZodObject<{
987
+ path: z.ZodString;
988
+ offset: z.ZodNumber;
989
+ length: z.ZodNumber;
990
+ }, z.core.$strict>;
991
+ }, z.core.$strict>, z.ZodObject<{
992
+ clear: z.ZodLiteral<true>;
993
+ }, z.core.$strict>, z.ZodObject<{
994
+ put: z.ZodArray<z.ZodObject<{
995
+ path: z.ZodString;
996
+ type: z.ZodEnum<{
997
+ dir: "dir";
998
+ file: "file";
999
+ link: "link";
1000
+ }>;
1001
+ mode: z.ZodOptional<z.ZodNumber>;
1002
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
1003
+ base64: z.ZodOptional<z.ZodString>;
1004
+ append: z.ZodOptional<z.ZodBoolean>;
1005
+ target: z.ZodOptional<z.ZodString>;
1006
+ }, z.core.$strict>>;
1007
+ }, z.core.$strict>]>;
732
1008
  }, z.core.$strict>]>;
733
1009
  result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
734
1010
  };
735
1011
  "workspace.write": {
736
- params: z.ZodObject<{
1012
+ params: z.ZodUnion<readonly [z.ZodObject<{
737
1013
  session: z.ZodObject<{
738
1014
  ownerId: z.ZodString;
739
- sandboxId: z.ZodOptional<z.ZodString>;
1015
+ environmentId: z.ZodOptional<z.ZodString>;
740
1016
  activeTurnId: z.ZodNullable<z.ZodString>;
741
1017
  }, z.core.$strict>;
742
1018
  spec: z.ZodUnknown;
@@ -749,14 +1025,48 @@ export declare const coreRequests: {
749
1025
  write: "write";
750
1026
  }>;
751
1027
  input: z.ZodUnknown;
752
- }, z.core.$strict>;
1028
+ }, z.core.$strict>, z.ZodObject<{
1029
+ session: z.ZodObject<{
1030
+ ownerId: z.ZodString;
1031
+ environmentId: z.ZodOptional<z.ZodString>;
1032
+ activeTurnId: z.ZodNullable<z.ZodString>;
1033
+ }, z.core.$strict>;
1034
+ spec: z.ZodUnknown;
1035
+ disk: z.ZodUnion<readonly [z.ZodObject<{
1036
+ list: z.ZodObject<{
1037
+ maxEntries: z.ZodNumber;
1038
+ }, z.core.$strict>;
1039
+ }, z.core.$strict>, z.ZodObject<{
1040
+ read: z.ZodObject<{
1041
+ path: z.ZodString;
1042
+ offset: z.ZodNumber;
1043
+ length: z.ZodNumber;
1044
+ }, z.core.$strict>;
1045
+ }, z.core.$strict>, z.ZodObject<{
1046
+ clear: z.ZodLiteral<true>;
1047
+ }, z.core.$strict>, z.ZodObject<{
1048
+ put: z.ZodArray<z.ZodObject<{
1049
+ path: z.ZodString;
1050
+ type: z.ZodEnum<{
1051
+ dir: "dir";
1052
+ file: "file";
1053
+ link: "link";
1054
+ }>;
1055
+ mode: z.ZodOptional<z.ZodNumber>;
1056
+ mtimeMs: z.ZodOptional<z.ZodNumber>;
1057
+ base64: z.ZodOptional<z.ZodString>;
1058
+ append: z.ZodOptional<z.ZodBoolean>;
1059
+ target: z.ZodOptional<z.ZodString>;
1060
+ }, z.core.$strict>>;
1061
+ }, z.core.$strict>]>;
1062
+ }, z.core.$strict>]>;
753
1063
  result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
754
1064
  };
755
1065
  "workspace.exec": {
756
1066
  params: z.ZodObject<{
757
1067
  session: z.ZodObject<{
758
1068
  ownerId: z.ZodString;
759
- sandboxId: z.ZodOptional<z.ZodString>;
1069
+ environmentId: z.ZodOptional<z.ZodString>;
760
1070
  activeTurnId: z.ZodNullable<z.ZodString>;
761
1071
  }, z.core.$strict>;
762
1072
  spec: z.ZodUnknown;
@@ -786,7 +1096,7 @@ export declare const coreRequests: {
786
1096
  workspaces: z.ZodArray<z.ZodObject<{
787
1097
  key: z.ZodString;
788
1098
  sessionId: z.ZodString;
789
- sandboxId: z.ZodOptional<z.ZodString>;
1099
+ environmentId: z.ZodOptional<z.ZodString>;
790
1100
  backend: z.ZodString;
791
1101
  image: z.ZodString;
792
1102
  state: z.ZodEnum<{
@@ -799,11 +1109,11 @@ export declare const coreRequests: {
799
1109
  }, z.core.$strict>>;
800
1110
  }, z.core.$strict>;
801
1111
  };
802
- /** Deletes workspaces with their files: by key, by sandbox resource, or all of them. */
1112
+ /** Deletes workspaces with their files: by key, by Environment, or all of them. */
803
1113
  "workspace.remove": {
804
1114
  params: z.ZodObject<{
805
1115
  keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
806
- sandboxIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1116
+ environmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
807
1117
  all: z.ZodOptional<z.ZodLiteral<true>>;
808
1118
  }, z.core.$strict>;
809
1119
  result: z.ZodObject<{}, z.core.$strict>;