@nylorun/runtime 0.30.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.
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.31.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,46 @@
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
+ },
22880
+ "required": [
22881
+ "severity",
22882
+ "code",
22883
+ "message"
22884
+ ],
22885
+ "additionalProperties": false
22886
+ },
22795
22887
  "AgentManifestPlan": {
22796
22888
  "type": "object",
22797
22889
  "properties": {
@@ -22898,6 +22990,18 @@
22898
22990
  "secrets"
22899
22991
  ],
22900
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"
22901
23005
  }
22902
23006
  },
22903
23007
  "required": [
@@ -22958,6 +23062,61 @@
22958
23062
  ],
22959
23063
  "additionalProperties": false
22960
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
+ },
22961
23120
  "AgentManifestView": {
22962
23121
  "type": "object",
22963
23122
  "properties": {
@@ -22992,6 +23151,28 @@
22992
23151
  "agents": {
22993
23152
  "type": "integer",
22994
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
22995
23176
  }
22996
23177
  },
22997
23178
  "required": [
@@ -23065,6 +23246,62 @@
23065
23246
  ],
23066
23247
  "additionalProperties": false
23067
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
+ },
23068
23305
  "DeleteAgentManifestResponse": {
23069
23306
  "type": "object",
23070
23307
  "properties": {
@@ -24792,7 +25029,7 @@
24792
25029
  "Agent manifests"
24793
25030
  ],
24794
25031
  "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.",
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`.",
24796
25033
  "security": [
24797
25034
  {
24798
25035
  "applicationKey": []
@@ -24868,6 +25105,11 @@
24868
25105
  "schema": {
24869
25106
  "$ref": "#/components/schemas/PutAgentManifestRequest"
24870
25107
  }
25108
+ },
25109
+ "application/vnd.nylorun.folder+json": {
25110
+ "schema": {
25111
+ "$ref": "#/components/schemas/PutAgentFolderRequest"
25112
+ }
24871
25113
  }
24872
25114
  }
24873
25115
  },
@@ -24929,7 +25171,7 @@
24929
25171
  "description": "A skill's files hold more than the manifest's skill limit together (`limit_exceeded`)"
24930
25172
  },
24931
25173
  "422": {
24932
- "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`)"
24933
25175
  },
24934
25176
  "426": {
24935
25177
  "description": "`Nylorun-Protocol` missing or unsupported",
@@ -25635,6 +25877,311 @@
25635
25877
  }
25636
25878
  }
25637
25879
  },
25880
+ "/v1/agent-manifests/{name}/versions/{version}/source": {
25881
+ "get": {
25882
+ "tags": [
25883
+ "Agent manifests"
25884
+ ],
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`).",
25887
+ "security": [
25888
+ {
25889
+ "applicationKey": []
25890
+ }
25891
+ ],
25892
+ "x-nylorun-credentials": [
25893
+ "application",
25894
+ "subject"
25895
+ ],
25896
+ "x-nylorun-scopes": [
25897
+ "agents:read",
25898
+ "agents:write",
25899
+ "agent-manifests:write"
25900
+ ],
25901
+ "parameters": [
25902
+ {
25903
+ "schema": {
25904
+ "type": "string",
25905
+ "description": "The agent manifest's name, such as `triage`"
25906
+ },
25907
+ "required": true,
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",
25920
+ "in": "path"
25921
+ },
25922
+ {
25923
+ "schema": {
25924
+ "type": "string",
25925
+ "description": "The protocol version, `18`"
25926
+ },
25927
+ "required": true,
25928
+ "description": "The protocol version, `18`",
25929
+ "name": "Nylorun-Protocol",
25930
+ "in": "header"
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
+ },
25638
26185
  "/v1/files/{file}": {
25639
26186
  "put": {
25640
26187
  "tags": [
@@ -0,0 +1 @@
1
+ ALTER TABLE "nylorun"."agent_manifests" ADD COLUMN "source" json;
@@ -267,6 +267,13 @@
267
267
  "when": 1792238141315,
268
268
  "tag": "0037_model_usage_cost_split",
269
269
  "breakpoints": true
270
+ },
271
+ {
272
+ "idx": 38,
273
+ "version": "7",
274
+ "when": 1792484344984,
275
+ "tag": "0038_t6_agent_manifest_source",
276
+ "breakpoints": true
270
277
  }
271
278
  ]
272
279
  }