@nylorun/runtime 0.40.0-beta → 0.42.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 +30 -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 +550 -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 +196 -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 +36 -5
- package/dist/tenant/triggers.js +183 -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.42.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",
|
|
@@ -8716,6 +8726,50 @@
|
|
|
8716
8726
|
"additionalProperties": false
|
|
8717
8727
|
},
|
|
8718
8728
|
"description": "The engine text blocks the agent gets, with their hashes"
|
|
8729
|
+
},
|
|
8730
|
+
"plugins": {
|
|
8731
|
+
"type": "array",
|
|
8732
|
+
"items": {
|
|
8733
|
+
"type": "object",
|
|
8734
|
+
"properties": {
|
|
8735
|
+
"name": {
|
|
8736
|
+
"type": "string",
|
|
8737
|
+
"enum": [
|
|
8738
|
+
"nylorun-memory",
|
|
8739
|
+
"nylorun-triggers",
|
|
8740
|
+
"nylorun-plan",
|
|
8741
|
+
"nylorun-interactions",
|
|
8742
|
+
"nylorun-artifacts",
|
|
8743
|
+
"nylorun-sandbox"
|
|
8744
|
+
]
|
|
8745
|
+
},
|
|
8746
|
+
"tools": {
|
|
8747
|
+
"type": "array",
|
|
8748
|
+
"items": {
|
|
8749
|
+
"type": "string",
|
|
8750
|
+
"minLength": 1
|
|
8751
|
+
}
|
|
8752
|
+
},
|
|
8753
|
+
"sha256": {
|
|
8754
|
+
"type": "string",
|
|
8755
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
8756
|
+
},
|
|
8757
|
+
"hosts": {
|
|
8758
|
+
"type": "array",
|
|
8759
|
+
"items": {
|
|
8760
|
+
"type": "string",
|
|
8761
|
+
"minLength": 1
|
|
8762
|
+
}
|
|
8763
|
+
}
|
|
8764
|
+
},
|
|
8765
|
+
"required": [
|
|
8766
|
+
"name",
|
|
8767
|
+
"tools",
|
|
8768
|
+
"sha256"
|
|
8769
|
+
],
|
|
8770
|
+
"additionalProperties": false
|
|
8771
|
+
},
|
|
8772
|
+
"description": "The Runtime's plugins the agent declares (agent-folder/3, ADR-106): each with the tools left on and the hash of its files"
|
|
8719
8773
|
}
|
|
8720
8774
|
},
|
|
8721
8775
|
"additionalProperties": false
|
|
@@ -18629,6 +18683,24 @@
|
|
|
18629
18683
|
}
|
|
18630
18684
|
},
|
|
18631
18685
|
"additionalProperties": false
|
|
18686
|
+
},
|
|
18687
|
+
"triggers": {
|
|
18688
|
+
"type": "object",
|
|
18689
|
+
"properties": {
|
|
18690
|
+
"count": {
|
|
18691
|
+
"type": "integer",
|
|
18692
|
+
"exclusiveMinimum": 0
|
|
18693
|
+
},
|
|
18694
|
+
"minIntervalMs": {
|
|
18695
|
+
"type": "integer",
|
|
18696
|
+
"exclusiveMinimum": 0
|
|
18697
|
+
},
|
|
18698
|
+
"runsPerHour": {
|
|
18699
|
+
"type": "integer",
|
|
18700
|
+
"exclusiveMinimum": 0
|
|
18701
|
+
}
|
|
18702
|
+
},
|
|
18703
|
+
"additionalProperties": false
|
|
18632
18704
|
}
|
|
18633
18705
|
},
|
|
18634
18706
|
"additionalProperties": false
|
|
@@ -19408,6 +19480,24 @@
|
|
|
19408
19480
|
}
|
|
19409
19481
|
},
|
|
19410
19482
|
"additionalProperties": false
|
|
19483
|
+
},
|
|
19484
|
+
"triggers": {
|
|
19485
|
+
"type": "object",
|
|
19486
|
+
"properties": {
|
|
19487
|
+
"count": {
|
|
19488
|
+
"type": "integer",
|
|
19489
|
+
"exclusiveMinimum": 0
|
|
19490
|
+
},
|
|
19491
|
+
"minIntervalMs": {
|
|
19492
|
+
"type": "integer",
|
|
19493
|
+
"exclusiveMinimum": 0
|
|
19494
|
+
},
|
|
19495
|
+
"runsPerHour": {
|
|
19496
|
+
"type": "integer",
|
|
19497
|
+
"exclusiveMinimum": 0
|
|
19498
|
+
}
|
|
19499
|
+
},
|
|
19500
|
+
"additionalProperties": false
|
|
19411
19501
|
}
|
|
19412
19502
|
},
|
|
19413
19503
|
"additionalProperties": false
|
|
@@ -20196,6 +20286,24 @@
|
|
|
20196
20286
|
}
|
|
20197
20287
|
},
|
|
20198
20288
|
"additionalProperties": false
|
|
20289
|
+
},
|
|
20290
|
+
"triggers": {
|
|
20291
|
+
"type": "object",
|
|
20292
|
+
"properties": {
|
|
20293
|
+
"count": {
|
|
20294
|
+
"type": "integer",
|
|
20295
|
+
"exclusiveMinimum": 0
|
|
20296
|
+
},
|
|
20297
|
+
"minIntervalMs": {
|
|
20298
|
+
"type": "integer",
|
|
20299
|
+
"exclusiveMinimum": 0
|
|
20300
|
+
},
|
|
20301
|
+
"runsPerHour": {
|
|
20302
|
+
"type": "integer",
|
|
20303
|
+
"exclusiveMinimum": 0
|
|
20304
|
+
}
|
|
20305
|
+
},
|
|
20306
|
+
"additionalProperties": false
|
|
20199
20307
|
}
|
|
20200
20308
|
},
|
|
20201
20309
|
"additionalProperties": false
|
|
@@ -20843,6 +20951,9 @@
|
|
|
20843
20951
|
"agent.trigger_paused",
|
|
20844
20952
|
"agent.trigger_resumed",
|
|
20845
20953
|
"agent.trigger_secret_rotated",
|
|
20954
|
+
"agent.trigger_created",
|
|
20955
|
+
"agent.trigger_updated",
|
|
20956
|
+
"agent.trigger_deleted",
|
|
20846
20957
|
"agent.memory_updated"
|
|
20847
20958
|
]
|
|
20848
20959
|
},
|
|
@@ -21517,6 +21628,24 @@
|
|
|
21517
21628
|
}
|
|
21518
21629
|
},
|
|
21519
21630
|
"additionalProperties": false
|
|
21631
|
+
},
|
|
21632
|
+
"triggers": {
|
|
21633
|
+
"type": "object",
|
|
21634
|
+
"properties": {
|
|
21635
|
+
"count": {
|
|
21636
|
+
"type": "integer",
|
|
21637
|
+
"exclusiveMinimum": 0
|
|
21638
|
+
},
|
|
21639
|
+
"minIntervalMs": {
|
|
21640
|
+
"type": "integer",
|
|
21641
|
+
"exclusiveMinimum": 0
|
|
21642
|
+
},
|
|
21643
|
+
"runsPerHour": {
|
|
21644
|
+
"type": "integer",
|
|
21645
|
+
"exclusiveMinimum": 0
|
|
21646
|
+
}
|
|
21647
|
+
},
|
|
21648
|
+
"additionalProperties": false
|
|
21520
21649
|
}
|
|
21521
21650
|
},
|
|
21522
21651
|
"additionalProperties": false
|
|
@@ -22421,6 +22550,26 @@
|
|
|
22421
22550
|
"wake"
|
|
22422
22551
|
]
|
|
22423
22552
|
},
|
|
22553
|
+
"origin": {
|
|
22554
|
+
"type": "string",
|
|
22555
|
+
"enum": [
|
|
22556
|
+
"manifest",
|
|
22557
|
+
"agent",
|
|
22558
|
+
"wake"
|
|
22559
|
+
]
|
|
22560
|
+
},
|
|
22561
|
+
"title": {
|
|
22562
|
+
"type": [
|
|
22563
|
+
"string",
|
|
22564
|
+
"null"
|
|
22565
|
+
]
|
|
22566
|
+
},
|
|
22567
|
+
"createdSessionId": {
|
|
22568
|
+
"type": [
|
|
22569
|
+
"string",
|
|
22570
|
+
"null"
|
|
22571
|
+
]
|
|
22572
|
+
},
|
|
22424
22573
|
"status": {
|
|
22425
22574
|
"type": "string",
|
|
22426
22575
|
"enum": [
|
|
@@ -22464,11 +22613,17 @@
|
|
|
22464
22613
|
},
|
|
22465
22614
|
"secretSet": {
|
|
22466
22615
|
"type": "boolean"
|
|
22616
|
+
},
|
|
22617
|
+
"prompt": {
|
|
22618
|
+
"type": "string"
|
|
22467
22619
|
}
|
|
22468
22620
|
},
|
|
22469
22621
|
"required": [
|
|
22470
22622
|
"id",
|
|
22471
22623
|
"kind",
|
|
22624
|
+
"origin",
|
|
22625
|
+
"title",
|
|
22626
|
+
"createdSessionId",
|
|
22472
22627
|
"status",
|
|
22473
22628
|
"pausedReason",
|
|
22474
22629
|
"session",
|
|
@@ -22664,6 +22819,115 @@
|
|
|
22664
22819
|
],
|
|
22665
22820
|
"additionalProperties": false
|
|
22666
22821
|
},
|
|
22822
|
+
"TenantRunEvent": {
|
|
22823
|
+
"type": "object",
|
|
22824
|
+
"properties": {
|
|
22825
|
+
"cursor": {
|
|
22826
|
+
"type": "string"
|
|
22827
|
+
},
|
|
22828
|
+
"run": {
|
|
22829
|
+
"type": "object",
|
|
22830
|
+
"properties": {
|
|
22831
|
+
"runId": {
|
|
22832
|
+
"type": "string"
|
|
22833
|
+
},
|
|
22834
|
+
"agentId": {
|
|
22835
|
+
"type": "string"
|
|
22836
|
+
},
|
|
22837
|
+
"triggerId": {
|
|
22838
|
+
"type": "string"
|
|
22839
|
+
},
|
|
22840
|
+
"kind": {
|
|
22841
|
+
"type": "string",
|
|
22842
|
+
"enum": [
|
|
22843
|
+
"schedule",
|
|
22844
|
+
"at",
|
|
22845
|
+
"webhook",
|
|
22846
|
+
"wake"
|
|
22847
|
+
]
|
|
22848
|
+
},
|
|
22849
|
+
"status": {
|
|
22850
|
+
"type": "string",
|
|
22851
|
+
"enum": [
|
|
22852
|
+
"started",
|
|
22853
|
+
"queued",
|
|
22854
|
+
"skipped",
|
|
22855
|
+
"failed"
|
|
22856
|
+
]
|
|
22857
|
+
},
|
|
22858
|
+
"reason": {
|
|
22859
|
+
"type": [
|
|
22860
|
+
"string",
|
|
22861
|
+
"null"
|
|
22862
|
+
]
|
|
22863
|
+
},
|
|
22864
|
+
"sessionId": {
|
|
22865
|
+
"type": [
|
|
22866
|
+
"string",
|
|
22867
|
+
"null"
|
|
22868
|
+
]
|
|
22869
|
+
},
|
|
22870
|
+
"turnId": {
|
|
22871
|
+
"type": [
|
|
22872
|
+
"string",
|
|
22873
|
+
"null"
|
|
22874
|
+
]
|
|
22875
|
+
},
|
|
22876
|
+
"queuedMessageId": {
|
|
22877
|
+
"type": [
|
|
22878
|
+
"string",
|
|
22879
|
+
"null"
|
|
22880
|
+
]
|
|
22881
|
+
},
|
|
22882
|
+
"dueAt": {
|
|
22883
|
+
"type": "string"
|
|
22884
|
+
},
|
|
22885
|
+
"firedAt": {
|
|
22886
|
+
"type": "string"
|
|
22887
|
+
},
|
|
22888
|
+
"late": {
|
|
22889
|
+
"type": "boolean"
|
|
22890
|
+
},
|
|
22891
|
+
"origin": {
|
|
22892
|
+
"type": "string",
|
|
22893
|
+
"enum": [
|
|
22894
|
+
"manifest",
|
|
22895
|
+
"agent",
|
|
22896
|
+
"wake"
|
|
22897
|
+
]
|
|
22898
|
+
},
|
|
22899
|
+
"title": {
|
|
22900
|
+
"type": [
|
|
22901
|
+
"string",
|
|
22902
|
+
"null"
|
|
22903
|
+
]
|
|
22904
|
+
}
|
|
22905
|
+
},
|
|
22906
|
+
"required": [
|
|
22907
|
+
"runId",
|
|
22908
|
+
"agentId",
|
|
22909
|
+
"triggerId",
|
|
22910
|
+
"kind",
|
|
22911
|
+
"status",
|
|
22912
|
+
"reason",
|
|
22913
|
+
"sessionId",
|
|
22914
|
+
"turnId",
|
|
22915
|
+
"queuedMessageId",
|
|
22916
|
+
"dueAt",
|
|
22917
|
+
"firedAt",
|
|
22918
|
+
"late",
|
|
22919
|
+
"origin",
|
|
22920
|
+
"title"
|
|
22921
|
+
],
|
|
22922
|
+
"additionalProperties": false
|
|
22923
|
+
}
|
|
22924
|
+
},
|
|
22925
|
+
"required": [
|
|
22926
|
+
"cursor",
|
|
22927
|
+
"run"
|
|
22928
|
+
],
|
|
22929
|
+
"additionalProperties": false
|
|
22930
|
+
},
|
|
22667
22931
|
"MemoryList": {
|
|
22668
22932
|
"type": "object",
|
|
22669
22933
|
"properties": {
|
|
@@ -23916,6 +24180,24 @@
|
|
|
23916
24180
|
}
|
|
23917
24181
|
},
|
|
23918
24182
|
"additionalProperties": false
|
|
24183
|
+
},
|
|
24184
|
+
"triggers": {
|
|
24185
|
+
"type": "object",
|
|
24186
|
+
"properties": {
|
|
24187
|
+
"count": {
|
|
24188
|
+
"type": "integer",
|
|
24189
|
+
"exclusiveMinimum": 0
|
|
24190
|
+
},
|
|
24191
|
+
"minIntervalMs": {
|
|
24192
|
+
"type": "integer",
|
|
24193
|
+
"exclusiveMinimum": 0
|
|
24194
|
+
},
|
|
24195
|
+
"runsPerHour": {
|
|
24196
|
+
"type": "integer",
|
|
24197
|
+
"exclusiveMinimum": 0
|
|
24198
|
+
}
|
|
24199
|
+
},
|
|
24200
|
+
"additionalProperties": false
|
|
23919
24201
|
}
|
|
23920
24202
|
},
|
|
23921
24203
|
"additionalProperties": false
|
|
@@ -31144,7 +31426,7 @@
|
|
|
31144
31426
|
"Triggers"
|
|
31145
31427
|
],
|
|
31146
31428
|
"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.",
|
|
31429
|
+
"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
31430
|
"security": [
|
|
31149
31431
|
{
|
|
31150
31432
|
"applicationKey": []
|
|
@@ -31316,10 +31598,10 @@
|
|
|
31316
31598
|
{
|
|
31317
31599
|
"schema": {
|
|
31318
31600
|
"type": "string",
|
|
31319
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31601
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31320
31602
|
},
|
|
31321
31603
|
"required": true,
|
|
31322
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31604
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31323
31605
|
"name": "triggerId",
|
|
31324
31606
|
"in": "path"
|
|
31325
31607
|
},
|
|
@@ -31468,10 +31750,10 @@
|
|
|
31468
31750
|
{
|
|
31469
31751
|
"schema": {
|
|
31470
31752
|
"type": "string",
|
|
31471
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31753
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31472
31754
|
},
|
|
31473
31755
|
"required": true,
|
|
31474
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31756
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31475
31757
|
"name": "triggerId",
|
|
31476
31758
|
"in": "path"
|
|
31477
31759
|
},
|
|
@@ -31620,10 +31902,10 @@
|
|
|
31620
31902
|
{
|
|
31621
31903
|
"schema": {
|
|
31622
31904
|
"type": "string",
|
|
31623
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31905
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31624
31906
|
},
|
|
31625
31907
|
"required": true,
|
|
31626
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
31908
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31627
31909
|
"name": "triggerId",
|
|
31628
31910
|
"in": "path"
|
|
31629
31911
|
},
|
|
@@ -31742,6 +32024,151 @@
|
|
|
31742
32024
|
}
|
|
31743
32025
|
}
|
|
31744
32026
|
},
|
|
32027
|
+
"/v1/agents/{agentId}/triggers/{triggerId}": {
|
|
32028
|
+
"delete": {
|
|
32029
|
+
"tags": [
|
|
32030
|
+
"Triggers"
|
|
32031
|
+
],
|
|
32032
|
+
"summary": "Delete a trigger an agent made",
|
|
32033
|
+
"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.",
|
|
32034
|
+
"security": [
|
|
32035
|
+
{
|
|
32036
|
+
"applicationKey": []
|
|
32037
|
+
},
|
|
32038
|
+
{
|
|
32039
|
+
"issuerToken": []
|
|
32040
|
+
}
|
|
32041
|
+
],
|
|
32042
|
+
"x-nylorun-credentials": [
|
|
32043
|
+
"application",
|
|
32044
|
+
"subject",
|
|
32045
|
+
"token"
|
|
32046
|
+
],
|
|
32047
|
+
"x-nylorun-scopes": [
|
|
32048
|
+
"agents:write"
|
|
32049
|
+
],
|
|
32050
|
+
"parameters": [
|
|
32051
|
+
{
|
|
32052
|
+
"schema": {
|
|
32053
|
+
"type": "string",
|
|
32054
|
+
"description": "The Agent id, percent-encoded"
|
|
32055
|
+
},
|
|
32056
|
+
"required": true,
|
|
32057
|
+
"description": "The Agent id, percent-encoded",
|
|
32058
|
+
"name": "agentId",
|
|
32059
|
+
"in": "path"
|
|
32060
|
+
},
|
|
32061
|
+
{
|
|
32062
|
+
"schema": {
|
|
32063
|
+
"type": "string",
|
|
32064
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
32065
|
+
},
|
|
32066
|
+
"required": true,
|
|
32067
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
32068
|
+
"name": "triggerId",
|
|
32069
|
+
"in": "path"
|
|
32070
|
+
},
|
|
32071
|
+
{
|
|
32072
|
+
"schema": {
|
|
32073
|
+
"type": "string",
|
|
32074
|
+
"description": "The protocol version, `18`"
|
|
32075
|
+
},
|
|
32076
|
+
"required": true,
|
|
32077
|
+
"description": "The protocol version, `18`",
|
|
32078
|
+
"name": "Nylorun-Protocol",
|
|
32079
|
+
"in": "header"
|
|
32080
|
+
},
|
|
32081
|
+
{
|
|
32082
|
+
"schema": {
|
|
32083
|
+
"type": "string",
|
|
32084
|
+
"description": "The person an application key acts for"
|
|
32085
|
+
},
|
|
32086
|
+
"required": false,
|
|
32087
|
+
"description": "The person an application key acts for",
|
|
32088
|
+
"name": "Nylorun-Subject",
|
|
32089
|
+
"in": "header"
|
|
32090
|
+
},
|
|
32091
|
+
{
|
|
32092
|
+
"schema": {
|
|
32093
|
+
"type": "string",
|
|
32094
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
32095
|
+
},
|
|
32096
|
+
"required": false,
|
|
32097
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
32098
|
+
"name": "Nylorun-Scopes",
|
|
32099
|
+
"in": "header"
|
|
32100
|
+
}
|
|
32101
|
+
],
|
|
32102
|
+
"responses": {
|
|
32103
|
+
"200": {
|
|
32104
|
+
"description": "Deleted",
|
|
32105
|
+
"content": {
|
|
32106
|
+
"application/json": {
|
|
32107
|
+
"schema": {
|
|
32108
|
+
"$ref": "#/components/schemas/DeletedResponse"
|
|
32109
|
+
}
|
|
32110
|
+
}
|
|
32111
|
+
}
|
|
32112
|
+
},
|
|
32113
|
+
"400": {
|
|
32114
|
+
"description": "Invalid headers, path, body or cursor",
|
|
32115
|
+
"content": {
|
|
32116
|
+
"application/json": {
|
|
32117
|
+
"schema": {
|
|
32118
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32119
|
+
}
|
|
32120
|
+
}
|
|
32121
|
+
}
|
|
32122
|
+
},
|
|
32123
|
+
"401": {
|
|
32124
|
+
"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`)",
|
|
32125
|
+
"content": {
|
|
32126
|
+
"application/json": {
|
|
32127
|
+
"schema": {
|
|
32128
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32129
|
+
}
|
|
32130
|
+
}
|
|
32131
|
+
}
|
|
32132
|
+
},
|
|
32133
|
+
"403": {
|
|
32134
|
+
"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`)",
|
|
32135
|
+
"content": {
|
|
32136
|
+
"application/json": {
|
|
32137
|
+
"schema": {
|
|
32138
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32139
|
+
}
|
|
32140
|
+
}
|
|
32141
|
+
}
|
|
32142
|
+
},
|
|
32143
|
+
"404": {
|
|
32144
|
+
"description": "The Agent has no such trigger"
|
|
32145
|
+
},
|
|
32146
|
+
"409": {
|
|
32147
|
+
"description": "The manifest declares it (`trigger_from_manifest`)"
|
|
32148
|
+
},
|
|
32149
|
+
"426": {
|
|
32150
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
32151
|
+
"content": {
|
|
32152
|
+
"application/json": {
|
|
32153
|
+
"schema": {
|
|
32154
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
32155
|
+
}
|
|
32156
|
+
}
|
|
32157
|
+
}
|
|
32158
|
+
},
|
|
32159
|
+
"503": {
|
|
32160
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
32161
|
+
"content": {
|
|
32162
|
+
"application/json": {
|
|
32163
|
+
"schema": {
|
|
32164
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32165
|
+
}
|
|
32166
|
+
}
|
|
32167
|
+
}
|
|
32168
|
+
}
|
|
32169
|
+
}
|
|
32170
|
+
}
|
|
32171
|
+
},
|
|
31745
32172
|
"/v1/agents/{agentId}/runs": {
|
|
31746
32173
|
"get": {
|
|
31747
32174
|
"tags": [
|
|
@@ -31912,6 +32339,117 @@
|
|
|
31912
32339
|
}
|
|
31913
32340
|
}
|
|
31914
32341
|
},
|
|
32342
|
+
"/v1/runs/stream": {
|
|
32343
|
+
"get": {
|
|
32344
|
+
"tags": [
|
|
32345
|
+
"Triggers"
|
|
32346
|
+
],
|
|
32347
|
+
"summary": "Follow the Tenant's runs",
|
|
32348
|
+
"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.",
|
|
32349
|
+
"security": [
|
|
32350
|
+
{
|
|
32351
|
+
"applicationKey": []
|
|
32352
|
+
}
|
|
32353
|
+
],
|
|
32354
|
+
"x-nylorun-credentials": [
|
|
32355
|
+
"application"
|
|
32356
|
+
],
|
|
32357
|
+
"x-nylorun-scopes": [
|
|
32358
|
+
"agents:read",
|
|
32359
|
+
"agents:write"
|
|
32360
|
+
],
|
|
32361
|
+
"parameters": [
|
|
32362
|
+
{
|
|
32363
|
+
"schema": {
|
|
32364
|
+
"type": "string",
|
|
32365
|
+
"description": "The cursor of the last run read: the stream goes on after it"
|
|
32366
|
+
},
|
|
32367
|
+
"required": false,
|
|
32368
|
+
"description": "The cursor of the last run read: the stream goes on after it",
|
|
32369
|
+
"name": "cursor",
|
|
32370
|
+
"in": "query"
|
|
32371
|
+
},
|
|
32372
|
+
{
|
|
32373
|
+
"schema": {
|
|
32374
|
+
"type": "string",
|
|
32375
|
+
"description": "The protocol version, `18`"
|
|
32376
|
+
},
|
|
32377
|
+
"required": true,
|
|
32378
|
+
"description": "The protocol version, `18`",
|
|
32379
|
+
"name": "Nylorun-Protocol",
|
|
32380
|
+
"in": "header"
|
|
32381
|
+
}
|
|
32382
|
+
],
|
|
32383
|
+
"responses": {
|
|
32384
|
+
"200": {
|
|
32385
|
+
"description": "The runs",
|
|
32386
|
+
"content": {
|
|
32387
|
+
"text/event-stream": {
|
|
32388
|
+
"itemSchema": {
|
|
32389
|
+
"$ref": "#/components/schemas/TenantRunEvent"
|
|
32390
|
+
}
|
|
32391
|
+
}
|
|
32392
|
+
}
|
|
32393
|
+
},
|
|
32394
|
+
"400": {
|
|
32395
|
+
"description": "Not a cursor of the runs stream (`invalid_cursor`)"
|
|
32396
|
+
},
|
|
32397
|
+
"401": {
|
|
32398
|
+
"description": "No credential (`credential_required`), or one the Tenant does not accept (`credential_invalid`), with a `WWW-Authenticate: Bearer` challenge",
|
|
32399
|
+
"content": {
|
|
32400
|
+
"application/json": {
|
|
32401
|
+
"schema": {
|
|
32402
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32403
|
+
}
|
|
32404
|
+
}
|
|
32405
|
+
}
|
|
32406
|
+
},
|
|
32407
|
+
"403": {
|
|
32408
|
+
"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`)",
|
|
32409
|
+
"content": {
|
|
32410
|
+
"application/json": {
|
|
32411
|
+
"schema": {
|
|
32412
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32413
|
+
}
|
|
32414
|
+
}
|
|
32415
|
+
}
|
|
32416
|
+
},
|
|
32417
|
+
"404": {
|
|
32418
|
+
"description": "Not found (`not_found`)",
|
|
32419
|
+
"content": {
|
|
32420
|
+
"application/json": {
|
|
32421
|
+
"schema": {
|
|
32422
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32423
|
+
}
|
|
32424
|
+
}
|
|
32425
|
+
}
|
|
32426
|
+
},
|
|
32427
|
+
"410": {
|
|
32428
|
+
"description": "A cursor from before the Tenant's reset (`cursor_expired`)"
|
|
32429
|
+
},
|
|
32430
|
+
"426": {
|
|
32431
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
32432
|
+
"content": {
|
|
32433
|
+
"application/json": {
|
|
32434
|
+
"schema": {
|
|
32435
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
32436
|
+
}
|
|
32437
|
+
}
|
|
32438
|
+
}
|
|
32439
|
+
},
|
|
32440
|
+
"503": {
|
|
32441
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
32442
|
+
"content": {
|
|
32443
|
+
"application/json": {
|
|
32444
|
+
"schema": {
|
|
32445
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32446
|
+
}
|
|
32447
|
+
}
|
|
32448
|
+
}
|
|
32449
|
+
}
|
|
32450
|
+
}
|
|
32451
|
+
}
|
|
32452
|
+
},
|
|
31915
32453
|
"/v1/agents/{agentId}/triggers/{triggerId}/secret": {
|
|
31916
32454
|
"post": {
|
|
31917
32455
|
"tags": [
|
|
@@ -31949,10 +32487,10 @@
|
|
|
31949
32487
|
{
|
|
31950
32488
|
"schema": {
|
|
31951
32489
|
"type": "string",
|
|
31952
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
32490
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
31953
32491
|
},
|
|
31954
32492
|
"required": true,
|
|
31955
|
-
"description": "The trigger's id in the manifest's `runtime.triggers
|
|
32493
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
31956
32494
|
"name": "triggerId",
|
|
31957
32495
|
"in": "path"
|
|
31958
32496
|
},
|
|
@@ -39142,7 +39680,7 @@
|
|
|
39142
39680
|
},
|
|
39143
39681
|
{
|
|
39144
39682
|
"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`."
|
|
39683
|
+
"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
39684
|
},
|
|
39147
39685
|
{
|
|
39148
39686
|
"name": "Memory",
|