@nylorun/runtime 0.23.0-beta → 0.24.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/README.md +79 -28
  3. package/dist/adapters/execution/restate.js +1 -1
  4. package/dist/adapters/replication/pgoutput.d.ts +2 -0
  5. package/dist/adapters/replication/pgoutput.js +6 -3
  6. package/dist/adapters/sandbox/local.d.ts +9 -1
  7. package/dist/adapters/sandbox/local.js +16 -4
  8. package/dist/adapters/sandbox/virtual.js +4 -1
  9. package/dist/api/a2a/endpoint.js +5 -1
  10. package/dist/api/a2a/routes.d.ts +2 -0
  11. package/dist/api/a2a/routes.js +2 -2
  12. package/dist/api/a2a/tasks.js +2 -1
  13. package/dist/api/ag-ui/endpoint.js +4 -2
  14. package/dist/api/ag-ui/history.js +4 -1
  15. package/dist/api/ag-ui/routes.d.ts +4 -1
  16. package/dist/api/ag-ui/routes.js +11 -10
  17. package/dist/api/ag-ui/translate.js +3 -2
  18. package/dist/api/components.d.ts +4953 -1204
  19. package/dist/api/components.js +25 -16
  20. package/dist/api/gate/keys.js +7 -1
  21. package/dist/api/gate/routes.d.ts +6 -0
  22. package/dist/api/gate/routes.js +39 -3
  23. package/dist/api/http/app.js +4 -4
  24. package/dist/api/http/define.d.ts +6 -0
  25. package/dist/api/http/define.js +13 -1
  26. package/dist/api/http/respond.js +1 -1
  27. package/dist/api/http/routes/artifacts.js +35 -8
  28. package/dist/api/http/routes/coverage.d.ts +9 -0
  29. package/dist/api/http/routes/coverage.js +34 -0
  30. package/dist/api/http/routes/environments.d.ts +11 -0
  31. package/dist/api/http/routes/environments.js +283 -0
  32. package/dist/api/http/routes/mcp.d.ts +1 -1
  33. package/dist/api/http/routes/mcp.js +2 -2
  34. package/dist/api/http/routes/me.js +1 -1
  35. package/dist/api/http/routes/reads.d.ts +45 -9
  36. package/dist/api/http/routes/reads.js +54 -5
  37. package/dist/api/http/routes/sessions.js +11 -6
  38. package/dist/api/http/routes/tenant.js +32 -10
  39. package/dist/api/openapi.js +31 -26
  40. package/dist/artifacts/disk.d.ts +59 -0
  41. package/dist/artifacts/disk.js +563 -0
  42. package/dist/artifacts/export.d.ts +1 -1
  43. package/dist/artifacts/export.js +2 -3
  44. package/dist/artifacts/folders.d.ts +6 -3
  45. package/dist/artifacts/folders.js +17 -12
  46. package/dist/artifacts/service.d.ts +2 -1
  47. package/dist/artifacts/service.js +6 -1
  48. package/dist/artifacts/workspace.d.ts +1 -1
  49. package/dist/artifacts/workspace.js +1 -1
  50. package/dist/core/flow-host.d.ts +2 -3
  51. package/dist/core/flow-host.js +3 -0
  52. package/dist/core/provider.d.ts +3 -2
  53. package/dist/core/provider.js +5 -37
  54. package/dist/core/sandbox-routes.d.ts +2 -21
  55. package/dist/core/sandbox-routes.js +10 -43
  56. package/dist/execution/types.d.ts +1 -1
  57. package/dist/gates/contract.d.ts +3 -24
  58. package/dist/gates/contract.js +1 -36
  59. package/dist/gates/egress-credentials.d.ts +9 -0
  60. package/dist/gates/egress-credentials.js +11 -4
  61. package/dist/gates/egress.d.ts +28 -1
  62. package/dist/gates/egress.js +115 -10
  63. package/dist/gates/fixture-model.d.ts +28 -0
  64. package/dist/gates/fixture-model.js +92 -0
  65. package/dist/gates/handler.js +4 -4
  66. package/dist/gates/http-tool.d.ts +6 -2
  67. package/dist/gates/http-tool.js +3 -5
  68. package/dist/gates/in-process.d.ts +5 -0
  69. package/dist/gates/in-process.js +12 -1
  70. package/dist/gates/journal.d.ts +30 -0
  71. package/dist/gates/journal.js +52 -0
  72. package/dist/gates/mcp-handler.d.ts +4 -0
  73. package/dist/gates/mcp-handler.js +5 -1
  74. package/dist/gates/meter.d.ts +10 -2
  75. package/dist/gates/meter.js +20 -5
  76. package/dist/gates/policy.d.ts +49 -0
  77. package/dist/gates/policy.js +134 -0
  78. package/dist/gates/tenant-vaults.d.ts +7 -7
  79. package/dist/gates/tenant-vaults.js +5 -5
  80. package/dist/gates/tool-calls.d.ts +10 -5
  81. package/dist/gates/tool-calls.js +28 -10
  82. package/dist/gates/tool-client.d.ts +8 -0
  83. package/dist/gates/tool-client.js +27 -11
  84. package/dist/gates/tool-contract.d.ts +10 -68
  85. package/dist/gates/tool-contract.js +1 -85
  86. package/dist/gates/tool-gate.d.ts +1 -1
  87. package/dist/harness/calls.d.ts +12 -5
  88. package/dist/harness/calls.js +21 -12
  89. package/dist/harness/executors.js +12 -9
  90. package/dist/harness/main.js +18 -5
  91. package/dist/harness/pod.d.ts +34 -0
  92. package/dist/harness/pod.js +41 -0
  93. package/dist/harness/service.d.ts +0 -1
  94. package/dist/harness/service.js +13 -5
  95. package/dist/harness/setup.d.ts +27 -0
  96. package/dist/harness/setup.js +150 -0
  97. package/dist/harness/ws-client.js +3 -2
  98. package/dist/harness/ws-port.d.ts +1 -5
  99. package/dist/harness/ws-port.js +1 -5
  100. package/dist/harness-api/in-process.js +3 -3
  101. package/dist/harness-api/record.d.ts +15 -1
  102. package/dist/harness-api/record.js +174 -44
  103. package/dist/harness-api/redact.d.ts +3 -0
  104. package/dist/harness-api/redact.js +45 -0
  105. package/dist/harness-api/server.d.ts +8 -0
  106. package/dist/harness-api/server.js +93 -13
  107. package/dist/harness-api/start.d.ts +10 -3
  108. package/dist/harness-api/start.js +40 -10
  109. package/dist/harness-api/tool-journal.d.ts +96 -0
  110. package/dist/harness-api/tool-journal.js +102 -0
  111. package/dist/harness-api/tool-status.d.ts +13 -0
  112. package/dist/harness-api/tool-status.js +26 -0
  113. package/dist/harness-api/workspace.d.ts +6 -3
  114. package/dist/harness-api/workspace.js +27 -11
  115. package/dist/harness-api/ws-server.d.ts +11 -3
  116. package/dist/harness-api/ws-server.js +94 -15
  117. package/dist/host/gates.d.ts +2 -1
  118. package/dist/host/gates.js +10 -2
  119. package/dist/host/main.js +54 -5
  120. package/dist/host/operate.js +67 -5
  121. package/dist/host/stack-config.d.ts +64 -0
  122. package/dist/host/stack-config.js +61 -1
  123. package/dist/keys/client.js +4 -1
  124. package/dist/keys/keys.d.ts +5 -5
  125. package/dist/keys/keys.js +5 -7
  126. package/dist/management-openapi.json +999 -2211
  127. package/dist/mcp/connect.d.ts +25 -20
  128. package/dist/mcp/connect.js +29 -30
  129. package/dist/mcp/pool.d.ts +2 -2
  130. package/dist/mcp/pool.js +1 -1
  131. package/dist/mcp/preview.d.ts +3 -3
  132. package/dist/mcp/preview.js +10 -20
  133. package/dist/mcp/snapshot.d.ts +5 -11
  134. package/dist/mcp/snapshot.js +6 -7
  135. package/dist/model/pi-model.js +8 -0
  136. package/dist/openapi.json +6955 -2526
  137. package/dist/reads/types.d.ts +16 -3
  138. package/dist/record/append.d.ts +3 -1
  139. package/dist/record/append.js +1 -0
  140. package/dist/record/envelope.d.ts +5 -1
  141. package/dist/record/envelope.js +7 -3
  142. package/dist/record/environment.d.ts +25 -0
  143. package/dist/record/environment.js +44 -0
  144. package/dist/record/index.d.ts +1 -1
  145. package/dist/record/index.js +1 -1
  146. package/dist/sandbox/disk-fs.d.ts +95 -0
  147. package/dist/sandbox/disk-fs.js +206 -0
  148. package/dist/sandbox/join.d.ts +17 -18
  149. package/dist/sandbox/join.js +42 -15
  150. package/dist/sandbox/manager.d.ts +16 -8
  151. package/dist/sandbox/manager.js +33 -17
  152. package/dist/sandbox/placement.d.ts +13 -12
  153. package/dist/sandbox/placement.js +29 -12
  154. package/dist/sandbox/pods/client.d.ts +6 -1
  155. package/dist/sandbox/pods/lifecycle.d.ts +28 -27
  156. package/dist/sandbox/pods/lifecycle.js +14 -26
  157. package/dist/sandbox/pods/reconcile.js +18 -12
  158. package/dist/sandbox/pods/spec.d.ts +15 -13
  159. package/dist/sandbox/pods/spec.js +16 -20
  160. package/dist/sandbox/records.d.ts +2 -2
  161. package/dist/sandbox/records.js +3 -3
  162. package/dist/sandbox/resolve.d.ts +35 -27
  163. package/dist/sandbox/resolve.js +66 -41
  164. package/dist/sandbox/session-sandbox.js +1 -1
  165. package/dist/sandbox/setup.d.ts +61 -0
  166. package/dist/sandbox/setup.js +123 -0
  167. package/dist/sandbox/share.d.ts +11 -21
  168. package/dist/sandbox/share.js +12 -41
  169. package/dist/sandbox/tenant-config.d.ts +12 -14
  170. package/dist/sandbox/tenant-config.js +12 -17
  171. package/dist/sandbox/types.d.ts +6 -0
  172. package/dist/store/postgres/drizzle/0020_environments.sql +63 -0
  173. package/dist/store/postgres/drizzle/0021_disk_versions.sql +7 -0
  174. package/dist/store/postgres/drizzle/0022_model_usage_timing.sql +5 -0
  175. package/dist/store/postgres/drizzle/0023_artifact_pages.sql +1 -0
  176. package/dist/store/postgres/drizzle/meta/_journal.json +28 -0
  177. package/dist/store/postgres/reads.js +117 -17
  178. package/dist/store/postgres/record-writer.d.ts +4 -4
  179. package/dist/store/postgres/record-writer.js +9 -9
  180. package/dist/store/postgres/record.d.ts +7 -0
  181. package/dist/store/postgres/record.js +23 -2
  182. package/dist/store/postgres/schema.d.ts +934 -761
  183. package/dist/store/postgres/schema.js +102 -73
  184. package/dist/store/postgres/store.js +119 -66
  185. package/dist/store/types.d.ts +109 -48
  186. package/dist/tenant/advance.d.ts +7 -6
  187. package/dist/tenant/advance.js +115 -42
  188. package/dist/tenant/artifact-tool.js +3 -4
  189. package/dist/tenant/commands.d.ts +15 -2
  190. package/dist/tenant/commands.js +93 -12
  191. package/dist/tenant/context.d.ts +48 -22
  192. package/dist/tenant/context.js +4 -15
  193. package/dist/tenant/effects.d.ts +1 -1
  194. package/dist/tenant/effects.js +37 -20
  195. package/dist/tenant/environments.d.ts +167 -0
  196. package/dist/tenant/environments.js +823 -0
  197. package/dist/tenant/harness-tokens.d.ts +21 -0
  198. package/dist/tenant/harness-tokens.js +61 -0
  199. package/dist/tenant/host-token.d.ts +1 -1
  200. package/dist/tenant/host-token.js +2 -4
  201. package/dist/tenant/identity-file.d.ts +4 -4
  202. package/dist/tenant/identity-file.js +17 -8
  203. package/dist/tenant/issuers.js +3 -3
  204. package/dist/tenant/principals.js +1 -1
  205. package/dist/tenant/reset.js +3 -3
  206. package/dist/tenant/runtime.d.ts +6 -1
  207. package/dist/tenant/runtime.js +7 -1
  208. package/dist/tenant/session.d.ts +3 -3
  209. package/dist/tenant/session.js +0 -14
  210. package/dist/tenant/sessions.d.ts +13 -13
  211. package/dist/tenant/sessions.js +61 -138
  212. package/dist/tenant/signing-keys.d.ts +5 -1
  213. package/dist/tenant/status.js +3 -3
  214. package/dist/tenant/sweep.js +12 -6
  215. package/dist/tenant/transcript.d.ts +210 -20
  216. package/dist/tenant/transcript.js +62 -11
  217. package/dist/tenant/turn-timing.d.ts +43 -0
  218. package/dist/tenant/turn-timing.js +39 -0
  219. package/dist/tenant/types.d.ts +2 -0
  220. package/dist/traces/ids.d.ts +42 -0
  221. package/dist/traces/ids.js +85 -0
  222. package/dist/traces/key.d.ts +6 -0
  223. package/dist/traces/key.js +37 -0
  224. package/dist/traces/map.d.ts +113 -0
  225. package/dist/traces/map.js +317 -0
  226. package/dist/traces/options.d.ts +7 -0
  227. package/dist/traces/options.js +1 -0
  228. package/dist/traces/otlp.d.ts +42 -0
  229. package/dist/traces/otlp.js +84 -0
  230. package/dist/traces/projector.d.ts +58 -0
  231. package/dist/traces/projector.js +200 -0
  232. package/dist/traces/read.d.ts +23 -0
  233. package/dist/traces/read.js +16 -0
  234. package/dist/vault/coverage.d.ts +26 -0
  235. package/dist/vault/coverage.js +64 -0
  236. package/dist/vault/error.d.ts +11 -1
  237. package/dist/vault/error.js +5 -1
  238. package/dist/vault/service.d.ts +47 -48
  239. package/dist/vault/service.js +321 -382
  240. package/dist/vault/sources.d.ts +5 -16
  241. package/dist/vault/sources.js +6 -8
  242. package/dist/version.d.ts +1 -1
  243. package/dist/version.js +2 -2
  244. package/package.json +13 -13
  245. package/dist/api/http/routes/sandboxes.d.ts +0 -9
  246. package/dist/api/http/routes/sandboxes.js +0 -153
  247. package/dist/api/http/routes/vaults.d.ts +0 -10
  248. package/dist/api/http/routes/vaults.js +0 -139
  249. package/dist/record/sandbox.d.ts +0 -25
  250. package/dist/record/sandbox.js +0 -43
  251. package/dist/tenant/sandboxes.d.ts +0 -123
  252. package/dist/tenant/sandboxes.js +0 -566
@@ -2,27 +2,32 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Management API",
5
- "version": "0.23.0-beta",
5
+ "version": "0.24.0-beta",
6
6
  "x-nylorun-protocol": {
7
- "min": 4,
8
- "max": 10,
7
+ "min": 11,
8
+ "max": 11,
9
9
  "features": [
10
- "runtime-tenants",
11
- "admin-status",
12
10
  "studio-principal",
13
11
  "artifacts",
14
12
  "management-api",
15
13
  "resource-server",
14
+ "environments",
16
15
  "tenant-fixture-model",
17
16
  "transcript-events",
18
17
  "subject-headers",
19
18
  "ag-ui-endpoint",
20
19
  "a2a-endpoint",
21
- "sandboxes",
22
20
  "sandbox-pods",
23
21
  "trusted-issuers",
24
22
  "session-reads",
25
- "calls-export"
23
+ "calls-export",
24
+ "credential-coverage",
25
+ "tool-calls",
26
+ "environment-setup",
27
+ "environment-disk-versions",
28
+ "tool-policy",
29
+ "traces",
30
+ "artifact-reads"
26
31
  ]
27
32
  },
28
33
  "description": "For operators: the Tenant's models, vaults, signing keys, settings and application keys, at `/v1/tenant/*` on the Tenant's URL, through `@nylorun/admin`. Every operation takes a management key, acting as itself: never for a subject and never from a browser. Management keys are issued only on the Tenant's machine (`nylorun key put <id> --management`) or from `NYLORUN_MANAGEMENT_KEY_FILE`."
@@ -87,12 +92,14 @@
87
92
  "request_rejected",
88
93
  "invalid_request",
89
94
  "subject_required",
90
- "sandbox_not_granted",
91
- "sandbox_busy",
92
- "sandbox_unavailable",
95
+ "environment_not_granted",
96
+ "environment_busy",
97
+ "environment_unavailable",
93
98
  "placement_refused",
94
- "sandbox_lost",
95
- "sandbox_expired",
99
+ "environment_lost",
100
+ "environment_owner_mismatch",
101
+ "harness_mismatch",
102
+ "session_closed",
96
103
  "issuer_unavailable",
97
104
  "definition_files_missing",
98
105
  "credential_rejected",
@@ -164,6 +171,48 @@
164
171
  ],
165
172
  "additionalProperties": false
166
173
  },
174
+ "JsonValue": {
175
+ "anyOf": [
176
+ {
177
+ "type": "string"
178
+ },
179
+ {
180
+ "type": "number"
181
+ },
182
+ {
183
+ "type": "boolean"
184
+ },
185
+ {
186
+ "type": "null"
187
+ },
188
+ {
189
+ "type": "array",
190
+ "items": {
191
+ "oneOf": [
192
+ {
193
+ "$ref": "#/components/schemas/JsonValue"
194
+ },
195
+ {
196
+ "type": "null"
197
+ }
198
+ ]
199
+ }
200
+ },
201
+ {
202
+ "type": "object",
203
+ "additionalProperties": {
204
+ "oneOf": [
205
+ {
206
+ "$ref": "#/components/schemas/JsonValue"
207
+ },
208
+ {
209
+ "type": "null"
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ ]
215
+ },
167
216
  "TenantArtifactsView": {
168
217
  "type": "object",
169
218
  "properties": {
@@ -621,7 +670,7 @@
621
670
  "type": "string",
622
671
  "enum": [
623
672
  "sessions",
624
- "sandboxes",
673
+ "environments",
625
674
  "all"
626
675
  ]
627
676
  },
@@ -682,58 +731,6 @@
682
731
  "config": {
683
732
  "type": "object",
684
733
  "properties": {
685
- "default": {
686
- "anyOf": [
687
- {
688
- "type": "string",
689
- "enum": [
690
- "none"
691
- ]
692
- },
693
- {
694
- "type": "string",
695
- "enum": [
696
- "virtual"
697
- ]
698
- },
699
- {
700
- "type": "object",
701
- "properties": {
702
- "image": {
703
- "type": "string",
704
- "minLength": 1
705
- },
706
- "network": {
707
- "type": "object",
708
- "properties": {
709
- "allow": {
710
- "type": "array",
711
- "items": {
712
- "type": "string"
713
- }
714
- }
715
- },
716
- "additionalProperties": false
717
- },
718
- "resources": {
719
- "type": "object",
720
- "properties": {
721
- "cpus": {
722
- "type": "integer",
723
- "minimum": 1,
724
- "maximum": 64
725
- },
726
- "memory": {
727
- "type": "string"
728
- }
729
- },
730
- "additionalProperties": false
731
- }
732
- },
733
- "additionalProperties": false
734
- }
735
- ]
736
- },
737
734
  "limits": {
738
735
  "type": "object",
739
736
  "properties": {
@@ -774,13 +771,10 @@
774
771
  "idle": {
775
772
  "type": "string"
776
773
  },
777
- "sandboxes": {
774
+ "environments": {
778
775
  "type": "integer",
779
776
  "minimum": 0,
780
777
  "maximum": 100000
781
- },
782
- "ttl": {
783
- "type": "string"
784
778
  }
785
779
  },
786
780
  "additionalProperties": false
@@ -788,13 +782,6 @@
788
782
  "lifecycle": {
789
783
  "type": "object",
790
784
  "properties": {
791
- "onExpiry": {
792
- "type": "string",
793
- "enum": [
794
- "retain",
795
- "delete"
796
- ]
797
- },
798
785
  "stopGrace": {
799
786
  "type": "string"
800
787
  }
@@ -814,8 +801,7 @@
814
801
  "harness-container",
815
802
  "sandbox"
816
803
  ]
817
- },
818
- "minItems": 1
804
+ }
819
805
  }
820
806
  },
821
807
  "required": [
@@ -1081,58 +1067,6 @@
1081
1067
  "config": {
1082
1068
  "type": "object",
1083
1069
  "properties": {
1084
- "default": {
1085
- "anyOf": [
1086
- {
1087
- "type": "string",
1088
- "enum": [
1089
- "none"
1090
- ]
1091
- },
1092
- {
1093
- "type": "string",
1094
- "enum": [
1095
- "virtual"
1096
- ]
1097
- },
1098
- {
1099
- "type": "object",
1100
- "properties": {
1101
- "image": {
1102
- "type": "string",
1103
- "minLength": 1
1104
- },
1105
- "network": {
1106
- "type": "object",
1107
- "properties": {
1108
- "allow": {
1109
- "type": "array",
1110
- "items": {
1111
- "type": "string"
1112
- }
1113
- }
1114
- },
1115
- "additionalProperties": false
1116
- },
1117
- "resources": {
1118
- "type": "object",
1119
- "properties": {
1120
- "cpus": {
1121
- "type": "integer",
1122
- "minimum": 1,
1123
- "maximum": 64
1124
- },
1125
- "memory": {
1126
- "type": "string"
1127
- }
1128
- },
1129
- "additionalProperties": false
1130
- }
1131
- },
1132
- "additionalProperties": false
1133
- }
1134
- ]
1135
- },
1136
1070
  "limits": {
1137
1071
  "type": "object",
1138
1072
  "properties": {
@@ -1177,12 +1111,9 @@
1177
1111
  "idle": {
1178
1112
  "type": "string"
1179
1113
  },
1180
- "sandboxes": {
1114
+ "environments": {
1181
1115
  "type": "integer",
1182
1116
  "minimum": 0
1183
- },
1184
- "ttl": {
1185
- "type": "string"
1186
1117
  }
1187
1118
  },
1188
1119
  "required": [
@@ -1196,19 +1127,11 @@
1196
1127
  "lifecycle": {
1197
1128
  "type": "object",
1198
1129
  "properties": {
1199
- "onExpiry": {
1200
- "type": "string",
1201
- "enum": [
1202
- "retain",
1203
- "delete"
1204
- ]
1205
- },
1206
1130
  "stopGrace": {
1207
1131
  "type": "string"
1208
1132
  }
1209
1133
  },
1210
1134
  "required": [
1211
- "onExpiry",
1212
1135
  "stopGrace"
1213
1136
  ],
1214
1137
  "additionalProperties": false
@@ -1237,7 +1160,6 @@
1237
1160
  }
1238
1161
  },
1239
1162
  "required": [
1240
- "default",
1241
1163
  "limits"
1242
1164
  ],
1243
1165
  "additionalProperties": false
@@ -1293,61 +1215,9 @@
1293
1215
  ],
1294
1216
  "additionalProperties": false
1295
1217
  },
1296
- "PutTenantSandboxRequest": {
1218
+ "PutTenantEnvironmentsRequest": {
1297
1219
  "type": "object",
1298
1220
  "properties": {
1299
- "default": {
1300
- "anyOf": [
1301
- {
1302
- "type": "string",
1303
- "enum": [
1304
- "none"
1305
- ]
1306
- },
1307
- {
1308
- "type": "string",
1309
- "enum": [
1310
- "virtual"
1311
- ]
1312
- },
1313
- {
1314
- "type": "object",
1315
- "properties": {
1316
- "image": {
1317
- "type": "string",
1318
- "minLength": 1
1319
- },
1320
- "network": {
1321
- "type": "object",
1322
- "properties": {
1323
- "allow": {
1324
- "type": "array",
1325
- "items": {
1326
- "type": "string"
1327
- }
1328
- }
1329
- },
1330
- "additionalProperties": false
1331
- },
1332
- "resources": {
1333
- "type": "object",
1334
- "properties": {
1335
- "cpus": {
1336
- "type": "integer",
1337
- "minimum": 1,
1338
- "maximum": 64
1339
- },
1340
- "memory": {
1341
- "type": "string"
1342
- }
1343
- },
1344
- "additionalProperties": false
1345
- }
1346
- },
1347
- "additionalProperties": false
1348
- }
1349
- ]
1350
- },
1351
1221
  "limits": {
1352
1222
  "type": "object",
1353
1223
  "properties": {
@@ -1388,13 +1258,10 @@
1388
1258
  "idle": {
1389
1259
  "type": "string"
1390
1260
  },
1391
- "sandboxes": {
1261
+ "environments": {
1392
1262
  "type": "integer",
1393
1263
  "minimum": 0,
1394
1264
  "maximum": 100000
1395
- },
1396
- "ttl": {
1397
- "type": "string"
1398
1265
  }
1399
1266
  },
1400
1267
  "additionalProperties": false
@@ -1402,13 +1269,6 @@
1402
1269
  "lifecycle": {
1403
1270
  "type": "object",
1404
1271
  "properties": {
1405
- "onExpiry": {
1406
- "type": "string",
1407
- "enum": [
1408
- "retain",
1409
- "delete"
1410
- ]
1411
- },
1412
1272
  "stopGrace": {
1413
1273
  "type": "string"
1414
1274
  }
@@ -1428,8 +1288,7 @@
1428
1288
  "harness-container",
1429
1289
  "sandbox"
1430
1290
  ]
1431
- },
1432
- "minItems": 1
1291
+ }
1433
1292
  }
1434
1293
  },
1435
1294
  "required": [
@@ -1593,97 +1452,293 @@
1593
1452
  ],
1594
1453
  "additionalProperties": false
1595
1454
  },
1596
- "ListProvidersResponse": {
1455
+ "ToolPolicy": {
1597
1456
  "type": "object",
1598
1457
  "properties": {
1599
- "providers": {
1458
+ "rules": {
1600
1459
  "type": "array",
1601
1460
  "items": {
1602
1461
  "type": "object",
1603
1462
  "properties": {
1604
- "id": {
1605
- "type": "string"
1463
+ "effect": {
1464
+ "type": "string",
1465
+ "enum": [
1466
+ "allow",
1467
+ "ask",
1468
+ "deny"
1469
+ ]
1606
1470
  },
1607
- "name": {
1608
- "type": "string"
1471
+ "tool": {
1472
+ "type": "string",
1473
+ "minLength": 1,
1474
+ "maxLength": 200
1609
1475
  },
1610
- "model": {
1611
- "type": "string"
1476
+ "server": {
1477
+ "type": "string",
1478
+ "minLength": 1,
1479
+ "maxLength": 200
1612
1480
  },
1613
- "authType": {
1481
+ "kind": {
1614
1482
  "type": "string",
1615
1483
  "enum": [
1616
- "api_key",
1617
- "oauth"
1484
+ "mcp",
1485
+ "http"
1618
1486
  ]
1619
1487
  },
1620
- "baseUrl": {
1621
- "type": "string"
1488
+ "agent": {
1489
+ "type": "string",
1490
+ "minLength": 1,
1491
+ "maxLength": 200
1622
1492
  },
1623
- "settings": {
1493
+ "when": {
1624
1494
  "type": "object",
1625
- "properties": {
1626
- "contextWindow": {
1627
- "type": "integer",
1628
- "minimum": 1024
1629
- },
1630
- "maxTokens": {
1631
- "type": "integer",
1632
- "minimum": 1
1633
- },
1634
- "reasoning": {
1635
- "type": "boolean"
1495
+ "additionalProperties": {
1496
+ "type": "object",
1497
+ "properties": {
1498
+ "equals": {
1499
+ "$ref": "#/components/schemas/JsonValue"
1500
+ },
1501
+ "in": {
1502
+ "type": "array",
1503
+ "items": {
1504
+ "$ref": "#/components/schemas/JsonValue"
1505
+ },
1506
+ "minItems": 1
1507
+ },
1508
+ "gt": {
1509
+ "type": "number"
1510
+ },
1511
+ "gte": {
1512
+ "type": "number"
1513
+ },
1514
+ "lt": {
1515
+ "type": "number"
1516
+ },
1517
+ "lte": {
1518
+ "type": "number"
1519
+ },
1520
+ "matches": {
1521
+ "type": "string",
1522
+ "minLength": 1,
1523
+ "maxLength": 500
1524
+ }
1636
1525
  },
1637
- "compat": {
1638
- "type": "object",
1639
- "additionalProperties": {}
1640
- }
1641
- },
1642
- "additionalProperties": false
1643
- },
1644
- "lastUpdated": {
1645
- "type": "string"
1526
+ "additionalProperties": false
1527
+ }
1646
1528
  },
1647
- "active": {
1648
- "type": "boolean"
1529
+ "reason": {
1530
+ "type": "string",
1531
+ "minLength": 1,
1532
+ "maxLength": 500
1649
1533
  }
1650
1534
  },
1651
1535
  "required": [
1652
- "id",
1653
- "name",
1654
- "model",
1655
- "authType",
1656
- "lastUpdated",
1657
- "active"
1536
+ "effect"
1658
1537
  ],
1659
1538
  "additionalProperties": false
1660
1539
  }
1540
+ },
1541
+ "updatedAt": {
1542
+ "type": [
1543
+ "string",
1544
+ "null"
1545
+ ]
1661
1546
  }
1662
1547
  },
1663
1548
  "required": [
1664
- "providers"
1549
+ "rules",
1550
+ "updatedAt"
1665
1551
  ],
1666
1552
  "additionalProperties": false
1667
1553
  },
1668
- "HostModelView": {
1669
- "anyOf": [
1670
- {
1671
- "type": "object",
1672
- "properties": {
1673
- "configured": {
1674
- "type": "boolean",
1675
- "enum": [
1676
- false
1677
- ]
1678
- }
1679
- },
1680
- "required": [
1681
- "configured"
1682
- ],
1683
- "additionalProperties": false
1554
+ "PutToolPolicyRequest": {
1555
+ "type": "object",
1556
+ "properties": {
1557
+ "requestId": {
1558
+ "type": "string",
1559
+ "minLength": 1
1684
1560
  },
1685
- {
1686
- "type": "object",
1561
+ "rules": {
1562
+ "type": "array",
1563
+ "items": {
1564
+ "type": "object",
1565
+ "properties": {
1566
+ "effect": {
1567
+ "type": "string",
1568
+ "enum": [
1569
+ "allow",
1570
+ "ask",
1571
+ "deny"
1572
+ ]
1573
+ },
1574
+ "tool": {
1575
+ "type": "string",
1576
+ "minLength": 1,
1577
+ "maxLength": 200
1578
+ },
1579
+ "server": {
1580
+ "type": "string",
1581
+ "minLength": 1,
1582
+ "maxLength": 200
1583
+ },
1584
+ "kind": {
1585
+ "type": "string",
1586
+ "enum": [
1587
+ "mcp",
1588
+ "http"
1589
+ ]
1590
+ },
1591
+ "agent": {
1592
+ "type": "string",
1593
+ "minLength": 1,
1594
+ "maxLength": 200
1595
+ },
1596
+ "when": {
1597
+ "type": "object",
1598
+ "additionalProperties": {
1599
+ "type": "object",
1600
+ "properties": {
1601
+ "equals": {
1602
+ "$ref": "#/components/schemas/JsonValue"
1603
+ },
1604
+ "in": {
1605
+ "type": "array",
1606
+ "items": {
1607
+ "$ref": "#/components/schemas/JsonValue"
1608
+ },
1609
+ "minItems": 1
1610
+ },
1611
+ "gt": {
1612
+ "type": "number"
1613
+ },
1614
+ "gte": {
1615
+ "type": "number"
1616
+ },
1617
+ "lt": {
1618
+ "type": "number"
1619
+ },
1620
+ "lte": {
1621
+ "type": "number"
1622
+ },
1623
+ "matches": {
1624
+ "type": "string",
1625
+ "minLength": 1,
1626
+ "maxLength": 500
1627
+ }
1628
+ },
1629
+ "additionalProperties": false
1630
+ }
1631
+ },
1632
+ "reason": {
1633
+ "type": "string",
1634
+ "minLength": 1,
1635
+ "maxLength": 500
1636
+ }
1637
+ },
1638
+ "required": [
1639
+ "effect"
1640
+ ],
1641
+ "additionalProperties": false
1642
+ },
1643
+ "maxItems": 200
1644
+ }
1645
+ },
1646
+ "required": [
1647
+ "rules"
1648
+ ],
1649
+ "additionalProperties": false
1650
+ },
1651
+ "ListProvidersResponse": {
1652
+ "type": "object",
1653
+ "properties": {
1654
+ "providers": {
1655
+ "type": "array",
1656
+ "items": {
1657
+ "type": "object",
1658
+ "properties": {
1659
+ "id": {
1660
+ "type": "string"
1661
+ },
1662
+ "name": {
1663
+ "type": "string"
1664
+ },
1665
+ "model": {
1666
+ "type": "string"
1667
+ },
1668
+ "authType": {
1669
+ "type": "string",
1670
+ "enum": [
1671
+ "api_key",
1672
+ "oauth"
1673
+ ]
1674
+ },
1675
+ "baseUrl": {
1676
+ "type": "string"
1677
+ },
1678
+ "settings": {
1679
+ "type": "object",
1680
+ "properties": {
1681
+ "contextWindow": {
1682
+ "type": "integer",
1683
+ "minimum": 1024
1684
+ },
1685
+ "maxTokens": {
1686
+ "type": "integer",
1687
+ "minimum": 1
1688
+ },
1689
+ "reasoning": {
1690
+ "type": "boolean"
1691
+ },
1692
+ "compat": {
1693
+ "type": "object",
1694
+ "additionalProperties": {}
1695
+ }
1696
+ },
1697
+ "additionalProperties": false
1698
+ },
1699
+ "lastUpdated": {
1700
+ "type": "string"
1701
+ },
1702
+ "active": {
1703
+ "type": "boolean"
1704
+ }
1705
+ },
1706
+ "required": [
1707
+ "id",
1708
+ "name",
1709
+ "model",
1710
+ "authType",
1711
+ "lastUpdated",
1712
+ "active"
1713
+ ],
1714
+ "additionalProperties": false
1715
+ }
1716
+ }
1717
+ },
1718
+ "required": [
1719
+ "providers"
1720
+ ],
1721
+ "additionalProperties": false
1722
+ },
1723
+ "HostModelView": {
1724
+ "anyOf": [
1725
+ {
1726
+ "type": "object",
1727
+ "properties": {
1728
+ "configured": {
1729
+ "type": "boolean",
1730
+ "enum": [
1731
+ false
1732
+ ]
1733
+ }
1734
+ },
1735
+ "required": [
1736
+ "configured"
1737
+ ],
1738
+ "additionalProperties": false
1739
+ },
1740
+ {
1741
+ "type": "object",
1687
1742
  "properties": {
1688
1743
  "configured": {
1689
1744
  "type": "boolean",
@@ -1973,430 +2028,258 @@
1973
2028
  ],
1974
2029
  "additionalProperties": false
1975
2030
  },
1976
- "VaultInfo": {
2031
+ "CredentialCoverage": {
1977
2032
  "type": "object",
1978
2033
  "properties": {
1979
- "id": {
1980
- "type": "string"
1981
- },
1982
- "name": {
1983
- "type": "string"
1984
- },
1985
- "ownerUserId": {
1986
- "type": "string"
1987
- },
1988
- "metadata": {
1989
- "type": "object",
1990
- "additionalProperties": {
1991
- "type": "string"
1992
- }
1993
- },
1994
- "createdAt": {
2034
+ "agentId": {
1995
2035
  "type": "string"
1996
- }
1997
- },
1998
- "required": [
1999
- "id",
2000
- "name",
2001
- "ownerUserId",
2002
- "createdAt"
2003
- ],
2004
- "additionalProperties": false
2005
- },
2006
- "CreateVaultRequest": {
2007
- "type": "object",
2008
- "properties": {
2009
- "requestId": {
2010
- "type": "string",
2011
- "minLength": 1
2012
- },
2013
- "idempotencyKey": {
2014
- "type": "string",
2015
- "minLength": 1,
2016
- "maxLength": 256
2017
- },
2018
- "name": {
2019
- "type": "string",
2020
- "minLength": 1
2021
2036
  },
2022
- "scope": {
2023
- "type": "string",
2024
- "enum": [
2025
- "user",
2026
- "installation"
2037
+ "environmentId": {
2038
+ "type": [
2039
+ "string",
2040
+ "null"
2027
2041
  ]
2028
2042
  },
2029
- "ownerUserId": {
2030
- "type": "string",
2031
- "minLength": 1
2043
+ "complete": {
2044
+ "type": "boolean"
2032
2045
  },
2033
- "metadata": {
2034
- "type": "object",
2035
- "additionalProperties": {
2036
- "type": "string"
2037
- }
2038
- }
2039
- },
2040
- "required": [
2041
- "requestId",
2042
- "idempotencyKey",
2043
- "name"
2044
- ],
2045
- "additionalProperties": false
2046
- },
2047
- "ListVaultsResponse": {
2048
- "type": "object",
2049
- "properties": {
2050
- "vaults": {
2046
+ "entries": {
2051
2047
  "type": "array",
2052
2048
  "items": {
2053
2049
  "type": "object",
2054
2050
  "properties": {
2055
- "id": {
2051
+ "kind": {
2052
+ "type": "string",
2053
+ "enum": [
2054
+ "mcp",
2055
+ "http"
2056
+ ]
2057
+ },
2058
+ "agentId": {
2059
+ "type": "string"
2060
+ },
2061
+ "stage": {
2056
2062
  "type": "string"
2057
2063
  },
2058
2064
  "name": {
2059
2065
  "type": "string"
2060
2066
  },
2061
- "ownerUserId": {
2067
+ "serverName": {
2068
+ "type": "string"
2069
+ },
2070
+ "url": {
2062
2071
  "type": "string"
2063
2072
  },
2064
- "metadata": {
2073
+ "required": {
2074
+ "type": "boolean"
2075
+ },
2076
+ "status": {
2077
+ "type": "string",
2078
+ "enum": [
2079
+ "covered",
2080
+ "missing"
2081
+ ]
2082
+ },
2083
+ "credential": {
2065
2084
  "type": "object",
2066
- "additionalProperties": {
2067
- "type": "string"
2068
- }
2085
+ "properties": {
2086
+ "environmentId": {
2087
+ "type": "string"
2088
+ },
2089
+ "name": {
2090
+ "type": "string"
2091
+ },
2092
+ "via": {
2093
+ "type": "string"
2094
+ }
2095
+ },
2096
+ "required": [
2097
+ "environmentId",
2098
+ "name"
2099
+ ],
2100
+ "additionalProperties": false
2069
2101
  },
2070
- "createdAt": {
2102
+ "message": {
2071
2103
  "type": "string"
2072
2104
  }
2073
2105
  },
2074
2106
  "required": [
2075
- "id",
2107
+ "kind",
2076
2108
  "name",
2077
- "ownerUserId",
2078
- "createdAt"
2109
+ "serverName",
2110
+ "url",
2111
+ "required",
2112
+ "status",
2113
+ "message"
2079
2114
  ],
2080
2115
  "additionalProperties": false
2081
2116
  }
2082
2117
  }
2083
2118
  },
2084
2119
  "required": [
2085
- "vaults"
2120
+ "agentId",
2121
+ "environmentId",
2122
+ "complete",
2123
+ "entries"
2086
2124
  ],
2087
2125
  "additionalProperties": false
2088
2126
  },
2089
- "DeletedResponse": {
2127
+ "CredentialCoverageRequest": {
2090
2128
  "type": "object",
2091
2129
  "properties": {
2092
- "id": {
2093
- "type": "string"
2130
+ "requestId": {
2131
+ "type": "string",
2132
+ "minLength": 1
2133
+ },
2134
+ "agentId": {
2135
+ "type": "string",
2136
+ "minLength": 1
2137
+ },
2138
+ "environmentId": {
2139
+ "type": "string",
2140
+ "description": "An Environment id, such as `user-42` or `users/alice/web`"
2094
2141
  }
2095
2142
  },
2096
2143
  "required": [
2097
- "id"
2144
+ "agentId"
2098
2145
  ],
2099
2146
  "additionalProperties": false
2100
2147
  },
2101
- "CredentialInfo": {
2148
+ "McpPreview": {
2102
2149
  "type": "object",
2103
2150
  "properties": {
2104
- "id": {
2151
+ "name": {
2105
2152
  "type": "string"
2106
2153
  },
2107
- "vaultId": {
2108
- "type": "string"
2109
- },
2110
- "name": {
2154
+ "url": {
2111
2155
  "type": "string"
2112
2156
  },
2113
2157
  "type": {
2114
2158
  "type": "string",
2115
2159
  "enum": [
2116
- "bearer",
2117
- "headers",
2118
- "environment_secret",
2119
- "environment_variable"
2160
+ "streamable-http",
2161
+ "sse"
2120
2162
  ]
2121
2163
  },
2122
- "binding": {
2164
+ "credentialSent": {
2165
+ "type": "boolean"
2166
+ },
2167
+ "serverInfo": {
2123
2168
  "type": "object",
2124
- "properties": {
2125
- "url": {
2126
- "type": "string"
2127
- },
2128
- "secretName": {
2129
- "type": "string"
2130
- },
2131
- "allowedHosts": {
2132
- "type": "array",
2133
- "items": {
2169
+ "additionalProperties": {}
2170
+ },
2171
+ "instructions": {
2172
+ "type": "string"
2173
+ },
2174
+ "tools": {
2175
+ "type": "array",
2176
+ "items": {
2177
+ "type": "object",
2178
+ "properties": {
2179
+ "serverToolName": {
2134
2180
  "type": "string"
2135
- }
2136
- },
2137
- "inject": {
2138
- "type": "object",
2139
- "properties": {
2140
- "header": {
2141
- "type": "string",
2142
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2143
- },
2144
- "format": {
2145
- "type": "string",
2146
- "minLength": 1
2147
- }
2148
2181
  },
2149
- "required": [
2150
- "header",
2151
- "format"
2152
- ],
2153
- "additionalProperties": false
2154
- },
2155
- "variableName": {
2156
- "type": "string"
2182
+ "modelName": {
2183
+ "type": "string"
2184
+ },
2185
+ "description": {
2186
+ "type": "string"
2187
+ },
2188
+ "annotations": {
2189
+ "type": "object",
2190
+ "additionalProperties": {}
2191
+ },
2192
+ "schemaBytes": {
2193
+ "type": "integer",
2194
+ "minimum": 0
2195
+ }
2157
2196
  },
2158
- "variableValue": {
2159
- "type": "string"
2160
- }
2161
- },
2162
- "additionalProperties": false
2197
+ "required": [
2198
+ "serverToolName",
2199
+ "schemaBytes"
2200
+ ],
2201
+ "additionalProperties": false
2202
+ }
2163
2203
  },
2164
- "headerNames": {
2204
+ "renamed": {
2165
2205
  "type": "array",
2166
2206
  "items": {
2167
- "type": "string"
2207
+ "type": "object",
2208
+ "properties": {
2209
+ "serverToolName": {
2210
+ "type": "string"
2211
+ },
2212
+ "name": {
2213
+ "type": "string"
2214
+ }
2215
+ },
2216
+ "required": [
2217
+ "serverToolName",
2218
+ "name"
2219
+ ],
2220
+ "additionalProperties": false
2168
2221
  }
2169
2222
  },
2170
- "via": {
2171
- "type": "string"
2172
- },
2173
- "identity": {
2223
+ "authRequired": {
2174
2224
  "type": "object",
2175
2225
  "properties": {
2176
- "header": {
2177
- "type": "string",
2178
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2226
+ "resourceMetadataUrl": {
2227
+ "type": "string"
2228
+ },
2229
+ "resourceMetadata": {
2230
+ "type": "object",
2231
+ "additionalProperties": {}
2179
2232
  }
2180
2233
  },
2181
- "required": [
2182
- "header"
2183
- ],
2184
2234
  "additionalProperties": false
2185
- },
2186
- "createdAt": {
2187
- "type": "string"
2188
- },
2189
- "rotatedAt": {
2190
- "type": "string"
2191
2235
  }
2192
2236
  },
2193
2237
  "required": [
2194
- "id",
2195
- "vaultId",
2196
2238
  "name",
2239
+ "url",
2197
2240
  "type",
2198
- "binding",
2199
- "createdAt"
2241
+ "credentialSent",
2242
+ "tools",
2243
+ "renamed"
2200
2244
  ],
2201
2245
  "additionalProperties": false
2202
2246
  },
2203
- "CreateCredentialRequest": {
2247
+ "McpPreviewRequest": {
2204
2248
  "type": "object",
2205
2249
  "properties": {
2206
2250
  "requestId": {
2207
2251
  "type": "string",
2208
2252
  "minLength": 1
2209
2253
  },
2210
- "idempotencyKey": {
2254
+ "url": {
2211
2255
  "type": "string",
2212
- "minLength": 1,
2213
- "maxLength": 256
2256
+ "minLength": 1
2257
+ },
2258
+ "type": {
2259
+ "type": "string",
2260
+ "enum": [
2261
+ "streamable-http",
2262
+ "sse"
2263
+ ]
2214
2264
  },
2215
2265
  "name": {
2216
2266
  "type": "string",
2217
- "minLength": 1
2267
+ "pattern": "^[A-Za-z0-9_-]{1,64}$"
2218
2268
  },
2219
- "auth": {
2220
- "oneOf": [
2221
- {
2222
- "type": "object",
2223
- "properties": {
2224
- "type": {
2225
- "type": "string",
2226
- "enum": [
2227
- "bearer"
2228
- ]
2229
- },
2230
- "url": {
2231
- "type": "string",
2232
- "minLength": 1
2233
- },
2234
- "token": {
2235
- "type": "string",
2236
- "minLength": 1
2237
- },
2238
- "via": {
2239
- "type": "string"
2240
- },
2241
- "identity": {
2242
- "type": "object",
2243
- "properties": {
2244
- "header": {
2245
- "type": "string",
2246
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2247
- }
2248
- },
2249
- "required": [
2250
- "header"
2251
- ],
2252
- "additionalProperties": false
2253
- }
2254
- },
2255
- "required": [
2256
- "type",
2257
- "url",
2258
- "token"
2259
- ],
2260
- "additionalProperties": false
2261
- },
2262
- {
2263
- "type": "object",
2264
- "properties": {
2265
- "type": {
2266
- "type": "string",
2267
- "enum": [
2268
- "headers"
2269
- ]
2270
- },
2271
- "url": {
2272
- "type": "string",
2273
- "minLength": 1
2274
- },
2275
- "headers": {
2276
- "type": "object",
2277
- "additionalProperties": {
2278
- "type": "string",
2279
- "minLength": 1
2280
- }
2281
- },
2282
- "via": {
2283
- "type": "string"
2284
- },
2285
- "identity": {
2286
- "type": "object",
2287
- "properties": {
2288
- "header": {
2289
- "type": "string",
2290
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2291
- }
2292
- },
2293
- "required": [
2294
- "header"
2295
- ],
2296
- "additionalProperties": false
2297
- }
2298
- },
2299
- "required": [
2300
- "type",
2301
- "url",
2302
- "headers"
2303
- ],
2304
- "additionalProperties": false
2305
- },
2306
- {
2307
- "type": "object",
2308
- "properties": {
2309
- "type": {
2310
- "type": "string",
2311
- "enum": [
2312
- "environment_secret"
2313
- ]
2314
- },
2315
- "secretName": {
2316
- "type": "string",
2317
- "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$"
2318
- },
2319
- "secretValue": {
2320
- "type": "string",
2321
- "minLength": 1,
2322
- "maxLength": 8192
2323
- },
2324
- "allowedHosts": {
2325
- "type": "array",
2326
- "items": {
2327
- "type": "string"
2328
- },
2329
- "minItems": 1,
2330
- "maxItems": 32
2331
- },
2332
- "inject": {
2333
- "type": "object",
2334
- "properties": {
2335
- "header": {
2336
- "type": "string",
2337
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2338
- },
2339
- "format": {
2340
- "type": "string",
2341
- "minLength": 1
2342
- }
2343
- },
2344
- "required": [
2345
- "header",
2346
- "format"
2347
- ],
2348
- "additionalProperties": false
2349
- }
2350
- },
2351
- "required": [
2352
- "type",
2353
- "secretName",
2354
- "secretValue",
2355
- "allowedHosts"
2356
- ],
2357
- "additionalProperties": false
2358
- },
2359
- {
2360
- "type": "object",
2361
- "properties": {
2362
- "type": {
2363
- "type": "string",
2364
- "enum": [
2365
- "environment_variable"
2366
- ]
2367
- },
2368
- "variableName": {
2369
- "type": "string",
2370
- "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$"
2371
- },
2372
- "variableValue": {
2373
- "type": "string",
2374
- "minLength": 1,
2375
- "maxLength": 8192
2376
- }
2377
- },
2378
- "required": [
2379
- "type",
2380
- "variableName",
2381
- "variableValue"
2382
- ],
2383
- "additionalProperties": false
2384
- }
2385
- ]
2269
+ "environmentId": {
2270
+ "type": "string",
2271
+ "description": "An Environment id, such as `user-42` or `users/alice/web`"
2386
2272
  }
2387
2273
  },
2388
2274
  "required": [
2389
- "requestId",
2390
- "idempotencyKey",
2391
- "name",
2392
- "auth"
2275
+ "url"
2393
2276
  ],
2394
2277
  "additionalProperties": false
2395
2278
  },
2396
- "ListCredentialsResponse": {
2279
+ "SigningKeyList": {
2397
2280
  "type": "object",
2398
2281
  "properties": {
2399
- "credentials": {
2282
+ "keys": {
2400
2283
  "type": "array",
2401
2284
  "items": {
2402
2285
  "type": "object",
@@ -2404,546 +2287,148 @@
2404
2287
  "id": {
2405
2288
  "type": "string"
2406
2289
  },
2407
- "vaultId": {
2408
- "type": "string"
2409
- },
2410
- "name": {
2411
- "type": "string"
2412
- },
2413
- "type": {
2290
+ "state": {
2414
2291
  "type": "string",
2415
2292
  "enum": [
2416
- "bearer",
2417
- "headers",
2418
- "environment_secret",
2419
- "environment_variable"
2293
+ "standby",
2294
+ "current",
2295
+ "previous",
2296
+ "revoked"
2420
2297
  ]
2421
2298
  },
2422
- "binding": {
2299
+ "alg": {
2300
+ "type": "string",
2301
+ "enum": [
2302
+ "ES256"
2303
+ ]
2304
+ },
2305
+ "publicKey": {
2423
2306
  "type": "object",
2424
2307
  "properties": {
2425
- "url": {
2426
- "type": "string"
2427
- },
2428
- "secretName": {
2429
- "type": "string"
2308
+ "kty": {
2309
+ "type": "string",
2310
+ "enum": [
2311
+ "EC"
2312
+ ]
2430
2313
  },
2431
- "allowedHosts": {
2432
- "type": "array",
2433
- "items": {
2434
- "type": "string"
2435
- }
2314
+ "crv": {
2315
+ "type": "string",
2316
+ "enum": [
2317
+ "P-256"
2318
+ ]
2436
2319
  },
2437
- "inject": {
2438
- "type": "object",
2439
- "properties": {
2440
- "header": {
2441
- "type": "string",
2442
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2443
- },
2444
- "format": {
2445
- "type": "string",
2446
- "minLength": 1
2447
- }
2448
- },
2449
- "required": [
2450
- "header",
2451
- "format"
2452
- ],
2453
- "additionalProperties": false
2320
+ "x": {
2321
+ "type": "string"
2454
2322
  },
2455
- "variableName": {
2323
+ "y": {
2456
2324
  "type": "string"
2457
2325
  },
2458
- "variableValue": {
2326
+ "kid": {
2459
2327
  "type": "string"
2460
- }
2461
- },
2462
- "additionalProperties": false
2463
- },
2464
- "headerNames": {
2465
- "type": "array",
2466
- "items": {
2467
- "type": "string"
2468
- }
2469
- },
2470
- "via": {
2471
- "type": "string"
2472
- },
2473
- "identity": {
2474
- "type": "object",
2475
- "properties": {
2476
- "header": {
2328
+ },
2329
+ "alg": {
2330
+ "type": "string",
2331
+ "enum": [
2332
+ "ES256"
2333
+ ]
2334
+ },
2335
+ "use": {
2477
2336
  "type": "string",
2478
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2337
+ "enum": [
2338
+ "sig"
2339
+ ]
2479
2340
  }
2480
2341
  },
2481
2342
  "required": [
2482
- "header"
2343
+ "kty",
2344
+ "crv",
2345
+ "x",
2346
+ "y",
2347
+ "kid",
2348
+ "alg",
2349
+ "use"
2483
2350
  ],
2484
2351
  "additionalProperties": false
2485
2352
  },
2486
2353
  "createdAt": {
2487
2354
  "type": "string"
2488
2355
  },
2489
- "rotatedAt": {
2490
- "type": "string"
2356
+ "activatedAt": {
2357
+ "type": [
2358
+ "string",
2359
+ "null"
2360
+ ]
2361
+ },
2362
+ "retiredAt": {
2363
+ "type": [
2364
+ "string",
2365
+ "null"
2366
+ ]
2367
+ },
2368
+ "revokedAt": {
2369
+ "type": [
2370
+ "string",
2371
+ "null"
2372
+ ]
2491
2373
  }
2492
2374
  },
2493
2375
  "required": [
2494
2376
  "id",
2495
- "vaultId",
2496
- "name",
2497
- "type",
2498
- "binding",
2499
- "createdAt"
2377
+ "state",
2378
+ "alg",
2379
+ "publicKey",
2380
+ "createdAt",
2381
+ "activatedAt",
2382
+ "retiredAt",
2383
+ "revokedAt"
2500
2384
  ],
2501
2385
  "additionalProperties": false
2502
2386
  }
2503
2387
  }
2504
2388
  },
2505
2389
  "required": [
2506
- "credentials"
2390
+ "keys"
2507
2391
  ],
2508
2392
  "additionalProperties": false
2509
2393
  },
2510
- "RotateCredentialRequest": {
2394
+ "RotateSigningKeysRequest": {
2511
2395
  "type": "object",
2512
2396
  "properties": {
2513
2397
  "requestId": {
2514
2398
  "type": "string",
2515
2399
  "minLength": 1
2516
2400
  },
2517
- "idempotencyKey": {
2518
- "type": "string",
2519
- "minLength": 1,
2520
- "maxLength": 256
2521
- },
2522
- "auth": {
2523
- "oneOf": [
2524
- {
2525
- "type": "object",
2526
- "properties": {
2527
- "type": {
2528
- "type": "string",
2529
- "enum": [
2530
- "bearer"
2531
- ]
2532
- },
2533
- "token": {
2534
- "type": "string",
2535
- "minLength": 1
2536
- },
2537
- "via": {
2538
- "type": [
2539
- "string",
2540
- "null"
2541
- ]
2542
- },
2543
- "identity": {
2544
- "type": [
2545
- "object",
2546
- "null"
2547
- ],
2548
- "properties": {
2549
- "header": {
2550
- "type": "string",
2551
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2552
- }
2553
- },
2554
- "required": [
2555
- "header"
2556
- ],
2557
- "additionalProperties": false
2558
- }
2559
- },
2560
- "required": [
2561
- "type",
2562
- "token"
2563
- ],
2564
- "additionalProperties": false
2565
- },
2566
- {
2567
- "type": "object",
2568
- "properties": {
2569
- "type": {
2570
- "type": "string",
2571
- "enum": [
2572
- "headers"
2573
- ]
2574
- },
2575
- "headers": {
2576
- "type": "object",
2577
- "additionalProperties": {
2578
- "type": "string",
2579
- "minLength": 1
2580
- }
2581
- },
2582
- "via": {
2583
- "type": [
2584
- "string",
2585
- "null"
2586
- ]
2587
- },
2588
- "identity": {
2589
- "type": [
2590
- "object",
2591
- "null"
2592
- ],
2593
- "properties": {
2594
- "header": {
2595
- "type": "string",
2596
- "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2597
- }
2598
- },
2599
- "required": [
2600
- "header"
2601
- ],
2602
- "additionalProperties": false
2603
- }
2604
- },
2605
- "required": [
2606
- "type",
2607
- "headers"
2608
- ],
2609
- "additionalProperties": false
2610
- },
2611
- {
2612
- "type": "object",
2613
- "properties": {
2614
- "type": {
2615
- "type": "string",
2616
- "enum": [
2617
- "environment_secret"
2618
- ]
2619
- },
2620
- "secretValue": {
2621
- "type": "string",
2622
- "minLength": 1,
2623
- "maxLength": 8192
2624
- }
2625
- },
2626
- "required": [
2627
- "type",
2628
- "secretValue"
2629
- ],
2630
- "additionalProperties": false
2631
- },
2632
- {
2633
- "type": "object",
2634
- "properties": {
2635
- "type": {
2636
- "type": "string",
2637
- "enum": [
2638
- "environment_variable"
2639
- ]
2640
- },
2641
- "variableValue": {
2642
- "type": "string",
2643
- "minLength": 1,
2644
- "maxLength": 8192
2645
- }
2646
- },
2647
- "required": [
2648
- "type",
2649
- "variableValue"
2650
- ],
2651
- "additionalProperties": false
2652
- }
2653
- ]
2401
+ "force": {
2402
+ "type": "boolean"
2654
2403
  }
2655
2404
  },
2656
2405
  "required": [
2657
- "requestId",
2658
- "idempotencyKey",
2659
- "auth"
2406
+ "requestId"
2660
2407
  ],
2661
2408
  "additionalProperties": false
2662
2409
  },
2663
- "McpPreview": {
2410
+ "SigningKeyView": {
2664
2411
  "type": "object",
2665
2412
  "properties": {
2666
- "name": {
2667
- "type": "string"
2668
- },
2669
- "url": {
2413
+ "id": {
2670
2414
  "type": "string"
2671
2415
  },
2672
- "type": {
2416
+ "state": {
2673
2417
  "type": "string",
2674
2418
  "enum": [
2675
- "streamable-http",
2676
- "sse"
2419
+ "standby",
2420
+ "current",
2421
+ "previous",
2422
+ "revoked"
2677
2423
  ]
2678
2424
  },
2679
- "credentialSent": {
2680
- "type": "boolean"
2425
+ "alg": {
2426
+ "type": "string",
2427
+ "enum": [
2428
+ "ES256"
2429
+ ]
2681
2430
  },
2682
- "serverInfo": {
2683
- "type": "object",
2684
- "additionalProperties": {}
2685
- },
2686
- "instructions": {
2687
- "type": "string"
2688
- },
2689
- "tools": {
2690
- "type": "array",
2691
- "items": {
2692
- "type": "object",
2693
- "properties": {
2694
- "serverToolName": {
2695
- "type": "string"
2696
- },
2697
- "modelName": {
2698
- "type": "string"
2699
- },
2700
- "description": {
2701
- "type": "string"
2702
- },
2703
- "annotations": {
2704
- "type": "object",
2705
- "additionalProperties": {}
2706
- },
2707
- "schemaBytes": {
2708
- "type": "integer",
2709
- "minimum": 0
2710
- }
2711
- },
2712
- "required": [
2713
- "serverToolName",
2714
- "schemaBytes"
2715
- ],
2716
- "additionalProperties": false
2717
- }
2718
- },
2719
- "renamed": {
2720
- "type": "array",
2721
- "items": {
2722
- "type": "object",
2723
- "properties": {
2724
- "serverToolName": {
2725
- "type": "string"
2726
- },
2727
- "name": {
2728
- "type": "string"
2729
- }
2730
- },
2731
- "required": [
2732
- "serverToolName",
2733
- "name"
2734
- ],
2735
- "additionalProperties": false
2736
- }
2737
- },
2738
- "authRequired": {
2739
- "type": "object",
2740
- "properties": {
2741
- "resourceMetadataUrl": {
2742
- "type": "string"
2743
- },
2744
- "resourceMetadata": {
2745
- "type": "object",
2746
- "additionalProperties": {}
2747
- }
2748
- },
2749
- "additionalProperties": false
2750
- }
2751
- },
2752
- "required": [
2753
- "name",
2754
- "url",
2755
- "type",
2756
- "credentialSent",
2757
- "tools",
2758
- "renamed"
2759
- ],
2760
- "additionalProperties": false
2761
- },
2762
- "McpPreviewRequest": {
2763
- "type": "object",
2764
- "properties": {
2765
- "requestId": {
2766
- "type": "string",
2767
- "minLength": 1
2768
- },
2769
- "url": {
2770
- "type": "string",
2771
- "minLength": 1
2772
- },
2773
- "type": {
2774
- "type": "string",
2775
- "enum": [
2776
- "streamable-http",
2777
- "sse"
2778
- ]
2779
- },
2780
- "name": {
2781
- "type": "string",
2782
- "pattern": "^[A-Za-z0-9_-]{1,64}$"
2783
- },
2784
- "vaultId": {
2785
- "type": "string",
2786
- "minLength": 1
2787
- }
2788
- },
2789
- "required": [
2790
- "url"
2791
- ],
2792
- "additionalProperties": false
2793
- },
2794
- "SigningKeyList": {
2795
- "type": "object",
2796
- "properties": {
2797
- "keys": {
2798
- "type": "array",
2799
- "items": {
2800
- "type": "object",
2801
- "properties": {
2802
- "id": {
2803
- "type": "string"
2804
- },
2805
- "state": {
2806
- "type": "string",
2807
- "enum": [
2808
- "standby",
2809
- "current",
2810
- "previous",
2811
- "revoked"
2812
- ]
2813
- },
2814
- "alg": {
2815
- "type": "string",
2816
- "enum": [
2817
- "ES256"
2818
- ]
2819
- },
2820
- "publicKey": {
2821
- "type": "object",
2822
- "properties": {
2823
- "kty": {
2824
- "type": "string",
2825
- "enum": [
2826
- "EC"
2827
- ]
2828
- },
2829
- "crv": {
2830
- "type": "string",
2831
- "enum": [
2832
- "P-256"
2833
- ]
2834
- },
2835
- "x": {
2836
- "type": "string"
2837
- },
2838
- "y": {
2839
- "type": "string"
2840
- },
2841
- "kid": {
2842
- "type": "string"
2843
- },
2844
- "alg": {
2845
- "type": "string",
2846
- "enum": [
2847
- "ES256"
2848
- ]
2849
- },
2850
- "use": {
2851
- "type": "string",
2852
- "enum": [
2853
- "sig"
2854
- ]
2855
- }
2856
- },
2857
- "required": [
2858
- "kty",
2859
- "crv",
2860
- "x",
2861
- "y",
2862
- "kid",
2863
- "alg",
2864
- "use"
2865
- ],
2866
- "additionalProperties": false
2867
- },
2868
- "createdAt": {
2869
- "type": "string"
2870
- },
2871
- "activatedAt": {
2872
- "type": [
2873
- "string",
2874
- "null"
2875
- ]
2876
- },
2877
- "retiredAt": {
2878
- "type": [
2879
- "string",
2880
- "null"
2881
- ]
2882
- },
2883
- "revokedAt": {
2884
- "type": [
2885
- "string",
2886
- "null"
2887
- ]
2888
- }
2889
- },
2890
- "required": [
2891
- "id",
2892
- "state",
2893
- "alg",
2894
- "publicKey",
2895
- "createdAt",
2896
- "activatedAt",
2897
- "retiredAt",
2898
- "revokedAt"
2899
- ],
2900
- "additionalProperties": false
2901
- }
2902
- }
2903
- },
2904
- "required": [
2905
- "keys"
2906
- ],
2907
- "additionalProperties": false
2908
- },
2909
- "RotateSigningKeysRequest": {
2910
- "type": "object",
2911
- "properties": {
2912
- "requestId": {
2913
- "type": "string",
2914
- "minLength": 1
2915
- },
2916
- "force": {
2917
- "type": "boolean"
2918
- }
2919
- },
2920
- "required": [
2921
- "requestId"
2922
- ],
2923
- "additionalProperties": false
2924
- },
2925
- "SigningKeyView": {
2926
- "type": "object",
2927
- "properties": {
2928
- "id": {
2929
- "type": "string"
2930
- },
2931
- "state": {
2932
- "type": "string",
2933
- "enum": [
2934
- "standby",
2935
- "current",
2936
- "previous",
2937
- "revoked"
2938
- ]
2939
- },
2940
- "alg": {
2941
- "type": "string",
2942
- "enum": [
2943
- "ES256"
2944
- ]
2945
- },
2946
- "publicKey": {
2431
+ "publicKey": {
2947
2432
  "type": "object",
2948
2433
  "properties": {
2949
2434
  "kty": {
@@ -3053,7 +2538,7 @@
3053
2538
  "agents:read",
3054
2539
  "agents:write",
3055
2540
  "sessions:own",
3056
- "sandboxes:write",
2541
+ "environments:write",
3057
2542
  "studio"
3058
2543
  ]
3059
2544
  }
@@ -3075,12 +2560,12 @@
3075
2560
  }
3076
2561
  ]
3077
2562
  },
3078
- "sandboxes": {
2563
+ "environments": {
3079
2564
  "type": "array",
3080
2565
  "items": {
3081
2566
  "type": "string"
3082
2567
  },
3083
- "description": "A token caller's sandbox grants (empty reaches none); absent when no grant limits the caller"
2568
+ "description": "A token caller's Environment grants (empty reaches none); absent when no grant limits the caller"
3084
2569
  },
3085
2570
  "via": {
3086
2571
  "type": "string",
@@ -3100,6 +2585,9 @@
3100
2585
  "id": {
3101
2586
  "type": "string"
3102
2587
  },
2588
+ "effectId": {
2589
+ "type": "string"
2590
+ },
3103
2591
  "sessionId": {
3104
2592
  "type": "string"
3105
2593
  },
@@ -3168,659 +2656,88 @@
3168
2656
  "duplicate": {
3169
2657
  "type": "boolean"
3170
2658
  },
3171
- "tokensReported": {
3172
- "type": [
3173
- "boolean",
3174
- "null"
3175
- ]
3176
- },
3177
- "costKnown": {
3178
- "type": [
3179
- "boolean",
3180
- "null"
3181
- ]
3182
- }
3183
- },
3184
- "required": [
3185
- "inputTokens",
3186
- "outputTokens",
3187
- "totalTokens",
3188
- "cachedTokens",
3189
- "cacheWriteTokens",
3190
- "reasoningTokens",
3191
- "costUsd",
3192
- "duplicate",
3193
- "tokensReported",
3194
- "costKnown"
3195
- ],
3196
- "additionalProperties": false
3197
- }
3198
- },
3199
- "required": [
3200
- "id",
3201
- "sessionId",
3202
- "turnId",
3203
- "agentId",
3204
- "provider",
3205
- "model",
3206
- "at",
3207
- "outcome",
3208
- "usage"
3209
- ],
3210
- "additionalProperties": false
3211
- },
3212
- "ModelCallExportPage": {
3213
- "type": "object",
3214
- "properties": {
3215
- "calls": {
3216
- "type": "array",
3217
- "items": {
3218
- "$ref": "#/components/schemas/ModelCall"
3219
- }
3220
- },
3221
- "next": {
3222
- "type": [
3223
- "string",
3224
- "null"
3225
- ]
3226
- },
3227
- "caughtUp": {
3228
- "type": "boolean"
3229
- },
3230
- "asOf": {
3231
- "type": "string"
3232
- }
3233
- },
3234
- "required": [
3235
- "calls",
3236
- "next",
3237
- "caughtUp",
3238
- "asOf"
3239
- ],
3240
- "additionalProperties": false
3241
- }
3242
- },
3243
- "parameters": {}
3244
- },
3245
- "paths": {
3246
- "/v1/tenant": {
3247
- "get": {
3248
- "tags": [
3249
- "Tenant"
3250
- ],
3251
- "summary": "Get the Tenant's status",
3252
- "security": [
3253
- {
3254
- "managementKey": []
3255
- }
3256
- ],
3257
- "x-nylorun-credentials": [
3258
- "management"
3259
- ],
3260
- "x-nylorun-scopes": "never",
3261
- "parameters": [
3262
- {
3263
- "schema": {
3264
- "type": "string",
3265
- "description": "The protocol version, `10`"
3266
- },
3267
- "required": true,
3268
- "description": "The protocol version, `10`",
3269
- "name": "Nylorun-Protocol",
3270
- "in": "header"
3271
- }
3272
- ],
3273
- "responses": {
3274
- "200": {
3275
- "description": "Readiness, model, sandboxes, streams and counts",
3276
- "content": {
3277
- "application/json": {
3278
- "schema": {
3279
- "$ref": "#/components/schemas/TenantStatus"
3280
- }
3281
- }
3282
- }
3283
- },
3284
- "400": {
3285
- "description": "Invalid headers, path, body or cursor",
3286
- "content": {
3287
- "application/json": {
3288
- "schema": {
3289
- "$ref": "#/components/schemas/Rejected"
3290
- }
3291
- }
3292
- }
3293
- },
3294
- "401": {
3295
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
3296
- "content": {
3297
- "application/json": {
3298
- "schema": {
3299
- "$ref": "#/components/schemas/Rejected"
3300
- }
3301
- }
3302
- }
3303
- },
3304
- "403": {
3305
- "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",
3306
- "content": {
3307
- "application/json": {
3308
- "schema": {
3309
- "$ref": "#/components/schemas/Rejected"
3310
- }
3311
- }
3312
- }
3313
- },
3314
- "404": {
3315
- "description": "Not found (`not_found`)",
3316
- "content": {
3317
- "application/json": {
3318
- "schema": {
3319
- "$ref": "#/components/schemas/Rejected"
3320
- }
3321
- }
3322
- }
3323
- },
3324
- "426": {
3325
- "description": "`Nylorun-Protocol` missing or unsupported",
3326
- "content": {
3327
- "application/json": {
3328
- "schema": {
3329
- "$ref": "#/components/schemas/ProtocolRejected"
3330
- }
3331
- }
3332
- }
3333
- },
3334
- "503": {
3335
- "description": "The Tenant's storage or streams are unavailable",
3336
- "content": {
3337
- "application/json": {
3338
- "schema": {
3339
- "$ref": "#/components/schemas/Rejected"
3340
- }
3341
- }
3342
- }
3343
- }
3344
- }
3345
- }
3346
- },
3347
- "/v1/tenant/config/seed": {
3348
- "put": {
3349
- "tags": [
3350
- "Tenant"
3351
- ],
3352
- "summary": "Seed the Tenant's configuration",
3353
- "description": "Sets each setting the Tenant does not have yet; keeps the ones it has.",
3354
- "security": [
3355
- {
3356
- "managementKey": []
3357
- }
3358
- ],
3359
- "x-nylorun-credentials": [
3360
- "management"
3361
- ],
3362
- "x-nylorun-scopes": "never",
3363
- "parameters": [
3364
- {
3365
- "schema": {
3366
- "type": "string",
3367
- "description": "The protocol version, `10`"
3368
- },
3369
- "required": true,
3370
- "description": "The protocol version, `10`",
3371
- "name": "Nylorun-Protocol",
3372
- "in": "header"
3373
- }
3374
- ],
3375
- "requestBody": {
3376
- "required": true,
3377
- "content": {
3378
- "application/json": {
3379
- "schema": {
3380
- "$ref": "#/components/schemas/SeedTenantConfigRequest"
3381
- }
3382
- }
3383
- }
3384
- },
3385
- "responses": {
3386
- "200": {
3387
- "description": "What was set, and what was kept",
3388
- "content": {
3389
- "application/json": {
3390
- "schema": {
3391
- "$ref": "#/components/schemas/SeedTenantConfigResponse"
3392
- }
3393
- }
3394
- }
3395
- },
3396
- "400": {
3397
- "description": "Invalid headers, path, body or cursor",
3398
- "content": {
3399
- "application/json": {
3400
- "schema": {
3401
- "$ref": "#/components/schemas/Rejected"
3402
- }
3403
- }
3404
- }
3405
- },
3406
- "401": {
3407
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
3408
- "content": {
3409
- "application/json": {
3410
- "schema": {
3411
- "$ref": "#/components/schemas/Rejected"
3412
- }
3413
- }
3414
- }
3415
- },
3416
- "403": {
3417
- "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",
3418
- "content": {
3419
- "application/json": {
3420
- "schema": {
3421
- "$ref": "#/components/schemas/Rejected"
3422
- }
3423
- }
3424
- }
3425
- },
3426
- "404": {
3427
- "description": "Not found (`not_found`)",
3428
- "content": {
3429
- "application/json": {
3430
- "schema": {
3431
- "$ref": "#/components/schemas/Rejected"
3432
- }
3433
- }
3434
- }
3435
- },
3436
- "426": {
3437
- "description": "`Nylorun-Protocol` missing or unsupported",
3438
- "content": {
3439
- "application/json": {
3440
- "schema": {
3441
- "$ref": "#/components/schemas/ProtocolRejected"
3442
- }
3443
- }
3444
- }
3445
- },
3446
- "503": {
3447
- "description": "The Tenant's storage or streams are unavailable",
3448
- "content": {
3449
- "application/json": {
3450
- "schema": {
3451
- "$ref": "#/components/schemas/Rejected"
3452
- }
3453
- }
3454
- }
3455
- }
3456
- }
3457
- }
3458
- },
3459
- "/v1/tenant/reset": {
3460
- "post": {
3461
- "tags": [
3462
- "Tenant"
3463
- ],
3464
- "summary": "Reset the Tenant",
3465
- "description": "Deletes its sessions, its sandboxes, or both, after draining or cancelling the turns in progress. The Tenant stays open.",
3466
- "security": [
3467
- {
3468
- "managementKey": []
3469
- }
3470
- ],
3471
- "x-nylorun-credentials": [
3472
- "management"
3473
- ],
3474
- "x-nylorun-scopes": "never",
3475
- "parameters": [
3476
- {
3477
- "schema": {
3478
- "type": "string",
3479
- "description": "The protocol version, `10`"
3480
- },
3481
- "required": true,
3482
- "description": "The protocol version, `10`",
3483
- "name": "Nylorun-Protocol",
3484
- "in": "header"
3485
- }
3486
- ],
3487
- "requestBody": {
3488
- "required": true,
3489
- "content": {
3490
- "application/json": {
3491
- "schema": {
3492
- "$ref": "#/components/schemas/ResetTenantRequest"
3493
- }
3494
- }
3495
- }
3496
- },
3497
- "responses": {
3498
- "200": {
3499
- "description": "Reset",
3500
- "content": {
3501
- "application/json": {
3502
- "schema": {
3503
- "$ref": "#/components/schemas/ResetTenantResponse"
3504
- }
3505
- }
3506
- }
3507
- },
3508
- "400": {
3509
- "description": "Invalid headers, path, body or cursor",
3510
- "content": {
3511
- "application/json": {
3512
- "schema": {
3513
- "$ref": "#/components/schemas/Rejected"
3514
- }
3515
- }
3516
- }
3517
- },
3518
- "401": {
3519
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
3520
- "content": {
3521
- "application/json": {
3522
- "schema": {
3523
- "$ref": "#/components/schemas/Rejected"
3524
- }
3525
- }
3526
- }
3527
- },
3528
- "403": {
3529
- "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",
3530
- "content": {
3531
- "application/json": {
3532
- "schema": {
3533
- "$ref": "#/components/schemas/Rejected"
3534
- }
3535
- }
3536
- }
3537
- },
3538
- "404": {
3539
- "description": "Not found (`not_found`)",
3540
- "content": {
3541
- "application/json": {
3542
- "schema": {
3543
- "$ref": "#/components/schemas/Rejected"
3544
- }
3545
- }
3546
- }
3547
- },
3548
- "426": {
3549
- "description": "`Nylorun-Protocol` missing or unsupported",
3550
- "content": {
3551
- "application/json": {
3552
- "schema": {
3553
- "$ref": "#/components/schemas/ProtocolRejected"
3554
- }
3555
- }
3556
- }
3557
- },
3558
- "503": {
3559
- "description": "The Tenant's storage or streams are unavailable",
3560
- "content": {
3561
- "application/json": {
3562
- "schema": {
3563
- "$ref": "#/components/schemas/Rejected"
3564
- }
3565
- }
3566
- }
3567
- }
3568
- }
3569
- }
3570
- },
3571
- "/v1/me": {
3572
- "get": {
3573
- "tags": [
3574
- "Tenant"
3575
- ],
3576
- "summary": "Get who the caller is",
3577
- "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>`).",
3578
- "security": [
3579
- {
3580
- "applicationKey": []
3581
- },
3582
- {
3583
- "managementKey": []
3584
- },
3585
- {
3586
- "issuerToken": []
3587
- }
3588
- ],
3589
- "x-nylorun-credentials": [
3590
- "application",
3591
- "subject",
3592
- "management",
3593
- "token"
3594
- ],
3595
- "x-nylorun-scopes": "any",
3596
- "parameters": [
3597
- {
3598
- "schema": {
3599
- "type": "string",
3600
- "description": "The protocol version, `10`"
3601
- },
3602
- "required": true,
3603
- "description": "The protocol version, `10`",
3604
- "name": "Nylorun-Protocol",
3605
- "in": "header"
3606
- },
3607
- {
3608
- "schema": {
3609
- "type": "string",
3610
- "description": "The person an application key acts for"
3611
- },
3612
- "required": false,
3613
- "description": "The person an application key acts for",
3614
- "name": "Nylorun-Subject",
3615
- "in": "header"
3616
- },
3617
- {
3618
- "schema": {
3619
- "type": "string",
3620
- "description": "The subject's space-separated scopes; required with a subject"
3621
- },
3622
- "required": false,
3623
- "description": "The subject's space-separated scopes; required with a subject",
3624
- "name": "Nylorun-Scopes",
3625
- "in": "header"
3626
- }
3627
- ],
3628
- "responses": {
3629
- "200": {
3630
- "description": "The caller",
3631
- "content": {
3632
- "application/json": {
3633
- "schema": {
3634
- "$ref": "#/components/schemas/MeResponse"
3635
- }
3636
- }
3637
- }
3638
- },
3639
- "400": {
3640
- "description": "Invalid headers, path, body or cursor",
3641
- "content": {
3642
- "application/json": {
3643
- "schema": {
3644
- "$ref": "#/components/schemas/Rejected"
3645
- }
3646
- }
3647
- }
3648
- },
3649
- "401": {
3650
- "description": "No credential (`credential_required`), one the Tenant does not accept (`credential_invalid`), a token that expired (`token_expired`), or a token whose issuer's keys cannot be fetched now (`issuer_unavailable`). `WWW-Authenticate: Bearer` names the protected resource metadata (`resource_metadata`)",
3651
- "content": {
3652
- "application/json": {
3653
- "schema": {
3654
- "$ref": "#/components/schemas/Rejected"
3655
- }
3656
- }
3657
- }
3658
- },
3659
- "403": {
3660
- "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",
3661
- "content": {
3662
- "application/json": {
3663
- "schema": {
3664
- "$ref": "#/components/schemas/Rejected"
3665
- }
3666
- }
3667
- }
3668
- },
3669
- "404": {
3670
- "description": "Not found (`not_found`)",
3671
- "content": {
3672
- "application/json": {
3673
- "schema": {
3674
- "$ref": "#/components/schemas/Rejected"
3675
- }
3676
- }
3677
- }
3678
- },
3679
- "426": {
3680
- "description": "`Nylorun-Protocol` missing or unsupported",
3681
- "content": {
3682
- "application/json": {
3683
- "schema": {
3684
- "$ref": "#/components/schemas/ProtocolRejected"
3685
- }
3686
- }
3687
- }
3688
- },
3689
- "503": {
3690
- "description": "The Tenant's storage or streams are unavailable",
3691
- "content": {
3692
- "application/json": {
3693
- "schema": {
3694
- "$ref": "#/components/schemas/Rejected"
3695
- }
3696
- }
3697
- }
3698
- }
3699
- }
3700
- }
3701
- },
3702
- "/openapi/management.json": {
3703
- "get": {
3704
- "tags": [
3705
- "Tenant"
3706
- ],
3707
- "summary": "Get the Management API's document",
3708
- "responses": {
3709
- "200": {
3710
- "description": "The Management API's OpenAPI document"
3711
- }
3712
- }
3713
- }
3714
- },
3715
- "/v1/tenant/keys": {
3716
- "get": {
3717
- "tags": [
3718
- "Application keys"
3719
- ],
3720
- "summary": "List the Tenant's keys",
3721
- "description": "Every key of the Tenant by name, with its role (`application`, `management` or `studio`) and when it was issued. Keys themselves are never shown again.",
3722
- "security": [
3723
- {
3724
- "managementKey": []
3725
- }
3726
- ],
3727
- "x-nylorun-credentials": [
3728
- "management"
3729
- ],
3730
- "x-nylorun-scopes": "never",
3731
- "parameters": [
3732
- {
3733
- "schema": {
3734
- "type": "string",
3735
- "description": "The protocol version, `10`"
2659
+ "tokensReported": {
2660
+ "type": [
2661
+ "boolean",
2662
+ "null"
2663
+ ]
2664
+ },
2665
+ "costKnown": {
2666
+ "type": [
2667
+ "boolean",
2668
+ "null"
2669
+ ]
2670
+ }
3736
2671
  },
3737
- "required": true,
3738
- "description": "The protocol version, `10`",
3739
- "name": "Nylorun-Protocol",
3740
- "in": "header"
2672
+ "required": [
2673
+ "inputTokens",
2674
+ "outputTokens",
2675
+ "totalTokens",
2676
+ "cachedTokens",
2677
+ "cacheWriteTokens",
2678
+ "reasoningTokens",
2679
+ "costUsd",
2680
+ "duplicate",
2681
+ "tokensReported",
2682
+ "costKnown"
2683
+ ],
2684
+ "additionalProperties": false
3741
2685
  }
2686
+ },
2687
+ "required": [
2688
+ "id",
2689
+ "effectId",
2690
+ "sessionId",
2691
+ "turnId",
2692
+ "agentId",
2693
+ "provider",
2694
+ "model",
2695
+ "at",
2696
+ "outcome",
2697
+ "usage"
3742
2698
  ],
3743
- "responses": {
3744
- "200": {
3745
- "description": "The keys, by id",
3746
- "content": {
3747
- "application/json": {
3748
- "schema": {
3749
- "$ref": "#/components/schemas/ListOperatorKeysResponse"
3750
- }
3751
- }
3752
- }
3753
- },
3754
- "400": {
3755
- "description": "Invalid headers, path, body or cursor",
3756
- "content": {
3757
- "application/json": {
3758
- "schema": {
3759
- "$ref": "#/components/schemas/Rejected"
3760
- }
3761
- }
3762
- }
3763
- },
3764
- "401": {
3765
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
3766
- "content": {
3767
- "application/json": {
3768
- "schema": {
3769
- "$ref": "#/components/schemas/Rejected"
3770
- }
3771
- }
3772
- }
3773
- },
3774
- "403": {
3775
- "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",
3776
- "content": {
3777
- "application/json": {
3778
- "schema": {
3779
- "$ref": "#/components/schemas/Rejected"
3780
- }
3781
- }
2699
+ "additionalProperties": false
2700
+ },
2701
+ "ModelCallExportPage": {
2702
+ "type": "object",
2703
+ "properties": {
2704
+ "calls": {
2705
+ "type": "array",
2706
+ "items": {
2707
+ "$ref": "#/components/schemas/ModelCall"
3782
2708
  }
3783
2709
  },
3784
- "404": {
3785
- "description": "Not found (`not_found`)",
3786
- "content": {
3787
- "application/json": {
3788
- "schema": {
3789
- "$ref": "#/components/schemas/Rejected"
3790
- }
3791
- }
3792
- }
2710
+ "next": {
2711
+ "type": [
2712
+ "string",
2713
+ "null"
2714
+ ]
3793
2715
  },
3794
- "426": {
3795
- "description": "`Nylorun-Protocol` missing or unsupported",
3796
- "content": {
3797
- "application/json": {
3798
- "schema": {
3799
- "$ref": "#/components/schemas/ProtocolRejected"
3800
- }
3801
- }
3802
- }
2716
+ "caughtUp": {
2717
+ "type": "boolean"
3803
2718
  },
3804
- "503": {
3805
- "description": "The Tenant's storage or streams are unavailable",
3806
- "content": {
3807
- "application/json": {
3808
- "schema": {
3809
- "$ref": "#/components/schemas/Rejected"
3810
- }
3811
- }
3812
- }
2719
+ "asOf": {
2720
+ "type": "string"
3813
2721
  }
3814
- }
2722
+ },
2723
+ "required": [
2724
+ "calls",
2725
+ "next",
2726
+ "caughtUp",
2727
+ "asOf"
2728
+ ],
2729
+ "additionalProperties": false
3815
2730
  }
3816
2731
  },
3817
- "/v1/tenant/keys/{keyId}": {
3818
- "put": {
2732
+ "parameters": {}
2733
+ },
2734
+ "paths": {
2735
+ "/v1/tenant": {
2736
+ "get": {
3819
2737
  "tags": [
3820
- "Application keys"
2738
+ "Tenant"
3821
2739
  ],
3822
- "summary": "Create or rotate an application key",
3823
- "description": "Issues a new application key named `keyId` and returns it this once. An application key of that name is replaced: the old one stops authenticating at once. A management key, `studio` and `bootstrap` are refused.",
2740
+ "summary": "Get the Tenant's status",
3824
2741
  "security": [
3825
2742
  {
3826
2743
  "managementKey": []
@@ -3834,80 +2751,27 @@
3834
2751
  {
3835
2752
  "schema": {
3836
2753
  "type": "string",
3837
- "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`"
3838
- },
3839
- "required": true,
3840
- "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`",
3841
- "name": "keyId",
3842
- "in": "path"
3843
- },
3844
- {
3845
- "schema": {
3846
- "type": "string",
3847
- "description": "The protocol version, `10`"
2754
+ "description": "The protocol version, `11`"
3848
2755
  },
3849
2756
  "required": true,
3850
- "description": "The protocol version, `10`",
2757
+ "description": "The protocol version, `11`",
3851
2758
  "name": "Nylorun-Protocol",
3852
2759
  "in": "header"
3853
2760
  }
3854
2761
  ],
3855
2762
  "responses": {
3856
2763
  "200": {
3857
- "description": "The new key, shown once",
2764
+ "description": "Readiness, model, sandboxes, streams and counts",
3858
2765
  "content": {
3859
2766
  "application/json": {
3860
2767
  "schema": {
3861
- "$ref": "#/components/schemas/PutOperatorKeyResponse"
2768
+ "$ref": "#/components/schemas/TenantStatus"
3862
2769
  }
3863
2770
  }
3864
2771
  }
3865
2772
  },
3866
2773
  "400": {
3867
- "description": "Not a key name, a reserved name, or a management key's name"
3868
- },
3869
- "401": {
3870
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
3871
- "content": {
3872
- "application/json": {
3873
- "schema": {
3874
- "$ref": "#/components/schemas/Rejected"
3875
- }
3876
- }
3877
- }
3878
- },
3879
- "403": {
3880
- "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",
3881
- "content": {
3882
- "application/json": {
3883
- "schema": {
3884
- "$ref": "#/components/schemas/Rejected"
3885
- }
3886
- }
3887
- }
3888
- },
3889
- "404": {
3890
- "description": "Not found (`not_found`)",
3891
- "content": {
3892
- "application/json": {
3893
- "schema": {
3894
- "$ref": "#/components/schemas/Rejected"
3895
- }
3896
- }
3897
- }
3898
- },
3899
- "426": {
3900
- "description": "`Nylorun-Protocol` missing or unsupported",
3901
- "content": {
3902
- "application/json": {
3903
- "schema": {
3904
- "$ref": "#/components/schemas/ProtocolRejected"
3905
- }
3906
- }
3907
- }
3908
- },
3909
- "503": {
3910
- "description": "The Tenant's storage or streams are unavailable",
2774
+ "description": "Invalid headers, path, body or cursor",
3911
2775
  "content": {
3912
2776
  "application/json": {
3913
2777
  "schema": {
@@ -3915,59 +2779,6 @@
3915
2779
  }
3916
2780
  }
3917
2781
  }
3918
- }
3919
- }
3920
- },
3921
- "delete": {
3922
- "tags": [
3923
- "Application keys"
3924
- ],
3925
- "summary": "Delete an application key",
3926
- "description": "The key stops authenticating at once. A management key, `studio` and `bootstrap` are refused.",
3927
- "security": [
3928
- {
3929
- "managementKey": []
3930
- }
3931
- ],
3932
- "x-nylorun-credentials": [
3933
- "management"
3934
- ],
3935
- "x-nylorun-scopes": "never",
3936
- "parameters": [
3937
- {
3938
- "schema": {
3939
- "type": "string",
3940
- "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`"
3941
- },
3942
- "required": true,
3943
- "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`",
3944
- "name": "keyId",
3945
- "in": "path"
3946
- },
3947
- {
3948
- "schema": {
3949
- "type": "string",
3950
- "description": "The protocol version, `10`"
3951
- },
3952
- "required": true,
3953
- "description": "The protocol version, `10`",
3954
- "name": "Nylorun-Protocol",
3955
- "in": "header"
3956
- }
3957
- ],
3958
- "responses": {
3959
- "200": {
3960
- "description": "The key is deleted",
3961
- "content": {
3962
- "application/json": {
3963
- "schema": {
3964
- "$ref": "#/components/schemas/DeleteOperatorKeyResponse"
3965
- }
3966
- }
3967
- }
3968
- },
3969
- "400": {
3970
- "description": "Not a key name, a reserved name, or a management key's name"
3971
2782
  },
3972
2783
  "401": {
3973
2784
  "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
@@ -4022,12 +2833,13 @@
4022
2833
  }
4023
2834
  }
4024
2835
  },
4025
- "/v1/tenant/models": {
4026
- "get": {
2836
+ "/v1/tenant/config/seed": {
2837
+ "put": {
4027
2838
  "tags": [
4028
- "Models"
2839
+ "Tenant"
4029
2840
  ],
4030
- "summary": "List model providers and models",
2841
+ "summary": "Seed the Tenant's configuration",
2842
+ "description": "Sets each setting the Tenant does not have yet; keeps the ones it has.",
4031
2843
  "security": [
4032
2844
  {
4033
2845
  "managementKey": []
@@ -4041,21 +2853,31 @@
4041
2853
  {
4042
2854
  "schema": {
4043
2855
  "type": "string",
4044
- "description": "The protocol version, `10`"
2856
+ "description": "The protocol version, `11`"
4045
2857
  },
4046
2858
  "required": true,
4047
- "description": "The protocol version, `10`",
2859
+ "description": "The protocol version, `11`",
4048
2860
  "name": "Nylorun-Protocol",
4049
2861
  "in": "header"
4050
2862
  }
4051
2863
  ],
2864
+ "requestBody": {
2865
+ "required": true,
2866
+ "content": {
2867
+ "application/json": {
2868
+ "schema": {
2869
+ "$ref": "#/components/schemas/SeedTenantConfigRequest"
2870
+ }
2871
+ }
2872
+ }
2873
+ },
4052
2874
  "responses": {
4053
2875
  "200": {
4054
- "description": "Provider and model names",
2876
+ "description": "What was set, and what was kept",
4055
2877
  "content": {
4056
2878
  "application/json": {
4057
2879
  "schema": {
4058
- "$ref": "#/components/schemas/HostModelCatalog"
2880
+ "$ref": "#/components/schemas/SeedTenantConfigResponse"
4059
2881
  }
4060
2882
  }
4061
2883
  }
@@ -4123,12 +2945,13 @@
4123
2945
  }
4124
2946
  }
4125
2947
  },
4126
- "/v1/tenant/providers": {
4127
- "get": {
2948
+ "/v1/tenant/reset": {
2949
+ "post": {
4128
2950
  "tags": [
4129
- "Models"
2951
+ "Tenant"
4130
2952
  ],
4131
- "summary": "List the model providers the Tenant has credentials for",
2953
+ "summary": "Reset the Tenant",
2954
+ "description": "Deletes its sessions, its Environments (with their vaults), or both, after draining or cancelling the turns in progress. The Tenant stays open.",
4132
2955
  "security": [
4133
2956
  {
4134
2957
  "managementKey": []
@@ -4142,21 +2965,31 @@
4142
2965
  {
4143
2966
  "schema": {
4144
2967
  "type": "string",
4145
- "description": "The protocol version, `10`"
2968
+ "description": "The protocol version, `11`"
4146
2969
  },
4147
2970
  "required": true,
4148
- "description": "The protocol version, `10`",
2971
+ "description": "The protocol version, `11`",
4149
2972
  "name": "Nylorun-Protocol",
4150
2973
  "in": "header"
4151
2974
  }
4152
2975
  ],
2976
+ "requestBody": {
2977
+ "required": true,
2978
+ "content": {
2979
+ "application/json": {
2980
+ "schema": {
2981
+ "$ref": "#/components/schemas/ResetTenantRequest"
2982
+ }
2983
+ }
2984
+ }
2985
+ },
4153
2986
  "responses": {
4154
2987
  "200": {
4155
- "description": "The providers",
2988
+ "description": "Reset",
4156
2989
  "content": {
4157
2990
  "application/json": {
4158
2991
  "schema": {
4159
- "$ref": "#/components/schemas/ListProvidersResponse"
2992
+ "$ref": "#/components/schemas/ResetTenantResponse"
4160
2993
  }
4161
2994
  }
4162
2995
  }
@@ -4224,40 +3057,70 @@
4224
3057
  }
4225
3058
  }
4226
3059
  },
4227
- "/v1/tenant/model": {
3060
+ "/v1/me": {
4228
3061
  "get": {
4229
3062
  "tags": [
4230
- "Models"
3063
+ "Tenant"
4231
3064
  ],
4232
- "summary": "Get the Tenant's model",
3065
+ "summary": "Get who the caller is",
3066
+ "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>`).",
4233
3067
  "security": [
3068
+ {
3069
+ "applicationKey": []
3070
+ },
4234
3071
  {
4235
3072
  "managementKey": []
3073
+ },
3074
+ {
3075
+ "issuerToken": []
4236
3076
  }
4237
3077
  ],
4238
3078
  "x-nylorun-credentials": [
4239
- "management"
3079
+ "application",
3080
+ "subject",
3081
+ "management",
3082
+ "token"
4240
3083
  ],
4241
- "x-nylorun-scopes": "never",
3084
+ "x-nylorun-scopes": "any",
4242
3085
  "parameters": [
4243
3086
  {
4244
3087
  "schema": {
4245
3088
  "type": "string",
4246
- "description": "The protocol version, `10`"
3089
+ "description": "The protocol version, `11`"
4247
3090
  },
4248
3091
  "required": true,
4249
- "description": "The protocol version, `10`",
3092
+ "description": "The protocol version, `11`",
4250
3093
  "name": "Nylorun-Protocol",
4251
3094
  "in": "header"
3095
+ },
3096
+ {
3097
+ "schema": {
3098
+ "type": "string",
3099
+ "description": "The person an application key acts for"
3100
+ },
3101
+ "required": false,
3102
+ "description": "The person an application key acts for",
3103
+ "name": "Nylorun-Subject",
3104
+ "in": "header"
3105
+ },
3106
+ {
3107
+ "schema": {
3108
+ "type": "string",
3109
+ "description": "The subject's space-separated scopes; required with a subject"
3110
+ },
3111
+ "required": false,
3112
+ "description": "The subject's space-separated scopes; required with a subject",
3113
+ "name": "Nylorun-Scopes",
3114
+ "in": "header"
4252
3115
  }
4253
3116
  ],
4254
3117
  "responses": {
4255
3118
  "200": {
4256
- "description": "The model its sessions call",
3119
+ "description": "The caller",
4257
3120
  "content": {
4258
3121
  "application/json": {
4259
3122
  "schema": {
4260
- "$ref": "#/components/schemas/HostModelView"
3123
+ "$ref": "#/components/schemas/MeResponse"
4261
3124
  }
4262
3125
  }
4263
3126
  }
@@ -4273,7 +3136,7 @@
4273
3136
  }
4274
3137
  },
4275
3138
  "401": {
4276
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
3139
+ "description": "No credential (`credential_required`), one the Tenant does not accept (`credential_invalid`), a token that expired (`token_expired`), or a token whose issuer's keys cannot be fetched now (`issuer_unavailable`). `WWW-Authenticate: Bearer` names the protected resource metadata (`resource_metadata`)",
4277
3140
  "content": {
4278
3141
  "application/json": {
4279
3142
  "schema": {
@@ -4323,12 +3186,28 @@
4323
3186
  }
4324
3187
  }
4325
3188
  }
4326
- },
4327
- "put": {
3189
+ }
3190
+ },
3191
+ "/openapi/management.json": {
3192
+ "get": {
4328
3193
  "tags": [
4329
- "Models"
3194
+ "Tenant"
4330
3195
  ],
4331
- "summary": "Set a model provider's credentials",
3196
+ "summary": "Get the Management API's document",
3197
+ "responses": {
3198
+ "200": {
3199
+ "description": "The Management API's OpenAPI document"
3200
+ }
3201
+ }
3202
+ }
3203
+ },
3204
+ "/v1/tenant/keys": {
3205
+ "get": {
3206
+ "tags": [
3207
+ "Application keys"
3208
+ ],
3209
+ "summary": "List the Tenant's keys",
3210
+ "description": "Every key of the Tenant by name, with its role (`application`, `management` or `studio`) and when it was issued. Keys themselves are never shown again.",
4332
3211
  "security": [
4333
3212
  {
4334
3213
  "managementKey": []
@@ -4342,31 +3221,21 @@
4342
3221
  {
4343
3222
  "schema": {
4344
3223
  "type": "string",
4345
- "description": "The protocol version, `10`"
3224
+ "description": "The protocol version, `11`"
4346
3225
  },
4347
3226
  "required": true,
4348
- "description": "The protocol version, `10`",
3227
+ "description": "The protocol version, `11`",
4349
3228
  "name": "Nylorun-Protocol",
4350
3229
  "in": "header"
4351
3230
  }
4352
3231
  ],
4353
- "requestBody": {
4354
- "required": true,
4355
- "content": {
4356
- "application/json": {
4357
- "schema": {
4358
- "$ref": "#/components/schemas/PutHostModelRequest"
4359
- }
4360
- }
4361
- }
4362
- },
4363
3232
  "responses": {
4364
3233
  "200": {
4365
- "description": "The model now in force",
3234
+ "description": "The keys, by id",
4366
3235
  "content": {
4367
3236
  "application/json": {
4368
3237
  "schema": {
4369
- "$ref": "#/components/schemas/HostModelView"
3238
+ "$ref": "#/components/schemas/ListOperatorKeysResponse"
4370
3239
  }
4371
3240
  }
4372
3241
  }
@@ -4434,12 +3303,13 @@
4434
3303
  }
4435
3304
  }
4436
3305
  },
4437
- "/v1/tenant/model/selection": {
3306
+ "/v1/tenant/keys/{keyId}": {
4438
3307
  "put": {
4439
3308
  "tags": [
4440
- "Models"
3309
+ "Application keys"
4441
3310
  ],
4442
- "summary": "Choose the provider and model",
3311
+ "summary": "Create or rotate an application key",
3312
+ "description": "Issues a new application key named `keyId` and returns it this once. An application key of that name is replaced: the old one stops authenticating at once. A management key, `studio` and `bootstrap` are refused.",
4443
3313
  "security": [
4444
3314
  {
4445
3315
  "managementKey": []
@@ -4453,44 +3323,37 @@
4453
3323
  {
4454
3324
  "schema": {
4455
3325
  "type": "string",
4456
- "description": "The protocol version, `10`"
3326
+ "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`"
3327
+ },
3328
+ "required": true,
3329
+ "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`",
3330
+ "name": "keyId",
3331
+ "in": "path"
3332
+ },
3333
+ {
3334
+ "schema": {
3335
+ "type": "string",
3336
+ "description": "The protocol version, `11`"
4457
3337
  },
4458
3338
  "required": true,
4459
- "description": "The protocol version, `10`",
3339
+ "description": "The protocol version, `11`",
4460
3340
  "name": "Nylorun-Protocol",
4461
3341
  "in": "header"
4462
3342
  }
4463
3343
  ],
4464
- "requestBody": {
4465
- "required": true,
4466
- "content": {
4467
- "application/json": {
4468
- "schema": {
4469
- "$ref": "#/components/schemas/SelectHostModelRequest"
4470
- }
4471
- }
4472
- }
4473
- },
4474
3344
  "responses": {
4475
3345
  "200": {
4476
- "description": "The model now in force",
3346
+ "description": "The new key, shown once",
4477
3347
  "content": {
4478
3348
  "application/json": {
4479
3349
  "schema": {
4480
- "$ref": "#/components/schemas/HostModelView"
3350
+ "$ref": "#/components/schemas/PutOperatorKeyResponse"
4481
3351
  }
4482
3352
  }
4483
3353
  }
4484
3354
  },
4485
3355
  "400": {
4486
- "description": "Invalid headers, path, body or cursor",
4487
- "content": {
4488
- "application/json": {
4489
- "schema": {
4490
- "$ref": "#/components/schemas/Rejected"
4491
- }
4492
- }
4493
- }
3356
+ "description": "Not a key name, a reserved name, or a management key's name"
4494
3357
  },
4495
3358
  "401": {
4496
3359
  "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
@@ -4543,15 +3406,13 @@
4543
3406
  }
4544
3407
  }
4545
3408
  }
4546
- }
4547
- },
4548
- "/v1/tenant/usage": {
4549
- "get": {
3409
+ },
3410
+ "delete": {
4550
3411
  "tags": [
4551
- "Models"
3412
+ "Application keys"
4552
3413
  ],
4553
- "summary": "Get what the Tenant's model calls used",
4554
- "description": "Totals from the model usage ledger, which the model gate writes once per call: for the Tenant, one agent or one turn, over the current UTC day or month, or all time.",
3414
+ "summary": "Delete an application key",
3415
+ "description": "The key stops authenticating at once. A management key, `studio` and `bootstrap` are refused.",
4555
3416
  "security": [
4556
3417
  {
4557
3418
  "managementKey": []
@@ -4565,71 +3426,37 @@
4565
3426
  {
4566
3427
  "schema": {
4567
3428
  "type": "string",
4568
- "enum": [
4569
- "tenant",
4570
- "agent",
4571
- "turn"
4572
- ],
4573
- "default": "tenant"
4574
- },
4575
- "required": false,
4576
- "name": "scope",
4577
- "in": "query"
4578
- },
4579
- {
4580
- "schema": {
4581
- "type": "string",
4582
- "minLength": 1
4583
- },
4584
- "required": false,
4585
- "name": "id",
4586
- "in": "query"
4587
- },
4588
- {
4589
- "schema": {
4590
- "type": "string",
4591
- "enum": [
4592
- "day",
4593
- "month",
4594
- "total"
4595
- ],
4596
- "default": "total"
3429
+ "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`"
4597
3430
  },
4598
- "required": false,
4599
- "name": "period",
4600
- "in": "query"
3431
+ "required": true,
3432
+ "description": "The key's name: `^[a-z][a-z0-9-]{0,31}$`, never `studio` or `bootstrap`",
3433
+ "name": "keyId",
3434
+ "in": "path"
4601
3435
  },
4602
3436
  {
4603
3437
  "schema": {
4604
3438
  "type": "string",
4605
- "description": "The protocol version, `10`"
3439
+ "description": "The protocol version, `11`"
4606
3440
  },
4607
3441
  "required": true,
4608
- "description": "The protocol version, `10`",
3442
+ "description": "The protocol version, `11`",
4609
3443
  "name": "Nylorun-Protocol",
4610
3444
  "in": "header"
4611
3445
  }
4612
3446
  ],
4613
3447
  "responses": {
4614
3448
  "200": {
4615
- "description": "The calls, tokens and cost",
3449
+ "description": "The key is deleted",
4616
3450
  "content": {
4617
3451
  "application/json": {
4618
3452
  "schema": {
4619
- "$ref": "#/components/schemas/ModelUsageTotals"
3453
+ "$ref": "#/components/schemas/DeleteOperatorKeyResponse"
4620
3454
  }
4621
3455
  }
4622
3456
  }
4623
3457
  },
4624
3458
  "400": {
4625
- "description": "Invalid headers, path, body or cursor",
4626
- "content": {
4627
- "application/json": {
4628
- "schema": {
4629
- "$ref": "#/components/schemas/Rejected"
4630
- }
4631
- }
4632
- }
3459
+ "description": "Not a key name, a reserved name, or a management key's name"
4633
3460
  },
4634
3461
  "401": {
4635
3462
  "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
@@ -4684,59 +3511,40 @@
4684
3511
  }
4685
3512
  }
4686
3513
  },
4687
- "/v1/tenant/calls/model": {
3514
+ "/v1/tenant/models": {
4688
3515
  "get": {
4689
3516
  "tags": [
4690
3517
  "Models"
4691
3518
  ],
4692
- "summary": "Export committed model calls in safe transaction order",
3519
+ "summary": "List model providers and models",
4693
3520
  "security": [
4694
3521
  {
4695
3522
  "managementKey": []
4696
3523
  }
4697
3524
  ],
4698
3525
  "x-nylorun-credentials": [
4699
- "management"
4700
- ],
4701
- "x-nylorun-scopes": "never",
4702
- "parameters": [
4703
- {
4704
- "schema": {
4705
- "type": "string"
4706
- },
4707
- "required": false,
4708
- "name": "after",
4709
- "in": "query"
4710
- },
4711
- {
4712
- "schema": {
4713
- "type": "integer",
4714
- "minimum": 1,
4715
- "maximum": 1000,
4716
- "default": 200
4717
- },
4718
- "required": false,
4719
- "name": "limit",
4720
- "in": "query"
4721
- },
3526
+ "management"
3527
+ ],
3528
+ "x-nylorun-scopes": "never",
3529
+ "parameters": [
4722
3530
  {
4723
3531
  "schema": {
4724
3532
  "type": "string",
4725
- "description": "The protocol version, `10`"
3533
+ "description": "The protocol version, `11`"
4726
3534
  },
4727
3535
  "required": true,
4728
- "description": "The protocol version, `10`",
3536
+ "description": "The protocol version, `11`",
4729
3537
  "name": "Nylorun-Protocol",
4730
3538
  "in": "header"
4731
3539
  }
4732
3540
  ],
4733
3541
  "responses": {
4734
3542
  "200": {
4735
- "description": "An unfiltered resumable ledger page",
3543
+ "description": "Provider and model names",
4736
3544
  "content": {
4737
3545
  "application/json": {
4738
3546
  "schema": {
4739
- "$ref": "#/components/schemas/ModelCallExportPage"
3547
+ "$ref": "#/components/schemas/HostModelCatalog"
4740
3548
  }
4741
3549
  }
4742
3550
  }
@@ -4804,12 +3612,12 @@
4804
3612
  }
4805
3613
  }
4806
3614
  },
4807
- "/v1/tenant/budgets": {
3615
+ "/v1/tenant/providers": {
4808
3616
  "get": {
4809
3617
  "tags": [
4810
3618
  "Models"
4811
3619
  ],
4812
- "summary": "Get the Tenant's model budgets",
3620
+ "summary": "List the model providers the Tenant has credentials for",
4813
3621
  "security": [
4814
3622
  {
4815
3623
  "managementKey": []
@@ -4823,21 +3631,21 @@
4823
3631
  {
4824
3632
  "schema": {
4825
3633
  "type": "string",
4826
- "description": "The protocol version, `10`"
3634
+ "description": "The protocol version, `11`"
4827
3635
  },
4828
3636
  "required": true,
4829
- "description": "The protocol version, `10`",
3637
+ "description": "The protocol version, `11`",
4830
3638
  "name": "Nylorun-Protocol",
4831
3639
  "in": "header"
4832
3640
  }
4833
3641
  ],
4834
3642
  "responses": {
4835
3643
  "200": {
4836
- "description": "The hard caps on model spend",
3644
+ "description": "The providers",
4837
3645
  "content": {
4838
3646
  "application/json": {
4839
3647
  "schema": {
4840
- "$ref": "#/components/schemas/ModelBudgets"
3648
+ "$ref": "#/components/schemas/ListProvidersResponse"
4841
3649
  }
4842
3650
  }
4843
3651
  }
@@ -4903,13 +3711,14 @@
4903
3711
  }
4904
3712
  }
4905
3713
  }
4906
- },
4907
- "put": {
3714
+ }
3715
+ },
3716
+ "/v1/tenant/model": {
3717
+ "get": {
4908
3718
  "tags": [
4909
3719
  "Models"
4910
3720
  ],
4911
- "summary": "Set the Tenant's model budgets",
4912
- "description": "Replaces every budget. Before each model call the gate checks the scope's spend against its cap; once a cap is reached the call fails with `budget_exhausted` and the turn with `model.budget_exhausted`. An empty list removes every cap.",
3721
+ "summary": "Get the Tenant's model",
4913
3722
  "security": [
4914
3723
  {
4915
3724
  "managementKey": []
@@ -4923,31 +3732,21 @@
4923
3732
  {
4924
3733
  "schema": {
4925
3734
  "type": "string",
4926
- "description": "The protocol version, `10`"
3735
+ "description": "The protocol version, `11`"
4927
3736
  },
4928
3737
  "required": true,
4929
- "description": "The protocol version, `10`",
3738
+ "description": "The protocol version, `11`",
4930
3739
  "name": "Nylorun-Protocol",
4931
3740
  "in": "header"
4932
3741
  }
4933
3742
  ],
4934
- "requestBody": {
4935
- "required": true,
4936
- "content": {
4937
- "application/json": {
4938
- "schema": {
4939
- "$ref": "#/components/schemas/PutModelBudgetsRequest"
4940
- }
4941
- }
4942
- }
4943
- },
4944
3743
  "responses": {
4945
3744
  "200": {
4946
- "description": "The budgets now in force",
3745
+ "description": "The model its sessions call",
4947
3746
  "content": {
4948
3747
  "application/json": {
4949
3748
  "schema": {
4950
- "$ref": "#/components/schemas/ModelBudgets"
3749
+ "$ref": "#/components/schemas/HostModelView"
4951
3750
  }
4952
3751
  }
4953
3752
  }
@@ -5013,15 +3812,12 @@
5013
3812
  }
5014
3813
  }
5015
3814
  }
5016
- }
5017
- },
5018
- "/v1/tenant/vaults": {
5019
- "post": {
3815
+ },
3816
+ "put": {
5020
3817
  "tags": [
5021
- "Vaults"
3818
+ "Models"
5022
3819
  ],
5023
- "summary": "Create a vault",
5024
- "description": "With `scope: \"installation\"` the installation's own vault, owned by `installation`, which any session may attach; or a vault of one person (`ownerUserId`), which only that person's sessions attach.",
3820
+ "summary": "Set a model provider's credentials",
5025
3821
  "security": [
5026
3822
  {
5027
3823
  "managementKey": []
@@ -5035,10 +3831,10 @@
5035
3831
  {
5036
3832
  "schema": {
5037
3833
  "type": "string",
5038
- "description": "The protocol version, `10`"
3834
+ "description": "The protocol version, `11`"
5039
3835
  },
5040
3836
  "required": true,
5041
- "description": "The protocol version, `10`",
3837
+ "description": "The protocol version, `11`",
5042
3838
  "name": "Nylorun-Protocol",
5043
3839
  "in": "header"
5044
3840
  }
@@ -5048,18 +3844,18 @@
5048
3844
  "content": {
5049
3845
  "application/json": {
5050
3846
  "schema": {
5051
- "$ref": "#/components/schemas/CreateVaultRequest"
3847
+ "$ref": "#/components/schemas/PutHostModelRequest"
5052
3848
  }
5053
3849
  }
5054
3850
  }
5055
3851
  },
5056
3852
  "responses": {
5057
3853
  "200": {
5058
- "description": "The vault",
3854
+ "description": "The model now in force",
5059
3855
  "content": {
5060
3856
  "application/json": {
5061
3857
  "schema": {
5062
- "$ref": "#/components/schemas/VaultInfo"
3858
+ "$ref": "#/components/schemas/HostModelView"
5063
3859
  }
5064
3860
  }
5065
3861
  }
@@ -5104,9 +3900,6 @@
5104
3900
  }
5105
3901
  }
5106
3902
  },
5107
- "409": {
5108
- "description": "The idempotency key was used for another vault"
5109
- },
5110
3903
  "426": {
5111
3904
  "description": "`Nylorun-Protocol` missing or unsupported",
5112
3905
  "content": {
@@ -5128,13 +3921,14 @@
5128
3921
  }
5129
3922
  }
5130
3923
  }
5131
- },
5132
- "get": {
3924
+ }
3925
+ },
3926
+ "/v1/tenant/model/selection": {
3927
+ "put": {
5133
3928
  "tags": [
5134
- "Vaults"
3929
+ "Models"
5135
3930
  ],
5136
- "summary": "List vaults",
5137
- "description": "The installation vaults, after the vaults of `ownerUserId` when it names a person.",
3931
+ "summary": "Choose the provider and model",
5138
3932
  "security": [
5139
3933
  {
5140
3934
  "managementKey": []
@@ -5148,31 +3942,31 @@
5148
3942
  {
5149
3943
  "schema": {
5150
3944
  "type": "string",
5151
- "description": "Also list this person's vaults"
5152
- },
5153
- "required": false,
5154
- "description": "Also list this person's vaults",
5155
- "name": "ownerUserId",
5156
- "in": "query"
5157
- },
5158
- {
5159
- "schema": {
5160
- "type": "string",
5161
- "description": "The protocol version, `10`"
3945
+ "description": "The protocol version, `11`"
5162
3946
  },
5163
3947
  "required": true,
5164
- "description": "The protocol version, `10`",
3948
+ "description": "The protocol version, `11`",
5165
3949
  "name": "Nylorun-Protocol",
5166
3950
  "in": "header"
5167
3951
  }
5168
3952
  ],
3953
+ "requestBody": {
3954
+ "required": true,
3955
+ "content": {
3956
+ "application/json": {
3957
+ "schema": {
3958
+ "$ref": "#/components/schemas/SelectHostModelRequest"
3959
+ }
3960
+ }
3961
+ }
3962
+ },
5169
3963
  "responses": {
5170
3964
  "200": {
5171
- "description": "The vaults",
3965
+ "description": "The model now in force",
5172
3966
  "content": {
5173
3967
  "application/json": {
5174
3968
  "schema": {
5175
- "$ref": "#/components/schemas/ListVaultsResponse"
3969
+ "$ref": "#/components/schemas/HostModelView"
5176
3970
  }
5177
3971
  }
5178
3972
  }
@@ -5240,12 +4034,13 @@
5240
4034
  }
5241
4035
  }
5242
4036
  },
5243
- "/v1/tenant/vaults/{vaultId}": {
4037
+ "/v1/tenant/usage": {
5244
4038
  "get": {
5245
4039
  "tags": [
5246
- "Vaults"
4040
+ "Models"
5247
4041
  ],
5248
- "summary": "Get a vault",
4042
+ "summary": "Get what the Tenant's model calls used",
4043
+ "description": "Totals from the model usage ledger, which the model gate writes once per call: for the Tenant, one agent or one turn, over the current UTC day or month, or all time.",
5249
4044
  "security": [
5250
4045
  {
5251
4046
  "managementKey": []
@@ -5258,30 +4053,59 @@
5258
4053
  "parameters": [
5259
4054
  {
5260
4055
  "schema": {
5261
- "type": "string"
4056
+ "type": "string",
4057
+ "enum": [
4058
+ "tenant",
4059
+ "agent",
4060
+ "turn"
4061
+ ],
4062
+ "default": "tenant"
5262
4063
  },
5263
- "required": true,
5264
- "name": "vaultId",
5265
- "in": "path"
4064
+ "required": false,
4065
+ "name": "scope",
4066
+ "in": "query"
4067
+ },
4068
+ {
4069
+ "schema": {
4070
+ "type": "string",
4071
+ "minLength": 1
4072
+ },
4073
+ "required": false,
4074
+ "name": "id",
4075
+ "in": "query"
4076
+ },
4077
+ {
4078
+ "schema": {
4079
+ "type": "string",
4080
+ "enum": [
4081
+ "day",
4082
+ "month",
4083
+ "total"
4084
+ ],
4085
+ "default": "total"
4086
+ },
4087
+ "required": false,
4088
+ "name": "period",
4089
+ "in": "query"
5266
4090
  },
5267
4091
  {
5268
4092
  "schema": {
5269
4093
  "type": "string",
5270
- "description": "The protocol version, `10`"
4094
+ "description": "The protocol version, `11`"
5271
4095
  },
5272
4096
  "required": true,
5273
- "description": "The protocol version, `10`",
4097
+ "description": "The protocol version, `11`",
5274
4098
  "name": "Nylorun-Protocol",
5275
4099
  "in": "header"
5276
4100
  }
5277
4101
  ],
5278
4102
  "responses": {
5279
4103
  "200": {
5280
- "description": "The vault",
4104
+ "description": "The calls, tokens and cost",
5281
4105
  "content": {
5282
4106
  "application/json": {
5283
4107
  "schema": {
5284
- "$ref": "#/components/schemas/VaultInfo"
4108
+ "$ref": "#/components/schemas/ModelUsageTotals"
5285
4109
  }
5286
4110
  }
5287
4111
  }
@@ -5347,12 +4171,14 @@
5347
4171
  }
5348
4172
  }
5349
4173
  }
5350
- },
5351
- "delete": {
4174
+ }
4175
+ },
4176
+ "/v1/tenant/calls/model": {
4177
+ "get": {
5352
4178
  "tags": [
5353
- "Vaults"
4179
+ "Models"
5354
4180
  ],
5355
- "summary": "Delete a vault and its credentials",
4181
+ "summary": "Export committed model calls in safe transaction order",
5356
4182
  "security": [
5357
4183
  {
5358
4184
  "managementKey": []
@@ -5367,28 +4193,39 @@
5367
4193
  "schema": {
5368
4194
  "type": "string"
5369
4195
  },
5370
- "required": true,
5371
- "name": "vaultId",
5372
- "in": "path"
4196
+ "required": false,
4197
+ "name": "after",
4198
+ "in": "query"
4199
+ },
4200
+ {
4201
+ "schema": {
4202
+ "type": "integer",
4203
+ "minimum": 1,
4204
+ "maximum": 1000,
4205
+ "default": 200
4206
+ },
4207
+ "required": false,
4208
+ "name": "limit",
4209
+ "in": "query"
5373
4210
  },
5374
4211
  {
5375
4212
  "schema": {
5376
4213
  "type": "string",
5377
- "description": "The protocol version, `10`"
4214
+ "description": "The protocol version, `11`"
5378
4215
  },
5379
4216
  "required": true,
5380
- "description": "The protocol version, `10`",
4217
+ "description": "The protocol version, `11`",
5381
4218
  "name": "Nylorun-Protocol",
5382
4219
  "in": "header"
5383
4220
  }
5384
4221
  ],
5385
4222
  "responses": {
5386
4223
  "200": {
5387
- "description": "Deleted",
4224
+ "description": "An unfiltered resumable ledger page",
5388
4225
  "content": {
5389
4226
  "application/json": {
5390
4227
  "schema": {
5391
- "$ref": "#/components/schemas/DeletedResponse"
4228
+ "$ref": "#/components/schemas/ModelCallExportPage"
5392
4229
  }
5393
4230
  }
5394
4231
  }
@@ -5456,13 +4293,12 @@
5456
4293
  }
5457
4294
  }
5458
4295
  },
5459
- "/v1/tenant/vaults/{vaultId}/credentials": {
5460
- "post": {
4296
+ "/v1/tenant/budgets": {
4297
+ "get": {
5461
4298
  "tags": [
5462
- "Vaults"
4299
+ "Models"
5463
4300
  ],
5464
- "summary": "Add a credential",
5465
- "description": "A bearer token, bound to the URL a tool may send it to.",
4301
+ "summary": "Get the Tenant's model budgets",
5466
4302
  "security": [
5467
4303
  {
5468
4304
  "managementKey": []
@@ -5473,42 +4309,24 @@
5473
4309
  ],
5474
4310
  "x-nylorun-scopes": "never",
5475
4311
  "parameters": [
5476
- {
5477
- "schema": {
5478
- "type": "string"
5479
- },
5480
- "required": true,
5481
- "name": "vaultId",
5482
- "in": "path"
5483
- },
5484
4312
  {
5485
4313
  "schema": {
5486
4314
  "type": "string",
5487
- "description": "The protocol version, `10`"
4315
+ "description": "The protocol version, `11`"
5488
4316
  },
5489
4317
  "required": true,
5490
- "description": "The protocol version, `10`",
4318
+ "description": "The protocol version, `11`",
5491
4319
  "name": "Nylorun-Protocol",
5492
4320
  "in": "header"
5493
4321
  }
5494
4322
  ],
5495
- "requestBody": {
5496
- "required": true,
5497
- "content": {
5498
- "application/json": {
5499
- "schema": {
5500
- "$ref": "#/components/schemas/CreateCredentialRequest"
5501
- }
5502
- }
5503
- }
5504
- },
5505
4323
  "responses": {
5506
4324
  "200": {
5507
- "description": "The credential, without its secret",
4325
+ "description": "The hard caps on model spend",
5508
4326
  "content": {
5509
4327
  "application/json": {
5510
4328
  "schema": {
5511
- "$ref": "#/components/schemas/CredentialInfo"
4329
+ "$ref": "#/components/schemas/ModelBudgets"
5512
4330
  }
5513
4331
  }
5514
4332
  }
@@ -5575,11 +4393,12 @@
5575
4393
  }
5576
4394
  }
5577
4395
  },
5578
- "get": {
4396
+ "put": {
5579
4397
  "tags": [
5580
- "Vaults"
4398
+ "Models"
5581
4399
  ],
5582
- "summary": "List a vault's credentials",
4400
+ "summary": "Set the Tenant's model budgets",
4401
+ "description": "Replaces every budget. Before each model call the gate checks the scope's spend against its cap; once a cap is reached the call fails with `budget_exhausted` and the turn with `model.budget_exhausted`. An empty list removes every cap.",
5583
4402
  "security": [
5584
4403
  {
5585
4404
  "managementKey": []
@@ -5590,32 +4409,34 @@
5590
4409
  ],
5591
4410
  "x-nylorun-scopes": "never",
5592
4411
  "parameters": [
5593
- {
5594
- "schema": {
5595
- "type": "string"
5596
- },
5597
- "required": true,
5598
- "name": "vaultId",
5599
- "in": "path"
5600
- },
5601
4412
  {
5602
4413
  "schema": {
5603
4414
  "type": "string",
5604
- "description": "The protocol version, `10`"
4415
+ "description": "The protocol version, `11`"
5605
4416
  },
5606
4417
  "required": true,
5607
- "description": "The protocol version, `10`",
4418
+ "description": "The protocol version, `11`",
5608
4419
  "name": "Nylorun-Protocol",
5609
4420
  "in": "header"
5610
4421
  }
5611
4422
  ],
4423
+ "requestBody": {
4424
+ "required": true,
4425
+ "content": {
4426
+ "application/json": {
4427
+ "schema": {
4428
+ "$ref": "#/components/schemas/PutModelBudgetsRequest"
4429
+ }
4430
+ }
4431
+ }
4432
+ },
5612
4433
  "responses": {
5613
4434
  "200": {
5614
- "description": "The credentials, without their secrets",
4435
+ "description": "The budgets now in force",
5615
4436
  "content": {
5616
4437
  "application/json": {
5617
4438
  "schema": {
5618
- "$ref": "#/components/schemas/ListCredentialsResponse"
4439
+ "$ref": "#/components/schemas/ModelBudgets"
5619
4440
  }
5620
4441
  }
5621
4442
  }
@@ -5683,12 +4504,12 @@
5683
4504
  }
5684
4505
  }
5685
4506
  },
5686
- "/v1/tenant/vaults/{vaultId}/credentials/{credentialId}": {
4507
+ "/v1/tenant/tool-policy": {
5687
4508
  "get": {
5688
4509
  "tags": [
5689
- "Vaults"
4510
+ "Tool policy"
5690
4511
  ],
5691
- "summary": "Get a credential",
4512
+ "summary": "Get the Tenant's tool policy",
5692
4513
  "security": [
5693
4514
  {
5694
4515
  "managementKey": []
@@ -5699,40 +4520,24 @@
5699
4520
  ],
5700
4521
  "x-nylorun-scopes": "never",
5701
4522
  "parameters": [
5702
- {
5703
- "schema": {
5704
- "type": "string"
5705
- },
5706
- "required": true,
5707
- "name": "vaultId",
5708
- "in": "path"
5709
- },
5710
- {
5711
- "schema": {
5712
- "type": "string"
5713
- },
5714
- "required": true,
5715
- "name": "credentialId",
5716
- "in": "path"
5717
- },
5718
4523
  {
5719
4524
  "schema": {
5720
4525
  "type": "string",
5721
- "description": "The protocol version, `10`"
4526
+ "description": "The protocol version, `11`"
5722
4527
  },
5723
4528
  "required": true,
5724
- "description": "The protocol version, `10`",
4529
+ "description": "The protocol version, `11`",
5725
4530
  "name": "Nylorun-Protocol",
5726
4531
  "in": "header"
5727
4532
  }
5728
4533
  ],
5729
4534
  "responses": {
5730
4535
  "200": {
5731
- "description": "The credential, without its secret",
4536
+ "description": "The rules the Tool Gate applies to every MCP and HTTP tool call",
5732
4537
  "content": {
5733
4538
  "application/json": {
5734
4539
  "schema": {
5735
- "$ref": "#/components/schemas/CredentialInfo"
4540
+ "$ref": "#/components/schemas/ToolPolicy"
5736
4541
  }
5737
4542
  }
5738
4543
  }
@@ -5799,11 +4604,12 @@
5799
4604
  }
5800
4605
  }
5801
4606
  },
5802
- "post": {
4607
+ "put": {
5803
4608
  "tags": [
5804
- "Vaults"
4609
+ "Tool policy"
5805
4610
  ],
5806
- "summary": "Rotate a credential's secret",
4611
+ "summary": "Set the Tenant's tool policy",
4612
+ "description": "Replaces every rule. The Tool Gate applies them to each MCP and HTTP tool call of every harness, before it sends the call: the strictest rule that matches decides. `deny` refuses the call (the model gets `tool.denied`), `ask` holds it and pauses the turn until a person answers it with an `approve` command on the session, `allow` runs it. A call no rule matches runs. A rule matches when every selector it sets matches: `tool` (the name the model calls it by; `*` matches any run of characters), `server` (an MCP server's name), `kind` (`mcp` or `http`), `agent` (the agent that calls it) and `when` (fields of the call's input by dotted path, each tested with `equals`, `in`, `gt`, `gte`, `lt`, `lte` or `matches`). Sandbox tools never cross the gate. An empty list allows every call.",
5807
4613
  "security": [
5808
4614
  {
5809
4615
  "managementKey": []
@@ -5814,29 +4620,13 @@
5814
4620
  ],
5815
4621
  "x-nylorun-scopes": "never",
5816
4622
  "parameters": [
5817
- {
5818
- "schema": {
5819
- "type": "string"
5820
- },
5821
- "required": true,
5822
- "name": "vaultId",
5823
- "in": "path"
5824
- },
5825
- {
5826
- "schema": {
5827
- "type": "string"
5828
- },
5829
- "required": true,
5830
- "name": "credentialId",
5831
- "in": "path"
5832
- },
5833
4623
  {
5834
4624
  "schema": {
5835
4625
  "type": "string",
5836
- "description": "The protocol version, `10`"
4626
+ "description": "The protocol version, `11`"
5837
4627
  },
5838
4628
  "required": true,
5839
- "description": "The protocol version, `10`",
4629
+ "description": "The protocol version, `11`",
5840
4630
  "name": "Nylorun-Protocol",
5841
4631
  "in": "header"
5842
4632
  }
@@ -5846,18 +4636,18 @@
5846
4636
  "content": {
5847
4637
  "application/json": {
5848
4638
  "schema": {
5849
- "$ref": "#/components/schemas/RotateCredentialRequest"
4639
+ "$ref": "#/components/schemas/PutToolPolicyRequest"
5850
4640
  }
5851
4641
  }
5852
4642
  }
5853
4643
  },
5854
4644
  "responses": {
5855
4645
  "200": {
5856
- "description": "The credential",
4646
+ "description": "The policy now in force",
5857
4647
  "content": {
5858
4648
  "application/json": {
5859
4649
  "schema": {
5860
- "$ref": "#/components/schemas/CredentialInfo"
4650
+ "$ref": "#/components/schemas/ToolPolicy"
5861
4651
  }
5862
4652
  }
5863
4653
  }
@@ -5902,9 +4692,6 @@
5902
4692
  }
5903
4693
  }
5904
4694
  },
5905
- "409": {
5906
- "description": "A credential's type cannot change"
5907
- },
5908
4695
  "426": {
5909
4696
  "description": "`Nylorun-Protocol` missing or unsupported",
5910
4697
  "content": {
@@ -5926,12 +4713,15 @@
5926
4713
  }
5927
4714
  }
5928
4715
  }
5929
- },
5930
- "delete": {
4716
+ }
4717
+ },
4718
+ "/v1/tenant/credential-coverage": {
4719
+ "post": {
5931
4720
  "tags": [
5932
- "Vaults"
4721
+ "Credential coverage"
5933
4722
  ],
5934
- "summary": "Delete a credential",
4723
+ "summary": "Check an agent's credentials against an Environment",
4724
+ "description": "For each remote MCP server and each HTTP tool with a `credential` that the saved agent `agentId` declares (its own, its agents used as tools' and a flow's), the credential a session that names `environmentId` would send: the Environment's secret bound to the URL (`covered`), or none (`missing`). No secret is read and no server is called.",
5935
4725
  "security": [
5936
4726
  {
5937
4727
  "managementKey": []
@@ -5942,40 +4732,34 @@
5942
4732
  ],
5943
4733
  "x-nylorun-scopes": "never",
5944
4734
  "parameters": [
5945
- {
5946
- "schema": {
5947
- "type": "string"
5948
- },
5949
- "required": true,
5950
- "name": "vaultId",
5951
- "in": "path"
5952
- },
5953
- {
5954
- "schema": {
5955
- "type": "string"
5956
- },
5957
- "required": true,
5958
- "name": "credentialId",
5959
- "in": "path"
5960
- },
5961
4735
  {
5962
4736
  "schema": {
5963
4737
  "type": "string",
5964
- "description": "The protocol version, `10`"
4738
+ "description": "The protocol version, `11`"
5965
4739
  },
5966
4740
  "required": true,
5967
- "description": "The protocol version, `10`",
4741
+ "description": "The protocol version, `11`",
5968
4742
  "name": "Nylorun-Protocol",
5969
4743
  "in": "header"
5970
4744
  }
5971
4745
  ],
4746
+ "requestBody": {
4747
+ "required": true,
4748
+ "content": {
4749
+ "application/json": {
4750
+ "schema": {
4751
+ "$ref": "#/components/schemas/CredentialCoverageRequest"
4752
+ }
4753
+ }
4754
+ }
4755
+ },
5972
4756
  "responses": {
5973
4757
  "200": {
5974
- "description": "Deleted",
4758
+ "description": "One entry per declared URL",
5975
4759
  "content": {
5976
4760
  "application/json": {
5977
4761
  "schema": {
5978
- "$ref": "#/components/schemas/DeletedResponse"
4762
+ "$ref": "#/components/schemas/CredentialCoverage"
5979
4763
  }
5980
4764
  }
5981
4765
  }
@@ -6011,7 +4795,7 @@
6011
4795
  }
6012
4796
  },
6013
4797
  "404": {
6014
- "description": "Not found (`not_found`)",
4798
+ "description": "No such agent, or no such Environment",
6015
4799
  "content": {
6016
4800
  "application/json": {
6017
4801
  "schema": {
@@ -6049,7 +4833,7 @@
6049
4833
  "MCP servers"
6050
4834
  ],
6051
4835
  "summary": "Preview an MCP server's tools",
6052
- "description": "Connects to the remote MCP server at `url` with the installation vault's credential for that URL (its headers and `via`; never an identity header), under the Host's address policy, lists its tools within 15 s and closes the connection. It never calls a tool. Each tool comes with the name the model would call it (`modelName`, made with `name`), its annotations and its input schema's size. A server that answers `401` is `authRequired`, with its RFC 9728 protected-resource metadata when it publishes any: it needs a person's sign-in, so reach it through a gateway (`via`), or with a key. No credential value is in the answer.",
4836
+ "description": "Connects to the remote MCP server at `url` with the credential for that URL in the vault of `environmentId`, if given (its headers and `via`; never an identity header), under the Host's address policy, lists its tools within 15 s and closes the connection. It never calls a tool. Each tool comes with the name the model would call it (`modelName`, made with `name`), its annotations and its input schema's size. A server that answers `401` is `authRequired`, with its RFC 9728 protected-resource metadata when it publishes any: it needs a person's sign-in, so reach it through a gateway (`via`), or with a key. No credential value is in the answer.",
6053
4837
  "security": [
6054
4838
  {
6055
4839
  "managementKey": []
@@ -6063,10 +4847,10 @@
6063
4847
  {
6064
4848
  "schema": {
6065
4849
  "type": "string",
6066
- "description": "The protocol version, `10`"
4850
+ "description": "The protocol version, `11`"
6067
4851
  },
6068
4852
  "required": true,
6069
- "description": "The protocol version, `10`",
4853
+ "description": "The protocol version, `11`",
6070
4854
  "name": "Nylorun-Protocol",
6071
4855
  "in": "header"
6072
4856
  }
@@ -6133,7 +4917,7 @@
6133
4917
  }
6134
4918
  },
6135
4919
  "409": {
6136
- "description": "Several installation vaults hold a credential for the URL (name one with `vaultId`), or the one there cannot be used",
4920
+ "description": "The Environment's credential for the URL cannot be used",
6137
4921
  "content": {
6138
4922
  "application/json": {
6139
4923
  "schema": {
@@ -6194,10 +4978,10 @@
6194
4978
  {
6195
4979
  "schema": {
6196
4980
  "type": "string",
6197
- "description": "The protocol version, `10`"
4981
+ "description": "The protocol version, `11`"
6198
4982
  },
6199
4983
  "required": true,
6200
- "description": "The protocol version, `10`",
4984
+ "description": "The protocol version, `11`",
6201
4985
  "name": "Nylorun-Protocol",
6202
4986
  "in": "header"
6203
4987
  }
@@ -6296,10 +5080,10 @@
6296
5080
  {
6297
5081
  "schema": {
6298
5082
  "type": "string",
6299
- "description": "The protocol version, `10`"
5083
+ "description": "The protocol version, `11`"
6300
5084
  },
6301
5085
  "required": true,
6302
- "description": "The protocol version, `10`",
5086
+ "description": "The protocol version, `11`",
6303
5087
  "name": "Nylorun-Protocol",
6304
5088
  "in": "header"
6305
5089
  }
@@ -6418,10 +5202,10 @@
6418
5202
  {
6419
5203
  "schema": {
6420
5204
  "type": "string",
6421
- "description": "The protocol version, `10`"
5205
+ "description": "The protocol version, `11`"
6422
5206
  },
6423
5207
  "required": true,
6424
- "description": "The protocol version, `10`",
5208
+ "description": "The protocol version, `11`",
6425
5209
  "name": "Nylorun-Protocol",
6426
5210
  "in": "header"
6427
5211
  }
@@ -6518,7 +5302,7 @@
6518
5302
  "tags": [
6519
5303
  "Settings"
6520
5304
  ],
6521
- "summary": "Get the Tenant's sandbox configuration",
5305
+ "summary": "Get the Tenant's sandbox backend and Environment settings",
6522
5306
  "security": [
6523
5307
  {
6524
5308
  "managementKey": []
@@ -6532,10 +5316,10 @@
6532
5316
  {
6533
5317
  "schema": {
6534
5318
  "type": "string",
6535
- "description": "The protocol version, `10`"
5319
+ "description": "The protocol version, `11`"
6536
5320
  },
6537
5321
  "required": true,
6538
- "description": "The protocol version, `10`",
5322
+ "description": "The protocol version, `11`",
6539
5323
  "name": "Nylorun-Protocol",
6540
5324
  "in": "header"
6541
5325
  }
@@ -6617,8 +5401,8 @@
6617
5401
  "tags": [
6618
5402
  "Settings"
6619
5403
  ],
6620
- "summary": "Set the Tenant's sandbox configuration",
6621
- "description": "What a session gets when it names no sandbox, and the limits every session's sandbox must fit.",
5404
+ "summary": "Set the Tenant's Environment settings",
5405
+ "description": "The limits every Environment's recipe must fit, the pods' stop grace and where harnesses may run (Tenant setting `environments.config`).",
6622
5406
  "security": [
6623
5407
  {
6624
5408
  "managementKey": []
@@ -6632,10 +5416,10 @@
6632
5416
  {
6633
5417
  "schema": {
6634
5418
  "type": "string",
6635
- "description": "The protocol version, `10`"
5419
+ "description": "The protocol version, `11`"
6636
5420
  },
6637
5421
  "required": true,
6638
- "description": "The protocol version, `10`",
5422
+ "description": "The protocol version, `11`",
6639
5423
  "name": "Nylorun-Protocol",
6640
5424
  "in": "header"
6641
5425
  }
@@ -6645,7 +5429,7 @@
6645
5429
  "content": {
6646
5430
  "application/json": {
6647
5431
  "schema": {
6648
- "$ref": "#/components/schemas/PutTenantSandboxRequest"
5432
+ "$ref": "#/components/schemas/PutTenantEnvironmentsRequest"
6649
5433
  }
6650
5434
  }
6651
5435
  }
@@ -6743,10 +5527,10 @@
6743
5527
  {
6744
5528
  "schema": {
6745
5529
  "type": "string",
6746
- "description": "The protocol version, `10`"
5530
+ "description": "The protocol version, `11`"
6747
5531
  },
6748
5532
  "required": true,
6749
- "description": "The protocol version, `10`",
5533
+ "description": "The protocol version, `11`",
6750
5534
  "name": "Nylorun-Protocol",
6751
5535
  "in": "header"
6752
5536
  }
@@ -6843,10 +5627,10 @@
6843
5627
  {
6844
5628
  "schema": {
6845
5629
  "type": "string",
6846
- "description": "The protocol version, `10`"
5630
+ "description": "The protocol version, `11`"
6847
5631
  },
6848
5632
  "required": true,
6849
- "description": "The protocol version, `10`",
5633
+ "description": "The protocol version, `11`",
6850
5634
  "name": "Nylorun-Protocol",
6851
5635
  "in": "header"
6852
5636
  }
@@ -6951,12 +5735,16 @@
6951
5735
  "description": "Model providers, their credentials, the model the Tenant uses, what it spent, every model call for export, and the budgets that cap it. `admin.models`."
6952
5736
  },
6953
5737
  {
6954
- "name": "Vaults",
6955
- "description": "The installation's and each person's credentials for agents' tools: API keys, bound to the URL they are sent to. Sessions attach a vault by id. `admin.vaults`."
5738
+ "name": "Tool policy",
5739
+ "description": "The rules the Tool Gate applies to every MCP and HTTP tool call of every harness: refuse it, hold it for a person's approval, or run it. `admin.toolPolicy`."
5740
+ },
5741
+ {
5742
+ "name": "Credential coverage",
5743
+ "description": "Which secret of an Environment each of an agent's MCP servers and HTTP tools would get, before a session opens. The secrets themselves are written on the Runtime API. `admin.coverage`."
6956
5744
  },
6957
5745
  {
6958
5746
  "name": "MCP servers",
6959
- "description": "See a remote MCP server's tools before an agent names it, with the installation vault's credential for its URL: their model names, sizes and annotations, or that it needs a person's sign-in. `admin.mcp`."
5747
+ "description": "See a remote MCP server's tools before an agent names it, with an Environment's credential for its URL: their model names, sizes and annotations, or that it needs a person's sign-in. `admin.mcp`."
6960
5748
  },
6961
5749
  {
6962
5750
  "name": "Signing keys",
@@ -6964,7 +5752,7 @@
6964
5752
  },
6965
5753
  {
6966
5754
  "name": "Settings",
6967
- "description": "The Tenant's sandbox and artifact settings. `admin.settings`."
5755
+ "description": "The Tenant's sandbox backend, Environment and artifact settings. `admin.settings`."
6968
5756
  }
6969
5757
  ]
6970
5758
  }