@nylorun/runtime 0.51.2-beta → 0.52.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 +21 -0
- package/dist/api/components.d.ts +48 -0
- package/dist/api/components.js +3 -1
- package/dist/api/http/routes/triggers.js +38 -6
- package/dist/api/openapi.js +1 -0
- package/dist/management-openapi.json +2 -1
- package/dist/openapi.json +348 -44
- package/dist/store/postgres/drizzle/0049_agent_triggers_api.sql +3 -0
- package/dist/store/postgres/drizzle/meta/_journal.json +7 -0
- package/dist/store/postgres/schema.d.ts +21 -4
- package/dist/store/postgres/schema.js +10 -7
- package/dist/tenant/agent-triggers.js +5 -2
- package/dist/tenant/api-triggers.d.ts +33 -0
- package/dist/tenant/api-triggers.js +140 -0
- package/dist/tenant/triggers.d.ts +6 -4
- package/dist/tenant/triggers.js +22 -11
- 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.52.0-beta",
|
|
6
6
|
"x-nylorun-protocol": {
|
|
7
7
|
"min": 16,
|
|
8
8
|
"max": 18,
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"secret-routing",
|
|
45
45
|
"remove-tools",
|
|
46
46
|
"agent-triggers",
|
|
47
|
+
"api-triggers",
|
|
47
48
|
"steer",
|
|
48
49
|
"queue-recovery",
|
|
49
50
|
"a2a-steer"
|
|
@@ -23102,6 +23103,7 @@
|
|
|
23102
23103
|
"enum": [
|
|
23103
23104
|
"manifest",
|
|
23104
23105
|
"agent",
|
|
23106
|
+
"api",
|
|
23105
23107
|
"wake"
|
|
23106
23108
|
]
|
|
23107
23109
|
},
|
|
@@ -23117,6 +23119,12 @@
|
|
|
23117
23119
|
"null"
|
|
23118
23120
|
]
|
|
23119
23121
|
},
|
|
23122
|
+
"principal": {
|
|
23123
|
+
"type": [
|
|
23124
|
+
"string",
|
|
23125
|
+
"null"
|
|
23126
|
+
]
|
|
23127
|
+
},
|
|
23120
23128
|
"status": {
|
|
23121
23129
|
"type": "string",
|
|
23122
23130
|
"enum": [
|
|
@@ -23186,6 +23194,152 @@
|
|
|
23186
23194
|
],
|
|
23187
23195
|
"additionalProperties": false
|
|
23188
23196
|
},
|
|
23197
|
+
"TriggerView": {
|
|
23198
|
+
"type": "object",
|
|
23199
|
+
"properties": {
|
|
23200
|
+
"id": {
|
|
23201
|
+
"type": "string"
|
|
23202
|
+
},
|
|
23203
|
+
"kind": {
|
|
23204
|
+
"type": "string",
|
|
23205
|
+
"enum": [
|
|
23206
|
+
"schedule",
|
|
23207
|
+
"at",
|
|
23208
|
+
"webhook",
|
|
23209
|
+
"wake"
|
|
23210
|
+
]
|
|
23211
|
+
},
|
|
23212
|
+
"origin": {
|
|
23213
|
+
"type": "string",
|
|
23214
|
+
"enum": [
|
|
23215
|
+
"manifest",
|
|
23216
|
+
"agent",
|
|
23217
|
+
"api",
|
|
23218
|
+
"wake"
|
|
23219
|
+
]
|
|
23220
|
+
},
|
|
23221
|
+
"title": {
|
|
23222
|
+
"type": [
|
|
23223
|
+
"string",
|
|
23224
|
+
"null"
|
|
23225
|
+
]
|
|
23226
|
+
},
|
|
23227
|
+
"createdSessionId": {
|
|
23228
|
+
"type": [
|
|
23229
|
+
"string",
|
|
23230
|
+
"null"
|
|
23231
|
+
]
|
|
23232
|
+
},
|
|
23233
|
+
"principal": {
|
|
23234
|
+
"type": [
|
|
23235
|
+
"string",
|
|
23236
|
+
"null"
|
|
23237
|
+
]
|
|
23238
|
+
},
|
|
23239
|
+
"status": {
|
|
23240
|
+
"type": "string",
|
|
23241
|
+
"enum": [
|
|
23242
|
+
"active",
|
|
23243
|
+
"paused",
|
|
23244
|
+
"completed"
|
|
23245
|
+
]
|
|
23246
|
+
},
|
|
23247
|
+
"pausedReason": {
|
|
23248
|
+
"type": [
|
|
23249
|
+
"string",
|
|
23250
|
+
"null"
|
|
23251
|
+
]
|
|
23252
|
+
},
|
|
23253
|
+
"schedule": {
|
|
23254
|
+
"type": "string"
|
|
23255
|
+
},
|
|
23256
|
+
"timezone": {
|
|
23257
|
+
"type": "string"
|
|
23258
|
+
},
|
|
23259
|
+
"at": {
|
|
23260
|
+
"type": "string"
|
|
23261
|
+
},
|
|
23262
|
+
"session": {
|
|
23263
|
+
"type": "string"
|
|
23264
|
+
},
|
|
23265
|
+
"nextRunAt": {
|
|
23266
|
+
"type": [
|
|
23267
|
+
"string",
|
|
23268
|
+
"null"
|
|
23269
|
+
]
|
|
23270
|
+
},
|
|
23271
|
+
"lastRunAt": {
|
|
23272
|
+
"type": [
|
|
23273
|
+
"string",
|
|
23274
|
+
"null"
|
|
23275
|
+
]
|
|
23276
|
+
},
|
|
23277
|
+
"webhookUrl": {
|
|
23278
|
+
"type": "string"
|
|
23279
|
+
},
|
|
23280
|
+
"secretSet": {
|
|
23281
|
+
"type": "boolean"
|
|
23282
|
+
},
|
|
23283
|
+
"prompt": {
|
|
23284
|
+
"type": "string"
|
|
23285
|
+
}
|
|
23286
|
+
},
|
|
23287
|
+
"required": [
|
|
23288
|
+
"id",
|
|
23289
|
+
"kind",
|
|
23290
|
+
"origin",
|
|
23291
|
+
"title",
|
|
23292
|
+
"createdSessionId",
|
|
23293
|
+
"status",
|
|
23294
|
+
"pausedReason",
|
|
23295
|
+
"session",
|
|
23296
|
+
"nextRunAt",
|
|
23297
|
+
"lastRunAt"
|
|
23298
|
+
],
|
|
23299
|
+
"additionalProperties": false
|
|
23300
|
+
},
|
|
23301
|
+
"PutTriggerRequest": {
|
|
23302
|
+
"type": "object",
|
|
23303
|
+
"properties": {
|
|
23304
|
+
"schedule": {
|
|
23305
|
+
"type": "string",
|
|
23306
|
+
"pattern": "^\\S+(\\s+\\S+){4}$"
|
|
23307
|
+
},
|
|
23308
|
+
"timezone": {
|
|
23309
|
+
"type": "string",
|
|
23310
|
+
"minLength": 1
|
|
23311
|
+
},
|
|
23312
|
+
"at": {
|
|
23313
|
+
"type": "string",
|
|
23314
|
+
"format": "date-time"
|
|
23315
|
+
},
|
|
23316
|
+
"webhook": {
|
|
23317
|
+
"type": "string",
|
|
23318
|
+
"enum": [
|
|
23319
|
+
"standard-webhooks"
|
|
23320
|
+
]
|
|
23321
|
+
},
|
|
23322
|
+
"session": {
|
|
23323
|
+
"type": "string",
|
|
23324
|
+
"minLength": 1,
|
|
23325
|
+
"maxLength": 200
|
|
23326
|
+
},
|
|
23327
|
+
"prompt": {
|
|
23328
|
+
"type": "string",
|
|
23329
|
+
"minLength": 1
|
|
23330
|
+
},
|
|
23331
|
+
"title": {
|
|
23332
|
+
"type": "string",
|
|
23333
|
+
"minLength": 1,
|
|
23334
|
+
"maxLength": 80
|
|
23335
|
+
}
|
|
23336
|
+
},
|
|
23337
|
+
"required": [
|
|
23338
|
+
"session",
|
|
23339
|
+
"prompt"
|
|
23340
|
+
],
|
|
23341
|
+
"additionalProperties": false
|
|
23342
|
+
},
|
|
23189
23343
|
"RunTriggerResponse": {
|
|
23190
23344
|
"type": "object",
|
|
23191
23345
|
"properties": {
|
|
@@ -23440,6 +23594,7 @@
|
|
|
23440
23594
|
"enum": [
|
|
23441
23595
|
"manifest",
|
|
23442
23596
|
"agent",
|
|
23597
|
+
"api",
|
|
23443
23598
|
"wake"
|
|
23444
23599
|
]
|
|
23445
23600
|
},
|
|
@@ -31997,7 +32152,7 @@
|
|
|
31997
32152
|
"Triggers"
|
|
31998
32153
|
],
|
|
31999
32154
|
"summary": "List an Agent's triggers",
|
|
32000
|
-
"description": "Each trigger its manifest declares,
|
|
32155
|
+
"description": "Each trigger its manifest declares, each its agents made with the `triggers` tool (`origin: agent`, with the title and the session that made it), and each a client put over the API (`origin: api`, with the title and the `principal` that put 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.",
|
|
32001
32156
|
"security": [
|
|
32002
32157
|
{
|
|
32003
32158
|
"applicationKey": []
|
|
@@ -32132,13 +32287,13 @@
|
|
|
32132
32287
|
}
|
|
32133
32288
|
}
|
|
32134
32289
|
},
|
|
32135
|
-
"/v1/agents/{agentId}/triggers/{triggerId}
|
|
32136
|
-
"
|
|
32290
|
+
"/v1/agents/{agentId}/triggers/{triggerId}": {
|
|
32291
|
+
"put": {
|
|
32137
32292
|
"tags": [
|
|
32138
32293
|
"Triggers"
|
|
32139
32294
|
],
|
|
32140
|
-
"summary": "
|
|
32141
|
-
"description": "
|
|
32295
|
+
"summary": "Put a trigger on an Agent",
|
|
32296
|
+
"description": "Creates or replaces the Agent's trigger `triggerId` of origin `api`: a `Trigger` exactly as a definition's `runtime.triggers` entry holds it (one of `schedule` with `timezone`, `at` or `webhook`; `session`; `prompt`), and an optional `title`. A new one is active with its next time; a replaced one gets its next time again and keeps its status, so a paused one stays paused. The same body again changes nothing and records no event. The checks and limits are a definition's; `runtime.limits.triggers.count` covers the triggers the Agent's agents made and those put here. Upgrades never touch it; `DELETE` removes it. Records `agent.trigger_created` or `agent.trigger_updated` (with `changed`) on the Agent's events. Host feature `api-triggers`.",
|
|
32142
32297
|
"security": [
|
|
32143
32298
|
{
|
|
32144
32299
|
"applicationKey": []
|
|
@@ -32207,19 +32362,32 @@
|
|
|
32207
32362
|
"in": "header"
|
|
32208
32363
|
}
|
|
32209
32364
|
],
|
|
32365
|
+
"requestBody": {
|
|
32366
|
+
"required": true,
|
|
32367
|
+
"content": {
|
|
32368
|
+
"application/json": {
|
|
32369
|
+
"schema": {
|
|
32370
|
+
"$ref": "#/components/schemas/PutTriggerRequest"
|
|
32371
|
+
}
|
|
32372
|
+
}
|
|
32373
|
+
}
|
|
32374
|
+
},
|
|
32210
32375
|
"responses": {
|
|
32211
32376
|
"200": {
|
|
32212
|
-
"description": "The
|
|
32377
|
+
"description": "The trigger, as the list shows it",
|
|
32213
32378
|
"content": {
|
|
32214
32379
|
"application/json": {
|
|
32215
32380
|
"schema": {
|
|
32216
|
-
"$ref": "#/components/schemas/
|
|
32381
|
+
"$ref": "#/components/schemas/TriggerView"
|
|
32217
32382
|
}
|
|
32218
32383
|
}
|
|
32219
32384
|
}
|
|
32220
32385
|
},
|
|
32221
32386
|
"400": {
|
|
32222
|
-
"description": "
|
|
32387
|
+
"description": "Not a trigger, or one the checks refuse: a bad cron or time zone, runs closer than the minimum interval, an `at` not in the future, a prompt too long"
|
|
32388
|
+
},
|
|
32389
|
+
"401": {
|
|
32390
|
+
"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`)",
|
|
32223
32391
|
"content": {
|
|
32224
32392
|
"application/json": {
|
|
32225
32393
|
"schema": {
|
|
@@ -32228,8 +32396,8 @@
|
|
|
32228
32396
|
}
|
|
32229
32397
|
}
|
|
32230
32398
|
},
|
|
32231
|
-
"
|
|
32232
|
-
"description": "
|
|
32399
|
+
"403": {
|
|
32400
|
+
"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`)",
|
|
32233
32401
|
"content": {
|
|
32234
32402
|
"application/json": {
|
|
32235
32403
|
"schema": {
|
|
@@ -32238,8 +32406,27 @@
|
|
|
32238
32406
|
}
|
|
32239
32407
|
}
|
|
32240
32408
|
},
|
|
32241
|
-
"
|
|
32242
|
-
"description": "
|
|
32409
|
+
"404": {
|
|
32410
|
+
"description": "No such Agent"
|
|
32411
|
+
},
|
|
32412
|
+
"409": {
|
|
32413
|
+
"description": "The definition declares this id, or an agent's trigger or a booked wake holds it (`trigger_conflict`)"
|
|
32414
|
+
},
|
|
32415
|
+
"422": {
|
|
32416
|
+
"description": "The Agent holds as many triggers its agents or clients made as `limits.triggers.count` allows (`trigger_limit`)"
|
|
32417
|
+
},
|
|
32418
|
+
"426": {
|
|
32419
|
+
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
32420
|
+
"content": {
|
|
32421
|
+
"application/json": {
|
|
32422
|
+
"schema": {
|
|
32423
|
+
"$ref": "#/components/schemas/ProtocolRejected"
|
|
32424
|
+
}
|
|
32425
|
+
}
|
|
32426
|
+
}
|
|
32427
|
+
},
|
|
32428
|
+
"503": {
|
|
32429
|
+
"description": "The Tenant's storage or streams are unavailable",
|
|
32243
32430
|
"content": {
|
|
32244
32431
|
"application/json": {
|
|
32245
32432
|
"schema": {
|
|
@@ -32247,9 +32434,96 @@
|
|
|
32247
32434
|
}
|
|
32248
32435
|
}
|
|
32249
32436
|
}
|
|
32437
|
+
}
|
|
32438
|
+
}
|
|
32439
|
+
},
|
|
32440
|
+
"delete": {
|
|
32441
|
+
"tags": [
|
|
32442
|
+
"Triggers"
|
|
32443
|
+
],
|
|
32444
|
+
"summary": "Delete a trigger an agent made or a client put",
|
|
32445
|
+
"description": "Deletes a trigger one of the Agent's agents made with the `triggers` tool (`origin: agent`) or a client put (`origin: api`), 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.",
|
|
32446
|
+
"security": [
|
|
32447
|
+
{
|
|
32448
|
+
"applicationKey": []
|
|
32250
32449
|
},
|
|
32251
|
-
|
|
32252
|
-
"
|
|
32450
|
+
{
|
|
32451
|
+
"issuerToken": []
|
|
32452
|
+
}
|
|
32453
|
+
],
|
|
32454
|
+
"x-nylorun-credentials": [
|
|
32455
|
+
"application",
|
|
32456
|
+
"subject",
|
|
32457
|
+
"token"
|
|
32458
|
+
],
|
|
32459
|
+
"x-nylorun-scopes": [
|
|
32460
|
+
"agents:write"
|
|
32461
|
+
],
|
|
32462
|
+
"parameters": [
|
|
32463
|
+
{
|
|
32464
|
+
"schema": {
|
|
32465
|
+
"type": "string",
|
|
32466
|
+
"description": "The Agent id, percent-encoded"
|
|
32467
|
+
},
|
|
32468
|
+
"required": true,
|
|
32469
|
+
"description": "The Agent id, percent-encoded",
|
|
32470
|
+
"name": "agentId",
|
|
32471
|
+
"in": "path"
|
|
32472
|
+
},
|
|
32473
|
+
{
|
|
32474
|
+
"schema": {
|
|
32475
|
+
"type": "string",
|
|
32476
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it"
|
|
32477
|
+
},
|
|
32478
|
+
"required": true,
|
|
32479
|
+
"description": "The trigger's id: in the manifest's `runtime.triggers`, or the one its agent gave it",
|
|
32480
|
+
"name": "triggerId",
|
|
32481
|
+
"in": "path"
|
|
32482
|
+
},
|
|
32483
|
+
{
|
|
32484
|
+
"schema": {
|
|
32485
|
+
"type": "string",
|
|
32486
|
+
"description": "The protocol version, `18`"
|
|
32487
|
+
},
|
|
32488
|
+
"required": true,
|
|
32489
|
+
"description": "The protocol version, `18`",
|
|
32490
|
+
"name": "Nylorun-Protocol",
|
|
32491
|
+
"in": "header"
|
|
32492
|
+
},
|
|
32493
|
+
{
|
|
32494
|
+
"schema": {
|
|
32495
|
+
"type": "string",
|
|
32496
|
+
"description": "The person an application key acts for"
|
|
32497
|
+
},
|
|
32498
|
+
"required": false,
|
|
32499
|
+
"description": "The person an application key acts for",
|
|
32500
|
+
"name": "Nylorun-Subject",
|
|
32501
|
+
"in": "header"
|
|
32502
|
+
},
|
|
32503
|
+
{
|
|
32504
|
+
"schema": {
|
|
32505
|
+
"type": "string",
|
|
32506
|
+
"description": "The subject's space-separated scopes; required with a subject"
|
|
32507
|
+
},
|
|
32508
|
+
"required": false,
|
|
32509
|
+
"description": "The subject's space-separated scopes; required with a subject",
|
|
32510
|
+
"name": "Nylorun-Scopes",
|
|
32511
|
+
"in": "header"
|
|
32512
|
+
}
|
|
32513
|
+
],
|
|
32514
|
+
"responses": {
|
|
32515
|
+
"200": {
|
|
32516
|
+
"description": "Deleted",
|
|
32517
|
+
"content": {
|
|
32518
|
+
"application/json": {
|
|
32519
|
+
"schema": {
|
|
32520
|
+
"$ref": "#/components/schemas/DeletedResponse"
|
|
32521
|
+
}
|
|
32522
|
+
}
|
|
32523
|
+
}
|
|
32524
|
+
},
|
|
32525
|
+
"400": {
|
|
32526
|
+
"description": "Invalid headers, path, body or cursor",
|
|
32253
32527
|
"content": {
|
|
32254
32528
|
"application/json": {
|
|
32255
32529
|
"schema": {
|
|
@@ -32258,8 +32532,31 @@
|
|
|
32258
32532
|
}
|
|
32259
32533
|
}
|
|
32260
32534
|
},
|
|
32535
|
+
"401": {
|
|
32536
|
+
"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`)",
|
|
32537
|
+
"content": {
|
|
32538
|
+
"application/json": {
|
|
32539
|
+
"schema": {
|
|
32540
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32541
|
+
}
|
|
32542
|
+
}
|
|
32543
|
+
}
|
|
32544
|
+
},
|
|
32545
|
+
"403": {
|
|
32546
|
+
"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`)",
|
|
32547
|
+
"content": {
|
|
32548
|
+
"application/json": {
|
|
32549
|
+
"schema": {
|
|
32550
|
+
"$ref": "#/components/schemas/Rejected"
|
|
32551
|
+
}
|
|
32552
|
+
}
|
|
32553
|
+
}
|
|
32554
|
+
},
|
|
32555
|
+
"404": {
|
|
32556
|
+
"description": "The Agent has no such trigger"
|
|
32557
|
+
},
|
|
32261
32558
|
"409": {
|
|
32262
|
-
"description": "
|
|
32559
|
+
"description": "The manifest declares it (`trigger_from_manifest`)"
|
|
32263
32560
|
},
|
|
32264
32561
|
"426": {
|
|
32265
32562
|
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
@@ -32284,13 +32581,13 @@
|
|
|
32284
32581
|
}
|
|
32285
32582
|
}
|
|
32286
32583
|
},
|
|
32287
|
-
"/v1/agents/{agentId}/triggers/{triggerId}/
|
|
32584
|
+
"/v1/agents/{agentId}/triggers/{triggerId}/pause": {
|
|
32288
32585
|
"post": {
|
|
32289
32586
|
"tags": [
|
|
32290
32587
|
"Triggers"
|
|
32291
32588
|
],
|
|
32292
|
-
"summary": "
|
|
32293
|
-
"description": "It
|
|
32589
|
+
"summary": "Pause a trigger",
|
|
32590
|
+
"description": "It stops firing until it is resumed; a run already started or queued goes on.",
|
|
32294
32591
|
"security": [
|
|
32295
32592
|
{
|
|
32296
32593
|
"applicationKey": []
|
|
@@ -32436,13 +32733,13 @@
|
|
|
32436
32733
|
}
|
|
32437
32734
|
}
|
|
32438
32735
|
},
|
|
32439
|
-
"/v1/agents/{agentId}/triggers/{triggerId}/
|
|
32736
|
+
"/v1/agents/{agentId}/triggers/{triggerId}/resume": {
|
|
32440
32737
|
"post": {
|
|
32441
32738
|
"tags": [
|
|
32442
32739
|
"Triggers"
|
|
32443
32740
|
],
|
|
32444
|
-
"summary": "
|
|
32445
|
-
"description": "
|
|
32741
|
+
"summary": "Resume a trigger",
|
|
32742
|
+
"description": "It fires again from its next time after now; missed times are not run. An `at` whose time has passed is refused (`trigger_expired`).",
|
|
32446
32743
|
"security": [
|
|
32447
32744
|
{
|
|
32448
32745
|
"applicationKey": []
|
|
@@ -32509,25 +32806,15 @@
|
|
|
32509
32806
|
"description": "The subject's space-separated scopes; required with a subject",
|
|
32510
32807
|
"name": "Nylorun-Scopes",
|
|
32511
32808
|
"in": "header"
|
|
32512
|
-
},
|
|
32513
|
-
{
|
|
32514
|
-
"schema": {
|
|
32515
|
-
"type": "string",
|
|
32516
|
-
"minLength": 1,
|
|
32517
|
-
"maxLength": 200
|
|
32518
|
-
},
|
|
32519
|
-
"required": true,
|
|
32520
|
-
"name": "Idempotency-Key",
|
|
32521
|
-
"in": "header"
|
|
32522
32809
|
}
|
|
32523
32810
|
],
|
|
32524
32811
|
"responses": {
|
|
32525
32812
|
"200": {
|
|
32526
|
-
"description": "The
|
|
32813
|
+
"description": "The Agent's triggers",
|
|
32527
32814
|
"content": {
|
|
32528
32815
|
"application/json": {
|
|
32529
32816
|
"schema": {
|
|
32530
|
-
"$ref": "#/components/schemas/
|
|
32817
|
+
"$ref": "#/components/schemas/TriggerList"
|
|
32531
32818
|
}
|
|
32532
32819
|
}
|
|
32533
32820
|
}
|
|
@@ -32572,6 +32859,9 @@
|
|
|
32572
32859
|
}
|
|
32573
32860
|
}
|
|
32574
32861
|
},
|
|
32862
|
+
"409": {
|
|
32863
|
+
"description": "An `at` whose time has passed (`trigger_expired`)"
|
|
32864
|
+
},
|
|
32575
32865
|
"426": {
|
|
32576
32866
|
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
32577
32867
|
"content": {
|
|
@@ -32595,13 +32885,13 @@
|
|
|
32595
32885
|
}
|
|
32596
32886
|
}
|
|
32597
32887
|
},
|
|
32598
|
-
"/v1/agents/{agentId}/triggers/{triggerId}": {
|
|
32599
|
-
"
|
|
32888
|
+
"/v1/agents/{agentId}/triggers/{triggerId}/run": {
|
|
32889
|
+
"post": {
|
|
32600
32890
|
"tags": [
|
|
32601
32891
|
"Triggers"
|
|
32602
32892
|
],
|
|
32603
|
-
"summary": "
|
|
32604
|
-
"description": "
|
|
32893
|
+
"summary": "Run a trigger now",
|
|
32894
|
+
"description": "Runs it once now, paused or not, as if it had fired: a turn on its session, or a queued message when a turn runs there. A retried request with the same `Idempotency-Key` answers the same run.",
|
|
32605
32895
|
"security": [
|
|
32606
32896
|
{
|
|
32607
32897
|
"applicationKey": []
|
|
@@ -32668,15 +32958,25 @@
|
|
|
32668
32958
|
"description": "The subject's space-separated scopes; required with a subject",
|
|
32669
32959
|
"name": "Nylorun-Scopes",
|
|
32670
32960
|
"in": "header"
|
|
32961
|
+
},
|
|
32962
|
+
{
|
|
32963
|
+
"schema": {
|
|
32964
|
+
"type": "string",
|
|
32965
|
+
"minLength": 1,
|
|
32966
|
+
"maxLength": 200
|
|
32967
|
+
},
|
|
32968
|
+
"required": true,
|
|
32969
|
+
"name": "Idempotency-Key",
|
|
32970
|
+
"in": "header"
|
|
32671
32971
|
}
|
|
32672
32972
|
],
|
|
32673
32973
|
"responses": {
|
|
32674
32974
|
"200": {
|
|
32675
|
-
"description": "
|
|
32975
|
+
"description": "The run",
|
|
32676
32976
|
"content": {
|
|
32677
32977
|
"application/json": {
|
|
32678
32978
|
"schema": {
|
|
32679
|
-
"$ref": "#/components/schemas/
|
|
32979
|
+
"$ref": "#/components/schemas/RunTriggerResponse"
|
|
32680
32980
|
}
|
|
32681
32981
|
}
|
|
32682
32982
|
}
|
|
@@ -32712,10 +33012,14 @@
|
|
|
32712
33012
|
}
|
|
32713
33013
|
},
|
|
32714
33014
|
"404": {
|
|
32715
|
-
"description": "
|
|
32716
|
-
|
|
32717
|
-
|
|
32718
|
-
|
|
33015
|
+
"description": "Not found (`not_found`)",
|
|
33016
|
+
"content": {
|
|
33017
|
+
"application/json": {
|
|
33018
|
+
"schema": {
|
|
33019
|
+
"$ref": "#/components/schemas/Rejected"
|
|
33020
|
+
}
|
|
33021
|
+
}
|
|
33022
|
+
}
|
|
32719
33023
|
},
|
|
32720
33024
|
"426": {
|
|
32721
33025
|
"description": "`Nylorun-Protocol` missing or unsupported",
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
ALTER TABLE "nylorun"."agent_triggers" DROP CONSTRAINT "agent_triggers_origin_check";--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "nylorun"."agent_triggers" ADD COLUMN "principal" text;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "nylorun"."agent_triggers" ADD CONSTRAINT "agent_triggers_origin_check" CHECK ("nylorun"."agent_triggers"."origin" IN ('manifest', 'agent', 'api', 'wake'));
|
|
@@ -344,6 +344,13 @@
|
|
|
344
344
|
"when": 1794635246579,
|
|
345
345
|
"tag": "0048_sandbox_pod_drained_at",
|
|
346
346
|
"breakpoints": true
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"idx": 49,
|
|
350
|
+
"version": "7",
|
|
351
|
+
"when": 1794674884188,
|
|
352
|
+
"tag": "0049_agent_triggers_api",
|
|
353
|
+
"breakpoints": true
|
|
347
354
|
}
|
|
348
355
|
]
|
|
349
356
|
}
|
|
@@ -1793,14 +1793,31 @@ export declare const agentTriggers: import("drizzle-orm/pg-core").PgTableWithCol
|
|
|
1793
1793
|
tableName: "agent_triggers";
|
|
1794
1794
|
dataType: "string";
|
|
1795
1795
|
columnType: "PgText";
|
|
1796
|
-
data: "agent" | "manifest" | "wake";
|
|
1796
|
+
data: "agent" | "api" | "manifest" | "wake";
|
|
1797
1797
|
driverParam: string;
|
|
1798
1798
|
notNull: true;
|
|
1799
1799
|
hasDefault: true;
|
|
1800
1800
|
isPrimaryKey: false;
|
|
1801
1801
|
isAutoincrement: false;
|
|
1802
1802
|
hasRuntimeDefault: false;
|
|
1803
|
-
enumValues: ["manifest", "agent", "wake"];
|
|
1803
|
+
enumValues: ["manifest", "agent", "api", "wake"];
|
|
1804
|
+
baseColumn: never;
|
|
1805
|
+
identity: undefined;
|
|
1806
|
+
generated: undefined;
|
|
1807
|
+
}, {}, {}>;
|
|
1808
|
+
principal: import("drizzle-orm/pg-core").PgColumn<{
|
|
1809
|
+
name: "principal";
|
|
1810
|
+
tableName: "agent_triggers";
|
|
1811
|
+
dataType: "string";
|
|
1812
|
+
columnType: "PgText";
|
|
1813
|
+
data: string;
|
|
1814
|
+
driverParam: string;
|
|
1815
|
+
notNull: false;
|
|
1816
|
+
hasDefault: false;
|
|
1817
|
+
isPrimaryKey: false;
|
|
1818
|
+
isAutoincrement: false;
|
|
1819
|
+
hasRuntimeDefault: false;
|
|
1820
|
+
enumValues: [string, ...string[]];
|
|
1804
1821
|
baseColumn: never;
|
|
1805
1822
|
identity: undefined;
|
|
1806
1823
|
generated: undefined;
|
|
@@ -2580,14 +2597,14 @@ export declare const triggerRuns: import("drizzle-orm/pg-core").PgTableWithColum
|
|
|
2580
2597
|
tableName: "trigger_runs";
|
|
2581
2598
|
dataType: "string";
|
|
2582
2599
|
columnType: "PgText";
|
|
2583
|
-
data: "agent" | "manifest" | "wake";
|
|
2600
|
+
data: "agent" | "api" | "manifest" | "wake";
|
|
2584
2601
|
driverParam: string;
|
|
2585
2602
|
notNull: true;
|
|
2586
2603
|
hasDefault: true;
|
|
2587
2604
|
isPrimaryKey: false;
|
|
2588
2605
|
isAutoincrement: false;
|
|
2589
2606
|
hasRuntimeDefault: false;
|
|
2590
|
-
enumValues: ["manifest", "agent", "wake"];
|
|
2607
|
+
enumValues: ["manifest", "agent", "api", "wake"];
|
|
2591
2608
|
baseColumn: never;
|
|
2592
2609
|
identity: undefined;
|
|
2593
2610
|
generated: undefined;
|