@desplega.ai/agent-swarm 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-adapter-weaaxey3.js +16 -0
- package/dist/{acp-targets-arrwv4f0.js → acp-targets-5wyy2b9m.js} +9 -9
- package/dist/{actions-y0d2n1c2.js → actions-4nxq386s.js} +24 -23
- package/dist/{agent-fs-provision-tpj7sktd.js → agent-fs-provision-v6enh76w.js} +4 -4
- package/dist/{amp-adapter-vmmnmw8d.js → amp-adapter-ze3x22qn.js} +3 -3
- package/dist/{anthropic-messages-zdca3gv1.js → anthropic-messages-88b7s3n9.js} +177 -25
- package/dist/{app-wb7w45dq.js → app-kyqt8ehw.js} +7 -6
- package/dist/{approval-notifications-7mqr6vbd.js → approval-notifications-a0db0esw.js} +7 -6
- package/dist/{assistant-gf60454p.js → assistant-9g5jzq25.js} +26 -25
- package/dist/{azure-openai-responses-b3y7fz36.js → azure-openai-responses-jeaas6x0.js} +10 -10
- package/dist/{boot-args-schema-qxmd59sr.js → boot-args-schema-d7fme4q1.js} +1 -1
- package/dist/{boot-reembed-wb44vc3s.js → boot-reembed-6wpazmpw.js} +1 -1
- package/dist/{boot-reembed-5tmeskj2.js → boot-reembed-jrwxeye2.js} +1 -1
- package/dist/{boot-scrub-sweep-25bxhnw4.js → boot-scrub-sweep-52h7yntp.js} +2 -2
- package/dist/{boot-seeds-nj9za0vk.js → boot-seeds-kb3dxjex.js} +4 -4
- package/dist/{boxd-wn235q80.js → boxd-jrrmkv3w.js} +2 -2
- package/dist/{claude-adapter-d3krpdyb.js → claude-adapter-0c0y8fqp.js} +8 -8
- package/dist/{claude-managed-adapter-t8nfgcgz.js → claude-managed-adapter-w2es07qq.js} +4 -4
- package/dist/{claude-managed-setup-7y4pwd81.js → claude-managed-setup-9ssb7ct4.js} +4 -4
- package/dist/{claude-sdk-session-d138zy0e.js → claude-sdk-session-p6t0gyse.js} +10941 -10412
- package/dist/{cli-p0n7b5rz.js → cli-075ccjh6.js} +344 -130
- package/dist/{cli-3caf7pmg.js → cli-0bgj4rh5.js} +3 -3
- package/dist/{cli-7r162fxe.js → cli-14xdms9a.js} +23 -17
- package/dist/{cli-rqx70rcz.js → cli-17qzb39j.js} +5 -2
- package/dist/{cli-y4ccxtz5.js → cli-1h4njv9y.js} +144 -6
- package/dist/{cli-6ym4jhzp.js → cli-27fat7st.js} +7 -7
- package/dist/{cli-k3q2va86.js → cli-2aacfdcn.js} +5 -5
- package/dist/{cli-vq2eg24x.js → cli-2gvdvsxj.js} +3 -3
- package/dist/{cli-sb4426be.js → cli-2jtfm8kh.js} +5 -5
- package/dist/{cli-6ehs4mta.js → cli-2z2c4k6q.js} +18 -4
- package/dist/{cli-6237rnyr.js → cli-3bpr3wks.js} +1 -1
- package/dist/{cli-5qhfv9rw.js → cli-453497a0.js} +44 -17
- package/dist/{cli-2rnd5j3t.js → cli-4aswccje.js} +2 -2
- package/dist/{cli-4ymxrwg5.js → cli-4dyzzkfb.js} +2 -2
- package/dist/{cli-p0c3vtch.js → cli-4g323fjh.js} +772 -515
- package/dist/{cli-3kd08rej.js → cli-4jjrhy48.js} +1 -1
- package/dist/{cli-fcfbct2j.js → cli-4kzp7r0q.js} +5 -5
- package/dist/{cli-kxn3747f.js → cli-4se3x6qm.js} +1 -26
- package/dist/{cli-zeh2mhkg.js → cli-5ptj757f.js} +1 -1
- package/dist/{cli-539h29es.js → cli-6a3j25xd.js} +224 -189
- package/dist/{cli-hnamkvnc.js → cli-6c9ve77f.js} +2 -2
- package/dist/{cli-3et6fmfe.js → cli-6n7y5ypy.js} +1 -1
- package/dist/{cli-8y43jx2r.js → cli-6p8p2e6r.js} +16 -9
- package/dist/{cli-zk7v5s89.js → cli-6tvh1fwq.js} +3 -3
- package/dist/{cli-p74md7t8.js → cli-7b7rxz22.js} +13 -15
- package/dist/{cli-5a6pqy45.js → cli-7e8sxqv5.js} +1 -1
- package/dist/{cli-6037prsx.js → cli-892y3vfp.js} +13 -13
- package/dist/cli-8mfdbdhe.js +43 -0
- package/dist/{cli-s1zqk1aj.js → cli-8zmpwe79.js} +15 -9
- package/dist/{cli-zcfpsfzf.js → cli-96234j5w.js} +3 -3
- package/dist/{cli-1z4qggfe.js → cli-9fvk9mv8.js} +30 -21
- package/dist/{cli-7mv4h3sn.js → cli-9g12h1aq.js} +2 -2
- package/dist/{cli-aw83sr40.js → cli-9knhkkgr.js} +3 -3
- package/dist/{cli-5mpy301f.js → cli-9t7syepg.js} +1 -1
- package/dist/{cli-qj39vrc6.js → cli-9yjhshah.js} +1 -1
- package/dist/{cli-6cwr32fe.js → cli-a02habn6.js} +422 -140
- package/dist/{cli-7evph51z.js → cli-a49frv85.js} +2 -2
- package/dist/{cli-3f8zbtqa.js → cli-a6q6x15h.js} +9 -8
- package/dist/{cli-j6te8keb.js → cli-atm0hkes.js} +8 -8
- package/dist/{cli-9fjr27ez.js → cli-b82a13ga.js} +13 -13
- package/dist/{cli-7zm3b3f5.js → cli-bf0t77nf.js} +1 -1
- package/dist/{cli-2xv18ywz.js → cli-bmqp0ser.js} +2 -2
- package/dist/{cli-mk7c5ac4.js → cli-bq97k63w.js} +2 -2
- package/dist/{cli-vfqvrd82.js → cli-cstggwq7.js} +2 -2
- package/dist/{cli-md50mj0r.js → cli-czvvnfr9.js} +3 -3
- package/dist/{cli-b6px1k1q.js → cli-dd2k2mcd.js} +1 -1
- package/dist/{cli-fq2rr3jb.js → cli-djt6wmrc.js} +6 -6
- package/dist/{cli-tsa40663.js → cli-ebqx630g.js} +3 -3
- package/dist/{cli-z0m452jr.js → cli-f7dhm7hh.js} +1 -1
- package/dist/{cli-mys27d03.js → cli-f8yhybxr.js} +3 -3
- package/dist/{cli-5gpqgs8b.js → cli-fwjwkw66.js} +2 -2
- package/dist/{cli-gabsjg8x.js → cli-g56fxddf.js} +1 -1
- package/dist/{cli-y8p78ekx.js → cli-h2qtafm4.js} +18 -18
- package/dist/{cli-psffsanb.js → cli-ha4ek2nb.js} +6 -1
- package/dist/{cli-th1dkc2v.js → cli-hnh8erra.js} +2 -2
- package/dist/{cli-w16kwbzw.js → cli-htymm48w.js} +1 -1
- package/dist/{cli-124ntmf0.js → cli-j2r1apqm.js} +138 -59
- package/dist/{cli-43ms35q9.js → cli-k3c13za2.js} +3 -3
- package/dist/{cli-54vrpgm0.js → cli-k3facve0.js} +8 -5
- package/dist/{cli-v8z0yga9.js → cli-k4r5sfaj.js} +4 -4
- package/dist/{cli-91pkxres.js → cli-kbm659dk.js} +2 -2
- package/dist/{cli-q5srsxq2.js → cli-m00c47q6.js} +110 -27
- package/dist/{cli-3aaeb78m.js → cli-mhrr4d5b.js} +95 -10
- package/dist/{cli-xqdz5cqm.js → cli-mz7ycqn8.js} +1 -0
- package/dist/{cli-qrta34nb.js → cli-n6ygvrrm.js} +4 -4
- package/dist/{cli-k5yewqgd.js → cli-nbakg5xh.js} +3 -3
- package/dist/{cli-nstkanmx.js → cli-nc39ym5q.js} +8 -8
- package/dist/{cli-01k6wpr9.js → cli-p1a4khta.js} +7 -7
- package/dist/{cli-t9ga4qmb.js → cli-p8zqbbt1.js} +40 -33
- package/dist/{cli-v46zsvqk.js → cli-ph95yejc.js} +2 -2
- package/dist/{cli-k6nejceb.js → cli-q4z9s6zs.js} +2 -2
- package/dist/{cli-kbtzfrxj.js → cli-q71g5q39.js} +3 -3
- package/dist/{cli-vs9vdpy0.js → cli-qncx2r0s.js} +1 -1
- package/dist/{cli-hg42n3hx.js → cli-qrzq3hvg.js} +8 -8
- package/dist/{cli-x40a0w9j.js → cli-r813c7rb.js} +1 -1
- package/dist/{cli-kpgcm7xy.js → cli-ramn8jae.js} +1 -1
- package/dist/{cli-cc93xzes.js → cli-raqw9fw9.js} +28 -17
- package/dist/cli-rhsc2zyx.js +68 -0
- package/dist/{cli-8st34zhr.js → cli-rpmw4fsv.js} +57 -19
- package/dist/{cli-had1p04a.js → cli-rwgwen5v.js} +4 -4
- package/dist/{cli-tr27kwyg.js → cli-rytq7dm2.js} +261 -6
- package/dist/{cli-s1khw52h.js → cli-s9twe4x0.js} +66 -17
- package/dist/{cli-2v2zdm0a.js → cli-t2s7j5cy.js} +2 -2
- package/dist/{cli-nv4xsvmk.js → cli-tb4j757d.js} +7 -7
- package/dist/{cli-q2d3e1k1.js → cli-thd3005a.js} +1 -1
- package/dist/cli-tsfkcd4v.js +30 -0
- package/dist/{cli-jrbq4djp.js → cli-v3zcnr8g.js} +1 -1
- package/dist/{cli-zfqg6fzn.js → cli-vbppqvte.js} +3 -3
- package/dist/{cli-qx4f057j.js → cli-vy3fn0mz.js} +4 -4
- package/dist/{cli-7sf9sb0w.js → cli-w5dar1bk.js} +1 -1
- package/dist/{cli-w1q68d8x.js → cli-wz4e5am2.js} +9 -9
- package/dist/{cli-m9cvf7vs.js → cli-xqbqwpxr.js} +14 -14
- package/dist/{cli-2spnz7ye.js → cli-ynph3b70.js} +11137 -8332
- package/dist/{cli-43evxwj4.js → cli-yvzxbztc.js} +9 -4
- package/dist/{cli-vsw91x06.js → cli-yzxqwcvq.js} +3 -6
- package/dist/{cli-wafmk3fn.js → cli-zb1hff00.js} +12 -12
- package/dist/{cli-yab6sh8p.js → cli-zcghfsdg.js} +23 -4
- package/dist/{cli-wwp1bd3n.js → cli-zhn4r1rz.js} +519 -75
- package/dist/{cli-tvgqesec.js → cli-zqq57pgx.js} +4 -4
- package/dist/cli.js +28 -27
- package/dist/{cloudflare-workers-ai-system-one-4aysy6rh.js → cloudflare-workers-ai-system-one-w3m0fbf8.js} +2 -2
- package/dist/{codex-adapter-exfdbj73.js → codex-adapter-ssahg4h4.js} +8 -8
- package/dist/{codex-hook-59atdwd8.js → codex-hook-aqtj17yr.js} +1 -1
- package/dist/{codex-login-a239g1ah.js → codex-login-9c7aggxe.js} +1 -1
- package/dist/{codex-session-runner-xhznc4g3.js → codex-session-runner-xn63q3h7.js} +9 -9
- package/dist/{commands-d8g349v4.js → commands-ctey7tr5.js} +3 -3
- package/dist/{controller-mwgdmb8y.js → controller-rqhbppg9.js} +4 -4
- package/dist/{controllers-connect-5v7qx04j.js → controllers-connect-w3qbpbt1.js} +22 -21
- package/dist/{core-sxy4epp2.js → core-df1n049h.js} +19 -18
- package/dist/{cursor-adapter-p2q5h35d.js → cursor-adapter-r819hf1a.js} +2 -2
- package/dist/{db-wcw0b2j8.js → db-2ah39cyx.js} +2 -2
- package/dist/{db-qpganbeb.js → db-p5drc1d1.js} +3 -3
- package/dist/{devin-adapter-zp4tqq53.js → devin-adapter-bc6g0x29.js} +1 -1
- package/dist/{dispatcher-8d8s49yz.js → dispatcher-x6w14pde.js} +19 -18
- package/dist/{docker-09tkkg0n.js → docker-6c4reetq.js} +51 -14
- package/dist/{dsh-adapter-me0twn13.js → dsh-adapter-h8qn14n4.js} +2 -2
- package/dist/{e2b-sm28k0k3.js → e2b-jg7kyyef.js} +6 -6
- package/dist/{e2b-3v1e745x.js → e2b-z4ec0qve.js} +3 -3
- package/dist/{easter-egg-3d-wv7w5ty6.js → easter-egg-3d-1y6r9gxy.js} +1 -1
- package/dist/{embedding-space-e48xchqa.js → embedding-space-z6ptw3jk.js} +6 -6
- package/dist/{embeddings-tgq2afbq.js → embeddings-0sxb1d2h.js} +1 -1
- package/dist/{event-bus-xr83x566.js → event-bus-swr88jg5.js} +1 -1
- package/dist/{execute-8rhwrk7f.js → execute-6m1ex8ce.js} +8 -4
- package/dist/{external-channel-8bt3j2pm.js → external-channel-ezer7pk0.js} +2 -2
- package/dist/fx-adapter-zwmps9re.js +19 -0
- package/dist/{google-generative-ai-bh0djqjp.js → google-generative-ai-sw77egmr.js} +9 -9
- package/dist/{google-vertex-prjbw8dj.js → google-vertex-rrw93g8h.js} +9 -9
- package/dist/grok-adapter-q0avf919.js +19 -0
- package/dist/handlers-g5jq0e4q.js +36 -0
- package/dist/{heartbeat-x0056ra5.js → heartbeat-6c4fr49t.js} +22 -21
- package/dist/{hook-mrd2ayxv.js → hook-02rt5tvq.js} +8 -8
- package/dist/{hook-a7vmn2st.js → hook-t1c5avbv.js} +5 -5
- package/dist/{http-ym9c5svp.js → http-qa3h32a1.js} +2049 -148
- package/dist/index-1f6m47mq.js +37 -0
- package/dist/index-1p1mpqda.js +36 -0
- package/dist/{index-p46tvwtx.js → index-akbgsdhh.js} +25 -24
- package/dist/{index-ny60jcat.js → index-e42j998x.js} +16 -13
- package/dist/{index-b5wgnm78.js → index-kdmkfjt7.js} +4 -4
- package/dist/{index-01ns1pkw.js → index-kqv9ebfj.js} +1 -1
- package/dist/{index-9myfj74s.js → index-kzdqn3dd.js} +3 -3
- package/dist/{index-4a0670yh.js → index-p2f5xg64.js} +6 -6
- package/dist/{index-x6azjwm8.js → index-qpjk2hxk.js} +1 -1
- package/dist/index-tnkd410q.js +41 -0
- package/dist/{k8s-m56sw868.js → k8s-7jrh5va2.js} +73 -14
- package/dist/{keepalive-7yxg8z4c.js → keepalive-jmf6pn8c.js} +4 -4
- package/dist/lead-m5e7xt93.js +75 -0
- package/dist/{llama-cpp-classify-nfgswa1m.js → llama-cpp-classify-yvb8vh7w.js} +2 -2
- package/dist/{maintenance-6tefxmk1.js → maintenance-g7v15tj1.js} +1 -1
- package/dist/{mistral-conversations-tm2vd4gc.js → mistral-conversations-w4bncwbt.js} +7 -7
- package/dist/{node-7qsx5kvm.js → node-z67yjre7.js} +19 -13
- package/dist/{oauth-refresh-sweep-70cavc3a.js → oauth-refresh-sweep-ywgf8tbr.js} +3 -3
- package/dist/{onboard-fja65z08.js → onboard-m3fedypq.js} +3 -3
- package/dist/{openai-codex-responses-sxjv60xx.js → openai-codex-responses-70g39cgz.js} +20 -14
- package/dist/{openai-completions-0c7qnhsx.js → openai-completions-cv3hp4h5.js} +18 -11
- package/dist/{openai-decisions-ytp6w6xh.js → openai-decisions-fyq1p9f9.js} +2 -2
- package/dist/{openai-responses-a7h29chp.js → openai-responses-trsvnks6.js} +13 -11
- package/dist/{opencode-adapter-hakkm7yh.js → opencode-adapter-19ktcbb9.js} +7 -7
- package/dist/{openrouter-images-xr9gme9x.js → openrouter-images-0jj12a2q.js} +6 -6
- package/dist/{otel-impl-7zhnt6gj.js → otel-impl-3ehm1hgc.js} +2 -2
- package/dist/{pending-h01yzpx4.js → pending-fwj2fatd.js} +20 -19
- package/dist/{pi-messages-2j0fpqwq.js → pi-messages-zk3g4esn.js} +1 -1
- package/dist/{pi-mono-adapter-f52hz743.js → pi-mono-adapter-xdeesvc4.js} +18 -17
- package/dist/{pricing-refresh-fzxvk2zf.js → pricing-refresh-4j8dzvxg.js} +2 -2
- package/dist/{rbac-roles-9v6vhgbs.js → rbac-roles-8msjr07m.js} +3 -3
- package/dist/{rbac-roles-hfgh8sba.js → rbac-roles-n7t2acv8.js} +2 -2
- package/dist/{render-v2-1rgspxzf.js → render-v2-j7qggj8h.js} +7 -6
- package/dist/{resume-tqy61x24.js → resume-hj1mn65y.js} +9 -8
- package/dist/{runtime-exkxyx5f.js → runtime-z31mdsgv.js} +2 -2
- package/dist/{session-access-3act7vt4.js → session-access-w38fh09a.js} +4 -4
- package/dist/{session-source-backfill-82qe7fqq.js → session-source-backfill-ax6qxv20.js} +3 -3
- package/dist/{setup-ry1vfdef.js → setup-dsqmpfcr.js} +1 -1
- package/dist/thread-buffer-nf55vwx3.js +39 -0
- package/dist/tree-visibility-6vqmnr71.js +24 -0
- package/dist/{typesafe-system-one-vcfj2ak8.js → typesafe-system-one-qkvkgrcz.js} +2 -2
- package/dist/{user-merge-jobs-bx6bf7db.js → user-merge-jobs-mvheb3ed.js} +3 -3
- package/dist/{virtual-modules-s0rjzcqq.js → virtual-modules-w2qk2wew.js} +32 -10
- package/dist/{work-objects-z2e5tv03.js → work-objects-4ahy5es5.js} +22 -21
- package/dist/worker-ews1nyhw.js +75 -0
- package/dist/{worker-follow-up-y3xeg89w.js → worker-follow-up-1gs4aw7y.js} +19 -18
- package/dist/{x-wg164ss9.js → x-3wr8c5sh.js} +2 -2
- package/openapi.json +995 -49
- package/package.json +9 -8
- package/src/be/db/request-composition.ts +190 -0
- package/src/be/db/runtime.ts +15 -0
- package/src/be/db/slack-trees.ts +220 -10
- package/src/be/db/tasks/human-free.ts +3 -2
- package/src/be/db/workflow-run-retention.ts +101 -0
- package/src/be/db-client.ts +23 -1
- package/src/be/db-retention-defaults.ts +46 -0
- package/src/be/db-retention.ts +55 -6
- package/src/be/mcp-events/catalog.ts +108 -0
- package/src/be/mcp-events/dispatcher.ts +202 -0
- package/src/be/mcp-events/protocol.ts +296 -0
- package/src/be/mcp-events/store.ts +231 -0
- package/src/be/mcp-events/webhook.ts +226 -0
- package/src/be/memory/providers/sqlite-store.ts +110 -24
- package/src/be/memory/review-recall-filter.ts +22 -0
- package/src/be/memory/search-candidates.ts +5 -7
- package/src/be/memory/types.ts +5 -0
- package/src/be/migrations/322_runtime_pool_workspace.sql +8 -0
- package/src/be/migrations/323_slack_task_tree_visibility.sql +9 -0
- package/src/be/migrations/326_slack_reconcile_pages.sql +13 -0
- package/src/be/migrations/327_mcp_event_subscriptions.sql +57 -0
- package/src/be/migrations/329_workflow_run_retention.sql +9 -0
- package/src/be/migrations/330_request_composition.sql +22 -0
- package/src/be/model-profile-check.ts +1 -1
- package/src/be/multi-runtime.ts +32 -4
- package/src/be/runtime-pools/controllers.ts +18 -3
- package/src/be/runtime-pools/db.ts +15 -4
- package/src/be/runtime-pools/supervisor.ts +42 -2
- package/src/be/swarm-config-guard.ts +10 -2
- package/src/commands/context-preamble.ts +11 -4
- package/src/commands/credential-outcome-report.ts +33 -9
- package/src/commands/e2b-stack-wizard.tsx +12 -6
- package/src/commands/runner.ts +116 -12
- package/src/extensions/catalog.generated.json +1 -1
- package/src/github/app.ts +59 -14
- package/src/http/all-routes.ts +2 -0
- package/src/http/config.ts +2 -1
- package/src/http/core.ts +2 -0
- package/src/http/github-token.ts +66 -0
- package/src/http/index.ts +21 -0
- package/src/http/mcp-user.ts +11 -8
- package/src/http/mcp.ts +58 -42
- package/src/http/prompt-templates.ts +1 -0
- package/src/http/request-composition.ts +310 -0
- package/src/http/tasks.ts +6 -1
- package/src/http/tool-schema-estimate.ts +95 -0
- package/src/http/workflows.ts +29 -11
- package/src/integrations/chat-sdk/inbound.ts +2 -2
- package/src/prompts/base-prompt.ts +133 -7
- package/src/prompts/resolver.ts +41 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/opencode-adapter.ts +72 -1
- package/src/providers/opencode-swarm-plugin.ts +22 -3
- package/src/providers/pi-mono-adapter.ts +1 -0
- package/src/providers/pi-mono-extension.ts +71 -0
- package/src/providers/pricing-sources.md +4 -0
- package/src/providers/request-composition-hook.ts +312 -0
- package/src/providers/types.ts +5 -0
- package/src/runtime-providers/controller-protocol.ts +7 -0
- package/src/runtime-providers/docker.ts +80 -12
- package/src/runtime-providers/k8s.ts +111 -6
- package/src/runtime-providers/types.ts +17 -0
- package/src/scheduler/scheduler.ts +1 -1
- package/src/server-user.ts +16 -1
- package/src/slack/ack.ts +10 -5
- package/src/slack/actions.ts +3 -3
- package/src/slack/app.ts +2 -0
- package/src/slack/assistant.ts +4 -4
- package/src/slack/blocks.ts +3 -3
- package/src/slack/handlers.ts +3 -3
- package/src/slack/reaction-shortcode.ts +23 -2
- package/src/slack/render-v2.ts +297 -200
- package/src/slack/responses.ts +7 -5
- package/src/slack/thread-buffer.ts +3 -3
- package/src/slack/tree-visibility.ts +64 -0
- package/src/tasks/worker-follow-up.ts +127 -17
- package/src/tests/azure-devops-outbound.test.ts +47 -14
- package/src/tests/base-prompt.test.ts +149 -1
- package/src/tests/check-playwright-version.test.ts +33 -0
- package/src/tests/context-preamble-budget.test.ts +65 -0
- package/src/tests/credential-outcome-report.test.ts +81 -1
- package/src/tests/db-client.test.ts +22 -0
- package/src/tests/db-retention-defaults.test.ts +244 -0
- package/src/tests/db-retention.test.ts +2 -1
- package/src/tests/db-runtime.test.ts +2 -1
- package/src/tests/deploy-release-dispatch.test.ts +332 -0
- package/src/tests/e2b-stack-wizard.test.tsx +156 -0
- package/src/tests/entrypoint-chown-no-follow.test.ts +69 -0
- package/src/tests/entrypoint-repo-clone-target.test.ts +112 -0
- package/src/tests/env-flag.test.ts +4 -2
- package/src/tests/event-loop-lag.test.ts +12 -18
- package/src/tests/extensions-example-slack-reply-gate.test.ts +15 -0
- package/src/tests/fixtures/base-prompt-baseline-cases.ts +78 -0
- package/src/tests/fixtures/base-prompt-baseline.json +18 -0
- package/src/tests/github-app-worker-auth-helper.test.ts +325 -0
- package/src/tests/github-installation-token-route.test.ts +199 -0
- package/src/tests/mcp-user-events.test.ts +708 -0
- package/src/tests/memory-key-paths.test.ts +4 -1
- package/src/tests/memory-search-stall.test.ts +421 -0
- package/src/tests/migration-322-runtime-pool-workspace.test.ts +116 -0
- package/src/tests/migration-329-workflow-run-retention.test.ts +32 -0
- package/src/tests/model-profile-fallbacks.test.ts +236 -2
- package/src/tests/opencode-adapter.test.ts +86 -0
- package/src/tests/pi-mono-extension.test.ts +168 -0
- package/src/tests/preload-env.test.ts +61 -1
- package/src/tests/preload.ts +22 -0
- package/src/tests/prompt-template-resolver.test.ts +85 -0
- package/src/tests/reload-config.test.ts +45 -0
- package/src/tests/request-composition.test.ts +447 -0
- package/src/tests/runner-max-concurrent.test.ts +86 -0
- package/src/tests/runtime-pools-db.test.ts +80 -0
- package/src/tests/runtime-provider-registration.test.ts +8 -0
- package/src/tests/runtime-providers-docker.test.ts +192 -1
- package/src/tests/runtime-providers-k8s.test.ts +127 -0
- package/src/tests/runtime-remote-controller.test.ts +64 -1
- package/src/tests/runtime-supervisor.test.ts +101 -0
- package/src/tests/script-connections.test.ts +8 -0
- package/src/tests/slack-blocks.test.ts +18 -0
- package/src/tests/slack-empty-icon-config.test.ts +113 -0
- package/src/tests/slack-reaction-config.test.ts +38 -2
- package/src/tests/slack-render-v2-query-plans.test.ts +100 -1
- package/src/tests/slack-render-v2-reconcile.test.ts +75 -4
- package/src/tests/slack-render-v2.test.ts +683 -11
- package/src/tests/swarm-config-reserved-keys.test.ts +1 -0
- package/src/tests/task-session-prompts.test.ts +37 -0
- package/src/tests/user-delete-perf.test.ts +36 -9
- package/src/tests/webhook-filter.test.ts +327 -0
- package/src/tests/workflow-async-v2.test.ts +19 -16
- package/src/tests/workflow-definition-telemetry.test.ts +15 -5
- package/src/tests/workflow-e2e.test.ts +1 -9
- package/src/tests/workflow-finalization-races.test.ts +553 -0
- package/src/tests/workflow-foreach.test.ts +2 -0
- package/src/tests/workflow-hitl-routing.test.ts +26 -20
- package/src/tests/workflow-http-v2.test.ts +105 -2
- package/src/tests/workflow-idempotency.test.ts +41 -0
- package/src/tests/workflow-mcp-webhook-filter.test.ts +214 -0
- package/src/tests/workflow-parallel-park.test.ts +297 -0
- package/src/tests/workflow-retry-v2.test.ts +57 -21
- package/src/tests/workflow-retry-validation.test.ts +13 -13
- package/src/tests/workflow-runs-retention.test.ts +533 -0
- package/src/tests/workflow-script-principal.test.ts +7 -2
- package/src/tests/workflow-tla-races.test.ts +7 -2
- package/src/tests/workflow-triggers-v2.test.ts +201 -0
- package/src/tests/workflow-wait-builtin-events.test.ts +3 -1
- package/src/tests/workflow-wait-event.test.ts +28 -2
- package/src/tests/workflow-wait-poller.test.ts +94 -0
- package/src/tests/workflow-wait-time.test.ts +7 -3
- package/src/tests/workflow-wait.test.ts +26 -0
- package/src/tests/workflow-wait.ts +44 -0
- package/src/tools/workflows/create-workflow.ts +7 -3
- package/src/tools/workflows/update-workflow.ts +7 -3
- package/src/types.ts +200 -2
- package/src/utils/credentials.ts +7 -0
- package/src/workflows/checkpoint.ts +18 -0
- package/src/workflows/engine.ts +38 -10
- package/src/workflows/foreach-driver.ts +42 -4
- package/src/workflows/recovery.ts +6 -1
- package/src/workflows/resume.ts +11 -3
- package/src/workflows/retry-poller.ts +17 -4
- package/src/workflows/successor-routing.ts +108 -0
- package/src/workflows/task-step-routing.ts +5 -2
- package/src/workflows/triggers.ts +21 -36
- package/src/workflows/wait-poller.ts +6 -2
- package/src/workflows/webhook-filter.ts +203 -0
- package/templates/extensions/slack-reply-gate/hooks.ts +8 -4
- package/templates/skills/swarm-docs/content.md +2 -0
- package/dist/acp-adapter-bht22g3k.js +0 -16
- package/dist/fx-adapter-adtdb3jb.js +0 -19
- package/dist/grok-adapter-accnn9km.js +0 -19
- package/dist/handlers-1x77561e.js +0 -35
- package/dist/index-48qzcqzj.js +0 -35
- package/dist/index-rkvaambe.js +0 -36
- package/dist/index-xj1mq27m.js +0 -40
- package/dist/lead-enzn86bz.js +0 -74
- package/dist/thread-buffer-3x93yexa.js +0 -38
- package/dist/worker-zfcv2wbf.js +0 -74
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertProviderQuotaCapacity,
|
|
3
|
+
parseProviderAccount,
|
|
4
|
+
applyProviderQuotaReport,
|
|
5
|
+
scrubProviderQuotaReport,
|
|
6
|
+
init_provider_account_telemetry
|
|
7
|
+
} from "./cli-k3c13za2.js";
|
|
1
8
|
import {
|
|
2
9
|
resolveGitHubHost,
|
|
3
10
|
getGitHubLinkConfig,
|
|
@@ -9,18 +16,11 @@ import {
|
|
|
9
16
|
ampPinCatalogError,
|
|
10
17
|
ampModelError,
|
|
11
18
|
init_amp_models
|
|
12
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-5ptj757f.js";
|
|
13
20
|
import {
|
|
14
21
|
ALL_TOOLS,
|
|
15
22
|
init_tool_config
|
|
16
23
|
} from "./cli-0b4zam62.js";
|
|
17
|
-
import {
|
|
18
|
-
assertProviderQuotaCapacity,
|
|
19
|
-
parseProviderAccount,
|
|
20
|
-
applyProviderQuotaReport,
|
|
21
|
-
scrubProviderQuotaReport,
|
|
22
|
-
init_provider_account_telemetry
|
|
23
|
-
} from "./cli-43ms35q9.js";
|
|
24
24
|
import {
|
|
25
25
|
CODEX_AUTH_FAILURE_BENCH_THRESHOLD,
|
|
26
26
|
CODEX_AUTH_FAILURE_BENCH_MS,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
66
66
|
PageThemeTokensSchema,
|
|
67
67
|
init_types5
|
|
68
|
-
} from "./cli-
|
|
68
|
+
} from "./cli-1h4njv9y.js";
|
|
69
69
|
import {
|
|
70
70
|
init_templates4,
|
|
71
71
|
generateDefaultClaudeMd2,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
init_identity_field_budget,
|
|
81
81
|
contentSha256,
|
|
82
82
|
init_profile_sync
|
|
83
|
-
} from "./cli-
|
|
83
|
+
} from "./cli-mhrr4d5b.js";
|
|
84
84
|
import {
|
|
85
85
|
isSteeringEnabled2,
|
|
86
86
|
init_steering_enabled
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
splitCredentialPool,
|
|
109
109
|
selectCredential,
|
|
110
110
|
init_credentials2
|
|
111
|
-
} from "./cli-
|
|
111
|
+
} from "./cli-ha4ek2nb.js";
|
|
112
112
|
import {
|
|
113
113
|
getOpenRouterAttributionHeaders,
|
|
114
114
|
init_openrouter_base_url
|
|
@@ -120,15 +120,15 @@ import {
|
|
|
120
120
|
configureDbResolver,
|
|
121
121
|
init_resolver,
|
|
122
122
|
init_session_templates
|
|
123
|
-
} from "./cli-
|
|
123
|
+
} from "./cli-2z2c4k6q.js";
|
|
124
124
|
import {
|
|
125
125
|
setRuntimeModelCatalog,
|
|
126
126
|
runtimeHarnessSections,
|
|
127
127
|
init_runtime_model_catalog
|
|
128
|
-
} from "./cli-
|
|
128
|
+
} from "./cli-9yjhshah.js";
|
|
129
129
|
import {
|
|
130
130
|
init_zod
|
|
131
|
-
} from "./cli-
|
|
131
|
+
} from "./cli-96234j5w.js";
|
|
132
132
|
import {
|
|
133
133
|
string2,
|
|
134
134
|
uuid,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
_enum2,
|
|
146
146
|
literal2,
|
|
147
147
|
exports_iso
|
|
148
|
-
} from "./cli-
|
|
148
|
+
} from "./cli-qrzq3hvg.js";
|
|
149
149
|
import {
|
|
150
150
|
isEnvFlagEnabled,
|
|
151
151
|
init_env_flag
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
import {
|
|
154
154
|
init_package,
|
|
155
155
|
package_default
|
|
156
|
-
} from "./cli-
|
|
156
|
+
} from "./cli-a6q6x15h.js";
|
|
157
157
|
import {
|
|
158
158
|
getNodeEnv,
|
|
159
159
|
init_node_env
|
|
@@ -184,7 +184,7 @@ import {
|
|
|
184
184
|
registerVolatileSecret,
|
|
185
185
|
registerSensitiveKeyName,
|
|
186
186
|
init_secret_scrubber
|
|
187
|
-
} from "./cli-
|
|
187
|
+
} from "./cli-7e8sxqv5.js";
|
|
188
188
|
import {
|
|
189
189
|
__toCommonJS,
|
|
190
190
|
__commonJS,
|
|
@@ -493,6 +493,7 @@ var init_default_bindings = __esm(() => {
|
|
|
493
493
|
});
|
|
494
494
|
|
|
495
495
|
// src/utils/egress-guard.ts
|
|
496
|
+
import { lookup } from "node:dns/promises";
|
|
496
497
|
function parseIPv4(host) {
|
|
497
498
|
const parts = host.split(".");
|
|
498
499
|
if (parts.length !== 4)
|
|
@@ -648,6 +649,227 @@ function assertUrlSafe(rawUrl, opts = {}) {
|
|
|
648
649
|
}
|
|
649
650
|
return parsed;
|
|
650
651
|
}
|
|
652
|
+
function nextHopRequest(status, from, to, request) {
|
|
653
|
+
const headers = new Headers(request.headers);
|
|
654
|
+
if (to.origin !== from.origin) {
|
|
655
|
+
for (const name of CREDENTIAL_HEADERS)
|
|
656
|
+
headers.delete(name);
|
|
657
|
+
}
|
|
658
|
+
const method = request.method.toUpperCase();
|
|
659
|
+
const toGet = status === 303 ? method !== "HEAD" : (status === 301 || status === 302) && method === "POST";
|
|
660
|
+
if (!toGet)
|
|
661
|
+
return { method, headers, body: request.body };
|
|
662
|
+
headers.delete("content-type");
|
|
663
|
+
headers.delete("content-length");
|
|
664
|
+
return { method: "GET", headers, body: undefined };
|
|
665
|
+
}
|
|
666
|
+
async function defaultResolve(hostname) {
|
|
667
|
+
const records = await lookup(hostname, { all: true, verbatim: true });
|
|
668
|
+
return records.map((record) => record.address);
|
|
669
|
+
}
|
|
670
|
+
function effectivePort(url) {
|
|
671
|
+
if (url.port)
|
|
672
|
+
return url.port;
|
|
673
|
+
return url.protocol === "https:" ? "443" : "80";
|
|
674
|
+
}
|
|
675
|
+
function matchesAllowlist(url, allowlist) {
|
|
676
|
+
const host = stripBrackets(url.hostname.toLowerCase()).replace(/\.$/, "");
|
|
677
|
+
const port = effectivePort(url);
|
|
678
|
+
return allowlist.some((rawEntry) => {
|
|
679
|
+
const entry = rawEntry.trim().toLowerCase();
|
|
680
|
+
if (!entry)
|
|
681
|
+
return false;
|
|
682
|
+
let entryHost = entry;
|
|
683
|
+
let entryPort = null;
|
|
684
|
+
const bracketed = /^\[([^\]]+)\](?::(\d+))?$/.exec(entry);
|
|
685
|
+
if (bracketed) {
|
|
686
|
+
entryHost = bracketed[1] ?? "";
|
|
687
|
+
entryPort = bracketed[2] ?? null;
|
|
688
|
+
} else if ((entry.match(/:/g) ?? []).length === 1) {
|
|
689
|
+
const [name, portText] = entry.split(":");
|
|
690
|
+
entryHost = name ?? "";
|
|
691
|
+
entryPort = portText ?? null;
|
|
692
|
+
}
|
|
693
|
+
if (entryPort !== null && entryPort !== port)
|
|
694
|
+
return false;
|
|
695
|
+
if (entryHost.startsWith("*.")) {
|
|
696
|
+
const suffix = entryHost.slice(1);
|
|
697
|
+
return host.endsWith(suffix) && host.length > suffix.length;
|
|
698
|
+
}
|
|
699
|
+
return host === entryHost;
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
async function assertEgressAllowed(url, options) {
|
|
703
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
704
|
+
if (url.protocol === "data:" || url.protocol === "blob:")
|
|
705
|
+
return null;
|
|
706
|
+
throw new EgressDeniedError(`Script egress refused: unsupported protocol ${url.protocol}`);
|
|
707
|
+
}
|
|
708
|
+
if (options.isTrusted?.(url))
|
|
709
|
+
return null;
|
|
710
|
+
const { policy } = options;
|
|
711
|
+
if (policy.allowlist && policy.allowlist.length > 0) {
|
|
712
|
+
if (matchesAllowlist(url, policy.allowlist))
|
|
713
|
+
return null;
|
|
714
|
+
throw new EgressDeniedError(`Script egress refused: ${url.host} is not in SCRIPT_EGRESS_ALLOWLIST`);
|
|
715
|
+
}
|
|
716
|
+
if (policy.allowPrivate)
|
|
717
|
+
return null;
|
|
718
|
+
const host = stripBrackets(url.hostname);
|
|
719
|
+
const denied = () => new EgressDeniedError(`Script egress refused: ${url.host} is a private or loopback address. Add it to SCRIPT_EGRESS_ALLOWLIST or set SCRIPT_EGRESS_ALLOW_PRIVATE=true`);
|
|
720
|
+
if (isLoopbackName(host))
|
|
721
|
+
throw denied();
|
|
722
|
+
if (isIPv4Literal(host) || isIPv6Literal(host)) {
|
|
723
|
+
if (isPrivateAddress(host))
|
|
724
|
+
throw denied();
|
|
725
|
+
return null;
|
|
726
|
+
}
|
|
727
|
+
let addresses;
|
|
728
|
+
try {
|
|
729
|
+
addresses = await (options.resolve ?? defaultResolve)(host);
|
|
730
|
+
} catch (error) {
|
|
731
|
+
throw new EgressDeniedError(`Script egress refused: could not resolve ${host} (${error instanceof Error ? error.message : String(error)})`);
|
|
732
|
+
}
|
|
733
|
+
if (addresses.length === 0) {
|
|
734
|
+
throw new EgressDeniedError(`Script egress refused: ${host} resolved to no address`);
|
|
735
|
+
}
|
|
736
|
+
if (addresses.some(isPrivateAddress))
|
|
737
|
+
throw denied();
|
|
738
|
+
return addresses.find(isIPv4Literal) ?? addresses[0];
|
|
739
|
+
}
|
|
740
|
+
function pinToAddress(url, address, init) {
|
|
741
|
+
const target = new URL(url.href);
|
|
742
|
+
target.hostname = isIPv6Literal(address) ? `[${stripBrackets(address)}]` : address;
|
|
743
|
+
const headers = new Headers(init.headers);
|
|
744
|
+
if (!headers.has("host"))
|
|
745
|
+
headers.set("host", url.host);
|
|
746
|
+
const pinned = { ...init, headers };
|
|
747
|
+
if (url.protocol === "https:") {
|
|
748
|
+
const callerTls = init.tls;
|
|
749
|
+
pinned.tls = { ...callerTls, serverName: url.hostname.replace(/\.$/, "") };
|
|
750
|
+
}
|
|
751
|
+
return [target, pinned];
|
|
752
|
+
}
|
|
753
|
+
function chunkBytes(chunk) {
|
|
754
|
+
if (typeof chunk === "string")
|
|
755
|
+
return new TextEncoder().encode(chunk);
|
|
756
|
+
if (chunk instanceof ArrayBuffer)
|
|
757
|
+
return new Uint8Array(chunk);
|
|
758
|
+
if (ArrayBuffer.isView(chunk)) {
|
|
759
|
+
return new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);
|
|
760
|
+
}
|
|
761
|
+
throw new TypeError("Request body stream yielded a chunk that is not bytes or a string");
|
|
762
|
+
}
|
|
763
|
+
async function replayableBody(body, signal, maxBytes = MAX_REPLAY_BODY_BYTES) {
|
|
764
|
+
if (!(body instanceof ReadableStream))
|
|
765
|
+
return { body: body ?? undefined, replayable: true };
|
|
766
|
+
const reader = body.getReader();
|
|
767
|
+
const onAbort = () => {
|
|
768
|
+
reader.cancel(signal?.reason).catch(() => {});
|
|
769
|
+
};
|
|
770
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
771
|
+
const chunks = [];
|
|
772
|
+
let size = 0;
|
|
773
|
+
let overCap = false;
|
|
774
|
+
try {
|
|
775
|
+
for (;; ) {
|
|
776
|
+
signal?.throwIfAborted();
|
|
777
|
+
const { done, value } = await reader.read();
|
|
778
|
+
signal?.throwIfAborted();
|
|
779
|
+
if (done)
|
|
780
|
+
break;
|
|
781
|
+
const bytes = chunkBytes(value);
|
|
782
|
+
size += bytes.byteLength;
|
|
783
|
+
chunks.push(bytes);
|
|
784
|
+
if (size > maxBytes) {
|
|
785
|
+
overCap = true;
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
} catch (error) {
|
|
790
|
+
reader.cancel(error).catch(() => {});
|
|
791
|
+
reader.releaseLock();
|
|
792
|
+
throw error;
|
|
793
|
+
} finally {
|
|
794
|
+
signal?.removeEventListener("abort", onAbort);
|
|
795
|
+
}
|
|
796
|
+
if (overCap) {
|
|
797
|
+
const stream = new ReadableStream({
|
|
798
|
+
start(controller) {
|
|
799
|
+
for (const chunk of chunks.splice(0))
|
|
800
|
+
controller.enqueue(chunk);
|
|
801
|
+
},
|
|
802
|
+
async pull(controller) {
|
|
803
|
+
const { done, value } = await reader.read();
|
|
804
|
+
if (done)
|
|
805
|
+
controller.close();
|
|
806
|
+
else
|
|
807
|
+
controller.enqueue(chunkBytes(value));
|
|
808
|
+
},
|
|
809
|
+
cancel(reason) {
|
|
810
|
+
return reader.cancel(reason);
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
return { body: stream, replayable: false };
|
|
814
|
+
}
|
|
815
|
+
reader.releaseLock();
|
|
816
|
+
const out = new Uint8Array(size);
|
|
817
|
+
let offset = 0;
|
|
818
|
+
for (const chunk of chunks) {
|
|
819
|
+
out.set(chunk, offset);
|
|
820
|
+
offset += chunk.byteLength;
|
|
821
|
+
}
|
|
822
|
+
return { body: out, replayable: true };
|
|
823
|
+
}
|
|
824
|
+
function createGuardedFetch(baseFetch, options) {
|
|
825
|
+
const guarded = async (input, init) => {
|
|
826
|
+
const request = input instanceof Request ? input : null;
|
|
827
|
+
let url = new URL(input instanceof Request ? input.url : input instanceof URL ? input.href : input);
|
|
828
|
+
const mode = init?.redirect ?? request?.redirect ?? "follow";
|
|
829
|
+
let method = (init?.method ?? request?.method ?? "GET").toUpperCase();
|
|
830
|
+
let headers = new Headers(init?.headers ?? request?.headers);
|
|
831
|
+
const signal = init?.signal ?? request?.signal;
|
|
832
|
+
let body = init?.body ?? (request ? request.body : undefined);
|
|
833
|
+
let replayable = true;
|
|
834
|
+
if (mode === "follow")
|
|
835
|
+
({ body, replayable } = await replayableBody(body, signal));
|
|
836
|
+
for (let hop = 0;; hop++) {
|
|
837
|
+
const address = await assertEgressAllowed(url, options);
|
|
838
|
+
const hopInit = {
|
|
839
|
+
...init,
|
|
840
|
+
method,
|
|
841
|
+
headers,
|
|
842
|
+
body,
|
|
843
|
+
signal,
|
|
844
|
+
redirect: "manual"
|
|
845
|
+
};
|
|
846
|
+
const response = address ? await baseFetch(...pinToAddress(url, address, hopInit)) : await baseFetch(url, hopInit);
|
|
847
|
+
if (address)
|
|
848
|
+
Object.defineProperty(response, "url", { value: url.href });
|
|
849
|
+
if (!REDIRECT_STATUSES.has(response.status) || mode === "manual")
|
|
850
|
+
return response;
|
|
851
|
+
const location = response.headers.get("location");
|
|
852
|
+
if (!location)
|
|
853
|
+
return response;
|
|
854
|
+
if (mode === "error")
|
|
855
|
+
throw new TypeError(`fetch redirect refused (redirect: "error"): ${url.href}`);
|
|
856
|
+
if (hop >= MAX_REDIRECTS) {
|
|
857
|
+
throw new EgressDeniedError(`Script egress refused: more than ${MAX_REDIRECTS} redirects`);
|
|
858
|
+
}
|
|
859
|
+
await response.body?.cancel().catch(() => {});
|
|
860
|
+
const next = new URL(location, url);
|
|
861
|
+
({ method, headers, body } = nextHopRequest(response.status, url, next, {
|
|
862
|
+
method,
|
|
863
|
+
headers,
|
|
864
|
+
body
|
|
865
|
+
}));
|
|
866
|
+
if (!replayable && body !== undefined)
|
|
867
|
+
throw new RequestBodyTooLargeError(MAX_REPLAY_BODY_BYTES);
|
|
868
|
+
url = next;
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
return Object.assign(guarded, { preconnect: baseFetch.preconnect });
|
|
872
|
+
}
|
|
651
873
|
function parseEgressAllowlist(value) {
|
|
652
874
|
const entries = (value ?? "").split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
653
875
|
return entries.length > 0 ? entries : null;
|
|
@@ -661,7 +883,7 @@ function validateEgressAllowlist(value) {
|
|
|
661
883
|
}
|
|
662
884
|
return null;
|
|
663
885
|
}
|
|
664
|
-
var BLOCKED_IPV4, BLOCKED_IPV4_RANGES, REDIRECT_STATUSES, MAX_REPLAY_BODY_BYTES;
|
|
886
|
+
var BLOCKED_IPV4, BLOCKED_IPV4_RANGES, EgressDeniedError, MAX_REDIRECTS = 5, REDIRECT_STATUSES, CREDENTIAL_HEADERS, MAX_REPLAY_BODY_BYTES, RequestBodyTooLargeError;
|
|
665
887
|
var init_egress_guard = __esm(() => {
|
|
666
888
|
BLOCKED_IPV4 = [
|
|
667
889
|
["0.0.0.0", 8],
|
|
@@ -680,8 +902,21 @@ var init_egress_guard = __esm(() => {
|
|
|
680
902
|
const size = 2 ** (32 - bits);
|
|
681
903
|
return { start: parseIPv4(network), size };
|
|
682
904
|
});
|
|
905
|
+
EgressDeniedError = class EgressDeniedError extends Error {
|
|
906
|
+
constructor(message) {
|
|
907
|
+
super(message);
|
|
908
|
+
this.name = "EgressDeniedError";
|
|
909
|
+
}
|
|
910
|
+
};
|
|
683
911
|
REDIRECT_STATUSES = new Set([301, 302, 303, 307, 308]);
|
|
912
|
+
CREDENTIAL_HEADERS = ["authorization", "cookie", "proxy-authorization"];
|
|
684
913
|
MAX_REPLAY_BODY_BYTES = 1024 * 1024;
|
|
914
|
+
RequestBodyTooLargeError = class RequestBodyTooLargeError extends Error {
|
|
915
|
+
constructor(limitBytes) {
|
|
916
|
+
super(`Cannot resend a streamed request body over ${limitBytes / (1024 * 1024)} MiB on a 307/308 redirect: it is sent as it is read, not kept in memory. Send a smaller or non-streamed body, or use redirect: "manual"`);
|
|
917
|
+
this.name = "RequestBodyTooLargeError";
|
|
918
|
+
}
|
|
919
|
+
};
|
|
685
920
|
});
|
|
686
921
|
|
|
687
922
|
// src/scripts-runtime/credential-broker/fetch-patch.ts
|
|
@@ -1164,7 +1399,7 @@ class BunSqliteClient {
|
|
|
1164
1399
|
}
|
|
1165
1400
|
async runTransactionAttempt(fn, readOnly, finalAttempt = false, deadlineAt) {
|
|
1166
1401
|
const release = await this.lock.acquire();
|
|
1167
|
-
const ctx = { closed: false, afterCommit: [] };
|
|
1402
|
+
const ctx = { closed: false, afterCommit: [], afterRollback: [] };
|
|
1168
1403
|
let began = false;
|
|
1169
1404
|
try {
|
|
1170
1405
|
const db = this.getDatabase();
|
|
@@ -1197,6 +1432,13 @@ class BunSqliteClient {
|
|
|
1197
1432
|
try {
|
|
1198
1433
|
this.getDatabase().run("ROLLBACK");
|
|
1199
1434
|
} catch {}
|
|
1435
|
+
for (const hook of ctx.afterRollback) {
|
|
1436
|
+
try {
|
|
1437
|
+
hook();
|
|
1438
|
+
} catch (hookErr) {
|
|
1439
|
+
console.error("[db-client] afterRollback hook threw:", hookErr);
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1200
1442
|
}
|
|
1201
1443
|
throw err;
|
|
1202
1444
|
} finally {
|
|
@@ -1212,6 +1454,11 @@ class BunSqliteClient {
|
|
|
1212
1454
|
}
|
|
1213
1455
|
this.scheduleHook(fn);
|
|
1214
1456
|
}
|
|
1457
|
+
afterRollback(fn) {
|
|
1458
|
+
const ctx = txContext.getStore();
|
|
1459
|
+
if (ctx && !ctx.closed)
|
|
1460
|
+
ctx.afterRollback.push(fn);
|
|
1461
|
+
}
|
|
1215
1462
|
scheduleHook(fn) {
|
|
1216
1463
|
this.lock.acquire().then((release) => {
|
|
1217
1464
|
release();
|
|
@@ -2092,6 +2339,10 @@ var init_seed_prompt_templates = __esm(() => {
|
|
|
2092
2339
|
|
|
2093
2340
|
// src/be/db/runtime.ts
|
|
2094
2341
|
import { Database } from "bun:sqlite";
|
|
2342
|
+
function wasDbCreatedThisBoot() {
|
|
2343
|
+
getDb2();
|
|
2344
|
+
return dbCreatedThisBoot;
|
|
2345
|
+
}
|
|
2095
2346
|
function isSqliteVecAvailable2() {
|
|
2096
2347
|
return sqliteVecAvailable;
|
|
2097
2348
|
}
|
|
@@ -2162,6 +2413,7 @@ function initDb2(dbPath = "./agent-swarm-db.sqlite") {
|
|
|
2162
2413
|
}
|
|
2163
2414
|
}
|
|
2164
2415
|
function bootOpenedDb(database, dbPath, resolvePromptTemplate, autoEncryptLegacyPlaintextSecrets) {
|
|
2416
|
+
dbCreatedThisBoot = database.prepare("SELECT 1 FROM sqlite_master LIMIT 1").get() === null;
|
|
2165
2417
|
database.run("PRAGMA journal_mode = WAL;");
|
|
2166
2418
|
database.run("PRAGMA busy_timeout = 5000;");
|
|
2167
2419
|
database.run("PRAGMA foreign_keys = ON;");
|
|
@@ -2275,6 +2527,7 @@ function closeDb2() {
|
|
|
2275
2527
|
db = null;
|
|
2276
2528
|
}
|
|
2277
2529
|
sqliteVecAvailable = false;
|
|
2530
|
+
dbCreatedThisBoot = false;
|
|
2278
2531
|
}
|
|
2279
2532
|
function getDbClient2() {
|
|
2280
2533
|
if (!dbClientInstance) {
|
|
@@ -2320,7 +2573,7 @@ function seedContextVersions() {
|
|
|
2320
2573
|
}
|
|
2321
2574
|
}
|
|
2322
2575
|
}
|
|
2323
|
-
var db = null, sqliteVecAvailable = false, cachedSqliteVecExtensionPath = null, dbClientInstance = null, VERSIONABLE_FIELDS;
|
|
2576
|
+
var db = null, sqliteVecAvailable = false, dbCreatedThisBoot = false, cachedSqliteVecExtensionPath = null, dbClientInstance = null, VERSIONABLE_FIELDS;
|
|
2324
2577
|
var init_runtime2 = __esm(() => {
|
|
2325
2578
|
init_resolver();
|
|
2326
2579
|
init_types5();
|
|
@@ -5438,7 +5691,7 @@ var init_telemetry = __esm(() => {
|
|
|
5438
5691
|
// src/telemetry-identity.ts
|
|
5439
5692
|
async function loadUserRole(userId) {
|
|
5440
5693
|
try {
|
|
5441
|
-
const { getUserGrant } = await import("./rbac-roles-
|
|
5694
|
+
const { getUserGrant } = await import("./rbac-roles-8msjr07m.js");
|
|
5442
5695
|
const grant = await getUserGrant(userId);
|
|
5443
5696
|
const role = grant.grantsAll ? "admin" : "member";
|
|
5444
5697
|
const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
|
|
@@ -6310,7 +6563,7 @@ function scheduleApprovalCardUpdates(approvals) {
|
|
|
6310
6563
|
const posted = approvals.filter((approval) => approval.notificationChannels?.some((n) => n.channel === "slack" && n.messageTs));
|
|
6311
6564
|
if (posted.length === 0)
|
|
6312
6565
|
return;
|
|
6313
|
-
getDbClient2().afterCommit(() => import("./approval-notifications-
|
|
6566
|
+
getDbClient2().afterCommit(() => import("./approval-notifications-a0db0esw.js").then(({ updateResolvedApprovalCards }) => updateResolvedApprovalCards(posted)).catch((err) => console.error("[HITL] Slack card update not run:", scrubSecrets(err instanceof Error ? err.message : String(err)))));
|
|
6314
6567
|
}
|
|
6315
6568
|
var init_approvals = __esm(() => {
|
|
6316
6569
|
init_secret_scrubber();
|
|
@@ -11326,7 +11579,9 @@ async function closeSlackTreeIfSettled(id) {
|
|
|
11326
11579
|
WHERE tree.id = ?
|
|
11327
11580
|
AND tree.kind = 'tree'
|
|
11328
11581
|
AND tree.closed_at IS NULL
|
|
11329
|
-
AND tree.ts NOT LIKE 'pending:%'
|
|
11582
|
+
AND (tree.ts NOT LIKE 'pending:%' OR EXISTS (
|
|
11583
|
+
SELECT 1 FROM slack_render_v2_state state WHERE state.id = 1 AND NOT ${SLACK_TREE_VISIBLE_SQL}
|
|
11584
|
+
))
|
|
11330
11585
|
AND EXISTS (
|
|
11331
11586
|
SELECT 1 FROM slack_render_v2_state state
|
|
11332
11587
|
WHERE state.id = 1 AND NOT ${SLACK_TREE_NEEDS_RENDER_SQL}
|
|
@@ -11353,7 +11608,19 @@ async function getSlackThreadsOfTasks(taskIds) {
|
|
|
11353
11608
|
}
|
|
11354
11609
|
return { threads: [...threads.values()], wakeTouched };
|
|
11355
11610
|
}
|
|
11356
|
-
async function
|
|
11611
|
+
async function slackThreadHasBotReplySince(channelId, threadTs, since, taskId) {
|
|
11612
|
+
const row = await getDbClient2().get(`SELECT EXISTS (
|
|
11613
|
+
SELECT 1 FROM slack_messages reply
|
|
11614
|
+
WHERE reply.channel_id = ? AND reply.thread_ts = ? AND reply.created_at >= ?
|
|
11615
|
+
AND (reply.kind = 'agent'
|
|
11616
|
+
OR (reply.kind = 'outcome' AND reply.finalized_at IS NOT NULL AND reply.task_id != ?))
|
|
11617
|
+
) AS found`, [channelId, threadTs, since, taskId]);
|
|
11618
|
+
return !!row?.found;
|
|
11619
|
+
}
|
|
11620
|
+
function slackOutcomeWindowParams(window2) {
|
|
11621
|
+
return [window2.finishedAfter, Number(window2.delegationEnabled), window2.closureActiveAfter];
|
|
11622
|
+
}
|
|
11623
|
+
async function slackThreadHasOutcomeWork(thread, window2) {
|
|
11357
11624
|
const row = await getDbClient2().get(`SELECT EXISTS (
|
|
11358
11625
|
SELECT 1 FROM agent_tasks task, slack_render_v2_state state
|
|
11359
11626
|
WHERE state.id = 1
|
|
@@ -11361,6 +11628,7 @@ async function slackThreadHasOutcomeWork(thread) {
|
|
|
11361
11628
|
AND task.source = 'slack'
|
|
11362
11629
|
AND task.createdAt >= state.activated_at
|
|
11363
11630
|
AND task.status IN ('completed', 'failed', 'cancelled')
|
|
11631
|
+
AND ${SLACK_OUTCOME_WINDOW_SQL}
|
|
11364
11632
|
AND NOT EXISTS (
|
|
11365
11633
|
SELECT 1 FROM slack_messages outcome
|
|
11366
11634
|
WHERE outcome.kind = 'outcome'
|
|
@@ -11372,10 +11640,116 @@ async function slackThreadHasOutcomeWork(thread) {
|
|
|
11372
11640
|
WHERE outcome.kind = 'outcome'
|
|
11373
11641
|
AND outcome.channel_id = ? AND outcome.thread_ts = ?
|
|
11374
11642
|
AND outcome.finalized_at IS NULL AND outcome.delivery_abandoned_at IS NULL
|
|
11375
|
-
) AS pending`, [
|
|
11643
|
+
) AS pending`, [
|
|
11644
|
+
thread.channelId,
|
|
11645
|
+
thread.threadTs,
|
|
11646
|
+
...slackOutcomeWindowParams(window2),
|
|
11647
|
+
thread.channelId,
|
|
11648
|
+
thread.threadTs
|
|
11649
|
+
]);
|
|
11376
11650
|
return !!row?.pending;
|
|
11377
11651
|
}
|
|
11378
|
-
|
|
11652
|
+
async function observeSlackTreeVisibility(enabled) {
|
|
11653
|
+
const current = await getDbClient2().get("SELECT task_tree_enabled, task_tree_enabled_at FROM slack_render_v2_state WHERE id = 1");
|
|
11654
|
+
if (!current || current.task_tree_enabled === Number(enabled)) {
|
|
11655
|
+
return current?.task_tree_enabled_at ?? null;
|
|
11656
|
+
}
|
|
11657
|
+
const row = await getDbClient2().get(`UPDATE slack_render_v2_state SET
|
|
11658
|
+
task_tree_enabled_at = CASE WHEN task_tree_enabled = 0 AND ? = 1
|
|
11659
|
+
THEN ? ELSE task_tree_enabled_at END,
|
|
11660
|
+
task_tree_enabled = ?
|
|
11661
|
+
WHERE id = 1 RETURNING task_tree_enabled_at`, [Number(enabled), new Date().toISOString(), Number(enabled)]);
|
|
11662
|
+
return row?.task_tree_enabled_at ?? null;
|
|
11663
|
+
}
|
|
11664
|
+
async function getSlackProcessingThreads(delegationEnabled, treesEnabled, window2) {
|
|
11665
|
+
return getDbClient2().transaction(async () => {
|
|
11666
|
+
const state = await getDbClient2().get("SELECT reconcile_cursors FROM slack_render_v2_state WHERE id = 1");
|
|
11667
|
+
if (!state)
|
|
11668
|
+
return [];
|
|
11669
|
+
const cursors = JSON.parse(state.reconcile_cursors);
|
|
11670
|
+
const threads = new Map;
|
|
11671
|
+
async function page(source, sql, extra = []) {
|
|
11672
|
+
const rows = await getDbClient2().query(sql, [cursors[source] ?? "", SLACK_RECONCILE_PAGE_SIZE, ...extra]);
|
|
11673
|
+
cursors[source] = rows.length < SLACK_RECONCILE_PAGE_SIZE ? "" : rows.at(-1).id;
|
|
11674
|
+
for (const row of rows) {
|
|
11675
|
+
if (row.eligible)
|
|
11676
|
+
threads.set(`${row.channelId}\x00${row.threadTs}`, {
|
|
11677
|
+
channelId: row.channelId,
|
|
11678
|
+
threadTs: row.threadTs
|
|
11679
|
+
});
|
|
11680
|
+
}
|
|
11681
|
+
}
|
|
11682
|
+
await page("active", `WITH candidates AS MATERIALIZED (
|
|
11683
|
+
SELECT id, slackChannelId, slackThreadTs, createdAt FROM agent_tasks INDEXED BY idx_slack_reconcile_active
|
|
11684
|
+
WHERE slackChannelId IS NOT NULL AND slackThreadTs IS NOT NULL
|
|
11685
|
+
AND status IN ('offered', 'reviewing', 'pending', 'in_progress', 'paused')
|
|
11686
|
+
AND id > ? ORDER BY id LIMIT ?
|
|
11687
|
+
) SELECT task.id, task.slackChannelId AS channelId, task.slackThreadTs AS threadTs,
|
|
11688
|
+
task.createdAt >= state.activated_at AS eligible
|
|
11689
|
+
FROM candidates task, slack_render_v2_state state WHERE state.id = 1 ORDER BY task.id`);
|
|
11690
|
+
await page("terminal", `WITH candidates AS MATERIALIZED (
|
|
11691
|
+
SELECT * FROM agent_tasks INDEXED BY idx_slack_reconcile_terminal
|
|
11692
|
+
WHERE slackChannelId IS NOT NULL AND slackThreadTs IS NOT NULL
|
|
11693
|
+
AND status IN ('completed', 'failed', 'cancelled')
|
|
11694
|
+
AND id > ? ORDER BY id LIMIT ?
|
|
11695
|
+
) SELECT task.id, task.slackChannelId AS channelId, task.slackThreadTs AS threadTs,
|
|
11696
|
+
(task.createdAt >= state.activated_at
|
|
11697
|
+
AND (task.source = 'slack'
|
|
11698
|
+
OR (task.source = 'schedule' AND task.taskType = 'deferred')
|
|
11699
|
+
OR (? = 1 AND task.parentTaskId IS NOT NULL AND task.createdAt >= state.delegation_activated_at
|
|
11700
|
+
AND task.status IN ('completed', 'failed') AND task.slackReplySent = 0
|
|
11701
|
+
AND COALESCE(task.taskType, '') NOT IN ('follow-up', 'reroute-decision')))
|
|
11702
|
+
AND ${SLACK_OUTCOME_WINDOW_SQL}
|
|
11703
|
+
AND NOT (task.source = 'schedule' AND task.taskType = 'deferred'
|
|
11704
|
+
AND ${SLACK_WAKE_ALREADY_ANSWERED_SQL})
|
|
11705
|
+
AND NOT EXISTS (
|
|
11706
|
+
SELECT 1 FROM agent_tasks parent JOIN slack_messages parent_card ON parent_card.task_id = parent.id
|
|
11707
|
+
WHERE task.source = 'schedule' AND task.taskType = 'deferred' AND parent.id = task.parentTaskId
|
|
11708
|
+
AND parent.deferredAt IS NOT NULL AND parent_card.kind = 'outcome'
|
|
11709
|
+
AND parent_card.finalized_at IS NOT NULL AND parent_card.deferral_abandoned_at IS NULL
|
|
11710
|
+
)
|
|
11711
|
+
AND NOT EXISTS (SELECT 1 FROM slack_messages card WHERE card.kind = 'outcome'
|
|
11712
|
+
AND card.task_id = task.id
|
|
11713
|
+
AND (card.finalized_at IS NOT NULL OR card.delivery_abandoned_at IS NOT NULL))) AS eligible
|
|
11714
|
+
FROM candidates task, slack_render_v2_state state WHERE state.id = 1 ORDER BY task.id`, [Number(delegationEnabled), ...slackOutcomeWindowParams(window2)]);
|
|
11715
|
+
await page("outcome", `SELECT id, channel_id AS channelId, thread_ts AS threadTs, 1 AS eligible
|
|
11716
|
+
FROM slack_messages INDEXED BY idx_slack_reconcile_outcome
|
|
11717
|
+
WHERE kind = 'outcome' AND finalized_at IS NULL AND delivery_abandoned_at IS NULL
|
|
11718
|
+
AND id > ? ORDER BY id LIMIT ?`);
|
|
11719
|
+
if (treesEnabled)
|
|
11720
|
+
await page("tree", `WITH candidates AS MATERIALIZED (
|
|
11721
|
+
SELECT * FROM slack_messages INDEXED BY idx_slack_reconcile_tree
|
|
11722
|
+
WHERE kind = 'tree' AND closed_at IS NULL AND id > ? ORDER BY id LIMIT ?
|
|
11723
|
+
) SELECT tree.id, tree.channel_id AS channelId, tree.thread_ts AS threadTs,
|
|
11724
|
+
${SLACK_TREE_NEEDS_RENDER_SQL} AS eligible
|
|
11725
|
+
FROM candidates tree, slack_render_v2_state state WHERE state.id = 1 ORDER BY tree.id`);
|
|
11726
|
+
const next = JSON.stringify(cursors);
|
|
11727
|
+
if (next !== state.reconcile_cursors)
|
|
11728
|
+
await getDbClient2().run("UPDATE slack_render_v2_state SET reconcile_cursors = ? WHERE id = 1", [next]);
|
|
11729
|
+
return [...threads.values()];
|
|
11730
|
+
});
|
|
11731
|
+
}
|
|
11732
|
+
var SLACK_TREE_VISIBLE_SQL = `(COALESCE(state.task_tree_enabled, 1) = 1 AND (
|
|
11733
|
+
state.task_tree_enabled_at IS NULL OR EXISTS (
|
|
11734
|
+
SELECT 1 FROM agent_tasks visible_task
|
|
11735
|
+
WHERE visible_task.slackChannelId = tree.channel_id
|
|
11736
|
+
AND visible_task.slackThreadTs = tree.thread_ts
|
|
11737
|
+
AND (visible_task.status NOT IN ('completed', 'failed', 'cancelled', 'superseded', 'skipped')
|
|
11738
|
+
OR visible_task.finishedAt > state.task_tree_enabled_at)
|
|
11739
|
+
)
|
|
11740
|
+
))`, SLACK_TREE_NEEDS_RENDER_SQL, THREAD_LOOKUP_CHUNK = 500, SLACK_OUTCOME_WINDOW_SQL = `(COALESCE(task.finishedAt, task.lastUpdatedAt) >= ?
|
|
11741
|
+
OR (? = 1 AND task.source = 'slack' AND task.createdAt >= state.delegation_activated_at
|
|
11742
|
+
AND EXISTS (SELECT 1 FROM agent_tasks recent
|
|
11743
|
+
WHERE recent.slackChannelId = task.slackChannelId AND recent.slackThreadTs = task.slackThreadTs
|
|
11744
|
+
AND recent.lastUpdatedAt >= ?)))`, SLACK_WAKE_ALREADY_ANSWERED_SQL = `(task.slackReplySent = 1 OR EXISTS (
|
|
11745
|
+
SELECT 1 FROM slack_messages reply
|
|
11746
|
+
WHERE reply.channel_id = task.slackChannelId AND reply.thread_ts = task.slackThreadTs
|
|
11747
|
+
AND reply.created_at >= task.createdAt
|
|
11748
|
+
AND (reply.kind = 'agent'
|
|
11749
|
+
OR (reply.kind = 'outcome' AND reply.finalized_at IS NOT NULL AND reply.task_id != task.id))))`, SLACK_RECONCILE_PAGE_SIZE = 50;
|
|
11750
|
+
var init_slack_trees = __esm(() => {
|
|
11751
|
+
init_db4();
|
|
11752
|
+
SLACK_TREE_NEEDS_RENDER_SQL = `(${SLACK_TREE_VISIBLE_SQL} AND (
|
|
11379
11753
|
(tree.ts LIKE 'pending:%' AND tree.created_at >= state.activated_at)
|
|
11380
11754
|
OR EXISTS (
|
|
11381
11755
|
SELECT 1 FROM agent_tasks task
|
|
@@ -11418,9 +11792,7 @@ var SLACK_TREE_NEEDS_RENDER_SQL = `(
|
|
|
11418
11792
|
OR outcome.updated_at > tree.updated_at
|
|
11419
11793
|
)
|
|
11420
11794
|
)
|
|
11421
|
-
)
|
|
11422
|
-
var init_slack_trees = __esm(() => {
|
|
11423
|
-
init_db4();
|
|
11795
|
+
))`;
|
|
11424
11796
|
});
|
|
11425
11797
|
|
|
11426
11798
|
// src/be/db/tasks/eligibility-scan.ts
|
|
@@ -11989,7 +12361,7 @@ async function completeTask2(id, output, options) {
|
|
|
11989
12361
|
});
|
|
11990
12362
|
} catch {}
|
|
11991
12363
|
getDbClient2().afterCommit(() => {
|
|
11992
|
-
import("./event-bus-
|
|
12364
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
11993
12365
|
workflowEventBus.emit("task.completed", {
|
|
11994
12366
|
taskId: id,
|
|
11995
12367
|
output: scrubbedOutput,
|
|
@@ -12044,7 +12416,7 @@ async function failTask2(id, reason, opts = {}) {
|
|
|
12044
12416
|
});
|
|
12045
12417
|
} catch {}
|
|
12046
12418
|
getDbClient2().afterCommit(() => {
|
|
12047
|
-
import("./event-bus-
|
|
12419
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
12048
12420
|
workflowEventBus.emit("task.failed", {
|
|
12049
12421
|
taskId: id,
|
|
12050
12422
|
failureReason: scrubbedReason,
|
|
@@ -12126,7 +12498,7 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
12126
12498
|
});
|
|
12127
12499
|
} catch {}
|
|
12128
12500
|
getDbClient2().afterCommit(() => {
|
|
12129
|
-
import("./event-bus-
|
|
12501
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
12130
12502
|
workflowEventBus.emit("task.cancelled", {
|
|
12131
12503
|
taskId: id,
|
|
12132
12504
|
agentId: row.agentId,
|
|
@@ -12138,7 +12510,7 @@ async function cancelTask2(id, reason, options = {}) {
|
|
|
12138
12510
|
if (row.source === "schedule" && row.taskType === "deferred" && row.parentTaskId) {
|
|
12139
12511
|
getDbClient2().afterCommit(async () => {
|
|
12140
12512
|
try {
|
|
12141
|
-
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-
|
|
12513
|
+
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-1gs4aw7y.js");
|
|
12142
12514
|
await createWorkerTaskFollowUp({
|
|
12143
12515
|
task: rowToAgentTask(row),
|
|
12144
12516
|
status: "failed",
|
|
@@ -12187,7 +12559,7 @@ async function skipTask2(id, reason) {
|
|
|
12187
12559
|
});
|
|
12188
12560
|
} catch {}
|
|
12189
12561
|
getDbClient2().afterCommit(() => {
|
|
12190
|
-
import("./event-bus-
|
|
12562
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
12191
12563
|
workflowEventBus.emit("task.skipped", {
|
|
12192
12564
|
taskId: id,
|
|
12193
12565
|
failureReason: skipReason,
|
|
@@ -12239,7 +12611,7 @@ async function supersedeTask2(id, args) {
|
|
|
12239
12611
|
});
|
|
12240
12612
|
} catch {}
|
|
12241
12613
|
getDbClient2().afterCommit(() => {
|
|
12242
|
-
import("./event-bus-
|
|
12614
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
12243
12615
|
workflowEventBus.emit("task.superseded", {
|
|
12244
12616
|
taskId: id,
|
|
12245
12617
|
reason: args.reason,
|
|
@@ -12474,7 +12846,7 @@ async function updateTaskProgress2(id, progress) {
|
|
|
12474
12846
|
});
|
|
12475
12847
|
} catch {}
|
|
12476
12848
|
getDbClient2().afterCommit(() => {
|
|
12477
|
-
import("./event-bus-
|
|
12849
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
12478
12850
|
workflowEventBus.emit("task.progress", {
|
|
12479
12851
|
taskId: id,
|
|
12480
12852
|
progress: scrubbedProgress,
|
|
@@ -13043,7 +13415,7 @@ function emitRunFinished(runId, workflowId, status) {
|
|
|
13043
13415
|
}
|
|
13044
13416
|
function emitBusEventAfterCommit(event, payload) {
|
|
13045
13417
|
getDbClient2().afterCommit(() => {
|
|
13046
|
-
import("./event-bus-
|
|
13418
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
13047
13419
|
workflowEventBus.emit(event, payload);
|
|
13048
13420
|
}).catch((err) => console.error(`[db] ${event} event not emitted:`, scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
13049
13421
|
});
|
|
@@ -13404,11 +13776,26 @@ function normalizeSlackReactionShortcode(raw) {
|
|
|
13404
13776
|
}
|
|
13405
13777
|
function reactionName(event) {
|
|
13406
13778
|
const raw = process.env[SLACK_REACTION_CONFIG_KEYS[event]];
|
|
13779
|
+
if (raw !== undefined && raw.trim() === "")
|
|
13780
|
+
return null;
|
|
13407
13781
|
const normalized = normalizeSlackReactionShortcode(raw);
|
|
13408
13782
|
return normalized ?? SLACK_REACTION_DEFAULTS[event];
|
|
13409
13783
|
}
|
|
13784
|
+
function isSlackIconConfigKey(key) {
|
|
13785
|
+
return key === SLACK_STATUS_ICON_COMPLETED_KEY || Object.values(SLACK_REACTION_CONFIG_KEYS).includes(key);
|
|
13786
|
+
}
|
|
13787
|
+
function reactionStatusIcon(event) {
|
|
13788
|
+
const name = reactionName(event);
|
|
13789
|
+
return name === null ? "" : `:${name}:`;
|
|
13790
|
+
}
|
|
13791
|
+
function iconPrefix(icon) {
|
|
13792
|
+
return icon ? `${icon} ` : "";
|
|
13793
|
+
}
|
|
13410
13794
|
function completedStatusIcon() {
|
|
13411
|
-
const
|
|
13795
|
+
const raw = process.env[SLACK_STATUS_ICON_COMPLETED_KEY];
|
|
13796
|
+
if (raw !== undefined && raw.trim() === "")
|
|
13797
|
+
return "";
|
|
13798
|
+
const normalized = normalizeSlackReactionShortcode(raw);
|
|
13412
13799
|
return normalized ? `:${normalized}:` : SLACK_STATUS_ICON_COMPLETED_DEFAULT;
|
|
13413
13800
|
}
|
|
13414
13801
|
var SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, SLACK_REACTION_SHORTCODE_PATTERN, SLACK_STATUS_ICON_COMPLETED_KEY = "SLACK_STATUS_ICON_COMPLETED", SLACK_STATUS_ICON_COMPLETED_DEFAULT = "✅";
|
|
@@ -13584,10 +13971,10 @@ function enumValidator(key, options) {
|
|
|
13584
13971
|
};
|
|
13585
13972
|
}
|
|
13586
13973
|
function shortcodeValidators(keys) {
|
|
13587
|
-
const message = (key) => `Invalid ${key} (must be a Slack emoji shortcode: lowercase letters, digits, _ + ' -, with optional surrounding colons)`;
|
|
13974
|
+
const message = (key) => `Invalid ${key} (must be empty to disable, or a Slack emoji shortcode: lowercase letters, digits, _ + ' -, with optional surrounding colons)`;
|
|
13588
13975
|
return Object.fromEntries(keys.map((key) => [
|
|
13589
13976
|
key,
|
|
13590
|
-
(value) => normalizeSlackReactionShortcode(value) !== null ? null : message(key)
|
|
13977
|
+
(value) => typeof value === "string" && (value.trim() === "" || normalizeSlackReactionShortcode(value) !== null) ? null : message(key)
|
|
13591
13978
|
]));
|
|
13592
13979
|
}
|
|
13593
13980
|
function integerValidators(keys, min) {
|
|
@@ -13730,7 +14117,8 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
13730
14117
|
"DESPLEGA_TELEMETRY_ENDPOINT",
|
|
13731
14118
|
"CLOUDFLARE_API_BASE_URL",
|
|
13732
14119
|
"GITHUB_URL",
|
|
13733
|
-
"GITHUB_API_URL"
|
|
14120
|
+
"GITHUB_API_URL",
|
|
14121
|
+
"GITHUB_APP_INSTALLATION_ID"
|
|
13734
14122
|
]);
|
|
13735
14123
|
API_ONLY_CONFIG_KEYS = new Set([
|
|
13736
14124
|
"API_AGENT_FS_API_KEY",
|
|
@@ -13926,6 +14314,7 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
13926
14314
|
"SLACK_DISABLE",
|
|
13927
14315
|
"CHAT_SDK_ENABLED",
|
|
13928
14316
|
"SLACK_RENDER_V2",
|
|
14317
|
+
"SLACK_RENDER_V2_TASK_TREE_ENABLED",
|
|
13929
14318
|
"SLACK_RENDER_V2_DELEGATION",
|
|
13930
14319
|
"SLACK_BLOCK_EXTERNAL_CHANNELS",
|
|
13931
14320
|
"GITHUB_DISABLE",
|
|
@@ -14012,6 +14401,7 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
14012
14401
|
"AGENT_LOG_RETENTION_DAYS",
|
|
14013
14402
|
"EVENTS_RETENTION_DAYS",
|
|
14014
14403
|
"SCRIPT_RUNS_RETENTION_DAYS",
|
|
14404
|
+
"WORKFLOW_RUNS_RETENTION_DAYS",
|
|
14015
14405
|
"CONTEXT_VERSIONS_KEEP_LATEST"
|
|
14016
14406
|
], 1, MAX_DB_RETENTION_DAYS),
|
|
14017
14407
|
...integerValidators(["HEARTBEAT_MAX_AUTO_ASSIGN"], 0),
|
|
@@ -22658,7 +23048,7 @@ function noteEmbeddingSuccess() {
|
|
|
22658
23048
|
const report = (what) => (err) => {
|
|
22659
23049
|
console.error(`[memory] ${what} backfill after embeddings recovered failed:`, err.message);
|
|
22660
23050
|
};
|
|
22661
|
-
backfill2 = import("./embedding-space-
|
|
23051
|
+
backfill2 = import("./embedding-space-z6ptw3jk.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: true })).catch(report("Embedding")).finally(() => {
|
|
22662
23052
|
backfill2 = null;
|
|
22663
23053
|
});
|
|
22664
23054
|
}
|
|
@@ -23054,6 +23444,21 @@ function parseTags(raw) {
|
|
|
23054
23444
|
return [];
|
|
23055
23445
|
}
|
|
23056
23446
|
}
|
|
23447
|
+
function notReviewTaskCompletionSql(memoryAlias = "") {
|
|
23448
|
+
const col = (name) => memoryAlias ? `${memoryAlias}.${name}` : name;
|
|
23449
|
+
return {
|
|
23450
|
+
sql: `NOT (${col("source")} = 'task_completion' AND EXISTS (
|
|
23451
|
+
SELECT 1 FROM agent_tasks rt
|
|
23452
|
+
WHERE rt.id = ${col("sourceTaskId")}
|
|
23453
|
+
AND (rt.taskType = ?
|
|
23454
|
+
OR CASE WHEN json_valid(rt.tags)
|
|
23455
|
+
THEN json_type(rt.tags) = 'array' AND EXISTS (
|
|
23456
|
+
SELECT 1 FROM json_each(rt.tags)
|
|
23457
|
+
WHERE value IN (${REVIEW_TASK_TAGS.map(() => "?").join(",")}))
|
|
23458
|
+
ELSE 0 END)))`,
|
|
23459
|
+
params: [REVIEW_TASK_TYPE, ...REVIEW_TASK_TAGS]
|
|
23460
|
+
};
|
|
23461
|
+
}
|
|
23057
23462
|
async function isReviewTaskId(taskId) {
|
|
23058
23463
|
if (!taskId)
|
|
23059
23464
|
return false;
|
|
@@ -23098,11 +23503,8 @@ function countCandidateDocuments(candidates) {
|
|
|
23098
23503
|
}
|
|
23099
23504
|
return standalone + documents.size;
|
|
23100
23505
|
}
|
|
23101
|
-
async function searchMemoryCandidates(store, embedding, agentId, {
|
|
23102
|
-
|
|
23103
|
-
...options
|
|
23104
|
-
}) {
|
|
23105
|
-
const keep = (rows) => excludeReviewTaskCompletions ? dropReviewTaskCompletions(rows) : Promise.resolve(rows);
|
|
23506
|
+
async function searchMemoryCandidates(store, embedding, agentId, options) {
|
|
23507
|
+
const keep = (rows) => options.excludeReviewTaskCompletions ? dropReviewTaskCompletions(rows) : Promise.resolve(rows);
|
|
23106
23508
|
let fetchLimit = options.limit;
|
|
23107
23509
|
let raw = await store.search(embedding, agentId, { ...options, limit: fetchLimit });
|
|
23108
23510
|
let rows = await keep(raw);
|
|
@@ -23217,6 +23619,7 @@ class SqliteMemoryStore {
|
|
|
23217
23619
|
ftsInitialized = false;
|
|
23218
23620
|
ftsPopulate = null;
|
|
23219
23621
|
lastPopulate = null;
|
|
23622
|
+
searchHealthCache = null;
|
|
23220
23623
|
constructor() {
|
|
23221
23624
|
this.ensureVecTable();
|
|
23222
23625
|
this.ensureFtsTable();
|
|
@@ -23304,16 +23707,19 @@ class SqliteMemoryStore {
|
|
|
23304
23707
|
whenFtsPopulated() {
|
|
23305
23708
|
return this.ftsPopulate ?? Promise.resolve();
|
|
23306
23709
|
}
|
|
23307
|
-
async syncFtsRow(memoryId, name, content) {
|
|
23710
|
+
async syncFtsRow(memoryId, name, content, freshId = false) {
|
|
23308
23711
|
if (!this.ftsInitialized && !await this.getFtsTableSchema())
|
|
23309
23712
|
return;
|
|
23310
23713
|
try {
|
|
23311
|
-
await getDbClient2().
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
name,
|
|
23315
|
-
|
|
23316
|
-
|
|
23714
|
+
await getDbClient2().transaction(async (tx) => {
|
|
23715
|
+
if (!freshId)
|
|
23716
|
+
await tx.run("DELETE FROM memory_fts WHERE memory_id = ?", [memoryId]);
|
|
23717
|
+
await tx.run("INSERT INTO memory_fts(memory_id, name, content) VALUES (?, ?, ?)", [
|
|
23718
|
+
memoryId,
|
|
23719
|
+
name,
|
|
23720
|
+
content
|
|
23721
|
+
]);
|
|
23722
|
+
});
|
|
23317
23723
|
} catch (err) {
|
|
23318
23724
|
console.error(`[memory-fts] sync failed memory_id=${memoryId}: ${err.message}`);
|
|
23319
23725
|
}
|
|
@@ -23400,6 +23806,7 @@ class SqliteMemoryStore {
|
|
|
23400
23806
|
}
|
|
23401
23807
|
}
|
|
23402
23808
|
const afterCount = this.getVecCount();
|
|
23809
|
+
this.searchHealthCache = null;
|
|
23403
23810
|
this.lastPopulate = {
|
|
23404
23811
|
attempted,
|
|
23405
23812
|
inserted,
|
|
@@ -23475,9 +23882,9 @@ class SqliteMemoryStore {
|
|
|
23475
23882
|
input.agentId ?? null,
|
|
23476
23883
|
input.agentId ?? null
|
|
23477
23884
|
]);
|
|
23885
|
+
await this.syncFtsRow(inserted.id, inserted.name, inserted.content, true);
|
|
23478
23886
|
return inserted;
|
|
23479
23887
|
});
|
|
23480
|
-
await this.syncFtsRow(row.id, row.name, row.content);
|
|
23481
23888
|
return rowToAgentMemory(row);
|
|
23482
23889
|
}
|
|
23483
23890
|
async storeBatch(inputs) {
|
|
@@ -23532,7 +23939,8 @@ class SqliteMemoryStore {
|
|
|
23532
23939
|
source,
|
|
23533
23940
|
isLead = false,
|
|
23534
23941
|
includeExpired = false,
|
|
23535
|
-
keyPrefix
|
|
23942
|
+
keyPrefix,
|
|
23943
|
+
excludeReviewTaskCompletions
|
|
23536
23944
|
} = options;
|
|
23537
23945
|
if (options.exhaustive) {
|
|
23538
23946
|
return this.searchExhaustive(embedding, agentId, {
|
|
@@ -23542,10 +23950,11 @@ class SqliteMemoryStore {
|
|
|
23542
23950
|
isLead,
|
|
23543
23951
|
includeExpired,
|
|
23544
23952
|
keyPrefix,
|
|
23953
|
+
excludeReviewTaskCompletions,
|
|
23545
23954
|
minSimilarity: options.minSimilarity
|
|
23546
23955
|
});
|
|
23547
23956
|
}
|
|
23548
|
-
const health = this.
|
|
23957
|
+
const health = this.searchHealth();
|
|
23549
23958
|
if (isHybridSearchEnabled() && options.queryText && this.ftsInitialized && await this.getFtsTableSchema() && health.retrievalMode === "vec" && embedding.length === EMBEDDING_DIMENSIONS) {
|
|
23550
23959
|
console.log(`[memory-search] retrieval_path=hybrid scope=${scope} limit=${limit} vec_rows=${health.counts.memoryVec} searchable=${health.counts.searchable}`);
|
|
23551
23960
|
return this.searchHybrid(embedding, options.queryText, agentId, {
|
|
@@ -23554,7 +23963,8 @@ class SqliteMemoryStore {
|
|
|
23554
23963
|
source,
|
|
23555
23964
|
isLead,
|
|
23556
23965
|
includeExpired,
|
|
23557
|
-
keyPrefix
|
|
23966
|
+
keyPrefix,
|
|
23967
|
+
excludeReviewTaskCompletions
|
|
23558
23968
|
});
|
|
23559
23969
|
}
|
|
23560
23970
|
if (health.retrievalMode === "vec" && embedding.length === EMBEDDING_DIMENSIONS) {
|
|
@@ -23566,6 +23976,7 @@ class SqliteMemoryStore {
|
|
|
23566
23976
|
isLead,
|
|
23567
23977
|
includeExpired,
|
|
23568
23978
|
keyPrefix,
|
|
23979
|
+
excludeReviewTaskCompletions,
|
|
23569
23980
|
minSimilarity: options.minSimilarity
|
|
23570
23981
|
});
|
|
23571
23982
|
}
|
|
@@ -23577,7 +23988,8 @@ class SqliteMemoryStore {
|
|
|
23577
23988
|
source,
|
|
23578
23989
|
isLead,
|
|
23579
23990
|
includeExpired,
|
|
23580
|
-
keyPrefix
|
|
23991
|
+
keyPrefix,
|
|
23992
|
+
excludeReviewTaskCompletions
|
|
23581
23993
|
});
|
|
23582
23994
|
}
|
|
23583
23995
|
console.log(`[memory-search] retrieval_path=fallback scope=${scope} limit=${limit} reason=${embedding.length !== EMBEDDING_DIMENSIONS ? "query_dimension_mismatch" : health.reasons.join("|") || "vec_unavailable"}`);
|
|
@@ -23588,6 +24000,7 @@ class SqliteMemoryStore {
|
|
|
23588
24000
|
isLead,
|
|
23589
24001
|
includeExpired,
|
|
23590
24002
|
keyPrefix,
|
|
24003
|
+
excludeReviewTaskCompletions,
|
|
23591
24004
|
minSimilarity: options.minSimilarity
|
|
23592
24005
|
});
|
|
23593
24006
|
}
|
|
@@ -23652,6 +24065,7 @@ class SqliteMemoryStore {
|
|
|
23652
24065
|
const params = [match];
|
|
23653
24066
|
this.addScopeConditions(conditions, params, agentId, scope, isLead, "m");
|
|
23654
24067
|
this.addKeyPrefixCondition(conditions, params, keyPrefix, "m");
|
|
24068
|
+
this.addReviewExclusion(conditions, params, options.excludeReviewTaskCompletions, "m");
|
|
23655
24069
|
if (source) {
|
|
23656
24070
|
conditions.push("m.source = ?");
|
|
23657
24071
|
params.push(source);
|
|
@@ -23692,11 +24106,12 @@ class SqliteMemoryStore {
|
|
|
23692
24106
|
const { scope, limit, source, isLead, includeExpired, keyPrefix } = options;
|
|
23693
24107
|
const floor = options.minSimilarity ?? minSimilarity();
|
|
23694
24108
|
const embeddingBuffer = serializeEmbedding(queryEmbedding);
|
|
23695
|
-
const knnLimit =
|
|
24109
|
+
const knnLimit = 4096;
|
|
23696
24110
|
const conditions = ["v.embedding MATCH ?"];
|
|
23697
24111
|
const params = [embeddingBuffer];
|
|
23698
24112
|
this.addScopeConditions(conditions, params, agentId, scope, isLead, "m");
|
|
23699
24113
|
this.addKeyPrefixCondition(conditions, params, keyPrefix, "m");
|
|
24114
|
+
this.addReviewExclusion(conditions, params, options.excludeReviewTaskCompletions, "m");
|
|
23700
24115
|
if (source) {
|
|
23701
24116
|
conditions.push("m.source = ?");
|
|
23702
24117
|
params.push(source);
|
|
@@ -23728,6 +24143,7 @@ class SqliteMemoryStore {
|
|
|
23728
24143
|
const params = [];
|
|
23729
24144
|
this.addScopeConditions(conditions, params, agentId, scope, isLead);
|
|
23730
24145
|
this.addKeyPrefixCondition(conditions, params, keyPrefix);
|
|
24146
|
+
this.addReviewExclusion(conditions, params, options.excludeReviewTaskCompletions);
|
|
23731
24147
|
if (source) {
|
|
23732
24148
|
conditions.push("source = ?");
|
|
23733
24149
|
params.push(source);
|
|
@@ -23790,6 +24206,7 @@ class SqliteMemoryStore {
|
|
|
23790
24206
|
const params = [];
|
|
23791
24207
|
this.addScopeConditions(conditions, params, agentId, scope, isLead);
|
|
23792
24208
|
this.addKeyPrefixCondition(conditions, params, keyPrefix);
|
|
24209
|
+
this.addReviewExclusion(conditions, params, options.excludeReviewTaskCompletions);
|
|
23793
24210
|
if (source) {
|
|
23794
24211
|
conditions.push("source = ?");
|
|
23795
24212
|
params.push(source);
|
|
@@ -23841,6 +24258,13 @@ class SqliteMemoryStore {
|
|
|
23841
24258
|
conditions.push(`substr(${key}, 1, length(?)) = ?`);
|
|
23842
24259
|
params.push(keyPrefix, keyPrefix);
|
|
23843
24260
|
}
|
|
24261
|
+
addReviewExclusion(conditions, params, exclude, tableAlias = "") {
|
|
24262
|
+
if (!exclude)
|
|
24263
|
+
return;
|
|
24264
|
+
const filter = notReviewTaskCompletionSql(tableAlias);
|
|
24265
|
+
conditions.push(filter.sql);
|
|
24266
|
+
params.push(...filter.params);
|
|
24267
|
+
}
|
|
23844
24268
|
buildListWhereClause(agentId, options) {
|
|
23845
24269
|
const { scope = "all", isLead = false, ownerAgentId, source, sourcePath, keyPrefix } = options;
|
|
23846
24270
|
const conditions = [];
|
|
@@ -24023,6 +24447,7 @@ class SqliteMemoryStore {
|
|
|
24023
24447
|
if (this.vecInitialized && this.getVecTableSchema()) {
|
|
24024
24448
|
const placeholders = ids.map(() => "?").join(",");
|
|
24025
24449
|
await getDbClient2().run(`DELETE FROM memory_vec WHERE memory_id IN (${placeholders})`, ids);
|
|
24450
|
+
this.noteVecWrite();
|
|
24026
24451
|
}
|
|
24027
24452
|
await this.deleteFtsRows(ids);
|
|
24028
24453
|
}
|
|
@@ -24093,8 +24518,10 @@ class SqliteMemoryStore {
|
|
|
24093
24518
|
id,
|
|
24094
24519
|
vecBuffer
|
|
24095
24520
|
]);
|
|
24521
|
+
this.noteVecWrite();
|
|
24096
24522
|
} catch (err) {
|
|
24097
24523
|
console.error(`[memory-vec] update failed memory_id=${id}: ${err.message}`);
|
|
24524
|
+
this.searchHealthCache = null;
|
|
24098
24525
|
}
|
|
24099
24526
|
}
|
|
24100
24527
|
});
|
|
@@ -24106,6 +24533,7 @@ class SqliteMemoryStore {
|
|
|
24106
24533
|
]);
|
|
24107
24534
|
if (this.vecInitialized && this.getVecTableSchema()) {
|
|
24108
24535
|
await tx.run("DELETE FROM memory_vec WHERE memory_id = ?", [id]);
|
|
24536
|
+
this.noteVecWrite();
|
|
24109
24537
|
}
|
|
24110
24538
|
});
|
|
24111
24539
|
}
|
|
@@ -24132,6 +24560,7 @@ class SqliteMemoryStore {
|
|
|
24132
24560
|
return false;
|
|
24133
24561
|
if (contentChanged && this.vecInitialized && this.getVecTableSchema()) {
|
|
24134
24562
|
await tx.run("DELETE FROM memory_vec WHERE memory_id = ?", [id]);
|
|
24563
|
+
this.noteVecWrite();
|
|
24135
24564
|
}
|
|
24136
24565
|
if (after.name !== before.name || contentChanged) {
|
|
24137
24566
|
await this.syncFtsRow(id, after.name, after.content);
|
|
@@ -24165,28 +24594,42 @@ class SqliteMemoryStore {
|
|
|
24165
24594
|
const tableExists = this.getVecTableSchema() !== null;
|
|
24166
24595
|
const tableUsable = tableExists && isSqliteVecAvailable2();
|
|
24167
24596
|
const count = (sql) => db.prepare(sql).get()?.count ?? 0;
|
|
24597
|
+
const validEmbedding = count(`SELECT COUNT(*) as count FROM agent_memory WHERE embedding IS NOT NULL AND length(embedding) = ${VECTOR_BYTES}`);
|
|
24168
24598
|
return {
|
|
24169
24599
|
total: count("SELECT COUNT(*) as count FROM agent_memory"),
|
|
24170
24600
|
withEmbedding: count("SELECT COUNT(*) as count FROM agent_memory WHERE embedding IS NOT NULL"),
|
|
24171
|
-
validEmbedding
|
|
24601
|
+
validEmbedding,
|
|
24172
24602
|
invalidEmbedding: count(`SELECT COUNT(*) as count FROM agent_memory WHERE embedding IS NOT NULL AND length(embedding) != ${VECTOR_BYTES}`),
|
|
24173
24603
|
searchable: count(`SELECT COUNT(*) as count FROM agent_memory
|
|
24174
24604
|
WHERE embedding IS NOT NULL
|
|
24175
24605
|
AND length(embedding) = ${VECTOR_BYTES}
|
|
24176
24606
|
AND (expiresAt IS NULL OR expiresAt > datetime('now'))`),
|
|
24177
24607
|
memoryVec: tableUsable ? count("SELECT COUNT(*) as count FROM memory_vec") : 0,
|
|
24178
|
-
missingFromVec: tableUsable ? count(`SELECT COUNT(*) as count
|
|
24179
|
-
FROM
|
|
24180
|
-
|
|
24608
|
+
missingFromVec: tableUsable ? validEmbedding - count(`SELECT COUNT(*) as count
|
|
24609
|
+
FROM memory_vec v
|
|
24610
|
+
CROSS JOIN agent_memory m ON m.id = v.memory_id
|
|
24181
24611
|
WHERE m.embedding IS NOT NULL
|
|
24182
|
-
AND length(m.embedding) = ${VECTOR_BYTES}
|
|
24183
|
-
AND v.memory_id IS NULL`) : count(`SELECT COUNT(*) as count FROM agent_memory WHERE embedding IS NOT NULL AND length(embedding) = ${VECTOR_BYTES}`),
|
|
24612
|
+
AND length(m.embedding) = ${VECTOR_BYTES}`) : validEmbedding,
|
|
24184
24613
|
extraInVec: tableUsable ? count(`SELECT COUNT(*) as count
|
|
24185
24614
|
FROM memory_vec v
|
|
24186
24615
|
LEFT JOIN agent_memory m ON m.id = v.memory_id
|
|
24187
24616
|
WHERE m.id IS NULL`) : 0
|
|
24188
24617
|
};
|
|
24189
24618
|
}
|
|
24619
|
+
searchHealth() {
|
|
24620
|
+
const db = getDb2();
|
|
24621
|
+
const cached = this.searchHealthCache;
|
|
24622
|
+
if (cached && cached.db === db && Date.now() - cached.at < SEARCH_HEALTH_TTL_MS) {
|
|
24623
|
+
return cached.health;
|
|
24624
|
+
}
|
|
24625
|
+
const health = this.getHealth();
|
|
24626
|
+
this.searchHealthCache = { health, db, at: Date.now() };
|
|
24627
|
+
return health;
|
|
24628
|
+
}
|
|
24629
|
+
noteVecWrite() {
|
|
24630
|
+
if (this.searchHealthCache?.health.retrievalMode !== "vec")
|
|
24631
|
+
this.searchHealthCache = null;
|
|
24632
|
+
}
|
|
24190
24633
|
getHealth() {
|
|
24191
24634
|
const schema = this.getVecTableSchema();
|
|
24192
24635
|
const counts = this.getHealthCounts();
|
|
@@ -24223,7 +24666,7 @@ var VECTOR_BYTES, FTS_SCAN_BATCH_SQL = `SELECT rowid AS rowid, memory_id AS memo
|
|
|
24223
24666
|
memory_id IS NOT NULL
|
|
24224
24667
|
AND NOT EXISTS (SELECT 1 FROM agent_memory m WHERE m.id = memory_fts.memory_id) AS orphan
|
|
24225
24668
|
FROM memory_fts WHERE rowid > ? ORDER BY rowid LIMIT ?`, MEMORY_ID_BATCH_SQL = `SELECT rowid AS rowid, id FROM agent_memory
|
|
24226
|
-
WHERE rowid > ? ORDER BY rowid LIMIT ?`, FTS_SCAN_BATCH_SIZE = 1000, FTS_POPULATE_BATCH_SIZE = 500;
|
|
24669
|
+
WHERE rowid > ? ORDER BY rowid LIMIT ?`, SEARCH_HEALTH_TTL_MS = 60000, FTS_SCAN_BATCH_SIZE = 1000, FTS_POPULATE_BATCH_SIZE = 500;
|
|
24227
24670
|
var init_sqlite_store = __esm(() => {
|
|
24228
24671
|
init_db4();
|
|
24229
24672
|
init_embedding();
|
|
@@ -24233,6 +24676,7 @@ var init_sqlite_store = __esm(() => {
|
|
|
24233
24676
|
init_constants2();
|
|
24234
24677
|
init_key_paths();
|
|
24235
24678
|
init_reranker();
|
|
24679
|
+
init_review_recall_filter();
|
|
24236
24680
|
init_search_candidates();
|
|
24237
24681
|
VECTOR_BYTES = EMBEDDING_DIMENSIONS * Float32Array.BYTES_PER_ELEMENT;
|
|
24238
24682
|
});
|
|
@@ -24918,7 +25362,7 @@ async function loadSecretRegistry() {
|
|
|
24918
25362
|
result.failed += 1;
|
|
24919
25363
|
}
|
|
24920
25364
|
try {
|
|
24921
|
-
const { loadRuntimeControllerSecrets } = await import("./db-
|
|
25365
|
+
const { loadRuntimeControllerSecrets } = await import("./db-p5drc1d1.js");
|
|
24922
25366
|
const loaded = await loadRuntimeControllerSecrets();
|
|
24923
25367
|
result.runtimeController = loaded.count;
|
|
24924
25368
|
result.failed += loaded.failed;
|
|
@@ -25079,7 +25523,7 @@ async function requestSteering(args) {
|
|
|
25079
25523
|
}
|
|
25080
25524
|
const requestedMode = args.mode ?? "queue";
|
|
25081
25525
|
const onUnsupported = args.onUnsupported ?? "degrade";
|
|
25082
|
-
const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-
|
|
25526
|
+
const { dispatchPre, extensionIdForAgent } = await import("./dispatcher-x6w14pde.js");
|
|
25083
25527
|
const preSteer = await dispatchPre("pre.task.steer", {
|
|
25084
25528
|
task,
|
|
25085
25529
|
message: args.message,
|
|
@@ -27314,7 +27758,7 @@ async function createTaskExtended2(task, options) {
|
|
|
27314
27758
|
priority: row.priority
|
|
27315
27759
|
}, (task) => task !== null, row.requestedByUserId);
|
|
27316
27760
|
getDbClient2().afterCommit(() => {
|
|
27317
|
-
import("./event-bus-
|
|
27761
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
27318
27762
|
workflowEventBus.emit("task.created", {
|
|
27319
27763
|
taskId: row.id,
|
|
27320
27764
|
task: row.task,
|
|
@@ -27396,7 +27840,7 @@ async function releaseTask2(taskId, wakeSnapshot) {
|
|
|
27396
27840
|
} catch {}
|
|
27397
27841
|
if (isRuntimePoolsEnabled() && !wakeSnapshot)
|
|
27398
27842
|
getDbClient2().afterCommit(() => {
|
|
27399
|
-
import("./event-bus-
|
|
27843
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
|
|
27400
27844
|
});
|
|
27401
27845
|
}
|
|
27402
27846
|
return row ? rowToAgentTask(row) : null;
|
|
@@ -27466,7 +27910,7 @@ async function rejectTask2(taskId, agentId, reason) {
|
|
|
27466
27910
|
} catch {}
|
|
27467
27911
|
if (isRuntimePoolsEnabled())
|
|
27468
27912
|
getDbClient2().afterCommit(() => {
|
|
27469
|
-
import("./event-bus-
|
|
27913
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
|
|
27470
27914
|
});
|
|
27471
27915
|
}
|
|
27472
27916
|
return row ? rowToAgentTask(row) : null;
|
|
@@ -29115,7 +29559,7 @@ async function deleteScheduledTask2(id) {
|
|
|
29115
29559
|
const parent = await getTaskById2(deferred.parentTaskId);
|
|
29116
29560
|
if (!parent?.deferredAt)
|
|
29117
29561
|
return;
|
|
29118
|
-
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-
|
|
29562
|
+
const { createWorkerTaskFollowUp } = await import("./worker-follow-up-1gs4aw7y.js");
|
|
29119
29563
|
await createWorkerTaskFollowUp({
|
|
29120
29564
|
task: parent,
|
|
29121
29565
|
status: "failed",
|
|
@@ -33468,7 +33912,7 @@ var init_db4 = __esm(() => {
|
|
|
33468
33912
|
configureAgentDependencies({
|
|
33469
33913
|
createLogEntry: (entry) => createLogEntry2(entry),
|
|
33470
33914
|
installSystemDefaultSkillsForAgent: (agentId) => installSystemDefaultSkillsForAgent2(agentId),
|
|
33471
|
-
resolvePendingImportAssignments: async (agent) => (await import("./pending-
|
|
33915
|
+
resolvePendingImportAssignments: async (agent) => (await import("./pending-fwj2fatd.js")).resolvePendingImportAssignments(agent)
|
|
33472
33916
|
});
|
|
33473
33917
|
configureTaskWriteDependencies({
|
|
33474
33918
|
createLogEntry: (...args) => createLogEntry2(...args),
|
|
@@ -33518,4 +33962,4 @@ var init_db4 = __esm(() => {
|
|
|
33518
33962
|
};
|
|
33519
33963
|
});
|
|
33520
33964
|
|
|
33521
|
-
export { auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, defaultCredentialBindings, isPrivateAddress, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, 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, 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, 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, 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, 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, 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, slackThreadHasOutcomeWork, 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, 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, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, init_model_tier_resolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, init_model_validation2, runtimeReadsRepoSecrets, 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, 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, recordKeySeatMismatch2, recordKeyValidation2, retirePoolKeyStatus, init_api_keys, getScriptRunExecutionArgs2, getScriptRunFollowUpGuard2, setScriptRunFollowUpGuard2, 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 };
|
|
33965
|
+
export { auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, defaultCredentialBindings, isPrivateAddress, assertUrlSafe, EgressDeniedError, createGuardedFetch, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, 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, 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, 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, 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, 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, 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, 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 };
|