@desplega.ai/agent-swarm 2.13.3 → 2.13.5
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/acp-adapter-tbt61zkm.js +17 -0
- package/dist/{acp-targets-k8xs4tj8.js → acp-targets-w8dbs4nr.js} +10 -10
- package/dist/{actions-pg5fxjer.js → actions-8zrcbjrx.js} +237 -27
- package/dist/{agent-fs-provision-vbk3fppw.js → agent-fs-provision-cbt2ttds.js} +4 -4
- package/dist/{amp-adapter-adbhxsz9.js → amp-adapter-8x6zp8w4.js} +3 -3
- package/dist/{anthropic-messages-88b7s3n9.js → anthropic-messages-vdd1zmha.js} +10 -10
- package/dist/{app-b267ggx1.js → app-zfa9dwjw.js} +7 -7
- package/dist/{approval-notifications-evc1a9z5.js → approval-notifications-rv92zmza.js} +8 -8
- package/dist/{assistant-wgz2ab84.js → assistant-q7s7rm1q.js} +25 -25
- package/dist/{boot-args-schema-6tpk28j4.js → boot-args-schema-g27kpzr1.js} +1 -1
- package/dist/{boot-reembed-r1zyvefv.js → boot-reembed-1mjs52nt.js} +1 -1
- package/dist/{boot-reembed-ankp369c.js → boot-reembed-m62dpdkg.js} +1 -1
- package/dist/{boot-scrub-sweep-cgb6r5bd.js → boot-scrub-sweep-ss1vcamw.js} +2 -2
- package/dist/{boot-seeds-bjceqg7b.js → boot-seeds-hwnvgbb3.js} +4 -4
- package/dist/{boxd-hr8rsxzq.js → boxd-y0szhp0g.js} +2 -2
- package/dist/{claude-adapter-knztdnff.js → claude-adapter-0rjmbhjk.js} +9 -9
- package/dist/{claude-managed-adapter-qwejzqkk.js → claude-managed-adapter-6k032agg.js} +4 -4
- package/dist/{claude-managed-setup-0vgz4d1j.js → claude-managed-setup-6czvve8q.js} +5 -5
- package/dist/{claude-sdk-session-c3g6dv0g.js → claude-sdk-session-pr0znb81.js} +12671 -11885
- package/dist/{cli-2v4xxnx2.js → cli-0h8skzss.js} +1 -1
- package/dist/{cli-7fa6yv98.js → cli-0qt3epg4.js} +7 -7
- package/dist/{cli-aytna2fm.js → cli-19d6v8er.js} +7 -7
- package/dist/{cli-8m6gqnf1.js → cli-1jq2em7b.js} +4 -4
- package/dist/{cli-fp65jdp2.js → cli-1kvcsd2f.js} +219 -155
- package/dist/{cli-8fj8yfmk.js → cli-2vp0z049.js} +1 -1
- package/dist/{cli-61p7ty8d.js → cli-2wzkvfgm.js} +3 -3
- package/dist/{cli-tjf1bh1v.js → cli-34fygf87.js} +6 -4
- package/dist/{cli-czeh7x13.js → cli-3860pmrq.js} +4 -4
- package/dist/{cli-dq30fq3q.js → cli-3vw6dd4g.js} +2 -2
- package/dist/{cli-4dyhzhpx.js → cli-4gaf3tx5.js} +1 -1
- package/dist/{cli-3mf04tkh.js → cli-4vynxtrb.js} +1 -1
- package/dist/{cli-hpxcfvdm.js → cli-55h8m1x3.js} +10 -7
- package/dist/{cli-hxj888w3.js → cli-5n9w2xzx.js} +2 -2
- package/dist/{cli-50whymxq.js → cli-5tq15aa7.js} +2 -2
- package/dist/{cli-8sayvj48.js → cli-5web09sb.js} +3 -3
- package/dist/{cli-gc715jrc.js → cli-69zzpjgh.js} +1 -1
- package/dist/{cli-vgh5adn9.js → cli-6msnpj1z.js} +8 -8
- package/dist/{cli-f8rcvf2x.js → cli-7r9tvk8v.js} +76 -3
- package/dist/{cli-fbmgpt72.js → cli-7ypg8hka.js} +3 -3
- package/dist/{cli-xc8m5cjn.js → cli-887vhew6.js} +3 -3
- package/dist/{cli-q8aq48v1.js → cli-8b4rpnwj.js} +1 -1
- package/dist/{cli-pzsedyb0.js → cli-8pd1t17c.js} +14 -14
- package/dist/{cli-je587f74.js → cli-94gx6ze9.js} +1 -1
- package/dist/{cli-h9d3sdnc.js → cli-94mxerrp.js} +1 -1
- package/dist/{cli-ef590376.js → cli-9n6g14vs.js} +3 -3
- package/dist/{cli-80d5g0fa.js → cli-abby987g.js} +3 -3
- package/dist/{cli-grk77aen.js → cli-avax5mp9.js} +2 -2
- package/dist/{cli-hd2a204w.js → cli-b42yfn17.js} +14 -14
- package/dist/{cli-gkjw33x5.js → cli-b9ygp1kz.js} +2 -2
- package/dist/{cli-bh53ppqm.js → cli-bvamr9g0.js} +4 -4
- package/dist/{cli-ka4tqjzd.js → cli-ced4azn1.js} +15 -12
- package/dist/{cli-v1v49t36.js → cli-cmbb2t8a.js} +3 -3
- package/dist/{cli-hhb8kbwd.js → cli-cp163xga.js} +31 -16
- package/dist/{cli-55fqpd9q.js → cli-ebpq3c5z.js} +8 -8
- package/dist/{cli-9gmkw6xn.js → cli-ehg90jd1.js} +128 -48
- package/dist/{cli-jg5txpm6.js → cli-emdfd8fh.js} +75 -1
- package/dist/{cli-gxqwm3k3.js → cli-evy3egte.js} +104 -10
- package/dist/{cli-a21cwm89.js → cli-ewk3sg68.js} +3 -3
- package/dist/{cli-syqcny89.js → cli-f7b9nyvk.js} +9 -9
- package/dist/{cli-268b3dgn.js → cli-f9xw9pr4.js} +5 -5
- package/dist/{cli-61fzwtjk.js → cli-ffn0a515.js} +9 -9
- package/dist/{cli-ya1cj689.js → cli-fw67mnyc.js} +1 -1
- package/dist/{cli-dqgnbnxs.js → cli-grbngev5.js} +6 -1
- package/dist/{cli-sy2ge2ye.js → cli-hd5bm1e1.js} +4 -4
- package/dist/{cli-rfejbpe1.js → cli-htb5bpz2.js} +1 -1
- package/dist/{cli-w24741sm.js → cli-j69pzrrz.js} +7 -7
- package/dist/{cli-g4dhd3pr.js → cli-jdq3jmny.js} +6 -23
- package/dist/{cli-hv3820ez.js → cli-k0nebh10.js} +1 -1
- package/dist/{cli-d2epqm0y.js → cli-kezzteka.js} +1 -1
- package/dist/{cli-h0ewec3d.js → cli-kr0jpw9c.js} +1 -1
- package/dist/{cli-t25rq8mg.js → cli-ks06cd0n.js} +40 -11
- package/dist/{cli-1gnf5c7x.js → cli-kwj3131p.js} +1 -1
- package/dist/{cli-wtffytm8.js → cli-m8f4379k.js} +3 -3
- package/dist/{cli-43dsqhcp.js → cli-n79j1vxc.js} +4 -4
- package/dist/{cli-b768ek79.js → cli-nrt048ys.js} +1 -0
- package/dist/{cli-h3drhntp.js → cli-pedm2kht.js} +2 -2
- package/dist/{cli-eds5xnsz.js → cli-phmy14hb.js} +2 -2
- package/dist/{cli-7kv5d674.js → cli-prz1p3ft.js} +5 -5
- package/dist/{cli-nbawx3s0.js → cli-q1h041y8.js} +6 -6
- package/dist/{cli-cah298e5.js → cli-q41qar56.js} +104 -119
- package/dist/{cli-kwm1bek7.js → cli-qmx8bnt4.js} +2 -2
- package/dist/{cli-1wew39p0.js → cli-qrvk9nka.js} +28 -19
- package/dist/{cli-v8rpjrnx.js → cli-r3dxpmyt.js} +1 -1
- package/dist/{cli-0j4qmc80.js → cli-ryem5cfq.js} +8 -8
- package/dist/{cli-8pnawt98.js → cli-s8dhq7rj.js} +5 -5
- package/dist/{cli-zkbz8m2q.js → cli-sejvnjvw.js} +3 -2
- package/dist/{cli-at67kvnp.js → cli-srktrbby.js} +1 -1
- package/dist/{cli-wsnradtk.js → cli-srre41gb.js} +2 -2
- package/dist/{cli-r6xnchva.js → cli-t0n9svkb.js} +7 -7
- package/dist/{cli-y0q92v4r.js → cli-t879ww0y.js} +2 -2
- package/dist/{cli-eetzmsy5.js → cli-t9pzz2eq.js} +2 -2
- package/dist/{cli-xwsm6xkr.js → cli-tgc1kgg3.js} +1 -1
- package/dist/{cli-dw43pnzp.js → cli-tt7dkwjj.js} +7 -7
- package/dist/{cli-y754psdt.js → cli-tvyt8w6n.js} +5 -5
- package/dist/cli-v09eza21.js +1907 -0
- package/dist/{cli-mgr3gatr.js → cli-vbge4rsp.js} +4 -4
- package/dist/{cli-ppf9ap9n.js → cli-vcpyttcw.js} +1 -1
- package/dist/{cli-1606qw3n.js → cli-wzecestt.js} +1100 -432
- package/dist/{cli-5basv0e7.js → cli-x2adbg4j.js} +71 -9
- package/dist/{cli-vx9acp12.js → cli-ybte1fqc.js} +1 -1
- package/dist/{cli-vdfngx2g.js → cli-ywy8yz6t.js} +2 -2
- package/dist/{cli-cpkxh68d.js → cli-z1vam71h.js} +2 -2
- package/dist/{cli-djwt4mtn.js → cli-z3x7h79n.js} +15 -9
- package/dist/cli-z40t85ms.js +27 -0
- package/dist/{cli-ea367bdn.js → cli-zbbtp02a.js} +104 -27
- package/dist/{cli-88np9va3.js → cli-zntvmqmm.js} +2 -2
- package/dist/{cli-snwz16eg.js → cli-zxa1vmx7.js} +2 -2
- package/dist/{cli-50wa8k4h.js → cli-zy9bb22b.js} +1 -2
- package/dist/{cli-e4gx499y.js → cli-zzq96q57.js} +273 -106
- package/dist/cli.js +21 -21
- package/dist/{codex-adapter-493vb8cv.js → codex-adapter-bn7eaxk5.js} +8 -8
- package/dist/{codex-hook-ej8hn6z5.js → codex-hook-nnmezjg9.js} +3 -3
- package/dist/{codex-login-ven5cz5j.js → codex-login-ktfg1cxk.js} +1 -1
- package/dist/{codex-session-runner-ps5m4z1g.js → codex-session-runner-j1e9hffc.js} +9 -9
- package/dist/{commands-shktk0b8.js → commands-amhpafrr.js} +3 -3
- package/dist/{controller-wn3vd217.js → controller-tw7g10j2.js} +4 -4
- package/dist/{controllers-connect-yft057ws.js → controllers-connect-2ssqz7f4.js} +25 -25
- package/dist/core-bwp98v4w.js +42 -0
- package/dist/{cursor-adapter-8fpm4dng.js → cursor-adapter-d6knjmwa.js} +2 -2
- package/dist/{db-0ezhdhz5.js → db-fd6xxm77.js} +3 -3
- package/dist/{db-84pz2w5c.js → db-sc59379z.js} +2 -2
- package/dist/{devin-adapter-fs90ab4v.js → devin-adapter-3bp6rape.js} +1 -1
- package/dist/{dispatcher-h2rz69f6.js → dispatcher-a2gdqz8c.js} +22 -22
- package/dist/{docker-1h33jvh9.js → docker-a59g3ebm.js} +2 -2
- package/dist/{dsh-adapter-g9yqv09y.js → dsh-adapter-43ygwqn7.js} +2 -2
- package/dist/{e2b-jnk0yeva.js → e2b-cn7cvjqy.js} +3 -3
- package/dist/{e2b-y7e5kmzf.js → e2b-qnxyfea6.js} +3 -3
- package/dist/{easter-egg-3d-m41ad78v.js → easter-egg-3d-a0pphy71.js} +1 -1
- package/dist/{embedding-space-yam9zwzj.js → embedding-space-qepzrach.js} +6 -6
- package/dist/{embeddings-g2be0y8q.js → embeddings-d7vr881x.js} +1 -1
- package/dist/{event-bus-08t2b4y2.js → event-bus-7gbsr0g4.js} +1 -1
- package/dist/{execute-hhdejgzf.js → execute-6afts2bn.js} +1 -1
- package/dist/{external-channel-kjt2yzfj.js → external-channel-881zq1x4.js} +2 -2
- package/dist/fx-adapter-cr2hq17y.js +20 -0
- package/dist/grok-adapter-ayddnbsc.js +20 -0
- package/dist/handlers-7ghs84x2.js +41 -0
- package/dist/{heartbeat-2e5jdexj.js → heartbeat-4c022m6a.js} +25 -25
- package/dist/{hook-acg9saz7.js → hook-4k84x499.js} +6 -6
- package/dist/{hook-34s8cmgn.js → hook-a7eh6zty.js} +9 -9
- package/dist/{http-ra2zr2f8.js → http-6aw5wanc.js} +456 -1864
- package/dist/{index-mbpxhc4w.js → index-126v2d0t.js} +1 -4
- package/dist/index-dtt0d634.js +44 -0
- package/dist/index-hmszyqkk.js +42 -0
- package/dist/index-j6rm1rtn.js +39 -0
- package/dist/{index-9q42cr54.js → index-rwwhsmjg.js} +1 -1
- package/dist/{index-93bw5wds.js → index-xhad0n8m.js} +1 -1
- package/dist/{index-2z1z7qx6.js → index-yq9hhhhy.js} +26 -26
- package/dist/{index-9r4j0a60.js → index-z2g9469g.js} +410 -27
- package/dist/{k8s-8326q0rq.js → k8s-36gfn847.js} +2 -2
- package/dist/{keepalive-vjnnqbkm.js → keepalive-zhbmztqw.js} +5 -5
- package/dist/lead-g2j4q39z.js +83 -0
- package/dist/{maintenance-px2g599e.js → maintenance-rsp0591h.js} +1 -1
- package/dist/{node-2wfcey7d.js → node-0as4n1ef.js} +3 -3
- package/dist/{node-zd6shky9.js → node-dhxbt01p.js} +3 -3
- package/dist/{node-z67yjre7.js → node-rxte5hc6.js} +290 -70
- package/dist/{node-hjn5n1yp.js → node-t0ct2zpw.js} +3 -5
- package/dist/{oauth-refresh-sweep-nkykf09m.js → oauth-refresh-sweep-w3cqmxq7.js} +4 -4
- package/dist/{object-webhooks-gt9xnq21.js → object-webhooks-331hay92.js} +7 -7
- package/dist/{onboard-1f134p65.js → onboard-n2w80m2n.js} +7 -7
- package/dist/{opencode-adapter-94976yab.js → opencode-adapter-z98127cz.js} +8 -8
- package/dist/{otel-impl-5d4p2fqs.js → otel-impl-xsk35tvf.js} +2 -2
- package/dist/{pending-vkk0vx6n.js → pending-2e6trkxd.js} +23 -23
- package/dist/{pi-mono-adapter-cyzdv5er.js → pi-mono-adapter-wh6yndtm.js} +13 -13
- package/dist/{pricing-refresh-jtmjwss9.js → pricing-refresh-9355dj1t.js} +2 -2
- package/dist/{rbac-roles-yd1fgpsn.js → rbac-roles-58y3m912.js} +3 -3
- package/dist/{rbac-roles-1fvmdyeb.js → rbac-roles-8eajw4s6.js} +6 -4
- package/dist/{render-v2-kb5s3vx4.js → render-v2-7gskkmd4.js} +7 -7
- package/dist/{resume-z1vs44n5.js → resume-0drnmpja.js} +10 -10
- package/dist/{runtime-gk6ct7r7.js → runtime-d2tcmqte.js} +1 -1
- package/dist/{session-access-nz6nre4d.js → session-access-0ztys6bd.js} +5 -5
- package/dist/{session-source-backfill-wb60zjkd.js → session-source-backfill-cdm5s046.js} +3 -3
- package/dist/{setup-2x8g8j4s.js → setup-pqwb9tcc.js} +1 -1
- package/dist/thread-buffer-epx3san4.js +42 -0
- package/dist/{tree-visibility-ts3z30kw.js → tree-visibility-rwz67mje.js} +2 -2
- package/dist/{user-merge-jobs-zetg26e0.js → user-merge-jobs-mxrhamwt.js} +3 -3
- package/dist/{virtual-modules-674fka8x.js → virtual-modules-71y1gsmg.js} +3 -3
- package/dist/{work-objects-w52yyjxm.js → work-objects-3k4ykt9j.js} +25 -25
- package/dist/worker-09gqn9xy.js +83 -0
- package/dist/{worker-follow-up-dyfxyjbj.js → worker-follow-up-y0h64xpr.js} +22 -22
- package/dist/{x-asbrnafg.js → x-d27jj7z7.js} +2 -2
- package/openapi.json +861 -33
- package/package.json +4 -4
- package/src/apps/sync.ts +20 -5
- package/src/azure-devops/boards-sync.ts +1 -1
- package/src/be/db/approvals.ts +2 -0
- package/src/be/db/runtime.ts +5 -0
- package/src/be/db/script-run-sources.ts +17 -0
- package/src/be/db/slack-trees.ts +12 -1
- package/src/be/db/tasks/read.ts +25 -1
- package/src/be/db/tasks/write.ts +47 -12
- package/src/be/db/users/avatar.ts +12 -0
- package/src/be/db-retention.ts +1 -1
- package/src/be/db.ts +149 -67
- package/src/be/design-system.ts +63 -0
- package/src/be/migrations/342_script_run_sources.sql +20 -0
- package/src/be/migrations/344_user_avatar.sql +4 -0
- package/src/be/migrations/345_task_status_kind.sql +6 -0
- package/src/be/migrations/runner.ts +8 -0
- package/src/be/migrations/script-run-sources.ts +51 -0
- package/src/be/primitives/object-embed.ts +2 -2
- package/src/be/primitives/objects.ts +2 -2
- package/src/be/rbac-roles.ts +2 -0
- package/src/be/runtime-pools/supervisor.ts +1 -0
- package/src/be/scripts/typecheck.ts +5 -3
- package/src/be/seed-scripts/catalog/design-system-seed.ts +158 -0
- package/src/be/seed-scripts/index.ts +9 -0
- package/src/be/swarm-config-guard.ts +25 -1
- package/src/bitbucket/handlers.ts +1 -1
- package/src/commands/credential-outcome-report.ts +96 -0
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/runner.ts +49 -3
- package/src/event-waits/github.ts +39 -6
- package/src/event-waits/index.ts +4 -2
- package/src/event-waits/types.ts +10 -3
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/github/app.ts +177 -13
- package/src/github/handlers.ts +7 -2
- package/src/github/pull-request-state.ts +100 -11
- package/src/gitlab/handlers.ts +2 -2
- package/src/heartbeat/heartbeat.ts +24 -5
- package/src/http/all-routes.ts +1 -0
- package/src/http/api-keys.ts +26 -0
- package/src/http/approval-chat-answer.ts +99 -0
- package/src/http/approval-requests.ts +280 -225
- package/src/http/asset-key-write.ts +45 -0
- package/src/http/assets.ts +4 -3
- package/src/http/design-system.ts +103 -0
- package/src/http/github-token.ts +27 -6
- package/src/http/index.ts +10 -6
- package/src/http/pages-public.ts +25 -10
- package/src/http/pages.ts +21 -10
- package/src/http/person-responder.ts +28 -0
- package/src/http/schedules.ts +6 -6
- package/src/http/sessions.ts +7 -2
- package/src/http/tasks.ts +23 -5
- package/src/http/users.ts +5 -0
- package/src/http/webhooks.ts +19 -1
- package/src/http/workflows.ts +5 -10
- package/src/integrations/chat-sdk/adapters.ts +33 -3
- package/src/integrations/chat-sdk/commands.ts +3 -1
- package/src/integrations/chat-sdk/inbound.ts +6 -18
- package/src/integrations/chat-sdk/mentions.ts +188 -0
- package/src/integrations/chat-sdk/outbound.ts +20 -3
- package/src/integrations/chat-sdk/router.ts +8 -0
- package/src/integrations/chat-sdk/telegram-thread.ts +12 -0
- package/src/jira/adf.ts +35 -9
- package/src/jira/sync.ts +1 -1
- package/src/kv-reserved-namespaces.ts +5 -0
- package/src/linear/sync.ts +5 -3
- package/src/pages/page-head.ts +11 -1
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +2 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +5 -0
- package/src/providers/claude-sdk-session.ts +5 -0
- package/src/providers/dsh-adapter.ts +48 -13
- package/src/providers/runtime-dependencies.ts +1 -1
- package/src/rbac/legacy-policy.ts +4 -0
- package/src/rbac/permissions.ts +8 -0
- package/src/scheduler/deferred-task-waits.ts +74 -13
- package/src/scheduler/index.ts +1 -0
- package/src/scheduler/scheduler.test.ts +32 -1
- package/src/scheduler/scheduler.ts +24 -1
- package/src/script-workflows/executor.ts +6 -0
- package/src/script-workflows/supervisor.ts +2 -1
- package/src/scripts-runtime/sdk-allowlist.ts +2 -0
- package/src/scripts-runtime/swarm-sdk.ts +20 -24
- package/src/scripts-runtime/types/stdlib.d.ts +12 -2
- package/src/scripts-runtime/types/swarm-extension.d.ts +19 -2
- package/src/scripts-runtime/types/swarm-sdk.d.ts +12 -2
- package/src/server.ts +2 -0
- package/src/slack/actions.ts +4 -1
- package/src/slack/approval-actions.ts +148 -0
- package/src/slack/approval-buttons.ts +28 -0
- package/src/slack/render-v2.ts +148 -7
- package/src/tests/api-drain-worker-e2e.test.ts +0 -2
- package/src/tests/approval-auto-cancellation-migration.test.ts +8 -19
- package/src/tests/approval-card-resolution.test.ts +2 -17
- package/src/tests/approval-requests-notifications.test.ts +41 -27
- package/src/tests/approval-requests.test.ts +137 -369
- package/src/tests/apps-sync-engine.test.ts +5 -3
- package/src/tests/apps-table-filters-migration.test.ts +44 -25
- package/src/tests/bitbucket-handlers.test.ts +2 -0
- package/src/tests/chat-sdk-commands.test.ts +1 -0
- package/src/tests/chat-sdk-mentions.test.ts +183 -0
- package/src/tests/claude-adapter.test.ts +35 -0
- package/src/tests/codex-adapter.test.ts +3 -92
- package/src/tests/codex-gpt6-release.test.ts +0 -9
- package/src/tests/codex-oauth-credential-info.test.ts +35 -18
- package/src/tests/codex-oauth.test.ts +0 -6
- package/src/tests/codex-pool.test.ts +5 -214
- package/src/tests/codex-rate-limit-parse.test.ts +0 -7
- package/src/tests/codex-swarm-events.test.ts +11 -54
- package/src/tests/create-page-tool.test.ts +5 -0
- package/src/tests/db-client-busy-retry.test.ts +49 -16
- package/src/tests/defer-task.test.ts +1 -0
- package/src/tests/dsh-adapter.test.ts +53 -1
- package/src/tests/e2e-shards.test.ts +9 -9
- package/src/tests/enabled-tools.test.ts +0 -2
- package/src/tests/fixtures/base-prompt-baseline.json +6 -6
- package/src/tests/fixtures/compiled-source-schema-boot.ts +24 -0
- package/src/tests/fixtures/secret-corpus.ts +43 -1
- package/src/tests/github-app-worker-auth-helper.test.ts +147 -1
- package/src/tests/gitlab-handlers.test.ts +2 -0
- package/src/tests/heartbeat-jev-gate.test.ts +9 -241
- package/src/tests/heartbeat-reroute-decision.test.ts +2 -0
- package/src/tests/heartbeat-stall-thresholds.test.ts +174 -0
- package/src/tests/heartbeat-supersede-resume.test.ts +2 -0
- package/src/tests/heartbeat.test.ts +1 -0
- package/src/tests/jira-adf.test.ts +42 -2
- package/src/tests/key-usage-selection.test.ts +302 -0
- package/src/tests/memory-e2e.test.ts +34 -103
- package/src/tests/memory-key-paths.test.ts +5 -0
- package/src/tests/memory-rater-llm.test.ts +33 -149
- package/src/tests/memory-store.test.ts +24 -125
- package/src/tests/memory.test.ts +31 -100
- package/src/tests/merge-gate-detect-changes.test.ts +314 -16
- package/src/tests/migration-342-script-run-sources.test.ts +196 -0
- package/src/tests/migration-bunfs-compat.test.ts +129 -9
- package/src/tests/otel-service-name.test.ts +0 -9
- package/src/tests/otel-session-cost-metrics.test.ts +1 -38
- package/src/tests/pool-session-logs.test.ts +8 -42
- package/src/tests/pre-push-affected-tests.test.ts +106 -0
- package/src/tests/prompt-template-session.test.ts +3 -0
- package/src/tests/rbac-e2e-helpers.test.ts +10 -4
- package/src/tests/rbac-e2e-helpers.ts +13 -4
- package/src/tests/rbac-roles.test.ts +2 -0
- package/src/tests/runner-api-drain.test.ts +2 -17
- package/src/tests/runner-terminal-window-report.test.ts +132 -0
- package/src/tests/runtime-e2b-pools.test.ts +7 -1
- package/src/tests/runtime-supervisor-failures.test.ts +1 -0
- package/src/tests/sandboxed-process.test.ts +26 -21
- package/src/tests/schedule-http-triage-tools.test.ts +12 -9
- package/src/tests/schedule-target-type.test.ts +4 -1
- package/src/tests/scheduled-tasks.test.ts +14 -51
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/script-executor-conformance.test.ts +4 -48
- package/src/tests/script-executor-quickjs-pool.test.ts +9 -7
- package/src/tests/script-native-startup.test.ts +21 -25
- package/src/tests/script-runs-retention.test.ts +43 -16
- package/src/tests/script-workflows-runtime-e2e.test.ts +56 -22
- package/src/tests/scripts-http.test.ts +9 -3
- package/src/tests/sdk-allowlist.test.ts +26 -13
- package/src/tests/sdk-store-progress-skipped.test.ts +12 -5
- package/src/tests/secret-rules.test.ts +38 -2
- package/src/tests/secret-scrub-gate.test.ts +7 -0
- package/src/tests/secret-scrubber.test.ts +62 -2
- package/src/tests/seed-scripts.test.ts +2 -2
- package/src/tests/session-logs.test.ts +1 -260
- package/src/tests/slack-render-v2.test.ts +5 -148
- package/src/tests/system-one-hosts-ui-mirror.test.ts +1 -0
- package/src/tests/task-cascade-fail.test.ts +1 -0
- package/src/tests/task-supersede-resume.test.ts +1 -0
- package/src/tests/test-proc.ts +5 -2
- package/src/tests/vcs-azure-devops.test.ts +10 -0
- package/src/tests/vcs-provider.test.ts +8 -0
- package/src/tests/window-stream-reporter.test.ts +122 -0
- package/src/tests/workflow-agent-task-retry.test.ts +1 -3
- package/src/tests/workflow-cascade-cancel.test.ts +1 -0
- package/src/tests/workflow-retry-v2.test.ts +34 -43
- package/src/tests/workflow-retry-validation.test.ts +8 -48
- package/src/tests/worktree-reaper.test.ts +2 -2
- package/src/themes/design-system.ts +163 -0
- package/src/themes/page-theme.ts +28 -19
- package/src/tools/cancel-task.ts +2 -2
- package/src/tools/chat-post.ts +7 -3
- package/src/tools/create-page.ts +3 -0
- package/src/tools/defer-task.ts +7 -2
- package/src/tools/design-system.ts +102 -0
- package/src/tools/get-task-details.ts +8 -4
- package/src/tools/get-tasks.ts +13 -2
- package/src/tools/manage-user.ts +9 -0
- package/src/tools/mcp-servers/mcp-server-get.ts +1 -1
- package/src/tools/mcp-servers/mcp-server-list.ts +1 -1
- package/src/tools/register-chat-channel.ts +11 -2
- package/src/tools/skills/skill-get-file.ts +1 -1
- package/src/tools/skills/skill-get.ts +1 -1
- package/src/tools/skills/skill-list.ts +1 -1
- package/src/tools/skills/skill-search.ts +1 -1
- package/src/tools/store-progress.ts +5 -3
- package/src/tools/utils.ts +49 -4
- package/src/tools/workflows/get-workflow-run.ts +1 -1
- package/src/tools/workflows/get-workflow.ts +1 -1
- package/src/tools/workflows/list-workflow-runs.ts +1 -1
- package/src/tools/workflows/list-workflows.ts +1 -1
- package/src/types.ts +158 -0
- package/src/utils/constants.ts +12 -0
- package/src/utils/credentials.ts +42 -5
- package/src/utils/error-tracker.ts +6 -0
- package/src/utils/key-usage.ts +114 -0
- package/src/utils/sandboxed-process.ts +1 -0
- package/src/utils/secret-rules.generated.ts +149 -149
- package/src/utils/secret-scrubber.ts +111 -5
- package/src/vcs/azure-devops.ts +22 -1
- package/src/vcs/index.ts +3 -1
- package/src/workflows/approval-inline.ts +122 -0
- package/src/workflows/approval-notifications.ts +7 -2
- package/src/workflows/engine.ts +6 -5
- package/src/workflows/executors/agent-task.ts +14 -0
- package/src/workflows/executors/system-one-providers.ts +23 -0
- package/src/workflows/resume.ts +5 -2
- package/templates/skills/apps/SKILL.md +2 -0
- package/templates/skills/apps/content.md +2 -0
- package/templates/skills/boards-and-sheets/content.md +4 -2
- package/templates/skills/pages/content.md +41 -8
- package/templates/skills/swarm-docs/content.md +6 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/templates/skills/workflow-iterate/content.md +1 -1
- package/dist/acp-adapter-t2q6nsqv.js +0 -17
- package/dist/cli-kh973792.js +0 -98
- package/dist/core-nheayfgm.js +0 -42
- package/dist/fx-adapter-8g7xsp8q.js +0 -20
- package/dist/grok-adapter-ztk2zkz1.js +0 -20
- package/dist/handlers-9ywssz71.js +0 -41
- package/dist/index-6mgbdtv1.js +0 -44
- package/dist/index-hqdsn2t2.js +0 -39
- package/dist/index-st231bqv.js +0 -40
- package/dist/lead-mk0xkth2.js +0 -82
- package/dist/thread-buffer-d50rqpev.js +0 -42
- package/dist/worker-662x1vse.js +0 -82
- package/src/tests/apps-table-selection-migration.test.ts +0 -95
- package/src/tests/extensions-example-heartbeat-remediate.test.ts +0 -69
- package/src/tests/extensions-example-rewrite-and-suppress.test.ts +0 -70
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ampPinCatalogError,
|
|
4
4
|
ampModelError,
|
|
5
5
|
init_amp_models
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-htb5bpz2.js";
|
|
7
7
|
import {
|
|
8
8
|
ALL_TOOLS,
|
|
9
9
|
init_tool_config
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
applyProviderQuotaReport,
|
|
15
15
|
scrubProviderQuotaReport,
|
|
16
16
|
init_provider_account_telemetry
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-fw67mnyc.js";
|
|
18
18
|
import {
|
|
19
19
|
CODEX_AUTH_FAILURE_BENCH_THRESHOLD,
|
|
20
20
|
CODEX_AUTH_FAILURE_BENCH_MS,
|
|
@@ -42,11 +42,11 @@ import {
|
|
|
42
42
|
init_identity_field_budget,
|
|
43
43
|
contentSha256,
|
|
44
44
|
init_profile_sync
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-19d6v8er.js";
|
|
46
46
|
import {
|
|
47
47
|
isSlackConfigured,
|
|
48
|
-
|
|
49
|
-
} from "./cli-
|
|
48
|
+
init_config5
|
|
49
|
+
} from "./cli-t9pzz2eq.js";
|
|
50
50
|
import {
|
|
51
51
|
isSteeringEnabled2,
|
|
52
52
|
init_steering_enabled
|
|
@@ -64,13 +64,17 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
activeModelBlock,
|
|
66
66
|
init_model_rate_limit_windows,
|
|
67
|
+
CREDENTIAL_SELECTION_STRATEGIES,
|
|
68
|
+
keyUsageFromWindows,
|
|
69
|
+
keyPaceFromWindows,
|
|
70
|
+
init_key_usage,
|
|
67
71
|
getModelAwareCredentialVars,
|
|
68
72
|
deriveProviderFromKeyType,
|
|
69
73
|
keySuffix,
|
|
70
74
|
splitCredentialPool,
|
|
71
75
|
selectCredential,
|
|
72
76
|
init_credentials2
|
|
73
|
-
} from "./cli-
|
|
77
|
+
} from "./cli-x2adbg4j.js";
|
|
74
78
|
import {
|
|
75
79
|
registerTemplate,
|
|
76
80
|
getAllTemplateDefinitions,
|
|
@@ -78,7 +82,7 @@ import {
|
|
|
78
82
|
configureDbResolver,
|
|
79
83
|
init_resolver,
|
|
80
84
|
init_session_templates
|
|
81
|
-
} from "./cli-
|
|
85
|
+
} from "./cli-nrt048ys.js";
|
|
82
86
|
import {
|
|
83
87
|
getOpenRouterAttributionHeaders,
|
|
84
88
|
init_openrouter_base_url
|
|
@@ -103,6 +107,8 @@ import {
|
|
|
103
107
|
parseModelTier,
|
|
104
108
|
TERMINAL_TASK_STATUSES,
|
|
105
109
|
isTerminalTaskStatus,
|
|
110
|
+
TaskStatusKindSchema,
|
|
111
|
+
isTaskStatusKindFor,
|
|
106
112
|
OPEN_TASK_STATUSES,
|
|
107
113
|
ProviderNameSchema,
|
|
108
114
|
ModelProfileCredentialsSchema,
|
|
@@ -114,18 +120,19 @@ import {
|
|
|
114
120
|
CreateTaskOptionsSchema,
|
|
115
121
|
SERVER_GENERATED_ATTACHMENT_CAPABILITY,
|
|
116
122
|
AgentAvatarSchema,
|
|
123
|
+
UserAvatarSchema,
|
|
117
124
|
AgentSlackIconSchema,
|
|
118
125
|
VersionableFieldSchema,
|
|
119
126
|
SessionCostModelBreakdownSchema,
|
|
120
127
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
121
128
|
PageThemeTokensSchema,
|
|
122
129
|
init_types5
|
|
123
|
-
} from "./cli-
|
|
130
|
+
} from "./cli-7r9tvk8v.js";
|
|
124
131
|
import {
|
|
125
132
|
setRuntimeModelCatalog,
|
|
126
133
|
runtimeHarnessSections,
|
|
127
134
|
init_runtime_model_catalog
|
|
128
|
-
} from "./cli-
|
|
135
|
+
} from "./cli-8b4rpnwj.js";
|
|
129
136
|
import {
|
|
130
137
|
init_zod
|
|
131
138
|
} from "./cli-96234j5w.js";
|
|
@@ -153,7 +160,7 @@ import {
|
|
|
153
160
|
import {
|
|
154
161
|
init_package,
|
|
155
162
|
package_default
|
|
156
|
-
} from "./cli-
|
|
163
|
+
} from "./cli-hd5bm1e1.js";
|
|
157
164
|
import {
|
|
158
165
|
getNodeEnv,
|
|
159
166
|
init_node_env
|
|
@@ -184,7 +191,7 @@ import {
|
|
|
184
191
|
registerVolatileSecret,
|
|
185
192
|
registerSensitiveKeyName,
|
|
186
193
|
init_secret_scrubber
|
|
187
|
-
} from "./cli-
|
|
194
|
+
} from "./cli-1kvcsd2f.js";
|
|
188
195
|
import {
|
|
189
196
|
__toCommonJS,
|
|
190
197
|
__commonJS,
|
|
@@ -1623,8 +1630,42 @@ var init_db_client = __esm(() => {
|
|
|
1623
1630
|
};
|
|
1624
1631
|
});
|
|
1625
1632
|
|
|
1626
|
-
// src/be/migrations/
|
|
1633
|
+
// src/be/migrations/script-run-sources.ts
|
|
1627
1634
|
import { createHash } from "node:crypto";
|
|
1635
|
+
function hasScriptRunSourceSchema(db) {
|
|
1636
|
+
const schema = db.prepare(`SELECT
|
|
1637
|
+
EXISTS (SELECT 1 FROM pragma_table_info('script_runs') WHERE name = 'sourceHash')
|
|
1638
|
+
AND (SELECT count(*) FROM pragma_table_info('script_run_sources')
|
|
1639
|
+
WHERE name IN ('hash', 'source')) = 2 AS ready`).get();
|
|
1640
|
+
return Boolean(schema?.ready);
|
|
1641
|
+
}
|
|
1642
|
+
function assertScriptRunSourceSchema(db) {
|
|
1643
|
+
if (!hasScriptRunSourceSchema(db)) {
|
|
1644
|
+
throw new Error("[migrations] Required script-run source schema is missing. " + "Ensure MIGRATIONS_DIR includes 342_script_run_sources.sql and run migrations before starting the API.");
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
function backfillScriptRunSources(db) {
|
|
1648
|
+
if (!hasScriptRunSourceSchema(db))
|
|
1649
|
+
return;
|
|
1650
|
+
const pending = db.prepare(`SELECT id, source FROM script_runs WHERE sourceHash IS NULL LIMIT ${BATCH_SIZE}`);
|
|
1651
|
+
const insert = db.prepare("INSERT OR IGNORE INTO script_run_sources (hash, source) VALUES (?, ?)");
|
|
1652
|
+
const update = db.prepare("UPDATE script_runs SET sourceHash = ?, source = '' WHERE id = ?");
|
|
1653
|
+
const batch = db.transaction(() => {
|
|
1654
|
+
const rows = pending.all();
|
|
1655
|
+
for (const row of rows) {
|
|
1656
|
+
const hash = createHash("sha256").update(row.source, "utf8").digest("hex");
|
|
1657
|
+
insert.run(hash, row.source);
|
|
1658
|
+
update.run(hash, row.id);
|
|
1659
|
+
}
|
|
1660
|
+
return rows.length;
|
|
1661
|
+
});
|
|
1662
|
+
while (batch.immediate() === BATCH_SIZE) {}
|
|
1663
|
+
}
|
|
1664
|
+
var BATCH_SIZE = 25;
|
|
1665
|
+
var init_script_run_sources = () => {};
|
|
1666
|
+
|
|
1667
|
+
// src/be/migrations/runner.ts
|
|
1668
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
1628
1669
|
import { readdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
1629
1670
|
import { join } from "node:path";
|
|
1630
1671
|
function repairRenumberedModelTiers(db, migrations) {
|
|
@@ -1692,6 +1733,7 @@ function runMigrations(db) {
|
|
|
1692
1733
|
const migrationsDir = resolveMigrationsDir(import.meta.dir);
|
|
1693
1734
|
if (!migrationsDir) {
|
|
1694
1735
|
assertNotEmptyDatabase(db, "no migrations directory could be located (see the preceding [migrations] warning)");
|
|
1736
|
+
backfillScriptRunSources(db);
|
|
1695
1737
|
return;
|
|
1696
1738
|
}
|
|
1697
1739
|
const files = readdirSync(migrationsDir).filter((f) => f.endsWith(".sql")).sort();
|
|
@@ -1699,11 +1741,12 @@ function runMigrations(db) {
|
|
|
1699
1741
|
const version = parseInt(file.split("_")[0] ?? "0", 10);
|
|
1700
1742
|
const name = file.replace(".sql", "");
|
|
1701
1743
|
const sql = readFileSync2(join(migrationsDir, file), "utf-8");
|
|
1702
|
-
const checksum =
|
|
1744
|
+
const checksum = createHash2("sha256").update(sql).digest("hex");
|
|
1703
1745
|
return { version, name, sql, checksum };
|
|
1704
1746
|
});
|
|
1705
1747
|
if (migrations.length === 0) {
|
|
1706
1748
|
assertNotEmptyDatabase(db, `no .sql migration files found in ${migrationsDir}`);
|
|
1749
|
+
backfillScriptRunSources(db);
|
|
1707
1750
|
return;
|
|
1708
1751
|
}
|
|
1709
1752
|
repairRenumberedModelTiers(db, migrations);
|
|
@@ -1761,9 +1804,11 @@ function runMigrations(db) {
|
|
|
1761
1804
|
console.log(`[migrations] Applied: ${migration.name} (${elapsed}ms)`);
|
|
1762
1805
|
}
|
|
1763
1806
|
db.run("PRAGMA foreign_keys = ON");
|
|
1807
|
+
backfillScriptRunSources(db);
|
|
1764
1808
|
}
|
|
1765
1809
|
var BASELINE_TABLES, SEED_APPLIED_AS_090_CHECKSUM = "8ca4a05263b42d115b419f468bf5113caa5b7ee4363177568897513549224b01", BUNFS_PREFIX = "/$bunfs/";
|
|
1766
1810
|
var init_runner = __esm(() => {
|
|
1811
|
+
init_script_run_sources();
|
|
1767
1812
|
BASELINE_TABLES = [
|
|
1768
1813
|
"agents",
|
|
1769
1814
|
"channels",
|
|
@@ -2425,6 +2470,8 @@ function initDb2(dbPath = "./agent-swarm-db.sqlite") {
|
|
|
2425
2470
|
}
|
|
2426
2471
|
function bootOpenedDb(database, dbPath, resolvePromptTemplate, autoEncryptLegacyPlaintextSecrets) {
|
|
2427
2472
|
dbCreatedThisBoot = database.prepare("SELECT 1 FROM sqlite_master LIMIT 1").get() === null;
|
|
2473
|
+
if (dbCreatedThisBoot)
|
|
2474
|
+
database.run("PRAGMA auto_vacuum = INCREMENTAL;");
|
|
2428
2475
|
database.run("PRAGMA journal_mode = WAL;");
|
|
2429
2476
|
database.run("PRAGMA busy_timeout = 5000;");
|
|
2430
2477
|
database.run("PRAGMA foreign_keys = ON;");
|
|
@@ -2435,6 +2482,7 @@ function bootOpenedDb(database, dbPath, resolvePromptTemplate, autoEncryptLegacy
|
|
|
2435
2482
|
loadSqliteVec(database);
|
|
2436
2483
|
try {
|
|
2437
2484
|
runMigrations(database);
|
|
2485
|
+
assertScriptRunSourceSchema(database);
|
|
2438
2486
|
} catch (error) {
|
|
2439
2487
|
db = null;
|
|
2440
2488
|
try {
|
|
@@ -2593,6 +2641,7 @@ var init_runtime2 = __esm(() => {
|
|
|
2593
2641
|
init_crypto();
|
|
2594
2642
|
init_db_client();
|
|
2595
2643
|
init_runner();
|
|
2644
|
+
init_script_run_sources();
|
|
2596
2645
|
init_oauth_encryption_backfill();
|
|
2597
2646
|
init_sealed_json();
|
|
2598
2647
|
VERSIONABLE_FIELDS = VersionableFieldSchema.options;
|
|
@@ -5030,7 +5079,7 @@ var init_company_profile = __esm(() => {
|
|
|
5030
5079
|
});
|
|
5031
5080
|
|
|
5032
5081
|
// src/telemetry-context.ts
|
|
5033
|
-
import { createHash as
|
|
5082
|
+
import { createHash as createHash3, randomBytes as randomBytes3 } from "node:crypto";
|
|
5034
5083
|
function mapTriggerSurface(source) {
|
|
5035
5084
|
return TRIGGER_SURFACES.includes(source ?? "") ? source : "other";
|
|
5036
5085
|
}
|
|
@@ -5055,7 +5104,7 @@ function emailDomain(email) {
|
|
|
5055
5104
|
return validOrgDomain(value.slice(at + 1));
|
|
5056
5105
|
}
|
|
5057
5106
|
function userRef(installationId, userId) {
|
|
5058
|
-
const digest =
|
|
5107
|
+
const digest = createHash3("sha256").update(`${installationId}:${userId}`).digest("hex");
|
|
5059
5108
|
return `u_${digest.slice(0, 32)}`;
|
|
5060
5109
|
}
|
|
5061
5110
|
function resolveDeployment(flags) {
|
|
@@ -5588,7 +5637,7 @@ function emitIntegrationConnected(type, providerSlug, firstOfType) {
|
|
|
5588
5637
|
var DEFAULT_TELEMETRY_ENDPOINT = "https://proxy.desplega.sh/v1/events", TELEMETRY_ENDPOINT, PRODUCT = "agent-swarm", TIMEOUT_MS = 5000, installationId = null, installedAt = null, ingestObserver = null, cachedOrgId, cachedOrgDomain, roleResolver = null, functionResolver = null, identityReloader = null, lastIdentityLoadAt = 0, source = "unknown", cachedIsCloud = false, cachedIsE2b = false, cachedHasEmbedding = false, cachedHasSlackChannel = false, cachedHasEmailChannel = false, cachedInstallMethod = "manual", cachedInstallPreset, CLOUD_HOST_EXACT, CLOUD_HOST_SUFFIXES, KNOWN_INSTALL_METHODS, KNOWN_INSTALL_PRESETS, KNOWN_INTEGRATION_TYPES, INTEGRATION_PROVIDERS, ORG_IDENTITY_RETRY_MS = 60000, ORG_IDENTITY_REFRESH_MS, cachedIsGitCheckout, telemetry;
|
|
5589
5638
|
var init_telemetry = __esm(() => {
|
|
5590
5639
|
init_package();
|
|
5591
|
-
|
|
5640
|
+
init_config5();
|
|
5592
5641
|
init_telemetry_context();
|
|
5593
5642
|
init_env_flag();
|
|
5594
5643
|
init_node_env();
|
|
@@ -5702,7 +5751,7 @@ var init_telemetry = __esm(() => {
|
|
|
5702
5751
|
// src/telemetry-identity.ts
|
|
5703
5752
|
async function loadUserRole(userId) {
|
|
5704
5753
|
try {
|
|
5705
|
-
const { getUserGrant } = await import("./rbac-roles-
|
|
5754
|
+
const { getUserGrant } = await import("./rbac-roles-58y3m912.js");
|
|
5706
5755
|
const grant = await getUserGrant(userId);
|
|
5707
5756
|
const role = grant.grantsAll ? "admin" : "member";
|
|
5708
5757
|
const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
|
|
@@ -6590,7 +6639,7 @@ function scheduleApprovalCardUpdates(approvals) {
|
|
|
6590
6639
|
const posted = approvals.filter((approval) => approval.notificationChannels?.some((n) => n.channel === "slack" && n.messageTs));
|
|
6591
6640
|
if (posted.length === 0)
|
|
6592
6641
|
return;
|
|
6593
|
-
getDbClient2().afterCommit(() => import("./approval-notifications-
|
|
6642
|
+
getDbClient2().afterCommit(() => import("./approval-notifications-rv92zmza.js").then(({ updateResolvedApprovalCards }) => updateResolvedApprovalCards(posted)).catch((err) => console.error("[HITL] Slack card update not run:", scrubSecrets(err instanceof Error ? err.message : String(err)))));
|
|
6594
6643
|
}
|
|
6595
6644
|
var init_approvals = __esm(() => {
|
|
6596
6645
|
init_secret_scrubber();
|
|
@@ -6964,6 +7013,8 @@ var init_legacy_policy = __esm(() => {
|
|
|
6964
7013
|
"comb.presence": operatorOrUser,
|
|
6965
7014
|
"fs.join.own": anyAuthenticated,
|
|
6966
7015
|
"page.delete.any": leadOrResourceOwner,
|
|
7016
|
+
"design-system.write": anyAuthenticated,
|
|
7017
|
+
"page.launch": anyAuthenticated,
|
|
6967
7018
|
"objects.read": operatorOrUser,
|
|
6968
7019
|
"objects.write": operatorOrUser,
|
|
6969
7020
|
"app.manage": anyAuthenticated,
|
|
@@ -7338,6 +7389,14 @@ var init_permissions = __esm(() => {
|
|
|
7338
7389
|
description: "Delete a page the caller does not own.",
|
|
7339
7390
|
namespace: "page"
|
|
7340
7391
|
},
|
|
7392
|
+
"design-system.write": {
|
|
7393
|
+
description: "Set or decline the org design system that restyles every page.",
|
|
7394
|
+
namespace: "page"
|
|
7395
|
+
},
|
|
7396
|
+
"page.launch": {
|
|
7397
|
+
description: "Open a public or authed page: mint its page-session cookie.",
|
|
7398
|
+
namespace: "page"
|
|
7399
|
+
},
|
|
7341
7400
|
"objects.read": {
|
|
7342
7401
|
description: "Read a board or sheet on the swarm's shared agent-fs drive through the object routes.",
|
|
7343
7402
|
namespace: "objects"
|
|
@@ -9409,6 +9468,10 @@ function taskPreview(task) {
|
|
|
9409
9468
|
const text = task instanceof Uint8Array ? taskPreviewDecoder.decode(task) : skipSiblingBlock(task ?? "");
|
|
9410
9469
|
return dependencies2.previewText(text, TASK_PREVIEW_LENGTH);
|
|
9411
9470
|
}
|
|
9471
|
+
function parseStatusKind(value) {
|
|
9472
|
+
const parsed = TaskStatusKindSchema.safeParse(value);
|
|
9473
|
+
return parsed.success ? parsed.data : undefined;
|
|
9474
|
+
}
|
|
9412
9475
|
function parseFallbackHops(value) {
|
|
9413
9476
|
if (!value)
|
|
9414
9477
|
return;
|
|
@@ -9538,6 +9601,7 @@ function rowToAgentTask(row) {
|
|
|
9538
9601
|
finishedAt: row.finishedAt ?? undefined,
|
|
9539
9602
|
notifiedAt: row.notifiedAt ?? undefined,
|
|
9540
9603
|
failureReason: row.failureReason ?? undefined,
|
|
9604
|
+
statusKind: parseStatusKind(row.statusKind),
|
|
9541
9605
|
output: row.output ?? undefined,
|
|
9542
9606
|
progress: row.progress ?? undefined,
|
|
9543
9607
|
wasPaused: !!row.was_paused,
|
|
@@ -9588,6 +9652,7 @@ function rowToAgentTaskSummary(row) {
|
|
|
9588
9652
|
createdAt: row.createdAt,
|
|
9589
9653
|
lastUpdatedAt: row.lastUpdatedAt,
|
|
9590
9654
|
finishedAt: row.finishedAt ?? undefined,
|
|
9655
|
+
statusKind: parseStatusKind(row.statusKind),
|
|
9591
9656
|
peakContextPercent: row.peakContextPercent ?? undefined,
|
|
9592
9657
|
totalCostUsd: row.totalCostUsd ?? undefined
|
|
9593
9658
|
};
|
|
@@ -9826,6 +9891,10 @@ async function getAllTasks2(filters, opts) {
|
|
|
9826
9891
|
params.push(filters.status);
|
|
9827
9892
|
}
|
|
9828
9893
|
}
|
|
9894
|
+
if (filters?.statusKind) {
|
|
9895
|
+
conditions.push("statusKind = ?");
|
|
9896
|
+
params.push(filters.statusKind);
|
|
9897
|
+
}
|
|
9829
9898
|
if (filters?.agentId) {
|
|
9830
9899
|
conditions.push("agentId = ?");
|
|
9831
9900
|
params.push(filters.agentId);
|
|
@@ -9954,6 +10023,10 @@ async function getTasksCount2(filters) {
|
|
|
9954
10023
|
params.push(filters.status);
|
|
9955
10024
|
}
|
|
9956
10025
|
}
|
|
10026
|
+
if (filters?.statusKind) {
|
|
10027
|
+
conditions.push("statusKind = ?");
|
|
10028
|
+
params.push(filters.statusKind);
|
|
10029
|
+
}
|
|
9957
10030
|
if (filters?.agentId) {
|
|
9958
10031
|
conditions.push("agentId = ?");
|
|
9959
10032
|
params.push(filters.agentId);
|
|
@@ -10551,7 +10624,7 @@ var init_read = __esm(() => {
|
|
|
10551
10624
|
agent_tasks.resolvedEffort, agent_tasks.profile, agent_tasks.resolvedProfile,
|
|
10552
10625
|
agent_tasks.provider, agent_tasks.requestedByUserId, agent_tasks.progress,
|
|
10553
10626
|
agent_tasks.createdAt, agent_tasks.lastUpdatedAt, agent_tasks.finishedAt,
|
|
10554
|
-
agent_tasks.peakContextPercent`,
|
|
10627
|
+
agent_tasks.statusKind, agent_tasks.peakContextPercent`,
|
|
10555
10628
|
timeline: `agent_tasks.id, agent_tasks.agentId, agent_tasks.parentTaskId, ${TASK_PREVIEW_SQL},
|
|
10556
10629
|
agent_tasks.title, agent_tasks.status, agent_tasks.createdAt, agent_tasks.lastUpdatedAt,
|
|
10557
10630
|
agent_tasks.finishedAt, agent_tasks.peakContextTokens`
|
|
@@ -10891,6 +10964,22 @@ var init_page_theme_tokens = __esm(() => {
|
|
|
10891
10964
|
init_types5();
|
|
10892
10965
|
});
|
|
10893
10966
|
|
|
10967
|
+
// src/be/db/script-run-sources.ts
|
|
10968
|
+
async function storeScriptRunSource(source) {
|
|
10969
|
+
const hash = computeContentHash2(source);
|
|
10970
|
+
await getDbClient2().run("INSERT OR IGNORE INTO script_run_sources (hash, source) VALUES (?, ?)", [
|
|
10971
|
+
hash,
|
|
10972
|
+
source
|
|
10973
|
+
]);
|
|
10974
|
+
return hash;
|
|
10975
|
+
}
|
|
10976
|
+
var SCRIPT_RUN_SELECT = `SELECT r.*, s.source AS storedSource FROM script_runs r
|
|
10977
|
+
LEFT JOIN script_run_sources s ON s.hash = r.sourceHash`;
|
|
10978
|
+
var init_script_run_sources2 = __esm(() => {
|
|
10979
|
+
init_context_versions();
|
|
10980
|
+
init_runtime2();
|
|
10981
|
+
});
|
|
10982
|
+
|
|
10894
10983
|
// src/be/db/session-log-reasoning.ts
|
|
10895
10984
|
async function classifyClaudeUpdate(tx, sessionId, messageId, toolLineNumber) {
|
|
10896
10985
|
const since = new Date(Date.now() - 10 * 60000).toISOString();
|
|
@@ -11706,7 +11795,7 @@ async function slackThreadHasOutcomeWork(thread, window2) {
|
|
|
11706
11795
|
SELECT 1 FROM agent_tasks task, slack_render_v2_state state
|
|
11707
11796
|
WHERE state.id = 1
|
|
11708
11797
|
AND task.slackChannelId = ? AND task.slackThreadTs = ?
|
|
11709
|
-
AND task.source = 'slack'
|
|
11798
|
+
AND (task.source = 'slack' OR ${SLACK_LEAD_FOLLOW_UP_SQL})
|
|
11710
11799
|
AND task.createdAt >= state.activated_at
|
|
11711
11800
|
AND task.status IN ('completed', 'failed', 'cancelled')
|
|
11712
11801
|
AND ${SLACK_OUTCOME_WINDOW_SQL}
|
|
@@ -11777,6 +11866,7 @@ async function getSlackProcessingThreads(delegationEnabled, treesEnabled, window
|
|
|
11777
11866
|
(task.createdAt >= state.activated_at
|
|
11778
11867
|
AND (task.source = 'slack'
|
|
11779
11868
|
OR (task.source = 'schedule' AND task.taskType = 'deferred')
|
|
11869
|
+
OR ${SLACK_LEAD_FOLLOW_UP_SQL}
|
|
11780
11870
|
OR (? = 1 AND task.parentTaskId IS NOT NULL AND task.createdAt >= state.delegation_activated_at
|
|
11781
11871
|
AND task.status IN ('completed', 'failed') AND task.slackReplySent = 0
|
|
11782
11872
|
AND COALESCE(task.taskType, '') NOT IN ('follow-up', 'reroute-decision')))
|
|
@@ -11818,7 +11908,10 @@ var SLACK_TREE_VISIBLE_SQL = `(COALESCE(state.task_tree_enabled, 1) = 1 AND (
|
|
|
11818
11908
|
AND (visible_task.status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
|
|
11819
11909
|
OR visible_task.finishedAt > state.task_tree_enabled_at)
|
|
11820
11910
|
)
|
|
11821
|
-
))`, SLACK_TREE_NEEDS_RENDER_SQL, THREAD_LOOKUP_CHUNK = 500,
|
|
11911
|
+
))`, SLACK_TREE_NEEDS_RENDER_SQL, THREAD_LOOKUP_CHUNK = 500, SLACK_LEAD_FOLLOW_UP_SQL = `(task.source = 'system'
|
|
11912
|
+
AND task.taskType IN ('follow-up', 'resume') AND task.slackReplySent = 0
|
|
11913
|
+
AND task.status IN ('completed', 'failed', 'cancelled')
|
|
11914
|
+
AND EXISTS (SELECT 1 FROM agents lead WHERE lead.id = task.agentId AND lead.isLead = 1))`, SLACK_OUTCOME_WINDOW_SQL = `(COALESCE(task.finishedAt, task.lastUpdatedAt) >= ?
|
|
11822
11915
|
OR (? = 1 AND task.source = 'slack' AND task.createdAt >= state.delegation_activated_at
|
|
11823
11916
|
AND EXISTS (SELECT 1 FROM agent_tasks recent
|
|
11824
11917
|
WHERE recent.slackChannelId = task.slackChannelId AND recent.slackThreadTs = task.slackThreadTs
|
|
@@ -12398,8 +12491,8 @@ async function completeTask2(id, output, options) {
|
|
|
12398
12491
|
const scrubbedOutput = output ? scrubSecrets(output) : output;
|
|
12399
12492
|
const row = await getDbClient2().transaction(async () => {
|
|
12400
12493
|
const finishedAt = new Date().toISOString();
|
|
12401
|
-
let completed = await getDbClient2().get(`UPDATE agent_tasks SET status = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12402
|
-
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, ["completed", finishedAt, id]);
|
|
12494
|
+
let completed = await getDbClient2().get(`UPDATE agent_tasks SET status = ?, statusKind = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12495
|
+
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, ["completed", options?.statusKind ?? null, finishedAt, id]);
|
|
12403
12496
|
if (!completed)
|
|
12404
12497
|
return null;
|
|
12405
12498
|
if (scrubbedOutput) {
|
|
@@ -12446,7 +12539,7 @@ async function completeTask2(id, output, options) {
|
|
|
12446
12539
|
});
|
|
12447
12540
|
} catch {}
|
|
12448
12541
|
getDbClient2().afterCommit(() => {
|
|
12449
|
-
import("./event-bus-
|
|
12542
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
12450
12543
|
workflowEventBus.emit("task.completed", {
|
|
12451
12544
|
taskId: id,
|
|
12452
12545
|
previousStatus: oldTask.status,
|
|
@@ -12474,9 +12567,10 @@ async function failTask2(id, reason, opts = {}) {
|
|
|
12474
12567
|
}
|
|
12475
12568
|
const finishedAt = new Date().toISOString();
|
|
12476
12569
|
const scrubbedReason = scrubSecrets(reason);
|
|
12477
|
-
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'failed', failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12570
|
+
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'failed', statusKind = ?, failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12478
12571
|
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
|
|
12479
12572
|
AND (? IS NULL OR lastUpdatedAt = ?) RETURNING *`, [
|
|
12573
|
+
opts.statusKind ?? null,
|
|
12480
12574
|
scrubbedReason,
|
|
12481
12575
|
finishedAt,
|
|
12482
12576
|
id,
|
|
@@ -12502,7 +12596,7 @@ async function failTask2(id, reason, opts = {}) {
|
|
|
12502
12596
|
});
|
|
12503
12597
|
} catch {}
|
|
12504
12598
|
getDbClient2().afterCommit(() => {
|
|
12505
|
-
import("./event-bus-
|
|
12599
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
12506
12600
|
workflowEventBus.emit("task.failed", {
|
|
12507
12601
|
taskId: id,
|
|
12508
12602
|
previousStatus: oldTask.status,
|
|
@@ -12557,8 +12651,8 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
12557
12651
|
}
|
|
12558
12652
|
const finishedAt = new Date().toISOString();
|
|
12559
12653
|
const cancelReason = scrubSecrets(reason ?? "Cancelled by user");
|
|
12560
|
-
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'cancelled', failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12561
|
-
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [cancelReason, finishedAt, id]);
|
|
12654
|
+
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'cancelled', statusKind = ?, failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12655
|
+
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [options.statusKind ?? null, cancelReason, finishedAt, id]);
|
|
12562
12656
|
if (row && oldTask) {
|
|
12563
12657
|
const recipients = new Set([row.agentId, row.offeredTo]);
|
|
12564
12658
|
getDbClient2().afterCommit(() => {
|
|
@@ -12585,7 +12679,7 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
12585
12679
|
});
|
|
12586
12680
|
} catch {}
|
|
12587
12681
|
getDbClient2().afterCommit(() => {
|
|
12588
|
-
import("./event-bus-
|
|
12682
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
12589
12683
|
workflowEventBus.emit("task.cancelled", {
|
|
12590
12684
|
taskId: id,
|
|
12591
12685
|
previousStatus: oldTask.status,
|
|
@@ -12598,7 +12692,7 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
12598
12692
|
if (row.source === "schedule" && row.taskType === "deferred" && row.parentTaskId) {
|
|
12599
12693
|
getDbClient2().afterCommit(async () => {
|
|
12600
12694
|
try {
|
|
12601
|
-
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-
|
|
12695
|
+
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-y0h64xpr.js");
|
|
12602
12696
|
await createWorkerTaskFollowUp({
|
|
12603
12697
|
task: rowToAgentTask(row),
|
|
12604
12698
|
status: "failed",
|
|
@@ -12624,7 +12718,7 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
12624
12718
|
}
|
|
12625
12719
|
return row ? rowToAgentTask(row) : null;
|
|
12626
12720
|
}
|
|
12627
|
-
async function skipTask2(id, reason) {
|
|
12721
|
+
async function skipTask2(id, reason, opts = {}) {
|
|
12628
12722
|
const oldTask = await getTaskById2(id);
|
|
12629
12723
|
if (!oldTask)
|
|
12630
12724
|
return null;
|
|
@@ -12632,8 +12726,8 @@ async function skipTask2(id, reason) {
|
|
|
12632
12726
|
return null;
|
|
12633
12727
|
const finishedAt = new Date().toISOString();
|
|
12634
12728
|
const skipReason = scrubSecrets(reason);
|
|
12635
|
-
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'skipped', failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12636
|
-
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [skipReason, finishedAt, id]);
|
|
12729
|
+
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = 'skipped', statusKind = ?, failureReason = ?, finishedAt = ?, lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12730
|
+
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped') RETURNING *`, [opts.statusKind ?? null, skipReason, finishedAt, id]);
|
|
12637
12731
|
if (!row)
|
|
12638
12732
|
return null;
|
|
12639
12733
|
try {
|
|
@@ -12647,7 +12741,7 @@ async function skipTask2(id, reason) {
|
|
|
12647
12741
|
});
|
|
12648
12742
|
} catch {}
|
|
12649
12743
|
getDbClient2().afterCommit(() => {
|
|
12650
|
-
import("./event-bus-
|
|
12744
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
12651
12745
|
workflowEventBus.emit("task.skipped", {
|
|
12652
12746
|
taskId: id,
|
|
12653
12747
|
failureReason: skipReason,
|
|
@@ -12674,11 +12768,18 @@ async function supersedeTask2(id, args) {
|
|
|
12674
12768
|
const finishedAt = new Date().toISOString();
|
|
12675
12769
|
const row = await getDbClient2().get(`UPDATE agent_tasks
|
|
12676
12770
|
SET status = 'superseded',
|
|
12771
|
+
statusKind = ?,
|
|
12677
12772
|
finishedAt = ?,
|
|
12678
12773
|
lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12679
12774
|
WHERE id = ? AND status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
|
|
12680
12775
|
AND (? IS NULL OR lastUpdatedAt = ?)
|
|
12681
|
-
RETURNING *`, [
|
|
12776
|
+
RETURNING *`, [
|
|
12777
|
+
args.statusKind ?? (isTaskStatusKindFor("superseded", args.reason) ? args.reason : null),
|
|
12778
|
+
finishedAt,
|
|
12779
|
+
id,
|
|
12780
|
+
args.expectedLastUpdatedAt ?? null,
|
|
12781
|
+
args.expectedLastUpdatedAt ?? null
|
|
12782
|
+
]);
|
|
12682
12783
|
if (row && oldTask) {
|
|
12683
12784
|
dependencies3.emitTaskLifecycleTelemetryAfterCommit("superseded", {
|
|
12684
12785
|
taskId: id,
|
|
@@ -12699,7 +12800,7 @@ async function supersedeTask2(id, args) {
|
|
|
12699
12800
|
});
|
|
12700
12801
|
} catch {}
|
|
12701
12802
|
getDbClient2().afterCommit(() => {
|
|
12702
|
-
import("./event-bus-
|
|
12803
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
12703
12804
|
workflowEventBus.emit("task.superseded", {
|
|
12704
12805
|
taskId: id,
|
|
12705
12806
|
reason: args.reason,
|
|
@@ -12718,6 +12819,7 @@ async function supersedeTask2(id, args) {
|
|
|
12718
12819
|
async function markWorkflowStepTaskSuperseded2(id) {
|
|
12719
12820
|
const row = await getDbClient2().get(`UPDATE agent_tasks
|
|
12720
12821
|
SET status = 'superseded',
|
|
12822
|
+
statusKind = 'workflow_retry',
|
|
12721
12823
|
lastUpdatedAt = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
12722
12824
|
WHERE id = ? AND status = 'failed' AND failureReason = ?
|
|
12723
12825
|
RETURNING *`, [id, SUPERSEDED_WORKFLOW_TASK_REASON]);
|
|
@@ -12934,7 +13036,7 @@ async function updateTaskProgress2(id, progress) {
|
|
|
12934
13036
|
});
|
|
12935
13037
|
} catch {}
|
|
12936
13038
|
getDbClient2().afterCommit(() => {
|
|
12937
|
-
import("./event-bus-
|
|
13039
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
12938
13040
|
workflowEventBus.emit("task.progress", {
|
|
12939
13041
|
taskId: id,
|
|
12940
13042
|
progress: scrubbedProgress,
|
|
@@ -13004,6 +13106,21 @@ var init_user_references = __esm(() => {
|
|
|
13004
13106
|
WHERE ${WORKFLOW_CONTEXT_REQUESTER_SQL} = ?`;
|
|
13005
13107
|
});
|
|
13006
13108
|
|
|
13109
|
+
// src/be/db/users/avatar.ts
|
|
13110
|
+
function parseUserAvatar(raw) {
|
|
13111
|
+
if (!raw)
|
|
13112
|
+
return null;
|
|
13113
|
+
try {
|
|
13114
|
+
const parsed = UserAvatarSchema.safeParse(JSON.parse(raw));
|
|
13115
|
+
return parsed.success ? parsed.data : null;
|
|
13116
|
+
} catch {
|
|
13117
|
+
return null;
|
|
13118
|
+
}
|
|
13119
|
+
}
|
|
13120
|
+
var init_avatar = __esm(() => {
|
|
13121
|
+
init_types5();
|
|
13122
|
+
});
|
|
13123
|
+
|
|
13007
13124
|
// src/be/db/workflow-idempotency.ts
|
|
13008
13125
|
function sha256(text) {
|
|
13009
13126
|
const hasher = new Bun.CryptoHasher("sha256");
|
|
@@ -13503,7 +13620,7 @@ function emitRunFinished(runId, workflowId, status) {
|
|
|
13503
13620
|
}
|
|
13504
13621
|
function emitBusEventAfterCommit(event, payload) {
|
|
13505
13622
|
getDbClient2().afterCommit(() => {
|
|
13506
|
-
import("./event-bus-
|
|
13623
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
13507
13624
|
workflowEventBus.emit(event, payload);
|
|
13508
13625
|
}).catch((err) => console.error(`[db] ${event} event not emitted:`, scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
13509
13626
|
});
|
|
@@ -14187,7 +14304,7 @@ function validateConfigEntry(entry) {
|
|
|
14187
14304
|
function validateExportToEnv(key, exportToEnv) {
|
|
14188
14305
|
return exportToEnv === true && isEnvExportRestrictedKey(key) ? envExportRestrictedError(key) : null;
|
|
14189
14306
|
}
|
|
14190
|
-
var TEAMS_SDK_ENV_KEYS, RESERVED_KEYS, API_ONLY_CONFIG_KEYS, INTERNAL_CONFIG_KEYS, HUMAN_ONLY_CONFIG_KEYS, BOOLEAN_LITERALS, MAX_DB_RETENTION_DAYS = 1e6, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS, SYSTEM_ONE_EXTRACT_DEFAULT_PROVIDER_OPTIONS, validateControllerTokenTtlDays, validateControllerGraceSec, VALIDATED_KEYS;
|
|
14307
|
+
var TEAMS_SDK_ENV_KEYS, RESERVED_KEYS, API_ONLY_CONFIG_KEYS, INTERNAL_CONFIG_KEYS, HUMAN_ONLY_CONFIG_KEYS, BOOLEAN_LITERALS, MAX_DB_RETENTION_DAYS = 1e6, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, SCHEDULER_INTERVAL_MS_BOUNDS, SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS, SYSTEM_ONE_EXTRACT_DEFAULT_PROVIDER_OPTIONS, validateControllerTokenTtlDays, validateControllerGraceSec, VALIDATED_KEYS;
|
|
14191
14308
|
var init_swarm_config_guard = __esm(() => {
|
|
14192
14309
|
init_schema();
|
|
14193
14310
|
init_telemetry_ranking();
|
|
@@ -14202,6 +14319,7 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14202
14319
|
init_enabled_tools();
|
|
14203
14320
|
init_follow_up_gate_schedule_ids();
|
|
14204
14321
|
init_models2();
|
|
14322
|
+
init_key_usage();
|
|
14205
14323
|
init_org_website();
|
|
14206
14324
|
init_task_tool_manifest();
|
|
14207
14325
|
init_model_tier_keys();
|
|
@@ -14224,7 +14342,8 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14224
14342
|
"CLOUDFLARE_API_BASE_URL",
|
|
14225
14343
|
"GITHUB_URL",
|
|
14226
14344
|
"GITHUB_API_URL",
|
|
14227
|
-
"GITHUB_APP_INSTALLATION_ID"
|
|
14345
|
+
"GITHUB_APP_INSTALLATION_ID",
|
|
14346
|
+
"GITHUB_APP_REPO_OWNERS"
|
|
14228
14347
|
]);
|
|
14229
14348
|
API_ONLY_CONFIG_KEYS = new Set([
|
|
14230
14349
|
"API_AGENT_FS_API_KEY",
|
|
@@ -14245,6 +14364,7 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14245
14364
|
};
|
|
14246
14365
|
APPS_JSON_COLUMN_MAX_BYTES_BOUNDS = { min: 1024, max: 16777216 };
|
|
14247
14366
|
CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS = { min: 1, max: 216 };
|
|
14367
|
+
SCHEDULER_INTERVAL_MS_BOUNDS = { min: 1, max: 2147483647 };
|
|
14248
14368
|
SYSTEM_ONE_DEFAULT_PROVIDER_OPTIONS = [
|
|
14249
14369
|
"typesafe",
|
|
14250
14370
|
"openrouter",
|
|
@@ -14352,6 +14472,7 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14352
14472
|
...booleanValidators(["SCRIPT_EGRESS_ALLOW_PRIVATE"]),
|
|
14353
14473
|
SCRIPT_EGRESS_ALLOWLIST: (value) => typeof value === "string" ? validateEgressAllowlist(value) : "Invalid SCRIPT_EGRESS_ALLOWLIST",
|
|
14354
14474
|
...enumValidator("MODEL_WINDOW_EXHAUSTED_POLICY", ["fail", "fallback"]),
|
|
14475
|
+
...enumValidator("CREDENTIAL_SELECTION_STRATEGY", [...CREDENTIAL_SELECTION_STRATEGIES]),
|
|
14355
14476
|
...enumValidator("HEARTBEAT_CHECKLIST_GATE_MODE", ["shadow", "enforce"]),
|
|
14356
14477
|
...enumValidator("FOLLOW_UP_GATE_MODE", ["off", "shadow"]),
|
|
14357
14478
|
FOLLOW_UP_GATE_SCHEDULE_IDS: (value) => {
|
|
@@ -14483,7 +14604,6 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14483
14604
|
"RBAC_AUDIT_RETENTION_DAYS",
|
|
14484
14605
|
"WORKFLOW_MAX_ITERATIONS",
|
|
14485
14606
|
"WORKFLOW_MAX_STEPS_PER_RUN",
|
|
14486
|
-
"SCHEDULER_INTERVAL_MS",
|
|
14487
14607
|
"EXTENSION_HANDLER_TIMEOUT_MS",
|
|
14488
14608
|
"EXTENSION_MAX_CONSECUTIVE_FAILURES",
|
|
14489
14609
|
"RUNTIME_STALE_THRESHOLD_MIN",
|
|
@@ -14502,6 +14622,7 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14502
14622
|
], 1),
|
|
14503
14623
|
...boundedIntegerValidatorsFor(DB_RETENTION_TUNING_BOUNDS),
|
|
14504
14624
|
...boundedIntegerValidators(["APPS_JSON_COLUMN_MAX_BYTES"], APPS_JSON_COLUMN_MAX_BYTES_BOUNDS.min, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS.max),
|
|
14625
|
+
...boundedIntegerValidators(["SCHEDULER_INTERVAL_MS"], SCHEDULER_INTERVAL_MS_BOUNDS.min, SCHEDULER_INTERVAL_MS_BOUNDS.max),
|
|
14505
14626
|
...enumValidator("WORKTREE_REAPER_MODE", ["off", "dry-run", "on"]),
|
|
14506
14627
|
...boundedIntegerValidators(["WORKTREE_TTL_HOURS"], 1, 2160),
|
|
14507
14628
|
...boundedIntegerValidators(["WORKTREE_SWEEP_INTERVAL_MINUTES"], 5, 1440),
|
|
@@ -23158,7 +23279,7 @@ function noteEmbeddingSuccess() {
|
|
|
23158
23279
|
const report = (what) => (err) => {
|
|
23159
23280
|
console.error(`[memory] ${what} backfill after embeddings recovered failed:`, err.message);
|
|
23160
23281
|
};
|
|
23161
|
-
backfill2 = import("./embedding-space-
|
|
23282
|
+
backfill2 = import("./embedding-space-qepzrach.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
|
|
23162
23283
|
backfill2 = null;
|
|
23163
23284
|
});
|
|
23164
23285
|
}
|
|
@@ -25727,7 +25848,7 @@ async function loadSecretRegistry() {
|
|
|
25727
25848
|
result.failed += 1;
|
|
25728
25849
|
}
|
|
25729
25850
|
try {
|
|
25730
|
-
const { loadRuntimeControllerSecrets } = await import("./db-
|
|
25851
|
+
const { loadRuntimeControllerSecrets } = await import("./db-fd6xxm77.js");
|
|
25731
25852
|
const loaded = await loadRuntimeControllerSecrets();
|
|
25732
25853
|
result.runtimeController = loaded.count;
|
|
25733
25854
|
result.failed += loaded.failed;
|
|
@@ -25888,7 +26009,7 @@ async function requestSteering(args) {
|
|
|
25888
26009
|
}
|
|
25889
26010
|
const requestedMode = args.mode ?? "queue";
|
|
25890
26011
|
const onUnsupported = args.onUnsupported ?? "degrade";
|
|
25891
|
-
const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-
|
|
26012
|
+
const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-a2gdqz8c.js");
|
|
25892
26013
|
const preSteer = await dispatchPre("pre.task.steer", {
|
|
25893
26014
|
task,
|
|
25894
26015
|
message: args.message,
|
|
@@ -28133,7 +28254,7 @@ async function createTaskExtended2(task, options) {
|
|
|
28133
28254
|
priority: row.priority
|
|
28134
28255
|
}, (task) => task !== null, row.requestedByUserId);
|
|
28135
28256
|
getDbClient2().afterCommit(() => {
|
|
28136
|
-
import("./event-bus-
|
|
28257
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => {
|
|
28137
28258
|
workflowEventBus.emit("task.created", {
|
|
28138
28259
|
taskId: row.id,
|
|
28139
28260
|
task: row.task,
|
|
@@ -28215,7 +28336,7 @@ async function releaseTask2(taskId, wakeSnapshot) {
|
|
|
28215
28336
|
} catch {}
|
|
28216
28337
|
if (isRuntimePoolsEnabled() && !wakeSnapshot)
|
|
28217
28338
|
getDbClient2().afterCommit(() => {
|
|
28218
|
-
import("./event-bus-
|
|
28339
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
|
|
28219
28340
|
});
|
|
28220
28341
|
}
|
|
28221
28342
|
return row ? rowToAgentTask(row) : null;
|
|
@@ -28285,7 +28406,7 @@ async function rejectTask2(taskId, agentId, reason) {
|
|
|
28285
28406
|
} catch {}
|
|
28286
28407
|
if (isRuntimePoolsEnabled())
|
|
28287
28408
|
getDbClient2().afterCommit(() => {
|
|
28288
|
-
import("./event-bus-
|
|
28409
|
+
import("./event-bus-7gbsr0g4.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
|
|
28289
28410
|
});
|
|
28290
28411
|
}
|
|
28291
28412
|
return row ? rowToAgentTask(row) : null;
|
|
@@ -28510,7 +28631,7 @@ async function cascadeFailDependents2(parentId, parentStatus, visited) {
|
|
|
28510
28631
|
if (seen.has(dep.id))
|
|
28511
28632
|
continue;
|
|
28512
28633
|
const reason = `Blocked dependency ${parentId.slice(0, 8)} was ${parentStatus}`;
|
|
28513
|
-
const failed = await failTask2(dep.id, reason);
|
|
28634
|
+
const failed = await failTask2(dep.id, reason, { statusKind: "cascade" });
|
|
28514
28635
|
if (failed) {
|
|
28515
28636
|
results.push({
|
|
28516
28637
|
taskId: failed.id,
|
|
@@ -29948,7 +30069,7 @@ async function deleteScheduledTask2(id) {
|
|
|
29948
30069
|
const parent = await getTaskById2(deferred.parentTaskId);
|
|
29949
30070
|
if (!parent?.deferredAt)
|
|
29950
30071
|
return;
|
|
29951
|
-
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-
|
|
30072
|
+
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-y0h64xpr.js");
|
|
29952
30073
|
await createWorkerTaskFollowUp({
|
|
29953
30074
|
task: parent,
|
|
29954
30075
|
status: "failed",
|
|
@@ -30477,8 +30598,8 @@ async function getStalePinnedResumes2(graceMin) {
|
|
|
30477
30598
|
async function failPendingResumeIfUnclaimed2(taskId, status, failureReason) {
|
|
30478
30599
|
const now = new Date().toISOString();
|
|
30479
30600
|
const scrubbedReason = scrubSecrets(failureReason);
|
|
30480
|
-
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = ?, failureReason = ?, finishedAt = ?, lastUpdatedAt = ?
|
|
30481
|
-
WHERE id = ? AND status = 'pending' RETURNING *`, [status, scrubbedReason, now, now, taskId]);
|
|
30601
|
+
const row = await getDbClient2().get(`UPDATE agent_tasks SET status = ?, statusKind = ?, failureReason = ?, finishedAt = ?, lastUpdatedAt = ?
|
|
30602
|
+
WHERE id = ? AND status = 'pending' RETURNING *`, [status, status === "failed" ? "error" : "system", scrubbedReason, now, now, taskId]);
|
|
30482
30603
|
if (row) {
|
|
30483
30604
|
try {
|
|
30484
30605
|
await createLogEntry2({
|
|
@@ -32931,6 +33052,33 @@ async function getAvailableKeyIndices2(keyType, totalKeys, scope = "global", sco
|
|
|
32931
33052
|
continue;
|
|
32932
33053
|
availableIndices.push(i);
|
|
32933
33054
|
}
|
|
33055
|
+
const keyUsage = new Array(totalKeys).fill(0);
|
|
33056
|
+
const keyPace = new Array(totalKeys).fill(undefined);
|
|
33057
|
+
for (const row of rows) {
|
|
33058
|
+
const windows = parseRateLimitWindowsJson(row.rateLimitWindows);
|
|
33059
|
+
const usage = keyUsageFromWindows(windows, nowMs);
|
|
33060
|
+
const pace = keyPaceFromWindows(windows, nowMs, modelFamily);
|
|
33061
|
+
for (const i of positionsOf(row)) {
|
|
33062
|
+
if (i < 0 || i >= totalKeys)
|
|
33063
|
+
continue;
|
|
33064
|
+
keyUsage[i] = Math.max(keyUsage[i], usage);
|
|
33065
|
+
if (pace !== undefined)
|
|
33066
|
+
keyPace[i] = Math.max(keyPace[i] ?? Number.NEGATIVE_INFINITY, pace);
|
|
33067
|
+
}
|
|
33068
|
+
}
|
|
33069
|
+
const suffixAt = (i) => suffixes ? suffixes[i] : rows.find((r) => r.keyIndex === i && r.scope === scope && r.scopeId === effectiveScopeId)?.keySuffix;
|
|
33070
|
+
const positionSuffixes = Array.from({ length: totalKeys }, (_, i) => suffixAt(i));
|
|
33071
|
+
const distinctSuffixes = [...new Set(positionSuffixes.filter((s) => !!s))];
|
|
33072
|
+
const sessionsBySuffix = new Map;
|
|
33073
|
+
if (distinctSuffixes.length > 0) {
|
|
33074
|
+
const counts = await client.query(`SELECT credentialKeySuffix AS suffix, COUNT(*) AS n FROM agent_tasks
|
|
33075
|
+
WHERE status = 'in_progress' AND credentialKeyType = ?
|
|
33076
|
+
AND credentialKeySuffix IN (${distinctSuffixes.map(() => "?").join(", ")})
|
|
33077
|
+
GROUP BY credentialKeySuffix`, [keyType, ...distinctSuffixes]);
|
|
33078
|
+
for (const { suffix, n } of counts)
|
|
33079
|
+
sessionsBySuffix.set(suffix, n);
|
|
33080
|
+
}
|
|
33081
|
+
const activeSessions = positionSuffixes.map((s) => s ? sessionsBySuffix.get(s) ?? 0 : 0);
|
|
32934
33082
|
return {
|
|
32935
33083
|
availableIndices,
|
|
32936
33084
|
rejectedIndices,
|
|
@@ -32938,7 +33086,10 @@ async function getAvailableKeyIndices2(keyType, totalKeys, scope = "global", sco
|
|
|
32938
33086
|
seatBlockedIndices,
|
|
32939
33087
|
spendCappedIndices,
|
|
32940
33088
|
earliestModelResetAt: earliestModelResetsAtSec !== undefined ? new Date(earliestModelResetsAtSec * 1000).toISOString() : null,
|
|
32941
|
-
authFailureFence: Math.max(0, ...rows.map((r) => r.authFailureSeq))
|
|
33089
|
+
authFailureFence: Math.max(0, ...rows.map((r) => r.authFailureSeq)),
|
|
33090
|
+
keyUsage,
|
|
33091
|
+
keyPace: keyPace.map((pace) => pace ?? 0),
|
|
33092
|
+
activeSessions
|
|
32942
33093
|
};
|
|
32943
33094
|
}
|
|
32944
33095
|
async function recordKeyUsage2(keyType, keySuffix, keyIndex, taskId, scope = "global", scopeId = null, plan = null, planRaw) {
|
|
@@ -33181,6 +33332,7 @@ function rowToUser(row) {
|
|
|
33181
33332
|
dailyBudgetUsd: row.dailyBudgetUsd ?? null,
|
|
33182
33333
|
status: row.status ?? "active",
|
|
33183
33334
|
...row.mergedIntoUserId ? { mergedIntoUserId: row.mergedIntoUserId } : {},
|
|
33335
|
+
avatar: parseUserAvatar(row.avatar),
|
|
33184
33336
|
createdAt: row.createdAt,
|
|
33185
33337
|
lastUpdatedAt: row.lastUpdatedAt
|
|
33186
33338
|
};
|
|
@@ -33196,8 +33348,8 @@ async function getAllUsers2() {
|
|
|
33196
33348
|
async function createUser2(data) {
|
|
33197
33349
|
const id = crypto.randomUUID().replace(/-/g, "");
|
|
33198
33350
|
const now = new Date().toISOString();
|
|
33199
|
-
const row = await getDbClient2().get(`INSERT INTO users (id, name, email, role, notes, emailAliases, preferredChannel, timezone, metadata, dailyBudgetUsd, status, createdAt, lastUpdatedAt)
|
|
33200
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *`, [
|
|
33351
|
+
const row = await getDbClient2().get(`INSERT INTO users (id, name, email, role, notes, emailAliases, preferredChannel, timezone, metadata, dailyBudgetUsd, status, avatar, createdAt, lastUpdatedAt)
|
|
33352
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *`, [
|
|
33201
33353
|
id,
|
|
33202
33354
|
data.name,
|
|
33203
33355
|
data.email ?? null,
|
|
@@ -33209,6 +33361,7 @@ async function createUser2(data) {
|
|
|
33209
33361
|
data.metadata !== undefined ? JSON.stringify(data.metadata) : null,
|
|
33210
33362
|
data.dailyBudgetUsd ?? null,
|
|
33211
33363
|
data.status ?? "active",
|
|
33364
|
+
data.avatar ? JSON.stringify(data.avatar) : null,
|
|
33212
33365
|
now,
|
|
33213
33366
|
now
|
|
33214
33367
|
]);
|
|
@@ -33260,6 +33413,10 @@ async function updateUser2(id, data) {
|
|
|
33260
33413
|
sets.push("status = ?");
|
|
33261
33414
|
params.push(data.status);
|
|
33262
33415
|
}
|
|
33416
|
+
if (data.avatar !== undefined) {
|
|
33417
|
+
sets.push("avatar = ?");
|
|
33418
|
+
params.push(data.avatar === null ? null : JSON.stringify(data.avatar));
|
|
33419
|
+
}
|
|
33263
33420
|
if (sets.length === 0)
|
|
33264
33421
|
return getUserById2(id);
|
|
33265
33422
|
sets.push("lastUpdatedAt = ?");
|
|
@@ -34000,7 +34157,7 @@ function rowToScriptRun(row) {
|
|
|
34000
34157
|
id: row.id,
|
|
34001
34158
|
agentId: row.agentId,
|
|
34002
34159
|
scriptName: row.scriptName ?? undefined,
|
|
34003
|
-
source: row.source,
|
|
34160
|
+
source: row.storedSource ?? row.source,
|
|
34004
34161
|
args: sealedJsonForDisplay(row.args),
|
|
34005
34162
|
kind: row.kind,
|
|
34006
34163
|
status: row.status,
|
|
@@ -34033,69 +34190,76 @@ function rowToScriptRunListItem(row) {
|
|
|
34033
34190
|
}
|
|
34034
34191
|
async function createScriptRun2(data) {
|
|
34035
34192
|
const client = getDbClient2();
|
|
34036
|
-
|
|
34037
|
-
|
|
34038
|
-
|
|
34039
|
-
|
|
34040
|
-
|
|
34041
|
-
|
|
34042
|
-
|
|
34193
|
+
return client.transaction(async () => {
|
|
34194
|
+
if (data.idempotencyKey) {
|
|
34195
|
+
const existing = await client.get(`${SCRIPT_RUN_SELECT} WHERE r.idempotencyKey = ?`, [data.idempotencyKey]);
|
|
34196
|
+
if (existing)
|
|
34197
|
+
return { run: rowToScriptRun(existing), existing: true };
|
|
34198
|
+
}
|
|
34199
|
+
const sourceHash = await storeScriptRunSource(data.source);
|
|
34200
|
+
const row = await client.get(`INSERT INTO script_runs
|
|
34201
|
+
(id, agentId, scriptName, source, sourceHash, args, idempotencyKey, requestedByUserId, sourceTaskId,
|
|
34043
34202
|
created_by, updated_by, startedAt)
|
|
34044
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
34203
|
+
VALUES (?, ?, ?, '', ?, ?, ?, ?, ?, ?, ?, ?)
|
|
34045
34204
|
RETURNING *`, [
|
|
34046
|
-
|
|
34047
|
-
|
|
34048
|
-
|
|
34049
|
-
|
|
34050
|
-
|
|
34051
|
-
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
34057
|
-
|
|
34058
|
-
|
|
34059
|
-
|
|
34060
|
-
|
|
34205
|
+
data.id,
|
|
34206
|
+
data.agentId,
|
|
34207
|
+
data.scriptName ?? null,
|
|
34208
|
+
sourceHash,
|
|
34209
|
+
sealJson(data.args ?? null),
|
|
34210
|
+
data.idempotencyKey ?? null,
|
|
34211
|
+
data.requestedByUserId ?? null,
|
|
34212
|
+
data.sourceTaskId ?? null,
|
|
34213
|
+
data.createdBy ?? null,
|
|
34214
|
+
data.updatedBy ?? data.createdBy ?? null,
|
|
34215
|
+
new Date().toISOString()
|
|
34216
|
+
]);
|
|
34217
|
+
if (!row)
|
|
34218
|
+
throw new Error("Failed to create script run");
|
|
34219
|
+
return { run: rowToScriptRun({ ...row, storedSource: data.source }), existing: false };
|
|
34220
|
+
});
|
|
34061
34221
|
}
|
|
34062
34222
|
async function recordInlineScriptRun2(data) {
|
|
34063
34223
|
const args = scrubJsonValue(data.args ?? null);
|
|
34064
34224
|
const output = data.output === undefined ? null : scrubJsonValue(data.output);
|
|
34065
34225
|
const provenance = getCurrentRunProvenance();
|
|
34066
|
-
const
|
|
34067
|
-
|
|
34226
|
+
const client = getDbClient2();
|
|
34227
|
+
return client.transaction(async () => {
|
|
34228
|
+
const sourceHash = await storeScriptRunSource(data.source);
|
|
34229
|
+
const row = await client.get(`INSERT INTO script_runs
|
|
34230
|
+
(id, agentId, scriptName, source, sourceHash, args, kind, status, output, error,
|
|
34068
34231
|
startedAt, finishedAt, requestedByUserId, created_by, updated_by, apiEndpointId,
|
|
34069
34232
|
sourceStepId, parentScriptRunId)
|
|
34070
|
-
VALUES (?, ?, ?, ?, ?, 'inline', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
34233
|
+
VALUES (?, ?, ?, '', ?, ?, 'inline', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
34071
34234
|
RETURNING *`, [
|
|
34072
|
-
|
|
34073
|
-
|
|
34074
|
-
|
|
34075
|
-
|
|
34076
|
-
|
|
34077
|
-
|
|
34078
|
-
|
|
34079
|
-
|
|
34080
|
-
|
|
34081
|
-
|
|
34082
|
-
|
|
34083
|
-
|
|
34084
|
-
|
|
34085
|
-
|
|
34086
|
-
|
|
34087
|
-
|
|
34088
|
-
|
|
34089
|
-
|
|
34090
|
-
|
|
34091
|
-
|
|
34235
|
+
data.id,
|
|
34236
|
+
data.agentId,
|
|
34237
|
+
data.scriptName ?? null,
|
|
34238
|
+
sourceHash,
|
|
34239
|
+
args,
|
|
34240
|
+
data.status,
|
|
34241
|
+
output,
|
|
34242
|
+
data.error ?? null,
|
|
34243
|
+
data.startedAt,
|
|
34244
|
+
data.finishedAt,
|
|
34245
|
+
data.requestedByUserId ?? null,
|
|
34246
|
+
data.createdBy ?? null,
|
|
34247
|
+
data.createdBy ?? null,
|
|
34248
|
+
data.apiEndpointId ?? null,
|
|
34249
|
+
provenance?.sourceStepId ?? null,
|
|
34250
|
+
provenance?.sourceScriptRunId ?? null
|
|
34251
|
+
]);
|
|
34252
|
+
if (!row)
|
|
34253
|
+
throw new Error("Failed to record inline script run");
|
|
34254
|
+
return rowToScriptRun({ ...row, storedSource: data.source });
|
|
34255
|
+
});
|
|
34092
34256
|
}
|
|
34093
34257
|
async function getScriptRun2(id) {
|
|
34094
|
-
const row = await getDbClient2().get(
|
|
34258
|
+
const row = await getDbClient2().get(`${SCRIPT_RUN_SELECT} WHERE r.id = ?`, [id]);
|
|
34095
34259
|
return row ? rowToScriptRun(row) : null;
|
|
34096
34260
|
}
|
|
34097
34261
|
async function getScriptRunByIdempotencyKey2(idempotencyKey) {
|
|
34098
|
-
const row = await getDbClient2().get(
|
|
34262
|
+
const row = await getDbClient2().get(`${SCRIPT_RUN_SELECT} WHERE r.idempotencyKey = ?`, [idempotencyKey]);
|
|
34099
34263
|
return row ? rowToScriptRun(row) : null;
|
|
34100
34264
|
}
|
|
34101
34265
|
async function listScriptRuns2(opts) {
|
|
@@ -34213,7 +34377,7 @@ async function updateScriptRunGuarded(id, patch, predicate) {
|
|
|
34213
34377
|
return result.changes > 0;
|
|
34214
34378
|
}
|
|
34215
34379
|
async function getRunningScriptRuns2() {
|
|
34216
|
-
const rows = await getDbClient2().query(
|
|
34380
|
+
const rows = await getDbClient2().query(`${SCRIPT_RUN_SELECT} WHERE r.status IN ('running', 'paused')`);
|
|
34217
34381
|
return rows.map(rowToScriptRun);
|
|
34218
34382
|
}
|
|
34219
34383
|
function rowToScriptRunJournalEntry(row, view = "display") {
|
|
@@ -34293,6 +34457,7 @@ var init_db4 = __esm(() => {
|
|
|
34293
34457
|
init_github_pull_request();
|
|
34294
34458
|
init_heartbeat_expiry();
|
|
34295
34459
|
init_identity_field_budget();
|
|
34460
|
+
init_key_usage();
|
|
34296
34461
|
init_model_rate_limit_windows();
|
|
34297
34462
|
init_output_schema();
|
|
34298
34463
|
init_provider_account_telemetry();
|
|
@@ -34311,6 +34476,7 @@ var init_db4 = __esm(() => {
|
|
|
34311
34476
|
init_page_search();
|
|
34312
34477
|
init_page_theme_tokens();
|
|
34313
34478
|
init_runtime2();
|
|
34479
|
+
init_script_run_sources2();
|
|
34314
34480
|
init_session_log_reasoning();
|
|
34315
34481
|
init_session_moves();
|
|
34316
34482
|
init_session_tree();
|
|
@@ -34321,6 +34487,7 @@ var init_db4 = __esm(() => {
|
|
|
34321
34487
|
init_read();
|
|
34322
34488
|
init_write();
|
|
34323
34489
|
init_user_references();
|
|
34490
|
+
init_avatar();
|
|
34324
34491
|
init_workflow_idempotency();
|
|
34325
34492
|
init_workflow_run_definitions();
|
|
34326
34493
|
init_workflow_runs();
|
|
@@ -34347,7 +34514,7 @@ var init_db4 = __esm(() => {
|
|
|
34347
34514
|
configureAgentDependencies({
|
|
34348
34515
|
createLogEntry: (entry) => createLogEntry2(entry),
|
|
34349
34516
|
installSystemDefaultSkillsForAgent: (agentId) => installSystemDefaultSkillsForAgent2(agentId),
|
|
34350
|
-
resolvePendingImportAssignments: async (agent) => (await import("./pending-
|
|
34517
|
+
resolvePendingImportAssignments: async (agent) => (await import("./pending-2e6trkxd.js")).resolvePendingImportAssignments(agent)
|
|
34351
34518
|
});
|
|
34352
34519
|
configureTaskWriteDependencies({
|
|
34353
34520
|
createLogEntry: (...args) => createLogEntry2(...args),
|
|
@@ -34397,4 +34564,4 @@ var init_db4 = __esm(() => {
|
|
|
34397
34564
|
};
|
|
34398
34565
|
});
|
|
34399
34566
|
|
|
34400
|
-
export { auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, defaultCredentialBindings, isPrivateAddress, assertUrlSafe, EgressDeniedError, createGuardedFetch, createSsrfGuardedFetch, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, init_secrets_cipher, getEncryptionKey, init_key_bootstrap, init_crypto, withLoopPath, bindLoopPath, startEventLoopLagProbe, stopEventLoopLagProbe, init_event_loop_lag, DbTransactionDeadlineError, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, openSealedJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, wasDbCreatedThisBoot, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, SessionCostConflictError2, insertSessionCost2, slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, APP_SESSION_KEY_PATTERN, appSessionContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, TaskCreationBlockedError, TaskRoutingAuthorizationError, init_errors2, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, reportedUseCase, reportedUserFunction, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, getCurrentRequestAuth, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, getCurrentRunProvenance, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, isRbacEnabled, decideAdmission, decideToolAdmission, grantLeadEquivalence, revokeLeadEquivalence, init_elevated_agents, LEGACY_RULES, setAuditSink, clearAuditSink, can, init_can, PermissionVerbSchema, init_rbac, randomChars, init_short_id, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, isSlackIconConfigKey, reactionStatusIcon, iconPrefix, completedStatusIcon, init_reaction_shortcode, UI_SPEC_SCRIPT_ACTIONS_KEY, parseScriptActionAllowlist, init_script_allowlist, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, isEnvExportRestrictedKey, init_config_env_export, parseEnabledTools, init_enabled_tools, parseFollowUpGateScheduleIds, isFollowUpGateScheduleId, init_follow_up_gate_schedule_ids, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isHumanOnlyConfigKey, humanOnlyConfigKeyError, humanOnlyConfigKeyPageError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateConfigEntry, validateExportToEnv, init_swarm_config_guard, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isEffectiveOutputSchema, init_output_schema, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, AgentDeletedError2, isAgentDeleted2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, closeSlackTreeIfSettled, getSlackThreadsOfTasks, slackThreadHasBotReplySince, slackThreadHasOutcomeWork, observeSlackTreeVisibility, getSlackProcessingThreads, init_slack_trees, WorkflowReplayStateError, init_workflow_replay, getWorkflowRunTriggeredByAgentId, getWorkflowRunSummary, getWorkflowRunStepsSlimByRunId, WORKFLOW_RUN_TREE_MAX_DEPTH, WorkflowRunTreeError, getRunLineageBlock, getWorkflowRunTreeIds, getWorkflowRunStatus, getOpenWorkflowTreeTaskIds, getTaskIdsWithDependents, workflowRunTreeHasOpenWork, getWorkflowRunTree, cancelOpenWorkflowTreeSteps, disarmWorkflowTreeRetries, cancelLiveWorkflowTreeRuns, getChildWorkflowRunId, isParentStepAttemptCurrent, getRunningSubWorkflowSteps, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, emitRunFinished, createForeachChildSteps, createForeachAttemptSteps, init_workflow_runs, OpenAI2, init_openai2, LEARNING_TTL_DAYS, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, LEARNINGS_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, isReviewTaskId, dropReviewTaskCompletions, init_review_recall_filter, searchMemoryCandidates, init_search_candidates, memorySearchReader, init_search_reader, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getGlobalScriptContentHashes, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, hasOAuthTokens, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, normalizeVcsRepo, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, taskModelPin, resumedTaskModelSelection, init_model_pin, normalizeModelKey, init_pricing_normalize, buildModelsDevSeedRows, seedPricingFromModelsDev, init_seed_pricing, buildCatalogEntries, replaceModelCatalog, touchModelCatalogCheckedAt, countModelCatalog, getModelCatalogMeta, updateModelCatalogMeta, upsertModelCatalogOverlay, deleteModelCatalogOverlay, expireMatchedOverlays, applyOverlayPricingRows, reloadModelsCatalog, loadModelsCatalog, init_model_catalog_store, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, init_harness_model_support, sanitizeModelTierOverrides, parseModelTierOverridesHeader, modelTierOverridesDiffer, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation2, runtimeReadsRepoSecrets, configPools, checkProfileForAgent, formatProfileCheckFailures, init_model_profile_check, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getTasksDispatchedFrom2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findActiveTasksByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestTaskByContextKeyPrefix2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getFirstTaskInThread2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, hasUnreadableCredentialAllowlist, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, TASK_HOLDS_PROFILE_SQL, repairWindowStart, modelProfileReferences, modelProfileRefError, isModelNameTakenError, deleteModelProfile, MAX_MODEL_PROFILE_FALLBACKS, modelProfileFallbacksError, taskProfileError, scheduleProfileUpdate, init_model_profiles, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, STEERING_MOVED_ERROR, SteeringRequestError, SteeringBlockedError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering2, onTaskStarted, init_task_lifecycle_events, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, moveKeyFavorites, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, sessionSummaryQuery, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, reclassifyTaskHumanFree, drainHumanFreeReclassifyQueue, init_human_free, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, updateTaskTags2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, skipTask2, supersedeTask2, markWorkflowStepTaskSuperseded2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, quoteSqlIdentifier, USER_REFERENCE_COLUMNS_SQL, userReferenceRewriteSql, WORKFLOW_CONTEXT_REQUESTER_SQL, init_user_references, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, PINNED_WORKFLOW_KEYS2, toPinnedDefinition2, pinWorkflowDefinition2, getRunWorkflow2, deleteOrphanedRunDefinitions, init_workflow_run_definitions, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, setSkillUpdatedBy2, literalPrefixPattern2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db4 };
|
|
34567
|
+
export { auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, defaultCredentialBindings, isPrivateAddress, assertUrlSafe, EgressDeniedError, createGuardedFetch, createSsrfGuardedFetch, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, init_secrets_cipher, getEncryptionKey, init_key_bootstrap, init_crypto, withLoopPath, bindLoopPath, startEventLoopLagProbe, stopEventLoopLagProbe, init_event_loop_lag, DbTransactionDeadlineError, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, foldHexCopies, init_scrub_json, sealJson, openSealedJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates2, init_templates3, wasDbCreatedThisBoot, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime2, SessionCostConflictError2, insertSessionCost2, slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, bitbucketContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, APP_SESSION_KEY_PATTERN, appSessionContextKey, init_context_key, sessionSourceKey, sourceOfKey, SOURCE_GROUPS_READ_ONLY, sourceMoveError, init_source_key, TaskCreationBlockedError, TaskRoutingAuthorizationError, init_errors2, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, reportedUseCase, reportedUserFunction, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, getCurrentRequestAuth, runWithoutRequestAuth, authUserId, authUser, isOperatorAuth, getCurrentRequestUserId, getCurrentRunProvenance, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, isRbacEnabled, decideAdmission, decideToolAdmission, grantLeadEquivalence, revokeLeadEquivalence, init_elevated_agents, LEGACY_RULES, setAuditSink, clearAuditSink, can, init_can, PermissionVerbSchema, init_rbac, randomChars, init_short_id, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, isSlackIconConfigKey, reactionStatusIcon, iconPrefix, completedStatusIcon, init_reaction_shortcode, UI_SPEC_SCRIPT_ACTIONS_KEY, parseScriptActionAllowlist, init_script_allowlist, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain2, isEnvExportRestrictedKey, init_config_env_export, parseEnabledTools, init_enabled_tools, parseFollowUpGateScheduleIds, isFollowUpGateScheduleId, init_follow_up_gate_schedule_ids, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isHumanOnlyConfigKey, humanOnlyConfigKeyError, humanOnlyConfigKeyPageError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, CODEX_OAUTH_KEEP_WARM_MAX_AGE_HOURS_BOUNDS, SCHEDULER_INTERVAL_MS_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateConfigEntry, validateExportToEnv, init_swarm_config_guard, cachedUserRole, cachedUserFunction, invalidateTelemetryUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isEffectiveOutputSchema, init_output_schema, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, AgentDeletedError2, isAgentDeleted2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, closeSlackTreeIfSettled, getSlackThreadsOfTasks, slackThreadHasBotReplySince, slackThreadHasOutcomeWork, observeSlackTreeVisibility, getSlackProcessingThreads, init_slack_trees, WorkflowReplayStateError, init_workflow_replay, getWorkflowRunTriggeredByAgentId, getWorkflowRunSummary, getWorkflowRunStepsSlimByRunId, WORKFLOW_RUN_TREE_MAX_DEPTH, WorkflowRunTreeError, getRunLineageBlock, getWorkflowRunTreeIds, getWorkflowRunStatus, getOpenWorkflowTreeTaskIds, getTaskIdsWithDependents, workflowRunTreeHasOpenWork, getWorkflowRunTree, cancelOpenWorkflowTreeSteps, disarmWorkflowTreeRetries, cancelLiveWorkflowTreeRuns, getChildWorkflowRunId, isParentStepAttemptCurrent, getRunningSubWorkflowSteps, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, emitRunFinished, createForeachChildSteps, createForeachAttemptSteps, init_workflow_runs, OpenAI2, init_openai2, LEARNING_TTL_DAYS, LEARNING_DUPLICATE_MIN_SIMILARITY, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants2, LONGTERM_ROOT, LEARNINGS_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, isReviewTaskId, dropReviewTaskCompletions, init_review_recall_filter, searchMemoryCandidates, init_search_candidates, memorySearchReader, init_search_reader, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider2, computeScriptEmbedding2, writeScriptEmbedding2, embedScript2, searchScripts2, reembedAllScripts2, init_embeddings, upsertScriptByName, getScript, getGlobalScriptContentHashes, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db3, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, hasOAuthTokens, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, normalizeVcsRepo, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, taskModelPin, resumedTaskModelSelection, init_model_pin, normalizeModelKey, init_pricing_normalize, buildModelsDevSeedRows, seedPricingFromModelsDev, init_seed_pricing, buildCatalogEntries, replaceModelCatalog, touchModelCatalogCheckedAt, countModelCatalog, getModelCatalogMeta, updateModelCatalogMeta, upsertModelCatalogOverlay, deleteModelCatalogOverlay, expireMatchedOverlays, applyOverlayPricingRows, reloadModelsCatalog, loadModelsCatalog, init_model_catalog_store, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, init_harness_model_support, sanitizeModelTierOverrides, parseModelTierOverridesHeader, modelTierOverridesDiffer, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation2, runtimeReadsRepoSecrets, configPools, checkProfileForAgent, formatProfileCheckFailures, init_model_profile_check, startTaskSearchBackfill, stopTaskSearchBackfill, init_search_index, rowToAgentTask, getTaskById2, getChildTasks2, TASK_LINEAGE_LIMITS2, getTaskLineage2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getTasksDispatchedFrom2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findActiveTasksByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestTaskByContextKeyPrefix2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getFirstTaskInThread2, getMostRecentTaskInThread2, findCompletedTasksInThread2, findRecentFailedTaskInThread2, countAgentDispatchesInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, hasUnreadableCredentialAllowlist, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, TASK_HOLDS_PROFILE_SQL, repairWindowStart, modelProfileReferences, modelProfileRefError, isModelNameTakenError, deleteModelProfile, MAX_MODEL_PROFILE_FALLBACKS, modelProfileFallbacksError, taskProfileError, scheduleProfileUpdate, init_model_profiles, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, STEERING_MOVED_ERROR, SteeringRequestError, SteeringBlockedError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering2, onTaskStarted, init_task_lifecycle_events, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, getPendingApprovalsForTasks2, approvalCancellationNotificationKey, listUndeliveredCancelledApprovalRequestIds, init_approvals, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, AssetKeyMovesBlockedError2, assertAssetKeyMovesAllowed2, moveTaskChainKeyInTx2, moveSessionChains, moveKeyFavorites, listPrefixRoots, listSharedPrefixRoots, init_session_moves, getSessionGroupKey, sessionSummaryQuery, getSessionReadState, getSessionTree, triageSessionList, init_session_tree, setHumanFreeQueueListener, reclassifyTaskHumanFree, drainHumanFreeReclassifyQueue, init_human_free, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, updateTaskTags2, setTaskTitleIfUnset2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, skipTask2, supersedeTask2, markWorkflowStepTaskSuperseded2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, init_write, quoteSqlIdentifier, USER_REFERENCE_COLUMNS_SQL, userReferenceRewriteSql, WORKFLOW_CONTEXT_REQUESTER_SQL, init_user_references, IdempotencyKeyTakenError, workflowRequestFingerprint, findAcceptedWorkflowOperation, assertWorkflowIdempotencyKeyUnused, recordAcceptedWorkflowOperation, init_workflow_idempotency, PINNED_WORKFLOW_KEYS2, toPinnedDefinition2, pinWorkflowDefinition2, getRunWorkflow2, deleteOrphanedRunDefinitions, init_workflow_run_definitions, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, setSkillUpdatedBy2, literalPrefixPattern2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db4 };
|