@desplega.ai/agent-swarm 2.5.3 → 2.6.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/README.md +2 -2
- package/dist/{acp-adapter-gr2fcyyj.js → acp-adapter-dgfakfpw.js} +9 -9
- package/dist/{actions-wv766ghf.js → actions-fbqma8aa.js} +21 -21
- package/dist/{amp-adapter-speb906t.js → amp-adapter-en0jy6hs.js} +4 -4
- package/dist/{app-ag29n14f.js → app-k8a5cgpp.js} +3 -3
- package/dist/{assistant-3x8bz3eg.js → assistant-a16433gr.js} +30 -26
- package/dist/{boot-reembed-jsmfrpzf.js → boot-reembed-6c1sjfnr.js} +1 -1
- package/dist/{boot-reembed-5b3d2eea.js → boot-reembed-f4nn561n.js} +1 -1
- package/dist/{boot-scrub-sweep-s73gerxy.js → boot-scrub-sweep-d4w9gajf.js} +4 -4
- package/dist/{boot-seeds-5zmax2wr.js → boot-seeds-9bmkspyw.js} +4 -4
- package/dist/{claude-adapter-hswdnm3t.js → claude-adapter-nys1kjxa.js} +9 -9
- package/dist/{claude-managed-adapter-cvbzj1h6.js → claude-managed-adapter-55207973.js} +3 -3
- package/dist/{claude-managed-setup-3k8m3hhc.js → claude-managed-setup-3cm35gey.js} +11 -4
- package/dist/{claude-sdk-session-fkbyk66x.js → claude-sdk-session-nw5yd8cp.js} +9313 -9260
- package/dist/{cli-210xd1f4.js → cli-03gg9pd1.js} +4 -4
- package/dist/{cli-kxpfx2xr.js → cli-0z1xjzwa.js} +2 -2
- package/dist/cli-1tem6ns9.js +894 -0
- package/dist/{cli-25j01dpj.js → cli-24j1jeeb.js} +3 -3
- package/dist/{cli-ta8bd7th.js → cli-2sjhpsns.js} +2 -2
- package/dist/{cli-p859hcc8.js → cli-39aet655.js} +2 -2
- package/dist/{cli-g1cw7xtt.js → cli-39rrw8yp.js} +1 -1
- package/dist/{cli-e2ar4bp1.js → cli-3aqd4jaa.js} +121 -47
- package/dist/{cli-jjznk3f7.js → cli-3fwqy71j.js} +69 -35
- package/dist/{cli-p9rafdrb.js → cli-3gfvmzht.js} +7 -7
- package/dist/{cli-03vpq45j.js → cli-3ndmpxxv.js} +2 -2
- package/dist/{cli-aecdcr77.js → cli-4hxrf0p4.js} +228 -74
- package/dist/{cli-mz9afxxf.js → cli-4rf0f5vg.js} +15 -3
- package/dist/{cli-qzme5949.js → cli-5rj83bam.js} +284 -202
- package/dist/{cli-fsdprwrg.js → cli-5sckpqcx.js} +2 -2
- package/dist/{cli-cz5nmdxt.js → cli-683y0b3a.js} +2 -2
- package/dist/{cli-3ngdk5te.js → cli-6y51ryva.js} +2 -2
- package/dist/{cli-n4c8e3s5.js → cli-708wdy32.js} +1 -1
- package/dist/{cli-pasyvjmm.js → cli-737pyqxr.js} +1 -1
- package/dist/{cli-gx4rm0qx.js → cli-7enjwya9.js} +1 -1
- package/dist/{cli-6x9ma5w5.js → cli-803188pb.js} +1 -1
- package/dist/{cli-avdvgcay.js → cli-9abdgn5t.js} +28 -9
- package/dist/{cli-99xgw26r.js → cli-a2rr0fmg.js} +1 -1
- package/dist/{cli-e5bxnjps.js → cli-a34pr3w1.js} +7 -7
- package/dist/{cli-502eqv93.js → cli-abkm71vr.js} +1 -1
- package/dist/{cli-mmhj8vd7.js → cli-ag2yrnt5.js} +11 -2
- package/dist/{cli-n45mr7zh.js → cli-aj8djyqt.js} +5 -5
- package/dist/{cli-1fc85mvt.js → cli-art7c1zh.js} +5 -5
- package/dist/{cli-40jsnrjm.js → cli-az25fn5f.js} +10 -8
- package/dist/{cli-9s05422w.js → cli-bqztfyve.js} +1 -1
- package/dist/{cli-bn0rewsy.js → cli-c081bj3b.js} +2 -2
- package/dist/{cli-svrj71pg.js → cli-c2habvsf.js} +12 -12
- package/dist/{cli-s49hpn37.js → cli-ca6banwz.js} +85 -19
- package/dist/{cli-hhxjnjzs.js → cli-cz37jqss.js} +12 -10
- package/dist/{cli-6n8axjv1.js → cli-d2dpf95n.js} +2 -2
- package/dist/{cli-tx00c0h6.js → cli-dqygeeh5.js} +17 -1
- package/dist/{cli-z21whrrg.js → cli-emhjcj2y.js} +17 -17
- package/dist/{cli-e8jyq7d8.js → cli-esakngh8.js} +7 -3
- package/dist/{cli-ha9rmwgq.js → cli-fb8m699c.js} +2 -2
- package/dist/{cli-35gtk1p6.js → cli-ffvsj2qw.js} +44 -13
- package/dist/{cli-ce0ak9ms.js → cli-g20jjwt4.js} +26 -26
- package/dist/{cli-kxawjrxg.js → cli-g8ka5j4j.js} +772 -194
- package/dist/{cli-vwn81jbs.js → cli-gf95q3bm.js} +5 -5
- package/dist/{cli-s53vp709.js → cli-gnsb1zxa.js} +2 -2
- package/dist/{cli-nwyw3zhg.js → cli-gxee0bqa.js} +1 -1
- package/dist/{cli-gpv60278.js → cli-hfeb68z4.js} +7 -7
- package/dist/{cli-0ebey9hg.js → cli-j6rktc91.js} +1 -1
- package/dist/{cli-ewm3pwbq.js → cli-k21gx5ht.js} +46 -23
- package/dist/{cli-egjggehm.js → cli-kf4jree9.js} +2 -2
- package/dist/{cli-dabehxhp.js → cli-kt907da6.js} +1 -1
- package/dist/{cli-p0rzjkya.js → cli-m5a9m0ak.js} +32 -13
- package/dist/{cli-fzcn3d87.js → cli-m70bajzr.js} +3 -3
- package/dist/{cli-w1zwctj2.js → cli-mtnj4fwa.js} +11 -5
- package/dist/{cli-gpsz7g88.js → cli-mvjz5an3.js} +16 -12
- package/dist/{cli-hcpj2xqz.js → cli-n7asmce6.js} +225 -3
- package/dist/{cli-y561h5a9.js → cli-nn6vx2mq.js} +5 -5
- package/dist/cli-nq677csy.js +140 -0
- package/dist/{cli-a5ebc95n.js → cli-pfk92eqz.js} +18 -15
- package/dist/{cli-p6zs9h4y.js → cli-rr7zx19j.js} +767 -249
- package/dist/{cli-qgf8emrn.js → cli-sqma6vw1.js} +10 -7
- package/dist/{cli-0xk505e8.js → cli-sxgtf5fw.js} +1 -1
- package/dist/{cli-nzfnt2gs.js → cli-tf1n0r0b.js} +1 -1
- package/dist/{cli-qqzmjxkf.js → cli-v49fkghp.js} +11 -6
- package/dist/{cli-x77gen2p.js → cli-w2656ka1.js} +7 -7
- package/dist/{cli-5kqnemen.js → cli-yvy48785.js} +1 -1
- package/dist/{cli-8s5wx3nz.js → cli-zqne1qcj.js} +44 -17
- package/dist/cli.js +22 -22
- package/dist/{codex-adapter-n8ka66vf.js → codex-adapter-d95q4qsn.js} +7 -7
- package/dist/{codex-hook-e2he7aca.js → codex-hook-brpnycn5.js} +1 -1
- package/dist/{codex-login-rn7c5gxt.js → codex-login-8cg0vhf2.js} +1 -1
- package/dist/{codex-session-runner-fsebts37.js → codex-session-runner-gdwd8h0c.js} +8 -8
- package/dist/{commands-t04rt2pc.js → commands-jqmgk54b.js} +2 -2
- package/dist/{controller-rgna04r2.js → controller-z3jq589f.js} +30 -4
- package/dist/{controllers-connect-bqm1rtft.js → controllers-connect-r2za39ef.js} +23 -23
- package/dist/{cursor-adapter-swr2k95y.js → cursor-adapter-4mr4jgkw.js} +2 -3
- package/dist/{db-a4m7haw0.js → db-ppv2tze7.js} +3 -3
- package/dist/{db-24ck09xy.js → db-w36wwb5g.js} +4 -2
- package/dist/{devin-adapter-4ycy4vrf.js → devin-adapter-byen2cxt.js} +1 -1
- package/dist/{dispatcher-nwf9ss0q.js → dispatcher-pv5h77vf.js} +20 -20
- package/dist/{docker-nfy2gc8t.js → docker-fdzyewpz.js} +4 -4
- package/dist/{dsh-adapter-kpdnhjst.js → dsh-adapter-d4pdpb3r.js} +2 -3
- package/dist/{e2b-9gkdhm3c.js → e2b-222hsajc.js} +2 -2
- package/dist/{e2b-cjtf8k1z.js → e2b-fn3zacvt.js} +2 -2
- package/dist/{easter-egg-3d-e4qv8dxj.js → easter-egg-3d-4sp4dvmc.js} +1 -1
- package/dist/{event-bus-3z78ep5n.js → event-bus-pghg8hqy.js} +1 -1
- package/dist/{execute-0xpz8950.js → execute-jev839y1.js} +1 -1
- package/dist/{external-channel-j1e2p34p.js → external-channel-y6nkzhnn.js} +2 -2
- package/dist/{grok-adapter-qtjz0whk.js → grok-adapter-t08b9ntm.js} +10 -10
- package/dist/handlers-eqsnmv95.js +41 -0
- package/dist/{heartbeat-vtesda5d.js → heartbeat-vn31xwdk.js} +23 -23
- package/dist/{hook-b2hhj6rd.js → hook-6d0zbvvt.js} +6 -5
- package/dist/{hook-8wqaszda.js → hook-cpjs8q51.js} +13 -7
- package/dist/{http-mxcqhhcs.js → http-9c6medda.js} +1085 -136
- package/dist/{index-spwxjgay.js → index-38t35h0n.js} +20 -20
- package/dist/{index-1r8wfpzs.js → index-g6k9tctj.js} +1 -1
- package/dist/{index-srg522m6.js → index-k0yt1tvq.js} +20 -20
- package/dist/{index-31ceyf42.js → index-pkma1yf8.js} +1 -1
- package/dist/{index-n1vbvta9.js → index-qhjf2htm.js} +29 -24
- package/dist/index-yqgbfgaj.js +43 -0
- package/dist/{keepalive-dsd8rtgx.js → keepalive-em0117bp.js} +4 -4
- package/dist/lead-23e7z59t.js +79 -0
- package/dist/{maintenance-jqmqwnet.js → maintenance-kbme3qy9.js} +1 -1
- package/dist/{oauth-refresh-sweep-q2c3bnvm.js → oauth-refresh-sweep-xysj4yse.js} +3 -3
- package/dist/{onboard-w4yd7s8t.js → onboard-p6q0vz97.js} +3 -3
- package/dist/{opencode-adapter-9tppvxar.js → opencode-adapter-esv3k9yn.js} +7 -7
- package/dist/{otel-impl-f36byzbd.js → otel-impl-54qhqh1z.js} +2 -2
- package/dist/{pi-mono-adapter-tqsge1ay.js → pi-mono-adapter-mymbwhj0.js} +41 -14
- package/dist/{pricing-refresh-xvak5p4v.js → pricing-refresh-yb75wv33.js} +3 -3
- package/dist/{rbac-roles-gfn30fb8.js → rbac-roles-1vp2mw4p.js} +2 -2
- package/dist/{rbac-roles-682k2mt5.js → rbac-roles-dexhc9x8.js} +1 -1
- package/dist/render-v2-tjay5hhf.js +16 -0
- package/dist/{resume-2dvq348g.js → resume-8ayf37g5.js} +11 -9
- package/dist/{runtime-bt5pkpm1.js → runtime-hqe5cqcd.js} +1 -1
- package/dist/{session-access-7f21ekq9.js → session-access-fdhp987s.js} +4 -4
- package/dist/session-source-backfill-qgtc86z1.js +110 -0
- package/dist/{setup-epffxtbk.js → setup-4rrmqcq3.js} +1 -1
- package/dist/{virtual-modules-mnfbh5mr.js → virtual-modules-52km00d6.js} +2 -2
- package/dist/{work-objects-xz1a5rqk.js → work-objects-p28fgd70.js} +23 -23
- package/dist/worker-e3w7vye1.js +79 -0
- package/dist/{x-pbpezr0s.js → x-wxrzvzx8.js} +2 -2
- package/openapi.json +1323 -16
- package/package.json +5 -5
- package/plugin/commands/create-pr.md +2 -2
- package/plugin/pi-skills/create-pr/SKILL.md +2 -2
- package/src/assets/source-key.ts +95 -0
- package/src/be/db/api-keys.ts +80 -0
- package/src/be/db/approvals.ts +48 -0
- package/src/be/db/session-labels.ts +28 -0
- package/src/be/db/session-moves.ts +5 -6
- package/src/be/db/session-tree.ts +153 -14
- package/src/be/db/tasks/read.ts +11 -0
- package/src/be/db/tasks/write.ts +21 -6
- package/src/be/db/workflow-idempotency.ts +183 -0
- package/src/be/db/workflow-runs.ts +500 -7
- package/src/be/db-retention.ts +61 -6
- package/src/be/db.ts +126 -131
- package/src/be/memory/providers/openai-embedding.ts +5 -1
- package/src/be/migrations/242_workflow_idempotency_keys.sql +40 -0
- package/src/be/migrations/244_api_key_validation.sql +4 -0
- package/src/be/onboarding.ts +4 -0
- package/src/be/scripts/typecheck.ts +1 -1
- package/src/be/sealed-json.ts +1 -0
- package/src/be/seed-scripts/catalog/compound-insights.inline.ts +2 -2
- package/src/be/seed-scripts/catalog/compound-insights.ts +2 -2
- package/src/be/seed-skills/bundled-files.generated.json +1 -1
- package/src/be/session-source-backfill.ts +163 -0
- package/src/be/sql-connections.ts +7 -1
- package/src/be/swarm-config-guard.ts +3 -0
- package/src/be/users.ts +9 -0
- package/src/comb/review-batch.ts +28 -1
- package/src/comb/templates.ts +7 -2
- package/src/commands/claude-managed-setup.ts +7 -1
- package/src/commands/controller.ts +33 -0
- package/src/commands/credential-refresh.ts +76 -1
- package/src/commands/credential-wait.ts +2 -2
- package/src/commands/provider-credentials.ts +210 -170
- package/src/commands/runner.ts +31 -6
- package/src/extensions/apply-task-create.ts +64 -11
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/contract.ts +30 -0
- package/src/extensions/dispatcher.ts +4 -0
- package/src/extensions/post-bridge.ts +8 -0
- package/src/hooks/context-bound-note.ts +196 -0
- package/src/hooks/hook.ts +12 -0
- package/src/http/all-routes.ts +2 -0
- package/src/http/api-keys.ts +53 -0
- package/src/http/assets.ts +15 -0
- package/src/http/codex-oauth-accounts.ts +191 -0
- package/src/http/comb.ts +15 -2
- package/src/http/config.ts +49 -17
- package/src/http/core.ts +6 -0
- package/src/http/fleet-benchmark.ts +5 -2
- package/src/http/idempotency-key.ts +117 -0
- package/src/http/index.ts +11 -0
- package/src/http/integrations.ts +5 -1
- package/src/http/kv.ts +8 -3
- package/src/http/onboarding.ts +6 -1
- package/src/http/pool-keys.ts +354 -0
- package/src/http/sessions.ts +37 -12
- package/src/http/stats.ts +1 -0
- package/src/http/status.ts +26 -12
- package/src/http/tasks.ts +3 -0
- package/src/http/used-by.ts +7 -2
- package/src/http/workflows.ts +207 -33
- package/src/integrations/chat-sdk/inbound.ts +27 -0
- package/src/kv-reserved-namespaces.ts +19 -0
- package/src/prompts/context-bound-note.ts +48 -0
- package/src/prompts/session-templates.ts +25 -1
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +30 -8
- package/src/providers/claude-adapter.ts +34 -5
- package/src/providers/claude-managed-adapter.ts +42 -9
- package/src/providers/claude-sdk-session.ts +10 -0
- package/src/providers/claude-session-events.ts +13 -0
- package/src/providers/codex-adapter.ts +83 -11
- package/src/providers/opencode-adapter.ts +18 -0
- package/src/providers/pi-mono-adapter.ts +35 -0
- package/src/runtime-providers/docker.ts +6 -2
- package/src/scheduler/scheduler.ts +3 -2
- package/src/scripts-runtime/swarm-sdk.ts +7 -1
- package/src/scripts-runtime/types/stdlib.d.ts +1 -1
- package/src/scripts-runtime/types/swarm-extension.d.ts +52 -8
- package/src/scripts-runtime/types/swarm-sdk.d.ts +1 -1
- package/src/slack/assistant.ts +7 -0
- package/src/slack/channel-labels.ts +74 -0
- package/src/slack/handlers.ts +8 -0
- package/src/slack/inbound-files.ts +5 -2
- package/src/slack/thread-buffer.ts +4 -0
- package/src/tasks/sibling-awareness.ts +12 -3
- package/src/telemetry-context.ts +5 -6
- package/src/telemetry-identity.ts +3 -3
- package/src/tests/amp-adapter.test.ts +97 -0
- package/src/tests/api-keys-validation.test.ts +170 -0
- package/src/tests/approval-requests.test.ts +10 -7
- package/src/tests/approval-sweeps.test.ts +12 -6
- package/src/tests/base-prompt.test.ts +1 -1
- package/src/tests/claude-hook-output.test.ts +79 -1
- package/src/tests/claude-managed-adapter.test.ts +321 -0
- package/src/tests/claude-routes-e2e.test.ts +7 -2
- package/src/tests/codex-adapter.test.ts +163 -0
- package/src/tests/codex-credential-pools.test.ts +120 -0
- package/src/tests/codex-gateway-route.test.ts +165 -0
- package/src/tests/codex-oauth-accounts.test.ts +357 -0
- package/src/tests/comb-review-batch.test.ts +63 -2
- package/src/tests/config-pool-keys.test.ts +533 -0
- package/src/tests/context-bound-note.test.ts +269 -0
- package/src/tests/credential-check.test.ts +290 -2
- package/src/tests/credential-refresh.test.ts +172 -1
- package/src/tests/db-retention.test.ts +9 -3
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/db-task-write-contract.test.ts +1 -3
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/extensions-pre-task.test.ts +325 -0
- package/src/tests/fetch-resolved-env.test.ts +17 -0
- package/src/tests/fixtures/extensions/record-blocks/hooks.ts +10 -0
- package/src/tests/fixtures/extensions/record-blocks/manifest.json +7 -0
- package/src/tests/fixtures/extensions/record-task-create/hooks.ts +9 -0
- package/src/tests/fixtures/extensions/record-task-create/manifest.json +7 -0
- package/src/tests/fixtures/fake-amp.ts +22 -8
- package/src/tests/fixtures/held-template-render.ts +42 -0
- package/src/tests/fixtures/workflow-idempotency-trigger.child.ts +73 -0
- package/src/tests/fleet-benchmark.test.ts +8 -0
- package/src/tests/get-workflow-run-tool.test.ts +98 -0
- package/src/tests/integrations-http.test.ts +32 -2
- package/src/tests/internal-ai/complete-structured.test.ts +37 -1
- package/src/tests/internal-ai/credentials.test.ts +23 -0
- package/src/tests/kv-http.test.ts +32 -0
- package/src/tests/kv-tool.test.ts +25 -0
- package/src/tests/multi-runtime-registration.test.ts +12 -12
- package/src/tests/onboarding.test.ts +108 -1
- package/src/tests/openai-embedding-credentials.test.ts +35 -0
- package/src/tests/openapi-route-headers.test.ts +2 -0
- package/src/tests/opencode-adapter.test.ts +134 -0
- package/src/tests/openrouter-attribution-call-sites.test.ts +2 -2
- package/src/tests/org-website.test.ts +36 -0
- package/src/tests/pi-mono-adapter.test.ts +105 -0
- package/src/tests/prompt-template-session.test.ts +4 -3
- package/src/tests/provider-key-probes.test.ts +181 -0
- package/src/tests/rbac-e2e-helpers.test.ts +88 -1
- package/src/tests/rbac-e2e-helpers.ts +36 -11
- package/src/tests/runner-push-delivery.test.ts +25 -0
- package/src/tests/runtime-controller-liveness.test.ts +133 -0
- package/src/tests/runtime-providers-docker.test.ts +2 -0
- package/src/tests/script-connections.test.ts +5 -0
- package/src/tests/script-run-config-scope.test.ts +91 -3
- package/src/tests/script-runs-retention.test.ts +212 -0
- package/src/tests/sdk-allowlist.test.ts +39 -0
- package/src/tests/session-logs.test.ts +70 -0
- package/src/tests/session-source-backfill.test.ts +429 -0
- package/src/tests/session-source-keys.test.ts +236 -0
- package/src/tests/session-source-labels.test.ts +419 -0
- package/src/tests/sessions-detail-batch.test.ts +2 -0
- package/src/tests/sessions-move.test.ts +131 -0
- package/src/tests/sessions-tree.test.ts +336 -2
- package/src/tests/slack-inbound-files.test.ts +103 -23
- package/src/tests/status.test.ts +101 -18
- package/src/tests/tasks-workflow-run-filter.test.ts +146 -0
- package/src/tests/test-net.ts +31 -0
- package/src/tests/transcription.test.ts +8 -0
- package/src/tests/used-by-route.test.ts +11 -0
- package/src/tests/workflow-cascade-cancel.test.ts +1341 -0
- package/src/tests/workflow-foreach-supersede-retry.test.ts +488 -0
- package/src/tests/workflow-http-v2.test.ts +131 -0
- package/src/tests/workflow-idempotency.test.ts +915 -0
- package/src/tests/workflow-step-order.test.ts +92 -0
- package/src/tests/workflow-sub-workflow.test.ts +30 -0
- package/src/tools/get-tasks.ts +8 -0
- package/src/tools/kv/kv-read-auth.ts +4 -2
- package/src/tools/task-action.ts +1 -1
- package/src/tools/workflows/cancel-workflow-run.ts +1 -1
- package/src/tools/workflows/get-workflow-run.ts +14 -4
- package/src/types.ts +24 -0
- package/src/utils/company-profile.ts +51 -1
- package/src/utils/context-window.ts +8 -6
- package/src/utils/credentials.ts +5 -2
- package/src/utils/internal-ai/complete-structured.ts +5 -0
- package/src/utils/internal-ai/credentials.ts +4 -3
- package/src/utils/provider-key-probes.ts +328 -0
- package/src/utils/transcription.ts +4 -1
- package/src/workflows/approval-cancel.ts +15 -13
- package/src/workflows/approval-notifications.ts +5 -1
- package/src/workflows/checkpoint.ts +6 -3
- package/src/workflows/engine.ts +30 -8
- package/src/workflows/executors/foreach.ts +2 -2
- package/src/workflows/executors/sub-workflow.ts +8 -1
- package/src/workflows/foreach-driver.ts +10 -3
- package/src/workflows/foreach-join.ts +29 -6
- package/src/workflows/recovery.ts +6 -1
- package/src/workflows/resume.ts +168 -56
- package/src/workflows/retry-poller.ts +49 -3
- package/src/workflows/task-step-routing.ts +29 -7
- package/templates/ai-toolbox.manifest.json +8 -8
- package/templates/community/open-prompt-showreel/PLAYBOOK.md +5 -6
- package/templates/community/open-prompt-showreel/lead-prompt.md +1 -1
- package/templates/community/open-prompt-showreel/skills/open-prompt-showreel/SKILL.md +4 -4
- package/templates/skills/agent-browser/SKILL.md +4 -4
- package/templates/skills/agent-browser/content.md +4 -4
- package/templates/skills/code-quality/config.json +1 -1
- package/templates/skills/code-quality/content.md +2 -2
- package/templates/skills/delegate-work/content.md +29 -25
- package/templates/skills/delegate-work/files/scripts/codex-exec.sh +5 -5
- package/templates/skills/qa/content.md +2 -2
- package/templates/skills/researching/content.md +4 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
- package/dist/cli-7421jzsw.js +0 -84
- package/dist/cli-e45e4m6b.js +0 -413
- package/dist/cli-zw88zjba.js +0 -307
- package/dist/handlers-19xr6dnz.js +0 -41
- package/dist/index-kw2mmat7.js +0 -43
- package/dist/lead-zyerk1x2.js +0 -79
- package/dist/render-v2-hgytz8nn.js +0 -12
- package/dist/worker-42t8emjt.js +0 -79
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
agentContextKey,
|
|
18
18
|
pageContextKey,
|
|
19
19
|
init_context_key,
|
|
20
|
+
sessionSourceKey,
|
|
21
|
+
init_source_key,
|
|
20
22
|
checkSlackRoutingCoherence,
|
|
21
23
|
init_slack_routing,
|
|
22
24
|
beginRequestAuthScope,
|
|
@@ -111,6 +113,11 @@ import {
|
|
|
111
113
|
cancelTask2,
|
|
112
114
|
getRecentlyCancelledTasksForAgent2,
|
|
113
115
|
updateTaskProgress2,
|
|
116
|
+
getWorkflowRunSummary,
|
|
117
|
+
getWorkflowRunStepsSlimByRunId,
|
|
118
|
+
getRunLineageBlock,
|
|
119
|
+
getWorkflowRunStatus,
|
|
120
|
+
disarmWorkflowTreeRetries,
|
|
114
121
|
getRunningSubWorkflowSteps,
|
|
115
122
|
getSettledChildRunParentSteps,
|
|
116
123
|
init_workflow_runs,
|
|
@@ -284,7 +291,6 @@ import {
|
|
|
284
291
|
getApprovalRequestById2,
|
|
285
292
|
resolveApprovalRequest2,
|
|
286
293
|
cancelApprovalRequestById2,
|
|
287
|
-
listCancelledApprovalRequestsForRun2,
|
|
288
294
|
getStuckApprovalRuns2,
|
|
289
295
|
getDueWaitStates2,
|
|
290
296
|
getStuckWaitRuns2,
|
|
@@ -337,19 +343,19 @@ import {
|
|
|
337
343
|
recordInlineScriptRun2,
|
|
338
344
|
exports_db,
|
|
339
345
|
init_db3
|
|
340
|
-
} from "./cli-
|
|
346
|
+
} from "./cli-g8ka5j4j.js";
|
|
341
347
|
import {
|
|
342
348
|
getUserGrant2,
|
|
343
349
|
init_rbac_roles
|
|
344
|
-
} from "./cli-
|
|
350
|
+
} from "./cli-a2rr0fmg.js";
|
|
345
351
|
import {
|
|
346
352
|
ensurePricingSeeded2,
|
|
347
353
|
ensureRbacSeeded2,
|
|
348
354
|
ensureModelProfilesSeeded2
|
|
349
|
-
} from "./cli-
|
|
355
|
+
} from "./cli-03gg9pd1.js";
|
|
350
356
|
import {
|
|
351
357
|
loadModelsDevCache
|
|
352
|
-
} from "./cli-
|
|
358
|
+
} from "./cli-5sckpqcx.js";
|
|
353
359
|
import {
|
|
354
360
|
buildCatalogEntries,
|
|
355
361
|
listModelCatalog,
|
|
@@ -359,12 +365,16 @@ import {
|
|
|
359
365
|
loadModelsCatalog,
|
|
360
366
|
requestModelCatalogRefresh2,
|
|
361
367
|
startPricingRefreshLoop2
|
|
362
|
-
} from "./cli-
|
|
368
|
+
} from "./cli-aj8djyqt.js";
|
|
363
369
|
import {
|
|
364
370
|
ampPinProviderError,
|
|
365
371
|
ampPinCatalogError,
|
|
366
372
|
ampModelError
|
|
367
|
-
} from "./cli-
|
|
373
|
+
} from "./cli-bqztfyve.js";
|
|
374
|
+
import {
|
|
375
|
+
workflowEventBus2,
|
|
376
|
+
init_event_bus
|
|
377
|
+
} from "./cli-kt907da6.js";
|
|
368
378
|
import {
|
|
369
379
|
notifyAutomationPreflightFailure,
|
|
370
380
|
isNeedsSetupFailure,
|
|
@@ -421,6 +431,7 @@ import {
|
|
|
421
431
|
isForeachChildOwned,
|
|
422
432
|
parkAndDriveForeach,
|
|
423
433
|
runForeachDrive,
|
|
434
|
+
resolveForeachParent,
|
|
424
435
|
stepFailureMode,
|
|
425
436
|
generateEdges,
|
|
426
437
|
resolveValidationPort,
|
|
@@ -428,7 +439,7 @@ import {
|
|
|
428
439
|
definitionNodeIds,
|
|
429
440
|
validateDefinition,
|
|
430
441
|
applyDefinitionPatch
|
|
431
|
-
} from "./cli-
|
|
442
|
+
} from "./cli-3fwqy71j.js";
|
|
432
443
|
import {
|
|
433
444
|
require_dist2,
|
|
434
445
|
publicEndpointSsrfOptions,
|
|
@@ -488,14 +499,14 @@ import {
|
|
|
488
499
|
deleteApp,
|
|
489
500
|
typecheckScript,
|
|
490
501
|
parseSkillContent
|
|
491
|
-
} from "./cli-
|
|
502
|
+
} from "./cli-3gfvmzht.js";
|
|
492
503
|
import {
|
|
493
504
|
buildAuthorizationUrl,
|
|
494
505
|
onAuthorizationRefreshed,
|
|
495
506
|
ensureAuthorizationTokenOrThrow,
|
|
496
507
|
ensureToken,
|
|
497
508
|
ensureTokenOrThrow
|
|
498
|
-
} from "./cli-
|
|
509
|
+
} from "./cli-kf4jree9.js";
|
|
499
510
|
import {
|
|
500
511
|
detachedProcessGroup,
|
|
501
512
|
registerProcessGroup,
|
|
@@ -529,18 +540,14 @@ import {
|
|
|
529
540
|
getSlackApp2,
|
|
530
541
|
startSlackApp2,
|
|
531
542
|
stopSlackApp2
|
|
532
|
-
} from "./cli-
|
|
543
|
+
} from "./cli-g20jjwt4.js";
|
|
533
544
|
import {
|
|
534
545
|
slackCode,
|
|
535
546
|
slackMissingScopeMessage,
|
|
536
547
|
withAutoJoin,
|
|
537
548
|
externalChannelToolError2,
|
|
538
549
|
getChannelBlockReason2
|
|
539
|
-
} from "./cli-
|
|
540
|
-
import {
|
|
541
|
-
workflowEventBus2,
|
|
542
|
-
init_event_bus
|
|
543
|
-
} from "./cli-dabehxhp.js";
|
|
550
|
+
} from "./cli-gnsb1zxa.js";
|
|
544
551
|
import {
|
|
545
552
|
shapeApprovalResolution,
|
|
546
553
|
SubWorkflowExecutor,
|
|
@@ -554,11 +561,12 @@ import {
|
|
|
554
561
|
retryFailedRun2,
|
|
555
562
|
cancelWorkflowRunRows2,
|
|
556
563
|
cancelWorkflowRun2,
|
|
564
|
+
postTreeApprovalCancellations2,
|
|
557
565
|
resumeWaitState2,
|
|
558
566
|
recoverResolvedWaitState2,
|
|
559
567
|
resumeFromChildRun2,
|
|
560
568
|
initWaitBusSubscriptions2
|
|
561
|
-
} from "./cli-
|
|
569
|
+
} from "./cli-3aqd4jaa.js";
|
|
562
570
|
import {
|
|
563
571
|
duplicateGuardedQueryKey,
|
|
564
572
|
parseQueryParams,
|
|
@@ -585,7 +593,7 @@ import {
|
|
|
585
593
|
isPublicRoute,
|
|
586
594
|
findRoute,
|
|
587
595
|
route
|
|
588
|
-
} from "./cli-
|
|
596
|
+
} from "./cli-art7c1zh.js";
|
|
589
597
|
import {
|
|
590
598
|
FilesError,
|
|
591
599
|
providerPath,
|
|
@@ -596,7 +604,7 @@ import {
|
|
|
596
604
|
import {
|
|
597
605
|
getRuntimePool2,
|
|
598
606
|
init_db
|
|
599
|
-
} from "./cli-
|
|
607
|
+
} from "./cli-gf95q3bm.js";
|
|
600
608
|
import {
|
|
601
609
|
getMemoryRaterNames,
|
|
602
610
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
@@ -607,7 +615,7 @@ import {
|
|
|
607
615
|
COMPOSIO_HTTP_METHODS,
|
|
608
616
|
executeComposioRequest,
|
|
609
617
|
composioArgsFromParts
|
|
610
|
-
} from "./cli-
|
|
618
|
+
} from "./cli-737pyqxr.js";
|
|
611
619
|
import {
|
|
612
620
|
require_fast_deep_equal
|
|
613
621
|
} from "./cli-bhp11egn.js";
|
|
@@ -621,7 +629,7 @@ import {
|
|
|
621
629
|
import {
|
|
622
630
|
canProvisionKind,
|
|
623
631
|
init_runtime_providers
|
|
624
|
-
} from "./cli-
|
|
632
|
+
} from "./cli-39aet655.js";
|
|
625
633
|
import {
|
|
626
634
|
findUserById,
|
|
627
635
|
findUserByExternalId,
|
|
@@ -636,7 +644,7 @@ import {
|
|
|
636
644
|
resolveSessionToken,
|
|
637
645
|
fingerprintApiKey,
|
|
638
646
|
init_users
|
|
639
|
-
} from "./cli-
|
|
647
|
+
} from "./cli-esakngh8.js";
|
|
640
648
|
import {
|
|
641
649
|
isRbacEnabled,
|
|
642
650
|
decideAdmission,
|
|
@@ -648,6 +656,7 @@ import {
|
|
|
648
656
|
} from "./cli-4rvr7zfx.js";
|
|
649
657
|
import {
|
|
650
658
|
normalizeAssetKey,
|
|
659
|
+
sessionGroupKey,
|
|
651
660
|
parseAssetKey,
|
|
652
661
|
canWriteAssetKey,
|
|
653
662
|
init_key,
|
|
@@ -705,7 +714,7 @@ import {
|
|
|
705
714
|
KvNamespaceSchema,
|
|
706
715
|
KvKeySchema,
|
|
707
716
|
init_types
|
|
708
|
-
} from "./cli-
|
|
717
|
+
} from "./cli-4rf0f5vg.js";
|
|
709
718
|
import {
|
|
710
719
|
generateDefaultClaudeMd2,
|
|
711
720
|
generateDefaultSoulMd2,
|
|
@@ -714,15 +723,19 @@ import {
|
|
|
714
723
|
taskAttachmentFetchCommand,
|
|
715
724
|
taskAttachmentDisplayUrl,
|
|
716
725
|
init_task_attachment_links
|
|
717
|
-
} from "./cli-
|
|
726
|
+
} from "./cli-hfeb68z4.js";
|
|
727
|
+
import {
|
|
728
|
+
isSteeringEnabled2,
|
|
729
|
+
init_steering_enabled
|
|
730
|
+
} from "./cli-4sydckyj.js";
|
|
718
731
|
import {
|
|
719
732
|
getSlackConfiguration,
|
|
720
733
|
init_config
|
|
721
734
|
} from "./cli-qeaq3j6t.js";
|
|
722
735
|
import {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
} from "./cli-
|
|
736
|
+
selectCredential,
|
|
737
|
+
init_credentials
|
|
738
|
+
} from "./cli-1tem6ns9.js";
|
|
726
739
|
import {
|
|
727
740
|
findInterpolationTokens,
|
|
728
741
|
interpolate,
|
|
@@ -732,7 +745,7 @@ import {
|
|
|
732
745
|
init_registry,
|
|
733
746
|
resolveTemplate,
|
|
734
747
|
init_resolver
|
|
735
|
-
} from "./cli-
|
|
748
|
+
} from "./cli-dqygeeh5.js";
|
|
736
749
|
import {
|
|
737
750
|
init_zod
|
|
738
751
|
} from "./cli-4chz1hye.js";
|
|
@@ -774,7 +787,7 @@ import {
|
|
|
774
787
|
import {
|
|
775
788
|
init_package,
|
|
776
789
|
package_default
|
|
777
|
-
} from "./cli-
|
|
790
|
+
} from "./cli-nn6vx2mq.js";
|
|
778
791
|
import {
|
|
779
792
|
realtimeBus,
|
|
780
793
|
init_bus
|
|
@@ -808,7 +821,7 @@ import {
|
|
|
808
821
|
registerVolatileSecret,
|
|
809
822
|
registerSensitiveKeyName,
|
|
810
823
|
init_secret_scrubber
|
|
811
|
-
} from "./cli-
|
|
824
|
+
} from "./cli-708wdy32.js";
|
|
812
825
|
import {
|
|
813
826
|
isAlias,
|
|
814
827
|
parseAlias,
|
|
@@ -822,7 +835,7 @@ import {
|
|
|
822
835
|
openAICompatibleProviderIds,
|
|
823
836
|
claudeCatalogModelId,
|
|
824
837
|
init_src2
|
|
825
|
-
} from "./cli-
|
|
838
|
+
} from "./cli-gxee0bqa.js";
|
|
826
839
|
import {
|
|
827
840
|
__toESM,
|
|
828
841
|
__commonJS,
|
|
@@ -20082,6 +20095,7 @@ async function poolHarnessModelError(model) {
|
|
|
20082
20095
|
// src/extensions/apply-task-create.ts
|
|
20083
20096
|
init_types();
|
|
20084
20097
|
init_secret_scrubber();
|
|
20098
|
+
init_event_bus();
|
|
20085
20099
|
|
|
20086
20100
|
// src/extensions/dispatcher.ts
|
|
20087
20101
|
init_db_client();
|
|
@@ -20247,6 +20261,8 @@ async function completeIfSettled(runId, ctx) {
|
|
|
20247
20261
|
const run = await getWorkflowRun2(runId);
|
|
20248
20262
|
if (run?.status !== "running")
|
|
20249
20263
|
return false;
|
|
20264
|
+
if (await getRunLineageBlock(runId))
|
|
20265
|
+
return false;
|
|
20250
20266
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
20251
20267
|
if (retryPendingNodeIds(steps).size > 0)
|
|
20252
20268
|
return false;
|
|
@@ -20439,6 +20455,7 @@ async function getRunIdsByStatus(status) {
|
|
|
20439
20455
|
}
|
|
20440
20456
|
// src/workflows/retry-poller.ts
|
|
20441
20457
|
init_db3();
|
|
20458
|
+
init_workflow_runs();
|
|
20442
20459
|
var pollerTimeout = null;
|
|
20443
20460
|
function startRetryPoller(registry, intervalMs = 5000) {
|
|
20444
20461
|
if (pollerTimeout !== null)
|
|
@@ -20455,6 +20472,14 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20455
20472
|
const workflow = await getWorkflow2(run.workflowId);
|
|
20456
20473
|
if (!workflow)
|
|
20457
20474
|
continue;
|
|
20475
|
+
const foreachParent = resolveForeachParent(workflow.definition, step.nodeId);
|
|
20476
|
+
if (foreachParent) {
|
|
20477
|
+
if (!await claimRetry(run.id, step.id, { requeueForeachChild: true }))
|
|
20478
|
+
continue;
|
|
20479
|
+
console.log(`[workflows] Retrying foreach item ${step.nodeId} (attempt ${step.retryCount}) for run ${step.runId}`);
|
|
20480
|
+
await runForeachDrive(run.id, foreachParent.id, registry);
|
|
20481
|
+
continue;
|
|
20482
|
+
}
|
|
20458
20483
|
const node = workflow.definition.nodes.find((n) => n.id === step.nodeId);
|
|
20459
20484
|
if (!node)
|
|
20460
20485
|
continue;
|
|
@@ -20512,7 +20537,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20512
20537
|
if (!waiting)
|
|
20513
20538
|
continue;
|
|
20514
20539
|
if (result.waitFor === "workflow.child.finished") {
|
|
20515
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
20540
|
+
const { resumeFromChildRun } = await import("./resume-8ayf37g5.js");
|
|
20516
20541
|
await resumeFromChildRun(step.id, registry);
|
|
20517
20542
|
}
|
|
20518
20543
|
} else {
|
|
@@ -20571,13 +20596,23 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20571
20596
|
}
|
|
20572
20597
|
pollerTimeout = setTimeout(poll, intervalMs);
|
|
20573
20598
|
}
|
|
20574
|
-
async function claimRetry(runId, stepId) {
|
|
20599
|
+
async function claimRetry(runId, stepId, options = {}) {
|
|
20575
20600
|
return getDbClient2().transaction(async () => {
|
|
20576
20601
|
const run = await getWorkflowRun2(runId);
|
|
20577
20602
|
if (!run || !RETRYABLE_RUN_STATUSES.has(run.status))
|
|
20578
20603
|
return false;
|
|
20604
|
+
if (await getRunLineageBlock(runId)) {
|
|
20605
|
+
await disarmWorkflowTreeRetries([runId], new Date().toISOString());
|
|
20606
|
+
return false;
|
|
20607
|
+
}
|
|
20608
|
+
if (options.requeueForeachChild && run.status === "failed") {
|
|
20609
|
+
await getDbClient2().run(`UPDATE workflow_run_steps SET nextRetryAt = NULL, finishedAt = ?
|
|
20610
|
+
WHERE id = ? AND runId = ? AND status = 'failed' AND nextRetryAt IS NOT NULL`, [new Date().toISOString(), stepId, runId]);
|
|
20611
|
+
return false;
|
|
20612
|
+
}
|
|
20613
|
+
const set = options.requeueForeachChild ? "status = 'pending', nextRetryAt = NULL, error = NULL" : "status = 'running', nextRetryAt = NULL";
|
|
20579
20614
|
const claimed = await getDbClient2().get(`UPDATE workflow_run_steps
|
|
20580
|
-
SET
|
|
20615
|
+
SET ${set}
|
|
20581
20616
|
WHERE id = ? AND runId = ? AND status = 'failed' AND nextRetryAt IS NOT NULL
|
|
20582
20617
|
RETURNING id`, [stepId, runId]);
|
|
20583
20618
|
if (!claimed)
|
|
@@ -20593,6 +20628,8 @@ async function completeRunIfSettled(runId, ctx) {
|
|
|
20593
20628
|
const run = await getWorkflowRun2(runId);
|
|
20594
20629
|
if (!run || run.status !== "running" && run.status !== "waiting")
|
|
20595
20630
|
return;
|
|
20631
|
+
if (await getRunLineageBlock(runId))
|
|
20632
|
+
return;
|
|
20596
20633
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
20597
20634
|
const live = steps.some((s) => s.status === "running" || s.status === "waiting" || s.status === "failed" && s.nextRetryAt != null);
|
|
20598
20635
|
if (live)
|
|
@@ -21183,7 +21220,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
21183
21220
|
}
|
|
21184
21221
|
}
|
|
21185
21222
|
case "slack": {
|
|
21186
|
-
const { getSlackApp } = await import("./app-
|
|
21223
|
+
const { getSlackApp } = await import("./app-k8a5cgpp.js");
|
|
21187
21224
|
const app = getSlackApp();
|
|
21188
21225
|
if (!app) {
|
|
21189
21226
|
return {
|
|
@@ -24567,7 +24604,7 @@ function setPreloadedTools(server, names) {
|
|
|
24567
24604
|
async function applyPreToolCall(name, args, requestInfo, inputSchema) {
|
|
24568
24605
|
if (requestInfo.callOrigin !== "mcp")
|
|
24569
24606
|
return { args };
|
|
24570
|
-
const dispatcher = await import("./dispatcher-
|
|
24607
|
+
const dispatcher = await import("./dispatcher-pv5h77vf.js");
|
|
24571
24608
|
const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
|
|
24572
24609
|
validateModify: async (data) => {
|
|
24573
24610
|
const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
|
|
@@ -25179,7 +25216,13 @@ function bridgeRequestFor(name, args) {
|
|
|
25179
25216
|
const id = typeof body.id === "string" ? body.id : undefined;
|
|
25180
25217
|
if (!id)
|
|
25181
25218
|
throw new Error("workflow_getRun requires string `id`");
|
|
25182
|
-
|
|
25219
|
+
if (body.fields !== undefined && body.fields !== "full" && body.fields !== "slim") {
|
|
25220
|
+
throw new Error('workflow_getRun `fields` must be "full" or "slim"');
|
|
25221
|
+
}
|
|
25222
|
+
return {
|
|
25223
|
+
method: "GET",
|
|
25224
|
+
path: appendQuery(`/api/workflow-runs/${encodeURIComponent(id)}`, { fields: body.fields })
|
|
25225
|
+
};
|
|
25183
25226
|
}
|
|
25184
25227
|
case "workflow_delete": {
|
|
25185
25228
|
const id = typeof body.id === "string" ? body.id : undefined;
|
|
@@ -25602,6 +25645,10 @@ var onTaskCreated = observed("task.created", async (data) => {
|
|
|
25602
25645
|
if (task)
|
|
25603
25646
|
await dispatchPost2("post.task.created", { task }, { skipExtensionId: extensionIdForAgent2(task.creatorAgentId) });
|
|
25604
25647
|
});
|
|
25648
|
+
var onTaskBlocked = observed("task.create_blocked", async (data) => {
|
|
25649
|
+
const { skipExtensionId, ...event } = data;
|
|
25650
|
+
await dispatchPost2("post.task.blocked", event, { skipExtensionId });
|
|
25651
|
+
});
|
|
25605
25652
|
var onTaskCompleted = observed("task.completed", async (data) => {
|
|
25606
25653
|
const task = await taskFrom(data);
|
|
25607
25654
|
if (!task)
|
|
@@ -25829,6 +25876,7 @@ function initExtensionPostBridge() {
|
|
|
25829
25876
|
return;
|
|
25830
25877
|
subscribed = true;
|
|
25831
25878
|
workflowEventBus2.on("task.created", onTaskCreated);
|
|
25879
|
+
workflowEventBus2.on("task.create_blocked", onTaskBlocked);
|
|
25832
25880
|
workflowEventBus2.on("task.completed", onTaskCompleted);
|
|
25833
25881
|
workflowEventBus2.on("task.failed", onTaskFailed);
|
|
25834
25882
|
workflowEventBus2.on("task.cancelled", onTaskCancelled);
|
|
@@ -25849,6 +25897,7 @@ function teardownExtensionPostBridge() {
|
|
|
25849
25897
|
return;
|
|
25850
25898
|
subscribed = false;
|
|
25851
25899
|
workflowEventBus2.off("task.created", onTaskCreated);
|
|
25900
|
+
workflowEventBus2.off("task.create_blocked", onTaskBlocked);
|
|
25852
25901
|
workflowEventBus2.off("task.completed", onTaskCompleted);
|
|
25853
25902
|
workflowEventBus2.off("task.failed", onTaskFailed);
|
|
25854
25903
|
workflowEventBus2.off("task.cancelled", onTaskCancelled);
|
|
@@ -26384,6 +26433,10 @@ function runContext2(event, payload) {
|
|
|
26384
26433
|
agentId = requestAgent ?? stringField(payload, "options", "agentId");
|
|
26385
26434
|
subject = `${stringField(payload, "origin") ?? "?"}: ${snippet(field(payload, "description"))}`;
|
|
26386
26435
|
break;
|
|
26436
|
+
case "post.task.blocked":
|
|
26437
|
+
agentId = stringField(payload, "requester", "agentId");
|
|
26438
|
+
subject = `${stringField(payload, "origin") ?? "?"}: ${stringField(payload, "extension", "name") ?? "?"}`;
|
|
26439
|
+
break;
|
|
26387
26440
|
case "pre.task.followUp":
|
|
26388
26441
|
agentId = stringField(payload, "workerAgentId");
|
|
26389
26442
|
subject = `task ${stringField(payload, "completedTask", "id") ?? "?"} ${stringField(payload, "status") ?? ""}`.trim();
|
|
@@ -26665,16 +26718,55 @@ var MODIFIABLE_OPTION_KEY_SET = new Set(MODIFIABLE_OPTION_KEYS);
|
|
|
26665
26718
|
function warnDroppedKey(extensionName, key) {
|
|
26666
26719
|
console.warn(scrubSecrets(`[extensions] pre.task.create ignored disallowed key "${key}" from extension "${extensionName}"`));
|
|
26667
26720
|
}
|
|
26721
|
+
function scrubFields(fields) {
|
|
26722
|
+
return Object.fromEntries(Object.entries(fields).filter(([, value]) => value !== undefined).map(([key, value]) => [key, typeof value === "string" ? scrubSecrets(value) : value]));
|
|
26723
|
+
}
|
|
26668
26724
|
async function applyPreTaskCreate(args) {
|
|
26669
26725
|
const creatingExtensionId = extensionIdForAgent2(args.requestInfo?.agentId);
|
|
26670
26726
|
const creatingExtension = creatingExtensionId ? listRegistered2().find((loaded) => loaded.record.id === creatingExtensionId) : undefined;
|
|
26671
26727
|
const origin = creatingExtension ? `extension:${creatingExtension.record.name}` : args.origin;
|
|
26728
|
+
const blocked = (reason, extension) => {
|
|
26729
|
+
const { options, requestInfo } = args;
|
|
26730
|
+
const event = {
|
|
26731
|
+
extension,
|
|
26732
|
+
reason: scrubSecrets(reason),
|
|
26733
|
+
origin,
|
|
26734
|
+
source: options.source,
|
|
26735
|
+
requester: scrubFields({
|
|
26736
|
+
userId: options.requestedByUserId,
|
|
26737
|
+
agentId: requestInfo?.agentId ?? options.creatorAgentId,
|
|
26738
|
+
slackUserId: options.slackUserId
|
|
26739
|
+
}),
|
|
26740
|
+
context: scrubFields({
|
|
26741
|
+
contextKey: options.contextKey ?? requestInfo?.contextKey,
|
|
26742
|
+
scheduleId: options.scheduleId,
|
|
26743
|
+
workflowRunId: options.workflowRunId,
|
|
26744
|
+
workflowRunStepId: options.workflowRunStepId,
|
|
26745
|
+
parentTaskId: options.parentTaskId,
|
|
26746
|
+
vcsRepo: options.vcsRepo,
|
|
26747
|
+
vcsNumber: options.vcsNumber,
|
|
26748
|
+
slackChannelId: options.slackChannelId,
|
|
26749
|
+
slackThreadTs: options.slackThreadTs
|
|
26750
|
+
}),
|
|
26751
|
+
description: scrubSecrets(args.description).slice(0, 500)
|
|
26752
|
+
};
|
|
26753
|
+
try {
|
|
26754
|
+
workflowEventBus2.emit("task.create_blocked", {
|
|
26755
|
+
...event,
|
|
26756
|
+
skipExtensionId: creatingExtensionId
|
|
26757
|
+
});
|
|
26758
|
+
} catch (error) {
|
|
26759
|
+
console.error("[extensions] task.create_blocked event not emitted:", scrubSecrets(error instanceof Error ? error.message : String(error)));
|
|
26760
|
+
}
|
|
26761
|
+
return { kind: "blocked", reason: event.reason, extension };
|
|
26762
|
+
};
|
|
26672
26763
|
let modelEditor;
|
|
26673
26764
|
const result = await dispatchPre2("pre.task.create", {
|
|
26674
26765
|
description: args.description,
|
|
26675
26766
|
options: args.options,
|
|
26676
26767
|
origin,
|
|
26677
|
-
requestInfo: args.requestInfo
|
|
26768
|
+
requestInfo: args.requestInfo,
|
|
26769
|
+
...args.slack ? { slack: args.slack } : {}
|
|
26678
26770
|
}, {
|
|
26679
26771
|
skipExtensionId: creatingExtensionId,
|
|
26680
26772
|
transformModify: ({ data, currentPayload, extension }) => {
|
|
@@ -26703,11 +26795,7 @@ async function applyPreTaskCreate(args) {
|
|
|
26703
26795
|
}
|
|
26704
26796
|
});
|
|
26705
26797
|
if (result.action === "block") {
|
|
26706
|
-
return
|
|
26707
|
-
kind: "blocked",
|
|
26708
|
-
reason: result.reason,
|
|
26709
|
-
extension: result.extension
|
|
26710
|
-
};
|
|
26798
|
+
return blocked(result.reason, result.extension);
|
|
26711
26799
|
}
|
|
26712
26800
|
if (result.action === "continue") {
|
|
26713
26801
|
return { kind: "proceed", description: args.description, options: args.options };
|
|
@@ -26721,11 +26809,7 @@ async function applyPreTaskCreate(args) {
|
|
|
26721
26809
|
agentId: options.agentId
|
|
26722
26810
|
});
|
|
26723
26811
|
if (modelError) {
|
|
26724
|
-
return {
|
|
26725
|
-
kind: "blocked",
|
|
26726
|
-
reason: `pre.task.create rewrite from extension "${modelEditor.name}" is invalid: ${modelError}`,
|
|
26727
|
-
extension: modelEditor
|
|
26728
|
-
};
|
|
26812
|
+
return blocked(`pre.task.create rewrite from extension "${modelEditor.name}" is invalid: ${modelError}`, modelEditor);
|
|
26729
26813
|
}
|
|
26730
26814
|
}
|
|
26731
26815
|
return {
|
|
@@ -26888,7 +26972,8 @@ async function prepareTaskWithSiblingAwareness(description, options, args = {})
|
|
|
26888
26972
|
description,
|
|
26889
26973
|
options,
|
|
26890
26974
|
origin: args.origin ?? "rest",
|
|
26891
|
-
allowCustomModel: args.allowCustomModel
|
|
26975
|
+
allowCustomModel: args.allowCustomModel,
|
|
26976
|
+
slack: args.slack
|
|
26892
26977
|
});
|
|
26893
26978
|
if (preCreate.kind === "blocked") {
|
|
26894
26979
|
throw new TaskCreationBlockedError(preCreate.reason, preCreate.extension);
|
|
@@ -32254,8 +32339,31 @@ function resetDiscordGatewayHealth() {
|
|
|
32254
32339
|
|
|
32255
32340
|
// src/integrations/chat-sdk/inbound.ts
|
|
32256
32341
|
init_zod();
|
|
32342
|
+
init_key();
|
|
32343
|
+
init_source_key();
|
|
32257
32344
|
init_db3();
|
|
32258
32345
|
|
|
32346
|
+
// src/be/db/session-labels.ts
|
|
32347
|
+
init_db3();
|
|
32348
|
+
var NAMESPACE = "session-labels";
|
|
32349
|
+
async function getSessionLabels(keys) {
|
|
32350
|
+
if (keys.length === 0)
|
|
32351
|
+
return {};
|
|
32352
|
+
const rows = await getDbClient2().query(`SELECT key, value FROM kv_entries
|
|
32353
|
+
WHERE namespace = ? AND key IN (${keys.map(() => "?").join(", ")})
|
|
32354
|
+
AND (expires_at IS NULL OR expires_at > ?)`, [NAMESPACE, ...keys, Date.now()]);
|
|
32355
|
+
return Object.fromEntries(rows.map((row) => [row.key, row.value]));
|
|
32356
|
+
}
|
|
32357
|
+
async function rememberSessionLabel(key, label, ttlMs) {
|
|
32358
|
+
await upsertKv2({
|
|
32359
|
+
namespace: NAMESPACE,
|
|
32360
|
+
key,
|
|
32361
|
+
value: label,
|
|
32362
|
+
valueType: "string",
|
|
32363
|
+
expiresAt: ttlMs === undefined ? null : Date.now() + ttlMs
|
|
32364
|
+
});
|
|
32365
|
+
}
|
|
32366
|
+
|
|
32259
32367
|
// src/be/unmapped-identities.ts
|
|
32260
32368
|
init_db3();
|
|
32261
32369
|
var TTL_MS = 30 * 24 * 60 * 60 * 1000;
|
|
@@ -32359,6 +32467,7 @@ function backingProviderId(attachment) {
|
|
|
32359
32467
|
}
|
|
32360
32468
|
|
|
32361
32469
|
// src/utils/transcription.ts
|
|
32470
|
+
init_credentials();
|
|
32362
32471
|
init_secret_scrubber();
|
|
32363
32472
|
var TRANSCRIPTION_TIMEOUT_MS = 60000;
|
|
32364
32473
|
var TRANSCRIPTION_API_KEY_ENV = "TRANSCRIPTION_API_KEY";
|
|
@@ -32421,7 +32530,8 @@ function resolveTranscriptionConfig() {
|
|
|
32421
32530
|
const candidates = pinned ? AUTO_DETECT_ORDER.filter((name) => name === pinned) : AUTO_DETECT_ORDER;
|
|
32422
32531
|
for (const name of candidates) {
|
|
32423
32532
|
const { keyEnv } = PROVIDERS[name];
|
|
32424
|
-
const
|
|
32533
|
+
const value = envValue(keyEnv);
|
|
32534
|
+
const apiKey = value ? selectCredential(value, undefined, keyEnv).selected : undefined;
|
|
32425
32535
|
if (apiKey)
|
|
32426
32536
|
return { provider: name, apiKey, keyEnv, source: "auto" };
|
|
32427
32537
|
}
|
|
@@ -33503,6 +33613,16 @@ async function targetFromExtension(target) {
|
|
|
33503
33613
|
}
|
|
33504
33614
|
}
|
|
33505
33615
|
}
|
|
33616
|
+
function chatSourceLabel(adapter, item) {
|
|
33617
|
+
if (adapter !== "telegram" && adapter !== "discord")
|
|
33618
|
+
return;
|
|
33619
|
+
const { facts } = item;
|
|
33620
|
+
if (facts.chatType === "dm" || item.isDirectMessage)
|
|
33621
|
+
return facts.from ? `DM · ${facts.from}` : undefined;
|
|
33622
|
+
if (adapter === "telegram" && (facts.chatType === "group" || facts.chatType === "supergroup"))
|
|
33623
|
+
return facts.title || undefined;
|
|
33624
|
+
return;
|
|
33625
|
+
}
|
|
33506
33626
|
async function flushChatThread(threadId, items, immediate) {
|
|
33507
33627
|
let __stack = [];
|
|
33508
33628
|
try {
|
|
@@ -33620,6 +33740,7 @@ ${combined}` : combined;
|
|
|
33620
33740
|
const latestActive = await getLatestActiveTaskByContextKey2(contextKey, "chat");
|
|
33621
33741
|
const dependsOn = !immediate && latestActive ? [latestActive.id] : undefined;
|
|
33622
33742
|
let created = 0;
|
|
33743
|
+
let sourceKey = null;
|
|
33623
33744
|
for (const match of target.matches) {
|
|
33624
33745
|
const options = {
|
|
33625
33746
|
agentId: match.agent?.id ?? null,
|
|
@@ -33640,6 +33761,7 @@ ${combined}` : combined;
|
|
|
33640
33761
|
};
|
|
33641
33762
|
try {
|
|
33642
33763
|
const { task, unattached } = await createChatTaskWithFiles(description, options, inbound);
|
|
33764
|
+
sourceKey ??= sessionSourceKey(task);
|
|
33643
33765
|
created++;
|
|
33644
33766
|
console.log(`[chat-sdk] ${threadId}: task ${task.id} for ${match.agent ? `agent ${match.agent.id}` : "no agent (queued)"} (${match.matchedText}, dependsOn: ${dependsOn?.join(", ") ?? "none"}${unattached.length ? `, ${unattached.length} file(s) not attached` : ""})`);
|
|
33645
33767
|
} catch (error) {
|
|
@@ -33650,6 +33772,12 @@ ${combined}` : combined;
|
|
|
33650
33772
|
}
|
|
33651
33773
|
}
|
|
33652
33774
|
}
|
|
33775
|
+
const label = chatSourceLabel(adapter, requester);
|
|
33776
|
+
if (sourceKey && label) {
|
|
33777
|
+
await rememberSessionLabel(sessionGroupKey(sourceKey), label).catch(() => {
|
|
33778
|
+
console.warn("[chat-sdk] Could not save a session source label");
|
|
33779
|
+
});
|
|
33780
|
+
}
|
|
33653
33781
|
if (created > 0) {
|
|
33654
33782
|
await rememberChatThreadRequester(threadId, requester.userId);
|
|
33655
33783
|
await subscribe(thread);
|
|
@@ -34958,7 +35086,7 @@ async function notifySlack(text) {
|
|
|
34958
35086
|
return;
|
|
34959
35087
|
}
|
|
34960
35088
|
try {
|
|
34961
|
-
const { getSlackApp } = await import("./app-
|
|
35089
|
+
const { getSlackApp } = await import("./app-k8a5cgpp.js");
|
|
34962
35090
|
const app = getSlackApp();
|
|
34963
35091
|
if (!app) {
|
|
34964
35092
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -35029,7 +35157,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
35029
35157
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
35030
35158
|
}
|
|
35031
35159
|
async function overwriteWebhookIds(next) {
|
|
35032
|
-
const { getDbClient } = await import("./db-
|
|
35160
|
+
const { getDbClient } = await import("./db-w36wwb5g.js");
|
|
35033
35161
|
await getDbClient().transaction(async (tx) => {
|
|
35034
35162
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
35035
35163
|
if (!row) {
|
|
@@ -108382,6 +108510,10 @@ var SCALAR_HTML = `<!DOCTYPE html>
|
|
|
108382
108510
|
|
|
108383
108511
|
// src/http/core.ts
|
|
108384
108512
|
var injectedEnvOriginals = new Map;
|
|
108513
|
+
function getDeploymentEnvValue(key) {
|
|
108514
|
+
const tracked = injectedEnvOriginals.get(key);
|
|
108515
|
+
return tracked && process.env[key] === tracked.injected ? tracked.original : process.env[key];
|
|
108516
|
+
}
|
|
108385
108517
|
async function loadGlobalConfigsIntoEnv(override = false) {
|
|
108386
108518
|
const globalConfigs = await getInjectableGlobalConfigs2();
|
|
108387
108519
|
const updated = [];
|
|
@@ -108424,7 +108556,7 @@ async function reloadGlobalConfigsAndIntegrations() {
|
|
|
108424
108556
|
return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
|
|
108425
108557
|
}
|
|
108426
108558
|
async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
108427
|
-
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-
|
|
108559
|
+
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-g6k9tctj.js");
|
|
108428
108560
|
const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
|
|
108429
108561
|
const updated = await loadGlobalConfigsIntoEnv(true);
|
|
108430
108562
|
await syncTelemetryEnabled("settings").catch((err) => {
|
|
@@ -108440,10 +108572,10 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
|
108440
108572
|
integrations.push("embeddings");
|
|
108441
108573
|
}
|
|
108442
108574
|
if (!wasEmbeddingsConfigured && isEmbeddingsConfigured) {
|
|
108443
|
-
import("./boot-reembed-
|
|
108575
|
+
import("./boot-reembed-f4nn561n.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
108444
108576
|
console.error("[config-reload] memory backfill failed (non-fatal):", err);
|
|
108445
108577
|
});
|
|
108446
|
-
import("./boot-reembed-
|
|
108578
|
+
import("./boot-reembed-6c1sjfnr.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
108447
108579
|
console.error("[config-reload] script backfill failed (non-fatal):", err);
|
|
108448
108580
|
});
|
|
108449
108581
|
}
|
|
@@ -113453,6 +113585,7 @@ init_db3();
|
|
|
113453
113585
|
|
|
113454
113586
|
// src/workflows/approval-cancel.ts
|
|
113455
113587
|
init_db3();
|
|
113588
|
+
init_workflow_runs();
|
|
113456
113589
|
init_rbac();
|
|
113457
113590
|
var LIVE_RUN_STATUSES = new Set(["running", "waiting"]);
|
|
113458
113591
|
async function cancelApprovalRequest(input) {
|
|
@@ -113527,19 +113660,23 @@ async function cancelApprovalRequestAndRun(id, data) {
|
|
|
113527
113660
|
if (!request)
|
|
113528
113661
|
return null;
|
|
113529
113662
|
let runCancelled = false;
|
|
113663
|
+
let treeRunIds = [];
|
|
113530
113664
|
const runId = request.workflowRunId;
|
|
113531
113665
|
if (runId) {
|
|
113532
|
-
const
|
|
113533
|
-
if (
|
|
113534
|
-
|
|
113666
|
+
const status = await getWorkflowRunStatus(runId);
|
|
113667
|
+
if (status && LIVE_RUN_STATUSES.has(status)) {
|
|
113668
|
+
const result = await cancelWorkflowRunRows2(runId, data.reason);
|
|
113669
|
+
runCancelled = result.cancelled;
|
|
113670
|
+
treeRunIds = result.runIds;
|
|
113535
113671
|
}
|
|
113536
113672
|
}
|
|
113537
113673
|
const slackReason = data.slackReason ?? data.reason;
|
|
113538
113674
|
client.afterCommit(async () => {
|
|
113539
113675
|
await postApprovalCancellationUpdates([request], slackReason);
|
|
113540
|
-
if (runCancelled
|
|
113541
|
-
|
|
113542
|
-
|
|
113676
|
+
if (runCancelled) {
|
|
113677
|
+
await postTreeApprovalCancellations2(treeRunIds, data.reason, {
|
|
113678
|
+
exceptRequestId: request.id
|
|
113679
|
+
});
|
|
113543
113680
|
}
|
|
113544
113681
|
});
|
|
113545
113682
|
return { request, runCancelled };
|
|
@@ -118111,6 +118248,7 @@ var getTasksInputSchema = object2({
|
|
|
118111
118248
|
tags: array2(string2()).optional().describe("Filter by any matching tag."),
|
|
118112
118249
|
search: string2().optional().describe("Search in task description."),
|
|
118113
118250
|
scheduleId: string2().uuid().optional().describe("Filter by schedule ID to find tasks created by a specific schedule."),
|
|
118251
|
+
workflowRunId: string2().uuid().optional().describe("Filter by workflow run ID to find the tasks of a single run."),
|
|
118114
118252
|
key: AssetKeySchema.optional().describe("Filter by exact logical namespace."),
|
|
118115
118253
|
keyPrefix: AssetKeySchema.optional().describe("Filter by namespace subtree."),
|
|
118116
118254
|
includeHeartbeat: boolean().optional().describe("Include heartbeat/system tasks in results (excluded by default)."),
|
|
@@ -118155,6 +118293,7 @@ async function getTasksHandler(ctx, {
|
|
|
118155
118293
|
tags,
|
|
118156
118294
|
search,
|
|
118157
118295
|
scheduleId,
|
|
118296
|
+
workflowRunId,
|
|
118158
118297
|
key,
|
|
118159
118298
|
keyPrefix,
|
|
118160
118299
|
includeHeartbeat,
|
|
@@ -118172,6 +118311,7 @@ async function getTasksHandler(ctx, {
|
|
|
118172
118311
|
tags,
|
|
118173
118312
|
search,
|
|
118174
118313
|
scheduleId,
|
|
118314
|
+
workflowRunId,
|
|
118175
118315
|
key,
|
|
118176
118316
|
keyPrefix,
|
|
118177
118317
|
includeHeartbeat,
|
|
@@ -118214,6 +118354,8 @@ async function getTasksHandler(ctx, {
|
|
|
118214
118354
|
filters.push(`search='${search}'`);
|
|
118215
118355
|
if (scheduleId)
|
|
118216
118356
|
filters.push(`scheduleId='${scheduleId}'`);
|
|
118357
|
+
if (workflowRunId)
|
|
118358
|
+
filters.push(`workflowRunId='${workflowRunId}'`);
|
|
118217
118359
|
if (key)
|
|
118218
118360
|
filters.push(`key='${key}'`);
|
|
118219
118361
|
if (keyPrefix)
|
|
@@ -118430,11 +118572,19 @@ var RESERVED_FAMILIES = new Map([
|
|
|
118430
118572
|
["comb", "namespace is reserved for Comb; use POST /api/comb/review-batches"],
|
|
118431
118573
|
["heartbeat-checklist", "namespace is reserved for heartbeat checklist receipts"],
|
|
118432
118574
|
["worker", "namespace is reserved for worker nudges"],
|
|
118433
|
-
["slack-external-alert", "namespace is reserved for Slack external channel alerts"]
|
|
118575
|
+
["slack-external-alert", "namespace is reserved for Slack external channel alerts"],
|
|
118576
|
+
[
|
|
118577
|
+
"session-labels",
|
|
118578
|
+
"namespace is reserved for session source labels; GET /api/session-tree returns them"
|
|
118579
|
+
]
|
|
118434
118580
|
]);
|
|
118581
|
+
var PRIVATE_FAMILIES = new Set(["session-labels"]);
|
|
118435
118582
|
function reservedNamespaceError(namespace) {
|
|
118436
118583
|
return RESERVED_FAMILIES.get(namespace.split(":", 1)[0] ?? "") ?? null;
|
|
118437
118584
|
}
|
|
118585
|
+
function privateNamespaceError(namespace) {
|
|
118586
|
+
return PRIVATE_FAMILIES.has(namespace.split(":", 1)[0] ?? "") ? reservedNamespaceError(namespace) : null;
|
|
118587
|
+
}
|
|
118438
118588
|
function reservedRoomKeyError(key) {
|
|
118439
118589
|
return key.startsWith("_room/") ? "room snapshot keys are reserved; use the room endpoints" : null;
|
|
118440
118590
|
}
|
|
@@ -118539,7 +118689,7 @@ init_types();
|
|
|
118539
118689
|
|
|
118540
118690
|
// src/tools/kv/kv-read-auth.ts
|
|
118541
118691
|
function kvReadAuthError(namespace, info) {
|
|
118542
|
-
return mcpOverflowAuthError(namespace, info.agentId);
|
|
118692
|
+
return privateNamespaceError(namespace) ?? mcpOverflowAuthError(namespace, info.agentId);
|
|
118543
118693
|
}
|
|
118544
118694
|
|
|
118545
118695
|
// src/tools/kv/kv-get.ts
|
|
@@ -133076,13 +133226,14 @@ async function downloadSlackFile(file, token, path) {
|
|
|
133076
133226
|
return `download failed (${errorText2(error)})`;
|
|
133077
133227
|
}
|
|
133078
133228
|
}
|
|
133079
|
-
async function createSlackTaskWithFiles(description, options, inbound) {
|
|
133229
|
+
async function createSlackTaskWithFiles(description, options, inbound, slack) {
|
|
133080
133230
|
noteSlackInboundSideEffect("task_created");
|
|
133231
|
+
const context = { origin: "slack", slack };
|
|
133081
133232
|
if (inbound.fetched.length === 0) {
|
|
133082
|
-
const task = await createTaskWithSiblingAwareness(description, options,
|
|
133233
|
+
const task = await createTaskWithSiblingAwareness(description, options, context);
|
|
133083
133234
|
return { task, unattached: inbound.failed };
|
|
133084
133235
|
}
|
|
133085
|
-
const task = await createTaskWithSiblingAwareness(description, { ...options, status: "draft" },
|
|
133236
|
+
const task = await createTaskWithSiblingAwareness(description, { ...options, status: "draft" }, context);
|
|
133086
133237
|
const unattached = [...inbound.failed];
|
|
133087
133238
|
const lease = setInterval(() => {
|
|
133088
133239
|
refreshDraftTaskLease2(task.id).catch((error) => console.warn(`[Slack] could not renew the draft lease of task ${task.id}: ${errorText2(error)}`));
|
|
@@ -135374,7 +135525,7 @@ async function emitBudgetRefusalSideEffects(ctx, inserted) {
|
|
|
135374
135525
|
console.warn(`[budget-refusal-notify] Failed to create follow-up task for budget refusal (task=${ctx.task.id.slice(0, 8)}): ${err}`);
|
|
135375
135526
|
}
|
|
135376
135527
|
}
|
|
135377
|
-
import("./event-bus-
|
|
135528
|
+
import("./event-bus-pghg8hqy.js").then(({ workflowEventBus }) => {
|
|
135378
135529
|
workflowEventBus.emit("task.budget_refused", {
|
|
135379
135530
|
taskId: ctx.task.id,
|
|
135380
135531
|
agentId: ctx.agentId,
|
|
@@ -135406,7 +135557,7 @@ var TaskActionSchema = _enum2([
|
|
|
135406
135557
|
var taskActionInputSchema = object2({
|
|
135407
135558
|
action: TaskActionSchema.describe("The action to perform: 'create' creates an unassigned task, 'claim' takes a task from pool, 'release' returns task to pool, 'accept' accepts offered task, 'reject' declines offered task, 'to_backlog' moves task to backlog, 'from_backlog' moves task from backlog to pool."),
|
|
135408
135559
|
task: string2().min(1).optional().describe("Task description (required for 'create')."),
|
|
135409
|
-
key: AssetKeySchema.optional().describe("Logical namespace for a created task.
|
|
135560
|
+
key: AssetKeySchema.optional().describe("Logical namespace for a created task. Default: the Slack or chat source key of the task (for example shared/slack/<channel>/thread:<ts>/), else shared/task:<id>/."),
|
|
135410
135561
|
taskType: string2().max(50).optional().describe("Task type (e.g., 'bug', 'feature')."),
|
|
135411
135562
|
tags: array2(string2()).optional().describe("Tags for filtering (e.g., ['urgent', 'frontend'])."),
|
|
135412
135563
|
priority: number2().int().min(0).max(100).optional().describe("Priority 0-100, default 50."),
|
|
@@ -136360,7 +136511,7 @@ var registerCancelWorkflowRunTool = (server) => {
|
|
|
136360
136511
|
createToolRegistrar(server)("cancel-workflow-run", {
|
|
136361
136512
|
title: "Cancel Workflow Run",
|
|
136362
136513
|
annotations: { destructiveHint: true },
|
|
136363
|
-
description: "Cancel a running or waiting workflow run. Cancels
|
|
136514
|
+
description: "Cancel a running or waiting workflow run and every child run below it. Cancels their non-terminal steps, tasks, pending approvals and queued retries in one transaction; finished child runs keep their status. Repeating the cancel on a cancelled run finishes any child runs still open.",
|
|
136364
136515
|
inputSchema: object2({
|
|
136365
136516
|
runId: string2().uuid().describe("Workflow run ID to cancel"),
|
|
136366
136517
|
reason: string2().optional().describe("Optional reason for cancellation")
|
|
@@ -136560,6 +136711,7 @@ var registerGetWorkflowTool = (server) => {
|
|
|
136560
136711
|
// src/tools/workflows/get-workflow-run.ts
|
|
136561
136712
|
init_zod();
|
|
136562
136713
|
init_db3();
|
|
136714
|
+
init_workflow_runs();
|
|
136563
136715
|
var STEP_VALUE_CAP = 400;
|
|
136564
136716
|
function stepValuePreview(value) {
|
|
136565
136717
|
if (value === undefined || value === null)
|
|
@@ -136591,19 +136743,21 @@ var registerGetWorkflowRunTool = (server) => {
|
|
|
136591
136743
|
annotations: { destructiveHint: false },
|
|
136592
136744
|
description: "Get details of a workflow run by ID, including all steps and their statuses.",
|
|
136593
136745
|
inputSchema: object2({
|
|
136594
|
-
id: string2().uuid().describe("Workflow run ID")
|
|
136746
|
+
id: string2().uuid().describe("Workflow run ID"),
|
|
136747
|
+
fields: _enum2(["full", "slim"]).optional().describe("`slim` omits run.context and each step's input (a context snapshot per step, large in runs with loops). Outputs, errors and retry fields stay. Default: full.")
|
|
136595
136748
|
}),
|
|
136596
136749
|
outputSchema: swarmToolOutputSchema({
|
|
136597
136750
|
run: unknown().optional(),
|
|
136598
136751
|
steps: array2(unknown()).optional()
|
|
136599
136752
|
})
|
|
136600
|
-
}, async ({ id }) => {
|
|
136753
|
+
}, async ({ id, fields }) => {
|
|
136601
136754
|
try {
|
|
136602
|
-
const
|
|
136755
|
+
const slim = fields === "slim";
|
|
136756
|
+
const run = slim ? await getWorkflowRunSummary(id) : await getWorkflowRun2(id, "display");
|
|
136603
136757
|
if (!run) {
|
|
136604
136758
|
return toolErr(`Workflow run not found: ${id}`, { data: { steps: [] } });
|
|
136605
136759
|
}
|
|
136606
|
-
const steps = await getWorkflowRunStepsByRunId2(id, "display");
|
|
136760
|
+
const steps = slim ? await getWorkflowRunStepsSlimByRunId(id) : await getWorkflowRunStepsByRunId2(id, "display");
|
|
136607
136761
|
return toolOk(`Run ${id} status: ${run.status}.`, {
|
|
136608
136762
|
details: renderSteps(steps),
|
|
136609
136763
|
data: { run, steps }
|
|
@@ -137472,4 +137626,4 @@ async function createServer(opts = {}) {
|
|
|
137472
137626
|
return server;
|
|
137473
137627
|
}
|
|
137474
137628
|
|
|
137475
|
-
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, resolveIdentity, renderIdentity, createAdditiveBuffer, taskModelPin, resumedTaskModelSelection, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, transcribeAudioNotes, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, isRuntimePoolWakeable, isAgentReachable, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, recoverIncompleteRuns, handleWebhookTrigger, verifyHmacSignature, WebhookError, snapshotAndUpdateWorkflow, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry2, initWorkflows2, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, hasKvViewArgs, resolveKvView, toolErr, createToolRegistrar, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, getTelemetryIngestAnchor, initApiTelemetry, syncTelemetryEnabled, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, isChatSdkEnabled, getChatSdkConfig, errorMessage, resolveAdapterApiUrl, trackBackground, TelegramBotApiError, callTelegramBotApi, isTrustedTeamsServiceUrl, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, resolveHttpRequestAuth, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, userCtx, requestPrincipal, agentFirstPrincipal, rejectGuest, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, getPageEditCounter, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, MemoryKeyError, refreshLinks, indexMemoryContent, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, inheritedModelSelection, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, workflowModelErrors, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
|
|
137629
|
+
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, resolveIdentity, renderIdentity, createAdditiveBuffer, taskModelPin, resumedTaskModelSelection, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, transcribeAudioNotes, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, isRuntimePoolWakeable, isAgentReachable, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, recoverIncompleteRuns, handleWebhookTrigger, verifyHmacSignature, WebhookError, snapshotAndUpdateWorkflow, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry2, initWorkflows2, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, hasKvViewArgs, resolveKvView, toolErr, createToolRegistrar, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, getTelemetryIngestAnchor, initApiTelemetry, syncTelemetryEnabled, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, isChatSdkEnabled, getChatSdkConfig, errorMessage, resolveAdapterApiUrl, trackBackground, TelegramBotApiError, callTelegramBotApi, isTrustedTeamsServiceUrl, getSessionLabels, rememberSessionLabel, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, resolveHttpRequestAuth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, userCtx, requestPrincipal, agentFirstPrincipal, rejectGuest, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, getPageEditCounter, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, MemoryKeyError, refreshLinks, indexMemoryContent, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, inheritedModelSelection, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, workflowModelErrors, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
|