@desplega.ai/agent-swarm 2.6.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{acp-adapter-dgfakfpw.js → acp-adapter-8dn5tq56.js} +6 -6
- package/dist/{actions-fbqma8aa.js → actions-3r6gw7dy.js} +18 -18
- package/dist/{amp-adapter-en0jy6hs.js → amp-adapter-wjtq413p.js} +3 -3
- package/dist/{anthropic-messages-txs190dd.js → anthropic-messages-n4cby1rz.js} +4 -4
- package/dist/{app-k8a5cgpp.js → app-d53yhykk.js} +3 -3
- package/dist/{assistant-a16433gr.js → assistant-ksrawj3k.js} +20 -20
- package/dist/{boot-reembed-6c1sjfnr.js → boot-reembed-fxfw17m2.js} +11 -3
- package/dist/{boot-reembed-f4nn561n.js → boot-reembed-k5y5xbj0.js} +15 -8
- package/dist/{boot-scrub-sweep-d4w9gajf.js → boot-scrub-sweep-se41j9fd.js} +3 -3
- package/dist/{boot-seeds-9bmkspyw.js → boot-seeds-r3kwwv8b.js} +4 -4
- package/dist/{claude-adapter-nys1kjxa.js → claude-adapter-ahmyf231.js} +8 -8
- package/dist/{claude-managed-adapter-55207973.js → claude-managed-adapter-5knamegc.js} +3 -3
- package/dist/{claude-managed-setup-3cm35gey.js → claude-managed-setup-mdc7dy6b.js} +3 -3
- package/dist/{claude-sdk-session-nw5yd8cp.js → claude-sdk-session-n5wen9zk.js} +8729 -8600
- package/dist/{cli-683y0b3a.js → cli-0dqtv2jg.js} +2 -2
- package/dist/{cli-a34pr3w1.js → cli-0tww7dnz.js} +2 -2
- package/dist/{cli-w2656ka1.js → cli-0w4e4v58.js} +7 -7
- package/dist/{cli-5sckpqcx.js → cli-2sjm3t4r.js} +1 -1
- package/dist/{cli-gf2850q7.js → cli-3cywb44q.js} +18 -1
- package/dist/{cli-8wkb09q5.js → cli-3k9jej0c.js} +2 -2
- package/dist/{cli-3aqd4jaa.js → cli-3v2cyqb8.js} +3 -3
- package/dist/{cli-emhjcj2y.js → cli-5qt9vzmq.js} +89 -20
- package/dist/{cli-abkm71vr.js → cli-5rp1w4cr.js} +1 -1
- package/dist/{cli-gf95q3bm.js → cli-6vwjsetx.js} +4 -4
- package/dist/{cli-k21gx5ht.js → cli-6w2yrrc0.js} +10 -10
- package/dist/{cli-m70bajzr.js → cli-75tdydgv.js} +1 -1
- package/dist/{cli-5rj83bam.js → cli-8feswf2v.js} +47 -36
- package/dist/{cli-sxgtf5fw.js → cli-8wd3mbyj.js} +1 -1
- package/dist/{cli-ca6banwz.js → cli-9csfthbw.js} +10 -8
- package/dist/{cli-dqygeeh5.js → cli-b41p764a.js} +31 -3
- package/dist/{cli-m5a9m0ak.js → cli-c1t533hh.js} +3 -3
- package/dist/{cli-2sjhpsns.js → cli-c28jxpcv.js} +1 -1
- package/dist/{cli-bqztfyve.js → cli-cb50g9cd.js} +1 -1
- package/dist/{cli-ag2yrnt5.js → cli-d8gaphtr.js} +2 -2
- package/dist/{cli-9abdgn5t.js → cli-dgtfysne.js} +3 -3
- package/dist/{cli-nq677csy.js → cli-dscnhn18.js} +1 -1
- package/dist/{cli-3fwqy71j.js → cli-dv11pgpv.js} +39 -32
- package/dist/{cli-v49fkghp.js → cli-ekptgk2m.js} +6 -6
- package/dist/{cli-c2habvsf.js → cli-f3mzy662.js} +17 -17
- package/dist/{cli-zqne1qcj.js → cli-fk7k8s9x.js} +2 -2
- package/dist/{cli-1tem6ns9.js → cli-gt4h8cxw.js} +3 -2
- package/dist/{cli-vbhgkw9h.js → cli-h3e7bhvn.js} +3 -3
- package/dist/{cli-ffvsj2qw.js → cli-hkxqdmnb.js} +3 -3
- package/dist/{cli-a2rr0fmg.js → cli-hpkvgdad.js} +7 -4
- package/dist/{cli-art7c1zh.js → cli-hq2v4rr5.js} +37 -9
- package/dist/{cli-sqma6vw1.js → cli-k1zb7raw.js} +5 -5
- package/dist/{cli-4rvr7zfx.js → cli-k4awgvzm.js} +5 -0
- package/dist/{cli-3ndmpxxv.js → cli-k7d3hvya.js} +2 -2
- package/dist/{cli-3gfvmzht.js → cli-kbtdftbw.js} +74 -26
- package/dist/{cli-hfeb68z4.js → cli-kj69b9tw.js} +34 -6
- package/dist/{cli-az25fn5f.js → cli-kk9jy4nm.js} +2 -2
- package/dist/{cli-39aet655.js → cli-m52t4cta.js} +1 -1
- package/dist/{cli-cz37jqss.js → cli-mdadewqp.js} +5 -5
- package/dist/{cli-esakngh8.js → cli-nf6k60sn.js} +1 -1
- package/dist/{cli-j6rktc91.js → cli-nzdf09js.js} +1 -1
- package/dist/{cli-rr7zx19j.js → cli-prcyzecg.js} +12 -12
- package/dist/{cli-4hxrf0p4.js → cli-pzafyqtk.js} +393 -62
- package/dist/{cli-g8ka5j4j.js → cli-qvaa1gjp.js} +173 -52
- package/dist/{cli-d2dpf95n.js → cli-rg4b2g6j.js} +1 -1
- package/dist/{cli-kf4jree9.js → cli-rm66vqdz.js} +1 -1
- package/dist/{cli-4rf0f5vg.js → cli-s504c3w7.js} +5 -3
- package/dist/{cli-nn6vx2mq.js → cli-swkx9jm2.js} +7 -5
- package/dist/{cli-g20jjwt4.js → cli-thsaq4pd.js} +16 -16
- package/dist/{cli-aj8djyqt.js → cli-twjnyvs8.js} +2 -2
- package/dist/{cli-03gg9pd1.js → cli-typdpe8g.js} +4 -4
- package/dist/{cli-mtnj4fwa.js → cli-vg8pwmsd.js} +6 -6
- package/dist/{cli-gnsb1zxa.js → cli-vhpckzvp.js} +1 -1
- package/dist/{cli-7enjwya9.js → cli-vz78s5wm.js} +1 -1
- package/dist/{cli-dv97kdzv.js → cli-wdxgsdz5.js} +2 -2
- package/dist/{cli-7a6p4e65.js → cli-wtjg6je3.js} +1 -1
- package/dist/{cli-6y51ryva.js → cli-x3cngb1h.js} +44 -12
- package/dist/{cli-n7asmce6.js → cli-xbz6mcg4.js} +3 -3
- package/dist/{cli-24j1jeeb.js → cli-y4tdxsqb.js} +3 -3
- package/dist/{cli-mvjz5an3.js → cli-yqrsp3ny.js} +7 -7
- package/dist/cli.js +31 -21
- package/dist/{codex-adapter-d95q4qsn.js → codex-adapter-7wepzq15.js} +6 -6
- package/dist/{codex-hook-brpnycn5.js → codex-hook-pbdh4xhx.js} +2 -2
- package/dist/{codex-session-runner-gdwd8h0c.js → codex-session-runner-02sb49e4.js} +6 -6
- package/dist/{commands-jqmgk54b.js → commands-3rcspxct.js} +2 -2
- package/dist/{controller-z3jq589f.js → controller-8ar4avd6.js} +3 -3
- package/dist/{controllers-connect-r2za39ef.js → controllers-connect-ajvh9h0v.js} +19 -19
- package/dist/{cursor-adapter-4mr4jgkw.js → cursor-adapter-gd0sa7bh.js} +1 -1
- package/dist/{db-w36wwb5g.js → db-dv9j7ts5.js} +2 -2
- package/dist/{db-ppv2tze7.js → db-z26vgdvj.js} +3 -3
- package/dist/{dispatcher-pv5h77vf.js → dispatcher-8m0htjq8.js} +17 -17
- package/dist/{dsh-adapter-d4pdpb3r.js → dsh-adapter-y8gyk130.js} +1 -1
- package/dist/{e2b-fn3zacvt.js → e2b-74vg9b7e.js} +1 -1
- package/dist/{e2b-222hsajc.js → e2b-jyay8wzn.js} +1 -1
- package/dist/{easter-egg-3d-4sp4dvmc.js → easter-egg-3d-28f880xx.js} +1 -1
- package/dist/{execute-jev839y1.js → execute-9seb79vh.js} +1 -1
- package/dist/{external-channel-y6nkzhnn.js → external-channel-smz7jyth.js} +2 -2
- package/dist/{getMachineId-bsd-brn0xym3.js → getMachineId-bsd-whfre6gr.js} +3 -3
- package/dist/{getMachineId-darwin-t339sfxm.js → getMachineId-darwin-5zjynb19.js} +3 -3
- package/dist/{getMachineId-linux-5eq95d8b.js → getMachineId-linux-8mksrrsq.js} +3 -3
- package/dist/{getMachineId-unsupported-qavrtc7j.js → getMachineId-unsupported-fxtqsdt2.js} +3 -3
- package/dist/{getMachineId-win-q7fe1wx7.js → getMachineId-win-nzfmz857.js} +3 -3
- package/dist/{grok-adapter-t08b9ntm.js → grok-adapter-z0nnvtbn.js} +7 -7
- package/dist/handlers-pspryh6g.js +41 -0
- package/dist/{heartbeat-vn31xwdk.js → heartbeat-f928aqyp.js} +20 -20
- package/dist/{hook-cpjs8q51.js → hook-d7c605r4.js} +7 -7
- package/dist/{hook-6d0zbvvt.js → hook-q9hv5xf9.js} +5 -5
- package/dist/{http-9c6medda.js → http-q6j4k989.js} +1000 -251
- package/dist/{index-k0yt1tvq.js → index-5nb266jr.js} +17 -17
- package/dist/{index-ysd45kgc.js → index-8fxt5eah.js} +10 -10
- package/dist/{index-zgvqzjsw.js → index-cekzwhez.js} +5 -5
- package/dist/{index-38t35h0n.js → index-ch0c1xff.js} +17 -17
- package/dist/{index-pkma1yf8.js → index-ebnjhxh1.js} +1 -1
- package/dist/{index-yqgbfgaj.js → index-ed8dy8rn.js} +20 -20
- package/dist/{index-qhjf2htm.js → index-ejqdkkqx.js} +262 -96
- package/dist/{index-dr94zbnh.js → index-farm1zsn.js} +32661 -29443
- package/dist/{index-g6k9tctj.js → index-yn1yxg85.js} +1 -1
- package/dist/{keepalive-em0117bp.js → keepalive-zzc3hks1.js} +3 -3
- package/dist/lead-c0pjcaw4.js +79 -0
- package/dist/{maintenance-kbme3qy9.js → maintenance-kqsxzpzx.js} +1 -1
- package/dist/{oauth-refresh-sweep-xysj4yse.js → oauth-refresh-sweep-7qt0g55z.js} +8 -3
- package/dist/{onboard-p6q0vz97.js → onboard-k7x13fqg.js} +121 -8
- package/dist/{opencode-adapter-esv3k9yn.js → opencode-adapter-tqvrtter.js} +5 -5
- package/dist/{otel-impl-54qhqh1z.js → otel-impl-sqkf6k3b.js} +97 -97
- package/dist/{pi-mono-adapter-mymbwhj0.js → pi-mono-adapter-m2qnafxm.js} +89 -14
- package/dist/{pricing-refresh-yb75wv33.js → pricing-refresh-wkpwhgvs.js} +3 -3
- package/dist/{rbac-roles-dexhc9x8.js → rbac-roles-dpn0c0wj.js} +7 -4
- package/dist/{rbac-roles-1vp2mw4p.js → rbac-roles-wk7xd6a6.js} +2 -2
- package/dist/{render-v2-tjay5hhf.js → render-v2-ex2m4g2k.js} +3 -3
- package/dist/{resume-8ayf37g5.js → resume-725g9b0b.js} +7 -7
- package/dist/{runtime-hqe5cqcd.js → runtime-kajas15g.js} +1 -1
- package/dist/{session-access-fdhp987s.js → session-access-0j2ezjje.js} +8 -4
- package/dist/{session-source-backfill-qgtc86z1.js → session-source-backfill-62202awe.js} +2 -2
- package/dist/{setup-4rrmqcq3.js → setup-9sj11ax6.js} +1 -1
- package/dist/{virtual-modules-52km00d6.js → virtual-modules-c6fcq6zr.js} +2 -2
- package/dist/{work-objects-p28fgd70.js → work-objects-0y07495y.js} +20 -20
- package/dist/worker-d4q9sqbc.js +79 -0
- package/openapi.json +1536 -407
- package/package.json +7 -5
- package/src/be/automation-preflight.ts +2 -0
- package/src/be/connector-codes.ts +65 -22
- package/src/be/db/api-keys.ts +9 -0
- package/src/be/db/workflow-runs.ts +36 -5
- package/src/be/db.ts +80 -22
- package/src/be/memory/boot-reembed.ts +4 -1
- package/src/be/memory/constants.ts +6 -0
- package/src/be/memory/embedding-recovery.ts +48 -0
- package/src/be/memory/index-content.ts +5 -2
- package/src/be/memory/providers/openai-embedding.ts +65 -14
- package/src/be/memory/task-learning.ts +257 -0
- package/src/be/memory/types.ts +13 -2
- package/src/be/migrations/245_script_executor.sql +3 -0
- package/src/be/migrations/246_connector_code_kind.sql +11 -0
- package/src/be/oauth-refresh-sweep.ts +2 -1
- package/src/be/onboarding.ts +125 -15
- package/src/be/rbac-roles.ts +4 -1
- package/src/be/scripts/boot-reembed.ts +2 -0
- package/src/be/scripts/db.ts +14 -4
- package/src/be/scripts/embeddings.ts +4 -2
- package/src/be/scripts/run-saved.ts +1 -0
- package/src/be/scripts/typecheck.ts +9 -3
- package/src/be/seed/agent-fs-provision.ts +75 -14
- package/src/be/seed-skills/index.ts +7 -0
- package/src/be/swarm-config-guard.ts +3 -0
- package/src/cli.tsx +9 -0
- package/src/comb/config.ts +6 -1
- package/src/commands/onboard/agent-fs-version.ts +5 -0
- package/src/commands/onboard/compose-generator.ts +117 -4
- package/src/commands/onboard/env-generator.ts +9 -0
- package/src/commands/onboard/tei-image.ts +12 -0
- package/src/commands/onboard/types.ts +7 -0
- package/src/commands/onboard.tsx +11 -1
- package/src/commands/provider-credentials.ts +2 -1
- package/src/commands/runner.ts +14 -1
- package/src/heartbeat/heartbeat.ts +14 -1
- package/src/heartbeat/script-runner-probe.ts +47 -0
- package/src/http/agentfs-proxy.ts +369 -0
- package/src/http/all-routes.ts +1 -0
- package/src/http/api-keys.ts +24 -9
- package/src/http/codex-oauth-device.ts +8 -1
- package/src/http/fs.ts +64 -10
- package/src/http/idempotency-key.ts +1 -1
- package/src/http/inbox-state.ts +27 -1
- package/src/http/index.ts +7 -4
- package/src/http/memory.ts +7 -4
- package/src/http/onboarding.ts +139 -11
- package/src/http/pages-public.ts +38 -5
- package/src/http/scripts.ts +27 -0
- package/src/http/session-access.ts +24 -0
- package/src/http/sessions.ts +10 -6
- package/src/http/tasks.ts +85 -11
- package/src/http/telemetry-ui.ts +1 -1
- package/src/http/user-roles.ts +4 -1
- package/src/http/users.ts +272 -3
- package/src/http/utils.ts +22 -3
- package/src/http/workflows.ts +10 -0
- package/src/http/x.ts +5 -0
- package/src/prompts/base-prompt.ts +45 -10
- package/src/prompts/session-templates.ts +43 -5
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +6 -1
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/providers/dsh-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +99 -14
- package/src/rbac/legacy-policy.ts +1 -0
- package/src/rbac/permissions.ts +4 -0
- package/src/scheduler/scheduler.ts +2 -1
- package/src/scripts-runtime/eval-harness.ts +8 -1
- package/src/scripts-runtime/executors/native.ts +22 -16
- package/src/scripts-runtime/executors/quickjs-prelude.ts +103 -1
- package/src/scripts-runtime/executors/quickjs-runner.ts +2 -1
- package/src/scripts-runtime/executors/quickjs.ts +7 -0
- package/src/scripts-runtime/executors/registry.ts +32 -0
- package/src/scripts-runtime/executors/types.ts +7 -0
- package/src/scripts-runtime/host-validated-args.ts +133 -0
- package/src/scripts-runtime/loader.ts +30 -3
- package/src/scripts-runtime/swarm-sdk.ts +9 -2
- package/src/scripts-runtime/types/stdlib.d.ts +9 -1
- package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -1
- package/src/tests/agent-fs-provision-seeder.test.ts +261 -92
- package/src/tests/agentfs-proxy.test.ts +1106 -0
- package/src/tests/api-key-status-by-suffix.test.ts +242 -0
- package/src/tests/base-prompt.test.ts +139 -4
- package/src/tests/codex-adapter.test.ts +46 -8
- package/src/tests/codex-oauth-device.test.ts +12 -1
- package/src/tests/comb-config-guard.test.ts +20 -0
- package/src/tests/comb-links.test.ts +79 -1
- package/src/tests/comb-status.test.ts +44 -0
- package/src/tests/community-linear-delivery-loop.test.ts +2099 -0
- package/src/tests/credential-check.test.ts +4 -2
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/docs-index.test.ts +135 -0
- package/src/tests/dsh-adapter.test.ts +1 -1
- package/src/tests/fetch-resolved-env.test.ts +16 -2
- package/src/tests/fixtures/onboard/baseline-states.ts +68 -0
- package/src/tests/fixtures/onboard/content.compose.yml.txt +190 -0
- package/src/tests/fixtures/onboard/content.env.txt +29 -0
- package/src/tests/fixtures/onboard/dev.compose.yml.txt +155 -0
- package/src/tests/fixtures/onboard/dev.env.txt +28 -0
- package/src/tests/fixtures/onboard/full-all.compose.yml.txt +582 -0
- package/src/tests/fixtures/onboard/full-all.env.txt +59 -0
- package/src/tests/fixtures/onboard/full.compose.yml.txt +435 -0
- package/src/tests/fixtures/onboard/full.env.txt +36 -0
- package/src/tests/fixtures/onboard/research.compose.yml.txt +155 -0
- package/src/tests/fixtures/onboard/research.env.txt +28 -0
- package/src/tests/fixtures/onboard/solo.compose.yml.txt +85 -0
- package/src/tests/fixtures/onboard/solo.env.txt +26 -0
- package/src/tests/heartbeat-checklist.test.ts +89 -0
- package/src/tests/heartbeat-script-runner-probe.test.ts +83 -0
- package/src/tests/http-log-scrubbing.test.ts +34 -1
- package/src/tests/http-task-write-ownership.test.ts +5 -1
- package/src/tests/invites-http.test.ts +464 -0
- package/src/tests/memory-embedding-input-cap.test.ts +122 -1
- package/src/tests/memory-embedding-recovery.test.ts +137 -0
- package/src/tests/oauth-refresh-sweep.test.ts +34 -1
- package/src/tests/onboard-compose.test.ts +162 -0
- package/src/tests/onboard-env.test.ts +24 -0
- package/src/tests/onboard-non-interactive.test.ts +29 -0
- package/src/tests/onboard-tei-image.test.ts +36 -0
- package/src/tests/onboarding.test.ts +451 -4
- package/src/tests/openai-embedding-provider.test.ts +105 -2
- package/src/tests/opencode-adapter.test.ts +2 -1
- package/src/tests/pages-frame-ancestors.test.ts +162 -0
- package/src/tests/pi-codemode.test.ts +2 -1
- package/src/tests/pi-mono-adapter.test.ts +54 -0
- package/src/tests/pi-mono-session-cost-on-abort.test.ts +270 -0
- package/src/tests/pi-native-mcp.test.ts +13 -1
- package/src/tests/pi-tool-exposure.test.ts +8 -8
- package/src/tests/preload-env.test.ts +4 -0
- package/src/tests/preload.ts +4 -0
- package/src/tests/probe-tool-schema-tokens.test.ts +144 -0
- package/src/tests/prompt-template-session.test.ts +20 -3
- package/src/tests/rbac-admission-e2e.test.ts +22 -6
- package/src/tests/rbac-admission.test.ts +342 -4
- package/src/tests/rbac-engine.test.ts +1 -0
- package/src/tests/rbac-roles.test.ts +9 -1
- package/src/tests/request-composition-derive.test.ts +329 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/script-executor-conformance.test.ts +36 -1
- package/src/tests/script-executor-quickjs-pool.test.ts +50 -0
- package/src/tests/script-executor-quickjs.test.ts +140 -0
- package/src/tests/script-host-validated-args-native.test.ts +196 -0
- package/src/tests/script-per-script-executor.test.ts +415 -0
- package/src/tests/scripts-external-api.test.ts +45 -0
- package/src/tests/sdk-allowlist.test.ts +3 -2
- package/src/tests/self-improvement.test.ts +4 -4
- package/src/tests/send-task-requester-gate.test.ts +64 -3
- package/src/tests/sessions-move.test.ts +39 -1
- package/src/tests/store-progress-learning.test.ts +381 -0
- package/src/tests/ui-logs-parser.test.ts +180 -0
- package/src/tests/whoami-route.test.ts +41 -0
- package/src/tests/workflow-engine-v2.test.ts +116 -1
- package/src/tests/workflow-mcp-trigger-schema.test.ts +209 -0
- package/src/tests/workflow-run-finished-event.test.ts +263 -0
- package/src/tests/workflow-swarm-script.test.ts +34 -0
- package/src/tools/inject-learning.ts +1 -1
- package/src/tools/memory-edit.ts +1 -1
- package/src/tools/memory-search.ts +1 -1
- package/src/tools/script-common.ts +1 -0
- package/src/tools/script-run.ts +7 -0
- package/src/tools/script-upsert.ts +7 -0
- package/src/tools/store-progress.ts +71 -1
- package/src/tools/utils.ts +12 -1
- package/src/tools/workflows/trigger-workflow.ts +104 -10
- package/src/types.ts +12 -1
- package/src/utils/constants.ts +39 -0
- package/src/utils/credentials.ts +5 -2
- package/src/utils/task-attachment-links.ts +15 -3
- package/src/workflows/engine.ts +18 -16
- package/src/workflows/executors/swarm-script.ts +5 -0
- package/src/workflows/foreach-driver.ts +5 -11
- package/src/workflows/node-timeout.ts +30 -0
- package/templates/community/linear-delivery-loop/PLAYBOOK.md +323 -0
- package/templates/community/linear-delivery-loop/README.md +38 -0
- package/templates/community/linear-delivery-loop/config.example.json +31 -0
- package/templates/community/linear-delivery-loop/lead-prompt.md +34 -0
- package/templates/community/linear-delivery-loop/schedule.json +10 -0
- package/templates/community/linear-delivery-loop/scripts/linear-delivery-setup.ts +148 -0
- package/templates/community/linear-delivery-loop/scripts/linear-delivery-tick.ts +1781 -0
- package/templates/skills/swarm-docs/config.json +14 -0
- package/templates/skills/swarm-docs/content.md +144 -0
- package/dist/handlers-eqsnmv95.js +0 -41
- package/dist/lead-23e7z59t.js +0 -79
- package/dist/worker-e3w7vye1.js +0 -79
- package/dist/{azure-openai-responses-9kfwhmn7.js → azure-openai-responses-43asa23s.js} +0 -0
- package/dist/{node-vxx896fa.js → node-t28cc56b.js} +0 -0
- package/dist/{openai-codex-responses-79s8xnbh.js → openai-codex-responses-jhr3sjtm.js} +3 -3
- package/dist/{openai-completions-tdbyts0x.js → openai-completions-gs6yn37k.js} +3 -3
- /package/dist/{openai-responses-dm3t5vqp.js → openai-responses-jqm9vwwk.js} +0 -0
|
@@ -113,6 +113,11 @@ import {
|
|
|
113
113
|
cancelTask2,
|
|
114
114
|
getRecentlyCancelledTasksForAgent2,
|
|
115
115
|
updateTaskProgress2,
|
|
116
|
+
IdempotencyKeyTakenError,
|
|
117
|
+
workflowRequestFingerprint,
|
|
118
|
+
findAcceptedWorkflowOperation,
|
|
119
|
+
recordAcceptedWorkflowOperation,
|
|
120
|
+
init_workflow_idempotency,
|
|
116
121
|
getWorkflowRunSummary,
|
|
117
122
|
getWorkflowRunStepsSlimByRunId,
|
|
118
123
|
getRunLineageBlock,
|
|
@@ -149,6 +154,7 @@ import {
|
|
|
149
154
|
getAuthorizationById,
|
|
150
155
|
getOAuthTokens,
|
|
151
156
|
init_oauth,
|
|
157
|
+
LEARNING_DUPLICATE_MIN_SIMILARITY,
|
|
152
158
|
CANDIDATE_SET_MULTIPLIER,
|
|
153
159
|
isGraphExpansionEnabled,
|
|
154
160
|
init_constants,
|
|
@@ -343,19 +349,19 @@ import {
|
|
|
343
349
|
recordInlineScriptRun2,
|
|
344
350
|
exports_db,
|
|
345
351
|
init_db3
|
|
346
|
-
} from "./cli-
|
|
352
|
+
} from "./cli-qvaa1gjp.js";
|
|
347
353
|
import {
|
|
348
354
|
getUserGrant2,
|
|
349
355
|
init_rbac_roles
|
|
350
|
-
} from "./cli-
|
|
356
|
+
} from "./cli-hpkvgdad.js";
|
|
351
357
|
import {
|
|
352
358
|
ensurePricingSeeded2,
|
|
353
359
|
ensureRbacSeeded2,
|
|
354
360
|
ensureModelProfilesSeeded2
|
|
355
|
-
} from "./cli-
|
|
361
|
+
} from "./cli-typdpe8g.js";
|
|
356
362
|
import {
|
|
357
363
|
loadModelsDevCache
|
|
358
|
-
} from "./cli-
|
|
364
|
+
} from "./cli-2sjm3t4r.js";
|
|
359
365
|
import {
|
|
360
366
|
buildCatalogEntries,
|
|
361
367
|
listModelCatalog,
|
|
@@ -365,12 +371,12 @@ import {
|
|
|
365
371
|
loadModelsCatalog,
|
|
366
372
|
requestModelCatalogRefresh2,
|
|
367
373
|
startPricingRefreshLoop2
|
|
368
|
-
} from "./cli-
|
|
374
|
+
} from "./cli-twjnyvs8.js";
|
|
369
375
|
import {
|
|
370
376
|
ampPinProviderError,
|
|
371
377
|
ampPinCatalogError,
|
|
372
378
|
ampModelError
|
|
373
|
-
} from "./cli-
|
|
379
|
+
} from "./cli-cb50g9cd.js";
|
|
374
380
|
import {
|
|
375
381
|
workflowEventBus2,
|
|
376
382
|
init_event_bus
|
|
@@ -439,7 +445,7 @@ import {
|
|
|
439
445
|
definitionNodeIds,
|
|
440
446
|
validateDefinition,
|
|
441
447
|
applyDefinitionPatch
|
|
442
|
-
} from "./cli-
|
|
448
|
+
} from "./cli-dv11pgpv.js";
|
|
443
449
|
import {
|
|
444
450
|
require_dist2,
|
|
445
451
|
publicEndpointSsrfOptions,
|
|
@@ -499,14 +505,14 @@ import {
|
|
|
499
505
|
deleteApp,
|
|
500
506
|
typecheckScript,
|
|
501
507
|
parseSkillContent
|
|
502
|
-
} from "./cli-
|
|
508
|
+
} from "./cli-kbtdftbw.js";
|
|
503
509
|
import {
|
|
504
510
|
buildAuthorizationUrl,
|
|
505
511
|
onAuthorizationRefreshed,
|
|
506
512
|
ensureAuthorizationTokenOrThrow,
|
|
507
513
|
ensureToken,
|
|
508
514
|
ensureTokenOrThrow
|
|
509
|
-
} from "./cli-
|
|
515
|
+
} from "./cli-rm66vqdz.js";
|
|
510
516
|
import {
|
|
511
517
|
detachedProcessGroup,
|
|
512
518
|
registerProcessGroup,
|
|
@@ -540,14 +546,14 @@ import {
|
|
|
540
546
|
getSlackApp2,
|
|
541
547
|
startSlackApp2,
|
|
542
548
|
stopSlackApp2
|
|
543
|
-
} from "./cli-
|
|
549
|
+
} from "./cli-thsaq4pd.js";
|
|
544
550
|
import {
|
|
545
551
|
slackCode,
|
|
546
552
|
slackMissingScopeMessage,
|
|
547
553
|
withAutoJoin,
|
|
548
554
|
externalChannelToolError2,
|
|
549
555
|
getChannelBlockReason2
|
|
550
|
-
} from "./cli-
|
|
556
|
+
} from "./cli-vhpckzvp.js";
|
|
551
557
|
import {
|
|
552
558
|
shapeApprovalResolution,
|
|
553
559
|
SubWorkflowExecutor,
|
|
@@ -566,7 +572,7 @@ import {
|
|
|
566
572
|
recoverResolvedWaitState2,
|
|
567
573
|
resumeFromChildRun2,
|
|
568
574
|
initWaitBusSubscriptions2
|
|
569
|
-
} from "./cli-
|
|
575
|
+
} from "./cli-3v2cyqb8.js";
|
|
570
576
|
import {
|
|
571
577
|
duplicateGuardedQueryKey,
|
|
572
578
|
parseQueryParams,
|
|
@@ -593,7 +599,7 @@ import {
|
|
|
593
599
|
isPublicRoute,
|
|
594
600
|
findRoute,
|
|
595
601
|
route
|
|
596
|
-
} from "./cli-
|
|
602
|
+
} from "./cli-hq2v4rr5.js";
|
|
597
603
|
import {
|
|
598
604
|
FilesError,
|
|
599
605
|
providerPath,
|
|
@@ -604,7 +610,7 @@ import {
|
|
|
604
610
|
import {
|
|
605
611
|
getRuntimePool2,
|
|
606
612
|
init_db
|
|
607
|
-
} from "./cli-
|
|
613
|
+
} from "./cli-6vwjsetx.js";
|
|
608
614
|
import {
|
|
609
615
|
getMemoryRaterNames,
|
|
610
616
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
@@ -629,7 +635,7 @@ import {
|
|
|
629
635
|
import {
|
|
630
636
|
canProvisionKind,
|
|
631
637
|
init_runtime_providers
|
|
632
|
-
} from "./cli-
|
|
638
|
+
} from "./cli-m52t4cta.js";
|
|
633
639
|
import {
|
|
634
640
|
findUserById,
|
|
635
641
|
findUserByExternalId,
|
|
@@ -644,7 +650,7 @@ import {
|
|
|
644
650
|
resolveSessionToken,
|
|
645
651
|
fingerprintApiKey,
|
|
646
652
|
init_users
|
|
647
|
-
} from "./cli-
|
|
653
|
+
} from "./cli-nf6k60sn.js";
|
|
648
654
|
import {
|
|
649
655
|
isRbacEnabled,
|
|
650
656
|
decideAdmission,
|
|
@@ -653,7 +659,7 @@ import {
|
|
|
653
659
|
init_elevated_agents,
|
|
654
660
|
can,
|
|
655
661
|
init_rbac
|
|
656
|
-
} from "./cli-
|
|
662
|
+
} from "./cli-k4awgvzm.js";
|
|
657
663
|
import {
|
|
658
664
|
normalizeAssetKey,
|
|
659
665
|
sessionGroupKey,
|
|
@@ -714,7 +720,7 @@ import {
|
|
|
714
720
|
KvNamespaceSchema,
|
|
715
721
|
KvKeySchema,
|
|
716
722
|
init_types
|
|
717
|
-
} from "./cli-
|
|
723
|
+
} from "./cli-s504c3w7.js";
|
|
718
724
|
import {
|
|
719
725
|
generateDefaultClaudeMd2,
|
|
720
726
|
generateDefaultSoulMd2,
|
|
@@ -722,8 +728,10 @@ import {
|
|
|
722
728
|
init_defaults,
|
|
723
729
|
taskAttachmentFetchCommand,
|
|
724
730
|
taskAttachmentDisplayUrl,
|
|
725
|
-
init_task_attachment_links
|
|
726
|
-
|
|
731
|
+
init_task_attachment_links,
|
|
732
|
+
contentSha256,
|
|
733
|
+
init_profile_sync
|
|
734
|
+
} from "./cli-kj69b9tw.js";
|
|
727
735
|
import {
|
|
728
736
|
isSteeringEnabled2,
|
|
729
737
|
init_steering_enabled
|
|
@@ -735,7 +743,7 @@ import {
|
|
|
735
743
|
import {
|
|
736
744
|
selectCredential,
|
|
737
745
|
init_credentials
|
|
738
|
-
} from "./cli-
|
|
746
|
+
} from "./cli-gt4h8cxw.js";
|
|
739
747
|
import {
|
|
740
748
|
findInterpolationTokens,
|
|
741
749
|
interpolate,
|
|
@@ -745,7 +753,7 @@ import {
|
|
|
745
753
|
init_registry,
|
|
746
754
|
resolveTemplate,
|
|
747
755
|
init_resolver
|
|
748
|
-
} from "./cli-
|
|
756
|
+
} from "./cli-b41p764a.js";
|
|
749
757
|
import {
|
|
750
758
|
init_zod
|
|
751
759
|
} from "./cli-4chz1hye.js";
|
|
@@ -787,11 +795,7 @@ import {
|
|
|
787
795
|
import {
|
|
788
796
|
init_package,
|
|
789
797
|
package_default
|
|
790
|
-
} from "./cli-
|
|
791
|
-
import {
|
|
792
|
-
realtimeBus,
|
|
793
|
-
init_bus
|
|
794
|
-
} from "./cli-syfdvhkc.js";
|
|
798
|
+
} from "./cli-swkx9jm2.js";
|
|
795
799
|
import {
|
|
796
800
|
MAX_PROFILE_FILE_LENGTH,
|
|
797
801
|
getConfiguredAppUrls,
|
|
@@ -802,13 +806,18 @@ import {
|
|
|
802
806
|
getAgentFsDefaultOrgId,
|
|
803
807
|
getAgentFsDefaultDriveId,
|
|
804
808
|
isCombEnabled,
|
|
809
|
+
isAgentFsProxyEnabled,
|
|
805
810
|
init_constants2
|
|
806
|
-
} from "./cli-
|
|
811
|
+
} from "./cli-3cywb44q.js";
|
|
807
812
|
import {
|
|
808
813
|
parseEnvFlag,
|
|
809
814
|
isEnvFlagEnabled,
|
|
810
815
|
init_env_flag
|
|
811
816
|
} from "./cli-cebvbc9t.js";
|
|
817
|
+
import {
|
|
818
|
+
realtimeBus,
|
|
819
|
+
init_bus
|
|
820
|
+
} from "./cli-syfdvhkc.js";
|
|
812
821
|
import {
|
|
813
822
|
getApiKey,
|
|
814
823
|
init_api_key
|
|
@@ -20537,7 +20546,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20537
20546
|
if (!waiting)
|
|
20538
20547
|
continue;
|
|
20539
20548
|
if (result.waitFor === "workflow.child.finished") {
|
|
20540
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
20549
|
+
const { resumeFromChildRun } = await import("./resume-725g9b0b.js");
|
|
20541
20550
|
await resumeFromChildRun(step.id, registry);
|
|
20542
20551
|
}
|
|
20543
20552
|
} else {
|
|
@@ -21220,7 +21229,7 @@ class NotifyExecutor extends BaseExecutor {
|
|
|
21220
21229
|
}
|
|
21221
21230
|
}
|
|
21222
21231
|
case "slack": {
|
|
21223
|
-
const { getSlackApp } = await import("./app-
|
|
21232
|
+
const { getSlackApp } = await import("./app-d53yhykk.js");
|
|
21224
21233
|
const app = getSlackApp();
|
|
21225
21234
|
if (!app) {
|
|
21226
21235
|
return {
|
|
@@ -21643,6 +21652,7 @@ class SwarmScriptExecutor extends BaseExecutor {
|
|
|
21643
21652
|
source: resolved.source,
|
|
21644
21653
|
args: config.args,
|
|
21645
21654
|
fsMode: "none",
|
|
21655
|
+
executor: resolved.script.executor,
|
|
21646
21656
|
agentId: agentId ?? "workflow",
|
|
21647
21657
|
mcpBaseUrl: getMcpBaseUrl(),
|
|
21648
21658
|
egressSecrets: credentials.egressSecrets,
|
|
@@ -21651,7 +21661,8 @@ class SwarmScriptExecutor extends BaseExecutor {
|
|
|
21651
21661
|
agentFs: credentials.agentFs,
|
|
21652
21662
|
apiConnections: getScriptApiConnectionDescriptors({ agentId: agentId ?? undefined }),
|
|
21653
21663
|
mcpConnections: getScriptMcpConnectionDescriptors({ agentId: agentId ?? undefined }),
|
|
21654
|
-
timeoutMs: config.timeoutMs
|
|
21664
|
+
timeoutMs: config.timeoutMs,
|
|
21665
|
+
signal: meta.signal
|
|
21655
21666
|
});
|
|
21656
21667
|
if (output.exitCode === 0 && !output.error && !output.runtimeError) {
|
|
21657
21668
|
await touchScratchScriptLastUsed(resolved.script.id);
|
|
@@ -22333,6 +22344,7 @@ async function executeScheduleScript(schedule) {
|
|
|
22333
22344
|
source: script.source,
|
|
22334
22345
|
args,
|
|
22335
22346
|
fsMode: "none",
|
|
22347
|
+
executor: script.executor,
|
|
22336
22348
|
agentId,
|
|
22337
22349
|
egressSecrets: credentials.egressSecrets,
|
|
22338
22350
|
userConfig: credentials.userConfig,
|
|
@@ -24218,6 +24230,13 @@ var storeProgressBlockedWaitingNudge = (r) => {
|
|
|
24218
24230
|
return;
|
|
24219
24231
|
return `That reads as blocked-waiting, ${formatIdleDuration(ms)} since your last update — keep working if you can, and if the wait is genuinely long, defer-task is one way to resume later instead of polling.`;
|
|
24220
24232
|
};
|
|
24233
|
+
var storeProgressNudge = (r) => {
|
|
24234
|
+
const learning = r.data?.learning;
|
|
24235
|
+
if (r.ok && learning?.status === "duplicate" && typeof learning.memoryId === "string") {
|
|
24236
|
+
return `That learning repeats memory ${learning.memoryId}; if your text adds something, memory-edit that memory instead of storing a new one.`;
|
|
24237
|
+
}
|
|
24238
|
+
return storeProgressBlockedWaitingNudge(r);
|
|
24239
|
+
};
|
|
24221
24240
|
var workflowLongScriptTimeoutNudge = (r) => {
|
|
24222
24241
|
if (!r.ok)
|
|
24223
24242
|
return;
|
|
@@ -24226,7 +24245,7 @@ var workflowLongScriptTimeoutNudge = (r) => {
|
|
|
24226
24245
|
};
|
|
24227
24246
|
var NUDGES = {
|
|
24228
24247
|
"defer-task": (r) => r.ok ? "Stop working on this task now; the wake-up task will carry your note." : undefined,
|
|
24229
|
-
"store-progress":
|
|
24248
|
+
"store-progress": storeProgressNudge,
|
|
24230
24249
|
"script-run": scriptRunNudge,
|
|
24231
24250
|
"script-upsert": scriptAuthoringNudge,
|
|
24232
24251
|
"launch-script-run": scriptAuthoringNudge,
|
|
@@ -24604,7 +24623,7 @@ function setPreloadedTools(server, names) {
|
|
|
24604
24623
|
async function applyPreToolCall(name, args, requestInfo, inputSchema) {
|
|
24605
24624
|
if (requestInfo.callOrigin !== "mcp")
|
|
24606
24625
|
return { args };
|
|
24607
|
-
const dispatcher = await import("./dispatcher-
|
|
24626
|
+
const dispatcher = await import("./dispatcher-8m0htjq8.js");
|
|
24608
24627
|
const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
|
|
24609
24628
|
validateModify: async (data) => {
|
|
24610
24629
|
const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
|
|
@@ -25263,10 +25282,12 @@ function bridgeRequestFor(name, args) {
|
|
|
25263
25282
|
const id = typeof body.id === "string" ? body.id : undefined;
|
|
25264
25283
|
if (!id)
|
|
25265
25284
|
throw new Error("workflow_trigger requires string `id`");
|
|
25285
|
+
const path = `/api/workflows/${encodeURIComponent(id)}/trigger`;
|
|
25266
25286
|
return {
|
|
25267
25287
|
method: "POST",
|
|
25268
|
-
path:
|
|
25269
|
-
body: body.triggerData ?? {}
|
|
25288
|
+
path: body.wait === false ? `${path}?wait=false` : path,
|
|
25289
|
+
body: body.triggerData ?? {},
|
|
25290
|
+
...typeof body.idempotencyKey === "string" ? { headers: { "Idempotency-Key": body.idempotencyKey } } : {}
|
|
25270
25291
|
};
|
|
25271
25292
|
}
|
|
25272
25293
|
case "workflow_retryRun": {
|
|
@@ -25379,7 +25400,7 @@ async function callBridgeApi(name, args, config, options = {}) {
|
|
|
25379
25400
|
}
|
|
25380
25401
|
const res = await fetch(`${baseUrl}${request.path}`, {
|
|
25381
25402
|
method: request.method,
|
|
25382
|
-
headers: headers(config),
|
|
25403
|
+
headers: { ...headers(config), ...request.headers },
|
|
25383
25404
|
body: request.body === undefined ? undefined : JSON.stringify(request.body)
|
|
25384
25405
|
});
|
|
25385
25406
|
const data = await readScriptSdkJsonResponse(res, `ctx.swarm.${name}`);
|
|
@@ -31731,7 +31752,7 @@ async function loadAdapter(name, config, logger) {
|
|
|
31731
31752
|
});
|
|
31732
31753
|
}
|
|
31733
31754
|
case "slack": {
|
|
31734
|
-
const { createSlackAdapter } = await import("./index-
|
|
31755
|
+
const { createSlackAdapter } = await import("./index-cekzwhez.js");
|
|
31735
31756
|
return createSlackAdapter({
|
|
31736
31757
|
...base,
|
|
31737
31758
|
signingSecret: config.signingSecret ?? "",
|
|
@@ -31750,7 +31771,7 @@ async function loadAdapter(name, config, logger) {
|
|
|
31750
31771
|
});
|
|
31751
31772
|
}
|
|
31752
31773
|
case "teams": {
|
|
31753
|
-
const { createTeamsAdapter } = await import("./index-
|
|
31774
|
+
const { createTeamsAdapter } = await import("./index-8fxt5eah.js");
|
|
31754
31775
|
const { teamsWebhookVerifier, teamsToken } = getChatSdkTestHooks();
|
|
31755
31776
|
return createTeamsAdapter({
|
|
31756
31777
|
...base,
|
|
@@ -35086,7 +35107,7 @@ async function notifySlack(text) {
|
|
|
35086
35107
|
return;
|
|
35087
35108
|
}
|
|
35088
35109
|
try {
|
|
35089
|
-
const { getSlackApp } = await import("./app-
|
|
35110
|
+
const { getSlackApp } = await import("./app-d53yhykk.js");
|
|
35090
35111
|
const app = getSlackApp();
|
|
35091
35112
|
if (!app) {
|
|
35092
35113
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -35157,7 +35178,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
35157
35178
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
35158
35179
|
}
|
|
35159
35180
|
async function overwriteWebhookIds(next) {
|
|
35160
|
-
const { getDbClient } = await import("./db-
|
|
35181
|
+
const { getDbClient } = await import("./db-dv9j7ts5.js");
|
|
35161
35182
|
await getDbClient().transaction(async (tx) => {
|
|
35162
35183
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
35163
35184
|
if (!row) {
|
|
@@ -108556,7 +108577,7 @@ async function reloadGlobalConfigsAndIntegrations() {
|
|
|
108556
108577
|
return runWithoutRequestAuth(() => reloadGlobalConfigsAndIntegrationsInner());
|
|
108557
108578
|
}
|
|
108558
108579
|
async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
108559
|
-
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-
|
|
108580
|
+
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-yn1yxg85.js");
|
|
108560
108581
|
const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
|
|
108561
108582
|
const updated = await loadGlobalConfigsIntoEnv(true);
|
|
108562
108583
|
await syncTelemetryEnabled("settings").catch((err) => {
|
|
@@ -108572,10 +108593,10 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
|
108572
108593
|
integrations.push("embeddings");
|
|
108573
108594
|
}
|
|
108574
108595
|
if (!wasEmbeddingsConfigured && isEmbeddingsConfigured) {
|
|
108575
|
-
import("./boot-reembed-
|
|
108596
|
+
import("./boot-reembed-k5y5xbj0.js").then(({ runBootReembed }) => runBootReembed()).catch((err) => {
|
|
108576
108597
|
console.error("[config-reload] memory backfill failed (non-fatal):", err);
|
|
108577
108598
|
});
|
|
108578
|
-
import("./boot-reembed-
|
|
108599
|
+
import("./boot-reembed-fxfw17m2.js").then(({ runBootReembedScripts }) => runBootReembedScripts()).catch((err) => {
|
|
108579
108600
|
console.error("[config-reload] script backfill failed (non-fatal):", err);
|
|
108580
108601
|
});
|
|
108581
108602
|
}
|
|
@@ -116251,7 +116272,7 @@ async function indexMemoryContent(params) {
|
|
|
116251
116272
|
intent: "re-index memory source path",
|
|
116252
116273
|
changedByAgentId: agentId
|
|
116253
116274
|
});
|
|
116254
|
-
const embedding = await provider.embed(result.memory.content);
|
|
116275
|
+
const embedding = await provider.embed(result.memory.content, { kind: "document" });
|
|
116255
116276
|
if (embedding)
|
|
116256
116277
|
await store.updateEmbedding(result.memory.id, embedding, provider.name);
|
|
116257
116278
|
try {
|
|
@@ -116292,7 +116313,7 @@ async function indexMemoryContent(params) {
|
|
|
116292
116313
|
}
|
|
116293
116314
|
(async () => {
|
|
116294
116315
|
try {
|
|
116295
|
-
const embeddings = await provider.embedBatch(memories.map((m) => m.content));
|
|
116316
|
+
const embeddings = await provider.embedBatch(memories.map((m) => m.content), { kind: "document" });
|
|
116296
116317
|
for (let i = 0;i < embeddings.length; i++) {
|
|
116297
116318
|
if (embeddings[i]) {
|
|
116298
116319
|
await store.updateEmbedding(memories[i].id, embeddings[i], provider.name);
|
|
@@ -117683,6 +117704,7 @@ var SCRIPT_TRANSPORT_ERROR = "script_* tools require HTTP MCP transport — agen
|
|
|
117683
117704
|
var scriptNameSchema = string2().min(1).max(200);
|
|
117684
117705
|
var scriptScopeSchema = _enum2(["agent", "global"]);
|
|
117685
117706
|
var scriptFsModeSchema = _enum2(["none", "workspace-rw"]);
|
|
117707
|
+
var scriptExecutorSchema = _enum2(["native", "quickjs"]);
|
|
117686
117708
|
var scriptToolOutputSchema = swarmToolOutputSchema({
|
|
117687
117709
|
status: number2().optional(),
|
|
117688
117710
|
data: unknown().optional()
|
|
@@ -118440,7 +118462,7 @@ ${learning}`;
|
|
|
118440
118462
|
});
|
|
118441
118463
|
try {
|
|
118442
118464
|
const provider = getEmbeddingProvider2();
|
|
118443
|
-
const embedding = await provider.embed(memory.content);
|
|
118465
|
+
const embedding = await provider.embed(memory.content, { kind: "document" });
|
|
118444
118466
|
if (embedding) {
|
|
118445
118467
|
await store.updateEmbedding(memory.id, embedding, provider.name);
|
|
118446
118468
|
}
|
|
@@ -119939,7 +119961,7 @@ var registerMemoryEditTool = (server) => {
|
|
|
119939
119961
|
const contentEdited = content !== undefined || oldString !== undefined || newString !== undefined;
|
|
119940
119962
|
if (result.changed && (newKey === undefined || contentEdited)) {
|
|
119941
119963
|
const provider = getEmbeddingProvider2();
|
|
119942
|
-
const embedding = await provider.embed(result.memory.content);
|
|
119964
|
+
const embedding = await provider.embed(result.memory.content, { kind: "document" });
|
|
119943
119965
|
if (embedding)
|
|
119944
119966
|
await store.updateEmbedding(result.memory.id, embedding, provider.name);
|
|
119945
119967
|
try {
|
|
@@ -120433,7 +120455,7 @@ var registerMemorySearchTool = (server) => {
|
|
|
120433
120455
|
const isLead = agent?.isLead ?? false;
|
|
120434
120456
|
const provider = getEmbeddingProvider2();
|
|
120435
120457
|
const store = getMemoryStore2();
|
|
120436
|
-
const queryEmbedding = await provider.embed(query);
|
|
120458
|
+
const queryEmbedding = await provider.embed(query, { kind: "query" });
|
|
120437
120459
|
const candidateLimit = limit * CANDIDATE_SET_MULTIPLIER;
|
|
120438
120460
|
const candidates = await searchMemoryCandidates(store, queryEmbedding ?? new Float32Array(0), requestInfo.agentId, {
|
|
120439
120461
|
scope,
|
|
@@ -122516,9 +122538,10 @@ function trimUrl(value) {
|
|
|
122516
122538
|
}
|
|
122517
122539
|
function getCombConfig() {
|
|
122518
122540
|
const internalUrl = trimUrl(process.env.AGENT_FS_API_URL);
|
|
122541
|
+
const browserDefault = isAgentFsProxyEnabled() && internalUrl ? `${getPublicMcpBaseUrl()}/agentfs` : internalUrl;
|
|
122519
122542
|
return {
|
|
122520
122543
|
enabled: isCombEnabled(),
|
|
122521
|
-
apiUrl: trimUrl(process.env.AGENT_FS_PUBLIC_URL) ??
|
|
122544
|
+
apiUrl: trimUrl(process.env.AGENT_FS_PUBLIC_URL) ?? browserDefault,
|
|
122522
122545
|
liveUrl: getAgentFsLiveUrl(),
|
|
122523
122546
|
orgId: getAgentFsDefaultOrgId() ?? null,
|
|
122524
122547
|
driveId: getAgentFsDefaultDriveId() ?? null
|
|
@@ -131097,6 +131120,7 @@ var registerScriptRunTool = (server) => {
|
|
|
131097
131120
|
intent: string2().default("").describe("Why this script is being run."),
|
|
131098
131121
|
scope: scriptScopeSchema.optional().describe("Optional scope for named script resolution."),
|
|
131099
131122
|
fsMode: scriptFsModeSchema.default("none").describe("Filesystem mode. v1 supports none only."),
|
|
131123
|
+
executor: scriptExecutorSchema.nullable().optional().describe('Optional executor override ("native" or "quickjs"). When omitted, named scripts use their saved executor or SCRIPT_EXECUTOR.'),
|
|
131100
131124
|
idempotencyKey: string2().max(200).optional().describe("When set, output is auto-persisted to kv under script:executions/{key}. Re-running with the same key overwrites. Queryable via kv-get.")
|
|
131101
131125
|
}),
|
|
131102
131126
|
outputSchema: scriptToolOutputSchema
|
|
@@ -131302,7 +131326,8 @@ var registerScriptUpsertTool = (server) => {
|
|
|
131302
131326
|
description: string2().default("").describe("Human-readable script description."),
|
|
131303
131327
|
intent: string2().default("").describe("Why this script exists."),
|
|
131304
131328
|
scope: scriptScopeSchema.default("agent").describe("Persist under agent or global scope."),
|
|
131305
|
-
fsMode: scriptFsModeSchema.default("none").describe("Filesystem mode. v1 supports none only.")
|
|
131329
|
+
fsMode: scriptFsModeSchema.default("none").describe("Filesystem mode. v1 supports none only."),
|
|
131330
|
+
executor: scriptExecutorSchema.nullable().optional().describe('Optional per-script executor override ("native" or "quickjs"). Null or omitted inherits SCRIPT_EXECUTOR.')
|
|
131306
131331
|
}),
|
|
131307
131332
|
outputSchema: scriptToolOutputSchema
|
|
131308
131333
|
}, async (args, requestInfo) => proxyScriptsApi({
|
|
@@ -134554,6 +134579,150 @@ var registerSteerTaskTool = (server) => {
|
|
|
134554
134579
|
// src/tools/store-progress.ts
|
|
134555
134580
|
init_zod();
|
|
134556
134581
|
init_db3();
|
|
134582
|
+
|
|
134583
|
+
// src/be/memory/task-learning.ts
|
|
134584
|
+
init_db3();
|
|
134585
|
+
init_memory();
|
|
134586
|
+
init_constants();
|
|
134587
|
+
init_profile_sync();
|
|
134588
|
+
init_secret_scrubber();
|
|
134589
|
+
var LEARNING_MAX_CHARS = 2000;
|
|
134590
|
+
var LEARNING_MAX_TAGS = 5;
|
|
134591
|
+
var LEARNINGS_ROOT = "/learnings";
|
|
134592
|
+
var SEGMENT_MAX_CHARS = 60;
|
|
134593
|
+
var KEY_ATTEMPTS = 4;
|
|
134594
|
+
var DUPLICATE_SEARCH_PREFIXES = [`${LEARNINGS_ROOT}/`, "/longterm/workstreams/"];
|
|
134595
|
+
var LEARNING_DUPLICATE_RATING_SOURCE = "learning-duplicate";
|
|
134596
|
+
function toKebab(value, maxChars = SEGMENT_MAX_CHARS) {
|
|
134597
|
+
return value.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+/, "").slice(0, maxChars).replace(/-+$/, "");
|
|
134598
|
+
}
|
|
134599
|
+
function resolveLearningWorkstream(explicit, vcsRepo) {
|
|
134600
|
+
const fromExplicit = explicit ? toKebab(explicit) : "";
|
|
134601
|
+
if (fromExplicit)
|
|
134602
|
+
return fromExplicit;
|
|
134603
|
+
const repoName = vcsRepo?.trim().replace(/\/+$/, "").split("/").pop()?.replace(/\.git$/, "");
|
|
134604
|
+
const fromRepo = repoName ? toKebab(repoName) : "";
|
|
134605
|
+
return fromRepo || "general";
|
|
134606
|
+
}
|
|
134607
|
+
async function storeTaskLearning(params) {
|
|
134608
|
+
const { agentId, isLead, task } = params;
|
|
134609
|
+
const input = typeof params.learning === "string" ? { text: params.learning } : params.learning;
|
|
134610
|
+
const text = scrubSecrets(input.text).trim();
|
|
134611
|
+
if (!text)
|
|
134612
|
+
return { status: "failed", error: "learning text is empty" };
|
|
134613
|
+
if (text.length > LEARNING_MAX_CHARS) {
|
|
134614
|
+
return {
|
|
134615
|
+
status: "failed",
|
|
134616
|
+
error: `learning text is over ~500 tokens (${LEARNING_MAX_CHARS} characters); shorten it`
|
|
134617
|
+
};
|
|
134618
|
+
}
|
|
134619
|
+
const tags = [
|
|
134620
|
+
...new Set((input.tags ?? []).map((tag) => toKebab(scrubSecrets(tag))).filter(Boolean))
|
|
134621
|
+
].filter((tag) => tag !== "learning");
|
|
134622
|
+
if (tags.length > LEARNING_MAX_TAGS) {
|
|
134623
|
+
return { status: "failed", error: `learning takes at most ${LEARNING_MAX_TAGS} tags` };
|
|
134624
|
+
}
|
|
134625
|
+
const workstream = resolveLearningWorkstream(input.workstream === undefined ? undefined : scrubSecrets(input.workstream), task.vcsRepo === undefined ? undefined : scrubSecrets(task.vcsRepo));
|
|
134626
|
+
try {
|
|
134627
|
+
const replay = await findReplay(task.id, contentSha256(text));
|
|
134628
|
+
if (replay)
|
|
134629
|
+
return replay;
|
|
134630
|
+
const duplicate = await findNearDuplicate({ agentId, isLead, text });
|
|
134631
|
+
if (duplicate) {
|
|
134632
|
+
await rateDuplicate(duplicate, task.id);
|
|
134633
|
+
return duplicate;
|
|
134634
|
+
}
|
|
134635
|
+
return await getDbClient2().transaction(() => insertLearning({ agentId, isLead, taskId: task.id, text, tags, workstream }));
|
|
134636
|
+
} catch (err) {
|
|
134637
|
+
return {
|
|
134638
|
+
status: "failed",
|
|
134639
|
+
error: scrubSecrets(err instanceof Error ? err.message : String(err))
|
|
134640
|
+
};
|
|
134641
|
+
}
|
|
134642
|
+
}
|
|
134643
|
+
async function findReplay(taskId, contentHash) {
|
|
134644
|
+
const replay = await getDbClient2().get(`SELECT id, key FROM agent_memory
|
|
134645
|
+
WHERE sourceTaskId = ? AND contentHash = ? AND key LIKE '${LEARNINGS_ROOT}/%'
|
|
134646
|
+
LIMIT 1`, [taskId, contentHash]);
|
|
134647
|
+
return replay ? { status: "replayed", memoryId: replay.id, key: replay.key } : null;
|
|
134648
|
+
}
|
|
134649
|
+
async function findNearDuplicate(params) {
|
|
134650
|
+
try {
|
|
134651
|
+
const embedding = await getEmbeddingProvider2().embed(params.text);
|
|
134652
|
+
if (!embedding)
|
|
134653
|
+
return null;
|
|
134654
|
+
const store = getMemoryStore2();
|
|
134655
|
+
const results = await Promise.all(DUPLICATE_SEARCH_PREFIXES.map((keyPrefix) => store.search(embedding, params.agentId, {
|
|
134656
|
+
scope: "swarm",
|
|
134657
|
+
isLead: params.isLead,
|
|
134658
|
+
keyPrefix,
|
|
134659
|
+
limit: 1
|
|
134660
|
+
})));
|
|
134661
|
+
const best = results.flat().filter((candidate) => candidate.key).sort((a, b) => b.similarity - a.similarity)[0];
|
|
134662
|
+
if (!best || best.similarity < LEARNING_DUPLICATE_MIN_SIMILARITY)
|
|
134663
|
+
return null;
|
|
134664
|
+
return {
|
|
134665
|
+
status: "duplicate",
|
|
134666
|
+
memoryId: best.id,
|
|
134667
|
+
key: best.key,
|
|
134668
|
+
similarity: Math.round(best.similarity * 1000) / 1000
|
|
134669
|
+
};
|
|
134670
|
+
} catch (err) {
|
|
134671
|
+
console.warn("[task-learning] near-duplicate check failed; storing the learning:", scrubSecrets(err instanceof Error ? err.message : String(err)));
|
|
134672
|
+
return null;
|
|
134673
|
+
}
|
|
134674
|
+
}
|
|
134675
|
+
async function rateDuplicate(duplicate, taskId) {
|
|
134676
|
+
try {
|
|
134677
|
+
await applyRating([
|
|
134678
|
+
{
|
|
134679
|
+
memoryId: duplicate.memoryId,
|
|
134680
|
+
signal: 1,
|
|
134681
|
+
weight: 1,
|
|
134682
|
+
source: LEARNING_DUPLICATE_RATING_SOURCE,
|
|
134683
|
+
reasoning: `store-progress learning matched at cosine ${duplicate.similarity}`
|
|
134684
|
+
}
|
|
134685
|
+
], { taskId });
|
|
134686
|
+
} catch (err) {
|
|
134687
|
+
console.warn("[task-learning] duplicate rating failed:", scrubSecrets(err instanceof Error ? err.message : String(err)));
|
|
134688
|
+
}
|
|
134689
|
+
}
|
|
134690
|
+
async function insertLearning(params) {
|
|
134691
|
+
const { agentId, isLead, taskId, text, tags, workstream } = params;
|
|
134692
|
+
const replay = await findReplay(taskId, contentSha256(text));
|
|
134693
|
+
if (replay)
|
|
134694
|
+
return replay;
|
|
134695
|
+
const title = text.split(/\r?\n/, 1)[0].trim().slice(0, 200);
|
|
134696
|
+
const baseKey = `${LEARNINGS_ROOT}/${workstream}/${toKebab(title) || "learning"}`;
|
|
134697
|
+
for (let attempt = 0;attempt < KEY_ATTEMPTS; attempt++) {
|
|
134698
|
+
const key = attempt === 0 ? baseKey : `${baseKey}-${crypto.randomUUID().slice(0, 6)}`;
|
|
134699
|
+
const taken = await getDbClient2().get("SELECT id FROM agent_memory WHERE scope = 'swarm' AND key = ? LIMIT 1", [key]);
|
|
134700
|
+
if (taken)
|
|
134701
|
+
continue;
|
|
134702
|
+
try {
|
|
134703
|
+
const result = await indexMemoryContent({
|
|
134704
|
+
agentId,
|
|
134705
|
+
content: text,
|
|
134706
|
+
name: title,
|
|
134707
|
+
scope: "swarm",
|
|
134708
|
+
source: "manual",
|
|
134709
|
+
sourceTaskId: taskId,
|
|
134710
|
+
tags: ["learning", ...tags],
|
|
134711
|
+
intent: "store-progress learning",
|
|
134712
|
+
key,
|
|
134713
|
+
writer: { principal: { kind: "agent", agentId, isLead }, source: "mcp" }
|
|
134714
|
+
});
|
|
134715
|
+
return { status: "stored", memoryId: result.memoryIds[0], key, workstream };
|
|
134716
|
+
} catch (err) {
|
|
134717
|
+
if (/UNIQUE constraint failed/i.test(err.message))
|
|
134718
|
+
continue;
|
|
134719
|
+
throw err;
|
|
134720
|
+
}
|
|
134721
|
+
}
|
|
134722
|
+
return { status: "failed", error: `no free key under ${baseKey}` };
|
|
134723
|
+
}
|
|
134724
|
+
|
|
134725
|
+
// src/tools/store-progress.ts
|
|
134557
134726
|
init_rbac();
|
|
134558
134727
|
init_types();
|
|
134559
134728
|
init_secret_scrubber();
|
|
@@ -134582,8 +134751,26 @@ var storeProgressOutputSchema = swarmToolOutputSchema({
|
|
|
134582
134751
|
yourAgentId: string2().optional(),
|
|
134583
134752
|
wasNoOp: boolean().optional().describe("True when the call was a no-op because the task was already in a terminal state (completed/failed/cancelled). First-call-wins."),
|
|
134584
134753
|
wasForcedOverwrite: boolean().optional().describe("True when force: true replaced output and/or failureReason on an already-terminal task without replaying completion side effects."),
|
|
134585
|
-
blockedWaitingElapsedMs: number2().optional().describe("Present only when this progress text reads as blocked-waiting: milliseconds since the task's prior update. Drives the store-progress nudge toward defer-task.")
|
|
134754
|
+
blockedWaitingElapsedMs: number2().optional().describe("Present only when this progress text reads as blocked-waiting: milliseconds since the task's prior update. Drives the store-progress nudge toward defer-task."),
|
|
134755
|
+
learning: looseObject({
|
|
134756
|
+
status: string2().optional(),
|
|
134757
|
+
key: string2().optional(),
|
|
134758
|
+
memoryId: string2().optional(),
|
|
134759
|
+
workstream: string2().optional(),
|
|
134760
|
+
similarity: number2().optional(),
|
|
134761
|
+
error: string2().optional()
|
|
134762
|
+
}).optional().describe("Present when the call carried a learning: stored, replayed (same text already stored for this task), duplicate (an existing swarm memory at key/memoryId says the same; similarity is the raw cosine), or failed with error.")
|
|
134586
134763
|
});
|
|
134764
|
+
function learningSentence(result) {
|
|
134765
|
+
if (result.status === "stored")
|
|
134766
|
+
return `Learning stored at ${result.key}.`;
|
|
134767
|
+
if (result.status === "replayed")
|
|
134768
|
+
return `Learning already stored at ${result.key}; skipped.`;
|
|
134769
|
+
if (result.status === "duplicate") {
|
|
134770
|
+
return `Learning not stored: it matches ${result.key} (similarity ${result.similarity}).`;
|
|
134771
|
+
}
|
|
134772
|
+
return `Learning not stored: ${result.error}.`;
|
|
134773
|
+
}
|
|
134587
134774
|
var registerStoreProgressTool = (server) => {
|
|
134588
134775
|
createToolRegistrar(server)("store-progress", {
|
|
134589
134776
|
title: "Store task progress",
|
|
@@ -134597,6 +134784,14 @@ var registerStoreProgressTool = (server) => {
|
|
|
134597
134784
|
failureReason: string2().optional().describe("The reason for failure (used when failing)."),
|
|
134598
134785
|
attachments: array2(AttachmentInputSchema).max(20).optional().describe("Pointer-based artifacts produced by this step — agent-fs path, URL, shared-fs path, or swarm Page. No inline file data; upload to agent-fs first and attach by path. Agent-fs pointers are verified before task state changes, using the explicit org/drive pair or the registering agent's configured defaults. May be sent on any call (progress or completion) and accumulates across calls; duplicates are de-duped by sha256 (when present) or by (kind, pointer, name)."),
|
|
134599
134786
|
citations: array2(CitationInputSchema).max(MAX_TASK_CITATIONS).catch([]).optional().describe('Claim sources, upserted by index across calls. Use only for factual claims the reader cannot already see in the thread or task tree, 1-2 sources; none on delegation, routing, acks, or status replies. Reference each one in output with [citation:N], or set general: true for a source that backs the whole answer (it renders under "General sources"). ref per kind: task = task UUID; memory = memory UUID (optional quote must appear verbatim in it); github = owner/repo#N, owner/repo@<sha>, or a github.com pull, issues, or commit URL; slack = permalink or channel/ts; agent-fs = file path; page = page id; script-run = script run id; url = http(s) URL. The first completing call is refused, and the task stays in progress, if a marker has no entry, a citation fails validation, or a non-general citation is unreferenced; the response lists each problem. After one refusal, completion proceeds and those markers and sources are dropped from rendered output. At most 50 citations per call/task, refs up to 2048 characters, labels up to 200. Invalid or oversized batches are ignored; existing indices can still be updated at capacity.'),
|
|
134787
|
+
learning: union2([
|
|
134788
|
+
string2(),
|
|
134789
|
+
object2({
|
|
134790
|
+
text: string2(),
|
|
134791
|
+
workstream: string2().optional(),
|
|
134792
|
+
tags: array2(string2()).optional()
|
|
134793
|
+
})
|
|
134794
|
+
]).optional().describe(`A lesson to keep. Add one only when it would change how the next agent works: a gotcha, a dead end, a pattern that worked. Not a progress line. Stored as a swarm memory at /learnings/<workstream>/<slug>, tagged "learning" and tied to this task. The first line of text is the title. At most ~500 tokens and ${LEARNING_MAX_TAGS} kebab tags. workstream defaults to the task's repo name, else "general". Send it on or before the completing call: a call on a finished task stores nothing. A failed learning write is reported in the result and never blocks the progress update.`),
|
|
134600
134795
|
persistMemory: boolean().optional().describe("Opt in to task_completion memory persistence for automatic/recurring tasks. Manual tasks are persisted by default; scheduled, system, heartbeat/boot-triage, monitor, and digest tasks are skipped unless this is true."),
|
|
134601
134796
|
force: boolean().optional().describe("On an already-terminal task, overwrite explicitly provided output and/or failureReason text while preserving status and finishedAt and without replaying events, memory writes, follow-up creation, business-use ensure, or capacity updates. Differing terminal text is otherwise discarded and reported as a failure.")
|
|
134602
134797
|
}),
|
|
@@ -134609,6 +134804,7 @@ var registerStoreProgressTool = (server) => {
|
|
|
134609
134804
|
failureReason,
|
|
134610
134805
|
attachments,
|
|
134611
134806
|
citations,
|
|
134807
|
+
learning,
|
|
134612
134808
|
persistMemory,
|
|
134613
134809
|
force
|
|
134614
134810
|
}, requestInfo, _meta) => {
|
|
@@ -134702,6 +134898,7 @@ var registerStoreProgressTool = (server) => {
|
|
|
134702
134898
|
return toolErr(`${verificationError} No attachment was registered and task state was unchanged.`);
|
|
134703
134899
|
}
|
|
134704
134900
|
}
|
|
134901
|
+
let learningWrite;
|
|
134705
134902
|
const result = await getDbClient2().transaction(async () => {
|
|
134706
134903
|
const agent = await getAgentById2(requestInfo.agentId ?? "");
|
|
134707
134904
|
if (!agent) {
|
|
@@ -134768,6 +134965,21 @@ var registerStoreProgressTool = (server) => {
|
|
|
134768
134965
|
if (citations?.length && existingTask.agentId === agent.id) {
|
|
134769
134966
|
await upsertTaskCitations(taskId, citations);
|
|
134770
134967
|
}
|
|
134968
|
+
if (learning && isTerminal) {
|
|
134969
|
+
learningWrite = Promise.resolve({
|
|
134970
|
+
status: "failed",
|
|
134971
|
+
error: "the task is already finished; use memory-store"
|
|
134972
|
+
});
|
|
134973
|
+
} else if (learning) {
|
|
134974
|
+
learningWrite = new Promise((resolve) => {
|
|
134975
|
+
getDbClient2().afterCommit(() => storeTaskLearning({
|
|
134976
|
+
agentId: agent.id,
|
|
134977
|
+
isLead: agent.isLead === true,
|
|
134978
|
+
task: existingTask,
|
|
134979
|
+
learning
|
|
134980
|
+
}).then(resolve, (err) => resolve({ status: "failed", error: scrubSecrets(String(err)) })));
|
|
134981
|
+
});
|
|
134982
|
+
}
|
|
134771
134983
|
const terminalResultGuard = await guardTerminalTaskResultWrite(existingTask, {
|
|
134772
134984
|
status,
|
|
134773
134985
|
output,
|
|
@@ -134890,7 +135102,9 @@ This check refuses once per task; the next completion is accepted and unfixed ci
|
|
|
134890
135102
|
persistMemory
|
|
134891
135103
|
});
|
|
134892
135104
|
}
|
|
134893
|
-
const
|
|
135105
|
+
const learningResult = await learningWrite;
|
|
135106
|
+
const { success } = result;
|
|
135107
|
+
const message = learningResult ? `${result.message} ${learningSentence(learningResult)}` : result.message;
|
|
134894
135108
|
const task = result.task ? {
|
|
134895
135109
|
id: result.task.id,
|
|
134896
135110
|
status: result.task.status,
|
|
@@ -134901,7 +135115,8 @@ This check refuses once per task; the next completion is accepted and unfixed ci
|
|
|
134901
135115
|
...task ? { task } : {},
|
|
134902
135116
|
..."wasNoOp" in result && result.wasNoOp ? { wasNoOp: true } : {},
|
|
134903
135117
|
..."wasForcedOverwrite" in result && result.wasForcedOverwrite ? { wasForcedOverwrite: true } : {},
|
|
134904
|
-
..."blockedWaitingElapsedMs" in result && typeof result.blockedWaitingElapsedMs === "number" ? { blockedWaitingElapsedMs: result.blockedWaitingElapsedMs } : {}
|
|
135118
|
+
..."blockedWaitingElapsedMs" in result && typeof result.blockedWaitingElapsedMs === "number" ? { blockedWaitingElapsedMs: result.blockedWaitingElapsedMs } : {},
|
|
135119
|
+
...learningResult ? { learning: learningResult } : {}
|
|
134905
135120
|
};
|
|
134906
135121
|
const warnings = success && status === "completed" ? taskCitationWarnings(result.task?.output ?? output ?? "", await getTaskCitations(taskId)) : [];
|
|
134907
135122
|
return success ? toolOk(message, { data, details: warnings.length ? warnings.join(`
|
|
@@ -137095,6 +137310,82 @@ var registerRetryWorkflowRunTool = (server) => {
|
|
|
137095
137310
|
// src/tools/workflows/trigger-workflow.ts
|
|
137096
137311
|
init_zod();
|
|
137097
137312
|
init_db3();
|
|
137313
|
+
init_workflow_idempotency();
|
|
137314
|
+
|
|
137315
|
+
// src/http/idempotency-key.ts
|
|
137316
|
+
init_zod();
|
|
137317
|
+
init_workflow_idempotency();
|
|
137318
|
+
init_request_auth_context();
|
|
137319
|
+
var IDEMPOTENCY_KEY_PATTERN = /^[\x21-\x7E]{1,255}$/;
|
|
137320
|
+
var IDEMPOTENT_REPLAYED_HEADER = "Idempotent-Replayed";
|
|
137321
|
+
var idempotencyKeyHeader = (accepted) => object2({
|
|
137322
|
+
"Idempotency-Key": string2().regex(IDEMPOTENCY_KEY_PATTERN).optional().describe("Optional client-generated key, 1-255 visible ASCII characters (a UUID works). " + `The first request the server accepts under a key ${accepted}; a retry with the same key ` + "and an equivalent body gets that request's status and body back (with " + `\`${IDEMPOTENT_REPLAYED_HEADER}: true\`) and changes nothing. The key is scoped to the ` + "caller's identity and this operation; it is not a credential. The same key with a " + "different body is a 409. A request rejected before it is accepted (validation, auth, " + "not found, disabled) does not use up the key. Accepted keys do not expire.")
|
|
137323
|
+
});
|
|
137324
|
+
function idempotencyPrincipal(req, myAgentId) {
|
|
137325
|
+
const auth = getRequestAuth(req);
|
|
137326
|
+
switch (auth?.kind) {
|
|
137327
|
+
case "user":
|
|
137328
|
+
return `user:${auth.userId}`;
|
|
137329
|
+
case "agent":
|
|
137330
|
+
return `agent:${auth.agentId}`;
|
|
137331
|
+
case "controller":
|
|
137332
|
+
return `controller:${auth.controllerId}`;
|
|
137333
|
+
case "guest":
|
|
137334
|
+
return null;
|
|
137335
|
+
default:
|
|
137336
|
+
return myAgentId ? `agent:${myAgentId}` : "operator";
|
|
137337
|
+
}
|
|
137338
|
+
}
|
|
137339
|
+
function readIdempotencyKey(req, res, myAgentId) {
|
|
137340
|
+
const raw = req.headers["idempotency-key"];
|
|
137341
|
+
if (raw === undefined)
|
|
137342
|
+
return;
|
|
137343
|
+
const key = Array.isArray(raw) ? raw.join(", ") : raw;
|
|
137344
|
+
if (!IDEMPOTENCY_KEY_PATTERN.test(key)) {
|
|
137345
|
+
jsonError(res, "Idempotency-Key must be 1-255 visible ASCII characters", 400);
|
|
137346
|
+
return null;
|
|
137347
|
+
}
|
|
137348
|
+
const principal = idempotencyPrincipal(req, myAgentId);
|
|
137349
|
+
if (!principal) {
|
|
137350
|
+
jsonError(res, "Idempotency-Key needs an identified caller", 400);
|
|
137351
|
+
return null;
|
|
137352
|
+
}
|
|
137353
|
+
return { principal, key };
|
|
137354
|
+
}
|
|
137355
|
+
async function replayAcceptedOperation(res, claim, send) {
|
|
137356
|
+
const accepted = await findAcceptedWorkflowOperation(claim);
|
|
137357
|
+
if (!accepted)
|
|
137358
|
+
return false;
|
|
137359
|
+
if (accepted.fingerprint !== claim.fingerprint) {
|
|
137360
|
+
jsonError(res, "Idempotency-Key was already used for a different request", 409);
|
|
137361
|
+
} else if (accepted.resourceDeletedAt !== null) {
|
|
137362
|
+
jsonError(res, "The workflow this Idempotency-Key created or triggered was deleted; send a new key to start over", 410);
|
|
137363
|
+
} else {
|
|
137364
|
+
res.setHeader(IDEMPOTENT_REPLAYED_HEADER, "true");
|
|
137365
|
+
send(accepted.body);
|
|
137366
|
+
}
|
|
137367
|
+
return true;
|
|
137368
|
+
}
|
|
137369
|
+
|
|
137370
|
+
// src/tools/workflows/trigger-workflow.ts
|
|
137371
|
+
async function replayAcceptedTrigger(claim) {
|
|
137372
|
+
const accepted = await findAcceptedWorkflowOperation(claim);
|
|
137373
|
+
if (!accepted)
|
|
137374
|
+
return null;
|
|
137375
|
+
if (accepted.fingerprint !== claim.fingerprint) {
|
|
137376
|
+
return toolErr("idempotencyKey was already used to trigger this workflow with other data.", {
|
|
137377
|
+
data: { idempotencyConflict: true }
|
|
137378
|
+
});
|
|
137379
|
+
}
|
|
137380
|
+
if (accepted.resourceDeletedAt !== null) {
|
|
137381
|
+
return toolErr("The workflow this idempotencyKey triggered was deleted; send a new key to start over.");
|
|
137382
|
+
}
|
|
137383
|
+
const { runId, skipped } = accepted.body;
|
|
137384
|
+
return toolOk("Run already accepted under this idempotencyKey; nothing new was started.", {
|
|
137385
|
+
details: `Replayed the run accepted under this idempotencyKey — run ID: ${runId}.`,
|
|
137386
|
+
data: { runId, skipped, replayed: true }
|
|
137387
|
+
});
|
|
137388
|
+
}
|
|
137098
137389
|
var registerTriggerWorkflowTool = (server) => {
|
|
137099
137390
|
createToolRegistrar(server)("trigger-workflow", {
|
|
137100
137391
|
title: "Trigger Workflow",
|
|
@@ -137102,16 +137393,35 @@ var registerTriggerWorkflowTool = (server) => {
|
|
|
137102
137393
|
description: "Manually trigger a workflow execution, optionally passing trigger data as context. Respects cooldown configuration. " + "If the workflow has a triggerSchema, the payload is validated first; on failure, the response includes structured validationErrors plus the workflow's triggerSchema for self-correction.",
|
|
137103
137394
|
inputSchema: object2({
|
|
137104
137395
|
id: string2().uuid().describe("Workflow ID to trigger"),
|
|
137105
|
-
triggerData: record2(string2(), unknown()).optional().describe("Optional data to pass as trigger context to the workflow")
|
|
137396
|
+
triggerData: record2(string2(), unknown()).optional().describe("Optional data to pass as trigger context to the workflow"),
|
|
137397
|
+
wait: boolean().optional().describe("Default true: return after the run's instant steps ran, when it finishes or parks at its first async step. " + "false: return as soon as the run is created and walk it in the background. Use false from a script or step that only needs the runId."),
|
|
137398
|
+
idempotencyKey: string2().regex(IDEMPOTENCY_KEY_PATTERN).optional().describe("Optional, 1-255 visible ASCII characters, scoped to the calling agent and this workflow. " + "The first trigger accepted under a key starts one run; the key is recorded in the run's own transaction and never expires. " + "A retry with the same key and triggerData starts nothing and returns that run (replayed: true), even if the earlier call was killed before it saw the answer. " + "The same key with other triggerData is an error with idempotencyConflict: true.")
|
|
137106
137399
|
}),
|
|
137107
137400
|
outputSchema: swarmToolOutputSchema({
|
|
137108
137401
|
runId: string2().optional(),
|
|
137109
137402
|
skipped: boolean().optional(),
|
|
137403
|
+
replayed: boolean().optional(),
|
|
137404
|
+
idempotencyConflict: boolean().optional(),
|
|
137110
137405
|
validationErrors: array2(string2()).optional(),
|
|
137111
137406
|
triggerSchema: record2(string2(), unknown()).optional()
|
|
137112
137407
|
})
|
|
137113
|
-
}, async ({ id, triggerData }, requestInfo) => {
|
|
137408
|
+
}, async ({ id, triggerData, wait, idempotencyKey }, requestInfo) => {
|
|
137114
137409
|
try {
|
|
137410
|
+
if (idempotencyKey !== undefined && !requestInfo.agentId) {
|
|
137411
|
+
return toolErr("idempotencyKey needs an identified caller (X-Agent-ID).");
|
|
137412
|
+
}
|
|
137413
|
+
const claim = idempotencyKey === undefined ? undefined : {
|
|
137414
|
+
principal: `agent:${requestInfo.agentId}`,
|
|
137415
|
+
key: idempotencyKey,
|
|
137416
|
+
operation: "workflow.trigger",
|
|
137417
|
+
targetId: id,
|
|
137418
|
+
fingerprint: workflowRequestFingerprint("workflow.trigger", triggerData ?? {})
|
|
137419
|
+
};
|
|
137420
|
+
if (claim) {
|
|
137421
|
+
const replayed = await replayAcceptedTrigger(claim);
|
|
137422
|
+
if (replayed)
|
|
137423
|
+
return replayed;
|
|
137424
|
+
}
|
|
137115
137425
|
const workflow = await getWorkflow2(id);
|
|
137116
137426
|
if (!workflow) {
|
|
137117
137427
|
return toolErr(`Workflow not found: ${id}`);
|
|
@@ -137119,12 +137429,33 @@ var registerTriggerWorkflowTool = (server) => {
|
|
|
137119
137429
|
if (!workflow.enabled) {
|
|
137120
137430
|
return toolErr(`Workflow "${workflow.name}" is disabled.`);
|
|
137121
137431
|
}
|
|
137122
|
-
|
|
137123
|
-
|
|
137124
|
-
|
|
137125
|
-
|
|
137126
|
-
|
|
137127
|
-
|
|
137432
|
+
let accepted;
|
|
137433
|
+
let runId;
|
|
137434
|
+
try {
|
|
137435
|
+
runId = await startWorkflowExecution2(workflow, triggerData ?? {}, getExecutorRegistry2(), {
|
|
137436
|
+
triggerType: "manual",
|
|
137437
|
+
requestedByUserId: await resolveTaskAuditUserId(requestInfo.sourceTaskId, requestInfo.agentId) ?? undefined,
|
|
137438
|
+
detach: wait === false,
|
|
137439
|
+
accept: claim ? async (run) => {
|
|
137440
|
+
const response = { runId: run.runId, skipped: run.skipped };
|
|
137441
|
+
await recordAcceptedWorkflowOperation(claim, {
|
|
137442
|
+
workflowId: workflow.id,
|
|
137443
|
+
runId: run.runId,
|
|
137444
|
+
status: 201,
|
|
137445
|
+
body: response
|
|
137446
|
+
});
|
|
137447
|
+
accepted = response;
|
|
137448
|
+
} : undefined
|
|
137449
|
+
});
|
|
137450
|
+
} catch (err) {
|
|
137451
|
+
if (claim && err instanceof IdempotencyKeyTakenError) {
|
|
137452
|
+
const replayed = await replayAcceptedTrigger(claim);
|
|
137453
|
+
if (replayed)
|
|
137454
|
+
return replayed;
|
|
137455
|
+
}
|
|
137456
|
+
throw err;
|
|
137457
|
+
}
|
|
137458
|
+
const skipped = accepted ? accepted.skipped : (await getWorkflowRun2(runId))?.status === "skipped";
|
|
137128
137459
|
if (skipped) {
|
|
137129
137460
|
return toolOk(`Workflow "${workflow.name}" skipped (cooldown).`, {
|
|
137130
137461
|
details: `Workflow "${workflow.name}" skipped (cooldown active) — run ID: ${runId}.`,
|
|
@@ -137626,4 +137957,4 @@ async function createServer(opts = {}) {
|
|
|
137626
137957
|
return server;
|
|
137627
137958
|
}
|
|
137628
137959
|
|
|
137629
|
-
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, resolveIdentity, renderIdentity, createAdditiveBuffer, taskModelPin, resumedTaskModelSelection, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, transcribeAudioNotes, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, isRuntimePoolWakeable, isAgentReachable, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, recoverIncompleteRuns, handleWebhookTrigger, verifyHmacSignature, WebhookError, snapshotAndUpdateWorkflow, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry2, initWorkflows2, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, hasKvViewArgs, resolveKvView, toolErr, createToolRegistrar, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, getTelemetryIngestAnchor, initApiTelemetry, syncTelemetryEnabled, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, isChatSdkEnabled, getChatSdkConfig, errorMessage, resolveAdapterApiUrl, trackBackground, TelegramBotApiError, callTelegramBotApi, isTrustedTeamsServiceUrl, getSessionLabels, rememberSessionLabel, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, resolveHttpRequestAuth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, userCtx, requestPrincipal, agentFirstPrincipal, rejectGuest, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, getPageEditCounter, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, MemoryKeyError, refreshLinks, indexMemoryContent, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, inheritedModelSelection, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, workflowModelErrors, patchWorkflowDefinition, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
|
|
137960
|
+
export { DEFAULT_NEGOTIATED_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, isJSONRPCRequest, isJSONRPCResultResponse, isJSONRPCErrorResponse, JSONRPCMessageSchema, isInitializeRequest, McpServer, isGitHubEnabled, initGitHub, verifyWebhookSignature, isAgentMailEnabled, initAgentMail, verifyAgentMailWebhook, resolveIdentity, renderIdentity, createAdditiveBuffer, taskModelPin, resumedTaskModelSelection, listHarnessModelSupport, recordHarnessModelSupport, agentRanModel, getAgentHarnessCliVersion, setAgentHarnessCliVersion, sanitizeModelTierOverrides, parseModelTierOverridesHeader, setAgentModelTierOverrides, previewModelTiers, recordClaimModelResolution, harnessModelErrorFor, poolTaskRunsOnHarness, explicitModelError, explicitModelErrorForAgent, referencedBundlePaths, skillDirs, TaskCreationBlockedError, recordUnmappedIdentity, MAX_TASK_ATTACHMENT_BYTES, recordTaskAttachmentUpload, scopeFromAttachment, backingProviderId, transcribeAudioNotes, buildEffectiveText, bufferedFileFailures, fetchSlackFiles, createSlackTaskWithFiles, notifySlackFileFailures, isRuntimePoolWakeable, isAgentReachable, hasOtherUserMention, broadcastMatches, routeMessage, extractTaskFromMessage, extractSlackMessageText, recoverIncompleteRuns, handleWebhookTrigger, verifyHmacSignature, WebhookError, snapshotAndUpdateWorkflow, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, getExecutorRegistry2, initWorkflows2, dispatchScheduleTarget, calculateNextRun2, startScheduler2, stopScheduler2, runScheduleNow2, ExtensionAssetConflictError, ExtensionOwnershipError, getExtensionFiles, getExtensionById, getExtensionByName, listExtensions, listExtensionVersions, updateExtensionMeta, listExtensionRuns, SDK_ALLOWLIST, mcpToolNameForSdkMethod, mcpOverflowAuthError, hasKvViewArgs, resolveKvView, toolErr, createToolRegistrar, handleMcpBridge, Redacted, SCRIPT_SDK_RESPONSE_LIMIT_BYTES, readScriptSdkJsonResponse, ExtensionConfigError, ExtensionLifecycleError, setExtensionLoopbackBaseUrl, enableExtension, disableExtension, activateVersion, ExtensionAssetsInvalidError, installExtensionWithAssets, uninstallExtension, reloadExtension, loadEnabledExtensions, stopExtensionRuntime, ExtensionAbortedError2, isRegistered2, isExtensionAgentId2, getExtensionBridgeToken2, resolveBridgeCallOrigin2, extensionIdForAgent2, runContext2, registerLoaded2, unregister2, listRegistered2, dispatchPre2, dispatchPost2, stripSiblingBlock, createTaskWithSiblingAwareness, isInboxAllowed, isSenderAllowed, handleMessageReceived, isAzureDevOpsEnabled, initAzureDevOps, verifyAzureDevOpsWebhook, repointTrackerSyncBySwarmId, isAzureDevOpsUrl, canonicalAzureDevOpsRepoUrl, parseAzureDevOpsRepoUrl, createdPullRequestOf, commentedPayloadOf, handlePullRequestCreated, handlePullRequestCommented, handleWorkItemCreated, handleWorkItemUpdated, handleWorkItemCommented, handleWorkItemDeleted, handleWorkItemRestored, initAzureDevOpsOutbound, enqueueAuditRow, enqueueAdmissionRow, flushAuditBuffer, startAuditWriter, stopAuditWriter, startAuditGc, stopAuditGc, getTelemetryIngestAnchor, initApiTelemetry, syncTelemetryEnabled, isBitbucketEnabled, initBitbucket, verifyBitbucketWebhook, isDuplicateDelivery, markDeliveryProcessed, pullRequestEventOf, pullRequestCommentEventOf, handlePullRequestCreated2, handlePullRequestCommentCreated, handlePullRequestClosed, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, isChatSdkEnabled, getChatSdkConfig, errorMessage, resolveAdapterApiUrl, trackBackground, TelegramBotApiError, callTelegramBotApi, isTrustedTeamsServiceUrl, getSessionLabels, rememberSessionLabel, isChatSdkStopping, startChatSdk, getChatInstance, isChatAdapterConfigured, getChatSdkHealth, stopChatSdk, getJiraMetadata, updateJiraMetadata, clearJiraMetadata, registerJiraWebhook, deleteJiraWebhook, isJiraEnabled, initJira, handleJiraWebhook, handleAgentSessionEvent, handleIssueUpdate, handleIssueDelete, handleAgentSessionPrompted, isLinearEnabled, initLinear, isCookieSafePageId, extractPageSession, extractLegacyPageSession, extractAndVerifyCookie, pageSessionSetCookies, resolveHttpRequestAuth, getDeploymentEnvValue, loadGlobalConfigsIntoEnv, reloadGlobalConfigsAndIntegrations, scheduleIntegrationsReload, handleCore, MCP_MAX_TOOL_INPUT_ELEMENTS, MCP_MAX_REQUEST_BODY_BYTES, userCtx, requestPrincipal, agentFirstPrincipal, rejectGuest, handleApps, cancelApprovalRequest, cancelApprovalRequestAndRun, getUserCommsPrefs, getTaskDetailsInputSchema, getTaskDetailsOutputSchema, getTaskDetailsHandler, cancelTaskInputSchema, cancelTaskOutputSchema, cancelTaskHandler, executeReadOnlyQuery, assertSelectOnlyQuery, handleDbQuery, snapshotMetric, AssetKeyAuthorizationError, authorizeAssetKeyWrite, getPageEditCounter, snapshotPage, assertOAuthAppUrlsSafe, assertOAuthEgressUrlSafe, listOAuthPresets, listOAuthPresetIds, getOAuthPreset, hydrateOAuthAppFromPreset, scopedResourceScopeIdSchema, resolveScopedResourceId, MemoryKeyError, refreshLinks, indexMemoryContent, dedupeMemoryDocumentIds, recordMemoryAccesses, recordRetrievals, ExplicitSelfDuplicateError, applyRating, shouldPersistAutomaticTaskMemory, REBOOT_RETRY_PIN_TAG, getPinCandidateAgent, resolveLeadOnlyRecoveryAssignment, getResumeGeneration, getNextResumeGeneration, inheritedModelSelection, createWorkerTaskFollowUp, createResumeFollowUp, createRerouteDecisionTask, createPoolStarvationDecisionTask, guardTerminalTaskResultWrite, getTasksInputSchema, getTasksOutputSchema, getTasksHandler, reservedNamespaceError, privateNamespaceError, reservedRoomKeyError, updateMcpServerChecked, updateTouchesStdioExecution, canReadMemory, getLinksForMemory, expandCandidatesWithGraph, isApiDraining, drainApi, markKapsoMessageRead, sendKapsoReaction, getKapsoConfig, getKapsoNumberMapping, markKapsoMessageSeen, changesAllowMerge, updateSwarmRepoChecked, getCombConfig, resolveRoomNamespace, roomRequestInfo, authorizeRoomNamespace, sessionAccessTopic, sessionPresenceRoot, RoomOperationSchema, removeAwarenessStates, roomTopic, decodeRoomSnapshot, roomView, getRoom, changeRoom, applyRoomUpdate, resetRoom, sweepRooms, closeRooms, removeNamespaceRooms, MEMORY_KEYS_DEFAULT_PREFIX, MEMORY_KEYS_MAX_LIMIT, estimateTokens, posteriorMean, listMemoryKeys, checkChunkIntegrity, getMemoryChunks, getPosteriorsByIds, createEvent, createEventsBatch, getEventCountsFiltered, getEventsFiltered, mergeScheduleTiming, validateRecurringTiming, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, steerTaskUserInputSchema, steerTaskOutputSchema, steerTaskHandler, canClaim, emitBudgetRefusalSideEffects, workflowModelErrors, patchWorkflowDefinition, idempotencyKeyHeader, readIdempotencyKey, replayAcceptedOperation, resolveScriptsOnlyMode, ALL_CAPABILITIES, hasCapability, getEnabledCapabilities, createServer };
|