@desplega.ai/agent-swarm 1.111.0 → 1.113.0
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/dist/{actions-a4crgvtd.js → actions-q4n7cz6e.js} +6 -6
- package/dist/{app-va5mr9yw.js → app-es4nzc71.js} +3 -3
- package/dist/{assistant-0jm4vy8r.js → assistant-0x8ey0vs.js} +9 -9
- package/dist/{boot-reembed-50zzk97q.js → boot-reembed-69agkhv6.js} +4 -4
- package/dist/{boot-reembed-0t815mmm.js → boot-reembed-p0ny05t8.js} +3 -3
- package/dist/{boot-scrub-logs-r99nbmxh.js → boot-scrub-logs-yybrkmvr.js} +2 -2
- package/dist/{cli-h3vhr1gj.js → cli-30bbaveh.js} +2 -2
- package/dist/{cli-ee3fkebs.js → cli-36ymmpmp.js} +2 -2
- package/dist/{cli-dza5039b.js → cli-4xyj9jtq.js} +1495 -254
- package/dist/{cli-3cm8ar1c.js → cli-bgef578c.js} +1 -1
- package/dist/{cli-xqzvygxp.js → cli-bgvskydy.js} +11 -2
- package/dist/{cli-t8m00q3b.js → cli-bnzbn8j8.js} +3 -3
- package/dist/{cli-kavm2cv5.js → cli-c3frqf65.js} +4 -3
- package/dist/{cli-2b0ew5v8.js → cli-c9mtm09b.js} +1 -1
- package/dist/{cli-0d5xddf1.js → cli-f3qa069v.js} +2 -2
- package/dist/{cli-r3y5chyg.js → cli-gtkqc144.js} +4 -4
- package/dist/{cli-0d404x64.js → cli-h3k622d0.js} +1 -1
- package/dist/{cli-y7v6e7yr.js → cli-hjhvekf4.js} +4 -4
- package/dist/{cli-fdnpymsv.js → cli-hsetkkd3.js} +4 -2
- package/dist/{cli-8j1h9627.js → cli-mq580e06.js} +61 -14
- package/dist/{cli-4ke1amr9.js → cli-ncfgsqbd.js} +63 -7
- package/dist/{cli-jrmjxsnk.js → cli-pwc5e83c.js} +3 -3
- package/dist/{cli-4f6vw5vy.js → cli-qwgtacd6.js} +2 -2
- package/dist/{cli-gchg43wt.js → cli-r5g6ngtn.js} +1 -1
- package/dist/{cli-6tfm5fr1.js → cli-tbw13sx8.js} +1 -1
- package/dist/{cli-f1f82qgv.js → cli-trmapn9k.js} +5 -5
- package/dist/{cli-aqr96mny.js → cli-y4ycrnjc.js} +1 -1
- package/dist/{cli-z626gjqj.js → cli-y6mrptcn.js} +1 -1
- package/dist/{cli-1aqc46he.js → cli-z46pnksz.js} +5 -5
- package/dist/cli.js +11 -10
- package/dist/{commands-t3rdvb55.js → commands-z5dbwta3.js} +2 -2
- package/dist/{db-mjqc8hj6.js → db-bbgahh4z.js} +2 -2
- package/dist/{handlers-mcmg5qgc.js → handlers-6b44317z.js} +9 -9
- package/dist/{hook-0p4q1tym.js → hook-sbp5fmps.js} +1 -1
- package/dist/{http-gs6fk9sg.js → http-2xz43gz3.js} +356 -94
- package/dist/{index-20mf9wvc.js → index-0gzmqj4k.js} +8 -8
- package/dist/{index-w15fk28m.js → index-5ghxn8s6.js} +7 -7
- package/dist/{index-744yvc8x.js → index-nhat35em.js} +9 -9
- package/dist/{index-6zpajd9e.js → index-vfedgdw6.js} +26 -15
- package/dist/{keepalive-3gvnbxaj.js → keepalive-62gfj91d.js} +4 -4
- package/dist/{lead-yjbmhj3g.js → lead-ag0akn0v.js} +17 -17
- package/dist/{maintenance-jbvy2bfg.js → maintenance-xxrrzk5x.js} +4 -4
- package/dist/{onboard-sexatejh.js → onboard-64zyfcbs.js} +2 -2
- package/dist/{otel-impl-sgqvcw0f.js → otel-impl-b86qseaa.js} +1 -1
- package/dist/{pricing-refresh-rat240yg.js → pricing-refresh-cgtkffpa.js} +4 -4
- package/dist/{seed-pricing-7yfaf123.js → seed-pricing-1r1y1xkq.js} +3 -3
- package/dist/{setup-vm5vcc6c.js → setup-mkcgkjf7.js} +2 -2
- package/dist/{worker-02y2r0r2.js → worker-351sze63.js} +17 -17
- package/openapi.json +314 -3
- package/package.json +4 -3
- package/src/be/db.ts +43 -3
- package/src/be/memory/providers/sqlite-store.ts +5 -1
- package/src/be/migrations/108_rbac_permission_audit.sql +26 -0
- package/src/be/rbac-audit.ts +218 -0
- package/src/be/scripts/typecheck.ts +2 -0
- package/src/commands/runner.ts +154 -8
- package/src/github/handlers.ts +128 -25
- package/src/http/all-routes.ts +58 -0
- package/src/http/config.ts +55 -0
- package/src/http/favorites.ts +5 -0
- package/src/http/fs.ts +27 -7
- package/src/http/index.ts +26 -0
- package/src/http/kv.ts +21 -4
- package/src/http/route-def.ts +9 -0
- package/src/http/schedules.ts +56 -22
- package/src/http/scripts.ts +33 -0
- package/src/http/workflows.ts +13 -2
- package/src/prompts/base-prompt.ts +7 -6
- package/src/prompts/session-templates.ts +38 -11
- package/src/rbac/can.ts +44 -0
- package/src/rbac/index.ts +13 -0
- package/src/rbac/legacy-policy.ts +185 -0
- package/src/rbac/permissions.ts +182 -0
- package/src/rbac/types.ts +45 -0
- package/src/scripts-runtime/sdk-allowlist.ts +3 -0
- package/src/scripts-runtime/swarm-sdk.ts +81 -0
- package/src/scripts-runtime/types/stdlib.d.ts +18 -2
- package/src/scripts-runtime/types/swarm-sdk.d.ts +20 -2
- package/src/server.ts +6 -0
- package/src/slack/message-text.ts +25 -0
- package/src/stdio.ts +43 -0
- package/src/tests/base-prompt.test.ts +7 -4
- package/src/tests/github-event-filter.test.ts +3 -2
- package/src/tests/github-handlers-inline-comments.test.ts +114 -24
- package/src/tests/harness-provider-resolution.test.ts +5 -0
- package/src/tests/http-api-integration.test.ts +8 -1
- package/src/tests/prompt-template-session.test.ts +21 -8
- package/src/tests/rbac-audit.test.ts +345 -0
- package/src/tests/rbac-charact-http.test.ts +272 -0
- package/src/tests/rbac-charact-misc-tools.test.ts +428 -0
- package/src/tests/rbac-charact-skills.test.ts +492 -0
- package/src/tests/rbac-charact-slack.test.ts +283 -0
- package/src/tests/rbac-e2e-helpers.ts +305 -0
- package/src/tests/rbac-engine.test.ts +433 -0
- package/src/tests/rbac-lifecycle-e2e.test.ts +262 -0
- package/src/tests/rbac-wire-e2e.test.ts +574 -0
- package/src/tests/runner-repo-autostash.test.ts +168 -1
- package/src/tests/schedule-http-triage-tools.test.ts +121 -0
- package/src/tests/scheduled-tasks.test.ts +34 -0
- package/src/tests/scripts-http.test.ts +56 -7
- package/src/tests/slack-delete.test.ts +157 -0
- package/src/tests/slack-message-text.test.ts +37 -1
- package/src/tests/slack-update.test.ts +167 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +17 -0
- package/src/tests/tool-annotations.test.ts +4 -0
- package/src/tests/update-schedule-mcp-tool.test.ts +57 -0
- package/src/tests/workflow-http-v2.test.ts +80 -0
- package/src/tools/cancel-task.ts +13 -3
- package/src/tools/context-diff.ts +12 -1
- package/src/tools/context-history.ts +12 -1
- package/src/tools/credential-bindings/tool.ts +12 -1
- package/src/tools/delete-channel.ts +12 -1
- package/src/tools/get-task-details.ts +1 -1
- package/src/tools/inject-learning.ts +12 -1
- package/src/tools/kv/kv-delete.ts +3 -18
- package/src/tools/kv/kv-incr.ts +3 -18
- package/src/tools/kv/kv-set.ts +3 -20
- package/src/tools/kv/kv-write-auth.ts +40 -0
- package/src/tools/manage-user.ts +12 -1
- package/src/tools/mcp-servers/mcp-server-create.ts +12 -1
- package/src/tools/mcp-servers/mcp-server-delete.ts +12 -1
- package/src/tools/mcp-servers/mcp-server-install.ts +12 -1
- package/src/tools/mcp-servers/mcp-server-uninstall.ts +12 -1
- package/src/tools/mcp-servers/mcp-server-update.ts +12 -1
- package/src/tools/memory-delete.ts +12 -4
- package/src/tools/register-kapso-number.ts +23 -2
- package/src/tools/schedules/create-schedule.ts +4 -3
- package/src/tools/schedules/index.ts +1 -0
- package/src/tools/schedules/list-schedules.ts +36 -2
- package/src/tools/schedules/patch-schedule.ts +405 -0
- package/src/tools/schedules/update-schedule.ts +2 -2
- package/src/tools/script-connections/tool.ts +12 -1
- package/src/tools/skills/skill-create.ts +12 -1
- package/src/tools/skills/skill-delete.ts +12 -1
- package/src/tools/skills/skill-install-remote.ts +12 -1
- package/src/tools/skills/skill-install.ts +12 -1
- package/src/tools/skills/skill-uninstall.ts +12 -1
- package/src/tools/skills/skill-update.ts +25 -2
- package/src/tools/slack-delete.ts +109 -0
- package/src/tools/slack-post.ts +8 -1
- package/src/tools/slack-read.ts +8 -1
- package/src/tools/slack-reply.ts +11 -3
- package/src/tools/slack-start-thread.ts +10 -1
- package/src/tools/slack-update.ts +134 -0
- package/src/tools/slack-upload-file.ts +8 -1
- package/src/tools/swarm-config/delete-config.ts +28 -1
- package/src/tools/swarm-config/get-config.ts +32 -5
- package/src/tools/swarm-config/list-config.ts +31 -5
- package/src/tools/swarm-config/set-config.ts +38 -1
- package/src/tools/task-action.ts +1 -1
- package/src/tools/task-tool-ctx.ts +19 -3
- package/src/tools/tool-config.ts +5 -2
- package/src/tools/update-profile.ts +8 -1
- package/src/tools/workflows/list-workflows.ts +14 -2
- package/templates/skills/swarm-scripts/SKILL.md +4 -9
- package/templates/skills/swarm-scripts/content.md +20 -9
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Agent Swarm API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.113.0",
|
|
6
6
|
"description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
@@ -3468,6 +3468,100 @@
|
|
|
3468
3468
|
}
|
|
3469
3469
|
}
|
|
3470
3470
|
},
|
|
3471
|
+
"/api/favorites": {
|
|
3472
|
+
"get": {
|
|
3473
|
+
"summary": "List favorites for the authenticated user",
|
|
3474
|
+
"tags": [
|
|
3475
|
+
"Favorites"
|
|
3476
|
+
],
|
|
3477
|
+
"security": [
|
|
3478
|
+
{
|
|
3479
|
+
"bearerAuth": []
|
|
3480
|
+
}
|
|
3481
|
+
],
|
|
3482
|
+
"parameters": [
|
|
3483
|
+
{
|
|
3484
|
+
"schema": {
|
|
3485
|
+
"type": "string",
|
|
3486
|
+
"enum": [
|
|
3487
|
+
"page",
|
|
3488
|
+
"workflow",
|
|
3489
|
+
"schedule"
|
|
3490
|
+
]
|
|
3491
|
+
},
|
|
3492
|
+
"required": false,
|
|
3493
|
+
"name": "itemType",
|
|
3494
|
+
"in": "query"
|
|
3495
|
+
},
|
|
3496
|
+
{
|
|
3497
|
+
"schema": {
|
|
3498
|
+
"type": "string"
|
|
3499
|
+
},
|
|
3500
|
+
"required": false,
|
|
3501
|
+
"name": "itemIds",
|
|
3502
|
+
"in": "query"
|
|
3503
|
+
}
|
|
3504
|
+
],
|
|
3505
|
+
"responses": {
|
|
3506
|
+
"200": {
|
|
3507
|
+
"description": "Favorite rows and favorite item ids"
|
|
3508
|
+
},
|
|
3509
|
+
"401": {
|
|
3510
|
+
"description": "No authenticated user context"
|
|
3511
|
+
}
|
|
3512
|
+
}
|
|
3513
|
+
},
|
|
3514
|
+
"put": {
|
|
3515
|
+
"summary": "Set favorite state for an item",
|
|
3516
|
+
"tags": [
|
|
3517
|
+
"Favorites"
|
|
3518
|
+
],
|
|
3519
|
+
"security": [
|
|
3520
|
+
{
|
|
3521
|
+
"bearerAuth": []
|
|
3522
|
+
}
|
|
3523
|
+
],
|
|
3524
|
+
"requestBody": {
|
|
3525
|
+
"content": {
|
|
3526
|
+
"application/json": {
|
|
3527
|
+
"schema": {
|
|
3528
|
+
"type": "object",
|
|
3529
|
+
"properties": {
|
|
3530
|
+
"itemType": {
|
|
3531
|
+
"type": "string",
|
|
3532
|
+
"enum": [
|
|
3533
|
+
"page",
|
|
3534
|
+
"workflow",
|
|
3535
|
+
"schedule"
|
|
3536
|
+
]
|
|
3537
|
+
},
|
|
3538
|
+
"itemId": {
|
|
3539
|
+
"type": "string",
|
|
3540
|
+
"minLength": 1
|
|
3541
|
+
},
|
|
3542
|
+
"favorite": {
|
|
3543
|
+
"type": "boolean"
|
|
3544
|
+
}
|
|
3545
|
+
},
|
|
3546
|
+
"required": [
|
|
3547
|
+
"itemType",
|
|
3548
|
+
"itemId",
|
|
3549
|
+
"favorite"
|
|
3550
|
+
]
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
},
|
|
3555
|
+
"responses": {
|
|
3556
|
+
"200": {
|
|
3557
|
+
"description": "Favorite state"
|
|
3558
|
+
},
|
|
3559
|
+
"401": {
|
|
3560
|
+
"description": "No authenticated user context"
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
},
|
|
3471
3565
|
"/api/fs/capabilities": {
|
|
3472
3566
|
"get": {
|
|
3473
3567
|
"summary": "Get active file-storage provider capabilities",
|
|
@@ -8881,6 +8975,30 @@
|
|
|
8881
8975
|
"name": "hideCompleted",
|
|
8882
8976
|
"in": "query"
|
|
8883
8977
|
},
|
|
8978
|
+
{
|
|
8979
|
+
"schema": {
|
|
8980
|
+
"type": [
|
|
8981
|
+
"integer",
|
|
8982
|
+
"null"
|
|
8983
|
+
],
|
|
8984
|
+
"minimum": 0
|
|
8985
|
+
},
|
|
8986
|
+
"required": false,
|
|
8987
|
+
"name": "consecutiveErrorsMin",
|
|
8988
|
+
"in": "query"
|
|
8989
|
+
},
|
|
8990
|
+
{
|
|
8991
|
+
"schema": {
|
|
8992
|
+
"type": "string",
|
|
8993
|
+
"enum": [
|
|
8994
|
+
"failed",
|
|
8995
|
+
"succeeded"
|
|
8996
|
+
]
|
|
8997
|
+
},
|
|
8998
|
+
"required": false,
|
|
8999
|
+
"name": "lastRunStatus",
|
|
9000
|
+
"in": "query"
|
|
9001
|
+
},
|
|
8884
9002
|
{
|
|
8885
9003
|
"schema": {
|
|
8886
9004
|
"type": "string",
|
|
@@ -9026,7 +9144,10 @@
|
|
|
9026
9144
|
"type": "integer"
|
|
9027
9145
|
},
|
|
9028
9146
|
"targetAgentId": {
|
|
9029
|
-
"type":
|
|
9147
|
+
"type": [
|
|
9148
|
+
"string",
|
|
9149
|
+
"null"
|
|
9150
|
+
],
|
|
9030
9151
|
"format": "uuid"
|
|
9031
9152
|
},
|
|
9032
9153
|
"enabled": {
|
|
@@ -9036,7 +9157,10 @@
|
|
|
9036
9157
|
"type": "string"
|
|
9037
9158
|
},
|
|
9038
9159
|
"model": {
|
|
9039
|
-
"type":
|
|
9160
|
+
"type": [
|
|
9161
|
+
"string",
|
|
9162
|
+
"null"
|
|
9163
|
+
]
|
|
9040
9164
|
},
|
|
9041
9165
|
"modelTier": {
|
|
9042
9166
|
"type": [
|
|
@@ -9105,6 +9229,153 @@
|
|
|
9105
9229
|
}
|
|
9106
9230
|
}
|
|
9107
9231
|
},
|
|
9232
|
+
"patch": {
|
|
9233
|
+
"summary": "Patch a schedule",
|
|
9234
|
+
"description": "Partially updates a schedule by shallow-merging provided fields over the existing row.",
|
|
9235
|
+
"tags": [
|
|
9236
|
+
"Schedules"
|
|
9237
|
+
],
|
|
9238
|
+
"security": [
|
|
9239
|
+
{
|
|
9240
|
+
"bearerAuth": []
|
|
9241
|
+
}
|
|
9242
|
+
],
|
|
9243
|
+
"parameters": [
|
|
9244
|
+
{
|
|
9245
|
+
"schema": {
|
|
9246
|
+
"type": "string"
|
|
9247
|
+
},
|
|
9248
|
+
"required": true,
|
|
9249
|
+
"name": "id",
|
|
9250
|
+
"in": "path"
|
|
9251
|
+
}
|
|
9252
|
+
],
|
|
9253
|
+
"requestBody": {
|
|
9254
|
+
"content": {
|
|
9255
|
+
"application/json": {
|
|
9256
|
+
"schema": {
|
|
9257
|
+
"type": "object",
|
|
9258
|
+
"properties": {
|
|
9259
|
+
"name": {
|
|
9260
|
+
"type": "string"
|
|
9261
|
+
},
|
|
9262
|
+
"description": {
|
|
9263
|
+
"type": "string"
|
|
9264
|
+
},
|
|
9265
|
+
"cronExpression": {
|
|
9266
|
+
"type": [
|
|
9267
|
+
"string",
|
|
9268
|
+
"null"
|
|
9269
|
+
]
|
|
9270
|
+
},
|
|
9271
|
+
"intervalMs": {
|
|
9272
|
+
"type": [
|
|
9273
|
+
"integer",
|
|
9274
|
+
"null"
|
|
9275
|
+
],
|
|
9276
|
+
"exclusiveMinimum": 0
|
|
9277
|
+
},
|
|
9278
|
+
"taskTemplate": {
|
|
9279
|
+
"type": "string"
|
|
9280
|
+
},
|
|
9281
|
+
"taskType": {
|
|
9282
|
+
"type": "string"
|
|
9283
|
+
},
|
|
9284
|
+
"tags": {
|
|
9285
|
+
"type": "array",
|
|
9286
|
+
"items": {
|
|
9287
|
+
"type": "string"
|
|
9288
|
+
}
|
|
9289
|
+
},
|
|
9290
|
+
"priority": {
|
|
9291
|
+
"type": "integer"
|
|
9292
|
+
},
|
|
9293
|
+
"targetAgentId": {
|
|
9294
|
+
"type": [
|
|
9295
|
+
"string",
|
|
9296
|
+
"null"
|
|
9297
|
+
],
|
|
9298
|
+
"format": "uuid"
|
|
9299
|
+
},
|
|
9300
|
+
"enabled": {
|
|
9301
|
+
"type": "boolean"
|
|
9302
|
+
},
|
|
9303
|
+
"timezone": {
|
|
9304
|
+
"type": "string"
|
|
9305
|
+
},
|
|
9306
|
+
"model": {
|
|
9307
|
+
"type": [
|
|
9308
|
+
"string",
|
|
9309
|
+
"null"
|
|
9310
|
+
]
|
|
9311
|
+
},
|
|
9312
|
+
"modelTier": {
|
|
9313
|
+
"type": [
|
|
9314
|
+
"string",
|
|
9315
|
+
"null"
|
|
9316
|
+
],
|
|
9317
|
+
"enum": [
|
|
9318
|
+
"smol",
|
|
9319
|
+
"regular",
|
|
9320
|
+
"smart",
|
|
9321
|
+
"ultra",
|
|
9322
|
+
null
|
|
9323
|
+
]
|
|
9324
|
+
},
|
|
9325
|
+
"nextRunAt": {
|
|
9326
|
+
"type": [
|
|
9327
|
+
"string",
|
|
9328
|
+
"null"
|
|
9329
|
+
]
|
|
9330
|
+
},
|
|
9331
|
+
"targetType": {
|
|
9332
|
+
"type": "string",
|
|
9333
|
+
"enum": [
|
|
9334
|
+
"agent-task",
|
|
9335
|
+
"workflow",
|
|
9336
|
+
"script"
|
|
9337
|
+
]
|
|
9338
|
+
},
|
|
9339
|
+
"workflowId": {
|
|
9340
|
+
"type": [
|
|
9341
|
+
"string",
|
|
9342
|
+
"null"
|
|
9343
|
+
],
|
|
9344
|
+
"format": "uuid"
|
|
9345
|
+
},
|
|
9346
|
+
"scriptName": {
|
|
9347
|
+
"type": [
|
|
9348
|
+
"string",
|
|
9349
|
+
"null"
|
|
9350
|
+
]
|
|
9351
|
+
},
|
|
9352
|
+
"scriptArgs": {
|
|
9353
|
+
"type": [
|
|
9354
|
+
"object",
|
|
9355
|
+
"null"
|
|
9356
|
+
],
|
|
9357
|
+
"additionalProperties": {}
|
|
9358
|
+
}
|
|
9359
|
+
}
|
|
9360
|
+
}
|
|
9361
|
+
}
|
|
9362
|
+
}
|
|
9363
|
+
},
|
|
9364
|
+
"responses": {
|
|
9365
|
+
"200": {
|
|
9366
|
+
"description": "Schedule patched"
|
|
9367
|
+
},
|
|
9368
|
+
"400": {
|
|
9369
|
+
"description": "Validation error"
|
|
9370
|
+
},
|
|
9371
|
+
"404": {
|
|
9372
|
+
"description": "Schedule not found"
|
|
9373
|
+
},
|
|
9374
|
+
"409": {
|
|
9375
|
+
"description": "Duplicate name"
|
|
9376
|
+
}
|
|
9377
|
+
}
|
|
9378
|
+
},
|
|
9108
9379
|
"delete": {
|
|
9109
9380
|
"summary": "Delete a schedule",
|
|
9110
9381
|
"tags": [
|
|
@@ -15063,6 +15334,46 @@
|
|
|
15063
15334
|
}
|
|
15064
15335
|
],
|
|
15065
15336
|
"parameters": [
|
|
15337
|
+
{
|
|
15338
|
+
"schema": {
|
|
15339
|
+
"type": "string",
|
|
15340
|
+
"enum": [
|
|
15341
|
+
"true",
|
|
15342
|
+
"false"
|
|
15343
|
+
]
|
|
15344
|
+
},
|
|
15345
|
+
"required": false,
|
|
15346
|
+
"name": "enabled",
|
|
15347
|
+
"in": "query"
|
|
15348
|
+
},
|
|
15349
|
+
{
|
|
15350
|
+
"schema": {
|
|
15351
|
+
"type": [
|
|
15352
|
+
"integer",
|
|
15353
|
+
"null"
|
|
15354
|
+
],
|
|
15355
|
+
"minimum": 0
|
|
15356
|
+
},
|
|
15357
|
+
"required": false,
|
|
15358
|
+
"name": "consecutiveErrorsMin",
|
|
15359
|
+
"in": "query"
|
|
15360
|
+
},
|
|
15361
|
+
{
|
|
15362
|
+
"schema": {
|
|
15363
|
+
"type": "string",
|
|
15364
|
+
"enum": [
|
|
15365
|
+
"running",
|
|
15366
|
+
"waiting",
|
|
15367
|
+
"completed",
|
|
15368
|
+
"failed",
|
|
15369
|
+
"skipped",
|
|
15370
|
+
"cancelled"
|
|
15371
|
+
]
|
|
15372
|
+
},
|
|
15373
|
+
"required": false,
|
|
15374
|
+
"name": "lastRunStatus",
|
|
15375
|
+
"in": "query"
|
|
15376
|
+
},
|
|
15066
15377
|
{
|
|
15067
15378
|
"schema": {
|
|
15068
15379
|
"type": "string",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desplega.ai/agent-swarm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.0",
|
|
4
4
|
"description": "Multi-agent orchestration for Claude Code, Codex, Gemini CLI, and other AI coding assistants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "desplega.sh <contact@desplega.sh>",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"check:db-boundary": "bash scripts/check-db-boundary.sh",
|
|
69
69
|
"check:dep-graph": "depcruise src plugin/opencode-plugins --config .dependency-cruiser.cjs",
|
|
70
70
|
"check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
|
|
71
|
+
"check:rbac-coverage": "bun scripts/check-rbac-coverage.ts",
|
|
71
72
|
"check:audit-columns": "bash scripts/check-audit-columns.sh",
|
|
72
73
|
"lint:structure": "konsistent check",
|
|
73
74
|
"prepare-release": "bun scripts/prepare-release.ts",
|
|
@@ -145,8 +146,8 @@
|
|
|
145
146
|
"@inkjs/ui": "^2.0.0",
|
|
146
147
|
"@linear/sdk": "^77.0.0",
|
|
147
148
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
148
|
-
"@openai/codex-sdk": "^0.
|
|
149
|
-
"@opencode-ai/sdk": "^1.17.
|
|
149
|
+
"@openai/codex-sdk": "^0.143.0",
|
|
150
|
+
"@opencode-ai/sdk": "^1.17.15",
|
|
150
151
|
"@openfort/openfort-node": "^0.9.1",
|
|
151
152
|
"@opentelemetry/api": "^1.9.1",
|
|
152
153
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
|
package/src/be/db.ts
CHANGED
|
@@ -5740,6 +5740,8 @@ export interface ScheduledTaskFilters {
|
|
|
5740
5740
|
targetType?: "agent-task" | "workflow" | "script";
|
|
5741
5741
|
workflowId?: string;
|
|
5742
5742
|
scriptName?: string;
|
|
5743
|
+
consecutiveErrorsMin?: number;
|
|
5744
|
+
lastRunStatus?: "failed" | "succeeded";
|
|
5743
5745
|
}
|
|
5744
5746
|
|
|
5745
5747
|
/**
|
|
@@ -5797,6 +5799,17 @@ export function getScheduledTasks(
|
|
|
5797
5799
|
params.push(filters.scriptName);
|
|
5798
5800
|
}
|
|
5799
5801
|
|
|
5802
|
+
if (filters?.consecutiveErrorsMin !== undefined) {
|
|
5803
|
+
query += " AND consecutiveErrors >= ?";
|
|
5804
|
+
params.push(filters.consecutiveErrorsMin);
|
|
5805
|
+
}
|
|
5806
|
+
|
|
5807
|
+
if (filters?.lastRunStatus === "failed") {
|
|
5808
|
+
query += " AND consecutiveErrors > 0";
|
|
5809
|
+
} else if (filters?.lastRunStatus === "succeeded") {
|
|
5810
|
+
query += " AND lastRunAt IS NOT NULL AND consecutiveErrors = 0";
|
|
5811
|
+
}
|
|
5812
|
+
|
|
5800
5813
|
if (filters?.hideCompleted !== false) {
|
|
5801
5814
|
query += " AND NOT (scheduleType = 'one_time' AND enabled = 0)";
|
|
5802
5815
|
}
|
|
@@ -7211,13 +7224,19 @@ function rowToWorkflowSummary(row: WorkflowRow): WorkflowSummary {
|
|
|
7211
7224
|
};
|
|
7212
7225
|
}
|
|
7213
7226
|
|
|
7214
|
-
export
|
|
7227
|
+
export interface WorkflowFilters {
|
|
7228
|
+
enabled?: boolean;
|
|
7229
|
+
lastRunStatus?: WorkflowRunStatus;
|
|
7230
|
+
consecutiveErrorsMin?: number;
|
|
7231
|
+
}
|
|
7232
|
+
|
|
7233
|
+
export function listWorkflows(filters?: WorkflowFilters): Workflow[];
|
|
7215
7234
|
export function listWorkflows(
|
|
7216
|
-
filters:
|
|
7235
|
+
filters: WorkflowFilters | undefined,
|
|
7217
7236
|
opts: { slim: true },
|
|
7218
7237
|
): WorkflowSummary[];
|
|
7219
7238
|
export function listWorkflows(
|
|
7220
|
-
filters?:
|
|
7239
|
+
filters?: WorkflowFilters,
|
|
7221
7240
|
opts?: { slim?: boolean },
|
|
7222
7241
|
): Workflow[] | WorkflowSummary[] {
|
|
7223
7242
|
let query = "SELECT * FROM workflows WHERE 1=1";
|
|
@@ -7226,6 +7245,27 @@ export function listWorkflows(
|
|
|
7226
7245
|
query += " AND enabled = ?";
|
|
7227
7246
|
params.push(filters.enabled ? 1 : 0);
|
|
7228
7247
|
}
|
|
7248
|
+
if (filters?.lastRunStatus !== undefined) {
|
|
7249
|
+
query +=
|
|
7250
|
+
" AND (SELECT status FROM workflow_runs WHERE workflowId = workflows.id ORDER BY startedAt DESC LIMIT 1) = ?";
|
|
7251
|
+
params.push(filters.lastRunStatus);
|
|
7252
|
+
}
|
|
7253
|
+
if (filters?.consecutiveErrorsMin !== undefined) {
|
|
7254
|
+
query += ` AND (
|
|
7255
|
+
SELECT COUNT(*)
|
|
7256
|
+
FROM workflow_runs wr
|
|
7257
|
+
WHERE wr.workflowId = workflows.id
|
|
7258
|
+
AND wr.status = 'failed'
|
|
7259
|
+
AND NOT EXISTS (
|
|
7260
|
+
SELECT 1
|
|
7261
|
+
FROM workflow_runs newer_non_failed
|
|
7262
|
+
WHERE newer_non_failed.workflowId = wr.workflowId
|
|
7263
|
+
AND newer_non_failed.status != 'failed'
|
|
7264
|
+
AND newer_non_failed.startedAt > wr.startedAt
|
|
7265
|
+
)
|
|
7266
|
+
) >= ?`;
|
|
7267
|
+
params.push(filters.consecutiveErrorsMin);
|
|
7268
|
+
}
|
|
7229
7269
|
query += " ORDER BY lastUpdatedAt DESC";
|
|
7230
7270
|
const rows = getDb()
|
|
7231
7271
|
.prepare<WorkflowRow, (string | number)[]>(query)
|
|
@@ -234,7 +234,11 @@ export class SqliteMemoryStore implements MemoryStore {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
private deleteFtsRows(ids: string[]): void {
|
|
237
|
-
|
|
237
|
+
// Always re-check the CURRENT db's schema instead of trusting
|
|
238
|
+
// ftsInitialized — the flag can outlive a DB swap (tests reinit the DB
|
|
239
|
+
// process-wide), and a stale `true` would make this DELETE throw
|
|
240
|
+
// "no such table: memory_fts". Mirrors the vec guard in purgeByIds.
|
|
241
|
+
if (ids.length === 0 || !this.getFtsTableSchema()) return;
|
|
238
242
|
const db = getDb();
|
|
239
243
|
const placeholders = ids.map(() => "?").join(",");
|
|
240
244
|
db.prepare(`DELETE FROM memory_fts WHERE memory_id IN (${placeholders})`).run(...ids);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- RBAC permission-audit trail (DES-445, slice 1 / increment 2).
|
|
2
|
+
-- One row per can() authorization decision — allow AND deny — written by the
|
|
3
|
+
-- async batched writer in src/be/rbac-audit.ts. Answers "which permission was
|
|
4
|
+
-- missing, at which layer" without grepping logs. Rows are structured
|
|
5
|
+
-- ids/verbs only (no payloads); retention GC purges rows older than
|
|
6
|
+
-- RBAC_AUDIT_RETENTION_DAYS (default 30).
|
|
7
|
+
-- originatorUserId is reserved for originating-user propagation (later
|
|
8
|
+
-- increment); the slice-1 RbacCheck does not carry it yet.
|
|
9
|
+
|
|
10
|
+
CREATE TABLE IF NOT EXISTS permission_audit (
|
|
11
|
+
id TEXT PRIMARY KEY DEFAULT (lower(hex(randomblob(16)))),
|
|
12
|
+
ts TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
13
|
+
principalType TEXT NOT NULL CHECK (principalType IN ('agent','user','operator')),
|
|
14
|
+
principalId TEXT,
|
|
15
|
+
originatorUserId TEXT,
|
|
16
|
+
verb TEXT NOT NULL,
|
|
17
|
+
resourceType TEXT,
|
|
18
|
+
resourceId TEXT,
|
|
19
|
+
decision TEXT NOT NULL CHECK (decision IN ('allow','deny')),
|
|
20
|
+
reason TEXT,
|
|
21
|
+
source TEXT NOT NULL CHECK (source IN ('mcp','http'))
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
CREATE INDEX IF NOT EXISTS idx_permission_audit_ts ON permission_audit(ts);
|
|
25
|
+
CREATE INDEX IF NOT EXISTS idx_permission_audit_decision_ts ON permission_audit(decision, ts);
|
|
26
|
+
CREATE INDEX IF NOT EXISTS idx_permission_audit_principal_ts ON permission_audit(principalId, ts);
|