@nylorun/runtime 0.29.0-beta → 0.31.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/api/components.d.ts +240 -2
  3. package/dist/api/components.js +3 -1
  4. package/dist/api/http/routes/agent-manifests.d.ts +2 -1
  5. package/dist/api/http/routes/agent-manifests.js +62 -10
  6. package/dist/api/openapi.js +2 -0
  7. package/dist/gates/egress-credentials.js +2 -13
  8. package/dist/gates/handler.js +2 -1
  9. package/dist/gates/in-process.d.ts +9 -0
  10. package/dist/gates/in-process.js +21 -0
  11. package/dist/host/http.js +3 -1
  12. package/dist/host/main.js +2 -0
  13. package/dist/host/stack-config.d.ts +10 -0
  14. package/dist/host/stack-config.js +36 -0
  15. package/dist/management-openapi.json +361 -5
  16. package/dist/mcp/connect.d.ts +34 -5
  17. package/dist/mcp/connect.js +75 -14
  18. package/dist/mcp/gateway-outcomes.d.ts +14 -0
  19. package/dist/mcp/gateway-outcomes.js +46 -0
  20. package/dist/mcp/pool.js +5 -0
  21. package/dist/model/call-headers.d.ts +15 -0
  22. package/dist/model/call-headers.js +9 -0
  23. package/dist/model/models.d.ts +7 -0
  24. package/dist/model/models.js +3 -0
  25. package/dist/model/pi-model.d.ts +6 -0
  26. package/dist/model/pi-model.js +29 -3
  27. package/dist/openapi.json +654 -30
  28. package/dist/store/postgres/drizzle/0038_t6_agent_manifest_source.sql +1 -0
  29. package/dist/store/postgres/drizzle/meta/_journal.json +7 -0
  30. package/dist/store/postgres/schema.d.ts +21 -2
  31. package/dist/store/postgres/schema.js +7 -1
  32. package/dist/store/postgres/store.js +1 -0
  33. package/dist/store/types.d.ts +14 -0
  34. package/dist/tenant/agent-manifests.d.ts +18 -25
  35. package/dist/tenant/agent-manifests.js +136 -4
  36. package/dist/tenant/agents.js +7 -3
  37. package/dist/tenant/transcript.d.ts +8 -0
  38. package/dist/tenant/transcript.js +2 -0
  39. package/dist/vault/headers.d.ts +8 -0
  40. package/dist/vault/headers.js +25 -0
  41. package/dist/vault/host-model.js +8 -5
  42. package/dist/vault/service.d.ts +12 -5
  43. package/dist/vault/service.js +43 -6
  44. package/dist/vault/sources.js +22 -1
  45. package/dist/vault/workload-token.d.ts +16 -0
  46. package/dist/vault/workload-token.js +58 -0
  47. package/dist/version.d.ts +1 -1
  48. package/dist/version.js +1 -1
  49. package/package.json +3 -3
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.29.0-beta",
5
+ "version": "0.31.0-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
@@ -32,7 +32,9 @@
32
32
  "environment-disk-versions",
33
33
  "tool-policy",
34
34
  "traces",
35
- "artifact-reads"
35
+ "artifact-reads",
36
+ "gateway-credentials",
37
+ "agent-folders"
36
38
  ]
37
39
  },
38
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)."
@@ -6396,6 +6398,7 @@
6396
6398
  "manifest_not_found",
6397
6399
  "manifest_in_use",
6398
6400
  "manifest_changed",
6401
+ "folder_invalid",
6399
6402
  "internal_error"
6400
6403
  ]
6401
6404
  },
@@ -12922,6 +12925,9 @@
12922
12925
  "server": {
12923
12926
  "type": "string"
12924
12927
  },
12928
+ "gateway": {
12929
+ "type": "string"
12930
+ },
12925
12931
  "retryable": {
12926
12932
  "type": "boolean"
12927
12933
  }
@@ -20801,6 +20807,7 @@
20801
20807
  "enum": [
20802
20808
  "bearer",
20803
20809
  "headers",
20810
+ "workload",
20804
20811
  "environment_secret",
20805
20812
  "environment_variable"
20806
20813
  ]
@@ -20847,6 +20854,9 @@
20847
20854
  "via": {
20848
20855
  "type": "string"
20849
20856
  },
20857
+ "toolPrefix": {
20858
+ "type": "string"
20859
+ },
20850
20860
  "identity": {
20851
20861
  "type": "object",
20852
20862
  "properties": {
@@ -20893,6 +20903,7 @@
20893
20903
  "enum": [
20894
20904
  "bearer",
20895
20905
  "headers",
20906
+ "workload",
20896
20907
  "environment_secret",
20897
20908
  "environment_variable"
20898
20909
  ]
@@ -20939,6 +20950,9 @@
20939
20950
  "via": {
20940
20951
  "type": "string"
20941
20952
  },
20953
+ "toolPrefix": {
20954
+ "type": "string"
20955
+ },
20942
20956
  "identity": {
20943
20957
  "type": "object",
20944
20958
  "properties": {
@@ -20984,6 +20998,12 @@
20984
20998
  "type": "string",
20985
20999
  "minLength": 1
20986
21000
  }
21001
+ },
21002
+ "toolPrefix": {
21003
+ "type": "string",
21004
+ "minLength": 1,
21005
+ "maxLength": 64,
21006
+ "pattern": "^[\\x21-\\x7e]+$"
20987
21007
  }
20988
21008
  },
20989
21009
  "additionalProperties": false
@@ -21645,6 +21665,28 @@
21645
21665
  "agents": {
21646
21666
  "type": "integer",
21647
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
21648
21690
  }
21649
21691
  },
21650
21692
  "required": [
@@ -22731,6 +22773,28 @@
22731
22773
  "agents": {
22732
22774
  "type": "integer",
22733
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
22734
22798
  }
22735
22799
  },
22736
22800
  "required": [
@@ -22765,6 +22829,12 @@
22765
22829
  ],
22766
22830
  "additionalProperties": false
22767
22831
  }
22832
+ },
22833
+ "diagnostics": {
22834
+ "type": "array",
22835
+ "items": {
22836
+ "$ref": "#/components/schemas/AgentFolderDiagnostic"
22837
+ }
22768
22838
  }
22769
22839
  },
22770
22840
  "required": [
@@ -22774,6 +22844,46 @@
22774
22844
  ],
22775
22845
  "additionalProperties": false
22776
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
+ },
22880
+ "required": [
22881
+ "severity",
22882
+ "code",
22883
+ "message"
22884
+ ],
22885
+ "additionalProperties": false
22886
+ },
22777
22887
  "AgentManifestPlan": {
22778
22888
  "type": "object",
22779
22889
  "properties": {
@@ -22880,6 +22990,18 @@
22880
22990
  "secrets"
22881
22991
  ],
22882
22992
  "additionalProperties": false
22993
+ },
22994
+ "manifest": {
22995
+ "$ref": "#/components/schemas/AgentManifestV8"
22996
+ },
22997
+ "diagnostics": {
22998
+ "type": "array",
22999
+ "items": {
23000
+ "$ref": "#/components/schemas/AgentFolderDiagnostic"
23001
+ }
23002
+ },
23003
+ "compiler": {
23004
+ "type": "string"
22883
23005
  }
22884
23006
  },
22885
23007
  "required": [
@@ -22940,6 +23062,61 @@
22940
23062
  ],
22941
23063
  "additionalProperties": false
22942
23064
  },
23065
+ "PutAgentFolderRequest": {
23066
+ "type": "object",
23067
+ "properties": {
23068
+ "requestId": {
23069
+ "type": "string",
23070
+ "minLength": 1
23071
+ },
23072
+ "format": {
23073
+ "type": "string",
23074
+ "enum": [
23075
+ "nylorun.folder.v2"
23076
+ ]
23077
+ },
23078
+ "entries": {
23079
+ "type": "array",
23080
+ "items": {
23081
+ "type": "object",
23082
+ "properties": {
23083
+ "path": {
23084
+ "type": "string",
23085
+ "minLength": 1,
23086
+ "maxLength": 1024
23087
+ },
23088
+ "size": {
23089
+ "type": "integer",
23090
+ "minimum": 0
23091
+ },
23092
+ "sha256": {
23093
+ "type": "string",
23094
+ "pattern": "^[0-9a-f]{64}$"
23095
+ },
23096
+ "contentType": {
23097
+ "type": "string"
23098
+ },
23099
+ "mode": {
23100
+ "type": "integer",
23101
+ "minimum": 0,
23102
+ "maximum": 4095
23103
+ }
23104
+ },
23105
+ "required": [
23106
+ "path",
23107
+ "size",
23108
+ "sha256"
23109
+ ],
23110
+ "additionalProperties": false
23111
+ }
23112
+ }
23113
+ },
23114
+ "required": [
23115
+ "format",
23116
+ "entries"
23117
+ ],
23118
+ "additionalProperties": false
23119
+ },
22943
23120
  "AgentManifestView": {
22944
23121
  "type": "object",
22945
23122
  "properties": {
@@ -22974,6 +23151,28 @@
22974
23151
  "agents": {
22975
23152
  "type": "integer",
22976
23153
  "minimum": 0
23154
+ },
23155
+ "source": {
23156
+ "type": "object",
23157
+ "properties": {
23158
+ "compiler": {
23159
+ "type": "string"
23160
+ },
23161
+ "files": {
23162
+ "type": "integer",
23163
+ "minimum": 0
23164
+ },
23165
+ "bytes": {
23166
+ "type": "integer",
23167
+ "minimum": 0
23168
+ }
23169
+ },
23170
+ "required": [
23171
+ "compiler",
23172
+ "files",
23173
+ "bytes"
23174
+ ],
23175
+ "additionalProperties": false
22977
23176
  }
22978
23177
  },
22979
23178
  "required": [
@@ -23047,6 +23246,62 @@
23047
23246
  ],
23048
23247
  "additionalProperties": false
23049
23248
  },
23249
+ "AgentManifestSource": {
23250
+ "type": "object",
23251
+ "properties": {
23252
+ "name": {
23253
+ "type": "string"
23254
+ },
23255
+ "version": {
23256
+ "type": "integer",
23257
+ "exclusiveMinimum": 0
23258
+ },
23259
+ "compiler": {
23260
+ "type": "string"
23261
+ },
23262
+ "files": {
23263
+ "type": "integer",
23264
+ "minimum": 0
23265
+ },
23266
+ "bytes": {
23267
+ "type": "integer",
23268
+ "minimum": 0
23269
+ },
23270
+ "entries": {
23271
+ "type": "array",
23272
+ "items": {
23273
+ "type": "object",
23274
+ "properties": {
23275
+ "path": {
23276
+ "type": "string"
23277
+ },
23278
+ "size": {
23279
+ "type": "integer",
23280
+ "minimum": 0
23281
+ },
23282
+ "sha256": {
23283
+ "type": "string"
23284
+ }
23285
+ },
23286
+ "required": [
23287
+ "path",
23288
+ "size",
23289
+ "sha256"
23290
+ ],
23291
+ "additionalProperties": false
23292
+ }
23293
+ }
23294
+ },
23295
+ "required": [
23296
+ "name",
23297
+ "version",
23298
+ "compiler",
23299
+ "files",
23300
+ "bytes",
23301
+ "entries"
23302
+ ],
23303
+ "additionalProperties": false
23304
+ },
23050
23305
  "DeleteAgentManifestResponse": {
23051
23306
  "type": "object",
23052
23307
  "properties": {
@@ -24774,7 +25029,7 @@
24774
25029
  "Agent manifests"
24775
25030
  ],
24776
25031
  "summary": "Save an agent manifest",
24777
- "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.",
25032
+ "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`.",
24778
25033
  "security": [
24779
25034
  {
24780
25035
  "applicationKey": []
@@ -24850,6 +25105,11 @@
24850
25105
  "schema": {
24851
25106
  "$ref": "#/components/schemas/PutAgentManifestRequest"
24852
25107
  }
25108
+ },
25109
+ "application/vnd.nylorun.folder+json": {
25110
+ "schema": {
25111
+ "$ref": "#/components/schemas/PutAgentFolderRequest"
25112
+ }
24853
25113
  }
24854
25114
  }
24855
25115
  },
@@ -24911,7 +25171,7 @@
24911
25171
  "description": "A skill's files hold more than the manifest's skill limit together (`limit_exceeded`)"
24912
25172
  },
24913
25173
  "422": {
24914
- "description": "The harness and runtime sections do not fit (`manifest_inconsistent`, `details.gaps`)"
25174
+ "description": "The harness and runtime sections do not fit (`manifest_inconsistent`, `details.gaps`), or an agent folder does not compile (`folder_invalid`, `details.diagnostics`)"
24915
25175
  },
24916
25176
  "426": {
24917
25177
  "description": "`Nylorun-Protocol` missing or unsupported",
@@ -25617,31 +25877,46 @@
25617
25877
  }
25618
25878
  }
25619
25879
  },
25620
- "/v1/files/{file}": {
25621
- "put": {
25880
+ "/v1/agent-manifests/{name}/versions/{version}/source": {
25881
+ "get": {
25622
25882
  "tags": [
25623
- "Definition files"
25883
+ "Agent manifests"
25624
25884
  ],
25625
- "summary": "Upload a definition file",
25626
- "description": "Streams the body, at most the Tenant's skill limit (`/v1/tenant/skills`, default 2 GiB: one file may be as large as a whole skill), to the SHA-256 the path names; a body with another hash stores nothing (`400`). A file the Tenant holds already is kept as it is (`200`).",
25885
+ "summary": "Get the folder a version was compiled from",
25886
+ "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`).",
25627
25887
  "security": [
25628
25888
  {
25629
25889
  "applicationKey": []
25630
25890
  }
25631
25891
  ],
25632
25892
  "x-nylorun-credentials": [
25633
- "application"
25893
+ "application",
25894
+ "subject"
25895
+ ],
25896
+ "x-nylorun-scopes": [
25897
+ "agents:read",
25898
+ "agents:write",
25899
+ "agent-manifests:write"
25634
25900
  ],
25635
- "x-nylorun-scopes": "never",
25636
25901
  "parameters": [
25637
25902
  {
25638
25903
  "schema": {
25639
25904
  "type": "string",
25640
- "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits"
25905
+ "description": "The agent manifest's name, such as `triage`"
25641
25906
  },
25642
25907
  "required": true,
25643
- "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits",
25644
- "name": "file",
25908
+ "description": "The agent manifest's name, such as `triage`",
25909
+ "name": "name",
25910
+ "in": "path"
25911
+ },
25912
+ {
25913
+ "schema": {
25914
+ "type": "string",
25915
+ "description": "The version number"
25916
+ },
25917
+ "required": true,
25918
+ "description": "The version number",
25919
+ "name": "version",
25645
25920
  "in": "path"
25646
25921
  },
25647
25922
  {
@@ -25653,22 +25928,312 @@
25653
25928
  "description": "The protocol version, `18`",
25654
25929
  "name": "Nylorun-Protocol",
25655
25930
  "in": "header"
25656
- }
25657
- ],
25658
- "requestBody": {
25659
- "required": true,
25660
- "description": "The file's bytes",
25661
- "content": {
25662
- "application/octet-stream": {
25663
- "schema": {
25664
- "type": "string",
25665
- "format": "binary"
25666
- }
25667
- }
25668
- }
25669
- },
25670
- "responses": {
25671
- "200": {
25931
+ },
25932
+ {
25933
+ "schema": {
25934
+ "type": "string",
25935
+ "description": "The person an application key acts for"
25936
+ },
25937
+ "required": false,
25938
+ "description": "The person an application key acts for",
25939
+ "name": "Nylorun-Subject",
25940
+ "in": "header"
25941
+ },
25942
+ {
25943
+ "schema": {
25944
+ "type": "string",
25945
+ "description": "The subject's space-separated scopes; required with a subject"
25946
+ },
25947
+ "required": false,
25948
+ "description": "The subject's space-separated scopes; required with a subject",
25949
+ "name": "Nylorun-Scopes",
25950
+ "in": "header"
25951
+ }
25952
+ ],
25953
+ "responses": {
25954
+ "200": {
25955
+ "description": "The folder",
25956
+ "content": {
25957
+ "application/json": {
25958
+ "schema": {
25959
+ "$ref": "#/components/schemas/AgentManifestSource"
25960
+ }
25961
+ }
25962
+ }
25963
+ },
25964
+ "400": {
25965
+ "description": "Invalid headers, path, body or cursor",
25966
+ "content": {
25967
+ "application/json": {
25968
+ "schema": {
25969
+ "$ref": "#/components/schemas/Rejected"
25970
+ }
25971
+ }
25972
+ }
25973
+ },
25974
+ "401": {
25975
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
25976
+ "content": {
25977
+ "application/json": {
25978
+ "schema": {
25979
+ "$ref": "#/components/schemas/Rejected"
25980
+ }
25981
+ }
25982
+ }
25983
+ },
25984
+ "403": {
25985
+ "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`)",
25986
+ "content": {
25987
+ "application/json": {
25988
+ "schema": {
25989
+ "$ref": "#/components/schemas/Rejected"
25990
+ }
25991
+ }
25992
+ }
25993
+ },
25994
+ "404": {
25995
+ "description": "Not found (`not_found`)",
25996
+ "content": {
25997
+ "application/json": {
25998
+ "schema": {
25999
+ "$ref": "#/components/schemas/Rejected"
26000
+ }
26001
+ }
26002
+ }
26003
+ },
26004
+ "426": {
26005
+ "description": "`Nylorun-Protocol` missing or unsupported",
26006
+ "content": {
26007
+ "application/json": {
26008
+ "schema": {
26009
+ "$ref": "#/components/schemas/ProtocolRejected"
26010
+ }
26011
+ }
26012
+ }
26013
+ },
26014
+ "503": {
26015
+ "description": "The Tenant's storage or streams are unavailable",
26016
+ "content": {
26017
+ "application/json": {
26018
+ "schema": {
26019
+ "$ref": "#/components/schemas/Rejected"
26020
+ }
26021
+ }
26022
+ }
26023
+ }
26024
+ }
26025
+ }
26026
+ },
26027
+ "/v1/agent-manifests/{name}/versions/{version}/source/files/{path}": {
26028
+ "get": {
26029
+ "tags": [
26030
+ "Agent manifests"
26031
+ ],
26032
+ "summary": "Download one file of a version's folder",
26033
+ "description": "Streams the file at `path` (its path in the folder, with `/` percent-encoded as `%2F`) as it was saved.",
26034
+ "security": [
26035
+ {
26036
+ "applicationKey": []
26037
+ }
26038
+ ],
26039
+ "x-nylorun-credentials": [
26040
+ "application",
26041
+ "subject"
26042
+ ],
26043
+ "x-nylorun-scopes": [
26044
+ "agents:read",
26045
+ "agents:write",
26046
+ "agent-manifests:write"
26047
+ ],
26048
+ "parameters": [
26049
+ {
26050
+ "schema": {
26051
+ "type": "string",
26052
+ "description": "The agent manifest's name, such as `triage`"
26053
+ },
26054
+ "required": true,
26055
+ "description": "The agent manifest's name, such as `triage`",
26056
+ "name": "name",
26057
+ "in": "path"
26058
+ },
26059
+ {
26060
+ "schema": {
26061
+ "type": "string",
26062
+ "description": "The version number"
26063
+ },
26064
+ "required": true,
26065
+ "description": "The version number",
26066
+ "name": "version",
26067
+ "in": "path"
26068
+ },
26069
+ {
26070
+ "schema": {
26071
+ "type": "string",
26072
+ "description": "The file's path in the folder, percent-encoded"
26073
+ },
26074
+ "required": true,
26075
+ "description": "The file's path in the folder, percent-encoded",
26076
+ "name": "path",
26077
+ "in": "path"
26078
+ },
26079
+ {
26080
+ "schema": {
26081
+ "type": "string",
26082
+ "description": "The protocol version, `18`"
26083
+ },
26084
+ "required": true,
26085
+ "description": "The protocol version, `18`",
26086
+ "name": "Nylorun-Protocol",
26087
+ "in": "header"
26088
+ },
26089
+ {
26090
+ "schema": {
26091
+ "type": "string",
26092
+ "description": "The person an application key acts for"
26093
+ },
26094
+ "required": false,
26095
+ "description": "The person an application key acts for",
26096
+ "name": "Nylorun-Subject",
26097
+ "in": "header"
26098
+ },
26099
+ {
26100
+ "schema": {
26101
+ "type": "string",
26102
+ "description": "The subject's space-separated scopes; required with a subject"
26103
+ },
26104
+ "required": false,
26105
+ "description": "The subject's space-separated scopes; required with a subject",
26106
+ "name": "Nylorun-Scopes",
26107
+ "in": "header"
26108
+ }
26109
+ ],
26110
+ "responses": {
26111
+ "200": {
26112
+ "description": "The file's bytes",
26113
+ "content": {
26114
+ "application/octet-stream": {
26115
+ "schema": {
26116
+ "type": "string",
26117
+ "format": "binary"
26118
+ }
26119
+ }
26120
+ }
26121
+ },
26122
+ "400": {
26123
+ "description": "Invalid headers, path, body or cursor",
26124
+ "content": {
26125
+ "application/json": {
26126
+ "schema": {
26127
+ "$ref": "#/components/schemas/Rejected"
26128
+ }
26129
+ }
26130
+ }
26131
+ },
26132
+ "401": {
26133
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
26134
+ "content": {
26135
+ "application/json": {
26136
+ "schema": {
26137
+ "$ref": "#/components/schemas/Rejected"
26138
+ }
26139
+ }
26140
+ }
26141
+ },
26142
+ "403": {
26143
+ "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`)",
26144
+ "content": {
26145
+ "application/json": {
26146
+ "schema": {
26147
+ "$ref": "#/components/schemas/Rejected"
26148
+ }
26149
+ }
26150
+ }
26151
+ },
26152
+ "404": {
26153
+ "description": "Not found (`not_found`)",
26154
+ "content": {
26155
+ "application/json": {
26156
+ "schema": {
26157
+ "$ref": "#/components/schemas/Rejected"
26158
+ }
26159
+ }
26160
+ }
26161
+ },
26162
+ "426": {
26163
+ "description": "`Nylorun-Protocol` missing or unsupported",
26164
+ "content": {
26165
+ "application/json": {
26166
+ "schema": {
26167
+ "$ref": "#/components/schemas/ProtocolRejected"
26168
+ }
26169
+ }
26170
+ }
26171
+ },
26172
+ "503": {
26173
+ "description": "The Tenant's storage or streams are unavailable",
26174
+ "content": {
26175
+ "application/json": {
26176
+ "schema": {
26177
+ "$ref": "#/components/schemas/Rejected"
26178
+ }
26179
+ }
26180
+ }
26181
+ }
26182
+ }
26183
+ }
26184
+ },
26185
+ "/v1/files/{file}": {
26186
+ "put": {
26187
+ "tags": [
26188
+ "Definition files"
26189
+ ],
26190
+ "summary": "Upload a definition file",
26191
+ "description": "Streams the body, at most the Tenant's skill limit (`/v1/tenant/skills`, default 2 GiB: one file may be as large as a whole skill), to the SHA-256 the path names; a body with another hash stores nothing (`400`). A file the Tenant holds already is kept as it is (`200`).",
26192
+ "security": [
26193
+ {
26194
+ "applicationKey": []
26195
+ }
26196
+ ],
26197
+ "x-nylorun-credentials": [
26198
+ "application"
26199
+ ],
26200
+ "x-nylorun-scopes": "never",
26201
+ "parameters": [
26202
+ {
26203
+ "schema": {
26204
+ "type": "string",
26205
+ "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits"
26206
+ },
26207
+ "required": true,
26208
+ "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits",
26209
+ "name": "file",
26210
+ "in": "path"
26211
+ },
26212
+ {
26213
+ "schema": {
26214
+ "type": "string",
26215
+ "description": "The protocol version, `18`"
26216
+ },
26217
+ "required": true,
26218
+ "description": "The protocol version, `18`",
26219
+ "name": "Nylorun-Protocol",
26220
+ "in": "header"
26221
+ }
26222
+ ],
26223
+ "requestBody": {
26224
+ "required": true,
26225
+ "description": "The file's bytes",
26226
+ "content": {
26227
+ "application/octet-stream": {
26228
+ "schema": {
26229
+ "type": "string",
26230
+ "format": "binary"
26231
+ }
26232
+ }
26233
+ }
26234
+ },
26235
+ "responses": {
26236
+ "200": {
25672
26237
  "description": "The Tenant held the file already",
25673
26238
  "content": {
25674
26239
  "application/json": {
@@ -27597,6 +28162,12 @@
27597
28162
  "header"
27598
28163
  ],
27599
28164
  "additionalProperties": false
28165
+ },
28166
+ "toolPrefix": {
28167
+ "type": "string",
28168
+ "minLength": 1,
28169
+ "maxLength": 64,
28170
+ "pattern": "^[\\x21-\\x7e]+$"
27600
28171
  }
27601
28172
  },
27602
28173
  "required": [
@@ -27645,6 +28216,12 @@
27645
28216
  "header"
27646
28217
  ],
27647
28218
  "additionalProperties": false
28219
+ },
28220
+ "toolPrefix": {
28221
+ "type": "string",
28222
+ "minLength": 1,
28223
+ "maxLength": 64,
28224
+ "pattern": "^[\\x21-\\x7e]+$"
27648
28225
  }
27649
28226
  },
27650
28227
  "required": [
@@ -27654,6 +28231,53 @@
27654
28231
  ],
27655
28232
  "additionalProperties": false
27656
28233
  },
28234
+ {
28235
+ "type": "object",
28236
+ "properties": {
28237
+ "requestId": {
28238
+ "type": "string",
28239
+ "minLength": 1
28240
+ },
28241
+ "type": {
28242
+ "type": "string",
28243
+ "enum": [
28244
+ "workload"
28245
+ ]
28246
+ },
28247
+ "url": {
28248
+ "type": "string",
28249
+ "minLength": 1
28250
+ },
28251
+ "via": {
28252
+ "type": "string"
28253
+ },
28254
+ "identity": {
28255
+ "type": "object",
28256
+ "properties": {
28257
+ "header": {
28258
+ "type": "string",
28259
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
28260
+ }
28261
+ },
28262
+ "required": [
28263
+ "header"
28264
+ ],
28265
+ "additionalProperties": false
28266
+ },
28267
+ "toolPrefix": {
28268
+ "type": "string",
28269
+ "minLength": 1,
28270
+ "maxLength": 64,
28271
+ "pattern": "^[\\x21-\\x7e]+$"
28272
+ }
28273
+ },
28274
+ "required": [
28275
+ "type",
28276
+ "url",
28277
+ "via"
28278
+ ],
28279
+ "additionalProperties": false
28280
+ },
27657
28281
  {
27658
28282
  "$ref": "#/components/schemas/PutAgentSecretValueRequest"
27659
28283
  }