@nylorun/core 0.23.0-beta → 0.24.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.
@@ -1,12 +1,13 @@
1
1
  /** Public wire contracts only. Never import checkpoint or engine modules here. */
2
2
  import { z } from "zod";
3
- import type { AgentManifest, McpServerManifest } from "./types/manifest.js";
4
- import type { JsonValue } from "./types/shared.js";
3
+ import type { AgentHarnessSection, AgentManifest, McpServerManifest, WorkflowHarnessSection } from "./types/manifest.js";
4
+ import type { JsonObject, JsonValue } from "./types/shared.js";
5
5
  import type { WorkflowManifest } from "./types/workflow.js";
6
6
  export { FILE_NAME_MAX, FILE_PATH_MAX } from "./utils/file-systems.js";
7
7
  import { DEFAULT_HARNESS, HARNESS_ID_PATTERN, isHarnessId } from "./utils/harness-id.js";
8
8
  export { DEFAULT_HARNESS, HARNESS_ID_PATTERN, isHarnessId };
9
- export type { AgentManifest } from "./types/manifest.js";
9
+ export { MEMORY_ACCESS, MEMORY_COMMANDS, MEMORY_DESCRIPTION_MAX, MEMORY_INSTRUCTIONS_MAX, MEMORY_OPERATIONS, MEMORY_PATH_MAX, MEMORY_ROOT, checkMemoryCall, memoryAliasOf, memoryDescriptionOf, memoryPathOf, memoryPathWithin, type MemoryAccess, type MemoryCommandName, type MemoryOperation, } from "./utils/memory.js";
10
+ export type { AgentHarnessSection, AgentManifest, AgentMemorySettings, HarnessMcpServer, HarnessSection, HarnessSkill, WorkflowHarnessSection, } from "./types/manifest.js";
10
11
  export type { WorkflowManifest } from "./types/workflow.js";
11
12
  export { PROTOCOL_VERSION, ERROR_CODES } from "./compatibility.js";
12
13
  export { SKILL_TOTAL_BYTES_DEFAULT, definitionFilesOf, isDefinitionFileHash, skillsOf, } from "./utils/definition-files.js";
@@ -31,31 +32,29 @@ export declare const ENVIRONMENT_NAME_PATTERN: RegExp;
31
32
  export declare const AgentManifestSchema: z.ZodType<AgentManifest>;
32
33
  /** Workflow definition document. `kind: "workflow"`; a missing `kind` is never a workflow. */
33
34
  export declare const WorkflowManifestSchema: z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>;
34
- /** Registry document: agent (no `kind`, or legacy) or workflow (`kind: "workflow"`). */
35
+ /**
36
+ * A loop manifest: what the engine runs (agent manifest v7's shape, or workflow manifest v3's),
37
+ * as the Runtime makes it from an agent manifest v8's harness section (`loopManifestOf`) and a
38
+ * session pins it.
39
+ */
35
40
  export declare const DefinitionDocumentSchema: z.ZodUnion<readonly [z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>, z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>]>;
36
41
  export type DefinitionDocument = AgentManifest | WorkflowManifest;
37
- export declare const PutAgentRequestSchema: z.ZodObject<{
38
- requestId: z.ZodString;
39
- manifest: z.ZodUnion<readonly [z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>, z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>]>;
40
- implementationVersion: z.ZodString;
41
- }, z.core.$strict>;
42
- export type PutAgentRequest = z.infer<typeof PutAgentRequestSchema>;
43
42
  /**
44
43
  * An identifier's grammar is the protocol's (B15): it crosses the Runtime API, tokens and grants
45
- * and means the same in every installation, so its length is a constant of protocol 15, not a
44
+ * and means the same in every installation, so its length is a constant of the protocol, not a
46
45
  * setting.
47
46
  */
48
- export declare const ENVIRONMENT_ID_MAX_LENGTH = 200;
49
- export declare function isEnvironmentId(value: unknown): value is string;
50
- /** An Environment grant: an exact Environment id, or a prefix ending in `/*` (`team-a/*`). */
51
- export declare function isEnvironmentGrant(value: unknown): value is string;
47
+ export declare const AGENT_ID_MAX_LENGTH = 200;
48
+ export declare function isAgentId(value: unknown): value is string;
49
+ /** An Agent grant: an exact Agent id, or a prefix ending in `/*` (`team-a/*`). */
50
+ export declare function isAgentGrant(value: unknown): value is string;
52
51
  /**
53
- * Whether `grants` (a token caller's Environment grants) reach Environment `id`: an exact entry,
54
- * or a prefix entry `p/*` for any id below `p/`. No grants reach no Environment.
52
+ * Whether `grants` (a token caller's Agent grants) reach Agent `id`: `*`, an exact entry, or a
53
+ * prefix entry `p/*` for any id below `p/`. No grants reach no Agent.
55
54
  */
56
- export declare function environmentGranted(grants: readonly string[] | undefined, id: string): boolean;
57
- export declare const EnvironmentIdSchema: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
58
- export declare const EnvironmentGrantSchema: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
55
+ export declare function agentGranted(grants: readonly string[] | undefined, id: string): boolean;
56
+ export declare const AgentIdSchema: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
57
+ export declare const AgentGrantSchema: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
59
58
  /**
60
59
  * `virtual`: a just-bash workspace in the harness container, no cluster (a local convenience).
61
60
  * `pod`: an agent-sandbox pod with its own volume (Host feature `sandbox-pods`). `none`: no
@@ -116,17 +115,17 @@ export declare const EnvironmentFileSchema: z.ZodUnion<readonly [z.ZodObject<{
116
115
  files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
117
116
  }, z.core.$strict>]>;
118
117
  export type EnvironmentFile = z.infer<typeof EnvironmentFileSchema>;
119
- export declare function isEnvironmentManifestName(value: unknown): value is string;
120
- export declare const EnvironmentManifestNameSchema: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
118
+ export declare function isAgentManifestName(value: unknown): value is string;
119
+ export declare const AgentManifestNameSchema: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
121
120
  /**
122
- * Which manifest an Environment is made from: `name` (its latest version when the Environment is
123
- * created) or `name@n` (version `n`). Either way the Environment keeps that version for life.
121
+ * Which agent manifest an Agent is made from: `name` (tracking: the latest version when the Agent
122
+ * is created; track T3 moves it on) or `name@n` (pinned to version `n`).
124
123
  */
125
- export declare function parseEnvironmentManifestRef(ref: string): {
124
+ export declare function parseAgentManifestRef(ref: string): {
126
125
  name: string;
127
126
  version?: number;
128
127
  } | undefined;
129
- export declare const EnvironmentManifestRefSchema: z.ZodString;
128
+ export declare const AgentManifestRefSchema: z.ZodString;
130
129
  /**
131
130
  * What an Environment's artifacts, its sessions' skills and its disk versions may hold: part of
132
131
  * its manifest, fixed for its life. Each limit left out is the Tenant's (`/v1/tenant/artifacts`,
@@ -148,105 +147,33 @@ export declare const EnvironmentLimitsSchema: z.ZodObject<{
148
147
  }, z.core.$strict>;
149
148
  export type EnvironmentLimits = z.infer<typeof EnvironmentLimitsSchema>;
150
149
  /**
151
- * `PUT /v1/environments/{environmentId}`: creates the Environment and its vault, or finds the
152
- * one with this id, so "get or create" is one call. An Environment is made from one version of an
153
- * environment manifest (`manifest`) or from the inline manifest these fields make, and never
154
- * changes what it runs after that (protocol 14, D63): on an existing one, `labels` replace its
155
- * labels and `ownerUserId` sets or clears its owner guard, a field that matches what it runs is
156
- * accepted, and anything else is `409 environment_immutable`, naming the fork that makes a new
157
- * Environment instead.
150
+ * `PUT /v1/agents/{agentId}` (protocol 16): creates the Agent, its vault and its compute from a
151
+ * saved agent manifest, or finds the one with this id, so "get or create" is one call. An Agent is
152
+ * the live instance of one version of an agent manifest: `manifest: "name"` records that it
153
+ * tracks the manifest (its latest version, and every version saved later) and `"name@n"` that it
154
+ * is pinned to one; the version it runs is `resolvedVersion`. On an existing Agent, `labels`
155
+ * replace its labels, `owner` sets or clears its owner guard, and `manifest` moves it (track T3,
156
+ * D73): to another version of its manifest, tracking or pinned. A move changes no data: its id,
157
+ * disk, vault and sessions stay. A harness-only change applies at once; a runtime change of a pod
158
+ * waits for its next start; one that adds a required secret waits for its value. Its manifest's
159
+ * name, kind, harness and storage are fixed (`409 agent_fixed_field`); fork it to change them.
160
+ * `?dryRun=true` answers the move's plan (`AgentMovePlan`) and changes nothing.
158
161
  */
159
- export declare const PutEnvironmentRequestSchema: z.ZodObject<{
162
+ export declare const PutAgentRequestSchema: z.ZodObject<{
160
163
  requestId: z.ZodOptional<z.ZodString>;
161
- manifest: z.ZodOptional<z.ZodString>;
162
- kind: z.ZodOptional<z.ZodEnum<{
163
- none: "none";
164
- pod: "pod";
165
- virtual: "virtual";
166
- }>>;
164
+ manifest: z.ZodString;
165
+ owner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
166
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
168
- image: z.ZodOptional<z.ZodString>;
169
- resources: z.ZodOptional<z.ZodObject<{
170
- cpus: z.ZodOptional<z.ZodNumber>;
171
- memory: z.ZodOptional<z.ZodString>;
172
- }, z.core.$strict>>;
173
- storage: z.ZodOptional<z.ZodString>;
174
- network: z.ZodOptional<z.ZodObject<{
175
- allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
176
- }, z.core.$strict>>;
177
- harness: z.ZodOptional<z.ZodString>;
178
- ownerUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
- lifecycle: z.ZodOptional<z.ZodObject<{
180
- idle: z.ZodOptional<z.ZodString>;
181
- deleteAfter: z.ZodOptional<z.ZodString>;
182
- }, z.core.$strict>>;
183
- setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
184
- command: z.ZodString;
185
- cwd: z.ZodOptional<z.ZodString>;
186
- timeout: z.ZodOptional<z.ZodString>;
187
- }, z.core.$strict>>>;
188
- files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
189
- artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
190
- version: z.ZodNumber;
191
- path: z.ZodString;
192
- }, z.core.$strict>, z.ZodObject<{
193
- path: z.ZodString;
194
- files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
195
- }, z.core.$strict>]>>>;
196
- limits: z.ZodOptional<z.ZodObject<{
197
- artifacts: z.ZodOptional<z.ZodObject<{
198
- fileBytes: z.ZodOptional<z.ZodNumber>;
199
- totalBytes: z.ZodOptional<z.ZodNumber>;
200
- }, z.core.$strict>>;
201
- skills: z.ZodOptional<z.ZodObject<{
202
- totalBytes: z.ZodOptional<z.ZodNumber>;
203
- }, z.core.$strict>>;
204
- disk: z.ZodOptional<z.ZodObject<{
205
- versionBytes: z.ZodOptional<z.ZodNumber>;
206
- versionEntries: z.ZodOptional<z.ZodNumber>;
207
- }, z.core.$strict>>;
208
- }, z.core.$strict>>;
209
- secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
210
- required: z.ZodOptional<z.ZodBoolean>;
211
- description: z.ZodOptional<z.ZodString>;
212
- type: z.ZodLiteral<"environment_secret">;
213
- allowedHosts: z.ZodArray<z.ZodString>;
214
- inject: z.ZodOptional<z.ZodObject<{
215
- header: z.ZodString;
216
- format: z.ZodString;
217
- }, z.core.$strict>>;
218
- }, z.core.$strict>, z.ZodObject<{
219
- required: z.ZodOptional<z.ZodBoolean>;
220
- description: z.ZodOptional<z.ZodString>;
221
- type: z.ZodLiteral<"environment_variable">;
222
- }, z.core.$strict>, z.ZodObject<{
223
- via: z.ZodOptional<z.ZodString>;
224
- identity: z.ZodOptional<z.ZodObject<{
225
- header: z.ZodString;
226
- }, z.core.$strict>>;
227
- required: z.ZodOptional<z.ZodBoolean>;
228
- description: z.ZodOptional<z.ZodString>;
229
- type: z.ZodLiteral<"bearer">;
230
- url: z.ZodString;
231
- }, z.core.$strict>, z.ZodObject<{
232
- via: z.ZodOptional<z.ZodString>;
233
- identity: z.ZodOptional<z.ZodObject<{
234
- header: z.ZodString;
235
- }, z.core.$strict>>;
236
- required: z.ZodOptional<z.ZodBoolean>;
237
- description: z.ZodOptional<z.ZodString>;
238
- type: z.ZodLiteral<"headers">;
239
- url: z.ZodString;
240
- }, z.core.$strict>], "type">>>>;
241
167
  from: z.ZodOptional<z.ZodObject<{
242
- environment: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
168
+ agent: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
243
169
  version: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"latest">]>;
244
170
  }, z.core.$strict>>;
245
171
  }, z.core.$strict>;
246
- export type PutEnvironmentRequest = z.infer<typeof PutEnvironmentRequestSchema>;
172
+ export type PutAgentRequest = z.infer<typeof PutAgentRequestSchema>;
247
173
  /**
248
- * What an Environment runs (its inline manifest, called the recipe before protocol 14), resolved
249
- * against the Tenant's limits when it was made. It never changes after that.
174
+ * What an Agent's environment runs: its manifest version's runtime section resolved against the
175
+ * Tenant's limits when the Agent was made, with the harness that runs its loop. It never changes
176
+ * after that.
250
177
  */
251
178
  export declare const EnvironmentRecipeSchema: z.ZodObject<{
252
179
  image: z.ZodOptional<z.ZodString>;
@@ -323,9 +250,11 @@ export declare const EnvironmentRecipeSchema: z.ZodObject<{
323
250
  }, z.core.$strict>], "type">>>>;
324
251
  }, z.core.$strict>;
325
252
  export type EnvironmentRecipe = z.infer<typeof EnvironmentRecipeSchema>;
326
- /** A session that names an Environment, as the Environment's view lists it. */
327
- export declare const EnvironmentSessionSchema: z.ZodObject<{
253
+ /** A session on an Agent, as the Agent's view lists it: none is special (D71). */
254
+ export declare const AgentSessionSchema: z.ZodObject<{
328
255
  id: z.ZodString;
256
+ ownerUserId: z.ZodString;
257
+ status: z.ZodString;
329
258
  activeTurnId: z.ZodNullable<z.ZodString>;
330
259
  }, z.core.$strict>;
331
260
  /** What the Runtime wants of a pod (`desired`) and what it last saw (`observed`). */
@@ -333,7 +262,7 @@ export declare const POD_DESIRED: readonly ["running", "suspended", "deleted"];
333
262
  export declare const POD_OBSERVED: readonly ["creating", "running", "suspended", "lost", "failed", "deleting"];
334
263
  export type PodDesired = (typeof POD_DESIRED)[number];
335
264
  export type PodObserved = (typeof POD_OBSERVED)[number];
336
- export declare const EnvironmentPodViewSchema: z.ZodObject<{
265
+ export declare const AgentPodViewSchema: z.ZodObject<{
337
266
  desired: z.ZodEnum<{
338
267
  deleted: "deleted";
339
268
  running: "running";
@@ -352,23 +281,108 @@ export declare const EnvironmentPodViewSchema: z.ZodObject<{
352
281
  reason: z.ZodOptional<z.ZodString>;
353
282
  imageDigest: z.ZodOptional<z.ZodString>;
354
283
  }, z.core.$strict>;
355
- export type EnvironmentPodView = z.infer<typeof EnvironmentPodViewSchema>;
284
+ export type AgentPodView = z.infer<typeof AgentPodViewSchema>;
285
+ /**
286
+ * The compute states an Agent's environment reports (`compute.state`): `ready` until a tool
287
+ * first runs in a virtual one, then `creating`, `running` or `stopped`. An open set: clients must
288
+ * accept values they do not know.
289
+ */
290
+ export declare const COMPUTE_STATES: readonly ["ready", "creating", "running", "stopped"];
356
291
  /**
357
- * The compute states an Environment reports today: `ready` until a tool first runs in a virtual
358
- * one, then `creating`, `running` or `stopped`. An open set: clients must accept values they do
359
- * not know (a later release may add one, such as `cold`).
292
+ * An Agent's state (protocol 16), derived when it is read, the first that holds:
293
+ *
294
+ * - `paused`: its desired state is `off` (nothing in protocol 16 sets it; track T6 adds the control).
295
+ * - `failing`: its compute failed or was lost, or a session's latest finished turn failed.
296
+ * - `input_required`: a session waits on a person (an approval or interaction, or an uncertain
297
+ * effect), even while another works.
298
+ * - `working`: a turn runs.
299
+ * - `sleeping`: nothing to do.
300
+ *
301
+ * An open set: clients must accept values they do not know.
360
302
  */
361
- export declare const ENVIRONMENT_STATES: readonly ["ready", "creating", "running", "stopped"];
362
- /** `PUT` and `GET /v1/environments/{environmentId}`. */
363
- export declare const EnvironmentViewSchema: z.ZodObject<{
303
+ export declare const AGENT_STATES: readonly ["paused", "failing", "input_required", "working", "sleeping"];
304
+ export type AgentState = (typeof AGENT_STATES)[number];
305
+ /** What made an Agent's state, or another state that also holds (`attention`). */
306
+ export declare const AgentAttentionSchema: z.ZodObject<{
307
+ state: z.ZodEnum<{
308
+ failing: "failing";
309
+ input_required: "input_required";
310
+ paused: "paused";
311
+ sleeping: "sleeping";
312
+ working: "working";
313
+ }>;
314
+ sessionId: z.ZodOptional<z.ZodString>;
315
+ reason: z.ZodString;
316
+ }, z.core.$strict>;
317
+ export type AgentAttention = z.infer<typeof AgentAttentionSchema>;
318
+ /** `PUT` and `GET /v1/agents/{agentId}`. */
319
+ export declare const AgentViewSchema: z.ZodObject<{
364
320
  id: z.ZodString;
321
+ manifest: z.ZodString;
322
+ resolvedVersion: z.ZodNumber;
323
+ manifestHash: z.ZodString;
324
+ tracking: z.ZodEnum<{
325
+ pinned: "pinned";
326
+ tracking: "tracking";
327
+ }>;
328
+ targetVersion: z.ZodNullable<z.ZodNumber>;
329
+ waitingFor: z.ZodNullable<z.ZodEnum<{
330
+ secrets: "secrets";
331
+ start: "start";
332
+ }>>;
333
+ failedVersion: z.ZodNullable<z.ZodNumber>;
334
+ startCheck: z.ZodNullable<z.ZodObject<{
335
+ from: z.ZodNumber;
336
+ startedAt: z.ZodString;
337
+ }, z.core.$strict>>;
365
338
  kind: z.ZodEnum<{
366
339
  none: "none";
367
340
  pod: "pod";
368
341
  virtual: "virtual";
369
342
  }>;
343
+ harness: z.ZodString;
344
+ owner: z.ZodNullable<z.ZodString>;
370
345
  labels: z.ZodRecord<z.ZodString, z.ZodString>;
371
- manifest: z.ZodObject<{
346
+ state: z.ZodString;
347
+ attention: z.ZodArray<z.ZodObject<{
348
+ state: z.ZodEnum<{
349
+ failing: "failing";
350
+ input_required: "input_required";
351
+ paused: "paused";
352
+ sleeping: "sleeping";
353
+ working: "working";
354
+ }>;
355
+ sessionId: z.ZodOptional<z.ZodString>;
356
+ reason: z.ZodString;
357
+ }, z.core.$strict>>;
358
+ desired: z.ZodEnum<{
359
+ off: "off";
360
+ on: "on";
361
+ }>;
362
+ nextWakeAt: z.ZodNullable<z.ZodString>;
363
+ compute: z.ZodObject<{
364
+ state: z.ZodString;
365
+ pod: z.ZodOptional<z.ZodObject<{
366
+ desired: z.ZodEnum<{
367
+ deleted: "deleted";
368
+ running: "running";
369
+ suspended: "suspended";
370
+ }>;
371
+ observed: z.ZodEnum<{
372
+ creating: "creating";
373
+ deleting: "deleting";
374
+ failed: "failed";
375
+ lost: "lost";
376
+ running: "running";
377
+ suspended: "suspended";
378
+ }>;
379
+ volumeGeneration: z.ZodNumber;
380
+ hostEpoch: z.ZodNumber;
381
+ reason: z.ZodOptional<z.ZodString>;
382
+ imageDigest: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strict>>;
384
+ }, z.core.$strict>;
385
+ runtime: z.ZodObject<{
372
386
  image: z.ZodOptional<z.ZodString>;
373
387
  resources: z.ZodOptional<z.ZodObject<{
374
388
  cpus: z.ZodNumber;
@@ -442,9 +456,6 @@ export declare const EnvironmentViewSchema: z.ZodObject<{
442
456
  url: z.ZodString;
443
457
  }, z.core.$strict>], "type">>>>;
444
458
  }, z.core.$strict>;
445
- manifestName: z.ZodOptional<z.ZodString>;
446
- manifestVersion: z.ZodOptional<z.ZodNumber>;
447
- manifestHash: z.ZodOptional<z.ZodString>;
448
459
  limits: z.ZodObject<{
449
460
  artifacts: z.ZodObject<{
450
461
  fileBytes: z.ZodNumber;
@@ -458,43 +469,21 @@ export declare const EnvironmentViewSchema: z.ZodObject<{
458
469
  versionEntries: z.ZodNumber;
459
470
  }, z.core.$strict>;
460
471
  }, z.core.$strict>;
461
- forkedFrom: z.ZodOptional<z.ZodObject<{
462
- environment: z.ZodString;
463
- disk: z.ZodNullable<z.ZodNumber>;
472
+ sessions: z.ZodArray<z.ZodObject<{
473
+ id: z.ZodString;
474
+ ownerUserId: z.ZodString;
475
+ status: z.ZodString;
476
+ activeTurnId: z.ZodNullable<z.ZodString>;
464
477
  }, z.core.$strict>>;
465
- slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
478
+ slots: z.ZodArray<z.ZodObject<{
466
479
  name: z.ZodString;
467
480
  type: z.ZodString;
468
481
  required: z.ZodBoolean;
469
482
  set: z.ZodBoolean;
470
- }, z.core.$strict>>>;
471
- version: z.ZodNumber;
472
- appliedVersion: z.ZodNumber;
473
- ownerUserId: z.ZodNullable<z.ZodString>;
474
- state: z.ZodString;
475
- pod: z.ZodOptional<z.ZodObject<{
476
- desired: z.ZodEnum<{
477
- deleted: "deleted";
478
- running: "running";
479
- suspended: "suspended";
480
- }>;
481
- observed: z.ZodEnum<{
482
- creating: "creating";
483
- deleting: "deleting";
484
- failed: "failed";
485
- lost: "lost";
486
- running: "running";
487
- suspended: "suspended";
488
- }>;
489
- volumeGeneration: z.ZodNumber;
490
- hostEpoch: z.ZodNumber;
491
- reason: z.ZodOptional<z.ZodString>;
492
- imageDigest: z.ZodOptional<z.ZodString>;
493
483
  }, z.core.$strict>>;
494
- lastUsedAt: z.ZodString;
495
484
  disk: z.ZodOptional<z.ZodObject<{
496
485
  latestVersion: z.ZodNullable<z.ZodNumber>;
497
- operation: z.ZodOptional<z.ZodObject<{
486
+ operation: z.ZodNullable<z.ZodObject<{
498
487
  kind: z.ZodEnum<{
499
488
  restore: "restore";
500
489
  seed: "seed";
@@ -504,17 +493,18 @@ export declare const EnvironmentViewSchema: z.ZodObject<{
504
493
  startedAt: z.ZodString;
505
494
  }, z.core.$strict>>;
506
495
  }, z.core.$strict>>;
507
- sessions: z.ZodArray<z.ZodObject<{
508
- id: z.ZodString;
509
- activeTurnId: z.ZodNullable<z.ZodString>;
496
+ forkedFrom: z.ZodNullable<z.ZodObject<{
497
+ agent: z.ZodString;
498
+ disk: z.ZodNullable<z.ZodNumber>;
510
499
  }, z.core.$strict>>;
500
+ lastUsedAt: z.ZodString;
511
501
  createdAt: z.ZodString;
512
502
  updatedAt: z.ZodString;
513
503
  }, z.core.$strict>;
514
- export type EnvironmentView = z.infer<typeof EnvironmentViewSchema>;
515
- /** `POST /v1/environments/{id}/snapshot`: a new version of the Environment's disk. */
516
- export declare const EnvironmentSnapshotSchema: z.ZodObject<{
517
- environmentId: z.ZodString;
504
+ export type AgentView = z.infer<typeof AgentViewSchema>;
505
+ /** `POST /v1/agents/{id}/snapshot`: a new version of the Agent's disk. */
506
+ export declare const AgentSnapshotSchema: z.ZodObject<{
507
+ agentId: z.ZodString;
518
508
  artifactId: z.ZodString;
519
509
  version: z.ZodNumber;
520
510
  format: z.ZodString;
@@ -525,15 +515,15 @@ export declare const EnvironmentSnapshotSchema: z.ZodObject<{
525
515
  unchanged: z.ZodBoolean;
526
516
  createdAt: z.ZodString;
527
517
  }, z.core.$strict>;
528
- export type EnvironmentSnapshot = z.infer<typeof EnvironmentSnapshotSchema>;
529
- /** `POST /v1/environments/{id}/restore`: which version of its disk to put back. */
530
- export declare const RestoreEnvironmentRequestSchema: z.ZodObject<{
518
+ export type AgentSnapshot = z.infer<typeof AgentSnapshotSchema>;
519
+ /** `POST /v1/agents/{id}/restore`: which version of its disk to put back. */
520
+ export declare const RestoreAgentRequestSchema: z.ZodObject<{
531
521
  requestId: z.ZodOptional<z.ZodString>;
532
522
  version: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"latest">]>;
533
523
  }, z.core.$strict>;
534
- export type RestoreEnvironmentRequest = z.infer<typeof RestoreEnvironmentRequestSchema>;
535
- export declare const EnvironmentRestoreSchema: z.ZodObject<{
536
- environmentId: z.ZodString;
524
+ export type RestoreAgentRequest = z.infer<typeof RestoreAgentRequestSchema>;
525
+ export declare const AgentRestoreSchema: z.ZodObject<{
526
+ agentId: z.ZodString;
537
527
  restored: z.ZodNumber;
538
528
  status: z.ZodEnum<{
539
529
  done: "done";
@@ -541,10 +531,10 @@ export declare const EnvironmentRestoreSchema: z.ZodObject<{
541
531
  }>;
542
532
  volumeGeneration: z.ZodOptional<z.ZodNumber>;
543
533
  }, z.core.$strict>;
544
- export type EnvironmentRestore = z.infer<typeof EnvironmentRestoreSchema>;
545
- /** `GET /v1/environments/{id}/versions`: its disk versions, newest first. */
546
- export declare const EnvironmentVersionsSchema: z.ZodObject<{
547
- environmentId: z.ZodString;
534
+ export type AgentRestore = z.infer<typeof AgentRestoreSchema>;
535
+ /** `GET /v1/agents/{id}/versions`: its disk versions, newest first. */
536
+ export declare const AgentDiskVersionsSchema: z.ZodObject<{
537
+ agentId: z.ZodString;
548
538
  artifactId: z.ZodNullable<z.ZodString>;
549
539
  latest: z.ZodNullable<z.ZodNumber>;
550
540
  versions: z.ZodArray<z.ZodObject<{
@@ -553,10 +543,83 @@ export declare const EnvironmentVersionsSchema: z.ZodObject<{
553
543
  createdAt: z.ZodString;
554
544
  }, z.core.$strict>>;
555
545
  }, z.core.$strict>;
556
- export type EnvironmentVersions = z.infer<typeof EnvironmentVersionsSchema>;
557
- export declare const ListEnvironmentsResponseSchema: z.ZodObject<{
558
- environments: z.ZodArray<z.ZodObject<{
559
- id: z.ZodString;
546
+ export type AgentDiskVersions = z.infer<typeof AgentDiskVersionsSchema>;
547
+ export declare const DeleteAgentResponseSchema: z.ZodObject<{
548
+ id: z.ZodString;
549
+ deleted: z.ZodBoolean;
550
+ }, z.core.$strict>;
551
+ export type DeleteAgentResponse = z.infer<typeof DeleteAgentResponseSchema>;
552
+ /** A turn that was running on an Agent when one of its connections opened (D67). */
553
+ export declare const EgressRunningTurnSchema: z.ZodObject<{
554
+ sessionId: z.ZodString;
555
+ turnId: z.ZodString;
556
+ }, z.core.$strict>;
557
+ export type EgressRunningTurn = z.infer<typeof EgressRunningTurnSchema>;
558
+ /**
559
+ * One connection a pod Agent opened through egress-gate (track R7, Q6): written when it closes,
560
+ * or at once when the gate refused it, to the Agent's own stream as `agent.egress` (D67). The
561
+ * connection is the Agent's: its egress token names the pod, and the Agent's sessions run turns
562
+ * in parallel (D66). `runningTurns` lists the turns active on it as the connection opened, at
563
+ * most 16, as context and never as the owner.
564
+ *
565
+ * `startedAt` is the gate's clock at CONNECT and `durationMs` runs from there to the close, so
566
+ * the span is the gate's own measurement. `bytesUp` is what the sandbox sent, `bytesDown` what it
567
+ * got. `mode: "credential"` is a host an `environment_secret` is bound to (R2c): the gate read
568
+ * each request (`requests`) and set a credential on it (`credentialIds`, ids only). It never
569
+ * carries a header value, a URL path or a body.
570
+ */
571
+ export declare const EgressConnectionPayloadSchema: z.ZodObject<{
572
+ agentId: z.ZodString;
573
+ host: z.ZodString;
574
+ port: z.ZodNumber;
575
+ outcome: z.ZodEnum<{
576
+ allowed: "allowed";
577
+ refused: "refused";
578
+ }>;
579
+ reason: z.ZodOptional<z.ZodString>;
580
+ status: z.ZodOptional<z.ZodNumber>;
581
+ mode: z.ZodEnum<{
582
+ credential: "credential";
583
+ tunnel: "tunnel";
584
+ }>;
585
+ credentialBound: z.ZodBoolean;
586
+ credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
587
+ requests: z.ZodOptional<z.ZodNumber>;
588
+ bytesUp: z.ZodNumber;
589
+ bytesDown: z.ZodNumber;
590
+ durationMs: z.ZodNumber;
591
+ startedAt: z.ZodString;
592
+ runningTurns: z.ZodArray<z.ZodObject<{
593
+ sessionId: z.ZodString;
594
+ turnId: z.ZodString;
595
+ }, z.core.$strict>>;
596
+ }, z.core.$loose>;
597
+ /** The schema id of an Agent's lifecycle events (its stream in the record). */
598
+ export declare const AGENT_EVENT_SCHEMA = "nylorun.agent-event/1";
599
+ /**
600
+ * `memory.updated` (track T5, D72): the session's agent changed the Agent's memory with its
601
+ * `memory` tool: each memory the call changed, what changed it and its version after. The Agent's
602
+ * stream carries the same as `agent.memory_updated`, with the session.
603
+ */
604
+ export declare const MemoryUpdatedPayloadSchema: z.ZodObject<{
605
+ effectId: z.ZodString;
606
+ changes: z.ZodArray<z.ZodObject<{
607
+ path: z.ZodString;
608
+ operation: z.ZodEnum<{
609
+ create: "create";
610
+ delete: "delete";
611
+ insert: "insert";
612
+ rename: "rename";
613
+ str_replace: "str_replace";
614
+ }>;
615
+ version: z.ZodNumber;
616
+ }, z.core.$strict>>;
617
+ }, z.core.$loose>;
618
+ export declare const AGENT_EVENT_TYPES: readonly ["agent.created", "agent.attached", "agent.detached", "agent.deleted", "agent.running", "agent.suspended", "agent.relaunched", "agent.lost", "agent.reset", "agent.failed", "agent.forked", "agent.outdated", "agent.version_changed", "agent.start_failed", "agent.egress", "agent.run", "agent.trigger_paused", "agent.trigger_resumed", "agent.trigger_secret_rotated", "agent.memory_updated"];
619
+ export type AgentEventType = (typeof AGENT_EVENT_TYPES)[number];
620
+ /** The payload of each Agent lifecycle event. */
621
+ export declare const AGENT_EVENT_PAYLOADS: {
622
+ readonly "agent.created": z.ZodObject<{
560
623
  kind: z.ZodEnum<{
561
624
  none: "none";
562
625
  pod: "pod";
@@ -564,278 +627,102 @@ export declare const ListEnvironmentsResponseSchema: z.ZodObject<{
564
627
  }>;
565
628
  labels: z.ZodRecord<z.ZodString, z.ZodString>;
566
629
  manifest: z.ZodObject<{
567
- image: z.ZodOptional<z.ZodString>;
568
- resources: z.ZodOptional<z.ZodObject<{
569
- cpus: z.ZodNumber;
570
- memory: z.ZodString;
571
- }, z.core.$strict>>;
572
- storage: z.ZodOptional<z.ZodString>;
573
- network: z.ZodOptional<z.ZodObject<{
574
- allowedHosts: z.ZodArray<z.ZodString>;
575
- }, z.core.$strict>>;
576
- harness: z.ZodString;
577
- lifecycle: z.ZodObject<{
578
- idle: z.ZodOptional<z.ZodString>;
579
- deleteAfter: z.ZodOptional<z.ZodString>;
580
- }, z.core.$strict>;
581
- setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
582
- command: z.ZodString;
583
- cwd: z.ZodOptional<z.ZodString>;
584
- timeout: z.ZodOptional<z.ZodString>;
585
- }, z.core.$strict>>>;
586
- files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
587
- artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
588
- version: z.ZodNumber;
589
- path: z.ZodString;
590
- }, z.core.$strict>, z.ZodObject<{
591
- path: z.ZodString;
592
- files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
593
- }, z.core.$strict>]>>>;
594
- limits: z.ZodOptional<z.ZodObject<{
595
- artifacts: z.ZodOptional<z.ZodObject<{
596
- fileBytes: z.ZodOptional<z.ZodNumber>;
597
- totalBytes: z.ZodOptional<z.ZodNumber>;
598
- }, z.core.$strict>>;
599
- skills: z.ZodOptional<z.ZodObject<{
600
- totalBytes: z.ZodOptional<z.ZodNumber>;
601
- }, z.core.$strict>>;
602
- disk: z.ZodOptional<z.ZodObject<{
603
- versionBytes: z.ZodOptional<z.ZodNumber>;
604
- versionEntries: z.ZodOptional<z.ZodNumber>;
605
- }, z.core.$strict>>;
606
- }, z.core.$strict>>;
607
- secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
608
- required: z.ZodOptional<z.ZodBoolean>;
609
- description: z.ZodOptional<z.ZodString>;
610
- type: z.ZodLiteral<"environment_secret">;
611
- allowedHosts: z.ZodArray<z.ZodString>;
612
- inject: z.ZodOptional<z.ZodObject<{
613
- header: z.ZodString;
614
- format: z.ZodString;
615
- }, z.core.$strict>>;
616
- }, z.core.$strict>, z.ZodObject<{
617
- required: z.ZodOptional<z.ZodBoolean>;
618
- description: z.ZodOptional<z.ZodString>;
619
- type: z.ZodLiteral<"environment_variable">;
620
- }, z.core.$strict>, z.ZodObject<{
621
- via: z.ZodOptional<z.ZodString>;
622
- identity: z.ZodOptional<z.ZodObject<{
623
- header: z.ZodString;
624
- }, z.core.$strict>>;
625
- required: z.ZodOptional<z.ZodBoolean>;
626
- description: z.ZodOptional<z.ZodString>;
627
- type: z.ZodLiteral<"bearer">;
628
- url: z.ZodString;
629
- }, z.core.$strict>, z.ZodObject<{
630
- via: z.ZodOptional<z.ZodString>;
631
- identity: z.ZodOptional<z.ZodObject<{
632
- header: z.ZodString;
633
- }, z.core.$strict>>;
634
- required: z.ZodOptional<z.ZodBoolean>;
635
- description: z.ZodOptional<z.ZodString>;
636
- type: z.ZodLiteral<"headers">;
637
- url: z.ZodString;
638
- }, z.core.$strict>], "type">>>>;
639
- }, z.core.$strict>;
640
- manifestName: z.ZodOptional<z.ZodString>;
641
- manifestVersion: z.ZodOptional<z.ZodNumber>;
642
- manifestHash: z.ZodOptional<z.ZodString>;
643
- limits: z.ZodObject<{
644
- artifacts: z.ZodObject<{
645
- fileBytes: z.ZodNumber;
646
- totalBytes: z.ZodNumber;
647
- }, z.core.$strict>;
648
- skills: z.ZodObject<{
649
- totalBytes: z.ZodNumber;
650
- }, z.core.$strict>;
651
- disk: z.ZodObject<{
652
- versionBytes: z.ZodNumber;
653
- versionEntries: z.ZodNumber;
654
- }, z.core.$strict>;
655
- }, z.core.$strict>;
656
- forkedFrom: z.ZodOptional<z.ZodObject<{
657
- environment: z.ZodString;
658
- disk: z.ZodNullable<z.ZodNumber>;
659
- }, z.core.$strict>>;
660
- slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
661
- name: z.ZodString;
662
- type: z.ZodString;
663
- required: z.ZodBoolean;
664
- set: z.ZodBoolean;
665
- }, z.core.$strict>>>;
666
- version: z.ZodNumber;
667
- appliedVersion: z.ZodNumber;
668
- ownerUserId: z.ZodNullable<z.ZodString>;
669
- state: z.ZodString;
670
- pod: z.ZodOptional<z.ZodObject<{
671
- desired: z.ZodEnum<{
672
- deleted: "deleted";
673
- running: "running";
674
- suspended: "suspended";
675
- }>;
676
- observed: z.ZodEnum<{
677
- creating: "creating";
678
- deleting: "deleting";
679
- failed: "failed";
680
- lost: "lost";
681
- running: "running";
682
- suspended: "suspended";
683
- }>;
684
- volumeGeneration: z.ZodNumber;
685
- hostEpoch: z.ZodNumber;
686
- reason: z.ZodOptional<z.ZodString>;
687
- imageDigest: z.ZodOptional<z.ZodString>;
688
- }, z.core.$strict>>;
689
- lastUsedAt: z.ZodString;
690
- disk: z.ZodOptional<z.ZodObject<{
691
- latestVersion: z.ZodNullable<z.ZodNumber>;
692
- operation: z.ZodOptional<z.ZodObject<{
693
- kind: z.ZodEnum<{
694
- restore: "restore";
695
- seed: "seed";
696
- snapshot: "snapshot";
697
- }>;
698
- version: z.ZodOptional<z.ZodNumber>;
699
- startedAt: z.ZodString;
700
- }, z.core.$strict>>;
701
- }, z.core.$strict>>;
702
- sessions: z.ZodArray<z.ZodObject<{
703
- id: z.ZodString;
704
- activeTurnId: z.ZodNullable<z.ZodString>;
705
- }, z.core.$strict>>;
706
- createdAt: z.ZodString;
707
- updatedAt: z.ZodString;
708
- }, z.core.$strict>>;
709
- }, z.core.$strict>;
710
- export type ListEnvironmentsResponse = z.infer<typeof ListEnvironmentsResponseSchema>;
711
- export declare const DeleteEnvironmentResponseSchema: z.ZodObject<{
712
- id: z.ZodString;
713
- deleted: z.ZodBoolean;
714
- }, z.core.$strict>;
715
- export type DeleteEnvironmentResponse = z.infer<typeof DeleteEnvironmentResponseSchema>;
716
- /** A turn that was running on an Environment when one of its connections opened (D67). */
717
- export declare const EgressRunningTurnSchema: z.ZodObject<{
718
- sessionId: z.ZodString;
719
- turnId: z.ZodString;
720
- }, z.core.$strict>;
721
- export type EgressRunningTurn = z.infer<typeof EgressRunningTurnSchema>;
722
- /**
723
- * One connection a pod Environment opened through egress-gate (track R7, Q6): written when it
724
- * closes, or at once when the gate refused it, to the Environment's own stream as
725
- * `environment.egress` (D67). The connection is the Environment's: its egress token names the pod,
726
- * and the Environment's sessions run turns in parallel (D66). `runningTurns` lists the turns
727
- * active on it as the connection opened, at most 16, as context and never as the owner.
728
- *
729
- * `startedAt` is the gate's clock at CONNECT and `durationMs` runs from there to the close, so
730
- * the span is the gate's own measurement. `bytesUp` is what the sandbox sent, `bytesDown` what it
731
- * got. `mode: "credential"` is a host an `environment_secret` is bound to (R2c): the gate read
732
- * each request (`requests`) and set a credential on it (`credentialIds`, ids only). It never
733
- * carries a header value, a URL path or a body.
734
- */
735
- export declare const EgressConnectionPayloadSchema: z.ZodObject<{
736
- environmentId: z.ZodString;
737
- host: z.ZodString;
738
- port: z.ZodNumber;
739
- outcome: z.ZodEnum<{
740
- allowed: "allowed";
741
- refused: "refused";
742
- }>;
743
- reason: z.ZodOptional<z.ZodString>;
744
- status: z.ZodOptional<z.ZodNumber>;
745
- mode: z.ZodEnum<{
746
- credential: "credential";
747
- tunnel: "tunnel";
748
- }>;
749
- credentialBound: z.ZodBoolean;
750
- credentialIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
751
- requests: z.ZodOptional<z.ZodNumber>;
752
- bytesUp: z.ZodNumber;
753
- bytesDown: z.ZodNumber;
754
- durationMs: z.ZodNumber;
755
- startedAt: z.ZodString;
756
- runningTurns: z.ZodArray<z.ZodObject<{
757
- sessionId: z.ZodString;
758
- turnId: z.ZodString;
759
- }, z.core.$strict>>;
760
- }, z.core.$loose>;
761
- /** The schema id of an Environment's lifecycle events (its stream in the record). */
762
- export declare const ENVIRONMENT_EVENT_SCHEMA = "nylorun.environment-event/1";
763
- export declare const ENVIRONMENT_EVENT_TYPES: readonly ["environment.created", "environment.attached", "environment.detached", "environment.deleted", "environment.running", "environment.suspended", "environment.relaunched", "environment.lost", "environment.reset", "environment.failed", "environment.forked", "environment.egress"];
764
- export type EnvironmentEventType = (typeof ENVIRONMENT_EVENT_TYPES)[number];
765
- /** The payload of each Environment lifecycle event. */
766
- export declare const ENVIRONMENT_EVENT_PAYLOADS: {
767
- readonly "environment.created": z.ZodObject<{
768
- kind: z.ZodEnum<{
769
- none: "none";
770
- pod: "pod";
771
- virtual: "virtual";
772
- }>;
773
- labels: z.ZodRecord<z.ZodString, z.ZodString>;
774
- manifest: z.ZodOptional<z.ZodObject<{
775
630
  name: z.ZodString;
776
631
  version: z.ZodNumber;
777
- }, z.core.$strict>>;
632
+ tracking: z.ZodEnum<{
633
+ pinned: "pinned";
634
+ tracking: "tracking";
635
+ }>;
636
+ }, z.core.$strict>;
778
637
  forkedFrom: z.ZodOptional<z.ZodObject<{
779
- environment: z.ZodString;
638
+ agent: z.ZodString;
780
639
  disk: z.ZodNullable<z.ZodNumber>;
781
640
  }, z.core.$strict>>;
782
641
  }, z.core.$loose>;
783
- readonly "environment.attached": z.ZodObject<{
642
+ readonly "agent.attached": z.ZodObject<{
784
643
  sessionId: z.ZodString;
785
644
  }, z.core.$loose>;
786
- readonly "environment.detached": z.ZodObject<{
645
+ readonly "agent.detached": z.ZodObject<{
787
646
  sessionId: z.ZodString;
788
647
  reason: z.ZodEnum<{
789
648
  reset: "reset";
790
649
  }>;
791
650
  }, z.core.$loose>;
792
651
  /** Deleted by a `DELETE`, or by the sweep once `lifecycle.deleteAfter` passed (`reason`). */
793
- readonly "environment.deleted": z.ZodObject<{
652
+ readonly "agent.deleted": z.ZodObject<{
794
653
  reason: z.ZodOptional<z.ZodEnum<{
795
654
  delete: "delete";
796
655
  deleteAfter: "deleteAfter";
797
656
  }>>;
798
657
  }, z.core.$loose>;
799
- /** A pod joined and serves the Environment. */
800
- readonly "environment.running": z.ZodObject<{
658
+ /** A pod joined and serves the Agent. */
659
+ readonly "agent.running": z.ZodObject<{
801
660
  hostEpoch: z.ZodNumber;
802
661
  }, z.core.$loose>;
803
662
  /** Stopped (`POST .../stop`, or idle): the volume is kept; the next turn starts it again. */
804
- readonly "environment.suspended": z.ZodObject<{
663
+ readonly "agent.suspended": z.ZodObject<{
805
664
  reason: z.ZodEnum<{
806
665
  idle: "idle";
666
+ restart: "restart";
807
667
  stop: "stop";
808
668
  }>;
809
669
  }, z.core.$loose>;
810
670
  /** Its pod was replaced (same volume): the old pod's host token no longer works. */
811
- readonly "environment.relaunched": z.ZodObject<{
671
+ readonly "agent.relaunched": z.ZodObject<{
812
672
  hostEpoch: z.ZodNumber;
813
673
  }, z.core.$loose>;
814
674
  /** Its volume or node is gone: turns are refused until a reset. */
815
- readonly "environment.lost": z.ZodObject<{
675
+ readonly "agent.lost": z.ZodObject<{
816
676
  reason: z.ZodString;
817
677
  }, z.core.$loose>;
818
678
  /** Reset: a new pod on a new, empty volume. */
819
- readonly "environment.reset": z.ZodObject<{
679
+ readonly "agent.reset": z.ZodObject<{
820
680
  volumeGeneration: z.ZodNumber;
821
681
  }, z.core.$loose>;
822
682
  /** The pod did not become ready. */
823
- readonly "environment.failed": z.ZodObject<{
683
+ readonly "agent.failed": z.ZodObject<{
824
684
  reason: z.ZodString;
825
685
  }, z.core.$loose>;
826
- /** Forked into Environment `to`: its disk started from version `disk`, `secrets` were copied. */
827
- readonly "environment.forked": z.ZodObject<{
686
+ /** Forked into Agent `to`: its disk started from version `disk`, `secrets` were copied. */
687
+ readonly "agent.forked": z.ZodObject<{
828
688
  to: z.ZodString;
829
689
  disk: z.ZodNullable<z.ZodNumber>;
830
- manifest: z.ZodOptional<z.ZodObject<{
690
+ manifest: z.ZodObject<{
831
691
  name: z.ZodString;
832
692
  version: z.ZodNumber;
833
- }, z.core.$strict>>;
693
+ }, z.core.$strict>;
834
694
  secrets: z.ZodNumber;
835
695
  }, z.core.$loose>;
696
+ /**
697
+ * Asked to move to version `to` of its manifest, which waits (track T3): for a value of each
698
+ * required secret it adds (`secrets`), or for its pod's next start (`start`).
699
+ */
700
+ readonly "agent.outdated": z.ZodObject<{
701
+ from: z.ZodNumber;
702
+ to: z.ZodNumber;
703
+ waitingFor: z.ZodEnum<{
704
+ secrets: "secrets";
705
+ start: "start";
706
+ }>;
707
+ }, z.core.$loose>;
708
+ /** Runs version `to` of its manifest now: turns that start from here run it (track T3). */
709
+ readonly "agent.version_changed": z.ZodObject<{
710
+ from: z.ZodNumber;
711
+ to: z.ZodNumber;
712
+ }, z.core.$loose>;
713
+ /**
714
+ * Its pod did not start on version `to` (its setup failed, the pod failed, or it took longer
715
+ * than the Host allows): it went back to version `from`, with its disk as it was (track T3).
716
+ */
717
+ readonly "agent.start_failed": z.ZodObject<{
718
+ from: z.ZodNumber;
719
+ to: z.ZodNumber;
720
+ reason: z.ZodString;
721
+ reverted: z.ZodBoolean;
722
+ }, z.core.$loose>;
836
723
  /** A connection through egress-gate, with the turns running as it opened (D67). */
837
- readonly "environment.egress": z.ZodObject<{
838
- environmentId: z.ZodString;
724
+ readonly "agent.egress": z.ZodObject<{
725
+ agentId: z.ZodString;
839
726
  host: z.ZodString;
840
727
  port: z.ZodNumber;
841
728
  outcome: z.ZodEnum<{
@@ -860,64 +747,123 @@ export declare const ENVIRONMENT_EVENT_PAYLOADS: {
860
747
  turnId: z.ZodString;
861
748
  }, z.core.$strict>>;
862
749
  }, z.core.$loose>;
750
+ /** A trigger fired, or was run by hand: the run and what came of it (`TriggerRunSchema`). */
751
+ readonly "agent.run": z.ZodObject<{
752
+ runId: z.ZodString;
753
+ triggerId: z.ZodString;
754
+ dueAt: z.ZodString;
755
+ late: z.ZodBoolean;
756
+ status: z.ZodString;
757
+ reason: z.ZodOptional<z.ZodString>;
758
+ sessionId: z.ZodOptional<z.ZodString>;
759
+ }, z.core.$loose>;
760
+ readonly "agent.trigger_paused": z.ZodObject<{
761
+ triggerId: z.ZodString;
762
+ reason: z.ZodString;
763
+ }, z.core.$loose>;
764
+ readonly "agent.trigger_resumed": z.ZodObject<{
765
+ triggerId: z.ZodString;
766
+ }, z.core.$loose>;
767
+ /** A webhook trigger's signing secret was made or replaced; the one before stopped working. */
768
+ readonly "agent.trigger_secret_rotated": z.ZodObject<{
769
+ triggerId: z.ZodString;
770
+ }, z.core.$loose>;
771
+ /** A turn changed the Agent's memories (`memory.updated` in its session): which, and how. */
772
+ readonly "agent.memory_updated": z.ZodObject<{
773
+ effectId: z.ZodString;
774
+ changes: z.ZodArray<z.ZodObject<{
775
+ path: z.ZodString;
776
+ operation: z.ZodEnum<{
777
+ create: "create";
778
+ delete: "delete";
779
+ insert: "insert";
780
+ rename: "rename";
781
+ str_replace: "str_replace";
782
+ }>;
783
+ version: z.ZodNumber;
784
+ }, z.core.$strict>>;
785
+ sessionId: z.ZodString;
786
+ turnId: z.ZodString;
787
+ }, z.core.$loose>;
863
788
  };
864
- export type EnvironmentEventPayload<T extends EnvironmentEventType> = z.infer<(typeof ENVIRONMENT_EVENT_PAYLOADS)[T]>;
865
- /** One lifecycle event on an Environment's stream, numbered from 0. */
866
- export declare const EnvironmentEventSchema: z.ZodObject<{
867
- schema: z.ZodLiteral<"nylorun.environment-event/1">;
789
+ export type AgentEventPayload<T extends AgentEventType> = z.infer<(typeof AGENT_EVENT_PAYLOADS)[T]>;
790
+ /** One lifecycle event on an Agent's stream, numbered from 0. */
791
+ export declare const AgentEventSchema: z.ZodObject<{
792
+ schema: z.ZodLiteral<"nylorun.agent-event/1">;
868
793
  eventId: z.ZodString;
869
794
  tenantId: z.ZodString;
870
- environmentId: z.ZodString;
795
+ agentId: z.ZodString;
871
796
  seq: z.ZodNumber;
872
797
  time: z.ZodString;
873
798
  type: z.ZodEnum<{
874
- "environment.attached": "environment.attached";
875
- "environment.created": "environment.created";
876
- "environment.deleted": "environment.deleted";
877
- "environment.detached": "environment.detached";
878
- "environment.egress": "environment.egress";
879
- "environment.failed": "environment.failed";
880
- "environment.forked": "environment.forked";
881
- "environment.lost": "environment.lost";
882
- "environment.relaunched": "environment.relaunched";
883
- "environment.reset": "environment.reset";
884
- "environment.running": "environment.running";
885
- "environment.suspended": "environment.suspended";
799
+ "agent.attached": "agent.attached";
800
+ "agent.created": "agent.created";
801
+ "agent.deleted": "agent.deleted";
802
+ "agent.detached": "agent.detached";
803
+ "agent.egress": "agent.egress";
804
+ "agent.failed": "agent.failed";
805
+ "agent.forked": "agent.forked";
806
+ "agent.lost": "agent.lost";
807
+ "agent.memory_updated": "agent.memory_updated";
808
+ "agent.outdated": "agent.outdated";
809
+ "agent.relaunched": "agent.relaunched";
810
+ "agent.reset": "agent.reset";
811
+ "agent.run": "agent.run";
812
+ "agent.running": "agent.running";
813
+ "agent.start_failed": "agent.start_failed";
814
+ "agent.suspended": "agent.suspended";
815
+ "agent.trigger_paused": "agent.trigger_paused";
816
+ "agent.trigger_resumed": "agent.trigger_resumed";
817
+ "agent.trigger_secret_rotated": "agent.trigger_secret_rotated";
818
+ "agent.version_changed": "agent.version_changed";
886
819
  }>;
887
820
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
888
821
  }, z.core.$strict>;
889
- export type EnvironmentEvent = z.infer<typeof EnvironmentEventSchema>;
890
- export declare const ListEnvironmentEventsResponseSchema: z.ZodObject<{
822
+ export type AgentEvent = z.infer<typeof AgentEventSchema>;
823
+ export declare const ListAgentEventsResponseSchema: z.ZodObject<{
891
824
  events: z.ZodArray<z.ZodObject<{
892
- schema: z.ZodLiteral<"nylorun.environment-event/1">;
825
+ schema: z.ZodLiteral<"nylorun.agent-event/1">;
893
826
  eventId: z.ZodString;
894
827
  tenantId: z.ZodString;
895
- environmentId: z.ZodString;
828
+ agentId: z.ZodString;
896
829
  seq: z.ZodNumber;
897
830
  time: z.ZodString;
898
831
  type: z.ZodEnum<{
899
- "environment.attached": "environment.attached";
900
- "environment.created": "environment.created";
901
- "environment.deleted": "environment.deleted";
902
- "environment.detached": "environment.detached";
903
- "environment.egress": "environment.egress";
904
- "environment.failed": "environment.failed";
905
- "environment.forked": "environment.forked";
906
- "environment.lost": "environment.lost";
907
- "environment.relaunched": "environment.relaunched";
908
- "environment.reset": "environment.reset";
909
- "environment.running": "environment.running";
910
- "environment.suspended": "environment.suspended";
832
+ "agent.attached": "agent.attached";
833
+ "agent.created": "agent.created";
834
+ "agent.deleted": "agent.deleted";
835
+ "agent.detached": "agent.detached";
836
+ "agent.egress": "agent.egress";
837
+ "agent.failed": "agent.failed";
838
+ "agent.forked": "agent.forked";
839
+ "agent.lost": "agent.lost";
840
+ "agent.memory_updated": "agent.memory_updated";
841
+ "agent.outdated": "agent.outdated";
842
+ "agent.relaunched": "agent.relaunched";
843
+ "agent.reset": "agent.reset";
844
+ "agent.run": "agent.run";
845
+ "agent.running": "agent.running";
846
+ "agent.start_failed": "agent.start_failed";
847
+ "agent.suspended": "agent.suspended";
848
+ "agent.trigger_paused": "agent.trigger_paused";
849
+ "agent.trigger_resumed": "agent.trigger_resumed";
850
+ "agent.trigger_secret_rotated": "agent.trigger_secret_rotated";
851
+ "agent.version_changed": "agent.version_changed";
911
852
  }>;
912
853
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
913
854
  }, z.core.$strict>>;
914
855
  }, z.core.$strict>;
856
+ /**
857
+ * `PUT /v1/sessions/{id}` (protocol 16): the session's Agent, owner and info. The session runs on
858
+ * the Agent for its life (its sandbox, its vault's credentials) and pins the manifest version the
859
+ * Agent runs when it opens. No session is special (D71): an app that keeps one conversation
860
+ * going reuses its id.
861
+ */
915
862
  export declare const PutSessionRequestSchema: z.ZodObject<{
916
863
  requestId: z.ZodString;
917
- agentId: z.ZodString;
864
+ agent: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
918
865
  ownerUserId: z.ZodString;
919
866
  info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
920
- environment: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
921
867
  }, z.core.$strict>;
922
868
  export type PutSessionRequest = z.infer<typeof PutSessionRequestSchema>;
923
869
  /** The hosts a harness can run on (blueprint D38). */
@@ -1033,7 +979,7 @@ export type EnvironmentSecretInject = z.infer<typeof EnvironmentSecretInjectSche
1033
979
  */
1034
980
  export declare const TOOL_SECRET_NAME_PATTERN: RegExp;
1035
981
  /**
1036
- * `PUT /v1/environments/{environmentId}/secrets/{name}` (D56): creates or replaces one credential
982
+ * `PUT /v1/agents/{agentId}/secrets/{name}` (D56): creates or replaces one credential
1037
983
  * in the Environment's vault. For `environment_secret` and `environment_variable` the name is
1038
984
  * the variable's name (a POSIX name, not reserved); for `bearer` and `headers` it is a label.
1039
985
  * The same name and type keeps the credential and re-seals its value and binding; another type
@@ -1041,7 +987,7 @@ export declare const TOOL_SECRET_NAME_PATTERN: RegExp;
1041
987
  * credentials bound to one host, or two `bearer`/`headers` credentials for one URL, are
1042
988
  * `409 credential_conflict`.
1043
989
  */
1044
- export declare const PutEnvironmentSecretRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
990
+ export declare const PutAgentSecretRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1045
991
  requestId: z.ZodOptional<z.ZodString>;
1046
992
  type: z.ZodLiteral<"environment_secret">;
1047
993
  value: z.ZodString;
@@ -1073,22 +1019,22 @@ export declare const PutEnvironmentSecretRequestSchema: z.ZodDiscriminatedUnion<
1073
1019
  url: z.ZodString;
1074
1020
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
1075
1021
  }, z.core.$strict>], "type">;
1076
- export type PutEnvironmentSecretRequest = z.infer<typeof PutEnvironmentSecretRequestSchema>;
1022
+ export type PutAgentSecretRequest = z.infer<typeof PutAgentSecretRequestSchema>;
1077
1023
  /**
1078
1024
  * A secret write on an Environment whose manifest declares the secret's slot (D64): only the
1079
1025
  * value, `value` (or `headers` for a `headers` slot). Its type and binding come from the slot.
1080
1026
  */
1081
- export declare const PutEnvironmentSecretValueRequestSchema: z.ZodObject<{
1027
+ export declare const PutAgentSecretValueRequestSchema: z.ZodObject<{
1082
1028
  requestId: z.ZodOptional<z.ZodString>;
1083
1029
  value: z.ZodOptional<z.ZodString>;
1084
1030
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1085
1031
  }, z.core.$strict>;
1086
- export type PutEnvironmentSecretValueRequest = z.infer<typeof PutEnvironmentSecretValueRequestSchema>;
1032
+ export type PutAgentSecretValueRequest = z.infer<typeof PutAgentSecretValueRequestSchema>;
1087
1033
  /** Whether `name` may name a secret of `type` (`PUT .../secrets/{name}`); a message when not. */
1088
- export declare function environmentSecretNameError(type: PutEnvironmentSecretRequest["type"], name: string): string | undefined;
1034
+ export declare function environmentSecretNameError(type: PutAgentSecretRequest["type"], name: string): string | undefined;
1089
1035
  /**
1090
1036
  * One secret an Environment of a kind needs (D64): its type and binding, never its value. The
1091
- * value is written into each Environment's vault (`PUT /v1/environments/{id}/secrets/{name}`
1037
+ * value is written into each Environment's vault (`PUT /v1/agents/{id}/secrets/{name}`
1092
1038
  * with `{ value }`, or `{ headers }` for `headers`), and the binding comes from here.
1093
1039
  */
1094
1040
  export declare const EnvironmentSecretSlotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1158,39 +1104,351 @@ export declare const EnvironmentSecretSlotsSchema: z.ZodRecord<z.ZodString, z.Zo
1158
1104
  url: z.ZodString;
1159
1105
  }, z.core.$strict>], "type">>;
1160
1106
  export type EnvironmentSecretSlots = z.infer<typeof EnvironmentSecretSlotsSchema>;
1161
- /** The schema version of an environment manifest; the Runtime refuses one it does not know. */
1162
- export declare const ENVIRONMENT_MANIFEST_SCHEMA_VERSION = 1;
1107
+ /** The schema version of an agent manifest the Runtime saves at `/v1/agent-manifests/{name}`. */
1108
+ export declare const AGENT_MANIFEST_V8_SCHEMA_VERSION = 8;
1109
+ /** What runs inside the loop of an agent: the `harness` section of agent manifest v8. */
1110
+ export declare const AgentHarnessSectionSchema: z.ZodType<AgentHarnessSection>;
1111
+ /** A flow's `harness` section (`kind: "workflow"`). */
1112
+ export declare const WorkflowHarnessSectionSchema: z.ZodType<WorkflowHarnessSection>;
1113
+ /** The `harness` section: an agent's loop, or a flow (`kind: "workflow"`). */
1114
+ export declare const HarnessSectionSchema: z.ZodUnion<readonly [z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>, z.ZodType<AgentHarnessSection, unknown, z.core.$ZodTypeInternals<AgentHarnessSection, unknown>>]>;
1163
1115
  /**
1164
- * An environment manifest (protocol 14, D63): a named, versioned definition of a kind of
1165
- * Environment, saved like an agent (`PUT /v1/environment-manifests/{name}`). It holds what every
1166
- * Environment made from it shares; an Environment's id, labels, owner guard, disk and secret
1167
- * values are its own. Written as a JSON file with `$schema`, which clients drop before saving.
1116
+ * A trigger's id in `runtime.triggers` (track T4, D74): 1–64 letters, digits, `.`, `_` and `-`,
1117
+ * starting with a letter or digit. The map key; it names the trigger in routes and runs.
1168
1118
  */
1169
- export declare const EnvironmentManifestSchema: z.ZodObject<{
1170
- manifestSchemaVersion: z.ZodLiteral<1>;
1171
- name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1172
- description: z.ZodOptional<z.ZodString>;
1173
- kind: z.ZodOptional<z.ZodEnum<{
1174
- none: "none";
1175
- pod: "pod";
1176
- virtual: "virtual";
1119
+ export declare const TriggerIdSchema: z.ZodString;
1120
+ /** The signature schemes a webhook trigger verifies (D75): Standard Webhooks only in T4. */
1121
+ export declare const WEBHOOK_SCHEMES: readonly ["standard-webhooks"];
1122
+ /**
1123
+ * One trigger of an agent manifest's `runtime.triggers` (track T4, D74): exactly one of
1124
+ * `schedule` (five-field cron, minute granularity, in `timezone`, an IANA name, default UTC), `at`
1125
+ * (one run at an RFC 3339 time with an offset) or `webhook` (a webhook endpoint verified with the
1126
+ * named scheme), plus the `session` each run goes to and the author's `prompt`.
1127
+ *
1128
+ * `session` is a session id of the Agent, opened on the trigger's first run if it does not
1129
+ * exist, or `"new"` for a new session per run (`run-<runId>`). The Runtime keeps no main session
1130
+ * (D71). The cron's smallest gap, the `at` time, the prompt's length and how many triggers a
1131
+ * manifest holds are checked against the Tenant's Runtime limits when it is saved.
1132
+ */
1133
+ export declare const TriggerSchema: z.ZodObject<{
1134
+ schedule: z.ZodOptional<z.ZodString>;
1135
+ timezone: z.ZodOptional<z.ZodString>;
1136
+ at: z.ZodOptional<z.ZodISODateTime>;
1137
+ webhook: z.ZodOptional<z.ZodEnum<{
1138
+ "standard-webhooks": "standard-webhooks";
1177
1139
  }>>;
1178
- image: z.ZodOptional<z.ZodString>;
1179
- resources: z.ZodOptional<z.ZodObject<{
1180
- cpus: z.ZodOptional<z.ZodNumber>;
1181
- memory: z.ZodOptional<z.ZodString>;
1140
+ session: z.ZodString;
1141
+ prompt: z.ZodString;
1142
+ }, z.core.$strict>;
1143
+ export type Trigger = z.infer<typeof TriggerSchema>;
1144
+ /** What a trigger is: the field it has, or `wake` for a session's own booking (D77). */
1145
+ export declare const TRIGGER_KINDS: readonly ["schedule", "at", "webhook", "wake"];
1146
+ export type TriggerKind = (typeof TRIGGER_KINDS)[number];
1147
+ /** A trigger's kind, from its manifest entry. */
1148
+ export declare function triggerKindOf(trigger: Trigger): Exclude<TriggerKind, "wake">;
1149
+ /**
1150
+ * A trigger's status on an Agent (D74): `active` fires, `paused` does not (`pausedReason`
1151
+ * `manual`, or `new` for one an upgrade added), `completed` is an `at` that ran.
1152
+ */
1153
+ export declare const TRIGGER_STATUSES: readonly ["active", "paused", "completed"];
1154
+ /** `GET /v1/agents/{id}/triggers`: one trigger, from its manifest entry and the Agent's state. */
1155
+ export declare const TriggerViewSchema: z.ZodObject<{
1156
+ id: z.ZodString;
1157
+ kind: z.ZodEnum<{
1158
+ at: "at";
1159
+ schedule: "schedule";
1160
+ wake: "wake";
1161
+ webhook: "webhook";
1162
+ }>;
1163
+ status: z.ZodEnum<{
1164
+ active: "active";
1165
+ completed: "completed";
1166
+ paused: "paused";
1167
+ }>;
1168
+ pausedReason: z.ZodNullable<z.ZodString>;
1169
+ schedule: z.ZodOptional<z.ZodString>;
1170
+ timezone: z.ZodOptional<z.ZodString>;
1171
+ at: z.ZodOptional<z.ZodString>;
1172
+ session: z.ZodString;
1173
+ nextRunAt: z.ZodNullable<z.ZodString>;
1174
+ lastRunAt: z.ZodNullable<z.ZodString>;
1175
+ webhookUrl: z.ZodOptional<z.ZodString>;
1176
+ secretSet: z.ZodOptional<z.ZodBoolean>;
1177
+ }, z.core.$strict>;
1178
+ export type TriggerView = z.infer<typeof TriggerViewSchema>;
1179
+ export declare const TriggerListSchema: z.ZodObject<{
1180
+ triggers: z.ZodArray<z.ZodObject<{
1181
+ id: z.ZodString;
1182
+ kind: z.ZodEnum<{
1183
+ at: "at";
1184
+ schedule: "schedule";
1185
+ wake: "wake";
1186
+ webhook: "webhook";
1187
+ }>;
1188
+ status: z.ZodEnum<{
1189
+ active: "active";
1190
+ completed: "completed";
1191
+ paused: "paused";
1192
+ }>;
1193
+ pausedReason: z.ZodNullable<z.ZodString>;
1194
+ schedule: z.ZodOptional<z.ZodString>;
1195
+ timezone: z.ZodOptional<z.ZodString>;
1196
+ at: z.ZodOptional<z.ZodString>;
1197
+ session: z.ZodString;
1198
+ nextRunAt: z.ZodNullable<z.ZodString>;
1199
+ lastRunAt: z.ZodNullable<z.ZodString>;
1200
+ webhookUrl: z.ZodOptional<z.ZodString>;
1201
+ secretSet: z.ZodOptional<z.ZodBoolean>;
1182
1202
  }, z.core.$strict>>;
1183
- storage: z.ZodOptional<z.ZodString>;
1184
- network: z.ZodOptional<z.ZodObject<{
1185
- allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1203
+ }, z.core.$strict>;
1204
+ /**
1205
+ * What a run came to (D74): `started` a turn, `queued` a message behind a running turn,
1206
+ * `skipped` (nothing started: `overlap`, `rate_limited`, `paused`) or `failed` (`queue_full`,
1207
+ * `session_conflict`, `agent_unavailable`).
1208
+ */
1209
+ export declare const TRIGGER_RUN_STATUSES: readonly ["started", "queued", "skipped", "failed"];
1210
+ /** One run: a trigger fired, or was run by hand. */
1211
+ export declare const TriggerRunSchema: z.ZodObject<{
1212
+ id: z.ZodString;
1213
+ triggerId: z.ZodString;
1214
+ kind: z.ZodEnum<{
1215
+ at: "at";
1216
+ schedule: "schedule";
1217
+ wake: "wake";
1218
+ webhook: "webhook";
1219
+ }>;
1220
+ dueAt: z.ZodString;
1221
+ firedAt: z.ZodString;
1222
+ late: z.ZodBoolean;
1223
+ status: z.ZodEnum<{
1224
+ failed: "failed";
1225
+ queued: "queued";
1226
+ skipped: "skipped";
1227
+ started: "started";
1228
+ }>;
1229
+ reason: z.ZodNullable<z.ZodString>;
1230
+ sessionId: z.ZodNullable<z.ZodString>;
1231
+ turnId: z.ZodNullable<z.ZodString>;
1232
+ queuedMessageId: z.ZodNullable<z.ZodString>;
1233
+ }, z.core.$strict>;
1234
+ export type TriggerRun = z.infer<typeof TriggerRunSchema>;
1235
+ /** `GET /v1/agents/{id}/runs`: runs, newest first. */
1236
+ export declare const TriggerRunPageSchema: z.ZodObject<{
1237
+ runs: z.ZodArray<z.ZodObject<{
1238
+ id: z.ZodString;
1239
+ triggerId: z.ZodString;
1240
+ kind: z.ZodEnum<{
1241
+ at: "at";
1242
+ schedule: "schedule";
1243
+ wake: "wake";
1244
+ webhook: "webhook";
1245
+ }>;
1246
+ dueAt: z.ZodString;
1247
+ firedAt: z.ZodString;
1248
+ late: z.ZodBoolean;
1249
+ status: z.ZodEnum<{
1250
+ failed: "failed";
1251
+ queued: "queued";
1252
+ skipped: "skipped";
1253
+ started: "started";
1254
+ }>;
1255
+ reason: z.ZodNullable<z.ZodString>;
1256
+ sessionId: z.ZodNullable<z.ZodString>;
1257
+ turnId: z.ZodNullable<z.ZodString>;
1258
+ queuedMessageId: z.ZodNullable<z.ZodString>;
1186
1259
  }, z.core.$strict>>;
1187
- harness: z.ZodOptional<z.ZodString>;
1188
- lifecycle: z.ZodOptional<z.ZodObject<{
1189
- idle: z.ZodOptional<z.ZodString>;
1190
- deleteAfter: z.ZodOptional<z.ZodString>;
1260
+ nextCursor: z.ZodNullable<z.ZodString>;
1261
+ }, z.core.$strict>;
1262
+ export type TriggerRunPage = z.infer<typeof TriggerRunPageSchema>;
1263
+ /**
1264
+ * `POST /v1/agents/{id}/triggers/{triggerId}/secret` (D75): a webhook trigger's new signing secret,
1265
+ * in the Standard Webhooks format (`whsec_` and 32 random bytes in base64), shown this once. It
1266
+ * replaces the one before at once.
1267
+ */
1268
+ export declare const WebhookSecretResponseSchema: z.ZodObject<{
1269
+ triggerId: z.ZodString;
1270
+ webhookUrl: z.ZodString;
1271
+ secret: z.ZodString;
1272
+ }, z.core.$strict>;
1273
+ /** `POST /v1/webhooks/{endpointId}`: the run a delivery made, or the run a repeated delivery made. */
1274
+ export declare const WebhookAcceptedResponseSchema: z.ZodObject<{
1275
+ runId: z.ZodString;
1276
+ status: z.ZodEnum<{
1277
+ failed: "failed";
1278
+ queued: "queued";
1279
+ skipped: "skipped";
1280
+ started: "started";
1281
+ }>;
1282
+ reason: z.ZodNullable<z.ZodString>;
1283
+ }, z.core.$strict>;
1284
+ /** `POST /v1/agents/{id}/triggers/{triggerId}/run`: the run it made. */
1285
+ export declare const RunTriggerResponseSchema: z.ZodObject<{
1286
+ run: z.ZodObject<{
1287
+ id: z.ZodString;
1288
+ triggerId: z.ZodString;
1289
+ kind: z.ZodEnum<{
1290
+ at: "at";
1291
+ schedule: "schedule";
1292
+ wake: "wake";
1293
+ webhook: "webhook";
1294
+ }>;
1295
+ dueAt: z.ZodString;
1296
+ firedAt: z.ZodString;
1297
+ late: z.ZodBoolean;
1298
+ status: z.ZodEnum<{
1299
+ failed: "failed";
1300
+ queued: "queued";
1301
+ skipped: "skipped";
1302
+ started: "started";
1303
+ }>;
1304
+ reason: z.ZodNullable<z.ZodString>;
1305
+ sessionId: z.ZodNullable<z.ZodString>;
1306
+ turnId: z.ZodNullable<z.ZodString>;
1307
+ queuedMessageId: z.ZodNullable<z.ZodString>;
1308
+ }, z.core.$strict>;
1309
+ }, z.core.$strict>;
1310
+ /**
1311
+ * One of an Agent's memories (track T5, D72), as `GET /v1/agents/{id}/memories` lists it: its
1312
+ * path under `/memories`, size, content hash (the precondition a `PUT` may send), the
1313
+ * `description` of its frontmatter when it has one, and its version, which every change bumps.
1314
+ */
1315
+ export declare const MemorySummarySchema: z.ZodObject<{
1316
+ path: z.ZodString;
1317
+ bytes: z.ZodNumber;
1318
+ contentSha256: z.ZodString;
1319
+ description: z.ZodNullable<z.ZodString>;
1320
+ version: z.ZodNumber;
1321
+ updatedAt: z.ZodString;
1322
+ }, z.core.$strict>;
1323
+ export type MemorySummary = z.infer<typeof MemorySummarySchema>;
1324
+ /** `GET /v1/agents/{id}/memories`: memories by path. */
1325
+ export declare const MemoryListSchema: z.ZodObject<{
1326
+ memories: z.ZodArray<z.ZodObject<{
1327
+ path: z.ZodString;
1328
+ bytes: z.ZodNumber;
1329
+ contentSha256: z.ZodString;
1330
+ description: z.ZodNullable<z.ZodString>;
1331
+ version: z.ZodNumber;
1332
+ updatedAt: z.ZodString;
1191
1333
  }, z.core.$strict>>;
1192
- setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
1193
- command: z.ZodString;
1334
+ nextCursor: z.ZodNullable<z.ZodString>;
1335
+ }, z.core.$strict>;
1336
+ export type MemoryList = z.infer<typeof MemoryListSchema>;
1337
+ /** `GET /v1/agents/{id}/memories/{path}`: one memory with its content. */
1338
+ export declare const MemorySchema: z.ZodObject<{
1339
+ path: z.ZodString;
1340
+ bytes: z.ZodNumber;
1341
+ contentSha256: z.ZodString;
1342
+ description: z.ZodNullable<z.ZodString>;
1343
+ version: z.ZodNumber;
1344
+ updatedAt: z.ZodString;
1345
+ content: z.ZodString;
1346
+ }, z.core.$strict>;
1347
+ export type Memory = z.infer<typeof MemorySchema>;
1348
+ /**
1349
+ * `PUT /v1/agents/{id}/memories/{path}`: the memory's whole content, creating it or replacing it.
1350
+ * With `contentSha256`, the write applies only while the memory's content still has that hash
1351
+ * (`409 memory_conflict` with the current text otherwise); an empty string requires that no
1352
+ * memory has the path.
1353
+ */
1354
+ export declare const PutMemoryRequestSchema: z.ZodObject<{
1355
+ content: z.ZodString;
1356
+ contentSha256: z.ZodOptional<z.ZodString>;
1357
+ }, z.core.$strict>;
1358
+ export type PutMemoryRequest = z.infer<typeof PutMemoryRequestSchema>;
1359
+ /**
1360
+ * One change to a memory: what changed it (`create`, `str_replace`, `insert`, `delete`,
1361
+ * `rename`), the content it left (`null` for a delete), and who made it: `agent:<manifest>@<n>`
1362
+ * for a turn, with its session, turn and trigger run, or the principal of an API call. A rename's
1363
+ * version is on the new path and names the old one in `fromPath`.
1364
+ */
1365
+ export declare const MemoryVersionSchema: z.ZodObject<{
1366
+ id: z.ZodString;
1367
+ path: z.ZodString;
1368
+ fromPath: z.ZodNullable<z.ZodString>;
1369
+ operation: z.ZodEnum<{
1370
+ create: "create";
1371
+ delete: "delete";
1372
+ insert: "insert";
1373
+ rename: "rename";
1374
+ str_replace: "str_replace";
1375
+ }>;
1376
+ bytes: z.ZodNullable<z.ZodNumber>;
1377
+ contentSha256: z.ZodNullable<z.ZodString>;
1378
+ actor: z.ZodString;
1379
+ sessionId: z.ZodNullable<z.ZodString>;
1380
+ turnId: z.ZodNullable<z.ZodString>;
1381
+ triggerRunId: z.ZodNullable<z.ZodString>;
1382
+ createdAt: z.ZodString;
1383
+ }, z.core.$strict>;
1384
+ export type MemoryVersion = z.infer<typeof MemoryVersionSchema>;
1385
+ /** `GET /v1/agents/{id}/memory_versions/{versionId}`: one version with the content it left. */
1386
+ export declare const MemoryVersionDetailSchema: z.ZodObject<{
1387
+ id: z.ZodString;
1388
+ path: z.ZodString;
1389
+ fromPath: z.ZodNullable<z.ZodString>;
1390
+ operation: z.ZodEnum<{
1391
+ create: "create";
1392
+ delete: "delete";
1393
+ insert: "insert";
1394
+ rename: "rename";
1395
+ str_replace: "str_replace";
1396
+ }>;
1397
+ bytes: z.ZodNullable<z.ZodNumber>;
1398
+ contentSha256: z.ZodNullable<z.ZodString>;
1399
+ actor: z.ZodString;
1400
+ sessionId: z.ZodNullable<z.ZodString>;
1401
+ turnId: z.ZodNullable<z.ZodString>;
1402
+ triggerRunId: z.ZodNullable<z.ZodString>;
1403
+ createdAt: z.ZodString;
1404
+ content: z.ZodNullable<z.ZodString>;
1405
+ }, z.core.$strict>;
1406
+ export type MemoryVersionDetail = z.infer<typeof MemoryVersionDetailSchema>;
1407
+ /** `GET /v1/agents/{id}/memory_versions`: versions, newest first. */
1408
+ export declare const MemoryVersionPageSchema: z.ZodObject<{
1409
+ versions: z.ZodArray<z.ZodObject<{
1410
+ id: z.ZodString;
1411
+ path: z.ZodString;
1412
+ fromPath: z.ZodNullable<z.ZodString>;
1413
+ operation: z.ZodEnum<{
1414
+ create: "create";
1415
+ delete: "delete";
1416
+ insert: "insert";
1417
+ rename: "rename";
1418
+ str_replace: "str_replace";
1419
+ }>;
1420
+ bytes: z.ZodNullable<z.ZodNumber>;
1421
+ contentSha256: z.ZodNullable<z.ZodString>;
1422
+ actor: z.ZodString;
1423
+ sessionId: z.ZodNullable<z.ZodString>;
1424
+ turnId: z.ZodNullable<z.ZodString>;
1425
+ triggerRunId: z.ZodNullable<z.ZodString>;
1426
+ createdAt: z.ZodString;
1427
+ }, z.core.$strict>>;
1428
+ nextCursor: z.ZodNullable<z.ZodString>;
1429
+ }, z.core.$strict>;
1430
+ export type MemoryVersionPage = z.infer<typeof MemoryVersionPageSchema>;
1431
+ export declare const RuntimeSectionSchema: z.ZodObject<{
1432
+ kind: z.ZodEnum<{
1433
+ none: "none";
1434
+ pod: "pod";
1435
+ virtual: "virtual";
1436
+ }>;
1437
+ image: z.ZodOptional<z.ZodString>;
1438
+ resources: z.ZodOptional<z.ZodObject<{
1439
+ cpus: z.ZodOptional<z.ZodNumber>;
1440
+ memory: z.ZodOptional<z.ZodString>;
1441
+ }, z.core.$strict>>;
1442
+ storage: z.ZodOptional<z.ZodString>;
1443
+ network: z.ZodOptional<z.ZodObject<{
1444
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1445
+ }, z.core.$strict>>;
1446
+ lifecycle: z.ZodOptional<z.ZodObject<{
1447
+ idle: z.ZodOptional<z.ZodString>;
1448
+ deleteAfter: z.ZodOptional<z.ZodString>;
1449
+ }, z.core.$strict>>;
1450
+ setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
1451
+ command: z.ZodString;
1194
1452
  cwd: z.ZodOptional<z.ZodString>;
1195
1453
  timeout: z.ZodOptional<z.ZodString>;
1196
1454
  }, z.core.$strict>>>;
@@ -1247,18 +1505,240 @@ export declare const EnvironmentManifestSchema: z.ZodObject<{
1247
1505
  type: z.ZodLiteral<"headers">;
1248
1506
  url: z.ZodString;
1249
1507
  }, z.core.$strict>], "type">>>;
1508
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1509
+ schedule: z.ZodOptional<z.ZodString>;
1510
+ timezone: z.ZodOptional<z.ZodString>;
1511
+ at: z.ZodOptional<z.ZodISODateTime>;
1512
+ webhook: z.ZodOptional<z.ZodEnum<{
1513
+ "standard-webhooks": "standard-webhooks";
1514
+ }>>;
1515
+ session: z.ZodString;
1516
+ prompt: z.ZodString;
1517
+ }, z.core.$strict>>>;
1518
+ selfWake: z.ZodOptional<z.ZodBoolean>;
1250
1519
  }, z.core.$strict>;
1251
- export type EnvironmentManifest = z.infer<typeof EnvironmentManifestSchema>;
1252
- /** `PUT /v1/environment-manifests/{name}`: the manifest, whose `name` is the path's. */
1253
- export declare const PutEnvironmentManifestRequestSchema: z.ZodObject<{
1254
- manifestSchemaVersion: z.ZodLiteral<1>;
1520
+ export type RuntimeSection = z.infer<typeof RuntimeSectionSchema>;
1521
+ /**
1522
+ * Agent manifest v8 (protocol 16, track T2): one versioned document with what runs inside the
1523
+ * agent loop (`harness`) and what the Runtime provides around it (`runtime`), saved at
1524
+ * `PUT /v1/agent-manifests/{name}`. Without `runtime`, an Agent made from it is kind `none`.
1525
+ * The Runtime also checks the two sections against each other when it is saved (`sectionGaps`).
1526
+ */
1527
+ export declare const AgentManifestV8Schema: z.ZodObject<{
1528
+ manifestSchemaVersion: z.ZodLiteral<8>;
1255
1529
  name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1256
1530
  description: z.ZodOptional<z.ZodString>;
1257
- kind: z.ZodOptional<z.ZodEnum<{
1531
+ metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1532
+ harness: z.ZodUnion<readonly [z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>, z.ZodType<AgentHarnessSection, unknown, z.core.$ZodTypeInternals<AgentHarnessSection, unknown>>]>;
1533
+ runtime: z.ZodOptional<z.ZodObject<{
1534
+ kind: z.ZodEnum<{
1535
+ none: "none";
1536
+ pod: "pod";
1537
+ virtual: "virtual";
1538
+ }>;
1539
+ image: z.ZodOptional<z.ZodString>;
1540
+ resources: z.ZodOptional<z.ZodObject<{
1541
+ cpus: z.ZodOptional<z.ZodNumber>;
1542
+ memory: z.ZodOptional<z.ZodString>;
1543
+ }, z.core.$strict>>;
1544
+ storage: z.ZodOptional<z.ZodString>;
1545
+ network: z.ZodOptional<z.ZodObject<{
1546
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1547
+ }, z.core.$strict>>;
1548
+ lifecycle: z.ZodOptional<z.ZodObject<{
1549
+ idle: z.ZodOptional<z.ZodString>;
1550
+ deleteAfter: z.ZodOptional<z.ZodString>;
1551
+ }, z.core.$strict>>;
1552
+ setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
1553
+ command: z.ZodString;
1554
+ cwd: z.ZodOptional<z.ZodString>;
1555
+ timeout: z.ZodOptional<z.ZodString>;
1556
+ }, z.core.$strict>>>;
1557
+ files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1558
+ artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1559
+ version: z.ZodNumber;
1560
+ path: z.ZodString;
1561
+ }, z.core.$strict>, z.ZodObject<{
1562
+ path: z.ZodString;
1563
+ files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
1564
+ }, z.core.$strict>]>>>;
1565
+ limits: z.ZodOptional<z.ZodObject<{
1566
+ artifacts: z.ZodOptional<z.ZodObject<{
1567
+ fileBytes: z.ZodOptional<z.ZodNumber>;
1568
+ totalBytes: z.ZodOptional<z.ZodNumber>;
1569
+ }, z.core.$strict>>;
1570
+ skills: z.ZodOptional<z.ZodObject<{
1571
+ totalBytes: z.ZodOptional<z.ZodNumber>;
1572
+ }, z.core.$strict>>;
1573
+ disk: z.ZodOptional<z.ZodObject<{
1574
+ versionBytes: z.ZodOptional<z.ZodNumber>;
1575
+ versionEntries: z.ZodOptional<z.ZodNumber>;
1576
+ }, z.core.$strict>>;
1577
+ }, z.core.$strict>>;
1578
+ secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1579
+ required: z.ZodOptional<z.ZodBoolean>;
1580
+ description: z.ZodOptional<z.ZodString>;
1581
+ type: z.ZodLiteral<"environment_secret">;
1582
+ allowedHosts: z.ZodArray<z.ZodString>;
1583
+ inject: z.ZodOptional<z.ZodObject<{
1584
+ header: z.ZodString;
1585
+ format: z.ZodString;
1586
+ }, z.core.$strict>>;
1587
+ }, z.core.$strict>, z.ZodObject<{
1588
+ required: z.ZodOptional<z.ZodBoolean>;
1589
+ description: z.ZodOptional<z.ZodString>;
1590
+ type: z.ZodLiteral<"environment_variable">;
1591
+ }, z.core.$strict>, z.ZodObject<{
1592
+ via: z.ZodOptional<z.ZodString>;
1593
+ identity: z.ZodOptional<z.ZodObject<{
1594
+ header: z.ZodString;
1595
+ }, z.core.$strict>>;
1596
+ required: z.ZodOptional<z.ZodBoolean>;
1597
+ description: z.ZodOptional<z.ZodString>;
1598
+ type: z.ZodLiteral<"bearer">;
1599
+ url: z.ZodString;
1600
+ }, z.core.$strict>, z.ZodObject<{
1601
+ via: z.ZodOptional<z.ZodString>;
1602
+ identity: z.ZodOptional<z.ZodObject<{
1603
+ header: z.ZodString;
1604
+ }, z.core.$strict>>;
1605
+ required: z.ZodOptional<z.ZodBoolean>;
1606
+ description: z.ZodOptional<z.ZodString>;
1607
+ type: z.ZodLiteral<"headers">;
1608
+ url: z.ZodString;
1609
+ }, z.core.$strict>], "type">>>;
1610
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1611
+ schedule: z.ZodOptional<z.ZodString>;
1612
+ timezone: z.ZodOptional<z.ZodString>;
1613
+ at: z.ZodOptional<z.ZodISODateTime>;
1614
+ webhook: z.ZodOptional<z.ZodEnum<{
1615
+ "standard-webhooks": "standard-webhooks";
1616
+ }>>;
1617
+ session: z.ZodString;
1618
+ prompt: z.ZodString;
1619
+ }, z.core.$strict>>>;
1620
+ selfWake: z.ZodOptional<z.ZodBoolean>;
1621
+ }, z.core.$strict>>;
1622
+ }, z.core.$strict>;
1623
+ export type AgentManifestV8 = z.infer<typeof AgentManifestV8Schema>;
1624
+ /**
1625
+ * `harness.manifest.json`, an authoring file `nylorun apply` and the SDK's `composeManifest`
1626
+ * read: the harness section, whose `skills`, `mcpServers` and `plugins` may be paths relative to
1627
+ * the file, with a `credentials` map from MCP server or HTTP tool names to `runtime.secrets`
1628
+ * slots, and `requires`, a portable contract the composer checks against the runtime section.
1629
+ * The API never sees it.
1630
+ */
1631
+ export declare const HARNESS_MANIFEST_FILE_SCHEMA_VERSION = 1;
1632
+ export declare const HarnessManifestFileSchema: z.ZodObject<{
1633
+ $schema: z.ZodOptional<z.ZodString>;
1634
+ id: z.ZodOptional<z.ZodString>;
1635
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1636
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1637
+ name: z.ZodString;
1638
+ description: z.ZodOptional<z.ZodString>;
1639
+ inputSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
1640
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1641
+ agent: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>, z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>]>>>;
1642
+ http: z.ZodOptional<z.ZodObject<{
1643
+ url: z.ZodString;
1644
+ method: z.ZodOptional<z.ZodEnum<{
1645
+ DELETE: "DELETE";
1646
+ GET: "GET";
1647
+ PATCH: "PATCH";
1648
+ POST: "POST";
1649
+ PUT: "PUT";
1650
+ }>>;
1651
+ credential: z.ZodOptional<z.ZodString>;
1652
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1653
+ }, z.core.$strict>>;
1654
+ approval: z.ZodOptional<z.ZodEnum<{
1655
+ always: "always";
1656
+ never: "never";
1657
+ }>>;
1658
+ fn: z.ZodOptional<z.ZodUnknown & z.ZodType<undefined, unknown, z.core.$ZodTypeInternals<undefined, unknown>>>;
1659
+ command: z.ZodOptional<z.ZodUnknown & z.ZodType<undefined, unknown, z.core.$ZodTypeInternals<undefined, unknown>>>;
1660
+ }, z.core.$strict>>>;
1661
+ skills: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
1662
+ name: z.ZodString;
1663
+ description: z.ZodString;
1664
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
1665
+ plugin: z.ZodOptional<z.ZodObject<{
1666
+ name: z.ZodString;
1667
+ version: z.ZodOptional<z.ZodString>;
1668
+ }, z.core.$strict>>;
1669
+ secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1670
+ }, z.core.$strict>>]>>;
1671
+ mcpServers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1672
+ deferred: z.ZodOptional<z.ZodBoolean>;
1673
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1674
+ enabled: z.ZodOptional<z.ZodBoolean>;
1675
+ approval: z.ZodOptional<z.ZodEnum<{
1676
+ always: "always";
1677
+ never: "never";
1678
+ }>>;
1679
+ deferred: z.ZodOptional<z.ZodBoolean>;
1680
+ }, z.core.$strict>>>;
1681
+ plugin: z.ZodOptional<z.ZodObject<{
1682
+ name: z.ZodString;
1683
+ version: z.ZodOptional<z.ZodString>;
1684
+ }, z.core.$strict>>;
1685
+ name: z.ZodString;
1686
+ url: z.ZodString;
1687
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1688
+ credential: z.ZodOptional<z.ZodString>;
1689
+ type: z.ZodLiteral<"streamable-http">;
1690
+ }, z.core.$strict>, z.ZodObject<{
1691
+ deferred: z.ZodOptional<z.ZodBoolean>;
1692
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1693
+ enabled: z.ZodOptional<z.ZodBoolean>;
1694
+ approval: z.ZodOptional<z.ZodEnum<{
1695
+ always: "always";
1696
+ never: "never";
1697
+ }>>;
1698
+ deferred: z.ZodOptional<z.ZodBoolean>;
1699
+ }, z.core.$strict>>>;
1700
+ plugin: z.ZodOptional<z.ZodObject<{
1701
+ name: z.ZodString;
1702
+ version: z.ZodOptional<z.ZodString>;
1703
+ }, z.core.$strict>>;
1704
+ name: z.ZodString;
1705
+ url: z.ZodString;
1706
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1707
+ credential: z.ZodOptional<z.ZodString>;
1708
+ type: z.ZodLiteral<"sse">;
1709
+ }, z.core.$strict>], "type">>]>>;
1710
+ plugins: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1711
+ name: z.ZodString;
1712
+ version: z.ZodOptional<z.ZodString>;
1713
+ }, z.core.$strict>]>>>;
1714
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1715
+ loop: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1716
+ memory: z.ZodOptional<z.ZodObject<{
1717
+ access: z.ZodOptional<z.ZodEnum<{
1718
+ read_only: "read_only";
1719
+ read_write: "read_write";
1720
+ }>>;
1721
+ instructions: z.ZodOptional<z.ZodString>;
1722
+ }, z.core.$strict>>;
1723
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1724
+ requires: z.ZodOptional<z.ZodObject<{
1725
+ sandbox: z.ZodOptional<z.ZodEnum<{
1726
+ any: "any";
1727
+ none: "none";
1728
+ pod: "pod";
1729
+ }>>;
1730
+ secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1731
+ }, z.core.$strict>>;
1732
+ }, z.core.$strict>;
1733
+ export type HarnessManifestFile = z.infer<typeof HarnessManifestFileSchema>;
1734
+ /** `runtime.manifest.json`: the runtime section as a file, often shared by many agents. */
1735
+ export declare const RUNTIME_MANIFEST_FILE_SCHEMA_VERSION = 1;
1736
+ export declare const RuntimeManifestFileSchema: z.ZodObject<{
1737
+ kind: z.ZodEnum<{
1258
1738
  none: "none";
1259
1739
  pod: "pod";
1260
1740
  virtual: "virtual";
1261
- }>>;
1741
+ }>;
1262
1742
  image: z.ZodOptional<z.ZodString>;
1263
1743
  resources: z.ZodOptional<z.ZodObject<{
1264
1744
  cpus: z.ZodOptional<z.ZodNumber>;
@@ -1268,7 +1748,6 @@ export declare const PutEnvironmentManifestRequestSchema: z.ZodObject<{
1268
1748
  network: z.ZodOptional<z.ZodObject<{
1269
1749
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1270
1750
  }, z.core.$strict>>;
1271
- harness: z.ZodOptional<z.ZodString>;
1272
1751
  lifecycle: z.ZodOptional<z.ZodObject<{
1273
1752
  idle: z.ZodOptional<z.ZodString>;
1274
1753
  deleteAfter: z.ZodOptional<z.ZodString>;
@@ -1278,14 +1757,6 @@ export declare const PutEnvironmentManifestRequestSchema: z.ZodObject<{
1278
1757
  cwd: z.ZodOptional<z.ZodString>;
1279
1758
  timeout: z.ZodOptional<z.ZodString>;
1280
1759
  }, z.core.$strict>>>;
1281
- files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1282
- artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1283
- version: z.ZodNumber;
1284
- path: z.ZodString;
1285
- }, z.core.$strict>, z.ZodObject<{
1286
- path: z.ZodString;
1287
- files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
1288
- }, z.core.$strict>]>>>;
1289
1760
  limits: z.ZodOptional<z.ZodObject<{
1290
1761
  artifacts: z.ZodOptional<z.ZodObject<{
1291
1762
  fileBytes: z.ZodOptional<z.ZodNumber>;
@@ -1331,27 +1802,250 @@ export declare const PutEnvironmentManifestRequestSchema: z.ZodObject<{
1331
1802
  type: z.ZodLiteral<"headers">;
1332
1803
  url: z.ZodString;
1333
1804
  }, z.core.$strict>], "type">>>;
1334
- requestId: z.ZodOptional<z.ZodString>;
1805
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1806
+ schedule: z.ZodOptional<z.ZodString>;
1807
+ timezone: z.ZodOptional<z.ZodString>;
1808
+ at: z.ZodOptional<z.ZodISODateTime>;
1809
+ webhook: z.ZodOptional<z.ZodEnum<{
1810
+ "standard-webhooks": "standard-webhooks";
1811
+ }>>;
1812
+ session: z.ZodString;
1813
+ prompt: z.ZodString;
1814
+ }, z.core.$strict>>>;
1815
+ selfWake: z.ZodOptional<z.ZodBoolean>;
1816
+ $schema: z.ZodOptional<z.ZodString>;
1817
+ files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
1818
+ artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1819
+ version: z.ZodNumber;
1820
+ path: z.ZodString;
1821
+ }, z.core.$strict>, z.ZodObject<{
1822
+ path: z.ZodString;
1823
+ files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
1824
+ }, z.core.$strict>]>, z.ZodObject<{
1825
+ path: z.ZodString;
1826
+ from: z.ZodString;
1827
+ }, z.core.$strict>]>>>;
1335
1828
  }, z.core.$strict>;
1336
- export type PutEnvironmentManifestRequest = z.infer<typeof PutEnvironmentManifestRequestSchema>;
1337
- /** Who saved a version: the subject a request acted for, else `application`. */
1338
- export declare const EnvironmentManifestSavedBySchema: z.ZodObject<{
1339
- actor: z.ZodString;
1829
+ export type RuntimeManifestFile = z.infer<typeof RuntimeManifestFileSchema>;
1830
+ /**
1831
+ * `agent.manifest.json`: an agent manifest v8 whose `harness` and `runtime` may each be a path to
1832
+ * an authoring file (or inline). The composer resolves both and sends one document.
1833
+ */
1834
+ export declare const AgentManifestFileSchema: z.ZodObject<{
1835
+ $schema: z.ZodOptional<z.ZodString>;
1836
+ manifestSchemaVersion: z.ZodLiteral<8>;
1837
+ name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1838
+ description: z.ZodOptional<z.ZodString>;
1839
+ metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1840
+ harness: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1841
+ $schema: z.ZodOptional<z.ZodString>;
1842
+ id: z.ZodOptional<z.ZodString>;
1843
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1844
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1845
+ name: z.ZodString;
1846
+ description: z.ZodOptional<z.ZodString>;
1847
+ inputSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
1848
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1849
+ agent: z.ZodOptional<z.ZodLazy<z.ZodUnion<readonly [z.ZodType<WorkflowManifest, unknown, z.core.$ZodTypeInternals<WorkflowManifest, unknown>>, z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>]>>>;
1850
+ http: z.ZodOptional<z.ZodObject<{
1851
+ url: z.ZodString;
1852
+ method: z.ZodOptional<z.ZodEnum<{
1853
+ DELETE: "DELETE";
1854
+ GET: "GET";
1855
+ PATCH: "PATCH";
1856
+ POST: "POST";
1857
+ PUT: "PUT";
1858
+ }>>;
1859
+ credential: z.ZodOptional<z.ZodString>;
1860
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1861
+ }, z.core.$strict>>;
1862
+ approval: z.ZodOptional<z.ZodEnum<{
1863
+ always: "always";
1864
+ never: "never";
1865
+ }>>;
1866
+ fn: z.ZodOptional<z.ZodUnknown & z.ZodType<undefined, unknown, z.core.$ZodTypeInternals<undefined, unknown>>>;
1867
+ command: z.ZodOptional<z.ZodUnknown & z.ZodType<undefined, unknown, z.core.$ZodTypeInternals<undefined, unknown>>>;
1868
+ }, z.core.$strict>>>;
1869
+ skills: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
1870
+ name: z.ZodString;
1871
+ description: z.ZodString;
1872
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
1873
+ plugin: z.ZodOptional<z.ZodObject<{
1874
+ name: z.ZodString;
1875
+ version: z.ZodOptional<z.ZodString>;
1876
+ }, z.core.$strict>>;
1877
+ secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1878
+ }, z.core.$strict>>]>>;
1879
+ mcpServers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1880
+ deferred: z.ZodOptional<z.ZodBoolean>;
1881
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1882
+ enabled: z.ZodOptional<z.ZodBoolean>;
1883
+ approval: z.ZodOptional<z.ZodEnum<{
1884
+ always: "always";
1885
+ never: "never";
1886
+ }>>;
1887
+ deferred: z.ZodOptional<z.ZodBoolean>;
1888
+ }, z.core.$strict>>>;
1889
+ plugin: z.ZodOptional<z.ZodObject<{
1890
+ name: z.ZodString;
1891
+ version: z.ZodOptional<z.ZodString>;
1892
+ }, z.core.$strict>>;
1893
+ name: z.ZodString;
1894
+ url: z.ZodString;
1895
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1896
+ credential: z.ZodOptional<z.ZodString>;
1897
+ type: z.ZodLiteral<"streamable-http">;
1898
+ }, z.core.$strict>, z.ZodObject<{
1899
+ deferred: z.ZodOptional<z.ZodBoolean>;
1900
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1901
+ enabled: z.ZodOptional<z.ZodBoolean>;
1902
+ approval: z.ZodOptional<z.ZodEnum<{
1903
+ always: "always";
1904
+ never: "never";
1905
+ }>>;
1906
+ deferred: z.ZodOptional<z.ZodBoolean>;
1907
+ }, z.core.$strict>>>;
1908
+ plugin: z.ZodOptional<z.ZodObject<{
1909
+ name: z.ZodString;
1910
+ version: z.ZodOptional<z.ZodString>;
1911
+ }, z.core.$strict>>;
1912
+ name: z.ZodString;
1913
+ url: z.ZodString;
1914
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1915
+ credential: z.ZodOptional<z.ZodString>;
1916
+ type: z.ZodLiteral<"sse">;
1917
+ }, z.core.$strict>], "type">>]>>;
1918
+ plugins: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1919
+ name: z.ZodString;
1920
+ version: z.ZodOptional<z.ZodString>;
1921
+ }, z.core.$strict>]>>>;
1922
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1923
+ loop: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
1924
+ memory: z.ZodOptional<z.ZodObject<{
1925
+ access: z.ZodOptional<z.ZodEnum<{
1926
+ read_only: "read_only";
1927
+ read_write: "read_write";
1928
+ }>>;
1929
+ instructions: z.ZodOptional<z.ZodString>;
1930
+ }, z.core.$strict>>;
1931
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1932
+ requires: z.ZodOptional<z.ZodObject<{
1933
+ sandbox: z.ZodOptional<z.ZodEnum<{
1934
+ any: "any";
1935
+ none: "none";
1936
+ pod: "pod";
1937
+ }>>;
1938
+ secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
1939
+ }, z.core.$strict>>;
1940
+ }, z.core.$strict>, z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>]>;
1941
+ runtime: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1942
+ kind: z.ZodEnum<{
1943
+ none: "none";
1944
+ pod: "pod";
1945
+ virtual: "virtual";
1946
+ }>;
1947
+ image: z.ZodOptional<z.ZodString>;
1948
+ resources: z.ZodOptional<z.ZodObject<{
1949
+ cpus: z.ZodOptional<z.ZodNumber>;
1950
+ memory: z.ZodOptional<z.ZodString>;
1951
+ }, z.core.$strict>>;
1952
+ storage: z.ZodOptional<z.ZodString>;
1953
+ network: z.ZodOptional<z.ZodObject<{
1954
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1955
+ }, z.core.$strict>>;
1956
+ lifecycle: z.ZodOptional<z.ZodObject<{
1957
+ idle: z.ZodOptional<z.ZodString>;
1958
+ deleteAfter: z.ZodOptional<z.ZodString>;
1959
+ }, z.core.$strict>>;
1960
+ setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
1961
+ command: z.ZodString;
1962
+ cwd: z.ZodOptional<z.ZodString>;
1963
+ timeout: z.ZodOptional<z.ZodString>;
1964
+ }, z.core.$strict>>>;
1965
+ limits: z.ZodOptional<z.ZodObject<{
1966
+ artifacts: z.ZodOptional<z.ZodObject<{
1967
+ fileBytes: z.ZodOptional<z.ZodNumber>;
1968
+ totalBytes: z.ZodOptional<z.ZodNumber>;
1969
+ }, z.core.$strict>>;
1970
+ skills: z.ZodOptional<z.ZodObject<{
1971
+ totalBytes: z.ZodOptional<z.ZodNumber>;
1972
+ }, z.core.$strict>>;
1973
+ disk: z.ZodOptional<z.ZodObject<{
1974
+ versionBytes: z.ZodOptional<z.ZodNumber>;
1975
+ versionEntries: z.ZodOptional<z.ZodNumber>;
1976
+ }, z.core.$strict>>;
1977
+ }, z.core.$strict>>;
1978
+ secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1979
+ required: z.ZodOptional<z.ZodBoolean>;
1980
+ description: z.ZodOptional<z.ZodString>;
1981
+ type: z.ZodLiteral<"environment_secret">;
1982
+ allowedHosts: z.ZodArray<z.ZodString>;
1983
+ inject: z.ZodOptional<z.ZodObject<{
1984
+ header: z.ZodString;
1985
+ format: z.ZodString;
1986
+ }, z.core.$strict>>;
1987
+ }, z.core.$strict>, z.ZodObject<{
1988
+ required: z.ZodOptional<z.ZodBoolean>;
1989
+ description: z.ZodOptional<z.ZodString>;
1990
+ type: z.ZodLiteral<"environment_variable">;
1991
+ }, z.core.$strict>, z.ZodObject<{
1992
+ via: z.ZodOptional<z.ZodString>;
1993
+ identity: z.ZodOptional<z.ZodObject<{
1994
+ header: z.ZodString;
1995
+ }, z.core.$strict>>;
1996
+ required: z.ZodOptional<z.ZodBoolean>;
1997
+ description: z.ZodOptional<z.ZodString>;
1998
+ type: z.ZodLiteral<"bearer">;
1999
+ url: z.ZodString;
2000
+ }, z.core.$strict>, z.ZodObject<{
2001
+ via: z.ZodOptional<z.ZodString>;
2002
+ identity: z.ZodOptional<z.ZodObject<{
2003
+ header: z.ZodString;
2004
+ }, z.core.$strict>>;
2005
+ required: z.ZodOptional<z.ZodBoolean>;
2006
+ description: z.ZodOptional<z.ZodString>;
2007
+ type: z.ZodLiteral<"headers">;
2008
+ url: z.ZodString;
2009
+ }, z.core.$strict>], "type">>>;
2010
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2011
+ schedule: z.ZodOptional<z.ZodString>;
2012
+ timezone: z.ZodOptional<z.ZodString>;
2013
+ at: z.ZodOptional<z.ZodISODateTime>;
2014
+ webhook: z.ZodOptional<z.ZodEnum<{
2015
+ "standard-webhooks": "standard-webhooks";
2016
+ }>>;
2017
+ session: z.ZodString;
2018
+ prompt: z.ZodString;
2019
+ }, z.core.$strict>>>;
2020
+ selfWake: z.ZodOptional<z.ZodBoolean>;
2021
+ $schema: z.ZodOptional<z.ZodString>;
2022
+ files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
2023
+ artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2024
+ version: z.ZodNumber;
2025
+ path: z.ZodString;
2026
+ }, z.core.$strict>, z.ZodObject<{
2027
+ path: z.ZodString;
2028
+ files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
2029
+ }, z.core.$strict>]>, z.ZodObject<{
2030
+ path: z.ZodString;
2031
+ from: z.ZodString;
2032
+ }, z.core.$strict>]>>>;
2033
+ }, z.core.$strict>]>>;
1340
2034
  }, z.core.$strict>;
1341
- /** One version of an environment manifest. */
1342
- export declare const EnvironmentManifestViewSchema: z.ZodObject<{
1343
- name: z.ZodString;
1344
- version: z.ZodNumber;
1345
- hash: z.ZodString;
1346
- manifest: z.ZodObject<{
1347
- manifestSchemaVersion: z.ZodLiteral<1>;
1348
- name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1349
- description: z.ZodOptional<z.ZodString>;
1350
- kind: z.ZodOptional<z.ZodEnum<{
2035
+ export type AgentManifestFile = z.infer<typeof AgentManifestFileSchema>;
2036
+ /** `PUT /v1/agent-manifests/{name}`: the manifest, whose `name` is the path's. */
2037
+ export declare const PutAgentManifestRequestSchema: z.ZodObject<{
2038
+ manifestSchemaVersion: z.ZodLiteral<8>;
2039
+ name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2040
+ description: z.ZodOptional<z.ZodString>;
2041
+ metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
2042
+ harness: z.ZodUnion<readonly [z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>, z.ZodType<AgentHarnessSection, unknown, z.core.$ZodTypeInternals<AgentHarnessSection, unknown>>]>;
2043
+ runtime: z.ZodOptional<z.ZodObject<{
2044
+ kind: z.ZodEnum<{
1351
2045
  none: "none";
1352
2046
  pod: "pod";
1353
2047
  virtual: "virtual";
1354
- }>>;
2048
+ }>;
1355
2049
  image: z.ZodOptional<z.ZodString>;
1356
2050
  resources: z.ZodOptional<z.ZodObject<{
1357
2051
  cpus: z.ZodOptional<z.ZodNumber>;
@@ -1361,7 +2055,6 @@ export declare const EnvironmentManifestViewSchema: z.ZodObject<{
1361
2055
  network: z.ZodOptional<z.ZodObject<{
1362
2056
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1363
2057
  }, z.core.$strict>>;
1364
- harness: z.ZodOptional<z.ZodString>;
1365
2058
  lifecycle: z.ZodOptional<z.ZodObject<{
1366
2059
  idle: z.ZodOptional<z.ZodString>;
1367
2060
  deleteAfter: z.ZodOptional<z.ZodString>;
@@ -1424,29 +2117,42 @@ export declare const EnvironmentManifestViewSchema: z.ZodObject<{
1424
2117
  type: z.ZodLiteral<"headers">;
1425
2118
  url: z.ZodString;
1426
2119
  }, z.core.$strict>], "type">>>;
1427
- }, z.core.$strict>;
1428
- savedBy: z.ZodObject<{
1429
- actor: z.ZodString;
1430
- }, z.core.$strict>;
1431
- createdAt: z.ZodString;
1432
- environments: z.ZodNumber;
2120
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2121
+ schedule: z.ZodOptional<z.ZodString>;
2122
+ timezone: z.ZodOptional<z.ZodString>;
2123
+ at: z.ZodOptional<z.ZodISODateTime>;
2124
+ webhook: z.ZodOptional<z.ZodEnum<{
2125
+ "standard-webhooks": "standard-webhooks";
2126
+ }>>;
2127
+ session: z.ZodString;
2128
+ prompt: z.ZodString;
2129
+ }, z.core.$strict>>>;
2130
+ selfWake: z.ZodOptional<z.ZodBoolean>;
2131
+ }, z.core.$strict>>;
2132
+ requestId: z.ZodOptional<z.ZodString>;
1433
2133
  }, z.core.$strict>;
1434
- export type EnvironmentManifestView = z.infer<typeof EnvironmentManifestViewSchema>;
1435
- /** `GET /v1/environment-manifests`: each manifest's latest version, by name. */
1436
- export declare const ListEnvironmentManifestsResponseSchema: z.ZodObject<{
1437
- manifests: z.ZodArray<z.ZodObject<{
1438
- name: z.ZodString;
1439
- version: z.ZodNumber;
1440
- hash: z.ZodString;
1441
- manifest: z.ZodObject<{
1442
- manifestSchemaVersion: z.ZodLiteral<1>;
1443
- name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1444
- description: z.ZodOptional<z.ZodString>;
1445
- kind: z.ZodOptional<z.ZodEnum<{
2134
+ export type PutAgentManifestRequest = z.infer<typeof PutAgentManifestRequestSchema>;
2135
+ /** Who saved a version: the subject a request acted for, else `application`. */
2136
+ export declare const AgentManifestSavedBySchema: z.ZodObject<{
2137
+ actor: z.ZodString;
2138
+ }, z.core.$strict>;
2139
+ /** One version of an agent manifest. */
2140
+ export declare const AgentManifestViewSchema: z.ZodObject<{
2141
+ name: z.ZodString;
2142
+ version: z.ZodNumber;
2143
+ hash: z.ZodString;
2144
+ manifest: z.ZodObject<{
2145
+ manifestSchemaVersion: z.ZodLiteral<8>;
2146
+ name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2147
+ description: z.ZodOptional<z.ZodString>;
2148
+ metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
2149
+ harness: z.ZodUnion<readonly [z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>, z.ZodType<AgentHarnessSection, unknown, z.core.$ZodTypeInternals<AgentHarnessSection, unknown>>]>;
2150
+ runtime: z.ZodOptional<z.ZodObject<{
2151
+ kind: z.ZodEnum<{
1446
2152
  none: "none";
1447
2153
  pod: "pod";
1448
2154
  virtual: "virtual";
1449
- }>>;
2155
+ }>;
1450
2156
  image: z.ZodOptional<z.ZodString>;
1451
2157
  resources: z.ZodOptional<z.ZodObject<{
1452
2158
  cpus: z.ZodOptional<z.ZodNumber>;
@@ -1456,7 +2162,6 @@ export declare const ListEnvironmentManifestsResponseSchema: z.ZodObject<{
1456
2162
  network: z.ZodOptional<z.ZodObject<{
1457
2163
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1458
2164
  }, z.core.$strict>>;
1459
- harness: z.ZodOptional<z.ZodString>;
1460
2165
  lifecycle: z.ZodOptional<z.ZodObject<{
1461
2166
  idle: z.ZodOptional<z.ZodString>;
1462
2167
  deleteAfter: z.ZodOptional<z.ZodString>;
@@ -1519,17 +2224,138 @@ export declare const ListEnvironmentManifestsResponseSchema: z.ZodObject<{
1519
2224
  type: z.ZodLiteral<"headers">;
1520
2225
  url: z.ZodString;
1521
2226
  }, z.core.$strict>], "type">>>;
2227
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2228
+ schedule: z.ZodOptional<z.ZodString>;
2229
+ timezone: z.ZodOptional<z.ZodString>;
2230
+ at: z.ZodOptional<z.ZodISODateTime>;
2231
+ webhook: z.ZodOptional<z.ZodEnum<{
2232
+ "standard-webhooks": "standard-webhooks";
2233
+ }>>;
2234
+ session: z.ZodString;
2235
+ prompt: z.ZodString;
2236
+ }, z.core.$strict>>>;
2237
+ selfWake: z.ZodOptional<z.ZodBoolean>;
2238
+ }, z.core.$strict>>;
2239
+ }, z.core.$strict>;
2240
+ savedBy: z.ZodObject<{
2241
+ actor: z.ZodString;
2242
+ }, z.core.$strict>;
2243
+ createdAt: z.ZodString;
2244
+ agents: z.ZodNumber;
2245
+ }, z.core.$strict>;
2246
+ export type AgentManifestView = z.infer<typeof AgentManifestViewSchema>;
2247
+ /** `GET /v1/agent-manifests`: each manifest's latest version, by name. */
2248
+ export declare const ListAgentManifestsResponseSchema: z.ZodObject<{
2249
+ manifests: z.ZodArray<z.ZodObject<{
2250
+ name: z.ZodString;
2251
+ version: z.ZodNumber;
2252
+ hash: z.ZodString;
2253
+ manifest: z.ZodObject<{
2254
+ manifestSchemaVersion: z.ZodLiteral<8>;
2255
+ name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2256
+ description: z.ZodOptional<z.ZodString>;
2257
+ metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
2258
+ harness: z.ZodUnion<readonly [z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>, z.ZodType<AgentHarnessSection, unknown, z.core.$ZodTypeInternals<AgentHarnessSection, unknown>>]>;
2259
+ runtime: z.ZodOptional<z.ZodObject<{
2260
+ kind: z.ZodEnum<{
2261
+ none: "none";
2262
+ pod: "pod";
2263
+ virtual: "virtual";
2264
+ }>;
2265
+ image: z.ZodOptional<z.ZodString>;
2266
+ resources: z.ZodOptional<z.ZodObject<{
2267
+ cpus: z.ZodOptional<z.ZodNumber>;
2268
+ memory: z.ZodOptional<z.ZodString>;
2269
+ }, z.core.$strict>>;
2270
+ storage: z.ZodOptional<z.ZodString>;
2271
+ network: z.ZodOptional<z.ZodObject<{
2272
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2273
+ }, z.core.$strict>>;
2274
+ lifecycle: z.ZodOptional<z.ZodObject<{
2275
+ idle: z.ZodOptional<z.ZodString>;
2276
+ deleteAfter: z.ZodOptional<z.ZodString>;
2277
+ }, z.core.$strict>>;
2278
+ setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
2279
+ command: z.ZodString;
2280
+ cwd: z.ZodOptional<z.ZodString>;
2281
+ timeout: z.ZodOptional<z.ZodString>;
2282
+ }, z.core.$strict>>>;
2283
+ files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2284
+ artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2285
+ version: z.ZodNumber;
2286
+ path: z.ZodString;
2287
+ }, z.core.$strict>, z.ZodObject<{
2288
+ path: z.ZodString;
2289
+ files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
2290
+ }, z.core.$strict>]>>>;
2291
+ limits: z.ZodOptional<z.ZodObject<{
2292
+ artifacts: z.ZodOptional<z.ZodObject<{
2293
+ fileBytes: z.ZodOptional<z.ZodNumber>;
2294
+ totalBytes: z.ZodOptional<z.ZodNumber>;
2295
+ }, z.core.$strict>>;
2296
+ skills: z.ZodOptional<z.ZodObject<{
2297
+ totalBytes: z.ZodOptional<z.ZodNumber>;
2298
+ }, z.core.$strict>>;
2299
+ disk: z.ZodOptional<z.ZodObject<{
2300
+ versionBytes: z.ZodOptional<z.ZodNumber>;
2301
+ versionEntries: z.ZodOptional<z.ZodNumber>;
2302
+ }, z.core.$strict>>;
2303
+ }, z.core.$strict>>;
2304
+ secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2305
+ required: z.ZodOptional<z.ZodBoolean>;
2306
+ description: z.ZodOptional<z.ZodString>;
2307
+ type: z.ZodLiteral<"environment_secret">;
2308
+ allowedHosts: z.ZodArray<z.ZodString>;
2309
+ inject: z.ZodOptional<z.ZodObject<{
2310
+ header: z.ZodString;
2311
+ format: z.ZodString;
2312
+ }, z.core.$strict>>;
2313
+ }, z.core.$strict>, z.ZodObject<{
2314
+ required: z.ZodOptional<z.ZodBoolean>;
2315
+ description: z.ZodOptional<z.ZodString>;
2316
+ type: z.ZodLiteral<"environment_variable">;
2317
+ }, z.core.$strict>, z.ZodObject<{
2318
+ via: z.ZodOptional<z.ZodString>;
2319
+ identity: z.ZodOptional<z.ZodObject<{
2320
+ header: z.ZodString;
2321
+ }, z.core.$strict>>;
2322
+ required: z.ZodOptional<z.ZodBoolean>;
2323
+ description: z.ZodOptional<z.ZodString>;
2324
+ type: z.ZodLiteral<"bearer">;
2325
+ url: z.ZodString;
2326
+ }, z.core.$strict>, z.ZodObject<{
2327
+ via: z.ZodOptional<z.ZodString>;
2328
+ identity: z.ZodOptional<z.ZodObject<{
2329
+ header: z.ZodString;
2330
+ }, z.core.$strict>>;
2331
+ required: z.ZodOptional<z.ZodBoolean>;
2332
+ description: z.ZodOptional<z.ZodString>;
2333
+ type: z.ZodLiteral<"headers">;
2334
+ url: z.ZodString;
2335
+ }, z.core.$strict>], "type">>>;
2336
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2337
+ schedule: z.ZodOptional<z.ZodString>;
2338
+ timezone: z.ZodOptional<z.ZodString>;
2339
+ at: z.ZodOptional<z.ZodISODateTime>;
2340
+ webhook: z.ZodOptional<z.ZodEnum<{
2341
+ "standard-webhooks": "standard-webhooks";
2342
+ }>>;
2343
+ session: z.ZodString;
2344
+ prompt: z.ZodString;
2345
+ }, z.core.$strict>>>;
2346
+ selfWake: z.ZodOptional<z.ZodBoolean>;
2347
+ }, z.core.$strict>>;
1522
2348
  }, z.core.$strict>;
1523
2349
  savedBy: z.ZodObject<{
1524
2350
  actor: z.ZodString;
1525
2351
  }, z.core.$strict>;
1526
2352
  createdAt: z.ZodString;
1527
- environments: z.ZodNumber;
2353
+ agents: z.ZodNumber;
1528
2354
  }, z.core.$strict>>;
1529
2355
  }, z.core.$strict>;
1530
- export type ListEnvironmentManifestsResponse = z.infer<typeof ListEnvironmentManifestsResponseSchema>;
1531
- /** `GET /v1/environment-manifests/{name}/versions`: every version, newest first. */
1532
- export declare const EnvironmentManifestVersionsSchema: z.ZodObject<{
2356
+ export type ListAgentManifestsResponse = z.infer<typeof ListAgentManifestsResponseSchema>;
2357
+ /** `GET /v1/agent-manifests/{name}/versions`: every version, newest first. */
2358
+ export declare const AgentManifestVersionsSchema: z.ZodObject<{
1533
2359
  name: z.ZodString;
1534
2360
  latest: z.ZodNumber;
1535
2361
  versions: z.ZodArray<z.ZodObject<{
@@ -1539,29 +2365,57 @@ export declare const EnvironmentManifestVersionsSchema: z.ZodObject<{
1539
2365
  actor: z.ZodString;
1540
2366
  }, z.core.$strict>;
1541
2367
  createdAt: z.ZodString;
1542
- environments: z.ZodNumber;
2368
+ agents: z.ZodNumber;
1543
2369
  }, z.core.$strict>>;
1544
2370
  }, z.core.$strict>;
1545
- export type EnvironmentManifestVersions = z.infer<typeof EnvironmentManifestVersionsSchema>;
2371
+ export type AgentManifestVersions = z.infer<typeof AgentManifestVersionsSchema>;
1546
2372
  /** Something a save would do that the saver should know: never a refusal. */
1547
- export declare const EnvironmentManifestWarningSchema: z.ZodObject<{
2373
+ export declare const AgentManifestWarningSchema: z.ZodObject<{
1548
2374
  code: z.ZodString;
1549
2375
  message: z.ZodString;
1550
2376
  }, z.core.$strict>;
1551
- export type EnvironmentManifestWarning = z.infer<typeof EnvironmentManifestWarningSchema>;
2377
+ export type AgentManifestWarning = z.infer<typeof AgentManifestWarningSchema>;
2378
+ /** One field a save changes, by its section and its path in it. */
2379
+ export declare const AgentManifestChangeSchema: z.ZodObject<{
2380
+ section: z.ZodEnum<{
2381
+ harness: "harness";
2382
+ manifest: "manifest";
2383
+ runtime: "runtime";
2384
+ }>;
2385
+ path: z.ZodString;
2386
+ op: z.ZodEnum<{
2387
+ add: "add";
2388
+ remove: "remove";
2389
+ replace: "replace";
2390
+ }>;
2391
+ from: z.ZodOptional<z.ZodUnknown>;
2392
+ to: z.ZodOptional<z.ZodUnknown>;
2393
+ }, z.core.$strict>;
2394
+ export type AgentManifestChange = z.infer<typeof AgentManifestChangeSchema>;
1552
2395
  /**
1553
- * `PUT /v1/environment-manifests/{name}?dryRun=true`: what saving it would do, with nothing
1554
- * saved. `errors` lists every reason the Runtime would refuse it (the Tenant's limits, for one);
1555
- * a save with errors is `400`. `behind` counts the Environments made from an older version than
1556
- * the one it would save. No Environment changes when a version is saved (D63).
2396
+ * `PUT /v1/agent-manifests/{name}?dryRun=true`: what saving it would do, with nothing saved.
2397
+ * `errors` lists every reason the Runtime would refuse it: the gaps between its sections, the
2398
+ * Tenant's limits, its files; a save with errors is refused. A save moves every Agent that tracks
2399
+ * the manifest (track T3): `moves` counts them by when the new version applies. `behind` counts
2400
+ * the Agents that stay on an older version: pinned ones, and tracking ones it cannot move.
1557
2401
  */
1558
- export declare const EnvironmentManifestPlanSchema: z.ZodObject<{
2402
+ export declare const AgentManifestPlanSchema: z.ZodObject<{
1559
2403
  name: z.ZodString;
1560
2404
  from: z.ZodNullable<z.ZodNumber>;
1561
2405
  to: z.ZodNumber;
1562
2406
  unchanged: z.ZodBoolean;
1563
2407
  changes: z.ZodArray<z.ZodObject<{
2408
+ section: z.ZodEnum<{
2409
+ harness: "harness";
2410
+ manifest: "manifest";
2411
+ runtime: "runtime";
2412
+ }>;
1564
2413
  path: z.ZodString;
2414
+ op: z.ZodEnum<{
2415
+ add: "add";
2416
+ remove: "remove";
2417
+ replace: "replace";
2418
+ }>;
1565
2419
  from: z.ZodOptional<z.ZodUnknown>;
1566
2420
  to: z.ZodOptional<z.ZodUnknown>;
1567
2421
  }, z.core.$strict>>;
@@ -1571,101 +2425,120 @@ export declare const EnvironmentManifestPlanSchema: z.ZodObject<{
1571
2425
  }, z.core.$strict>>;
1572
2426
  errors: z.ZodArray<z.ZodString>;
1573
2427
  behind: z.ZodNumber;
2428
+ moves: z.ZodObject<{
2429
+ now: z.ZodNumber;
2430
+ nextStart: z.ZodNumber;
2431
+ secrets: z.ZodNumber;
2432
+ }, z.core.$strict>;
1574
2433
  }, z.core.$strict>;
1575
- export type EnvironmentManifestPlan = z.infer<typeof EnvironmentManifestPlanSchema>;
1576
- /** `PUT /v1/environment-manifests/{name}`: the version saved (or the latest, unchanged). */
1577
- export declare const SaveEnvironmentManifestResponseSchema: z.ZodObject<{
2434
+ export type AgentManifestPlan = z.infer<typeof AgentManifestPlanSchema>;
2435
+ /** `PUT /v1/agent-manifests/{name}`: the version saved (or the latest, unchanged). */
2436
+ export declare const SaveAgentManifestResponseSchema: z.ZodObject<{
1578
2437
  manifest: z.ZodObject<{
1579
2438
  name: z.ZodString;
1580
2439
  version: z.ZodNumber;
1581
2440
  hash: z.ZodString;
1582
- manifest: z.ZodObject<{
1583
- manifestSchemaVersion: z.ZodLiteral<1>;
1584
- name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1585
- description: z.ZodOptional<z.ZodString>;
1586
- kind: z.ZodOptional<z.ZodEnum<{
1587
- none: "none";
1588
- pod: "pod";
1589
- virtual: "virtual";
1590
- }>>;
1591
- image: z.ZodOptional<z.ZodString>;
1592
- resources: z.ZodOptional<z.ZodObject<{
1593
- cpus: z.ZodOptional<z.ZodNumber>;
1594
- memory: z.ZodOptional<z.ZodString>;
1595
- }, z.core.$strict>>;
1596
- storage: z.ZodOptional<z.ZodString>;
1597
- network: z.ZodOptional<z.ZodObject<{
1598
- allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1599
- }, z.core.$strict>>;
1600
- harness: z.ZodOptional<z.ZodString>;
1601
- lifecycle: z.ZodOptional<z.ZodObject<{
1602
- idle: z.ZodOptional<z.ZodString>;
1603
- deleteAfter: z.ZodOptional<z.ZodString>;
1604
- }, z.core.$strict>>;
1605
- setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
1606
- command: z.ZodString;
1607
- cwd: z.ZodOptional<z.ZodString>;
1608
- timeout: z.ZodOptional<z.ZodString>;
1609
- }, z.core.$strict>>>;
1610
- files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1611
- artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1612
- version: z.ZodNumber;
1613
- path: z.ZodString;
1614
- }, z.core.$strict>, z.ZodObject<{
1615
- path: z.ZodString;
1616
- files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
1617
- }, z.core.$strict>]>>>;
1618
- limits: z.ZodOptional<z.ZodObject<{
1619
- artifacts: z.ZodOptional<z.ZodObject<{
1620
- fileBytes: z.ZodOptional<z.ZodNumber>;
1621
- totalBytes: z.ZodOptional<z.ZodNumber>;
1622
- }, z.core.$strict>>;
1623
- skills: z.ZodOptional<z.ZodObject<{
1624
- totalBytes: z.ZodOptional<z.ZodNumber>;
1625
- }, z.core.$strict>>;
1626
- disk: z.ZodOptional<z.ZodObject<{
1627
- versionBytes: z.ZodOptional<z.ZodNumber>;
1628
- versionEntries: z.ZodOptional<z.ZodNumber>;
2441
+ manifest: z.ZodObject<{
2442
+ manifestSchemaVersion: z.ZodLiteral<8>;
2443
+ name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2444
+ description: z.ZodOptional<z.ZodString>;
2445
+ metadata: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
2446
+ harness: z.ZodUnion<readonly [z.ZodType<WorkflowHarnessSection, unknown, z.core.$ZodTypeInternals<WorkflowHarnessSection, unknown>>, z.ZodType<AgentHarnessSection, unknown, z.core.$ZodTypeInternals<AgentHarnessSection, unknown>>]>;
2447
+ runtime: z.ZodOptional<z.ZodObject<{
2448
+ kind: z.ZodEnum<{
2449
+ none: "none";
2450
+ pod: "pod";
2451
+ virtual: "virtual";
2452
+ }>;
2453
+ image: z.ZodOptional<z.ZodString>;
2454
+ resources: z.ZodOptional<z.ZodObject<{
2455
+ cpus: z.ZodOptional<z.ZodNumber>;
2456
+ memory: z.ZodOptional<z.ZodString>;
1629
2457
  }, z.core.$strict>>;
1630
- }, z.core.$strict>>;
1631
- secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1632
- required: z.ZodOptional<z.ZodBoolean>;
1633
- description: z.ZodOptional<z.ZodString>;
1634
- type: z.ZodLiteral<"environment_secret">;
1635
- allowedHosts: z.ZodArray<z.ZodString>;
1636
- inject: z.ZodOptional<z.ZodObject<{
1637
- header: z.ZodString;
1638
- format: z.ZodString;
2458
+ storage: z.ZodOptional<z.ZodString>;
2459
+ network: z.ZodOptional<z.ZodObject<{
2460
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1639
2461
  }, z.core.$strict>>;
1640
- }, z.core.$strict>, z.ZodObject<{
1641
- required: z.ZodOptional<z.ZodBoolean>;
1642
- description: z.ZodOptional<z.ZodString>;
1643
- type: z.ZodLiteral<"environment_variable">;
1644
- }, z.core.$strict>, z.ZodObject<{
1645
- via: z.ZodOptional<z.ZodString>;
1646
- identity: z.ZodOptional<z.ZodObject<{
1647
- header: z.ZodString;
2462
+ lifecycle: z.ZodOptional<z.ZodObject<{
2463
+ idle: z.ZodOptional<z.ZodString>;
2464
+ deleteAfter: z.ZodOptional<z.ZodString>;
1648
2465
  }, z.core.$strict>>;
1649
- required: z.ZodOptional<z.ZodBoolean>;
1650
- description: z.ZodOptional<z.ZodString>;
1651
- type: z.ZodLiteral<"bearer">;
1652
- url: z.ZodString;
1653
- }, z.core.$strict>, z.ZodObject<{
1654
- via: z.ZodOptional<z.ZodString>;
1655
- identity: z.ZodOptional<z.ZodObject<{
1656
- header: z.ZodString;
2466
+ setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
2467
+ command: z.ZodString;
2468
+ cwd: z.ZodOptional<z.ZodString>;
2469
+ timeout: z.ZodOptional<z.ZodString>;
2470
+ }, z.core.$strict>>>;
2471
+ files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2472
+ artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2473
+ version: z.ZodNumber;
2474
+ path: z.ZodString;
2475
+ }, z.core.$strict>, z.ZodObject<{
2476
+ path: z.ZodString;
2477
+ files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
2478
+ }, z.core.$strict>]>>>;
2479
+ limits: z.ZodOptional<z.ZodObject<{
2480
+ artifacts: z.ZodOptional<z.ZodObject<{
2481
+ fileBytes: z.ZodOptional<z.ZodNumber>;
2482
+ totalBytes: z.ZodOptional<z.ZodNumber>;
2483
+ }, z.core.$strict>>;
2484
+ skills: z.ZodOptional<z.ZodObject<{
2485
+ totalBytes: z.ZodOptional<z.ZodNumber>;
2486
+ }, z.core.$strict>>;
2487
+ disk: z.ZodOptional<z.ZodObject<{
2488
+ versionBytes: z.ZodOptional<z.ZodNumber>;
2489
+ versionEntries: z.ZodOptional<z.ZodNumber>;
2490
+ }, z.core.$strict>>;
1657
2491
  }, z.core.$strict>>;
1658
- required: z.ZodOptional<z.ZodBoolean>;
1659
- description: z.ZodOptional<z.ZodString>;
1660
- type: z.ZodLiteral<"headers">;
1661
- url: z.ZodString;
1662
- }, z.core.$strict>], "type">>>;
2492
+ secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2493
+ required: z.ZodOptional<z.ZodBoolean>;
2494
+ description: z.ZodOptional<z.ZodString>;
2495
+ type: z.ZodLiteral<"environment_secret">;
2496
+ allowedHosts: z.ZodArray<z.ZodString>;
2497
+ inject: z.ZodOptional<z.ZodObject<{
2498
+ header: z.ZodString;
2499
+ format: z.ZodString;
2500
+ }, z.core.$strict>>;
2501
+ }, z.core.$strict>, z.ZodObject<{
2502
+ required: z.ZodOptional<z.ZodBoolean>;
2503
+ description: z.ZodOptional<z.ZodString>;
2504
+ type: z.ZodLiteral<"environment_variable">;
2505
+ }, z.core.$strict>, z.ZodObject<{
2506
+ via: z.ZodOptional<z.ZodString>;
2507
+ identity: z.ZodOptional<z.ZodObject<{
2508
+ header: z.ZodString;
2509
+ }, z.core.$strict>>;
2510
+ required: z.ZodOptional<z.ZodBoolean>;
2511
+ description: z.ZodOptional<z.ZodString>;
2512
+ type: z.ZodLiteral<"bearer">;
2513
+ url: z.ZodString;
2514
+ }, z.core.$strict>, z.ZodObject<{
2515
+ via: z.ZodOptional<z.ZodString>;
2516
+ identity: z.ZodOptional<z.ZodObject<{
2517
+ header: z.ZodString;
2518
+ }, z.core.$strict>>;
2519
+ required: z.ZodOptional<z.ZodBoolean>;
2520
+ description: z.ZodOptional<z.ZodString>;
2521
+ type: z.ZodLiteral<"headers">;
2522
+ url: z.ZodString;
2523
+ }, z.core.$strict>], "type">>>;
2524
+ triggers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2525
+ schedule: z.ZodOptional<z.ZodString>;
2526
+ timezone: z.ZodOptional<z.ZodString>;
2527
+ at: z.ZodOptional<z.ZodISODateTime>;
2528
+ webhook: z.ZodOptional<z.ZodEnum<{
2529
+ "standard-webhooks": "standard-webhooks";
2530
+ }>>;
2531
+ session: z.ZodString;
2532
+ prompt: z.ZodString;
2533
+ }, z.core.$strict>>>;
2534
+ selfWake: z.ZodOptional<z.ZodBoolean>;
2535
+ }, z.core.$strict>>;
1663
2536
  }, z.core.$strict>;
1664
2537
  savedBy: z.ZodObject<{
1665
2538
  actor: z.ZodString;
1666
2539
  }, z.core.$strict>;
1667
2540
  createdAt: z.ZodString;
1668
- environments: z.ZodNumber;
2541
+ agents: z.ZodNumber;
1669
2542
  }, z.core.$strict>;
1670
2543
  unchanged: z.ZodBoolean;
1671
2544
  warnings: z.ZodArray<z.ZodObject<{
@@ -1673,19 +2546,19 @@ export declare const SaveEnvironmentManifestResponseSchema: z.ZodObject<{
1673
2546
  message: z.ZodString;
1674
2547
  }, z.core.$strict>>;
1675
2548
  }, z.core.$strict>;
1676
- export type SaveEnvironmentManifestResponse = z.infer<typeof SaveEnvironmentManifestResponseSchema>;
1677
- export declare const DeleteEnvironmentManifestResponseSchema: z.ZodObject<{
2549
+ export type SaveAgentManifestResponse = z.infer<typeof SaveAgentManifestResponseSchema>;
2550
+ export declare const DeleteAgentManifestResponseSchema: z.ZodObject<{
1678
2551
  name: z.ZodString;
1679
2552
  deleted: z.ZodBoolean;
1680
2553
  }, z.core.$strict>;
1681
- export type DeleteEnvironmentManifestResponse = z.infer<typeof DeleteEnvironmentManifestResponseSchema>;
2554
+ export type DeleteAgentManifestResponse = z.infer<typeof DeleteAgentManifestResponseSchema>;
1682
2555
  /**
1683
- * `POST /v1/environments/{id}/fork` (Q15): how an Environment gets a new manifest version. The
1684
- * fork is a new Environment, made from the version, its disk started from a version of the
1685
- * source's disk and its secrets copied inside the Runtime. The source keeps what it runs, its
1686
- * disk and its sessions.
2556
+ * `POST /v1/agents/{id}/fork` (Q15): copies an Agent, with its disk and vault, into a new one,
2557
+ * made from `manifest` (default the source's manifest at its latest version): how an Agent
2558
+ * changes what is fixed for its life (its kind, harness, storage or manifest). The source keeps
2559
+ * what it runs, its disk and its sessions.
1687
2560
  */
1688
- export declare const ForkEnvironmentRequestSchema: z.ZodObject<{
2561
+ export declare const ForkAgentRequestSchema: z.ZodObject<{
1689
2562
  requestId: z.ZodOptional<z.ZodString>;
1690
2563
  id: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
1691
2564
  manifest: z.ZodOptional<z.ZodString>;
@@ -1695,12 +2568,12 @@ export declare const ForkEnvironmentRequestSchema: z.ZodObject<{
1695
2568
  none: "none";
1696
2569
  }>>;
1697
2570
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1698
- ownerUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2571
+ owner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1699
2572
  dryRun: z.ZodOptional<z.ZodBoolean>;
1700
2573
  }, z.core.$strict>;
1701
- export type ForkEnvironmentRequest = z.infer<typeof ForkEnvironmentRequestSchema>;
2574
+ export type ForkAgentRequest = z.infer<typeof ForkAgentRequestSchema>;
1702
2575
  /** What a fork does (or, with `dryRun`, would do). */
1703
- export declare const EnvironmentForkPlanSchema: z.ZodObject<{
2576
+ export declare const AgentForkPlanSchema: z.ZodObject<{
1704
2577
  source: z.ZodString;
1705
2578
  id: z.ZodString;
1706
2579
  kind: z.ZodEnum<{
@@ -1708,10 +2581,10 @@ export declare const EnvironmentForkPlanSchema: z.ZodObject<{
1708
2581
  pod: "pod";
1709
2582
  virtual: "virtual";
1710
2583
  }>;
1711
- manifest: z.ZodNullable<z.ZodObject<{
2584
+ manifest: z.ZodObject<{
1712
2585
  name: z.ZodString;
1713
2586
  version: z.ZodNumber;
1714
- }, z.core.$strict>>;
2587
+ }, z.core.$strict>;
1715
2588
  disk: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"latest">]>>;
1716
2589
  setup: z.ZodBoolean;
1717
2590
  secrets: z.ZodObject<{
@@ -1725,10 +2598,11 @@ export declare const EnvironmentForkPlanSchema: z.ZodObject<{
1725
2598
  to: z.ZodOptional<z.ZodUnknown>;
1726
2599
  }, z.core.$strict>>;
1727
2600
  sessions: z.ZodNumber;
2601
+ memories: z.ZodNumber;
1728
2602
  }, z.core.$strict>;
1729
- export type EnvironmentForkPlan = z.infer<typeof EnvironmentForkPlanSchema>;
1730
- /** `POST /v1/environments/{id}/fork`: the new Environment and the plan it ran, or with `dryRun` the plan only. */
1731
- export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2603
+ export type AgentForkPlan = z.infer<typeof AgentForkPlanSchema>;
2604
+ /** `POST /v1/agents/{id}/fork`: the new Agent and the plan it ran, or with `dryRun` the plan only. */
2605
+ export declare const ForkAgentResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1732
2606
  dryRun: z.ZodLiteral<true>;
1733
2607
  plan: z.ZodObject<{
1734
2608
  source: z.ZodString;
@@ -1738,10 +2612,10 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1738
2612
  pod: "pod";
1739
2613
  virtual: "virtual";
1740
2614
  }>;
1741
- manifest: z.ZodNullable<z.ZodObject<{
2615
+ manifest: z.ZodObject<{
1742
2616
  name: z.ZodString;
1743
2617
  version: z.ZodNumber;
1744
- }, z.core.$strict>>;
2618
+ }, z.core.$strict>;
1745
2619
  disk: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"latest">]>>;
1746
2620
  setup: z.ZodBoolean;
1747
2621
  secrets: z.ZodObject<{
@@ -1755,17 +2629,76 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1755
2629
  to: z.ZodOptional<z.ZodUnknown>;
1756
2630
  }, z.core.$strict>>;
1757
2631
  sessions: z.ZodNumber;
2632
+ memories: z.ZodNumber;
1758
2633
  }, z.core.$strict>;
1759
2634
  }, z.core.$strict>, z.ZodObject<{
1760
- environment: z.ZodObject<{
2635
+ agent: z.ZodObject<{
1761
2636
  id: z.ZodString;
2637
+ manifest: z.ZodString;
2638
+ resolvedVersion: z.ZodNumber;
2639
+ manifestHash: z.ZodString;
2640
+ tracking: z.ZodEnum<{
2641
+ pinned: "pinned";
2642
+ tracking: "tracking";
2643
+ }>;
2644
+ targetVersion: z.ZodNullable<z.ZodNumber>;
2645
+ waitingFor: z.ZodNullable<z.ZodEnum<{
2646
+ secrets: "secrets";
2647
+ start: "start";
2648
+ }>>;
2649
+ failedVersion: z.ZodNullable<z.ZodNumber>;
2650
+ startCheck: z.ZodNullable<z.ZodObject<{
2651
+ from: z.ZodNumber;
2652
+ startedAt: z.ZodString;
2653
+ }, z.core.$strict>>;
1762
2654
  kind: z.ZodEnum<{
1763
2655
  none: "none";
1764
2656
  pod: "pod";
1765
2657
  virtual: "virtual";
1766
2658
  }>;
2659
+ harness: z.ZodString;
2660
+ owner: z.ZodNullable<z.ZodString>;
1767
2661
  labels: z.ZodRecord<z.ZodString, z.ZodString>;
1768
- manifest: z.ZodObject<{
2662
+ state: z.ZodString;
2663
+ attention: z.ZodArray<z.ZodObject<{
2664
+ state: z.ZodEnum<{
2665
+ failing: "failing";
2666
+ input_required: "input_required";
2667
+ paused: "paused";
2668
+ sleeping: "sleeping";
2669
+ working: "working";
2670
+ }>;
2671
+ sessionId: z.ZodOptional<z.ZodString>;
2672
+ reason: z.ZodString;
2673
+ }, z.core.$strict>>;
2674
+ desired: z.ZodEnum<{
2675
+ off: "off";
2676
+ on: "on";
2677
+ }>;
2678
+ nextWakeAt: z.ZodNullable<z.ZodString>;
2679
+ compute: z.ZodObject<{
2680
+ state: z.ZodString;
2681
+ pod: z.ZodOptional<z.ZodObject<{
2682
+ desired: z.ZodEnum<{
2683
+ deleted: "deleted";
2684
+ running: "running";
2685
+ suspended: "suspended";
2686
+ }>;
2687
+ observed: z.ZodEnum<{
2688
+ creating: "creating";
2689
+ deleting: "deleting";
2690
+ failed: "failed";
2691
+ lost: "lost";
2692
+ running: "running";
2693
+ suspended: "suspended";
2694
+ }>;
2695
+ volumeGeneration: z.ZodNumber;
2696
+ hostEpoch: z.ZodNumber;
2697
+ reason: z.ZodOptional<z.ZodString>;
2698
+ imageDigest: z.ZodOptional<z.ZodString>;
2699
+ }, z.core.$strict>>;
2700
+ }, z.core.$strict>;
2701
+ runtime: z.ZodObject<{
1769
2702
  image: z.ZodOptional<z.ZodString>;
1770
2703
  resources: z.ZodOptional<z.ZodObject<{
1771
2704
  cpus: z.ZodNumber;
@@ -1839,9 +2772,6 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1839
2772
  url: z.ZodString;
1840
2773
  }, z.core.$strict>], "type">>>>;
1841
2774
  }, z.core.$strict>;
1842
- manifestName: z.ZodOptional<z.ZodString>;
1843
- manifestVersion: z.ZodOptional<z.ZodNumber>;
1844
- manifestHash: z.ZodOptional<z.ZodString>;
1845
2775
  limits: z.ZodObject<{
1846
2776
  artifacts: z.ZodObject<{
1847
2777
  fileBytes: z.ZodNumber;
@@ -1855,43 +2785,21 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1855
2785
  versionEntries: z.ZodNumber;
1856
2786
  }, z.core.$strict>;
1857
2787
  }, z.core.$strict>;
1858
- forkedFrom: z.ZodOptional<z.ZodObject<{
1859
- environment: z.ZodString;
1860
- disk: z.ZodNullable<z.ZodNumber>;
2788
+ sessions: z.ZodArray<z.ZodObject<{
2789
+ id: z.ZodString;
2790
+ ownerUserId: z.ZodString;
2791
+ status: z.ZodString;
2792
+ activeTurnId: z.ZodNullable<z.ZodString>;
1861
2793
  }, z.core.$strict>>;
1862
- slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
2794
+ slots: z.ZodArray<z.ZodObject<{
1863
2795
  name: z.ZodString;
1864
2796
  type: z.ZodString;
1865
2797
  required: z.ZodBoolean;
1866
2798
  set: z.ZodBoolean;
1867
- }, z.core.$strict>>>;
1868
- version: z.ZodNumber;
1869
- appliedVersion: z.ZodNumber;
1870
- ownerUserId: z.ZodNullable<z.ZodString>;
1871
- state: z.ZodString;
1872
- pod: z.ZodOptional<z.ZodObject<{
1873
- desired: z.ZodEnum<{
1874
- deleted: "deleted";
1875
- running: "running";
1876
- suspended: "suspended";
1877
- }>;
1878
- observed: z.ZodEnum<{
1879
- creating: "creating";
1880
- deleting: "deleting";
1881
- failed: "failed";
1882
- lost: "lost";
1883
- running: "running";
1884
- suspended: "suspended";
1885
- }>;
1886
- volumeGeneration: z.ZodNumber;
1887
- hostEpoch: z.ZodNumber;
1888
- reason: z.ZodOptional<z.ZodString>;
1889
- imageDigest: z.ZodOptional<z.ZodString>;
1890
2799
  }, z.core.$strict>>;
1891
- lastUsedAt: z.ZodString;
1892
2800
  disk: z.ZodOptional<z.ZodObject<{
1893
2801
  latestVersion: z.ZodNullable<z.ZodNumber>;
1894
- operation: z.ZodOptional<z.ZodObject<{
2802
+ operation: z.ZodNullable<z.ZodObject<{
1895
2803
  kind: z.ZodEnum<{
1896
2804
  restore: "restore";
1897
2805
  seed: "seed";
@@ -1901,10 +2809,11 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1901
2809
  startedAt: z.ZodString;
1902
2810
  }, z.core.$strict>>;
1903
2811
  }, z.core.$strict>>;
1904
- sessions: z.ZodArray<z.ZodObject<{
1905
- id: z.ZodString;
1906
- activeTurnId: z.ZodNullable<z.ZodString>;
2812
+ forkedFrom: z.ZodNullable<z.ZodObject<{
2813
+ agent: z.ZodString;
2814
+ disk: z.ZodNullable<z.ZodNumber>;
1907
2815
  }, z.core.$strict>>;
2816
+ lastUsedAt: z.ZodString;
1908
2817
  createdAt: z.ZodString;
1909
2818
  updatedAt: z.ZodString;
1910
2819
  }, z.core.$strict>;
@@ -1916,10 +2825,10 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1916
2825
  pod: "pod";
1917
2826
  virtual: "virtual";
1918
2827
  }>;
1919
- manifest: z.ZodNullable<z.ZodObject<{
2828
+ manifest: z.ZodObject<{
1920
2829
  name: z.ZodString;
1921
2830
  version: z.ZodNumber;
1922
- }, z.core.$strict>>;
2831
+ }, z.core.$strict>;
1923
2832
  disk: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"latest">]>>;
1924
2833
  setup: z.ZodBoolean;
1925
2834
  secrets: z.ZodObject<{
@@ -1933,9 +2842,112 @@ export declare const ForkEnvironmentResponseSchema: z.ZodUnion<readonly [z.ZodOb
1933
2842
  to: z.ZodOptional<z.ZodUnknown>;
1934
2843
  }, z.core.$strict>>;
1935
2844
  sessions: z.ZodNumber;
2845
+ memories: z.ZodNumber;
1936
2846
  }, z.core.$strict>;
1937
2847
  }, z.core.$strict>]>;
1938
- export type ForkEnvironmentResponse = z.infer<typeof ForkEnvironmentResponseSchema>;
2848
+ export type ForkAgentResponse = z.infer<typeof ForkAgentResponseSchema>;
2849
+ /**
2850
+ * `PUT /v1/agents/{id}?dryRun=true` on an existing Agent (track T3): what moving it to the
2851
+ * version `manifest` names would do, with nothing changed. `applies`: `none` (it runs that
2852
+ * version), `now` (turns that start from here run it), `next_start` (a runtime change: its pod's
2853
+ * next start applies it), `secrets` (it waits for a value of each of `missingSecrets`), or
2854
+ * `refused` (`refusals` names each fixed field it would change: `409 agent_fixed_field`).
2855
+ */
2856
+ export declare const AgentMovePlanSchema: z.ZodObject<{
2857
+ agent: z.ZodString;
2858
+ manifest: z.ZodString;
2859
+ from: z.ZodNumber;
2860
+ to: z.ZodNumber;
2861
+ tracking: z.ZodEnum<{
2862
+ pinned: "pinned";
2863
+ tracking: "tracking";
2864
+ }>;
2865
+ applies: z.ZodEnum<{
2866
+ next_start: "next_start";
2867
+ none: "none";
2868
+ now: "now";
2869
+ refused: "refused";
2870
+ secrets: "secrets";
2871
+ }>;
2872
+ changes: z.ZodArray<z.ZodObject<{
2873
+ section: z.ZodEnum<{
2874
+ harness: "harness";
2875
+ manifest: "manifest";
2876
+ runtime: "runtime";
2877
+ }>;
2878
+ path: z.ZodString;
2879
+ op: z.ZodEnum<{
2880
+ add: "add";
2881
+ remove: "remove";
2882
+ replace: "replace";
2883
+ }>;
2884
+ from: z.ZodOptional<z.ZodUnknown>;
2885
+ to: z.ZodOptional<z.ZodUnknown>;
2886
+ }, z.core.$strict>>;
2887
+ missingSecrets: z.ZodArray<z.ZodString>;
2888
+ dormantSecrets: z.ZodArray<z.ZodString>;
2889
+ refusals: z.ZodArray<z.ZodObject<{
2890
+ field: z.ZodString;
2891
+ from: z.ZodOptional<z.ZodUnknown>;
2892
+ to: z.ZodOptional<z.ZodUnknown>;
2893
+ }, z.core.$strict>>;
2894
+ sessions: z.ZodNumber;
2895
+ }, z.core.$strict>;
2896
+ export type AgentMovePlan = z.infer<typeof AgentMovePlanSchema>;
2897
+ /**
2898
+ * `POST /v1/agents/{id}/restart` (track T3): applies a pending version now. A running pod stops,
2899
+ * so the next turn starts it on the version (a stopped one starts at once); `retry` first moves
2900
+ * it to the version that failed to start (`failedVersion`) again.
2901
+ */
2902
+ export declare const RestartAgentRequestSchema: z.ZodObject<{
2903
+ requestId: z.ZodOptional<z.ZodString>;
2904
+ retry: z.ZodOptional<z.ZodBoolean>;
2905
+ }, z.core.$strict>;
2906
+ export type RestartAgentRequest = z.infer<typeof RestartAgentRequestSchema>;
2907
+ export declare const PutAgentDryRunResponseSchema: z.ZodObject<{
2908
+ dryRun: z.ZodLiteral<true>;
2909
+ plan: z.ZodObject<{
2910
+ agent: z.ZodString;
2911
+ manifest: z.ZodString;
2912
+ from: z.ZodNumber;
2913
+ to: z.ZodNumber;
2914
+ tracking: z.ZodEnum<{
2915
+ pinned: "pinned";
2916
+ tracking: "tracking";
2917
+ }>;
2918
+ applies: z.ZodEnum<{
2919
+ next_start: "next_start";
2920
+ none: "none";
2921
+ now: "now";
2922
+ refused: "refused";
2923
+ secrets: "secrets";
2924
+ }>;
2925
+ changes: z.ZodArray<z.ZodObject<{
2926
+ section: z.ZodEnum<{
2927
+ harness: "harness";
2928
+ manifest: "manifest";
2929
+ runtime: "runtime";
2930
+ }>;
2931
+ path: z.ZodString;
2932
+ op: z.ZodEnum<{
2933
+ add: "add";
2934
+ remove: "remove";
2935
+ replace: "replace";
2936
+ }>;
2937
+ from: z.ZodOptional<z.ZodUnknown>;
2938
+ to: z.ZodOptional<z.ZodUnknown>;
2939
+ }, z.core.$strict>>;
2940
+ missingSecrets: z.ZodArray<z.ZodString>;
2941
+ dormantSecrets: z.ZodArray<z.ZodString>;
2942
+ refusals: z.ZodArray<z.ZodObject<{
2943
+ field: z.ZodString;
2944
+ from: z.ZodOptional<z.ZodUnknown>;
2945
+ to: z.ZodOptional<z.ZodUnknown>;
2946
+ }, z.core.$strict>>;
2947
+ sessions: z.ZodNumber;
2948
+ }, z.core.$strict>;
2949
+ }, z.core.$strict>;
2950
+ export type PutAgentDryRunResponse = z.infer<typeof PutAgentDryRunResponseSchema>;
1939
2951
  /**
1940
2952
  * What a model may read (protocol 12): `text` always; `image`, `pdf`, `office` (Word, Excel,
1941
2953
  * PowerPoint), `audio` and `video` when its catalog entry or the operator says so. In this order.
@@ -2036,7 +3048,7 @@ export declare const ENVIRONMENT_SECRET_TYPES: readonly ["bearer", "headers", "e
2036
3048
  * One credential of an Environment's vault, never its value: what it is bound to (the server
2037
3049
  * `url` for `bearer` and `headers`; the hosts and header for `environment_secret`).
2038
3050
  */
2039
- export declare const EnvironmentSecretViewSchema: z.ZodObject<{
3051
+ export declare const AgentSecretViewSchema: z.ZodObject<{
2040
3052
  name: z.ZodString;
2041
3053
  type: z.ZodEnum<{
2042
3054
  bearer: "bearer";
@@ -2060,8 +3072,8 @@ export declare const EnvironmentSecretViewSchema: z.ZodObject<{
2060
3072
  createdAt: z.ZodString;
2061
3073
  rotatedAt: z.ZodOptional<z.ZodString>;
2062
3074
  }, z.core.$strict>;
2063
- export type EnvironmentSecretView = z.infer<typeof EnvironmentSecretViewSchema>;
2064
- export declare const ListEnvironmentSecretsResponseSchema: z.ZodObject<{
3075
+ export type AgentSecretView = z.infer<typeof AgentSecretViewSchema>;
3076
+ export declare const ListAgentSecretsResponseSchema: z.ZodObject<{
2065
3077
  secrets: z.ZodArray<z.ZodObject<{
2066
3078
  name: z.ZodString;
2067
3079
  type: z.ZodEnum<{
@@ -2087,12 +3099,12 @@ export declare const ListEnvironmentSecretsResponseSchema: z.ZodObject<{
2087
3099
  rotatedAt: z.ZodOptional<z.ZodString>;
2088
3100
  }, z.core.$strict>>;
2089
3101
  }, z.core.$strict>;
2090
- export type ListEnvironmentSecretsResponse = z.infer<typeof ListEnvironmentSecretsResponseSchema>;
3102
+ export type ListAgentSecretsResponse = z.infer<typeof ListAgentSecretsResponseSchema>;
2091
3103
  /** The MCP transports a preview speaks: a manifest's remote server types. */
2092
3104
  export declare const MCP_PREVIEW_TYPES: readonly ["streamable-http", "sse"];
2093
3105
  /**
2094
3106
  * `POST /v1/tenant/mcp/preview` (R2b C12): what a remote MCP server offers, before an agent
2095
- * names it. The Runtime connects with the credential for `url` in the vault of `environmentId`
3107
+ * names it. The Runtime connects with the credential for `url` in the vault of Agent `agentId`
2096
3108
  * (none without one), lists the tools and closes the connection; it never calls a tool.
2097
3109
  */
2098
3110
  export declare const McpPreviewRequestSchema: z.ZodObject<{
@@ -2103,7 +3115,7 @@ export declare const McpPreviewRequestSchema: z.ZodObject<{
2103
3115
  "streamable-http": "streamable-http";
2104
3116
  }>>;
2105
3117
  name: z.ZodOptional<z.ZodString>;
2106
- environmentId: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
3118
+ agentId: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
2107
3119
  }, z.core.$strict>;
2108
3120
  export type McpPreviewRequest = z.infer<typeof McpPreviewRequestSchema>;
2109
3121
  /** One tool a preview found. */
@@ -2148,19 +3160,19 @@ export declare const McpPreviewSchema: z.ZodObject<{
2148
3160
  }, z.core.$strict>;
2149
3161
  export type McpPreview = z.infer<typeof McpPreviewSchema>;
2150
3162
  /**
2151
- * `POST /v1/tenant/credential-coverage`: which credential each of a saved agent's remote MCP
2152
- * servers and HTTP tools would get in a session that names `environmentId`, decided as the
2153
- * session's tool calls decide it (by URL). It reads no secret and calls no server.
3163
+ * `POST /v1/tenant/credential-coverage`: which credential each of an Agent's remote MCP servers
3164
+ * and HTTP tools (those of the manifest version it runs) would get in its sessions, decided as the
3165
+ * session's tool calls decide it (by URL) from the Agent's vault. It reads no secret and calls no
3166
+ * server.
2154
3167
  */
2155
3168
  export declare const CredentialCoverageRequestSchema: z.ZodObject<{
2156
3169
  requestId: z.ZodOptional<z.ZodString>;
2157
- agentId: z.ZodString;
2158
- environmentId: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
3170
+ agentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
2159
3171
  }, z.core.$strict>;
2160
3172
  export type CredentialCoverageRequest = z.infer<typeof CredentialCoverageRequestSchema>;
2161
3173
  /** A credential coverage names: where it is, never its value. */
2162
3174
  export declare const CoverageCredentialSchema: z.ZodObject<{
2163
- environmentId: z.ZodString;
3175
+ agentId: z.ZodString;
2164
3176
  name: z.ZodString;
2165
3177
  via: z.ZodOptional<z.ZodString>;
2166
3178
  }, z.core.$strict>;
@@ -2190,7 +3202,7 @@ export declare const CredentialCoverageEntrySchema: z.ZodObject<{
2190
3202
  missing: "missing";
2191
3203
  }>;
2192
3204
  credential: z.ZodOptional<z.ZodObject<{
2193
- environmentId: z.ZodString;
3205
+ agentId: z.ZodString;
2194
3206
  name: z.ZodString;
2195
3207
  via: z.ZodOptional<z.ZodString>;
2196
3208
  }, z.core.$strict>>;
@@ -2199,7 +3211,6 @@ export declare const CredentialCoverageEntrySchema: z.ZodObject<{
2199
3211
  export type CredentialCoverageEntry = z.infer<typeof CredentialCoverageEntrySchema>;
2200
3212
  export declare const CredentialCoverageSchema: z.ZodObject<{
2201
3213
  agentId: z.ZodString;
2202
- environmentId: z.ZodNullable<z.ZodString>;
2203
3214
  complete: z.ZodBoolean;
2204
3215
  entries: z.ZodArray<z.ZodObject<{
2205
3216
  kind: z.ZodEnum<{
@@ -2217,7 +3228,7 @@ export declare const CredentialCoverageSchema: z.ZodObject<{
2217
3228
  missing: "missing";
2218
3229
  }>;
2219
3230
  credential: z.ZodOptional<z.ZodObject<{
2220
- environmentId: z.ZodString;
3231
+ agentId: z.ZodString;
2221
3232
  name: z.ZodString;
2222
3233
  via: z.ZodOptional<z.ZodString>;
2223
3234
  }, z.core.$strict>>;
@@ -2225,6 +3236,16 @@ export declare const CredentialCoverageSchema: z.ZodObject<{
2225
3236
  }, z.core.$strict>>;
2226
3237
  }, z.core.$strict>;
2227
3238
  export type CredentialCoverage = z.infer<typeof CredentialCoverageSchema>;
3239
+ /**
3240
+ * What a message to a busy session does (protocol 17, D76): `queue` waits for the running turn to
3241
+ * end and starts the next one; `reject` is refused with `409 session_busy`. A protocol 17 client's
3242
+ * default is `queue`, a protocol 16 client's `reject`.
3243
+ */
3244
+ export declare const MessageDeliverySchema: z.ZodEnum<{
3245
+ queue: "queue";
3246
+ reject: "reject";
3247
+ }>;
3248
+ export type MessageDelivery = z.infer<typeof MessageDeliverySchema>;
2228
3249
  /**
2229
3250
  * One part of a user message (protocol 6): text, or a file by artifact id. A file part without
2230
3251
  * `version` means the artifact's latest version when the message is accepted; the Runtime pins
@@ -2248,18 +3269,30 @@ export declare const MessageEventBodySchema: z.ZodUnion<readonly [z.ZodObject<{
2248
3269
  idempotencyKey: z.ZodString;
2249
3270
  type: z.ZodLiteral<"message">;
2250
3271
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3272
+ delivery: z.ZodOptional<z.ZodEnum<{
3273
+ queue: "queue";
3274
+ reject: "reject";
3275
+ }>>;
2251
3276
  content: z.ZodString;
2252
3277
  }, z.core.$strict>, z.ZodObject<{
2253
3278
  requestId: z.ZodString;
2254
3279
  idempotencyKey: z.ZodString;
2255
3280
  type: z.ZodLiteral<"message">;
2256
3281
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3282
+ delivery: z.ZodOptional<z.ZodEnum<{
3283
+ queue: "queue";
3284
+ reject: "reject";
3285
+ }>>;
2257
3286
  data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
2258
3287
  }, z.core.$strict>, z.ZodObject<{
2259
3288
  requestId: z.ZodString;
2260
3289
  idempotencyKey: z.ZodString;
2261
3290
  type: z.ZodLiteral<"message">;
2262
3291
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3292
+ delivery: z.ZodOptional<z.ZodEnum<{
3293
+ queue: "queue";
3294
+ reject: "reject";
3295
+ }>>;
2263
3296
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2264
3297
  type: z.ZodLiteral<"text">;
2265
3298
  text: z.ZodString;
@@ -2280,18 +3313,30 @@ export declare const SessionCommandSchema: z.ZodUnion<readonly [z.ZodUnion<reado
2280
3313
  idempotencyKey: z.ZodString;
2281
3314
  type: z.ZodLiteral<"message">;
2282
3315
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3316
+ delivery: z.ZodOptional<z.ZodEnum<{
3317
+ queue: "queue";
3318
+ reject: "reject";
3319
+ }>>;
2283
3320
  content: z.ZodString;
2284
3321
  }, z.core.$strict>, z.ZodObject<{
2285
3322
  requestId: z.ZodString;
2286
3323
  idempotencyKey: z.ZodString;
2287
3324
  type: z.ZodLiteral<"message">;
2288
3325
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3326
+ delivery: z.ZodOptional<z.ZodEnum<{
3327
+ queue: "queue";
3328
+ reject: "reject";
3329
+ }>>;
2289
3330
  data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
2290
3331
  }, z.core.$strict>, z.ZodObject<{
2291
3332
  requestId: z.ZodString;
2292
3333
  idempotencyKey: z.ZodString;
2293
3334
  type: z.ZodLiteral<"message">;
2294
3335
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3336
+ delivery: z.ZodOptional<z.ZodEnum<{
3337
+ queue: "queue";
3338
+ reject: "reject";
3339
+ }>>;
2295
3340
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2296
3341
  type: z.ZodLiteral<"text">;
2297
3342
  text: z.ZodString;
@@ -2323,18 +3368,30 @@ export declare const SessionEventBodySchema: z.ZodUnion<readonly [z.ZodUnion<rea
2323
3368
  idempotencyKey: z.ZodString;
2324
3369
  type: z.ZodLiteral<"message">;
2325
3370
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3371
+ delivery: z.ZodOptional<z.ZodEnum<{
3372
+ queue: "queue";
3373
+ reject: "reject";
3374
+ }>>;
2326
3375
  content: z.ZodString;
2327
3376
  }, z.core.$strict>, z.ZodObject<{
2328
3377
  requestId: z.ZodString;
2329
3378
  idempotencyKey: z.ZodString;
2330
3379
  type: z.ZodLiteral<"message">;
2331
3380
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3381
+ delivery: z.ZodOptional<z.ZodEnum<{
3382
+ queue: "queue";
3383
+ reject: "reject";
3384
+ }>>;
2332
3385
  data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
2333
3386
  }, z.core.$strict>, z.ZodObject<{
2334
3387
  requestId: z.ZodString;
2335
3388
  idempotencyKey: z.ZodString;
2336
3389
  type: z.ZodLiteral<"message">;
2337
3390
  manifest: z.ZodOptional<z.ZodType<AgentManifest, unknown, z.core.$ZodTypeInternals<AgentManifest, unknown>>>;
3391
+ delivery: z.ZodOptional<z.ZodEnum<{
3392
+ queue: "queue";
3393
+ reject: "reject";
3394
+ }>>;
2338
3395
  parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2339
3396
  type: z.ZodLiteral<"text">;
2340
3397
  text: z.ZodString;
@@ -2413,6 +3470,7 @@ export declare const EventPrincipalSchema: z.ZodObject<{
2413
3470
  core: "core";
2414
3471
  "flow-host": "flow-host";
2415
3472
  subject: "subject";
3473
+ trigger: "trigger";
2416
3474
  }>;
2417
3475
  id: z.ZodString;
2418
3476
  }, z.core.$strict>;
@@ -2490,6 +3548,7 @@ declare const eventEnvelope: {
2490
3548
  core: "core";
2491
3549
  "flow-host": "flow-host";
2492
3550
  subject: "subject";
3551
+ trigger: "trigger";
2493
3552
  }>;
2494
3553
  id: z.ZodString;
2495
3554
  }, z.core.$strict>>;
@@ -2559,6 +3618,7 @@ export declare const LiveEventSchema: z.ZodObject<{
2559
3618
  core: "core";
2560
3619
  "flow-host": "flow-host";
2561
3620
  subject: "subject";
3621
+ trigger: "trigger";
2562
3622
  }>;
2563
3623
  id: z.ZodString;
2564
3624
  }, z.core.$strict>>;
@@ -2588,22 +3648,47 @@ export declare const AcceptedResponseSchema: z.ZodObject<{
2588
3648
  requestId: z.ZodString;
2589
3649
  }, z.core.$strip>;
2590
3650
  export type AcceptedResponse = z.infer<typeof AcceptedResponseSchema>;
3651
+ /**
3652
+ * A message the session queued because a turn runs or waits (protocol 17): it starts the next
3653
+ * turn when this one ends. `position` counts from 1, the first to go.
3654
+ */
3655
+ export declare const QueuedResponseSchema: z.ZodObject<{
3656
+ status: z.ZodLiteral<"queued">;
3657
+ queuedMessageId: z.ZodString;
3658
+ position: z.ZodNumber;
3659
+ cursor: z.ZodNullable<z.ZodString>;
3660
+ requestId: z.ZodString;
3661
+ }, z.core.$strip>;
3662
+ export type QueuedResponse = z.infer<typeof QueuedResponseSchema>;
3663
+ /** What a session command answers: accepted, or, for a message, queued. */
3664
+ export declare const CommandResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3665
+ status: z.ZodLiteral<"accepted">;
3666
+ turnId: z.ZodNullable<z.ZodString>;
3667
+ cursor: z.ZodNullable<z.ZodString>;
3668
+ requestId: z.ZodString;
3669
+ }, z.core.$strip>, z.ZodObject<{
3670
+ status: z.ZodLiteral<"queued">;
3671
+ queuedMessageId: z.ZodString;
3672
+ position: z.ZodNumber;
3673
+ cursor: z.ZodNullable<z.ZodString>;
3674
+ requestId: z.ZodString;
3675
+ }, z.core.$strip>]>;
3676
+ export type CommandResponse = z.infer<typeof CommandResponseSchema>;
2591
3677
  export declare const RejectedResponseSchema: z.ZodObject<{
2592
3678
  status: z.ZodLiteral<"rejected">;
2593
3679
  code: z.ZodEnum<{
3680
+ agent_busy: "agent_busy";
3681
+ agent_fixed_field: "agent_fixed_field";
3682
+ agent_lost: "agent_lost";
3683
+ agent_not_granted: "agent_not_granted";
3684
+ agent_owner_mismatch: "agent_owner_mismatch";
3685
+ agent_unavailable: "agent_unavailable";
2594
3686
  connection_missing: "connection_missing";
2595
3687
  credential_conflict: "credential_conflict";
2596
3688
  credential_invalid: "credential_invalid";
2597
3689
  credential_rejected: "credential_rejected";
2598
3690
  credential_required: "credential_required";
2599
3691
  definition_files_missing: "definition_files_missing";
2600
- environment_busy: "environment_busy";
2601
- environment_immutable: "environment_immutable";
2602
- environment_lost: "environment_lost";
2603
- environment_not_granted: "environment_not_granted";
2604
- environment_owner_mismatch: "environment_owner_mismatch";
2605
- environment_unavailable: "environment_unavailable";
2606
- environment_unsuitable: "environment_unsuitable";
2607
3692
  harness_mismatch: "harness_mismatch";
2608
3693
  host_rejected: "host_rejected";
2609
3694
  incompatible_host: "incompatible_host";
@@ -2614,19 +3699,25 @@ export declare const RejectedResponseSchema: z.ZodObject<{
2614
3699
  limit_exceeded: "limit_exceeded";
2615
3700
  manifest_changed: "manifest_changed";
2616
3701
  manifest_in_use: "manifest_in_use";
3702
+ manifest_inconsistent: "manifest_inconsistent";
2617
3703
  manifest_not_found: "manifest_not_found";
2618
3704
  mcp_preview_failed: "mcp_preview_failed";
3705
+ memory_conflict: "memory_conflict";
2619
3706
  not_found: "not_found";
2620
3707
  origin_rejected: "origin_rejected";
2621
3708
  placement_refused: "placement_refused";
2622
3709
  protocol_unsupported: "protocol_unsupported";
3710
+ queue_full: "queue_full";
2623
3711
  request_rejected: "request_rejected";
2624
3712
  scope_required: "scope_required";
2625
3713
  secret_not_in_manifest: "secret_not_in_manifest";
3714
+ session_busy: "session_busy";
2626
3715
  session_closed: "session_closed";
2627
3716
  subject_invalid: "subject_invalid";
2628
3717
  subject_required: "subject_required";
2629
3718
  token_expired: "token_expired";
3719
+ trigger_expired: "trigger_expired";
3720
+ trigger_paused: "trigger_paused";
2630
3721
  unsupported_media_type: "unsupported_media_type";
2631
3722
  }>;
2632
3723
  message: z.ZodString;
@@ -2774,10 +3865,11 @@ export declare const ContextCompactedPayloadSchema: z.ZodObject<{
2774
3865
  export declare const TOOL_CALL_STATUSES: readonly ["completed", "failed", "cancelled"];
2775
3866
  /**
2776
3867
  * Where a tool call ran (R5.1), its effect's target kind (protocol 15): an MCP server, an HTTP
2777
- * tool's URL, the session's sandbox, or the harness that runs the turn (`harness`: a tool it runs
2778
- * in its own process, such as our engine's skill, artifact and `tool_search` tools).
3868
+ * tool's URL, the session's sandbox, the harness that runs the turn (`harness`: a tool it runs
3869
+ * in its own process, such as our engine's skill, artifact and `tool_search` tools), or the
3870
+ * Runtime itself (`runtime`: `schedule_wake`, track T4).
2779
3871
  */
2780
- export declare const TOOL_CALL_KINDS: readonly ["mcp", "http", "sandbox", "harness"];
3872
+ export declare const TOOL_CALL_KINDS: readonly ["mcp", "http", "sandbox", "harness", "runtime"];
2781
3873
  /**
2782
3874
  * What the Tenant's tool policy did with a tool call (R5 step 2), when it did more than allow
2783
3875
  * it: `deny` refused it unsent; `ask` held it for a person, who approved it (`approvedBy`, when
@@ -2818,6 +3910,7 @@ export declare const ToolCompletedPayloadSchema: z.ZodObject<{
2818
3910
  harness: "harness";
2819
3911
  http: "http";
2820
3912
  mcp: "mcp";
3913
+ runtime: "runtime";
2821
3914
  sandbox: "sandbox";
2822
3915
  }>>;
2823
3916
  server: z.ZodOptional<z.ZodString>;
@@ -2858,6 +3951,10 @@ export declare const TurnCompletedPayloadSchema: z.ZodObject<{
2858
3951
  durationMs: z.ZodOptional<z.ZodNumber>;
2859
3952
  pausedMs: z.ZodOptional<z.ZodNumber>;
2860
3953
  agentId: z.ZodOptional<z.ZodString>;
3954
+ manifest: z.ZodOptional<z.ZodObject<{
3955
+ name: z.ZodString;
3956
+ version: z.ZodNumber;
3957
+ }, z.core.$loose>>;
2861
3958
  totals: z.ZodOptional<z.ZodObject<{
2862
3959
  steps: z.ZodNumber;
2863
3960
  tokens: z.ZodNumber;
@@ -2881,6 +3978,10 @@ export declare const TurnFailedPayloadSchema: z.ZodObject<{
2881
3978
  durationMs: z.ZodOptional<z.ZodNumber>;
2882
3979
  pausedMs: z.ZodOptional<z.ZodNumber>;
2883
3980
  agentId: z.ZodOptional<z.ZodString>;
3981
+ manifest: z.ZodOptional<z.ZodObject<{
3982
+ name: z.ZodString;
3983
+ version: z.ZodNumber;
3984
+ }, z.core.$loose>>;
2884
3985
  totals: z.ZodOptional<z.ZodObject<{
2885
3986
  steps: z.ZodNumber;
2886
3987
  tokens: z.ZodNumber;
@@ -2896,6 +3997,10 @@ export declare const TurnCancelledPayloadSchema: z.ZodObject<{
2896
3997
  durationMs: z.ZodOptional<z.ZodNumber>;
2897
3998
  pausedMs: z.ZodOptional<z.ZodNumber>;
2898
3999
  agentId: z.ZodOptional<z.ZodString>;
4000
+ manifest: z.ZodOptional<z.ZodObject<{
4001
+ name: z.ZodString;
4002
+ version: z.ZodNumber;
4003
+ }, z.core.$loose>>;
2899
4004
  totals: z.ZodOptional<z.ZodObject<{
2900
4005
  steps: z.ZodNumber;
2901
4006
  tokens: z.ZodNumber;
@@ -2903,6 +4008,34 @@ export declare const TurnCancelledPayloadSchema: z.ZodObject<{
2903
4008
  }, z.core.$loose>>;
2904
4009
  reason: z.ZodOptional<z.ZodString>;
2905
4010
  }, z.core.$loose>;
4011
+ /**
4012
+ * `message.queued` (protocol 17): a message arrived while the session's turn ran or waited, and
4013
+ * waits in its queue. `position` counts from 1; the message's `command.message` is written when
4014
+ * a turn takes it.
4015
+ */
4016
+ export declare const MessageQueuedPayloadSchema: z.ZodObject<{
4017
+ queuedMessageId: z.ZodString;
4018
+ position: z.ZodNumber;
4019
+ requestId: z.ZodString;
4020
+ }, z.core.$loose>;
4021
+ /**
4022
+ * `wake.booked` (track T4, D77): the session's agent booked its next turn with `schedule_wake`,
4023
+ * at `at`, replacing any booking before. `wake.cancelled`: it cancelled its booking.
4024
+ */
4025
+ export declare const WakeBookedPayloadSchema: z.ZodObject<{
4026
+ at: z.ZodString;
4027
+ note: z.ZodString;
4028
+ effectId: z.ZodString;
4029
+ replaced: z.ZodBoolean;
4030
+ }, z.core.$loose>;
4031
+ export declare const WakeCancelledPayloadSchema: z.ZodObject<{
4032
+ effectId: z.ZodString;
4033
+ }, z.core.$loose>;
4034
+ /** `queue.taken` (protocol 17): the turn that started with the queued messages, in order. */
4035
+ export declare const QueueTakenPayloadSchema: z.ZodObject<{
4036
+ turnId: z.ZodString;
4037
+ queuedMessageIds: z.ZodArray<z.ZodString>;
4038
+ }, z.core.$loose>;
2906
4039
  /** Lifecycle of an agent used as a tool. `agent.delegationId` is the parent call's invocation. */
2907
4040
  export declare const DelegationPayloadSchema: z.ZodObject<{
2908
4041
  agent: z.ZodObject<{
@@ -3019,6 +4152,7 @@ declare const TRANSCRIPT_PAYLOADS: {
3019
4152
  harness: "harness";
3020
4153
  http: "http";
3021
4154
  mcp: "mcp";
4155
+ runtime: "runtime";
3022
4156
  sandbox: "sandbox";
3023
4157
  }>>;
3024
4158
  server: z.ZodOptional<z.ZodString>;
@@ -3059,6 +4193,10 @@ declare const TRANSCRIPT_PAYLOADS: {
3059
4193
  durationMs: z.ZodOptional<z.ZodNumber>;
3060
4194
  pausedMs: z.ZodOptional<z.ZodNumber>;
3061
4195
  agentId: z.ZodOptional<z.ZodString>;
4196
+ manifest: z.ZodOptional<z.ZodObject<{
4197
+ name: z.ZodString;
4198
+ version: z.ZodNumber;
4199
+ }, z.core.$loose>>;
3062
4200
  totals: z.ZodOptional<z.ZodObject<{
3063
4201
  steps: z.ZodNumber;
3064
4202
  tokens: z.ZodNumber;
@@ -3081,6 +4219,10 @@ declare const TRANSCRIPT_PAYLOADS: {
3081
4219
  durationMs: z.ZodOptional<z.ZodNumber>;
3082
4220
  pausedMs: z.ZodOptional<z.ZodNumber>;
3083
4221
  agentId: z.ZodOptional<z.ZodString>;
4222
+ manifest: z.ZodOptional<z.ZodObject<{
4223
+ name: z.ZodString;
4224
+ version: z.ZodNumber;
4225
+ }, z.core.$loose>>;
3084
4226
  totals: z.ZodOptional<z.ZodObject<{
3085
4227
  steps: z.ZodNumber;
3086
4228
  tokens: z.ZodNumber;
@@ -3096,6 +4238,10 @@ declare const TRANSCRIPT_PAYLOADS: {
3096
4238
  durationMs: z.ZodOptional<z.ZodNumber>;
3097
4239
  pausedMs: z.ZodOptional<z.ZodNumber>;
3098
4240
  agentId: z.ZodOptional<z.ZodString>;
4241
+ manifest: z.ZodOptional<z.ZodObject<{
4242
+ name: z.ZodString;
4243
+ version: z.ZodNumber;
4244
+ }, z.core.$loose>>;
3099
4245
  totals: z.ZodOptional<z.ZodObject<{
3100
4246
  steps: z.ZodNumber;
3101
4247
  tokens: z.ZodNumber;
@@ -3138,6 +4284,19 @@ export declare const CommandMessagePayloadSchema: z.ZodObject<{
3138
4284
  version: z.ZodOptional<z.ZodNumber>;
3139
4285
  }, z.core.$strict>], "type">>>;
3140
4286
  manifest: z.ZodOptional<z.ZodUnknown>;
4287
+ delivery: z.ZodOptional<z.ZodEnum<{
4288
+ queue: "queue";
4289
+ reject: "reject";
4290
+ }>>;
4291
+ queuedMessageId: z.ZodOptional<z.ZodString>;
4292
+ cause: z.ZodOptional<z.ZodObject<{
4293
+ kind: z.ZodEnum<{
4294
+ self: "self";
4295
+ trigger: "trigger";
4296
+ }>;
4297
+ triggerId: z.ZodString;
4298
+ runId: z.ZodString;
4299
+ }, z.core.$strict>>;
3141
4300
  trace: z.ZodOptional<z.ZodObject<{
3142
4301
  traceparent: z.ZodString;
3143
4302
  tracestate: z.ZodOptional<z.ZodString>;
@@ -3176,11 +4335,11 @@ export declare const EnvironmentStatePayloadSchema: z.ZodObject<{
3176
4335
  error: z.ZodOptional<z.ZodString>;
3177
4336
  }, z.core.$loose>;
3178
4337
  /**
3179
- * `environment.attached`: the session was opened on an Environment (`environment`). The
3180
- * Environment's own stream records the same attachment.
4338
+ * `agent.attached`: the session was opened on its Agent (protocol 16; `environment.attached`
4339
+ * before). The Agent's own stream records the same attachment.
3181
4340
  */
3182
- export declare const EnvironmentAttachedPayloadSchema: z.ZodObject<{
3183
- environmentId: z.ZodString;
4341
+ export declare const AgentAttachedPayloadSchema: z.ZodObject<{
4342
+ agentId: z.ZodString;
3184
4343
  }, z.core.$loose>;
3185
4344
  /** `environment.exec`: one sandbox tool call finished. */
3186
4345
  export declare const EnvironmentExecPayloadSchema: z.ZodObject<{
@@ -3420,6 +4579,19 @@ export declare const EVENT_CATALOG: {
3420
4579
  version: z.ZodOptional<z.ZodNumber>;
3421
4580
  }, z.core.$strict>], "type">>>;
3422
4581
  manifest: z.ZodOptional<z.ZodUnknown>;
4582
+ delivery: z.ZodOptional<z.ZodEnum<{
4583
+ queue: "queue";
4584
+ reject: "reject";
4585
+ }>>;
4586
+ queuedMessageId: z.ZodOptional<z.ZodString>;
4587
+ cause: z.ZodOptional<z.ZodObject<{
4588
+ kind: z.ZodEnum<{
4589
+ self: "self";
4590
+ trigger: "trigger";
4591
+ }>;
4592
+ triggerId: z.ZodString;
4593
+ runId: z.ZodString;
4594
+ }, z.core.$strict>>;
3423
4595
  trace: z.ZodOptional<z.ZodObject<{
3424
4596
  traceparent: z.ZodString;
3425
4597
  tracestate: z.ZodOptional<z.ZodString>;
@@ -3455,6 +4627,10 @@ export declare const EVENT_CATALOG: {
3455
4627
  durationMs: z.ZodOptional<z.ZodNumber>;
3456
4628
  pausedMs: z.ZodOptional<z.ZodNumber>;
3457
4629
  agentId: z.ZodOptional<z.ZodString>;
4630
+ manifest: z.ZodOptional<z.ZodObject<{
4631
+ name: z.ZodString;
4632
+ version: z.ZodNumber;
4633
+ }, z.core.$loose>>;
3458
4634
  totals: z.ZodOptional<z.ZodObject<{
3459
4635
  steps: z.ZodNumber;
3460
4636
  tokens: z.ZodNumber;
@@ -3485,6 +4661,10 @@ export declare const EVENT_CATALOG: {
3485
4661
  durationMs: z.ZodOptional<z.ZodNumber>;
3486
4662
  pausedMs: z.ZodOptional<z.ZodNumber>;
3487
4663
  agentId: z.ZodOptional<z.ZodString>;
4664
+ manifest: z.ZodOptional<z.ZodObject<{
4665
+ name: z.ZodString;
4666
+ version: z.ZodNumber;
4667
+ }, z.core.$loose>>;
3488
4668
  totals: z.ZodOptional<z.ZodObject<{
3489
4669
  steps: z.ZodNumber;
3490
4670
  tokens: z.ZodNumber;
@@ -3496,20 +4676,76 @@ export declare const EVENT_CATALOG: {
3496
4676
  }, z.core.$loose>>;
3497
4677
  message: z.ZodOptional<z.ZodString>;
3498
4678
  }, z.core.$loose>;
3499
- readonly source: "loop";
4679
+ readonly source: "loop";
4680
+ readonly version: 1;
4681
+ };
4682
+ readonly "turn.cancelled": {
4683
+ readonly payload: z.ZodObject<{
4684
+ durationMs: z.ZodOptional<z.ZodNumber>;
4685
+ pausedMs: z.ZodOptional<z.ZodNumber>;
4686
+ agentId: z.ZodOptional<z.ZodString>;
4687
+ manifest: z.ZodOptional<z.ZodObject<{
4688
+ name: z.ZodString;
4689
+ version: z.ZodNumber;
4690
+ }, z.core.$loose>>;
4691
+ totals: z.ZodOptional<z.ZodObject<{
4692
+ steps: z.ZodNumber;
4693
+ tokens: z.ZodNumber;
4694
+ costUsd: z.ZodNumber;
4695
+ }, z.core.$loose>>;
4696
+ reason: z.ZodOptional<z.ZodString>;
4697
+ }, z.core.$loose>;
4698
+ readonly source: "api";
4699
+ readonly version: 1;
4700
+ };
4701
+ readonly "message.queued": {
4702
+ readonly payload: z.ZodObject<{
4703
+ queuedMessageId: z.ZodString;
4704
+ position: z.ZodNumber;
4705
+ requestId: z.ZodString;
4706
+ }, z.core.$loose>;
4707
+ readonly source: "api";
4708
+ readonly version: 1;
4709
+ };
4710
+ readonly "queue.taken": {
4711
+ readonly payload: z.ZodObject<{
4712
+ turnId: z.ZodString;
4713
+ queuedMessageIds: z.ZodArray<z.ZodString>;
4714
+ }, z.core.$loose>;
4715
+ readonly source: "api";
4716
+ readonly version: 1;
4717
+ };
4718
+ readonly "wake.booked": {
4719
+ readonly payload: z.ZodObject<{
4720
+ at: z.ZodString;
4721
+ note: z.ZodString;
4722
+ effectId: z.ZodString;
4723
+ replaced: z.ZodBoolean;
4724
+ }, z.core.$loose>;
4725
+ readonly source: "api";
3500
4726
  readonly version: 1;
3501
4727
  };
3502
- readonly "turn.cancelled": {
4728
+ readonly "wake.cancelled": {
3503
4729
  readonly payload: z.ZodObject<{
3504
- durationMs: z.ZodOptional<z.ZodNumber>;
3505
- pausedMs: z.ZodOptional<z.ZodNumber>;
3506
- agentId: z.ZodOptional<z.ZodString>;
3507
- totals: z.ZodOptional<z.ZodObject<{
3508
- steps: z.ZodNumber;
3509
- tokens: z.ZodNumber;
3510
- costUsd: z.ZodNumber;
3511
- }, z.core.$loose>>;
3512
- reason: z.ZodOptional<z.ZodString>;
4730
+ effectId: z.ZodString;
4731
+ }, z.core.$loose>;
4732
+ readonly source: "api";
4733
+ readonly version: 1;
4734
+ };
4735
+ readonly "memory.updated": {
4736
+ readonly payload: z.ZodObject<{
4737
+ effectId: z.ZodString;
4738
+ changes: z.ZodArray<z.ZodObject<{
4739
+ path: z.ZodString;
4740
+ operation: z.ZodEnum<{
4741
+ create: "create";
4742
+ delete: "delete";
4743
+ insert: "insert";
4744
+ rename: "rename";
4745
+ str_replace: "str_replace";
4746
+ }>;
4747
+ version: z.ZodNumber;
4748
+ }, z.core.$strict>>;
3513
4749
  }, z.core.$loose>;
3514
4750
  readonly source: "api";
3515
4751
  readonly version: 1;
@@ -3633,6 +4869,7 @@ export declare const EVENT_CATALOG: {
3633
4869
  harness: "harness";
3634
4870
  http: "http";
3635
4871
  mcp: "mcp";
4872
+ runtime: "runtime";
3636
4873
  sandbox: "sandbox";
3637
4874
  }>>;
3638
4875
  server: z.ZodOptional<z.ZodString>;
@@ -3754,9 +4991,9 @@ export declare const EVENT_CATALOG: {
3754
4991
  readonly source: "loop";
3755
4992
  readonly version: 1;
3756
4993
  };
3757
- readonly "environment.attached": {
4994
+ readonly "agent.attached": {
3758
4995
  readonly payload: z.ZodObject<{
3759
- environmentId: z.ZodString;
4996
+ agentId: z.ZodString;
3760
4997
  }, z.core.$loose>;
3761
4998
  readonly source: "api";
3762
4999
  readonly version: 1;
@@ -3937,7 +5174,7 @@ type EventSchemaOf<T extends EventType> = z.ZodObject<typeof eventEnvelope & {
3937
5174
  /** One schema per event type, keyed by type (the OpenAPI components). */
3938
5175
  export declare const EVENT_SCHEMAS: { [T in EventType]: EventSchemaOf<T>; };
3939
5176
  /** A session event of a known type, discriminated on `type`. */
3940
- export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[EventSchemaOf<"artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.attached" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "message.assistant" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused">, ...EventSchemaOf<"artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.attached" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "message.assistant" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused">[]], "type">;
5177
+ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "queue.taken" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "queue.taken" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "wake.booked" | "wake.cancelled">[]], "type">;
3941
5178
  export type SessionEvent = {
3942
5179
  [T in EventType]: z.infer<EventSchemaOf<T>>;
3943
5180
  }[EventType];
@@ -3952,7 +5189,7 @@ export type SessionEventOf<T extends EventType> = Extract<SessionEvent, {
3952
5189
  */
3953
5190
  export declare function parseSessionEvent(value: unknown): SessionEvent | LiveEvent;
3954
5191
  export declare const SessionItemsResponseSchema: z.ZodObject<{
3955
- items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.attached" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "message.assistant" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused">, ...EventSchemaOf<"artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.attached" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "message.assistant" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused">[]], "type">>;
5192
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "queue.taken" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "queue.taken" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "wake.booked" | "wake.cancelled">[]], "type">>;
3956
5193
  cursor: z.ZodNullable<z.ZodString>;
3957
5194
  }, z.core.$strip>;
3958
5195
  export type SessionItemsResponse = {
@@ -4347,8 +5584,8 @@ export type SeedTenantConfigResponse = z.infer<typeof SeedTenantConfigResponseSc
4347
5584
  export declare const ResetTenantRequestSchema: z.ZodObject<{
4348
5585
  requestId: z.ZodString;
4349
5586
  scope: z.ZodEnum<{
5587
+ agents: "agents";
4350
5588
  all: "all";
4351
- environments: "environments";
4352
5589
  sessions: "sessions";
4353
5590
  }>;
4354
5591
  activeWork: z.ZodEnum<{
@@ -4360,11 +5597,11 @@ export type ResetTenantRequest = z.infer<typeof ResetTenantRequestSchema>;
4360
5597
  /**
4361
5598
  * Acting for a subject (Host feature `subject-headers`): what an application principal may
4362
5599
  * narrow a request to. `sessions:own` reaches only the subject's own sessions; the others reach
4363
- * Tenant-wide resources. `environments:write` creates, changes and deletes Environments and
4364
- * writes their secrets (protocol 11); a token caller's reach only the ids its Environment
4365
- * grants name.
5600
+ * Tenant-wide resources. `agents:write` creates, changes and deletes Agents and writes their
5601
+ * secrets (protocol 16; `environments:write` before); a token caller's reach only the ids its
5602
+ * Agent grants name. `agent-manifests:write` saves and deletes agent manifests.
4366
5603
  */
4367
- export declare const SUBJECT_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "environments:write"];
5604
+ export declare const SUBJECT_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "agent-manifests:write"];
4368
5605
  export type SubjectScope = (typeof SUBJECT_SCOPES)[number];
4369
5606
  /**
4370
5607
  * The owner of a session opened for no person: an MCP server's or HTTP tool's identity header
@@ -4386,9 +5623,10 @@ export declare function parseSubjectHeaders(subject: string, scopes: string | un
4386
5623
  message: string;
4387
5624
  };
4388
5625
  /**
4389
- * Scopes a token caller (a trusted issuer's token) may carry: never `agents:write`.
5626
+ * Scopes a token caller (a trusted issuer's token) may carry: never `agent-manifests:write`.
5627
+ * `agents:write` reaches only the Agents its grants name.
4390
5628
  */
4391
- export declare const TOKEN_SCOPES: readonly ["agents:read", "sessions:own", "environments:write"];
5629
+ export declare const TOKEN_SCOPES: readonly ["agents:read", "sessions:own", "agents:write"];
4392
5630
  export type TokenScope = (typeof TOKEN_SCOPES)[number];
4393
5631
  /**
4394
5632
  * The `iss` of every token a Tenant's Runtime signs itself: capability links, run, host and
@@ -4481,10 +5719,10 @@ export declare const RevokeSigningKeyRequestSchema: z.ZodObject<{
4481
5719
  * token scopes, and `studio`, an operator scope no Runtime route requires (Studio
4482
5720
  * admits a person who holds it, Tenant-wide).
4483
5721
  */
4484
- export declare const ISSUER_SCOPES: readonly ["agents:read", "sessions:own", "environments:write", "studio"];
5722
+ export declare const ISSUER_SCOPES: readonly ["agents:read", "sessions:own", "agents:write", "studio"];
4485
5723
  export type IssuerScope = (typeof ISSUER_SCOPES)[number];
4486
5724
  /** Every scope a caller can hold: the subject scopes, and an issuer token's `studio`. */
4487
- export declare const CALLER_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "environments:write", "studio"];
5725
+ export declare const CALLER_SCOPES: readonly ["agents:read", "agents:write", "sessions:own", "agent-manifests:write", "studio"];
4488
5726
  export type CallerScope = (typeof CALLER_SCOPES)[number];
4489
5727
  /**
4490
5728
  * `GET /v1/me`: who the Runtime takes the caller to be, for any credential.
@@ -4494,65 +5732,213 @@ export type CallerScope = (typeof CALLER_SCOPES)[number];
4494
5732
  * `issuer:<name>` (a token from the identity file's issuer `name`).
4495
5733
  * - `subject` is the person the request acts for; absent for an application key alone.
4496
5734
  * - `scopes`: what the caller holds. An application key alone holds every subject scope.
4497
- * - `agents`: the agents it may reach, `*` for all.
4498
- * - `environments`: the Environment grants of a token caller (empty reaches none); absent for
4499
- * an application key, alone or acting for a subject, which no grant limits.
5735
+ * - `agents`: the Agents it may reach: `*` for all, else a token caller's Agent grants (ids
5736
+ * and `p/*` prefixes; empty reaches none).
4500
5737
  */
4501
5738
  export declare const MeResponseSchema: z.ZodObject<{
4502
5739
  subject: z.ZodOptional<z.ZodString>;
4503
5740
  scopes: z.ZodArray<z.ZodEnum<{
5741
+ "agent-manifests:write": "agent-manifests:write";
4504
5742
  "agents:read": "agents:read";
4505
5743
  "agents:write": "agents:write";
4506
- "environments:write": "environments:write";
4507
5744
  "sessions:own": "sessions:own";
4508
5745
  studio: "studio";
4509
5746
  }>>;
4510
5747
  agents: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
4511
- environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
4512
5748
  via: z.ZodString;
4513
5749
  }, z.core.$strict>;
4514
5750
  export type MeResponse = z.infer<typeof MeResponseSchema>;
4515
5751
  /** True for a serialized web origin: `scheme://host[:port]`, lowercase, no path. */
4516
5752
  export declare function isSerializedOrigin(value: string): boolean;
4517
- /** `GET /v1/agents` with an application key: every definition, manifest included. */
4518
- export declare const AgentDefinitionViewSchema: z.ZodObject<{
4519
- agentId: z.ZodString;
4520
- manifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4521
- manifestHash: z.ZodString;
4522
- implementationVersion: z.ZodString;
4523
- }, z.core.$strict>;
4524
- export type AgentDefinitionView = z.infer<typeof AgentDefinitionViewSchema>;
5753
+ /** `GET /v1/agents`: the Agents the caller reaches. */
4525
5754
  export declare const ListAgentsResponseSchema: z.ZodObject<{
4526
5755
  agents: z.ZodArray<z.ZodObject<{
4527
- agentId: z.ZodString;
4528
- manifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5756
+ id: z.ZodString;
5757
+ manifest: z.ZodString;
5758
+ resolvedVersion: z.ZodNumber;
4529
5759
  manifestHash: z.ZodString;
4530
- implementationVersion: z.ZodString;
5760
+ tracking: z.ZodEnum<{
5761
+ pinned: "pinned";
5762
+ tracking: "tracking";
5763
+ }>;
5764
+ targetVersion: z.ZodNullable<z.ZodNumber>;
5765
+ waitingFor: z.ZodNullable<z.ZodEnum<{
5766
+ secrets: "secrets";
5767
+ start: "start";
5768
+ }>>;
5769
+ failedVersion: z.ZodNullable<z.ZodNumber>;
5770
+ startCheck: z.ZodNullable<z.ZodObject<{
5771
+ from: z.ZodNumber;
5772
+ startedAt: z.ZodString;
5773
+ }, z.core.$strict>>;
5774
+ kind: z.ZodEnum<{
5775
+ none: "none";
5776
+ pod: "pod";
5777
+ virtual: "virtual";
5778
+ }>;
5779
+ harness: z.ZodString;
5780
+ owner: z.ZodNullable<z.ZodString>;
5781
+ labels: z.ZodRecord<z.ZodString, z.ZodString>;
5782
+ state: z.ZodString;
5783
+ attention: z.ZodArray<z.ZodObject<{
5784
+ state: z.ZodEnum<{
5785
+ failing: "failing";
5786
+ input_required: "input_required";
5787
+ paused: "paused";
5788
+ sleeping: "sleeping";
5789
+ working: "working";
5790
+ }>;
5791
+ sessionId: z.ZodOptional<z.ZodString>;
5792
+ reason: z.ZodString;
5793
+ }, z.core.$strict>>;
5794
+ desired: z.ZodEnum<{
5795
+ off: "off";
5796
+ on: "on";
5797
+ }>;
5798
+ nextWakeAt: z.ZodNullable<z.ZodString>;
5799
+ compute: z.ZodObject<{
5800
+ state: z.ZodString;
5801
+ pod: z.ZodOptional<z.ZodObject<{
5802
+ desired: z.ZodEnum<{
5803
+ deleted: "deleted";
5804
+ running: "running";
5805
+ suspended: "suspended";
5806
+ }>;
5807
+ observed: z.ZodEnum<{
5808
+ creating: "creating";
5809
+ deleting: "deleting";
5810
+ failed: "failed";
5811
+ lost: "lost";
5812
+ running: "running";
5813
+ suspended: "suspended";
5814
+ }>;
5815
+ volumeGeneration: z.ZodNumber;
5816
+ hostEpoch: z.ZodNumber;
5817
+ reason: z.ZodOptional<z.ZodString>;
5818
+ imageDigest: z.ZodOptional<z.ZodString>;
5819
+ }, z.core.$strict>>;
5820
+ }, z.core.$strict>;
5821
+ runtime: z.ZodObject<{
5822
+ image: z.ZodOptional<z.ZodString>;
5823
+ resources: z.ZodOptional<z.ZodObject<{
5824
+ cpus: z.ZodNumber;
5825
+ memory: z.ZodString;
5826
+ }, z.core.$strict>>;
5827
+ storage: z.ZodOptional<z.ZodString>;
5828
+ network: z.ZodOptional<z.ZodObject<{
5829
+ allowedHosts: z.ZodArray<z.ZodString>;
5830
+ }, z.core.$strict>>;
5831
+ harness: z.ZodString;
5832
+ lifecycle: z.ZodObject<{
5833
+ idle: z.ZodOptional<z.ZodString>;
5834
+ deleteAfter: z.ZodOptional<z.ZodString>;
5835
+ }, z.core.$strict>;
5836
+ setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
5837
+ command: z.ZodString;
5838
+ cwd: z.ZodOptional<z.ZodString>;
5839
+ timeout: z.ZodOptional<z.ZodString>;
5840
+ }, z.core.$strict>>>;
5841
+ files: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
5842
+ artifactId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
5843
+ version: z.ZodNumber;
5844
+ path: z.ZodString;
5845
+ }, z.core.$strict>, z.ZodObject<{
5846
+ path: z.ZodString;
5847
+ files: z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
5848
+ }, z.core.$strict>]>>>;
5849
+ limits: z.ZodOptional<z.ZodObject<{
5850
+ artifacts: z.ZodOptional<z.ZodObject<{
5851
+ fileBytes: z.ZodOptional<z.ZodNumber>;
5852
+ totalBytes: z.ZodOptional<z.ZodNumber>;
5853
+ }, z.core.$strict>>;
5854
+ skills: z.ZodOptional<z.ZodObject<{
5855
+ totalBytes: z.ZodOptional<z.ZodNumber>;
5856
+ }, z.core.$strict>>;
5857
+ disk: z.ZodOptional<z.ZodObject<{
5858
+ versionBytes: z.ZodOptional<z.ZodNumber>;
5859
+ versionEntries: z.ZodOptional<z.ZodNumber>;
5860
+ }, z.core.$strict>>;
5861
+ }, z.core.$strict>>;
5862
+ secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
5863
+ required: z.ZodOptional<z.ZodBoolean>;
5864
+ description: z.ZodOptional<z.ZodString>;
5865
+ type: z.ZodLiteral<"environment_secret">;
5866
+ allowedHosts: z.ZodArray<z.ZodString>;
5867
+ inject: z.ZodOptional<z.ZodObject<{
5868
+ header: z.ZodString;
5869
+ format: z.ZodString;
5870
+ }, z.core.$strict>>;
5871
+ }, z.core.$strict>, z.ZodObject<{
5872
+ required: z.ZodOptional<z.ZodBoolean>;
5873
+ description: z.ZodOptional<z.ZodString>;
5874
+ type: z.ZodLiteral<"environment_variable">;
5875
+ }, z.core.$strict>, z.ZodObject<{
5876
+ via: z.ZodOptional<z.ZodString>;
5877
+ identity: z.ZodOptional<z.ZodObject<{
5878
+ header: z.ZodString;
5879
+ }, z.core.$strict>>;
5880
+ required: z.ZodOptional<z.ZodBoolean>;
5881
+ description: z.ZodOptional<z.ZodString>;
5882
+ type: z.ZodLiteral<"bearer">;
5883
+ url: z.ZodString;
5884
+ }, z.core.$strict>, z.ZodObject<{
5885
+ via: z.ZodOptional<z.ZodString>;
5886
+ identity: z.ZodOptional<z.ZodObject<{
5887
+ header: z.ZodString;
5888
+ }, z.core.$strict>>;
5889
+ required: z.ZodOptional<z.ZodBoolean>;
5890
+ description: z.ZodOptional<z.ZodString>;
5891
+ type: z.ZodLiteral<"headers">;
5892
+ url: z.ZodString;
5893
+ }, z.core.$strict>], "type">>>>;
5894
+ }, z.core.$strict>;
5895
+ limits: z.ZodObject<{
5896
+ artifacts: z.ZodObject<{
5897
+ fileBytes: z.ZodNumber;
5898
+ totalBytes: z.ZodNumber;
5899
+ }, z.core.$strict>;
5900
+ skills: z.ZodObject<{
5901
+ totalBytes: z.ZodNumber;
5902
+ }, z.core.$strict>;
5903
+ disk: z.ZodObject<{
5904
+ versionBytes: z.ZodNumber;
5905
+ versionEntries: z.ZodNumber;
5906
+ }, z.core.$strict>;
5907
+ }, z.core.$strict>;
5908
+ sessions: z.ZodArray<z.ZodObject<{
5909
+ id: z.ZodString;
5910
+ ownerUserId: z.ZodString;
5911
+ status: z.ZodString;
5912
+ activeTurnId: z.ZodNullable<z.ZodString>;
5913
+ }, z.core.$strict>>;
5914
+ slots: z.ZodArray<z.ZodObject<{
5915
+ name: z.ZodString;
5916
+ type: z.ZodString;
5917
+ required: z.ZodBoolean;
5918
+ set: z.ZodBoolean;
5919
+ }, z.core.$strict>>;
5920
+ disk: z.ZodOptional<z.ZodObject<{
5921
+ latestVersion: z.ZodNullable<z.ZodNumber>;
5922
+ operation: z.ZodNullable<z.ZodObject<{
5923
+ kind: z.ZodEnum<{
5924
+ restore: "restore";
5925
+ seed: "seed";
5926
+ snapshot: "snapshot";
5927
+ }>;
5928
+ version: z.ZodOptional<z.ZodNumber>;
5929
+ startedAt: z.ZodString;
5930
+ }, z.core.$strict>>;
5931
+ }, z.core.$strict>>;
5932
+ forkedFrom: z.ZodNullable<z.ZodObject<{
5933
+ agent: z.ZodString;
5934
+ disk: z.ZodNullable<z.ZodNumber>;
5935
+ }, z.core.$strict>>;
5936
+ lastUsedAt: z.ZodString;
5937
+ createdAt: z.ZodString;
5938
+ updatedAt: z.ZodString;
4531
5939
  }, z.core.$strict>>;
4532
5940
  }, z.core.$strict>;
4533
5941
  export type ListAgentsResponse = z.infer<typeof ListAgentsResponseSchema>;
4534
- /** `GET /v1/agents` with a token caller's credential: the allowed agents' names only. */
4535
- export declare const PublicAgentSchema: z.ZodObject<{
4536
- agentId: z.ZodString;
4537
- name: z.ZodOptional<z.ZodString>;
4538
- description: z.ZodOptional<z.ZodString>;
4539
- }, z.core.$strict>;
4540
- export type PublicAgent = z.infer<typeof PublicAgentSchema>;
4541
- export declare const ListPublicAgentsResponseSchema: z.ZodObject<{
4542
- agents: z.ZodArray<z.ZodObject<{
4543
- agentId: z.ZodString;
4544
- name: z.ZodOptional<z.ZodString>;
4545
- description: z.ZodOptional<z.ZodString>;
4546
- }, z.core.$strict>>;
4547
- }, z.core.$strict>;
4548
- export type ListPublicAgentsResponse = z.infer<typeof ListPublicAgentsResponseSchema>;
4549
- export declare const PutAgentResponseSchema: z.ZodObject<{
4550
- agentId: z.ZodString;
4551
- manifestHash: z.ZodString;
4552
- implementationVersion: z.ZodString;
4553
- dryRun: z.ZodOptional<z.ZodBoolean>;
4554
- }, z.core.$strict>;
4555
- export type PutAgentResponse = z.infer<typeof PutAgentResponseSchema>;
4556
5942
  export declare const SESSION_STATUSES: readonly ["idle", "runnable", "running", "waiting", "paused", "uncertain", "completed", "failed", "cancelled"];
4557
5943
  export declare const SessionSummarySchema: z.ZodObject<{
4558
5944
  id: z.ZodString;
@@ -4597,9 +5983,11 @@ export declare const SessionViewSchema: z.ZodObject<{
4597
5983
  id: z.ZodString;
4598
5984
  agentId: z.ZodString;
4599
5985
  ownerUserId: z.ZodString;
5986
+ manifest: z.ZodNullable<z.ZodObject<{
5987
+ name: z.ZodString;
5988
+ version: z.ZodNumber;
5989
+ }, z.core.$strict>>;
4600
5990
  manifestHash: z.ZodString;
4601
- definitionHash: z.ZodOptional<z.ZodString>;
4602
- implementationVersion: z.ZodString;
4603
5991
  status: z.ZodEnum<{
4604
5992
  cancelled: "cancelled";
4605
5993
  completed: "completed";
@@ -4612,10 +6000,7 @@ export declare const SessionViewSchema: z.ZodObject<{
4612
6000
  waiting: "waiting";
4613
6001
  }>;
4614
6002
  activeTurnId: z.ZodNullable<z.ZodString>;
4615
- environment: z.ZodNullable<z.ZodObject<{
4616
- id: z.ZodString;
4617
- version: z.ZodNumber;
4618
- }, z.core.$strict>>;
6003
+ queuedMessages: z.ZodNumber;
4619
6004
  harness: z.ZodString;
4620
6005
  closedReason: z.ZodOptional<z.ZodString>;
4621
6006
  mcpSnapshot: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4871,9 +6256,12 @@ export declare const TenantSandboxViewSchema: z.ZodObject<{
4871
6256
  }, z.core.$strip>>>;
4872
6257
  }, z.core.$strict>;
4873
6258
  export type TenantSandboxView = z.infer<typeof TenantSandboxViewSchema>;
4874
- /** What a usage total or a budget covers: the whole Tenant, one agent, or one turn. */
6259
+ /**
6260
+ * What a usage total or a budget covers: the whole Tenant, the Agents made from one agent manifest
6261
+ * (`manifest`, by its name; scope `agent` keyed a definition id before protocol 16), or one turn.
6262
+ */
4875
6263
  export declare const ModelUsageScopeSchema: z.ZodEnum<{
4876
- agent: "agent";
6264
+ manifest: "manifest";
4877
6265
  tenant: "tenant";
4878
6266
  turn: "turn";
4879
6267
  }>;
@@ -4881,7 +6269,7 @@ export type ModelUsageScope = z.infer<typeof ModelUsageScopeSchema>;
4881
6269
  /** `GET /v1/tenant/usage`: which rows of the model usage ledger to total. */
4882
6270
  export declare const ModelUsageQuerySchema: z.ZodObject<{
4883
6271
  scope: z.ZodDefault<z.ZodEnum<{
4884
- agent: "agent";
6272
+ manifest: "manifest";
4885
6273
  tenant: "tenant";
4886
6274
  turn: "turn";
4887
6275
  }>>;
@@ -4896,7 +6284,7 @@ export type ModelUsageQuery = z.infer<typeof ModelUsageQuerySchema>;
4896
6284
  /** The model calls the ledger recorded for one scope and period, and what they cost. */
4897
6285
  export declare const ModelUsageTotalsSchema: z.ZodObject<{
4898
6286
  scope: z.ZodEnum<{
4899
- agent: "agent";
6287
+ manifest: "manifest";
4900
6288
  tenant: "tenant";
4901
6289
  turn: "turn";
4902
6290
  }>;
@@ -4919,7 +6307,7 @@ export type ModelUsageTotals = z.infer<typeof ModelUsageTotalsSchema>;
4919
6307
  */
4920
6308
  export declare const ModelBudgetSchema: z.ZodObject<{
4921
6309
  scope: z.ZodEnum<{
4922
- agent: "agent";
6310
+ manifest: "manifest";
4923
6311
  tenant: "tenant";
4924
6312
  turn: "turn";
4925
6313
  }>;
@@ -4937,7 +6325,7 @@ export declare const PutModelBudgetsRequestSchema: z.ZodObject<{
4937
6325
  requestId: z.ZodOptional<z.ZodString>;
4938
6326
  budgets: z.ZodArray<z.ZodObject<{
4939
6327
  scope: z.ZodEnum<{
4940
- agent: "agent";
6328
+ manifest: "manifest";
4941
6329
  tenant: "tenant";
4942
6330
  turn: "turn";
4943
6331
  }>;
@@ -4954,7 +6342,7 @@ export type PutModelBudgetsRequest = z.infer<typeof PutModelBudgetsRequestSchema
4954
6342
  export declare const ModelBudgetsSchema: z.ZodObject<{
4955
6343
  budgets: z.ZodArray<z.ZodObject<{
4956
6344
  scope: z.ZodEnum<{
4957
- agent: "agent";
6345
+ manifest: "manifest";
4958
6346
  tenant: "tenant";
4959
6347
  turn: "turn";
4960
6348
  }>;
@@ -5097,19 +6485,18 @@ export type StreamClosedFrame = z.infer<typeof StreamClosedFrameSchema>;
5097
6485
  * (another turn is running) or `runtime_error` (the Runtime failed). Never an HTTP body's code.
5098
6486
  */
5099
6487
  export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
6488
+ agent_busy: "agent_busy";
6489
+ agent_fixed_field: "agent_fixed_field";
6490
+ agent_lost: "agent_lost";
6491
+ agent_not_granted: "agent_not_granted";
6492
+ agent_owner_mismatch: "agent_owner_mismatch";
6493
+ agent_unavailable: "agent_unavailable";
5100
6494
  connection_missing: "connection_missing";
5101
6495
  credential_conflict: "credential_conflict";
5102
6496
  credential_invalid: "credential_invalid";
5103
6497
  credential_rejected: "credential_rejected";
5104
6498
  credential_required: "credential_required";
5105
6499
  definition_files_missing: "definition_files_missing";
5106
- environment_busy: "environment_busy";
5107
- environment_immutable: "environment_immutable";
5108
- environment_lost: "environment_lost";
5109
- environment_not_granted: "environment_not_granted";
5110
- environment_owner_mismatch: "environment_owner_mismatch";
5111
- environment_unavailable: "environment_unavailable";
5112
- environment_unsuitable: "environment_unsuitable";
5113
6500
  harness_mismatch: "harness_mismatch";
5114
6501
  host_rejected: "host_rejected";
5115
6502
  incompatible_host: "incompatible_host";
@@ -5120,12 +6507,15 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
5120
6507
  limit_exceeded: "limit_exceeded";
5121
6508
  manifest_changed: "manifest_changed";
5122
6509
  manifest_in_use: "manifest_in_use";
6510
+ manifest_inconsistent: "manifest_inconsistent";
5123
6511
  manifest_not_found: "manifest_not_found";
5124
6512
  mcp_preview_failed: "mcp_preview_failed";
6513
+ memory_conflict: "memory_conflict";
5125
6514
  not_found: "not_found";
5126
6515
  origin_rejected: "origin_rejected";
5127
6516
  placement_refused: "placement_refused";
5128
6517
  protocol_unsupported: "protocol_unsupported";
6518
+ queue_full: "queue_full";
5129
6519
  request_rejected: "request_rejected";
5130
6520
  runtime_error: "runtime_error";
5131
6521
  scope_required: "scope_required";
@@ -5135,6 +6525,8 @@ export declare const AgUiRunErrorCodeSchema: z.ZodEnum<{
5135
6525
  subject_invalid: "subject_invalid";
5136
6526
  subject_required: "subject_required";
5137
6527
  token_expired: "token_expired";
6528
+ trigger_expired: "trigger_expired";
6529
+ trigger_paused: "trigger_paused";
5138
6530
  unsupported_media_type: "unsupported_media_type";
5139
6531
  }>;
5140
6532
  export type AgUiRunErrorCode = z.infer<typeof AgUiRunErrorCodeSchema>;
@@ -5324,7 +6716,7 @@ export declare const ArtifactViewSchema: z.ZodObject<{
5324
6716
  name: z.ZodString;
5325
6717
  contentType: z.ZodString;
5326
6718
  sessionId: z.ZodOptional<z.ZodString>;
5327
- environmentId: z.ZodOptional<z.ZodString>;
6719
+ agentId: z.ZodOptional<z.ZodString>;
5328
6720
  latestVersion: z.ZodNumber;
5329
6721
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5330
6722
  createdAt: z.ZodString;
@@ -5354,7 +6746,7 @@ export declare const ListArtifactsResponseSchema: z.ZodObject<{
5354
6746
  name: z.ZodString;
5355
6747
  contentType: z.ZodString;
5356
6748
  sessionId: z.ZodOptional<z.ZodString>;
5357
- environmentId: z.ZodOptional<z.ZodString>;
6749
+ agentId: z.ZodOptional<z.ZodString>;
5358
6750
  latestVersion: z.ZodNumber;
5359
6751
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5360
6752
  createdAt: z.ZodString;
@@ -5385,7 +6777,7 @@ export declare const ArtifactListItemSchema: z.ZodObject<{
5385
6777
  name: z.ZodString;
5386
6778
  contentType: z.ZodString;
5387
6779
  sessionId: z.ZodOptional<z.ZodString>;
5388
- environmentId: z.ZodOptional<z.ZodString>;
6780
+ agentId: z.ZodOptional<z.ZodString>;
5389
6781
  latestVersion: z.ZodNumber;
5390
6782
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5391
6783
  createdAt: z.ZodString;
@@ -5402,7 +6794,7 @@ export declare const ArtifactPageSchema: z.ZodObject<{
5402
6794
  name: z.ZodString;
5403
6795
  contentType: z.ZodString;
5404
6796
  sessionId: z.ZodOptional<z.ZodString>;
5405
- environmentId: z.ZodOptional<z.ZodString>;
6797
+ agentId: z.ZodOptional<z.ZodString>;
5406
6798
  latestVersion: z.ZodNumber;
5407
6799
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5408
6800
  createdAt: z.ZodString;
@@ -5422,7 +6814,7 @@ export declare const UploadArtifactResponseSchema: z.ZodObject<{
5422
6814
  name: z.ZodString;
5423
6815
  contentType: z.ZodString;
5424
6816
  sessionId: z.ZodOptional<z.ZodString>;
5425
- environmentId: z.ZodOptional<z.ZodString>;
6817
+ agentId: z.ZodOptional<z.ZodString>;
5426
6818
  latestVersion: z.ZodNumber;
5427
6819
  labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5428
6820
  createdAt: z.ZodString;
@@ -5732,6 +7124,21 @@ export declare const TenantLimitsConfigSchema: z.ZodObject<{
5732
7124
  toolRuleFieldChars: z.ZodOptional<z.ZodNumber>;
5733
7125
  toolRuleTextChars: z.ZodOptional<z.ZodNumber>;
5734
7126
  modelBudgets: z.ZodOptional<z.ZodNumber>;
7127
+ triggersPerAgent: z.ZodOptional<z.ZodNumber>;
7128
+ triggerMinIntervalMs: z.ZodOptional<z.ZodNumber>;
7129
+ triggerRunsPerHour: z.ZodOptional<z.ZodNumber>;
7130
+ triggerJitterPercent: z.ZodOptional<z.ZodNumber>;
7131
+ triggerJitterMaxMs: z.ZodOptional<z.ZodNumber>;
7132
+ triggerPromptChars: z.ZodOptional<z.ZodNumber>;
7133
+ triggerRunRetentionMs: z.ZodOptional<z.ZodNumber>;
7134
+ webhookBodyBytes: z.ZodOptional<z.ZodNumber>;
7135
+ wakeMaxAheadMs: z.ZodOptional<z.ZodNumber>;
7136
+ wakeNoteChars: z.ZodOptional<z.ZodNumber>;
7137
+ memoryBytes: z.ZodOptional<z.ZodNumber>;
7138
+ memoriesPerAgent: z.ZodOptional<z.ZodNumber>;
7139
+ memoryIndexLines: z.ZodOptional<z.ZodNumber>;
7140
+ memoryIndexBytes: z.ZodOptional<z.ZodNumber>;
7141
+ sessionQueuedMessages: z.ZodOptional<z.ZodNumber>;
5735
7142
  flowConcurrency: z.ZodOptional<z.ZodNumber>;
5736
7143
  flowMapItems: z.ZodOptional<z.ZodNumber>;
5737
7144
  flowLoopIterations: z.ZodOptional<z.ZodNumber>;
@@ -5793,6 +7200,21 @@ export declare const PutTenantLimitsRequestSchema: z.ZodObject<{
5793
7200
  toolRuleFieldChars: z.ZodOptional<z.ZodNumber>;
5794
7201
  toolRuleTextChars: z.ZodOptional<z.ZodNumber>;
5795
7202
  modelBudgets: z.ZodOptional<z.ZodNumber>;
7203
+ triggersPerAgent: z.ZodOptional<z.ZodNumber>;
7204
+ triggerMinIntervalMs: z.ZodOptional<z.ZodNumber>;
7205
+ triggerRunsPerHour: z.ZodOptional<z.ZodNumber>;
7206
+ triggerJitterPercent: z.ZodOptional<z.ZodNumber>;
7207
+ triggerJitterMaxMs: z.ZodOptional<z.ZodNumber>;
7208
+ triggerPromptChars: z.ZodOptional<z.ZodNumber>;
7209
+ triggerRunRetentionMs: z.ZodOptional<z.ZodNumber>;
7210
+ webhookBodyBytes: z.ZodOptional<z.ZodNumber>;
7211
+ wakeMaxAheadMs: z.ZodOptional<z.ZodNumber>;
7212
+ wakeNoteChars: z.ZodOptional<z.ZodNumber>;
7213
+ memoryBytes: z.ZodOptional<z.ZodNumber>;
7214
+ memoriesPerAgent: z.ZodOptional<z.ZodNumber>;
7215
+ memoryIndexLines: z.ZodOptional<z.ZodNumber>;
7216
+ memoryIndexBytes: z.ZodOptional<z.ZodNumber>;
7217
+ sessionQueuedMessages: z.ZodOptional<z.ZodNumber>;
5796
7218
  flowConcurrency: z.ZodOptional<z.ZodNumber>;
5797
7219
  flowMapItems: z.ZodOptional<z.ZodNumber>;
5798
7220
  flowLoopIterations: z.ZodOptional<z.ZodNumber>;
@@ -5855,6 +7277,21 @@ export declare const TenantLimitsViewSchema: z.ZodObject<{
5855
7277
  toolRuleFieldChars: z.ZodNumber;
5856
7278
  toolRuleTextChars: z.ZodNumber;
5857
7279
  modelBudgets: z.ZodNumber;
7280
+ triggersPerAgent: z.ZodNumber;
7281
+ triggerMinIntervalMs: z.ZodNumber;
7282
+ triggerRunsPerHour: z.ZodNumber;
7283
+ triggerJitterPercent: z.ZodNumber;
7284
+ triggerJitterMaxMs: z.ZodNumber;
7285
+ triggerPromptChars: z.ZodNumber;
7286
+ triggerRunRetentionMs: z.ZodNumber;
7287
+ webhookBodyBytes: z.ZodNumber;
7288
+ wakeMaxAheadMs: z.ZodNumber;
7289
+ wakeNoteChars: z.ZodNumber;
7290
+ memoryBytes: z.ZodNumber;
7291
+ memoriesPerAgent: z.ZodNumber;
7292
+ memoryIndexLines: z.ZodNumber;
7293
+ memoryIndexBytes: z.ZodNumber;
7294
+ sessionQueuedMessages: z.ZodNumber;
5858
7295
  flowConcurrency: z.ZodNumber;
5859
7296
  flowMapItems: z.ZodNumber;
5860
7297
  flowLoopIterations: z.ZodNumber;
@@ -5879,7 +7316,6 @@ export declare const SessionListItemSchema: z.ZodObject<{
5879
7316
  }>;
5880
7317
  activeTurnId: z.ZodNullable<z.ZodString>;
5881
7318
  lastTurnId: z.ZodNullable<z.ZodString>;
5882
- environmentId: z.ZodNullable<z.ZodString>;
5883
7319
  createdAt: z.ZodNullable<z.ZodString>;
5884
7320
  lastEventAt: z.ZodNullable<z.ZodString>;
5885
7321
  }, z.core.$strict>;
@@ -5902,7 +7338,6 @@ export declare const SessionPageSchema: z.ZodObject<{
5902
7338
  }>;
5903
7339
  activeTurnId: z.ZodNullable<z.ZodString>;
5904
7340
  lastTurnId: z.ZodNullable<z.ZodString>;
5905
- environmentId: z.ZodNullable<z.ZodString>;
5906
7341
  createdAt: z.ZodNullable<z.ZodString>;
5907
7342
  lastEventAt: z.ZodNullable<z.ZodString>;
5908
7343
  }, z.core.$strict>>;
@@ -5912,13 +7347,16 @@ export type SessionPage = z.infer<typeof SessionPageSchema>;
5912
7347
  export declare const SessionManifestViewSchema: z.ZodObject<{
5913
7348
  sessionId: z.ZodString;
5914
7349
  agentId: z.ZodString;
7350
+ definition: z.ZodNullable<z.ZodObject<{
7351
+ name: z.ZodString;
7352
+ version: z.ZodNumber;
7353
+ }, z.core.$strict>>;
5915
7354
  manifestHash: z.ZodString;
5916
- implementationVersion: z.ZodString;
5917
7355
  manifest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5918
7356
  }, z.core.$strict>;
5919
7357
  export type SessionManifestView = z.infer<typeof SessionManifestViewSchema>;
5920
7358
  export declare const HistoryPageSchema: z.ZodObject<{
5921
- items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.attached" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "message.assistant" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused">, ...EventSchemaOf<"artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.attached" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "message.assistant" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused">[]], "type">>;
7359
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "queue.taken" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "queue.taken" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "wake.booked" | "wake.cancelled">[]], "type">>;
5922
7360
  cursor: z.ZodNullable<z.ZodString>;
5923
7361
  tail: z.ZodBoolean;
5924
7362
  }, z.core.$strip>;
@@ -5946,7 +7384,7 @@ export declare const ModelCallSchema: z.ZodObject<{
5946
7384
  effectId: z.ZodString;
5947
7385
  sessionId: z.ZodString;
5948
7386
  turnId: z.ZodString;
5949
- agentId: z.ZodString;
7387
+ manifestName: z.ZodString;
5950
7388
  provider: z.ZodNullable<z.ZodString>;
5951
7389
  model: z.ZodNullable<z.ZodString>;
5952
7390
  at: z.ZodString;
@@ -5974,7 +7412,7 @@ export declare const ModelCallsPageSchema: z.ZodObject<{
5974
7412
  effectId: z.ZodString;
5975
7413
  sessionId: z.ZodString;
5976
7414
  turnId: z.ZodString;
5977
- agentId: z.ZodString;
7415
+ manifestName: z.ZodString;
5978
7416
  provider: z.ZodNullable<z.ZodString>;
5979
7417
  model: z.ZodNullable<z.ZodString>;
5980
7418
  at: z.ZodString;
@@ -6005,7 +7443,7 @@ export declare const ModelCallExportPageSchema: z.ZodObject<{
6005
7443
  effectId: z.ZodString;
6006
7444
  sessionId: z.ZodString;
6007
7445
  turnId: z.ZodString;
6008
- agentId: z.ZodString;
7446
+ manifestName: z.ZodString;
6009
7447
  provider: z.ZodNullable<z.ZodString>;
6010
7448
  model: z.ZodNullable<z.ZodString>;
6011
7449
  at: z.ZodString;
@@ -6045,6 +7483,7 @@ export declare const ToolCallSchema: z.ZodObject<{
6045
7483
  harness: "harness";
6046
7484
  http: "http";
6047
7485
  mcp: "mcp";
7486
+ runtime: "runtime";
6048
7487
  sandbox: "sandbox";
6049
7488
  }>>;
6050
7489
  server: z.ZodNullable<z.ZodString>;
@@ -6083,6 +7522,7 @@ export declare const ToolCallsPageSchema: z.ZodObject<{
6083
7522
  harness: "harness";
6084
7523
  http: "http";
6085
7524
  mcp: "mcp";
7525
+ runtime: "runtime";
6086
7526
  sandbox: "sandbox";
6087
7527
  }>>;
6088
7528
  server: z.ZodNullable<z.ZodString>;
@@ -6179,16 +7619,74 @@ export declare const TurnTraceSchema: z.ZodObject<{
6179
7619
  }, z.core.$loose>>;
6180
7620
  }, z.core.$loose>;
6181
7621
  export type TurnTrace = z.infer<typeof TurnTraceSchema>;
6182
- export declare const EnvironmentPageSchema: z.ZodObject<{
6183
- environments: z.ZodArray<z.ZodObject<{
7622
+ export declare const AgentPageSchema: z.ZodObject<{
7623
+ agents: z.ZodArray<z.ZodObject<{
6184
7624
  id: z.ZodString;
7625
+ manifest: z.ZodString;
7626
+ resolvedVersion: z.ZodNumber;
7627
+ manifestHash: z.ZodString;
7628
+ tracking: z.ZodEnum<{
7629
+ pinned: "pinned";
7630
+ tracking: "tracking";
7631
+ }>;
7632
+ targetVersion: z.ZodNullable<z.ZodNumber>;
7633
+ waitingFor: z.ZodNullable<z.ZodEnum<{
7634
+ secrets: "secrets";
7635
+ start: "start";
7636
+ }>>;
7637
+ failedVersion: z.ZodNullable<z.ZodNumber>;
7638
+ startCheck: z.ZodNullable<z.ZodObject<{
7639
+ from: z.ZodNumber;
7640
+ startedAt: z.ZodString;
7641
+ }, z.core.$strict>>;
6185
7642
  kind: z.ZodEnum<{
6186
7643
  none: "none";
6187
7644
  pod: "pod";
6188
7645
  virtual: "virtual";
6189
7646
  }>;
7647
+ harness: z.ZodString;
7648
+ owner: z.ZodNullable<z.ZodString>;
6190
7649
  labels: z.ZodRecord<z.ZodString, z.ZodString>;
6191
- manifest: z.ZodObject<{
7650
+ state: z.ZodString;
7651
+ attention: z.ZodArray<z.ZodObject<{
7652
+ state: z.ZodEnum<{
7653
+ failing: "failing";
7654
+ input_required: "input_required";
7655
+ paused: "paused";
7656
+ sleeping: "sleeping";
7657
+ working: "working";
7658
+ }>;
7659
+ sessionId: z.ZodOptional<z.ZodString>;
7660
+ reason: z.ZodString;
7661
+ }, z.core.$strict>>;
7662
+ desired: z.ZodEnum<{
7663
+ off: "off";
7664
+ on: "on";
7665
+ }>;
7666
+ nextWakeAt: z.ZodNullable<z.ZodString>;
7667
+ compute: z.ZodObject<{
7668
+ state: z.ZodString;
7669
+ pod: z.ZodOptional<z.ZodObject<{
7670
+ desired: z.ZodEnum<{
7671
+ deleted: "deleted";
7672
+ running: "running";
7673
+ suspended: "suspended";
7674
+ }>;
7675
+ observed: z.ZodEnum<{
7676
+ creating: "creating";
7677
+ deleting: "deleting";
7678
+ failed: "failed";
7679
+ lost: "lost";
7680
+ running: "running";
7681
+ suspended: "suspended";
7682
+ }>;
7683
+ volumeGeneration: z.ZodNumber;
7684
+ hostEpoch: z.ZodNumber;
7685
+ reason: z.ZodOptional<z.ZodString>;
7686
+ imageDigest: z.ZodOptional<z.ZodString>;
7687
+ }, z.core.$strict>>;
7688
+ }, z.core.$strict>;
7689
+ runtime: z.ZodObject<{
6192
7690
  image: z.ZodOptional<z.ZodString>;
6193
7691
  resources: z.ZodOptional<z.ZodObject<{
6194
7692
  cpus: z.ZodNumber;
@@ -6262,9 +7760,6 @@ export declare const EnvironmentPageSchema: z.ZodObject<{
6262
7760
  url: z.ZodString;
6263
7761
  }, z.core.$strict>], "type">>>>;
6264
7762
  }, z.core.$strict>;
6265
- manifestName: z.ZodOptional<z.ZodString>;
6266
- manifestVersion: z.ZodOptional<z.ZodNumber>;
6267
- manifestHash: z.ZodOptional<z.ZodString>;
6268
7763
  limits: z.ZodObject<{
6269
7764
  artifacts: z.ZodObject<{
6270
7765
  fileBytes: z.ZodNumber;
@@ -6278,43 +7773,21 @@ export declare const EnvironmentPageSchema: z.ZodObject<{
6278
7773
  versionEntries: z.ZodNumber;
6279
7774
  }, z.core.$strict>;
6280
7775
  }, z.core.$strict>;
6281
- forkedFrom: z.ZodOptional<z.ZodObject<{
6282
- environment: z.ZodString;
6283
- disk: z.ZodNullable<z.ZodNumber>;
7776
+ sessions: z.ZodArray<z.ZodObject<{
7777
+ id: z.ZodString;
7778
+ ownerUserId: z.ZodString;
7779
+ status: z.ZodString;
7780
+ activeTurnId: z.ZodNullable<z.ZodString>;
6284
7781
  }, z.core.$strict>>;
6285
- slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
7782
+ slots: z.ZodArray<z.ZodObject<{
6286
7783
  name: z.ZodString;
6287
7784
  type: z.ZodString;
6288
7785
  required: z.ZodBoolean;
6289
7786
  set: z.ZodBoolean;
6290
- }, z.core.$strict>>>;
6291
- version: z.ZodNumber;
6292
- appliedVersion: z.ZodNumber;
6293
- ownerUserId: z.ZodNullable<z.ZodString>;
6294
- state: z.ZodString;
6295
- pod: z.ZodOptional<z.ZodObject<{
6296
- desired: z.ZodEnum<{
6297
- deleted: "deleted";
6298
- running: "running";
6299
- suspended: "suspended";
6300
- }>;
6301
- observed: z.ZodEnum<{
6302
- creating: "creating";
6303
- deleting: "deleting";
6304
- failed: "failed";
6305
- lost: "lost";
6306
- running: "running";
6307
- suspended: "suspended";
6308
- }>;
6309
- volumeGeneration: z.ZodNumber;
6310
- hostEpoch: z.ZodNumber;
6311
- reason: z.ZodOptional<z.ZodString>;
6312
- imageDigest: z.ZodOptional<z.ZodString>;
6313
7787
  }, z.core.$strict>>;
6314
- lastUsedAt: z.ZodString;
6315
7788
  disk: z.ZodOptional<z.ZodObject<{
6316
7789
  latestVersion: z.ZodNullable<z.ZodNumber>;
6317
- operation: z.ZodOptional<z.ZodObject<{
7790
+ operation: z.ZodNullable<z.ZodObject<{
6318
7791
  kind: z.ZodEnum<{
6319
7792
  restore: "restore";
6320
7793
  seed: "seed";
@@ -6324,13 +7797,14 @@ export declare const EnvironmentPageSchema: z.ZodObject<{
6324
7797
  startedAt: z.ZodString;
6325
7798
  }, z.core.$strict>>;
6326
7799
  }, z.core.$strict>>;
6327
- sessions: z.ZodArray<z.ZodObject<{
6328
- id: z.ZodString;
6329
- activeTurnId: z.ZodNullable<z.ZodString>;
7800
+ forkedFrom: z.ZodNullable<z.ZodObject<{
7801
+ agent: z.ZodString;
7802
+ disk: z.ZodNullable<z.ZodNumber>;
6330
7803
  }, z.core.$strict>>;
7804
+ lastUsedAt: z.ZodString;
6331
7805
  createdAt: z.ZodString;
6332
7806
  updatedAt: z.ZodString;
6333
7807
  }, z.core.$strict>>;
6334
7808
  nextCursor: z.ZodNullable<z.ZodString>;
6335
7809
  }, z.core.$strict>;
6336
- export type EnvironmentPage = z.infer<typeof EnvironmentPageSchema>;
7810
+ export type AgentPage = z.infer<typeof AgentPageSchema>;