@nylorun/runtime 0.19.0-beta → 0.19.1-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.19.0-beta",
5
+ "version": "0.19.1-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 4,
8
8
  "max": 8,
@@ -16573,77 +16573,33 @@
16573
16573
  "parameters": {}
16574
16574
  },
16575
16575
  "paths": {
16576
- "/health": {
16577
- "get": {
16578
- "tags": [
16579
- "Runtime"
16580
- ],
16581
- "summary": "Check the Runtime",
16582
- "description": "The protocol range and features a client checks first. Refuses an `Origin`.",
16583
- "responses": {
16584
- "200": {
16585
- "description": "The Runtime is up",
16586
- "content": {
16587
- "application/json": {
16588
- "schema": {
16589
- "$ref": "#/components/schemas/Health"
16590
- }
16591
- }
16592
- }
16593
- }
16594
- }
16595
- }
16596
- },
16597
- "/ready": {
16598
- "get": {
16599
- "tags": [
16600
- "Runtime"
16601
- ],
16602
- "summary": "Check the Runtime is ready",
16603
- "description": "The listener, the Tenant (open), Postgres, Restate and S2, and the open Tenant's harnesses.",
16604
- "responses": {
16605
- "200": {
16606
- "description": "Ready",
16607
- "content": {
16608
- "application/json": {
16609
- "schema": {
16610
- "$ref": "#/components/schemas/Ready"
16611
- }
16612
- }
16613
- }
16614
- },
16615
- "503": {
16616
- "description": "Not ready: `checks` says what is not"
16617
- }
16618
- }
16619
- }
16620
- },
16621
- "/v1/me": {
16622
- "get": {
16576
+ "/v1/agents/{agentId}": {
16577
+ "put": {
16623
16578
  "tags": [
16624
- "Runtime"
16579
+ "Agents"
16625
16580
  ],
16626
- "summary": "Get who the caller is",
16627
- "description": "The subject, scopes, agents and sandbox grants of the credential that sends it: an application key (alone or acting for a subject), a management key (`via: management:<principalId>`, no scopes, no agents), or a trusted issuer's token (`via: issuer:<name>`).",
16581
+ "summary": "Put an agent's definition",
16628
16582
  "security": [
16629
16583
  {
16630
16584
  "applicationKey": []
16631
- },
16632
- {
16633
- "managementKey": []
16634
- },
16635
- {
16636
- "issuerToken": []
16637
16585
  }
16638
16586
  ],
16639
16587
  "x-nylorun-credentials": [
16640
16588
  "application",
16641
- "subject",
16642
- "management",
16643
- "token"
16589
+ "subject"
16590
+ ],
16591
+ "x-nylorun-scopes": [
16592
+ "agents:write"
16644
16593
  ],
16645
- "x-nylorun-scopes": "any",
16646
16594
  "parameters": [
16595
+ {
16596
+ "schema": {
16597
+ "type": "string"
16598
+ },
16599
+ "required": true,
16600
+ "name": "agentId",
16601
+ "in": "path"
16602
+ },
16647
16603
  {
16648
16604
  "schema": {
16649
16605
  "type": "string",
@@ -16675,13 +16631,23 @@
16675
16631
  "in": "header"
16676
16632
  }
16677
16633
  ],
16634
+ "requestBody": {
16635
+ "required": true,
16636
+ "content": {
16637
+ "application/json": {
16638
+ "schema": {
16639
+ "$ref": "#/components/schemas/PutAgentRequest"
16640
+ }
16641
+ }
16642
+ }
16643
+ },
16678
16644
  "responses": {
16679
16645
  "200": {
16680
- "description": "The caller",
16646
+ "description": "The definition, stored",
16681
16647
  "content": {
16682
16648
  "application/json": {
16683
16649
  "schema": {
16684
- "$ref": "#/components/schemas/MeResponse"
16650
+ "$ref": "#/components/schemas/PutAgentResponse"
16685
16651
  }
16686
16652
  }
16687
16653
  }
@@ -16696,18 +16662,8 @@
16696
16662
  }
16697
16663
  }
16698
16664
  },
16699
- "401": {
16700
- "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
16701
- "content": {
16702
- "application/json": {
16703
- "schema": {
16704
- "$ref": "#/components/schemas/Rejected"
16705
- }
16706
- }
16707
- }
16708
- },
16709
16665
  "403": {
16710
- "description": "Not allowed for this credential, a key of the other API (`key_role_mismatch`), a key from a browser (`origin_rejected`) or a management key acting for a subject",
16666
+ "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
16711
16667
  "content": {
16712
16668
  "application/json": {
16713
16669
  "schema": {
@@ -16749,32 +16705,30 @@
16749
16705
  }
16750
16706
  }
16751
16707
  },
16752
- "/v1/access/jwks": {
16708
+ "/v1/agents": {
16753
16709
  "get": {
16754
16710
  "tags": [
16755
- "Runtime"
16711
+ "Agents"
16756
16712
  ],
16757
- "summary": "Get the public keys the Runtime's tokens are signed with",
16758
- "description": "A JSON Web Key Set, to verify a token the Runtime signed without calling it. No credential is needed.",
16713
+ "summary": "List agents",
16714
+ "description": "With an application key, every definition, manifest included. With a trusted issuer's token, only the agents it may use, by name.",
16759
16715
  "security": [
16760
16716
  {
16761
16717
  "applicationKey": []
16762
16718
  },
16763
- {
16764
- "managementKey": []
16765
- },
16766
16719
  {
16767
16720
  "issuerToken": []
16768
- },
16769
- {}
16721
+ }
16770
16722
  ],
16771
16723
  "x-nylorun-credentials": [
16772
16724
  "application",
16773
16725
  "subject",
16774
- "management",
16775
16726
  "token"
16776
16727
  ],
16777
- "x-nylorun-scopes": "any",
16728
+ "x-nylorun-scopes": [
16729
+ "agents:read",
16730
+ "agents:write"
16731
+ ],
16778
16732
  "parameters": [
16779
16733
  {
16780
16734
  "schema": {
@@ -16809,11 +16763,18 @@
16809
16763
  ],
16810
16764
  "responses": {
16811
16765
  "200": {
16812
- "description": "The public keys",
16766
+ "description": "The agents",
16813
16767
  "content": {
16814
16768
  "application/json": {
16815
16769
  "schema": {
16816
- "$ref": "#/components/schemas/Jwks"
16770
+ "anyOf": [
16771
+ {
16772
+ "$ref": "#/components/schemas/ListAgentsResponse"
16773
+ },
16774
+ {
16775
+ "$ref": "#/components/schemas/ListPublicAgentsResponse"
16776
+ }
16777
+ ]
16817
16778
  }
16818
16779
  }
16819
16780
  }
@@ -16839,7 +16800,7 @@
16839
16800
  }
16840
16801
  },
16841
16802
  "403": {
16842
- "description": "Not allowed for this credential, a key of the other API (`key_role_mismatch`), a key from a browser (`origin_rejected`) or a management key acting for a subject",
16803
+ "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
16843
16804
  "content": {
16844
16805
  "application/json": {
16845
16806
  "schema": {
@@ -16881,58 +16842,31 @@
16881
16842
  }
16882
16843
  }
16883
16844
  },
16884
- "/openapi/runtime.json": {
16885
- "get": {
16886
- "tags": [
16887
- "Runtime"
16888
- ],
16889
- "summary": "Get the Runtime API's document",
16890
- "description": "This document. `/openapi.json` is the same.",
16891
- "responses": {
16892
- "200": {
16893
- "description": "The Runtime API's OpenAPI document"
16894
- }
16895
- }
16896
- }
16897
- },
16898
- "/openapi.json": {
16899
- "get": {
16900
- "tags": [
16901
- "Runtime"
16902
- ],
16903
- "summary": "Get the Runtime API's document (alias)",
16904
- "responses": {
16905
- "200": {
16906
- "description": "The Runtime API's OpenAPI document"
16907
- }
16908
- }
16909
- }
16910
- },
16911
- "/v1/agents/{agentId}": {
16845
+ "/v1/files/{file}": {
16912
16846
  "put": {
16913
16847
  "tags": [
16914
- "Agents"
16848
+ "Definition files"
16915
16849
  ],
16916
- "summary": "Put an agent's definition",
16850
+ "summary": "Upload a definition file",
16851
+ "description": "Stores the body, at most 10485760 bytes, at 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`).",
16917
16852
  "security": [
16918
16853
  {
16919
16854
  "applicationKey": []
16920
16855
  }
16921
16856
  ],
16922
16857
  "x-nylorun-credentials": [
16923
- "application",
16924
- "subject"
16925
- ],
16926
- "x-nylorun-scopes": [
16927
- "agents:write"
16858
+ "application"
16928
16859
  ],
16860
+ "x-nylorun-scopes": "never",
16929
16861
  "parameters": [
16930
16862
  {
16931
16863
  "schema": {
16932
- "type": "string"
16864
+ "type": "string",
16865
+ "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits"
16933
16866
  },
16934
16867
  "required": true,
16935
- "name": "agentId",
16868
+ "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits",
16869
+ "name": "file",
16936
16870
  "in": "path"
16937
16871
  },
16938
16872
  {
@@ -16944,45 +16878,37 @@
16944
16878
  "description": "The protocol version, `8`",
16945
16879
  "name": "Nylorun-Protocol",
16946
16880
  "in": "header"
16947
- },
16948
- {
16949
- "schema": {
16950
- "type": "string",
16951
- "description": "The person an application key acts for"
16952
- },
16953
- "required": false,
16954
- "description": "The person an application key acts for",
16955
- "name": "Nylorun-Subject",
16956
- "in": "header"
16957
- },
16958
- {
16959
- "schema": {
16960
- "type": "string",
16961
- "description": "The subject's space-separated scopes; required with a subject"
16962
- },
16963
- "required": false,
16964
- "description": "The subject's space-separated scopes; required with a subject",
16965
- "name": "Nylorun-Scopes",
16966
- "in": "header"
16967
16881
  }
16968
16882
  ],
16969
16883
  "requestBody": {
16970
16884
  "required": true,
16885
+ "description": "The file's bytes",
16971
16886
  "content": {
16972
- "application/json": {
16887
+ "application/octet-stream": {
16973
16888
  "schema": {
16974
- "$ref": "#/components/schemas/PutAgentRequest"
16889
+ "type": "string",
16890
+ "format": "binary"
16975
16891
  }
16976
16892
  }
16977
16893
  }
16978
16894
  },
16979
16895
  "responses": {
16980
16896
  "200": {
16981
- "description": "The definition, stored",
16897
+ "description": "The Tenant held the file already",
16982
16898
  "content": {
16983
16899
  "application/json": {
16984
16900
  "schema": {
16985
- "$ref": "#/components/schemas/PutAgentResponse"
16901
+ "$ref": "#/components/schemas/DefinitionFileView"
16902
+ }
16903
+ }
16904
+ }
16905
+ },
16906
+ "201": {
16907
+ "description": "The file, stored",
16908
+ "content": {
16909
+ "application/json": {
16910
+ "schema": {
16911
+ "$ref": "#/components/schemas/DefinitionFileView"
16986
16912
  }
16987
16913
  }
16988
16914
  }
@@ -17017,6 +16943,9 @@
17017
16943
  }
17018
16944
  }
17019
16945
  },
16946
+ "413": {
16947
+ "description": "Larger than 10485760 bytes (`limit_exceeded`)"
16948
+ },
17020
16949
  "426": {
17021
16950
  "description": "`Nylorun-Protocol` missing or unsupported",
17022
16951
  "content": {
@@ -17038,301 +16967,37 @@
17038
16967
  }
17039
16968
  }
17040
16969
  }
17041
- }
17042
- },
17043
- "/v1/agents": {
17044
- "get": {
16970
+ },
16971
+ "head": {
17045
16972
  "tags": [
17046
- "Agents"
16973
+ "Definition files"
17047
16974
  ],
17048
- "summary": "List agents",
17049
- "description": "With an application key, every definition, manifest included. With a trusted issuer's token, only the agents it may use, by name.",
16975
+ "summary": "Whether the Runtime holds a definition file",
16976
+ "description": "`200` when the Tenant holds the file, `404` when it does not: upload it.",
17050
16977
  "security": [
17051
16978
  {
17052
16979
  "applicationKey": []
17053
- },
17054
- {
17055
- "issuerToken": []
17056
16980
  }
17057
16981
  ],
17058
16982
  "x-nylorun-credentials": [
17059
- "application",
17060
- "subject",
17061
- "token"
17062
- ],
17063
- "x-nylorun-scopes": [
17064
- "agents:read",
17065
- "agents:write"
16983
+ "application"
17066
16984
  ],
16985
+ "x-nylorun-scopes": "never",
17067
16986
  "parameters": [
17068
16987
  {
17069
16988
  "schema": {
17070
16989
  "type": "string",
17071
- "description": "The protocol version, `8`"
16990
+ "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits"
17072
16991
  },
17073
16992
  "required": true,
17074
- "description": "The protocol version, `8`",
17075
- "name": "Nylorun-Protocol",
17076
- "in": "header"
16993
+ "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits",
16994
+ "name": "file",
16995
+ "in": "path"
17077
16996
  },
17078
16997
  {
17079
16998
  "schema": {
17080
16999
  "type": "string",
17081
- "description": "The person an application key acts for"
17082
- },
17083
- "required": false,
17084
- "description": "The person an application key acts for",
17085
- "name": "Nylorun-Subject",
17086
- "in": "header"
17087
- },
17088
- {
17089
- "schema": {
17090
- "type": "string",
17091
- "description": "The subject's space-separated scopes; required with a subject"
17092
- },
17093
- "required": false,
17094
- "description": "The subject's space-separated scopes; required with a subject",
17095
- "name": "Nylorun-Scopes",
17096
- "in": "header"
17097
- }
17098
- ],
17099
- "responses": {
17100
- "200": {
17101
- "description": "The agents",
17102
- "content": {
17103
- "application/json": {
17104
- "schema": {
17105
- "anyOf": [
17106
- {
17107
- "$ref": "#/components/schemas/ListAgentsResponse"
17108
- },
17109
- {
17110
- "$ref": "#/components/schemas/ListPublicAgentsResponse"
17111
- }
17112
- ]
17113
- }
17114
- }
17115
- }
17116
- },
17117
- "400": {
17118
- "description": "Invalid headers, path, body or cursor",
17119
- "content": {
17120
- "application/json": {
17121
- "schema": {
17122
- "$ref": "#/components/schemas/Rejected"
17123
- }
17124
- }
17125
- }
17126
- },
17127
- "401": {
17128
- "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
17129
- "content": {
17130
- "application/json": {
17131
- "schema": {
17132
- "$ref": "#/components/schemas/Rejected"
17133
- }
17134
- }
17135
- }
17136
- },
17137
- "403": {
17138
- "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
17139
- "content": {
17140
- "application/json": {
17141
- "schema": {
17142
- "$ref": "#/components/schemas/Rejected"
17143
- }
17144
- }
17145
- }
17146
- },
17147
- "404": {
17148
- "description": "Not found, or a credential the Tenant does not know (`not_found`)",
17149
- "content": {
17150
- "application/json": {
17151
- "schema": {
17152
- "$ref": "#/components/schemas/Rejected"
17153
- }
17154
- }
17155
- }
17156
- },
17157
- "426": {
17158
- "description": "`Nylorun-Protocol` missing or unsupported",
17159
- "content": {
17160
- "application/json": {
17161
- "schema": {
17162
- "$ref": "#/components/schemas/ProtocolRejected"
17163
- }
17164
- }
17165
- }
17166
- },
17167
- "503": {
17168
- "description": "The Tenant's storage or streams are unavailable",
17169
- "content": {
17170
- "application/json": {
17171
- "schema": {
17172
- "$ref": "#/components/schemas/Rejected"
17173
- }
17174
- }
17175
- }
17176
- }
17177
- }
17178
- }
17179
- },
17180
- "/v1/files/{file}": {
17181
- "put": {
17182
- "tags": [
17183
- "Definition files"
17184
- ],
17185
- "summary": "Upload a definition file",
17186
- "description": "Stores the body, at most 10485760 bytes, at 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`).",
17187
- "security": [
17188
- {
17189
- "applicationKey": []
17190
- }
17191
- ],
17192
- "x-nylorun-credentials": [
17193
- "application"
17194
- ],
17195
- "x-nylorun-scopes": "never",
17196
- "parameters": [
17197
- {
17198
- "schema": {
17199
- "type": "string",
17200
- "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits"
17201
- },
17202
- "required": true,
17203
- "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits",
17204
- "name": "file",
17205
- "in": "path"
17206
- },
17207
- {
17208
- "schema": {
17209
- "type": "string",
17210
- "description": "The protocol version, `8`"
17211
- },
17212
- "required": true,
17213
- "description": "The protocol version, `8`",
17214
- "name": "Nylorun-Protocol",
17215
- "in": "header"
17216
- }
17217
- ],
17218
- "requestBody": {
17219
- "required": true,
17220
- "description": "The file's bytes",
17221
- "content": {
17222
- "application/octet-stream": {
17223
- "schema": {
17224
- "type": "string",
17225
- "format": "binary"
17226
- }
17227
- }
17228
- }
17229
- },
17230
- "responses": {
17231
- "200": {
17232
- "description": "The Tenant held the file already",
17233
- "content": {
17234
- "application/json": {
17235
- "schema": {
17236
- "$ref": "#/components/schemas/DefinitionFileView"
17237
- }
17238
- }
17239
- }
17240
- },
17241
- "201": {
17242
- "description": "The file, stored",
17243
- "content": {
17244
- "application/json": {
17245
- "schema": {
17246
- "$ref": "#/components/schemas/DefinitionFileView"
17247
- }
17248
- }
17249
- }
17250
- },
17251
- "400": {
17252
- "description": "Invalid headers, path, body or cursor",
17253
- "content": {
17254
- "application/json": {
17255
- "schema": {
17256
- "$ref": "#/components/schemas/Rejected"
17257
- }
17258
- }
17259
- }
17260
- },
17261
- "403": {
17262
- "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
17263
- "content": {
17264
- "application/json": {
17265
- "schema": {
17266
- "$ref": "#/components/schemas/Rejected"
17267
- }
17268
- }
17269
- }
17270
- },
17271
- "404": {
17272
- "description": "Not found, or a credential the Tenant does not know (`not_found`)",
17273
- "content": {
17274
- "application/json": {
17275
- "schema": {
17276
- "$ref": "#/components/schemas/Rejected"
17277
- }
17278
- }
17279
- }
17280
- },
17281
- "413": {
17282
- "description": "Larger than 10485760 bytes (`limit_exceeded`)"
17283
- },
17284
- "426": {
17285
- "description": "`Nylorun-Protocol` missing or unsupported",
17286
- "content": {
17287
- "application/json": {
17288
- "schema": {
17289
- "$ref": "#/components/schemas/ProtocolRejected"
17290
- }
17291
- }
17292
- }
17293
- },
17294
- "503": {
17295
- "description": "The Tenant's storage or streams are unavailable",
17296
- "content": {
17297
- "application/json": {
17298
- "schema": {
17299
- "$ref": "#/components/schemas/Rejected"
17300
- }
17301
- }
17302
- }
17303
- }
17304
- }
17305
- },
17306
- "head": {
17307
- "tags": [
17308
- "Definition files"
17309
- ],
17310
- "summary": "Whether the Runtime holds a definition file",
17311
- "description": "`200` when the Tenant holds the file, `404` when it does not: upload it.",
17312
- "security": [
17313
- {
17314
- "applicationKey": []
17315
- }
17316
- ],
17317
- "x-nylorun-credentials": [
17318
- "application"
17319
- ],
17320
- "x-nylorun-scopes": "never",
17321
- "parameters": [
17322
- {
17323
- "schema": {
17324
- "type": "string",
17325
- "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits"
17326
- },
17327
- "required": true,
17328
- "description": "`sha256:` and the SHA-256 of the file's bytes, 64 lowercase hex digits",
17329
- "name": "file",
17330
- "in": "path"
17331
- },
17332
- {
17333
- "schema": {
17334
- "type": "string",
17335
- "description": "The protocol version, `8`"
17000
+ "description": "The protocol version, `8`"
17336
17001
  },
17337
17002
  "required": true,
17338
17003
  "description": "The protocol version, `8`",
@@ -19070,13 +18735,323 @@
19070
18735
  }
19071
18736
  }
19072
18737
  },
19073
- "/v1/ag-ui/agents/{agentId}/threads/{threadId}/events": {
19074
- "get": {
18738
+ "/v1/ag-ui/agents/{agentId}/threads/{threadId}/events": {
18739
+ "get": {
18740
+ "tags": [
18741
+ "AG-UI"
18742
+ ],
18743
+ "summary": "Reattach to a run",
18744
+ "description": "The rest of a run after a dropped connection, from `Last-Event-ID` or `cursor`.",
18745
+ "security": [
18746
+ {
18747
+ "applicationKey": []
18748
+ },
18749
+ {
18750
+ "issuerToken": []
18751
+ }
18752
+ ],
18753
+ "x-nylorun-credentials": [
18754
+ "subject",
18755
+ "token"
18756
+ ],
18757
+ "x-nylorun-scopes": [
18758
+ "sessions:own"
18759
+ ],
18760
+ "parameters": [
18761
+ {
18762
+ "schema": {
18763
+ "type": "string"
18764
+ },
18765
+ "required": true,
18766
+ "name": "agentId",
18767
+ "in": "path"
18768
+ },
18769
+ {
18770
+ "schema": {
18771
+ "type": "string"
18772
+ },
18773
+ "required": true,
18774
+ "name": "threadId",
18775
+ "in": "path"
18776
+ },
18777
+ {
18778
+ "schema": {
18779
+ "type": "string"
18780
+ },
18781
+ "required": false,
18782
+ "name": "cursor",
18783
+ "in": "query"
18784
+ },
18785
+ {
18786
+ "schema": {
18787
+ "type": "string",
18788
+ "description": "The run to report events as"
18789
+ },
18790
+ "required": false,
18791
+ "description": "The run to report events as",
18792
+ "name": "runId",
18793
+ "in": "query"
18794
+ },
18795
+ {
18796
+ "schema": {
18797
+ "type": "string",
18798
+ "description": "The protocol version, `8`"
18799
+ },
18800
+ "required": true,
18801
+ "description": "The protocol version, `8`",
18802
+ "name": "Nylorun-Protocol",
18803
+ "in": "header"
18804
+ },
18805
+ {
18806
+ "schema": {
18807
+ "type": "string",
18808
+ "description": "The person an application key acts for"
18809
+ },
18810
+ "required": false,
18811
+ "description": "The person an application key acts for",
18812
+ "name": "Nylorun-Subject",
18813
+ "in": "header"
18814
+ },
18815
+ {
18816
+ "schema": {
18817
+ "type": "string",
18818
+ "description": "The subject's space-separated scopes; required with a subject"
18819
+ },
18820
+ "required": false,
18821
+ "description": "The subject's space-separated scopes; required with a subject",
18822
+ "name": "Nylorun-Scopes",
18823
+ "in": "header"
18824
+ }
18825
+ ],
18826
+ "responses": {
18827
+ "200": {
18828
+ "description": "The run's remaining events",
18829
+ "content": {
18830
+ "text/event-stream": {
18831
+ "itemSchema": {
18832
+ "$ref": "#/components/schemas/AgUiEvent"
18833
+ }
18834
+ }
18835
+ }
18836
+ },
18837
+ "204": {
18838
+ "description": "Nothing to send: no run is going, and none ended after the cursor"
18839
+ },
18840
+ "400": {
18841
+ "description": "Invalid headers, path, body or cursor",
18842
+ "content": {
18843
+ "application/json": {
18844
+ "schema": {
18845
+ "$ref": "#/components/schemas/Rejected"
18846
+ }
18847
+ }
18848
+ }
18849
+ },
18850
+ "401": {
18851
+ "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
18852
+ "content": {
18853
+ "application/json": {
18854
+ "schema": {
18855
+ "$ref": "#/components/schemas/Rejected"
18856
+ }
18857
+ }
18858
+ }
18859
+ },
18860
+ "403": {
18861
+ "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
18862
+ "content": {
18863
+ "application/json": {
18864
+ "schema": {
18865
+ "$ref": "#/components/schemas/Rejected"
18866
+ }
18867
+ }
18868
+ }
18869
+ },
18870
+ "404": {
18871
+ "description": "Not found, or a credential the Tenant does not know (`not_found`)",
18872
+ "content": {
18873
+ "application/json": {
18874
+ "schema": {
18875
+ "$ref": "#/components/schemas/Rejected"
18876
+ }
18877
+ }
18878
+ }
18879
+ },
18880
+ "426": {
18881
+ "description": "`Nylorun-Protocol` missing or unsupported",
18882
+ "content": {
18883
+ "application/json": {
18884
+ "schema": {
18885
+ "$ref": "#/components/schemas/ProtocolRejected"
18886
+ }
18887
+ }
18888
+ }
18889
+ },
18890
+ "503": {
18891
+ "description": "The Tenant's storage or streams are unavailable",
18892
+ "content": {
18893
+ "application/json": {
18894
+ "schema": {
18895
+ "$ref": "#/components/schemas/Rejected"
18896
+ }
18897
+ }
18898
+ }
18899
+ }
18900
+ }
18901
+ }
18902
+ },
18903
+ "/v1/ag-ui/agents/{agentId}/threads/{threadId}/messages": {
18904
+ "get": {
18905
+ "tags": [
18906
+ "AG-UI"
18907
+ ],
18908
+ "summary": "Get a thread's messages",
18909
+ "security": [
18910
+ {
18911
+ "applicationKey": []
18912
+ },
18913
+ {
18914
+ "issuerToken": []
18915
+ }
18916
+ ],
18917
+ "x-nylorun-credentials": [
18918
+ "subject",
18919
+ "token"
18920
+ ],
18921
+ "x-nylorun-scopes": [
18922
+ "sessions:own"
18923
+ ],
18924
+ "parameters": [
18925
+ {
18926
+ "schema": {
18927
+ "type": "string"
18928
+ },
18929
+ "required": true,
18930
+ "name": "agentId",
18931
+ "in": "path"
18932
+ },
18933
+ {
18934
+ "schema": {
18935
+ "type": "string"
18936
+ },
18937
+ "required": true,
18938
+ "name": "threadId",
18939
+ "in": "path"
18940
+ },
18941
+ {
18942
+ "schema": {
18943
+ "type": "string",
18944
+ "description": "The protocol version, `8`"
18945
+ },
18946
+ "required": true,
18947
+ "description": "The protocol version, `8`",
18948
+ "name": "Nylorun-Protocol",
18949
+ "in": "header"
18950
+ },
18951
+ {
18952
+ "schema": {
18953
+ "type": "string",
18954
+ "description": "The person an application key acts for"
18955
+ },
18956
+ "required": false,
18957
+ "description": "The person an application key acts for",
18958
+ "name": "Nylorun-Subject",
18959
+ "in": "header"
18960
+ },
18961
+ {
18962
+ "schema": {
18963
+ "type": "string",
18964
+ "description": "The subject's space-separated scopes; required with a subject"
18965
+ },
18966
+ "required": false,
18967
+ "description": "The subject's space-separated scopes; required with a subject",
18968
+ "name": "Nylorun-Scopes",
18969
+ "in": "header"
18970
+ }
18971
+ ],
18972
+ "responses": {
18973
+ "200": {
18974
+ "description": "The thread's messages; none before its first run",
18975
+ "content": {
18976
+ "application/json": {
18977
+ "schema": {
18978
+ "type": "array",
18979
+ "items": {
18980
+ "$ref": "#/components/schemas/AgUiMessage"
18981
+ }
18982
+ }
18983
+ }
18984
+ }
18985
+ },
18986
+ "400": {
18987
+ "description": "Invalid headers, path, body or cursor",
18988
+ "content": {
18989
+ "application/json": {
18990
+ "schema": {
18991
+ "$ref": "#/components/schemas/Rejected"
18992
+ }
18993
+ }
18994
+ }
18995
+ },
18996
+ "401": {
18997
+ "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
18998
+ "content": {
18999
+ "application/json": {
19000
+ "schema": {
19001
+ "$ref": "#/components/schemas/Rejected"
19002
+ }
19003
+ }
19004
+ }
19005
+ },
19006
+ "403": {
19007
+ "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
19008
+ "content": {
19009
+ "application/json": {
19010
+ "schema": {
19011
+ "$ref": "#/components/schemas/Rejected"
19012
+ }
19013
+ }
19014
+ }
19015
+ },
19016
+ "404": {
19017
+ "description": "Not found, or a credential the Tenant does not know (`not_found`)",
19018
+ "content": {
19019
+ "application/json": {
19020
+ "schema": {
19021
+ "$ref": "#/components/schemas/Rejected"
19022
+ }
19023
+ }
19024
+ }
19025
+ },
19026
+ "426": {
19027
+ "description": "`Nylorun-Protocol` missing or unsupported",
19028
+ "content": {
19029
+ "application/json": {
19030
+ "schema": {
19031
+ "$ref": "#/components/schemas/ProtocolRejected"
19032
+ }
19033
+ }
19034
+ }
19035
+ },
19036
+ "503": {
19037
+ "description": "The Tenant's storage or streams are unavailable",
19038
+ "content": {
19039
+ "application/json": {
19040
+ "schema": {
19041
+ "$ref": "#/components/schemas/Rejected"
19042
+ }
19043
+ }
19044
+ }
19045
+ }
19046
+ }
19047
+ }
19048
+ },
19049
+ "/v1/ag-ui/agents/{agentId}/threads/{threadId}/cancel": {
19050
+ "post": {
19075
19051
  "tags": [
19076
19052
  "AG-UI"
19077
19053
  ],
19078
- "summary": "Reattach to a run",
19079
- "description": "The rest of a run after a dropped connection, from `Last-Event-ID` or `cursor`.",
19054
+ "summary": "Cancel a thread's running turn",
19080
19055
  "security": [
19081
19056
  {
19082
19057
  "applicationKey": []
@@ -19109,24 +19084,6 @@
19109
19084
  "name": "threadId",
19110
19085
  "in": "path"
19111
19086
  },
19112
- {
19113
- "schema": {
19114
- "type": "string"
19115
- },
19116
- "required": false,
19117
- "name": "cursor",
19118
- "in": "query"
19119
- },
19120
- {
19121
- "schema": {
19122
- "type": "string",
19123
- "description": "The run to report events as"
19124
- },
19125
- "required": false,
19126
- "description": "The run to report events as",
19127
- "name": "runId",
19128
- "in": "query"
19129
- },
19130
19087
  {
19131
19088
  "schema": {
19132
19089
  "type": "string",
@@ -19159,18 +19116,8 @@
19159
19116
  }
19160
19117
  ],
19161
19118
  "responses": {
19162
- "200": {
19163
- "description": "The run's remaining events",
19164
- "content": {
19165
- "text/event-stream": {
19166
- "itemSchema": {
19167
- "$ref": "#/components/schemas/AgUiEvent"
19168
- }
19169
- }
19170
- }
19171
- },
19172
19119
  "204": {
19173
- "description": "Nothing to send: no run is going, and none ended after the cursor"
19120
+ "description": "Cancelled"
19174
19121
  },
19175
19122
  "400": {
19176
19123
  "description": "Invalid headers, path, body or cursor",
@@ -19235,12 +19182,16 @@
19235
19182
  }
19236
19183
  }
19237
19184
  },
19238
- "/v1/ag-ui/agents/{agentId}/threads/{threadId}/messages": {
19185
+ "/v1/a2a/agents/{agentId}/card": {
19239
19186
  "get": {
19240
19187
  "tags": [
19241
- "AG-UI"
19188
+ "A2A"
19242
19189
  ],
19243
- "summary": "Get a thread's messages",
19190
+ "summary": "Get an agent's A2A card",
19191
+ "externalDocs": {
19192
+ "description": "The A2A specification",
19193
+ "url": "https://a2a-protocol.org/latest/specification/"
19194
+ },
19244
19195
  "security": [
19245
19196
  {
19246
19197
  "applicationKey": []
@@ -19250,10 +19201,12 @@
19250
19201
  }
19251
19202
  ],
19252
19203
  "x-nylorun-credentials": [
19204
+ "application",
19253
19205
  "subject",
19254
19206
  "token"
19255
19207
  ],
19256
19208
  "x-nylorun-scopes": [
19209
+ "agents:read",
19257
19210
  "sessions:own"
19258
19211
  ],
19259
19212
  "parameters": [
@@ -19265,14 +19218,6 @@
19265
19218
  "name": "agentId",
19266
19219
  "in": "path"
19267
19220
  },
19268
- {
19269
- "schema": {
19270
- "type": "string"
19271
- },
19272
- "required": true,
19273
- "name": "threadId",
19274
- "in": "path"
19275
- },
19276
19221
  {
19277
19222
  "schema": {
19278
19223
  "type": "string",
@@ -19306,14 +19251,11 @@
19306
19251
  ],
19307
19252
  "responses": {
19308
19253
  "200": {
19309
- "description": "The thread's messages; none before its first run",
19254
+ "description": "The card",
19310
19255
  "content": {
19311
19256
  "application/json": {
19312
19257
  "schema": {
19313
- "type": "array",
19314
- "items": {
19315
- "$ref": "#/components/schemas/AgUiMessage"
19316
- }
19258
+ "$ref": "#/components/schemas/A2aAgentCard"
19317
19259
  }
19318
19260
  }
19319
19261
  }
@@ -19381,12 +19323,17 @@
19381
19323
  }
19382
19324
  }
19383
19325
  },
19384
- "/v1/ag-ui/agents/{agentId}/threads/{threadId}/cancel": {
19326
+ "/v1/a2a/agents/{agentId}": {
19385
19327
  "post": {
19386
19328
  "tags": [
19387
- "AG-UI"
19329
+ "A2A"
19388
19330
  ],
19389
- "summary": "Cancel a thread's running turn",
19331
+ "summary": "Call an agent over A2A",
19332
+ "description": "A2A 1.0 JSON-RPC, for a subject: `SendMessage` (blocking up to 5 minutes, or `returnImmediately`), `GetTask` and `CancelTask`. A context is one session per subject, agent and `contextId`; a task is one turn. JSON-RPC errors are answered with 200; limits, scopes and unavailable streams stay HTTP errors.",
19333
+ "externalDocs": {
19334
+ "description": "The A2A specification",
19335
+ "url": "https://a2a-protocol.org/latest/specification/"
19336
+ },
19390
19337
  "security": [
19391
19338
  {
19392
19339
  "applicationKey": []
@@ -19413,11 +19360,13 @@
19413
19360
  },
19414
19361
  {
19415
19362
  "schema": {
19416
- "type": "string"
19363
+ "type": "string",
19364
+ "description": "Or the `A2A-Version` header: `1.0`"
19417
19365
  },
19418
- "required": true,
19419
- "name": "threadId",
19420
- "in": "path"
19366
+ "required": false,
19367
+ "description": "Or the `A2A-Version` header: `1.0`",
19368
+ "name": "A2A-Version",
19369
+ "in": "query"
19421
19370
  },
19422
19371
  {
19423
19372
  "schema": {
@@ -19450,9 +19399,26 @@
19450
19399
  "in": "header"
19451
19400
  }
19452
19401
  ],
19402
+ "requestBody": {
19403
+ "required": true,
19404
+ "content": {
19405
+ "application/json": {
19406
+ "schema": {
19407
+ "$ref": "#/components/schemas/A2aJsonRpcRequest"
19408
+ }
19409
+ }
19410
+ }
19411
+ },
19453
19412
  "responses": {
19454
- "204": {
19455
- "description": "Cancelled"
19413
+ "200": {
19414
+ "description": "The JSON-RPC answer: a result, or an A2A error",
19415
+ "content": {
19416
+ "application/json": {
19417
+ "schema": {
19418
+ "$ref": "#/components/schemas/A2aJsonRpcResponse"
19419
+ }
19420
+ }
19421
+ }
19456
19422
  },
19457
19423
  "400": {
19458
19424
  "description": "Invalid headers, path, body or cursor",
@@ -19517,16 +19483,13 @@
19517
19483
  }
19518
19484
  }
19519
19485
  },
19520
- "/v1/a2a/agents/{agentId}/card": {
19521
- "get": {
19486
+ "/v1/sandboxes/{sandboxId}": {
19487
+ "put": {
19522
19488
  "tags": [
19523
- "A2A"
19489
+ "Sandboxes"
19524
19490
  ],
19525
- "summary": "Get an agent's A2A card",
19526
- "externalDocs": {
19527
- "description": "The A2A specification",
19528
- "url": "https://a2a-protocol.org/latest/specification/"
19529
- },
19491
+ "summary": "Create or find a sandbox",
19492
+ "description": "Creates the sandbox within the Tenant's limits, or answers the one with this id, so get-or-create is one call. Its spec is fixed once it exists; labels, when sent, replace its labels. Kind `pod` needs sandbox pods (`nylorun sandbox enable`): it is created at once, and a PUT on an existing pod sandbox starts it again when it was stopped, or revives it with a longer `lifecycle.ttl`.",
19530
19493
  "security": [
19531
19494
  {
19532
19495
  "applicationKey": []
@@ -19541,16 +19504,17 @@
19541
19504
  "token"
19542
19505
  ],
19543
19506
  "x-nylorun-scopes": [
19544
- "agents:read",
19545
- "sessions:own"
19507
+ "sandboxes:write"
19546
19508
  ],
19547
19509
  "parameters": [
19548
19510
  {
19549
19511
  "schema": {
19550
- "type": "string"
19512
+ "type": "string",
19513
+ "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`"
19551
19514
  },
19552
19515
  "required": true,
19553
- "name": "agentId",
19516
+ "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`",
19517
+ "name": "sandboxId",
19554
19518
  "in": "path"
19555
19519
  },
19556
19520
  {
@@ -19584,13 +19548,23 @@
19584
19548
  "in": "header"
19585
19549
  }
19586
19550
  ],
19551
+ "requestBody": {
19552
+ "required": true,
19553
+ "content": {
19554
+ "application/json": {
19555
+ "schema": {
19556
+ "$ref": "#/components/schemas/PutSandboxRequest"
19557
+ }
19558
+ }
19559
+ }
19560
+ },
19587
19561
  "responses": {
19588
19562
  "200": {
19589
- "description": "The card",
19563
+ "description": "The sandbox",
19590
19564
  "content": {
19591
19565
  "application/json": {
19592
19566
  "schema": {
19593
- "$ref": "#/components/schemas/A2aAgentCard"
19567
+ "$ref": "#/components/schemas/SandboxView"
19594
19568
  }
19595
19569
  }
19596
19570
  }
@@ -19635,6 +19609,9 @@
19635
19609
  }
19636
19610
  }
19637
19611
  },
19612
+ "409": {
19613
+ "description": "A sandbox with this id has another spec, the Tenant holds as many sandboxes as it allows (`limit_exceeded`), kind pod without sandbox pods (`sandbox_unavailable`), or a lost pod sandbox (`sandbox_lost`)"
19614
+ },
19638
19615
  "426": {
19639
19616
  "description": "`Nylorun-Protocol` missing or unsupported",
19640
19617
  "content": {
@@ -19656,19 +19633,13 @@
19656
19633
  }
19657
19634
  }
19658
19635
  }
19659
- }
19660
- },
19661
- "/v1/a2a/agents/{agentId}": {
19662
- "post": {
19636
+ },
19637
+ "get": {
19663
19638
  "tags": [
19664
- "A2A"
19639
+ "Sandboxes"
19665
19640
  ],
19666
- "summary": "Call an agent over A2A",
19667
- "description": "A2A 1.0 JSON-RPC, for a subject: `SendMessage` (blocking up to 5 minutes, or `returnImmediately`), `GetTask` and `CancelTask`. A context is one session per subject, agent and `contextId`; a task is one turn. JSON-RPC errors are answered with 200; limits, scopes and unavailable streams stay HTTP errors.",
19668
- "externalDocs": {
19669
- "description": "The A2A specification",
19670
- "url": "https://a2a-protocol.org/latest/specification/"
19671
- },
19641
+ "summary": "Get a sandbox",
19642
+ "description": "Its spec, labels, state and the sessions attached to it (acting for a person, only theirs).",
19672
19643
  "security": [
19673
19644
  {
19674
19645
  "applicationKey": []
@@ -19678,31 +19649,25 @@
19678
19649
  }
19679
19650
  ],
19680
19651
  "x-nylorun-credentials": [
19652
+ "application",
19681
19653
  "subject",
19682
19654
  "token"
19683
19655
  ],
19684
19656
  "x-nylorun-scopes": [
19685
- "sessions:own"
19657
+ "sessions:own",
19658
+ "sandboxes:write"
19686
19659
  ],
19687
19660
  "parameters": [
19688
19661
  {
19689
19662
  "schema": {
19690
- "type": "string"
19663
+ "type": "string",
19664
+ "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`"
19691
19665
  },
19692
19666
  "required": true,
19693
- "name": "agentId",
19667
+ "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`",
19668
+ "name": "sandboxId",
19694
19669
  "in": "path"
19695
19670
  },
19696
- {
19697
- "schema": {
19698
- "type": "string",
19699
- "description": "Or the `A2A-Version` header: `1.0`"
19700
- },
19701
- "required": false,
19702
- "description": "Or the `A2A-Version` header: `1.0`",
19703
- "name": "A2A-Version",
19704
- "in": "query"
19705
- },
19706
19671
  {
19707
19672
  "schema": {
19708
19673
  "type": "string",
@@ -19734,23 +19699,13 @@
19734
19699
  "in": "header"
19735
19700
  }
19736
19701
  ],
19737
- "requestBody": {
19738
- "required": true,
19739
- "content": {
19740
- "application/json": {
19741
- "schema": {
19742
- "$ref": "#/components/schemas/A2aJsonRpcRequest"
19743
- }
19744
- }
19745
- }
19746
- },
19747
19702
  "responses": {
19748
19703
  "200": {
19749
- "description": "The JSON-RPC answer: a result, or an A2A error",
19704
+ "description": "The sandbox",
19750
19705
  "content": {
19751
19706
  "application/json": {
19752
19707
  "schema": {
19753
- "$ref": "#/components/schemas/A2aJsonRpcResponse"
19708
+ "$ref": "#/components/schemas/SandboxView"
19754
19709
  }
19755
19710
  }
19756
19711
  }
@@ -19816,15 +19771,13 @@
19816
19771
  }
19817
19772
  }
19818
19773
  }
19819
- }
19820
- },
19821
- "/v1/sandboxes/{sandboxId}": {
19822
- "put": {
19774
+ },
19775
+ "delete": {
19823
19776
  "tags": [
19824
19777
  "Sandboxes"
19825
19778
  ],
19826
- "summary": "Create or find a sandbox",
19827
- "description": "Creates the sandbox within the Tenant's limits, or answers the one with this id, so get-or-create is one call. Its spec is fixed once it exists; labels, when sent, replace its labels. Kind `pod` needs sandbox pods (`nylorun sandbox enable`): it is created at once, and a PUT on an existing pod sandbox starts it again when it was stopped, or revives it with a longer `lifecycle.ttl`.",
19779
+ "summary": "Delete a sandbox",
19780
+ "description": "Deletes the sandbox and its files. Sessions attached to it stay attached by id; their next turn is refused until a sandbox with this id exists again.",
19828
19781
  "security": [
19829
19782
  {
19830
19783
  "applicationKey": []
@@ -19883,23 +19836,13 @@
19883
19836
  "in": "header"
19884
19837
  }
19885
19838
  ],
19886
- "requestBody": {
19887
- "required": true,
19888
- "content": {
19889
- "application/json": {
19890
- "schema": {
19891
- "$ref": "#/components/schemas/PutSandboxRequest"
19892
- }
19893
- }
19894
- }
19895
- },
19896
19839
  "responses": {
19897
19840
  "200": {
19898
- "description": "The sandbox",
19841
+ "description": "Deleted, or there was none",
19899
19842
  "content": {
19900
19843
  "application/json": {
19901
19844
  "schema": {
19902
- "$ref": "#/components/schemas/SandboxView"
19845
+ "$ref": "#/components/schemas/DeleteSandboxResponse"
19903
19846
  }
19904
19847
  }
19905
19848
  }
@@ -19945,7 +19888,7 @@
19945
19888
  }
19946
19889
  },
19947
19890
  "409": {
19948
- "description": "A sandbox with this id has another spec, the Tenant holds as many sandboxes as it allows (`limit_exceeded`), kind pod without sandbox pods (`sandbox_unavailable`), or a lost pod sandbox (`sandbox_lost`)"
19891
+ "description": "A session attached to it has a turn running (`sandbox_busy`)"
19949
19892
  },
19950
19893
  "426": {
19951
19894
  "description": "`Nylorun-Protocol` missing or unsupported",
@@ -19968,13 +19911,15 @@
19968
19911
  }
19969
19912
  }
19970
19913
  }
19971
- },
19914
+ }
19915
+ },
19916
+ "/v1/sandboxes": {
19972
19917
  "get": {
19973
19918
  "tags": [
19974
19919
  "Sandboxes"
19975
19920
  ],
19976
- "summary": "Get a sandbox",
19977
- "description": "Its spec, labels, state and the sessions attached to it (acting for a person, only theirs).",
19921
+ "summary": "List sandboxes",
19922
+ "description": "Every sandbox with all the labels asked for. A token caller sees only the sandboxes its grants reach.",
19978
19923
  "security": [
19979
19924
  {
19980
19925
  "applicationKey": []
@@ -19995,13 +19940,41 @@
19995
19940
  "parameters": [
19996
19941
  {
19997
19942
  "schema": {
19998
- "type": "string",
19999
- "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`"
19943
+ "type": "integer",
19944
+ "minimum": 1,
19945
+ "maximum": 200
19946
+ },
19947
+ "required": false,
19948
+ "name": "limit",
19949
+ "in": "query"
19950
+ },
19951
+ {
19952
+ "schema": {
19953
+ "type": "string"
19954
+ },
19955
+ "required": false,
19956
+ "name": "cursor",
19957
+ "in": "query"
19958
+ },
19959
+ {
19960
+ "schema": {
19961
+ "anyOf": [
19962
+ {
19963
+ "type": "string"
19964
+ },
19965
+ {
19966
+ "type": "array",
19967
+ "items": {
19968
+ "type": "string"
19969
+ }
19970
+ }
19971
+ ],
19972
+ "description": "`key=value`; repeat it to require several labels"
20000
19973
  },
20001
- "required": true,
20002
- "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`",
20003
- "name": "sandboxId",
20004
- "in": "path"
19974
+ "required": false,
19975
+ "description": "`key=value`; repeat it to require several labels",
19976
+ "name": "label",
19977
+ "in": "query"
20005
19978
  },
20006
19979
  {
20007
19980
  "schema": {
@@ -20036,11 +20009,18 @@
20036
20009
  ],
20037
20010
  "responses": {
20038
20011
  "200": {
20039
- "description": "The sandbox",
20012
+ "description": "The sandboxes; limit opts into pagination",
20040
20013
  "content": {
20041
20014
  "application/json": {
20042
20015
  "schema": {
20043
- "$ref": "#/components/schemas/SandboxView"
20016
+ "anyOf": [
20017
+ {
20018
+ "$ref": "#/components/schemas/ListSandboxesResponse"
20019
+ },
20020
+ {
20021
+ "$ref": "#/components/schemas/SandboxPage"
20022
+ }
20023
+ ]
20044
20024
  }
20045
20025
  }
20046
20026
  }
@@ -20106,13 +20086,15 @@
20106
20086
  }
20107
20087
  }
20108
20088
  }
20109
- },
20110
- "delete": {
20089
+ }
20090
+ },
20091
+ "/v1/sandboxes/{sandboxId}/events": {
20092
+ "get": {
20111
20093
  "tags": [
20112
20094
  "Sandboxes"
20113
20095
  ],
20114
- "summary": "Delete a sandbox",
20115
- "description": "Deletes the sandbox and its files. Sessions attached to it stay attached by id; their next turn is refused until a sandbox with this id exists again.",
20096
+ "summary": "Read a sandbox's lifecycle events",
20097
+ "description": "`sandbox.created`, `sandbox.attached`, `sandbox.detached` and `sandbox.deleted`, in order, numbered from 0.",
20116
20098
  "security": [
20117
20099
  {
20118
20100
  "applicationKey": []
@@ -20127,6 +20109,7 @@
20127
20109
  "token"
20128
20110
  ],
20129
20111
  "x-nylorun-scopes": [
20112
+ "sessions:own",
20130
20113
  "sandboxes:write"
20131
20114
  ],
20132
20115
  "parameters": [
@@ -20140,6 +20123,16 @@
20140
20123
  "name": "sandboxId",
20141
20124
  "in": "path"
20142
20125
  },
20126
+ {
20127
+ "schema": {
20128
+ "type": "string",
20129
+ "description": "The first `seq` to return"
20130
+ },
20131
+ "required": false,
20132
+ "description": "The first `seq` to return",
20133
+ "name": "from",
20134
+ "in": "query"
20135
+ },
20143
20136
  {
20144
20137
  "schema": {
20145
20138
  "type": "string",
@@ -20173,11 +20166,11 @@
20173
20166
  ],
20174
20167
  "responses": {
20175
20168
  "200": {
20176
- "description": "Deleted, or there was none",
20169
+ "description": "The events",
20177
20170
  "content": {
20178
20171
  "application/json": {
20179
20172
  "schema": {
20180
- "$ref": "#/components/schemas/DeleteSandboxResponse"
20173
+ "$ref": "#/components/schemas/ListSandboxEventsResponse"
20181
20174
  }
20182
20175
  }
20183
20176
  }
@@ -20222,9 +20215,6 @@
20222
20215
  }
20223
20216
  }
20224
20217
  },
20225
- "409": {
20226
- "description": "A session attached to it has a turn running (`sandbox_busy`)"
20227
- },
20228
20218
  "426": {
20229
20219
  "description": "`Nylorun-Protocol` missing or unsupported",
20230
20220
  "content": {
@@ -20248,13 +20238,13 @@
20248
20238
  }
20249
20239
  }
20250
20240
  },
20251
- "/v1/sandboxes": {
20252
- "get": {
20241
+ "/v1/sandboxes/{sandboxId}/stop": {
20242
+ "post": {
20253
20243
  "tags": [
20254
20244
  "Sandboxes"
20255
20245
  ],
20256
- "summary": "List sandboxes",
20257
- "description": "Every sandbox with all the labels asked for. A token caller sees only the sandboxes its grants reach.",
20246
+ "summary": "Stop a pod sandbox",
20247
+ "description": "Suspends the pod: its volume is kept, and the next turn of a session attached to it (or a PUT) starts it again. Refused during a turn (`sandbox_busy`).",
20258
20248
  "security": [
20259
20249
  {
20260
20250
  "applicationKey": []
@@ -20269,47 +20259,18 @@
20269
20259
  "token"
20270
20260
  ],
20271
20261
  "x-nylorun-scopes": [
20272
- "sessions:own",
20273
20262
  "sandboxes:write"
20274
20263
  ],
20275
20264
  "parameters": [
20276
20265
  {
20277
20266
  "schema": {
20278
- "type": "integer",
20279
- "minimum": 1,
20280
- "maximum": 200
20281
- },
20282
- "required": false,
20283
- "name": "limit",
20284
- "in": "query"
20285
- },
20286
- {
20287
- "schema": {
20288
- "type": "string"
20289
- },
20290
- "required": false,
20291
- "name": "cursor",
20292
- "in": "query"
20293
- },
20294
- {
20295
- "schema": {
20296
- "anyOf": [
20297
- {
20298
- "type": "string"
20299
- },
20300
- {
20301
- "type": "array",
20302
- "items": {
20303
- "type": "string"
20304
- }
20305
- }
20306
- ],
20307
- "description": "`key=value`; repeat it to require several labels"
20267
+ "type": "string",
20268
+ "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`"
20308
20269
  },
20309
- "required": false,
20310
- "description": "`key=value`; repeat it to require several labels",
20311
- "name": "label",
20312
- "in": "query"
20270
+ "required": true,
20271
+ "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`",
20272
+ "name": "sandboxId",
20273
+ "in": "path"
20313
20274
  },
20314
20275
  {
20315
20276
  "schema": {
@@ -20344,31 +20305,17 @@
20344
20305
  ],
20345
20306
  "responses": {
20346
20307
  "200": {
20347
- "description": "The sandboxes; limit opts into pagination",
20308
+ "description": "The sandbox",
20348
20309
  "content": {
20349
20310
  "application/json": {
20350
20311
  "schema": {
20351
- "anyOf": [
20352
- {
20353
- "$ref": "#/components/schemas/ListSandboxesResponse"
20354
- },
20355
- {
20356
- "$ref": "#/components/schemas/SandboxPage"
20357
- }
20358
- ]
20312
+ "$ref": "#/components/schemas/SandboxView"
20359
20313
  }
20360
20314
  }
20361
20315
  }
20362
20316
  },
20363
20317
  "400": {
20364
- "description": "Invalid headers, path, body or cursor",
20365
- "content": {
20366
- "application/json": {
20367
- "schema": {
20368
- "$ref": "#/components/schemas/Rejected"
20369
- }
20370
- }
20371
- }
20318
+ "description": "The sandbox is virtual"
20372
20319
  },
20373
20320
  "401": {
20374
20321
  "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
@@ -20400,6 +20347,9 @@
20400
20347
  }
20401
20348
  }
20402
20349
  },
20350
+ "409": {
20351
+ "description": "A turn holds it (`sandbox_busy`), or no sandbox pods (`sandbox_unavailable`)"
20352
+ },
20403
20353
  "426": {
20404
20354
  "description": "`Nylorun-Protocol` missing or unsupported",
20405
20355
  "content": {
@@ -20423,13 +20373,13 @@
20423
20373
  }
20424
20374
  }
20425
20375
  },
20426
- "/v1/sandboxes/{sandboxId}/events": {
20427
- "get": {
20376
+ "/v1/sandboxes/{sandboxId}/reset": {
20377
+ "post": {
20428
20378
  "tags": [
20429
20379
  "Sandboxes"
20430
20380
  ],
20431
- "summary": "Read a sandbox's lifecycle events",
20432
- "description": "`sandbox.created`, `sandbox.attached`, `sandbox.detached` and `sandbox.deleted`, in order, numbered from 0.",
20381
+ "summary": "Reset a pod sandbox",
20382
+ "description": "A new pod on a new, empty volume; the old pod and volume are deleted. The way out of `sandbox_lost`. Refused during a turn (`sandbox_busy`).",
20433
20383
  "security": [
20434
20384
  {
20435
20385
  "applicationKey": []
@@ -20444,7 +20394,6 @@
20444
20394
  "token"
20445
20395
  ],
20446
20396
  "x-nylorun-scopes": [
20447
- "sessions:own",
20448
20397
  "sandboxes:write"
20449
20398
  ],
20450
20399
  "parameters": [
@@ -20458,16 +20407,6 @@
20458
20407
  "name": "sandboxId",
20459
20408
  "in": "path"
20460
20409
  },
20461
- {
20462
- "schema": {
20463
- "type": "string",
20464
- "description": "The first `seq` to return"
20465
- },
20466
- "required": false,
20467
- "description": "The first `seq` to return",
20468
- "name": "from",
20469
- "in": "query"
20470
- },
20471
20410
  {
20472
20411
  "schema": {
20473
20412
  "type": "string",
@@ -20501,24 +20440,17 @@
20501
20440
  ],
20502
20441
  "responses": {
20503
20442
  "200": {
20504
- "description": "The events",
20443
+ "description": "The sandbox",
20505
20444
  "content": {
20506
20445
  "application/json": {
20507
20446
  "schema": {
20508
- "$ref": "#/components/schemas/ListSandboxEventsResponse"
20447
+ "$ref": "#/components/schemas/SandboxView"
20509
20448
  }
20510
20449
  }
20511
20450
  }
20512
20451
  },
20513
20452
  "400": {
20514
- "description": "Invalid headers, path, body or cursor",
20515
- "content": {
20516
- "application/json": {
20517
- "schema": {
20518
- "$ref": "#/components/schemas/Rejected"
20519
- }
20520
- }
20521
- }
20453
+ "description": "The sandbox is virtual"
20522
20454
  },
20523
20455
  "401": {
20524
20456
  "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
@@ -20550,6 +20482,9 @@
20550
20482
  }
20551
20483
  }
20552
20484
  },
20485
+ "409": {
20486
+ "description": "A turn holds it (`sandbox_busy`), or no sandbox pods (`sandbox_unavailable`)"
20487
+ },
20553
20488
  "426": {
20554
20489
  "description": "`Nylorun-Protocol` missing or unsupported",
20555
20490
  "content": {
@@ -20573,13 +20508,13 @@
20573
20508
  }
20574
20509
  }
20575
20510
  },
20576
- "/v1/sandboxes/{sandboxId}/stop": {
20511
+ "/v1/artifacts": {
20577
20512
  "post": {
20578
20513
  "tags": [
20579
- "Sandboxes"
20514
+ "Artifacts"
20580
20515
  ],
20581
- "summary": "Stop a pod sandbox",
20582
- "description": "Suspends the pod: its volume is kept, and the next turn of a session attached to it (or a PUT) starts it again. Refused during a turn (`sandbox_busy`).",
20516
+ "summary": "Upload a file as a new artifact",
20517
+ "description": "Streams the body to the Object store in one request, up to the Tenant's per-file limit and within its total; a body past either stores nothing (`413 limit_exceeded`). Its `Content-Type` is the file's media type (default: from the name). Acting for a person, the artifact belongs to one of their sessions. A session's artifact appears in its history as `artifact.created`.",
20583
20518
  "security": [
20584
20519
  {
20585
20520
  "applicationKey": []
@@ -20594,18 +20529,48 @@
20594
20529
  "token"
20595
20530
  ],
20596
20531
  "x-nylorun-scopes": [
20597
- "sandboxes:write"
20532
+ "sessions:own"
20598
20533
  ],
20599
20534
  "parameters": [
20600
20535
  {
20601
20536
  "schema": {
20602
20537
  "type": "string",
20603
- "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`"
20538
+ "description": "The file's name, e.g. `brief.pdf`"
20604
20539
  },
20605
20540
  "required": true,
20606
- "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`",
20607
- "name": "sandboxId",
20608
- "in": "path"
20541
+ "description": "The file's name, e.g. `brief.pdf`",
20542
+ "name": "name",
20543
+ "in": "query"
20544
+ },
20545
+ {
20546
+ "schema": {
20547
+ "type": "string",
20548
+ "description": "The session it belongs to"
20549
+ },
20550
+ "required": false,
20551
+ "description": "The session it belongs to",
20552
+ "name": "sessionId",
20553
+ "in": "query"
20554
+ },
20555
+ {
20556
+ "schema": {
20557
+ "anyOf": [
20558
+ {
20559
+ "type": "string"
20560
+ },
20561
+ {
20562
+ "type": "array",
20563
+ "items": {
20564
+ "type": "string"
20565
+ }
20566
+ }
20567
+ ],
20568
+ "description": "`key=value`; repeat it for several labels"
20569
+ },
20570
+ "required": false,
20571
+ "description": "`key=value`; repeat it for several labels",
20572
+ "name": "label",
20573
+ "in": "query"
20609
20574
  },
20610
20575
  {
20611
20576
  "schema": {
@@ -20638,19 +20603,38 @@
20638
20603
  "in": "header"
20639
20604
  }
20640
20605
  ],
20606
+ "requestBody": {
20607
+ "required": true,
20608
+ "description": "The file's bytes; `Content-Type` is its media type",
20609
+ "content": {
20610
+ "*/*": {
20611
+ "schema": {
20612
+ "type": "string",
20613
+ "format": "binary"
20614
+ }
20615
+ }
20616
+ }
20617
+ },
20641
20618
  "responses": {
20642
- "200": {
20643
- "description": "The sandbox",
20619
+ "201": {
20620
+ "description": "The artifact and its first version",
20644
20621
  "content": {
20645
20622
  "application/json": {
20646
20623
  "schema": {
20647
- "$ref": "#/components/schemas/SandboxView"
20624
+ "$ref": "#/components/schemas/UploadArtifactResponse"
20648
20625
  }
20649
20626
  }
20650
20627
  }
20651
20628
  },
20652
20629
  "400": {
20653
- "description": "The sandbox is virtual"
20630
+ "description": "Invalid headers, path, body or cursor",
20631
+ "content": {
20632
+ "application/json": {
20633
+ "schema": {
20634
+ "$ref": "#/components/schemas/Rejected"
20635
+ }
20636
+ }
20637
+ }
20654
20638
  },
20655
20639
  "401": {
20656
20640
  "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
@@ -20682,8 +20666,8 @@
20682
20666
  }
20683
20667
  }
20684
20668
  },
20685
- "409": {
20686
- "description": "A turn holds it (`sandbox_busy`), or no sandbox pods (`sandbox_unavailable`)"
20669
+ "413": {
20670
+ "description": "Larger than the per-file limit, or past the Tenant's total (`limit_exceeded`)"
20687
20671
  },
20688
20672
  "426": {
20689
20673
  "description": "`Nylorun-Protocol` missing or unsupported",
@@ -20706,15 +20690,13 @@
20706
20690
  }
20707
20691
  }
20708
20692
  }
20709
- }
20710
- },
20711
- "/v1/sandboxes/{sandboxId}/reset": {
20712
- "post": {
20693
+ },
20694
+ "get": {
20713
20695
  "tags": [
20714
- "Sandboxes"
20696
+ "Artifacts"
20715
20697
  ],
20716
- "summary": "Reset a pod sandbox",
20717
- "description": "A new pod on a new, empty volume; the old pod and volume are deleted. The way out of `sandbox_lost`. Refused during a turn (`sandbox_busy`).",
20698
+ "summary": "List artifacts",
20699
+ "description": "Oldest first: of one session, or of every session the caller reaches (an application key: every artifact).",
20718
20700
  "security": [
20719
20701
  {
20720
20702
  "applicationKey": []
@@ -20729,18 +20711,18 @@
20729
20711
  "token"
20730
20712
  ],
20731
20713
  "x-nylorun-scopes": [
20732
- "sandboxes:write"
20714
+ "sessions:own"
20733
20715
  ],
20734
20716
  "parameters": [
20735
20717
  {
20736
20718
  "schema": {
20737
20719
  "type": "string",
20738
- "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`"
20720
+ "description": "Only this session's"
20739
20721
  },
20740
- "required": true,
20741
- "description": "The sandbox id, percent-encoded: `team-a%2Fproj-42` for `team-a/proj-42`",
20742
- "name": "sandboxId",
20743
- "in": "path"
20722
+ "required": false,
20723
+ "description": "Only this session's",
20724
+ "name": "sessionId",
20725
+ "in": "query"
20744
20726
  },
20745
20727
  {
20746
20728
  "schema": {
@@ -20775,17 +20757,24 @@
20775
20757
  ],
20776
20758
  "responses": {
20777
20759
  "200": {
20778
- "description": "The sandbox",
20760
+ "description": "The artifacts",
20779
20761
  "content": {
20780
20762
  "application/json": {
20781
20763
  "schema": {
20782
- "$ref": "#/components/schemas/SandboxView"
20764
+ "$ref": "#/components/schemas/ListArtifactsResponse"
20783
20765
  }
20784
20766
  }
20785
20767
  }
20786
20768
  },
20787
20769
  "400": {
20788
- "description": "The sandbox is virtual"
20770
+ "description": "Invalid headers, path, body or cursor",
20771
+ "content": {
20772
+ "application/json": {
20773
+ "schema": {
20774
+ "$ref": "#/components/schemas/Rejected"
20775
+ }
20776
+ }
20777
+ }
20789
20778
  },
20790
20779
  "401": {
20791
20780
  "description": "The token expired (`token_expired`), or its issuer's keys cannot be fetched now (`issuer_unavailable`)",
@@ -20817,9 +20806,6 @@
20817
20806
  }
20818
20807
  }
20819
20808
  },
20820
- "409": {
20821
- "description": "A turn holds it (`sandbox_busy`), or no sandbox pods (`sandbox_unavailable`)"
20822
- },
20823
20809
  "426": {
20824
20810
  "description": "`Nylorun-Protocol` missing or unsupported",
20825
20811
  "content": {
@@ -20843,13 +20829,13 @@
20843
20829
  }
20844
20830
  }
20845
20831
  },
20846
- "/v1/artifacts": {
20847
- "post": {
20832
+ "/v1/artifacts/{artifactId}": {
20833
+ "get": {
20848
20834
  "tags": [
20849
20835
  "Artifacts"
20850
20836
  ],
20851
- "summary": "Upload a file as a new artifact",
20852
- "description": "Streams the body to the Object store in one request, up to the Tenant's per-file limit and within its total; a body past either stores nothing (`413 limit_exceeded`). Its `Content-Type` is the file's media type (default: from the name). Acting for a person, the artifact belongs to one of their sessions. A session's artifact appears in its history as `artifact.created`.",
20837
+ "summary": "Get an artifact",
20838
+ "description": "Its metadata and every version, oldest first.",
20853
20839
  "security": [
20854
20840
  {
20855
20841
  "applicationKey": []
@@ -20869,43 +20855,11 @@
20869
20855
  "parameters": [
20870
20856
  {
20871
20857
  "schema": {
20872
- "type": "string",
20873
- "description": "The file's name, e.g. `brief.pdf`"
20858
+ "type": "string"
20874
20859
  },
20875
20860
  "required": true,
20876
- "description": "The file's name, e.g. `brief.pdf`",
20877
- "name": "name",
20878
- "in": "query"
20879
- },
20880
- {
20881
- "schema": {
20882
- "type": "string",
20883
- "description": "The session it belongs to"
20884
- },
20885
- "required": false,
20886
- "description": "The session it belongs to",
20887
- "name": "sessionId",
20888
- "in": "query"
20889
- },
20890
- {
20891
- "schema": {
20892
- "anyOf": [
20893
- {
20894
- "type": "string"
20895
- },
20896
- {
20897
- "type": "array",
20898
- "items": {
20899
- "type": "string"
20900
- }
20901
- }
20902
- ],
20903
- "description": "`key=value`; repeat it for several labels"
20904
- },
20905
- "required": false,
20906
- "description": "`key=value`; repeat it for several labels",
20907
- "name": "label",
20908
- "in": "query"
20861
+ "name": "artifactId",
20862
+ "in": "path"
20909
20863
  },
20910
20864
  {
20911
20865
  "schema": {
@@ -20938,25 +20892,13 @@
20938
20892
  "in": "header"
20939
20893
  }
20940
20894
  ],
20941
- "requestBody": {
20942
- "required": true,
20943
- "description": "The file's bytes; `Content-Type` is its media type",
20944
- "content": {
20945
- "*/*": {
20946
- "schema": {
20947
- "type": "string",
20948
- "format": "binary"
20949
- }
20950
- }
20951
- }
20952
- },
20953
20895
  "responses": {
20954
- "201": {
20955
- "description": "The artifact and its first version",
20896
+ "200": {
20897
+ "description": "The artifact",
20956
20898
  "content": {
20957
20899
  "application/json": {
20958
20900
  "schema": {
20959
- "$ref": "#/components/schemas/UploadArtifactResponse"
20901
+ "$ref": "#/components/schemas/ArtifactView"
20960
20902
  }
20961
20903
  }
20962
20904
  }
@@ -21001,9 +20943,6 @@
21001
20943
  }
21002
20944
  }
21003
20945
  },
21004
- "413": {
21005
- "description": "Larger than the per-file limit, or past the Tenant's total (`limit_exceeded`)"
21006
- },
21007
20946
  "426": {
21008
20947
  "description": "`Nylorun-Protocol` missing or unsupported",
21009
20948
  "content": {
@@ -21026,12 +20965,12 @@
21026
20965
  }
21027
20966
  }
21028
20967
  },
21029
- "get": {
20968
+ "delete": {
21030
20969
  "tags": [
21031
20970
  "Artifacts"
21032
20971
  ],
21033
- "summary": "List artifacts",
21034
- "description": "Oldest first: of one session, or of every session the caller reaches (an application key: every artifact).",
20972
+ "summary": "Delete an artifact",
20973
+ "description": "Deletes every version and its bytes; its links stop working. A session's artifact gets `artifact.deleted` in its history.",
21035
20974
  "security": [
21036
20975
  {
21037
20976
  "applicationKey": []
@@ -21051,13 +20990,11 @@
21051
20990
  "parameters": [
21052
20991
  {
21053
20992
  "schema": {
21054
- "type": "string",
21055
- "description": "Only this session's"
20993
+ "type": "string"
21056
20994
  },
21057
- "required": false,
21058
- "description": "Only this session's",
21059
- "name": "sessionId",
21060
- "in": "query"
20995
+ "required": true,
20996
+ "name": "artifactId",
20997
+ "in": "path"
21061
20998
  },
21062
20999
  {
21063
21000
  "schema": {
@@ -21092,11 +21029,11 @@
21092
21029
  ],
21093
21030
  "responses": {
21094
21031
  "200": {
21095
- "description": "The artifacts",
21032
+ "description": "Deleted",
21096
21033
  "content": {
21097
21034
  "application/json": {
21098
21035
  "schema": {
21099
- "$ref": "#/components/schemas/ListArtifactsResponse"
21036
+ "$ref": "#/components/schemas/DeleteArtifactResponse"
21100
21037
  }
21101
21038
  }
21102
21039
  }
@@ -21164,13 +21101,13 @@
21164
21101
  }
21165
21102
  }
21166
21103
  },
21167
- "/v1/artifacts/{artifactId}": {
21168
- "get": {
21104
+ "/v1/artifacts/{artifactId}/versions": {
21105
+ "post": {
21169
21106
  "tags": [
21170
21107
  "Artifacts"
21171
21108
  ],
21172
- "summary": "Get an artifact",
21173
- "description": "Its metadata and every version, oldest first.",
21109
+ "summary": "Upload a new version of an artifact",
21110
+ "description": "Streams the body as the artifact's next version, with the same limits as a new artifact. A session's artifact gets `artifact.version.created` in its history.",
21174
21111
  "security": [
21175
21112
  {
21176
21113
  "applicationKey": []
@@ -21227,13 +21164,25 @@
21227
21164
  "in": "header"
21228
21165
  }
21229
21166
  ],
21167
+ "requestBody": {
21168
+ "required": true,
21169
+ "description": "The file's bytes; `Content-Type` is its media type",
21170
+ "content": {
21171
+ "*/*": {
21172
+ "schema": {
21173
+ "type": "string",
21174
+ "format": "binary"
21175
+ }
21176
+ }
21177
+ }
21178
+ },
21230
21179
  "responses": {
21231
- "200": {
21232
- "description": "The artifact",
21180
+ "201": {
21181
+ "description": "The artifact and the version the upload created",
21233
21182
  "content": {
21234
21183
  "application/json": {
21235
21184
  "schema": {
21236
- "$ref": "#/components/schemas/ArtifactView"
21185
+ "$ref": "#/components/schemas/UploadArtifactResponse"
21237
21186
  }
21238
21187
  }
21239
21188
  }
@@ -21278,6 +21227,9 @@
21278
21227
  }
21279
21228
  }
21280
21229
  },
21230
+ "413": {
21231
+ "description": "Larger than the per-file limit, or past the Tenant's total (`limit_exceeded`)"
21232
+ },
21281
21233
  "426": {
21282
21234
  "description": "`Nylorun-Protocol` missing or unsupported",
21283
21235
  "content": {
@@ -21299,13 +21251,15 @@
21299
21251
  }
21300
21252
  }
21301
21253
  }
21302
- },
21303
- "delete": {
21254
+ }
21255
+ },
21256
+ "/v1/artifacts/{artifactId}/versions/{version}/content": {
21257
+ "get": {
21304
21258
  "tags": [
21305
21259
  "Artifacts"
21306
21260
  ],
21307
- "summary": "Delete an artifact",
21308
- "description": "Deletes every version and its bytes; its links stop working. A session's artifact gets `artifact.deleted` in its history.",
21261
+ "summary": "Download a version of an artifact",
21262
+ "description": "Streams the bytes through the Runtime. One `Range: bytes=…` gives `206` with `Content-Range`; several ranges give the whole file. A folder is a `400`: read its tree, its files or its zip.",
21309
21263
  "security": [
21310
21264
  {
21311
21265
  "applicationKey": []
@@ -21331,6 +21285,16 @@
21331
21285
  "name": "artifactId",
21332
21286
  "in": "path"
21333
21287
  },
21288
+ {
21289
+ "schema": {
21290
+ "type": "string",
21291
+ "description": "A version number, or `latest`"
21292
+ },
21293
+ "required": true,
21294
+ "description": "A version number, or `latest`",
21295
+ "name": "version",
21296
+ "in": "path"
21297
+ },
21334
21298
  {
21335
21299
  "schema": {
21336
21300
  "type": "string",
@@ -21364,11 +21328,75 @@
21364
21328
  ],
21365
21329
  "responses": {
21366
21330
  "200": {
21367
- "description": "Deleted",
21331
+ "description": "The file",
21332
+ "headers": {
21333
+ "Accept-Ranges": {
21334
+ "schema": {
21335
+ "type": "string",
21336
+ "description": "`bytes`"
21337
+ },
21338
+ "required": true,
21339
+ "description": "`bytes`"
21340
+ },
21341
+ "Content-Range": {
21342
+ "schema": {
21343
+ "type": "string",
21344
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
21345
+ },
21346
+ "required": false,
21347
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
21348
+ },
21349
+ "ETag": {
21350
+ "schema": {
21351
+ "type": "string",
21352
+ "description": "The version's SHA-256, quoted"
21353
+ },
21354
+ "required": true,
21355
+ "description": "The version's SHA-256, quoted"
21356
+ }
21357
+ },
21368
21358
  "content": {
21369
- "application/json": {
21359
+ "*/*": {
21370
21360
  "schema": {
21371
- "$ref": "#/components/schemas/DeleteArtifactResponse"
21361
+ "type": "string",
21362
+ "format": "binary"
21363
+ }
21364
+ }
21365
+ }
21366
+ },
21367
+ "206": {
21368
+ "description": "The bytes the `Range` header asked for",
21369
+ "headers": {
21370
+ "Accept-Ranges": {
21371
+ "schema": {
21372
+ "type": "string",
21373
+ "description": "`bytes`"
21374
+ },
21375
+ "required": true,
21376
+ "description": "`bytes`"
21377
+ },
21378
+ "Content-Range": {
21379
+ "schema": {
21380
+ "type": "string",
21381
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
21382
+ },
21383
+ "required": false,
21384
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
21385
+ },
21386
+ "ETag": {
21387
+ "schema": {
21388
+ "type": "string",
21389
+ "description": "The version's SHA-256, quoted"
21390
+ },
21391
+ "required": true,
21392
+ "description": "The version's SHA-256, quoted"
21393
+ }
21394
+ },
21395
+ "content": {
21396
+ "*/*": {
21397
+ "schema": {
21398
+ "type": "string",
21399
+ "format": "binary"
21372
21400
  }
21373
21401
  }
21374
21402
  }
@@ -21413,6 +21441,9 @@
21413
21441
  }
21414
21442
  }
21415
21443
  },
21444
+ "416": {
21445
+ "description": "The `Range` starts past the end of the file"
21446
+ },
21416
21447
  "426": {
21417
21448
  "description": "`Nylorun-Protocol` missing or unsupported",
21418
21449
  "content": {
@@ -21436,13 +21467,13 @@
21436
21467
  }
21437
21468
  }
21438
21469
  },
21439
- "/v1/artifacts/{artifactId}/versions": {
21440
- "post": {
21470
+ "/v1/artifacts/{artifactId}/versions/{version}/tree": {
21471
+ "get": {
21441
21472
  "tags": [
21442
21473
  "Artifacts"
21443
21474
  ],
21444
- "summary": "Upload a new version of an artifact",
21445
- "description": "Streams the body as the artifact's next version, with the same limits as a new artifact. A session's artifact gets `artifact.version.created` in its history.",
21475
+ "summary": "List a folder version's files",
21476
+ "description": "The folder version's manifest: every file's path, size, SHA-256 and media type, sorted by path. A file artifact is a `400`.",
21446
21477
  "security": [
21447
21478
  {
21448
21479
  "applicationKey": []
@@ -21468,6 +21499,16 @@
21468
21499
  "name": "artifactId",
21469
21500
  "in": "path"
21470
21501
  },
21502
+ {
21503
+ "schema": {
21504
+ "type": "string",
21505
+ "description": "A version number, or `latest`"
21506
+ },
21507
+ "required": true,
21508
+ "description": "A version number, or `latest`",
21509
+ "name": "version",
21510
+ "in": "path"
21511
+ },
21471
21512
  {
21472
21513
  "schema": {
21473
21514
  "type": "string",
@@ -21499,25 +21540,13 @@
21499
21540
  "in": "header"
21500
21541
  }
21501
21542
  ],
21502
- "requestBody": {
21503
- "required": true,
21504
- "description": "The file's bytes; `Content-Type` is its media type",
21505
- "content": {
21506
- "*/*": {
21507
- "schema": {
21508
- "type": "string",
21509
- "format": "binary"
21510
- }
21511
- }
21512
- }
21513
- },
21514
21543
  "responses": {
21515
- "201": {
21516
- "description": "The artifact and the version the upload created",
21544
+ "200": {
21545
+ "description": "The files",
21517
21546
  "content": {
21518
21547
  "application/json": {
21519
21548
  "schema": {
21520
- "$ref": "#/components/schemas/UploadArtifactResponse"
21549
+ "$ref": "#/components/schemas/ArtifactTree"
21521
21550
  }
21522
21551
  }
21523
21552
  }
@@ -21562,9 +21591,6 @@
21562
21591
  }
21563
21592
  }
21564
21593
  },
21565
- "413": {
21566
- "description": "Larger than the per-file limit, or past the Tenant's total (`limit_exceeded`)"
21567
- },
21568
21594
  "426": {
21569
21595
  "description": "`Nylorun-Protocol` missing or unsupported",
21570
21596
  "content": {
@@ -21588,13 +21614,13 @@
21588
21614
  }
21589
21615
  }
21590
21616
  },
21591
- "/v1/artifacts/{artifactId}/versions/{version}/content": {
21617
+ "/v1/artifacts/{artifactId}/versions/{version}/files/{path}": {
21592
21618
  "get": {
21593
21619
  "tags": [
21594
21620
  "Artifacts"
21595
21621
  ],
21596
- "summary": "Download a version of an artifact",
21597
- "description": "Streams the bytes through the Runtime. One `Range: bytes=…` gives `206` with `Content-Range`; several ranges give the whole file. A folder is a `400`: read its tree, its files or its zip.",
21622
+ "summary": "Download one file of a folder version",
21623
+ "description": "Streams the file at `path` (its path in the folder, with `/` percent-encoded as `%2F`) through the Runtime, with Range as for a file artifact.",
21598
21624
  "security": [
21599
21625
  {
21600
21626
  "applicationKey": []
@@ -21630,6 +21656,16 @@
21630
21656
  "name": "version",
21631
21657
  "in": "path"
21632
21658
  },
21659
+ {
21660
+ "schema": {
21661
+ "type": "string",
21662
+ "description": "The file's path in the folder, percent-encoded"
21663
+ },
21664
+ "required": true,
21665
+ "description": "The file's path in the folder, percent-encoded",
21666
+ "name": "path",
21667
+ "in": "path"
21668
+ },
21633
21669
  {
21634
21670
  "schema": {
21635
21671
  "type": "string",
@@ -21802,13 +21838,13 @@
21802
21838
  }
21803
21839
  }
21804
21840
  },
21805
- "/v1/artifacts/{artifactId}/versions/{version}/tree": {
21841
+ "/v1/artifacts/{artifactId}/versions/{version}/diff": {
21806
21842
  "get": {
21807
21843
  "tags": [
21808
21844
  "Artifacts"
21809
21845
  ],
21810
- "summary": "List a folder version's files",
21811
- "description": "The folder version's manifest: every file's path, size, SHA-256 and media type, sorted by path. A file artifact is a `400`.",
21846
+ "summary": "Compare two folder versions",
21847
+ "description": "The files added, removed and changed from version `from` (default: the one before) to this one. Version 1 without `from` lists every file as added.",
21812
21848
  "security": [
21813
21849
  {
21814
21850
  "applicationKey": []
@@ -21844,6 +21880,16 @@
21844
21880
  "name": "version",
21845
21881
  "in": "path"
21846
21882
  },
21883
+ {
21884
+ "schema": {
21885
+ "type": "string",
21886
+ "description": "The version to compare against"
21887
+ },
21888
+ "required": false,
21889
+ "description": "The version to compare against",
21890
+ "name": "from",
21891
+ "in": "query"
21892
+ },
21847
21893
  {
21848
21894
  "schema": {
21849
21895
  "type": "string",
@@ -21877,11 +21923,11 @@
21877
21923
  ],
21878
21924
  "responses": {
21879
21925
  "200": {
21880
- "description": "The files",
21926
+ "description": "What changed",
21881
21927
  "content": {
21882
21928
  "application/json": {
21883
21929
  "schema": {
21884
- "$ref": "#/components/schemas/ArtifactTree"
21930
+ "$ref": "#/components/schemas/ArtifactDiff"
21885
21931
  }
21886
21932
  }
21887
21933
  }
@@ -21949,13 +21995,13 @@
21949
21995
  }
21950
21996
  }
21951
21997
  },
21952
- "/v1/artifacts/{artifactId}/versions/{version}/files/{path}": {
21998
+ "/v1/artifacts/{artifactId}/versions/{version}/zip": {
21953
21999
  "get": {
21954
22000
  "tags": [
21955
22001
  "Artifacts"
21956
22002
  ],
21957
- "summary": "Download one file of a folder version",
21958
- "description": "Streams the file at `path` (its path in the folder, with `/` percent-encoded as `%2F`) through the Runtime, with Range as for a file artifact.",
22003
+ "summary": "Download a folder version as a zip",
22004
+ "description": "Streams the folder's files as one zip archive (deflated, UTF-8 names), read from the Object store as it goes. A file artifact is a `400`.",
21959
22005
  "security": [
21960
22006
  {
21961
22007
  "applicationKey": []
@@ -21991,16 +22037,6 @@
21991
22037
  "name": "version",
21992
22038
  "in": "path"
21993
22039
  },
21994
- {
21995
- "schema": {
21996
- "type": "string",
21997
- "description": "The file's path in the folder, percent-encoded"
21998
- },
21999
- "required": true,
22000
- "description": "The file's path in the folder, percent-encoded",
22001
- "name": "path",
22002
- "in": "path"
22003
- },
22004
22040
  {
22005
22041
  "schema": {
22006
22042
  "type": "string",
@@ -22034,72 +22070,9 @@
22034
22070
  ],
22035
22071
  "responses": {
22036
22072
  "200": {
22037
- "description": "The file",
22038
- "headers": {
22039
- "Accept-Ranges": {
22040
- "schema": {
22041
- "type": "string",
22042
- "description": "`bytes`"
22043
- },
22044
- "required": true,
22045
- "description": "`bytes`"
22046
- },
22047
- "Content-Range": {
22048
- "schema": {
22049
- "type": "string",
22050
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22051
- },
22052
- "required": false,
22053
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22054
- },
22055
- "ETag": {
22056
- "schema": {
22057
- "type": "string",
22058
- "description": "The version's SHA-256, quoted"
22059
- },
22060
- "required": true,
22061
- "description": "The version's SHA-256, quoted"
22062
- }
22063
- },
22064
- "content": {
22065
- "*/*": {
22066
- "schema": {
22067
- "type": "string",
22068
- "format": "binary"
22069
- }
22070
- }
22071
- }
22072
- },
22073
- "206": {
22074
- "description": "The bytes the `Range` header asked for",
22075
- "headers": {
22076
- "Accept-Ranges": {
22077
- "schema": {
22078
- "type": "string",
22079
- "description": "`bytes`"
22080
- },
22081
- "required": true,
22082
- "description": "`bytes`"
22083
- },
22084
- "Content-Range": {
22085
- "schema": {
22086
- "type": "string",
22087
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22088
- },
22089
- "required": false,
22090
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22091
- },
22092
- "ETag": {
22093
- "schema": {
22094
- "type": "string",
22095
- "description": "The version's SHA-256, quoted"
22096
- },
22097
- "required": true,
22098
- "description": "The version's SHA-256, quoted"
22099
- }
22100
- },
22073
+ "description": "The zip archive",
22101
22074
  "content": {
22102
- "*/*": {
22075
+ "application/zip": {
22103
22076
  "schema": {
22104
22077
  "type": "string",
22105
22078
  "format": "binary"
@@ -22147,9 +22120,6 @@
22147
22120
  }
22148
22121
  }
22149
22122
  },
22150
- "416": {
22151
- "description": "The `Range` starts past the end of the file"
22152
- },
22153
22123
  "426": {
22154
22124
  "description": "`Nylorun-Protocol` missing or unsupported",
22155
22125
  "content": {
@@ -22173,13 +22143,13 @@
22173
22143
  }
22174
22144
  }
22175
22145
  },
22176
- "/v1/artifacts/{artifactId}/versions/{version}/diff": {
22177
- "get": {
22146
+ "/v1/artifacts/{artifactId}/links": {
22147
+ "post": {
22178
22148
  "tags": [
22179
22149
  "Artifacts"
22180
22150
  ],
22181
- "summary": "Compare two folder versions",
22182
- "description": "The files added, removed and changed from version `from` (default: the one before) to this one. Version 1 without `from` lists every file as added.",
22151
+ "summary": "Mint a capability link",
22152
+ "description": "A short-lived path that downloads one version, with Range, with no other credential: for `<img>` tags, UIs and sharing. Signed by the Runtime with the Tenant's signing key; at most 15 minutes; it opens nothing once the artifact is deleted. A folder's link opens its zip, or with `file` that one file.",
22183
22153
  "security": [
22184
22154
  {
22185
22155
  "applicationKey": []
@@ -22205,26 +22175,6 @@
22205
22175
  "name": "artifactId",
22206
22176
  "in": "path"
22207
22177
  },
22208
- {
22209
- "schema": {
22210
- "type": "string",
22211
- "description": "A version number, or `latest`"
22212
- },
22213
- "required": true,
22214
- "description": "A version number, or `latest`",
22215
- "name": "version",
22216
- "in": "path"
22217
- },
22218
- {
22219
- "schema": {
22220
- "type": "string",
22221
- "description": "The version to compare against"
22222
- },
22223
- "required": false,
22224
- "description": "The version to compare against",
22225
- "name": "from",
22226
- "in": "query"
22227
- },
22228
22178
  {
22229
22179
  "schema": {
22230
22180
  "type": "string",
@@ -22256,13 +22206,23 @@
22256
22206
  "in": "header"
22257
22207
  }
22258
22208
  ],
22209
+ "requestBody": {
22210
+ "required": true,
22211
+ "content": {
22212
+ "application/json": {
22213
+ "schema": {
22214
+ "$ref": "#/components/schemas/CreateArtifactLinkRequest"
22215
+ }
22216
+ }
22217
+ }
22218
+ },
22259
22219
  "responses": {
22260
22220
  "200": {
22261
- "description": "What changed",
22221
+ "description": "The link",
22262
22222
  "content": {
22263
22223
  "application/json": {
22264
22224
  "schema": {
22265
- "$ref": "#/components/schemas/ArtifactDiff"
22225
+ "$ref": "#/components/schemas/ArtifactLink"
22266
22226
  }
22267
22227
  }
22268
22228
  }
@@ -22330,46 +22290,35 @@
22330
22290
  }
22331
22291
  }
22332
22292
  },
22333
- "/v1/artifacts/{artifactId}/versions/{version}/zip": {
22293
+ "/v1/artifact-links/{token}": {
22334
22294
  "get": {
22335
22295
  "tags": [
22336
22296
  "Artifacts"
22337
22297
  ],
22338
- "summary": "Download a folder version as a zip",
22339
- "description": "Streams the folder's files as one zip archive (deflated, UTF-8 names), read from the Object store as it goes. A file artifact is a `400`.",
22298
+ "summary": "Open a capability link",
22299
+ "description": "Downloads the version the link names, with Range, until it expires (`401 token_expired`): a file, a folder's file, or a folder's zip. Needs no credential and no `Nylorun-Protocol`.",
22340
22300
  "security": [
22341
22301
  {
22342
22302
  "applicationKey": []
22343
22303
  },
22344
22304
  {
22345
22305
  "issuerToken": []
22346
- }
22306
+ },
22307
+ {}
22347
22308
  ],
22348
22309
  "x-nylorun-credentials": [
22349
22310
  "application",
22350
22311
  "subject",
22351
22312
  "token"
22352
22313
  ],
22353
- "x-nylorun-scopes": [
22354
- "sessions:own"
22355
- ],
22314
+ "x-nylorun-scopes": "any",
22356
22315
  "parameters": [
22357
22316
  {
22358
22317
  "schema": {
22359
22318
  "type": "string"
22360
22319
  },
22361
22320
  "required": true,
22362
- "name": "artifactId",
22363
- "in": "path"
22364
- },
22365
- {
22366
- "schema": {
22367
- "type": "string",
22368
- "description": "A version number, or `latest`"
22369
- },
22370
- "required": true,
22371
- "description": "A version number, or `latest`",
22372
- "name": "version",
22321
+ "name": "token",
22373
22322
  "in": "path"
22374
22323
  },
22375
22324
  {
@@ -22377,7 +22326,7 @@
22377
22326
  "type": "string",
22378
22327
  "description": "The protocol version, `8`"
22379
22328
  },
22380
- "required": true,
22329
+ "required": false,
22381
22330
  "description": "The protocol version, `8`",
22382
22331
  "name": "Nylorun-Protocol",
22383
22332
  "in": "header"
@@ -22397,17 +22346,80 @@
22397
22346
  "type": "string",
22398
22347
  "description": "The subject's space-separated scopes; required with a subject"
22399
22348
  },
22400
- "required": false,
22401
- "description": "The subject's space-separated scopes; required with a subject",
22402
- "name": "Nylorun-Scopes",
22403
- "in": "header"
22404
- }
22405
- ],
22406
- "responses": {
22407
- "200": {
22408
- "description": "The zip archive",
22349
+ "required": false,
22350
+ "description": "The subject's space-separated scopes; required with a subject",
22351
+ "name": "Nylorun-Scopes",
22352
+ "in": "header"
22353
+ }
22354
+ ],
22355
+ "responses": {
22356
+ "200": {
22357
+ "description": "The file",
22358
+ "headers": {
22359
+ "Accept-Ranges": {
22360
+ "schema": {
22361
+ "type": "string",
22362
+ "description": "`bytes`"
22363
+ },
22364
+ "required": true,
22365
+ "description": "`bytes`"
22366
+ },
22367
+ "Content-Range": {
22368
+ "schema": {
22369
+ "type": "string",
22370
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22371
+ },
22372
+ "required": false,
22373
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22374
+ },
22375
+ "ETag": {
22376
+ "schema": {
22377
+ "type": "string",
22378
+ "description": "The version's SHA-256, quoted"
22379
+ },
22380
+ "required": true,
22381
+ "description": "The version's SHA-256, quoted"
22382
+ }
22383
+ },
22384
+ "content": {
22385
+ "*/*": {
22386
+ "schema": {
22387
+ "type": "string",
22388
+ "format": "binary"
22389
+ }
22390
+ }
22391
+ }
22392
+ },
22393
+ "206": {
22394
+ "description": "The bytes the `Range` header asked for",
22395
+ "headers": {
22396
+ "Accept-Ranges": {
22397
+ "schema": {
22398
+ "type": "string",
22399
+ "description": "`bytes`"
22400
+ },
22401
+ "required": true,
22402
+ "description": "`bytes`"
22403
+ },
22404
+ "Content-Range": {
22405
+ "schema": {
22406
+ "type": "string",
22407
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22408
+ },
22409
+ "required": false,
22410
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22411
+ },
22412
+ "ETag": {
22413
+ "schema": {
22414
+ "type": "string",
22415
+ "description": "The version's SHA-256, quoted"
22416
+ },
22417
+ "required": true,
22418
+ "description": "The version's SHA-256, quoted"
22419
+ }
22420
+ },
22409
22421
  "content": {
22410
- "application/zip": {
22422
+ "*/*": {
22411
22423
  "schema": {
22412
22424
  "type": "string",
22413
22425
  "format": "binary"
@@ -22455,6 +22467,9 @@
22455
22467
  }
22456
22468
  }
22457
22469
  },
22470
+ "416": {
22471
+ "description": "The `Range` starts past the end of the file"
22472
+ },
22458
22473
  "426": {
22459
22474
  "description": "`Nylorun-Protocol` missing or unsupported",
22460
22475
  "content": {
@@ -22478,17 +22493,65 @@
22478
22493
  }
22479
22494
  }
22480
22495
  },
22481
- "/v1/artifacts/{artifactId}/links": {
22482
- "post": {
22496
+ "/health": {
22497
+ "get": {
22483
22498
  "tags": [
22484
- "Artifacts"
22499
+ "Service"
22485
22500
  ],
22486
- "summary": "Mint a capability link",
22487
- "description": "A short-lived path that downloads one version, with Range, with no other credential: for `<img>` tags, UIs and sharing. Signed by the Runtime with the Tenant's signing key; at most 15 minutes; it opens nothing once the artifact is deleted. A folder's link opens its zip, or with `file` that one file.",
22501
+ "summary": "Check the Runtime",
22502
+ "description": "The protocol range and features a client checks first. Refuses an `Origin`.",
22503
+ "responses": {
22504
+ "200": {
22505
+ "description": "The Runtime is up",
22506
+ "content": {
22507
+ "application/json": {
22508
+ "schema": {
22509
+ "$ref": "#/components/schemas/Health"
22510
+ }
22511
+ }
22512
+ }
22513
+ }
22514
+ }
22515
+ }
22516
+ },
22517
+ "/ready": {
22518
+ "get": {
22519
+ "tags": [
22520
+ "Service"
22521
+ ],
22522
+ "summary": "Check the Runtime is ready",
22523
+ "description": "The listener, the Tenant (open), Postgres, Restate and S2, and the open Tenant's harnesses.",
22524
+ "responses": {
22525
+ "200": {
22526
+ "description": "Ready",
22527
+ "content": {
22528
+ "application/json": {
22529
+ "schema": {
22530
+ "$ref": "#/components/schemas/Ready"
22531
+ }
22532
+ }
22533
+ }
22534
+ },
22535
+ "503": {
22536
+ "description": "Not ready: `checks` says what is not"
22537
+ }
22538
+ }
22539
+ }
22540
+ },
22541
+ "/v1/me": {
22542
+ "get": {
22543
+ "tags": [
22544
+ "Service"
22545
+ ],
22546
+ "summary": "Get who the caller is",
22547
+ "description": "The subject, scopes, agents and sandbox grants of the credential that sends it: an application key (alone or acting for a subject), a management key (`via: management:<principalId>`, no scopes, no agents), or a trusted issuer's token (`via: issuer:<name>`).",
22488
22548
  "security": [
22489
22549
  {
22490
22550
  "applicationKey": []
22491
22551
  },
22552
+ {
22553
+ "managementKey": []
22554
+ },
22492
22555
  {
22493
22556
  "issuerToken": []
22494
22557
  }
@@ -22496,20 +22559,11 @@
22496
22559
  "x-nylorun-credentials": [
22497
22560
  "application",
22498
22561
  "subject",
22562
+ "management",
22499
22563
  "token"
22500
22564
  ],
22501
- "x-nylorun-scopes": [
22502
- "sessions:own"
22503
- ],
22565
+ "x-nylorun-scopes": "any",
22504
22566
  "parameters": [
22505
- {
22506
- "schema": {
22507
- "type": "string"
22508
- },
22509
- "required": true,
22510
- "name": "artifactId",
22511
- "in": "path"
22512
- },
22513
22567
  {
22514
22568
  "schema": {
22515
22569
  "type": "string",
@@ -22541,23 +22595,13 @@
22541
22595
  "in": "header"
22542
22596
  }
22543
22597
  ],
22544
- "requestBody": {
22545
- "required": true,
22546
- "content": {
22547
- "application/json": {
22548
- "schema": {
22549
- "$ref": "#/components/schemas/CreateArtifactLinkRequest"
22550
- }
22551
- }
22552
- }
22553
- },
22554
22598
  "responses": {
22555
22599
  "200": {
22556
- "description": "The link",
22600
+ "description": "The caller",
22557
22601
  "content": {
22558
22602
  "application/json": {
22559
22603
  "schema": {
22560
- "$ref": "#/components/schemas/ArtifactLink"
22604
+ "$ref": "#/components/schemas/MeResponse"
22561
22605
  }
22562
22606
  }
22563
22607
  }
@@ -22583,7 +22627,7 @@
22583
22627
  }
22584
22628
  },
22585
22629
  "403": {
22586
- "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
22630
+ "description": "Not allowed for this credential, a key of the other API (`key_role_mismatch`), a key from a browser (`origin_rejected`) or a management key acting for a subject",
22587
22631
  "content": {
22588
22632
  "application/json": {
22589
22633
  "schema": {
@@ -22625,17 +22669,20 @@
22625
22669
  }
22626
22670
  }
22627
22671
  },
22628
- "/v1/artifact-links/{token}": {
22672
+ "/v1/access/jwks": {
22629
22673
  "get": {
22630
22674
  "tags": [
22631
- "Artifacts"
22675
+ "Service"
22632
22676
  ],
22633
- "summary": "Open a capability link",
22634
- "description": "Downloads the version the link names, with Range, until it expires (`401 token_expired`): a file, a folder's file, or a folder's zip. Needs no credential and no `Nylorun-Protocol`.",
22677
+ "summary": "Get the public keys the Runtime's tokens are signed with",
22678
+ "description": "A JSON Web Key Set, to verify a token the Runtime signed without calling it. No credential is needed.",
22635
22679
  "security": [
22636
22680
  {
22637
22681
  "applicationKey": []
22638
22682
  },
22683
+ {
22684
+ "managementKey": []
22685
+ },
22639
22686
  {
22640
22687
  "issuerToken": []
22641
22688
  },
@@ -22644,24 +22691,17 @@
22644
22691
  "x-nylorun-credentials": [
22645
22692
  "application",
22646
22693
  "subject",
22694
+ "management",
22647
22695
  "token"
22648
22696
  ],
22649
22697
  "x-nylorun-scopes": "any",
22650
22698
  "parameters": [
22651
- {
22652
- "schema": {
22653
- "type": "string"
22654
- },
22655
- "required": true,
22656
- "name": "token",
22657
- "in": "path"
22658
- },
22659
22699
  {
22660
22700
  "schema": {
22661
22701
  "type": "string",
22662
22702
  "description": "The protocol version, `8`"
22663
22703
  },
22664
- "required": false,
22704
+ "required": true,
22665
22705
  "description": "The protocol version, `8`",
22666
22706
  "name": "Nylorun-Protocol",
22667
22707
  "in": "header"
@@ -22689,75 +22729,11 @@
22689
22729
  ],
22690
22730
  "responses": {
22691
22731
  "200": {
22692
- "description": "The file",
22693
- "headers": {
22694
- "Accept-Ranges": {
22695
- "schema": {
22696
- "type": "string",
22697
- "description": "`bytes`"
22698
- },
22699
- "required": true,
22700
- "description": "`bytes`"
22701
- },
22702
- "Content-Range": {
22703
- "schema": {
22704
- "type": "string",
22705
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22706
- },
22707
- "required": false,
22708
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22709
- },
22710
- "ETag": {
22711
- "schema": {
22712
- "type": "string",
22713
- "description": "The version's SHA-256, quoted"
22714
- },
22715
- "required": true,
22716
- "description": "The version's SHA-256, quoted"
22717
- }
22718
- },
22719
- "content": {
22720
- "*/*": {
22721
- "schema": {
22722
- "type": "string",
22723
- "format": "binary"
22724
- }
22725
- }
22726
- }
22727
- },
22728
- "206": {
22729
- "description": "The bytes the `Range` header asked for",
22730
- "headers": {
22731
- "Accept-Ranges": {
22732
- "schema": {
22733
- "type": "string",
22734
- "description": "`bytes`"
22735
- },
22736
- "required": true,
22737
- "description": "`bytes`"
22738
- },
22739
- "Content-Range": {
22740
- "schema": {
22741
- "type": "string",
22742
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22743
- },
22744
- "required": false,
22745
- "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
22746
- },
22747
- "ETag": {
22748
- "schema": {
22749
- "type": "string",
22750
- "description": "The version's SHA-256, quoted"
22751
- },
22752
- "required": true,
22753
- "description": "The version's SHA-256, quoted"
22754
- }
22755
- },
22732
+ "description": "The public keys",
22756
22733
  "content": {
22757
- "*/*": {
22734
+ "application/json": {
22758
22735
  "schema": {
22759
- "type": "string",
22760
- "format": "binary"
22736
+ "$ref": "#/components/schemas/Jwks"
22761
22737
  }
22762
22738
  }
22763
22739
  }
@@ -22783,7 +22759,7 @@
22783
22759
  }
22784
22760
  },
22785
22761
  "403": {
22786
- "description": "Not allowed for this credential or subject scope, a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
22762
+ "description": "Not allowed for this credential, a key of the other API (`key_role_mismatch`), a key from a browser (`origin_rejected`) or a management key acting for a subject",
22787
22763
  "content": {
22788
22764
  "application/json": {
22789
22765
  "schema": {
@@ -22802,9 +22778,6 @@
22802
22778
  }
22803
22779
  }
22804
22780
  },
22805
- "416": {
22806
- "description": "The `Range` starts past the end of the file"
22807
- },
22808
22781
  "426": {
22809
22782
  "description": "`Nylorun-Protocol` missing or unsupported",
22810
22783
  "content": {
@@ -22827,14 +22800,24 @@
22827
22800
  }
22828
22801
  }
22829
22802
  }
22803
+ },
22804
+ "/openapi/runtime.json": {
22805
+ "get": {
22806
+ "tags": [
22807
+ "Service"
22808
+ ],
22809
+ "summary": "Get the Runtime API's document",
22810
+ "description": "This document. `/openapi.json` is the same.",
22811
+ "responses": {
22812
+ "200": {
22813
+ "description": "The Runtime API's OpenAPI document"
22814
+ }
22815
+ }
22816
+ }
22830
22817
  }
22831
22818
  },
22832
22819
  "webhooks": {},
22833
22820
  "tags": [
22834
- {
22835
- "name": "Runtime",
22836
- "description": "Check a Runtime is up and speaks your protocol, ask who your credential is, and read the public keys of the tokens it signs. `/health`, `/ready`, the JWKS and the documents need no key."
22837
- },
22838
22821
  {
22839
22822
  "name": "Agents",
22840
22823
  "description": "The agents a Tenant can run: put a definition, list what is there. In `@nylorun/agents`."
@@ -22862,15 +22845,13 @@
22862
22845
  {
22863
22846
  "name": "Artifacts",
22864
22847
  "description": "Files and folders agents and people produce, versioned, with short-lived capability links to share them. In `@nylorun/agents`."
22848
+ },
22849
+ {
22850
+ "name": "Service",
22851
+ "description": "Check a Runtime is up and speaks your protocol, ask who your credential is, and read the public keys of the tokens it signs. `/health`, `/ready`, the JWKS and the documents need no key."
22865
22852
  }
22866
22853
  ],
22867
22854
  "x-tagGroups": [
22868
- {
22869
- "name": "Get started",
22870
- "tags": [
22871
- "Runtime"
22872
- ]
22873
- },
22874
22855
  {
22875
22856
  "name": "Agents",
22876
22857
  "tags": [
@@ -22887,11 +22868,22 @@
22887
22868
  ]
22888
22869
  },
22889
22870
  {
22890
- "name": "Sandboxes & artifacts",
22871
+ "name": "Sandboxes",
22872
+ "tags": [
22873
+ "Sandboxes"
22874
+ ]
22875
+ },
22876
+ {
22877
+ "name": "Artifacts",
22891
22878
  "tags": [
22892
- "Sandboxes",
22893
22879
  "Artifacts"
22894
22880
  ]
22881
+ },
22882
+ {
22883
+ "name": "Service",
22884
+ "tags": [
22885
+ "Service"
22886
+ ]
22895
22887
  }
22896
22888
  ]
22897
22889
  }