@nylorun/runtime 0.20.0-beta → 0.21.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +19 -12
  3. package/dist/adapters/execution/restate.js +26 -1
  4. package/dist/api/components.d.ts +155 -36
  5. package/dist/api/components.js +3 -3
  6. package/dist/api/http/app.js +2 -0
  7. package/dist/api/http/routes/mcp.d.ts +9 -0
  8. package/dist/api/http/routes/mcp.js +32 -0
  9. package/dist/api/http/routes/vaults.d.ts +1 -9
  10. package/dist/api/http/routes/vaults.js +3 -103
  11. package/dist/api/openapi.js +6 -3
  12. package/dist/artifacts/media-types.d.ts +2 -0
  13. package/dist/artifacts/media-types.js +5 -0
  14. package/dist/core/flow-host.d.ts +2 -3
  15. package/dist/core/flow-host.js +10 -7
  16. package/dist/execution/types.d.ts +13 -5
  17. package/dist/execution/types.js +13 -5
  18. package/dist/gates/http-tool.d.ts +7 -0
  19. package/dist/gates/http-tool.js +34 -3
  20. package/dist/gates/mcp-handler.d.ts +4 -1
  21. package/dist/gates/mcp-handler.js +64 -8
  22. package/dist/gates/tenant-vaults.d.ts +9 -15
  23. package/dist/gates/tenant-vaults.js +9 -17
  24. package/dist/gates/tool-client.js +36 -17
  25. package/dist/gates/tool-contract.d.ts +19 -3
  26. package/dist/gates/tool-contract.js +9 -3
  27. package/dist/gates/tool-gate.d.ts +2 -2
  28. package/dist/harness/calls.d.ts +2 -0
  29. package/dist/harness/calls.js +13 -3
  30. package/dist/harness-api/record.d.ts +7 -6
  31. package/dist/harness-api/record.js +99 -17
  32. package/dist/harness-api/server.js +35 -27
  33. package/dist/harness-api/start.js +2 -1
  34. package/dist/host/config-for.d.ts +0 -2
  35. package/dist/host/config-for.js +0 -1
  36. package/dist/host/create-host.d.ts +1 -1
  37. package/dist/host/create-host.js +2 -1
  38. package/dist/host/gates.js +0 -1
  39. package/dist/host/http.d.ts +0 -1
  40. package/dist/host/http.js +0 -6
  41. package/dist/host/main.js +13 -3
  42. package/dist/host/stack-config.d.ts +7 -8
  43. package/dist/host/stack-config.js +50 -92
  44. package/dist/index.d.ts +0 -1
  45. package/dist/keys/client.js +1 -9
  46. package/dist/keys/keys.d.ts +11 -13
  47. package/dist/keys/keys.js +5 -7
  48. package/dist/management-openapi.json +315 -345
  49. package/dist/mcp/connect.d.ts +159 -13
  50. package/dist/mcp/connect.js +538 -55
  51. package/dist/mcp/pool.d.ts +11 -2
  52. package/dist/mcp/pool.js +74 -27
  53. package/dist/mcp/preview.d.ts +35 -0
  54. package/dist/mcp/preview.js +215 -0
  55. package/dist/mcp/snapshot.d.ts +79 -5
  56. package/dist/mcp/snapshot.js +145 -27
  57. package/dist/model/catalog.d.ts +14 -0
  58. package/dist/model/catalog.js +14 -1
  59. package/dist/model/pi-model.js +36 -2
  60. package/dist/openapi.json +362 -123
  61. package/dist/redact.d.ts +19 -1
  62. package/dist/redact.js +42 -13
  63. package/dist/sandbox/session-sandbox.d.ts +7 -0
  64. package/dist/sandbox/session-sandbox.js +89 -28
  65. package/dist/store/postgres/drizzle/0016_mcp_oauth_removed.sql +5 -0
  66. package/dist/store/postgres/drizzle/0017_wake_outbox.sql +9 -0
  67. package/dist/store/postgres/drizzle/meta/_journal.json +14 -0
  68. package/dist/store/postgres/schema.d.ts +105 -261
  69. package/dist/store/postgres/schema.js +18 -36
  70. package/dist/store/postgres/store.js +54 -21
  71. package/dist/store/postgres/tenant.d.ts +14 -0
  72. package/dist/store/postgres/tenant.js +22 -2
  73. package/dist/store/types.d.ts +48 -13
  74. package/dist/tenant/advance.js +1 -4
  75. package/dist/tenant/artifact-tool.d.ts +9 -1
  76. package/dist/tenant/artifact-tool.js +113 -9
  77. package/dist/tenant/commands.js +5 -5
  78. package/dist/tenant/context.d.ts +15 -13
  79. package/dist/tenant/effects.d.ts +2 -2
  80. package/dist/tenant/effects.js +20 -5
  81. package/dist/tenant/ephemeral.d.ts +0 -6
  82. package/dist/tenant/ephemeral.js +0 -1
  83. package/dist/tenant/outbound.d.ts +14 -5
  84. package/dist/tenant/outbound.js +21 -9
  85. package/dist/tenant/runtime.js +11 -15
  86. package/dist/tenant/sessions.js +20 -3
  87. package/dist/tenant/store-pg.js +9 -0
  88. package/dist/tenant/sweep.d.ts +14 -0
  89. package/dist/tenant/sweep.js +69 -10
  90. package/dist/tenant/tool-results.d.ts +57 -0
  91. package/dist/tenant/tool-results.js +298 -0
  92. package/dist/tenant/tool-search.d.ts +43 -0
  93. package/dist/tenant/tool-search.js +100 -0
  94. package/dist/tenant/transcript.d.ts +108 -0
  95. package/dist/tenant/transcript.js +13 -0
  96. package/dist/tenant/types.d.ts +0 -14
  97. package/dist/vault/crypto.d.ts +0 -7
  98. package/dist/vault/crypto.js +0 -16
  99. package/dist/vault/headers.d.ts +17 -0
  100. package/dist/vault/headers.js +61 -0
  101. package/dist/vault/service.d.ts +11 -68
  102. package/dist/vault/service.js +83 -438
  103. package/dist/vault/sources.d.ts +20 -48
  104. package/dist/vault/sources.js +25 -189
  105. package/dist/version.d.ts +1 -1
  106. package/dist/version.js +1 -1
  107. package/package.json +3 -3
  108. package/dist/vault/oauth.d.ts +0 -55
  109. package/dist/vault/oauth.js +0 -186
@@ -2,10 +2,10 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Management API",
5
- "version": "0.20.0-beta",
5
+ "version": "0.21.1-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 4,
8
- "max": 9,
8
+ "max": 10,
9
9
  "features": [
10
10
  "runtime-tenants",
11
11
  "admin-status",
@@ -94,10 +94,9 @@
94
94
  "sandbox_lost",
95
95
  "sandbox_expired",
96
96
  "issuer_unavailable",
97
- "oauth_client_required",
98
- "oauth_state_invalid",
99
- "oauth_failed",
100
97
  "definition_files_missing",
98
+ "credential_rejected",
99
+ "mcp_preview_failed",
101
100
  "internal_error"
102
101
  ]
103
102
  },
@@ -2114,7 +2113,7 @@
2114
2113
  "type": "string",
2115
2114
  "enum": [
2116
2115
  "bearer",
2117
- "oauth"
2116
+ "headers"
2118
2117
  ]
2119
2118
  },
2120
2119
  "binding": {
@@ -2129,9 +2128,28 @@
2129
2128
  ],
2130
2129
  "additionalProperties": false
2131
2130
  },
2132
- "expiresAt": {
2131
+ "headerNames": {
2132
+ "type": "array",
2133
+ "items": {
2134
+ "type": "string"
2135
+ }
2136
+ },
2137
+ "via": {
2133
2138
  "type": "string"
2134
2139
  },
2140
+ "identity": {
2141
+ "type": "object",
2142
+ "properties": {
2143
+ "header": {
2144
+ "type": "string",
2145
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "header"
2150
+ ],
2151
+ "additionalProperties": false
2152
+ },
2135
2153
  "createdAt": {
2136
2154
  "type": "string"
2137
2155
  },
@@ -2183,6 +2201,22 @@
2183
2201
  "token": {
2184
2202
  "type": "string",
2185
2203
  "minLength": 1
2204
+ },
2205
+ "via": {
2206
+ "type": "string"
2207
+ },
2208
+ "identity": {
2209
+ "type": "object",
2210
+ "properties": {
2211
+ "header": {
2212
+ "type": "string",
2213
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2214
+ }
2215
+ },
2216
+ "required": [
2217
+ "header"
2218
+ ],
2219
+ "additionalProperties": false
2186
2220
  }
2187
2221
  },
2188
2222
  "required": [
@@ -2198,104 +2232,33 @@
2198
2232
  "type": {
2199
2233
  "type": "string",
2200
2234
  "enum": [
2201
- "oauth"
2235
+ "headers"
2202
2236
  ]
2203
2237
  },
2204
2238
  "url": {
2205
2239
  "type": "string",
2206
2240
  "minLength": 1
2207
2241
  },
2208
- "accessToken": {
2209
- "type": "string",
2210
- "minLength": 1
2242
+ "headers": {
2243
+ "type": "object",
2244
+ "additionalProperties": {
2245
+ "type": "string",
2246
+ "minLength": 1
2247
+ }
2211
2248
  },
2212
- "expiresAt": {
2213
- "type": [
2214
- "string",
2215
- "null"
2216
- ],
2217
- "minLength": 1
2249
+ "via": {
2250
+ "type": "string"
2218
2251
  },
2219
- "refresh": {
2252
+ "identity": {
2220
2253
  "type": "object",
2221
2254
  "properties": {
2222
- "tokenEndpoint": {
2223
- "type": "string",
2224
- "minLength": 1
2225
- },
2226
- "clientId": {
2255
+ "header": {
2227
2256
  "type": "string",
2228
- "minLength": 1
2229
- },
2230
- "refreshToken": {
2231
- "type": "string",
2232
- "minLength": 1
2233
- },
2234
- "tokenEndpointAuth": {
2235
- "oneOf": [
2236
- {
2237
- "type": "object",
2238
- "properties": {
2239
- "type": {
2240
- "type": "string",
2241
- "enum": [
2242
- "none"
2243
- ]
2244
- }
2245
- },
2246
- "required": [
2247
- "type"
2248
- ],
2249
- "additionalProperties": false
2250
- },
2251
- {
2252
- "type": "object",
2253
- "properties": {
2254
- "type": {
2255
- "type": "string",
2256
- "enum": [
2257
- "client_secret_basic"
2258
- ]
2259
- },
2260
- "clientSecret": {
2261
- "type": "string",
2262
- "minLength": 1
2263
- }
2264
- },
2265
- "required": [
2266
- "type",
2267
- "clientSecret"
2268
- ],
2269
- "additionalProperties": false
2270
- },
2271
- {
2272
- "type": "object",
2273
- "properties": {
2274
- "type": {
2275
- "type": "string",
2276
- "enum": [
2277
- "client_secret_post"
2278
- ]
2279
- },
2280
- "clientSecret": {
2281
- "type": "string",
2282
- "minLength": 1
2283
- }
2284
- },
2285
- "required": [
2286
- "type",
2287
- "clientSecret"
2288
- ],
2289
- "additionalProperties": false
2290
- }
2291
- ]
2257
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2292
2258
  }
2293
2259
  },
2294
2260
  "required": [
2295
- "tokenEndpoint",
2296
- "clientId",
2297
- "refreshToken",
2298
- "tokenEndpointAuth"
2261
+ "header"
2299
2262
  ],
2300
2263
  "additionalProperties": false
2301
2264
  }
@@ -2303,7 +2266,7 @@
2303
2266
  "required": [
2304
2267
  "type",
2305
2268
  "url",
2306
- "accessToken"
2269
+ "headers"
2307
2270
  ],
2308
2271
  "additionalProperties": false
2309
2272
  }
@@ -2339,7 +2302,7 @@
2339
2302
  "type": "string",
2340
2303
  "enum": [
2341
2304
  "bearer",
2342
- "oauth"
2305
+ "headers"
2343
2306
  ]
2344
2307
  },
2345
2308
  "binding": {
@@ -2354,9 +2317,28 @@
2354
2317
  ],
2355
2318
  "additionalProperties": false
2356
2319
  },
2357
- "expiresAt": {
2320
+ "headerNames": {
2321
+ "type": "array",
2322
+ "items": {
2323
+ "type": "string"
2324
+ }
2325
+ },
2326
+ "via": {
2358
2327
  "type": "string"
2359
2328
  },
2329
+ "identity": {
2330
+ "type": "object",
2331
+ "properties": {
2332
+ "header": {
2333
+ "type": "string",
2334
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2335
+ }
2336
+ },
2337
+ "required": [
2338
+ "header"
2339
+ ],
2340
+ "additionalProperties": false
2341
+ },
2360
2342
  "createdAt": {
2361
2343
  "type": "string"
2362
2344
  },
@@ -2407,6 +2389,28 @@
2407
2389
  "token": {
2408
2390
  "type": "string",
2409
2391
  "minLength": 1
2392
+ },
2393
+ "via": {
2394
+ "type": [
2395
+ "string",
2396
+ "null"
2397
+ ]
2398
+ },
2399
+ "identity": {
2400
+ "type": [
2401
+ "object",
2402
+ "null"
2403
+ ],
2404
+ "properties": {
2405
+ "header": {
2406
+ "type": "string",
2407
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2408
+ }
2409
+ },
2410
+ "required": [
2411
+ "header"
2412
+ ],
2413
+ "additionalProperties": false
2410
2414
  }
2411
2415
  },
2412
2416
  "required": [
@@ -2421,24 +2425,42 @@
2421
2425
  "type": {
2422
2426
  "type": "string",
2423
2427
  "enum": [
2424
- "oauth"
2428
+ "headers"
2425
2429
  ]
2426
2430
  },
2427
- "accessToken": {
2428
- "type": "string",
2429
- "minLength": 1
2431
+ "headers": {
2432
+ "type": "object",
2433
+ "additionalProperties": {
2434
+ "type": "string",
2435
+ "minLength": 1
2436
+ }
2430
2437
  },
2431
- "expiresAt": {
2438
+ "via": {
2432
2439
  "type": [
2433
2440
  "string",
2434
2441
  "null"
2442
+ ]
2443
+ },
2444
+ "identity": {
2445
+ "type": [
2446
+ "object",
2447
+ "null"
2435
2448
  ],
2436
- "minLength": 1
2449
+ "properties": {
2450
+ "header": {
2451
+ "type": "string",
2452
+ "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
2453
+ }
2454
+ },
2455
+ "required": [
2456
+ "header"
2457
+ ],
2458
+ "additionalProperties": false
2437
2459
  }
2438
2460
  },
2439
2461
  "required": [
2440
2462
  "type",
2441
- "accessToken"
2463
+ "headers"
2442
2464
  ],
2443
2465
  "additionalProperties": false
2444
2466
  }
@@ -2452,44 +2474,134 @@
2452
2474
  ],
2453
2475
  "additionalProperties": false
2454
2476
  },
2455
- "StartOAuthResponse": {
2477
+ "McpPreview": {
2456
2478
  "type": "object",
2457
2479
  "properties": {
2458
- "authorizeUrl": {
2480
+ "name": {
2459
2481
  "type": "string"
2460
2482
  },
2461
- "expiresAt": {
2483
+ "url": {
2484
+ "type": "string"
2485
+ },
2486
+ "type": {
2487
+ "type": "string",
2488
+ "enum": [
2489
+ "streamable-http",
2490
+ "sse"
2491
+ ]
2492
+ },
2493
+ "credentialSent": {
2494
+ "type": "boolean"
2495
+ },
2496
+ "serverInfo": {
2497
+ "type": "object",
2498
+ "additionalProperties": {}
2499
+ },
2500
+ "instructions": {
2462
2501
  "type": "string"
2502
+ },
2503
+ "tools": {
2504
+ "type": "array",
2505
+ "items": {
2506
+ "type": "object",
2507
+ "properties": {
2508
+ "serverToolName": {
2509
+ "type": "string"
2510
+ },
2511
+ "modelName": {
2512
+ "type": "string"
2513
+ },
2514
+ "description": {
2515
+ "type": "string"
2516
+ },
2517
+ "annotations": {
2518
+ "type": "object",
2519
+ "additionalProperties": {}
2520
+ },
2521
+ "schemaBytes": {
2522
+ "type": "integer",
2523
+ "minimum": 0
2524
+ }
2525
+ },
2526
+ "required": [
2527
+ "serverToolName",
2528
+ "schemaBytes"
2529
+ ],
2530
+ "additionalProperties": false
2531
+ }
2532
+ },
2533
+ "renamed": {
2534
+ "type": "array",
2535
+ "items": {
2536
+ "type": "object",
2537
+ "properties": {
2538
+ "serverToolName": {
2539
+ "type": "string"
2540
+ },
2541
+ "name": {
2542
+ "type": "string"
2543
+ }
2544
+ },
2545
+ "required": [
2546
+ "serverToolName",
2547
+ "name"
2548
+ ],
2549
+ "additionalProperties": false
2550
+ }
2551
+ },
2552
+ "authRequired": {
2553
+ "type": "object",
2554
+ "properties": {
2555
+ "resourceMetadataUrl": {
2556
+ "type": "string"
2557
+ },
2558
+ "resourceMetadata": {
2559
+ "type": "object",
2560
+ "additionalProperties": {}
2561
+ }
2562
+ },
2563
+ "additionalProperties": false
2463
2564
  }
2464
2565
  },
2465
2566
  "required": [
2466
- "authorizeUrl",
2467
- "expiresAt"
2567
+ "name",
2568
+ "url",
2569
+ "type",
2570
+ "credentialSent",
2571
+ "tools",
2572
+ "renamed"
2468
2573
  ],
2469
2574
  "additionalProperties": false
2470
2575
  },
2471
- "StartOAuthRequest": {
2576
+ "McpPreviewRequest": {
2472
2577
  "type": "object",
2473
2578
  "properties": {
2579
+ "requestId": {
2580
+ "type": "string",
2581
+ "minLength": 1
2582
+ },
2474
2583
  "url": {
2475
2584
  "type": "string",
2476
- "minLength": 1,
2477
- "maxLength": 2048
2585
+ "minLength": 1
2478
2586
  },
2479
- "server": {
2587
+ "type": {
2480
2588
  "type": "string",
2481
- "minLength": 1,
2482
- "maxLength": 128
2589
+ "enum": [
2590
+ "streamable-http",
2591
+ "sse"
2592
+ ]
2483
2593
  },
2484
- "clientId": {
2594
+ "name": {
2485
2595
  "type": "string",
2486
- "minLength": 1,
2487
- "maxLength": 512
2596
+ "pattern": "^[A-Za-z0-9_-]{1,64}$"
2597
+ },
2598
+ "vaultId": {
2599
+ "type": "string",
2600
+ "minLength": 1
2488
2601
  }
2489
2602
  },
2490
2603
  "required": [
2491
- "url",
2492
- "server"
2604
+ "url"
2493
2605
  ],
2494
2606
  "additionalProperties": false
2495
2607
  },
@@ -2964,10 +3076,10 @@
2964
3076
  {
2965
3077
  "schema": {
2966
3078
  "type": "string",
2967
- "description": "The protocol version, `9`"
3079
+ "description": "The protocol version, `10`"
2968
3080
  },
2969
3081
  "required": true,
2970
- "description": "The protocol version, `9`",
3082
+ "description": "The protocol version, `10`",
2971
3083
  "name": "Nylorun-Protocol",
2972
3084
  "in": "header"
2973
3085
  }
@@ -3066,10 +3178,10 @@
3066
3178
  {
3067
3179
  "schema": {
3068
3180
  "type": "string",
3069
- "description": "The protocol version, `9`"
3181
+ "description": "The protocol version, `10`"
3070
3182
  },
3071
3183
  "required": true,
3072
- "description": "The protocol version, `9`",
3184
+ "description": "The protocol version, `10`",
3073
3185
  "name": "Nylorun-Protocol",
3074
3186
  "in": "header"
3075
3187
  }
@@ -3178,10 +3290,10 @@
3178
3290
  {
3179
3291
  "schema": {
3180
3292
  "type": "string",
3181
- "description": "The protocol version, `9`"
3293
+ "description": "The protocol version, `10`"
3182
3294
  },
3183
3295
  "required": true,
3184
- "description": "The protocol version, `9`",
3296
+ "description": "The protocol version, `10`",
3185
3297
  "name": "Nylorun-Protocol",
3186
3298
  "in": "header"
3187
3299
  }
@@ -3299,10 +3411,10 @@
3299
3411
  {
3300
3412
  "schema": {
3301
3413
  "type": "string",
3302
- "description": "The protocol version, `9`"
3414
+ "description": "The protocol version, `10`"
3303
3415
  },
3304
3416
  "required": true,
3305
- "description": "The protocol version, `9`",
3417
+ "description": "The protocol version, `10`",
3306
3418
  "name": "Nylorun-Protocol",
3307
3419
  "in": "header"
3308
3420
  },
@@ -3434,10 +3546,10 @@
3434
3546
  {
3435
3547
  "schema": {
3436
3548
  "type": "string",
3437
- "description": "The protocol version, `9`"
3549
+ "description": "The protocol version, `10`"
3438
3550
  },
3439
3551
  "required": true,
3440
- "description": "The protocol version, `9`",
3552
+ "description": "The protocol version, `10`",
3441
3553
  "name": "Nylorun-Protocol",
3442
3554
  "in": "header"
3443
3555
  }
@@ -3546,10 +3658,10 @@
3546
3658
  {
3547
3659
  "schema": {
3548
3660
  "type": "string",
3549
- "description": "The protocol version, `9`"
3661
+ "description": "The protocol version, `10`"
3550
3662
  },
3551
3663
  "required": true,
3552
- "description": "The protocol version, `9`",
3664
+ "description": "The protocol version, `10`",
3553
3665
  "name": "Nylorun-Protocol",
3554
3666
  "in": "header"
3555
3667
  }
@@ -3649,10 +3761,10 @@
3649
3761
  {
3650
3762
  "schema": {
3651
3763
  "type": "string",
3652
- "description": "The protocol version, `9`"
3764
+ "description": "The protocol version, `10`"
3653
3765
  },
3654
3766
  "required": true,
3655
- "description": "The protocol version, `9`",
3767
+ "description": "The protocol version, `10`",
3656
3768
  "name": "Nylorun-Protocol",
3657
3769
  "in": "header"
3658
3770
  }
@@ -3743,10 +3855,10 @@
3743
3855
  {
3744
3856
  "schema": {
3745
3857
  "type": "string",
3746
- "description": "The protocol version, `9`"
3858
+ "description": "The protocol version, `10`"
3747
3859
  },
3748
3860
  "required": true,
3749
- "description": "The protocol version, `9`",
3861
+ "description": "The protocol version, `10`",
3750
3862
  "name": "Nylorun-Protocol",
3751
3863
  "in": "header"
3752
3864
  }
@@ -3844,10 +3956,10 @@
3844
3956
  {
3845
3957
  "schema": {
3846
3958
  "type": "string",
3847
- "description": "The protocol version, `9`"
3959
+ "description": "The protocol version, `10`"
3848
3960
  },
3849
3961
  "required": true,
3850
- "description": "The protocol version, `9`",
3962
+ "description": "The protocol version, `10`",
3851
3963
  "name": "Nylorun-Protocol",
3852
3964
  "in": "header"
3853
3965
  }
@@ -3945,10 +4057,10 @@
3945
4057
  {
3946
4058
  "schema": {
3947
4059
  "type": "string",
3948
- "description": "The protocol version, `9`"
4060
+ "description": "The protocol version, `10`"
3949
4061
  },
3950
4062
  "required": true,
3951
- "description": "The protocol version, `9`",
4063
+ "description": "The protocol version, `10`",
3952
4064
  "name": "Nylorun-Protocol",
3953
4065
  "in": "header"
3954
4066
  }
@@ -4044,10 +4156,10 @@
4044
4156
  {
4045
4157
  "schema": {
4046
4158
  "type": "string",
4047
- "description": "The protocol version, `9`"
4159
+ "description": "The protocol version, `10`"
4048
4160
  },
4049
4161
  "required": true,
4050
- "description": "The protocol version, `9`",
4162
+ "description": "The protocol version, `10`",
4051
4163
  "name": "Nylorun-Protocol",
4052
4164
  "in": "header"
4053
4165
  }
@@ -4155,10 +4267,10 @@
4155
4267
  {
4156
4268
  "schema": {
4157
4269
  "type": "string",
4158
- "description": "The protocol version, `9`"
4270
+ "description": "The protocol version, `10`"
4159
4271
  },
4160
4272
  "required": true,
4161
- "description": "The protocol version, `9`",
4273
+ "description": "The protocol version, `10`",
4162
4274
  "name": "Nylorun-Protocol",
4163
4275
  "in": "header"
4164
4276
  }
@@ -4304,10 +4416,10 @@
4304
4416
  {
4305
4417
  "schema": {
4306
4418
  "type": "string",
4307
- "description": "The protocol version, `9`"
4419
+ "description": "The protocol version, `10`"
4308
4420
  },
4309
4421
  "required": true,
4310
- "description": "The protocol version, `9`",
4422
+ "description": "The protocol version, `10`",
4311
4423
  "name": "Nylorun-Protocol",
4312
4424
  "in": "header"
4313
4425
  }
@@ -4424,10 +4536,10 @@
4424
4536
  {
4425
4537
  "schema": {
4426
4538
  "type": "string",
4427
- "description": "The protocol version, `9`"
4539
+ "description": "The protocol version, `10`"
4428
4540
  },
4429
4541
  "required": true,
4430
- "description": "The protocol version, `9`",
4542
+ "description": "The protocol version, `10`",
4431
4543
  "name": "Nylorun-Protocol",
4432
4544
  "in": "header"
4433
4545
  }
@@ -4525,10 +4637,10 @@
4525
4637
  {
4526
4638
  "schema": {
4527
4639
  "type": "string",
4528
- "description": "The protocol version, `9`"
4640
+ "description": "The protocol version, `10`"
4529
4641
  },
4530
4642
  "required": true,
4531
- "description": "The protocol version, `9`",
4643
+ "description": "The protocol version, `10`",
4532
4644
  "name": "Nylorun-Protocol",
4533
4645
  "in": "header"
4534
4646
  }
@@ -4625,10 +4737,10 @@
4625
4737
  {
4626
4738
  "schema": {
4627
4739
  "type": "string",
4628
- "description": "The protocol version, `9`"
4740
+ "description": "The protocol version, `10`"
4629
4741
  },
4630
4742
  "required": true,
4631
- "description": "The protocol version, `9`",
4743
+ "description": "The protocol version, `10`",
4632
4744
  "name": "Nylorun-Protocol",
4633
4745
  "in": "header"
4634
4746
  }
@@ -4737,10 +4849,10 @@
4737
4849
  {
4738
4850
  "schema": {
4739
4851
  "type": "string",
4740
- "description": "The protocol version, `9`"
4852
+ "description": "The protocol version, `10`"
4741
4853
  },
4742
4854
  "required": true,
4743
- "description": "The protocol version, `9`",
4855
+ "description": "The protocol version, `10`",
4744
4856
  "name": "Nylorun-Protocol",
4745
4857
  "in": "header"
4746
4858
  }
@@ -4860,10 +4972,10 @@
4860
4972
  {
4861
4973
  "schema": {
4862
4974
  "type": "string",
4863
- "description": "The protocol version, `9`"
4975
+ "description": "The protocol version, `10`"
4864
4976
  },
4865
4977
  "required": true,
4866
- "description": "The protocol version, `9`",
4978
+ "description": "The protocol version, `10`",
4867
4979
  "name": "Nylorun-Protocol",
4868
4980
  "in": "header"
4869
4981
  }
@@ -4969,10 +5081,10 @@
4969
5081
  {
4970
5082
  "schema": {
4971
5083
  "type": "string",
4972
- "description": "The protocol version, `9`"
5084
+ "description": "The protocol version, `10`"
4973
5085
  },
4974
5086
  "required": true,
4975
- "description": "The protocol version, `9`",
5087
+ "description": "The protocol version, `10`",
4976
5088
  "name": "Nylorun-Protocol",
4977
5089
  "in": "header"
4978
5090
  }
@@ -5076,10 +5188,10 @@
5076
5188
  {
5077
5189
  "schema": {
5078
5190
  "type": "string",
5079
- "description": "The protocol version, `9`"
5191
+ "description": "The protocol version, `10`"
5080
5192
  },
5081
5193
  "required": true,
5082
- "description": "The protocol version, `9`",
5194
+ "description": "The protocol version, `10`",
5083
5195
  "name": "Nylorun-Protocol",
5084
5196
  "in": "header"
5085
5197
  }
@@ -5164,7 +5276,7 @@
5164
5276
  "Vaults"
5165
5277
  ],
5166
5278
  "summary": "Add a credential",
5167
- "description": "A bearer token or OAuth tokens, bound to the URLs a tool may send them to.",
5279
+ "description": "A bearer token, bound to the URL a tool may send it to.",
5168
5280
  "security": [
5169
5281
  {
5170
5282
  "managementKey": []
@@ -5186,10 +5298,10 @@
5186
5298
  {
5187
5299
  "schema": {
5188
5300
  "type": "string",
5189
- "description": "The protocol version, `9`"
5301
+ "description": "The protocol version, `10`"
5190
5302
  },
5191
5303
  "required": true,
5192
- "description": "The protocol version, `9`",
5304
+ "description": "The protocol version, `10`",
5193
5305
  "name": "Nylorun-Protocol",
5194
5306
  "in": "header"
5195
5307
  }
@@ -5303,10 +5415,10 @@
5303
5415
  {
5304
5416
  "schema": {
5305
5417
  "type": "string",
5306
- "description": "The protocol version, `9`"
5418
+ "description": "The protocol version, `10`"
5307
5419
  },
5308
5420
  "required": true,
5309
- "description": "The protocol version, `9`",
5421
+ "description": "The protocol version, `10`",
5310
5422
  "name": "Nylorun-Protocol",
5311
5423
  "in": "header"
5312
5424
  }
@@ -5420,10 +5532,10 @@
5420
5532
  {
5421
5533
  "schema": {
5422
5534
  "type": "string",
5423
- "description": "The protocol version, `9`"
5535
+ "description": "The protocol version, `10`"
5424
5536
  },
5425
5537
  "required": true,
5426
- "description": "The protocol version, `9`",
5538
+ "description": "The protocol version, `10`",
5427
5539
  "name": "Nylorun-Protocol",
5428
5540
  "in": "header"
5429
5541
  }
@@ -5535,10 +5647,10 @@
5535
5647
  {
5536
5648
  "schema": {
5537
5649
  "type": "string",
5538
- "description": "The protocol version, `9`"
5650
+ "description": "The protocol version, `10`"
5539
5651
  },
5540
5652
  "required": true,
5541
- "description": "The protocol version, `9`",
5653
+ "description": "The protocol version, `10`",
5542
5654
  "name": "Nylorun-Protocol",
5543
5655
  "in": "header"
5544
5656
  }
@@ -5663,10 +5775,10 @@
5663
5775
  {
5664
5776
  "schema": {
5665
5777
  "type": "string",
5666
- "description": "The protocol version, `9`"
5778
+ "description": "The protocol version, `10`"
5667
5779
  },
5668
5780
  "required": true,
5669
- "description": "The protocol version, `9`",
5781
+ "description": "The protocol version, `10`",
5670
5782
  "name": "Nylorun-Protocol",
5671
5783
  "in": "header"
5672
5784
  }
@@ -5745,13 +5857,13 @@
5745
5857
  }
5746
5858
  }
5747
5859
  },
5748
- "/v1/tenant/vaults/{vaultId}/oauth/start": {
5860
+ "/v1/tenant/mcp/preview": {
5749
5861
  "post": {
5750
5862
  "tags": [
5751
- "Vaults"
5863
+ "MCP servers"
5752
5864
  ],
5753
- "summary": "Start an MCP OAuth connect",
5754
- "description": "Signs the installation in to the remote MCP server at `url` (declared as `server`) and stores its OAuth credential, bound to `url`, in this installation vault. The Runtime discovers the server's authorization server (RFC 9728, RFC 8414), registers itself (RFC 7591) unless `clientId` names a registered client, and answers the URL to open in a browser; the sign-in returns to `GET /v1/oauth/callback` within `expiresAt`. The callback URL is `NYLORUN_PUBLIC_URL` + `/v1/oauth/callback`, or this request's own origin when the Host has no public URL. Application keys acting for no one only. `oauth_client_required` when the server offers no registration and no `clientId` was given.",
5865
+ "summary": "Preview an MCP server's tools",
5866
+ "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.",
5755
5867
  "security": [
5756
5868
  {
5757
5869
  "managementKey": []
@@ -5762,21 +5874,13 @@
5762
5874
  ],
5763
5875
  "x-nylorun-scopes": "never",
5764
5876
  "parameters": [
5765
- {
5766
- "schema": {
5767
- "type": "string"
5768
- },
5769
- "required": true,
5770
- "name": "vaultId",
5771
- "in": "path"
5772
- },
5773
5877
  {
5774
5878
  "schema": {
5775
5879
  "type": "string",
5776
- "description": "The protocol version, `9`"
5880
+ "description": "The protocol version, `10`"
5777
5881
  },
5778
5882
  "required": true,
5779
- "description": "The protocol version, `9`",
5883
+ "description": "The protocol version, `10`",
5780
5884
  "name": "Nylorun-Protocol",
5781
5885
  "in": "header"
5782
5886
  }
@@ -5786,18 +5890,18 @@
5786
5890
  "content": {
5787
5891
  "application/json": {
5788
5892
  "schema": {
5789
- "$ref": "#/components/schemas/StartOAuthRequest"
5893
+ "$ref": "#/components/schemas/McpPreviewRequest"
5790
5894
  }
5791
5895
  }
5792
5896
  }
5793
5897
  },
5794
5898
  "responses": {
5795
5899
  "200": {
5796
- "description": "Where to send the browser",
5900
+ "description": "The server's tools, or that it needs a credential (`authRequired`)",
5797
5901
  "content": {
5798
5902
  "application/json": {
5799
5903
  "schema": {
5800
- "$ref": "#/components/schemas/StartOAuthResponse"
5904
+ "$ref": "#/components/schemas/McpPreview"
5801
5905
  }
5802
5906
  }
5803
5907
  }
@@ -5842,133 +5946,8 @@
5842
5946
  }
5843
5947
  }
5844
5948
  },
5845
- "426": {
5846
- "description": "`Nylorun-Protocol` missing or unsupported",
5847
- "content": {
5848
- "application/json": {
5849
- "schema": {
5850
- "$ref": "#/components/schemas/ProtocolRejected"
5851
- }
5852
- }
5853
- }
5854
- },
5855
- "502": {
5856
- "description": "The authorization server, or its discovery, failed or refused (`oauth_failed`)"
5857
- },
5858
- "503": {
5859
- "description": "The Tenant's storage or streams are unavailable",
5860
- "content": {
5861
- "application/json": {
5862
- "schema": {
5863
- "$ref": "#/components/schemas/Rejected"
5864
- }
5865
- }
5866
- }
5867
- }
5868
- }
5869
- }
5870
- },
5871
- "/v1/oauth/callback": {
5872
- "get": {
5873
- "tags": [
5874
- "Vaults"
5875
- ],
5876
- "summary": "Finish an MCP OAuth connect",
5877
- "description": "Where the authorization server sends the browser back with `code` and `state` (or `error`). Exchanges the code once and stores the credential; answers a small HTML page. Needs no credential and no `Nylorun-Protocol`. A `state` is used once, for ten minutes (`oauth_state_invalid`).",
5878
- "security": [
5879
- {
5880
- "applicationKey": []
5881
- },
5882
- {
5883
- "issuerToken": []
5884
- },
5885
- {}
5886
- ],
5887
- "x-nylorun-credentials": [
5888
- "application",
5889
- "subject",
5890
- "token"
5891
- ],
5892
- "x-nylorun-scopes": "any",
5893
- "parameters": [
5894
- {
5895
- "schema": {
5896
- "type": "string"
5897
- },
5898
- "required": false,
5899
- "name": "code",
5900
- "in": "query"
5901
- },
5902
- {
5903
- "schema": {
5904
- "type": "string"
5905
- },
5906
- "required": false,
5907
- "name": "state",
5908
- "in": "query"
5909
- },
5910
- {
5911
- "schema": {
5912
- "type": "string"
5913
- },
5914
- "required": false,
5915
- "name": "error",
5916
- "in": "query"
5917
- },
5918
- {
5919
- "schema": {
5920
- "type": "string",
5921
- "description": "The protocol version, `9`"
5922
- },
5923
- "required": false,
5924
- "description": "The protocol version, `9`",
5925
- "name": "Nylorun-Protocol",
5926
- "in": "header"
5927
- },
5928
- {
5929
- "schema": {
5930
- "type": "string",
5931
- "description": "The person an application key acts for"
5932
- },
5933
- "required": false,
5934
- "description": "The person an application key acts for",
5935
- "name": "Nylorun-Subject",
5936
- "in": "header"
5937
- },
5938
- {
5939
- "schema": {
5940
- "type": "string",
5941
- "description": "The subject's space-separated scopes; required with a subject"
5942
- },
5943
- "required": false,
5944
- "description": "The subject's space-separated scopes; required with a subject",
5945
- "name": "Nylorun-Scopes",
5946
- "in": "header"
5947
- }
5948
- ],
5949
- "responses": {
5950
- "200": {
5951
- "description": "Connected",
5952
- "content": {
5953
- "text/html": {
5954
- "schema": {
5955
- "type": "string"
5956
- }
5957
- }
5958
- }
5959
- },
5960
- "400": {
5961
- "description": "Invalid headers, path, body or cursor",
5962
- "content": {
5963
- "application/json": {
5964
- "schema": {
5965
- "$ref": "#/components/schemas/Rejected"
5966
- }
5967
- }
5968
- }
5969
- },
5970
- "401": {
5971
- "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`)",
5949
+ "409": {
5950
+ "description": "Several installation vaults hold a credential for the URL (name one with `vaultId`), or the one there cannot be used",
5972
5951
  "content": {
5973
5952
  "application/json": {
5974
5953
  "schema": {
@@ -5977,18 +5956,18 @@
5977
5956
  }
5978
5957
  }
5979
5958
  },
5980
- "403": {
5981
- "description": "Not allowed for this credential or subject scope (`scope_required`; a token also gets `WWW-Authenticate: Bearer error=\"insufficient_scope\"` and the scope), a key of the other API (`key_role_mismatch`), or an application key from a browser (`origin_rejected`)",
5959
+ "426": {
5960
+ "description": "`Nylorun-Protocol` missing or unsupported",
5982
5961
  "content": {
5983
5962
  "application/json": {
5984
5963
  "schema": {
5985
- "$ref": "#/components/schemas/Rejected"
5964
+ "$ref": "#/components/schemas/ProtocolRejected"
5986
5965
  }
5987
5966
  }
5988
5967
  }
5989
5968
  },
5990
- "404": {
5991
- "description": "Not found (`not_found`)",
5969
+ "502": {
5970
+ "description": "The server could not be listed (`mcp_preview_failed`): `details.failure` is the code a tool call would have failed with, such as `mcp.unreachable` for an address the Host refuses",
5992
5971
  "content": {
5993
5972
  "application/json": {
5994
5973
  "schema": {
@@ -5997,19 +5976,6 @@
5997
5976
  }
5998
5977
  }
5999
5978
  },
6000
- "426": {
6001
- "description": "`Nylorun-Protocol` missing or unsupported",
6002
- "content": {
6003
- "application/json": {
6004
- "schema": {
6005
- "$ref": "#/components/schemas/ProtocolRejected"
6006
- }
6007
- }
6008
- }
6009
- },
6010
- "502": {
6011
- "description": "The authorization server refused the code (`oauth_failed`)"
6012
- },
6013
5979
  "503": {
6014
5980
  "description": "The Tenant's storage or streams are unavailable",
6015
5981
  "content": {
@@ -6042,10 +6008,10 @@
6042
6008
  {
6043
6009
  "schema": {
6044
6010
  "type": "string",
6045
- "description": "The protocol version, `9`"
6011
+ "description": "The protocol version, `10`"
6046
6012
  },
6047
6013
  "required": true,
6048
- "description": "The protocol version, `9`",
6014
+ "description": "The protocol version, `10`",
6049
6015
  "name": "Nylorun-Protocol",
6050
6016
  "in": "header"
6051
6017
  }
@@ -6144,10 +6110,10 @@
6144
6110
  {
6145
6111
  "schema": {
6146
6112
  "type": "string",
6147
- "description": "The protocol version, `9`"
6113
+ "description": "The protocol version, `10`"
6148
6114
  },
6149
6115
  "required": true,
6150
- "description": "The protocol version, `9`",
6116
+ "description": "The protocol version, `10`",
6151
6117
  "name": "Nylorun-Protocol",
6152
6118
  "in": "header"
6153
6119
  }
@@ -6266,10 +6232,10 @@
6266
6232
  {
6267
6233
  "schema": {
6268
6234
  "type": "string",
6269
- "description": "The protocol version, `9`"
6235
+ "description": "The protocol version, `10`"
6270
6236
  },
6271
6237
  "required": true,
6272
- "description": "The protocol version, `9`",
6238
+ "description": "The protocol version, `10`",
6273
6239
  "name": "Nylorun-Protocol",
6274
6240
  "in": "header"
6275
6241
  }
@@ -6380,10 +6346,10 @@
6380
6346
  {
6381
6347
  "schema": {
6382
6348
  "type": "string",
6383
- "description": "The protocol version, `9`"
6349
+ "description": "The protocol version, `10`"
6384
6350
  },
6385
6351
  "required": true,
6386
- "description": "The protocol version, `9`",
6352
+ "description": "The protocol version, `10`",
6387
6353
  "name": "Nylorun-Protocol",
6388
6354
  "in": "header"
6389
6355
  }
@@ -6480,10 +6446,10 @@
6480
6446
  {
6481
6447
  "schema": {
6482
6448
  "type": "string",
6483
- "description": "The protocol version, `9`"
6449
+ "description": "The protocol version, `10`"
6484
6450
  },
6485
6451
  "required": true,
6486
- "description": "The protocol version, `9`",
6452
+ "description": "The protocol version, `10`",
6487
6453
  "name": "Nylorun-Protocol",
6488
6454
  "in": "header"
6489
6455
  }
@@ -6591,10 +6557,10 @@
6591
6557
  {
6592
6558
  "schema": {
6593
6559
  "type": "string",
6594
- "description": "The protocol version, `9`"
6560
+ "description": "The protocol version, `10`"
6595
6561
  },
6596
6562
  "required": true,
6597
- "description": "The protocol version, `9`",
6563
+ "description": "The protocol version, `10`",
6598
6564
  "name": "Nylorun-Protocol",
6599
6565
  "in": "header"
6600
6566
  }
@@ -6691,10 +6657,10 @@
6691
6657
  {
6692
6658
  "schema": {
6693
6659
  "type": "string",
6694
- "description": "The protocol version, `9`"
6660
+ "description": "The protocol version, `10`"
6695
6661
  },
6696
6662
  "required": true,
6697
- "description": "The protocol version, `9`",
6663
+ "description": "The protocol version, `10`",
6698
6664
  "name": "Nylorun-Protocol",
6699
6665
  "in": "header"
6700
6666
  }
@@ -6800,7 +6766,11 @@
6800
6766
  },
6801
6767
  {
6802
6768
  "name": "Vaults",
6803
- "description": "The installation's credentials for agents' tools: API keys and MCP OAuth connections. Sessions attach a vault by id. `admin.vaults`."
6769
+ "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`."
6770
+ },
6771
+ {
6772
+ "name": "MCP servers",
6773
+ "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`."
6804
6774
  },
6805
6775
  {
6806
6776
  "name": "Signing keys",