@nylorun/runtime 0.30.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/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.30.0-beta",
5
+ "version": "0.32.0-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
@@ -33,7 +33,8 @@
33
33
  "tool-policy",
34
34
  "traces",
35
35
  "artifact-reads",
36
- "gateway-credentials"
36
+ "gateway-credentials",
37
+ "agent-folders"
37
38
  ]
38
39
  },
39
40
  "description": "For developers: agent manifests, Agents, sessions (with AG-UI and A2A) and artifacts, through `@nylorun/agents`. Every Tenant serves it on its one URL, beside the Management API (`/openapi/management.json`). Every request sends `Nylorun-Protocol`. Who may call each operation is its `security` and its `x-nylorun-credentials` and `x-nylorun-scopes` (the subject scopes that reach it) fields: an application key (servers) or a trusted issuer's token (browsers and apps)."
@@ -6397,6 +6398,7 @@
6397
6398
  "manifest_not_found",
6398
6399
  "manifest_in_use",
6399
6400
  "manifest_changed",
6401
+ "folder_invalid",
6400
6402
  "internal_error"
6401
6403
  ]
6402
6404
  },
@@ -21663,6 +21665,28 @@
21663
21665
  "agents": {
21664
21666
  "type": "integer",
21665
21667
  "minimum": 0
21668
+ },
21669
+ "source": {
21670
+ "type": "object",
21671
+ "properties": {
21672
+ "compiler": {
21673
+ "type": "string"
21674
+ },
21675
+ "files": {
21676
+ "type": "integer",
21677
+ "minimum": 0
21678
+ },
21679
+ "bytes": {
21680
+ "type": "integer",
21681
+ "minimum": 0
21682
+ }
21683
+ },
21684
+ "required": [
21685
+ "compiler",
21686
+ "files",
21687
+ "bytes"
21688
+ ],
21689
+ "additionalProperties": false
21666
21690
  }
21667
21691
  },
21668
21692
  "required": [
@@ -22749,6 +22773,28 @@
22749
22773
  "agents": {
22750
22774
  "type": "integer",
22751
22775
  "minimum": 0
22776
+ },
22777
+ "source": {
22778
+ "type": "object",
22779
+ "properties": {
22780
+ "compiler": {
22781
+ "type": "string"
22782
+ },
22783
+ "files": {
22784
+ "type": "integer",
22785
+ "minimum": 0
22786
+ },
22787
+ "bytes": {
22788
+ "type": "integer",
22789
+ "minimum": 0
22790
+ }
22791
+ },
22792
+ "required": [
22793
+ "compiler",
22794
+ "files",
22795
+ "bytes"
22796
+ ],
22797
+ "additionalProperties": false
22752
22798
  }
22753
22799
  },
22754
22800
  "required": [
@@ -22783,6 +22829,12 @@
22783
22829
  ],
22784
22830
  "additionalProperties": false
22785
22831
  }
22832
+ },
22833
+ "diagnostics": {
22834
+ "type": "array",
22835
+ "items": {
22836
+ "$ref": "#/components/schemas/AgentFolderDiagnostic"
22837
+ }
22786
22838
  }
22787
22839
  },
22788
22840
  "required": [
@@ -22792,6 +22844,139 @@
22792
22844
  ],
22793
22845
  "additionalProperties": false
22794
22846
  },
22847
+ "AgentFolderDiagnostic": {
22848
+ "type": "object",
22849
+ "properties": {
22850
+ "severity": {
22851
+ "type": "string",
22852
+ "enum": [
22853
+ "error",
22854
+ "warning",
22855
+ "info",
22856
+ "note"
22857
+ ]
22858
+ },
22859
+ "code": {
22860
+ "type": "string"
22861
+ },
22862
+ "message": {
22863
+ "type": "string"
22864
+ },
22865
+ "file": {
22866
+ "type": "string"
22867
+ },
22868
+ "line": {
22869
+ "type": "integer",
22870
+ "exclusiveMinimum": 0
22871
+ },
22872
+ "column": {
22873
+ "type": "integer",
22874
+ "exclusiveMinimum": 0
22875
+ },
22876
+ "pointer": {
22877
+ "type": "string"
22878
+ },
22879
+ "fix": {
22880
+ "$ref": "#/components/schemas/AgentFolderFix"
22881
+ }
22882
+ },
22883
+ "required": [
22884
+ "severity",
22885
+ "code",
22886
+ "message"
22887
+ ],
22888
+ "additionalProperties": false
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
+ },
22795
22980
  "AgentManifestPlan": {
22796
22981
  "type": "object",
22797
22982
  "properties": {
@@ -22898,6 +23083,18 @@
22898
23083
  "secrets"
22899
23084
  ],
22900
23085
  "additionalProperties": false
23086
+ },
23087
+ "manifest": {
23088
+ "$ref": "#/components/schemas/AgentManifestV8"
23089
+ },
23090
+ "diagnostics": {
23091
+ "type": "array",
23092
+ "items": {
23093
+ "$ref": "#/components/schemas/AgentFolderDiagnostic"
23094
+ }
23095
+ },
23096
+ "compiler": {
23097
+ "type": "string"
22901
23098
  }
22902
23099
  },
22903
23100
  "required": [
@@ -22958,6 +23155,61 @@
22958
23155
  ],
22959
23156
  "additionalProperties": false
22960
23157
  },
23158
+ "PutAgentFolderRequest": {
23159
+ "type": "object",
23160
+ "properties": {
23161
+ "requestId": {
23162
+ "type": "string",
23163
+ "minLength": 1
23164
+ },
23165
+ "format": {
23166
+ "type": "string",
23167
+ "enum": [
23168
+ "nylorun.folder.v2"
23169
+ ]
23170
+ },
23171
+ "entries": {
23172
+ "type": "array",
23173
+ "items": {
23174
+ "type": "object",
23175
+ "properties": {
23176
+ "path": {
23177
+ "type": "string",
23178
+ "minLength": 1,
23179
+ "maxLength": 1024
23180
+ },
23181
+ "size": {
23182
+ "type": "integer",
23183
+ "minimum": 0
23184
+ },
23185
+ "sha256": {
23186
+ "type": "string",
23187
+ "pattern": "^[0-9a-f]{64}$"
23188
+ },
23189
+ "contentType": {
23190
+ "type": "string"
23191
+ },
23192
+ "mode": {
23193
+ "type": "integer",
23194
+ "minimum": 0,
23195
+ "maximum": 4095
23196
+ }
23197
+ },
23198
+ "required": [
23199
+ "path",
23200
+ "size",
23201
+ "sha256"
23202
+ ],
23203
+ "additionalProperties": false
23204
+ }
23205
+ }
23206
+ },
23207
+ "required": [
23208
+ "format",
23209
+ "entries"
23210
+ ],
23211
+ "additionalProperties": false
23212
+ },
22961
23213
  "AgentManifestView": {
22962
23214
  "type": "object",
22963
23215
  "properties": {
@@ -22992,6 +23244,28 @@
22992
23244
  "agents": {
22993
23245
  "type": "integer",
22994
23246
  "minimum": 0
23247
+ },
23248
+ "source": {
23249
+ "type": "object",
23250
+ "properties": {
23251
+ "compiler": {
23252
+ "type": "string"
23253
+ },
23254
+ "files": {
23255
+ "type": "integer",
23256
+ "minimum": 0
23257
+ },
23258
+ "bytes": {
23259
+ "type": "integer",
23260
+ "minimum": 0
23261
+ }
23262
+ },
23263
+ "required": [
23264
+ "compiler",
23265
+ "files",
23266
+ "bytes"
23267
+ ],
23268
+ "additionalProperties": false
22995
23269
  }
22996
23270
  },
22997
23271
  "required": [
@@ -23065,46 +23339,231 @@
23065
23339
  ],
23066
23340
  "additionalProperties": false
23067
23341
  },
23068
- "DeleteAgentManifestResponse": {
23342
+ "AgentManifestSource": {
23069
23343
  "type": "object",
23070
23344
  "properties": {
23071
23345
  "name": {
23072
23346
  "type": "string"
23073
23347
  },
23074
- "deleted": {
23075
- "type": "boolean"
23076
- }
23077
- },
23078
- "required": [
23079
- "name",
23080
- "deleted"
23081
- ],
23082
- "additionalProperties": false
23083
- },
23084
- "UploadArtifactResponse": {
23085
- "type": "object",
23086
- "properties": {
23087
- "artifact": {
23088
- "type": "object",
23089
- "properties": {
23090
- "artifactId": {
23091
- "type": "string"
23092
- },
23093
- "kind": {
23094
- "type": "string",
23095
- "enum": [
23096
- "file",
23097
- "folder"
23098
- ]
23099
- },
23100
- "name": {
23101
- "type": "string"
23102
- },
23103
- "contentType": {
23104
- "type": "string",
23105
- "description": "The latest version's media type"
23106
- },
23107
- "sessionId": {
23348
+ "version": {
23349
+ "type": "integer",
23350
+ "exclusiveMinimum": 0
23351
+ },
23352
+ "compiler": {
23353
+ "type": "string"
23354
+ },
23355
+ "files": {
23356
+ "type": "integer",
23357
+ "minimum": 0
23358
+ },
23359
+ "bytes": {
23360
+ "type": "integer",
23361
+ "minimum": 0
23362
+ },
23363
+ "entries": {
23364
+ "type": "array",
23365
+ "items": {
23366
+ "type": "object",
23367
+ "properties": {
23368
+ "path": {
23369
+ "type": "string"
23370
+ },
23371
+ "size": {
23372
+ "type": "integer",
23373
+ "minimum": 0
23374
+ },
23375
+ "sha256": {
23376
+ "type": "string"
23377
+ }
23378
+ },
23379
+ "required": [
23380
+ "path",
23381
+ "size",
23382
+ "sha256"
23383
+ ],
23384
+ "additionalProperties": false
23385
+ }
23386
+ }
23387
+ },
23388
+ "required": [
23389
+ "name",
23390
+ "version",
23391
+ "compiler",
23392
+ "files",
23393
+ "bytes",
23394
+ "entries"
23395
+ ],
23396
+ "additionalProperties": false
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
+ },
23527
+ "DeleteAgentManifestResponse": {
23528
+ "type": "object",
23529
+ "properties": {
23530
+ "name": {
23531
+ "type": "string"
23532
+ },
23533
+ "deleted": {
23534
+ "type": "boolean"
23535
+ }
23536
+ },
23537
+ "required": [
23538
+ "name",
23539
+ "deleted"
23540
+ ],
23541
+ "additionalProperties": false
23542
+ },
23543
+ "UploadArtifactResponse": {
23544
+ "type": "object",
23545
+ "properties": {
23546
+ "artifact": {
23547
+ "type": "object",
23548
+ "properties": {
23549
+ "artifactId": {
23550
+ "type": "string"
23551
+ },
23552
+ "kind": {
23553
+ "type": "string",
23554
+ "enum": [
23555
+ "file",
23556
+ "folder"
23557
+ ]
23558
+ },
23559
+ "name": {
23560
+ "type": "string"
23561
+ },
23562
+ "contentType": {
23563
+ "type": "string",
23564
+ "description": "The latest version's media type"
23565
+ },
23566
+ "sessionId": {
23108
23567
  "type": "string"
23109
23568
  },
23110
23569
  "agentId": {
@@ -24792,7 +25251,7 @@
24792
25251
  "Agent manifests"
24793
25252
  ],
24794
25253
  "summary": "Save an agent manifest",
24795
- "description": "Saves the manifest as its next version, or answers the latest unchanged when nothing differs. Every Agent that tracks the manifest moves to the new version: at once, at its pod's next start for a runtime change a pod applies only when it starts, or once a required secret the version adds is set; a pinned one stays, and so does one whose kind, harness or storage the version changes (`agents_behind`). The Runtime checks the harness and runtime sections against each other: a custom harness needs a pod with an image, every credential the harness names is a declared slot of the right type, and the runtime's kind gives the loop the sandbox it needs; every gap is named in one `422 manifest_inconsistent` (`details.gaps`). `If-Match: <version>` refuses the save with `412 manifest_changed` when the latest version is no longer the one you read (`0` for a manifest that does not exist yet). With `?dryRun=true` the answer is the plan: the changes by section, every reason a save would be refused (`errors`, the gaps first), warnings, the Agents it would move (`moves`) and how many stay on older versions (`behind`); nothing is saved. Clients compose the authoring files and drop their `$schema` before they send one document.",
25254
+ "description": "Saves the manifest as its next version, or answers the latest unchanged when nothing differs. Every Agent that tracks the manifest moves to the new version: at once, at its pod's next start for a runtime change a pod applies only when it starts, or once a required secret the version adds is set; a pinned one stays, and so does one whose kind, harness or storage the version changes (`agents_behind`). The Runtime checks the harness and runtime sections against each other: a custom harness needs a pod with an image, every credential the harness names is a declared slot of the right type, and the runtime's kind gives the loop the sandbox it needs; every gap is named in one `422 manifest_inconsistent` (`details.gaps`). `If-Match: <version>` refuses the save with `412 manifest_changed` when the latest version is no longer the one you read (`0` for a manifest that does not exist yet). With `?dryRun=true` the answer is the plan: the changes by section, every reason a save would be refused (`errors`, the gaps first), warnings, the Agents it would move (`moves`) and how many stay on older versions (`behind`); nothing is saved. Clients compose the authoring files and drop their `$schema` before they send one document. With `Content-Type: application/vnd.nylorun.folder+json` the body is an agent folder by hash instead (feature `agent-folders`): every file uploaded first with `PUT /v1/files/sha256:<hex>`, the Runtime compiles it with `@nylorun/core/folder`, a folder that does not compile is `422 folder_invalid` (`details.diagnostics`, each with its file, line and column), and the version keeps the folder as its source; the plan adds the compiled `manifest`, the compiler's `diagnostics` and `compiler`.",
24796
25255
  "security": [
24797
25256
  {
24798
25257
  "applicationKey": []
@@ -24868,6 +25327,11 @@
24868
25327
  "schema": {
24869
25328
  "$ref": "#/components/schemas/PutAgentManifestRequest"
24870
25329
  }
25330
+ },
25331
+ "application/vnd.nylorun.folder+json": {
25332
+ "schema": {
25333
+ "$ref": "#/components/schemas/PutAgentFolderRequest"
25334
+ }
24871
25335
  }
24872
25336
  }
24873
25337
  },
@@ -24929,7 +25393,7 @@
24929
25393
  "description": "A skill's files hold more than the manifest's skill limit together (`limit_exceeded`)"
24930
25394
  },
24931
25395
  "422": {
24932
- "description": "The harness and runtime sections do not fit (`manifest_inconsistent`, `details.gaps`)"
25396
+ "description": "The harness and runtime sections do not fit (`manifest_inconsistent`, `details.gaps`), or an agent folder does not compile (`folder_invalid`, `details.diagnostics`)"
24933
25397
  },
24934
25398
  "426": {
24935
25399
  "description": "`Nylorun-Protocol` missing or unsupported",
@@ -25635,6 +26099,454 @@
25635
26099
  }
25636
26100
  }
25637
26101
  },
26102
+ "/v1/agent-manifests/{name}/versions/{version}/source": {
26103
+ "get": {
26104
+ "tags": [
26105
+ "Agent manifests"
26106
+ ],
26107
+ "summary": "Get the folder a version was compiled from",
26108
+ "description": "The agent folder the version was saved from (feature `agent-folders`): its compiler, size and every file, sorted by path. A version saved as JSON has none (`404`).",
26109
+ "security": [
26110
+ {
26111
+ "applicationKey": []
26112
+ }
26113
+ ],
26114
+ "x-nylorun-credentials": [
26115
+ "application",
26116
+ "subject"
26117
+ ],
26118
+ "x-nylorun-scopes": [
26119
+ "agents:read",
26120
+ "agents:write",
26121
+ "agent-manifests:write"
26122
+ ],
26123
+ "parameters": [
26124
+ {
26125
+ "schema": {
26126
+ "type": "string",
26127
+ "description": "The agent manifest's name, such as `triage`"
26128
+ },
26129
+ "required": true,
26130
+ "description": "The agent manifest's name, such as `triage`",
26131
+ "name": "name",
26132
+ "in": "path"
26133
+ },
26134
+ {
26135
+ "schema": {
26136
+ "type": "string",
26137
+ "description": "The version number"
26138
+ },
26139
+ "required": true,
26140
+ "description": "The version number",
26141
+ "name": "version",
26142
+ "in": "path"
26143
+ },
26144
+ {
26145
+ "schema": {
26146
+ "type": "string",
26147
+ "description": "The protocol version, `18`"
26148
+ },
26149
+ "required": true,
26150
+ "description": "The protocol version, `18`",
26151
+ "name": "Nylorun-Protocol",
26152
+ "in": "header"
26153
+ },
26154
+ {
26155
+ "schema": {
26156
+ "type": "string",
26157
+ "description": "The person an application key acts for"
26158
+ },
26159
+ "required": false,
26160
+ "description": "The person an application key acts for",
26161
+ "name": "Nylorun-Subject",
26162
+ "in": "header"
26163
+ },
26164
+ {
26165
+ "schema": {
26166
+ "type": "string",
26167
+ "description": "The subject's space-separated scopes; required with a subject"
26168
+ },
26169
+ "required": false,
26170
+ "description": "The subject's space-separated scopes; required with a subject",
26171
+ "name": "Nylorun-Scopes",
26172
+ "in": "header"
26173
+ }
26174
+ ],
26175
+ "responses": {
26176
+ "200": {
26177
+ "description": "The folder",
26178
+ "content": {
26179
+ "application/json": {
26180
+ "schema": {
26181
+ "$ref": "#/components/schemas/AgentManifestSource"
26182
+ }
26183
+ }
26184
+ }
26185
+ },
26186
+ "400": {
26187
+ "description": "Invalid headers, path, body or cursor",
26188
+ "content": {
26189
+ "application/json": {
26190
+ "schema": {
26191
+ "$ref": "#/components/schemas/Rejected"
26192
+ }
26193
+ }
26194
+ }
26195
+ },
26196
+ "401": {
26197
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
26198
+ "content": {
26199
+ "application/json": {
26200
+ "schema": {
26201
+ "$ref": "#/components/schemas/Rejected"
26202
+ }
26203
+ }
26204
+ }
26205
+ },
26206
+ "403": {
26207
+ "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`)",
26208
+ "content": {
26209
+ "application/json": {
26210
+ "schema": {
26211
+ "$ref": "#/components/schemas/Rejected"
26212
+ }
26213
+ }
26214
+ }
26215
+ },
26216
+ "404": {
26217
+ "description": "Not found (`not_found`)",
26218
+ "content": {
26219
+ "application/json": {
26220
+ "schema": {
26221
+ "$ref": "#/components/schemas/Rejected"
26222
+ }
26223
+ }
26224
+ }
26225
+ },
26226
+ "426": {
26227
+ "description": "`Nylorun-Protocol` missing or unsupported",
26228
+ "content": {
26229
+ "application/json": {
26230
+ "schema": {
26231
+ "$ref": "#/components/schemas/ProtocolRejected"
26232
+ }
26233
+ }
26234
+ }
26235
+ },
26236
+ "503": {
26237
+ "description": "The Tenant's storage or streams are unavailable",
26238
+ "content": {
26239
+ "application/json": {
26240
+ "schema": {
26241
+ "$ref": "#/components/schemas/Rejected"
26242
+ }
26243
+ }
26244
+ }
26245
+ }
26246
+ }
26247
+ }
26248
+ },
26249
+ "/v1/agent-manifests/{name}/versions/{version}/source/files/{path}": {
26250
+ "get": {
26251
+ "tags": [
26252
+ "Agent manifests"
26253
+ ],
26254
+ "summary": "Download one file of a version's folder",
26255
+ "description": "Streams the file at `path` (its path in the folder, with `/` percent-encoded as `%2F`) as it was saved.",
26256
+ "security": [
26257
+ {
26258
+ "applicationKey": []
26259
+ }
26260
+ ],
26261
+ "x-nylorun-credentials": [
26262
+ "application",
26263
+ "subject"
26264
+ ],
26265
+ "x-nylorun-scopes": [
26266
+ "agents:read",
26267
+ "agents:write",
26268
+ "agent-manifests:write"
26269
+ ],
26270
+ "parameters": [
26271
+ {
26272
+ "schema": {
26273
+ "type": "string",
26274
+ "description": "The agent manifest's name, such as `triage`"
26275
+ },
26276
+ "required": true,
26277
+ "description": "The agent manifest's name, such as `triage`",
26278
+ "name": "name",
26279
+ "in": "path"
26280
+ },
26281
+ {
26282
+ "schema": {
26283
+ "type": "string",
26284
+ "description": "The version number"
26285
+ },
26286
+ "required": true,
26287
+ "description": "The version number",
26288
+ "name": "version",
26289
+ "in": "path"
26290
+ },
26291
+ {
26292
+ "schema": {
26293
+ "type": "string",
26294
+ "description": "The file's path in the folder, percent-encoded"
26295
+ },
26296
+ "required": true,
26297
+ "description": "The file's path in the folder, percent-encoded",
26298
+ "name": "path",
26299
+ "in": "path"
26300
+ },
26301
+ {
26302
+ "schema": {
26303
+ "type": "string",
26304
+ "description": "The protocol version, `18`"
26305
+ },
26306
+ "required": true,
26307
+ "description": "The protocol version, `18`",
26308
+ "name": "Nylorun-Protocol",
26309
+ "in": "header"
26310
+ },
26311
+ {
26312
+ "schema": {
26313
+ "type": "string",
26314
+ "description": "The person an application key acts for"
26315
+ },
26316
+ "required": false,
26317
+ "description": "The person an application key acts for",
26318
+ "name": "Nylorun-Subject",
26319
+ "in": "header"
26320
+ },
26321
+ {
26322
+ "schema": {
26323
+ "type": "string",
26324
+ "description": "The subject's space-separated scopes; required with a subject"
26325
+ },
26326
+ "required": false,
26327
+ "description": "The subject's space-separated scopes; required with a subject",
26328
+ "name": "Nylorun-Scopes",
26329
+ "in": "header"
26330
+ }
26331
+ ],
26332
+ "responses": {
26333
+ "200": {
26334
+ "description": "The file's bytes",
26335
+ "content": {
26336
+ "application/octet-stream": {
26337
+ "schema": {
26338
+ "type": "string",
26339
+ "format": "binary"
26340
+ }
26341
+ }
26342
+ }
26343
+ },
26344
+ "400": {
26345
+ "description": "Invalid headers, path, body or cursor",
26346
+ "content": {
26347
+ "application/json": {
26348
+ "schema": {
26349
+ "$ref": "#/components/schemas/Rejected"
26350
+ }
26351
+ }
26352
+ }
26353
+ },
26354
+ "401": {
26355
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
26356
+ "content": {
26357
+ "application/json": {
26358
+ "schema": {
26359
+ "$ref": "#/components/schemas/Rejected"
26360
+ }
26361
+ }
26362
+ }
26363
+ },
26364
+ "403": {
26365
+ "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`)",
26366
+ "content": {
26367
+ "application/json": {
26368
+ "schema": {
26369
+ "$ref": "#/components/schemas/Rejected"
26370
+ }
26371
+ }
26372
+ }
26373
+ },
26374
+ "404": {
26375
+ "description": "Not found (`not_found`)",
26376
+ "content": {
26377
+ "application/json": {
26378
+ "schema": {
26379
+ "$ref": "#/components/schemas/Rejected"
26380
+ }
26381
+ }
26382
+ }
26383
+ },
26384
+ "426": {
26385
+ "description": "`Nylorun-Protocol` missing or unsupported",
26386
+ "content": {
26387
+ "application/json": {
26388
+ "schema": {
26389
+ "$ref": "#/components/schemas/ProtocolRejected"
26390
+ }
26391
+ }
26392
+ }
26393
+ },
26394
+ "503": {
26395
+ "description": "The Tenant's storage or streams are unavailable",
26396
+ "content": {
26397
+ "application/json": {
26398
+ "schema": {
26399
+ "$ref": "#/components/schemas/Rejected"
26400
+ }
26401
+ }
26402
+ }
26403
+ }
26404
+ }
26405
+ }
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
+ },
25638
26550
  "/v1/files/{file}": {
25639
26551
  "put": {
25640
26552
  "tags": [