@nylorun/core 0.24.0-beta → 0.25.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/dist/compatibility.d.ts +47 -36
  3. package/dist/compatibility.js +47 -36
  4. package/dist/contracts.d.ts +133 -87
  5. package/dist/contracts.js +185 -135
  6. package/dist/definition/approval.d.ts +1 -1
  7. package/dist/definition/bound.d.ts +2 -0
  8. package/dist/definition/builder.d.ts +2 -2
  9. package/dist/definition/builder.js +1 -1
  10. package/dist/definition/code-tools.d.ts +1 -1
  11. package/dist/definition/declaration.js +3 -0
  12. package/dist/definition/delegate.d.ts +1 -1
  13. package/dist/definition/delegate.js +1 -1
  14. package/dist/definition/from.d.ts +2 -2
  15. package/dist/definition/from.js +1 -1
  16. package/dist/definition/http-tool.d.ts +3 -3
  17. package/dist/definition/mcp.d.ts +4 -4
  18. package/dist/definition/mcp.js +3 -3
  19. package/dist/definition/sections.d.ts +5 -4
  20. package/dist/definition/sections.js +30 -7
  21. package/dist/definition/variant.d.ts +1 -1
  22. package/dist/definition/variant.js +4 -4
  23. package/dist/harness-api/entries.d.ts +1 -1
  24. package/dist/harness-api/entries.js +1 -1
  25. package/dist/harness-api/gates.d.ts +1 -1
  26. package/dist/harness-api/gates.js +1 -1
  27. package/dist/harness-api/json-schema.d.ts +1 -1
  28. package/dist/harness-api/json-schema.js +1 -1
  29. package/dist/harness-api/mcp.js +1 -1
  30. package/dist/harness-api/messages.d.ts +6 -6
  31. package/dist/harness-api/schema.d.ts +7 -7
  32. package/dist/harness-api/schema.js +16 -16
  33. package/dist/harness-api/transcript.d.ts +1 -1
  34. package/dist/harness-api/transport.d.ts +1 -1
  35. package/dist/harness-api/transport.js +1 -1
  36. package/dist/manifest-schemas.js +2 -1
  37. package/dist/schemas/agent-manifest.schema.json +3 -3
  38. package/dist/schemas/harness-manifest.schema.json +1 -1
  39. package/dist/schemas/runtime-manifest.schema.json +2 -2
  40. package/dist/types/manifest.d.ts +21 -17
  41. package/dist/types/model.d.ts +1 -1
  42. package/dist/types/observe.d.ts +1 -1
  43. package/dist/types/part.d.ts +5 -0
  44. package/dist/types/tool.d.ts +4 -4
  45. package/dist/utils/definition-files.d.ts +3 -2
  46. package/dist/utils/definition-files.js +4 -3
  47. package/dist/utils/file-systems.d.ts +1 -1
  48. package/dist/utils/file-systems.js +1 -1
  49. package/dist/utils/harness-id.d.ts +1 -1
  50. package/dist/utils/harness-id.js +1 -1
  51. package/dist/utils/memory.d.ts +2 -2
  52. package/dist/utils/memory.js +2 -2
  53. package/dist/utils/runtime-limits.d.ts +5 -5
  54. package/dist/utils/runtime-limits.js +5 -5
  55. package/dist/utils/runtime-tools.d.ts +3 -3
  56. package/dist/utils/runtime-tools.js +3 -3
  57. package/package.json +1 -1
package/dist/contracts.js CHANGED
@@ -41,7 +41,7 @@ const jsonValue = z
41
41
  ]))
42
42
  .meta({ id: "JsonValue" });
43
43
  /**
44
- * A name the model sees in a tool name (R2b C6): a declared tool's, or an MCP server's, which
44
+ * A name the model sees in a tool name: a declared tool's, or an MCP server's, which
45
45
  * prefixes its tools' names. Letters, digits, `_` and `-`, up to 64: what every provider accepts.
46
46
  */
47
47
  const modelFacingName = (what) => z.string().regex(DELEGATE_NAME_PATTERN, {
@@ -52,7 +52,7 @@ const pluginLabelSchema = z
52
52
  .object({ name: z.string().min(1), version: z.string().min(1).optional() })
53
53
  .strict()
54
54
  .meta({ id: "PluginLabel" });
55
- /** One tool's settings on an MCP server (R2b C9). */
55
+ /** One tool's settings on an MCP server. */
56
56
  const mcpToolSettingsSchema = z
57
57
  .object({
58
58
  enabled: z.boolean().optional(),
@@ -61,7 +61,7 @@ const mcpToolSettingsSchema = z
61
61
  })
62
62
  .strict()
63
63
  .meta({ id: "McpToolSettings" });
64
- /** Per-tool settings keyed by the server's tool names, `"*"` for the rest (R2b C9, C10). */
64
+ /** Per-tool settings keyed by the server's tool names, `"*"` for the rest. */
65
65
  const mcpServerSettings = {
66
66
  deferred: z.boolean().optional(),
67
67
  tools: z.record(z.string().min(1), mcpToolSettingsSchema).optional(),
@@ -208,13 +208,13 @@ const removedFieldError = (removedFields) => (issue) => {
208
208
  return removed === undefined ? undefined : removedFields[removed];
209
209
  };
210
210
  /**
211
- * An environment variable name a shell secret or plain variable may take (R2c, D50): a POSIX
211
+ * An environment variable name a shell secret or plain variable may take: a POSIX
212
212
  * name, of any length (POSIX and Linux set none; a request's body bounds it). Names the sandbox
213
213
  * needs for itself (the proxy, the trust store, `PATH`, `HOME`) and `NYLORUN_*` are reserved.
214
214
  */
215
215
  export const ENVIRONMENT_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
216
216
  /**
217
- * What an agent needs of the Environment its session opens on (protocol 14, D65), checked when a
217
+ * What an agent needs of the Environment its session opens on (protocol 14), checked when a
218
218
  * session opens (`409 environment_unsuitable`). `sandbox`: `any` needs kind `virtual` or `pod`,
219
219
  * `pod` needs kind `pod`, `none` needs nothing. `secrets`: names its skills' scripts read, which
220
220
  * the Environment's vault must hold. The agent names no Environment: the app still maps.
@@ -495,7 +495,7 @@ const resourcesSchema = z
495
495
  */
496
496
  const AGENT_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*(?:\/[A-Za-z0-9][A-Za-z0-9._-]*)*$/;
497
497
  /**
498
- * An identifier's grammar is the protocol's (B15): it crosses the Runtime API, tokens and grants
498
+ * An identifier's grammar is the protocol's: it crosses the Runtime API, tokens and grants
499
499
  * and means the same in every installation, so its length is a constant of the protocol, not a
500
500
  * setting.
501
501
  */
@@ -553,7 +553,7 @@ export const EnvironmentLabelsSchema = z.record(z.string().regex(LABEL_KEY_PATTE
553
553
  }), z.string().regex(LABEL_VALUE_PATTERN, {
554
554
  message: "Label values are printable ASCII characters",
555
555
  }));
556
- /** A harness id (track R4): what a harness names itself in `hello`. */
556
+ /** A harness id: what a harness names itself in `hello`. */
557
557
  export const HarnessIdSchema = z.string().regex(HARNESS_ID_PATTERN, {
558
558
  message: "harness must be a harness id: lowercase letters, digits and dashes, starting with a letter",
559
559
  });
@@ -608,7 +608,7 @@ const relativeFilePath = z
608
608
  .refine((value) => !value.startsWith("/") && !value.includes("\0") && value.split("/").every((segment) => segment !== "" && segment !== "." && segment !== ".."), { message: "a file's path is relative, without empty, . or .. segments" });
609
609
  /**
610
610
  * One input file entry (pods only): an artifact version copied to `path` (a file artifact, or a
611
- * folder's files under it), or (Q6) files by content hash, each `sha256:<hex>` of a definition
611
+ * folder's files under it), or files by content hash, each `sha256:<hex>` of a definition
612
612
  * file the Tenant holds (`PUT /v1/files/sha256:<hex>`, at most 2 GiB each), copied under `path`
613
613
  * at its relative path. A manifest by hash moves to another Tenant with its files.
614
614
  */
@@ -647,7 +647,7 @@ export const AgentManifestNameSchema = z
647
647
  .meta({ description: "An agent manifest's name, such as `triage`" });
648
648
  /**
649
649
  * Which agent manifest an Agent is made from: `name` (tracking: the latest version when the Agent
650
- * is created; track T3 moves it on) or `name@n` (pinned to version `n`).
650
+ * is created, and each version saved later) or `name@n` (pinned to version `n`).
651
651
  */
652
652
  export function parseAgentManifestRef(ref) {
653
653
  const at = ref.lastIndexOf("@");
@@ -737,8 +737,8 @@ const runtimeFields = {
737
737
  * the live instance of one version of an agent manifest: `manifest: "name"` records that it
738
738
  * tracks the manifest (its latest version, and every version saved later) and `"name@n"` that it
739
739
  * is pinned to one; the version it runs is `resolvedVersion`. On an existing Agent, `labels`
740
- * replace its labels, `owner` sets or clears its owner guard, and `manifest` moves it (track T3,
741
- * D73): to another version of its manifest, tracking or pinned. A move changes no data: its id,
740
+ * replace its labels, `owner` sets or clears its owner guard, and `manifest` moves it:
741
+ * to another version of its manifest, tracking or pinned. A move changes no data: its id,
742
742
  * disk, vault and sessions stay. A harness-only change applies at once; a runtime change of a pod
743
743
  * waits for its next start; one that adds a required secret waits for its value. Its manifest's
744
744
  * name, kind, harness and storage are fixed (`409 agent_fixed_field`); fork it to change them.
@@ -769,9 +769,10 @@ export const PutAgentRequestSchema = z
769
769
  })
770
770
  .strict();
771
771
  /**
772
- * What an Agent's environment runs: its manifest version's runtime section resolved against the
773
- * Tenant's limits when the Agent was made, with the harness that runs its loop. It never changes
774
- * after that.
772
+ * What an Agent's environment runs: the runtime section of the manifest version it runs, resolved
773
+ * against the Tenant's limits when the Agent was made or moved to that version, with the harness
774
+ * that runs its loop. A move to another version changes it; its kind, harness and storage never
775
+ * change.
775
776
  */
776
777
  export const EnvironmentRecipeSchema = z
777
778
  .object({
@@ -788,7 +789,7 @@ export const EnvironmentRecipeSchema = z
788
789
  secrets: z.lazy(() => EnvironmentSecretSlotsSchema).optional(),
789
790
  })
790
791
  .strict();
791
- /** A session on an Agent, as the Agent's view lists it: none is special (D71). */
792
+ /** A session on an Agent, as the Agent's view lists it: none is special. */
792
793
  export const AgentSessionSchema = z
793
794
  .object({
794
795
  id: z.string(),
@@ -818,8 +819,8 @@ export const AgentPodViewSchema = z
818
819
  /** Why it failed, or was lost. */
819
820
  reason: z.string().optional(),
820
821
  /**
821
- * The workload image by digest (`repo@sha256:…`), pinned the first time a pod was ready
822
- * (Q14): every later pod runs it. Absent before then, or for an image with no repository.
822
+ * The workload image by digest (`repo@sha256:…`), pinned the first time a pod was ready:
823
+ * every later pod runs it. Absent before then, or for an image with no repository.
823
824
  */
824
825
  imageDigest: z.string().optional(),
825
826
  })
@@ -833,7 +834,7 @@ export const COMPUTE_STATES = ["ready", "creating", "running", "stopped"];
833
834
  /**
834
835
  * An Agent's state (protocol 16), derived when it is read, the first that holds:
835
836
  *
836
- * - `paused`: its desired state is `off` (nothing in protocol 16 sets it; track T6 adds the control).
837
+ * - `paused`: its desired state is `off` (nothing in protocol 16 sets it).
837
838
  * - `failing`: its compute failed or was lost, or a session's latest finished turn failed.
838
839
  * - `input_required`: a session waits on a person (an approval or interaction, or an uncertain
839
840
  * effect), even while another works.
@@ -866,7 +867,7 @@ export const AgentViewSchema = z
866
867
  /** Whether `manifest` tracks the manifest's latest version or pins one. */
867
868
  tracking: z.enum(["tracking", "pinned"]),
868
869
  /**
869
- * Track T3: the version it moves to while it is outdated, else `null`. It waits for a value of
870
+ * The version it moves to while it is outdated, else `null`. It waits for a value of
870
871
  * each required secret the version adds (`waitingFor: "secrets"`) or for its pod's next start
871
872
  * (`"start"`); turns run `resolvedVersion` meanwhile.
872
873
  */
@@ -896,9 +897,9 @@ export const AgentViewSchema = z
896
897
  state: z.string().meta({ description: "working, sleeping, input_required, failing or paused; an open set" }),
897
898
  /** Every state that holds, with the session behind each: what made `state` first. */
898
899
  attention: z.array(AgentAttentionSchema),
899
- /** `on`, or `off` once paused (track T6). */
900
+ /** `on`, or `off` once paused. */
900
901
  desired: z.enum(["on", "off"]),
901
- /** When its next trigger fires: the earliest next run of its active triggers (D74), or `null`. */
902
+ /** When its next trigger fires: the earliest next run of its active triggers, or `null`. */
902
903
  nextWakeAt: z.string().nullable(),
903
904
  compute: z
904
905
  .object({
@@ -1015,20 +1016,20 @@ export const AgentDiskVersionsSchema = z
1015
1016
  export const DeleteAgentResponseSchema = z
1016
1017
  .object({ id: z.string(), deleted: z.boolean() })
1017
1018
  .strict();
1018
- /** A turn that was running on an Agent when one of its connections opened (D67). */
1019
+ /** A turn that was running on an Agent when one of its connections opened. */
1019
1020
  export const EgressRunningTurnSchema = z
1020
1021
  .object({ sessionId: z.string(), turnId: z.string() })
1021
1022
  .strict();
1022
1023
  /**
1023
- * One connection a pod Agent opened through egress-gate (track R7, Q6): written when it closes,
1024
- * or at once when the gate refused it, to the Agent's own stream as `agent.egress` (D67). The
1024
+ * One connection a pod Agent opened through egress-gate: written when it closes,
1025
+ * or at once when the gate refused it, to the Agent's own stream as `agent.egress`. The
1025
1026
  * connection is the Agent's: its egress token names the pod, and the Agent's sessions run turns
1026
- * in parallel (D66). `runningTurns` lists the turns active on it as the connection opened, at
1027
+ * in parallel. `runningTurns` lists the turns active on it as the connection opened, at
1027
1028
  * most 16, as context and never as the owner.
1028
1029
  *
1029
1030
  * `startedAt` is the gate's clock at CONNECT and `durationMs` runs from there to the close, so
1030
1031
  * the span is the gate's own measurement. `bytesUp` is what the sandbox sent, `bytesDown` what it
1031
- * got. `mode: "credential"` is a host an `environment_secret` is bound to (R2c): the gate read
1032
+ * got. `mode: "credential"` is a host an `environment_secret` is bound to: the gate read
1032
1033
  * each request (`requests`) and set a credential on it (`credentialIds`, ids only). It never
1033
1034
  * carries a header value, a URL path or a body.
1034
1035
  */
@@ -1056,7 +1057,7 @@ export const EgressConnectionPayloadSchema = z
1056
1057
  /** The schema id of an Agent's lifecycle events (its stream in the record). */
1057
1058
  export const AGENT_EVENT_SCHEMA = "nylorun.agent-event/1";
1058
1059
  /**
1059
- * `memory.updated` (track T5, D72): the session's agent changed the Agent's memory with its
1060
+ * `memory.updated`: the session's agent changed the Agent's memory with its
1060
1061
  * `memory` tool: each memory the call changed, what changed it and its version after. The Agent's
1061
1062
  * stream carries the same as `agent.memory_updated`, with the session.
1062
1063
  */
@@ -1106,7 +1107,7 @@ export const AGENT_EVENT_PAYLOADS = {
1106
1107
  manifest: z
1107
1108
  .object({ name: z.string(), version: z.number().int().positive(), tracking: z.enum(["tracking", "pinned"]) })
1108
1109
  .strict(),
1109
- /** The Agent it was forked from, and the disk version it started from (Q15). */
1110
+ /** The Agent it was forked from, and the disk version it started from. */
1110
1111
  forkedFrom: z
1111
1112
  .object({ agent: z.string(), disk: z.number().int().positive().nullable() })
1112
1113
  .strict()
@@ -1143,7 +1144,7 @@ export const AGENT_EVENT_PAYLOADS = {
1143
1144
  })
1144
1145
  .passthrough(),
1145
1146
  /**
1146
- * Asked to move to version `to` of its manifest, which waits (track T3): for a value of each
1147
+ * Asked to move to version `to` of its manifest, which waits: for a value of each
1147
1148
  * required secret it adds (`secrets`), or for its pod's next start (`start`).
1148
1149
  */
1149
1150
  "agent.outdated": z
@@ -1153,13 +1154,13 @@ export const AGENT_EVENT_PAYLOADS = {
1153
1154
  waitingFor: z.enum(["secrets", "start"]),
1154
1155
  })
1155
1156
  .passthrough(),
1156
- /** Runs version `to` of its manifest now: turns that start from here run it (track T3). */
1157
+ /** Runs version `to` of its manifest now: turns that start from here run it. */
1157
1158
  "agent.version_changed": z
1158
1159
  .object({ from: z.number().int().positive(), to: z.number().int().positive() })
1159
1160
  .passthrough(),
1160
1161
  /**
1161
1162
  * Its pod did not start on version `to` (its setup failed, the pod failed, or it took longer
1162
- * than the Host allows): it went back to version `from`, with its disk as it was (track T3).
1163
+ * than the Host allows): it went back to version `from`, with its disk as it was.
1163
1164
  */
1164
1165
  "agent.start_failed": z
1165
1166
  .object({
@@ -1169,7 +1170,7 @@ export const AGENT_EVENT_PAYLOADS = {
1169
1170
  reverted: z.boolean(),
1170
1171
  })
1171
1172
  .passthrough(),
1172
- /** A connection through egress-gate, with the turns running as it opened (D67). */
1173
+ /** A connection through egress-gate, with the turns running as it opened. */
1173
1174
  "agent.egress": EgressConnectionPayloadSchema,
1174
1175
  /** A trigger fired, or was run by hand: the run and what came of it (`TriggerRunSchema`). */
1175
1176
  "agent.run": z
@@ -1209,7 +1210,7 @@ export const ListAgentEventsResponseSchema = z
1209
1210
  /**
1210
1211
  * `PUT /v1/sessions/{id}` (protocol 16): the session's Agent, owner and info. The session runs on
1211
1212
  * the Agent for its life (its sandbox, its vault's credentials) and pins the manifest version the
1212
- * Agent runs when it opens. No session is special (D71): an app that keeps one conversation
1213
+ * Agent runs when it opens. No session is special: an app that keeps one conversation
1213
1214
  * going reuses its id.
1214
1215
  */
1215
1216
  export const PutSessionRequestSchema = z
@@ -1221,7 +1222,7 @@ export const PutSessionRequestSchema = z
1221
1222
  info: jsonObject.optional(),
1222
1223
  })
1223
1224
  .strict();
1224
- /** The hosts a harness can run on (blueprint D38). */
1225
+ /** The hosts a harness can run on. */
1225
1226
  export const PLACEMENT_HOSTS = ["harness-container", "sandbox"];
1226
1227
  /**
1227
1228
  * A Tenant's Environment settings (Tenant setting `environments.config`): the limits every
@@ -1253,7 +1254,7 @@ export const TenantEnvironmentsConfigSchema = z
1253
1254
  .strict()
1254
1255
  .optional(),
1255
1256
  /**
1256
- * Where each harness may run (blueprint D38), by harness id (`nylorun`, or `*` for the rest):
1257
+ * Where each harness may run, by harness id (`nylorun`, or `*` for the rest):
1257
1258
  * `harness-container` (the Runtime's harness) and `sandbox` (the engine in a pod).
1258
1259
  * Default `{ "*": { hosts: ["harness-container", "sandbox"] } }`. Checked when a session
1259
1260
  * opens; a host left out is refused (`placement_refused`). `"*": { hosts: [] }` refuses every
@@ -1282,7 +1283,7 @@ const CredentialHeaderValueSchema = z
1282
1283
  .string()
1283
1284
  .min(1)
1284
1285
  .refine((value) => !/[\r\n\0]/.test(value), "A header value has no CR, LF or NUL");
1285
- /** A `headers` credential's map (Q6): one or more headers sent on every request. */
1286
+ /** A `headers` credential's map: one or more headers sent on every request. */
1286
1287
  const CredentialHeadersSchema = z
1287
1288
  .record(CredentialHeaderNameSchema, CredentialHeaderValueSchema)
1288
1289
  .refine((value) => Object.keys(value).length > 0, "At least one header is required")
@@ -1290,7 +1291,7 @@ const CredentialHeadersSchema = z
1290
1291
  /** A loopback host as a URL's `hostname` names it: plain `http` reaches only these. */
1291
1292
  export const LOOPBACK_HOSTS = /^(?:localhost|127(?:\.\d{1,3}){3}|\[::1\])$/i;
1292
1293
  /**
1293
- * `via` (R2b C2, Q11): where this installation reaches the credential's server, such as a
1294
+ * `via`: where this installation reaches the credential's server, such as a
1294
1295
  * gateway's endpoint for it. An absolute `https` URL (`http` only to a loopback host), with no
1295
1296
  * userinfo, query string or fragment. Credentials are still matched by the URL the manifest
1296
1297
  * names; `via` changes only where the request goes.
@@ -1314,7 +1315,7 @@ export const CredentialViaSchema = z.string().superRefine((value, ctx) => {
1314
1315
  ctx.addIssue({ code: "custom", message: "via may not carry a fragment" });
1315
1316
  });
1316
1317
  /**
1317
- * The identity header (R2b C2, Q1–Q3): each request carries the session owner's subject in
1318
+ * The identity header: each request carries the session owner's subject in
1318
1319
  * `header`, for a gateway that keeps each person's accounts. A session with no person as its
1319
1320
  * owner (the reserved `installation`) sends none.
1320
1321
  */
@@ -1356,13 +1357,13 @@ const EnvironmentNameSchema = z
1356
1357
  .regex(ENVIRONMENT_NAME_PATTERN, "An environment variable name is a letter or _ followed by letters, digits or _")
1357
1358
  .refine((name) => !isReservedEnvironmentName(name), "That environment variable name is reserved");
1358
1359
  /**
1359
- * The value a sandbox sees for every `environment_secret` (R2c, D50): never the secret. Word
1360
+ * The value a sandbox sees for every `environment_secret`: never the secret. Word
1360
1361
  * characters only, so CLIs that check a token's format before sending it (the Vercel CLI
1361
1362
  * refuses anything matching `\W`) still send the request egress-gate sets the header on.
1362
1363
  */
1363
1364
  export const ENVIRONMENT_SECRET_SENTINEL = "nylorun_managed";
1364
1365
  /**
1365
- * How egress-gate writes an `environment_secret` into a request (R2c, D50): one header, set on
1366
+ * How egress-gate writes an `environment_secret` into a request: one header, set on
1366
1367
  * every request to a bound host. `format` is text with `{value}` once, optionally inside a
1367
1368
  * `{base64:…}` group, for example `Bearer {value}` (the default),
1368
1369
  * `Basic {base64:x-access-token:{value}}` or `{value}`.
@@ -1409,13 +1410,13 @@ const EnvironmentValueSchema = z
1409
1410
  .refine((value) => !/[\r\n\0]/.test(value), "A value has no CR, LF or NUL");
1410
1411
  /**
1411
1412
  * The name of a credential for a tool (`bearer` or `headers`): a label of 1–64 characters.
1412
- * An identifier's grammar is the protocol's (B15): it crosses the Runtime API, tokens and grants
1413
+ * An identifier's grammar is the protocol's: it crosses the Runtime API, tokens and grants
1413
1414
  * and means the same in every installation, so its length is a constant of protocol 15, not a
1414
1415
  * setting.
1415
1416
  */
1416
1417
  export const TOOL_SECRET_NAME_PATTERN = /^[A-Za-z0-9._-]{1,64}$/;
1417
1418
  /**
1418
- * `PUT /v1/agents/{agentId}/secrets/{name}` (D56): creates or replaces one credential
1419
+ * `PUT /v1/agents/{agentId}/secrets/{name}`: creates or replaces one credential
1419
1420
  * in the Environment's vault. For `environment_secret` and `environment_variable` the name is
1420
1421
  * the variable's name (a POSIX name, not reserved); for `bearer` and `headers` it is a label.
1421
1422
  * The same name and type keeps the credential and re-seals its value and binding; another type
@@ -1460,7 +1461,7 @@ export const PutAgentSecretRequestSchema = z.discriminatedUnion("type", [
1460
1461
  .strict(),
1461
1462
  ]);
1462
1463
  /**
1463
- * A secret write on an Environment whose manifest declares the secret's slot (D64): only the
1464
+ * A secret write on an Environment whose manifest declares the secret's slot: only the
1464
1465
  * value, `value` (or `headers` for a `headers` slot). Its type and binding come from the slot.
1465
1466
  */
1466
1467
  export const PutAgentSecretValueRequestSchema = z
@@ -1494,7 +1495,7 @@ const slotBase = {
1494
1495
  description: z.string().optional(),
1495
1496
  };
1496
1497
  /**
1497
- * One secret an Environment of a kind needs (D64): its type and binding, never its value. The
1498
+ * One secret an Environment of a kind needs: its type and binding, never its value. The
1498
1499
  * value is written into each Environment's vault (`PUT /v1/agents/{id}/secrets/{name}`
1499
1500
  * with `{ value }`, or `{ headers }` for `headers`), and the binding comes from here.
1500
1501
  */
@@ -1560,7 +1561,7 @@ const harnessLoopField = definitionJson
1560
1561
  .optional()
1561
1562
  .meta({ description: "The harness's own settings, passed to it in turn.start; the Runtime never reads them" });
1562
1563
  /**
1563
- * `harness.memory` (track T5, D72): turns the Agent's memory on. Its `access` holds in every turn,
1564
+ * `harness.memory`: turns the Agent's memory on. Its `access` holds in every turn,
1564
1565
  * whoever starts it; `instructions` follow the engine's own memory rules.
1565
1566
  */
1566
1567
  const harnessMemoryField = z
@@ -1573,7 +1574,7 @@ const harnessMemoryField = z
1573
1574
  .meta({ description: "What this agent should remember, after the engine's own memory rules" }),
1574
1575
  })
1575
1576
  .optional()
1576
- .meta({ description: "The Agent's memory: Markdown files under /memories it keeps across sessions (D72)" });
1577
+ .meta({ description: "The Agent's memory: Markdown files under /memories it keeps across sessions" });
1577
1578
  /** Fields the harness section refuses with where they went. */
1578
1579
  const REMOVED_HARNESS_FIELDS = Object.freeze({
1579
1580
  requires: "harness.requires left the API in agent manifest v8: the Runtime checks the harness against the runtime section when the manifest is saved. Keep requires in harness.manifest.json, where the CLI checks it",
@@ -1659,7 +1660,7 @@ export const WorkflowHarnessSectionSchema = workflowHarnessObject.meta({
1659
1660
  /** The `harness` section: an agent's loop, or a flow (`kind: "workflow"`). */
1660
1661
  export const HarnessSectionSchema = z.union([WorkflowHarnessSectionSchema, AgentHarnessSectionSchema]);
1661
1662
  /**
1662
- * A trigger's id in `runtime.triggers` (track T4, D74): 1–64 letters, digits, `.`, `_` and `-`,
1663
+ * A trigger's id in `runtime.triggers`: 1–64 letters, digits, `.`, `_` and `-`,
1663
1664
  * starting with a letter or digit. The map key; it names the trigger in routes and runs.
1664
1665
  */
1665
1666
  export const TriggerIdSchema = z
@@ -1668,17 +1669,17 @@ export const TriggerIdSchema = z
1668
1669
  message: "A trigger id is 1-64 letters, digits, '.', '_' and '-', starting with a letter or digit",
1669
1670
  })
1670
1671
  .meta({ description: "A trigger's id, such as `hourly-check`" });
1671
- /** The signature schemes a webhook trigger verifies (D75): Standard Webhooks only in T4. */
1672
+ /** The signature schemes a webhook trigger verifies: Standard Webhooks only. */
1672
1673
  export const WEBHOOK_SCHEMES = ["standard-webhooks"];
1673
1674
  /**
1674
- * One trigger of an agent manifest's `runtime.triggers` (track T4, D74): exactly one of
1675
+ * One trigger of an agent manifest's `runtime.triggers`: exactly one of
1675
1676
  * `schedule` (five-field cron, minute granularity, in `timezone`, an IANA name, default UTC), `at`
1676
1677
  * (one run at an RFC 3339 time with an offset) or `webhook` (a webhook endpoint verified with the
1677
1678
  * named scheme), plus the `session` each run goes to and the author's `prompt`.
1678
1679
  *
1679
1680
  * `session` is a session id of the Agent, opened on the trigger's first run if it does not
1680
- * exist, or `"new"` for a new session per run (`run-<runId>`). The Runtime keeps no main session
1681
- * (D71). The cron's smallest gap, the `at` time, the prompt's length and how many triggers a
1681
+ * exist, or `"new"` for a new session per run (`run-<runId>`). The Runtime keeps no main session.
1682
+ * The cron's smallest gap, the `at` time, the prompt's length and how many triggers a
1682
1683
  * manifest holds are checked against the Tenant's Runtime limits when it is saved.
1683
1684
  */
1684
1685
  export const TriggerSchema = z
@@ -1701,14 +1702,14 @@ export const TriggerSchema = z
1701
1702
  ctx.addIssue({ code: "custom", path: ["timezone"], message: "timezone goes with schedule" });
1702
1703
  })
1703
1704
  .meta({ id: "Trigger" });
1704
- /** What a trigger is: the field it has, or `wake` for a session's own booking (D77). */
1705
+ /** What a trigger is: the field it has, or `wake` for a session's own booking. */
1705
1706
  export const TRIGGER_KINDS = ["schedule", "at", "webhook", "wake"];
1706
1707
  /** A trigger's kind, from its manifest entry. */
1707
1708
  export function triggerKindOf(trigger) {
1708
1709
  return trigger.schedule !== undefined ? "schedule" : trigger.at !== undefined ? "at" : "webhook";
1709
1710
  }
1710
1711
  /**
1711
- * A trigger's status on an Agent (D74): `active` fires, `paused` does not (`pausedReason`
1712
+ * A trigger's status on an Agent: `active` fires, `paused` does not (`pausedReason`
1712
1713
  * `manual`, or `new` for one an upgrade added), `completed` is an `at` that ran.
1713
1714
  */
1714
1715
  export const TRIGGER_STATUSES = ["active", "paused", "completed"];
@@ -1728,7 +1729,7 @@ export const TriggerViewSchema = z
1728
1729
  nextRunAt: z.string().nullable(),
1729
1730
  lastRunAt: z.string().nullable(),
1730
1731
  /**
1731
- * A webhook trigger's endpoint (D75): `POST` Standard Webhooks deliveries to it. The origin is
1732
+ * A webhook trigger's endpoint: `POST` Standard Webhooks deliveries to it. The origin is
1732
1733
  * the one this read reached.
1733
1734
  */
1734
1735
  webhookUrl: z.string().optional(),
@@ -1738,7 +1739,7 @@ export const TriggerViewSchema = z
1738
1739
  .strict();
1739
1740
  export const TriggerListSchema = z.object({ triggers: z.array(TriggerViewSchema) }).strict();
1740
1741
  /**
1741
- * What a run came to (D74): `started` a turn, `queued` a message behind a running turn,
1742
+ * What a run came to: `started` a turn, `queued` a message behind a running turn,
1742
1743
  * `skipped` (nothing started: `overlap`, `rate_limited`, `paused`) or `failed` (`queue_full`,
1743
1744
  * `session_conflict`, `agent_unavailable`).
1744
1745
  */
@@ -1766,7 +1767,7 @@ export const TriggerRunPageSchema = z
1766
1767
  .object({ runs: z.array(TriggerRunSchema), nextCursor: z.string().nullable() })
1767
1768
  .strict();
1768
1769
  /**
1769
- * `POST /v1/agents/{id}/triggers/{triggerId}/secret` (D75): a webhook trigger's new signing secret,
1770
+ * `POST /v1/agents/{id}/triggers/{triggerId}/secret`: a webhook trigger's new signing secret,
1770
1771
  * in the Standard Webhooks format (`whsec_` and 32 random bytes in base64), shown this once. It
1771
1772
  * replaces the one before at once.
1772
1773
  */
@@ -1780,7 +1781,7 @@ export const WebhookAcceptedResponseSchema = z
1780
1781
  /** `POST /v1/agents/{id}/triggers/{triggerId}/run`: the run it made. */
1781
1782
  export const RunTriggerResponseSchema = z.object({ run: TriggerRunSchema }).strict();
1782
1783
  /**
1783
- * One of an Agent's memories (track T5, D72), as `GET /v1/agents/{id}/memories` lists it: its
1784
+ * One of an Agent's memories, as `GET /v1/agents/{id}/memories` lists it: its
1784
1785
  * path under `/memories`, size, content hash (the precondition a `PUT` may send), the
1785
1786
  * `description` of its frontmatter when it has one, and its version, which every change bumps.
1786
1787
  */
@@ -1843,8 +1844,8 @@ export const MemoryVersionPageSchema = z
1843
1844
  /**
1844
1845
  * What the Runtime provides around the loop: the `runtime` section of agent manifest v8, with
1845
1846
  * environment manifest v1's fields but its identity and its `harness` (now `harness.id`).
1846
- * `triggers` (track T4, D74) start the Agent's turns with no client connected; `selfWake` offers
1847
- * the agent `schedule_wake`, which books its session's next turn (D77).
1847
+ * `triggers` start the Agent's turns with no client connected; `selfWake` offers
1848
+ * the agent `schedule_wake`, which books its session's next turn.
1848
1849
  */
1849
1850
  const runtimeSectionObject = z
1850
1851
  .strictObject({
@@ -1863,16 +1864,16 @@ const runtimeSectionObject = z
1863
1864
  triggers: z
1864
1865
  .record(TriggerIdSchema, TriggerSchema)
1865
1866
  .optional()
1866
- .meta({ description: "What starts the Agent's turns with no client connected, by trigger id (D74)" }),
1867
+ .meta({ description: "What starts the Agent's turns with no client connected, by trigger id" }),
1867
1868
  selfWake: z
1868
1869
  .boolean()
1869
1870
  .optional()
1870
- .meta({ description: "Offer the agent schedule_wake: it books its session's next turn itself (D77)" }),
1871
+ .meta({ description: "Offer the agent schedule_wake: it books its session's next turn itself" }),
1871
1872
  }, { error: removedFieldError(REMOVED_RUNTIME_SECTION_FIELDS) })
1872
1873
  .meta({ id: "RuntimeSection" });
1873
1874
  export const RuntimeSectionSchema = runtimeSectionObject;
1874
1875
  /**
1875
- * Agent manifest v8 (protocol 16, track T2): one versioned document with what runs inside the
1876
+ * Agent manifest v8 (protocol 16): one versioned document with what runs inside the
1876
1877
  * agent loop (`harness`) and what the Runtime provides around it (`runtime`), saved at
1877
1878
  * `PUT /v1/agent-manifests/{name}`. Without `runtime`, an Agent made from it is kind `none`.
1878
1879
  * The Runtime also checks the two sections against each other when it is saved (`sectionGaps`).
@@ -2010,7 +2011,7 @@ export const AgentManifestChangeSchema = z
2010
2011
  * `PUT /v1/agent-manifests/{name}?dryRun=true`: what saving it would do, with nothing saved.
2011
2012
  * `errors` lists every reason the Runtime would refuse it: the gaps between its sections, the
2012
2013
  * Tenant's limits, its files; a save with errors is refused. A save moves every Agent that tracks
2013
- * the manifest (track T3): `moves` counts them by when the new version applies. `behind` counts
2014
+ * the manifest: `moves` counts them by when the new version applies. `behind` counts
2014
2015
  * the Agents that stay on an older version: pinned ones, and tracking ones it cannot move.
2015
2016
  */
2016
2017
  export const AgentManifestPlanSchema = z
@@ -2047,7 +2048,7 @@ export const DeleteAgentManifestResponseSchema = z
2047
2048
  .object({ name: z.string(), deleted: z.boolean() })
2048
2049
  .strict();
2049
2050
  /**
2050
- * `POST /v1/agents/{id}/fork` (Q15): copies an Agent, with its disk and vault, into a new one,
2051
+ * `POST /v1/agents/{id}/fork`: copies an Agent, with its disk and vault, into a new one,
2051
2052
  * made from `manifest` (default the source's manifest at its latest version): how an Agent
2052
2053
  * changes what is fixed for its life (its kind, harness, storage or manifest). The source keeps
2053
2054
  * what it runs, its disk and its sessions.
@@ -2095,7 +2096,7 @@ export const AgentForkPlanSchema = z
2095
2096
  changes: z.array(z.object({ path: z.string(), from: z.unknown().optional(), to: z.unknown().optional() }).strict()),
2096
2097
  /** The source's sessions: they stay on it. */
2097
2098
  sessions: z.number().int().nonnegative(),
2098
- /** The source's memories (track T5): copied as they are now, each at version 1, with no history. */
2099
+ /** The source's memories: copied as they are now, each at version 1, with no history. */
2099
2100
  memories: z.number().int().nonnegative(),
2100
2101
  })
2101
2102
  .strict();
@@ -2105,7 +2106,7 @@ export const ForkAgentResponseSchema = z.union([
2105
2106
  z.object({ agent: AgentViewSchema, plan: AgentForkPlanSchema }).strict(),
2106
2107
  ]);
2107
2108
  /**
2108
- * `PUT /v1/agents/{id}?dryRun=true` on an existing Agent (track T3): what moving it to the
2109
+ * `PUT /v1/agents/{id}?dryRun=true` on an existing Agent: what moving it to the
2109
2110
  * version `manifest` names would do, with nothing changed. `applies`: `none` (it runs that
2110
2111
  * version), `now` (turns that start from here run it), `next_start` (a runtime change: its pod's
2111
2112
  * next start applies it), `secrets` (it waits for a value of each of `missingSecrets`), or
@@ -2142,7 +2143,7 @@ export const AgentMovePlanSchema = z
2142
2143
  })
2143
2144
  .strict();
2144
2145
  /**
2145
- * `POST /v1/agents/{id}/restart` (track T3): applies a pending version now. A running pod stops,
2146
+ * `POST /v1/agents/{id}/restart`: applies a pending version now. A running pod stops,
2146
2147
  * so the next turn starts it on the version (a stopped one starts at once); `retry` first moves
2147
2148
  * it to the version that failed to start (`failedVersion`) again.
2148
2149
  */
@@ -2248,7 +2249,7 @@ export const ListAgentSecretsResponseSchema = z
2248
2249
  /** The MCP transports a preview speaks: a manifest's remote server types. */
2249
2250
  export const MCP_PREVIEW_TYPES = ["streamable-http", "sse"];
2250
2251
  /**
2251
- * `POST /v1/tenant/mcp/preview` (R2b C12): what a remote MCP server offers, before an agent
2252
+ * `POST /v1/tenant/mcp/preview`: what a remote MCP server offers, before an agent
2252
2253
  * names it. The Runtime connects with the credential for `url` in the vault of Agent `agentId`
2253
2254
  * (none without one), lists the tools and closes the connection; it never calls a tool.
2254
2255
  */
@@ -2287,7 +2288,7 @@ export const McpPreviewToolSchema = z
2287
2288
  /** The server's own name for the tool. */
2288
2289
  serverToolName: z.string(),
2289
2290
  /**
2290
- * What the model would call it as Nylorun's engine names MCP tools (R2b C6); absent when the
2291
+ * What the model would call it as Nylorun's engine names MCP tools; absent when the
2291
2292
  * engine leaves the tool out (its input schema is not one it can use). A harness of your own
2292
2293
  * names tools itself.
2293
2294
  */
@@ -2300,7 +2301,7 @@ export const McpPreviewToolSchema = z
2300
2301
  })
2301
2302
  .strict();
2302
2303
  /**
2303
- * A preview (R2b C12). A server that answered `401` is `authRequired`, with its RFC 9728
2304
+ * A preview. A server that answered `401` is `authRequired`, with its RFC 9728
2304
2305
  * protected-resource metadata when it publishes any: it needs a person's sign-in or a key the
2305
2306
  * Environment's vault does not hold, so reach it with a key or through a gateway (`via`).
2306
2307
  */
@@ -2317,7 +2318,7 @@ export const McpPreviewSchema = z
2317
2318
  /** The server's instructions from `initialize`. */
2318
2319
  instructions: z.string().optional(),
2319
2320
  tools: z.array(McpPreviewToolSchema),
2320
- /** Tools Nylorun's engine names otherwise than `server__tool` (R2b C6). */
2321
+ /** Tools Nylorun's engine names otherwise than `server__tool`. */
2321
2322
  renamed: z.array(z.object({ serverToolName: z.string(), name: z.string() }).strict()),
2322
2323
  authRequired: z
2323
2324
  .object({
@@ -2396,7 +2397,7 @@ const commandBase = {
2396
2397
  idempotencyKey: IdempotencyKeySchema,
2397
2398
  };
2398
2399
  /**
2399
- * What a message to a busy session does (protocol 17, D76): `queue` waits for the running turn to
2400
+ * What a message to a busy session does (protocol 17): `queue` waits for the running turn to
2400
2401
  * end and starts the next one; `reject` is refused with `409 session_busy`. A protocol 17 client's
2401
2402
  * default is `queue`, a protocol 16 client's `reject`.
2402
2403
  */
@@ -2485,11 +2486,11 @@ export const SessionEventBodySchema = SessionCommandSchema;
2485
2486
  /** The envelope every session event carries (`nylorun.event/2`, Durable Streams §9.5). */
2486
2487
  export const EVENT_SCHEMA = "nylorun.event/2";
2487
2488
  /**
2488
- * Who wrote an event (track R4, R4.9): the writer says so, not the event's type. `client` is a
2489
+ * Who wrote an event: the writer says so, not the event's type. `client` is a
2489
2490
  * command over the Runtime API (its `principal` says who sent it), `core` is core's own logic
2490
2491
  * (settle, sweeps, the flow host, exports, the tools core serves), `harness` is what a harness
2491
2492
  * reported (`source.id` is its harness id, `runId` its run), and the gates are themselves.
2492
- * `loop` and `api` are what events written before R4 say.
2493
+ * `loop` and `api` are what older events say.
2493
2494
  */
2494
2495
  export const EventSourceKindSchema = z.enum([
2495
2496
  "client",
@@ -2522,10 +2523,10 @@ export const EvidenceClassSchema = z.enum([
2522
2523
  "claimed",
2523
2524
  "asserted",
2524
2525
  ]);
2525
- /** A command's sender (R4.9): from the request's credential, never from its body. */
2526
+ /** A command's sender: from the request's credential, never from its body. */
2526
2527
  export const EventPrincipalSchema = z
2527
2528
  .object({
2528
- /** `trigger`: core, for an Agent's trigger (track T4); its id is the trigger's. */
2529
+ /** `trigger`: core, for an Agent's trigger; its id is the trigger's. */
2529
2530
  kind: z.enum(["application", "subject", "flow-host", "core", "trigger"]),
2530
2531
  id: z.string(),
2531
2532
  })
@@ -2556,7 +2557,7 @@ const eventEnvelope = {
2556
2557
  schemaVersion: z.number().int().positive(),
2557
2558
  source: z.object({ kind: EventSourceKindSchema, id: z.string() }),
2558
2559
  evidence: EvidenceClassSchema,
2559
- /** Who sent a command (`command.*`, a cancel's `turn.cancelled`), from its credential (R4.9). */
2560
+ /** Who sent a command (`command.*`, a cancel's `turn.cancelled`), from its credential. */
2560
2561
  principal: EventPrincipalSchema.optional(),
2561
2562
  trace: z
2562
2563
  .object({
@@ -2626,7 +2627,7 @@ const toolIds = {
2626
2627
  invocationId: z.string().min(1),
2627
2628
  };
2628
2629
  /**
2629
- * When a gate served a call (R7.1): its own start and end, as it measured them. Absent when no
2630
+ * When a gate served a call: its own start and end, as it measured them. Absent when no
2630
2631
  * gate measured the call (a fixture model, a sandbox or core-served tool, a call refused before
2631
2632
  * it was sent).
2632
2633
  */
@@ -2634,7 +2635,7 @@ export const GateTimesSchema = z
2634
2635
  .object({ startedAt: z.string(), endedAt: z.string() })
2635
2636
  .passthrough();
2636
2637
  /**
2637
- * What the Model Gate's meter recorded for a model call (R7.1), from the usage ledger: the
2638
+ * What the Model Gate's meter recorded for a model call, from the usage ledger: the
2638
2639
  * tokens and cost the Runtime counts, beside the `usage` the harness reported. `cachedTokens`
2639
2640
  * and `costUsd` are absent when zero.
2640
2641
  */
@@ -2648,7 +2649,7 @@ export const MeteredUsageSchema = z
2648
2649
  })
2649
2650
  .passthrough();
2650
2651
  /**
2651
- * The timing of a model call's outcome (R7.1), on `message.assistant`, `model.failed` and
2652
+ * The timing of a model call's outcome, on `message.assistant`, `model.failed` and
2652
2653
  * `context.compacted`. `durationMs` is the journal's window, from the intent to the outcome;
2653
2654
  * `gate`, `firstTokenMs` and `meteredUsage` are the meter's, absent when no gate metered the
2654
2655
  * call.
@@ -2690,7 +2691,7 @@ export const AssistantMessagePayloadSchema = z
2690
2691
  ...eventAgent,
2691
2692
  })
2692
2693
  .passthrough();
2693
- /** True when a `message.assistant` said nothing: no text and no tool calls (R7.1). */
2694
+ /** True when a `message.assistant` said nothing: no text and no tool calls. */
2694
2695
  export function isEmptyAssistantMessage(payload) {
2695
2696
  return ((typeof payload.text !== "string" || payload.text === "") &&
2696
2697
  (payload.toolCalls?.length ?? 0) === 0);
@@ -2725,17 +2726,17 @@ export const ContextCompactedPayloadSchema = z
2725
2726
  ...eventAgent,
2726
2727
  })
2727
2728
  .passthrough();
2728
- /** How a tool call ended (R5.1): the tool answered, the Runtime ended it, or a cancel did. */
2729
+ /** How a tool call ended: the tool answered, the Runtime ended it, or a cancel did. */
2729
2730
  export const TOOL_CALL_STATUSES = ["completed", "failed", "cancelled"];
2730
2731
  /**
2731
- * Where a tool call ran (R5.1), its effect's target kind (protocol 15): an MCP server, an HTTP
2732
+ * Where a tool call ran, its effect's target kind (protocol 15): an MCP server, an HTTP
2732
2733
  * tool's URL, the session's sandbox, the harness that runs the turn (`harness`: a tool it runs
2733
2734
  * in its own process, such as our engine's skill, artifact and `tool_search` tools), or the
2734
- * Runtime itself (`runtime`: `schedule_wake`, track T4).
2735
+ * Runtime itself (`runtime`: `schedule_wake`).
2735
2736
  */
2736
2737
  export const TOOL_CALL_KINDS = ["mcp", "http", "sandbox", "harness", "runtime"];
2737
2738
  /**
2738
- * What the Tenant's tool policy did with a tool call (R5 step 2), when it did more than allow
2739
+ * What the Tenant's tool policy did with a tool call, when it did more than allow
2739
2740
  * it: `deny` refused it unsent; `ask` held it for a person, who approved it (`approvedBy`, when
2740
2741
  * known) or denied it.
2741
2742
  */
@@ -2747,7 +2748,7 @@ export const ToolPolicyFactSchema = z
2747
2748
  })
2748
2749
  .passthrough();
2749
2750
  /**
2750
- * `tool.completed`: how one tool call ended, written once per call (R5.1). `status`
2751
+ * `tool.completed`: how one tool call ended, written once per call. `status`
2751
2752
  * `completed`: the tool answered, with its output or the tool error it reported (`error`).
2752
2753
  * `failed`: the Runtime ended the call (`tool.disabled`, `tool.unavailable`, `tool.denied`, or
2753
2754
  * `tool.interrupted` for a call a crash interrupted, which may have run). `cancelled`: the turn
@@ -2757,7 +2758,7 @@ export const ToolPolicyFactSchema = z
2757
2758
  export const ToolCompletedPayloadSchema = z
2758
2759
  .object({
2759
2760
  ...toolIds,
2760
- /** The tool call's effect id (R7.1). */
2761
+ /** The tool call's effect id. */
2761
2762
  effectId: z.string().min(1).optional(),
2762
2763
  /** The name the model called the tool by, as its harness named it: for display. */
2763
2764
  toolName: z.string().min(1),
@@ -2782,7 +2783,7 @@ export const ToolCompletedPayloadSchema = z
2782
2783
  /** From the first send to the outcome; absent when the call never ran. */
2783
2784
  durationMs: z.number().int().nonnegative().optional(),
2784
2785
  /**
2785
- * The Tool Gate's own start and end of the call's last send (R7.1): an MCP or HTTP tool
2786
+ * The Tool Gate's own start and end of the call's last send: an MCP or HTTP tool
2786
2787
  * through the gateway. Absent for a sandbox or core-served tool.
2787
2788
  */
2788
2789
  gate: GateTimesSchema.optional(),
@@ -2793,18 +2794,18 @@ export const ToolCompletedPayloadSchema = z
2793
2794
  code: z.string(),
2794
2795
  message: z.string(),
2795
2796
  /**
2796
- * With `credential_rejected` (R2b C1): the MCP server, or the HTTP tool's `credential`,
2797
+ * With `credential_rejected`: the MCP server, or the HTTP tool's `credential`,
2797
2798
  * whose server answered `401`.
2798
2799
  */
2799
2800
  server: z.string().optional(),
2800
- /** An MCP tool error (R2b C7): true when calling again may work, as for `mcp.unreachable`. */
2801
+ /** An MCP tool error: true when calling again may work, as for `mcp.unreachable`. */
2801
2802
  retryable: z.boolean().optional(),
2802
2803
  })
2803
2804
  .passthrough()
2804
2805
  .optional(),
2805
2806
  /**
2806
- * How many credential values the Runtime replaced with `[redacted]` in `output` or `error`
2807
- * (R2b C8): the server echoed what it was sent. Absent when none.
2807
+ * How many credential values the Runtime replaced with `[redacted]` in `output` or `error`:
2808
+ * the server echoed what it was sent. Absent when none.
2808
2809
  */
2809
2810
  redacted: z.number().int().positive().optional(),
2810
2811
  ...eventAgent,
@@ -2814,7 +2815,7 @@ export const EffectUncertainPayloadSchema = z
2814
2815
  .object({ effectId: z.string().min(1), message: z.string().optional() })
2815
2816
  .passthrough();
2816
2817
  /**
2817
- * How a turn that ended went (R7.1), on `turn.completed`, `turn.failed` and `turn.cancelled`:
2818
+ * How a turn that ended went, on `turn.completed`, `turn.failed` and `turn.cancelled`:
2818
2819
  * `durationMs` from the turn's start to its end, waits for a person included, so the turn's span
2819
2820
  * holds every crossing in it; `pausedMs`, how much of that it waited paused; `totals` from the
2820
2821
  * usage ledger (`steps`: the model calls the gate metered). Absent on a turn
@@ -2877,7 +2878,7 @@ export const MessageQueuedPayloadSchema = z
2877
2878
  .object({ queuedMessageId: z.string(), position: z.number().int().positive(), requestId: z.string() })
2878
2879
  .passthrough();
2879
2880
  /**
2880
- * `wake.booked` (track T4, D77): the session's agent booked its next turn with `schedule_wake`,
2881
+ * `wake.booked`: the session's agent booked its next turn with `schedule_wake`,
2881
2882
  * at `at`, replacing any booking before. `wake.cancelled`: it cancelled its booking.
2882
2883
  */
2883
2884
  export const WakeBookedPayloadSchema = z
@@ -2924,7 +2925,7 @@ export const CommandMessagePayloadSchema = z
2924
2925
  /** Set when the message waited in the session's queue (protocol 17): its id there. */
2925
2926
  queuedMessageId: z.string().optional(),
2926
2927
  /**
2927
- * What sent it, when not a client (track T4): a trigger's run (`trigger`, with the trigger
2928
+ * What sent it, when not a client: a trigger's run (`trigger`, with the trigger
2928
2929
  * and run ids), or the session's own booked wake (`self`).
2929
2930
  */
2930
2931
  cause: z
@@ -2932,7 +2933,7 @@ export const CommandMessagePayloadSchema = z
2932
2933
  .strict()
2933
2934
  .optional(),
2934
2935
  /**
2935
- * The W3C trace context the message was sent with (R7.4): the turn's trace is the caller's,
2936
+ * The W3C trace context the message was sent with: the turn's trace is the caller's,
2936
2937
  * and its root span the child of the caller's span.
2937
2938
  */
2938
2939
  trace: z
@@ -3001,7 +3002,7 @@ export const NodeStartedPayloadSchema = z
3001
3002
  .passthrough();
3002
3003
  /**
3003
3004
  * `node.completed`: a flow's HTTP stage or HTTP verifier ended, or a tool stage the Runtime
3004
- * refused to run (R7.1), named as its `node.started` names it. `status` reads as
3005
+ * refused to run, named as its `node.started` names it. `status` reads as
3005
3006
  * `tool.completed`'s: `completed` when the stage's server answered (an error answer included),
3006
3007
  * `failed` when the Runtime ended it, `cancelled` when a cancel did. `gate` is the Tool Gate's
3007
3008
  * own start and end of its last send.
@@ -3049,7 +3050,7 @@ export const LoopVerifiedPayloadSchema = z
3049
3050
  })
3050
3051
  .passthrough();
3051
3052
  /**
3052
- * `transcript.updated` (internal; blueprint P0.3): the own loop's model-facing transcript after a
3053
+ * `transcript.updated` (internal): the own loop's model-facing transcript after a
3053
3054
  * settled segment, as an edit of the previous one: keep its first `keep` entries, then append
3054
3055
  * `entries`; the result has `length` entries. `keep` is 0 for a snapshot (after compaction, or
3055
3056
  * for a session written before transcripts were recorded). Large edits are split into
@@ -3071,7 +3072,7 @@ export const TranscriptUpdatedPayloadSchema = z
3071
3072
  */
3072
3073
  export const ArtifactSourceSchema = z.enum(["upload", "engine", "export", "snapshot"]);
3073
3074
  /**
3074
- * What an artifact holds: one file, or a folder (F8.2), whose versions are manifests of paths to
3075
+ * What an artifact holds: one file, or a folder, whose versions are manifests of paths to
3075
3076
  * content-addressed files.
3076
3077
  */
3077
3078
  export const ArtifactKindSchema = z.enum(["file", "folder"]);
@@ -3114,7 +3115,7 @@ export const ArtifactExportSkipReasonSchema = z.enum([
3114
3115
  "file_too_large",
3115
3116
  "too_large",
3116
3117
  "tenant_total",
3117
- /** Past the session's Environment's own total (its manifest's `limits.artifacts.totalBytes`). */
3118
+ /** Past the session's Agent's own total (its manifest's `runtime.limits.artifacts.totalBytes`). */
3118
3119
  "environment_total",
3119
3120
  ]);
3120
3121
  /**
@@ -3154,10 +3155,10 @@ export const McpServerOutcomeSchema = z
3154
3155
  message: z.string(),
3155
3156
  /** The tools it added to the session that its `tools` settings leave enabled; 0 unless connected. */
3156
3157
  tools: z.number().int().nonnegative(),
3157
- /** Listed tools the server's `tools` settings disable (R2b C9); absent when none. */
3158
+ /** Listed tools the server's `tools` settings disable; absent when none. */
3158
3159
  disabled: z.number().int().positive().optional(),
3159
3160
  /**
3160
- * Keys of the server's `tools` settings that name no tool it listed (R2b C9): a diagnostic,
3161
+ * Keys of the server's `tools` settings that name no tool it listed: a diagnostic,
3161
3162
  * since servers change their lists.
3162
3163
  */
3163
3164
  unknownTools: z.array(z.string()).optional(),
@@ -3373,7 +3374,7 @@ export const StreamRelayStatusSchema = z
3373
3374
  })
3374
3375
  .strict();
3375
3376
  /**
3376
- * The Tenant's harnesses (F6.2): `in-process` runs one in core's process; `remote` waits for
3377
+ * The Tenant's harnesses: `in-process` runs one in core's process; `remote` waits for
3377
3378
  * harnesses on the Harness API listener. `workspace` says one that serves the Tenant's
3378
3379
  * workspaces is connected.
3379
3380
  */
@@ -3481,7 +3482,7 @@ export const TenantStatusSchema = z
3481
3482
  retained: z.number().int().nonnegative(),
3482
3483
  })
3483
3484
  .strict(),
3484
- /** The Tenant's harnesses (F6.2). */
3485
+ /** The Tenant's harnesses. */
3485
3486
  harness: HarnessStatusSchema.optional(),
3486
3487
  /**
3487
3488
  * Durable Session Execution invocations of this Tenant that need an operator: paused
@@ -3587,14 +3588,14 @@ export const SUBJECT_SCOPES = [
3587
3588
  const RETIRED_SUBJECT_SCOPES = ["vaults:own", "tenant:settings"];
3588
3589
  /**
3589
3590
  * 1–200 visible ASCII characters; spaces only inside.
3590
- * An identifier's grammar is the protocol's (B15): it crosses the Runtime API, tokens and grants
3591
+ * An identifier's grammar is the protocol's: it crosses the Runtime API, tokens and grants
3591
3592
  * and means the same in every installation, so its length is a constant of protocol 15, not a
3592
3593
  * setting.
3593
3594
  */
3594
3595
  const SUBJECT_PATTERN = /^[\x21-\x7e](?:[\x20-\x7e]{0,198}[\x21-\x7e])?$/;
3595
3596
  /**
3596
3597
  * The owner of a session opened for no person: an MCP server's or HTTP tool's identity header
3597
- * (R2b C2) names nobody for it. A reserved subject.
3598
+ * names nobody for it. A reserved subject.
3598
3599
  */
3599
3600
  export const INSTALLATION_OWNER = "installation";
3600
3601
  /** Owner ids the Runtime uses itself: `host` (the model vault's) and `installation`. */
@@ -3792,7 +3793,7 @@ export const SessionViewSchema = z
3792
3793
  /** Messages waiting in the session's queue for the next turn (protocol 17). */
3793
3794
  queuedMessages: z.number().int().nonnegative(),
3794
3795
  /**
3795
- * The harness that runs the session's turns, pinned when it opened (track R4): its
3796
+ * The harness that runs the session's turns, pinned when it opened: its
3796
3797
  * manifest's `harness.id`, else `nylorun`.
3797
3798
  */
3798
3799
  harness: z.string(),
@@ -3905,7 +3906,7 @@ export const EffectiveSandboxConfigSchema = z
3905
3906
  .strict(),
3906
3907
  /** Pods (Host feature `sandbox-pods`): the pod's stop grace. */
3907
3908
  lifecycle: z.object({ stopGrace: z.string() }).strict().optional(),
3908
- /** Where each harness may run (D38). */
3909
+ /** Where each harness may run. */
3909
3910
  placement: z
3910
3911
  .record(z.string(), z.object({ hosts: z.array(z.enum(PLACEMENT_HOSTS)) }).strict())
3911
3912
  .optional(),
@@ -4023,7 +4024,7 @@ export const PutModelBudgetsRequestSchema = z
4023
4024
  }
4024
4025
  });
4025
4026
  export const ModelBudgetsSchema = z.object({ budgets: z.array(ModelBudgetSchema) }).strict();
4026
- /** What a tool policy rule does to a call it matches (R5 step 2). */
4027
+ /** What a tool policy rule does to a call it matches. */
4027
4028
  export const TOOL_POLICY_EFFECTS = ["allow", "ask", "deny"];
4028
4029
  /** A test of one field of a tool call's input; every test it sets must hold. */
4029
4030
  export const ToolInputConditionSchema = z
@@ -4053,12 +4054,13 @@ export const ToolInputConditionSchema = z
4053
4054
  }
4054
4055
  });
4055
4056
  /**
4056
- * One rule of the Tenant's tool policy (R5 step 2), applied at the Tool Gate to every MCP and
4057
- * HTTP tool call of every harness. A rule matches a call when every selector it sets matches:
4058
- * `tool` (the tool's identity: an MCP tool's own name on its server, or an HTTP tool's declared
4059
- * name; never the name a harness gave the model; `*` for any run of characters), `server` (an MCP
4060
- * server's name), `kind`, `agent` (the agent that calls it) and `when` (fields of the input, by
4061
- * dotted path). The strictest matching rule decides: `deny` refuses the call before it is sent,
4057
+ * One rule of the Tenant's tool policy, applied at the Tool Gate to every MCP and HTTP tool call
4058
+ * of every harness. A rule matches a call when every selector it sets matches: `tool` (the tool's
4059
+ * identity: an MCP tool's own name on its server, or an HTTP tool's declared name; never the name
4060
+ * a harness gave the model; `*` for any run of characters), `server` (an MCP server's name),
4061
+ * `kind`, `agent` (the agent that calls it: the agent manifest's name, or the id of an agent used
4062
+ * as a tool or of a flow's agent; never an Agent's id) and `when` (fields of the input, by dotted
4063
+ * path). The strictest matching rule decides: `deny` refuses the call before it is sent,
4062
4064
  * `ask` holds it until a person approves it on the session (`approve`), `allow` runs it. A call no
4063
4065
  * rule matches runs. Sandbox tools never cross the gate; their network side is egress policy.
4064
4066
  *
@@ -4070,11 +4072,26 @@ export const ToolRuleSchema = z
4070
4072
  effect: z.enum(TOOL_POLICY_EFFECTS),
4071
4073
  // The selectors, and `when`'s paths, are at most the Tenant's Runtime limit
4072
4074
  // `toolRuleFieldChars` long; `reason` at most `toolRuleTextChars` (checked when put).
4073
- tool: z.string().min(1).optional(),
4074
- server: z.string().min(1).optional(),
4075
+ tool: z
4076
+ .string()
4077
+ .min(1)
4078
+ .optional()
4079
+ .meta({
4080
+ description: "The tool's identity: an MCP tool's own name on its `server`, or an HTTP tool's declared name, never the name the model calls it by. `*` matches any run of characters; a name with `__` in it is refused",
4081
+ }),
4082
+ server: z.string().min(1).optional().meta({ description: "An MCP server's name; `*` matches any run of characters" }),
4075
4083
  kind: z.enum(["mcp", "http"]).optional(),
4076
- agent: z.string().min(1).optional(),
4077
- when: z.record(z.string().min(1), ToolInputConditionSchema).optional(),
4084
+ agent: z
4085
+ .string()
4086
+ .min(1)
4087
+ .optional()
4088
+ .meta({
4089
+ description: "The agent that calls the tool: the agent manifest's name, or the id of an agent used as a tool or of a flow's agent, never an Agent's id. `*` matches any run of characters",
4090
+ }),
4091
+ when: z
4092
+ .record(z.string().min(1), ToolInputConditionSchema)
4093
+ .optional()
4094
+ .meta({ description: "Fields of the call's input by dotted path, each tested by every test its condition sets" }),
4078
4095
  /** Why the rule exists: shown with a held or denied call. */
4079
4096
  reason: z.string().min(1).optional(),
4080
4097
  })
@@ -4119,7 +4136,7 @@ export const AgUiRunErrorCodeSchema = z.enum([
4119
4136
  // --- Studio embedding (Studio design §8) ---------------------------------------------------
4120
4137
  /**
4121
4138
  * A Tenant id as Studio's routes accept it.
4122
- * An identifier's grammar is the protocol's (B15): it crosses the Runtime API, tokens and grants
4139
+ * An identifier's grammar is the protocol's: it crosses the Runtime API, tokens and grants
4123
4140
  * and means the same in every installation, so its length is a constant of protocol 15, not a
4124
4141
  * setting.
4125
4142
  */
@@ -4258,7 +4275,7 @@ export const ARTIFACT_TOTAL_BYTES_DEFAULT = 10 * 1024 * 1024 * 1024;
4258
4275
  /**
4259
4276
  * The longest artifact name, in characters: the longest file name a workspace's file system takes
4260
4277
  * (`NAME_MAX`), since a name becomes one when the artifact is copied into a sandbox or downloaded.
4261
- * A standard's constant, not a limit (B15).
4278
+ * A standard's constant, not a limit.
4262
4279
  */
4263
4280
  export const ARTIFACT_NAME_MAX = FILE_NAME_MAX;
4264
4281
  /**
@@ -4287,7 +4304,7 @@ export const ArtifactVersionViewSchema = z
4287
4304
  .strict();
4288
4305
  /**
4289
4306
  * An artifact: an id, a name and numbered versions, its bytes in the Object store. A file's
4290
- * version is its bytes; a folder's (F8.2) is a manifest of paths to content-addressed files.
4307
+ * version is its bytes; a folder's is a manifest of paths to content-addressed files.
4291
4308
  */
4292
4309
  export const ArtifactViewSchema = z
4293
4310
  .object({
@@ -4298,7 +4315,7 @@ export const ArtifactViewSchema = z
4298
4315
  /** The session it belongs to; absent for a Tenant-wide artifact an application made. */
4299
4316
  sessionId: z.string().optional(),
4300
4317
  /**
4301
- * The Agent whose disk versions it holds (R2d step 3); absent otherwise. Such an artifact
4318
+ * The Agent whose disk versions it holds; absent otherwise. Such an artifact
4302
4319
  * changes only through `/v1/agents/{id}/snapshot` and its versions routes.
4303
4320
  */
4304
4321
  agentId: z.string().optional(),
@@ -4323,7 +4340,7 @@ export const UploadArtifactResponseSchema = z
4323
4340
  .object({ artifact: ArtifactViewSchema, version: ArtifactVersionViewSchema })
4324
4341
  .strict();
4325
4342
  /**
4326
- * `PUT /v1/files/sha256:{hex}`: a definition file the Runtime holds (track R2 M4), named by the
4343
+ * `PUT /v1/files/sha256:{hex}`: a definition file the Runtime holds, named by the
4327
4344
  * SHA-256 of its bytes. `201` stored it, `200` already had it.
4328
4345
  */
4329
4346
  export const DefinitionFileViewSchema = z
@@ -4368,7 +4385,7 @@ export const FOLDER_CONTENT_TYPE = "application/vnd.nylorun.folder+json";
4368
4385
  /** The manifest format a folder version is stored as. */
4369
4386
  export const FOLDER_MANIFEST_FORMAT = "nylorun.folder.v1";
4370
4387
  /**
4371
- * The manifest format of an Environment's disk versions (R2d step 3): v1's entries, plus file
4388
+ * The manifest format of an Environment's disk versions: v1's entries, plus file
4372
4389
  * modes and modification times, symbolic links and empty directories. Readers accept both.
4373
4390
  */
4374
4391
  export const FOLDER_MANIFEST_FORMAT_V2 = "nylorun.folder.v2";
@@ -4398,7 +4415,7 @@ export const FolderEntrySchema = z
4398
4415
  .strict();
4399
4416
  /**
4400
4417
  * A folder version as stored: the files, sorted by path, each naming its content-addressed
4401
- * bytes by SHA-256. The one manifest format for folders, reused by P5's snapshots.
4418
+ * bytes by SHA-256. The one manifest format for folders, reused by disk snapshots.
4402
4419
  */
4403
4420
  export const FolderManifestSchema = z
4404
4421
  .object({
@@ -4481,7 +4498,7 @@ export const TenantSkillsViewSchema = z
4481
4498
  .object({ limits: z.object({ totalBytes: z.number().int() }).strict() })
4482
4499
  .strict();
4483
4500
  /**
4484
- * A Tenant's Runtime limits (harness boundary S0), stored as Tenant setting `limits.config`: what
4501
+ * A Tenant's Runtime limits, stored as Tenant setting `limits.config`: what
4485
4502
  * one record entry, model call, model file, tool answer, harness state and Harness API chunk may
4486
4503
  * hold. Each limit left out is its default (`RUNTIME_LIMIT_DEFAULTS`); none may pass its ceiling
4487
4504
  * (`RUNTIME_LIMIT_CEILINGS`, a `400` naming it).
@@ -4526,6 +4543,18 @@ const usageNumbers = {
4526
4543
  reasoningTokens: z.number().int().nonnegative(),
4527
4544
  costUsd: z.number().nonnegative(),
4528
4545
  };
4546
+ /**
4547
+ * A cost by the token kind it paid for, at the prices in force when the call was made:
4548
+ * uncached input, input read from the provider's cache, input written to it, and output.
4549
+ */
4550
+ export const CostSplitSchema = z
4551
+ .object({
4552
+ input: z.number().nonnegative(),
4553
+ cacheRead: z.number().nonnegative(),
4554
+ cacheWrite: z.number().nonnegative(),
4555
+ output: z.number().nonnegative(),
4556
+ })
4557
+ .strict();
4529
4558
  export const SessionUsageTotalsSchema = z
4530
4559
  .object({
4531
4560
  sessionId: z.string(),
@@ -4537,14 +4566,27 @@ export const SessionUsageTotalsSchema = z
4537
4566
  unpricedCalls: z.number().int().nonnegative(),
4538
4567
  unreportedCalls: z.number().int().nonnegative(),
4539
4568
  unknownQualityCalls: z.number().int().nonnegative(),
4569
+ /**
4570
+ * `costUsd` by token kind, summed over the `splitCalls` calls that kept their split. A call
4571
+ * recorded before the split was kept counts in `costUsd` only. Protocol 18, like
4572
+ * `modelTimeMs` and `timedCalls`: an older client's read leaves all four out.
4573
+ */
4574
+ costSplit: CostSplitSchema,
4575
+ splitCalls: z.number().int().nonnegative(),
4576
+ /**
4577
+ * The calls' durations added up, from when the gate sent each call to when its answer was
4578
+ * complete, over the `timedCalls` calls the gate timed. Calls that overlap each count in full.
4579
+ */
4580
+ modelTimeMs: z.number().int().nonnegative(),
4581
+ timedCalls: z.number().int().nonnegative(),
4540
4582
  })
4541
4583
  .strict();
4542
4584
  export const ModelCallSchema = z
4543
4585
  .object({
4544
4586
  id: z.string(),
4545
4587
  /**
4546
- * The model effect the call served: the effect id its harness sent as `Idempotency-Key`
4547
- * (track R4), so a call is joined to the journal.
4588
+ * The model effect the call served: the effect id its harness sent as `Idempotency-Key`,
4589
+ * so a call is joined to the journal.
4548
4590
  */
4549
4591
  effectId: z.string(),
4550
4592
  sessionId: z.string(),
@@ -4554,6 +4596,12 @@ export const ModelCallSchema = z
4554
4596
  provider: z.string().nullable(),
4555
4597
  model: z.string().nullable(),
4556
4598
  at: z.string(),
4599
+ /**
4600
+ * When the gate sent the call, and when its answer was complete; null when untimed. Protocol
4601
+ * 18, like `usage.costSplit`: an older client's read leaves them out.
4602
+ */
4603
+ startedAt: z.string().nullable(),
4604
+ endedAt: z.string().nullable(),
4557
4605
  outcome: z.enum(["completed", "failed"]),
4558
4606
  usage: z
4559
4607
  .object({
@@ -4561,6 +4609,8 @@ export const ModelCallSchema = z
4561
4609
  duplicate: z.boolean(),
4562
4610
  tokensReported: z.boolean().nullable(),
4563
4611
  costKnown: z.boolean().nullable(),
4612
+ /** `costUsd` by token kind; null for a call recorded before the split was kept. */
4613
+ costSplit: CostSplitSchema.nullable(),
4564
4614
  })
4565
4615
  .strict()
4566
4616
  .nullable(),
@@ -4578,9 +4628,9 @@ export const ModelCallExportPageSchema = z
4578
4628
  })
4579
4629
  .strict();
4580
4630
  /**
4581
- * One tool call of a session (R5.2), read from the effect journal: what ran, with what input,
4631
+ * One tool call of a session, read from the effect journal: what ran, with what input,
4582
4632
  * how many sends, and how it ended. `invoking` while it runs. `uncertain` only for a call
4583
- * recorded before R5. The output is in the session's log (`tool.completed`).
4633
+ * recorded by an older Runtime. The output is in the session's log (`tool.completed`).
4584
4634
  */
4585
4635
  export const ToolCallSchema = z
4586
4636
  .object({
@@ -4597,7 +4647,7 @@ export const ToolCallSchema = z
4597
4647
  skill: z.string().nullable(),
4598
4648
  /** The Agent Plugin that brought its MCP server or skill. */
4599
4649
  plugin: pluginLabelSchema.nullable(),
4600
- /** `held`: the Tool Gate holds it for a person's approval (R5 step 2). */
4650
+ /** `held`: the Tool Gate holds it for a person's approval. */
4601
4651
  status: z.enum(["invoking", "held", ...TOOL_CALL_STATUSES, "uncertain"]),
4602
4652
  attempts: z.number().int().nonnegative(),
4603
4653
  input: z.unknown(),
@@ -4610,12 +4660,12 @@ export const ToolCallSchema = z
4610
4660
  export const ToolCallsPageSchema = z
4611
4661
  .object({ calls: z.array(ToolCallSchema), nextCursor: z.string().nullable(), asOf: z.string() })
4612
4662
  .strict();
4613
- /** One OTLP attribute (R7.5): a key and an `AnyValue` (`stringValue`, `intValue`, …). */
4663
+ /** One OTLP attribute: a key and an `AnyValue` (`stringValue`, `intValue`, …). */
4614
4664
  export const OtlpKeyValueSchema = z
4615
4665
  .object({ key: z.string(), value: z.record(z.string(), z.unknown()) })
4616
4666
  .passthrough();
4617
4667
  /**
4618
- * One span as OTLP/HTTP JSON encodes it (R7.5): hex ids, times in nanoseconds as decimal strings,
4668
+ * One span as OTLP/HTTP JSON encodes it: hex ids, times in nanoseconds as decimal strings,
4619
4669
  * `kind` (1 internal, 3 client) and `status.code` (0 unset, 1 ok, 2 error) as numbers.
4620
4670
  */
4621
4671
  export const OtlpSpanSchema = z
@@ -4632,7 +4682,7 @@ export const OtlpSpanSchema = z
4632
4682
  })
4633
4683
  .passthrough();
4634
4684
  /**
4635
- * A turn's trace (R7.5, feature `traces`): the OTLP `ExportTraceServiceRequest` JSON the Runtime
4685
+ * A turn's trace (feature `traces`): the OTLP `ExportTraceServiceRequest` JSON the Runtime
4636
4686
  * posts to a collector, built from the turn's log rows. One resource, one scope.
4637
4687
  */
4638
4688
  export const TurnTraceSchema = z