@nylorun/runtime 0.31.0-beta → 0.33.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/api/components.d.ts +100 -0
- package/dist/api/components.js +4 -1
- package/dist/api/http/routes/agent-manifests.d.ts +2 -1
- package/dist/api/http/routes/agent-manifests.js +29 -2
- package/dist/api/http/routes/sessions.js +63 -2
- package/dist/api/openapi.js +4 -0
- package/dist/gates/handler.js +2 -2
- package/dist/gates/in-process.d.ts +4 -3
- package/dist/gates/in-process.js +11 -5
- package/dist/gates/tenant-vaults.d.ts +4 -3
- package/dist/gates/tenant-vaults.js +2 -2
- package/dist/harness-api/start.js +1 -1
- package/dist/host/main.js +2 -0
- package/dist/host/stack-config.d.ts +5 -0
- package/dist/host/stack-config.js +15 -0
- package/dist/management-openapi.json +90 -8
- package/dist/model/descriptor.d.ts +5 -4
- package/dist/model/descriptor.js +4 -3
- package/dist/model/pi-model.js +17 -1
- package/dist/openapi.json +880 -2
- package/dist/tenant/agent-manifests.d.ts +6 -1
- package/dist/tenant/agent-manifests.js +50 -8
- package/dist/tenant/agents.d.ts +4 -3
- package/dist/tenant/agents.js +26 -5
- package/dist/tenant/context.d.ts +6 -1
- package/dist/tenant/session-model.d.ts +16 -0
- package/dist/tenant/session-model.js +46 -0
- package/dist/vault/host-identity.d.ts +24 -0
- package/dist/vault/host-identity.js +35 -0
- package/dist/vault/host-model.d.ts +9 -5
- package/dist/vault/host-model.js +30 -19
- package/dist/vault/service.d.ts +18 -2
- package/dist/vault/service.js +52 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
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.
|
|
5
|
+
"version": "0.33.0-beta",
|
|
6
6
|
"x-nylorun-protocol": {
|
|
7
7
|
"min": 16,
|
|
8
8
|
"max": 18,
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"traces",
|
|
35
35
|
"artifact-reads",
|
|
36
36
|
"gateway-credentials",
|
|
37
|
-
"agent-folders"
|
|
37
|
+
"agent-folders",
|
|
38
|
+
"session-model",
|
|
39
|
+
"model-host-identity"
|
|
38
40
|
]
|
|
39
41
|
},
|
|
40
42
|
"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)."
|
|
@@ -8867,6 +8869,113 @@
|
|
|
8867
8869
|
],
|
|
8868
8870
|
"additionalProperties": false
|
|
8869
8871
|
},
|
|
8872
|
+
"SessionModelView": {
|
|
8873
|
+
"anyOf": [
|
|
8874
|
+
{
|
|
8875
|
+
"type": "object",
|
|
8876
|
+
"properties": {
|
|
8877
|
+
"configured": {
|
|
8878
|
+
"type": "boolean",
|
|
8879
|
+
"enum": [
|
|
8880
|
+
false
|
|
8881
|
+
]
|
|
8882
|
+
},
|
|
8883
|
+
"choice": {
|
|
8884
|
+
"type": "object",
|
|
8885
|
+
"properties": {
|
|
8886
|
+
"provider": {
|
|
8887
|
+
"type": "string",
|
|
8888
|
+
"minLength": 1
|
|
8889
|
+
},
|
|
8890
|
+
"model": {
|
|
8891
|
+
"type": "string",
|
|
8892
|
+
"minLength": 1
|
|
8893
|
+
}
|
|
8894
|
+
},
|
|
8895
|
+
"required": [
|
|
8896
|
+
"provider",
|
|
8897
|
+
"model"
|
|
8898
|
+
],
|
|
8899
|
+
"additionalProperties": false
|
|
8900
|
+
}
|
|
8901
|
+
},
|
|
8902
|
+
"required": [
|
|
8903
|
+
"configured"
|
|
8904
|
+
],
|
|
8905
|
+
"additionalProperties": false
|
|
8906
|
+
},
|
|
8907
|
+
{
|
|
8908
|
+
"type": "object",
|
|
8909
|
+
"properties": {
|
|
8910
|
+
"configured": {
|
|
8911
|
+
"type": "boolean",
|
|
8912
|
+
"enum": [
|
|
8913
|
+
true
|
|
8914
|
+
]
|
|
8915
|
+
},
|
|
8916
|
+
"source": {
|
|
8917
|
+
"type": "string",
|
|
8918
|
+
"enum": [
|
|
8919
|
+
"session",
|
|
8920
|
+
"tenant"
|
|
8921
|
+
]
|
|
8922
|
+
},
|
|
8923
|
+
"provider": {
|
|
8924
|
+
"type": "string"
|
|
8925
|
+
},
|
|
8926
|
+
"model": {
|
|
8927
|
+
"type": "string"
|
|
8928
|
+
},
|
|
8929
|
+
"baseUrl": {
|
|
8930
|
+
"type": "string"
|
|
8931
|
+
},
|
|
8932
|
+
"choice": {
|
|
8933
|
+
"type": "object",
|
|
8934
|
+
"properties": {
|
|
8935
|
+
"provider": {
|
|
8936
|
+
"type": "string",
|
|
8937
|
+
"minLength": 1
|
|
8938
|
+
},
|
|
8939
|
+
"model": {
|
|
8940
|
+
"type": "string",
|
|
8941
|
+
"minLength": 1
|
|
8942
|
+
}
|
|
8943
|
+
},
|
|
8944
|
+
"required": [
|
|
8945
|
+
"provider",
|
|
8946
|
+
"model"
|
|
8947
|
+
],
|
|
8948
|
+
"additionalProperties": false
|
|
8949
|
+
}
|
|
8950
|
+
},
|
|
8951
|
+
"required": [
|
|
8952
|
+
"configured",
|
|
8953
|
+
"source",
|
|
8954
|
+
"provider",
|
|
8955
|
+
"model"
|
|
8956
|
+
],
|
|
8957
|
+
"additionalProperties": false
|
|
8958
|
+
}
|
|
8959
|
+
]
|
|
8960
|
+
},
|
|
8961
|
+
"PutSessionModelRequest": {
|
|
8962
|
+
"type": "object",
|
|
8963
|
+
"properties": {
|
|
8964
|
+
"provider": {
|
|
8965
|
+
"type": "string",
|
|
8966
|
+
"minLength": 1
|
|
8967
|
+
},
|
|
8968
|
+
"model": {
|
|
8969
|
+
"type": "string",
|
|
8970
|
+
"minLength": 1
|
|
8971
|
+
}
|
|
8972
|
+
},
|
|
8973
|
+
"required": [
|
|
8974
|
+
"provider",
|
|
8975
|
+
"model"
|
|
8976
|
+
],
|
|
8977
|
+
"additionalProperties": false
|
|
8978
|
+
},
|
|
8870
8979
|
"SessionItemsResponse": {
|
|
8871
8980
|
"type": "object",
|
|
8872
8981
|
"properties": {
|
|
@@ -22875,6 +22984,9 @@
|
|
|
22875
22984
|
},
|
|
22876
22985
|
"pointer": {
|
|
22877
22986
|
"type": "string"
|
|
22987
|
+
},
|
|
22988
|
+
"fix": {
|
|
22989
|
+
"$ref": "#/components/schemas/AgentFolderFix"
|
|
22878
22990
|
}
|
|
22879
22991
|
},
|
|
22880
22992
|
"required": [
|
|
@@ -22884,6 +22996,96 @@
|
|
|
22884
22996
|
],
|
|
22885
22997
|
"additionalProperties": false
|
|
22886
22998
|
},
|
|
22999
|
+
"AgentFolderFix": {
|
|
23000
|
+
"oneOf": [
|
|
23001
|
+
{
|
|
23002
|
+
"type": "object",
|
|
23003
|
+
"properties": {
|
|
23004
|
+
"kind": {
|
|
23005
|
+
"type": "string",
|
|
23006
|
+
"enum": [
|
|
23007
|
+
"rename_key"
|
|
23008
|
+
]
|
|
23009
|
+
},
|
|
23010
|
+
"file": {
|
|
23011
|
+
"type": "string"
|
|
23012
|
+
},
|
|
23013
|
+
"line": {
|
|
23014
|
+
"type": "integer",
|
|
23015
|
+
"exclusiveMinimum": 0
|
|
23016
|
+
},
|
|
23017
|
+
"column": {
|
|
23018
|
+
"type": "integer",
|
|
23019
|
+
"exclusiveMinimum": 0
|
|
23020
|
+
},
|
|
23021
|
+
"from": {
|
|
23022
|
+
"type": "string"
|
|
23023
|
+
},
|
|
23024
|
+
"to": {
|
|
23025
|
+
"type": "string"
|
|
23026
|
+
}
|
|
23027
|
+
},
|
|
23028
|
+
"required": [
|
|
23029
|
+
"kind",
|
|
23030
|
+
"file",
|
|
23031
|
+
"line",
|
|
23032
|
+
"column",
|
|
23033
|
+
"from",
|
|
23034
|
+
"to"
|
|
23035
|
+
],
|
|
23036
|
+
"additionalProperties": false
|
|
23037
|
+
},
|
|
23038
|
+
{
|
|
23039
|
+
"type": "object",
|
|
23040
|
+
"properties": {
|
|
23041
|
+
"kind": {
|
|
23042
|
+
"type": "string",
|
|
23043
|
+
"enum": [
|
|
23044
|
+
"crlf"
|
|
23045
|
+
]
|
|
23046
|
+
},
|
|
23047
|
+
"file": {
|
|
23048
|
+
"type": "string"
|
|
23049
|
+
}
|
|
23050
|
+
},
|
|
23051
|
+
"required": [
|
|
23052
|
+
"kind",
|
|
23053
|
+
"file"
|
|
23054
|
+
],
|
|
23055
|
+
"additionalProperties": false
|
|
23056
|
+
},
|
|
23057
|
+
{
|
|
23058
|
+
"type": "object",
|
|
23059
|
+
"properties": {
|
|
23060
|
+
"kind": {
|
|
23061
|
+
"type": "string",
|
|
23062
|
+
"enum": [
|
|
23063
|
+
"move_skill_secrets"
|
|
23064
|
+
]
|
|
23065
|
+
},
|
|
23066
|
+
"file": {
|
|
23067
|
+
"type": "string"
|
|
23068
|
+
},
|
|
23069
|
+
"skill": {
|
|
23070
|
+
"type": "string"
|
|
23071
|
+
},
|
|
23072
|
+
"secrets": {
|
|
23073
|
+
"type": "array",
|
|
23074
|
+
"items": {
|
|
23075
|
+
"type": "string"
|
|
23076
|
+
}
|
|
23077
|
+
}
|
|
23078
|
+
},
|
|
23079
|
+
"required": [
|
|
23080
|
+
"kind",
|
|
23081
|
+
"file",
|
|
23082
|
+
"skill",
|
|
23083
|
+
"secrets"
|
|
23084
|
+
],
|
|
23085
|
+
"additionalProperties": false
|
|
23086
|
+
}
|
|
23087
|
+
]
|
|
23088
|
+
},
|
|
22887
23089
|
"AgentManifestPlan": {
|
|
22888
23090
|
"type": "object",
|
|
22889
23091
|
"properties": {
|
|
@@ -23302,6 +23504,135 @@
|
|
|
23302
23504
|
],
|
|
23303
23505
|
"additionalProperties": false
|
|
23304
23506
|
},
|
|
23507
|
+
"AgentManifestSourceDiff": {
|
|
23508
|
+
"type": "object",
|
|
23509
|
+
"properties": {
|
|
23510
|
+
"name": {
|
|
23511
|
+
"type": "string"
|
|
23512
|
+
},
|
|
23513
|
+
"from": {
|
|
23514
|
+
"type": "integer",
|
|
23515
|
+
"exclusiveMinimum": 0
|
|
23516
|
+
},
|
|
23517
|
+
"to": {
|
|
23518
|
+
"type": "integer",
|
|
23519
|
+
"exclusiveMinimum": 0
|
|
23520
|
+
},
|
|
23521
|
+
"added": {
|
|
23522
|
+
"type": "array",
|
|
23523
|
+
"items": {
|
|
23524
|
+
"type": "object",
|
|
23525
|
+
"properties": {
|
|
23526
|
+
"path": {
|
|
23527
|
+
"type": "string"
|
|
23528
|
+
},
|
|
23529
|
+
"size": {
|
|
23530
|
+
"type": "integer",
|
|
23531
|
+
"minimum": 0
|
|
23532
|
+
},
|
|
23533
|
+
"sha256": {
|
|
23534
|
+
"type": "string"
|
|
23535
|
+
}
|
|
23536
|
+
},
|
|
23537
|
+
"required": [
|
|
23538
|
+
"path",
|
|
23539
|
+
"size",
|
|
23540
|
+
"sha256"
|
|
23541
|
+
],
|
|
23542
|
+
"additionalProperties": false
|
|
23543
|
+
}
|
|
23544
|
+
},
|
|
23545
|
+
"removed": {
|
|
23546
|
+
"type": "array",
|
|
23547
|
+
"items": {
|
|
23548
|
+
"type": "object",
|
|
23549
|
+
"properties": {
|
|
23550
|
+
"path": {
|
|
23551
|
+
"type": "string"
|
|
23552
|
+
},
|
|
23553
|
+
"size": {
|
|
23554
|
+
"type": "integer",
|
|
23555
|
+
"minimum": 0
|
|
23556
|
+
},
|
|
23557
|
+
"sha256": {
|
|
23558
|
+
"type": "string"
|
|
23559
|
+
}
|
|
23560
|
+
},
|
|
23561
|
+
"required": [
|
|
23562
|
+
"path",
|
|
23563
|
+
"size",
|
|
23564
|
+
"sha256"
|
|
23565
|
+
],
|
|
23566
|
+
"additionalProperties": false
|
|
23567
|
+
}
|
|
23568
|
+
},
|
|
23569
|
+
"changed": {
|
|
23570
|
+
"type": "array",
|
|
23571
|
+
"items": {
|
|
23572
|
+
"type": "object",
|
|
23573
|
+
"properties": {
|
|
23574
|
+
"path": {
|
|
23575
|
+
"type": "string"
|
|
23576
|
+
},
|
|
23577
|
+
"from": {
|
|
23578
|
+
"type": "object",
|
|
23579
|
+
"properties": {
|
|
23580
|
+
"size": {
|
|
23581
|
+
"type": "integer",
|
|
23582
|
+
"minimum": 0
|
|
23583
|
+
},
|
|
23584
|
+
"sha256": {
|
|
23585
|
+
"type": "string"
|
|
23586
|
+
}
|
|
23587
|
+
},
|
|
23588
|
+
"required": [
|
|
23589
|
+
"size",
|
|
23590
|
+
"sha256"
|
|
23591
|
+
],
|
|
23592
|
+
"additionalProperties": false
|
|
23593
|
+
},
|
|
23594
|
+
"to": {
|
|
23595
|
+
"type": "object",
|
|
23596
|
+
"properties": {
|
|
23597
|
+
"size": {
|
|
23598
|
+
"type": "integer",
|
|
23599
|
+
"minimum": 0
|
|
23600
|
+
},
|
|
23601
|
+
"sha256": {
|
|
23602
|
+
"type": "string"
|
|
23603
|
+
}
|
|
23604
|
+
},
|
|
23605
|
+
"required": [
|
|
23606
|
+
"size",
|
|
23607
|
+
"sha256"
|
|
23608
|
+
],
|
|
23609
|
+
"additionalProperties": false
|
|
23610
|
+
}
|
|
23611
|
+
},
|
|
23612
|
+
"required": [
|
|
23613
|
+
"path",
|
|
23614
|
+
"from",
|
|
23615
|
+
"to"
|
|
23616
|
+
],
|
|
23617
|
+
"additionalProperties": false
|
|
23618
|
+
}
|
|
23619
|
+
},
|
|
23620
|
+
"unchanged": {
|
|
23621
|
+
"type": "integer",
|
|
23622
|
+
"minimum": 0
|
|
23623
|
+
}
|
|
23624
|
+
},
|
|
23625
|
+
"required": [
|
|
23626
|
+
"name",
|
|
23627
|
+
"from",
|
|
23628
|
+
"to",
|
|
23629
|
+
"added",
|
|
23630
|
+
"removed",
|
|
23631
|
+
"changed",
|
|
23632
|
+
"unchanged"
|
|
23633
|
+
],
|
|
23634
|
+
"additionalProperties": false
|
|
23635
|
+
},
|
|
23305
23636
|
"DeleteAgentManifestResponse": {
|
|
23306
23637
|
"type": "object",
|
|
23307
23638
|
"properties": {
|
|
@@ -26182,6 +26513,149 @@
|
|
|
26182
26513
|
}
|
|
26183
26514
|
}
|
|
26184
26515
|
},
|
|
26516
|
+
"/v1/agent-manifests/{name}/source/diff": {
|
|
26517
|
+
"get": {
|
|
26518
|
+
"tags": [
|
|
26519
|
+
"Agent manifests"
|
|
26520
|
+
],
|
|
26521
|
+
"summary": "Compare two versions' folders",
|
|
26522
|
+
"description": "The files added, removed and changed from version `from`'s source to version `to`'s, by path, a file changed when its SHA-256 differs (feature `agent-folders`). Each list is sorted by path. A version saved as JSON has no source (`404`).",
|
|
26523
|
+
"security": [
|
|
26524
|
+
{
|
|
26525
|
+
"applicationKey": []
|
|
26526
|
+
}
|
|
26527
|
+
],
|
|
26528
|
+
"x-nylorun-credentials": [
|
|
26529
|
+
"application",
|
|
26530
|
+
"subject"
|
|
26531
|
+
],
|
|
26532
|
+
"x-nylorun-scopes": [
|
|
26533
|
+
"agents:read",
|
|
26534
|
+
"agents:write",
|
|
26535
|
+
"agent-manifests:write"
|
|
26536
|
+
],
|
|
26537
|
+
"parameters": [
|
|
26538
|
+
{
|
|
26539
|
+
"schema": {
|
|
26540
|
+
"type": "string",
|
|
26541
|
+
"description": "The agent manifest's name, such as `triage`"
|
|
26542
|
+
},
|
|
26543
|
+
"required": true,
|
|
26544
|
+
"description": "The agent manifest's name, such as `triage`",
|
|
26545
|
+
"name": "name",
|
|
26546
|
+
"in": "path"
|
|
26547
|
+
},
|
|
26548
|
+
{
|
|
26549
|
+
"schema": {
|
|
26550
|
+
"type": "string",
|
|
26551
|
+
"description": "The version to compare from"
|
|
26552
|
+
},
|
|
26553
|
+
"required": true,
|
|
26554
|
+
"description": "The version to compare from",
|
|
26555
|
+
"name": "from",
|
|
26556
|
+
"in": "query"
|
|
26557
|
+
},
|
|
26558
|
+
{
|
|
26559
|
+
"schema": {
|
|
26560
|
+
"type": "string",
|
|
26561
|
+
"description": "The version to compare to"
|
|
26562
|
+
},
|
|
26563
|
+
"required": true,
|
|
26564
|
+
"description": "The version to compare to",
|
|
26565
|
+
"name": "to",
|
|
26566
|
+
"in": "query"
|
|
26567
|
+
},
|
|
26568
|
+
{
|
|
26569
|
+
"schema": {
|
|
26570
|
+
"type": "string",
|
|
26571
|
+
"description": "The protocol version, `18`"
|
|
26572
|
+
},
|
|
26573
|
+
"required": true,
|
|
26574
|
+
"description": "The protocol version, `18`",
|
|
26575
|
+
"name": "Nylorun-Protocol",
|
|
26576
|
+
"in": "header"
|
|
26577
|
+
},
|
|
26578
|
+
{
|
|
26579
|
+
"schema": {
|
|
26580
|
+
"type": "string",
|
|
26581
|
+
"description": "The person an application key acts for"
|
|
26582
|
+
},
|
|
26583
|
+
"required": false,
|
|
26584
|
+
"description": "The person an application key acts for",
|
|
26585
|
+
"name": "Nylorun-Subject",
|
|
26586
|
+
"in": "header"
|
|
26587
|
+
},
|
|
26588
|
+
{
|
|
26589
|
+
"schema": {
|
|
26590
|
+
"type": "string",
|
|
26591
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
26592
|
+
},
|
|
26593
|
+
"required": false,
|
|
26594
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
26595
|
+
"name": "Nylorun-Scopes",
|
|
26596
|
+
"in": "header"
|
|
26597
|
+
}
|
|
26598
|
+
],
|
|
26599
|
+
"responses": {
|
|
26600
|
+
"200": {
|
|
26601
|
+
"description": "What changed",
|
|
26602
|
+
"content": {
|
|
26603
|
+
"application/json": {
|
|
26604
|
+
"schema": {
|
|
26605
|
+
"$ref": "#/components/schemas/AgentManifestSourceDiff"
|
|
26606
|
+
}
|
|
26607
|
+
}
|
|
26608
|
+
}
|
|
26609
|
+
},
|
|
26610
|
+
"400": {
|
|
26611
|
+
"description": "`from` or `to` is not a version number"
|
|
26612
|
+
},
|
|
26613
|
+
"401": {
|
|
26614
|
+
"description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
|
|
26615
|
+
"content": {
|
|
26616
|
+
"application/json": {
|
|
26617
|
+
"schema": {
|
|
26618
|
+
"$ref": "#/components/schemas/Rejected"
|
|
26619
|
+
}
|
|
26620
|
+
}
|
|
26621
|
+
}
|
|
26622
|
+
},
|
|
26623
|
+
"403": {
|
|
26624
|
+
"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`)",
|
|
26625
|
+
"content": {
|
|
26626
|
+
"application/json": {
|
|
26627
|
+
"schema": {
|
|
26628
|
+
"$ref": "#/components/schemas/Rejected"
|
|
26629
|
+
}
|
|
26630
|
+
}
|
|
26631
|
+
}
|
|
26632
|
+
},
|
|
26633
|
+
"404": {
|
|
26634
|
+
"description": "No such version, or one was saved as JSON and has no source"
|
|
26635
|
+
},
|
|
26636
|
+
"426": {
|
|
26637
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
26638
|
+
"content": {
|
|
26639
|
+
"application/json": {
|
|
26640
|
+
"schema": {
|
|
26641
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
26642
|
+
}
|
|
26643
|
+
}
|
|
26644
|
+
}
|
|
26645
|
+
},
|
|
26646
|
+
"503": {
|
|
26647
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
26648
|
+
"content": {
|
|
26649
|
+
"application/json": {
|
|
26650
|
+
"schema": {
|
|
26651
|
+
"$ref": "#/components/schemas/Rejected"
|
|
26652
|
+
}
|
|
26653
|
+
}
|
|
26654
|
+
}
|
|
26655
|
+
}
|
|
26656
|
+
}
|
|
26657
|
+
}
|
|
26658
|
+
},
|
|
26185
26659
|
"/v1/files/{file}": {
|
|
26186
26660
|
"put": {
|
|
26187
26661
|
"tags": [
|
|
@@ -32451,6 +32925,410 @@
|
|
|
32451
32925
|
}
|
|
32452
32926
|
}
|
|
32453
32927
|
},
|
|
32928
|
+
"/v1/sessions/{sessionId}/model": {
|
|
32929
|
+
"get": {
|
|
32930
|
+
"tags": [
|
|
32931
|
+
"Sessions API"
|
|
32932
|
+
],
|
|
32933
|
+
"summary": "Get a session's model",
|
|
32934
|
+
"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.",
|
|
32935
|
+
"security": [
|
|
32936
|
+
{
|
|
32937
|
+
"applicationKey": []
|
|
32938
|
+
},
|
|
32939
|
+
{
|
|
32940
|
+
"issuerToken": []
|
|
32941
|
+
}
|
|
32942
|
+
],
|
|
32943
|
+
"x-nylorun-credentials": [
|
|
32944
|
+
"application",
|
|
32945
|
+
"subject",
|
|
32946
|
+
"token"
|
|
32947
|
+
],
|
|
32948
|
+
"x-nylorun-scopes": [
|
|
32949
|
+
"sessions:own"
|
|
32950
|
+
],
|
|
32951
|
+
"parameters": [
|
|
32952
|
+
{
|
|
32953
|
+
"schema": {
|
|
32954
|
+
"type": "string"
|
|
32955
|
+
},
|
|
32956
|
+
"required": true,
|
|
32957
|
+
"name": "sessionId",
|
|
32958
|
+
"in": "path"
|
|
32959
|
+
},
|
|
32960
|
+
{
|
|
32961
|
+
"schema": {
|
|
32962
|
+
"type": "string",
|
|
32963
|
+
"description": "The protocol version, `18`"
|
|
32964
|
+
},
|
|
32965
|
+
"required": true,
|
|
32966
|
+
"description": "The protocol version, `18`",
|
|
32967
|
+
"name": "Nylorun-Protocol",
|
|
32968
|
+
"in": "header"
|
|
32969
|
+
},
|
|
32970
|
+
{
|
|
32971
|
+
"schema": {
|
|
32972
|
+
"type": "string",
|
|
32973
|
+
"description": "The person an application key acts for"
|
|
32974
|
+
},
|
|
32975
|
+
"required": false,
|
|
32976
|
+
"description": "The person an application key acts for",
|
|
32977
|
+
"name": "Nylorun-Subject",
|
|
32978
|
+
"in": "header"
|
|
32979
|
+
},
|
|
32980
|
+
{
|
|
32981
|
+
"schema": {
|
|
32982
|
+
"type": "string",
|
|
32983
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
32984
|
+
},
|
|
32985
|
+
"required": false,
|
|
32986
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
32987
|
+
"name": "Nylorun-Scopes",
|
|
32988
|
+
"in": "header"
|
|
32989
|
+
}
|
|
32990
|
+
],
|
|
32991
|
+
"responses": {
|
|
32992
|
+
"200": {
|
|
32993
|
+
"description": "The session's model",
|
|
32994
|
+
"content": {
|
|
32995
|
+
"application/json": {
|
|
32996
|
+
"schema": {
|
|
32997
|
+
"$ref": "#/components/schemas/SessionModelView"
|
|
32998
|
+
}
|
|
32999
|
+
}
|
|
33000
|
+
}
|
|
33001
|
+
},
|
|
33002
|
+
"400": {
|
|
33003
|
+
"description": "Invalid headers, path, body or cursor",
|
|
33004
|
+
"content": {
|
|
33005
|
+
"application/json": {
|
|
33006
|
+
"schema": {
|
|
33007
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33008
|
+
}
|
|
33009
|
+
}
|
|
33010
|
+
}
|
|
33011
|
+
},
|
|
33012
|
+
"401": {
|
|
33013
|
+
"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`)",
|
|
33014
|
+
"content": {
|
|
33015
|
+
"application/json": {
|
|
33016
|
+
"schema": {
|
|
33017
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33018
|
+
}
|
|
33019
|
+
}
|
|
33020
|
+
}
|
|
33021
|
+
},
|
|
33022
|
+
"403": {
|
|
33023
|
+
"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`)",
|
|
33024
|
+
"content": {
|
|
33025
|
+
"application/json": {
|
|
33026
|
+
"schema": {
|
|
33027
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33028
|
+
}
|
|
33029
|
+
}
|
|
33030
|
+
}
|
|
33031
|
+
},
|
|
33032
|
+
"404": {
|
|
33033
|
+
"description": "Not found (`not_found`)",
|
|
33034
|
+
"content": {
|
|
33035
|
+
"application/json": {
|
|
33036
|
+
"schema": {
|
|
33037
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33038
|
+
}
|
|
33039
|
+
}
|
|
33040
|
+
}
|
|
33041
|
+
},
|
|
33042
|
+
"426": {
|
|
33043
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
33044
|
+
"content": {
|
|
33045
|
+
"application/json": {
|
|
33046
|
+
"schema": {
|
|
33047
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
33048
|
+
}
|
|
33049
|
+
}
|
|
33050
|
+
}
|
|
33051
|
+
},
|
|
33052
|
+
"503": {
|
|
33053
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
33054
|
+
"content": {
|
|
33055
|
+
"application/json": {
|
|
33056
|
+
"schema": {
|
|
33057
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33058
|
+
}
|
|
33059
|
+
}
|
|
33060
|
+
}
|
|
33061
|
+
}
|
|
33062
|
+
}
|
|
33063
|
+
},
|
|
33064
|
+
"put": {
|
|
33065
|
+
"tags": [
|
|
33066
|
+
"Sessions API"
|
|
33067
|
+
],
|
|
33068
|
+
"summary": "Choose a session's model",
|
|
33069
|
+
"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`.",
|
|
33070
|
+
"security": [
|
|
33071
|
+
{
|
|
33072
|
+
"applicationKey": []
|
|
33073
|
+
}
|
|
33074
|
+
],
|
|
33075
|
+
"x-nylorun-credentials": [
|
|
33076
|
+
"application",
|
|
33077
|
+
"subject"
|
|
33078
|
+
],
|
|
33079
|
+
"x-nylorun-scopes": [
|
|
33080
|
+
"sessions:own"
|
|
33081
|
+
],
|
|
33082
|
+
"parameters": [
|
|
33083
|
+
{
|
|
33084
|
+
"schema": {
|
|
33085
|
+
"type": "string"
|
|
33086
|
+
},
|
|
33087
|
+
"required": true,
|
|
33088
|
+
"name": "sessionId",
|
|
33089
|
+
"in": "path"
|
|
33090
|
+
},
|
|
33091
|
+
{
|
|
33092
|
+
"schema": {
|
|
33093
|
+
"type": "string",
|
|
33094
|
+
"description": "The protocol version, `18`"
|
|
33095
|
+
},
|
|
33096
|
+
"required": true,
|
|
33097
|
+
"description": "The protocol version, `18`",
|
|
33098
|
+
"name": "Nylorun-Protocol",
|
|
33099
|
+
"in": "header"
|
|
33100
|
+
},
|
|
33101
|
+
{
|
|
33102
|
+
"schema": {
|
|
33103
|
+
"type": "string",
|
|
33104
|
+
"description": "The person an application key acts for"
|
|
33105
|
+
},
|
|
33106
|
+
"required": false,
|
|
33107
|
+
"description": "The person an application key acts for",
|
|
33108
|
+
"name": "Nylorun-Subject",
|
|
33109
|
+
"in": "header"
|
|
33110
|
+
},
|
|
33111
|
+
{
|
|
33112
|
+
"schema": {
|
|
33113
|
+
"type": "string",
|
|
33114
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
33115
|
+
},
|
|
33116
|
+
"required": false,
|
|
33117
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
33118
|
+
"name": "Nylorun-Scopes",
|
|
33119
|
+
"in": "header"
|
|
33120
|
+
}
|
|
33121
|
+
],
|
|
33122
|
+
"requestBody": {
|
|
33123
|
+
"required": true,
|
|
33124
|
+
"content": {
|
|
33125
|
+
"application/json": {
|
|
33126
|
+
"schema": {
|
|
33127
|
+
"$ref": "#/components/schemas/PutSessionModelRequest"
|
|
33128
|
+
}
|
|
33129
|
+
}
|
|
33130
|
+
}
|
|
33131
|
+
},
|
|
33132
|
+
"responses": {
|
|
33133
|
+
"200": {
|
|
33134
|
+
"description": "The session's model",
|
|
33135
|
+
"content": {
|
|
33136
|
+
"application/json": {
|
|
33137
|
+
"schema": {
|
|
33138
|
+
"$ref": "#/components/schemas/SessionModelView"
|
|
33139
|
+
}
|
|
33140
|
+
}
|
|
33141
|
+
}
|
|
33142
|
+
},
|
|
33143
|
+
"400": {
|
|
33144
|
+
"description": "Invalid headers, path, body or cursor",
|
|
33145
|
+
"content": {
|
|
33146
|
+
"application/json": {
|
|
33147
|
+
"schema": {
|
|
33148
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33149
|
+
}
|
|
33150
|
+
}
|
|
33151
|
+
}
|
|
33152
|
+
},
|
|
33153
|
+
"401": {
|
|
33154
|
+
"description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
|
|
33155
|
+
"content": {
|
|
33156
|
+
"application/json": {
|
|
33157
|
+
"schema": {
|
|
33158
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33159
|
+
}
|
|
33160
|
+
}
|
|
33161
|
+
}
|
|
33162
|
+
},
|
|
33163
|
+
"403": {
|
|
33164
|
+
"description": "A trusted issuer's token (`scope_required`)"
|
|
33165
|
+
},
|
|
33166
|
+
"404": {
|
|
33167
|
+
"description": "Not found (`not_found`)",
|
|
33168
|
+
"content": {
|
|
33169
|
+
"application/json": {
|
|
33170
|
+
"schema": {
|
|
33171
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33172
|
+
}
|
|
33173
|
+
}
|
|
33174
|
+
}
|
|
33175
|
+
},
|
|
33176
|
+
"409": {
|
|
33177
|
+
"description": "A turn is running or waits (`session_busy`)"
|
|
33178
|
+
},
|
|
33179
|
+
"422": {
|
|
33180
|
+
"description": "The provider is not connected, or the model is not one of its models"
|
|
33181
|
+
},
|
|
33182
|
+
"426": {
|
|
33183
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
33184
|
+
"content": {
|
|
33185
|
+
"application/json": {
|
|
33186
|
+
"schema": {
|
|
33187
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
33188
|
+
}
|
|
33189
|
+
}
|
|
33190
|
+
}
|
|
33191
|
+
},
|
|
33192
|
+
"503": {
|
|
33193
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
33194
|
+
"content": {
|
|
33195
|
+
"application/json": {
|
|
33196
|
+
"schema": {
|
|
33197
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33198
|
+
}
|
|
33199
|
+
}
|
|
33200
|
+
}
|
|
33201
|
+
}
|
|
33202
|
+
}
|
|
33203
|
+
},
|
|
33204
|
+
"delete": {
|
|
33205
|
+
"tags": [
|
|
33206
|
+
"Sessions API"
|
|
33207
|
+
],
|
|
33208
|
+
"summary": "Clear a session's model",
|
|
33209
|
+
"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`).",
|
|
33210
|
+
"security": [
|
|
33211
|
+
{
|
|
33212
|
+
"applicationKey": []
|
|
33213
|
+
}
|
|
33214
|
+
],
|
|
33215
|
+
"x-nylorun-credentials": [
|
|
33216
|
+
"application",
|
|
33217
|
+
"subject"
|
|
33218
|
+
],
|
|
33219
|
+
"x-nylorun-scopes": [
|
|
33220
|
+
"sessions:own"
|
|
33221
|
+
],
|
|
33222
|
+
"parameters": [
|
|
33223
|
+
{
|
|
33224
|
+
"schema": {
|
|
33225
|
+
"type": "string"
|
|
33226
|
+
},
|
|
33227
|
+
"required": true,
|
|
33228
|
+
"name": "sessionId",
|
|
33229
|
+
"in": "path"
|
|
33230
|
+
},
|
|
33231
|
+
{
|
|
33232
|
+
"schema": {
|
|
33233
|
+
"type": "string",
|
|
33234
|
+
"description": "The protocol version, `18`"
|
|
33235
|
+
},
|
|
33236
|
+
"required": true,
|
|
33237
|
+
"description": "The protocol version, `18`",
|
|
33238
|
+
"name": "Nylorun-Protocol",
|
|
33239
|
+
"in": "header"
|
|
33240
|
+
},
|
|
33241
|
+
{
|
|
33242
|
+
"schema": {
|
|
33243
|
+
"type": "string",
|
|
33244
|
+
"description": "The person an application key acts for"
|
|
33245
|
+
},
|
|
33246
|
+
"required": false,
|
|
33247
|
+
"description": "The person an application key acts for",
|
|
33248
|
+
"name": "Nylorun-Subject",
|
|
33249
|
+
"in": "header"
|
|
33250
|
+
},
|
|
33251
|
+
{
|
|
33252
|
+
"schema": {
|
|
33253
|
+
"type": "string",
|
|
33254
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
33255
|
+
},
|
|
33256
|
+
"required": false,
|
|
33257
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
33258
|
+
"name": "Nylorun-Scopes",
|
|
33259
|
+
"in": "header"
|
|
33260
|
+
}
|
|
33261
|
+
],
|
|
33262
|
+
"responses": {
|
|
33263
|
+
"200": {
|
|
33264
|
+
"description": "The session's model",
|
|
33265
|
+
"content": {
|
|
33266
|
+
"application/json": {
|
|
33267
|
+
"schema": {
|
|
33268
|
+
"$ref": "#/components/schemas/SessionModelView"
|
|
33269
|
+
}
|
|
33270
|
+
}
|
|
33271
|
+
}
|
|
33272
|
+
},
|
|
33273
|
+
"400": {
|
|
33274
|
+
"description": "Invalid headers, path, body or cursor",
|
|
33275
|
+
"content": {
|
|
33276
|
+
"application/json": {
|
|
33277
|
+
"schema": {
|
|
33278
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33279
|
+
}
|
|
33280
|
+
}
|
|
33281
|
+
}
|
|
33282
|
+
},
|
|
33283
|
+
"401": {
|
|
33284
|
+
"description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
|
|
33285
|
+
"content": {
|
|
33286
|
+
"application/json": {
|
|
33287
|
+
"schema": {
|
|
33288
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33289
|
+
}
|
|
33290
|
+
}
|
|
33291
|
+
}
|
|
33292
|
+
},
|
|
33293
|
+
"403": {
|
|
33294
|
+
"description": "A trusted issuer's token (`scope_required`)"
|
|
33295
|
+
},
|
|
33296
|
+
"404": {
|
|
33297
|
+
"description": "Not found (`not_found`)",
|
|
33298
|
+
"content": {
|
|
33299
|
+
"application/json": {
|
|
33300
|
+
"schema": {
|
|
33301
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33302
|
+
}
|
|
33303
|
+
}
|
|
33304
|
+
}
|
|
33305
|
+
},
|
|
33306
|
+
"409": {
|
|
33307
|
+
"description": "A turn is running or waits (`session_busy`)"
|
|
33308
|
+
},
|
|
33309
|
+
"426": {
|
|
33310
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
33311
|
+
"content": {
|
|
33312
|
+
"application/json": {
|
|
33313
|
+
"schema": {
|
|
33314
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
33315
|
+
}
|
|
33316
|
+
}
|
|
33317
|
+
}
|
|
33318
|
+
},
|
|
33319
|
+
"503": {
|
|
33320
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
33321
|
+
"content": {
|
|
33322
|
+
"application/json": {
|
|
33323
|
+
"schema": {
|
|
33324
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33325
|
+
}
|
|
33326
|
+
}
|
|
33327
|
+
}
|
|
33328
|
+
}
|
|
33329
|
+
}
|
|
33330
|
+
}
|
|
33331
|
+
},
|
|
32454
33332
|
"/v1/sessions/{sessionId}/usage": {
|
|
32455
33333
|
"get": {
|
|
32456
33334
|
"tags": [
|