@desplega.ai/agent-swarm 2.13.4 → 2.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-adapter-tbt61zkm.js +17 -0
- package/dist/{acp-targets-zrk9k0n7.js → acp-targets-w8dbs4nr.js} +7 -7
- package/dist/{actions-acqqj9jn.js → actions-8zrcbjrx.js} +26 -26
- package/dist/{agent-fs-provision-zmaykqnd.js → agent-fs-provision-cbt2ttds.js} +4 -4
- package/dist/{amp-adapter-a7ts8tmw.js → amp-adapter-8x6zp8w4.js} +2 -2
- package/dist/{anthropic-messages-88b7s3n9.js → anthropic-messages-vdd1zmha.js} +10 -10
- package/dist/{app-tmwa442h.js → app-zfa9dwjw.js} +6 -6
- package/dist/{approval-notifications-6psaaaye.js → approval-notifications-rv92zmza.js} +7 -7
- package/dist/{assistant-564v6emv.js → assistant-q7s7rm1q.js} +24 -24
- package/dist/{boot-args-schema-n099e0f2.js → boot-args-schema-g27kpzr1.js} +1 -1
- package/dist/{boot-reembed-epvg4fp9.js → boot-reembed-1mjs52nt.js} +1 -1
- package/dist/{boot-reembed-chx66qfk.js → boot-reembed-m62dpdkg.js} +1 -1
- package/dist/{boot-scrub-sweep-dhkfp0a7.js → boot-scrub-sweep-ss1vcamw.js} +2 -2
- package/dist/{boot-seeds-m74fc07r.js → boot-seeds-hwnvgbb3.js} +4 -4
- package/dist/{boxd-451q55ys.js → boxd-y0szhp0g.js} +1 -1
- package/dist/{claude-adapter-hw63yj3j.js → claude-adapter-0rjmbhjk.js} +7 -7
- package/dist/{claude-managed-adapter-z5s7fx6p.js → claude-managed-adapter-6k032agg.js} +3 -3
- package/dist/{claude-managed-setup-wee1762m.js → claude-managed-setup-6czvve8q.js} +4 -4
- package/dist/{claude-sdk-session-cktyqkpk.js → claude-sdk-session-pr0znb81.js} +12667 -11881
- package/dist/{cli-0fgvnb0x.js → cli-0qt3epg4.js} +3 -3
- package/dist/{cli-ka48vpev.js → cli-19d6v8er.js} +3 -3
- package/dist/{cli-zexwhj3f.js → cli-1jq2em7b.js} +3 -3
- package/dist/{cli-5rgm8p39.js → cli-2wzkvfgm.js} +2 -2
- package/dist/{cli-x2cem5vy.js → cli-34fygf87.js} +2 -2
- package/dist/{cli-tsc3pdfd.js → cli-3860pmrq.js} +3 -3
- package/dist/{cli-hhtbandk.js → cli-3vw6dd4g.js} +2 -2
- package/dist/{cli-qzz6tz8s.js → cli-4gaf3tx5.js} +1 -1
- package/dist/{cli-9ah37a8a.js → cli-55h8m1x3.js} +8 -5
- package/dist/{cli-7gbff32z.js → cli-5n9w2xzx.js} +1 -1
- package/dist/{cli-p436yrzp.js → cli-5tq15aa7.js} +1 -1
- package/dist/{cli-jyhbvdga.js → cli-5web09sb.js} +2 -2
- package/dist/{cli-3zrwrnz7.js → cli-69zzpjgh.js} +1 -1
- package/dist/{cli-7g3fg4gf.js → cli-6msnpj1z.js} +6 -6
- package/dist/{cli-azj9t1f9.js → cli-7r9tvk8v.js} +41 -3
- package/dist/{cli-4fpa0zns.js → cli-7ypg8hka.js} +3 -3
- package/dist/{cli-8cas2xvp.js → cli-887vhew6.js} +2 -2
- package/dist/{cli-t0jmkcah.js → cli-8pd1t17c.js} +7 -7
- package/dist/{cli-h9d3sdnc.js → cli-94mxerrp.js} +1 -1
- package/dist/{cli-bv4vvnmg.js → cli-9n6g14vs.js} +2 -2
- package/dist/{cli-5ashycw3.js → cli-abby987g.js} +2 -2
- package/dist/{cli-kj84fqxz.js → cli-avax5mp9.js} +1 -1
- package/dist/{cli-ea7nz50q.js → cli-b42yfn17.js} +11 -11
- package/dist/{cli-ysv0k1we.js → cli-b9ygp1kz.js} +1 -1
- package/dist/{cli-3bxrrh53.js → cli-bvamr9g0.js} +2 -2
- package/dist/{cli-gse7bp3z.js → cli-ced4azn1.js} +10 -9
- package/dist/{cli-7by7vp6m.js → cli-cmbb2t8a.js} +2 -2
- package/dist/{cli-0p76my9q.js → cli-cp163xga.js} +10 -10
- package/dist/{cli-jzerrzgc.js → cli-ebpq3c5z.js} +8 -8
- package/dist/{cli-p3knvk62.js → cli-ehg90jd1.js} +113 -39
- package/dist/{cli-jg5txpm6.js → cli-emdfd8fh.js} +75 -1
- package/dist/{cli-d5pc8ep0.js → cli-evy3egte.js} +7 -7
- package/dist/{cli-60dwk8tx.js → cli-ewk3sg68.js} +2 -2
- package/dist/{cli-nc4pbwmp.js → cli-f7b9nyvk.js} +4 -4
- package/dist/{cli-29h5239w.js → cli-f9xw9pr4.js} +4 -4
- package/dist/{cli-3tzmh38q.js → cli-ffn0a515.js} +7 -7
- package/dist/{cli-dqgnbnxs.js → cli-grbngev5.js} +6 -1
- package/dist/{cli-cq4am6vg.js → cli-hd5bm1e1.js} +4 -4
- package/dist/{cli-akm6y2a8.js → cli-htb5bpz2.js} +1 -1
- package/dist/{cli-tr19nyn9.js → cli-j69pzrrz.js} +6 -6
- package/dist/{cli-hdhpdrka.js → cli-jdq3jmny.js} +3 -3
- package/dist/{cli-ja450998.js → cli-ks06cd0n.js} +1 -1
- package/dist/{cli-pz1dp12c.js → cli-kwj3131p.js} +1 -1
- package/dist/{cli-1vmhnncj.js → cli-m8f4379k.js} +3 -3
- package/dist/{cli-jbrc98qb.js → cli-n79j1vxc.js} +2 -2
- package/dist/{cli-b768ek79.js → cli-nrt048ys.js} +1 -0
- package/dist/{cli-93n305hm.js → cli-pedm2kht.js} +1 -1
- package/dist/{cli-eds5xnsz.js → cli-phmy14hb.js} +2 -2
- package/dist/{cli-n1kjs58m.js → cli-prz1p3ft.js} +3 -3
- package/dist/{cli-pz1nq5xm.js → cli-q1h041y8.js} +3 -3
- package/dist/{cli-cah298e5.js → cli-q41qar56.js} +104 -119
- package/dist/{cli-4pbwg7sn.js → cli-qmx8bnt4.js} +1 -1
- package/dist/{cli-944w9wb4.js → cli-qrvk9nka.js} +18 -13
- package/dist/{cli-gtj12v95.js → cli-r3dxpmyt.js} +1 -1
- package/dist/{cli-phdzn699.js → cli-ryem5cfq.js} +7 -7
- package/dist/{cli-49aq3cyn.js → cli-s8dhq7rj.js} +4 -4
- package/dist/{cli-fkpnx3vf.js → cli-sejvnjvw.js} +3 -2
- package/dist/{cli-m1sns1da.js → cli-srre41gb.js} +2 -2
- package/dist/{cli-5rxsb3wq.js → cli-t0n9svkb.js} +3 -3
- package/dist/{cli-tzw1jr2t.js → cli-t879ww0y.js} +2 -2
- package/dist/{cli-xwsm6xkr.js → cli-tgc1kgg3.js} +1 -1
- package/dist/{cli-404am6f3.js → cli-tt7dkwjj.js} +6 -6
- package/dist/{cli-zjdhrzm0.js → cli-tvyt8w6n.js} +2 -2
- package/dist/{cli-hyqksecw.js → cli-v09eza21.js} +9 -9
- package/dist/{cli-rv3y60bt.js → cli-vbge4rsp.js} +4 -4
- package/dist/{cli-bzcwwebm.js → cli-vcpyttcw.js} +1 -1
- package/dist/{cli-904wk98s.js → cli-wzecestt.js} +338 -98
- package/dist/{cli-gkv0r2hq.js → cli-x2adbg4j.js} +70 -8
- package/dist/{cli-4q2c8rxw.js → cli-z3x7h79n.js} +12 -6
- package/dist/{cli-s33bzmk0.js → cli-z40t85ms.js} +1 -1
- package/dist/{cli-rmgvwcmy.js → cli-zbbtp02a.js} +98 -21
- package/dist/{cli-3xqad83h.js → cli-zntvmqmm.js} +1 -1
- package/dist/{cli-zhwjdhjr.js → cli-zxa1vmx7.js} +1 -1
- package/dist/{cli-50wa8k4h.js → cli-zy9bb22b.js} +1 -2
- package/dist/{cli-ts5yv7dn.js → cli-zzq96q57.js} +123 -33
- package/dist/cli.js +18 -18
- package/dist/{codex-adapter-2fs2c0n6.js → codex-adapter-bn7eaxk5.js} +6 -6
- package/dist/{codex-hook-jxjv6dy5.js → codex-hook-nnmezjg9.js} +2 -2
- package/dist/{codex-session-runner-r55tmx4c.js → codex-session-runner-j1e9hffc.js} +6 -6
- package/dist/{commands-0mxdy9x8.js → commands-amhpafrr.js} +3 -3
- package/dist/{controller-g3vkfhr4.js → controller-tw7g10j2.js} +3 -3
- package/dist/{controllers-connect-4wdmncqt.js → controllers-connect-2ssqz7f4.js} +23 -23
- package/dist/{core-gsvj5f3z.js → core-bwp98v4w.js} +21 -21
- package/dist/{cursor-adapter-t9qb96q2.js → cursor-adapter-d6knjmwa.js} +1 -1
- package/dist/{db-487vvyv9.js → db-fd6xxm77.js} +3 -3
- package/dist/{db-76p7w3gr.js → db-sc59379z.js} +2 -2
- package/dist/{dispatcher-64rp6w67.js → dispatcher-a2gdqz8c.js} +21 -21
- package/dist/{dsh-adapter-8abzqk5c.js → dsh-adapter-43ygwqn7.js} +1 -1
- package/dist/{e2b-dc8f6ctq.js → e2b-cn7cvjqy.js} +1 -1
- package/dist/{e2b-3ykbe805.js → e2b-qnxyfea6.js} +1 -1
- package/dist/{easter-egg-3d-jrrwyf55.js → easter-egg-3d-a0pphy71.js} +1 -1
- package/dist/{embedding-space-001hhhpk.js → embedding-space-qepzrach.js} +6 -6
- package/dist/{embeddings-esj19cnw.js → embeddings-d7vr881x.js} +1 -1
- package/dist/{execute-301hkxqg.js → execute-6afts2bn.js} +1 -1
- package/dist/{external-channel-w10e2j05.js → external-channel-881zq1x4.js} +2 -2
- package/dist/fx-adapter-cr2hq17y.js +20 -0
- package/dist/{grok-adapter-3a0ezfee.js → grok-adapter-ayddnbsc.js} +9 -9
- package/dist/handlers-7ghs84x2.js +41 -0
- package/dist/{heartbeat-tbrj7vhq.js → heartbeat-4c022m6a.js} +24 -24
- package/dist/{hook-3am1sq68.js → hook-4k84x499.js} +5 -5
- package/dist/{hook-tx917rqw.js → hook-a7eh6zty.js} +7 -7
- package/dist/{http-3rmemtqy.js → http-6aw5wanc.js} +180 -94
- package/dist/index-dtt0d634.js +44 -0
- package/dist/index-hmszyqkk.js +42 -0
- package/dist/index-j6rm1rtn.js +39 -0
- package/dist/{index-aetfyx6p.js → index-rwwhsmjg.js} +1 -1
- package/dist/{index-s7xtvc0f.js → index-xhad0n8m.js} +1 -1
- package/dist/{index-2jw11t8s.js → index-yq9hhhhy.js} +25 -25
- package/dist/{index-gfnq66t1.js → index-z2g9469g.js} +202 -17
- package/dist/{keepalive-9px3t7qj.js → keepalive-zhbmztqw.js} +4 -4
- package/dist/lead-g2j4q39z.js +83 -0
- package/dist/{maintenance-vwqjwst6.js → maintenance-rsp0591h.js} +1 -1
- package/dist/{node-2wfcey7d.js → node-0as4n1ef.js} +3 -3
- package/dist/{node-zd6shky9.js → node-dhxbt01p.js} +3 -3
- package/dist/{node-z67yjre7.js → node-rxte5hc6.js} +290 -70
- package/dist/{node-hjn5n1yp.js → node-t0ct2zpw.js} +3 -5
- package/dist/{oauth-refresh-sweep-yqry3wn4.js → oauth-refresh-sweep-w3cqmxq7.js} +3 -3
- package/dist/{object-webhooks-8s1wtths.js → object-webhooks-331hay92.js} +7 -7
- package/dist/{onboard-hb8czx0p.js → onboard-n2w80m2n.js} +3 -3
- package/dist/{opencode-adapter-djd6m6dk.js → opencode-adapter-z98127cz.js} +6 -6
- package/dist/{otel-impl-2ymwyczz.js → otel-impl-xsk35tvf.js} +1 -1
- package/dist/{pending-nxavtvx7.js → pending-2e6trkxd.js} +22 -22
- package/dist/{pi-mono-adapter-d2cpmcy4.js → pi-mono-adapter-wh6yndtm.js} +8 -8
- package/dist/{pricing-refresh-1yz8jkqv.js → pricing-refresh-9355dj1t.js} +2 -2
- package/dist/{rbac-roles-dbpx0x9v.js → rbac-roles-58y3m912.js} +3 -3
- package/dist/{rbac-roles-7s6m31xw.js → rbac-roles-8eajw4s6.js} +2 -2
- package/dist/{render-v2-7y20rjrn.js → render-v2-7gskkmd4.js} +6 -6
- package/dist/{resume-wz546x47.js → resume-0drnmpja.js} +9 -9
- package/dist/{runtime-cb5bd9tz.js → runtime-d2tcmqte.js} +1 -1
- package/dist/{session-access-4vcft8kq.js → session-access-0ztys6bd.js} +5 -5
- package/dist/{session-source-backfill-57b50tpw.js → session-source-backfill-cdm5s046.js} +2 -2
- package/dist/{setup-e1tevjyj.js → setup-pqwb9tcc.js} +1 -1
- package/dist/thread-buffer-epx3san4.js +42 -0
- package/dist/{tree-visibility-07wf1nct.js → tree-visibility-rwz67mje.js} +2 -2
- package/dist/{user-merge-jobs-n20qpv6s.js → user-merge-jobs-mxrhamwt.js} +3 -3
- package/dist/{virtual-modules-6fxmn1yv.js → virtual-modules-71y1gsmg.js} +3 -3
- package/dist/{work-objects-eg7y48pe.js → work-objects-3k4ykt9j.js} +24 -24
- package/dist/worker-09gqn9xy.js +83 -0
- package/dist/{worker-follow-up-jnvnnf2b.js → worker-follow-up-y0h64xpr.js} +21 -21
- package/openapi.json +387 -6
- package/package.json +4 -4
- package/src/apps/sync.ts +20 -5
- package/src/azure-devops/boards-sync.ts +1 -1
- package/src/be/db/slack-trees.ts +12 -1
- package/src/be/db/tasks/read.ts +25 -1
- package/src/be/db/tasks/write.ts +47 -12
- package/src/be/db/users/avatar.ts +12 -0
- package/src/be/db.ts +78 -5
- package/src/be/migrations/344_user_avatar.sql +4 -0
- package/src/be/migrations/345_task_status_kind.sql +6 -0
- package/src/be/primitives/object-embed.ts +2 -2
- package/src/be/primitives/objects.ts +2 -2
- package/src/be/runtime-pools/supervisor.ts +1 -0
- package/src/be/scripts/typecheck.ts +1 -1
- package/src/be/swarm-config-guard.ts +4 -0
- package/src/bitbucket/handlers.ts +1 -1
- package/src/commands/credential-outcome-report.ts +96 -0
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/runner.ts +49 -3
- package/src/event-waits/github.ts +39 -6
- package/src/event-waits/index.ts +4 -2
- package/src/event-waits/types.ts +10 -3
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/github/app.ts +177 -13
- package/src/github/handlers.ts +7 -2
- package/src/github/pull-request-state.ts +100 -11
- package/src/gitlab/handlers.ts +2 -2
- package/src/heartbeat/heartbeat.ts +6 -1
- package/src/http/api-keys.ts +26 -0
- package/src/http/asset-key-write.ts +45 -0
- package/src/http/assets.ts +4 -3
- package/src/http/github-token.ts +27 -6
- package/src/http/pages.ts +4 -10
- package/src/http/schedules.ts +6 -6
- package/src/http/sessions.ts +7 -2
- package/src/http/tasks.ts +23 -5
- package/src/http/users.ts +5 -0
- package/src/http/webhooks.ts +19 -1
- package/src/http/workflows.ts +5 -10
- package/src/integrations/chat-sdk/commands.ts +3 -1
- package/src/jira/sync.ts +1 -1
- package/src/linear/sync.ts +5 -3
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +2 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +5 -0
- package/src/providers/claude-sdk-session.ts +5 -0
- package/src/providers/runtime-dependencies.ts +1 -1
- package/src/scheduler/deferred-task-waits.ts +74 -13
- package/src/scripts-runtime/swarm-sdk.ts +8 -1
- package/src/scripts-runtime/types/stdlib.d.ts +8 -1
- package/src/scripts-runtime/types/swarm-extension.d.ts +19 -2
- package/src/scripts-runtime/types/swarm-sdk.d.ts +8 -1
- package/src/slack/actions.ts +1 -1
- package/src/slack/render-v2.ts +148 -7
- package/src/tests/api-drain-worker-e2e.test.ts +0 -2
- package/src/tests/approval-auto-cancellation-migration.test.ts +8 -19
- package/src/tests/approval-card-resolution.test.ts +2 -17
- package/src/tests/approval-requests-notifications.test.ts +41 -27
- package/src/tests/approval-requests.test.ts +137 -369
- package/src/tests/apps-sync-engine.test.ts +5 -3
- package/src/tests/apps-table-filters-migration.test.ts +44 -25
- package/src/tests/bitbucket-handlers.test.ts +2 -0
- package/src/tests/chat-sdk-commands.test.ts +1 -0
- package/src/tests/claude-adapter.test.ts +35 -0
- package/src/tests/codex-adapter.test.ts +3 -92
- package/src/tests/codex-gpt6-release.test.ts +0 -9
- package/src/tests/codex-oauth-credential-info.test.ts +35 -18
- package/src/tests/codex-oauth.test.ts +0 -6
- package/src/tests/codex-pool.test.ts +5 -214
- package/src/tests/codex-rate-limit-parse.test.ts +0 -7
- package/src/tests/codex-swarm-events.test.ts +11 -54
- package/src/tests/db-client-busy-retry.test.ts +49 -16
- package/src/tests/defer-task.test.ts +1 -0
- package/src/tests/e2e-shards.test.ts +9 -9
- package/src/tests/enabled-tools.test.ts +0 -2
- package/src/tests/fixtures/base-prompt-baseline.json +6 -6
- package/src/tests/github-app-worker-auth-helper.test.ts +147 -1
- package/src/tests/gitlab-handlers.test.ts +2 -0
- package/src/tests/heartbeat-jev-gate.test.ts +9 -241
- package/src/tests/heartbeat-reroute-decision.test.ts +2 -0
- package/src/tests/heartbeat-supersede-resume.test.ts +2 -0
- package/src/tests/heartbeat.test.ts +1 -0
- package/src/tests/key-usage-selection.test.ts +302 -0
- package/src/tests/memory-e2e.test.ts +34 -103
- package/src/tests/memory-key-paths.test.ts +5 -0
- package/src/tests/memory-rater-llm.test.ts +33 -149
- package/src/tests/memory-store.test.ts +24 -125
- package/src/tests/memory.test.ts +31 -100
- package/src/tests/merge-gate-detect-changes.test.ts +108 -2
- package/src/tests/otel-service-name.test.ts +0 -9
- package/src/tests/otel-session-cost-metrics.test.ts +1 -38
- package/src/tests/pool-session-logs.test.ts +8 -42
- package/src/tests/pre-push-affected-tests.test.ts +106 -0
- package/src/tests/prompt-template-session.test.ts +3 -0
- package/src/tests/runner-api-drain.test.ts +2 -17
- package/src/tests/runner-terminal-window-report.test.ts +132 -0
- package/src/tests/runtime-supervisor-failures.test.ts +1 -0
- package/src/tests/sandboxed-process.test.ts +26 -21
- package/src/tests/schedule-http-triage-tools.test.ts +12 -9
- package/src/tests/scheduled-tasks.test.ts +14 -51
- package/src/tests/script-executor-conformance.test.ts +4 -48
- package/src/tests/script-executor-quickjs-pool.test.ts +9 -7
- package/src/tests/script-native-startup.test.ts +21 -25
- package/src/tests/secret-rules.test.ts +4 -2
- package/src/tests/session-logs.test.ts +1 -260
- package/src/tests/slack-render-v2.test.ts +5 -148
- package/src/tests/task-cascade-fail.test.ts +1 -0
- package/src/tests/task-supersede-resume.test.ts +1 -0
- package/src/tests/test-proc.ts +5 -2
- package/src/tests/window-stream-reporter.test.ts +122 -0
- package/src/tests/workflow-agent-task-retry.test.ts +1 -3
- package/src/tests/workflow-cascade-cancel.test.ts +1 -0
- package/src/tests/workflow-retry-v2.test.ts +34 -43
- package/src/tests/workflow-retry-validation.test.ts +8 -48
- package/src/tests/worktree-reaper.test.ts +2 -2
- package/src/tools/cancel-task.ts +2 -2
- package/src/tools/defer-task.ts +7 -2
- package/src/tools/get-task-details.ts +8 -4
- package/src/tools/get-tasks.ts +13 -2
- package/src/tools/manage-user.ts +9 -0
- package/src/tools/store-progress.ts +5 -3
- package/src/types.ts +93 -0
- package/src/utils/constants.ts +12 -0
- package/src/utils/credentials.ts +42 -5
- package/src/utils/error-tracker.ts +6 -0
- package/src/utils/key-usage.ts +114 -0
- package/src/utils/sandboxed-process.ts +1 -0
- package/src/workflows/resume.ts +5 -2
- package/templates/skills/apps/SKILL.md +2 -0
- package/templates/skills/apps/content.md +2 -0
- package/templates/skills/boards-and-sheets/content.md +4 -2
- package/templates/skills/pages/content.md +7 -0
- package/templates/skills/swarm-docs/content.md +1 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/dist/acp-adapter-mr4temec.js +0 -17
- package/dist/fx-adapter-4sjrbdne.js +0 -20
- package/dist/handlers-ef3k11hb.js +0 -41
- package/dist/index-e6bq0exk.js +0 -42
- package/dist/index-hf2k1vge.js +0 -39
- package/dist/index-taxmejj3.js +0 -44
- package/dist/lead-5vt6f174.js +0 -83
- package/dist/thread-buffer-686pa1p1.js +0 -42
- package/dist/worker-4vp616ms.js +0 -83
- package/src/tests/apps-table-selection-migration.test.ts +0 -95
- package/src/tests/extensions-example-heartbeat-remediate.test.ts +0 -69
- package/src/tests/extensions-example-rewrite-and-suppress.test.ts +0 -70
|
@@ -407,23 +407,23 @@ import {
|
|
|
407
407
|
recordInlineScriptRun2,
|
|
408
408
|
exports_db,
|
|
409
409
|
init_db4
|
|
410
|
-
} from "./cli-
|
|
410
|
+
} from "./cli-zzq96q57.js";
|
|
411
411
|
import {
|
|
412
412
|
assertMayActOnOperatorGrantedTarget2,
|
|
413
413
|
getUserGrant2,
|
|
414
414
|
init_rbac_roles
|
|
415
|
-
} from "./cli-
|
|
415
|
+
} from "./cli-34fygf87.js";
|
|
416
416
|
import {
|
|
417
417
|
ensurePricingSeeded2,
|
|
418
418
|
ensureRbacSeeded2,
|
|
419
419
|
ensureModelProfilesSeeded2,
|
|
420
420
|
init_boot_seeds
|
|
421
|
-
} from "./cli-
|
|
421
|
+
} from "./cli-7ypg8hka.js";
|
|
422
422
|
import {
|
|
423
423
|
requestModelCatalogRefresh2,
|
|
424
424
|
startPricingRefreshLoop2,
|
|
425
425
|
init_pricing_refresh
|
|
426
|
-
} from "./cli-
|
|
426
|
+
} from "./cli-pedm2kht.js";
|
|
427
427
|
import {
|
|
428
428
|
workflowEventBus2,
|
|
429
429
|
init_event_bus
|
|
@@ -436,7 +436,7 @@ import {
|
|
|
436
436
|
externalChannelToolError2,
|
|
437
437
|
getChannelBlockReason2,
|
|
438
438
|
init_external_channel
|
|
439
|
-
} from "./cli-
|
|
439
|
+
} from "./cli-5n9w2xzx.js";
|
|
440
440
|
import {
|
|
441
441
|
tableToAscii2,
|
|
442
442
|
init_dist8
|
|
@@ -499,7 +499,7 @@ import {
|
|
|
499
499
|
startSlackApp2,
|
|
500
500
|
stopSlackAppUnderLifecycleLock2,
|
|
501
501
|
init_app4
|
|
502
|
-
} from "./cli-
|
|
502
|
+
} from "./cli-zbbtp02a.js";
|
|
503
503
|
import {
|
|
504
504
|
AGENT_MAX_TASKS_CONFIG_KEY,
|
|
505
505
|
resetAgentMaxTasksMirror,
|
|
@@ -520,7 +520,7 @@ import {
|
|
|
520
520
|
postApprovalCancellationUpdates2,
|
|
521
521
|
createApprovalFollowUpTask2,
|
|
522
522
|
init_approval_notifications
|
|
523
|
-
} from "./cli-
|
|
523
|
+
} from "./cli-evy3egte.js";
|
|
524
524
|
import {
|
|
525
525
|
shapeApprovalResolution,
|
|
526
526
|
init_approval_resolution,
|
|
@@ -544,7 +544,7 @@ import {
|
|
|
544
544
|
resumeFromChildRun2,
|
|
545
545
|
initWaitBusSubscriptions2,
|
|
546
546
|
init_resume
|
|
547
|
-
} from "./cli-
|
|
547
|
+
} from "./cli-55h8m1x3.js";
|
|
548
548
|
import {
|
|
549
549
|
getFileStorageProvider2,
|
|
550
550
|
init_registry2
|
|
@@ -552,7 +552,7 @@ import {
|
|
|
552
552
|
import {
|
|
553
553
|
getRuntimePool2,
|
|
554
554
|
init_db2
|
|
555
|
-
} from "./cli-
|
|
555
|
+
} from "./cli-f9xw9pr4.js";
|
|
556
556
|
import {
|
|
557
557
|
duplicateGuardedQueryKey,
|
|
558
558
|
parseQueryParams,
|
|
@@ -585,7 +585,7 @@ import {
|
|
|
585
585
|
findRoute,
|
|
586
586
|
route,
|
|
587
587
|
init_route_def
|
|
588
|
-
} from "./cli-
|
|
588
|
+
} from "./cli-tt7dkwjj.js";
|
|
589
589
|
import {
|
|
590
590
|
COMPOSIO_HTTP_METHODS,
|
|
591
591
|
executeComposioRequest,
|
|
@@ -687,7 +687,7 @@ import {
|
|
|
687
687
|
init_typecheck,
|
|
688
688
|
parseSkillContent,
|
|
689
689
|
init_skill_parser
|
|
690
|
-
} from "./cli-
|
|
690
|
+
} from "./cli-ced4azn1.js";
|
|
691
691
|
import {
|
|
692
692
|
detachedProcessGroup,
|
|
693
693
|
registerProcessGroup,
|
|
@@ -702,7 +702,7 @@ import {
|
|
|
702
702
|
ensureToken,
|
|
703
703
|
ensureTokenOrThrow,
|
|
704
704
|
init_ensure_token
|
|
705
|
-
} from "./cli-
|
|
705
|
+
} from "./cli-5web09sb.js";
|
|
706
706
|
import {
|
|
707
707
|
A1Error,
|
|
708
708
|
colName,
|
|
@@ -737,11 +737,11 @@ import {
|
|
|
737
737
|
listObjects,
|
|
738
738
|
reindexObjects,
|
|
739
739
|
init_objects
|
|
740
|
-
} from "./cli-
|
|
740
|
+
} from "./cli-j69pzrrz.js";
|
|
741
741
|
import {
|
|
742
742
|
agentFsClientFor,
|
|
743
743
|
init_agent_fs_identity
|
|
744
|
-
} from "./cli-
|
|
744
|
+
} from "./cli-zxa1vmx7.js";
|
|
745
745
|
import {
|
|
746
746
|
FilesError,
|
|
747
747
|
providerPath,
|
|
@@ -755,7 +755,7 @@ import {
|
|
|
755
755
|
isSlackLeaveThreadDisabled,
|
|
756
756
|
leaveSlackThread,
|
|
757
757
|
init_left_threads
|
|
758
|
-
} from "./cli-
|
|
758
|
+
} from "./cli-r3dxpmyt.js";
|
|
759
759
|
import {
|
|
760
760
|
require_fast_deep_equal
|
|
761
761
|
} from "./cli-bhp11egn.js";
|
|
@@ -840,7 +840,7 @@ import {
|
|
|
840
840
|
validateDefinition,
|
|
841
841
|
applyDefinitionPatch,
|
|
842
842
|
init_definition2
|
|
843
|
-
} from "./cli-
|
|
843
|
+
} from "./cli-cp163xga.js";
|
|
844
844
|
import {
|
|
845
845
|
isMultiRuntimeEnabled,
|
|
846
846
|
init_multi_runtime2
|
|
@@ -863,16 +863,16 @@ import {
|
|
|
863
863
|
import {
|
|
864
864
|
canProvisionKind,
|
|
865
865
|
init_runtime_providers
|
|
866
|
-
} from "./cli-
|
|
866
|
+
} from "./cli-n79j1vxc.js";
|
|
867
867
|
import {
|
|
868
868
|
getSessionRoot,
|
|
869
869
|
sessionAccessForRoot,
|
|
870
870
|
init_session_shares
|
|
871
|
-
} from "./cli-
|
|
871
|
+
} from "./cli-kwj3131p.js";
|
|
872
872
|
import {
|
|
873
873
|
publicEndpointSsrfOptions,
|
|
874
874
|
init_mcp_wrapper
|
|
875
|
-
} from "./cli-
|
|
875
|
+
} from "./cli-b9ygp1kz.js";
|
|
876
876
|
import {
|
|
877
877
|
findUserById,
|
|
878
878
|
findUserByExternalId,
|
|
@@ -887,13 +887,13 @@ import {
|
|
|
887
887
|
resolveSessionToken,
|
|
888
888
|
fingerprintApiKey,
|
|
889
889
|
init_users
|
|
890
|
-
} from "./cli-
|
|
890
|
+
} from "./cli-avax5mp9.js";
|
|
891
891
|
import {
|
|
892
892
|
AMP_ESTIMATE_MODELS,
|
|
893
893
|
ampBillsCacheWrites,
|
|
894
894
|
resolveAmpModel,
|
|
895
895
|
init_amp_models
|
|
896
|
-
} from "./cli-
|
|
896
|
+
} from "./cli-htb5bpz2.js";
|
|
897
897
|
import {
|
|
898
898
|
resolveGitHubHost,
|
|
899
899
|
getGitHubLinkConfig,
|
|
@@ -911,7 +911,7 @@ import {
|
|
|
911
911
|
init_task_attachment_links,
|
|
912
912
|
contentSha256,
|
|
913
913
|
init_profile_sync
|
|
914
|
-
} from "./cli-
|
|
914
|
+
} from "./cli-19d6v8er.js";
|
|
915
915
|
import {
|
|
916
916
|
getSlackConfiguration,
|
|
917
917
|
isSlackConfigured,
|
|
@@ -929,7 +929,7 @@ import {
|
|
|
929
929
|
splitCredentialPool,
|
|
930
930
|
selectCredential,
|
|
931
931
|
init_credentials2
|
|
932
|
-
} from "./cli-
|
|
932
|
+
} from "./cli-x2adbg4j.js";
|
|
933
933
|
import {
|
|
934
934
|
findInterpolationTokens,
|
|
935
935
|
interpolate,
|
|
@@ -939,7 +939,7 @@ import {
|
|
|
939
939
|
init_registry3,
|
|
940
940
|
resolveTemplate,
|
|
941
941
|
init_resolver
|
|
942
|
-
} from "./cli-
|
|
942
|
+
} from "./cli-nrt048ys.js";
|
|
943
943
|
import {
|
|
944
944
|
normalizeAssetKey,
|
|
945
945
|
defaultAssetKey,
|
|
@@ -968,6 +968,7 @@ import {
|
|
|
968
968
|
splitLegacyModelAlias,
|
|
969
969
|
AgentTaskStatusSchema,
|
|
970
970
|
isTerminalTaskStatus,
|
|
971
|
+
TaskStatusKindSchema,
|
|
971
972
|
RoutingReasonSchema,
|
|
972
973
|
ProviderNameSchema,
|
|
973
974
|
SteerModeSchema,
|
|
@@ -978,6 +979,7 @@ import {
|
|
|
978
979
|
AttachmentInputSchema,
|
|
979
980
|
AgentStatusSchema,
|
|
980
981
|
AgentAvatarSchema,
|
|
982
|
+
UserAvatarSchema,
|
|
981
983
|
AppIconSchema,
|
|
982
984
|
AgentSlackIconSchema,
|
|
983
985
|
ChannelTypeSchema,
|
|
@@ -1016,7 +1018,7 @@ import {
|
|
|
1016
1018
|
KvNamespaceSchema,
|
|
1017
1019
|
KvKeySchema,
|
|
1018
1020
|
init_types5
|
|
1019
|
-
} from "./cli-
|
|
1021
|
+
} from "./cli-7r9tvk8v.js";
|
|
1020
1022
|
import {
|
|
1021
1023
|
init_zod
|
|
1022
1024
|
} from "./cli-96234j5w.js";
|
|
@@ -1061,7 +1063,7 @@ import {
|
|
|
1061
1063
|
getCombState,
|
|
1062
1064
|
isAgentFsProxyEnabled,
|
|
1063
1065
|
init_constants3
|
|
1064
|
-
} from "./cli-
|
|
1066
|
+
} from "./cli-grbngev5.js";
|
|
1065
1067
|
import {
|
|
1066
1068
|
parseEnvFlag,
|
|
1067
1069
|
isEnvFlagEnabled,
|
|
@@ -1070,7 +1072,7 @@ import {
|
|
|
1070
1072
|
import {
|
|
1071
1073
|
init_package,
|
|
1072
1074
|
package_default
|
|
1073
|
-
} from "./cli-
|
|
1075
|
+
} from "./cli-hd5bm1e1.js";
|
|
1074
1076
|
import {
|
|
1075
1077
|
getNodeEnv,
|
|
1076
1078
|
isDevOrTestNodeEnv,
|
|
@@ -12260,6 +12262,7 @@ function resetGitHub() {
|
|
|
12260
12262
|
appId = null;
|
|
12261
12263
|
privateKey = null;
|
|
12262
12264
|
tokenCache.clear();
|
|
12265
|
+
installationCache.clear();
|
|
12263
12266
|
}
|
|
12264
12267
|
function initGitHub() {
|
|
12265
12268
|
if (initialized) {
|
|
@@ -12396,27 +12399,130 @@ async function mintInstallationToken(installationId, creds, minValidityMs) {
|
|
|
12396
12399
|
return null;
|
|
12397
12400
|
}
|
|
12398
12401
|
}
|
|
12399
|
-
|
|
12402
|
+
function normalizeRepo(repo) {
|
|
12403
|
+
const trimmed = repo.trim().replace(/\/+$/, "");
|
|
12404
|
+
const lastTwo = trimmed.replace(/\.git$/i, "").match(/([^/:]+\/[^/:]+)$/);
|
|
12405
|
+
if (!lastTwo)
|
|
12406
|
+
return trimmed.toLowerCase();
|
|
12407
|
+
const [owner, name] = lastTwo[1].split("/");
|
|
12408
|
+
if (owner === "." || owner === ".." || name === "." || name === "..")
|
|
12409
|
+
return "";
|
|
12410
|
+
return lastTwo[1].toLowerCase();
|
|
12411
|
+
}
|
|
12412
|
+
function allowedRepoOwners() {
|
|
12413
|
+
return new Set((process.env.GITHUB_APP_REPO_OWNERS ?? "").split(",").map((owner) => owner.trim().toLowerCase()).filter(Boolean));
|
|
12414
|
+
}
|
|
12415
|
+
function registeredSlugOnHost(url, host) {
|
|
12416
|
+
const trimmed = url.trim().replace(/\/+$/, "").replace(/\.git$/i, "");
|
|
12417
|
+
let urlHost = null;
|
|
12418
|
+
let path;
|
|
12419
|
+
const scp = trimmed.match(/^[^@/:]+@([^:/]+):(.+)$/);
|
|
12420
|
+
if (scp) {
|
|
12421
|
+
urlHost = scp[1].toLowerCase();
|
|
12422
|
+
path = scp[2];
|
|
12423
|
+
} else if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) {
|
|
12424
|
+
try {
|
|
12425
|
+
const parsed = new URL(trimmed);
|
|
12426
|
+
urlHost = parsed.host.toLowerCase();
|
|
12427
|
+
path = parsed.pathname;
|
|
12428
|
+
} catch {
|
|
12429
|
+
return null;
|
|
12430
|
+
}
|
|
12431
|
+
} else {
|
|
12432
|
+
path = trimmed;
|
|
12433
|
+
}
|
|
12434
|
+
if (urlHost !== null && urlHost !== host && !(host === "github.com" && urlHost === "www.github.com")) {
|
|
12435
|
+
return null;
|
|
12436
|
+
}
|
|
12437
|
+
const segments = path.replace(/^\/+/, "").split("/");
|
|
12438
|
+
if (segments.length !== 2)
|
|
12439
|
+
return null;
|
|
12440
|
+
const slug = normalizeRepo(segments.join("/"));
|
|
12441
|
+
return slug || null;
|
|
12442
|
+
}
|
|
12443
|
+
async function resolveInstallationId(repo, creds, owners) {
|
|
12444
|
+
const cached = installationCache.get(repo);
|
|
12445
|
+
if (cached && cached.expiresAt > Date.now())
|
|
12446
|
+
return cached.id;
|
|
12447
|
+
const jwt = await generateAppJWT(creds);
|
|
12448
|
+
if (!jwt)
|
|
12449
|
+
return null;
|
|
12450
|
+
const refuse = () => {
|
|
12451
|
+
installationCache.set(repo, { id: null, expiresAt: Date.now() + NO_INSTALLATION_CACHE_TTL_MS });
|
|
12452
|
+
return null;
|
|
12453
|
+
};
|
|
12454
|
+
try {
|
|
12455
|
+
const response = await fetch(githubApiUrl(`/repos/${repo}/installation`), {
|
|
12456
|
+
headers: {
|
|
12457
|
+
Accept: "application/vnd.github+json",
|
|
12458
|
+
Authorization: `Bearer ${jwt}`,
|
|
12459
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
12460
|
+
}
|
|
12461
|
+
});
|
|
12462
|
+
if (response.status !== 200) {
|
|
12463
|
+
console.log(`[GitHub] No installation for ${repo}: ${response.status}`);
|
|
12464
|
+
return refuse();
|
|
12465
|
+
}
|
|
12466
|
+
const data = await response.json();
|
|
12467
|
+
if (typeof data.id !== "number")
|
|
12468
|
+
return refuse();
|
|
12469
|
+
const account = typeof data.account?.login === "string" ? data.account.login.toLowerCase() : "";
|
|
12470
|
+
if (!owners.has(account)) {
|
|
12471
|
+
console.log(`[GitHub] Installation for ${repo} belongs to an owner that is not allowed`);
|
|
12472
|
+
return refuse();
|
|
12473
|
+
}
|
|
12474
|
+
installationCache.set(repo, {
|
|
12475
|
+
id: data.id,
|
|
12476
|
+
expiresAt: Date.now() + INSTALLATION_CACHE_TTL_MS
|
|
12477
|
+
});
|
|
12478
|
+
return data.id;
|
|
12479
|
+
} catch (error) {
|
|
12480
|
+
console.error("[GitHub] Error resolving the repo installation:", error);
|
|
12481
|
+
return null;
|
|
12482
|
+
}
|
|
12483
|
+
}
|
|
12484
|
+
async function getWorkerInstallationToken(repo) {
|
|
12400
12485
|
if (isEnvFlagEnabled("GITHUB_DISABLE", false))
|
|
12401
12486
|
return { status: "unconfigured" };
|
|
12402
12487
|
const workerAppId = process.env.GITHUB_APP_ID?.trim();
|
|
12403
12488
|
const rawKey = process.env.GITHUB_APP_PRIVATE_KEY?.trim();
|
|
12404
|
-
|
|
12405
|
-
if (!workerAppId || !rawKey || !/^[1-9][0-9]{0,15}$/.test(rawInstallation)) {
|
|
12489
|
+
if (!workerAppId || !rawKey)
|
|
12406
12490
|
return { status: "unconfigured" };
|
|
12407
|
-
|
|
12408
|
-
if (!
|
|
12491
|
+
const host = resolveGitHubHost();
|
|
12492
|
+
if (!host.ok)
|
|
12409
12493
|
return { status: "error" };
|
|
12410
|
-
const
|
|
12494
|
+
const creds = { appId: workerAppId, privateKey: decodePrivateKey(rawKey) };
|
|
12495
|
+
const owners = allowedRepoOwners();
|
|
12496
|
+
const target = repo ? normalizeRepo(repo) : "";
|
|
12497
|
+
const owner = target.split("/")[0] ?? "";
|
|
12498
|
+
let installationId;
|
|
12499
|
+
if (target && owners.has(owner)) {
|
|
12500
|
+
const registered = (await getSwarmRepos2()).some((r) => registeredSlugOnHost(r.url, host.config.host) === target);
|
|
12501
|
+
if (!registered)
|
|
12502
|
+
return { status: "forbidden" };
|
|
12503
|
+
const resolved = await resolveInstallationId(target, creds, owners);
|
|
12504
|
+
if (resolved === null)
|
|
12505
|
+
return { status: "error" };
|
|
12506
|
+
installationId = resolved;
|
|
12507
|
+
} else {
|
|
12508
|
+
const rawInstallation = process.env.GITHUB_APP_INSTALLATION_ID?.trim() ?? "";
|
|
12509
|
+
if (!/^[1-9][0-9]{0,15}$/.test(rawInstallation))
|
|
12510
|
+
return { status: "unconfigured" };
|
|
12511
|
+
installationId = Number(rawInstallation);
|
|
12512
|
+
}
|
|
12513
|
+
const minted = await mintInstallationToken(installationId, creds, 600000);
|
|
12411
12514
|
if (!minted)
|
|
12412
12515
|
return { status: "error" };
|
|
12413
12516
|
return { status: "ok", token: minted.token, expiresAt: new Date(minted.expiresAt).toISOString() };
|
|
12414
12517
|
}
|
|
12415
|
-
var initialized = false, webhookSecret = null, appId = null, privateKey = null, tokenCache;
|
|
12518
|
+
var initialized = false, webhookSecret = null, appId = null, privateKey = null, tokenCache, INSTALLATION_CACHE_TTL_MS, NO_INSTALLATION_CACHE_TTL_MS = 60000, installationCache;
|
|
12416
12519
|
var init_app = __esm(() => {
|
|
12520
|
+
init_db4();
|
|
12417
12521
|
init_env_flag();
|
|
12418
12522
|
init_github_host();
|
|
12419
12523
|
tokenCache = new Map;
|
|
12524
|
+
INSTALLATION_CACHE_TTL_MS = 10 * 60000;
|
|
12525
|
+
installationCache = new Map;
|
|
12420
12526
|
});
|
|
12421
12527
|
|
|
12422
12528
|
// src/github/reactions.ts
|
|
@@ -20472,7 +20578,7 @@ function startRetryPoller(registry, intervalMs = 5000) {
|
|
|
20472
20578
|
if (!waiting)
|
|
20473
20579
|
continue;
|
|
20474
20580
|
if (result.waitFor === "workflow.child.finished") {
|
|
20475
|
-
const { resumeFromChildRun } = await import("./resume-
|
|
20581
|
+
const { resumeFromChildRun } = await import("./resume-0drnmpja.js");
|
|
20476
20582
|
await resumeFromChildRun(step.id, registry);
|
|
20477
20583
|
}
|
|
20478
20584
|
} else {
|
|
@@ -21360,7 +21466,7 @@ var init_notify = __esm(() => {
|
|
|
21360
21466
|
}
|
|
21361
21467
|
}
|
|
21362
21468
|
case "slack": {
|
|
21363
|
-
const { getSlackApp } = await import("./app-
|
|
21469
|
+
const { getSlackApp } = await import("./app-zfa9dwjw.js");
|
|
21364
21470
|
let app = getSlackApp();
|
|
21365
21471
|
if (!app) {
|
|
21366
21472
|
if (!isSlackConfigured()) {
|
|
@@ -22309,9 +22415,9 @@ var init_workflows = __esm(() => {
|
|
|
22309
22415
|
});
|
|
22310
22416
|
|
|
22311
22417
|
// src/github/pull-request-state.ts
|
|
22312
|
-
async function
|
|
22418
|
+
async function githubGet(path, what) {
|
|
22313
22419
|
const auth = await getWorkerInstallationToken();
|
|
22314
|
-
const response = await fetch(githubApiUrl(
|
|
22420
|
+
const response = await fetch(githubApiUrl(path), {
|
|
22315
22421
|
headers: {
|
|
22316
22422
|
Accept: "application/vnd.github+json",
|
|
22317
22423
|
"X-GitHub-Api-Version": "2022-11-28",
|
|
@@ -22320,13 +22426,55 @@ async function fetchPullRequestState(repo, number) {
|
|
|
22320
22426
|
signal: AbortSignal.timeout(1e4)
|
|
22321
22427
|
});
|
|
22322
22428
|
if (!response.ok)
|
|
22323
|
-
throw new Error(`GitHub returned ${response.status} for ${
|
|
22324
|
-
|
|
22429
|
+
throw new Error(`GitHub returned ${response.status} for ${what}`);
|
|
22430
|
+
return await response.json();
|
|
22431
|
+
}
|
|
22432
|
+
async function fetchPullRequestState(repo, number) {
|
|
22433
|
+
const pr = await githubGet(`/repos/${repo}/pulls/${number}`, `${repo}#${number}`);
|
|
22325
22434
|
return {
|
|
22326
22435
|
merged: pr.merged === true,
|
|
22327
|
-
state: pr.state === "open" ? "open" : "closed"
|
|
22436
|
+
state: pr.state === "open" ? "open" : "closed",
|
|
22437
|
+
headSha: pr.head?.sha ?? "",
|
|
22438
|
+
baseRef: pr.base?.ref ?? ""
|
|
22328
22439
|
};
|
|
22329
22440
|
}
|
|
22441
|
+
async function fetchRequiredCheckStates(repo, baseRef, sha) {
|
|
22442
|
+
const rules = await githubGet(`/repos/${repo}/rules/branches/${encodeURIComponent(baseRef)}`, `${repo} rules on ${baseRef}`);
|
|
22443
|
+
const required = new Map;
|
|
22444
|
+
for (const rule of rules) {
|
|
22445
|
+
if (rule.type !== "required_status_checks")
|
|
22446
|
+
continue;
|
|
22447
|
+
for (const check of rule.parameters?.required_status_checks ?? [])
|
|
22448
|
+
required.set(check.context, check.integration_id);
|
|
22449
|
+
}
|
|
22450
|
+
if (!required.size)
|
|
22451
|
+
throw new Error(`${repo} has no required status checks on ${baseRef}`);
|
|
22452
|
+
let statuses;
|
|
22453
|
+
const states = [];
|
|
22454
|
+
for (const [name, appId] of required) {
|
|
22455
|
+
const runs = await githubGet(`/repos/${repo}/commits/${sha}/check-runs?check_name=${encodeURIComponent(name)}&filter=latest&per_page=100`, `${repo} check runs on ${sha}`);
|
|
22456
|
+
const run = (runs.check_runs ?? []).find((r) => appId === undefined || r.app?.id === appId);
|
|
22457
|
+
if (run) {
|
|
22458
|
+
states.push({
|
|
22459
|
+
name,
|
|
22460
|
+
complete: run.status === "completed",
|
|
22461
|
+
conclusion: run.conclusion ?? null,
|
|
22462
|
+
completedAt: run.completed_at ?? null
|
|
22463
|
+
});
|
|
22464
|
+
continue;
|
|
22465
|
+
}
|
|
22466
|
+
statuses ??= (await githubGet(`/repos/${repo}/commits/${sha}/status?per_page=100`, `${repo} statuses on ${sha}`)).statuses ?? [];
|
|
22467
|
+
const status = statuses.find((s) => s.context === name);
|
|
22468
|
+
const complete = status !== undefined && status.state !== "pending";
|
|
22469
|
+
states.push({
|
|
22470
|
+
name,
|
|
22471
|
+
complete,
|
|
22472
|
+
conclusion: complete ? status.state : null,
|
|
22473
|
+
completedAt: complete ? status.updated_at : null
|
|
22474
|
+
});
|
|
22475
|
+
}
|
|
22476
|
+
return states;
|
|
22477
|
+
}
|
|
22330
22478
|
var init_pull_request_state = __esm(() => {
|
|
22331
22479
|
init_github_host();
|
|
22332
22480
|
init_app();
|
|
@@ -22336,6 +22484,17 @@ var init_pull_request_state = __esm(() => {
|
|
|
22336
22484
|
function prMatch(repo, number) {
|
|
22337
22485
|
return { repo: repo.toLowerCase(), number };
|
|
22338
22486
|
}
|
|
22487
|
+
async function confirmChecksDone(repo, number) {
|
|
22488
|
+
const pr = await fetchPullRequestState(repo, number);
|
|
22489
|
+
if (!pr.headSha || !pr.baseRef)
|
|
22490
|
+
throw new Error(`GitHub returned no head or base for ${repo}#${number}`);
|
|
22491
|
+
const checks = await fetchRequiredCheckStates(repo, pr.baseRef, pr.headSha);
|
|
22492
|
+
const done = checks.every((check) => check.complete);
|
|
22493
|
+
return {
|
|
22494
|
+
happened: done,
|
|
22495
|
+
detail: done ? `head ${pr.headSha.slice(0, 12)}, ${checks.map((check) => `${check.name}=${check.conclusion} (completed ${check.completedAt})`).join(", ")}` : undefined
|
|
22496
|
+
};
|
|
22497
|
+
}
|
|
22339
22498
|
var PrMatch, githubAdapter;
|
|
22340
22499
|
var init_github2 = __esm(() => {
|
|
22341
22500
|
init_zod();
|
|
@@ -22344,9 +22503,9 @@ var init_github2 = __esm(() => {
|
|
|
22344
22503
|
PrMatch = object2({ repo: string2().regex(/^[\w.-]+\/[\w.-]+$/), number: number2().int().positive() }).strict();
|
|
22345
22504
|
githubAdapter = {
|
|
22346
22505
|
source: "github",
|
|
22347
|
-
events: ["vcs.pr.merged"],
|
|
22506
|
+
events: ["vcs.pr.merged", "vcs.pr.checks_done"],
|
|
22348
22507
|
matchHint: "repo (owner/name), number",
|
|
22349
|
-
|
|
22508
|
+
busPrefixes: ["github.pull_request.", "github.check_run."],
|
|
22350
22509
|
readsWithServerCredentials: true,
|
|
22351
22510
|
isEnabled: isGitHubEnabled,
|
|
22352
22511
|
parseMatch(_event, match) {
|
|
@@ -22357,13 +22516,24 @@ var init_github2 = __esm(() => {
|
|
|
22357
22516
|
return prMatch(parsed.data.repo, parsed.data.number);
|
|
22358
22517
|
},
|
|
22359
22518
|
fromBusEvent(busEvent, payload) {
|
|
22519
|
+
if (busEvent === "github.check_run.completed") {
|
|
22520
|
+
const run = payload;
|
|
22521
|
+
if (typeof run?.repo !== "string" || !Array.isArray(run.pullRequests))
|
|
22522
|
+
return [];
|
|
22523
|
+
const repo = run.repo;
|
|
22524
|
+
return run.pullRequests.filter((n) => typeof n === "number").map((n) => ({ event: "vcs.pr.checks_done", match: prMatch(repo, n) }));
|
|
22525
|
+
}
|
|
22360
22526
|
const pr = payload;
|
|
22361
22527
|
if (busEvent !== "github.pull_request.closed" || pr?.merged !== true || typeof pr.repo !== "string" || typeof pr.number !== "number")
|
|
22362
22528
|
return [];
|
|
22363
22529
|
return [{ event: "vcs.pr.merged", match: prMatch(pr.repo, pr.number) }];
|
|
22364
22530
|
},
|
|
22365
|
-
async confirm(
|
|
22366
|
-
|
|
22531
|
+
async confirm(event, match) {
|
|
22532
|
+
const repo = String(match.repo);
|
|
22533
|
+
const number = Number(match.number);
|
|
22534
|
+
if (event === "vcs.pr.checks_done")
|
|
22535
|
+
return await confirmChecksDone(repo, number);
|
|
22536
|
+
return (await fetchPullRequestState(repo, number)).merged;
|
|
22367
22537
|
}
|
|
22368
22538
|
};
|
|
22369
22539
|
});
|
|
@@ -22376,6 +22546,9 @@ function describeEventWait(source, event, match) {
|
|
|
22376
22546
|
const target = Object.entries(match).map(([key, value]) => `${key}=${value}`).join(", ");
|
|
22377
22547
|
return `${event} on ${source} (${target})`;
|
|
22378
22548
|
}
|
|
22549
|
+
function toConfirmResult(result) {
|
|
22550
|
+
return typeof result === "boolean" ? { happened: result } : result;
|
|
22551
|
+
}
|
|
22379
22552
|
var init_types4 = () => {};
|
|
22380
22553
|
|
|
22381
22554
|
// src/event-waits/index.ts
|
|
@@ -22383,9 +22556,9 @@ function getExternalEventAdapter(source) {
|
|
|
22383
22556
|
return EXTERNAL_EVENT_ADAPTERS.find((adapter) => adapter.source === source);
|
|
22384
22557
|
}
|
|
22385
22558
|
function isReservedProviderEvent(name) {
|
|
22386
|
-
return EXTERNAL_EVENT_ADAPTERS.some((adapter) => name.startsWith(
|
|
22559
|
+
return EXTERNAL_EVENT_ADAPTERS.some((adapter) => adapter.busPrefixes.some((prefix) => name.startsWith(prefix)));
|
|
22387
22560
|
}
|
|
22388
|
-
var EXTERNAL_EVENT_ADAPTERS, EXTERNAL_EVENT_NAMES, EXTERNAL_EVENTS_DOC = 'vcs.pr.merged with source "github" and match {repo (owner/name), number}';
|
|
22561
|
+
var EXTERNAL_EVENT_ADAPTERS, EXTERNAL_EVENT_NAMES, EXTERNAL_EVENTS_DOC = 'vcs.pr.merged or vcs.pr.checks_done (every required check of the base branch ruleset finished on the PR head, any conclusion) with source "github" and match {repo (owner/name), number}';
|
|
22389
22562
|
var init_event_waits = __esm(() => {
|
|
22390
22563
|
init_github2();
|
|
22391
22564
|
init_types4();
|
|
@@ -22464,7 +22637,7 @@ var init_schedule_task = __esm(() => {
|
|
|
22464
22637
|
function externalWakeReason(source, event) {
|
|
22465
22638
|
return `external:${source}:${event}`;
|
|
22466
22639
|
}
|
|
22467
|
-
async function resolveWaitCause(scheduleId, reason) {
|
|
22640
|
+
async function resolveWaitCause(scheduleId, reason, causeDetail) {
|
|
22468
22641
|
const client = getDbClient2();
|
|
22469
22642
|
const wait = await client.get("SELECT * FROM deferred_task_waits WHERE scheduleId = ?", [scheduleId]);
|
|
22470
22643
|
if (!wait) {
|
|
@@ -22477,7 +22650,7 @@ async function resolveWaitCause(scheduleId, reason) {
|
|
|
22477
22650
|
return;
|
|
22478
22651
|
return {
|
|
22479
22652
|
table: "deferred_event_waits",
|
|
22480
|
-
cause: describeEventWait(eventWait.source, eventWait.event, JSON.parse(eventWait.matchJson))
|
|
22653
|
+
cause: `${describeEventWait(eventWait.source, eventWait.event, JSON.parse(eventWait.matchJson))}${causeDetail ? `: ${causeDetail}` : ""}`,
|
|
22481
22654
|
matchedTaskIds: []
|
|
22482
22655
|
};
|
|
22483
22656
|
}
|
|
@@ -22514,8 +22687,8 @@ function wakeSchedule(schedule, cause) {
|
|
|
22514
22687
|
|
|
22515
22688
|
Wake-up cause: ${cause}.` };
|
|
22516
22689
|
}
|
|
22517
|
-
async function prepareDeferredWakeTask(scheduleId, reason, extraTags) {
|
|
22518
|
-
const resolved = await resolveWaitCause(scheduleId, reason);
|
|
22690
|
+
async function prepareDeferredWakeTask(scheduleId, reason, extraTags, causeDetail) {
|
|
22691
|
+
const resolved = await resolveWaitCause(scheduleId, reason, causeDetail);
|
|
22519
22692
|
if (!resolved)
|
|
22520
22693
|
return;
|
|
22521
22694
|
let schedule = await getScheduledTaskById2(scheduleId);
|
|
@@ -22528,15 +22701,15 @@ async function prepareDeferredWakeTask(scheduleId, reason, extraTags) {
|
|
|
22528
22701
|
throw new Error(`Schedule "${schedule.name}" has no taskTemplate`);
|
|
22529
22702
|
return await prepareStandaloneScheduleTask(wakeSchedule(schedule, resolved.cause), extraTags);
|
|
22530
22703
|
}
|
|
22531
|
-
async function prepareDeferredTaskWait(scheduleId, reason, extraTags = []) {
|
|
22704
|
+
async function prepareDeferredTaskWait(scheduleId, reason, extraTags = [], causeDetail) {
|
|
22532
22705
|
const client = getDbClient2();
|
|
22533
22706
|
if (!await client.get(`SELECT 1 AS found FROM deferred_task_waits WHERE scheduleId = ?
|
|
22534
22707
|
UNION ALL SELECT 1 FROM deferred_event_waits WHERE scheduleId = ?`, [scheduleId, scheduleId]))
|
|
22535
22708
|
return;
|
|
22536
|
-
return { task: await prepareDeferredWakeTask(scheduleId, reason, extraTags) };
|
|
22709
|
+
return { task: await prepareDeferredWakeTask(scheduleId, reason, extraTags, causeDetail) };
|
|
22537
22710
|
}
|
|
22538
|
-
async function dispatchDeferredTaskWait(scheduleId, reason, extraTags = [], triggerTaskId, prepared) {
|
|
22539
|
-
const preparation = prepared ?? await prepareDeferredTaskWait(scheduleId, reason, extraTags);
|
|
22711
|
+
async function dispatchDeferredTaskWait(scheduleId, reason, extraTags = [], triggerTaskId, prepared, causeDetail) {
|
|
22712
|
+
const preparation = prepared ?? await prepareDeferredTaskWait(scheduleId, reason, extraTags, causeDetail);
|
|
22540
22713
|
if (!preparation)
|
|
22541
22714
|
return;
|
|
22542
22715
|
const preparedForWait = preparation.task;
|
|
@@ -22544,7 +22717,7 @@ async function dispatchDeferredTaskWait(scheduleId, reason, extraTags = [], trig
|
|
|
22544
22717
|
return {};
|
|
22545
22718
|
const client = getDbClient2();
|
|
22546
22719
|
return client.transaction(async () => {
|
|
22547
|
-
const resolved = await resolveWaitCause(scheduleId, reason);
|
|
22720
|
+
const resolved = await resolveWaitCause(scheduleId, reason, causeDetail);
|
|
22548
22721
|
if (!resolved)
|
|
22549
22722
|
return {};
|
|
22550
22723
|
let schedule = await getScheduledTaskById2(scheduleId);
|
|
@@ -22648,6 +22821,26 @@ async function reapSpentDeferredSchedules(now = new Date) {
|
|
|
22648
22821
|
)`, [cutoff]);
|
|
22649
22822
|
return result.changes;
|
|
22650
22823
|
}
|
|
22824
|
+
function confirmFresh(key, read) {
|
|
22825
|
+
const previous = confirmFlights.get(key);
|
|
22826
|
+
if (previous && !previous.started)
|
|
22827
|
+
return previous.result;
|
|
22828
|
+
const flight = { started: false, result: Promise.resolve({ happened: false }) };
|
|
22829
|
+
const after = previous ? previous.result.then(noop, noop) : Promise.resolve();
|
|
22830
|
+
flight.result = after.then(() => {
|
|
22831
|
+
flight.started = true;
|
|
22832
|
+
return read();
|
|
22833
|
+
}).then(toConfirmResult).finally(() => {
|
|
22834
|
+
if (confirmFlights.get(key) === flight)
|
|
22835
|
+
confirmFlights.delete(key);
|
|
22836
|
+
});
|
|
22837
|
+
confirmFlights.set(key, flight);
|
|
22838
|
+
return flight.result;
|
|
22839
|
+
}
|
|
22840
|
+
function noop() {}
|
|
22841
|
+
async function hasPendingEventWait(source, event) {
|
|
22842
|
+
return !!await getDbClient2().get("SELECT 1 AS found FROM deferred_event_waits WHERE status = 'pending' AND source = ? AND event = ? LIMIT 1", [source, event]);
|
|
22843
|
+
}
|
|
22651
22844
|
async function reconcileDeferredEventWaits(only, trustEvent = false) {
|
|
22652
22845
|
const waits = await getDbClient2().query(`SELECT w.scheduleId, w.source, w.event, w.matchKey, w.matchJson FROM deferred_event_waits w
|
|
22653
22846
|
JOIN scheduled_tasks s ON s.id = w.scheduleId
|
|
@@ -22661,9 +22854,10 @@ async function reconcileDeferredEventWaits(only, trustEvent = false) {
|
|
|
22661
22854
|
const key = `${wait.source}|${wait.event}|${wait.matchKey}`;
|
|
22662
22855
|
try {
|
|
22663
22856
|
if (!satisfied.has(key))
|
|
22664
|
-
satisfied.set(key, adapter.confirm ? await adapter.confirm(wait.event, JSON.parse(wait.matchJson)) : true);
|
|
22665
|
-
|
|
22666
|
-
|
|
22857
|
+
satisfied.set(key, adapter.confirm ? await confirmFresh(key, () => adapter.confirm(wait.event, JSON.parse(wait.matchJson))) : { happened: true });
|
|
22858
|
+
const result = satisfied.get(key);
|
|
22859
|
+
if (result.happened)
|
|
22860
|
+
await dispatchDeferredTaskWait(wait.scheduleId, externalWakeReason(wait.source, wait.event), [], undefined, undefined, result.detail);
|
|
22667
22861
|
} catch (err) {
|
|
22668
22862
|
console.error(`[Scheduler] External event wake failed for ${wait.scheduleId}:`, err);
|
|
22669
22863
|
}
|
|
@@ -22703,7 +22897,8 @@ async function initDeferredTaskWaits() {
|
|
|
22703
22897
|
for (const adapter of EXTERNAL_EVENT_ADAPTERS) {
|
|
22704
22898
|
const listener = externalEventListener(adapter);
|
|
22705
22899
|
externalEventListeners.set(adapter, listener);
|
|
22706
|
-
|
|
22900
|
+
for (const prefix of adapter.busPrefixes)
|
|
22901
|
+
workflowEventBus2.onPrefix(prefix, listener);
|
|
22707
22902
|
}
|
|
22708
22903
|
await reconcileDeferredTaskWaits();
|
|
22709
22904
|
reconcileDeferredEventWaits().catch((err) => {
|
|
@@ -22718,11 +22913,12 @@ function stopDeferredTaskWaits() {
|
|
|
22718
22913
|
workflowEventBus2.off("task.superseded", onTaskEvent);
|
|
22719
22914
|
workflowEventBus2.off("task.created", onTaskEvent);
|
|
22720
22915
|
for (const [adapter, listener] of externalEventListeners) {
|
|
22721
|
-
|
|
22916
|
+
for (const prefix of adapter.busPrefixes)
|
|
22917
|
+
workflowEventBus2.offPrefix(prefix, listener);
|
|
22722
22918
|
}
|
|
22723
22919
|
externalEventListeners.clear();
|
|
22724
22920
|
}
|
|
22725
|
-
var MAX_PENDING_EVENT_WAITS_PER_AGENT = 20, WAIT_MEMBER_STATUS_SQL, DEFERRED_WAIT_WOKE_EVENT = "task_deferred_wait_woke", SPENT_DEFERRED_SCHEDULE_RETENTION_MS, externalEventListeners;
|
|
22921
|
+
var MAX_PENDING_EVENT_WAITS_PER_AGENT = 20, WAIT_MEMBER_STATUS_SQL, DEFERRED_WAIT_WOKE_EVENT = "task_deferred_wait_woke", SPENT_DEFERRED_SCHEDULE_RETENTION_MS, confirmFlights, externalEventListeners;
|
|
22726
22922
|
var init_deferred_task_waits = __esm(() => {
|
|
22727
22923
|
init_db4();
|
|
22728
22924
|
init_event_waits();
|
|
@@ -22733,6 +22929,7 @@ var init_deferred_task_waits = __esm(() => {
|
|
|
22733
22929
|
WHEN t.status = 'superseded' AND t.failureReason = '${SUPERSEDED_WORKFLOW_TASK_REASON}' THEN 'failed'
|
|
22734
22930
|
ELSE t.status END`;
|
|
22735
22931
|
SPENT_DEFERRED_SCHEDULE_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
|
|
22932
|
+
confirmFlights = new Map;
|
|
22736
22933
|
externalEventListeners = new Map;
|
|
22737
22934
|
});
|
|
22738
22935
|
|
|
@@ -25005,7 +25202,7 @@ function setPreloadedTools(server, names) {
|
|
|
25005
25202
|
async function applyPreToolCall(name, args, requestInfo, inputSchema) {
|
|
25006
25203
|
if (requestInfo.callOrigin !== "mcp")
|
|
25007
25204
|
return { args };
|
|
25008
|
-
const dispatcher = await import("./dispatcher-
|
|
25205
|
+
const dispatcher = await import("./dispatcher-a2gdqz8c.js");
|
|
25009
25206
|
const result = await dispatcher.dispatchPre("pre.tool.call", { tool: name, args, requestInfo }, inputSchema ? {
|
|
25010
25207
|
validateModify: async (data) => {
|
|
25011
25208
|
const schema = normalizeObjectSchema(inputSchema) ?? inputSchema;
|
|
@@ -25793,8 +25990,15 @@ function bridgeRequestFor(name, args) {
|
|
|
25793
25990
|
};
|
|
25794
25991
|
}
|
|
25795
25992
|
case "memory_rate": {
|
|
25993
|
+
if (body.id && body.memoryId && body.id !== body.memoryId) {
|
|
25994
|
+
throw new Error("id and memoryId must identify the same memory; supply only one.");
|
|
25995
|
+
}
|
|
25996
|
+
const memoryId = body.id ?? body.memoryId;
|
|
25997
|
+
if (typeof memoryId !== "string" || !memoryId) {
|
|
25998
|
+
throw new Error("Supply id (or its alias memoryId) from memory-search.");
|
|
25999
|
+
}
|
|
25796
26000
|
const event = {
|
|
25797
|
-
memoryId
|
|
26001
|
+
memoryId,
|
|
25798
26002
|
signal: body.useful === false ? -1 : 1,
|
|
25799
26003
|
weight: 1,
|
|
25800
26004
|
source: "explicit-self",
|
|
@@ -29729,7 +29933,7 @@ async function handleWorkItemDeleted(event) {
|
|
|
29729
29933
|
return { created: false };
|
|
29730
29934
|
const task = sync.swarmId && !sync.swarmId.startsWith("pending:") ? await getTaskById2(sync.swarmId) : null;
|
|
29731
29935
|
if (task && !isTerminalTaskStatus(task.status)) {
|
|
29732
|
-
await cancelTask2(task.id, DELETED_REASON);
|
|
29936
|
+
await cancelTask2(task.id, DELETED_REASON, { statusKind: "external" });
|
|
29733
29937
|
console.log(`[AzureDevOps] Cancelled task ${task.id} (work item #${item.id} deleted)`);
|
|
29734
29938
|
}
|
|
29735
29939
|
await markTrackerDelivery(PROVIDER, "task", externalId, event.id);
|
|
@@ -30600,7 +30804,7 @@ async function handlePullRequestClosed(body, outcome) {
|
|
|
30600
30804
|
const reason = outcome === "merged" ? "PR was merged" : "PR was declined";
|
|
30601
30805
|
for (const task of await findActiveTasksByVcs2(repository.full_name, pr.id, "bitbucket")) {
|
|
30602
30806
|
console.log(`[Bitbucket] Cancelling task ${task.id} — ${reason}`);
|
|
30603
|
-
await failTask2(task.id, reason);
|
|
30807
|
+
await failTask2(task.id, reason, { statusKind: "external" });
|
|
30604
30808
|
}
|
|
30605
30809
|
return { created: false };
|
|
30606
30810
|
}
|
|
@@ -31261,7 +31465,9 @@ async function handlePullRequest(event) {
|
|
|
31261
31465
|
console.log(`[GitHub] No active task found for PR #${pr.number} to cancel`);
|
|
31262
31466
|
return { created: false };
|
|
31263
31467
|
}
|
|
31264
|
-
const cancelledTask = await failTask2(task.id, `Unassigned from GitHub PR #${pr.number}
|
|
31468
|
+
const cancelledTask = await failTask2(task.id, `Unassigned from GitHub PR #${pr.number}`, {
|
|
31469
|
+
statusKind: "external"
|
|
31470
|
+
});
|
|
31265
31471
|
if (cancelledTask) {
|
|
31266
31472
|
console.log(`[GitHub] Cancelled task ${task.id} for PR #${pr.number} (unassigned)`);
|
|
31267
31473
|
return { created: false, taskId: task.id };
|
|
@@ -31333,7 +31539,7 @@ async function handlePullRequest(event) {
|
|
|
31333
31539
|
console.log(`[GitHub] No active task found for PR #${pr.number} to cancel`);
|
|
31334
31540
|
return { created: false };
|
|
31335
31541
|
}
|
|
31336
|
-
const cancelledTask = await failTask2(task.id, `Review request removed from GitHub PR #${pr.number}
|
|
31542
|
+
const cancelledTask = await failTask2(task.id, `Review request removed from GitHub PR #${pr.number}`, { statusKind: "external" });
|
|
31337
31543
|
if (cancelledTask) {
|
|
31338
31544
|
console.log(`[GitHub] Cancelled task ${task.id} for PR #${pr.number} (review request removed)`);
|
|
31339
31545
|
return { created: false, taskId: task.id };
|
|
@@ -31511,7 +31717,9 @@ async function handleIssue(event) {
|
|
|
31511
31717
|
console.log(`[GitHub] No active task found for issue #${issue.number} to cancel`);
|
|
31512
31718
|
return { created: false };
|
|
31513
31719
|
}
|
|
31514
|
-
const cancelledTask = await failTask2(task.id, `Unassigned from GitHub issue #${issue.number}
|
|
31720
|
+
const cancelledTask = await failTask2(task.id, `Unassigned from GitHub issue #${issue.number}`, {
|
|
31721
|
+
statusKind: "external"
|
|
31722
|
+
});
|
|
31515
31723
|
if (cancelledTask) {
|
|
31516
31724
|
console.log(`[GitHub] Cancelled task ${task.id} for issue #${issue.number} (unassigned)`);
|
|
31517
31725
|
return { created: false, taskId: task.id };
|
|
@@ -32344,7 +32552,7 @@ async function handleMergeRequest(event) {
|
|
|
32344
32552
|
const tasks = await findActiveTasksByVcs2(repo, mr.iid, "gitlab");
|
|
32345
32553
|
for (const task of tasks.filter((t) => isScopedTask(t, "mr", mrContextKey))) {
|
|
32346
32554
|
console.log(`[GitLab] Cancelling task ${task.id} — ${reason}`);
|
|
32347
|
-
await failTask2(task.id, reason);
|
|
32555
|
+
await failTask2(task.id, reason, { statusKind: "external" });
|
|
32348
32556
|
}
|
|
32349
32557
|
return { created: false };
|
|
32350
32558
|
}
|
|
@@ -32431,7 +32639,7 @@ async function handleIssue2(event) {
|
|
|
32431
32639
|
const existingTask = (await findActiveTasksByVcs2(repo, issue.iid, "gitlab")).find((t) => isScopedTask(t, "issue", issueContextKey));
|
|
32432
32640
|
if (existingTask) {
|
|
32433
32641
|
console.log(`[GitLab] Cancelling task ${existingTask.id} — issue closed`);
|
|
32434
|
-
await failTask2(existingTask.id, "Issue was closed");
|
|
32642
|
+
await failTask2(existingTask.id, "Issue was closed", { statusKind: "external" });
|
|
32435
32643
|
}
|
|
32436
32644
|
return { created: false };
|
|
32437
32645
|
}
|
|
@@ -33519,7 +33727,9 @@ async function cancelActiveTasks(target, requestedBy) {
|
|
|
33519
33727
|
const active = await getLatestActiveTaskByContextKey2(contextKey, "chat", target.owner);
|
|
33520
33728
|
if (!active)
|
|
33521
33729
|
break;
|
|
33522
|
-
const task = await cancelTask2(active.id, `Cancelled from chat by ${requestedBy}
|
|
33730
|
+
const task = await cancelTask2(active.id, `Cancelled from chat by ${requestedBy}`, {
|
|
33731
|
+
statusKind: "user"
|
|
33732
|
+
});
|
|
33523
33733
|
if (!task)
|
|
33524
33734
|
break;
|
|
33525
33735
|
if (task.agentId)
|
|
@@ -36786,7 +36996,7 @@ async function handleIssueDeleteEvent(event) {
|
|
|
36786
36996
|
return;
|
|
36787
36997
|
const task = sync.swarmId ? await getTaskById2(sync.swarmId) : null;
|
|
36788
36998
|
if (task && !isTerminalTaskStatus(task.status)) {
|
|
36789
|
-
await cancelTask2(sync.swarmId, "Jira issue deleted");
|
|
36999
|
+
await cancelTask2(sync.swarmId, "Jira issue deleted", { statusKind: "external" });
|
|
36790
37000
|
console.log(`[Jira Sync] Cancelled task ${sync.swarmId} (Jira issue ${issue.key ?? issue.id} deleted)`);
|
|
36791
37001
|
}
|
|
36792
37002
|
}
|
|
@@ -36896,7 +37106,7 @@ async function notifySlack(text) {
|
|
|
36896
37106
|
return;
|
|
36897
37107
|
}
|
|
36898
37108
|
try {
|
|
36899
|
-
const { getSlackApp } = await import("./app-
|
|
37109
|
+
const { getSlackApp } = await import("./app-zfa9dwjw.js");
|
|
36900
37110
|
const app = getSlackApp();
|
|
36901
37111
|
if (!app) {
|
|
36902
37112
|
console.warn("[Jira webhook keepalive] Slack not available, cannot send notification");
|
|
@@ -36967,7 +37177,7 @@ async function deleteJiraWebhook(webhookId) {
|
|
|
36967
37177
|
console.log(`[Jira webhook keepalive] Deleted webhook id=${webhookId}`);
|
|
36968
37178
|
}
|
|
36969
37179
|
async function overwriteWebhookIds(next) {
|
|
36970
|
-
const { getDbClient } = await import("./db-
|
|
37180
|
+
const { getDbClient } = await import("./db-sc59379z.js");
|
|
36971
37181
|
await getDbClient().transaction(async (tx) => {
|
|
36972
37182
|
const row = await tx.get("SELECT metadata FROM oauth_apps WHERE provider = 'jira'");
|
|
36973
37183
|
if (!row) {
|
|
@@ -109278,7 +109488,7 @@ async function handleIssueUpdate(event, deliveryId) {
|
|
|
109278
109488
|
if (swarmStatus === "cancelled") {
|
|
109279
109489
|
const task = await getTaskById2(sync.swarmId);
|
|
109280
109490
|
if (task && !isTerminalTaskStatus(task.status)) {
|
|
109281
|
-
await cancelTask2(sync.swarmId, `Linear issue cancelled
|
|
109491
|
+
await cancelTask2(sync.swarmId, `Linear issue cancelled`, { statusKind: "external" });
|
|
109282
109492
|
console.log(`[Linear Sync] Cancelled task ${sync.swarmId} (Linear issue ${data.identifier ?? issueId} cancelled)`);
|
|
109283
109493
|
}
|
|
109284
109494
|
return;
|
|
@@ -109301,7 +109511,7 @@ async function handleIssueDelete(event) {
|
|
|
109301
109511
|
return;
|
|
109302
109512
|
const task = await getTaskById2(sync.swarmId);
|
|
109303
109513
|
if (task && !isTerminalTaskStatus(task.status)) {
|
|
109304
|
-
await cancelTask2(sync.swarmId, "Linear issue deleted");
|
|
109514
|
+
await cancelTask2(sync.swarmId, "Linear issue deleted", { statusKind: "external" });
|
|
109305
109515
|
console.log(`[Linear Sync] Cancelled task ${sync.swarmId} (Linear issue ${issueId} deleted)`);
|
|
109306
109516
|
}
|
|
109307
109517
|
}
|
|
@@ -109330,7 +109540,9 @@ async function handleAgentSessionPrompted(event) {
|
|
|
109330
109540
|
if (existing) {
|
|
109331
109541
|
const existingTask = await getTaskById2(existing.swarmId);
|
|
109332
109542
|
if (existingTask && !isTerminalTaskStatus(existingTask.status)) {
|
|
109333
|
-
await cancelTask2(existing.swarmId, "Stopped by user from Linear"
|
|
109543
|
+
await cancelTask2(existing.swarmId, "Stopped by user from Linear", {
|
|
109544
|
+
statusKind: "user"
|
|
109545
|
+
});
|
|
109334
109546
|
console.log(`[Linear Sync] Cancelled task ${existing.swarmId} (stop signal from Linear)`);
|
|
109335
109547
|
}
|
|
109336
109548
|
}
|
|
@@ -110461,7 +110673,7 @@ async function loadGlobalConfigsIntoEnv2(override = false) {
|
|
|
110461
110673
|
if (updated.length > 0) {
|
|
110462
110674
|
refreshSecretScrubberCache();
|
|
110463
110675
|
}
|
|
110464
|
-
const { syncSlackTreeVisibility } = await import("./tree-visibility-
|
|
110676
|
+
const { syncSlackTreeVisibility } = await import("./tree-visibility-rwz67mje.js");
|
|
110465
110677
|
await syncSlackTreeVisibility();
|
|
110466
110678
|
return updated;
|
|
110467
110679
|
}
|
|
@@ -110469,7 +110681,7 @@ async function reloadGlobalConfigsAndIntegrations2() {
|
|
|
110469
110681
|
return runWithoutRequestAuth(() => runSlackLifecycleExclusive(() => reloadGlobalConfigsAndIntegrationsInner()));
|
|
110470
110682
|
}
|
|
110471
110683
|
async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
110472
|
-
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-
|
|
110684
|
+
const { getEmbeddingProvider, resetEmbeddingProvider } = await import("./index-rwwhsmjg.js");
|
|
110473
110685
|
const wasEmbeddingsConfigured = getEmbeddingProvider().isConfigured();
|
|
110474
110686
|
const updated = await loadGlobalConfigsIntoEnv2(true);
|
|
110475
110687
|
await syncTelemetryEnabled("settings").catch((err) => {
|
|
@@ -110485,7 +110697,7 @@ async function reloadGlobalConfigsAndIntegrationsInner() {
|
|
|
110485
110697
|
integrations.push("embeddings");
|
|
110486
110698
|
}
|
|
110487
110699
|
if (isEmbeddingsConfigured) {
|
|
110488
|
-
import("./embedding-space-
|
|
110700
|
+
import("./embedding-space-qepzrach.js").then(({ runEmbeddingMaintenance }) => runEmbeddingMaintenance({ backfill: !wasEmbeddingsConfigured })).catch((err) => {
|
|
110489
110701
|
console.error("[config-reload] embedding maintenance failed (non-fatal):", err);
|
|
110490
110702
|
});
|
|
110491
110703
|
}
|
|
@@ -112014,13 +112226,22 @@ async function runAppSync(input) {
|
|
|
112014
112226
|
if (pairs.length === 0) {
|
|
112015
112227
|
return { ok: false, passes: [], issues: [noPairIssue(input)] };
|
|
112016
112228
|
}
|
|
112017
|
-
const passes =
|
|
112018
|
-
|
|
112019
|
-
|
|
112020
|
-
|
|
112229
|
+
const passes = new Array(pairs.length);
|
|
112230
|
+
let next = 0;
|
|
112231
|
+
const worker = async () => {
|
|
112232
|
+
while (next < pairs.length) {
|
|
112233
|
+
const i = next++;
|
|
112234
|
+
passes[i] = await runPass({
|
|
112235
|
+
appId: app.id,
|
|
112236
|
+
...pairs[i],
|
|
112237
|
+
invokedBy: input.invokedBy
|
|
112238
|
+
});
|
|
112239
|
+
}
|
|
112240
|
+
};
|
|
112241
|
+
await Promise.all(Array.from({ length: Math.min(SYNC_PASS_CONCURRENCY, pairs.length) }, worker));
|
|
112021
112242
|
return { ok: passes.every((pass) => pass.error === undefined), passes };
|
|
112022
112243
|
}
|
|
112023
|
-
var MAX_PULL_RECORDS = 500, MAX_PASS_WARNINGS = 20, MAX_TASK_LIMIT = 200, DEFAULT_TASK_LIMIT = 100, MAX_TASK_PROMPT_CHARS = 1000, MAX_ERROR_DETAIL_CHARS = 500, SyncPassError, TransformError, SourceRecordSchema, PullPayloadSchema, TASK_CONFIG_KEYS, RECONCILE_CHUNK_SIZE = 200, inFlight3;
|
|
112244
|
+
var MAX_PULL_RECORDS = 500, MAX_PASS_WARNINGS = 20, MAX_TASK_LIMIT = 200, DEFAULT_TASK_LIMIT = 100, MAX_TASK_PROMPT_CHARS = 1000, MAX_ERROR_DETAIL_CHARS = 500, SyncPassError, TransformError, SourceRecordSchema, PullPayloadSchema, TASK_CONFIG_KEYS, RECONCILE_CHUNK_SIZE = 200, inFlight3, SYNC_PASS_CONCURRENCY = 3;
|
|
112024
112245
|
var init_sync3 = __esm(() => {
|
|
112025
112246
|
init_zod();
|
|
112026
112247
|
init_db4();
|
|
@@ -117841,7 +118062,7 @@ async function getTaskDetailsHandler(ctx, { taskId, include }) {
|
|
|
117841
118062
|
const data = origin === "script-sdk" || origin === "extension" ? full : fitToBudget(full, new Set(include ?? []));
|
|
117842
118063
|
const reducedParts = data.fitted?.include ?? [];
|
|
117843
118064
|
const fitNote = reducedParts.length ? ` Fitted to the size budget; include ${JSON.stringify(reducedParts)} for the rest.` : "";
|
|
117844
|
-
return toolOk(`Task "${taskId}" (${task.status}) details retrieved.${fitNote}`, {
|
|
118065
|
+
return toolOk(`Task "${taskId}" (${task.status}${task.statusKind ? `, ${task.statusKind}` : ""}) details retrieved.${fitNote}`, {
|
|
117845
118066
|
details: JSON.stringify(data),
|
|
117846
118067
|
data
|
|
117847
118068
|
});
|
|
@@ -117900,6 +118121,7 @@ var init_get_task_details = __esm(() => {
|
|
|
117900
118121
|
lastUpdatedAt: string2().optional(),
|
|
117901
118122
|
finishedAt: string2().optional(),
|
|
117902
118123
|
notifiedAt: string2().optional(),
|
|
118124
|
+
statusKind: string2().optional(),
|
|
117903
118125
|
failureReason: string2().optional(),
|
|
117904
118126
|
output: string2().optional(),
|
|
117905
118127
|
progress: string2().optional(),
|
|
@@ -118065,7 +118287,7 @@ async function cancelTaskHandler(ctx, { taskId, reason }) {
|
|
|
118065
118287
|
message: "Only the lead or task creator can cancel tasks."
|
|
118066
118288
|
};
|
|
118067
118289
|
}
|
|
118068
|
-
const cancelled = await cancelTask2(taskId, reason);
|
|
118290
|
+
const cancelled = await cancelTask2(taskId, reason, { statusKind: "agent" });
|
|
118069
118291
|
if (!cancelled) {
|
|
118070
118292
|
return {
|
|
118071
118293
|
success: false,
|
|
@@ -118091,7 +118313,7 @@ async function cancelTaskHandler(ctx, { taskId, reason }) {
|
|
|
118091
118313
|
const ownershipError = assertOwnsTask(ctx, existingTask, "task.cancel.own");
|
|
118092
118314
|
if (ownershipError)
|
|
118093
118315
|
return ownershipError;
|
|
118094
|
-
const cancelled = await cancelTask2(taskId, reason);
|
|
118316
|
+
const cancelled = await cancelTask2(taskId, reason, { statusKind: "user" });
|
|
118095
118317
|
if (!cancelled) {
|
|
118096
118318
|
return {
|
|
118097
118319
|
success: false,
|
|
@@ -123698,8 +123920,11 @@ async function admitExternalWait(event, source, rawMatch) {
|
|
|
123698
123920
|
}
|
|
123699
123921
|
if (adapter.confirm) {
|
|
123700
123922
|
try {
|
|
123701
|
-
|
|
123702
|
-
|
|
123923
|
+
const already = toConfirmResult(await adapter.confirm(event, match));
|
|
123924
|
+
if (already.happened) {
|
|
123925
|
+
return {
|
|
123926
|
+
error: `${target} already happened${already.detail ? ` (${already.detail})` : ""}; read its result instead of deferring.`
|
|
123927
|
+
};
|
|
123703
123928
|
}
|
|
123704
123929
|
} catch (error) {
|
|
123705
123930
|
return {
|
|
@@ -123965,7 +124190,8 @@ Deferred until ${nextRunAt} (schedule ${schedule.id}). Pending: ${note}${checksB
|
|
|
123965
124190
|
const terminalOutput = task.outputSchema ? output : renderHumanFacingDeferral(nextRunAt, requesterTz, isFallbackTz, admitted && eventWait ? describeEventWait(admitted.adapter.source, eventWait.event, admitted.match) : wakeOn ? renderWaitingOn(watchedAgentNames, watchedTaskIds.length) : undefined);
|
|
123966
124191
|
const completed = await completeTask2(taskId, terminalOutput, {
|
|
123967
124192
|
addTags: ["deferred"],
|
|
123968
|
-
deferredAt: new Date().toISOString()
|
|
124193
|
+
deferredAt: new Date().toISOString(),
|
|
124194
|
+
statusKind: "deferred"
|
|
123969
124195
|
});
|
|
123970
124196
|
if (!completed) {
|
|
123971
124197
|
throw new DeferAbortedError(`Task ${taskId} reached a terminal state before this deferral committed.`);
|
|
@@ -124878,7 +125104,7 @@ function renderTaskSummaries(tasks) {
|
|
|
124878
125104
|
const rows = tasks.map((task) => {
|
|
124879
125105
|
const cells = [
|
|
124880
125106
|
task.id,
|
|
124881
|
-
task.status,
|
|
125107
|
+
task.statusKind ? `${task.status} (${task.statusKind})` : task.status,
|
|
124882
125108
|
task.priority,
|
|
124883
125109
|
task.agentId,
|
|
124884
125110
|
task.taskPreview ?? task.task
|
|
@@ -124890,6 +125116,7 @@ function renderTaskSummaries(tasks) {
|
|
|
124890
125116
|
}
|
|
124891
125117
|
async function getTasksHandler(ctx, {
|
|
124892
125118
|
status,
|
|
125119
|
+
statusKind,
|
|
124893
125120
|
mineOnly,
|
|
124894
125121
|
unassigned,
|
|
124895
125122
|
offeredToMe,
|
|
@@ -124908,6 +125135,7 @@ async function getTasksHandler(ctx, {
|
|
|
124908
125135
|
const agentId = ctx.kind === "owner" ? ctx.agentId : undefined;
|
|
124909
125136
|
const taskFilters = {
|
|
124910
125137
|
status,
|
|
125138
|
+
statusKind,
|
|
124911
125139
|
agentId: ctx.kind === "owner" && mineOnly ? agentId ?? undefined : undefined,
|
|
124912
125140
|
unassigned: ctx.kind === "owner" ? unassigned : undefined,
|
|
124913
125141
|
offeredTo: ctx.kind === "owner" && offeredToMe ? agentId ?? undefined : undefined,
|
|
@@ -124930,6 +125158,7 @@ async function getTasksHandler(ctx, {
|
|
|
124930
125158
|
agentId: t.agentId,
|
|
124931
125159
|
...includeFull ? { task: t.task } : { taskPreview: t.task },
|
|
124932
125160
|
status: t.status,
|
|
125161
|
+
statusKind: t.statusKind,
|
|
124933
125162
|
taskType: t.taskType,
|
|
124934
125163
|
tags: t.tags,
|
|
124935
125164
|
priority: t.priority,
|
|
@@ -124943,6 +125172,8 @@ async function getTasksHandler(ctx, {
|
|
|
124943
125172
|
const filters = [];
|
|
124944
125173
|
if (status)
|
|
124945
125174
|
filters.push(`status='${status}'`);
|
|
125175
|
+
if (statusKind)
|
|
125176
|
+
filters.push(`statusKind='${statusKind}'`);
|
|
124946
125177
|
if (ctx.kind === "owner" && mineOnly)
|
|
124947
125178
|
filters.push("mine only");
|
|
124948
125179
|
if (ctx.kind === "owner" && unassigned)
|
|
@@ -124997,6 +125228,7 @@ var init_get_tasks = __esm(() => {
|
|
|
124997
125228
|
task: string2().optional(),
|
|
124998
125229
|
taskPreview: string2().optional(),
|
|
124999
125230
|
status: AgentTaskStatusSchema.optional(),
|
|
125231
|
+
statusKind: string2().optional(),
|
|
125000
125232
|
taskType: string2().optional(),
|
|
125001
125233
|
tags: array2(string2()).optional(),
|
|
125002
125234
|
priority: number2().optional(),
|
|
@@ -125009,6 +125241,7 @@ var init_get_tasks = __esm(() => {
|
|
|
125009
125241
|
});
|
|
125010
125242
|
getTasksInputSchema = object2({
|
|
125011
125243
|
status: AgentTaskStatusSchema.optional().describe("Filter by task status (unassigned, offered, pending, in_progress, completed, failed)."),
|
|
125244
|
+
statusKind: TaskStatusKindSchema.optional().describe("Filter by why the task ended. Pair with status, e.g. status 'failed' + statusKind 'error' (crash, rate limit, exit code) vs 'agent' (the agent chose to fail)."),
|
|
125012
125245
|
mineOnly: boolean().optional().describe("Only return tasks assigned to you."),
|
|
125013
125246
|
unassigned: boolean().optional().describe("Only return unassigned tasks in the pool."),
|
|
125014
125247
|
offeredToMe: boolean().optional().describe("Only return tasks offered to you (awaiting accept/reject)."),
|
|
@@ -125899,6 +126132,7 @@ var userOutputShape, IdentityEntry, InputSchema, registerManageUserTool = (serve
|
|
|
125899
126132
|
timezone: input.timezone,
|
|
125900
126133
|
dailyBudgetUsd: input.dailyBudgetUsd ?? undefined,
|
|
125901
126134
|
status: input.status,
|
|
126135
|
+
avatar: input.avatar,
|
|
125902
126136
|
metadata
|
|
125903
126137
|
});
|
|
125904
126138
|
for (const ident of input.identities ?? []) {
|
|
@@ -125941,6 +126175,7 @@ var userOutputShape, IdentityEntry, InputSchema, registerManageUserTool = (serve
|
|
|
125941
126175
|
timezone: input.timezone,
|
|
125942
126176
|
dailyBudgetUsd: input.dailyBudgetUsd,
|
|
125943
126177
|
status: input.status,
|
|
126178
|
+
avatar: input.avatar,
|
|
125944
126179
|
metadata
|
|
125945
126180
|
});
|
|
125946
126181
|
if (!updated)
|
|
@@ -126004,6 +126239,7 @@ var init_manage_user = __esm(() => {
|
|
|
126004
126239
|
init_users();
|
|
126005
126240
|
init_rbac();
|
|
126006
126241
|
init_utils();
|
|
126242
|
+
init_types5();
|
|
126007
126243
|
userOutputShape = looseObject({
|
|
126008
126244
|
id: string2().optional(),
|
|
126009
126245
|
name: string2().optional(),
|
|
@@ -126016,6 +126252,7 @@ var init_manage_user = __esm(() => {
|
|
|
126016
126252
|
metadata: record2(string2(), unknown()).optional(),
|
|
126017
126253
|
dailyBudgetUsd: number2().nullable().optional(),
|
|
126018
126254
|
status: _enum2(["invited", "active", "suspended"]).optional(),
|
|
126255
|
+
avatar: looseObject({}).nullable().optional(),
|
|
126019
126256
|
createdAt: string2().optional(),
|
|
126020
126257
|
lastUpdatedAt: string2().optional()
|
|
126021
126258
|
});
|
|
@@ -126037,6 +126274,7 @@ var init_manage_user = __esm(() => {
|
|
|
126037
126274
|
dailyBudgetUsd: number2().nullable().optional().describe("Daily budget in USD (null clears the cap)"),
|
|
126038
126275
|
status: _enum2(["invited", "active", "suspended"]).optional().describe("User status — invited / active / suspended"),
|
|
126039
126276
|
metadata: record2(string2(), unknown()).nullable().optional().describe("Free-form JSON metadata (null clears the field)"),
|
|
126277
|
+
avatar: UserAvatarSchema.nullable().optional().describe("Custom avatar, one of: { type: 'lucide', icon: '<kebab-case-lucide-name>', color?: '#RRGGBB' }; { type: 'url', url: 'https://…' } (https image, no credentials); { type: 'agent-fs', path: '/users/<id>/avatar.png', orgId?, driveId? } (an image in agent-fs; pass both IDs or neither for the swarm drive). Pass null to reset to initials."),
|
|
126040
126278
|
comms: object2({
|
|
126041
126279
|
tone: string2().nullable().optional(),
|
|
126042
126280
|
language: string2().nullable().optional(),
|
|
@@ -143548,7 +143786,7 @@ async function readScriptActionAllowlist() {
|
|
|
143548
143786
|
const [row] = await getSwarmConfigs2({ scope: "global", key: UI_SPEC_SCRIPT_ACTIONS_KEY });
|
|
143549
143787
|
if (row)
|
|
143550
143788
|
return row.value;
|
|
143551
|
-
const { getDeploymentEnvValue } = await import("./core-
|
|
143789
|
+
const { getDeploymentEnvValue } = await import("./core-bwp98v4w.js");
|
|
143552
143790
|
return getDeploymentEnvValue(UI_SPEC_SCRIPT_ACTIONS_KEY);
|
|
143553
143791
|
}
|
|
143554
143792
|
async function loadScriptActionLookups() {
|
|
@@ -144104,7 +144342,7 @@ This check refuses once per task; the next completion is accepted without the sp
|
|
|
144104
144342
|
}
|
|
144105
144343
|
}
|
|
144106
144344
|
if (status === "completed") {
|
|
144107
|
-
const result = await completeTask2(taskId, output);
|
|
144345
|
+
const result = await completeTask2(taskId, output, { statusKind: "agent" });
|
|
144108
144346
|
if (result && uiSpecToStore)
|
|
144109
144347
|
await upsertTaskUiSpec(taskId, uiSpecToStore);
|
|
144110
144348
|
if (result) {
|
|
@@ -144131,7 +144369,9 @@ This check refuses once per task; the next completion is accepted without the sp
|
|
|
144131
144369
|
}
|
|
144132
144370
|
}
|
|
144133
144371
|
} else if (status === "failed") {
|
|
144134
|
-
const result = await failTask2(taskId, failureReason ?? "Unknown failure"
|
|
144372
|
+
const result = await failTask2(taskId, failureReason ?? "Unknown failure", {
|
|
144373
|
+
statusKind: "agent"
|
|
144374
|
+
});
|
|
144135
144375
|
if (result) {
|
|
144136
144376
|
updatedTask = result;
|
|
144137
144377
|
getDbClient2().afterCommit(() => {
|
|
@@ -144156,7 +144396,7 @@ This check refuses once per task; the next completion is accepted without the sp
|
|
|
144156
144396
|
}
|
|
144157
144397
|
}
|
|
144158
144398
|
} else if (status === "skipped") {
|
|
144159
|
-
const result = await skipTask2(taskId, skipReason);
|
|
144399
|
+
const result = await skipTask2(taskId, skipReason, { statusKind: "agent" });
|
|
144160
144400
|
if (result) {
|
|
144161
144401
|
updatedTask = result;
|
|
144162
144402
|
if (existingTask.agentId) {
|
|
@@ -148034,4 +148274,4 @@ var init_server = __esm(() => {
|
|
|
148034
148274
|
loggedToolAllowlistWarnings = new Set;
|
|
148035
148275
|
});
|
|
148036
148276
|
|
|
148037
|
-
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, decodeStandardWebhookSecret, verifyStandardWebhookSignature, verifyTokenEquality, WebhookError, init_triggers, snapshotAndUpdateWorkflow, init_version, applyPreTaskCreate, init_apply_task_create, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, init_raw_llm, getExecutorRegistry2, initWorkflows2, init_workflows, isGitHubEnabled, initGitHub, verifyWebhookSignature, getWorkerInstallationToken, init_app, isReservedProviderEvent, init_event_waits, stripSiblingBlock, init_sibling_block, createTaskWithSiblingAwareness, init_sibling_awareness, dispatchScheduleTarget, calculateNextRun2, parseSchedulerIntervalMs2, 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, hasNativeToolHandlers2, listRegistered2, dispatchPre2, dispatchPost2, init_dispatcher, resolveIdentity, renderIdentity, init_identity, dismissedNamespace, dismissUnmappedIdentity, restoreUnmappedIdentity, 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, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, init_github, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, init_gitlab, isChatSdkEnabled, getChatSdkConfig, init_config2, 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, cancelApprovalRequest, cancelApprovalRequestAndRun, init_approval_cancel, resolveRequestPrincipal, requestPrincipal, agentFirstPrincipal, requireAuthKind, rejectGuest, init_request_principal, 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, resolveTaskRequester, init_task_requester, handleApps, init_apps, parseScene, init_elements, MAX_OBJECT_BYTES, init_write_object, 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, DEFAULT_THEME_ID, THEME_PRESET_IDS, getThemePreset, init_presets, DesignSystemError, buildDesignSystem, init_design_system, getDesignSystem, getActiveDesignSystem, saveDesignSystem, init_design_system2, snapshotPage, init_version3, 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, scriptNameSchema, scriptToolOutputSchema, scriptsApiToolResult, init_script_common, 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_config3, changesMergePolicy, init_repo_merge_policy, updateSwarmRepoChecked, init_repo_checked_update, getCombConfig, init_config4, 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, changesScheduleTarget, init_validate, renderTypeBlobs, init_script_query_types, renderRunOutput, init_script_run, renderSearchResults, searchSuccessMessage, init_script_search, followUpThreadForSourceTask, evaluateFollowUpRedelegation, init_follow_up_redelegation_guard, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, init_send_task, setSheetRange, appendSheetRows, clearSheetRange, init_service, 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 };
|
|
148277
|
+
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, decodeStandardWebhookSecret, verifyStandardWebhookSignature, verifyTokenEquality, WebhookError, init_triggers, snapshotAndUpdateWorkflow, init_version, applyPreTaskCreate, init_apply_task_create, RawLlmConfigSchema, RawLlmOutputSchema, executeRawLlm, init_raw_llm, getExecutorRegistry2, initWorkflows2, init_workflows, isGitHubEnabled, initGitHub, verifyWebhookSignature, getWorkerInstallationToken, init_app, isReservedProviderEvent, init_event_waits, stripSiblingBlock, init_sibling_block, createTaskWithSiblingAwareness, init_sibling_awareness, hasPendingEventWait, init_deferred_task_waits, dispatchScheduleTarget, calculateNextRun2, parseSchedulerIntervalMs2, 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, hasNativeToolHandlers2, listRegistered2, dispatchPre2, dispatchPost2, init_dispatcher, resolveIdentity, renderIdentity, init_identity, dismissedNamespace, dismissUnmappedIdentity, restoreUnmappedIdentity, 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, handlePullRequest, handleIssue, handleComment, handlePullRequestReview, handleCheckRun, handleCheckSuite, handleWorkflowRun, init_github, isGitLabEnabled, initGitLab, verifyGitLabWebhook, handleMergeRequest, handleIssue2, handleNote, handlePipeline, init_gitlab, isChatSdkEnabled, getChatSdkConfig, init_config2, 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, cancelApprovalRequest, cancelApprovalRequestAndRun, init_approval_cancel, resolveRequestPrincipal, requestPrincipal, agentFirstPrincipal, requireAuthKind, rejectGuest, init_request_principal, 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, resolveTaskRequester, init_task_requester, handleApps, init_apps, parseScene, init_elements, MAX_OBJECT_BYTES, init_write_object, 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, DEFAULT_THEME_ID, THEME_PRESET_IDS, getThemePreset, init_presets, DesignSystemError, buildDesignSystem, init_design_system, getDesignSystem, getActiveDesignSystem, saveDesignSystem, init_design_system2, snapshotPage, init_version3, 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, scriptNameSchema, scriptToolOutputSchema, scriptsApiToolResult, init_script_common, 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_config3, changesMergePolicy, init_repo_merge_policy, updateSwarmRepoChecked, init_repo_checked_update, getCombConfig, init_config4, 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, changesScheduleTarget, init_validate, renderTypeBlobs, init_script_query_types, renderRunOutput, init_script_run, renderSearchResults, searchSuccessMessage, init_script_search, followUpThreadForSourceTask, evaluateFollowUpRedelegation, init_follow_up_redelegation_guard, checkOutputSchemaShape, sendTaskOutputSchema, sendTaskHandler, init_send_task, setSheetRange, appendSheetRows, clearSheetRange, init_service, 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 };
|