@nylorun/runtime 0.40.0-beta → 0.41.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 +15 -0
- package/dist/adapters/streams/s2.js +9 -2
- package/dist/api/components.d.ts +131 -0
- package/dist/api/components.js +3 -1
- package/dist/api/http/app.js +2 -0
- package/dist/api/http/routes/runs.d.ts +8 -0
- package/dist/api/http/routes/runs.js +30 -0
- package/dist/api/http/routes/triggers.d.ts +2 -1
- package/dist/api/http/routes/triggers.js +32 -4
- package/dist/api/openapi.js +3 -1
- package/dist/gates/policy.d.ts +6 -4
- package/dist/gates/policy.js +10 -2
- package/dist/harness-api/record.js +51 -6
- package/dist/harness-api/start.js +15 -9
- package/dist/harness-api/tool-journal.js +3 -0
- package/dist/management-openapi.json +11 -6
- package/dist/openapi.json +506 -12
- package/dist/store/postgres/drizzle/0043_agent_triggers_origin.sql +11 -0
- package/dist/store/postgres/drizzle/0044_agent_triggers_origin_backfill.sql +8 -0
- package/dist/store/postgres/drizzle/meta/_journal.json +14 -0
- package/dist/store/postgres/schema.d.ts +151 -4
- package/dist/store/postgres/schema.js +25 -4
- package/dist/store/postgres/store.js +20 -2
- package/dist/store/types.d.ts +10 -0
- package/dist/streams/types.d.ts +16 -1
- package/dist/streams/types.js +8 -1
- package/dist/tenant/advance.js +7 -0
- package/dist/tenant/agent-triggers.d.ts +60 -0
- package/dist/tenant/agent-triggers.js +179 -0
- package/dist/tenant/agents.d.ts +1 -1
- package/dist/tenant/agents.js +5 -1
- package/dist/tenant/limits.d.ts +26 -7
- package/dist/tenant/limits.js +39 -6
- package/dist/tenant/runs-stream.d.ts +51 -0
- package/dist/tenant/runs-stream.js +164 -0
- package/dist/tenant/sweep.js +3 -0
- package/dist/tenant/triggers.d.ts +31 -5
- package/dist/tenant/triggers.js +168 -48
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- 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.
|
|
5
|
+
"version": "0.41.0-beta",
|
|
6
6
|
"x-nylorun-protocol": {
|
|
7
7
|
"min": 16,
|
|
8
8
|
"max": 18,
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"turns",
|
|
43
43
|
"agent-model",
|
|
44
44
|
"secret-routing",
|
|
45
|
-
"remove-tools"
|
|
45
|
+
"remove-tools",
|
|
46
|
+
"agent-triggers"
|
|
46
47
|
]
|
|
47
48
|
},
|
|
48
49
|
"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)."
|
|
@@ -8624,6 +8625,10 @@
|
|
|
8624
8625
|
"type": "boolean",
|
|
8625
8626
|
"description": "Defer MCP tools behind tool_search when their schemas pass the threshold"
|
|
8626
8627
|
},
|
|
8628
|
+
"triggers": {
|
|
8629
|
+
"type": "boolean",
|
|
8630
|
+
"description": "The triggers tool and its text: the root agent sets up its own triggers; never a subagent's"
|
|
8631
|
+
},
|
|
8627
8632
|
"instructions": {
|
|
8628
8633
|
"type": "object",
|
|
8629
8634
|
"properties": {
|
|
@@ -8655,6 +8660,10 @@
|
|
|
8655
8660
|
"type": "string",
|
|
8656
8661
|
"minLength": 1
|
|
8657
8662
|
},
|
|
8663
|
+
"triggers": {
|
|
8664
|
+
"type": "string",
|
|
8665
|
+
"minLength": 1
|
|
8666
|
+
},
|
|
8658
8667
|
"memory": {
|
|
8659
8668
|
"type": "string",
|
|
8660
8669
|
"minLength": 1
|
|
@@ -8689,6 +8698,7 @@
|
|
|
8689
8698
|
"outputs",
|
|
8690
8699
|
"artifacts_read",
|
|
8691
8700
|
"wake",
|
|
8701
|
+
"triggers",
|
|
8692
8702
|
"memory",
|
|
8693
8703
|
"plan",
|
|
8694
8704
|
"connection",
|
|
@@ -18629,6 +18639,24 @@
|
|
|
18629
18639
|
}
|
|
18630
18640
|
},
|
|
18631
18641
|
"additionalProperties": false
|
|
18642
|
+
},
|
|
18643
|
+
"triggers": {
|
|
18644
|
+
"type": "object",
|
|
18645
|
+
"properties": {
|
|
18646
|
+
"count": {
|
|
18647
|
+
"type": "integer",
|
|
18648
|
+
"exclusiveMinimum": 0
|
|
18649
|
+
},
|
|
18650
|
+
"minIntervalMs": {
|
|
18651
|
+
"type": "integer",
|
|
18652
|
+
"exclusiveMinimum": 0
|
|
18653
|
+
},
|
|
18654
|
+
"runsPerHour": {
|
|
18655
|
+
"type": "integer",
|
|
18656
|
+
"exclusiveMinimum": 0
|
|
18657
|
+
}
|
|
18658
|
+
},
|
|
18659
|
+
"additionalProperties": false
|
|
18632
18660
|
}
|
|
18633
18661
|
},
|
|
18634
18662
|
"additionalProperties": false
|
|
@@ -19408,6 +19436,24 @@
|
|
|
19408
19436
|
}
|
|
19409
19437
|
},
|
|
19410
19438
|
"additionalProperties": false
|
|
19439
|
+
},
|
|
19440
|
+
"triggers": {
|
|
19441
|
+
"type": "object",
|
|
19442
|
+
"properties": {
|
|
19443
|
+
"count": {
|
|
19444
|
+
"type": "integer",
|
|
19445
|
+
"exclusiveMinimum": 0
|
|
19446
|
+
},
|
|
19447
|
+
"minIntervalMs": {
|
|
19448
|
+
"type": "integer",
|
|
19449
|
+
"exclusiveMinimum": 0
|
|
19450
|
+
},
|
|
19451
|
+
"runsPerHour": {
|
|
19452
|
+
"type": "integer",
|
|
19453
|
+
"exclusiveMinimum": 0
|
|
19454
|
+
}
|
|
19455
|
+
},
|
|
19456
|
+
"additionalProperties": false
|
|
19411
19457
|
}
|
|
19412
19458
|
},
|
|
19413
19459
|
"additionalProperties": false
|
|
@@ -20196,6 +20242,24 @@
|
|
|
20196
20242
|
}
|
|
20197
20243
|
},
|
|
20198
20244
|
"additionalProperties": false
|
|
20245
|
+
},
|
|
20246
|
+
"triggers": {
|
|
20247
|
+
"type": "object",
|
|
20248
|
+
"properties": {
|
|
20249
|
+
"count": {
|
|
20250
|
+
"type": "integer",
|
|
20251
|
+
"exclusiveMinimum": 0
|
|
20252
|
+
},
|
|
20253
|
+
"minIntervalMs": {
|
|
20254
|
+
"type": "integer",
|
|
20255
|
+
"exclusiveMinimum": 0
|
|
20256
|
+
},
|
|
20257
|
+
"runsPerHour": {
|
|
20258
|
+
"type": "integer",
|
|
20259
|
+
"exclusiveMinimum": 0
|
|
20260
|
+
}
|
|
20261
|
+
},
|
|
20262
|
+
"additionalProperties": false
|
|
20199
20263
|
}
|
|
20200
20264
|
},
|
|
20201
20265
|
"additionalProperties": false
|
|
@@ -20843,6 +20907,9 @@
|
|
|
20843
20907
|
"agent.trigger_paused",
|
|
20844
20908
|
"agent.trigger_resumed",
|
|
20845
20909
|
"agent.trigger_secret_rotated",
|
|
20910
|
+
"agent.trigger_created",
|
|
20911
|
+
"agent.trigger_updated",
|
|
20912
|
+
"agent.trigger_deleted",
|
|
20846
20913
|
"agent.memory_updated"
|
|
20847
20914
|
]
|
|
20848
20915
|
},
|
|
@@ -21517,6 +21584,24 @@
|
|
|
21517
21584
|
}
|
|
21518
21585
|
},
|
|
21519
21586
|
"additionalProperties": false
|
|
21587
|
+
},
|
|
21588
|
+
"triggers": {
|
|
21589
|
+
"type": "object",
|
|
21590
|
+
"properties": {
|
|
21591
|
+
"count": {
|
|
21592
|
+
"type": "integer",
|
|
21593
|
+
"exclusiveMinimum": 0
|
|
21594
|
+
},
|
|
21595
|
+
"minIntervalMs": {
|
|
21596
|
+
"type": "integer",
|
|
21597
|
+
"exclusiveMinimum": 0
|
|
21598
|
+
},
|
|
21599
|
+
"runsPerHour": {
|
|
21600
|
+
"type": "integer",
|
|
21601
|
+
"exclusiveMinimum": 0
|
|
21602
|
+
}
|
|
21603
|
+
},
|
|
21604
|
+
"additionalProperties": false
|
|
21520
21605
|
}
|
|
21521
21606
|
},
|
|
21522
21607
|
"additionalProperties": false
|
|
@@ -22421,6 +22506,26 @@
|
|
|
22421
22506
|
"wake"
|
|
22422
22507
|
]
|
|
22423
22508
|
},
|
|
22509
|
+
"origin": {
|
|
22510
|
+
"type": "string",
|
|
22511
|
+
"enum": [
|
|
22512
|
+
"manifest",
|
|
22513
|
+
"agent",
|
|
22514
|
+
"wake"
|
|
22515
|
+
]
|
|
22516
|
+
},
|
|
22517
|
+
"title": {
|
|
22518
|
+
"type": [
|
|
22519
|
+
"string",
|
|
22520
|
+
"null"
|
|
22521
|
+
]
|
|
22522
|
+
},
|
|
22523
|
+
"createdSessionId": {
|
|
22524
|
+
"type": [
|
|
22525
|
+
"string",
|
|
22526
|
+
"null"
|
|
22527
|
+
]
|
|
22528
|
+
},
|
|
22424
22529
|
"status": {
|
|
22425
22530
|
"type": "string",
|
|
22426
22531
|
"enum": [
|
|
@@ -22464,11 +22569,17 @@
|
|
|
22464
22569
|
},
|
|
22465
22570
|
"secretSet": {
|
|
22466
22571
|
"type": "boolean"
|
|
22572
|
+
},
|
|
22573
|
+
"prompt": {
|
|
22574
|
+
"type": "string"
|
|
22467
22575
|
}
|
|
22468
22576
|
},
|
|
22469
22577
|
"required": [
|
|
22470
22578
|
"id",
|
|
22471
22579
|
"kind",
|
|
22580
|
+
"origin",
|
|
22581
|
+
"title",
|
|
22582
|
+
"createdSessionId",
|
|
22472
22583
|
"status",
|
|
22473
22584
|
"pausedReason",
|
|
22474
22585
|
"session",
|
|
@@ -22664,6 +22775,115 @@
|
|
|
22664
22775
|
],
|
|
22665
22776
|
"additionalProperties": false
|
|
22666
22777
|
},
|
|
22778
|
+
"TenantRunEvent": {
|
|
22779
|
+
"type": "object",
|
|
22780
|
+
"properties": {
|
|
22781
|
+
"cursor": {
|
|
22782
|
+
"type": "string"
|
|
22783
|
+
},
|
|
22784
|
+
"run": {
|
|
22785
|
+
"type": "object",
|
|
22786
|
+
"properties": {
|
|
22787
|
+
"runId": {
|
|
22788
|
+
"type": "string"
|
|
22789
|
+
},
|
|
22790
|
+
"agentId": {
|
|
22791
|
+
"type": "string"
|
|
22792
|
+
},
|
|
22793
|
+
"triggerId": {
|
|
22794
|
+
"type": "string"
|
|
22795
|
+
},
|
|
22796
|
+
"kind": {
|
|
22797
|
+
"type": "string",
|
|
22798
|
+
"enum": [
|
|
22799
|
+
"schedule",
|
|
22800
|
+
"at",
|
|
22801
|
+
"webhook",
|
|
22802
|
+
"wake"
|
|
22803
|
+
]
|
|
22804
|
+
},
|
|
22805
|
+
"status": {
|
|
22806
|
+
"type": "string",
|
|
22807
|
+
"enum": [
|
|
22808
|
+
"started",
|
|
22809
|
+
"queued",
|
|
22810
|
+
"skipped",
|
|
22811
|
+
"failed"
|
|
22812
|
+
]
|
|
22813
|
+
},
|
|
22814
|
+
"reason": {
|
|
22815
|
+
"type": [
|
|
22816
|
+
"string",
|
|
22817
|
+
"null"
|
|
22818
|
+
]
|
|
22819
|
+
},
|
|
22820
|
+
"sessionId": {
|
|
22821
|
+
"type": [
|
|
22822
|
+
"string",
|
|
22823
|
+
"null"
|
|
22824
|
+
]
|
|
22825
|
+
},
|
|
22826
|
+
"turnId": {
|
|
22827
|
+
"type": [
|
|
22828
|
+
"string",
|
|
22829
|
+
"null"
|
|
22830
|
+
]
|
|
22831
|
+
},
|
|
22832
|
+
"queuedMessageId": {
|
|
22833
|
+
"type": [
|
|
22834
|
+
"string",
|
|
22835
|
+
"null"
|
|
22836
|
+
]
|
|
22837
|
+
},
|
|
22838
|
+
"dueAt": {
|
|
22839
|
+
"type": "string"
|
|
22840
|
+
},
|
|
22841
|
+
"firedAt": {
|
|
22842
|
+
"type": "string"
|
|
22843
|
+
},
|
|
22844
|
+
"late": {
|
|
22845
|
+
"type": "boolean"
|
|
22846
|
+
},
|
|
22847
|
+
"origin": {
|
|
22848
|
+
"type": "string",
|
|
22849
|
+
"enum": [
|
|
22850
|
+
"manifest",
|
|
22851
|
+
"agent",
|
|
22852
|
+
"wake"
|
|
22853
|
+
]
|
|
22854
|
+
},
|
|
22855
|
+
"title": {
|
|
22856
|
+
"type": [
|
|
22857
|
+
"string",
|
|
22858
|
+
"null"
|
|
22859
|
+
]
|
|
22860
|
+
}
|
|
22861
|
+
},
|
|
22862
|
+
"required": [
|
|
22863
|
+
"runId",
|
|
22864
|
+
"agentId",
|
|
22865
|
+
"triggerId",
|
|
22866
|
+
"kind",
|
|
22867
|
+
"status",
|
|
22868
|
+
"reason",
|
|
22869
|
+
"sessionId",
|
|
22870
|
+
"turnId",
|
|
22871
|
+
"queuedMessageId",
|
|
22872
|
+
"dueAt",
|
|
22873
|
+
"firedAt",
|
|
22874
|
+
"late",
|
|
22875
|
+
"origin",
|
|
22876
|
+
"title"
|
|
22877
|
+
],
|
|
22878
|
+
"additionalProperties": false
|
|
22879
|
+
}
|
|
22880
|
+
},
|
|
22881
|
+
"required": [
|
|
22882
|
+
"cursor",
|
|
22883
|
+
"run"
|
|
22884
|
+
],
|
|
22885
|
+
"additionalProperties": false
|
|
22886
|
+
},
|
|
22667
22887
|
"MemoryList": {
|
|
22668
22888
|
"type": "object",
|
|
22669
22889
|
"properties": {
|
|
@@ -23916,6 +24136,24 @@
|
|
|
23916
24136
|
}
|
|
23917
24137
|
},
|
|
23918
24138
|
"additionalProperties": false
|
|
24139
|
+
},
|
|
24140
|
+
"triggers": {
|
|
24141
|
+
"type": "object",
|
|
24142
|
+
"properties": {
|
|
24143
|
+
"count": {
|
|
24144
|
+
"type": "integer",
|
|
24145
|
+
"exclusiveMinimum": 0
|
|
24146
|
+
},
|
|
24147
|
+
"minIntervalMs": {
|
|
24148
|
+
"type": "integer",
|
|
24149
|
+
"exclusiveMinimum": 0
|
|
24150
|
+
},
|
|
24151
|
+
"runsPerHour": {
|
|
24152
|
+
"type": "integer",
|
|
24153
|
+
"exclusiveMinimum": 0
|
|
24154
|
+
}
|
|
24155
|
+
},
|
|
24156
|
+
"additionalProperties": false
|
|
23919
24157
|
}
|
|
23920
24158
|
},
|
|
23921
24159
|
"additionalProperties": false
|
|
@@ -31144,7 +31382,7 @@
|
|
|
31144
31382
|
"Triggers"
|
|
31145
31383
|
],
|
|
31146
31384
|
"summary": "List an Agent's triggers",
|
|
31147
|
-
"description": "Each trigger its manifest declares, with what the Agent holds of it: its status (`active`, `paused` with a reason, `completed` for an `at` that ran), when it runs next and last ran.",
|
|
31385
|
+
"description": "Each trigger its manifest declares, and each its agents made with the `triggers` tool (`origin: agent`, with the title and the session that made it), with what the Agent holds of it: its status (`active`, `paused` with a reason, `completed` for an `at` that ran), its prompt, when it runs next and last ran. A session's booked wake is not listed.",
|
|
31148
31386
|
"security": [
|
|
31149
31387
|
{
|
|
31150
31388
|
"applicationKey": []
|
|
@@ -31316,10 +31554,10 @@
|
|
|
31316
31554
|
{
|
|
31317
31555
|
"schema": {
|
|
31318
31556
|
"type": "string",
|
|
31319
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31557
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31320
31558
|
},
|
|
31321
31559
|
"required": true,
|
|
31322
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31560
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31323
31561
|
"name": "triggerId",
|
|
31324
31562
|
"in": "path"
|
|
31325
31563
|
},
|
|
@@ -31468,10 +31706,10 @@
|
|
|
31468
31706
|
{
|
|
31469
31707
|
"schema": {
|
|
31470
31708
|
"type": "string",
|
|
31471
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31709
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31472
31710
|
},
|
|
31473
31711
|
"required": true,
|
|
31474
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31712
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31475
31713
|
"name": "triggerId",
|
|
31476
31714
|
"in": "path"
|
|
31477
31715
|
},
|
|
@@ -31620,10 +31858,10 @@
|
|
|
31620
31858
|
{
|
|
31621
31859
|
"schema": {
|
|
31622
31860
|
"type": "string",
|
|
31623
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31861
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31624
31862
|
},
|
|
31625
31863
|
"required": true,
|
|
31626
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31864
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31627
31865
|
"name": "triggerId",
|
|
31628
31866
|
"in": "path"
|
|
31629
31867
|
},
|
|
@@ -31742,6 +31980,151 @@
|
|
|
31742
31980
|
}
|
|
31743
31981
|
}
|
|
31744
31982
|
},
|
|
31983
|
+
"/v1/agents/{agentId}/triggers/{triggerId}": {
|
|
31984
|
+
"delete": {
|
|
31985
|
+
"tags": [
|
|
31986
|
+
"Triggers"
|
|
31987
|
+
],
|
|
31988
|
+
"summary": "Delete a trigger an agent made",
|
|
31989
|
+
"description": "Deletes a trigger one of the Agent's agents made with the `triggers` tool (`origin: agent`), with `agent.trigger_deleted` on the Agent's events; its runs stay. A trigger its manifest declares is refused (`trigger_from_manifest`): save a version without it, or pause it.",
|
|
31990
|
+
"security": [
|
|
31991
|
+
{
|
|
31992
|
+
"applicationKey": []
|
|
31993
|
+
},
|
|
31994
|
+
{
|
|
31995
|
+
"issuerToken": []
|
|
31996
|
+
}
|
|
31997
|
+
],
|
|
31998
|
+
"x-nylorun-credentials": [
|
|
31999
|
+
"application",
|
|
32000
|
+
"subject",
|
|
32001
|
+
"token"
|
|
32002
|
+
],
|
|
32003
|
+
"x-nylorun-scopes": [
|
|
32004
|
+
"agents:write"
|
|
32005
|
+
],
|
|
32006
|
+
"parameters": [
|
|
32007
|
+
{
|
|
32008
|
+
"schema": {
|
|
32009
|
+
"type": "string",
|
|
32010
|
+
"description": "The Agent id, percent-encoded"
|
|
32011
|
+
},
|
|
32012
|
+
"required": true,
|
|
32013
|
+
"description": "The Agent id, percent-encoded",
|
|
32014
|
+
"name": "agentId",
|
|
32015
|
+
"in": "path"
|
|
32016
|
+
},
|
|
32017
|
+
{
|
|
32018
|
+
"schema": {
|
|
32019
|
+
"type": "string",
|
|
32020
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
32021
|
+
},
|
|
32022
|
+
"required": true,
|
|
32023
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
32024
|
+
"name": "triggerId",
|
|
32025
|
+
"in": "path"
|
|
32026
|
+
},
|
|
32027
|
+
{
|
|
32028
|
+
"schema": {
|
|
32029
|
+
"type": "string",
|
|
32030
|
+
"description": "The protocol version, `18`"
|
|
32031
|
+
},
|
|
32032
|
+
"required": true,
|
|
32033
|
+
"description": "The protocol version, `18`",
|
|
32034
|
+
"name": "Nylorun-Protocol",
|
|
32035
|
+
"in": "header"
|
|
32036
|
+
},
|
|
32037
|
+
{
|
|
32038
|
+
"schema": {
|
|
32039
|
+
"type": "string",
|
|
32040
|
+
"description": "The person an application key acts for"
|
|
32041
|
+
},
|
|
32042
|
+
"required": false,
|
|
32043
|
+
"description": "The person an application key acts for",
|
|
32044
|
+
"name": "Nylorun-Subject",
|
|
32045
|
+
"in": "header"
|
|
32046
|
+
},
|
|
32047
|
+
{
|
|
32048
|
+
"schema": {
|
|
32049
|
+
"type": "string",
|
|
32050
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
32051
|
+
},
|
|
32052
|
+
"required": false,
|
|
32053
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
32054
|
+
"name": "Nylorun-Scopes",
|
|
32055
|
+
"in": "header"
|
|
32056
|
+
}
|
|
32057
|
+
],
|
|
32058
|
+
"responses": {
|
|
32059
|
+
"200": {
|
|
32060
|
+
"description": "Deleted",
|
|
32061
|
+
"content": {
|
|
32062
|
+
"application/json": {
|
|
32063
|
+
"schema": {
|
|
32064
|
+
"$ref": "#/components/schemas/DeletedResponse"
|
|
32065
|
+
}
|
|
32066
|
+
}
|
|
32067
|
+
}
|
|
32068
|
+
},
|
|
32069
|
+
"400": {
|
|
32070
|
+
"description": "Invalid headers, path, body or cursor",
|
|
32071
|
+
"content": {
|
|
32072
|
+
"application/json": {
|
|
32073
|
+
"schema": {
|
|
32074
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32075
|
+
}
|
|
32076
|
+
}
|
|
32077
|
+
}
|
|
32078
|
+
},
|
|
32079
|
+
"401": {
|
|
32080
|
+
"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`)",
|
|
32081
|
+
"content": {
|
|
32082
|
+
"application/json": {
|
|
32083
|
+
"schema": {
|
|
32084
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32085
|
+
}
|
|
32086
|
+
}
|
|
32087
|
+
}
|
|
32088
|
+
},
|
|
32089
|
+
"403": {
|
|
32090
|
+
"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`)",
|
|
32091
|
+
"content": {
|
|
32092
|
+
"application/json": {
|
|
32093
|
+
"schema": {
|
|
32094
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32095
|
+
}
|
|
32096
|
+
}
|
|
32097
|
+
}
|
|
32098
|
+
},
|
|
32099
|
+
"404": {
|
|
32100
|
+
"description": "The Agent has no such trigger"
|
|
32101
|
+
},
|
|
32102
|
+
"409": {
|
|
32103
|
+
"description": "The manifest declares it (`trigger_from_manifest`)"
|
|
32104
|
+
},
|
|
32105
|
+
"426": {
|
|
32106
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
32107
|
+
"content": {
|
|
32108
|
+
"application/json": {
|
|
32109
|
+
"schema": {
|
|
32110
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
32111
|
+
}
|
|
32112
|
+
}
|
|
32113
|
+
}
|
|
32114
|
+
},
|
|
32115
|
+
"503": {
|
|
32116
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
32117
|
+
"content": {
|
|
32118
|
+
"application/json": {
|
|
32119
|
+
"schema": {
|
|
32120
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32121
|
+
}
|
|
32122
|
+
}
|
|
32123
|
+
}
|
|
32124
|
+
}
|
|
32125
|
+
}
|
|
32126
|
+
}
|
|
32127
|
+
},
|
|
31745
32128
|
"/v1/agents/{agentId}/runs": {
|
|
31746
32129
|
"get": {
|
|
31747
32130
|
"tags": [
|
|
@@ -31912,6 +32295,117 @@
|
|
|
31912
32295
|
}
|
|
31913
32296
|
}
|
|
31914
32297
|
},
|
|
32298
|
+
"/v1/runs/stream": {
|
|
32299
|
+
"get": {
|
|
32300
|
+
"tags": [
|
|
32301
|
+
"Triggers"
|
|
32302
|
+
],
|
|
32303
|
+
"summary": "Follow the Tenant's runs",
|
|
32304
|
+
"description": "Server-sent events, one `event: run` per run of any Agent's triggers, with its cursor as `id`, from the cursor on (`?cursor=` or `Last-Event-ID`; none reads from the oldest run the stream keeps, 7 days). The data is `{cursor, run}`: the run as the Agent's runs list it, with its Agent and its trigger's origin and title. A run may arrive twice: drop a `runId` you have seen. A cursor from before the Tenant's reset is refused (`cursor_expired`): read again without one. A `: keepalive` comment every 15 seconds.",
|
|
32305
|
+
"security": [
|
|
32306
|
+
{
|
|
32307
|
+
"applicationKey": []
|
|
32308
|
+
}
|
|
32309
|
+
],
|
|
32310
|
+
"x-nylorun-credentials": [
|
|
32311
|
+
"application"
|
|
32312
|
+
],
|
|
32313
|
+
"x-nylorun-scopes": [
|
|
32314
|
+
"agents:read",
|
|
32315
|
+
"agents:write"
|
|
32316
|
+
],
|
|
32317
|
+
"parameters": [
|
|
32318
|
+
{
|
|
32319
|
+
"schema": {
|
|
32320
|
+
"type": "string",
|
|
32321
|
+
"description": "The cursor of the last run read: the stream goes on after it"
|
|
32322
|
+
},
|
|
32323
|
+
"required": false,
|
|
32324
|
+
"description": "The cursor of the last run read: the stream goes on after it",
|
|
32325
|
+
"name": "cursor",
|
|
32326
|
+
"in": "query"
|
|
32327
|
+
},
|
|
32328
|
+
{
|
|
32329
|
+
"schema": {
|
|
32330
|
+
"type": "string",
|
|
32331
|
+
"description": "The protocol version, `18`"
|
|
32332
|
+
},
|
|
32333
|
+
"required": true,
|
|
32334
|
+
"description": "The protocol version, `18`",
|
|
32335
|
+
"name": "Nylorun-Protocol",
|
|
32336
|
+
"in": "header"
|
|
32337
|
+
}
|
|
32338
|
+
],
|
|
32339
|
+
"responses": {
|
|
32340
|
+
"200": {
|
|
32341
|
+
"description": "The runs",
|
|
32342
|
+
"content": {
|
|
32343
|
+
"text/event-stream": {
|
|
32344
|
+
"itemSchema": {
|
|
32345
|
+
"$ref": "#/components/schemas/TenantRunEvent"
|
|
32346
|
+
}
|
|
32347
|
+
}
|
|
32348
|
+
}
|
|
32349
|
+
},
|
|
32350
|
+
"400": {
|
|
32351
|
+
"description": "Not a cursor of the runs stream (`invalid_cursor`)"
|
|
32352
|
+
},
|
|
32353
|
+
"401": {
|
|
32354
|
+
"description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
|
|
32355
|
+
"content": {
|
|
32356
|
+
"application/json": {
|
|
32357
|
+
"schema": {
|
|
32358
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32359
|
+
}
|
|
32360
|
+
}
|
|
32361
|
+
}
|
|
32362
|
+
},
|
|
32363
|
+
"403": {
|
|
32364
|
+
"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`)",
|
|
32365
|
+
"content": {
|
|
32366
|
+
"application/json": {
|
|
32367
|
+
"schema": {
|
|
32368
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32369
|
+
}
|
|
32370
|
+
}
|
|
32371
|
+
}
|
|
32372
|
+
},
|
|
32373
|
+
"404": {
|
|
32374
|
+
"description": "Not found (`not_found`)",
|
|
32375
|
+
"content": {
|
|
32376
|
+
"application/json": {
|
|
32377
|
+
"schema": {
|
|
32378
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32379
|
+
}
|
|
32380
|
+
}
|
|
32381
|
+
}
|
|
32382
|
+
},
|
|
32383
|
+
"410": {
|
|
32384
|
+
"description": "A cursor from before the Tenant's reset (`cursor_expired`)"
|
|
32385
|
+
},
|
|
32386
|
+
"426": {
|
|
32387
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
32388
|
+
"content": {
|
|
32389
|
+
"application/json": {
|
|
32390
|
+
"schema": {
|
|
32391
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
32392
|
+
}
|
|
32393
|
+
}
|
|
32394
|
+
}
|
|
32395
|
+
},
|
|
32396
|
+
"503": {
|
|
32397
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
32398
|
+
"content": {
|
|
32399
|
+
"application/json": {
|
|
32400
|
+
"schema": {
|
|
32401
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32402
|
+
}
|
|
32403
|
+
}
|
|
32404
|
+
}
|
|
32405
|
+
}
|
|
32406
|
+
}
|
|
32407
|
+
}
|
|
32408
|
+
},
|
|
31915
32409
|
"/v1/agents/{agentId}/triggers/{triggerId}/secret": {
|
|
31916
32410
|
"post": {
|
|
31917
32411
|
"tags": [
|
|
@@ -31949,10 +32443,10 @@
|
|
|
31949
32443
|
{
|
|
31950
32444
|
"schema": {
|
|
31951
32445
|
"type": "string",
|
|
31952
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
32446
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31953
32447
|
},
|
|
31954
32448
|
"required": true,
|
|
31955
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
32449
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31956
32450
|
"name": "triggerId",
|
|
31957
32451
|
"in": "path"
|
|
31958
32452
|
},
|
|
@@ -39142,7 +39636,7 @@
|
|
|
39142
39636
|
},
|
|
39143
39637
|
{
|
|
39144
39638
|
"name": "Triggers",
|
|
39145
|
-
"description": "What starts an Agent's turns with no client connected: the schedules, one-shot times and webhook endpoints its manifest's `runtime.triggers` declare. Each trigger's status is the Agent's: pause and resume it, run it now, make a webhook trigger's signing secret, and read its runs (`started`, `queued`, `skipped` or `failed`, with a reason). In `@nylorun/agents` and `nylorun agents triggers`."
|
|
39639
|
+
"description": "What starts an Agent's turns with no client connected: the schedules, one-shot times and webhook endpoints its manifest's `runtime.triggers` declare, and the schedules and follow-ups its agents set up with the `triggers` tool (`engine.triggers`). Each trigger's status is the Agent's: pause and resume it, run it now, delete one an agent made, make a webhook trigger's signing secret, and read its runs (`started`, `queued`, `skipped` or `failed`, with a reason), an Agent's or the whole Tenant's as a stream. In `@nylorun/agents` and `nylorun agents triggers`."
|
|
39146
39640
|
},
|
|
39147
39641
|
{
|
|
39148
39642
|
"name": "Memory",
|