@nylorun/runtime 0.31.0-beta → 0.32.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.32.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - b3dad06: Both ends of the agent folder loop (track T7).
8
+
9
+ - `nylorun init <path>` names the agent after the path's last segment (`init agents/hello`). `--example` adds `tools/get_order.json`, `mcp.json` (a `Bearer ${ORDERS_MCP_TOKEN}` header) and `triggers/new-order.md`, explained in the folder's README.md, and the result passes `nylorun check`. The first run in a project (the nearest directory with `.git`) writes `.gitattributes` (`* text=auto eol=lf`), ignores `.nylorun/credentials.json` in `.gitignore`, and maps the folder files to their JSON Schemas in `.vscode/settings.json`, merged into an existing file. Its hint names `apply --agent` and `chat`.
10
+ - `nylorun apply --agent [<id>]` makes the Agent from the manifest after a save (or on an unchanged one), or moves it, as `nylorun agents put` does, and prints what it needs a person for.
11
+ - `nylorun apply --watch [--save]` checks and plans again on each change to the folders (and the files their `runtime.json` extends); it saves only with `--save`.
12
+ - A plan's change to the instructions prints their text diff, `-` and `+` lines.
13
+ - `nylorun chat <agent> [--session <id>] [--message <text>]` opens or reuses a session, sends `--message` or each line of standard input, and prints the reply as it comes.
14
+ - `nylorun check --json` prints `{ folders: [{ path, ok, manifest?, diagnostics }] }` for CI, with the same exit codes. `check` says "1 file", and `nylorun --version` prints the version.
15
+ - `packFolder` (`@nylorun/agents`) leaves out what the folder's `.nyloignore` names (gitignore rules), and resolves `extends` in `runtime.json`: the packed file is the merge, the folder's own keys winning, with `.nylorun/origin.json` naming the files it came from; a missing file or a cycle is a `FolderError`. `ignoreMatcher` is exported.
16
+ - `session.approve(id, approved)` and `session.respond(id, value)` take no options: each makes its own idempotency key.
17
+ - The Runtime's Agent view names each required secret of the version it runs that has no value, as an attention item (`secret_unset: required secret ORDERS_TOKEN unset`, state `input_required`), until it is set.
18
+ - The compiler's refusal of an unresolved `extends` says to resolve it before uploading.
19
+
20
+ - b3dad06: Compare two versions' agent folders, and set what a folder may hold per Tenant (track T7).
21
+
22
+ - **`GET /v1/agent-manifests/{name}/source/diff?from=<v>&to=<v>`** answers the files added, removed and changed (by SHA-256) from one version's source to another's, each list sorted by path, and how many stayed the same (`AgentManifestSourceDiff` in `@nylorun/core/contracts`). A version saved as JSON has no source (`404`); a `from` or `to` that is not a version number is `400`. `client.agentManifests.sourceDiff(name, from, to)` in `@nylorun/agents` calls it.
23
+ - **Folder limits are Tenant settings**: the Runtime limits `folderFiles` (2,000), `folderBytes` (50 MiB) and `folderTextFileBytes` (1 MiB), T6's fixed values, set with `PUT /v1/tenant/limits` like the others. A folder save with more files or bytes is `413 limit_exceeded` (`details.limit` names the limit), and the compiler holds each Markdown or JSON file to `folderTextFileBytes` (`422 folder_invalid`).
24
+ - `compileAgentFolder({ entries, files, name, limits })` takes the limits as an optional input (`AgentFolderLimits`); each left out is `AGENT_FOLDER_LIMITS`'.
25
+ - `@nylorun/agents` also exports the types `AgentManifestSource`, `AgentManifestSourceDiff`, `AgentManifestSourceSummary` and `AgentFolderDiagnostic`, and `AGENT_FOLDER_MEDIA_TYPE`.
26
+
27
+ ### Patch Changes
28
+
29
+ - 498d972: `nylorun check --fix` makes the edits the compiler's diagnostics carry (track T7). A diagnostic one edit fixes has a `fix` (`AgentFolderFix`, in `AgentFolderDiagnostic` and the Runtime API's): `rename_key` for an unknown key with exactly one did-you-mean (in `AGENT.md`, a trigger, a `SKILL.md`, a tool file, `runtime.json`, `mcp.json`, `flow.json` and a JSON Schema's keywords), at its line and column, and none when two keys are as close or the key it would be is already there; `crlf` for a file with CRLF line ends, which is now a `crlf` note (it is read as LF, as before); and `move_skill_secrets` for `secrets` in a root skill's `SKILL.md`, when `AGENT.md` lists none for the skill, or lists them all. Messages, manifests and hashes are unchanged. `applyFolderFixes` in `@nylorun/core/folder` makes them on text: the key token renamed with every other byte kept, LF line ends, and the secrets moved to `AGENT.md`'s `skills` block as `migrate folder` writes it, skipping (with why) a fix whose text is no longer where it was.
30
+
31
+ `nylorun check` marks each fixable problem `(fixable with --fix)` and writes nothing. `check --fix` makes the edits in the folder's files, prints each change by file, and checks again until nothing is left to fix; it leaves a file whose bytes changed since it was checked (writing nothing when one changes while it fixes), and a `runtime.json` that `extends` another. `check --json` gives each diagnostic's `fix`, and with `--fix` each folder's `fixed` and `unfixed`.
32
+
33
+ - Pin core to the tested release.
34
+ - Pin harness to the tested release.
35
+ - Updated dependencies [498d972]
36
+ - Updated dependencies [d23304e]
37
+ - Updated dependencies [b3dad06]
38
+ - Updated dependencies [b3dad06]
39
+ - Updated dependencies [b3dad06]
40
+ - Updated dependencies [498d972]
41
+ - Updated dependencies [b3dad06]
42
+ - Updated dependencies
43
+ - @nylorun/core@0.28.0-beta
44
+ - @nylorun/harness@0.29.4-beta
45
+
3
46
  ## 0.31.0-beta
4
47
 
5
48
  ### Minor Changes
@@ -541,6 +541,33 @@ export declare const AgentManifestSource: z.ZodObject<{
541
541
  sha256: z.ZodString;
542
542
  }, z.core.$strict>>;
543
543
  }, z.core.$strict>;
544
+ export declare const AgentManifestSourceDiff: z.ZodObject<{
545
+ name: z.ZodString;
546
+ from: z.ZodNumber;
547
+ to: z.ZodNumber;
548
+ added: z.ZodArray<z.ZodObject<{
549
+ path: z.ZodString;
550
+ size: z.ZodNumber;
551
+ sha256: z.ZodString;
552
+ }, z.core.$strict>>;
553
+ removed: z.ZodArray<z.ZodObject<{
554
+ path: z.ZodString;
555
+ size: z.ZodNumber;
556
+ sha256: z.ZodString;
557
+ }, z.core.$strict>>;
558
+ changed: z.ZodArray<z.ZodObject<{
559
+ path: z.ZodString;
560
+ from: z.ZodObject<{
561
+ size: z.ZodNumber;
562
+ sha256: z.ZodString;
563
+ }, z.core.$strict>;
564
+ to: z.ZodObject<{
565
+ size: z.ZodNumber;
566
+ sha256: z.ZodString;
567
+ }, z.core.$strict>;
568
+ }, z.core.$strict>>;
569
+ unchanged: z.ZodNumber;
570
+ }, z.core.$strict>;
544
571
  export declare const AgentManifestView: z.ZodObject<{
545
572
  name: z.ZodString;
546
573
  version: z.ZodNumber;
@@ -792,6 +819,22 @@ export declare const AgentManifestPlan: z.ZodObject<{
792
819
  line: z.ZodOptional<z.ZodNumber>;
793
820
  column: z.ZodOptional<z.ZodNumber>;
794
821
  pointer: z.ZodOptional<z.ZodString>;
822
+ fix: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
823
+ kind: z.ZodLiteral<"rename_key">;
824
+ file: z.ZodString;
825
+ line: z.ZodNumber;
826
+ column: z.ZodNumber;
827
+ from: z.ZodString;
828
+ to: z.ZodString;
829
+ }, z.core.$strict>, z.ZodObject<{
830
+ kind: z.ZodLiteral<"crlf">;
831
+ file: z.ZodString;
832
+ }, z.core.$strict>, z.ZodObject<{
833
+ kind: z.ZodLiteral<"move_skill_secrets">;
834
+ file: z.ZodString;
835
+ skill: z.ZodString;
836
+ secrets: z.ZodArray<z.ZodString>;
837
+ }, z.core.$strict>], "kind">>;
795
838
  }, z.core.$strict>>>;
796
839
  compiler: z.ZodOptional<z.ZodString>;
797
840
  }, z.core.$strict>;
@@ -925,6 +968,22 @@ export declare const SaveAgentManifestResponse: z.ZodObject<{
925
968
  line: z.ZodOptional<z.ZodNumber>;
926
969
  column: z.ZodOptional<z.ZodNumber>;
927
970
  pointer: z.ZodOptional<z.ZodString>;
971
+ fix: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
972
+ kind: z.ZodLiteral<"rename_key">;
973
+ file: z.ZodString;
974
+ line: z.ZodNumber;
975
+ column: z.ZodNumber;
976
+ from: z.ZodString;
977
+ to: z.ZodString;
978
+ }, z.core.$strict>, z.ZodObject<{
979
+ kind: z.ZodLiteral<"crlf">;
980
+ file: z.ZodString;
981
+ }, z.core.$strict>, z.ZodObject<{
982
+ kind: z.ZodLiteral<"move_skill_secrets">;
983
+ file: z.ZodString;
984
+ skill: z.ZodString;
985
+ secrets: z.ZodArray<z.ZodString>;
986
+ }, z.core.$strict>], "kind">>;
928
987
  }, z.core.$strict>>>;
929
988
  }, z.core.$strict>;
930
989
  export declare const ListAgentManifestsResponse: z.ZodObject<{
@@ -1917,6 +1976,9 @@ export declare const PutTenantLimitsRequest: z.ZodObject<{
1917
1976
  flowConcurrency: z.ZodOptional<z.ZodNumber>;
1918
1977
  flowMapItems: z.ZodOptional<z.ZodNumber>;
1919
1978
  flowLoopIterations: z.ZodOptional<z.ZodNumber>;
1979
+ folderFiles: z.ZodOptional<z.ZodNumber>;
1980
+ folderBytes: z.ZodOptional<z.ZodNumber>;
1981
+ folderTextFileBytes: z.ZodOptional<z.ZodNumber>;
1920
1982
  }, z.core.$strict>>;
1921
1983
  requestId: z.ZodOptional<z.ZodString>;
1922
1984
  }, z.core.$strict>;
@@ -1992,6 +2054,9 @@ export declare const TenantLimitsView: z.ZodObject<{
1992
2054
  flowConcurrency: z.ZodNumber;
1993
2055
  flowMapItems: z.ZodNumber;
1994
2056
  flowLoopIterations: z.ZodNumber;
2057
+ folderFiles: z.ZodNumber;
2058
+ folderBytes: z.ZodNumber;
2059
+ folderTextFileBytes: z.ZodNumber;
1995
2060
  }, z.core.$strict>;
1996
2061
  }, z.core.$strict>;
1997
2062
  export declare const ArtifactTree: z.ZodObject<{
@@ -5,7 +5,7 @@
5
5
  * global registry.
6
6
  */
7
7
  import { z } from "zod";
8
- import { QueuedResponseSchema, TriggerListSchema, MemoryListSchema, MemorySchema, PutMemoryRequestSchema, MemoryVersionPageSchema, MemoryVersionDetailSchema, TriggerRunPageSchema, RunTriggerResponseSchema, WebhookSecretResponseSchema, WebhookAcceptedResponseSchema, AgentManifestV8Schema, EnvironmentSecretSlotsSchema, DeleteAgentManifestResponseSchema, AgentManifestPlanSchema, AgentManifestVersionsSchema, AgentManifestViewSchema, ListAgentManifestsResponseSchema, PutAgentManifestRequestSchema, PutAgentFolderRequestSchema, AgentManifestSourceSchema, PutAgentSecretValueRequestSchema, SaveAgentManifestResponseSchema, SessionListItemSchema, ModelCallSchema, SessionPageSchema, SessionManifestViewSchema, HistoryPageSchema, SessionUsageTotalsSchema, ModelCallsPageSchema, ModelCallExportPageSchema, AgentPageSchema, ToolCallSchema, ToolCallsPageSchema, TurnTraceSchema, JwksSchema, SigningKeyListSchema, SigningKeyViewSchema, RotateSigningKeysRequestSchema, RevokeSigningKeyRequestSchema, MeResponseSchema, TenantStatusSchema, ResetTenantRequestSchema, ResetTenantResponseSchema, SeedTenantConfigRequestSchema, SeedTenantConfigResponseSchema, HostModelCatalogSchema, TenantSandboxViewSchema, ModelUsageTotalsSchema, ModelBudgetsSchema, PutModelBudgetsRequestSchema, ToolPolicySchema, PutToolPolicyRequestSchema, PutModelInputsRequestSchema, ModelInputsViewSchema, PutTenantEnvironmentsRequestSchema, ListProvidersResponseSchema, HostModelViewSchema, PutHostModelRequestSchema, SelectHostModelRequestSchema, PutAgentSecretRequestSchema, AgentSecretViewSchema, ListAgentSecretsResponseSchema, McpPreviewRequestSchema, McpPreviewSchema, CredentialCoverageRequestSchema, CredentialCoverageSchema, DeletedResponseSchema, ListSessionsResponseSchema, LiveEventSchema, PutAgentRequestSchema, PutSessionRequestSchema, SessionItemsResponseSchema, SessionViewSchema, StreamClosedFrameSchema, AcceptedResponseSchema, SandboxToolOutcomeSchema, AgentViewSchema, AgentSnapshotSchema, RestoreAgentRequestSchema, ForkAgentRequestSchema, AgentForkPlanSchema, ForkAgentResponseSchema, PutAgentDryRunResponseSchema, RestartAgentRequestSchema, AgentRestoreSchema, AgentDiskVersionsSchema, ListAgentsResponseSchema, DeleteAgentResponseSchema, ListAgentEventsResponseSchema, ArtifactViewSchema, ArtifactListItemSchema, ArtifactPageSchema, ArtifactVersionViewSchema, ListArtifactsResponseSchema, UploadArtifactResponseSchema, DefinitionFileViewSchema, DeleteArtifactResponseSchema, CreateArtifactLinkRequestSchema, ArtifactLinkSchema, PutTenantArtifactsRequestSchema, PutTenantSkillsRequestSchema, PutTenantLimitsRequestSchema, TenantLimitsViewSchema, TenantArtifactsViewSchema, TenantSkillsViewSchema, ArtifactTreeSchema, ArtifactDiffSchema, SessionCommandSchema, ListOperatorKeysResponseSchema, PutOperatorKeyResponseSchema, DeleteOperatorKeyResponseSchema, OperatorKeySchema, ProtocolRejectedResponseSchema, RejectedResponseSchema, EVENT_SCHEMAS, EVENT_TYPES, } from "@nylorun/core/contracts";
8
+ import { QueuedResponseSchema, TriggerListSchema, MemoryListSchema, MemorySchema, PutMemoryRequestSchema, MemoryVersionPageSchema, MemoryVersionDetailSchema, TriggerRunPageSchema, RunTriggerResponseSchema, WebhookSecretResponseSchema, WebhookAcceptedResponseSchema, AgentManifestV8Schema, EnvironmentSecretSlotsSchema, DeleteAgentManifestResponseSchema, AgentManifestPlanSchema, AgentManifestVersionsSchema, AgentManifestViewSchema, ListAgentManifestsResponseSchema, PutAgentManifestRequestSchema, PutAgentFolderRequestSchema, AgentManifestSourceSchema, AgentManifestSourceDiffSchema, PutAgentSecretValueRequestSchema, SaveAgentManifestResponseSchema, SessionListItemSchema, ModelCallSchema, SessionPageSchema, SessionManifestViewSchema, HistoryPageSchema, SessionUsageTotalsSchema, ModelCallsPageSchema, ModelCallExportPageSchema, AgentPageSchema, ToolCallSchema, ToolCallsPageSchema, TurnTraceSchema, JwksSchema, SigningKeyListSchema, SigningKeyViewSchema, RotateSigningKeysRequestSchema, RevokeSigningKeyRequestSchema, MeResponseSchema, TenantStatusSchema, ResetTenantRequestSchema, ResetTenantResponseSchema, SeedTenantConfigRequestSchema, SeedTenantConfigResponseSchema, HostModelCatalogSchema, TenantSandboxViewSchema, ModelUsageTotalsSchema, ModelBudgetsSchema, PutModelBudgetsRequestSchema, ToolPolicySchema, PutToolPolicyRequestSchema, PutModelInputsRequestSchema, ModelInputsViewSchema, PutTenantEnvironmentsRequestSchema, ListProvidersResponseSchema, HostModelViewSchema, PutHostModelRequestSchema, SelectHostModelRequestSchema, PutAgentSecretRequestSchema, AgentSecretViewSchema, ListAgentSecretsResponseSchema, McpPreviewRequestSchema, McpPreviewSchema, CredentialCoverageRequestSchema, CredentialCoverageSchema, DeletedResponseSchema, ListSessionsResponseSchema, LiveEventSchema, PutAgentRequestSchema, PutSessionRequestSchema, SessionItemsResponseSchema, SessionViewSchema, StreamClosedFrameSchema, AcceptedResponseSchema, SandboxToolOutcomeSchema, AgentViewSchema, AgentSnapshotSchema, RestoreAgentRequestSchema, ForkAgentRequestSchema, AgentForkPlanSchema, ForkAgentResponseSchema, PutAgentDryRunResponseSchema, RestartAgentRequestSchema, AgentRestoreSchema, AgentDiskVersionsSchema, ListAgentsResponseSchema, DeleteAgentResponseSchema, ListAgentEventsResponseSchema, ArtifactViewSchema, ArtifactListItemSchema, ArtifactPageSchema, ArtifactVersionViewSchema, ListArtifactsResponseSchema, UploadArtifactResponseSchema, DefinitionFileViewSchema, DeleteArtifactResponseSchema, CreateArtifactLinkRequestSchema, ArtifactLinkSchema, PutTenantArtifactsRequestSchema, PutTenantSkillsRequestSchema, PutTenantLimitsRequestSchema, TenantLimitsViewSchema, TenantArtifactsViewSchema, TenantSkillsViewSchema, ArtifactTreeSchema, ArtifactDiffSchema, SessionCommandSchema, ListOperatorKeysResponseSchema, PutOperatorKeyResponseSchema, DeleteOperatorKeyResponseSchema, OperatorKeySchema, ProtocolRejectedResponseSchema, RejectedResponseSchema, EVENT_SCHEMAS, EVENT_TYPES, } from "@nylorun/core/contracts";
9
9
  function named(id, schema) {
10
10
  return schema.meta({ id });
11
11
  }
@@ -23,6 +23,7 @@ export const AgentManifest = named("AgentManifest", AgentManifestV8Schema);
23
23
  export const PutAgentManifestRequest = named("PutAgentManifestRequest", PutAgentManifestRequestSchema);
24
24
  export const PutAgentFolderRequest = named("PutAgentFolderRequest", PutAgentFolderRequestSchema);
25
25
  export const AgentManifestSource = named("AgentManifestSource", AgentManifestSourceSchema);
26
+ export const AgentManifestSourceDiff = named("AgentManifestSourceDiff", AgentManifestSourceDiffSchema);
26
27
  export const AgentManifestView = named("AgentManifestView", AgentManifestViewSchema);
27
28
  export const AgentManifestPlan = named("AgentManifestPlan", AgentManifestPlanSchema);
28
29
  export const SaveAgentManifestResponse = named("SaveAgentManifestResponse", SaveAgentManifestResponseSchema);
@@ -4,7 +4,8 @@
4
4
  * moves every Agent that tracks the manifest to the new version; a pinned one stays. Reading needs `agents:read` (or a write scope), saving and deleting
5
5
  * `agent-manifests:write`, from any client (Q12). A token caller reaches none: a manifest holds
6
6
  * an agent's instructions, tools and servers. A save may send an agent folder by hash instead of
7
- * the manifest (track T6): the Runtime compiles it and keeps it as the version's source.
7
+ * the manifest (track T6): the Runtime compiles it and keeps it as the version's source, and
8
+ * `source/diff` compares two versions' sources (track T7).
8
9
  */
9
10
  import type { OpenAPIHono } from "@hono/zod-openapi";
10
11
  import type { TenantEnv } from "../app.js";
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
2
  import { AGENT_FOLDER_MEDIA_TYPE, contentTypeFor, isAgentManifestName, PutAgentFolderRequestSchema, PutAgentManifestRequestSchema, } from "@nylorun/core/contracts";
3
- import { AgentManifestPlan, AgentManifestSource, AgentManifestVersions, AgentManifestView, DeleteAgentManifestResponse, ListAgentManifestsResponse, PutAgentFolderRequest, PutAgentManifestRequest, SaveAgentManifestResponse, } from "../../components.js";
3
+ import { AgentManifestPlan, AgentManifestSource, AgentManifestSourceDiff, AgentManifestVersions, AgentManifestView, DeleteAgentManifestResponse, ListAgentManifestsResponse, PutAgentFolderRequest, PutAgentManifestRequest, SaveAgentManifestResponse, } from "../../components.js";
4
4
  import { requirePrincipal } from "../../../tenant/auth.js";
5
5
  import { fail } from "../../../tenant/http.js";
6
- import { agentManifestVersions, deleteAgentManifest, getAgentManifest, getAgentManifestSource, listAgentManifests, readAgentManifestSourceFile, saveAgentFolder, saveAgentManifest, } from "../../../tenant/agent-manifests.js";
6
+ import { agentManifestVersions, deleteAgentManifest, diffAgentManifestSources, getAgentManifest, getAgentManifestSource, listAgentManifests, readAgentManifestSourceFile, saveAgentFolder, saveAgentManifest, } from "../../../tenant/agent-manifests.js";
7
7
  import { readJson } from "../body.js";
8
8
  import { tenantRoute } from "../define.js";
9
9
  import { jsonResponse } from "../respond.js";
@@ -172,6 +172,33 @@ export function agentManifestRoutes(api) {
172
172
  headers: { "content-type": contentTypeFor(path), "content-length": String(file.size) },
173
173
  });
174
174
  });
175
+ tenantRoute(api, READ, {
176
+ method: "get",
177
+ path: "/v1/agent-manifests/{name}/source/diff",
178
+ tags: ["Agent manifests"],
179
+ summary: "Compare two versions' folders",
180
+ description: "The files added, removed and changed from version `from`'s source to version `to`'s, by path, a file changed when its SHA-256 differs (feature `agent-folders`). Each list is sorted by path. A version saved as JSON has no source (`404`).",
181
+ request: {
182
+ params: namePath,
183
+ query: z.object({
184
+ from: z.string().meta({ description: "The version to compare from" }),
185
+ to: z.string().meta({ description: "The version to compare to" }),
186
+ }),
187
+ },
188
+ responses: {
189
+ 200: json(AgentManifestSourceDiff, "What changed"),
190
+ 400: { description: "`from` or `to` is not a version number" },
191
+ 404: { description: "No such version, or one was saved as JSON and has no source" },
192
+ },
193
+ }, async (c) => {
194
+ requirePrincipal(c.get("scope"));
195
+ const name = nameOf(c.req.param("name"));
196
+ const from = Number(c.req.query("from"));
197
+ const to = Number(c.req.query("to"));
198
+ if (!Number.isInteger(from) || from < 1 || !Number.isInteger(to) || to < 1)
199
+ fail(400, "from and to are the versions to compare: positive integers");
200
+ return jsonResponse(200, await diffAgentManifestSources(c.env.tenant, name, from, to));
201
+ });
175
202
  tenantRoute(api, WRITE, {
176
203
  method: "delete",
177
204
  path: "/v1/agent-manifests/{name}",
@@ -121,6 +121,7 @@ const RUNTIME_TAGS = [
121
121
  "GET /v1/agent-manifests/{name}/versions/{version}",
122
122
  "GET /v1/agent-manifests/{name}/versions/{version}/source",
123
123
  "GET /v1/agent-manifests/{name}/versions/{version}/source/files/{path}",
124
+ "GET /v1/agent-manifests/{name}/source/diff",
124
125
  "DELETE /v1/agent-manifests/{name}",
125
126
  ],
126
127
  },
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Management API",
5
- "version": "0.31.0-beta",
5
+ "version": "0.32.0-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
@@ -1591,6 +1591,18 @@
1591
1591
  "flowLoopIterations": {
1592
1592
  "type": "integer",
1593
1593
  "exclusiveMinimum": 0
1594
+ },
1595
+ "folderFiles": {
1596
+ "type": "integer",
1597
+ "exclusiveMinimum": 0
1598
+ },
1599
+ "folderBytes": {
1600
+ "type": "integer",
1601
+ "exclusiveMinimum": 0
1602
+ },
1603
+ "folderTextFileBytes": {
1604
+ "type": "integer",
1605
+ "exclusiveMinimum": 0
1594
1606
  }
1595
1607
  },
1596
1608
  "required": [
@@ -1663,7 +1675,10 @@
1663
1675
  "sessionQueuedMessages",
1664
1676
  "flowConcurrency",
1665
1677
  "flowMapItems",
1666
- "flowLoopIterations"
1678
+ "flowLoopIterations",
1679
+ "folderFiles",
1680
+ "folderBytes",
1681
+ "folderTextFileBytes"
1667
1682
  ],
1668
1683
  "additionalProperties": false
1669
1684
  }
@@ -1958,6 +1973,18 @@
1958
1973
  "flowLoopIterations": {
1959
1974
  "type": "integer",
1960
1975
  "exclusiveMinimum": 0
1976
+ },
1977
+ "folderFiles": {
1978
+ "type": "integer",
1979
+ "exclusiveMinimum": 0
1980
+ },
1981
+ "folderBytes": {
1982
+ "type": "integer",
1983
+ "exclusiveMinimum": 0
1984
+ },
1985
+ "folderTextFileBytes": {
1986
+ "type": "integer",
1987
+ "exclusiveMinimum": 0
1961
1988
  }
1962
1989
  },
1963
1990
  "additionalProperties": false
@@ -7328,7 +7355,7 @@
7328
7355
  "Settings"
7329
7356
  ],
7330
7357
  "summary": "Get the Tenant's Runtime limits",
7331
- "description": "The sizes, counts and deadlines the Runtime holds what crosses it to: the Tenant's (Tenant setting `limits.config`), with the default for each it leaves out. Harnesses get the ones they must respect in `turn.start.limits` (record entry, model call, model file, tool answer, custom harness state, Harness API chunk, folder entries). Defaults and ceilings: `recordEntryBytes` 983040 bytes, at most 983040 (S2 takes records of at most 1048576 bytes, and an event's envelope needs 65536 beside its payload); `modelCallBytes` 33554432 bytes, at most 536870888 (the Model Gate reads a call's body as one string, of at most 536870888 characters); `modelFileBytes` 8388608 bytes, at most 402653166 (a file goes to the provider as one base64 string, of at most 536870888 characters); `toolAnswerBytes` 8388608 bytes, at most 33554432 (a harness reports the answer to core in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `harnessStateBytes` 262144 bytes, at most 33554432 (the state crosses in one Harness API frame (67108864 bytes) with the rest of its output or turn.start); `chunkBytes` 16777216 bytes, at most 50266112 (a chunk crosses in base64 in one Harness API frame (67108864 bytes), with room for the frame's own JSON); `folderEntries` 10000 entries, at most 4628197 (a folder's manifest is read as one string, of at most 536870888 characters, and each entry takes at least 116); `requestBodyBytes` 1048576 bytes, at most 536870888 (a body is read as one string, of at most 536870888 characters); `messageParts` 32 entries, at most 19884106 (parts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 27); `pageItems` 200 entries, at most 178956962 (a page's items go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `exportPageItems` 1000 entries, at most 178956962 (a page's calls go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `environmentEventItems` 1000 entries, at most 178956962 (the events go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `inlineFileBytes` 20971520 bytes, at most 402653166 (a file sent inline arrives in base64 in a body read as one string, of at most 536870888 characters); `a2aWaitMs` 300000 milliseconds, at most 2147483647 (the wait is timed with a JavaScript timer, which waits at most 2147483647 ms); `errorExcerptChars` 2000 characters, at most 163840 (the excerpt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `traceContentBytes` 8192 bytes, at most 983040 (span content is cut from one record entry, which holds at most 983040 bytes); `environmentLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `artifactLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `labelKeyChars` 63 characters, at most 536870888 (a label key arrives in one request body, read as one string of at most 536870888 characters); `labelValueChars` 256 characters, at most 536870888 (a label value arrives in one request body, read as one string of at most 536870888 characters); `environmentSetupCommands` 16 entries, at most 33554430 (setup commands arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 16); `environmentFiles` 16 entries, at most 16268814 (input file entries arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 33); `environmentFilesPerEntry` 1000 entries, at most 6710886 (the files of an entry arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 80); `environmentSecretSlots` 64 entries, at most 14128181 (secret slots arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 38); `setupCommandChars` 4096 characters, at most 43690 (a command runs as one argument of /bin/sh -c, which Linux takes up to 131072 bytes long (MAX_ARG_STRLEN, with its NUL), and UTF-8 may take 3 bytes for a character); `setupCommandMs` 1800000 milliseconds, at most 2147483647 (the engine times a command with a JavaScript timer, which waits at most 2147483647 ms); `setupOutputChars` 4096 characters, at most 163840 (the output is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupReasonChars` 500 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupCommandExcerptChars` 80 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `manifestDescriptionChars` 1024 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretDescriptionChars` 500 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretValueChars` 8192 characters, at most 536870888 (a value arrives in one request body, read as one string of at most 536870888 characters); `secretHosts` 32 entries, at most 89478481 (hosts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 6); `diskVersionEntries` 200000 entries, at most 1917396 (a disk is listed in one Harness API frame (67108864 bytes, each entry at least 35), and a version's manifest is read as one string of at most 536870888 characters); `diskVersionBytes` 10737418240 bytes, at most 9007199254740991 (the files' sizes are added up in a JavaScript number, exact up to 9007199254740991); `diskLeaseMs` 120000 milliseconds, at most 2147483647 (the lease is renewed with a JavaScript timer, which waits at most 2147483647 ms); `diskPodWaitMs` 60000 milliseconds, at most 9007199254740991 (the deadline is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `modelRequestMs` 600000 milliseconds, at most 2147483647 (the provider's SDK times the request with a JavaScript timer, which waits at most 2147483647 ms); `modelIdleMs` 300000 milliseconds, at most 2147483647 (the stream's silence is timed with a JavaScript timer, which waits at most 2147483647 ms); `modelAttempts` 3 attempts, at most 9007199254740991 (attempts are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMs` 2000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `modelProviderRetries` 2 retries, at most 9007199254740991 (retries are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMaxMs` 60000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `toolAttempts` 3 attempts, at most 9007199254740991 (sends are counted in a JavaScript number, exact up to 9007199254740991); `httpToolTimeoutMs` 300000 milliseconds, at most 2147483647 (the call is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpSnapshotBytes` 4194304 bytes, at most 16777216 (the facts cross in turn.start, one Harness API frame (67108864 bytes), beside the harness's state (at most half of it) and the rest); `mcpPreviewMs` 15000 milliseconds, at most 2147483647 (the preview is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpMetadataBytes` 65536 bytes, at most 536870888 (the document is read as one string, of at most 536870888 characters); `toolRules` 200 entries, at most 28256362 (rules arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `toolRuleFieldChars` 200 characters, at most 536870888 (a selector arrives in one request body, read as one string of at most 536870888 characters); `toolRuleTextChars` 500 characters, at most 536870888 (a text arrives in one request body, read as one string of at most 536870888 characters); `modelBudgets` 100 entries, at most 28256362 (budgets arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `triggersPerAgent` 20 entries, at most 8521760 (triggers arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 63); `triggerMinIntervalMs` 60000 milliseconds, at most 9007199254740991 (the gap is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `triggerRunsPerHour` 60 runs, at most 9007199254740991 (runs are counted in a JavaScript number, exact up to 9007199254740991); `triggerJitterPercent` 10 percent, at most 50 (an offset past half the interval could move a run past the next one); `triggerJitterMaxMs` 300000 milliseconds, at most 2147483647 (the offset is waited with a JavaScript timer, which waits at most 2147483647 ms); `triggerPromptChars` 8000 characters, at most 163840 (the prompt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `triggerRunRetentionMs` 2592000000 milliseconds, at most 9007199254740991 (the age is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeMaxAheadMs` 2592000000 milliseconds, at most 9007199254740991 (the time is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeNoteChars` 2000 characters, at most 163840 (the note is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `memoryBytes` 102400 bytes, at most 33554432 (a memory reaches a harness in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `memoriesPerAgent` 10000 entries, at most 9007199254740991 (memories are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexLines` 200 entries, at most 9007199254740991 (the lines are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexBytes` 25600 bytes, at most 16777216 (the index crosses in turn.start, one Harness API frame (67108864 bytes), beside the harness's state and the rest); `webhookBodyBytes` 262144 bytes, at most 983040 (the payload goes into one record entry, which holds at most 983040 bytes); `sessionQueuedMessages` 100 entries, at most 9007199254740991 (queued messages are counted in a JavaScript number, exact up to 9007199254740991); `flowConcurrency` 8 effects, at most 9007199254740991 (running effects are counted in a JavaScript number, exact up to 9007199254740991); `flowMapItems` 1000 entries, at most 9007199254740991 (items are counted in a JavaScript number, exact up to 9007199254740991); `flowLoopIterations` 100 iterations, at most 9007199254740991 (iterations are counted in a JavaScript number, exact up to 9007199254740991).",
7358
+ "description": "The sizes, counts and deadlines the Runtime holds what crosses it to: the Tenant's (Tenant setting `limits.config`), with the default for each it leaves out. Harnesses get the ones they must respect in `turn.start.limits` (record entry, model call, model file, tool answer, custom harness state, Harness API chunk, folder entries). Defaults and ceilings: `recordEntryBytes` 983040 bytes, at most 983040 (S2 takes records of at most 1048576 bytes, and an event's envelope needs 65536 beside its payload); `modelCallBytes` 33554432 bytes, at most 536870888 (the Model Gate reads a call's body as one string, of at most 536870888 characters); `modelFileBytes` 8388608 bytes, at most 402653166 (a file goes to the provider as one base64 string, of at most 536870888 characters); `toolAnswerBytes` 8388608 bytes, at most 33554432 (a harness reports the answer to core in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `harnessStateBytes` 262144 bytes, at most 33554432 (the state crosses in one Harness API frame (67108864 bytes) with the rest of its output or turn.start); `chunkBytes` 16777216 bytes, at most 50266112 (a chunk crosses in base64 in one Harness API frame (67108864 bytes), with room for the frame's own JSON); `folderEntries` 10000 entries, at most 4628197 (a folder's manifest is read as one string, of at most 536870888 characters, and each entry takes at least 116); `requestBodyBytes` 1048576 bytes, at most 536870888 (a body is read as one string, of at most 536870888 characters); `messageParts` 32 entries, at most 19884106 (parts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 27); `pageItems` 200 entries, at most 178956962 (a page's items go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `exportPageItems` 1000 entries, at most 178956962 (a page's calls go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `environmentEventItems` 1000 entries, at most 178956962 (the events go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `inlineFileBytes` 20971520 bytes, at most 402653166 (a file sent inline arrives in base64 in a body read as one string, of at most 536870888 characters); `a2aWaitMs` 300000 milliseconds, at most 2147483647 (the wait is timed with a JavaScript timer, which waits at most 2147483647 ms); `errorExcerptChars` 2000 characters, at most 163840 (the excerpt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `traceContentBytes` 8192 bytes, at most 983040 (span content is cut from one record entry, which holds at most 983040 bytes); `environmentLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `artifactLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `labelKeyChars` 63 characters, at most 536870888 (a label key arrives in one request body, read as one string of at most 536870888 characters); `labelValueChars` 256 characters, at most 536870888 (a label value arrives in one request body, read as one string of at most 536870888 characters); `environmentSetupCommands` 16 entries, at most 33554430 (setup commands arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 16); `environmentFiles` 16 entries, at most 16268814 (input file entries arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 33); `environmentFilesPerEntry` 1000 entries, at most 6710886 (the files of an entry arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 80); `environmentSecretSlots` 64 entries, at most 14128181 (secret slots arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 38); `setupCommandChars` 4096 characters, at most 43690 (a command runs as one argument of /bin/sh -c, which Linux takes up to 131072 bytes long (MAX_ARG_STRLEN, with its NUL), and UTF-8 may take 3 bytes for a character); `setupCommandMs` 1800000 milliseconds, at most 2147483647 (the engine times a command with a JavaScript timer, which waits at most 2147483647 ms); `setupOutputChars` 4096 characters, at most 163840 (the output is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupReasonChars` 500 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupCommandExcerptChars` 80 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `manifestDescriptionChars` 1024 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretDescriptionChars` 500 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretValueChars` 8192 characters, at most 536870888 (a value arrives in one request body, read as one string of at most 536870888 characters); `secretHosts` 32 entries, at most 89478481 (hosts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 6); `diskVersionEntries` 200000 entries, at most 1917396 (a disk is listed in one Harness API frame (67108864 bytes, each entry at least 35), and a version's manifest is read as one string of at most 536870888 characters); `diskVersionBytes` 10737418240 bytes, at most 9007199254740991 (the files' sizes are added up in a JavaScript number, exact up to 9007199254740991); `diskLeaseMs` 120000 milliseconds, at most 2147483647 (the lease is renewed with a JavaScript timer, which waits at most 2147483647 ms); `diskPodWaitMs` 60000 milliseconds, at most 9007199254740991 (the deadline is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `modelRequestMs` 600000 milliseconds, at most 2147483647 (the provider's SDK times the request with a JavaScript timer, which waits at most 2147483647 ms); `modelIdleMs` 300000 milliseconds, at most 2147483647 (the stream's silence is timed with a JavaScript timer, which waits at most 2147483647 ms); `modelAttempts` 3 attempts, at most 9007199254740991 (attempts are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMs` 2000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `modelProviderRetries` 2 retries, at most 9007199254740991 (retries are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMaxMs` 60000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `toolAttempts` 3 attempts, at most 9007199254740991 (sends are counted in a JavaScript number, exact up to 9007199254740991); `httpToolTimeoutMs` 300000 milliseconds, at most 2147483647 (the call is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpSnapshotBytes` 4194304 bytes, at most 16777216 (the facts cross in turn.start, one Harness API frame (67108864 bytes), beside the harness's state (at most half of it) and the rest); `mcpPreviewMs` 15000 milliseconds, at most 2147483647 (the preview is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpMetadataBytes` 65536 bytes, at most 536870888 (the document is read as one string, of at most 536870888 characters); `toolRules` 200 entries, at most 28256362 (rules arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `toolRuleFieldChars` 200 characters, at most 536870888 (a selector arrives in one request body, read as one string of at most 536870888 characters); `toolRuleTextChars` 500 characters, at most 536870888 (a text arrives in one request body, read as one string of at most 536870888 characters); `modelBudgets` 100 entries, at most 28256362 (budgets arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `triggersPerAgent` 20 entries, at most 8521760 (triggers arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 63); `triggerMinIntervalMs` 60000 milliseconds, at most 9007199254740991 (the gap is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `triggerRunsPerHour` 60 runs, at most 9007199254740991 (runs are counted in a JavaScript number, exact up to 9007199254740991); `triggerJitterPercent` 10 percent, at most 50 (an offset past half the interval could move a run past the next one); `triggerJitterMaxMs` 300000 milliseconds, at most 2147483647 (the offset is waited with a JavaScript timer, which waits at most 2147483647 ms); `triggerPromptChars` 8000 characters, at most 163840 (the prompt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `triggerRunRetentionMs` 2592000000 milliseconds, at most 9007199254740991 (the age is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeMaxAheadMs` 2592000000 milliseconds, at most 9007199254740991 (the time is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeNoteChars` 2000 characters, at most 163840 (the note is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `memoryBytes` 102400 bytes, at most 33554432 (a memory reaches a harness in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `memoriesPerAgent` 10000 entries, at most 9007199254740991 (memories are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexLines` 200 entries, at most 9007199254740991 (the lines are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexBytes` 25600 bytes, at most 16777216 (the index crosses in turn.start, one Harness API frame (67108864 bytes), beside the harness's state and the rest); `webhookBodyBytes` 262144 bytes, at most 983040 (the payload goes into one record entry, which holds at most 983040 bytes); `sessionQueuedMessages` 100 entries, at most 9007199254740991 (queued messages are counted in a JavaScript number, exact up to 9007199254740991); `flowConcurrency` 8 effects, at most 9007199254740991 (running effects are counted in a JavaScript number, exact up to 9007199254740991); `flowMapItems` 1000 entries, at most 9007199254740991 (items are counted in a JavaScript number, exact up to 9007199254740991); `flowLoopIterations` 100 iterations, at most 9007199254740991 (iterations are counted in a JavaScript number, exact up to 9007199254740991); `folderFiles` 2000 entries, at most 5478274 (a folder's files arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 98); `folderBytes` 52428800 bytes, at most 9007199254740991 (the files' sizes are added up in a JavaScript number, exact up to 9007199254740991); `folderTextFileBytes` 1048576 bytes, at most 536870888 (the compiler reads a file as one string, of at most 536870888 characters).",
7332
7359
  "security": [
7333
7360
  {
7334
7361
  "managementKey": []
@@ -7428,7 +7455,7 @@
7428
7455
  "Settings"
7429
7456
  ],
7430
7457
  "summary": "Set the Tenant's Runtime limits",
7431
- "description": "Replaces the Tenant's Runtime limits: a limit left out takes its default. A limit above its ceiling, which a dependency sets, is `400` naming the ceiling, and nothing is written. Each is read where it is checked, so a new value holds for the next request, write, call or segment. Defaults and ceilings: `recordEntryBytes` 983040 bytes, at most 983040 (S2 takes records of at most 1048576 bytes, and an event's envelope needs 65536 beside its payload); `modelCallBytes` 33554432 bytes, at most 536870888 (the Model Gate reads a call's body as one string, of at most 536870888 characters); `modelFileBytes` 8388608 bytes, at most 402653166 (a file goes to the provider as one base64 string, of at most 536870888 characters); `toolAnswerBytes` 8388608 bytes, at most 33554432 (a harness reports the answer to core in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `harnessStateBytes` 262144 bytes, at most 33554432 (the state crosses in one Harness API frame (67108864 bytes) with the rest of its output or turn.start); `chunkBytes` 16777216 bytes, at most 50266112 (a chunk crosses in base64 in one Harness API frame (67108864 bytes), with room for the frame's own JSON); `folderEntries` 10000 entries, at most 4628197 (a folder's manifest is read as one string, of at most 536870888 characters, and each entry takes at least 116); `requestBodyBytes` 1048576 bytes, at most 536870888 (a body is read as one string, of at most 536870888 characters); `messageParts` 32 entries, at most 19884106 (parts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 27); `pageItems` 200 entries, at most 178956962 (a page's items go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `exportPageItems` 1000 entries, at most 178956962 (a page's calls go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `environmentEventItems` 1000 entries, at most 178956962 (the events go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `inlineFileBytes` 20971520 bytes, at most 402653166 (a file sent inline arrives in base64 in a body read as one string, of at most 536870888 characters); `a2aWaitMs` 300000 milliseconds, at most 2147483647 (the wait is timed with a JavaScript timer, which waits at most 2147483647 ms); `errorExcerptChars` 2000 characters, at most 163840 (the excerpt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `traceContentBytes` 8192 bytes, at most 983040 (span content is cut from one record entry, which holds at most 983040 bytes); `environmentLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `artifactLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `labelKeyChars` 63 characters, at most 536870888 (a label key arrives in one request body, read as one string of at most 536870888 characters); `labelValueChars` 256 characters, at most 536870888 (a label value arrives in one request body, read as one string of at most 536870888 characters); `environmentSetupCommands` 16 entries, at most 33554430 (setup commands arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 16); `environmentFiles` 16 entries, at most 16268814 (input file entries arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 33); `environmentFilesPerEntry` 1000 entries, at most 6710886 (the files of an entry arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 80); `environmentSecretSlots` 64 entries, at most 14128181 (secret slots arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 38); `setupCommandChars` 4096 characters, at most 43690 (a command runs as one argument of /bin/sh -c, which Linux takes up to 131072 bytes long (MAX_ARG_STRLEN, with its NUL), and UTF-8 may take 3 bytes for a character); `setupCommandMs` 1800000 milliseconds, at most 2147483647 (the engine times a command with a JavaScript timer, which waits at most 2147483647 ms); `setupOutputChars` 4096 characters, at most 163840 (the output is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupReasonChars` 500 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupCommandExcerptChars` 80 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `manifestDescriptionChars` 1024 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretDescriptionChars` 500 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretValueChars` 8192 characters, at most 536870888 (a value arrives in one request body, read as one string of at most 536870888 characters); `secretHosts` 32 entries, at most 89478481 (hosts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 6); `diskVersionEntries` 200000 entries, at most 1917396 (a disk is listed in one Harness API frame (67108864 bytes, each entry at least 35), and a version's manifest is read as one string of at most 536870888 characters); `diskVersionBytes` 10737418240 bytes, at most 9007199254740991 (the files' sizes are added up in a JavaScript number, exact up to 9007199254740991); `diskLeaseMs` 120000 milliseconds, at most 2147483647 (the lease is renewed with a JavaScript timer, which waits at most 2147483647 ms); `diskPodWaitMs` 60000 milliseconds, at most 9007199254740991 (the deadline is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `modelRequestMs` 600000 milliseconds, at most 2147483647 (the provider's SDK times the request with a JavaScript timer, which waits at most 2147483647 ms); `modelIdleMs` 300000 milliseconds, at most 2147483647 (the stream's silence is timed with a JavaScript timer, which waits at most 2147483647 ms); `modelAttempts` 3 attempts, at most 9007199254740991 (attempts are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMs` 2000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `modelProviderRetries` 2 retries, at most 9007199254740991 (retries are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMaxMs` 60000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `toolAttempts` 3 attempts, at most 9007199254740991 (sends are counted in a JavaScript number, exact up to 9007199254740991); `httpToolTimeoutMs` 300000 milliseconds, at most 2147483647 (the call is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpSnapshotBytes` 4194304 bytes, at most 16777216 (the facts cross in turn.start, one Harness API frame (67108864 bytes), beside the harness's state (at most half of it) and the rest); `mcpPreviewMs` 15000 milliseconds, at most 2147483647 (the preview is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpMetadataBytes` 65536 bytes, at most 536870888 (the document is read as one string, of at most 536870888 characters); `toolRules` 200 entries, at most 28256362 (rules arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `toolRuleFieldChars` 200 characters, at most 536870888 (a selector arrives in one request body, read as one string of at most 536870888 characters); `toolRuleTextChars` 500 characters, at most 536870888 (a text arrives in one request body, read as one string of at most 536870888 characters); `modelBudgets` 100 entries, at most 28256362 (budgets arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `triggersPerAgent` 20 entries, at most 8521760 (triggers arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 63); `triggerMinIntervalMs` 60000 milliseconds, at most 9007199254740991 (the gap is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `triggerRunsPerHour` 60 runs, at most 9007199254740991 (runs are counted in a JavaScript number, exact up to 9007199254740991); `triggerJitterPercent` 10 percent, at most 50 (an offset past half the interval could move a run past the next one); `triggerJitterMaxMs` 300000 milliseconds, at most 2147483647 (the offset is waited with a JavaScript timer, which waits at most 2147483647 ms); `triggerPromptChars` 8000 characters, at most 163840 (the prompt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `triggerRunRetentionMs` 2592000000 milliseconds, at most 9007199254740991 (the age is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeMaxAheadMs` 2592000000 milliseconds, at most 9007199254740991 (the time is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeNoteChars` 2000 characters, at most 163840 (the note is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `memoryBytes` 102400 bytes, at most 33554432 (a memory reaches a harness in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `memoriesPerAgent` 10000 entries, at most 9007199254740991 (memories are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexLines` 200 entries, at most 9007199254740991 (the lines are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexBytes` 25600 bytes, at most 16777216 (the index crosses in turn.start, one Harness API frame (67108864 bytes), beside the harness's state and the rest); `webhookBodyBytes` 262144 bytes, at most 983040 (the payload goes into one record entry, which holds at most 983040 bytes); `sessionQueuedMessages` 100 entries, at most 9007199254740991 (queued messages are counted in a JavaScript number, exact up to 9007199254740991); `flowConcurrency` 8 effects, at most 9007199254740991 (running effects are counted in a JavaScript number, exact up to 9007199254740991); `flowMapItems` 1000 entries, at most 9007199254740991 (items are counted in a JavaScript number, exact up to 9007199254740991); `flowLoopIterations` 100 iterations, at most 9007199254740991 (iterations are counted in a JavaScript number, exact up to 9007199254740991).",
7458
+ "description": "Replaces the Tenant's Runtime limits: a limit left out takes its default. A limit above its ceiling, which a dependency sets, is `400` naming the ceiling, and nothing is written. Each is read where it is checked, so a new value holds for the next request, write, call or segment. Defaults and ceilings: `recordEntryBytes` 983040 bytes, at most 983040 (S2 takes records of at most 1048576 bytes, and an event's envelope needs 65536 beside its payload); `modelCallBytes` 33554432 bytes, at most 536870888 (the Model Gate reads a call's body as one string, of at most 536870888 characters); `modelFileBytes` 8388608 bytes, at most 402653166 (a file goes to the provider as one base64 string, of at most 536870888 characters); `toolAnswerBytes` 8388608 bytes, at most 33554432 (a harness reports the answer to core in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `harnessStateBytes` 262144 bytes, at most 33554432 (the state crosses in one Harness API frame (67108864 bytes) with the rest of its output or turn.start); `chunkBytes` 16777216 bytes, at most 50266112 (a chunk crosses in base64 in one Harness API frame (67108864 bytes), with room for the frame's own JSON); `folderEntries` 10000 entries, at most 4628197 (a folder's manifest is read as one string, of at most 536870888 characters, and each entry takes at least 116); `requestBodyBytes` 1048576 bytes, at most 536870888 (a body is read as one string, of at most 536870888 characters); `messageParts` 32 entries, at most 19884106 (parts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 27); `pageItems` 200 entries, at most 178956962 (a page's items go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `exportPageItems` 1000 entries, at most 178956962 (a page's calls go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `environmentEventItems` 1000 entries, at most 178956962 (the events go in one response body, written as one string of at most 536870888 characters, and each takes at least 3); `inlineFileBytes` 20971520 bytes, at most 402653166 (a file sent inline arrives in base64 in a body read as one string, of at most 536870888 characters); `a2aWaitMs` 300000 milliseconds, at most 2147483647 (the wait is timed with a JavaScript timer, which waits at most 2147483647 ms); `errorExcerptChars` 2000 characters, at most 163840 (the excerpt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `traceContentBytes` 8192 bytes, at most 983040 (span content is cut from one record entry, which holds at most 983040 bytes); `environmentLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `artifactLabels` 32 entries, at most 59652320 (labels arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 9); `labelKeyChars` 63 characters, at most 536870888 (a label key arrives in one request body, read as one string of at most 536870888 characters); `labelValueChars` 256 characters, at most 536870888 (a label value arrives in one request body, read as one string of at most 536870888 characters); `environmentSetupCommands` 16 entries, at most 33554430 (setup commands arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 16); `environmentFiles` 16 entries, at most 16268814 (input file entries arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 33); `environmentFilesPerEntry` 1000 entries, at most 6710886 (the files of an entry arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 80); `environmentSecretSlots` 64 entries, at most 14128181 (secret slots arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 38); `setupCommandChars` 4096 characters, at most 43690 (a command runs as one argument of /bin/sh -c, which Linux takes up to 131072 bytes long (MAX_ARG_STRLEN, with its NUL), and UTF-8 may take 3 bytes for a character); `setupCommandMs` 1800000 milliseconds, at most 2147483647 (the engine times a command with a JavaScript timer, which waits at most 2147483647 ms); `setupOutputChars` 4096 characters, at most 163840 (the output is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupReasonChars` 500 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `setupCommandExcerptChars` 80 characters, at most 163840 (the reason is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `manifestDescriptionChars` 1024 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretDescriptionChars` 500 characters, at most 536870888 (a description arrives in one request body, read as one string of at most 536870888 characters); `secretValueChars` 8192 characters, at most 536870888 (a value arrives in one request body, read as one string of at most 536870888 characters); `secretHosts` 32 entries, at most 89478481 (hosts arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 6); `diskVersionEntries` 200000 entries, at most 1917396 (a disk is listed in one Harness API frame (67108864 bytes, each entry at least 35), and a version's manifest is read as one string of at most 536870888 characters); `diskVersionBytes` 10737418240 bytes, at most 9007199254740991 (the files' sizes are added up in a JavaScript number, exact up to 9007199254740991); `diskLeaseMs` 120000 milliseconds, at most 2147483647 (the lease is renewed with a JavaScript timer, which waits at most 2147483647 ms); `diskPodWaitMs` 60000 milliseconds, at most 9007199254740991 (the deadline is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `modelRequestMs` 600000 milliseconds, at most 2147483647 (the provider's SDK times the request with a JavaScript timer, which waits at most 2147483647 ms); `modelIdleMs` 300000 milliseconds, at most 2147483647 (the stream's silence is timed with a JavaScript timer, which waits at most 2147483647 ms); `modelAttempts` 3 attempts, at most 9007199254740991 (attempts are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMs` 2000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `modelProviderRetries` 2 retries, at most 9007199254740991 (retries are counted in a JavaScript number, exact up to 9007199254740991); `modelRetryDelayMaxMs` 60000 milliseconds, at most 2147483647 (the delay is waited with a JavaScript timer, which waits at most 2147483647 ms); `toolAttempts` 3 attempts, at most 9007199254740991 (sends are counted in a JavaScript number, exact up to 9007199254740991); `httpToolTimeoutMs` 300000 milliseconds, at most 2147483647 (the call is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpSnapshotBytes` 4194304 bytes, at most 16777216 (the facts cross in turn.start, one Harness API frame (67108864 bytes), beside the harness's state (at most half of it) and the rest); `mcpPreviewMs` 15000 milliseconds, at most 2147483647 (the preview is timed with a JavaScript timer, which waits at most 2147483647 ms); `mcpMetadataBytes` 65536 bytes, at most 536870888 (the document is read as one string, of at most 536870888 characters); `toolRules` 200 entries, at most 28256362 (rules arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `toolRuleFieldChars` 200 characters, at most 536870888 (a selector arrives in one request body, read as one string of at most 536870888 characters); `toolRuleTextChars` 500 characters, at most 536870888 (a text arrives in one request body, read as one string of at most 536870888 characters); `modelBudgets` 100 entries, at most 28256362 (budgets arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 19); `triggersPerAgent` 20 entries, at most 8521760 (triggers arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 63); `triggerMinIntervalMs` 60000 milliseconds, at most 9007199254740991 (the gap is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `triggerRunsPerHour` 60 runs, at most 9007199254740991 (runs are counted in a JavaScript number, exact up to 9007199254740991); `triggerJitterPercent` 10 percent, at most 50 (an offset past half the interval could move a run past the next one); `triggerJitterMaxMs` 300000 milliseconds, at most 2147483647 (the offset is waited with a JavaScript timer, which waits at most 2147483647 ms); `triggerPromptChars` 8000 characters, at most 163840 (the prompt is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `triggerRunRetentionMs` 2592000000 milliseconds, at most 9007199254740991 (the age is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeMaxAheadMs` 2592000000 milliseconds, at most 9007199254740991 (the time is reckoned from the clock in a JavaScript number, exact up to 9007199254740991); `wakeNoteChars` 2000 characters, at most 163840 (the note is kept in one record entry (at most 983040 bytes), where JSON may escape a character to 6); `memoryBytes` 102400 bytes, at most 33554432 (a memory reaches a harness in one Harness API frame (67108864 bytes), as JSON, whose escapes may double it); `memoriesPerAgent` 10000 entries, at most 9007199254740991 (memories are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexLines` 200 entries, at most 9007199254740991 (the lines are counted in a JavaScript number, exact up to 9007199254740991); `memoryIndexBytes` 25600 bytes, at most 16777216 (the index crosses in turn.start, one Harness API frame (67108864 bytes), beside the harness's state and the rest); `webhookBodyBytes` 262144 bytes, at most 983040 (the payload goes into one record entry, which holds at most 983040 bytes); `sessionQueuedMessages` 100 entries, at most 9007199254740991 (queued messages are counted in a JavaScript number, exact up to 9007199254740991); `flowConcurrency` 8 effects, at most 9007199254740991 (running effects are counted in a JavaScript number, exact up to 9007199254740991); `flowMapItems` 1000 entries, at most 9007199254740991 (items are counted in a JavaScript number, exact up to 9007199254740991); `flowLoopIterations` 100 iterations, at most 9007199254740991 (iterations are counted in a JavaScript number, exact up to 9007199254740991); `folderFiles` 2000 entries, at most 5478274 (a folder's files arrive in one request body, read as one string of at most 536870888 characters, and each takes at least 98); `folderBytes` 52428800 bytes, at most 9007199254740991 (the files' sizes are added up in a JavaScript number, exact up to 9007199254740991); `folderTextFileBytes` 1048576 bytes, at most 536870888 (the compiler reads a file as one string, of at most 536870888 characters).",
7432
7459
  "security": [
7433
7460
  {
7434
7461
  "managementKey": []
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Runtime API",
5
- "version": "0.31.0-beta",
5
+ "version": "0.32.0-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
@@ -22875,6 +22875,9 @@
22875
22875
  },
22876
22876
  "pointer": {
22877
22877
  "type": "string"
22878
+ },
22879
+ "fix": {
22880
+ "$ref": "#/components/schemas/AgentFolderFix"
22878
22881
  }
22879
22882
  },
22880
22883
  "required": [
@@ -22884,6 +22887,96 @@
22884
22887
  ],
22885
22888
  "additionalProperties": false
22886
22889
  },
22890
+ "AgentFolderFix": {
22891
+ "oneOf": [
22892
+ {
22893
+ "type": "object",
22894
+ "properties": {
22895
+ "kind": {
22896
+ "type": "string",
22897
+ "enum": [
22898
+ "rename_key"
22899
+ ]
22900
+ },
22901
+ "file": {
22902
+ "type": "string"
22903
+ },
22904
+ "line": {
22905
+ "type": "integer",
22906
+ "exclusiveMinimum": 0
22907
+ },
22908
+ "column": {
22909
+ "type": "integer",
22910
+ "exclusiveMinimum": 0
22911
+ },
22912
+ "from": {
22913
+ "type": "string"
22914
+ },
22915
+ "to": {
22916
+ "type": "string"
22917
+ }
22918
+ },
22919
+ "required": [
22920
+ "kind",
22921
+ "file",
22922
+ "line",
22923
+ "column",
22924
+ "from",
22925
+ "to"
22926
+ ],
22927
+ "additionalProperties": false
22928
+ },
22929
+ {
22930
+ "type": "object",
22931
+ "properties": {
22932
+ "kind": {
22933
+ "type": "string",
22934
+ "enum": [
22935
+ "crlf"
22936
+ ]
22937
+ },
22938
+ "file": {
22939
+ "type": "string"
22940
+ }
22941
+ },
22942
+ "required": [
22943
+ "kind",
22944
+ "file"
22945
+ ],
22946
+ "additionalProperties": false
22947
+ },
22948
+ {
22949
+ "type": "object",
22950
+ "properties": {
22951
+ "kind": {
22952
+ "type": "string",
22953
+ "enum": [
22954
+ "move_skill_secrets"
22955
+ ]
22956
+ },
22957
+ "file": {
22958
+ "type": "string"
22959
+ },
22960
+ "skill": {
22961
+ "type": "string"
22962
+ },
22963
+ "secrets": {
22964
+ "type": "array",
22965
+ "items": {
22966
+ "type": "string"
22967
+ }
22968
+ }
22969
+ },
22970
+ "required": [
22971
+ "kind",
22972
+ "file",
22973
+ "skill",
22974
+ "secrets"
22975
+ ],
22976
+ "additionalProperties": false
22977
+ }
22978
+ ]
22979
+ },
22887
22980
  "AgentManifestPlan": {
22888
22981
  "type": "object",
22889
22982
  "properties": {
@@ -23302,6 +23395,135 @@
23302
23395
  ],
23303
23396
  "additionalProperties": false
23304
23397
  },
23398
+ "AgentManifestSourceDiff": {
23399
+ "type": "object",
23400
+ "properties": {
23401
+ "name": {
23402
+ "type": "string"
23403
+ },
23404
+ "from": {
23405
+ "type": "integer",
23406
+ "exclusiveMinimum": 0
23407
+ },
23408
+ "to": {
23409
+ "type": "integer",
23410
+ "exclusiveMinimum": 0
23411
+ },
23412
+ "added": {
23413
+ "type": "array",
23414
+ "items": {
23415
+ "type": "object",
23416
+ "properties": {
23417
+ "path": {
23418
+ "type": "string"
23419
+ },
23420
+ "size": {
23421
+ "type": "integer",
23422
+ "minimum": 0
23423
+ },
23424
+ "sha256": {
23425
+ "type": "string"
23426
+ }
23427
+ },
23428
+ "required": [
23429
+ "path",
23430
+ "size",
23431
+ "sha256"
23432
+ ],
23433
+ "additionalProperties": false
23434
+ }
23435
+ },
23436
+ "removed": {
23437
+ "type": "array",
23438
+ "items": {
23439
+ "type": "object",
23440
+ "properties": {
23441
+ "path": {
23442
+ "type": "string"
23443
+ },
23444
+ "size": {
23445
+ "type": "integer",
23446
+ "minimum": 0
23447
+ },
23448
+ "sha256": {
23449
+ "type": "string"
23450
+ }
23451
+ },
23452
+ "required": [
23453
+ "path",
23454
+ "size",
23455
+ "sha256"
23456
+ ],
23457
+ "additionalProperties": false
23458
+ }
23459
+ },
23460
+ "changed": {
23461
+ "type": "array",
23462
+ "items": {
23463
+ "type": "object",
23464
+ "properties": {
23465
+ "path": {
23466
+ "type": "string"
23467
+ },
23468
+ "from": {
23469
+ "type": "object",
23470
+ "properties": {
23471
+ "size": {
23472
+ "type": "integer",
23473
+ "minimum": 0
23474
+ },
23475
+ "sha256": {
23476
+ "type": "string"
23477
+ }
23478
+ },
23479
+ "required": [
23480
+ "size",
23481
+ "sha256"
23482
+ ],
23483
+ "additionalProperties": false
23484
+ },
23485
+ "to": {
23486
+ "type": "object",
23487
+ "properties": {
23488
+ "size": {
23489
+ "type": "integer",
23490
+ "minimum": 0
23491
+ },
23492
+ "sha256": {
23493
+ "type": "string"
23494
+ }
23495
+ },
23496
+ "required": [
23497
+ "size",
23498
+ "sha256"
23499
+ ],
23500
+ "additionalProperties": false
23501
+ }
23502
+ },
23503
+ "required": [
23504
+ "path",
23505
+ "from",
23506
+ "to"
23507
+ ],
23508
+ "additionalProperties": false
23509
+ }
23510
+ },
23511
+ "unchanged": {
23512
+ "type": "integer",
23513
+ "minimum": 0
23514
+ }
23515
+ },
23516
+ "required": [
23517
+ "name",
23518
+ "from",
23519
+ "to",
23520
+ "added",
23521
+ "removed",
23522
+ "changed",
23523
+ "unchanged"
23524
+ ],
23525
+ "additionalProperties": false
23526
+ },
23305
23527
  "DeleteAgentManifestResponse": {
23306
23528
  "type": "object",
23307
23529
  "properties": {
@@ -26182,6 +26404,149 @@
26182
26404
  }
26183
26405
  }
26184
26406
  },
26407
+ "/v1/agent-manifests/{name}/source/diff": {
26408
+ "get": {
26409
+ "tags": [
26410
+ "Agent manifests"
26411
+ ],
26412
+ "summary": "Compare two versions' folders",
26413
+ "description": "The files added, removed and changed from version `from`'s source to version `to`'s, by path, a file changed when its SHA-256 differs (feature `agent-folders`). Each list is sorted by path. A version saved as JSON has no source (`404`).",
26414
+ "security": [
26415
+ {
26416
+ "applicationKey": []
26417
+ }
26418
+ ],
26419
+ "x-nylorun-credentials": [
26420
+ "application",
26421
+ "subject"
26422
+ ],
26423
+ "x-nylorun-scopes": [
26424
+ "agents:read",
26425
+ "agents:write",
26426
+ "agent-manifests:write"
26427
+ ],
26428
+ "parameters": [
26429
+ {
26430
+ "schema": {
26431
+ "type": "string",
26432
+ "description": "The agent manifest's name, such as `triage`"
26433
+ },
26434
+ "required": true,
26435
+ "description": "The agent manifest's name, such as `triage`",
26436
+ "name": "name",
26437
+ "in": "path"
26438
+ },
26439
+ {
26440
+ "schema": {
26441
+ "type": "string",
26442
+ "description": "The version to compare from"
26443
+ },
26444
+ "required": true,
26445
+ "description": "The version to compare from",
26446
+ "name": "from",
26447
+ "in": "query"
26448
+ },
26449
+ {
26450
+ "schema": {
26451
+ "type": "string",
26452
+ "description": "The version to compare to"
26453
+ },
26454
+ "required": true,
26455
+ "description": "The version to compare to",
26456
+ "name": "to",
26457
+ "in": "query"
26458
+ },
26459
+ {
26460
+ "schema": {
26461
+ "type": "string",
26462
+ "description": "The protocol version, `18`"
26463
+ },
26464
+ "required": true,
26465
+ "description": "The protocol version, `18`",
26466
+ "name": "Nylorun-Protocol",
26467
+ "in": "header"
26468
+ },
26469
+ {
26470
+ "schema": {
26471
+ "type": "string",
26472
+ "description": "The person an application key acts for"
26473
+ },
26474
+ "required": false,
26475
+ "description": "The person an application key acts for",
26476
+ "name": "Nylorun-Subject",
26477
+ "in": "header"
26478
+ },
26479
+ {
26480
+ "schema": {
26481
+ "type": "string",
26482
+ "description": "The subject's space-separated scopes; required with a subject"
26483
+ },
26484
+ "required": false,
26485
+ "description": "The subject's space-separated scopes; required with a subject",
26486
+ "name": "Nylorun-Scopes",
26487
+ "in": "header"
26488
+ }
26489
+ ],
26490
+ "responses": {
26491
+ "200": {
26492
+ "description": "What changed",
26493
+ "content": {
26494
+ "application/json": {
26495
+ "schema": {
26496
+ "$ref": "#/components/schemas/AgentManifestSourceDiff"
26497
+ }
26498
+ }
26499
+ }
26500
+ },
26501
+ "400": {
26502
+ "description": "`from` or `to` is not a version number"
26503
+ },
26504
+ "401": {
26505
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
26506
+ "content": {
26507
+ "application/json": {
26508
+ "schema": {
26509
+ "$ref": "#/components/schemas/Rejected"
26510
+ }
26511
+ }
26512
+ }
26513
+ },
26514
+ "403": {
26515
+ "description": "Not allowed for this credential or subject scope (`scope_required`; a token also gets `WWW-Authenticate: Bearer error=\"insufficient_scope\"` and the scope), a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
26516
+ "content": {
26517
+ "application/json": {
26518
+ "schema": {
26519
+ "$ref": "#/components/schemas/Rejected"
26520
+ }
26521
+ }
26522
+ }
26523
+ },
26524
+ "404": {
26525
+ "description": "No such version, or one was saved as JSON and has no source"
26526
+ },
26527
+ "426": {
26528
+ "description": "`Nylorun-Protocol` missing or unsupported",
26529
+ "content": {
26530
+ "application/json": {
26531
+ "schema": {
26532
+ "$ref": "#/components/schemas/ProtocolRejected"
26533
+ }
26534
+ }
26535
+ }
26536
+ },
26537
+ "503": {
26538
+ "description": "The Tenant's storage or streams are unavailable",
26539
+ "content": {
26540
+ "application/json": {
26541
+ "schema": {
26542
+ "$ref": "#/components/schemas/Rejected"
26543
+ }
26544
+ }
26545
+ }
26546
+ }
26547
+ }
26548
+ }
26549
+ },
26185
26550
  "/v1/files/{file}": {
26186
26551
  "put": {
26187
26552
  "tags": [
@@ -1,4 +1,4 @@
1
- import { type AgentManifestChange, type AgentManifestPlan, type AgentManifestSource, type AgentManifestV8, type AgentManifestVersions, type AgentManifestView, type PutAgentFolderRequest, type PutAgentManifestRequest, type SaveAgentManifestResponse } from "@nylorun/core/contracts";
1
+ import { type AgentManifestChange, type AgentManifestPlan, type AgentManifestSource, type AgentManifestSourceDiff, type AgentManifestV8, type AgentManifestVersions, type AgentManifestView, type PutAgentFolderRequest, type PutAgentManifestRequest, type SaveAgentManifestResponse } from "@nylorun/core/contracts";
2
2
  import { type RecipeRequest } from "../sandbox/resolve.js";
3
3
  import type { AuthScope, TenantContext } from "./context.js";
4
4
  /** What a manifest's runtime section asks of an Agent's recipe, with the harness its loop names. */
@@ -47,6 +47,11 @@ export declare function readAgentManifestSourceFile(ctx: TenantContext, name: st
47
47
  body: ReadableStream<Uint8Array>;
48
48
  size: number;
49
49
  }>;
50
+ /**
51
+ * `GET /v1/agent-manifests/{name}/source/diff?from=&to=`: the files added, removed and changed
52
+ * (by SHA-256) from version `from`'s source to version `to`'s; a `404` when either was saved as JSON.
53
+ */
54
+ export declare function diffAgentManifestSources(ctx: TenantContext, name: string, from: number, to: number): Promise<AgentManifestSourceDiff>;
50
55
  /** `GET /v1/agent-manifests/{name}` (the latest) and `.../versions/{n}`. */
51
56
  export declare function getAgentManifest(ctx: TenantContext, name: string, version?: number): Promise<AgentManifestView>;
52
57
  /** `GET /v1/agent-manifests`: each manifest's latest version. */
@@ -27,9 +27,11 @@
27
27
  * compile is `422 folder_invalid`, every diagnostic in `details.diagnostics`), and saves the
28
28
  * manifest as above, with the folder kept as the version's source (`source`, its files recorded
29
29
  * as the version's definition files). A folder whose manifest is unchanged saves no new
30
- * version, so its source is not saved either.
30
+ * version, so its source is not saved either. What a folder may hold is the Tenant's Runtime
31
+ * limits `folderFiles`, `folderBytes` and `folderTextFileBytes` (track T7), which the compiler
32
+ * is given too; `source/diff` compares two versions' sources by path and hash.
31
33
  */
32
- import { compileAgentFolder, folderTextPaths, AGENT_FOLDER_LIMITS, } from "@nylorun/core/folder";
34
+ import { compileAgentFolder, folderTextPaths, } from "@nylorun/core/folder";
33
35
  import { definitionFilesOf, } from "@nylorun/core/contracts";
34
36
  import { hashManifest } from "@nylorun/core/compatibility";
35
37
  import { approvalRefusal, codeToolRefusal, harnessIdOf, loopManifestOf, runtimeOf, sectionGaps, } from "@nylorun/core/define";
@@ -356,10 +358,17 @@ async function saveManifest(ctx, name, manifest, scope, options, folder) {
356
358
  */
357
359
  export async function saveAgentFolder(ctx, name, body, scope, options = {}) {
358
360
  const entries = [...body.entries].sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
359
- if (entries.length > AGENT_FOLDER_LIMITS.files)
360
- fail(413, `An agent folder holds at most ${AGENT_FOLDER_LIMITS.files} files; this one holds ${entries.length}`, {
361
+ const limits = folderLimitsOf(await ctx.store.tx((t) => readRuntimeLimits(t)));
362
+ if (entries.length > limits.files)
363
+ fail(413, `An agent folder holds at most ${limits.files} files (the Runtime limit folderFiles); this one holds ${entries.length}`, {
361
364
  code: "limit_exceeded",
362
- details: { limit: AGENT_FOLDER_LIMITS.files },
365
+ details: { limit: "folderFiles", value: limits.files },
366
+ });
367
+ const bytes = entries.reduce((sum, entry) => sum + entry.size, 0);
368
+ if (bytes > limits.totalBytes)
369
+ fail(413, `An agent folder holds at most ${limits.totalBytes} bytes (the Runtime limit folderBytes); this one holds ${bytes}`, {
370
+ code: "limit_exceeded",
371
+ details: { limit: "folderBytes", value: limits.totalBytes },
363
372
  });
364
373
  // Every file must be held: the version keeps them all as its source.
365
374
  const shas = [...new Set(entries.map((entry) => `sha256:${entry.sha256}`))].sort();
@@ -377,13 +386,13 @@ export async function saveAgentFolder(ctx, name, body, scope, options = {}) {
377
386
  const files = new Map();
378
387
  for (const path of folderTextPaths(entries)) {
379
388
  const entry = entries.find((item) => item.path === path);
380
- if (entry.size > AGENT_FOLDER_LIMITS.textFileBytes)
389
+ if (entry.size > limits.textFileBytes)
381
390
  continue;
382
391
  const bytes = await readDefinitionFile(ctx.blobs, `sha256:${entry.sha256}`);
383
392
  if (bytes)
384
393
  files.set(path, bytes);
385
394
  }
386
- const compiled = compileAgentFolder({ entries, files, name });
395
+ const compiled = compileAgentFolder({ entries, files, name, limits });
387
396
  if (!compiled.manifest) {
388
397
  const errors = compiled.diagnostics.filter((item) => item.severity === "error");
389
398
  fail(422, `Agent folder ${name} does not compile: ${errors.length} error(s), the first: ${located(errors[0])}`, {
@@ -394,7 +403,7 @@ export async function saveAgentFolder(ctx, name, body, scope, options = {}) {
394
403
  const source = {
395
404
  compiler: compiled.compiler,
396
405
  files: entries.length,
397
- bytes: entries.reduce((sum, entry) => sum + entry.size, 0),
406
+ bytes,
398
407
  entries: entries.map((entry) => ({ path: entry.path, size: entry.size, sha256: entry.sha256 })),
399
408
  };
400
409
  return saveManifest(ctx, name, compiled.manifest, scope, options, {
@@ -403,6 +412,10 @@ export async function saveAgentFolder(ctx, name, body, scope, options = {}) {
403
412
  compiler: compiled.compiler,
404
413
  });
405
414
  }
415
+ /** What a folder may hold: the Tenant's Runtime limits, as the compiler takes them. */
416
+ function folderLimitsOf(limits) {
417
+ return { files: limits.folderFiles, totalBytes: limits.folderBytes, textFileBytes: limits.folderTextFileBytes };
418
+ }
406
419
  /** A diagnostic as a person reads it: `file:line:column message`. */
407
420
  function located(diagnostic) {
408
421
  if (!diagnostic)
@@ -435,6 +448,35 @@ export async function readAgentManifestSourceFile(ctx, name, version, path) {
435
448
  fail(404, `The Runtime no longer holds ${path} of version ${version} of agent manifest ${name}.`, { code: "not_found" });
436
449
  return { body: body, size: entry.size };
437
450
  }
451
+ /**
452
+ * `GET /v1/agent-manifests/{name}/source/diff?from=&to=`: the files added, removed and changed
453
+ * (by SHA-256) from version `from`'s source to version `to`'s; a `404` when either was saved as JSON.
454
+ */
455
+ export async function diffAgentManifestSources(ctx, name, from, to) {
456
+ const before = new Map((await sourceOf(ctx, name, from)).entries.map((entry) => [entry.path, entry]));
457
+ const after = (await sourceOf(ctx, name, to)).entries;
458
+ const diff = { name, from, to, added: [], removed: [], changed: [], unchanged: 0 };
459
+ for (const entry of after) {
460
+ const was = before.get(entry.path);
461
+ before.delete(entry.path);
462
+ if (!was)
463
+ diff.added.push(entry);
464
+ else if (was.sha256 === entry.sha256)
465
+ diff.unchanged++;
466
+ else
467
+ diff.changed.push({
468
+ path: entry.path,
469
+ from: { size: was.size, sha256: was.sha256 },
470
+ to: { size: entry.size, sha256: entry.sha256 },
471
+ });
472
+ }
473
+ diff.removed.push(...before.values());
474
+ const byPath = (a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
475
+ diff.added.sort(byPath);
476
+ diff.removed.sort(byPath);
477
+ diff.changed.sort(byPath);
478
+ return diff;
479
+ }
438
480
  /** `GET /v1/agent-manifests/{name}` (the latest) and `.../versions/{n}`. */
439
481
  export async function getAgentManifest(ctx, name, version) {
440
482
  return ctx.store.tx(async (t) => {
@@ -17,10 +17,11 @@ export declare function liveEnvironment(t: Tx, id: string, options?: {
17
17
  * An Agent's state (protocol 16), from its desired state, its compute and its sessions, and
18
18
  * every state that holds with the session behind it (`attention`), highest first. A session waits
19
19
  * on a person while it is paused (an approval or an interaction) or uncertain, and the Agent while
20
- * a move waits for its required secrets (track T3); a session's last turn
21
- * failed while it is `failed`; a turn runs while it is `running`, `runnable` or `waiting`.
20
+ * a move waits for its required secrets (track T3), or a required secret of the version it runs
21
+ * has no value (`unsetSecrets`, track T7: a tool would fail when it is called); a session's last
22
+ * turn failed while it is `failed`; a turn runs while it is `running`, `runnable` or `waiting`.
22
23
  */
23
- export declare function stateOf(agent: Pick<Environment, "desiredState" | "pod"> & Partial<Pick<Environment, "targetVersion" | "appliedVersion" | "version" | "failedVersion">>, sessions: readonly Pick<Session, "id" | "status">[]): {
24
+ export declare function stateOf(agent: Pick<Environment, "desiredState" | "pod"> & Partial<Pick<Environment, "targetVersion" | "appliedVersion" | "version" | "failedVersion">>, sessions: readonly Pick<Session, "id" | "status">[], unsetSecrets?: readonly string[]): {
24
25
  state: AgentState;
25
26
  attention: AgentAttention[];
26
27
  };
@@ -22,7 +22,8 @@
22
22
  * the Agent's id).
23
23
  * - **State on read.** `state` is derived when it is read, the first rule that holds: `paused`
24
24
  * (desired `off`, track T6), `failing` (its compute failed or was lost, or a session's last
25
- * turn failed), `input_required` (a session waits on a person), `working` (a turn runs),
25
+ * turn failed), `input_required` (a session waits on a person, or a required secret is unset),
26
+ * `working` (a turn runs),
26
27
  * `sleeping`; `attention` names the sessions behind each that holds (`stateOf`).
27
28
  * - **Secret slots** (D64): when its manifest declares `secrets`, a secret write sends only the
28
29
  * value, the binding comes from the slot, and a name it does not declare is
@@ -110,16 +111,20 @@ const STATE_RANK = ["paused", "failing", "input_required", "working", "sleeping"
110
111
  * An Agent's state (protocol 16), from its desired state, its compute and its sessions, and
111
112
  * every state that holds with the session behind it (`attention`), highest first. A session waits
112
113
  * on a person while it is paused (an approval or an interaction) or uncertain, and the Agent while
113
- * a move waits for its required secrets (track T3); a session's last turn
114
- * failed while it is `failed`; a turn runs while it is `running`, `runnable` or `waiting`.
114
+ * a move waits for its required secrets (track T3), or a required secret of the version it runs
115
+ * has no value (`unsetSecrets`, track T7: a tool would fail when it is called); a session's last
116
+ * turn failed while it is `failed`; a turn runs while it is `running`, `runnable` or `waiting`.
115
117
  */
116
- export function stateOf(agent, sessions) {
118
+ export function stateOf(agent, sessions, unsetSecrets = []) {
117
119
  const attention = [];
118
120
  if (agent.desiredState === "off")
119
121
  attention.push({ state: "paused", reason: "desired off" });
120
122
  // A move that waits for a person to set its required secrets (track T3).
121
123
  if (agent.targetVersion !== undefined && agent.appliedVersion === agent.version)
122
124
  attention.push({ state: "input_required", reason: `secret_required: version ${agent.targetVersion} waits for its required secrets` });
125
+ // A required secret of the version it runs, unset (track T7).
126
+ for (const name of unsetSecrets)
127
+ attention.push({ state: "input_required", reason: `secret_unset: required secret ${name} unset` });
123
128
  const pod = agent.pod;
124
129
  if (pod && (pod.observed === "failed" || pod.observed === "lost") && pod.desired !== "deleted")
125
130
  attention.push({ state: "failing", reason: `compute ${pod.observed}${pod.reason ? `: ${pod.reason}` : ""}` });
@@ -152,7 +157,7 @@ async function viewOf(ctx, t, environment, owner) {
152
157
  : undefined;
153
158
  const pod = environment.pod;
154
159
  const visible = sessions.filter((session) => owner === undefined || session.ownerUserId === owner);
155
- const { state, attention } = stateOf(environment, visible);
160
+ const { state, attention } = stateOf(environment, visible, await unsetRequiredSecrets(t, environment));
156
161
  return {
157
162
  id: environment.id,
158
163
  manifest: manifestRefOf(environment),
@@ -230,6 +235,22 @@ async function slotsAhead(t, environment) {
230
235
  const target = await t.agentManifest(environment.manifestName, environment.targetVersion);
231
236
  return target ? runtimeOf(target.body).secrets : environment.applied.secrets;
232
237
  }
238
+ /**
239
+ * The required secret slots of the version `environment` runs (its applied runtime) that its vault
240
+ * holds no value for, by name: the Agent's attention (track T7), before a tool fails for want of
241
+ * one. A move waiting on the next version's secrets is its own attention item (`stateOf`).
242
+ */
243
+ async function unsetRequiredSecrets(t, environment) {
244
+ const required = Object.entries(environment.applied.secrets ?? {}).filter(([, slot]) => slot.required === true);
245
+ if (required.length === 0)
246
+ return [];
247
+ const vault = await t.vaultOfEnvironment(environment.id);
248
+ const rows = vault ? await t.credentialsForVault(vault.id) : [];
249
+ return required
250
+ .filter(([name, slot]) => !rows.some((row) => row.name === name && slotHolds(slot, row)))
251
+ .map(([name]) => name)
252
+ .sort();
253
+ }
233
254
  /** Each secret slot `environment` declares (`slotsAhead`), and whether its vault holds a value that fills it. */
234
255
  async function slotsOf(t, environment) {
235
256
  const declared = await slotsAhead(t, environment);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const RUNTIME_VERSION = "0.31.0-beta";
1
+ export declare const RUNTIME_VERSION = "0.32.0-beta";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Kept in step with package.json by runtime/server/scripts/check-package.mjs, which runs in npm run check.
2
2
  // release:prepare also rewrites this when it bumps @nylorun/runtime.
3
- export const RUNTIME_VERSION = "0.31.0-beta";
3
+ export const RUNTIME_VERSION = "0.32.0-beta";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/runtime",
3
- "version": "0.31.0-beta",
3
+ "version": "0.32.0-beta",
4
4
  "description": "Nylorun Runtime: the agent execution Host on Postgres, Restate and S2, and model providers.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -65,8 +65,8 @@
65
65
  "@hono/node-server": "^2.1.5",
66
66
  "@hono/zod-openapi": "^1.6.3",
67
67
  "@modelcontextprotocol/sdk": "^1.32.1",
68
- "@nylorun/core": "0.27.0-beta",
69
- "@nylorun/harness": "0.29.3-beta",
68
+ "@nylorun/core": "0.28.0-beta",
69
+ "@nylorun/harness": "0.29.4-beta",
70
70
  "@restatedev/restate-sdk": "1.17.3",
71
71
  "@restatedev/restate-sdk-clients": "1.17.3",
72
72
  "@s2-dev/streamstore": "0.28.0",