@nylorun/runtime 0.36.0-beta → 0.37.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 (59) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +10 -0
  3. package/dist/api/a2a/card.d.ts +10 -4
  4. package/dist/api/a2a/card.js +18 -6
  5. package/dist/api/a2a/endpoint.d.ts +5 -2
  6. package/dist/api/a2a/endpoint.js +31 -9
  7. package/dist/api/a2a/extensions.d.ts +41 -0
  8. package/dist/api/a2a/extensions.js +92 -0
  9. package/dist/api/a2a/list.d.ts +60 -0
  10. package/dist/api/a2a/list.js +169 -0
  11. package/dist/api/a2a/protocol.d.ts +105 -9
  12. package/dist/api/a2a/protocol.js +169 -18
  13. package/dist/api/a2a/push.d.ts +76 -0
  14. package/dist/api/a2a/push.js +305 -0
  15. package/dist/api/a2a/routes.d.ts +12 -6
  16. package/dist/api/a2a/routes.js +409 -112
  17. package/dist/api/a2a/tasks.d.ts +72 -4
  18. package/dist/api/a2a/tasks.js +305 -27
  19. package/dist/api/components.d.ts +532 -0
  20. package/dist/api/components.js +3 -1
  21. package/dist/api/http/app.js +2 -0
  22. package/dist/api/http/routes/artifacts.js +19 -0
  23. package/dist/api/http/routes/turns.d.ts +18 -0
  24. package/dist/api/http/routes/turns.js +67 -0
  25. package/dist/api/inbound-files.d.ts +12 -1
  26. package/dist/api/inbound-files.js +44 -0
  27. package/dist/api/openapi.js +7 -2
  28. package/dist/host/config-for.d.ts +2 -0
  29. package/dist/host/config-for.js +1 -0
  30. package/dist/host/main.js +1 -0
  31. package/dist/host/stack-config.d.ts +16 -0
  32. package/dist/host/stack-config.js +30 -0
  33. package/dist/management-openapi.json +5 -2
  34. package/dist/openapi.json +1485 -738
  35. package/dist/reads/types.d.ts +19 -0
  36. package/dist/store/postgres/drizzle/0039_a2a_push.sql +32 -0
  37. package/dist/store/postgres/drizzle/0040_turn_index.sql +23 -0
  38. package/dist/store/postgres/drizzle/0041_turn_index_backfill.sql +88 -0
  39. package/dist/store/postgres/drizzle/meta/_journal.json +21 -0
  40. package/dist/store/postgres/reads.js +41 -1
  41. package/dist/store/postgres/schema.d.ts +1296 -534
  42. package/dist/store/postgres/schema.js +92 -0
  43. package/dist/store/postgres/store.js +133 -3
  44. package/dist/store/postgres/turns.d.ts +62 -0
  45. package/dist/store/postgres/turns.js +153 -0
  46. package/dist/store/types.d.ts +73 -3
  47. package/dist/tenant/runtime.js +7 -5
  48. package/dist/tenant/session-model.d.ts +11 -1
  49. package/dist/tenant/session-model.js +34 -5
  50. package/dist/tenant/sessions.d.ts +2 -1
  51. package/dist/tenant/sessions.js +8 -2
  52. package/dist/tenant/sweep.d.ts +3 -0
  53. package/dist/tenant/sweep.js +39 -11
  54. package/dist/tenant/types.d.ts +23 -0
  55. package/dist/tuning.d.ts +9 -0
  56. package/dist/tuning.js +11 -0
  57. package/dist/version.d.ts +1 -1
  58. package/dist/version.js +1 -1
  59. package/package.json +3 -3
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Runtime API",
5
- "version": "0.36.0-beta",
5
+ "version": "0.37.0-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
@@ -22,6 +22,7 @@
22
22
  "subject-headers",
23
23
  "ag-ui-endpoint",
24
24
  "a2a-endpoint",
25
+ "a2a-profile-v2",
25
26
  "sandbox-pods",
26
27
  "trusted-issuers",
27
28
  "session-reads",
@@ -37,7 +38,9 @@
37
38
  "agent-folders",
38
39
  "session-model",
39
40
  "model-host-identity",
40
- "credential-provider"
41
+ "credential-provider",
42
+ "turns",
43
+ "agent-model"
41
44
  ]
42
45
  },
43
46
  "description": "For developers: agent manifests, Agents, sessions (with AG-UI and A2A) and artifacts, through `@nylorun/agents`. Every Tenant serves it on its one URL, beside the Management API (`/openapi/management.json`). Every request sends `Nylorun-Protocol`. Who may call each operation is its `security` and its `x-nylorun-credentials` and `x-nylorun-scopes` (the subject scopes that reach it) fields: an application key (servers) or a trusted issuer's token (browsers and apps)."
@@ -9060,6 +9063,9 @@
9060
9063
  {
9061
9064
  "$ref": "#/components/schemas/McpDiscoveredEvent"
9062
9065
  },
9066
+ {
9067
+ "$ref": "#/components/schemas/PlanUpdatedEvent"
9068
+ },
9063
9069
  {
9064
9070
  "$ref": "#/components/schemas/EnvironmentStateEvent"
9065
9071
  },
@@ -9126,6 +9132,7 @@
9126
9132
  "delegation.started": "#/components/schemas/DelegationStartedEvent",
9127
9133
  "delegation.completed": "#/components/schemas/DelegationCompletedEvent",
9128
9134
  "mcp.discovered": "#/components/schemas/McpDiscoveredEvent",
9135
+ "plan.updated": "#/components/schemas/PlanUpdatedEvent",
9129
9136
  "environment.state": "#/components/schemas/EnvironmentStateEvent",
9130
9137
  "environment.exec": "#/components/schemas/EnvironmentExecEvent",
9131
9138
  "agent.attached": "#/components/schemas/AgentAttachedEvent",
@@ -13972,7 +13979,7 @@
13972
13979
  "payload"
13973
13980
  ]
13974
13981
  },
13975
- "EnvironmentStateEvent": {
13982
+ "PlanUpdatedEvent": {
13976
13983
  "type": "object",
13977
13984
  "properties": {
13978
13985
  "schema": {
@@ -14127,46 +14134,48 @@
14127
14134
  "type": {
14128
14135
  "type": "string",
14129
14136
  "enum": [
14130
- "environment.state"
14137
+ "plan.updated"
14131
14138
  ]
14132
14139
  },
14133
14140
  "payload": {
14134
14141
  "type": "object",
14135
14142
  "properties": {
14136
- "state": {
14137
- "type": "string",
14138
- "enum": [
14139
- "creating",
14140
- "running",
14141
- "stopped"
14142
- ]
14143
- },
14144
- "backend": {
14145
- "type": "string"
14146
- },
14147
- "isolation": {
14148
- "type": "string"
14149
- },
14150
- "image": {
14151
- "type": "string"
14152
- },
14153
- "network": {},
14154
- "reattach": {
14155
- "type": "boolean"
14156
- },
14157
- "lost": {
14158
- "type": "boolean"
14159
- },
14160
- "note": {
14161
- "type": "string"
14162
- },
14163
- "error": {
14164
- "type": "string"
14143
+ "steps": {
14144
+ "type": "array",
14145
+ "items": {
14146
+ "type": "object",
14147
+ "properties": {
14148
+ "label": {
14149
+ "type": "string",
14150
+ "minLength": 1,
14151
+ "maxLength": 120
14152
+ },
14153
+ "state": {
14154
+ "type": "string",
14155
+ "enum": [
14156
+ "pending",
14157
+ "active",
14158
+ "done",
14159
+ "blocked",
14160
+ "skipped"
14161
+ ]
14162
+ },
14163
+ "note": {
14164
+ "type": "string",
14165
+ "maxLength": 280
14166
+ }
14167
+ },
14168
+ "required": [
14169
+ "label",
14170
+ "state"
14171
+ ],
14172
+ "additionalProperties": {}
14173
+ },
14174
+ "maxItems": 20
14165
14175
  }
14166
14176
  },
14167
14177
  "required": [
14168
- "state",
14169
- "backend"
14178
+ "steps"
14170
14179
  ],
14171
14180
  "additionalProperties": {}
14172
14181
  }
@@ -14192,7 +14201,7 @@
14192
14201
  "payload"
14193
14202
  ]
14194
14203
  },
14195
- "EnvironmentExecEvent": {
14204
+ "EnvironmentStateEvent": {
14196
14205
  "type": "object",
14197
14206
  "properties": {
14198
14207
  "schema": {
@@ -14347,33 +14356,46 @@
14347
14356
  "type": {
14348
14357
  "type": "string",
14349
14358
  "enum": [
14350
- "environment.exec"
14359
+ "environment.state"
14351
14360
  ]
14352
14361
  },
14353
14362
  "payload": {
14354
14363
  "type": "object",
14355
14364
  "properties": {
14356
- "tool": {
14365
+ "state": {
14366
+ "type": "string",
14367
+ "enum": [
14368
+ "creating",
14369
+ "running",
14370
+ "stopped"
14371
+ ]
14372
+ },
14373
+ "backend": {
14357
14374
  "type": "string"
14358
14375
  },
14359
- "command": {
14376
+ "isolation": {
14360
14377
  "type": "string"
14361
14378
  },
14362
- "outcome": {
14379
+ "image": {
14363
14380
  "type": "string"
14364
14381
  },
14365
- "code": {
14382
+ "network": {},
14383
+ "reattach": {
14384
+ "type": "boolean"
14385
+ },
14386
+ "lost": {
14387
+ "type": "boolean"
14388
+ },
14389
+ "note": {
14366
14390
  "type": "string"
14367
14391
  },
14368
- "durationMs": {
14369
- "type": "number",
14370
- "minimum": 0
14392
+ "error": {
14393
+ "type": "string"
14371
14394
  }
14372
14395
  },
14373
14396
  "required": [
14374
- "tool",
14375
- "outcome",
14376
- "durationMs"
14397
+ "state",
14398
+ "backend"
14377
14399
  ],
14378
14400
  "additionalProperties": {}
14379
14401
  }
@@ -14399,7 +14421,7 @@
14399
14421
  "payload"
14400
14422
  ]
14401
14423
  },
14402
- "AgentAttachedEvent": {
14424
+ "EnvironmentExecEvent": {
14403
14425
  "type": "object",
14404
14426
  "properties": {
14405
14427
  "schema": {
@@ -14554,18 +14576,33 @@
14554
14576
  "type": {
14555
14577
  "type": "string",
14556
14578
  "enum": [
14557
- "agent.attached"
14579
+ "environment.exec"
14558
14580
  ]
14559
14581
  },
14560
14582
  "payload": {
14561
14583
  "type": "object",
14562
14584
  "properties": {
14563
- "agentId": {
14585
+ "tool": {
14564
14586
  "type": "string"
14587
+ },
14588
+ "command": {
14589
+ "type": "string"
14590
+ },
14591
+ "outcome": {
14592
+ "type": "string"
14593
+ },
14594
+ "code": {
14595
+ "type": "string"
14596
+ },
14597
+ "durationMs": {
14598
+ "type": "number",
14599
+ "minimum": 0
14565
14600
  }
14566
14601
  },
14567
14602
  "required": [
14568
- "agentId"
14603
+ "tool",
14604
+ "outcome",
14605
+ "durationMs"
14569
14606
  ],
14570
14607
  "additionalProperties": {}
14571
14608
  }
@@ -14591,7 +14628,7 @@
14591
14628
  "payload"
14592
14629
  ]
14593
14630
  },
14594
- "NodeStartedEvent": {
14631
+ "AgentAttachedEvent": {
14595
14632
  "type": "object",
14596
14633
  "properties": {
14597
14634
  "schema": {
@@ -14746,29 +14783,18 @@
14746
14783
  "type": {
14747
14784
  "type": "string",
14748
14785
  "enum": [
14749
- "node.started"
14786
+ "agent.attached"
14750
14787
  ]
14751
14788
  },
14752
14789
  "payload": {
14753
14790
  "type": "object",
14754
14791
  "properties": {
14755
- "path": {
14756
- "type": "string"
14757
- },
14758
- "kind": {
14759
- "type": "string"
14760
- },
14761
- "key": {
14762
- "type": "string"
14763
- },
14764
- "iterations": {
14792
+ "agentId": {
14765
14793
  "type": "string"
14766
14794
  }
14767
14795
  },
14768
14796
  "required": [
14769
- "path",
14770
- "kind",
14771
- "key"
14797
+ "agentId"
14772
14798
  ],
14773
14799
  "additionalProperties": {}
14774
14800
  }
@@ -14794,7 +14820,7 @@
14794
14820
  "payload"
14795
14821
  ]
14796
14822
  },
14797
- "NodeCompletedEvent": {
14823
+ "NodeStartedEvent": {
14798
14824
  "type": "object",
14799
14825
  "properties": {
14800
14826
  "schema": {
@@ -14949,7 +14975,7 @@
14949
14975
  "type": {
14950
14976
  "type": "string",
14951
14977
  "enum": [
14952
- "node.completed"
14978
+ "node.started"
14953
14979
  ]
14954
14980
  },
14955
14981
  "payload": {
@@ -14966,46 +14992,12 @@
14966
14992
  },
14967
14993
  "iterations": {
14968
14994
  "type": "string"
14969
- },
14970
- "effectId": {
14971
- "type": "string",
14972
- "minLength": 1
14973
- },
14974
- "status": {
14975
- "type": "string",
14976
- "enum": [
14977
- "completed",
14978
- "failed",
14979
- "cancelled"
14980
- ]
14981
- },
14982
- "durationMs": {
14983
- "type": "integer",
14984
- "minimum": 0
14985
- },
14986
- "gate": {
14987
- "type": "object",
14988
- "properties": {
14989
- "startedAt": {
14990
- "type": "string"
14991
- },
14992
- "endedAt": {
14993
- "type": "string"
14994
- }
14995
- },
14996
- "required": [
14997
- "startedAt",
14998
- "endedAt"
14999
- ],
15000
- "additionalProperties": {}
15001
14995
  }
15002
14996
  },
15003
14997
  "required": [
15004
14998
  "path",
15005
14999
  "kind",
15006
- "key",
15007
- "effectId",
15008
- "status"
15000
+ "key"
15009
15001
  ],
15010
15002
  "additionalProperties": {}
15011
15003
  }
@@ -15031,7 +15023,7 @@
15031
15023
  "payload"
15032
15024
  ]
15033
15025
  },
15034
- "NodeAgentEvent": {
15026
+ "NodeCompletedEvent": {
15035
15027
  "type": "object",
15036
15028
  "properties": {
15037
15029
  "schema": {
@@ -15186,7 +15178,7 @@
15186
15178
  "type": {
15187
15179
  "type": "string",
15188
15180
  "enum": [
15189
- "node.agent"
15181
+ "node.completed"
15190
15182
  ]
15191
15183
  },
15192
15184
  "payload": {
@@ -15195,22 +15187,54 @@
15195
15187
  "path": {
15196
15188
  "type": "string"
15197
15189
  },
15198
- "iterations": {
15190
+ "kind": {
15199
15191
  "type": "string"
15200
15192
  },
15201
- "sessionId": {
15193
+ "key": {
15202
15194
  "type": "string"
15203
15195
  },
15204
- "turnId": {
15205
- "type": [
15206
- "string",
15207
- "null"
15196
+ "iterations": {
15197
+ "type": "string"
15198
+ },
15199
+ "effectId": {
15200
+ "type": "string",
15201
+ "minLength": 1
15202
+ },
15203
+ "status": {
15204
+ "type": "string",
15205
+ "enum": [
15206
+ "completed",
15207
+ "failed",
15208
+ "cancelled"
15208
15209
  ]
15210
+ },
15211
+ "durationMs": {
15212
+ "type": "integer",
15213
+ "minimum": 0
15214
+ },
15215
+ "gate": {
15216
+ "type": "object",
15217
+ "properties": {
15218
+ "startedAt": {
15219
+ "type": "string"
15220
+ },
15221
+ "endedAt": {
15222
+ "type": "string"
15223
+ }
15224
+ },
15225
+ "required": [
15226
+ "startedAt",
15227
+ "endedAt"
15228
+ ],
15229
+ "additionalProperties": {}
15209
15230
  }
15210
15231
  },
15211
15232
  "required": [
15212
15233
  "path",
15213
- "sessionId"
15234
+ "kind",
15235
+ "key",
15236
+ "effectId",
15237
+ "status"
15214
15238
  ],
15215
15239
  "additionalProperties": {}
15216
15240
  }
@@ -15236,7 +15260,7 @@
15236
15260
  "payload"
15237
15261
  ]
15238
15262
  },
15239
- "LoopIterationEvent": {
15263
+ "NodeAgentEvent": {
15240
15264
  "type": "object",
15241
15265
  "properties": {
15242
15266
  "schema": {
@@ -15391,7 +15415,7 @@
15391
15415
  "type": {
15392
15416
  "type": "string",
15393
15417
  "enum": [
15394
- "loop.iteration"
15418
+ "node.agent"
15395
15419
  ]
15396
15420
  },
15397
15421
  "payload": {
@@ -15400,22 +15424,22 @@
15400
15424
  "path": {
15401
15425
  "type": "string"
15402
15426
  },
15403
- "n": {
15404
- "type": "integer"
15427
+ "iterations": {
15428
+ "type": "string"
15405
15429
  },
15406
15430
  "sessionId": {
15407
15431
  "type": "string"
15408
15432
  },
15409
15433
  "turnId": {
15410
- "type": "string"
15411
- },
15412
- "manifestHash": {
15413
- "type": "string"
15434
+ "type": [
15435
+ "string",
15436
+ "null"
15437
+ ]
15414
15438
  }
15415
15439
  },
15416
15440
  "required": [
15417
15441
  "path",
15418
- "n"
15442
+ "sessionId"
15419
15443
  ],
15420
15444
  "additionalProperties": {}
15421
15445
  }
@@ -15441,7 +15465,7 @@
15441
15465
  "payload"
15442
15466
  ]
15443
15467
  },
15444
- "LoopVerifiedEvent": {
15468
+ "LoopIterationEvent": {
15445
15469
  "type": "object",
15446
15470
  "properties": {
15447
15471
  "schema": {
@@ -15596,7 +15620,7 @@
15596
15620
  "type": {
15597
15621
  "type": "string",
15598
15622
  "enum": [
15599
- "loop.verified"
15623
+ "loop.iteration"
15600
15624
  ]
15601
15625
  },
15602
15626
  "payload": {
@@ -15608,18 +15632,19 @@
15608
15632
  "n": {
15609
15633
  "type": "integer"
15610
15634
  },
15611
- "pass": {
15612
- "type": "boolean"
15635
+ "sessionId": {
15636
+ "type": "string"
15613
15637
  },
15614
- "feedback": {
15638
+ "turnId": {
15615
15639
  "type": "string"
15616
15640
  },
15617
- "data": {}
15641
+ "manifestHash": {
15642
+ "type": "string"
15643
+ }
15618
15644
  },
15619
15645
  "required": [
15620
15646
  "path",
15621
- "n",
15622
- "pass"
15647
+ "n"
15623
15648
  ],
15624
15649
  "additionalProperties": {}
15625
15650
  }
@@ -15645,7 +15670,7 @@
15645
15670
  "payload"
15646
15671
  ]
15647
15672
  },
15648
- "ArtifactCreatedEvent": {
15673
+ "LoopVerifiedEvent": {
15649
15674
  "type": "object",
15650
15675
  "properties": {
15651
15676
  "schema": {
@@ -15800,68 +15825,30 @@
15800
15825
  "type": {
15801
15826
  "type": "string",
15802
15827
  "enum": [
15803
- "artifact.created"
15828
+ "loop.verified"
15804
15829
  ]
15805
15830
  },
15806
15831
  "payload": {
15807
15832
  "type": "object",
15808
15833
  "properties": {
15809
- "artifactId": {
15810
- "type": "string"
15811
- },
15812
- "kind": {
15813
- "type": "string",
15814
- "enum": [
15815
- "file",
15816
- "folder"
15817
- ]
15818
- },
15819
- "name": {
15820
- "type": "string"
15821
- },
15822
- "contentType": {
15834
+ "path": {
15823
15835
  "type": "string"
15824
15836
  },
15825
- "version": {
15826
- "type": "integer",
15827
- "exclusiveMinimum": 0
15828
- },
15829
- "size": {
15830
- "type": "integer",
15831
- "minimum": 0
15832
- },
15833
- "sha256": {
15834
- "type": "string"
15837
+ "n": {
15838
+ "type": "integer"
15835
15839
  },
15836
- "source": {
15837
- "type": "string",
15838
- "enum": [
15839
- "upload",
15840
- "engine",
15841
- "export",
15842
- "snapshot"
15843
- ]
15840
+ "pass": {
15841
+ "type": "boolean"
15844
15842
  },
15845
- "callId": {
15843
+ "feedback": {
15846
15844
  "type": "string"
15847
15845
  },
15848
- "fileCount": {
15849
- "type": "integer",
15850
- "minimum": 0
15851
- },
15852
- "claimed": {
15853
- "type": "boolean"
15854
- }
15846
+ "data": {}
15855
15847
  },
15856
15848
  "required": [
15857
- "artifactId",
15858
- "kind",
15859
- "name",
15860
- "contentType",
15861
- "version",
15862
- "size",
15863
- "sha256",
15864
- "source"
15849
+ "path",
15850
+ "n",
15851
+ "pass"
15865
15852
  ],
15866
15853
  "additionalProperties": {}
15867
15854
  }
@@ -15887,7 +15874,7 @@
15887
15874
  "payload"
15888
15875
  ]
15889
15876
  },
15890
- "ArtifactVersionCreatedEvent": {
15877
+ "ArtifactCreatedEvent": {
15891
15878
  "type": "object",
15892
15879
  "properties": {
15893
15880
  "schema": {
@@ -16042,7 +16029,7 @@
16042
16029
  "type": {
16043
16030
  "type": "string",
16044
16031
  "enum": [
16045
- "artifact.version.created"
16032
+ "artifact.created"
16046
16033
  ]
16047
16034
  },
16048
16035
  "payload": {
@@ -16129,203 +16116,445 @@
16129
16116
  "payload"
16130
16117
  ]
16131
16118
  },
16132
- "ArtifactDeletedEvent": {
16133
- "type": "object",
16134
- "properties": {
16135
- "schema": {
16136
- "type": "string",
16137
- "enum": [
16138
- "nylorun.event/2"
16139
- ]
16140
- },
16141
- "eventId": {
16142
- "type": "string"
16143
- },
16144
- "tenantId": {
16145
- "type": "string",
16146
- "minLength": 1
16147
- },
16148
- "sessionId": {
16149
- "type": "string"
16150
- },
16151
- "runId": {
16152
- "type": [
16153
- "string",
16154
- "null"
16155
- ]
16156
- },
16157
- "turnId": {
16158
- "type": [
16159
- "string",
16160
- "null"
16161
- ]
16162
- },
16163
- "incarnation": {
16164
- "type": "integer",
16165
- "minimum": 0
16166
- },
16167
- "epoch": {
16168
- "type": "integer",
16169
- "minimum": 0
16170
- },
16171
- "seq": {
16172
- "type": "integer",
16173
- "minimum": 0
16174
- },
16175
- "cursor": {
16176
- "type": "string"
16177
- },
16178
- "time": {
16179
- "type": "string"
16180
- },
16181
- "schemaVersion": {
16182
- "type": "integer",
16183
- "exclusiveMinimum": 0
16184
- },
16185
- "source": {
16186
- "type": "object",
16187
- "properties": {
16188
- "kind": {
16189
- "type": "string",
16190
- "enum": [
16191
- "client",
16192
- "core",
16193
- "model-gate",
16194
- "tool-gate",
16195
- "egress-gate",
16196
- "sandboxes",
16197
- "edge",
16198
- "init",
16199
- "controller",
16200
- "loop",
16201
- "supervisor",
16202
- "harness",
16203
- "evidence",
16204
- "operator",
16205
- "human",
16206
- "api"
16207
- ]
16208
- },
16209
- "id": {
16210
- "type": "string"
16211
- }
16212
- },
16213
- "required": [
16214
- "kind",
16215
- "id"
16216
- ]
16217
- },
16218
- "evidence": {
16219
- "type": "string",
16220
- "enum": [
16221
- "observed",
16222
- "measured",
16223
- "attested",
16224
- "claimed",
16225
- "asserted"
16226
- ]
16227
- },
16228
- "principal": {
16229
- "type": "object",
16230
- "properties": {
16231
- "kind": {
16232
- "type": "string",
16233
- "enum": [
16234
- "application",
16235
- "subject",
16236
- "flow-host",
16237
- "core",
16238
- "trigger"
16239
- ]
16240
- },
16241
- "id": {
16242
- "type": "string"
16243
- }
16244
- },
16245
- "required": [
16246
- "kind",
16247
- "id"
16248
- ],
16249
- "additionalProperties": false
16250
- },
16251
- "trace": {
16252
- "type": "object",
16253
- "properties": {
16254
- "traceId": {
16255
- "type": "string"
16256
- },
16257
- "spanId": {
16258
- "type": "string"
16259
- },
16260
- "parentSpanId": {
16261
- "type": "string"
16262
- }
16263
- },
16264
- "required": [
16265
- "traceId",
16266
- "spanId"
16267
- ]
16268
- },
16269
- "visibility": {
16270
- "type": "string",
16271
- "enum": [
16272
- "public",
16273
- "internal",
16274
- "restricted"
16275
- ]
16276
- },
16277
- "retention": {
16278
- "type": "string",
16279
- "enum": [
16280
- "full",
16281
- "metadata"
16282
- ]
16283
- },
16284
- "type": {
16285
- "type": "string",
16286
- "enum": [
16287
- "artifact.deleted"
16288
- ]
16289
- },
16290
- "payload": {
16291
- "type": "object",
16292
- "properties": {
16293
- "artifactId": {
16294
- "type": "string"
16295
- },
16296
- "name": {
16297
- "type": "string"
16298
- }
16299
- },
16300
- "required": [
16301
- "artifactId",
16302
- "name"
16303
- ],
16304
- "additionalProperties": {}
16305
- }
16306
- },
16307
- "required": [
16308
- "schema",
16309
- "eventId",
16310
- "tenantId",
16311
- "sessionId",
16312
- "runId",
16313
- "turnId",
16314
- "incarnation",
16315
- "epoch",
16316
- "seq",
16317
- "cursor",
16318
- "time",
16319
- "schemaVersion",
16320
- "source",
16321
- "evidence",
16322
- "visibility",
16323
- "retention",
16324
- "type",
16325
- "payload"
16326
- ]
16327
- },
16328
- "ArtifactExportSkippedEvent": {
16119
+ "ArtifactVersionCreatedEvent": {
16120
+ "type": "object",
16121
+ "properties": {
16122
+ "schema": {
16123
+ "type": "string",
16124
+ "enum": [
16125
+ "nylorun.event/2"
16126
+ ]
16127
+ },
16128
+ "eventId": {
16129
+ "type": "string"
16130
+ },
16131
+ "tenantId": {
16132
+ "type": "string",
16133
+ "minLength": 1
16134
+ },
16135
+ "sessionId": {
16136
+ "type": "string"
16137
+ },
16138
+ "runId": {
16139
+ "type": [
16140
+ "string",
16141
+ "null"
16142
+ ]
16143
+ },
16144
+ "turnId": {
16145
+ "type": [
16146
+ "string",
16147
+ "null"
16148
+ ]
16149
+ },
16150
+ "incarnation": {
16151
+ "type": "integer",
16152
+ "minimum": 0
16153
+ },
16154
+ "epoch": {
16155
+ "type": "integer",
16156
+ "minimum": 0
16157
+ },
16158
+ "seq": {
16159
+ "type": "integer",
16160
+ "minimum": 0
16161
+ },
16162
+ "cursor": {
16163
+ "type": "string"
16164
+ },
16165
+ "time": {
16166
+ "type": "string"
16167
+ },
16168
+ "schemaVersion": {
16169
+ "type": "integer",
16170
+ "exclusiveMinimum": 0
16171
+ },
16172
+ "source": {
16173
+ "type": "object",
16174
+ "properties": {
16175
+ "kind": {
16176
+ "type": "string",
16177
+ "enum": [
16178
+ "client",
16179
+ "core",
16180
+ "model-gate",
16181
+ "tool-gate",
16182
+ "egress-gate",
16183
+ "sandboxes",
16184
+ "edge",
16185
+ "init",
16186
+ "controller",
16187
+ "loop",
16188
+ "supervisor",
16189
+ "harness",
16190
+ "evidence",
16191
+ "operator",
16192
+ "human",
16193
+ "api"
16194
+ ]
16195
+ },
16196
+ "id": {
16197
+ "type": "string"
16198
+ }
16199
+ },
16200
+ "required": [
16201
+ "kind",
16202
+ "id"
16203
+ ]
16204
+ },
16205
+ "evidence": {
16206
+ "type": "string",
16207
+ "enum": [
16208
+ "observed",
16209
+ "measured",
16210
+ "attested",
16211
+ "claimed",
16212
+ "asserted"
16213
+ ]
16214
+ },
16215
+ "principal": {
16216
+ "type": "object",
16217
+ "properties": {
16218
+ "kind": {
16219
+ "type": "string",
16220
+ "enum": [
16221
+ "application",
16222
+ "subject",
16223
+ "flow-host",
16224
+ "core",
16225
+ "trigger"
16226
+ ]
16227
+ },
16228
+ "id": {
16229
+ "type": "string"
16230
+ }
16231
+ },
16232
+ "required": [
16233
+ "kind",
16234
+ "id"
16235
+ ],
16236
+ "additionalProperties": false
16237
+ },
16238
+ "trace": {
16239
+ "type": "object",
16240
+ "properties": {
16241
+ "traceId": {
16242
+ "type": "string"
16243
+ },
16244
+ "spanId": {
16245
+ "type": "string"
16246
+ },
16247
+ "parentSpanId": {
16248
+ "type": "string"
16249
+ }
16250
+ },
16251
+ "required": [
16252
+ "traceId",
16253
+ "spanId"
16254
+ ]
16255
+ },
16256
+ "visibility": {
16257
+ "type": "string",
16258
+ "enum": [
16259
+ "public",
16260
+ "internal",
16261
+ "restricted"
16262
+ ]
16263
+ },
16264
+ "retention": {
16265
+ "type": "string",
16266
+ "enum": [
16267
+ "full",
16268
+ "metadata"
16269
+ ]
16270
+ },
16271
+ "type": {
16272
+ "type": "string",
16273
+ "enum": [
16274
+ "artifact.version.created"
16275
+ ]
16276
+ },
16277
+ "payload": {
16278
+ "type": "object",
16279
+ "properties": {
16280
+ "artifactId": {
16281
+ "type": "string"
16282
+ },
16283
+ "kind": {
16284
+ "type": "string",
16285
+ "enum": [
16286
+ "file",
16287
+ "folder"
16288
+ ]
16289
+ },
16290
+ "name": {
16291
+ "type": "string"
16292
+ },
16293
+ "contentType": {
16294
+ "type": "string"
16295
+ },
16296
+ "version": {
16297
+ "type": "integer",
16298
+ "exclusiveMinimum": 0
16299
+ },
16300
+ "size": {
16301
+ "type": "integer",
16302
+ "minimum": 0
16303
+ },
16304
+ "sha256": {
16305
+ "type": "string"
16306
+ },
16307
+ "source": {
16308
+ "type": "string",
16309
+ "enum": [
16310
+ "upload",
16311
+ "engine",
16312
+ "export",
16313
+ "snapshot"
16314
+ ]
16315
+ },
16316
+ "callId": {
16317
+ "type": "string"
16318
+ },
16319
+ "fileCount": {
16320
+ "type": "integer",
16321
+ "minimum": 0
16322
+ },
16323
+ "claimed": {
16324
+ "type": "boolean"
16325
+ }
16326
+ },
16327
+ "required": [
16328
+ "artifactId",
16329
+ "kind",
16330
+ "name",
16331
+ "contentType",
16332
+ "version",
16333
+ "size",
16334
+ "sha256",
16335
+ "source"
16336
+ ],
16337
+ "additionalProperties": {}
16338
+ }
16339
+ },
16340
+ "required": [
16341
+ "schema",
16342
+ "eventId",
16343
+ "tenantId",
16344
+ "sessionId",
16345
+ "runId",
16346
+ "turnId",
16347
+ "incarnation",
16348
+ "epoch",
16349
+ "seq",
16350
+ "cursor",
16351
+ "time",
16352
+ "schemaVersion",
16353
+ "source",
16354
+ "evidence",
16355
+ "visibility",
16356
+ "retention",
16357
+ "type",
16358
+ "payload"
16359
+ ]
16360
+ },
16361
+ "ArtifactDeletedEvent": {
16362
+ "type": "object",
16363
+ "properties": {
16364
+ "schema": {
16365
+ "type": "string",
16366
+ "enum": [
16367
+ "nylorun.event/2"
16368
+ ]
16369
+ },
16370
+ "eventId": {
16371
+ "type": "string"
16372
+ },
16373
+ "tenantId": {
16374
+ "type": "string",
16375
+ "minLength": 1
16376
+ },
16377
+ "sessionId": {
16378
+ "type": "string"
16379
+ },
16380
+ "runId": {
16381
+ "type": [
16382
+ "string",
16383
+ "null"
16384
+ ]
16385
+ },
16386
+ "turnId": {
16387
+ "type": [
16388
+ "string",
16389
+ "null"
16390
+ ]
16391
+ },
16392
+ "incarnation": {
16393
+ "type": "integer",
16394
+ "minimum": 0
16395
+ },
16396
+ "epoch": {
16397
+ "type": "integer",
16398
+ "minimum": 0
16399
+ },
16400
+ "seq": {
16401
+ "type": "integer",
16402
+ "minimum": 0
16403
+ },
16404
+ "cursor": {
16405
+ "type": "string"
16406
+ },
16407
+ "time": {
16408
+ "type": "string"
16409
+ },
16410
+ "schemaVersion": {
16411
+ "type": "integer",
16412
+ "exclusiveMinimum": 0
16413
+ },
16414
+ "source": {
16415
+ "type": "object",
16416
+ "properties": {
16417
+ "kind": {
16418
+ "type": "string",
16419
+ "enum": [
16420
+ "client",
16421
+ "core",
16422
+ "model-gate",
16423
+ "tool-gate",
16424
+ "egress-gate",
16425
+ "sandboxes",
16426
+ "edge",
16427
+ "init",
16428
+ "controller",
16429
+ "loop",
16430
+ "supervisor",
16431
+ "harness",
16432
+ "evidence",
16433
+ "operator",
16434
+ "human",
16435
+ "api"
16436
+ ]
16437
+ },
16438
+ "id": {
16439
+ "type": "string"
16440
+ }
16441
+ },
16442
+ "required": [
16443
+ "kind",
16444
+ "id"
16445
+ ]
16446
+ },
16447
+ "evidence": {
16448
+ "type": "string",
16449
+ "enum": [
16450
+ "observed",
16451
+ "measured",
16452
+ "attested",
16453
+ "claimed",
16454
+ "asserted"
16455
+ ]
16456
+ },
16457
+ "principal": {
16458
+ "type": "object",
16459
+ "properties": {
16460
+ "kind": {
16461
+ "type": "string",
16462
+ "enum": [
16463
+ "application",
16464
+ "subject",
16465
+ "flow-host",
16466
+ "core",
16467
+ "trigger"
16468
+ ]
16469
+ },
16470
+ "id": {
16471
+ "type": "string"
16472
+ }
16473
+ },
16474
+ "required": [
16475
+ "kind",
16476
+ "id"
16477
+ ],
16478
+ "additionalProperties": false
16479
+ },
16480
+ "trace": {
16481
+ "type": "object",
16482
+ "properties": {
16483
+ "traceId": {
16484
+ "type": "string"
16485
+ },
16486
+ "spanId": {
16487
+ "type": "string"
16488
+ },
16489
+ "parentSpanId": {
16490
+ "type": "string"
16491
+ }
16492
+ },
16493
+ "required": [
16494
+ "traceId",
16495
+ "spanId"
16496
+ ]
16497
+ },
16498
+ "visibility": {
16499
+ "type": "string",
16500
+ "enum": [
16501
+ "public",
16502
+ "internal",
16503
+ "restricted"
16504
+ ]
16505
+ },
16506
+ "retention": {
16507
+ "type": "string",
16508
+ "enum": [
16509
+ "full",
16510
+ "metadata"
16511
+ ]
16512
+ },
16513
+ "type": {
16514
+ "type": "string",
16515
+ "enum": [
16516
+ "artifact.deleted"
16517
+ ]
16518
+ },
16519
+ "payload": {
16520
+ "type": "object",
16521
+ "properties": {
16522
+ "artifactId": {
16523
+ "type": "string"
16524
+ },
16525
+ "name": {
16526
+ "type": "string"
16527
+ }
16528
+ },
16529
+ "required": [
16530
+ "artifactId",
16531
+ "name"
16532
+ ],
16533
+ "additionalProperties": {}
16534
+ }
16535
+ },
16536
+ "required": [
16537
+ "schema",
16538
+ "eventId",
16539
+ "tenantId",
16540
+ "sessionId",
16541
+ "runId",
16542
+ "turnId",
16543
+ "incarnation",
16544
+ "epoch",
16545
+ "seq",
16546
+ "cursor",
16547
+ "time",
16548
+ "schemaVersion",
16549
+ "source",
16550
+ "evidence",
16551
+ "visibility",
16552
+ "retention",
16553
+ "type",
16554
+ "payload"
16555
+ ]
16556
+ },
16557
+ "ArtifactExportSkippedEvent": {
16329
16558
  "type": "object",
16330
16559
  "properties": {
16331
16560
  "schema": {
@@ -22453,6 +22682,12 @@
22453
22682
  "additionalProperties": false,
22454
22683
  "description": "The Agent's memory: Markdown files under /memories it keeps across sessions"
22455
22684
  },
22685
+ "model": {
22686
+ "type": "string",
22687
+ "maxLength": 200,
22688
+ "pattern": "^[A-Za-z0-9._-]+\\/\\S+$",
22689
+ "description": "The model the agent runs on: <provider>/<model>, such as anthropic/claude-sonnet-4-5"
22690
+ },
22456
22691
  "functions": {
22457
22692
  "description": "Reserved: Functions are not available yet"
22458
22693
  }
@@ -24585,7 +24820,7 @@
24585
24820
  "name"
24586
24821
  ],
24587
24822
  "additionalProperties": {},
24588
- "description": "The agent's A2A card, without interfaces"
24823
+ "description": "The agent's A2A card: this Runtime's JSON-RPC interface (A2A 1.0), `streaming: false`, `pushNotifications` when the Runtime has a push secret, and the Nylorun profile v2 extensions, all `required: false`"
24589
24824
  },
24590
24825
  "A2aJsonRpcResponse": {
24591
24826
  "type": "object",
@@ -24657,7 +24892,7 @@
24657
24892
  },
24658
24893
  "method": {
24659
24894
  "type": "string",
24660
- "description": "`SendMessage`, `GetTask` or `CancelTask`; others answer their A2A error"
24895
+ "description": "`SendMessage`, `GetTask`, `CancelTask`, `CreateTaskPushNotificationConfig`, `GetTaskPushNotificationConfig`, `ListTaskPushNotificationConfigs`, `DeleteTaskPushNotificationConfig` or `ListTasks`; others answer their A2A error"
24661
24896
  },
24662
24897
  "params": {}
24663
24898
  },
@@ -25350,6 +25585,122 @@
25350
25585
  "resourceSpans"
25351
25586
  ],
25352
25587
  "additionalProperties": {}
25588
+ },
25589
+ "TurnChangesPage": {
25590
+ "type": "object",
25591
+ "properties": {
25592
+ "turns": {
25593
+ "type": "array",
25594
+ "items": {
25595
+ "$ref": "#/components/schemas/TurnSummary"
25596
+ }
25597
+ },
25598
+ "cursor": {
25599
+ "type": "string"
25600
+ },
25601
+ "hasMore": {
25602
+ "type": "boolean"
25603
+ }
25604
+ },
25605
+ "required": [
25606
+ "turns",
25607
+ "cursor",
25608
+ "hasMore"
25609
+ ],
25610
+ "additionalProperties": false
25611
+ },
25612
+ "TurnSummary": {
25613
+ "type": "object",
25614
+ "properties": {
25615
+ "turnId": {
25616
+ "type": "string"
25617
+ },
25618
+ "sessionId": {
25619
+ "type": "string"
25620
+ },
25621
+ "agentId": {
25622
+ "type": "string"
25623
+ },
25624
+ "status": {
25625
+ "type": "string",
25626
+ "enum": [
25627
+ "running",
25628
+ "paused",
25629
+ "completed",
25630
+ "failed",
25631
+ "cancelled"
25632
+ ]
25633
+ },
25634
+ "startedAt": {
25635
+ "type": "string"
25636
+ },
25637
+ "endedAt": {
25638
+ "type": [
25639
+ "string",
25640
+ "null"
25641
+ ]
25642
+ },
25643
+ "changedAt": {
25644
+ "type": "string"
25645
+ },
25646
+ "totals": {
25647
+ "type": [
25648
+ "object",
25649
+ "null"
25650
+ ],
25651
+ "properties": {
25652
+ "steps": {
25653
+ "type": "integer",
25654
+ "minimum": 0
25655
+ },
25656
+ "tokens": {
25657
+ "type": "integer",
25658
+ "minimum": 0
25659
+ },
25660
+ "costUsd": {
25661
+ "type": "number",
25662
+ "minimum": 0
25663
+ }
25664
+ },
25665
+ "required": [
25666
+ "steps",
25667
+ "tokens",
25668
+ "costUsd"
25669
+ ],
25670
+ "additionalProperties": false
25671
+ },
25672
+ "a2a": {
25673
+ "type": [
25674
+ "object",
25675
+ "null"
25676
+ ],
25677
+ "properties": {
25678
+ "contextId": {
25679
+ "type": "string"
25680
+ },
25681
+ "taskId": {
25682
+ "type": "string"
25683
+ }
25684
+ },
25685
+ "required": [
25686
+ "contextId",
25687
+ "taskId"
25688
+ ],
25689
+ "additionalProperties": false
25690
+ }
25691
+ },
25692
+ "required": [
25693
+ "turnId",
25694
+ "sessionId",
25695
+ "agentId",
25696
+ "status",
25697
+ "startedAt",
25698
+ "endedAt",
25699
+ "changedAt",
25700
+ "totals",
25701
+ "a2a"
25702
+ ],
25703
+ "additionalProperties": false
25353
25704
  }
25354
25705
  },
25355
25706
  "parameters": {}
@@ -32506,6 +32857,9 @@
32506
32857
  {
32507
32858
  "$ref": "#/components/schemas/McpDiscoveredEvent"
32508
32859
  },
32860
+ {
32861
+ "$ref": "#/components/schemas/PlanUpdatedEvent"
32862
+ },
32509
32863
  {
32510
32864
  "$ref": "#/components/schemas/EnvironmentStateEvent"
32511
32865
  },
@@ -32854,11 +33208,289 @@
32854
33208
  ],
32855
33209
  "responses": {
32856
33210
  "200": {
32857
- "description": "The pinned public manifest",
33211
+ "description": "The pinned public manifest",
33212
+ "content": {
33213
+ "application/json": {
33214
+ "schema": {
33215
+ "$ref": "#/components/schemas/SessionManifestView"
33216
+ }
33217
+ }
33218
+ }
33219
+ },
33220
+ "400": {
33221
+ "description": "Invalid headers, path, body or cursor",
33222
+ "content": {
33223
+ "application/json": {
33224
+ "schema": {
33225
+ "$ref": "#/components/schemas/Rejected"
33226
+ }
33227
+ }
33228
+ }
33229
+ },
33230
+ "401": {
33231
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
33232
+ "content": {
33233
+ "application/json": {
33234
+ "schema": {
33235
+ "$ref": "#/components/schemas/Rejected"
33236
+ }
33237
+ }
33238
+ }
33239
+ },
33240
+ "403": {
33241
+ "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`)",
33242
+ "content": {
33243
+ "application/json": {
33244
+ "schema": {
33245
+ "$ref": "#/components/schemas/Rejected"
33246
+ }
33247
+ }
33248
+ }
33249
+ },
33250
+ "404": {
33251
+ "description": "Not found (`not_found`)",
33252
+ "content": {
33253
+ "application/json": {
33254
+ "schema": {
33255
+ "$ref": "#/components/schemas/Rejected"
33256
+ }
33257
+ }
33258
+ }
33259
+ },
33260
+ "426": {
33261
+ "description": "`Nylorun-Protocol` missing or unsupported",
33262
+ "content": {
33263
+ "application/json": {
33264
+ "schema": {
33265
+ "$ref": "#/components/schemas/ProtocolRejected"
33266
+ }
33267
+ }
33268
+ }
33269
+ },
33270
+ "503": {
33271
+ "description": "The Tenant's storage or streams are unavailable",
33272
+ "content": {
33273
+ "application/json": {
33274
+ "schema": {
33275
+ "$ref": "#/components/schemas/Rejected"
33276
+ }
33277
+ }
33278
+ }
33279
+ }
33280
+ }
33281
+ }
33282
+ },
33283
+ "/v1/sessions/{sessionId}/model": {
33284
+ "get": {
33285
+ "tags": [
33286
+ "Sessions API"
33287
+ ],
33288
+ "summary": "Get a session's model",
33289
+ "description": "The model the session's next turn uses (feature `session-model`): its own (`source: \"session\"`) while its provider is connected, else the Tenant's (`source: \"tenant\"`). `choice` is the session's own model, kept while its provider is disconnected.",
33290
+ "security": [
33291
+ {
33292
+ "applicationKey": []
33293
+ },
33294
+ {
33295
+ "issuerToken": []
33296
+ }
33297
+ ],
33298
+ "x-nylorun-credentials": [
33299
+ "application",
33300
+ "subject",
33301
+ "token"
33302
+ ],
33303
+ "x-nylorun-scopes": [
33304
+ "sessions:own"
33305
+ ],
33306
+ "parameters": [
33307
+ {
33308
+ "schema": {
33309
+ "type": "string"
33310
+ },
33311
+ "required": true,
33312
+ "name": "sessionId",
33313
+ "in": "path"
33314
+ },
33315
+ {
33316
+ "schema": {
33317
+ "type": "string",
33318
+ "description": "The protocol version, `18`"
33319
+ },
33320
+ "required": true,
33321
+ "description": "The protocol version, `18`",
33322
+ "name": "Nylorun-Protocol",
33323
+ "in": "header"
33324
+ },
33325
+ {
33326
+ "schema": {
33327
+ "type": "string",
33328
+ "description": "The person an application key acts for"
33329
+ },
33330
+ "required": false,
33331
+ "description": "The person an application key acts for",
33332
+ "name": "Nylorun-Subject",
33333
+ "in": "header"
33334
+ },
33335
+ {
33336
+ "schema": {
33337
+ "type": "string",
33338
+ "description": "The subject's space-separated scopes; required with a subject"
33339
+ },
33340
+ "required": false,
33341
+ "description": "The subject's space-separated scopes; required with a subject",
33342
+ "name": "Nylorun-Scopes",
33343
+ "in": "header"
33344
+ }
33345
+ ],
33346
+ "responses": {
33347
+ "200": {
33348
+ "description": "The session's model",
33349
+ "content": {
33350
+ "application/json": {
33351
+ "schema": {
33352
+ "$ref": "#/components/schemas/SessionModelView"
33353
+ }
33354
+ }
33355
+ }
33356
+ },
33357
+ "400": {
33358
+ "description": "Invalid headers, path, body or cursor",
33359
+ "content": {
33360
+ "application/json": {
33361
+ "schema": {
33362
+ "$ref": "#/components/schemas/Rejected"
33363
+ }
33364
+ }
33365
+ }
33366
+ },
33367
+ "401": {
33368
+ "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`)",
33369
+ "content": {
33370
+ "application/json": {
33371
+ "schema": {
33372
+ "$ref": "#/components/schemas/Rejected"
33373
+ }
33374
+ }
33375
+ }
33376
+ },
33377
+ "403": {
33378
+ "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`)",
33379
+ "content": {
33380
+ "application/json": {
33381
+ "schema": {
33382
+ "$ref": "#/components/schemas/Rejected"
33383
+ }
33384
+ }
33385
+ }
33386
+ },
33387
+ "404": {
33388
+ "description": "Not found (`not_found`)",
33389
+ "content": {
33390
+ "application/json": {
33391
+ "schema": {
33392
+ "$ref": "#/components/schemas/Rejected"
33393
+ }
33394
+ }
33395
+ }
33396
+ },
33397
+ "426": {
33398
+ "description": "`Nylorun-Protocol` missing or unsupported",
33399
+ "content": {
33400
+ "application/json": {
33401
+ "schema": {
33402
+ "$ref": "#/components/schemas/ProtocolRejected"
33403
+ }
33404
+ }
33405
+ }
33406
+ },
33407
+ "503": {
33408
+ "description": "The Tenant's storage or streams are unavailable",
33409
+ "content": {
33410
+ "application/json": {
33411
+ "schema": {
33412
+ "$ref": "#/components/schemas/Rejected"
33413
+ }
33414
+ }
33415
+ }
33416
+ }
33417
+ }
33418
+ },
33419
+ "put": {
33420
+ "tags": [
33421
+ "Sessions API"
33422
+ ],
33423
+ "summary": "Choose a session's model",
33424
+ "description": "Chooses one of a connected provider's models for the session's turns (feature `session-model`), in place of the Tenant's model. The Tenant's model and every other session's stay as they are. Only the application sets it, for itself or for a subject: a trusted issuer's token is refused. A turn calls one model, so the choice changes only while no turn runs or waits (`409 session_busy`). A provider that is not connected, or a model its catalog does not list, is `422 request_rejected`.",
33425
+ "security": [
33426
+ {
33427
+ "applicationKey": []
33428
+ }
33429
+ ],
33430
+ "x-nylorun-credentials": [
33431
+ "application",
33432
+ "subject"
33433
+ ],
33434
+ "x-nylorun-scopes": [
33435
+ "sessions:own"
33436
+ ],
33437
+ "parameters": [
33438
+ {
33439
+ "schema": {
33440
+ "type": "string"
33441
+ },
33442
+ "required": true,
33443
+ "name": "sessionId",
33444
+ "in": "path"
33445
+ },
33446
+ {
33447
+ "schema": {
33448
+ "type": "string",
33449
+ "description": "The protocol version, `18`"
33450
+ },
33451
+ "required": true,
33452
+ "description": "The protocol version, `18`",
33453
+ "name": "Nylorun-Protocol",
33454
+ "in": "header"
33455
+ },
33456
+ {
33457
+ "schema": {
33458
+ "type": "string",
33459
+ "description": "The person an application key acts for"
33460
+ },
33461
+ "required": false,
33462
+ "description": "The person an application key acts for",
33463
+ "name": "Nylorun-Subject",
33464
+ "in": "header"
33465
+ },
33466
+ {
33467
+ "schema": {
33468
+ "type": "string",
33469
+ "description": "The subject's space-separated scopes; required with a subject"
33470
+ },
33471
+ "required": false,
33472
+ "description": "The subject's space-separated scopes; required with a subject",
33473
+ "name": "Nylorun-Scopes",
33474
+ "in": "header"
33475
+ }
33476
+ ],
33477
+ "requestBody": {
33478
+ "required": true,
33479
+ "content": {
33480
+ "application/json": {
33481
+ "schema": {
33482
+ "$ref": "#/components/schemas/PutSessionModelRequest"
33483
+ }
33484
+ }
33485
+ }
33486
+ },
33487
+ "responses": {
33488
+ "200": {
33489
+ "description": "The session's model",
32858
33490
  "content": {
32859
33491
  "application/json": {
32860
33492
  "schema": {
32861
- "$ref": "#/components/schemas/SessionManifestView"
33493
+ "$ref": "#/components/schemas/SessionModelView"
32862
33494
  }
32863
33495
  }
32864
33496
  }
@@ -32884,14 +33516,7 @@
32884
33516
  }
32885
33517
  },
32886
33518
  "403": {
32887
- "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`)",
32888
- "content": {
32889
- "application/json": {
32890
- "schema": {
32891
- "$ref": "#/components/schemas/Rejected"
32892
- }
32893
- }
32894
- }
33519
+ "description": "A trusted issuer's token (`scope_required`)"
32895
33520
  },
32896
33521
  "404": {
32897
33522
  "description": "Not found (`not_found`)",
@@ -32903,6 +33528,12 @@
32903
33528
  }
32904
33529
  }
32905
33530
  },
33531
+ "409": {
33532
+ "description": "A turn is running or waits (`session_busy`)"
33533
+ },
33534
+ "422": {
33535
+ "description": "The provider is not connected, or the model is not one of its models"
33536
+ },
32906
33537
  "426": {
32907
33538
  "description": "`Nylorun-Protocol` missing or unsupported",
32908
33539
  "content": {
@@ -32924,27 +33555,21 @@
32924
33555
  }
32925
33556
  }
32926
33557
  }
32927
- }
32928
- },
32929
- "/v1/sessions/{sessionId}/model": {
32930
- "get": {
33558
+ },
33559
+ "delete": {
32931
33560
  "tags": [
32932
33561
  "Sessions API"
32933
33562
  ],
32934
- "summary": "Get a session's model",
32935
- "description": "The model the session's next turn uses (feature `session-model`): its own (`source: \"session\"`) while its provider is connected, else the Tenant's (`source: \"tenant\"`). `choice` is the session's own model, kept while its provider is disconnected.",
33563
+ "summary": "Clear a session's model",
33564
+ "description": "Clears the session's own model (feature `session-model`): its next turns use the Tenant's model. Refused while a turn runs or waits (`409 session_busy`).",
32936
33565
  "security": [
32937
33566
  {
32938
33567
  "applicationKey": []
32939
- },
32940
- {
32941
- "issuerToken": []
32942
33568
  }
32943
33569
  ],
32944
33570
  "x-nylorun-credentials": [
32945
33571
  "application",
32946
- "subject",
32947
- "token"
33572
+ "subject"
32948
33573
  ],
32949
33574
  "x-nylorun-scopes": [
32950
33575
  "sessions:own"
@@ -33011,7 +33636,7 @@
33011
33636
  }
33012
33637
  },
33013
33638
  "401": {
33014
- "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`)",
33639
+ "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
33015
33640
  "content": {
33016
33641
  "application/json": {
33017
33642
  "schema": {
@@ -33021,14 +33646,7 @@
33021
33646
  }
33022
33647
  },
33023
33648
  "403": {
33024
- "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`)",
33025
- "content": {
33026
- "application/json": {
33027
- "schema": {
33028
- "$ref": "#/components/schemas/Rejected"
33029
- }
33030
- }
33031
- }
33649
+ "description": "A trusted issuer's token (`scope_required`)"
33032
33650
  },
33033
33651
  "404": {
33034
33652
  "description": "Not found (`not_found`)",
@@ -33040,6 +33658,9 @@
33040
33658
  }
33041
33659
  }
33042
33660
  },
33661
+ "409": {
33662
+ "description": "A turn is running or waits (`session_busy`)"
33663
+ },
33043
33664
  "426": {
33044
33665
  "description": "`Nylorun-Protocol` missing or unsupported",
33045
33666
  "content": {
@@ -33061,25 +33682,23 @@
33061
33682
  }
33062
33683
  }
33063
33684
  }
33064
- },
33065
- "put": {
33685
+ }
33686
+ },
33687
+ "/v1/sessions/{sessionId}/usage": {
33688
+ "get": {
33066
33689
  "tags": [
33067
33690
  "Sessions API"
33068
33691
  ],
33069
- "summary": "Choose a session's model",
33070
- "description": "Chooses one of a connected provider's models for the session's turns (feature `session-model`), in place of the Tenant's model. The Tenant's model and every other session's stay as they are. Only the application sets it, for itself or for a subject: a trusted issuer's token is refused. A turn calls one model, so the choice changes only while no turn runs or waits (`409 session_busy`). A provider that is not connected, or a model its catalog does not list, is `422 request_rejected`.",
33692
+ "summary": "Read a session's recorded model usage",
33071
33693
  "security": [
33072
33694
  {
33073
33695
  "applicationKey": []
33074
33696
  }
33075
33697
  ],
33076
33698
  "x-nylorun-credentials": [
33077
- "application",
33078
- "subject"
33079
- ],
33080
- "x-nylorun-scopes": [
33081
- "sessions:own"
33699
+ "application"
33082
33700
  ],
33701
+ "x-nylorun-scopes": "never",
33083
33702
  "parameters": [
33084
33703
  {
33085
33704
  "schema": {
@@ -33091,52 +33710,30 @@
33091
33710
  },
33092
33711
  {
33093
33712
  "schema": {
33094
- "type": "string",
33095
- "description": "The protocol version, `18`"
33096
- },
33097
- "required": true,
33098
- "description": "The protocol version, `18`",
33099
- "name": "Nylorun-Protocol",
33100
- "in": "header"
33101
- },
33102
- {
33103
- "schema": {
33104
- "type": "string",
33105
- "description": "The person an application key acts for"
33713
+ "type": "string"
33106
33714
  },
33107
33715
  "required": false,
33108
- "description": "The person an application key acts for",
33109
- "name": "Nylorun-Subject",
33110
- "in": "header"
33716
+ "name": "turnId",
33717
+ "in": "query"
33111
33718
  },
33112
33719
  {
33113
33720
  "schema": {
33114
33721
  "type": "string",
33115
- "description": "The subject's space-separated scopes; required with a subject"
33722
+ "description": "The protocol version, `18`"
33116
33723
  },
33117
- "required": false,
33118
- "description": "The subject's space-separated scopes; required with a subject",
33119
- "name": "Nylorun-Scopes",
33724
+ "required": true,
33725
+ "description": "The protocol version, `18`",
33726
+ "name": "Nylorun-Protocol",
33120
33727
  "in": "header"
33121
33728
  }
33122
33729
  ],
33123
- "requestBody": {
33124
- "required": true,
33125
- "content": {
33126
- "application/json": {
33127
- "schema": {
33128
- "$ref": "#/components/schemas/PutSessionModelRequest"
33129
- }
33130
- }
33131
- }
33132
- },
33133
33730
  "responses": {
33134
33731
  "200": {
33135
- "description": "The session's model",
33732
+ "description": "Recorded usage, including duplicate billed calls",
33136
33733
  "content": {
33137
33734
  "application/json": {
33138
33735
  "schema": {
33139
- "$ref": "#/components/schemas/SessionModelView"
33736
+ "$ref": "#/components/schemas/SessionUsageTotals"
33140
33737
  }
33141
33738
  }
33142
33739
  }
@@ -33162,7 +33759,14 @@
33162
33759
  }
33163
33760
  },
33164
33761
  "403": {
33165
- "description": "A trusted issuer's token (`scope_required`)"
33762
+ "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`)",
33763
+ "content": {
33764
+ "application/json": {
33765
+ "schema": {
33766
+ "$ref": "#/components/schemas/Rejected"
33767
+ }
33768
+ }
33769
+ }
33166
33770
  },
33167
33771
  "404": {
33168
33772
  "description": "Not found (`not_found`)",
@@ -33174,12 +33778,6 @@
33174
33778
  }
33175
33779
  }
33176
33780
  },
33177
- "409": {
33178
- "description": "A turn is running or waits (`session_busy`)"
33179
- },
33180
- "422": {
33181
- "description": "The provider is not connected, or the model is not one of its models"
33182
- },
33183
33781
  "426": {
33184
33782
  "description": "`Nylorun-Protocol` missing or unsupported",
33185
33783
  "content": {
@@ -33201,25 +33799,23 @@
33201
33799
  }
33202
33800
  }
33203
33801
  }
33204
- },
33205
- "delete": {
33802
+ }
33803
+ },
33804
+ "/v1/sessions/{sessionId}/calls/model": {
33805
+ "get": {
33206
33806
  "tags": [
33207
33807
  "Sessions API"
33208
33808
  ],
33209
- "summary": "Clear a session's model",
33210
- "description": "Clears the session's own model (feature `session-model`): its next turns use the Tenant's model. Refused while a turn runs or waits (`409 session_busy`).",
33809
+ "summary": "Page a session's model calls",
33211
33810
  "security": [
33212
33811
  {
33213
33812
  "applicationKey": []
33214
33813
  }
33215
33814
  ],
33216
33815
  "x-nylorun-credentials": [
33217
- "application",
33218
- "subject"
33219
- ],
33220
- "x-nylorun-scopes": [
33221
- "sessions:own"
33816
+ "application"
33222
33817
  ],
33818
+ "x-nylorun-scopes": "never",
33223
33819
  "parameters": [
33224
33820
  {
33225
33821
  "schema": {
@@ -33231,42 +33827,49 @@
33231
33827
  },
33232
33828
  {
33233
33829
  "schema": {
33234
- "type": "string",
33235
- "description": "The protocol version, `18`"
33830
+ "type": "string"
33236
33831
  },
33237
- "required": true,
33238
- "description": "The protocol version, `18`",
33239
- "name": "Nylorun-Protocol",
33240
- "in": "header"
33832
+ "required": false,
33833
+ "name": "turnId",
33834
+ "in": "query"
33241
33835
  },
33242
33836
  {
33243
33837
  "schema": {
33244
- "type": "string",
33245
- "description": "The person an application key acts for"
33838
+ "type": "integer",
33839
+ "minimum": 1,
33840
+ "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower"
33246
33841
  },
33247
33842
  "required": false,
33248
- "description": "The person an application key acts for",
33249
- "name": "Nylorun-Subject",
33250
- "in": "header"
33843
+ "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower",
33844
+ "name": "limit",
33845
+ "in": "query"
33251
33846
  },
33252
33847
  {
33253
33848
  "schema": {
33254
- "type": "string",
33255
- "description": "The subject's space-separated scopes; required with a subject"
33849
+ "type": "string"
33256
33850
  },
33257
33851
  "required": false,
33258
- "description": "The subject's space-separated scopes; required with a subject",
33259
- "name": "Nylorun-Scopes",
33852
+ "name": "cursor",
33853
+ "in": "query"
33854
+ },
33855
+ {
33856
+ "schema": {
33857
+ "type": "string",
33858
+ "description": "The protocol version, `18`"
33859
+ },
33860
+ "required": true,
33861
+ "description": "The protocol version, `18`",
33862
+ "name": "Nylorun-Protocol",
33260
33863
  "in": "header"
33261
33864
  }
33262
33865
  ],
33263
33866
  "responses": {
33264
33867
  "200": {
33265
- "description": "The session's model",
33868
+ "description": "Recorded usage, including duplicate billed calls",
33266
33869
  "content": {
33267
33870
  "application/json": {
33268
33871
  "schema": {
33269
- "$ref": "#/components/schemas/SessionModelView"
33872
+ "$ref": "#/components/schemas/ModelCallsPage"
33270
33873
  }
33271
33874
  }
33272
33875
  }
@@ -33292,7 +33895,14 @@
33292
33895
  }
33293
33896
  },
33294
33897
  "403": {
33295
- "description": "A trusted issuer's token (`scope_required`)"
33898
+ "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`)",
33899
+ "content": {
33900
+ "application/json": {
33901
+ "schema": {
33902
+ "$ref": "#/components/schemas/Rejected"
33903
+ }
33904
+ }
33905
+ }
33296
33906
  },
33297
33907
  "404": {
33298
33908
  "description": "Not found (`not_found`)",
@@ -33304,9 +33914,6 @@
33304
33914
  }
33305
33915
  }
33306
33916
  },
33307
- "409": {
33308
- "description": "A turn is running or waits (`session_busy`)"
33309
- },
33310
33917
  "426": {
33311
33918
  "description": "`Nylorun-Protocol` missing or unsupported",
33312
33919
  "content": {
@@ -33330,12 +33937,12 @@
33330
33937
  }
33331
33938
  }
33332
33939
  },
33333
- "/v1/sessions/{sessionId}/usage": {
33940
+ "/v1/sessions/{sessionId}/calls/tool": {
33334
33941
  "get": {
33335
33942
  "tags": [
33336
33943
  "Sessions API"
33337
33944
  ],
33338
- "summary": "Read a session's recorded model usage",
33945
+ "summary": "Page a session's tool calls",
33339
33946
  "security": [
33340
33947
  {
33341
33948
  "applicationKey": []
@@ -33362,6 +33969,25 @@
33362
33969
  "name": "turnId",
33363
33970
  "in": "query"
33364
33971
  },
33972
+ {
33973
+ "schema": {
33974
+ "type": "integer",
33975
+ "minimum": 1,
33976
+ "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower"
33977
+ },
33978
+ "required": false,
33979
+ "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower",
33980
+ "name": "limit",
33981
+ "in": "query"
33982
+ },
33983
+ {
33984
+ "schema": {
33985
+ "type": "string"
33986
+ },
33987
+ "required": false,
33988
+ "name": "cursor",
33989
+ "in": "query"
33990
+ },
33365
33991
  {
33366
33992
  "schema": {
33367
33993
  "type": "string",
@@ -33375,11 +34001,11 @@
33375
34001
  ],
33376
34002
  "responses": {
33377
34003
  "200": {
33378
- "description": "Recorded usage, including duplicate billed calls",
34004
+ "description": "Each tool call in the order it was first sent, with its status and sends",
33379
34005
  "content": {
33380
34006
  "application/json": {
33381
34007
  "schema": {
33382
- "$ref": "#/components/schemas/SessionUsageTotals"
34008
+ "$ref": "#/components/schemas/ToolCallsPage"
33383
34009
  }
33384
34010
  }
33385
34011
  }
@@ -33447,12 +34073,13 @@
33447
34073
  }
33448
34074
  }
33449
34075
  },
33450
- "/v1/sessions/{sessionId}/calls/model": {
34076
+ "/v1/sessions/{sessionId}/turns/{turnId}/trace": {
33451
34077
  "get": {
33452
34078
  "tags": [
33453
34079
  "Sessions API"
33454
34080
  ],
33455
- "summary": "Page a session's model calls",
34081
+ "summary": "Read a turn's trace",
34082
+ "description": "The turn's spans as OTLP/HTTP JSON (`resourceSpans`), as the Runtime posts them to an OTLP collector: a root span for the turn, a span for each model, tool and egress crossing, ids derived so every read agrees. Post it to a collector's `/v1/traces` to backfill. A turn still running has no root span yet; a turn the session never had has no spans.",
33456
34083
  "security": [
33457
34084
  {
33458
34085
  "applicationKey": []
@@ -33475,28 +34102,9 @@
33475
34102
  "schema": {
33476
34103
  "type": "string"
33477
34104
  },
33478
- "required": false,
34105
+ "required": true,
33479
34106
  "name": "turnId",
33480
- "in": "query"
33481
- },
33482
- {
33483
- "schema": {
33484
- "type": "integer",
33485
- "minimum": 1,
33486
- "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower"
33487
- },
33488
- "required": false,
33489
- "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower",
33490
- "name": "limit",
33491
- "in": "query"
33492
- },
33493
- {
33494
- "schema": {
33495
- "type": "string"
33496
- },
33497
- "required": false,
33498
- "name": "cursor",
33499
- "in": "query"
34107
+ "in": "path"
33500
34108
  },
33501
34109
  {
33502
34110
  "schema": {
@@ -33511,11 +34119,11 @@
33511
34119
  ],
33512
34120
  "responses": {
33513
34121
  "200": {
33514
- "description": "Recorded usage, including duplicate billed calls",
34122
+ "description": "The turn's spans",
33515
34123
  "content": {
33516
34124
  "application/json": {
33517
34125
  "schema": {
33518
- "$ref": "#/components/schemas/ModelCallsPage"
34126
+ "$ref": "#/components/schemas/TurnTrace"
33519
34127
  }
33520
34128
  }
33521
34129
  }
@@ -33583,12 +34191,13 @@
33583
34191
  }
33584
34192
  }
33585
34193
  },
33586
- "/v1/sessions/{sessionId}/calls/tool": {
33587
- "get": {
34194
+ "/v1/sessions/{sessionId}/sandbox/{tool}": {
34195
+ "post": {
33588
34196
  "tags": [
33589
34197
  "Sessions API"
33590
34198
  ],
33591
- "summary": "Page a session's tool calls",
34199
+ "summary": "Run a sandbox tool in a session",
34200
+ "description": "For an app's own tools; not while a turn is running.",
33592
34201
  "security": [
33593
34202
  {
33594
34203
  "applicationKey": []
@@ -33609,30 +34218,19 @@
33609
34218
  },
33610
34219
  {
33611
34220
  "schema": {
33612
- "type": "string"
33613
- },
33614
- "required": false,
33615
- "name": "turnId",
33616
- "in": "query"
33617
- },
33618
- {
33619
- "schema": {
33620
- "type": "integer",
33621
- "minimum": 1,
33622
- "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower"
33623
- },
33624
- "required": false,
33625
- "description": "A page holds at most the Tenant's Runtime limit `pageItems` (default 200); a larger limit gets that many. Default 50, or that limit when it is lower",
33626
- "name": "limit",
33627
- "in": "query"
33628
- },
33629
- {
33630
- "schema": {
33631
- "type": "string"
34221
+ "type": "string",
34222
+ "enum": [
34223
+ "bash",
34224
+ "read",
34225
+ "write",
34226
+ "edit",
34227
+ "grep",
34228
+ "glob"
34229
+ ]
33632
34230
  },
33633
- "required": false,
33634
- "name": "cursor",
33635
- "in": "query"
34231
+ "required": true,
34232
+ "name": "tool",
34233
+ "in": "path"
33636
34234
  },
33637
34235
  {
33638
34236
  "schema": {
@@ -33645,13 +34243,26 @@
33645
34243
  "in": "header"
33646
34244
  }
33647
34245
  ],
34246
+ "requestBody": {
34247
+ "required": true,
34248
+ "content": {
34249
+ "application/json": {
34250
+ "schema": {
34251
+ "type": "object",
34252
+ "properties": {},
34253
+ "additionalProperties": {},
34254
+ "description": "The tool's input"
34255
+ }
34256
+ }
34257
+ }
34258
+ },
33648
34259
  "responses": {
33649
34260
  "200": {
33650
- "description": "Each tool call in the order it was first sent, with its status and sends",
34261
+ "description": "The tool's output, or why it failed",
33651
34262
  "content": {
33652
34263
  "application/json": {
33653
34264
  "schema": {
33654
- "$ref": "#/components/schemas/ToolCallsPage"
34265
+ "$ref": "#/components/schemas/SandboxToolOutcome"
33655
34266
  }
33656
34267
  }
33657
34268
  }
@@ -33696,6 +34307,9 @@
33696
34307
  }
33697
34308
  }
33698
34309
  },
34310
+ "409": {
34311
+ "description": "A turn is running"
34312
+ },
33699
34313
  "426": {
33700
34314
  "description": "`Nylorun-Protocol` missing or unsupported",
33701
34315
  "content": {
@@ -33719,38 +34333,60 @@
33719
34333
  }
33720
34334
  }
33721
34335
  },
33722
- "/v1/sessions/{sessionId}/turns/{turnId}/trace": {
34336
+ "/v1/turns": {
33723
34337
  "get": {
33724
34338
  "tags": [
33725
34339
  "Sessions API"
33726
34340
  ],
33727
- "summary": "Read a turn's trace",
33728
- "description": "The turn's spans as OTLP/HTTP JSON (`resourceSpans`), as the Runtime posts them to an OTLP collector: a root span for the turn, a span for each model, tool and egress crossing, ids derived so every read agrees. Post it to a collector's `/v1/traces` to backfill. A turn still running has no root span yet; a turn the session never had has no spans.",
34341
+ "summary": "Follow turns as they change",
34342
+ "description": "The turn index's change feed (Host feature `turns`): each turn's status, times, totals and A2A context and task, in the order the turns changed, a turn again each time it changes. Pass the page's `cursor` as `changedAfter` to read on; it is returned even when no turn changed. With `sessionId`, one session's turns, oldest first. An application key reads the whole Tenant; acting for a person, only theirs.",
33729
34343
  "security": [
33730
34344
  {
33731
34345
  "applicationKey": []
34346
+ },
34347
+ {
34348
+ "issuerToken": []
33732
34349
  }
33733
34350
  ],
33734
34351
  "x-nylorun-credentials": [
33735
- "application"
34352
+ "application",
34353
+ "subject",
34354
+ "token"
34355
+ ],
34356
+ "x-nylorun-scopes": [
34357
+ "sessions:own"
33736
34358
  ],
33737
- "x-nylorun-scopes": "never",
33738
34359
  "parameters": [
33739
34360
  {
33740
34361
  "schema": {
33741
- "type": "string"
34362
+ "type": "string",
34363
+ "description": "The `cursor` a previous page returned: read the changes after it. Absent: from the first turn."
33742
34364
  },
33743
- "required": true,
34365
+ "required": false,
34366
+ "description": "The `cursor` a previous page returned: read the changes after it. Absent: from the first turn.",
34367
+ "name": "changedAfter",
34368
+ "in": "query"
34369
+ },
34370
+ {
34371
+ "schema": {
34372
+ "type": "string",
34373
+ "description": "Only this session's turns."
34374
+ },
34375
+ "required": false,
34376
+ "description": "Only this session's turns.",
33744
34377
  "name": "sessionId",
33745
- "in": "path"
34378
+ "in": "query"
33746
34379
  },
33747
34380
  {
33748
34381
  "schema": {
33749
- "type": "string"
34382
+ "type": "integer",
34383
+ "minimum": 1,
34384
+ "description": "At most this many turns, up to 500; a larger limit gets that many. Default 100"
33750
34385
  },
33751
- "required": true,
33752
- "name": "turnId",
33753
- "in": "path"
34386
+ "required": false,
34387
+ "description": "At most this many turns, up to 500; a larger limit gets that many. Default 100",
34388
+ "name": "limit",
34389
+ "in": "query"
33754
34390
  },
33755
34391
  {
33756
34392
  "schema": {
@@ -33761,15 +34397,35 @@
33761
34397
  "description": "The protocol version, `18`",
33762
34398
  "name": "Nylorun-Protocol",
33763
34399
  "in": "header"
34400
+ },
34401
+ {
34402
+ "schema": {
34403
+ "type": "string",
34404
+ "description": "The person an application key acts for"
34405
+ },
34406
+ "required": false,
34407
+ "description": "The person an application key acts for",
34408
+ "name": "Nylorun-Subject",
34409
+ "in": "header"
34410
+ },
34411
+ {
34412
+ "schema": {
34413
+ "type": "string",
34414
+ "description": "The subject's space-separated scopes; required with a subject"
34415
+ },
34416
+ "required": false,
34417
+ "description": "The subject's space-separated scopes; required with a subject",
34418
+ "name": "Nylorun-Scopes",
34419
+ "in": "header"
33764
34420
  }
33765
34421
  ],
33766
34422
  "responses": {
33767
34423
  "200": {
33768
- "description": "The turn's spans",
34424
+ "description": "The turns that changed after the cursor",
33769
34425
  "content": {
33770
34426
  "application/json": {
33771
34427
  "schema": {
33772
- "$ref": "#/components/schemas/TurnTrace"
34428
+ "$ref": "#/components/schemas/TurnChangesPage"
33773
34429
  }
33774
34430
  }
33775
34431
  }
@@ -33785,7 +34441,7 @@
33785
34441
  }
33786
34442
  },
33787
34443
  "401": {
33788
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
34444
+ "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`)",
33789
34445
  "content": {
33790
34446
  "application/json": {
33791
34447
  "schema": {
@@ -33837,55 +34493,85 @@
33837
34493
  }
33838
34494
  }
33839
34495
  },
33840
- "/v1/sessions/{sessionId}/sandbox/{tool}": {
34496
+ "/v1/ag-ui/agents/{agentId}": {
33841
34497
  "post": {
33842
34498
  "tags": [
33843
- "Sessions API"
34499
+ "AG-UI"
33844
34500
  ],
33845
- "summary": "Run a sandbox tool in a session",
33846
- "description": "For an app's own tools; not while a turn is running.",
34501
+ "summary": "Run an agent",
34502
+ "description": "For a person, named by a trusted issuer's token or by `Nylorun-Subject`. The thread is one session per person, agent and thread, created on its first run with `forwardedProps.nylorun.session`. The trailing user message starts a turn (its id is the idempotency key); its media parts are files: bytes sent inline (`data`, at most 20 MiB each) are stored as artifacts of the session, a `file` source with provider `nylorun` names an artifact, and a URL is refused. `resume` answers interrupts. A busy session is a `RUN_ERROR` in the stream; any file type is accepted, and the agent's harness decides how its model sees it.",
33847
34503
  "security": [
33848
34504
  {
33849
34505
  "applicationKey": []
34506
+ },
34507
+ {
34508
+ "issuerToken": []
33850
34509
  }
33851
34510
  ],
33852
34511
  "x-nylorun-credentials": [
33853
- "application"
34512
+ "subject",
34513
+ "token"
34514
+ ],
34515
+ "x-nylorun-scopes": [
34516
+ "sessions:own"
33854
34517
  ],
33855
- "x-nylorun-scopes": "never",
33856
34518
  "parameters": [
33857
34519
  {
33858
34520
  "schema": {
33859
34521
  "type": "string"
33860
34522
  },
33861
34523
  "required": true,
33862
- "name": "sessionId",
34524
+ "name": "agentId",
33863
34525
  "in": "path"
33864
34526
  },
33865
34527
  {
33866
34528
  "schema": {
33867
34529
  "type": "string",
33868
- "enum": [
33869
- "bash",
33870
- "read",
33871
- "write",
33872
- "edit",
33873
- "grep",
33874
- "glob"
33875
- ]
34530
+ "description": "The protocol version, `18`"
33876
34531
  },
33877
34532
  "required": true,
33878
- "name": "tool",
33879
- "in": "path"
34533
+ "description": "The protocol version, `18`",
34534
+ "name": "Nylorun-Protocol",
34535
+ "in": "header"
33880
34536
  },
33881
34537
  {
33882
34538
  "schema": {
33883
34539
  "type": "string",
33884
- "description": "The protocol version, `18`"
34540
+ "description": "The person an application key acts for"
33885
34541
  },
33886
- "required": true,
33887
- "description": "The protocol version, `18`",
33888
- "name": "Nylorun-Protocol",
34542
+ "required": false,
34543
+ "description": "The person an application key acts for",
34544
+ "name": "Nylorun-Subject",
34545
+ "in": "header"
34546
+ },
34547
+ {
34548
+ "schema": {
34549
+ "type": "string",
34550
+ "description": "The subject's space-separated scopes; required with a subject"
34551
+ },
34552
+ "required": false,
34553
+ "description": "The subject's space-separated scopes; required with a subject",
34554
+ "name": "Nylorun-Scopes",
34555
+ "in": "header"
34556
+ },
34557
+ {
34558
+ "schema": {
34559
+ "type": "string",
34560
+ "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored"
34561
+ },
34562
+ "required": false,
34563
+ "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored",
34564
+ "name": "traceparent",
34565
+ "in": "header"
34566
+ },
34567
+ {
34568
+ "schema": {
34569
+ "type": "string",
34570
+ "description": "W3C trace context, kept with `traceparent`"
34571
+ },
34572
+ "required": false,
34573
+ "description": "W3C trace context, kept with `traceparent`",
34574
+ "name": "tracestate",
33889
34575
  "in": "header"
33890
34576
  }
33891
34577
  ],
@@ -33894,21 +34580,18 @@
33894
34580
  "content": {
33895
34581
  "application/json": {
33896
34582
  "schema": {
33897
- "type": "object",
33898
- "properties": {},
33899
- "additionalProperties": {},
33900
- "description": "The tool's input"
34583
+ "$ref": "#/components/schemas/AgUiRunAgentInput"
33901
34584
  }
33902
34585
  }
33903
34586
  }
33904
34587
  },
33905
34588
  "responses": {
33906
34589
  "200": {
33907
- "description": "The tool's output, or why it failed",
34590
+ "description": "The run's events, from RUN_STARTED to its end",
33908
34591
  "content": {
33909
- "application/json": {
33910
- "schema": {
33911
- "$ref": "#/components/schemas/SandboxToolOutcome"
34592
+ "text/event-stream": {
34593
+ "itemSchema": {
34594
+ "$ref": "#/components/schemas/AgUiEvent"
33912
34595
  }
33913
34596
  }
33914
34597
  }
@@ -33924,7 +34607,7 @@
33924
34607
  }
33925
34608
  },
33926
34609
  "401": {
33927
- "description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
34610
+ "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`)",
33928
34611
  "content": {
33929
34612
  "application/json": {
33930
34613
  "schema": {
@@ -33953,9 +34636,6 @@
33953
34636
  }
33954
34637
  }
33955
34638
  },
33956
- "409": {
33957
- "description": "A turn is running"
33958
- },
33959
34639
  "426": {
33960
34640
  "description": "`Nylorun-Protocol` missing or unsupported",
33961
34641
  "content": {
@@ -33979,13 +34659,13 @@
33979
34659
  }
33980
34660
  }
33981
34661
  },
33982
- "/v1/ag-ui/agents/{agentId}": {
33983
- "post": {
34662
+ "/v1/ag-ui/agents/{agentId}/threads/{threadId}/events": {
34663
+ "get": {
33984
34664
  "tags": [
33985
34665
  "AG-UI"
33986
34666
  ],
33987
- "summary": "Run an agent",
33988
- "description": "For a person, named by a trusted issuer's token or by `Nylorun-Subject`. The thread is one session per person, agent and thread, created on its first run with `forwardedProps.nylorun.session`. The trailing user message starts a turn (its id is the idempotency key); its media parts are files: bytes sent inline (`data`, at most 20 MiB each) are stored as artifacts of the session, a `file` source with provider `nylorun` names an artifact, and a URL is refused. `resume` answers interrupts. A busy session is a `RUN_ERROR` in the stream; any file type is accepted, and the agent's harness decides how its model sees it.",
34667
+ "summary": "Reattach to a run",
34668
+ "description": "The rest of a run after a dropped connection, from `Last-Event-ID` or `cursor`.",
33989
34669
  "security": [
33990
34670
  {
33991
34671
  "applicationKey": []
@@ -34012,68 +34692,64 @@
34012
34692
  },
34013
34693
  {
34014
34694
  "schema": {
34015
- "type": "string",
34016
- "description": "The protocol version, `18`"
34695
+ "type": "string"
34017
34696
  },
34018
34697
  "required": true,
34019
- "description": "The protocol version, `18`",
34020
- "name": "Nylorun-Protocol",
34021
- "in": "header"
34698
+ "name": "threadId",
34699
+ "in": "path"
34022
34700
  },
34023
34701
  {
34024
34702
  "schema": {
34025
- "type": "string",
34026
- "description": "The person an application key acts for"
34703
+ "type": "string"
34027
34704
  },
34028
34705
  "required": false,
34029
- "description": "The person an application key acts for",
34030
- "name": "Nylorun-Subject",
34031
- "in": "header"
34706
+ "name": "cursor",
34707
+ "in": "query"
34032
34708
  },
34033
34709
  {
34034
34710
  "schema": {
34035
34711
  "type": "string",
34036
- "description": "The subject's space-separated scopes; required with a subject"
34712
+ "description": "The run to report events as"
34037
34713
  },
34038
34714
  "required": false,
34039
- "description": "The subject's space-separated scopes; required with a subject",
34040
- "name": "Nylorun-Scopes",
34715
+ "description": "The run to report events as",
34716
+ "name": "runId",
34717
+ "in": "query"
34718
+ },
34719
+ {
34720
+ "schema": {
34721
+ "type": "string",
34722
+ "description": "The protocol version, `18`"
34723
+ },
34724
+ "required": true,
34725
+ "description": "The protocol version, `18`",
34726
+ "name": "Nylorun-Protocol",
34041
34727
  "in": "header"
34042
34728
  },
34043
34729
  {
34044
34730
  "schema": {
34045
34731
  "type": "string",
34046
- "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored"
34732
+ "description": "The person an application key acts for"
34047
34733
  },
34048
34734
  "required": false,
34049
- "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored",
34050
- "name": "traceparent",
34735
+ "description": "The person an application key acts for",
34736
+ "name": "Nylorun-Subject",
34051
34737
  "in": "header"
34052
34738
  },
34053
34739
  {
34054
34740
  "schema": {
34055
34741
  "type": "string",
34056
- "description": "W3C trace context, kept with `traceparent`"
34742
+ "description": "The subject's space-separated scopes; required with a subject"
34057
34743
  },
34058
34744
  "required": false,
34059
- "description": "W3C trace context, kept with `traceparent`",
34060
- "name": "tracestate",
34745
+ "description": "The subject's space-separated scopes; required with a subject",
34746
+ "name": "Nylorun-Scopes",
34061
34747
  "in": "header"
34062
34748
  }
34063
34749
  ],
34064
- "requestBody": {
34065
- "required": true,
34066
- "content": {
34067
- "application/json": {
34068
- "schema": {
34069
- "$ref": "#/components/schemas/AgUiRunAgentInput"
34070
- }
34071
- }
34072
- }
34073
- },
34074
34750
  "responses": {
34075
34751
  "200": {
34076
- "description": "The run's events, from RUN_STARTED to its end",
34752
+ "description": "The run's remaining events",
34077
34753
  "content": {
34078
34754
  "text/event-stream": {
34079
34755
  "itemSchema": {
@@ -34082,6 +34758,9 @@
34082
34758
  }
34083
34759
  }
34084
34760
  },
34761
+ "204": {
34762
+ "description": "Nothing to send: no run is going, and none ended after the cursor"
34763
+ },
34085
34764
  "400": {
34086
34765
  "description": "Invalid headers, path, body or cursor",
34087
34766
  "content": {
@@ -34145,13 +34824,12 @@
34145
34824
  }
34146
34825
  }
34147
34826
  },
34148
- "/v1/ag-ui/agents/{agentId}/threads/{threadId}/events": {
34827
+ "/v1/ag-ui/agents/{agentId}/threads/{threadId}/messages": {
34149
34828
  "get": {
34150
34829
  "tags": [
34151
34830
  "AG-UI"
34152
34831
  ],
34153
- "summary": "Reattach to a run",
34154
- "description": "The rest of a run after a dropped connection, from `Last-Event-ID` or `cursor`.",
34832
+ "summary": "Get a thread's messages",
34155
34833
  "security": [
34156
34834
  {
34157
34835
  "applicationKey": []
@@ -34184,24 +34862,6 @@
34184
34862
  "name": "threadId",
34185
34863
  "in": "path"
34186
34864
  },
34187
- {
34188
- "schema": {
34189
- "type": "string"
34190
- },
34191
- "required": false,
34192
- "name": "cursor",
34193
- "in": "query"
34194
- },
34195
- {
34196
- "schema": {
34197
- "type": "string",
34198
- "description": "The run to report events as"
34199
- },
34200
- "required": false,
34201
- "description": "The run to report events as",
34202
- "name": "runId",
34203
- "in": "query"
34204
- },
34205
34865
  {
34206
34866
  "schema": {
34207
34867
  "type": "string",
@@ -34235,18 +34895,18 @@
34235
34895
  ],
34236
34896
  "responses": {
34237
34897
  "200": {
34238
- "description": "The run's remaining events",
34898
+ "description": "The thread's messages; none before its first run",
34239
34899
  "content": {
34240
- "text/event-stream": {
34241
- "itemSchema": {
34242
- "$ref": "#/components/schemas/AgUiEvent"
34900
+ "application/json": {
34901
+ "schema": {
34902
+ "type": "array",
34903
+ "items": {
34904
+ "$ref": "#/components/schemas/AgUiMessage"
34905
+ }
34243
34906
  }
34244
34907
  }
34245
34908
  }
34246
34909
  },
34247
- "204": {
34248
- "description": "Nothing to send: no run is going, and none ended after the cursor"
34249
- },
34250
34910
  "400": {
34251
34911
  "description": "Invalid headers, path, body or cursor",
34252
34912
  "content": {
@@ -34310,12 +34970,12 @@
34310
34970
  }
34311
34971
  }
34312
34972
  },
34313
- "/v1/ag-ui/agents/{agentId}/threads/{threadId}/messages": {
34314
- "get": {
34973
+ "/v1/ag-ui/agents/{agentId}/threads/{threadId}/cancel": {
34974
+ "post": {
34315
34975
  "tags": [
34316
34976
  "AG-UI"
34317
34977
  ],
34318
- "summary": "Get a thread's messages",
34978
+ "summary": "Cancel a thread's running turn",
34319
34979
  "security": [
34320
34980
  {
34321
34981
  "applicationKey": []
@@ -34380,18 +35040,8 @@
34380
35040
  }
34381
35041
  ],
34382
35042
  "responses": {
34383
- "200": {
34384
- "description": "The thread's messages; none before its first run",
34385
- "content": {
34386
- "application/json": {
34387
- "schema": {
34388
- "type": "array",
34389
- "items": {
34390
- "$ref": "#/components/schemas/AgUiMessage"
34391
- }
34392
- }
34393
- }
34394
- }
35043
+ "204": {
35044
+ "description": "Cancelled"
34395
35045
  },
34396
35046
  "400": {
34397
35047
  "description": "Invalid headers, path, body or cursor",
@@ -34456,12 +35106,16 @@
34456
35106
  }
34457
35107
  }
34458
35108
  },
34459
- "/v1/ag-ui/agents/{agentId}/threads/{threadId}/cancel": {
34460
- "post": {
35109
+ "/v1/a2a/agents/{agentId}/card": {
35110
+ "get": {
34461
35111
  "tags": [
34462
- "AG-UI"
35112
+ "A2A"
34463
35113
  ],
34464
- "summary": "Cancel a thread's running turn",
35114
+ "summary": "Get an agent's A2A card",
35115
+ "externalDocs": {
35116
+ "description": "The Nylorun A2A profile v2",
35117
+ "url": "https://docs.nylorun.com/a2a/profile/v2"
35118
+ },
34465
35119
  "security": [
34466
35120
  {
34467
35121
  "applicationKey": []
@@ -34471,10 +35125,12 @@
34471
35125
  }
34472
35126
  ],
34473
35127
  "x-nylorun-credentials": [
35128
+ "application",
34474
35129
  "subject",
34475
35130
  "token"
34476
35131
  ],
34477
35132
  "x-nylorun-scopes": [
35133
+ "agents:read",
34478
35134
  "sessions:own"
34479
35135
  ],
34480
35136
  "parameters": [
@@ -34486,14 +35142,6 @@
34486
35142
  "name": "agentId",
34487
35143
  "in": "path"
34488
35144
  },
34489
- {
34490
- "schema": {
34491
- "type": "string"
34492
- },
34493
- "required": true,
34494
- "name": "threadId",
34495
- "in": "path"
34496
- },
34497
35145
  {
34498
35146
  "schema": {
34499
35147
  "type": "string",
@@ -34526,8 +35174,15 @@
34526
35174
  }
34527
35175
  ],
34528
35176
  "responses": {
34529
- "204": {
34530
- "description": "Cancelled"
35177
+ "200": {
35178
+ "description": "The card",
35179
+ "content": {
35180
+ "application/json": {
35181
+ "schema": {
35182
+ "$ref": "#/components/schemas/A2aAgentCard"
35183
+ }
35184
+ }
35185
+ }
34531
35186
  },
34532
35187
  "400": {
34533
35188
  "description": "Invalid headers, path, body or cursor",
@@ -34592,12 +35247,13 @@
34592
35247
  }
34593
35248
  }
34594
35249
  },
34595
- "/v1/a2a/agents/{agentId}/card": {
34596
- "get": {
35250
+ "/v1/a2a/agents/{agentId}": {
35251
+ "post": {
34597
35252
  "tags": [
34598
35253
  "A2A"
34599
35254
  ],
34600
- "summary": "Get an agent's A2A card",
35255
+ "summary": "Call an agent over A2A",
35256
+ "description": "A2A 1.0 JSON-RPC, for a subject, under the Nylorun profile v2 (Host feature `a2a-profile-v2`). `SendMessage` blocks up to the Runtime limit `a2aWaitMs` (5 minutes by default; then the task is answered still `WORKING`) unless `returnImmediately`; `GetTask` (with `historyLength`), `CancelTask` and `ListTasks`; and the four push notification config methods, plus `configuration.taskPushNotificationConfig` in `SendMessage`: each update is POSTed as one `StreamResponse`, signed with Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature` with the Runtime's `a2a.push.secret`) and `X-A2A-Notification-Token`, at least once, retried for up to 24 hours, to hosts the Runtime allows (`a2a.push.allowHosts` for private ones). A message to a busy context is queued and answered with the task that will take it (`TASK_STATE_SUBMITTED`); `message.metadata.delivery: \"reject\"` asks for `UnsupportedOperationError` (reason `CONTEXT_BUSY`) instead. A message is text, one data part, or text with `raw` files (stored as artifacts of the context's session) and `url` files (fetched by the Runtime), each at most the Runtime limit `inlineFileBytes` (20 MiB by default). An approval, question or connection the task waits for (`AUTH_REQUIRED` or `INPUT_REQUIRED`) is shown under `interactions/v1` and answered on the same task with `{ interactionId, approved }` or `{ interactionId, value }` under that URI in the message's `metadata`; text never approves. Artifacts carry the turn's output and the files it wrote, as `url` parts at `/v1/a2a/files/…` with `files/v1`; the task's metadata carries `progress/v1`, `telemetry/v1` and `effects/v1`. Extension data is answered only for the extensions activated with `A2A-Extensions`. A context is one session per subject, agent and `contextId`; a task is one turn. JSON-RPC errors are answered with 200; limits, scopes and unavailable streams stay HTTP errors. Not served: streaming, `GetExtendedAgentCard`.",
34601
35257
  "externalDocs": {
34602
35258
  "description": "The A2A specification",
34603
35259
  "url": "https://a2a-protocol.org/latest/specification/"
@@ -34611,12 +35267,10 @@
34611
35267
  }
34612
35268
  ],
34613
35269
  "x-nylorun-credentials": [
34614
- "application",
34615
35270
  "subject",
34616
35271
  "token"
34617
35272
  ],
34618
35273
  "x-nylorun-scopes": [
34619
- "agents:read",
34620
35274
  "sessions:own"
34621
35275
  ],
34622
35276
  "parameters": [
@@ -34628,6 +35282,16 @@
34628
35282
  "name": "agentId",
34629
35283
  "in": "path"
34630
35284
  },
35285
+ {
35286
+ "schema": {
35287
+ "type": "string",
35288
+ "description": "Or the `A2A-Version` header: `1.0`"
35289
+ },
35290
+ "required": false,
35291
+ "description": "Or the `A2A-Version` header: `1.0`",
35292
+ "name": "A2A-Version",
35293
+ "in": "query"
35294
+ },
34631
35295
  {
34632
35296
  "schema": {
34633
35297
  "type": "string",
@@ -34657,15 +35321,65 @@
34657
35321
  "description": "The subject's space-separated scopes; required with a subject",
34658
35322
  "name": "Nylorun-Scopes",
34659
35323
  "in": "header"
35324
+ },
35325
+ {
35326
+ "schema": {
35327
+ "type": "string",
35328
+ "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored"
35329
+ },
35330
+ "required": false,
35331
+ "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored",
35332
+ "name": "traceparent",
35333
+ "in": "header"
35334
+ },
35335
+ {
35336
+ "schema": {
35337
+ "type": "string",
35338
+ "description": "W3C trace context, kept with `traceparent`"
35339
+ },
35340
+ "required": false,
35341
+ "description": "W3C trace context, kept with `traceparent`",
35342
+ "name": "tracestate",
35343
+ "in": "header"
35344
+ },
35345
+ {
35346
+ "schema": {
35347
+ "type": "string",
35348
+ "description": "Comma-separated profile v2 extension URIs to activate; the answer echoes the activated ones"
35349
+ },
35350
+ "required": false,
35351
+ "description": "Comma-separated profile v2 extension URIs to activate; the answer echoes the activated ones",
35352
+ "name": "A2A-Extensions",
35353
+ "in": "header"
34660
35354
  }
34661
35355
  ],
35356
+ "requestBody": {
35357
+ "required": true,
35358
+ "content": {
35359
+ "application/json": {
35360
+ "schema": {
35361
+ "$ref": "#/components/schemas/A2aJsonRpcRequest"
35362
+ }
35363
+ }
35364
+ }
35365
+ },
34662
35366
  "responses": {
34663
35367
  "200": {
34664
- "description": "The card",
35368
+ "description": "The JSON-RPC answer: a result, or an A2A error",
35369
+ "headers": {
35370
+ "A2A-Extensions": {
35371
+ "schema": {
35372
+ "type": "string",
35373
+ "description": "Comma-separated profile v2 extension URIs to activate; the answer echoes the activated ones"
35374
+ },
35375
+ "required": false,
35376
+ "description": "Comma-separated profile v2 extension URIs to activate; the answer echoes the activated ones"
35377
+ }
35378
+ },
34665
35379
  "content": {
34666
35380
  "application/json": {
34667
35381
  "schema": {
34668
- "$ref": "#/components/schemas/A2aAgentCard"
35382
+ "$ref": "#/components/schemas/A2aJsonRpcResponse"
34669
35383
  }
34670
35384
  }
34671
35385
  }
@@ -34733,17 +35447,13 @@
34733
35447
  }
34734
35448
  }
34735
35449
  },
34736
- "/v1/a2a/agents/{agentId}": {
34737
- "post": {
35450
+ "/v1/a2a/files/{artifactId}/versions/{version}": {
35451
+ "get": {
34738
35452
  "tags": [
34739
35453
  "A2A"
34740
35454
  ],
34741
- "summary": "Call an agent over A2A",
34742
- "description": "A2A 1.0 JSON-RPC, for a subject: `SendMessage` (blocking up to the Runtime limit `a2aWaitMs`, 5 minutes by default, or `returnImmediately`), `GetTask` and `CancelTask`. A message is text, one data part, or text and `raw` files (at most the Runtime limit `inlineFileBytes` each, 20 MiB by default, stored as artifacts of the context's session); a file `url` is `ContentTypeNotSupportedError`. A context is one session per subject, agent and `contextId`; a task is one turn. JSON-RPC errors are answered with 200; limits, scopes and unavailable streams stay HTTP errors.",
34743
- "externalDocs": {
34744
- "description": "The A2A specification",
34745
- "url": "https://a2a-protocol.org/latest/specification/"
34746
- },
35455
+ "summary": "Download a file an A2A task wrote",
35456
+ "description": "Where the `url` parts of an A2A task's file artifacts point (Host feature `a2a-profile-v2`, `files/v1`): a file version's bytes, with Range, or a folder version as a zip. Served only to the subject whose session wrote it, as the A2A endpoint is: send the same credential, `Nylorun-Subject` and `Nylorun-Scopes`. Another subject's artifact is a `404`.",
34747
35457
  "security": [
34748
35458
  {
34749
35459
  "applicationKey": []
@@ -34765,18 +35475,18 @@
34765
35475
  "type": "string"
34766
35476
  },
34767
35477
  "required": true,
34768
- "name": "agentId",
35478
+ "name": "artifactId",
34769
35479
  "in": "path"
34770
35480
  },
34771
35481
  {
34772
35482
  "schema": {
34773
35483
  "type": "string",
34774
- "description": "Or the `A2A-Version` header: `1.0`"
35484
+ "description": "A version number, or `latest`"
34775
35485
  },
34776
- "required": false,
34777
- "description": "Or the `A2A-Version` header: `1.0`",
34778
- "name": "A2A-Version",
34779
- "in": "query"
35486
+ "required": true,
35487
+ "description": "A version number, or `latest`",
35488
+ "name": "version",
35489
+ "in": "path"
34780
35490
  },
34781
35491
  {
34782
35492
  "schema": {
@@ -34807,45 +35517,79 @@
34807
35517
  "description": "The subject's space-separated scopes; required with a subject",
34808
35518
  "name": "Nylorun-Scopes",
34809
35519
  "in": "header"
34810
- },
34811
- {
34812
- "schema": {
34813
- "type": "string",
34814
- "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored"
34815
- },
34816
- "required": false,
34817
- "description": "W3C trace context: the turn this request starts joins the caller's trace (feature `traces`). A malformed value is ignored",
34818
- "name": "traceparent",
34819
- "in": "header"
34820
- },
34821
- {
34822
- "schema": {
34823
- "type": "string",
34824
- "description": "W3C trace context, kept with `traceparent`"
34825
- },
34826
- "required": false,
34827
- "description": "W3C trace context, kept with `traceparent`",
34828
- "name": "tracestate",
34829
- "in": "header"
34830
35520
  }
34831
35521
  ],
34832
- "requestBody": {
34833
- "required": true,
34834
- "content": {
34835
- "application/json": {
34836
- "schema": {
34837
- "$ref": "#/components/schemas/A2aJsonRpcRequest"
34838
- }
34839
- }
34840
- }
34841
- },
34842
35522
  "responses": {
34843
35523
  "200": {
34844
- "description": "The JSON-RPC answer: a result, or an A2A error",
35524
+ "description": "The file, or the folder's zip",
35525
+ "headers": {
35526
+ "Accept-Ranges": {
35527
+ "schema": {
35528
+ "type": "string",
35529
+ "description": "`bytes`"
35530
+ },
35531
+ "required": true,
35532
+ "description": "`bytes`"
35533
+ },
35534
+ "Content-Range": {
35535
+ "schema": {
35536
+ "type": "string",
35537
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
35538
+ },
35539
+ "required": false,
35540
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
35541
+ },
35542
+ "ETag": {
35543
+ "schema": {
35544
+ "type": "string",
35545
+ "description": "The version's SHA-256, quoted"
35546
+ },
35547
+ "required": true,
35548
+ "description": "The version's SHA-256, quoted"
35549
+ }
35550
+ },
34845
35551
  "content": {
34846
- "application/json": {
35552
+ "*/*": {
34847
35553
  "schema": {
34848
- "$ref": "#/components/schemas/A2aJsonRpcResponse"
35554
+ "type": "string",
35555
+ "format": "binary"
35556
+ }
35557
+ }
35558
+ }
35559
+ },
35560
+ "206": {
35561
+ "description": "The bytes the `Range` header asked for",
35562
+ "headers": {
35563
+ "Accept-Ranges": {
35564
+ "schema": {
35565
+ "type": "string",
35566
+ "description": "`bytes`"
35567
+ },
35568
+ "required": true,
35569
+ "description": "`bytes`"
35570
+ },
35571
+ "Content-Range": {
35572
+ "schema": {
35573
+ "type": "string",
35574
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
35575
+ },
35576
+ "required": false,
35577
+ "description": "The bytes sent, on a `206`: `bytes <start>-<end>/<size>`"
35578
+ },
35579
+ "ETag": {
35580
+ "schema": {
35581
+ "type": "string",
35582
+ "description": "The version's SHA-256, quoted"
35583
+ },
35584
+ "required": true,
35585
+ "description": "The version's SHA-256, quoted"
35586
+ }
35587
+ },
35588
+ "content": {
35589
+ "*/*": {
35590
+ "schema": {
35591
+ "type": "string",
35592
+ "format": "binary"
34849
35593
  }
34850
35594
  }
34851
35595
  }
@@ -34890,6 +35634,9 @@
34890
35634
  }
34891
35635
  }
34892
35636
  },
35637
+ "416": {
35638
+ "description": "The `Range` starts past the end of the file"
35639
+ },
34893
35640
  "426": {
34894
35641
  "description": "`Nylorun-Protocol` missing or unsupported",
34895
35642
  "content": {
@@ -37338,7 +38085,7 @@
37338
38085
  },
37339
38086
  {
37340
38087
  "name": "A2A",
37341
- "description": "The same sessions through Agent2Agent: a context is one session per subject, Agent and `contextId`, and a task is one turn; every caller's session runs on the Agent's disk and vault, so an app that serves several audiences makes an Agent for each. The card is how an A2A client finds the Agent."
38088
+ "description": "The same sessions through Agent2Agent (A2A 1.0, JSON-RPC) under the Nylorun profile v2: a context is one session per subject, Agent and `contextId`, and a task is one turn; every caller's session runs on the Agent's disk and vault, so an app that serves several audiences makes an Agent for each. The card is how an A2A client finds the Agent; push notifications carry a task's updates to the caller, and the files a task writes are downloaded from `/v1/a2a/files/…` by the same subject."
37342
38089
  },
37343
38090
  {
37344
38091
  "name": "Artifacts",