@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
|
@@ -176,6 +176,7 @@ import {
|
|
|
176
176
|
init_model_catalog_store,
|
|
177
177
|
explicitModelErrorForAgent,
|
|
178
178
|
init_model_validation2,
|
|
179
|
+
configPools,
|
|
179
180
|
checkProfileForAgent,
|
|
180
181
|
init_model_profile_check,
|
|
181
182
|
rowToAgentTask,
|
|
@@ -206,6 +207,7 @@ import {
|
|
|
206
207
|
countAgentDispatchesInThread2,
|
|
207
208
|
findRecentCancelledTaskInThread2,
|
|
208
209
|
init_read,
|
|
210
|
+
hasUnreadableCredentialAllowlist,
|
|
209
211
|
listModelProfiles,
|
|
210
212
|
getModelProfileByName,
|
|
211
213
|
modelProfileRefError,
|
|
@@ -374,6 +376,7 @@ import {
|
|
|
374
376
|
installMcpServer2,
|
|
375
377
|
uninstallMcpServer2,
|
|
376
378
|
getAgentMcpServers2,
|
|
379
|
+
getAvailableKeyIndices2,
|
|
377
380
|
getUserById2,
|
|
378
381
|
getAllUsers2,
|
|
379
382
|
createUser2,
|
|
@@ -400,27 +403,27 @@ import {
|
|
|
400
403
|
recordInlineScriptRun2,
|
|
401
404
|
exports_db,
|
|
402
405
|
init_db4
|
|
403
|
-
} from "./cli-
|
|
406
|
+
} from "./cli-zhn4r1rz.js";
|
|
404
407
|
import {
|
|
405
408
|
assertMayActOnOperatorGrantedTarget2,
|
|
406
409
|
getUserGrant2,
|
|
407
410
|
init_rbac_roles
|
|
408
|
-
} from "./cli-
|
|
411
|
+
} from "./cli-cstggwq7.js";
|
|
409
412
|
import {
|
|
410
413
|
ensurePricingSeeded2,
|
|
411
414
|
ensureRbacSeeded2,
|
|
412
415
|
ensureModelProfilesSeeded2,
|
|
413
416
|
init_boot_seeds
|
|
414
|
-
} from "./cli-
|
|
417
|
+
} from "./cli-f8yhybxr.js";
|
|
415
418
|
import {
|
|
416
419
|
requestModelCatalogRefresh2,
|
|
417
420
|
startPricingRefreshLoop2,
|
|
418
421
|
init_pricing_refresh
|
|
419
|
-
} from "./cli-
|
|
422
|
+
} from "./cli-hnh8erra.js";
|
|
420
423
|
import {
|
|
421
424
|
workflowEventBus2,
|
|
422
425
|
init_event_bus
|
|
423
|
-
} from "./cli-
|
|
426
|
+
} from "./cli-thd3005a.js";
|
|
424
427
|
import {
|
|
425
428
|
slackCode,
|
|
426
429
|
slackMissingScopeMessage,
|
|
@@ -429,7 +432,7 @@ import {
|
|
|
429
432
|
externalChannelToolError2,
|
|
430
433
|
getChannelBlockReason2,
|
|
431
434
|
init_external_channel
|
|
432
|
-
} from "./cli-
|
|
435
|
+
} from "./cli-bq97k63w.js";
|
|
433
436
|
import {
|
|
434
437
|
tableToAscii2,
|
|
435
438
|
init_dist8
|
|
@@ -491,8 +494,8 @@ import {
|
|
|
491
494
|
getSlackApp2,
|
|
492
495
|
startSlackApp2,
|
|
493
496
|
stopSlackAppUnderLifecycleLock2,
|
|
494
|
-
|
|
495
|
-
} from "./cli-
|
|
497
|
+
init_app4
|
|
498
|
+
} from "./cli-6a3j25xd.js";
|
|
496
499
|
import {
|
|
497
500
|
AGENT_MAX_TASKS_CONFIG_KEY,
|
|
498
501
|
resetAgentMaxTasksMirror,
|
|
@@ -513,7 +516,7 @@ import {
|
|
|
513
516
|
postApprovalCancellationUpdates2,
|
|
514
517
|
createApprovalFollowUpTask2,
|
|
515
518
|
init_approval_notifications
|
|
516
|
-
} from "./cli-
|
|
519
|
+
} from "./cli-raqw9fw9.js";
|
|
517
520
|
import {
|
|
518
521
|
shapeApprovalResolution,
|
|
519
522
|
init_approval_resolution,
|
|
@@ -537,7 +540,7 @@ import {
|
|
|
537
540
|
resumeFromChildRun2,
|
|
538
541
|
initWaitBusSubscriptions2,
|
|
539
542
|
init_resume
|
|
540
|
-
} from "./cli-
|
|
543
|
+
} from "./cli-14xdms9a.js";
|
|
541
544
|
import {
|
|
542
545
|
FilesError,
|
|
543
546
|
providerPath,
|
|
@@ -551,7 +554,7 @@ import {
|
|
|
551
554
|
import {
|
|
552
555
|
getRuntimePool2,
|
|
553
556
|
init_db2
|
|
554
|
-
} from "./cli-
|
|
557
|
+
} from "./cli-8zmpwe79.js";
|
|
555
558
|
import {
|
|
556
559
|
duplicateGuardedQueryKey,
|
|
557
560
|
parseQueryParams,
|
|
@@ -587,21 +590,17 @@ import {
|
|
|
587
590
|
findRoute,
|
|
588
591
|
route,
|
|
589
592
|
init_route_def
|
|
590
|
-
} from "./cli-
|
|
593
|
+
} from "./cli-nc39ym5q.js";
|
|
591
594
|
import {
|
|
592
595
|
COMPOSIO_HTTP_METHODS,
|
|
593
596
|
executeComposioRequest,
|
|
594
597
|
composioArgsFromParts,
|
|
595
598
|
init_composio
|
|
596
|
-
} from "./cli-
|
|
599
|
+
} from "./cli-bf0t77nf.js";
|
|
597
600
|
import {
|
|
598
601
|
object,
|
|
599
602
|
init_v4_mini
|
|
600
|
-
} from "./cli-
|
|
601
|
-
import {
|
|
602
|
-
addMinutes,
|
|
603
|
-
init_date_fns
|
|
604
|
-
} from "./cli-wqb4sdt1.js";
|
|
603
|
+
} from "./cli-vbppqvte.js";
|
|
605
604
|
import {
|
|
606
605
|
getMemoryRaterNames,
|
|
607
606
|
init_memory_raters,
|
|
@@ -610,7 +609,11 @@ import {
|
|
|
610
609
|
init_types2,
|
|
611
610
|
LlmRater,
|
|
612
611
|
init_llm
|
|
613
|
-
} from "./cli-
|
|
612
|
+
} from "./cli-bmqp0ser.js";
|
|
613
|
+
import {
|
|
614
|
+
addMinutes,
|
|
615
|
+
init_date_fns
|
|
616
|
+
} from "./cli-wqb4sdt1.js";
|
|
614
617
|
import {
|
|
615
618
|
require_dist,
|
|
616
619
|
ConnectionAuthInputSchema,
|
|
@@ -689,7 +692,7 @@ import {
|
|
|
689
692
|
init_typecheck,
|
|
690
693
|
parseSkillContent,
|
|
691
694
|
init_skill_parser
|
|
692
|
-
} from "./cli-
|
|
695
|
+
} from "./cli-wz4e5am2.js";
|
|
693
696
|
import {
|
|
694
697
|
detachedProcessGroup,
|
|
695
698
|
registerProcessGroup,
|
|
@@ -704,13 +707,13 @@ import {
|
|
|
704
707
|
ensureToken,
|
|
705
708
|
ensureTokenOrThrow,
|
|
706
709
|
init_ensure_token
|
|
707
|
-
} from "./cli-
|
|
710
|
+
} from "./cli-4aswccje.js";
|
|
708
711
|
import {
|
|
709
712
|
SLACK_LEAVE_THREAD_DISABLE,
|
|
710
713
|
isSlackLeaveThreadDisabled,
|
|
711
714
|
leaveSlackThread,
|
|
712
715
|
init_left_threads
|
|
713
|
-
} from "./cli-
|
|
716
|
+
} from "./cli-v3zcnr8g.js";
|
|
714
717
|
import {
|
|
715
718
|
require_fast_deep_equal
|
|
716
719
|
} from "./cli-bhp11egn.js";
|
|
@@ -738,6 +741,7 @@ import {
|
|
|
738
741
|
SystemOneDecisionConfigSchema,
|
|
739
742
|
SystemOneDecisionExecutor,
|
|
740
743
|
init_system_one_decision,
|
|
744
|
+
adoptStoredContext,
|
|
741
745
|
checkpointStep,
|
|
742
746
|
checkpointStepFailure,
|
|
743
747
|
checkpointStepWaiting,
|
|
@@ -756,6 +760,8 @@ import {
|
|
|
756
760
|
workflowSaveWarnings,
|
|
757
761
|
withSaveWarnings,
|
|
758
762
|
init_readiness,
|
|
763
|
+
hasOwedSuccessors,
|
|
764
|
+
init_successor_routing,
|
|
759
765
|
init_template,
|
|
760
766
|
runStepValidation,
|
|
761
767
|
init_validation,
|
|
@@ -788,7 +794,7 @@ import {
|
|
|
788
794
|
validateDefinition,
|
|
789
795
|
applyDefinitionPatch,
|
|
790
796
|
init_definition2
|
|
791
|
-
} from "./cli-
|
|
797
|
+
} from "./cli-m00c47q6.js";
|
|
792
798
|
import {
|
|
793
799
|
isMultiRuntimeEnabled,
|
|
794
800
|
init_multi_runtime2
|
|
@@ -800,7 +806,7 @@ import {
|
|
|
800
806
|
} from "./cli-ytyvpye5.js";
|
|
801
807
|
import {
|
|
802
808
|
init_v4
|
|
803
|
-
} from "./cli-
|
|
809
|
+
} from "./cli-4jjrhy48.js";
|
|
804
810
|
import {
|
|
805
811
|
require_dist2
|
|
806
812
|
} from "./cli-xf1wn5ns.js";
|
|
@@ -811,11 +817,11 @@ import {
|
|
|
811
817
|
import {
|
|
812
818
|
canProvisionKind,
|
|
813
819
|
init_runtime_providers
|
|
814
|
-
} from "./cli-
|
|
820
|
+
} from "./cli-zqq57pgx.js";
|
|
815
821
|
import {
|
|
816
822
|
publicEndpointSsrfOptions,
|
|
817
823
|
init_mcp_wrapper
|
|
818
|
-
} from "./cli-
|
|
824
|
+
} from "./cli-t2s7j5cy.js";
|
|
819
825
|
import {
|
|
820
826
|
findUserById,
|
|
821
827
|
findUserByExternalId,
|
|
@@ -830,7 +836,7 @@ import {
|
|
|
830
836
|
resolveSessionToken,
|
|
831
837
|
fingerprintApiKey,
|
|
832
838
|
init_users
|
|
833
|
-
} from "./cli-
|
|
839
|
+
} from "./cli-yzxqwcvq.js";
|
|
834
840
|
import {
|
|
835
841
|
resolveGitHubHost,
|
|
836
842
|
getGitHubLinkConfig,
|
|
@@ -843,7 +849,7 @@ import {
|
|
|
843
849
|
ampBillsCacheWrites,
|
|
844
850
|
resolveAmpModel,
|
|
845
851
|
init_amp_models
|
|
846
|
-
} from "./cli-
|
|
852
|
+
} from "./cli-5ptj757f.js";
|
|
847
853
|
import {
|
|
848
854
|
normalizeAssetKey,
|
|
849
855
|
defaultAssetKey,
|
|
@@ -896,6 +902,8 @@ import {
|
|
|
896
902
|
SUPERSEDED_WORKFLOW_TASK_REASON,
|
|
897
903
|
WorkflowDefinitionSchema,
|
|
898
904
|
WorkflowNodePatchSchema,
|
|
905
|
+
WEBHOOK_FILTER_PRESETS,
|
|
906
|
+
WebhookDeliveryFilterSchema,
|
|
899
907
|
TriggerConfigSchema,
|
|
900
908
|
CooldownConfigSchema,
|
|
901
909
|
InputValueSchema,
|
|
@@ -915,7 +923,7 @@ import {
|
|
|
915
923
|
KvNamespaceSchema,
|
|
916
924
|
KvKeySchema,
|
|
917
925
|
init_types5
|
|
918
|
-
} from "./cli-
|
|
926
|
+
} from "./cli-1h4njv9y.js";
|
|
919
927
|
import {
|
|
920
928
|
generateDefaultClaudeMd2,
|
|
921
929
|
generateDefaultSoulMd2,
|
|
@@ -926,7 +934,7 @@ import {
|
|
|
926
934
|
init_task_attachment_links,
|
|
927
935
|
contentSha256,
|
|
928
936
|
init_profile_sync
|
|
929
|
-
} from "./cli-
|
|
937
|
+
} from "./cli-mhrr4d5b.js";
|
|
930
938
|
import {
|
|
931
939
|
isSteeringEnabled2,
|
|
932
940
|
init_steering_enabled
|
|
@@ -937,9 +945,14 @@ import {
|
|
|
937
945
|
init_config4
|
|
938
946
|
} from "./cli-eetzmsy5.js";
|
|
939
947
|
import {
|
|
948
|
+
modelFamilyOf,
|
|
949
|
+
windowForModelFamily,
|
|
950
|
+
init_model_rate_limit_windows,
|
|
951
|
+
keySuffix,
|
|
952
|
+
splitCredentialPool,
|
|
940
953
|
selectCredential,
|
|
941
954
|
init_credentials2
|
|
942
|
-
} from "./cli-
|
|
955
|
+
} from "./cli-ha4ek2nb.js";
|
|
943
956
|
import {
|
|
944
957
|
findInterpolationTokens,
|
|
945
958
|
interpolate,
|
|
@@ -949,12 +962,12 @@ import {
|
|
|
949
962
|
init_registry3,
|
|
950
963
|
resolveTemplate,
|
|
951
964
|
init_resolver
|
|
952
|
-
} from "./cli-
|
|
965
|
+
} from "./cli-2z2c4k6q.js";
|
|
953
966
|
import {
|
|
954
967
|
init_zod
|
|
955
|
-
} from "./cli-
|
|
968
|
+
} from "./cli-96234j5w.js";
|
|
956
969
|
import {
|
|
957
|
-
|
|
970
|
+
safeParse2,
|
|
958
971
|
safeParseAsync,
|
|
959
972
|
toJSONSchema,
|
|
960
973
|
string2,
|
|
@@ -980,7 +993,7 @@ import {
|
|
|
980
993
|
ZodIssueCode,
|
|
981
994
|
datetime,
|
|
982
995
|
number3
|
|
983
|
-
} from "./cli-
|
|
996
|
+
} from "./cli-qrzq3hvg.js";
|
|
984
997
|
import {
|
|
985
998
|
MAX_PROFILE_FILE_LENGTH,
|
|
986
999
|
getConfiguredAppUrls,
|
|
@@ -1002,7 +1015,7 @@ import {
|
|
|
1002
1015
|
import {
|
|
1003
1016
|
init_package,
|
|
1004
1017
|
package_default
|
|
1005
|
-
} from "./cli-
|
|
1018
|
+
} from "./cli-a6q6x15h.js";
|
|
1006
1019
|
import {
|
|
1007
1020
|
getNodeEnv,
|
|
1008
1021
|
isDevOrTestNodeEnv,
|
|
@@ -1022,7 +1035,7 @@ import {
|
|
|
1022
1035
|
registerVolatileSecret,
|
|
1023
1036
|
registerSensitiveKeyName,
|
|
1024
1037
|
init_secret_scrubber
|
|
1025
|
-
} from "./cli-
|
|
1038
|
+
} from "./cli-7e8sxqv5.js";
|
|
1026
1039
|
import {
|
|
1027
1040
|
__toESM,
|
|
1028
1041
|
__commonJS,
|
|
@@ -1049,9 +1062,9 @@ function objectFromShape(shape) {
|
|
|
1049
1062
|
return objectType(shape);
|
|
1050
1063
|
throw new Error("Mixed Zod versions detected in object shape.");
|
|
1051
1064
|
}
|
|
1052
|
-
function
|
|
1065
|
+
function safeParse(schema, data) {
|
|
1053
1066
|
if (isZ4Schema(schema)) {
|
|
1054
|
-
const result =
|
|
1067
|
+
const result = safeParse2(schema, data);
|
|
1055
1068
|
return result;
|
|
1056
1069
|
}
|
|
1057
1070
|
const v3Schema = schema;
|
|
@@ -3506,7 +3519,7 @@ function getMethodLiteral(schema) {
|
|
|
3506
3519
|
return value;
|
|
3507
3520
|
}
|
|
3508
3521
|
function parseWithCompat(schema, data) {
|
|
3509
|
-
const result =
|
|
3522
|
+
const result = safeParse(schema, data);
|
|
3510
3523
|
if (!result.success) {
|
|
3511
3524
|
throw result.error;
|
|
3512
3525
|
}
|
|
@@ -4086,7 +4099,7 @@ class Protocol {
|
|
|
4086
4099
|
return reject(response);
|
|
4087
4100
|
}
|
|
4088
4101
|
try {
|
|
4089
|
-
const parseResult =
|
|
4102
|
+
const parseResult = safeParse(resultSchema, response.result);
|
|
4090
4103
|
if (!parseResult.success) {
|
|
4091
4104
|
reject(parseResult.error);
|
|
4092
4105
|
} else {
|
|
@@ -11030,7 +11043,7 @@ var init_server3 = __esm(() => {
|
|
|
11030
11043
|
const method = methodValue;
|
|
11031
11044
|
if (method === "tools/call") {
|
|
11032
11045
|
const wrappedHandler = async (request, extra) => {
|
|
11033
|
-
const validatedRequest =
|
|
11046
|
+
const validatedRequest = safeParse(CallToolRequestSchema, request);
|
|
11034
11047
|
if (!validatedRequest.success) {
|
|
11035
11048
|
const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
|
|
11036
11049
|
throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call request: ${errorMessage}`);
|
|
@@ -11038,14 +11051,14 @@ var init_server3 = __esm(() => {
|
|
|
11038
11051
|
const { params } = validatedRequest.data;
|
|
11039
11052
|
const result = await Promise.resolve(handler(request, extra));
|
|
11040
11053
|
if (params.task) {
|
|
11041
|
-
const taskValidationResult =
|
|
11054
|
+
const taskValidationResult = safeParse(CreateTaskResultSchema, result);
|
|
11042
11055
|
if (!taskValidationResult.success) {
|
|
11043
11056
|
const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error);
|
|
11044
11057
|
throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);
|
|
11045
11058
|
}
|
|
11046
11059
|
return taskValidationResult.data;
|
|
11047
11060
|
}
|
|
11048
|
-
const validationResult =
|
|
11061
|
+
const validationResult = safeParse(CallToolResultSchema, result);
|
|
11049
11062
|
if (!validationResult.success) {
|
|
11050
11063
|
const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
|
|
11051
11064
|
throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call result: ${errorMessage}`);
|
|
@@ -12176,6 +12189,10 @@ var init_mcp = __esm(() => {
|
|
|
12176
12189
|
});
|
|
12177
12190
|
|
|
12178
12191
|
// src/github/app.ts
|
|
12192
|
+
function decodePrivateKey(raw) {
|
|
12193
|
+
return raw.startsWith("-----BEGIN") ? raw.replace(/\\n/g, `
|
|
12194
|
+
`) : Buffer.from(raw, "base64").toString("utf-8");
|
|
12195
|
+
}
|
|
12179
12196
|
function isGitHubEnabled() {
|
|
12180
12197
|
if (isEnvFlagEnabled("GITHUB_DISABLE", false)) {
|
|
12181
12198
|
return false;
|
|
@@ -12215,12 +12232,7 @@ function initGitHub() {
|
|
|
12215
12232
|
appId = process.env.GITHUB_APP_ID ?? null;
|
|
12216
12233
|
const rawPrivateKey = process.env.GITHUB_APP_PRIVATE_KEY ?? null;
|
|
12217
12234
|
if (appId && rawPrivateKey) {
|
|
12218
|
-
|
|
12219
|
-
privateKey = rawPrivateKey.replace(/\\n/g, `
|
|
12220
|
-
`);
|
|
12221
|
-
} else {
|
|
12222
|
-
privateKey = Buffer.from(rawPrivateKey, "base64").toString("utf-8");
|
|
12223
|
-
}
|
|
12235
|
+
privateKey = decodePrivateKey(rawPrivateKey);
|
|
12224
12236
|
console.log("[GitHub] App credentials loaded for bot reactions");
|
|
12225
12237
|
} else {
|
|
12226
12238
|
console.log("[GitHub] No App credentials, bot reactions disabled");
|
|
@@ -12260,15 +12272,16 @@ async function verifyWebhookSignature(payload, signature) {
|
|
|
12260
12272
|
}
|
|
12261
12273
|
return isValid;
|
|
12262
12274
|
}
|
|
12263
|
-
async function generateAppJWT() {
|
|
12264
|
-
|
|
12275
|
+
async function generateAppJWT(creds = { appId, privateKey }) {
|
|
12276
|
+
const { appId: appId2, privateKey: privateKey2 } = creds;
|
|
12277
|
+
if (!appId2 || !privateKey2) {
|
|
12265
12278
|
return null;
|
|
12266
12279
|
}
|
|
12267
12280
|
const now = Math.floor(Date.now() / 1000);
|
|
12268
12281
|
const payload = {
|
|
12269
12282
|
iat: now - 60,
|
|
12270
12283
|
exp: now + 600,
|
|
12271
|
-
iss:
|
|
12284
|
+
iss: appId2
|
|
12272
12285
|
};
|
|
12273
12286
|
const base64url = (data) => {
|
|
12274
12287
|
const base64 = Buffer.isBuffer(data) ? data.toString("base64") : Buffer.from(data).toString("base64");
|
|
@@ -12282,7 +12295,7 @@ async function generateAppJWT() {
|
|
|
12282
12295
|
const crypto2 = await import("node:crypto");
|
|
12283
12296
|
const sign = crypto2.createSign("RSA-SHA256");
|
|
12284
12297
|
sign.update(signingInput);
|
|
12285
|
-
const signature = sign.sign(
|
|
12298
|
+
const signature = sign.sign(privateKey2);
|
|
12286
12299
|
const signatureB64 = base64url(signature);
|
|
12287
12300
|
return `${signingInput}.${signatureB64}`;
|
|
12288
12301
|
} catch (error) {
|
|
@@ -12291,11 +12304,14 @@ async function generateAppJWT() {
|
|
|
12291
12304
|
}
|
|
12292
12305
|
}
|
|
12293
12306
|
async function getInstallationToken(installationId) {
|
|
12307
|
+
return (await mintInstallationToken(installationId, { appId, privateKey }, 60000))?.token ?? null;
|
|
12308
|
+
}
|
|
12309
|
+
async function mintInstallationToken(installationId, creds, minValidityMs) {
|
|
12294
12310
|
const cached = tokenCache.get(installationId);
|
|
12295
|
-
if (cached && cached.expiresAt > Date.now() +
|
|
12296
|
-
return cached
|
|
12311
|
+
if (cached && cached.expiresAt > Date.now() + minValidityMs) {
|
|
12312
|
+
return cached;
|
|
12297
12313
|
}
|
|
12298
|
-
const jwt = await generateAppJWT();
|
|
12314
|
+
const jwt = await generateAppJWT(creds);
|
|
12299
12315
|
if (!jwt) {
|
|
12300
12316
|
console.log("[GitHub] No JWT available, cannot get installation token");
|
|
12301
12317
|
return null;
|
|
@@ -12316,16 +12332,33 @@ async function getInstallationToken(installationId) {
|
|
|
12316
12332
|
}
|
|
12317
12333
|
const data = await response.json();
|
|
12318
12334
|
const expiresAt = new Date(data.expires_at).getTime();
|
|
12319
|
-
|
|
12335
|
+
const minted = { token: data.token, expiresAt };
|
|
12336
|
+
tokenCache.set(installationId, minted);
|
|
12320
12337
|
console.log(`[GitHub] Got installation token for ${installationId}, expires at ${data.expires_at}`);
|
|
12321
|
-
return
|
|
12338
|
+
return minted;
|
|
12322
12339
|
} catch (error) {
|
|
12323
12340
|
console.error("[GitHub] Error getting installation token:", error);
|
|
12324
12341
|
return null;
|
|
12325
12342
|
}
|
|
12326
12343
|
}
|
|
12344
|
+
async function getWorkerInstallationToken() {
|
|
12345
|
+
if (isEnvFlagEnabled("GITHUB_DISABLE", false))
|
|
12346
|
+
return { status: "unconfigured" };
|
|
12347
|
+
const workerAppId = process.env.GITHUB_APP_ID?.trim();
|
|
12348
|
+
const rawKey = process.env.GITHUB_APP_PRIVATE_KEY?.trim();
|
|
12349
|
+
const rawInstallation = process.env.GITHUB_APP_INSTALLATION_ID?.trim() ?? "";
|
|
12350
|
+
if (!workerAppId || !rawKey || !/^[1-9][0-9]{0,15}$/.test(rawInstallation)) {
|
|
12351
|
+
return { status: "unconfigured" };
|
|
12352
|
+
}
|
|
12353
|
+
if (!resolveGitHubHost().ok)
|
|
12354
|
+
return { status: "error" };
|
|
12355
|
+
const minted = await mintInstallationToken(Number(rawInstallation), { appId: workerAppId, privateKey: decodePrivateKey(rawKey) }, 600000);
|
|
12356
|
+
if (!minted)
|
|
12357
|
+
return { status: "error" };
|
|
12358
|
+
return { status: "ok", token: minted.token, expiresAt: new Date(minted.expiresAt).toISOString() };
|
|
12359
|
+
}
|
|
12327
12360
|
var initialized = false, webhookSecret = null, appId = null, privateKey = null, tokenCache;
|
|
12328
|
-
var
|
|
12361
|
+
var init_app = __esm(() => {
|
|
12329
12362
|
init_env_flag();
|
|
12330
12363
|
init_github_host();
|
|
12331
12364
|
tokenCache = new Map;
|
|
@@ -12423,7 +12456,7 @@ async function addGraphQLReaction(nodeId, reaction, installationId) {
|
|
|
12423
12456
|
var init_reactions = __esm(() => {
|
|
12424
12457
|
init_github_host();
|
|
12425
12458
|
init_secret_scrubber();
|
|
12426
|
-
|
|
12459
|
+
init_app();
|
|
12427
12460
|
});
|
|
12428
12461
|
|
|
12429
12462
|
// src/github/task-reactions.ts
|
|
@@ -20089,7 +20122,7 @@ async function completeIfSettled(runId, ctx) {
|
|
|
20089
20122
|
if (await getRunLineageBlock(runId))
|
|
20090
20123
|
return false;
|
|
20091
20124
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
20092
|
-
if (retryPendingNodeIds(steps).size > 0)
|
|
20125
|
+
if (retryPendingNodeIds(steps).size > 0 || hasOwedSuccessors(runId))
|
|
20093
20126
|
return false;
|
|
20094
20127
|
const latest = new Map;
|
|
20095
20128
|
for (const step of steps)
|
|
@@ -20099,6 +20132,7 @@ async function completeIfSettled(runId, ctx) {
|
|
|
20099
20132
|
return false;
|
|
20100
20133
|
}
|
|
20101
20134
|
}
|
|
20135
|
+
await adoptStoredContext(runId, ctx);
|
|
20102
20136
|
await updateWorkflowRun2(runId, {
|
|
20103
20137
|
status: "completed",
|
|
20104
20138
|
context: ctx,
|
|
@@ -20158,7 +20192,7 @@ async function recoverWaitingRuns(registry) {
|
|
|
20158
20192
|
await finalizeOrWait2(stuck.runId);
|
|
20159
20193
|
} else {
|
|
20160
20194
|
const secretKeys = getSecretInputKeys(workflow.input);
|
|
20161
|
-
await walkGraph(workflow.definition, stuck.runId, ctx, routing.successors, registry, workflow.id, secretKeys);
|
|
20195
|
+
await walkGraph(workflow.definition, stuck.runId, ctx, routing.successors, registry, workflow.id, secretKeys, { successorDebt: routing.successorDebt });
|
|
20162
20196
|
}
|
|
20163
20197
|
recovered++;
|
|
20164
20198
|
} catch (err) {
|
|
@@ -20212,7 +20246,7 @@ async function recoverApprovalWaitingRuns(registry) {
|
|
|
20212
20246
|
continue;
|
|
20213
20247
|
if (routing.successors.length > 0) {
|
|
20214
20248
|
const secretKeys = getSecretInputKeys(workflow.input);
|
|
20215
|
-
await walkGraph(workflow.definition, stuck.runId, ctx, routing.successors, registry, workflow.id, secretKeys);
|
|
20249
|
+
await walkGraph(workflow.definition, stuck.runId, ctx, routing.successors, registry, workflow.id, secretKeys, { successorDebt: routing.successorDebt });
|
|
20216
20250
|
} else {
|
|
20217
20251
|
await finalizeOrWait2(stuck.runId);
|
|
20218
20252
|
}
|
|
@@ -20289,6 +20323,7 @@ var init_recovery = __esm(() => {
|
|
|
20289
20323
|
init_db4();
|
|
20290
20324
|
init_workflow_runs();
|
|
20291
20325
|
init_approval_resolution();
|
|
20326
|
+
init_checkpoint();
|
|
20292
20327
|
init_completed_step_routing();
|
|
20293
20328
|
init_constants();
|
|
20294
20329
|
init_engine();
|
|
@@ -20296,6 +20331,7 @@ var init_recovery = __esm(() => {
|
|
|
20296
20331
|
init_foreach_driver();
|
|
20297
20332
|
init_input();
|
|
20298
20333
|
init_resume();
|
|
20334
|
+
init_successor_routing();
|
|
20299
20335
|
init_task_step_routing();
|
|
20300
20336
|
});
|
|
20301
20337
|
|
|
@@ -20303,6 +20339,7 @@ var init_recovery = __esm(() => {
|
|
|
20303
20339
|
function startRetryPoller(registry, intervalMs = 5000) {
|
|
20304
20340
|
if (pollerTimeout !== null)
|
|
20305
20341
|
return;
|
|
20342
|
+
const generation = pollerGeneration;
|
|
20306
20343
|
async function poll() {
|
|
20307
20344
|
try {
|
|
20308
20345
|
const retryableSteps = await getRetryableSteps2();
|
|
@@ -20371,7 +20408,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20371
20408
|
if (!drive.joined)
|
|
20372
20409
|
continue;
|
|
20373
20410
|
if (drive.successors.length > 0) {
|
|
20374
|
-
await walkGraph(workflow.definition, run.id, ctx, drive.successors, registry, workflow.id);
|
|
20411
|
+
await walkGraph(workflow.definition, run.id, ctx, drive.successors, registry, workflow.id, undefined, { successorDebt: drive.successorDebt });
|
|
20375
20412
|
} else {
|
|
20376
20413
|
await completeRunIfSettled(run.id, ctx);
|
|
20377
20414
|
}
|
|
@@ -20380,7 +20417,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20380
20417
|
if (!waiting)
|
|
20381
20418
|
continue;
|
|
20382
20419
|
if (result.waitFor === "workflow.child.finished") {
|
|
20383
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
20420
|
+
const { resumeFromChildRun } = await import("./resume-hj1mn65y.js");
|
|
20384
20421
|
await resumeFromChildRun(step.id, registry);
|
|
20385
20422
|
}
|
|
20386
20423
|
} else {
|
|
@@ -20435,7 +20472,8 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20435
20472
|
} catch (err) {
|
|
20436
20473
|
console.error("[workflows] Retry poller error:", err);
|
|
20437
20474
|
}
|
|
20438
|
-
|
|
20475
|
+
if (generation === pollerGeneration)
|
|
20476
|
+
pollerTimeout = setTimeout(poll, intervalMs);
|
|
20439
20477
|
}
|
|
20440
20478
|
pollerTimeout = setTimeout(poll, intervalMs);
|
|
20441
20479
|
}
|
|
@@ -20475,8 +20513,9 @@ async function completeRunIfSettled(runId, ctx) {
|
|
|
20475
20513
|
return;
|
|
20476
20514
|
const steps = await getWorkflowRunStepsByRunId2(runId);
|
|
20477
20515
|
const live = steps.some((s) => s.status === "running" || s.status === "waiting" || s.status === "failed" && s.nextRetryAt != null);
|
|
20478
|
-
if (live)
|
|
20516
|
+
if (live || hasOwedSuccessors(runId))
|
|
20479
20517
|
return;
|
|
20518
|
+
await adoptStoredContext(runId, ctx);
|
|
20480
20519
|
await updateWorkflowRun2(runId, {
|
|
20481
20520
|
status: "completed",
|
|
20482
20521
|
context: ctx,
|
|
@@ -20484,7 +20523,7 @@ async function completeRunIfSettled(runId, ctx) {
|
|
|
20484
20523
|
});
|
|
20485
20524
|
});
|
|
20486
20525
|
}
|
|
20487
|
-
var pollerTimeout = null, RETRYABLE_RUN_STATUSES;
|
|
20526
|
+
var pollerTimeout = null, pollerGeneration = 0, RETRYABLE_RUN_STATUSES;
|
|
20488
20527
|
var init_retry_poller = __esm(() => {
|
|
20489
20528
|
init_db4();
|
|
20490
20529
|
init_workflow_runs();
|
|
@@ -20494,6 +20533,7 @@ var init_retry_poller = __esm(() => {
|
|
|
20494
20533
|
init_foreach_driver();
|
|
20495
20534
|
init_foreach_join();
|
|
20496
20535
|
init_step_input();
|
|
20536
|
+
init_successor_routing();
|
|
20497
20537
|
init_validation();
|
|
20498
20538
|
RETRYABLE_RUN_STATUSES = new Set(["running", "waiting", "failed"]);
|
|
20499
20539
|
});
|
|
@@ -20501,6 +20541,127 @@ var init_retry_poller = __esm(() => {
|
|
|
20501
20541
|
// src/workflows/templates.ts
|
|
20502
20542
|
var init_templates2 = () => {};
|
|
20503
20543
|
|
|
20544
|
+
// src/workflows/webhook-filter.ts
|
|
20545
|
+
function headerValue(headers, name) {
|
|
20546
|
+
const target = name.toLowerCase();
|
|
20547
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
20548
|
+
if (key.toLowerCase() !== target)
|
|
20549
|
+
continue;
|
|
20550
|
+
const first = Array.isArray(value) ? value[0] : value;
|
|
20551
|
+
return typeof first === "string" ? first : undefined;
|
|
20552
|
+
}
|
|
20553
|
+
return;
|
|
20554
|
+
}
|
|
20555
|
+
function isPreset(value) {
|
|
20556
|
+
return typeof value === "string" && WEBHOOK_FILTER_PRESETS.includes(value);
|
|
20557
|
+
}
|
|
20558
|
+
function listed(value) {
|
|
20559
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null) {
|
|
20560
|
+
return [value];
|
|
20561
|
+
}
|
|
20562
|
+
return value;
|
|
20563
|
+
}
|
|
20564
|
+
function valueAllowed(value, allowed) {
|
|
20565
|
+
return allowed.some((candidate) => Object.is(candidate, value));
|
|
20566
|
+
}
|
|
20567
|
+
function readBodyPath(body, path) {
|
|
20568
|
+
let current = body;
|
|
20569
|
+
for (const segment of path.split(".")) {
|
|
20570
|
+
if (Array.isArray(current)) {
|
|
20571
|
+
if (!/^(0|[1-9]\d*)$/.test(segment) || !Object.hasOwn(current, segment)) {
|
|
20572
|
+
return { found: false };
|
|
20573
|
+
}
|
|
20574
|
+
current = current[Number(segment)];
|
|
20575
|
+
continue;
|
|
20576
|
+
}
|
|
20577
|
+
if (current === null || typeof current !== "object")
|
|
20578
|
+
return { found: false };
|
|
20579
|
+
if (!Object.hasOwn(current, segment))
|
|
20580
|
+
return { found: false };
|
|
20581
|
+
current = current[segment];
|
|
20582
|
+
}
|
|
20583
|
+
return { found: true, value: current };
|
|
20584
|
+
}
|
|
20585
|
+
function clauseMatches(clause, headers, body) {
|
|
20586
|
+
if (clause.source === "header") {
|
|
20587
|
+
return valueAllowed(headerValue(headers, clause.path), clause.allowed);
|
|
20588
|
+
}
|
|
20589
|
+
const read = readBodyPath(body, clause.path);
|
|
20590
|
+
return read.found && valueAllowed(read.value, clause.allowed);
|
|
20591
|
+
}
|
|
20592
|
+
function observedEvent(clause, headers, body) {
|
|
20593
|
+
if (clause.source === "header")
|
|
20594
|
+
return headerValue(headers, clause.path) ?? null;
|
|
20595
|
+
const read = readBodyPath(body, clause.path);
|
|
20596
|
+
return read.found && typeof read.value === "string" ? read.value : null;
|
|
20597
|
+
}
|
|
20598
|
+
function invalid(message) {
|
|
20599
|
+
return { action: "invalid", message };
|
|
20600
|
+
}
|
|
20601
|
+
function decideWebhookDelivery(trigger, headers, body) {
|
|
20602
|
+
if (trigger.preset !== undefined && !isPreset(trigger.preset)) {
|
|
20603
|
+
return invalid(WEBHOOK_PRESET_INVALID_MESSAGE);
|
|
20604
|
+
}
|
|
20605
|
+
if (trigger.eventHeader !== undefined && (typeof trigger.eventHeader !== "string" || trigger.eventHeader.length === 0)) {
|
|
20606
|
+
return invalid(WEBHOOK_EVENT_HEADER_INVALID_MESSAGE);
|
|
20607
|
+
}
|
|
20608
|
+
if (trigger.events != null) {
|
|
20609
|
+
if (!Array.isArray(trigger.events) || trigger.events.some((event) => typeof event !== "string")) {
|
|
20610
|
+
return invalid(WEBHOOK_EVENTS_INVALID_MESSAGE);
|
|
20611
|
+
}
|
|
20612
|
+
}
|
|
20613
|
+
const clauses = [];
|
|
20614
|
+
const events = Array.isArray(trigger.events) ? trigger.events : [];
|
|
20615
|
+
if (events.length > 0) {
|
|
20616
|
+
const preset = isPreset(trigger.preset) ? trigger.preset : "github";
|
|
20617
|
+
const source = typeof trigger.eventHeader === "string" ? { source: "header", path: trigger.eventHeader } : EVENT_SOURCES[preset];
|
|
20618
|
+
clauses.push({ ...source, allowed: events, origin: "events" });
|
|
20619
|
+
}
|
|
20620
|
+
if (trigger.filter !== undefined) {
|
|
20621
|
+
const parsed = WebhookDeliveryFilterSchema.safeParse(trigger.filter);
|
|
20622
|
+
if (!parsed.success)
|
|
20623
|
+
return invalid(WEBHOOK_FILTER_INVALID_MESSAGE);
|
|
20624
|
+
for (const [name, allowed] of Object.entries(parsed.data.headers ?? {})) {
|
|
20625
|
+
clauses.push({ source: "header", path: name, allowed: listed(allowed), origin: "filter" });
|
|
20626
|
+
}
|
|
20627
|
+
for (const [path, allowed] of Object.entries(parsed.data.body ?? {})) {
|
|
20628
|
+
clauses.push({ source: "body", path, allowed: listed(allowed), origin: "filter" });
|
|
20629
|
+
}
|
|
20630
|
+
}
|
|
20631
|
+
for (const clause of clauses) {
|
|
20632
|
+
if (clauseMatches(clause, headers, body))
|
|
20633
|
+
continue;
|
|
20634
|
+
if (clause.origin === "events") {
|
|
20635
|
+
return {
|
|
20636
|
+
action: "skip",
|
|
20637
|
+
skip: {
|
|
20638
|
+
skipped: true,
|
|
20639
|
+
reason: "event-not-allowed",
|
|
20640
|
+
event: observedEvent(clause, headers, body)
|
|
20641
|
+
}
|
|
20642
|
+
};
|
|
20643
|
+
}
|
|
20644
|
+
return {
|
|
20645
|
+
action: "skip",
|
|
20646
|
+
skip: {
|
|
20647
|
+
skipped: true,
|
|
20648
|
+
reason: "filter-not-matched",
|
|
20649
|
+
match: { source: clause.source, path: clause.path }
|
|
20650
|
+
}
|
|
20651
|
+
};
|
|
20652
|
+
}
|
|
20653
|
+
return { action: "allow" };
|
|
20654
|
+
}
|
|
20655
|
+
var WEBHOOK_FILTER_INVALID_MESSAGE = "Webhook trigger filter is invalid", WEBHOOK_PRESET_INVALID_MESSAGE = "Webhook trigger preset is invalid", WEBHOOK_EVENTS_INVALID_MESSAGE = "Webhook trigger events allowlist is invalid", WEBHOOK_EVENT_HEADER_INVALID_MESSAGE = "Webhook trigger eventHeader is invalid", EVENT_SOURCES;
|
|
20656
|
+
var init_webhook_filter = __esm(() => {
|
|
20657
|
+
init_types5();
|
|
20658
|
+
EVENT_SOURCES = {
|
|
20659
|
+
github: { source: "header", path: "X-GitHub-Event" },
|
|
20660
|
+
gitlab: { source: "header", path: "X-Gitlab-Event" },
|
|
20661
|
+
"standard-webhooks": { source: "body", path: "type" }
|
|
20662
|
+
};
|
|
20663
|
+
});
|
|
20664
|
+
|
|
20504
20665
|
// src/workflows/triggers.ts
|
|
20505
20666
|
import crypto2 from "node:crypto";
|
|
20506
20667
|
function getHeader(headers, name) {
|
|
@@ -20592,12 +20753,6 @@ async function verifyWebhookRequest(trigger, rawBody, headers) {
|
|
|
20592
20753
|
throw new WebhookError("Invalid signature", 401);
|
|
20593
20754
|
}
|
|
20594
20755
|
}
|
|
20595
|
-
function filteredWebhookEvent(trigger, headers) {
|
|
20596
|
-
if (!trigger.events || trigger.events.length === 0)
|
|
20597
|
-
return;
|
|
20598
|
-
const event = getHeader(headers, trigger.eventHeader || DEFAULT_EVENT_HEADER) ?? null;
|
|
20599
|
-
return event !== null && trigger.events.includes(event) ? undefined : event;
|
|
20600
|
-
}
|
|
20601
20756
|
async function handleWebhookTrigger(workflowId, payload, headers, registry, options = {}) {
|
|
20602
20757
|
const workflow = await getWorkflow2(workflowId);
|
|
20603
20758
|
if (!workflow) {
|
|
@@ -20613,12 +20768,16 @@ async function handleWebhookTrigger(workflowId, payload, headers, registry, opti
|
|
|
20613
20768
|
}
|
|
20614
20769
|
} else {
|
|
20615
20770
|
await verifyWebhookRequest(webhookTrigger, typeof payload === "string" ? payload : JSON.stringify(payload), headers);
|
|
20616
|
-
const filtered = filteredWebhookEvent(webhookTrigger, headers);
|
|
20617
|
-
if (filtered !== undefined) {
|
|
20618
|
-
return { skipped: true, reason: "event-not-allowed", event: filtered };
|
|
20619
|
-
}
|
|
20620
20771
|
}
|
|
20621
20772
|
const triggerData = parseTriggerPayload(payload);
|
|
20773
|
+
if (webhookTrigger) {
|
|
20774
|
+
const decision = decideWebhookDelivery(webhookTrigger, headers, triggerData);
|
|
20775
|
+
if (decision.action === "invalid") {
|
|
20776
|
+
throw new WebhookError(decision.message, 500);
|
|
20777
|
+
}
|
|
20778
|
+
if (decision.action === "skip")
|
|
20779
|
+
return decision.skip;
|
|
20780
|
+
}
|
|
20622
20781
|
const runId = await startWorkflowExecution2(workflow, triggerData, registry, {
|
|
20623
20782
|
triggerType: "event",
|
|
20624
20783
|
requestedByUserId: options.requestedByUserId
|
|
@@ -20767,11 +20926,12 @@ function timingSafeEqualHex(providedHex, expected) {
|
|
|
20767
20926
|
return false;
|
|
20768
20927
|
}
|
|
20769
20928
|
}
|
|
20770
|
-
var DEFAULT_HMAC_HEADER = "X-Hub-Signature-256", FALLBACK_HMAC_HEADERS,
|
|
20929
|
+
var DEFAULT_HMAC_HEADER = "X-Hub-Signature-256", FALLBACK_HMAC_HEADERS, STANDARD_WEBHOOK_SECRET_PREFIX = "whsec_", WebhookError;
|
|
20771
20930
|
var init_triggers = __esm(() => {
|
|
20772
20931
|
init_db4();
|
|
20773
20932
|
init_engine();
|
|
20774
20933
|
init_input();
|
|
20934
|
+
init_webhook_filter();
|
|
20775
20935
|
FALLBACK_HMAC_HEADERS = ["x-hub-signature-256", "x-signature", "x-webhook-signature"];
|
|
20776
20936
|
WebhookError = class WebhookError extends Error {
|
|
20777
20937
|
statusCode;
|
|
@@ -20836,6 +20996,7 @@ var init_version = __esm(() => {
|
|
|
20836
20996
|
function startWaitPoller(registry, intervalMs = 5000) {
|
|
20837
20997
|
if (pollerTimeout2 !== null)
|
|
20838
20998
|
return;
|
|
20999
|
+
const generation = pollerGeneration2;
|
|
20839
21000
|
async function poll() {
|
|
20840
21001
|
try {
|
|
20841
21002
|
const dueWaits = await getDueWaitStates2();
|
|
@@ -20850,11 +21011,12 @@ function startWaitPoller(registry, intervalMs = 5000) {
|
|
|
20850
21011
|
} catch (err) {
|
|
20851
21012
|
console.error("[workflows] Wait poller tick error:", err);
|
|
20852
21013
|
}
|
|
20853
|
-
|
|
21014
|
+
if (generation === pollerGeneration2)
|
|
21015
|
+
pollerTimeout2 = setTimeout(poll, intervalMs);
|
|
20854
21016
|
}
|
|
20855
21017
|
pollerTimeout2 = setTimeout(poll, intervalMs);
|
|
20856
21018
|
}
|
|
20857
|
-
var pollerTimeout2 = null;
|
|
21019
|
+
var pollerTimeout2 = null, pollerGeneration2 = 0;
|
|
20858
21020
|
var init_wait_poller = __esm(() => {
|
|
20859
21021
|
init_db4();
|
|
20860
21022
|
init_resume();
|
|
@@ -21121,7 +21283,7 @@ var init_notify = __esm(() => {
|
|
|
21121
21283
|
}
|
|
21122
21284
|
}
|
|
21123
21285
|
case "slack": {
|
|
21124
|
-
const { getSlackApp } = await import("./app-
|
|
21286
|
+
const { getSlackApp } = await import("./app-kyqt8ehw.js");
|
|
21125
21287
|
let app = getSlackApp();
|
|
21126
21288
|
if (!app) {
|
|
21127
21289
|
if (!isSlackConfigured()) {
|
|
@@ -21254,7 +21416,7 @@ var init_property_match = __esm(() => {
|
|
|
21254
21416
|
async function executeRawLlm(config) {
|
|
21255
21417
|
let modelName = config.model ?? "google/gemini-3-flash-preview";
|
|
21256
21418
|
try {
|
|
21257
|
-
const { createOpenAI } = await import("./index-
|
|
21419
|
+
const { createOpenAI } = await import("./index-kzdqn3dd.js");
|
|
21258
21420
|
const llmConfig = await resolveWorkflowLlmConfig(config.model);
|
|
21259
21421
|
modelName = llmConfig.model;
|
|
21260
21422
|
const provider = createOpenAI({
|
|
@@ -21264,7 +21426,7 @@ async function executeRawLlm(config) {
|
|
|
21264
21426
|
});
|
|
21265
21427
|
const model = provider(llmConfig.model);
|
|
21266
21428
|
if (config.schema) {
|
|
21267
|
-
const { generateObject, jsonSchema } = await import("./index-
|
|
21429
|
+
const { generateObject, jsonSchema } = await import("./index-kdmkfjt7.js");
|
|
21268
21430
|
const { object } = await generateObject({
|
|
21269
21431
|
model,
|
|
21270
21432
|
schema: jsonSchema(config.schema),
|
|
@@ -21278,7 +21440,7 @@ async function executeRawLlm(config) {
|
|
|
21278
21440
|
output: { result: object, model: modelName }
|
|
21279
21441
|
};
|
|
21280
21442
|
}
|
|
21281
|
-
const { generateText } = await import("./index-
|
|
21443
|
+
const { generateText } = await import("./index-kdmkfjt7.js");
|
|
21282
21444
|
const { text } = await generateText({
|
|
21283
21445
|
model,
|
|
21284
21446
|
prompt: config.prompt
|
|
@@ -21838,8 +22000,8 @@ var init_validate3 = __esm(() => {
|
|
|
21838
22000
|
const interpolatedPrompt = this.deps.interpolate(prompt, context);
|
|
21839
22001
|
const outputStr = typeof targetOutput === "string" ? targetOutput : JSON.stringify(targetOutput);
|
|
21840
22002
|
try {
|
|
21841
|
-
const { createOpenAI } = await import("./index-
|
|
21842
|
-
const { generateObject, jsonSchema } = await import("./index-
|
|
22003
|
+
const { createOpenAI } = await import("./index-kzdqn3dd.js");
|
|
22004
|
+
const { generateObject, jsonSchema } = await import("./index-kdmkfjt7.js");
|
|
21843
22005
|
const llmConfig = await resolveWorkflowLlmConfig();
|
|
21844
22006
|
const provider = createOpenAI({
|
|
21845
22007
|
baseURL: llmConfig.baseURL,
|
|
@@ -24550,7 +24712,7 @@ function setPreloadedTools(server, names) {
|
|
|
24550
24712
|
async function applyPreToolCall(name, args, requestInfo, inputSchema) {
|
|
24551
24713
|
if (requestInfo.callOrigin !== "mcp")
|
|
24552
24714
|
return { args };
|
|
24553
|
-
const dispatcher = await import("./dispatcher-
|
|
24715
|
+
const dispatcher = await import("./dispatcher-x6w14pde.js");
|
|
24554
24716
|
const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
|
|
24555
24717
|
validateModify: async (data) => {
|
|
24556
24718
|
const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
|
|
@@ -24937,7 +25099,7 @@ async function invokeToolInProcess(args) {
|
|
|
24937
25099
|
}
|
|
24938
25100
|
return tool.inputSchema ? await Promise.resolve(tool.handler(handlerArgs, extra)) : await Promise.resolve(tool.handler(extra));
|
|
24939
25101
|
}
|
|
24940
|
-
function
|
|
25102
|
+
function headerValue2(req, name) {
|
|
24941
25103
|
const value = req.headers[name];
|
|
24942
25104
|
return Array.isArray(value) ? value[0] : value;
|
|
24943
25105
|
}
|
|
@@ -24948,8 +25110,8 @@ async function handleMcpBridge(req, res, pathSegments, _queryParams, myAgentId)
|
|
|
24948
25110
|
if (!parsed)
|
|
24949
25111
|
return true;
|
|
24950
25112
|
const { tool: toolName, args } = parsed.body;
|
|
24951
|
-
const sourceTaskId =
|
|
24952
|
-
const runtimeInstanceId =
|
|
25113
|
+
const sourceTaskId = headerValue2(req, "x-source-task-id");
|
|
25114
|
+
const runtimeInstanceId = headerValue2(req, "x-runtime-instance-id");
|
|
24953
25115
|
try {
|
|
24954
25116
|
const result = await invokeToolInProcess({
|
|
24955
25117
|
toolName,
|
|
@@ -24957,7 +25119,7 @@ async function handleMcpBridge(req, res, pathSegments, _queryParams, myAgentId)
|
|
|
24957
25119
|
agentId: myAgentId,
|
|
24958
25120
|
sourceTaskId,
|
|
24959
25121
|
runtimeInstanceId,
|
|
24960
|
-
callOrigin: resolveBridgeCallOrigin2(myAgentId,
|
|
25122
|
+
callOrigin: resolveBridgeCallOrigin2(myAgentId, headerValue2(req, "x-extension-token"))
|
|
24961
25123
|
});
|
|
24962
25124
|
if (result && typeof result === "object" && "structuredContent" in result) {
|
|
24963
25125
|
json(res, result.structuredContent);
|
|
@@ -31397,7 +31559,7 @@ var init_handlers4 = __esm(() => {
|
|
|
31397
31559
|
init_sibling_awareness();
|
|
31398
31560
|
init_env_flag();
|
|
31399
31561
|
init_github_host();
|
|
31400
|
-
|
|
31562
|
+
init_app();
|
|
31401
31563
|
init_mentions();
|
|
31402
31564
|
init_task_reactions();
|
|
31403
31565
|
init_templates7();
|
|
@@ -31410,7 +31572,7 @@ var init_handlers4 = __esm(() => {
|
|
|
31410
31572
|
|
|
31411
31573
|
// src/github/index.ts
|
|
31412
31574
|
var init_github = __esm(() => {
|
|
31413
|
-
|
|
31575
|
+
init_app();
|
|
31414
31576
|
init_handlers4();
|
|
31415
31577
|
init_mentions();
|
|
31416
31578
|
init_reactions();
|
|
@@ -36177,7 +36339,7 @@ async function notifySlack(text) {
|
|
|
36177
36339
|
return;
|
|
36178
36340
|
}
|
|
36179
36341
|
try {
|
|
36180
|
-
const { getSlackApp } = await import("./app-
|
|
36342
|
+
const { getSlackApp } = await import("./app-kyqt8ehw.js");
|
|
36181
36343
|
const app = getSlackApp();
|
|
36182
36344
|
if (!app) {
|
|
36183
36345
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -36248,7 +36410,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
36248
36410
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
36249
36411
|
}
|
|
36250
36412
|
async function overwriteWebhookIds(next) {
|
|
36251
|
-
const { getDbClient } = await import("./db-
|
|
36413
|
+
const { getDbClient } = await import("./db-2ah39cyx.js");
|
|
36252
36414
|
await getDbClient().transaction(async (tx) => {
|
|
36253
36415
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
36254
36416
|
if (!row) {
|
|
@@ -36421,7 +36583,7 @@ function warnIfMcpBaseUrlLooksLikeAppUrl() {
|
|
|
36421
36583
|
}
|
|
36422
36584
|
}
|
|
36423
36585
|
var initialized6 = false;
|
|
36424
|
-
var
|
|
36586
|
+
var init_app2 = __esm(() => {
|
|
36425
36587
|
init_oauth();
|
|
36426
36588
|
init_constants3();
|
|
36427
36589
|
init_env_flag();
|
|
@@ -36520,7 +36682,7 @@ var init_webhook = __esm(() => {
|
|
|
36520
36682
|
// src/jira/index.ts
|
|
36521
36683
|
var init_jira = __esm(() => {
|
|
36522
36684
|
init_adf();
|
|
36523
|
-
|
|
36685
|
+
init_app2();
|
|
36524
36686
|
init_sync2();
|
|
36525
36687
|
init_webhook();
|
|
36526
36688
|
init_webhook_lifecycle();
|
|
@@ -109031,7 +109193,7 @@ function warnIfMcpBaseUrlLooksLikeAppUrl2() {
|
|
|
109031
109193
|
}
|
|
109032
109194
|
}
|
|
109033
109195
|
var initialized7 = false, unsubscribeRefresh = null;
|
|
109034
|
-
var
|
|
109196
|
+
var init_app3 = __esm(() => {
|
|
109035
109197
|
init_oauth();
|
|
109036
109198
|
init_ensure_token();
|
|
109037
109199
|
init_constants3();
|
|
@@ -109042,7 +109204,7 @@ var init_app2 = __esm(() => {
|
|
|
109042
109204
|
|
|
109043
109205
|
// src/linear/index.ts
|
|
109044
109206
|
var init_linear = __esm(() => {
|
|
109045
|
-
|
|
109207
|
+
init_app3();
|
|
109046
109208
|
});
|
|
109047
109209
|
|
|
109048
109210
|
// src/slack/files.ts
|
|
@@ -109274,7 +109436,7 @@ var init_router = __esm(() => {
|
|
|
109274
109436
|
|
|
109275
109437
|
// src/slack/index.ts
|
|
109276
109438
|
var init_slack = __esm(() => {
|
|
109277
|
-
|
|
109439
|
+
init_app4();
|
|
109278
109440
|
init_files();
|
|
109279
109441
|
init_router();
|
|
109280
109442
|
});
|
|
@@ -109738,13 +109900,15 @@ async function loadGlobalConfigsIntoEnv2(override = false) {
|
|
|
109738
109900
|
if (updated.length > 0) {
|
|
109739
109901
|
refreshSecretScrubberCache();
|
|
109740
109902
|
}
|
|
109903
|
+
const { syncSlackTreeVisibility } = await import("./tree-visibility-6vqmnr71.js");
|
|
109904
|
+
await syncSlackTreeVisibility();
|
|
109741
109905
|
return updated;
|
|
109742
109906
|
}
|
|
109743
109907
|
async function reloadGlobalConfigsAndIntegrations2() {
|
|
109744
109908
|
return runWithoutRequestAuth(() => runSlackLifecycleExclusive(() => reloadGlobalConfigsAndIntegrationsInner()));
|
|
109745
109909
|
}
|
|
109746
109910
|
async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
109747
|
-
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-
|
|
109911
|
+
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-kqv9ebfj.js");
|
|
109748
109912
|
const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
|
|
109749
109913
|
const updated = await loadGlobalConfigsIntoEnv2(true);
|
|
109750
109914
|
await syncTelemetryEnabled("settings").catch((err) => {
|
|
@@ -109760,7 +109924,7 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
|
109760
109924
|
integrations.push("embeddings");
|
|
109761
109925
|
}
|
|
109762
109926
|
if (isEmbeddingsConfigured) {
|
|
109763
|
-
import("./embedding-space-
|
|
109927
|
+
import("./embedding-space-z6ptw3jk.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: !wasEmbeddingsConfigured })).catch((err) => {
|
|
109764
109928
|
console.error("[config-reload] embedding maintenance failed (non-fatal):", err);
|
|
109765
109929
|
});
|
|
109766
109930
|
}
|
|
@@ -120052,18 +120216,45 @@ function inheritedModelSelection2(parent) {
|
|
|
120052
120216
|
...parent.profile ? { profile: parent.profile } : {}
|
|
120053
120217
|
};
|
|
120054
120218
|
}
|
|
120219
|
+
async function keyPoolOf(parent, profileName, options) {
|
|
120220
|
+
const keyType = parent.credentialKeyType;
|
|
120221
|
+
if (!keyType || !parent.credentialKeySuffix || !parent.agentId)
|
|
120222
|
+
return null;
|
|
120223
|
+
const profile = await getModelProfileByName(profileName);
|
|
120224
|
+
if (!profile || hasUnreadableCredentialAllowlist(profile)) {
|
|
120225
|
+
return null;
|
|
120226
|
+
}
|
|
120227
|
+
const pools = await configPools(parent.agentId, {
|
|
120228
|
+
vcsRepo: parent.vcsRepo,
|
|
120229
|
+
includeRepoSecrets: options.includeRepoSecrets
|
|
120230
|
+
});
|
|
120231
|
+
const pool = pools.get(keyType);
|
|
120232
|
+
if (pool === undefined)
|
|
120233
|
+
return null;
|
|
120234
|
+
const suffixes = splitCredentialPool(pool).map(keySuffix);
|
|
120235
|
+
const allowlist = profile.credentials?.[keyType];
|
|
120236
|
+
const usable = (suffix) => !allowlist || allowlist.includes(suffix);
|
|
120237
|
+
const size = suffixes.filter(usable).length;
|
|
120238
|
+
if (size < 2)
|
|
120239
|
+
return null;
|
|
120240
|
+
const family = modelFamilyOf(parent.resolvedModel ?? profile.model);
|
|
120241
|
+
const { availableIndices } = await getAvailableKeyIndices2(keyType, suffixes.length, "global", null, family && windowForModelFamily(family) ? family : undefined, suffixes);
|
|
120242
|
+
const free = availableIndices.map((i) => suffixes[i]).filter((suffix) => usable(suffix) && suffix !== parent.credentialKeySuffix).length;
|
|
120243
|
+
return { keyType, size, free };
|
|
120244
|
+
}
|
|
120055
120245
|
async function nextFallback2(parent, errorClass, options = {}) {
|
|
120056
120246
|
const current = parent.resolvedProfile;
|
|
120057
120247
|
if (!current || !parent.agentId)
|
|
120058
120248
|
return { kind: "none", message: null };
|
|
120059
120249
|
const hops = parent.fallbackHops ?? [];
|
|
120060
|
-
const
|
|
120250
|
+
const profileHops = hops.filter((hop) => hop.from !== hop.profile);
|
|
120251
|
+
const path = profileHops.length > 0 ? [profileHops[0].from, ...profileHops.map((hop) => hop.profile)] : [current];
|
|
120061
120252
|
if (path[path.length - 1] !== current)
|
|
120062
120253
|
path.push(current);
|
|
120063
120254
|
const visited = new Set(path);
|
|
120064
120255
|
const skipped = [];
|
|
120065
120256
|
const judged = new Set;
|
|
120066
|
-
let configured =
|
|
120257
|
+
let configured = profileHops.length > 0;
|
|
120067
120258
|
if (parent.routingAffinity?.leadOnly) {
|
|
120068
120259
|
const agent = await getAgentById2(parent.agentId);
|
|
120069
120260
|
if (!agent?.isLead || !isAgentEligibleForTask2(agent, parent)) {
|
|
@@ -120076,6 +120267,21 @@ async function nextFallback2(parent, errorClass, options = {}) {
|
|
|
120076
120267
|
};
|
|
120077
120268
|
}
|
|
120078
120269
|
}
|
|
120270
|
+
let keysExhausted = "";
|
|
120271
|
+
if (KEY_SCOPED_ERRORS.has(errorClass)) {
|
|
120272
|
+
const pool = await keyPoolOf(parent, current, options);
|
|
120273
|
+
if (pool) {
|
|
120274
|
+
const retries = hops.filter((hop) => hop.from === current && hop.profile === current).length;
|
|
120275
|
+
if (pool.free > 0 && retries < pool.size) {
|
|
120276
|
+
return {
|
|
120277
|
+
kind: "picked",
|
|
120278
|
+
profile: current,
|
|
120279
|
+
hop: { from: current, profile: current, errorClass, at: new Date().toISOString() }
|
|
120280
|
+
};
|
|
120281
|
+
}
|
|
120282
|
+
keysExhausted = pool.free > 0 ? `no key retry left (${retries} retries on a pool of ${pool.size} ${pool.keyType} keys); ` : `no key left (all ${pool.size} ${pool.keyType} keys are rate-limited or just failed); `;
|
|
120283
|
+
}
|
|
120284
|
+
}
|
|
120079
120285
|
for (let i = path.length - 1;i >= 0; i--) {
|
|
120080
120286
|
const profile = await getModelProfileByName(path[i]);
|
|
120081
120287
|
for (const name of profile?.fallbacks ?? []) {
|
|
@@ -120104,12 +120310,16 @@ async function nextFallback2(parent, errorClass, options = {}) {
|
|
|
120104
120310
|
skipped.push({ profile: name, reason: result ? firstFailingRow(result) : "not found" });
|
|
120105
120311
|
}
|
|
120106
120312
|
}
|
|
120107
|
-
if (!configured)
|
|
120108
|
-
return {
|
|
120313
|
+
if (!configured) {
|
|
120314
|
+
return {
|
|
120315
|
+
kind: "none",
|
|
120316
|
+
message: keysExhausted ? `${errorClass} on ${current}; ${keysExhausted}no fallback configured` : null
|
|
120317
|
+
};
|
|
120318
|
+
}
|
|
120109
120319
|
const skippedText = skipped.length > 0 ? `; skipped: ${skipped.map((s) => `${s.profile} (${s.reason})`).join(", ")}` : "";
|
|
120110
120320
|
return {
|
|
120111
120321
|
kind: "none",
|
|
120112
|
-
message: `${errorClass} on ${current}; no fallback left (tried: ${path.join(" → ")})${skippedText}`
|
|
120322
|
+
message: `${errorClass} on ${current}; ${keysExhausted}no fallback left (tried: ${path.join(" → ")})${skippedText}`
|
|
120113
120323
|
};
|
|
120114
120324
|
}
|
|
120115
120325
|
function firstFailingRow(result) {
|
|
@@ -120405,10 +120615,11 @@ async function createResumeFollowUp2(args) {
|
|
|
120405
120615
|
].join(`
|
|
120406
120616
|
`);
|
|
120407
120617
|
const priority = Math.min(100, (parent.priority ?? 50) + 10);
|
|
120618
|
+
const generation = args.reason === "provider_fallback" ? getResumeGeneration2(parent) : getNextResumeGeneration2(parent);
|
|
120408
120619
|
const tags = [
|
|
120409
120620
|
"auto-resume",
|
|
120410
120621
|
`reason:${args.reason}`,
|
|
120411
|
-
`${RESUME_GENERATION_TAG_PREFIX}${
|
|
120622
|
+
...generation > 0 ? [`${RESUME_GENERATION_TAG_PREFIX}${generation}`] : []
|
|
120412
120623
|
];
|
|
120413
120624
|
if (args.reason === "crash_recovery" && preferredAgentId === parent.agentId) {
|
|
120414
120625
|
tags.push(CRASH_RECOVERY_PIN_TAG);
|
|
@@ -120539,7 +120750,7 @@ async function createPoolStarvationDecisionTask2(args) {
|
|
|
120539
120750
|
});
|
|
120540
120751
|
return { kind: "created", task: created };
|
|
120541
120752
|
}
|
|
120542
|
-
var TaskFollowUpModifySchema, WORKER_LIVENESS_WINDOW_SECONDS, RESUME_GENERATION_TAG_PREFIX = "resume-generation:", CRASH_RECOVERY_PIN_TAG = "crash-recovery-pin", GRACEFUL_SHUTDOWN_PIN_TAG = "graceful-shutdown-pin", REBOOT_RETRY_PIN_TAG2 = "reboot-retry-pin", LIVE_CHAINED_TASK_STATUSES, MAX_CONTINUATION_HOPS = 32;
|
|
120753
|
+
var TaskFollowUpModifySchema, WORKER_LIVENESS_WINDOW_SECONDS, RESUME_GENERATION_TAG_PREFIX = "resume-generation:", CRASH_RECOVERY_PIN_TAG = "crash-recovery-pin", GRACEFUL_SHUTDOWN_PIN_TAG = "graceful-shutdown-pin", REBOOT_RETRY_PIN_TAG2 = "reboot-retry-pin", KEY_SCOPED_ERRORS, LIVE_CHAINED_TASK_STATUSES, MAX_CONTINUATION_HOPS = 32;
|
|
120543
120754
|
var init_worker_follow_up = __esm(() => {
|
|
120544
120755
|
init_zod();
|
|
120545
120756
|
init_db4();
|
|
@@ -120552,7 +120763,9 @@ var init_worker_follow_up = __esm(() => {
|
|
|
120552
120763
|
init_resolver();
|
|
120553
120764
|
init_deferred_task_waits();
|
|
120554
120765
|
init_types5();
|
|
120766
|
+
init_credentials2();
|
|
120555
120767
|
init_env_flag();
|
|
120768
|
+
init_model_rate_limit_windows();
|
|
120556
120769
|
init_task_attachment_links();
|
|
120557
120770
|
init_context_key();
|
|
120558
120771
|
init_follow_up_gate();
|
|
@@ -120565,6 +120778,7 @@ var init_worker_follow_up = __esm(() => {
|
|
|
120565
120778
|
followUpConfig: true
|
|
120566
120779
|
}).partial().extend({ description: string2().trim().min(1).optional() }).strict();
|
|
120567
120780
|
WORKER_LIVENESS_WINDOW_SECONDS = Number(process.env.WORKER_LIVENESS_WINDOW_SECONDS || "30");
|
|
120781
|
+
KEY_SCOPED_ERRORS = new Set(["rate_limit", "credits"]);
|
|
120568
120782
|
LIVE_CHAINED_TASK_STATUSES = new Set([
|
|
120569
120783
|
"offered",
|
|
120570
120784
|
"reviewing",
|
|
@@ -136860,7 +137074,7 @@ var init_slack_archive_channel = __esm(() => {
|
|
|
136860
137074
|
init_zod();
|
|
136861
137075
|
init_db4();
|
|
136862
137076
|
init_rbac();
|
|
136863
|
-
|
|
137077
|
+
init_app4();
|
|
136864
137078
|
init_channel_join();
|
|
136865
137079
|
init_channel_lifecycle();
|
|
136866
137080
|
init_utils();
|
|
@@ -136922,7 +137136,7 @@ var init_slack_create_channel = __esm(() => {
|
|
|
136922
137136
|
init_zod();
|
|
136923
137137
|
init_db4();
|
|
136924
137138
|
init_rbac();
|
|
136925
|
-
|
|
137139
|
+
init_app4();
|
|
136926
137140
|
init_channel_join();
|
|
136927
137141
|
init_channel_lifecycle();
|
|
136928
137142
|
init_utils();
|
|
@@ -137273,7 +137487,7 @@ var init_slack_delete = __esm(() => {
|
|
|
137273
137487
|
init_zod();
|
|
137274
137488
|
init_db4();
|
|
137275
137489
|
init_rbac();
|
|
137276
|
-
|
|
137490
|
+
init_app4();
|
|
137277
137491
|
init_message_text();
|
|
137278
137492
|
init_utils();
|
|
137279
137493
|
});
|
|
@@ -137815,7 +138029,7 @@ ${fetchCommand}`,
|
|
|
137815
138029
|
var init_slack_download_file = __esm(() => {
|
|
137816
138030
|
init_zod();
|
|
137817
138031
|
init_db4();
|
|
137818
|
-
|
|
138032
|
+
init_app4();
|
|
137819
138033
|
init_files();
|
|
137820
138034
|
init_inbound_files();
|
|
137821
138035
|
init_utils();
|
|
@@ -137876,7 +138090,7 @@ var init_slack_invite_to_channel = __esm(() => {
|
|
|
137876
138090
|
init_zod();
|
|
137877
138091
|
init_db4();
|
|
137878
138092
|
init_rbac();
|
|
137879
|
-
|
|
138093
|
+
init_app4();
|
|
137880
138094
|
init_channel_join();
|
|
137881
138095
|
init_channel_lifecycle();
|
|
137882
138096
|
init_utils();
|
|
@@ -138042,7 +138256,7 @@ var SlackChannelSchema, registerSlackListChannelsTool = (server) => {
|
|
|
138042
138256
|
var init_slack_list_channels = __esm(() => {
|
|
138043
138257
|
init_zod();
|
|
138044
138258
|
init_db4();
|
|
138045
|
-
|
|
138259
|
+
init_app4();
|
|
138046
138260
|
init_utils();
|
|
138047
138261
|
SlackChannelSchema = looseObject({
|
|
138048
138262
|
id: string2().optional(),
|
|
@@ -138176,7 +138390,7 @@ var init_slack_post = __esm(() => {
|
|
|
138176
138390
|
init_db4();
|
|
138177
138391
|
init_cards();
|
|
138178
138392
|
init_rbac();
|
|
138179
|
-
|
|
138393
|
+
init_app4();
|
|
138180
138394
|
init_blocks();
|
|
138181
138395
|
init_channel_join();
|
|
138182
138396
|
init_dm();
|
|
@@ -138412,7 +138626,7 @@ var init_slack_read = __esm(() => {
|
|
|
138412
138626
|
init_zod();
|
|
138413
138627
|
init_db4();
|
|
138414
138628
|
init_rbac();
|
|
138415
|
-
|
|
138629
|
+
init_app4();
|
|
138416
138630
|
init_channel_join();
|
|
138417
138631
|
init_dm();
|
|
138418
138632
|
init_external_channel();
|
|
@@ -138597,7 +138811,7 @@ var init_slack_reply = __esm(() => {
|
|
|
138597
138811
|
init_db4();
|
|
138598
138812
|
init_task_citations2();
|
|
138599
138813
|
init_cards();
|
|
138600
|
-
|
|
138814
|
+
init_app4();
|
|
138601
138815
|
init_blocks();
|
|
138602
138816
|
init_channel_join();
|
|
138603
138817
|
init_external_channel();
|
|
@@ -138698,7 +138912,7 @@ var init_slack_start_thread = __esm(() => {
|
|
|
138698
138912
|
init_zod();
|
|
138699
138913
|
init_db4();
|
|
138700
138914
|
init_rbac();
|
|
138701
|
-
|
|
138915
|
+
init_app4();
|
|
138702
138916
|
init_blocks();
|
|
138703
138917
|
init_channel_join();
|
|
138704
138918
|
init_dm();
|
|
@@ -138790,7 +139004,7 @@ var init_slack_update = __esm(() => {
|
|
|
138790
139004
|
init_zod();
|
|
138791
139005
|
init_db4();
|
|
138792
139006
|
init_rbac();
|
|
138793
|
-
|
|
139007
|
+
init_app4();
|
|
138794
139008
|
init_blocks();
|
|
138795
139009
|
init_external_channel();
|
|
138796
139010
|
init_message_text();
|
|
@@ -138993,7 +139207,7 @@ var init_slack_upload_file = __esm(() => {
|
|
|
138993
139207
|
init_zod();
|
|
138994
139208
|
init_db4();
|
|
138995
139209
|
init_rbac();
|
|
138996
|
-
|
|
139210
|
+
init_app4();
|
|
138997
139211
|
init_external_channel();
|
|
138998
139212
|
init_files();
|
|
138999
139213
|
init_utils();
|
|
@@ -139314,7 +139528,7 @@ async function readScriptActionAllowlist() {
|
|
|
139314
139528
|
const [row] = await getSwarmConfigs2({ scope: "global", key: UI_SPEC_SCRIPT_ACTIONS_KEY });
|
|
139315
139529
|
if (row)
|
|
139316
139530
|
return row.value;
|
|
139317
|
-
const { getDeploymentEnvValue } = await import("./core-
|
|
139531
|
+
const { getDeploymentEnvValue } = await import("./core-df1n049h.js");
|
|
139318
139532
|
return getDeploymentEnvValue(UI_SPEC_SCRIPT_ACTIONS_KEY);
|
|
139319
139533
|
}
|
|
139320
139534
|
async function loadScriptActionLookups() {
|
|
@@ -141201,7 +141415,7 @@ async function emitBudgetRefusalSideEffects(ctx, inserted) {
|
|
|
141201
141415
|
console.warn(`[budget-refusal-notify] Failed to create follow-up task for budget refusal (task=${ctx.task.id.slice(0, 8)}): ${err}`);
|
|
141202
141416
|
}
|
|
141203
141417
|
}
|
|
141204
|
-
import("./event-bus-
|
|
141418
|
+
import("./event-bus-swr88jg5.js").then(({ workflowEventBus }) => {
|
|
141205
141419
|
workflowEventBus.emit("task.budget_refused", {
|
|
141206
141420
|
taskId: ctx.task.id,
|
|
141207
141421
|
agentId: ctx.agentId,
|
|
@@ -142344,14 +142558,14 @@ var registerCreateWorkflowTool = (server) => {
|
|
|
142344
142558
|
` + "- FOREACH NODE: type 'foreach' runs its body once per item. Config: " + "{ over: <array or exact {{input}} token>, itemKey: <property name>, body: { type: <any executor except foreach>, config: {...} }, " + "concurrency?: <integer >= 1, items in flight; unbounded when absent>, failurePolicy?: 'fail-fast' | 'collect-outcomes' }. " + "The body config is interpolated once per item with {{item.*}} and {{index}}. Child steps use synthetic IDs " + "'<foreachNodeId>#<itemKey>'; the parent waits for every child and exposes one aggregate result to successors. " + "failurePolicy defaults from onNodeFailure ('continue' = collect-outcomes, else fail-fast); fail-fast cancels queued items. " + `retry-workflow-run on a failed fan-out reruns only failed and cancelled items.
|
|
142345
142559
|
` + "- TRIGGER SCHEMA: Optional 'triggerSchema' is a JSON-Schema object that validates incoming trigger payloads. " + "Supported keywords: type, required, properties, enum, const, items (recursive into arrays). " + `Other JSON-Schema keywords (oneOf/anyOf/$ref/pattern/format/additionalProperties) are silently ignored.
|
|
142346
142560
|
` + "- WEBHOOK VERIFICATION: Webhook triggers use hmacSecret for all verification formats. " + "Omit verification for legacy HMAC-SHA256 over the raw body with fallback header scanning; " + "or set verification to { format: 'hmac-sha256', header }, { format: 'timestamped-hmac-sha256', header, toleranceSeconds? }, " + "{ format: 'token-equality', header }, or { format: 'standard-webhooks', toleranceSeconds? } " + "(standardwebhooks.com: webhook-id/webhook-timestamp/webhook-signature headers, hmacSecret is the whsec_ signing secret). Example: { type: 'webhook', hmacSecret: 'secret.SUPERAGENT_WEBHOOK_SECRET', " + `verification: { format: 'timestamped-hmac-sha256', header: 'X-Superagent-Signature', toleranceSeconds: 300 } }.
|
|
142347
|
-
` + "- WEBHOOK
|
|
142561
|
+
` + "- WEBHOOK DELIVERY FILTER: optional filter on a webhook trigger drops deliveries after signature verification and before any run is saved " + "(200 { skipped: true, reason }). filter.headers and filter.body are allowlists (a string or an array of scalars); every field must match. " + "Header names are case-insensitive; values and JSON paths are exact, with no type coercion. " + 'preset "github" | "gitlab" | "standard-webhooks" selects where the deprecated events allowlist is read ' + "(X-GitHub-Event, X-Gitlab-Event, or JSON body type). events and eventHeader still work and are AND-ed with filter; eventHeader overrides preset. " + `Omit filter and events to accept every delivery.
|
|
142348
142562
|
` + "- WAIT NODE: type 'wait' pauses a workflow for a duration or until a named workflowEventBus event arrives. " + "See runbooks/workflows.md#wait-nodes for config shapes, ordering caveats, and built-in event names.",
|
|
142349
142563
|
inputSchema: object2({
|
|
142350
142564
|
name: string2().describe("Unique name for the workflow"),
|
|
142351
142565
|
key: AssetKeySchema.optional().describe("Logical namespace. Defaults to a shared/workflow:<id>/ resource key."),
|
|
142352
142566
|
description: string2().optional().describe("Description of what this workflow does"),
|
|
142353
142567
|
definition: WorkflowDefinitionSchema.describe("The workflow definition with nodes (each node has id, type, config, and optional next/retry/validation)"),
|
|
142354
|
-
triggers: array2(TriggerConfigSchema).optional().describe("Optional trigger configurations (webhook, schedule, event).
|
|
142568
|
+
triggers: array2(TriggerConfigSchema).optional().describe("Optional trigger configurations (webhook, schedule, event). A webhook trigger accepts filter (headers and body allowlists) and preset (github, gitlab, standard-webhooks). events and eventHeader remain a deprecated alias of one filter clause. Verification formats: legacy omitted verification, hmac-sha256, timestamped-hmac-sha256, token-equality, standard-webhooks."),
|
|
142355
142569
|
cooldown: CooldownConfigSchema.optional().describe("Optional cooldown configuration to prevent re-triggering too frequently"),
|
|
142356
142570
|
input: record2(string2(), InputValueSchema).optional().describe("Optional input values resolved at execution time (env vars like VAR_NAME, secrets secret.NAME, or literals)"),
|
|
142357
142571
|
dir: string2().min(1).startsWith("/").optional().describe("Default working directory for all agent-task nodes (absolute path, e.g. /tmp/workspace)"),
|
|
@@ -143116,14 +143330,14 @@ var registerUpdateWorkflowTool = (server) => {
|
|
|
143116
143330
|
createToolRegistrar(server)("update-workflow", {
|
|
143117
143331
|
title: "Update Workflow",
|
|
143118
143332
|
annotations: { destructiveHint: false },
|
|
143119
|
-
description: "Update an existing workflow's name, description, definition, triggers, cooldown, input, triggerSchema, or enabled state. " + "Creates a version snapshot before applying changes. " + "TRIGGER SCHEMA: pass 'triggerSchema' as a JSON-Schema object to set/replace, or 'null' to clear. " + "Supported JSON-Schema keywords: type, required, properties, enum, const, items (recursive into arrays). " + "Other JSON-Schema keywords (oneOf/anyOf/$ref/pattern/format/additionalProperties) are silently ignored. " + "WEBHOOK VERIFICATION: webhook triggers use hmacSecret for all verification formats. " + "Omit verification for legacy HMAC-SHA256 over the raw body with fallback header scanning; " + "or set verification to { format: 'hmac-sha256', header }, { format: 'timestamped-hmac-sha256', header, toleranceSeconds? }, " + "{ format: 'token-equality', header }, or { format: 'standard-webhooks', toleranceSeconds? } " + "(standardwebhooks.com: webhook-id/webhook-timestamp/webhook-signature headers, hmacSecret is the whsec_ signing secret). " + "WEBHOOK
|
|
143333
|
+
description: "Update an existing workflow's name, description, definition, triggers, cooldown, input, triggerSchema, or enabled state. " + "Creates a version snapshot before applying changes. " + "TRIGGER SCHEMA: pass 'triggerSchema' as a JSON-Schema object to set/replace, or 'null' to clear. " + "Supported JSON-Schema keywords: type, required, properties, enum, const, items (recursive into arrays). " + "Other JSON-Schema keywords (oneOf/anyOf/$ref/pattern/format/additionalProperties) are silently ignored. " + "WEBHOOK VERIFICATION: webhook triggers use hmacSecret for all verification formats. " + "Omit verification for legacy HMAC-SHA256 over the raw body with fallback header scanning; " + "or set verification to { format: 'hmac-sha256', header }, { format: 'timestamped-hmac-sha256', header, toleranceSeconds? }, " + "{ format: 'token-equality', header }, or { format: 'standard-webhooks', toleranceSeconds? } " + "(standardwebhooks.com: webhook-id/webhook-timestamp/webhook-signature headers, hmacSecret is the whsec_ signing secret). " + "WEBHOOK DELIVERY FILTER: optional filter on a webhook trigger drops deliveries after signature verification and before any run is saved " + "(200 { skipped: true, reason }). filter.headers and filter.body are allowlists (a string or an array of scalars); every field must match. " + "Header names are case-insensitive; values and JSON paths are exact, with no type coercion. " + 'preset "github" | "gitlab" | "standard-webhooks" selects where the deprecated events allowlist is read ' + "(X-GitHub-Event, X-Gitlab-Event, or JSON body type). events and eventHeader still work and are AND-ed with filter; eventHeader overrides preset. " + "Omit filter and events to accept every delivery.",
|
|
143120
143334
|
inputSchema: object2({
|
|
143121
143335
|
id: string2().uuid().describe("Workflow ID to update"),
|
|
143122
143336
|
key: AssetKeySchema.optional().describe("Move to a logical namespace."),
|
|
143123
143337
|
name: string2().optional().describe("New name for the workflow"),
|
|
143124
143338
|
description: string2().optional().describe("New description"),
|
|
143125
143339
|
definition: WorkflowDefinitionSchema.optional().describe("New workflow definition"),
|
|
143126
|
-
triggers: array2(TriggerConfigSchema).optional().describe("
|
|
143340
|
+
triggers: array2(TriggerConfigSchema).optional().describe("Replacement trigger list. A webhook trigger accepts filter (headers and body allowlists) and preset (github, gitlab, standard-webhooks). events and eventHeader remain a deprecated alias of one filter clause. Verification formats: legacy omitted verification, hmac-sha256, timestamped-hmac-sha256, token-equality, standard-webhooks."),
|
|
143127
143341
|
cooldown: CooldownConfigSchema.optional().nullable().describe("New cooldown configuration (null to remove)"),
|
|
143128
143342
|
input: record2(string2(), InputValueSchema).optional().nullable().describe("New input values (null to remove)"),
|
|
143129
143343
|
dir: string2().min(1).startsWith("/").optional().nullable().describe("Default working directory for all agent-task nodes (null to remove)"),
|
|
@@ -143742,4 +143956,4 @@ var init_server = __esm(() => {
|
|
|
143742
143956
|
loggedToolAllowlistWarnings = new Set;
|
|
143743
143957
|
});
|
|
143744
143958
|
|
|
143745
|
-
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, init_types, McpServer, init_mcp, referencedBundlePaths, skillDirs, init_manifest_format, recoverIncompleteRuns, init_recovery, handleWebhookTrigger, verifyHmacSignature, WebhookError, init_triggers, snapshotAndUpdateWorkflow, init_version, applyPreTaskCreate, init_apply_task_create, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, init_raw_llm, getExecutorRegistry2, initWorkflows2, init_workflows, stripSiblingBlock, init_sibling_block, createTaskWithSiblingAwareness, init_sibling_awareness, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, init_scheduler, ExtensionAssetConflictError, hashOf, scriptHash, liveScriptSpec, liveWorkflowSpec, skillSpecOf, liveSkillSpec, skillHash, init_assets, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, init_db, SDK_ALLOWLIST, mcpToolNameForSdkMethod, init_sdk_allowlist, MCP_OVERFLOW_NAMESPACE, mcpOverflowAuthError, init_kv_overflow, hasKvViewArgs, resolveKvView, init_kv_view, COLOR_LITERAL_THRESHOLD, countColorLiterals, init_color_literals, toolErr, createToolRegistrar, init_utils, handleMcpBridge, init_mcp_bridge, Redacted, init_redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, init_response_limit, retry, init_retry, ExtensionConfigError, init_loader, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, init_lifecycle, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, init_dispatcher, resolveIdentity, renderIdentity, init_identity, recordUnmappedIdentity, init_unmapped_identities, getDeliveredSlackMessageTs, foldIntoPendingSlackTask, init_slack_fold, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, init_task_attachment_store, transcribeAudioNotes, init_transcription, init_templates, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, attachSlackFilesToDraft, notifySlackFileFailures, init_inbound_files, pendingWorkForAgent, countPoolRuntimes, computeDesired, init_demand, isRuntimePoolWakeable, isAgentReachable, isAgentOnDemand, init_reachability, isAddressedToOtherUser, broadcastMatches, routeMessage, extractTaskFromMessage, init_router, extractSlackMessageText, slackInboundMessageText, collectSlackMessageFiles, init_message_text, createAdditiveBuffer, init_additive_buffer, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, init_agentmail, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, init_tracker, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, init_azure_devops, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, init_azure_devops2, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, init_rbac_audit, getTelemetryIngestAnchor, init_telemetry_ingest_anchor, initApiTelemetry, syncTelemetryEnabled, init_telemetry_enable, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, init_bitbucket, isGitHubEnabled, initGitHub, verifyWebhookSignature, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, init_github, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, init_gitlab, isChatSdkEnabled, getChatSdkConfig, init_config, errorMessage, init_logger, resolveAdapterApiUrl, init_adapters, trackBackground, init_background, TelegramBotApiError, callTelegramBotApi, init_telegram_api, isTrustedTeamsServiceUrl, init_teams_origin, getSessionLabels, rememberSessionLabel, getResourceSessionLabels, init_session_labels, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, init_runtime, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, init_metadata, registerJiraWebhook, deleteJiraWebhook, init_webhook_lifecycle, isJiraEnabled, initJira, init_app, handleJiraWebhook, init_webhook, init_jira, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, init_sync, isLinearEnabled, initLinear, init_app2, init_linear, init_slack, verifyPageSession, LEGACY_PAGE_SESSION_COOKIE, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, isLocalDevPageRequest, pageSessionSetCookies, init_page_session, resolveHttpRequestAuth, init_auth, getDeploymentEnvValue2, loadGlobalConfigsIntoEnv2, reloadGlobalConfigsAndIntegrations2, scheduleIntegrationsReload2, handleCore2, init_core, runTaskUiScriptAction, init_script_actions, REBOOT_RETRY_PIN_TAG2, getPinCandidateAgent2, resolveLeadOnlyRecoveryAssignment2, getResumeGeneration2, getNextResumeGeneration2, inheritedModelSelection2, nextFallback2, createWorkerTaskFollowUp2, createResumeFollowUp2, createRerouteDecisionTask2, createPoolStarvationDecisionTask2, init_worker_follow_up, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, init_mcp_limits, userCtx, init_task_tool_ctx, resolveRequestPrincipal, requestPrincipal, agentFirstPrincipal, requireAuthKind, rejectGuest, init_request_principal, resolveTaskRequester, init_task_requester, handleApps, init_apps, cancelApprovalRequest, cancelApprovalRequestAndRun, init_approval_cancel, getUserCommsPrefs, init_requester_comms, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, init_get_task_details, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, init_cancel_task, DbQueryTimeoutError, DbQueryConcurrencyCapError, executeReadOnlyQuery, getDbQueryHttpBudgetMs, init_db_query_shared, assertSelectOnlyQuery, executeReadOnlyQueryGated, handleDbQuery, init_db_query, snapshotMetric, init_version2, AssetKeyAuthorizationError, authorizeAssetKeyWrite, init_asset_key_auth, getPageEditCounter, init_page_versions, snapshotPage, init_version3, DEFAULT_THEME_ID, THEME_PRESET_IDS, getThemePreset, init_presets, readThemeFields, init_page_fields, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, init_app_validation, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, init_presets2, scopedResourceScopeIdSchema, resolveScopedResourceId, init_scoped_resource, MemoryKeyError, init_key_guard, refreshLinks, init_link_resolver, indexMemoryContent, init_index_content, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, init_retrieval, ExplicitSelfDuplicateError, applyRating, init_store, shouldPersistAutomaticTaskMemory, init_automatic_task_gate, guardTerminalTaskResultWrite, init_terminal_result_guard, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, init_get_tasks, requiresLeadToWrite, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, init_kv_reserved_namespaces, updateMcpServerChecked, init_mcp_server_checked_update, updateTouchesStdioExecution, init_mcp_server_stdio_gate, canReadMemory, init_access, getLinksForMemory, init_links_store, attachDemotionEvidence, init_demotion_evidence, expandCandidatesWithGraph, init_graph_expansion, isApiDraining, drainApi, init_api_drain, markKapsoMessageRead, sendKapsoReaction, init_client, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, init_config2, changesAllowMerge, init_repo_merge_policy, updateSwarmRepoChecked, init_repo_checked_update, getCombConfig, init_config3, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, init_auth2, RoomOperationSchema, init_document, removeAwarenessStates, init_awareness, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, init_rooms, init_scheduler2, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, init_key_browser, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, init_events, mergeScheduleTiming, validateRecurringTiming, init_validate, followUpThreadForSourceTask, evaluateFollowUpRedelegation, init_follow_up_redelegation_guard, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, init_send_task, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, init_steer_task, skipReasonFrom, finalizeSkippedTaskReaction, init_task_skip, IMPROVEMENT_TEXT_MAX, IMPROVEMENT_STATUSES, IMPROVEMENT_SOURCES, ImprovementError, isImprovementsEnabled, getImprovement, listImprovements, createImprovement, approveAndSend, discardImprovement, improvementLeakHints, init_improvements, recomputeSessionCost, init_session_cost_recompute, canClaim, init_budget_admission, emitBudgetRefusalSideEffects, init_budget_refusal_notify, workflowModelErrors, init_model_validation, patchWorkflowDefinition, init_patch_definition, idempotencyKeyHeader, readIdempotencyKey, replayAcceptedOperation, init_idempotency_key, resolveScriptsOnlyMode, init_scripts_only_mode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, init_server };
|
|
143959
|
+
export { safeParse, getObjectShape, getLiteralValue, init_zod_compat, LATEST_PROTOCOL_VERSION, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, ErrorCode, isJSONRPCErrorResponse, JSONRPCMessageSchema, EmptyResultSchema, isInitializeRequest, InitializeResultSchema, CreateTaskResultSchema, ListResourcesResultSchema, ListResourceTemplatesResultSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, ListPromptsResultSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ListToolsResultSchema, CallToolResultSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, ElicitRequestSchema, ElicitResultSchema, CompleteResultSchema, McpError, init_types, Protocol, mergeCapabilities, init_protocol, AjvJsonSchemaValidator, init_ajv_provider, assertToolsCallTaskCapability, assertClientRequestTaskCapability, init_helpers, McpServer, init_mcp, referencedBundlePaths, skillDirs, init_manifest_format, recoverIncompleteRuns, init_recovery, handleWebhookTrigger, verifyHmacSignature, WebhookError, init_triggers, snapshotAndUpdateWorkflow, init_version, applyPreTaskCreate, init_apply_task_create, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, init_raw_llm, getExecutorRegistry2, initWorkflows2, init_workflows, stripSiblingBlock, init_sibling_block, createTaskWithSiblingAwareness, init_sibling_awareness, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, init_scheduler, ExtensionAssetConflictError, hashOf, scriptHash, liveScriptSpec, liveWorkflowSpec, skillSpecOf, liveSkillSpec, skillHash, init_assets, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, init_db, SDK_ALLOWLIST, mcpToolNameForSdkMethod, init_sdk_allowlist, MCP_OVERFLOW_NAMESPACE, mcpOverflowAuthError, init_kv_overflow, hasKvViewArgs, resolveKvView, init_kv_view, COLOR_LITERAL_THRESHOLD, countColorLiterals, init_color_literals, toolErr, createToolRegistrar, init_utils, handleMcpBridge, init_mcp_bridge, Redacted, init_redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, init_response_limit, retry, init_retry, ExtensionConfigError, init_loader, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, init_lifecycle, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, init_dispatcher, resolveIdentity, renderIdentity, init_identity, recordUnmappedIdentity, init_unmapped_identities, getDeliveredSlackMessageTs, foldIntoPendingSlackTask, init_slack_fold, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, init_task_attachment_store, transcribeAudioNotes, init_transcription, init_templates, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, attachSlackFilesToDraft, notifySlackFileFailures, init_inbound_files, pendingWorkForAgent, countPoolRuntimes, computeDesired, init_demand, isRuntimePoolWakeable, isAgentReachable, isAgentOnDemand, init_reachability, isAddressedToOtherUser, broadcastMatches, routeMessage, extractTaskFromMessage, init_router, extractSlackMessageText, slackInboundMessageText, collectSlackMessageFiles, init_message_text, createAdditiveBuffer, init_additive_buffer, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, isInboxAllowed, isSenderAllowed, handleMessageReceived, init_agentmail, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, init_tracker, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, init_azure_devops, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, init_azure_devops2, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, init_rbac_audit, getTelemetryIngestAnchor, init_telemetry_ingest_anchor, initApiTelemetry, syncTelemetryEnabled, init_telemetry_enable, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, init_bitbucket, isGitHubEnabled, initGitHub, verifyWebhookSignature, getWorkerInstallationToken, init_app, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, init_github, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, init_gitlab, isChatSdkEnabled, getChatSdkConfig, init_config, errorMessage, init_logger, resolveAdapterApiUrl, init_adapters, trackBackground, init_background, TelegramBotApiError, callTelegramBotApi, init_telegram_api, isTrustedTeamsServiceUrl, init_teams_origin, getSessionLabels, rememberSessionLabel, getResourceSessionLabels, init_session_labels, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, init_runtime, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, init_metadata, registerJiraWebhook, deleteJiraWebhook, init_webhook_lifecycle, isJiraEnabled, initJira, init_app2, handleJiraWebhook, init_webhook, init_jira, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, init_sync, isLinearEnabled, initLinear, init_app3, init_linear, init_slack, verifyPageSession, LEGACY_PAGE_SESSION_COOKIE, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, isLocalDevPageRequest, pageSessionSetCookies, init_page_session, resolveHttpRequestAuth, init_auth, getDeploymentEnvValue2, loadGlobalConfigsIntoEnv2, reloadGlobalConfigsAndIntegrations2, scheduleIntegrationsReload2, handleCore2, init_core, runTaskUiScriptAction, init_script_actions, REBOOT_RETRY_PIN_TAG2, getPinCandidateAgent2, resolveLeadOnlyRecoveryAssignment2, getResumeGeneration2, getNextResumeGeneration2, inheritedModelSelection2, nextFallback2, createWorkerTaskFollowUp2, createResumeFollowUp2, createRerouteDecisionTask2, createPoolStarvationDecisionTask2, init_worker_follow_up, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, init_mcp_limits, userCtx, init_task_tool_ctx, resolveRequestPrincipal, requestPrincipal, agentFirstPrincipal, requireAuthKind, rejectGuest, init_request_principal, resolveTaskRequester, init_task_requester, handleApps, init_apps, cancelApprovalRequest, cancelApprovalRequestAndRun, init_approval_cancel, getUserCommsPrefs, init_requester_comms, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, init_get_task_details, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, init_cancel_task, DbQueryTimeoutError, DbQueryConcurrencyCapError, executeReadOnlyQuery, getDbQueryHttpBudgetMs, init_db_query_shared, assertSelectOnlyQuery, executeReadOnlyQueryGated, handleDbQuery, init_db_query, snapshotMetric, init_version2, AssetKeyAuthorizationError, authorizeAssetKeyWrite, init_asset_key_auth, getPageEditCounter, init_page_versions, snapshotPage, init_version3, DEFAULT_THEME_ID, THEME_PRESET_IDS, getThemePreset, init_presets, readThemeFields, init_page_fields, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, init_app_validation, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, init_presets2, scopedResourceScopeIdSchema, resolveScopedResourceId, init_scoped_resource, MemoryKeyError, init_key_guard, refreshLinks, init_link_resolver, indexMemoryContent, init_index_content, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, init_retrieval, ExplicitSelfDuplicateError, applyRating, init_store, shouldPersistAutomaticTaskMemory, init_automatic_task_gate, guardTerminalTaskResultWrite, init_terminal_result_guard, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, init_get_tasks, requiresLeadToWrite, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, init_kv_reserved_namespaces, updateMcpServerChecked, init_mcp_server_checked_update, updateTouchesStdioExecution, init_mcp_server_stdio_gate, canReadMemory, init_access, getLinksForMemory, init_links_store, attachDemotionEvidence, init_demotion_evidence, expandCandidatesWithGraph, init_graph_expansion, isApiDraining, drainApi, init_api_drain, markKapsoMessageRead, sendKapsoReaction, init_client, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, init_config2, changesAllowMerge, init_repo_merge_policy, updateSwarmRepoChecked, init_repo_checked_update, getCombConfig, init_config3, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, init_auth2, RoomOperationSchema, init_document, removeAwarenessStates, init_awareness, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, init_rooms, init_scheduler2, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, init_key_browser, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, init_events, mergeScheduleTiming, validateRecurringTiming, init_validate, followUpThreadForSourceTask, evaluateFollowUpRedelegation, init_follow_up_redelegation_guard, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, init_send_task, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, init_steer_task, skipReasonFrom, finalizeSkippedTaskReaction, init_task_skip, IMPROVEMENT_TEXT_MAX, IMPROVEMENT_STATUSES, IMPROVEMENT_SOURCES, ImprovementError, isImprovementsEnabled, getImprovement, listImprovements, createImprovement, approveAndSend, discardImprovement, improvementLeakHints, init_improvements, recomputeSessionCost, init_session_cost_recompute, canClaim, init_budget_admission, emitBudgetRefusalSideEffects, init_budget_refusal_notify, workflowModelErrors, init_model_validation, patchWorkflowDefinition, init_patch_definition, idempotencyKeyHeader, readIdempotencyKey, replayAcceptedOperation, init_idempotency_key, resolveScriptsOnlyMode, init_scripts_only_mode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer, init_server };
|