@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
|
@@ -523,7 +523,7 @@ import {
|
|
|
523
523
|
countScriptRunJournalSteps2,
|
|
524
524
|
countScriptRunJournalAgentTaskSteps2,
|
|
525
525
|
init_db4
|
|
526
|
-
} from "./cli-
|
|
526
|
+
} from "./cli-zzq96q57.js";
|
|
527
527
|
import {
|
|
528
528
|
PRIMARY_ROLE_NAMES2,
|
|
529
529
|
OperatorGrantedTargetError2,
|
|
@@ -537,7 +537,7 @@ import {
|
|
|
537
537
|
assertNotLastAdmin2,
|
|
538
538
|
setUserRoles2,
|
|
539
539
|
init_rbac_roles
|
|
540
|
-
} from "./cli-
|
|
540
|
+
} from "./cli-34fygf87.js";
|
|
541
541
|
import {
|
|
542
542
|
MAX_MODEL_GROUP_MEMBERS,
|
|
543
543
|
listModelGroups,
|
|
@@ -547,17 +547,17 @@ import {
|
|
|
547
547
|
modelGroupReferences,
|
|
548
548
|
deleteModelGroup,
|
|
549
549
|
init_model_groups
|
|
550
|
-
} from "./cli-
|
|
550
|
+
} from "./cli-7ypg8hka.js";
|
|
551
551
|
import {
|
|
552
552
|
requestModelCatalogRefresh2,
|
|
553
553
|
init_pricing_refresh
|
|
554
|
-
} from "./cli-
|
|
554
|
+
} from "./cli-pedm2kht.js";
|
|
555
555
|
import {
|
|
556
556
|
workflowEventBus2,
|
|
557
557
|
init_event_bus
|
|
558
558
|
} from "./cli-ybte1fqc.js";
|
|
559
|
-
import"./cli-
|
|
560
|
-
import"./cli-
|
|
559
|
+
import"./cli-5n9w2xzx.js";
|
|
560
|
+
import"./cli-4gaf3tx5.js";
|
|
561
561
|
import"./cli-vr4eyq6p.js";
|
|
562
562
|
import"./cli-r8ddn0hf.js";
|
|
563
563
|
import {
|
|
@@ -597,7 +597,7 @@ import {
|
|
|
597
597
|
startSlackApp2,
|
|
598
598
|
stopSlackApp2,
|
|
599
599
|
init_app4
|
|
600
|
-
} from "./cli-
|
|
600
|
+
} from "./cli-zbbtp02a.js";
|
|
601
601
|
import {
|
|
602
602
|
reconcileAgentMaxTasksPolicy,
|
|
603
603
|
upsertSwarmConfigWithPolicyMirror,
|
|
@@ -611,12 +611,12 @@ import {
|
|
|
611
611
|
reconcileAgentStatusFromRuntimes,
|
|
612
612
|
listRuntimeInstancesForPool,
|
|
613
613
|
init_multi_runtime
|
|
614
|
-
} from "./cli-
|
|
614
|
+
} from "./cli-evy3egte.js";
|
|
615
615
|
import {
|
|
616
616
|
retryFailedRun2,
|
|
617
617
|
cancelWorkflowRun2,
|
|
618
618
|
init_resume
|
|
619
|
-
} from "./cli-
|
|
619
|
+
} from "./cli-55h8m1x3.js";
|
|
620
620
|
import {
|
|
621
621
|
safeParse,
|
|
622
622
|
getObjectShape,
|
|
@@ -693,6 +693,8 @@ import {
|
|
|
693
693
|
init_sibling_block,
|
|
694
694
|
createTaskWithSiblingAwareness,
|
|
695
695
|
init_sibling_awareness,
|
|
696
|
+
hasPendingEventWait,
|
|
697
|
+
init_deferred_task_waits,
|
|
696
698
|
dispatchScheduleTarget,
|
|
697
699
|
calculateNextRun2,
|
|
698
700
|
init_scheduler,
|
|
@@ -1123,7 +1125,7 @@ import {
|
|
|
1123
1125
|
getEnabledCapabilities,
|
|
1124
1126
|
createServer,
|
|
1125
1127
|
init_server
|
|
1126
|
-
} from "./cli-
|
|
1128
|
+
} from "./cli-wzecestt.js";
|
|
1127
1129
|
import {
|
|
1128
1130
|
getFileStorageProvider2,
|
|
1129
1131
|
init_registry2
|
|
@@ -1149,7 +1151,7 @@ import {
|
|
|
1149
1151
|
resolvePoolDelivery2,
|
|
1150
1152
|
createPoolAgent2,
|
|
1151
1153
|
init_db2
|
|
1152
|
-
} from "./cli-
|
|
1154
|
+
} from "./cli-f9xw9pr4.js";
|
|
1153
1155
|
import {
|
|
1154
1156
|
warnIfCorsAllowsAnyOrigin,
|
|
1155
1157
|
isOriginAllowedForCredentials,
|
|
@@ -1198,7 +1200,7 @@ import {
|
|
|
1198
1200
|
describeRequestRoute,
|
|
1199
1201
|
route,
|
|
1200
1202
|
init_route_def
|
|
1201
|
-
} from "./cli-
|
|
1203
|
+
} from "./cli-tt7dkwjj.js";
|
|
1202
1204
|
import {
|
|
1203
1205
|
startPoolRouting,
|
|
1204
1206
|
stopPoolRouting,
|
|
@@ -1211,17 +1213,17 @@ import {
|
|
|
1211
1213
|
checkHeartbeatChecklist2,
|
|
1212
1214
|
runHeartbeatSweep2,
|
|
1213
1215
|
stopHeartbeat2
|
|
1214
|
-
} from "./cli-
|
|
1215
|
-
import"./cli-
|
|
1216
|
+
} from "./cli-qrvk9nka.js";
|
|
1217
|
+
import"./cli-5tq15aa7.js";
|
|
1216
1218
|
import {
|
|
1217
1219
|
runtimeSupervisorStatus,
|
|
1218
1220
|
startRuntimeSupervisor,
|
|
1219
1221
|
stopRuntimeSupervisor
|
|
1220
|
-
} from "./cli-
|
|
1222
|
+
} from "./cli-b42yfn17.js";
|
|
1221
1223
|
import {
|
|
1222
1224
|
TASK_TITLE_TIMEOUT_MS,
|
|
1223
1225
|
generateTaskTitle
|
|
1224
|
-
} from "./cli-
|
|
1226
|
+
} from "./cli-9n6g14vs.js";
|
|
1225
1227
|
import"./cli-ns59dc6r.js";
|
|
1226
1228
|
import {
|
|
1227
1229
|
ACP_TARGET_IDS
|
|
@@ -1233,7 +1235,7 @@ import {
|
|
|
1233
1235
|
import {
|
|
1234
1236
|
MAX_RATE_LIMIT_RESET_MS,
|
|
1235
1237
|
MAX_SPEND_CAP_HOLD_MS
|
|
1236
|
-
} from "./cli-
|
|
1238
|
+
} from "./cli-sejvnjvw.js";
|
|
1237
1239
|
import {
|
|
1238
1240
|
AgentFsRequestError2,
|
|
1239
1241
|
resolveAgentFsSharedContext2,
|
|
@@ -1244,10 +1246,10 @@ import {
|
|
|
1244
1246
|
agentFsRequest2,
|
|
1245
1247
|
resolveApiUrl2,
|
|
1246
1248
|
init_agent_fs_provision
|
|
1247
|
-
} from "./cli-
|
|
1249
|
+
} from "./cli-ewk3sg68.js";
|
|
1248
1250
|
import {
|
|
1249
1251
|
Anthropic
|
|
1250
|
-
} from "./cli-
|
|
1252
|
+
} from "./cli-q41qar56.js";
|
|
1251
1253
|
import {
|
|
1252
1254
|
isLeadChannelMonitoringEnabled,
|
|
1253
1255
|
SIMILARITY_THRESHOLD,
|
|
@@ -1255,13 +1257,13 @@ import {
|
|
|
1255
1257
|
isUnknownModelError,
|
|
1256
1258
|
checkProviderPoolKey,
|
|
1257
1259
|
writeSkillsToFilesystem
|
|
1258
|
-
} from "./cli-
|
|
1260
|
+
} from "./cli-jdq3jmny.js";
|
|
1259
1261
|
import {
|
|
1260
1262
|
objectWebhookSecret2,
|
|
1261
1263
|
handleObjectWebhookEvent2,
|
|
1262
1264
|
init_object_webhooks
|
|
1263
|
-
} from "./cli-
|
|
1264
|
-
import"./cli-
|
|
1265
|
+
} from "./cli-s8dhq7rj.js";
|
|
1266
|
+
import"./cli-3860pmrq.js";
|
|
1265
1267
|
import {
|
|
1266
1268
|
createUserMergeJob2,
|
|
1267
1269
|
getUserMergeJob2,
|
|
@@ -1270,7 +1272,7 @@ import {
|
|
|
1270
1272
|
findFailedUserMergeJob2,
|
|
1271
1273
|
requeueUserMergeJob2,
|
|
1272
1274
|
runUserMergeJobs2
|
|
1273
|
-
} from "./cli-
|
|
1275
|
+
} from "./cli-abby987g.js";
|
|
1274
1276
|
import {
|
|
1275
1277
|
isCodexOAuthConfigKey
|
|
1276
1278
|
} from "./cli-j4bwnpkm.js";
|
|
@@ -1300,8 +1302,8 @@ import {
|
|
|
1300
1302
|
init_person_responder,
|
|
1301
1303
|
handleApprovalRequests,
|
|
1302
1304
|
init_approval_requests
|
|
1303
|
-
} from "./cli-
|
|
1304
|
-
import"./cli-
|
|
1305
|
+
} from "./cli-v09eza21.js";
|
|
1306
|
+
import"./cli-z40t85ms.js";
|
|
1305
1307
|
import {
|
|
1306
1308
|
RATING_MODEL_MAX_LENGTH,
|
|
1307
1309
|
REFERENCES_SOURCE_MAX_LENGTH,
|
|
@@ -1397,7 +1399,7 @@ import {
|
|
|
1397
1399
|
init_typecheck,
|
|
1398
1400
|
parseSkillContent,
|
|
1399
1401
|
init_skill_parser
|
|
1400
|
-
} from "./cli-
|
|
1402
|
+
} from "./cli-ced4azn1.js";
|
|
1401
1403
|
import {
|
|
1402
1404
|
signalProcessGroup,
|
|
1403
1405
|
detachedProcessGroup,
|
|
@@ -1414,17 +1416,17 @@ import {
|
|
|
1414
1416
|
forceRefreshAuthorizationOrThrow,
|
|
1415
1417
|
forceRefreshTokenOrThrow,
|
|
1416
1418
|
init_ensure_token
|
|
1417
|
-
} from "./cli-
|
|
1419
|
+
} from "./cli-5web09sb.js";
|
|
1418
1420
|
import {
|
|
1419
1421
|
PRIMITIVE_KINDS,
|
|
1420
1422
|
ObjectsError,
|
|
1421
1423
|
recordObjectVersion,
|
|
1422
1424
|
init_objects
|
|
1423
|
-
} from "./cli-
|
|
1425
|
+
} from "./cli-j69pzrrz.js";
|
|
1424
1426
|
import {
|
|
1425
1427
|
agentFsClientFor,
|
|
1426
1428
|
init_agent_fs_identity
|
|
1427
|
-
} from "./cli-
|
|
1429
|
+
} from "./cli-zxa1vmx7.js";
|
|
1428
1430
|
import {
|
|
1429
1431
|
FilesError,
|
|
1430
1432
|
normalizeFilesError,
|
|
@@ -1433,7 +1435,7 @@ import {
|
|
|
1433
1435
|
AgentFsProvider,
|
|
1434
1436
|
init_agent_fs_provider
|
|
1435
1437
|
} from "./cli-skd2c4ej.js";
|
|
1436
|
-
import"./cli-
|
|
1438
|
+
import"./cli-r3dxpmyt.js";
|
|
1437
1439
|
import {
|
|
1438
1440
|
automationIntegrationFixUrl,
|
|
1439
1441
|
preflightAutomation,
|
|
@@ -1455,7 +1457,7 @@ import {
|
|
|
1455
1457
|
definitionNodeIds,
|
|
1456
1458
|
validateDefinition,
|
|
1457
1459
|
init_definition2
|
|
1458
|
-
} from "./cli-
|
|
1460
|
+
} from "./cli-cp163xga.js";
|
|
1459
1461
|
import {
|
|
1460
1462
|
_fetchHolder,
|
|
1461
1463
|
CLIENT_ID,
|
|
@@ -1483,7 +1485,7 @@ import {
|
|
|
1483
1485
|
import {
|
|
1484
1486
|
createRuntimeProvider,
|
|
1485
1487
|
init_runtime_providers
|
|
1486
|
-
} from "./cli-
|
|
1488
|
+
} from "./cli-n79j1vxc.js";
|
|
1487
1489
|
import {
|
|
1488
1490
|
require_content_type
|
|
1489
1491
|
} from "./cli-1jx0srjt.js";
|
|
@@ -1497,7 +1499,7 @@ import {
|
|
|
1497
1499
|
toSessionSharesState,
|
|
1498
1500
|
setSessionShares,
|
|
1499
1501
|
init_session_shares
|
|
1500
|
-
} from "./cli-
|
|
1502
|
+
} from "./cli-kwj3131p.js";
|
|
1501
1503
|
import {
|
|
1502
1504
|
isInvalidClientError,
|
|
1503
1505
|
publicEndpointSsrfOptions,
|
|
@@ -1515,7 +1517,7 @@ import {
|
|
|
1515
1517
|
revokeMcpToken,
|
|
1516
1518
|
computeExpiresAt,
|
|
1517
1519
|
init_mcp_wrapper
|
|
1518
|
-
} from "./cli-
|
|
1520
|
+
} from "./cli-b9ygp1kz.js";
|
|
1519
1521
|
import"./cli-v41kn3cd.js";
|
|
1520
1522
|
import {
|
|
1521
1523
|
import_websocket,
|
|
@@ -1551,7 +1553,7 @@ import {
|
|
|
1551
1553
|
revokeAllAgentSessionTokens,
|
|
1552
1554
|
fingerprintApiKey,
|
|
1553
1555
|
init_users
|
|
1554
|
-
} from "./cli-
|
|
1556
|
+
} from "./cli-avax5mp9.js";
|
|
1555
1557
|
import {
|
|
1556
1558
|
CORE_TOOLS,
|
|
1557
1559
|
init_tool_config
|
|
@@ -1579,7 +1581,7 @@ import {
|
|
|
1579
1581
|
IDENTITY_FIELD_BUDGETS,
|
|
1580
1582
|
IdentityFieldBudgetError,
|
|
1581
1583
|
init_identity_field_budget
|
|
1582
|
-
} from "./cli-
|
|
1584
|
+
} from "./cli-19d6v8er.js";
|
|
1583
1585
|
import {
|
|
1584
1586
|
getSlackConfiguration,
|
|
1585
1587
|
init_config5
|
|
@@ -1601,13 +1603,16 @@ import {
|
|
|
1601
1603
|
isModelScopedWindow,
|
|
1602
1604
|
activeModelBlocks,
|
|
1603
1605
|
init_model_rate_limit_windows,
|
|
1606
|
+
CREDENTIAL_SELECTION_STRATEGIES,
|
|
1607
|
+
credentialSelectionStrategy,
|
|
1608
|
+
init_key_usage,
|
|
1604
1609
|
CREDENTIAL_POOL_VARS,
|
|
1605
1610
|
PROVIDER_CREDENTIAL_VARS,
|
|
1606
1611
|
getModelAwareCredentialVars,
|
|
1607
1612
|
splitCredentialPool,
|
|
1608
1613
|
selectCredential,
|
|
1609
1614
|
init_credentials2
|
|
1610
|
-
} from "./cli-
|
|
1615
|
+
} from "./cli-x2adbg4j.js";
|
|
1611
1616
|
import {
|
|
1612
1617
|
interpolate,
|
|
1613
1618
|
init_template2,
|
|
@@ -1617,7 +1622,7 @@ import {
|
|
|
1617
1622
|
resolveTemplate,
|
|
1618
1623
|
init_resolver,
|
|
1619
1624
|
init_session_templates
|
|
1620
|
-
} from "./cli-
|
|
1625
|
+
} from "./cli-nrt048ys.js";
|
|
1621
1626
|
import {
|
|
1622
1627
|
getOpenRouterAttributionHeaders,
|
|
1623
1628
|
init_openrouter_base_url
|
|
@@ -1650,6 +1655,7 @@ import {
|
|
|
1650
1655
|
AgentTaskStatusSchema,
|
|
1651
1656
|
TERMINAL_TASK_STATUSES,
|
|
1652
1657
|
isTerminalTaskStatus,
|
|
1658
|
+
TaskStatusKindSchema,
|
|
1653
1659
|
AgentTaskSourceSchema,
|
|
1654
1660
|
RoutingReasonSchema,
|
|
1655
1661
|
ProviderNameSchema,
|
|
@@ -1687,6 +1693,7 @@ import {
|
|
|
1687
1693
|
TaskTemplateSchema,
|
|
1688
1694
|
AgentStatusSchema,
|
|
1689
1695
|
AgentAvatarSchema,
|
|
1696
|
+
UserAvatarSchema,
|
|
1690
1697
|
AgentSlackIconSchema,
|
|
1691
1698
|
AgentSchema,
|
|
1692
1699
|
AgentHistoryEventSchema,
|
|
@@ -1796,7 +1803,7 @@ import {
|
|
|
1796
1803
|
KvKeySchema,
|
|
1797
1804
|
KvEntrySchema,
|
|
1798
1805
|
init_types5
|
|
1799
|
-
} from "./cli-
|
|
1806
|
+
} from "./cli-7r9tvk8v.js";
|
|
1800
1807
|
import {
|
|
1801
1808
|
init_zod
|
|
1802
1809
|
} from "./cli-96234j5w.js";
|
|
@@ -1836,11 +1843,11 @@ import {
|
|
|
1836
1843
|
getPublicMcpBaseUrl,
|
|
1837
1844
|
getAgentFsLiveUrl,
|
|
1838
1845
|
agentFsFileRoute,
|
|
1839
|
-
|
|
1846
|
+
buildAgentFsFileLink,
|
|
1840
1847
|
isCombEnabled,
|
|
1841
1848
|
isAgentFsProxyEnabled,
|
|
1842
1849
|
init_constants3
|
|
1843
|
-
} from "./cli-
|
|
1850
|
+
} from "./cli-grbngev5.js";
|
|
1844
1851
|
import {
|
|
1845
1852
|
parseEnvFlag,
|
|
1846
1853
|
isEnvFlagEnabled,
|
|
@@ -1849,7 +1856,7 @@ import {
|
|
|
1849
1856
|
import {
|
|
1850
1857
|
init_package,
|
|
1851
1858
|
package_default
|
|
1852
|
-
} from "./cli-
|
|
1859
|
+
} from "./cli-hd5bm1e1.js";
|
|
1853
1860
|
import {
|
|
1854
1861
|
realtimeBus,
|
|
1855
1862
|
init_bus
|
|
@@ -9295,6 +9302,7 @@ async function aggregateKeyWindowUsage(windows, through) {
|
|
|
9295
9302
|
}
|
|
9296
9303
|
|
|
9297
9304
|
// src/http/api-keys.ts
|
|
9305
|
+
init_key_usage();
|
|
9298
9306
|
init_model_rate_limit_windows();
|
|
9299
9307
|
init_provider_account_telemetry();
|
|
9300
9308
|
init_subscription_plans();
|
|
@@ -9617,7 +9625,11 @@ var getAvailable = route({
|
|
|
9617
9625
|
earliestModelResetAt: string2().nullable().optional(),
|
|
9618
9626
|
seatBlockedIndices: array2(number2().int()).optional(),
|
|
9619
9627
|
spendCappedIndices: array2(number2().int()),
|
|
9620
|
-
authFailureFence: number2().int()
|
|
9628
|
+
authFailureFence: number2().int(),
|
|
9629
|
+
keyUsage: array2(number2()),
|
|
9630
|
+
keyPace: array2(number2()),
|
|
9631
|
+
selectionStrategy: _enum2(CREDENTIAL_SELECTION_STRATEGIES),
|
|
9632
|
+
activeSessions: array2(number2().int().min(0))
|
|
9621
9633
|
})
|
|
9622
9634
|
},
|
|
9623
9635
|
400: { description: "Validation error" },
|
|
@@ -9987,6 +9999,10 @@ async function handleApiKeys(req, res, pathSegments, queryParams) {
|
|
|
9987
9999
|
spendCappedIndices: result.spendCappedIndices,
|
|
9988
10000
|
totalKeys,
|
|
9989
10001
|
authFailureFence: result.authFailureFence,
|
|
10002
|
+
keyUsage: result.keyUsage,
|
|
10003
|
+
keyPace: result.keyPace,
|
|
10004
|
+
selectionStrategy: credentialSelectionStrategy(process.env.CREDENTIAL_SELECTION_STRATEGY),
|
|
10005
|
+
activeSessions: result.activeSessions,
|
|
9990
10006
|
...model !== undefined ? {
|
|
9991
10007
|
modelBlockedIndices: result.modelBlockedIndices,
|
|
9992
10008
|
earliestModelResetAt: result.earliestModelResetAt,
|
|
@@ -10167,6 +10183,27 @@ init_db3();
|
|
|
10167
10183
|
init_session_shares();
|
|
10168
10184
|
init_rbac();
|
|
10169
10185
|
init_types5();
|
|
10186
|
+
|
|
10187
|
+
// src/http/asset-key-write.ts
|
|
10188
|
+
init_asset_key_auth();
|
|
10189
|
+
init_audit_user();
|
|
10190
|
+
init_users();
|
|
10191
|
+
init_request_auth_context();
|
|
10192
|
+
init_favorite_owner();
|
|
10193
|
+
async function resolveDashboardUserId(req, callerAgentId) {
|
|
10194
|
+
const auth = getRequestAuth(req);
|
|
10195
|
+
if (!isOperatorAuth(auth) || auth.page || callerAgentId || req.headers["x-agent-id"])
|
|
10196
|
+
return null;
|
|
10197
|
+
const picked = dashboardUserIdHeader(req);
|
|
10198
|
+
const user = picked ? await findUserById(picked) : null;
|
|
10199
|
+
return user?.status === "active" ? user.id : null;
|
|
10200
|
+
}
|
|
10201
|
+
async function authorizeHttpAssetKeyWrite(req, callerAgentId, key, trustedUserId) {
|
|
10202
|
+
const requester = trustedUserId === undefined ? await resolveHttpRequesterUserId(req, callerAgentId) : trustedUserId;
|
|
10203
|
+
return authorizeAssetKeyWrite(key, requester ?? await resolveDashboardUserId(req, callerAgentId));
|
|
10204
|
+
}
|
|
10205
|
+
|
|
10206
|
+
// src/http/assets.ts
|
|
10170
10207
|
init_request_principal();
|
|
10171
10208
|
init_route_def();
|
|
10172
10209
|
init_session_access();
|
|
@@ -10380,7 +10417,7 @@ async function handleAssets(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
10380
10417
|
return true;
|
|
10381
10418
|
try {
|
|
10382
10419
|
const actor = await resolveHttpRequesterUserId(req, myAgentId);
|
|
10383
|
-
const key = parsed.body.key ? await
|
|
10420
|
+
const key = parsed.body.key ? await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key, actor) : undefined;
|
|
10384
10421
|
const mapping = await upsertAssetKeyMapping2({
|
|
10385
10422
|
providerId: parsed.body.providerId,
|
|
10386
10423
|
providerOrgId: parsed.body.orgId,
|
|
@@ -10463,7 +10500,7 @@ async function handleAssets(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
10463
10500
|
}
|
|
10464
10501
|
try {
|
|
10465
10502
|
const actor = await resolveHttpRequesterUserId(req, myAgentId);
|
|
10466
|
-
const key = await
|
|
10503
|
+
const key = await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key, actor);
|
|
10467
10504
|
const moved = await moveAssetKey2({
|
|
10468
10505
|
entityType: parsed.params.entityType,
|
|
10469
10506
|
id: parsed.params.id,
|
|
@@ -13483,6 +13520,7 @@ declare module "swarm-extension" {
|
|
|
13483
13520
|
| "chat"
|
|
13484
13521
|
| "workflow"
|
|
13485
13522
|
| "schedule"
|
|
13523
|
+
| "system"
|
|
13486
13524
|
| "slack"
|
|
13487
13525
|
| "agentmail"
|
|
13488
13526
|
| "mcp"
|
|
@@ -13492,7 +13530,6 @@ declare module "swarm-extension" {
|
|
|
13492
13530
|
| "gitlab"
|
|
13493
13531
|
| "azure-devops"
|
|
13494
13532
|
| "bitbucket"
|
|
13495
|
-
| "system"
|
|
13496
13533
|
| "linear"
|
|
13497
13534
|
| "jira"
|
|
13498
13535
|
| "comb"
|
|
@@ -13634,6 +13671,7 @@ declare module "swarm-extension" {
|
|
|
13634
13671
|
| "chat"
|
|
13635
13672
|
| "workflow"
|
|
13636
13673
|
| "schedule"
|
|
13674
|
+
| "system"
|
|
13637
13675
|
| "slack"
|
|
13638
13676
|
| "agentmail"
|
|
13639
13677
|
| "mcp"
|
|
@@ -13643,7 +13681,6 @@ declare module "swarm-extension" {
|
|
|
13643
13681
|
| "gitlab"
|
|
13644
13682
|
| "azure-devops"
|
|
13645
13683
|
| "bitbucket"
|
|
13646
|
-
| "system"
|
|
13647
13684
|
| "linear"
|
|
13648
13685
|
| "jira"
|
|
13649
13686
|
| "comb";
|
|
@@ -13673,6 +13710,23 @@ declare module "swarm-extension" {
|
|
|
13673
13710
|
rejectionReason?: string | undefined;
|
|
13674
13711
|
finishedAt?: string | undefined;
|
|
13675
13712
|
notifiedAt?: string | undefined;
|
|
13713
|
+
statusKind?:
|
|
13714
|
+
| "error"
|
|
13715
|
+
| "workflow"
|
|
13716
|
+
| "external"
|
|
13717
|
+
| "agent"
|
|
13718
|
+
| "runner"
|
|
13719
|
+
| "deferred"
|
|
13720
|
+
| "cascade"
|
|
13721
|
+
| "user"
|
|
13722
|
+
| "system"
|
|
13723
|
+
| "graceful_shutdown"
|
|
13724
|
+
| "context_limits"
|
|
13725
|
+
| "manual_supersede"
|
|
13726
|
+
| "crash_recovery"
|
|
13727
|
+
| "provider_fallback"
|
|
13728
|
+
| "workflow_retry"
|
|
13729
|
+
| undefined;
|
|
13676
13730
|
failureReason?: string | undefined;
|
|
13677
13731
|
output?: string | undefined;
|
|
13678
13732
|
progress?: string | undefined;
|
|
@@ -18680,21 +18734,27 @@ var installationTokenRoute = route({
|
|
|
18680
18734
|
path: "/api/github/installation-token",
|
|
18681
18735
|
pattern: ["api", "github", "installation-token"],
|
|
18682
18736
|
summary: "Mint a GitHub App installation token for worker git and gh",
|
|
18683
|
-
description: "Internal worker endpoint. Returns a short-lived installation token for
|
|
18737
|
+
description: "Internal worker endpoint. Returns a short-lived installation token for worker `git` and `gh`. With a `repo` (`owner/name`) whose owner is listed in the deployment env `GITHUB_APP_REPO_OWNERS`, the API resolves that repository's App installation with the App JWT and mints for it; the repository must also be registered in `swarm_repos` on the configured GitHub host (403 otherwise). Any other call mints for the installation in `GITHUB_APP_INSTALLATION_ID`, so single-installation deployments are unchanged and a caller never picks an installation the operator did not list. Only a registered agent (swarm API key plus X-Agent-ID, or an agent or runtime token) may call it; user, guest and ACP task tokens are refused. 404 when the App is not configured, so workers fall back to `GITHUB_TOKEN`.",
|
|
18684
18738
|
tags: ["GitHub"],
|
|
18685
|
-
body: object2({
|
|
18739
|
+
body: object2({
|
|
18740
|
+
repo: string2().max(200).regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, "repo must be `owner/name` (letters, digits, dot, dash, underscore)").optional()
|
|
18741
|
+
}).optional(),
|
|
18686
18742
|
responses: {
|
|
18687
18743
|
200: {
|
|
18688
18744
|
description: "Installation token and its expiry (ISO 8601)",
|
|
18689
18745
|
schema: object2({ token: string2(), expiresAt: string2() })
|
|
18690
18746
|
},
|
|
18691
|
-
403: {
|
|
18747
|
+
403: {
|
|
18748
|
+
description: "Caller is not a registered agent, or the repo of a listed owner is not registered in the swarm"
|
|
18749
|
+
},
|
|
18692
18750
|
404: { description: "GitHub App worker auth is not configured" },
|
|
18693
|
-
502: {
|
|
18751
|
+
502: {
|
|
18752
|
+
description: "GitHub refused or failed to mint the token, or the repo has no App installation"
|
|
18753
|
+
}
|
|
18694
18754
|
},
|
|
18695
18755
|
auth: { apiKey: true, agentId: true },
|
|
18696
18756
|
rbac: {
|
|
18697
|
-
ungated: "the handler admits only registered agent principals and mints for
|
|
18757
|
+
ungated: "the handler admits only registered agent principals and mints only for the fixed installation or the installation of a registered repo whose owner the deployment env lists"
|
|
18698
18758
|
}
|
|
18699
18759
|
});
|
|
18700
18760
|
async function handleGitHubToken(req, res, pathSegments, myAgentId) {
|
|
@@ -18713,11 +18773,15 @@ async function handleGitHubToken(req, res, pathSegments, myAgentId) {
|
|
|
18713
18773
|
jsonError(res, "Only a registered agent may mint a GitHub installation token", 403);
|
|
18714
18774
|
return true;
|
|
18715
18775
|
}
|
|
18716
|
-
const result = await getWorkerInstallationToken();
|
|
18776
|
+
const result = await getWorkerInstallationToken(parsed.body?.repo);
|
|
18717
18777
|
if (result.status === "unconfigured") {
|
|
18718
18778
|
jsonError(res, "GitHub App worker auth is not configured", 404);
|
|
18719
18779
|
return true;
|
|
18720
18780
|
}
|
|
18781
|
+
if (result.status === "forbidden") {
|
|
18782
|
+
jsonError(res, "The repo is not registered in the swarm", 403);
|
|
18783
|
+
return true;
|
|
18784
|
+
}
|
|
18721
18785
|
if (result.status === "error") {
|
|
18722
18786
|
jsonError(res, "GitHub did not mint an installation token", 502);
|
|
18723
18787
|
return true;
|
|
@@ -27192,7 +27256,7 @@ async function open(id) {
|
|
|
27192
27256
|
const scope = { taskId: "", name: "", key: row.path, orgId: row.orgId, driveId: row.driveId };
|
|
27193
27257
|
return { row, owner: row.ownerAgentId, provider: client.provider, scope };
|
|
27194
27258
|
}
|
|
27195
|
-
var withLink = (row) => ({ ...row, link:
|
|
27259
|
+
var withLink = (row) => ({ ...row, link: buildAgentFsFileLink(row) });
|
|
27196
27260
|
async function driveWatched(orgId, driveId) {
|
|
27197
27261
|
const hook = await getDbClient2().get("SELECT status FROM agent_fs_object_webhooks WHERE orgId = ? AND driveId = ?", [orgId, driveId]);
|
|
27198
27262
|
return hook?.status === "active";
|
|
@@ -28684,11 +28748,11 @@ async function handlePageProxy(req, res) {
|
|
|
28684
28748
|
// src/http/pages.ts
|
|
28685
28749
|
init_zod();
|
|
28686
28750
|
init_asset_key_auth();
|
|
28687
|
-
init_audit_user();
|
|
28688
28751
|
init_db4();
|
|
28689
28752
|
init_page_versions();
|
|
28690
28753
|
init_version3();
|
|
28691
28754
|
init_resolver();
|
|
28755
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
28692
28756
|
init_session_templates();
|
|
28693
28757
|
init_rbac();
|
|
28694
28758
|
init_sibling_awareness();
|
|
@@ -28701,7 +28765,6 @@ init_request_auth_context();
|
|
|
28701
28765
|
init_favorite_owner();
|
|
28702
28766
|
init_request_principal();
|
|
28703
28767
|
init_route_def();
|
|
28704
|
-
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
28705
28768
|
|
|
28706
28769
|
// src/http/tasks.ts
|
|
28707
28770
|
init_zod();
|
|
@@ -28906,6 +28969,7 @@ var AgentTaskSummarySchema = AgentTaskSchema.pick({
|
|
|
28906
28969
|
createdAt: true,
|
|
28907
28970
|
lastUpdatedAt: true,
|
|
28908
28971
|
finishedAt: true,
|
|
28972
|
+
statusKind: true,
|
|
28909
28973
|
peakContextPercent: true,
|
|
28910
28974
|
totalCostUsd: true
|
|
28911
28975
|
});
|
|
@@ -28974,6 +29038,7 @@ var listTasks = route({
|
|
|
28974
29038
|
tags: ["Tasks"],
|
|
28975
29039
|
query: object2({
|
|
28976
29040
|
status: string2().optional(),
|
|
29041
|
+
statusKind: TaskStatusKindSchema.optional().describe("Why the task ended, e.g. `status=failed&statusKind=error` (crash, rate limit, exit code) vs `statusKind=agent` (the agent chose to fail). Valid kinds per status: TASK_STATUS_KINDS in src/types.ts."),
|
|
28977
29042
|
agentId: string2().optional(),
|
|
28978
29043
|
scheduleId: string2().optional(),
|
|
28979
29044
|
workflowRunId: string2().uuid().optional(),
|
|
@@ -29622,6 +29687,7 @@ async function handleTasks(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
29622
29687
|
});
|
|
29623
29688
|
const filters = {
|
|
29624
29689
|
status,
|
|
29690
|
+
statusKind: parsed.query.statusKind,
|
|
29625
29691
|
agentId: parsed.query.agentId || undefined,
|
|
29626
29692
|
scheduleId: parsed.query.scheduleId || undefined,
|
|
29627
29693
|
workflowRunId: parsed.query.workflowRunId,
|
|
@@ -29711,7 +29777,7 @@ async function handleTasks(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
29711
29777
|
try {
|
|
29712
29778
|
const inheritedKey = parentTask?.key;
|
|
29713
29779
|
const requestedKey = parsed.body.key ?? inheritedKey;
|
|
29714
|
-
assetKey = requestedKey ? await
|
|
29780
|
+
assetKey = requestedKey ? await authorizeHttpAssetKeyWrite(req, myAgentId, requestedKey, trustedUserId) : undefined;
|
|
29715
29781
|
} catch (error) {
|
|
29716
29782
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
29717
29783
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -29872,7 +29938,9 @@ async function handleTasks(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
29872
29938
|
reason = body.reason;
|
|
29873
29939
|
} catch {}
|
|
29874
29940
|
}
|
|
29875
|
-
const cancelledTask = await cancelTask2(parsed.params.id, reason
|
|
29941
|
+
const cancelledTask = await cancelTask2(parsed.params.id, reason, {
|
|
29942
|
+
statusKind: principal.kind === "agent" ? "agent" : "user"
|
|
29943
|
+
});
|
|
29876
29944
|
if (!cancelledTask) {
|
|
29877
29945
|
jsonError(res, "Failed to cancel task", 500);
|
|
29878
29946
|
return true;
|
|
@@ -30246,19 +30314,19 @@ async function handleTasks(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
30246
30314
|
}
|
|
30247
30315
|
let updatedTask;
|
|
30248
30316
|
if (parsed.body.status === "completed") {
|
|
30249
|
-
const result = await completeTask2(parsed.params.id, parsed.body.output || "Completed by runner wrapper (no explicit output)");
|
|
30317
|
+
const result = await completeTask2(parsed.params.id, parsed.body.output || "Completed by runner wrapper (no explicit output)", { statusKind: "runner" });
|
|
30250
30318
|
if (!result) {
|
|
30251
30319
|
return { error: "Failed to complete task", status: 500 };
|
|
30252
30320
|
}
|
|
30253
30321
|
updatedTask = result;
|
|
30254
30322
|
} else if (parsed.body.status === "skipped") {
|
|
30255
|
-
const result = await skipTask2(parsed.params.id, skipReason);
|
|
30323
|
+
const result = await skipTask2(parsed.params.id, skipReason, { statusKind: "runner" });
|
|
30256
30324
|
if (!result) {
|
|
30257
30325
|
return { error: "Failed to mark task as skipped", status: 500 };
|
|
30258
30326
|
}
|
|
30259
30327
|
updatedTask = result;
|
|
30260
30328
|
} else {
|
|
30261
|
-
const result = await failTask2(parsed.params.id, parsed.body.failureReason || "Process exited without explicit completion");
|
|
30329
|
+
const result = await failTask2(parsed.params.id, parsed.body.failureReason || "Process exited without explicit completion", { statusKind: "error" });
|
|
30262
30330
|
if (!result) {
|
|
30263
30331
|
return { error: "Failed to mark task as failed", status: 500 };
|
|
30264
30332
|
}
|
|
@@ -30609,7 +30677,9 @@ async function handleTasks(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
30609
30677
|
}
|
|
30610
30678
|
}
|
|
30611
30679
|
if (task.workflowRunStepId != null) {
|
|
30612
|
-
const failed = await failTask2(parsed.params.id, SUPERSEDED_WORKFLOW_TASK_REASON
|
|
30680
|
+
const failed = await failTask2(parsed.params.id, SUPERSEDED_WORKFLOW_TASK_REASON, {
|
|
30681
|
+
statusKind: "error"
|
|
30682
|
+
});
|
|
30613
30683
|
if (task.agentId) {
|
|
30614
30684
|
await updateAgentStatusFromCapacity2(task.agentId);
|
|
30615
30685
|
}
|
|
@@ -31056,7 +31126,7 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
31056
31126
|
passwordHash = await Bun.password.hash(parsed.body.password, "bcrypt");
|
|
31057
31127
|
}
|
|
31058
31128
|
try {
|
|
31059
|
-
const key = parsed.body.key ? await
|
|
31129
|
+
const key = parsed.body.key ? await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key) : undefined;
|
|
31060
31130
|
const page = await createPage2({
|
|
31061
31131
|
key,
|
|
31062
31132
|
agentId: myAgentId,
|
|
@@ -31260,7 +31330,7 @@ async function handlePages(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
31260
31330
|
let key;
|
|
31261
31331
|
if (parsed.body.key !== undefined) {
|
|
31262
31332
|
try {
|
|
31263
|
-
key = await
|
|
31333
|
+
key = await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key);
|
|
31264
31334
|
} catch (error) {
|
|
31265
31335
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
31266
31336
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -39379,11 +39449,11 @@ init_db3();
|
|
|
39379
39449
|
init_rbac();
|
|
39380
39450
|
init_scheduler();
|
|
39381
39451
|
init_types5();
|
|
39452
|
+
var import_cron_parser = __toESM(require_dist(), 1);
|
|
39382
39453
|
init_favorite_owner();
|
|
39383
39454
|
init_request_principal();
|
|
39384
39455
|
init_route_def();
|
|
39385
39456
|
init_utils2();
|
|
39386
|
-
var import_cron_parser = __toESM(require_dist(), 1);
|
|
39387
39457
|
var scheduleUpdateBodySchema = object2({
|
|
39388
39458
|
key: AssetKeySchema.optional(),
|
|
39389
39459
|
name: string2().optional(),
|
|
@@ -39709,7 +39779,7 @@ async function handleSchedules(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
39709
39779
|
const trustedUserId = await resolveHttpRequesterUserId(req, myAgentId);
|
|
39710
39780
|
let key;
|
|
39711
39781
|
try {
|
|
39712
|
-
key = body.key ? await
|
|
39782
|
+
key = body.key ? await authorizeHttpAssetKeyWrite(req, myAgentId, body.key, trustedUserId) : undefined;
|
|
39713
39783
|
} catch (error) {
|
|
39714
39784
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
39715
39785
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -39830,7 +39900,7 @@ async function handleSchedules(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
39830
39900
|
const body = parsed.body;
|
|
39831
39901
|
if (parsed.body.key !== undefined) {
|
|
39832
39902
|
try {
|
|
39833
|
-
body.key = await
|
|
39903
|
+
body.key = await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key);
|
|
39834
39904
|
} catch (error) {
|
|
39835
39905
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
39836
39906
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -44345,6 +44415,7 @@ var AgentTaskSummarySchema2 = AgentTaskSchema.pick({
|
|
|
44345
44415
|
createdAt: true,
|
|
44346
44416
|
lastUpdatedAt: true,
|
|
44347
44417
|
finishedAt: true,
|
|
44418
|
+
statusKind: true,
|
|
44348
44419
|
peakContextPercent: true,
|
|
44349
44420
|
totalCostUsd: true
|
|
44350
44421
|
});
|
|
@@ -44796,7 +44867,7 @@ async function withSessionMove(req, res, myAgentId, destination, run) {
|
|
|
44796
44867
|
try {
|
|
44797
44868
|
const changedBy = await resolveHttpRequesterUserId(req, myAgentId);
|
|
44798
44869
|
const actor = await resolveSessionActor2(req, myAgentId);
|
|
44799
|
-
const key = destination === null ? null : await
|
|
44870
|
+
const key = destination === null ? null : await authorizeHttpAssetKeyWrite(req, myAgentId, destination, changedBy);
|
|
44800
44871
|
await assertAssetKeyMovesAllowed2();
|
|
44801
44872
|
await run({ actor, changedBy: changedBy ?? undefined, key });
|
|
44802
44873
|
} catch (error) {
|
|
@@ -48287,6 +48358,7 @@ var createUserRoute = route({
|
|
|
48287
48358
|
metadata: record2(string2(), unknown()).optional(),
|
|
48288
48359
|
dailyBudgetUsd: number2().nullable().optional(),
|
|
48289
48360
|
status: _enum2(["invited", "active", "suspended"]).optional(),
|
|
48361
|
+
avatar: UserAvatarSchema.nullable().optional(),
|
|
48290
48362
|
identities: array2(object2({ kind: string2().min(1), externalId: string2().min(1) })).optional()
|
|
48291
48363
|
}),
|
|
48292
48364
|
responses: {
|
|
@@ -48428,6 +48500,7 @@ var updateUserRoute = route({
|
|
|
48428
48500
|
comms: UserCommsPrefsSchema.nullable().optional().describe("Merges into metadata.comms without touching sibling metadata keys; null removes only the comms key. When metadata is also provided, it is applied first and replaces the whole blob."),
|
|
48429
48501
|
dailyBudgetUsd: number2().nullable().optional(),
|
|
48430
48502
|
status: _enum2(["invited", "active", "suspended"]).optional(),
|
|
48503
|
+
avatar: UserAvatarSchema.nullable().optional(),
|
|
48431
48504
|
identities: array2(object2({ kind: string2().min(1), externalId: string2().min(1) })).optional()
|
|
48432
48505
|
}).refine((v) => Object.keys(v).length > 0, {
|
|
48433
48506
|
message: "At least one field must be provided"
|
|
@@ -49569,7 +49642,8 @@ async function handleUsers(req, res, pathSegments, queryParams) {
|
|
|
49569
49642
|
"timezone",
|
|
49570
49643
|
"preferredChannel",
|
|
49571
49644
|
"notes",
|
|
49572
|
-
"metadata"
|
|
49645
|
+
"metadata",
|
|
49646
|
+
"avatar"
|
|
49573
49647
|
];
|
|
49574
49648
|
for (const field of PROFILE_FIELDS) {
|
|
49575
49649
|
if (parsed.body[field] === undefined)
|
|
@@ -49810,6 +49884,7 @@ async function routeKapsoInbound(payload) {
|
|
|
49810
49884
|
}
|
|
49811
49885
|
|
|
49812
49886
|
// src/http/webhooks.ts
|
|
49887
|
+
init_deferred_task_waits();
|
|
49813
49888
|
init_errors2();
|
|
49814
49889
|
init_constants3();
|
|
49815
49890
|
init_github_host();
|
|
@@ -50067,7 +50142,7 @@ async function handleWebhooks(req, res, pathSegments) {
|
|
|
50067
50142
|
}
|
|
50068
50143
|
const eventType = req.headers["x-github-event"];
|
|
50069
50144
|
const signature = req.headers["x-hub-signature-256"];
|
|
50070
|
-
if (typeof eventType === "string" && eventType && !GITHUB_VERIFIED_EVENTS.has(eventType)) {
|
|
50145
|
+
if (typeof eventType === "string" && eventType && !GITHUB_VERIFIED_EVENTS.has(eventType) && !(eventType === "check_run" && await hasPendingEventWait("github", "vcs.pr.checks_done"))) {
|
|
50071
50146
|
countGithubIgnoredEvent(eventType);
|
|
50072
50147
|
githubWebhook.respond(res, 200, { created: false });
|
|
50073
50148
|
req.resume();
|
|
@@ -50165,6 +50240,17 @@ async function handleWebhooks(req, res, pathSegments) {
|
|
|
50165
50240
|
});
|
|
50166
50241
|
break;
|
|
50167
50242
|
}
|
|
50243
|
+
case "check_run": {
|
|
50244
|
+
const cr = body;
|
|
50245
|
+
workflowEventBus2.emit(`github.check_run.${cr.action}`, {
|
|
50246
|
+
repo: cr.repository.full_name,
|
|
50247
|
+
name: cr.check_run.name,
|
|
50248
|
+
headSha: cr.check_run.check_suite?.head_sha,
|
|
50249
|
+
conclusion: cr.check_run.conclusion,
|
|
50250
|
+
pullRequests: (cr.check_run.pull_requests ?? []).map((pr) => pr.number)
|
|
50251
|
+
});
|
|
50252
|
+
break;
|
|
50253
|
+
}
|
|
50168
50254
|
case "pull_request_review": {
|
|
50169
50255
|
const prr = body;
|
|
50170
50256
|
workflowEventBus2.emit("github.pull_request_review.submitted", {
|
|
@@ -51364,7 +51450,7 @@ async function handleWorkflows(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
51364
51450
|
const trustedUserId = await resolveHttpRequesterUserId(req, myAgentId);
|
|
51365
51451
|
let key;
|
|
51366
51452
|
try {
|
|
51367
|
-
key = parsed.body.key ? await
|
|
51453
|
+
key = parsed.body.key ? await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key, trustedUserId) : undefined;
|
|
51368
51454
|
} catch (error) {
|
|
51369
51455
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
51370
51456
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -51481,7 +51567,7 @@ async function handleWorkflows(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
51481
51567
|
const updateArgs = {};
|
|
51482
51568
|
if (parsed.body.key !== undefined) {
|
|
51483
51569
|
try {
|
|
51484
|
-
updateArgs.key = await
|
|
51570
|
+
updateArgs.key = await authorizeHttpAssetKeyWrite(req, myAgentId, parsed.body.key);
|
|
51485
51571
|
} catch (error) {
|
|
51486
51572
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
51487
51573
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -51569,7 +51655,7 @@ async function handleWorkflows(req, res, pathSegments, queryParams, myAgentId) {
|
|
|
51569
51655
|
let key;
|
|
51570
51656
|
if (body.key !== undefined) {
|
|
51571
51657
|
try {
|
|
51572
|
-
key = await
|
|
51658
|
+
key = await authorizeHttpAssetKeyWrite(req, myAgentId, body.key);
|
|
51573
51659
|
} catch (error) {
|
|
51574
51660
|
if (error instanceof AssetKeyAuthorizationError) {
|
|
51575
51661
|
jsonError(res, error.message, error.statusCode);
|
|
@@ -52226,7 +52312,7 @@ var httpServer = createHttpServer(async (req, res) => {
|
|
|
52226
52312
|
});
|
|
52227
52313
|
});
|
|
52228
52314
|
var detachRealtime = attachRealtimeTransport(httpServer);
|
|
52229
|
-
var { attachControllerTransport } = await import("./controllers-connect-
|
|
52315
|
+
var { attachControllerTransport } = await import("./controllers-connect-2ssqz7f4.js");
|
|
52230
52316
|
var detachControllers = attachControllerTransport(httpServer);
|
|
52231
52317
|
var stopWorkerNudges = startWorkerNudgeListener();
|
|
52232
52318
|
var taskAutoTitles = startTaskAutoTitleListener();
|
|
@@ -52257,7 +52343,7 @@ async function shutdown() {
|
|
|
52257
52343
|
sessionsProcessed: getServerSessionsProcessed()
|
|
52258
52344
|
});
|
|
52259
52345
|
if (hasCapability("scheduling")) {
|
|
52260
|
-
const { stopScheduler } = await import("./index-
|
|
52346
|
+
const { stopScheduler } = await import("./index-hmszyqkk.js");
|
|
52261
52347
|
stopScheduler();
|
|
52262
52348
|
}
|
|
52263
52349
|
stopHeartbeat2();
|
|
@@ -52269,7 +52355,7 @@ async function shutdown() {
|
|
|
52269
52355
|
await stopSlackApp2();
|
|
52270
52356
|
await stopChatSdk();
|
|
52271
52357
|
if (!isEnvFlagEnabled("OAUTH_KEEPALIVE_DISABLE", false)) {
|
|
52272
|
-
const { stopOAuthKeepalive } = await import("./keepalive-
|
|
52358
|
+
const { stopOAuthKeepalive } = await import("./keepalive-zhbmztqw.js");
|
|
52273
52359
|
await stopOAuthKeepalive();
|
|
52274
52360
|
}
|
|
52275
52361
|
stopOAuthPendingGc();
|
|
@@ -52359,21 +52445,21 @@ try {
|
|
|
52359
52445
|
console.warn("[startup] CAPABILITIES upgrade seed failed (non-fatal):", err);
|
|
52360
52446
|
}
|
|
52361
52447
|
try {
|
|
52362
|
-
const { ensurePricingSeeded } = await import("./boot-seeds-
|
|
52448
|
+
const { ensurePricingSeeded } = await import("./boot-seeds-hwnvgbb3.js");
|
|
52363
52449
|
ensurePricingSeeded();
|
|
52364
|
-
const { startPricingRefreshLoop } = await import("./pricing-refresh-
|
|
52450
|
+
const { startPricingRefreshLoop } = await import("./pricing-refresh-9355dj1t.js");
|
|
52365
52451
|
startPricingRefreshLoop();
|
|
52366
52452
|
} catch (err) {
|
|
52367
52453
|
console.error("[startup] Failed to seed pricing rows:", err);
|
|
52368
52454
|
}
|
|
52369
52455
|
try {
|
|
52370
|
-
const { ensureModelProfilesSeeded } = await import("./boot-seeds-
|
|
52456
|
+
const { ensureModelProfilesSeeded } = await import("./boot-seeds-hwnvgbb3.js");
|
|
52371
52457
|
await ensureModelProfilesSeeded();
|
|
52372
52458
|
} catch (err) {
|
|
52373
52459
|
console.error("[startup] Failed to seed model profiles:", err);
|
|
52374
52460
|
}
|
|
52375
52461
|
try {
|
|
52376
|
-
const { ensureRbacSeeded } = await import("./boot-seeds-
|
|
52462
|
+
const { ensureRbacSeeded } = await import("./boot-seeds-hwnvgbb3.js");
|
|
52377
52463
|
ensureRbacSeeded();
|
|
52378
52464
|
} catch (err) {
|
|
52379
52465
|
console.error("[startup] Failed to sync RBAC seed rows:", err);
|
|
@@ -52381,13 +52467,13 @@ try {
|
|
|
52381
52467
|
throw err;
|
|
52382
52468
|
}
|
|
52383
52469
|
try {
|
|
52384
|
-
const { runAllSeeders } = await import("./index-
|
|
52470
|
+
const { runAllSeeders } = await import("./index-z2g9469g.js");
|
|
52385
52471
|
await runAllSeeders({ scriptEmbeddingMode: "skip" });
|
|
52386
52472
|
} catch (err) {
|
|
52387
52473
|
console.error("[startup] Failed to seed built-in entities:", err);
|
|
52388
52474
|
}
|
|
52389
52475
|
try {
|
|
52390
|
-
const { runImports } = await import("./index-
|
|
52476
|
+
const { runImports } = await import("./index-yq9hhhhy.js");
|
|
52391
52477
|
await runImports();
|
|
52392
52478
|
} catch (err) {
|
|
52393
52479
|
console.error("[startup] File import failed:", scrubSecrets(err instanceof Error ? err.message : String(err)));
|
|
@@ -52438,10 +52524,10 @@ httpServer.listen(port, async () => {
|
|
|
52438
52524
|
startChatSdk().catch((err) => {
|
|
52439
52525
|
console.error("[chat-sdk] Failed to start, continuing without Chat SDK:", scrubSecrets(err instanceof Error ? err.message : String(err)));
|
|
52440
52526
|
});
|
|
52441
|
-
import("./agent-fs-provision-
|
|
52527
|
+
import("./agent-fs-provision-cbt2ttds.js").then(({ syncAgentFsOrgSwarmUrl }) => syncAgentFsOrgSwarmUrl(getConfiguredAppUrls()[0])).catch((err) => {
|
|
52442
52528
|
console.warn("[agent-fs] Failed to set the org swarm URL:", scrubSecrets(err instanceof Error ? err.message : String(err)));
|
|
52443
52529
|
});
|
|
52444
|
-
import("./object-webhooks-
|
|
52530
|
+
import("./object-webhooks-331hay92.js").then(({ ensureObjectWebhooksForKnownDrives }) => ensureObjectWebhooksForKnownDrives()).catch((err) => {
|
|
52445
52531
|
console.warn("[objects] agent-fs webhook boot check failed:", scrubSecrets(err instanceof Error ? err.message : String(err)));
|
|
52446
52532
|
});
|
|
52447
52533
|
startQueueStallAlarm();
|
|
@@ -52457,22 +52543,22 @@ httpServer.listen(port, async () => {
|
|
|
52457
52543
|
await initWorkflows2();
|
|
52458
52544
|
await startScriptRunSupervisor(getMcpBaseUrl());
|
|
52459
52545
|
if (hasCapability("scheduling")) {
|
|
52460
|
-
const { parseSchedulerIntervalMs, startScheduler } = await import("./index-
|
|
52461
|
-
const { getExecutorRegistry } = await import("./index-
|
|
52546
|
+
const { parseSchedulerIntervalMs, startScheduler } = await import("./index-hmszyqkk.js");
|
|
52547
|
+
const { getExecutorRegistry } = await import("./index-dtt0d634.js");
|
|
52462
52548
|
startScheduler(getExecutorRegistry(), parseSchedulerIntervalMs(process.env.SCHEDULER_INTERVAL_MS), { runId: globalState.__runId });
|
|
52463
52549
|
}
|
|
52464
52550
|
if (!isEnvFlagEnabled("HEARTBEAT_DISABLE", false)) {
|
|
52465
|
-
const { parseHeartbeatIntervalMs, startHeartbeat } = await import("./index-
|
|
52551
|
+
const { parseHeartbeatIntervalMs, startHeartbeat } = await import("./index-j6rm1rtn.js");
|
|
52466
52552
|
startHeartbeat(parseHeartbeatIntervalMs(process.env.HEARTBEAT_INTERVAL_MS));
|
|
52467
52553
|
}
|
|
52468
52554
|
startPoolRouting();
|
|
52469
52555
|
startRuntimeSupervisor();
|
|
52470
52556
|
if (!isEnvFlagEnabled("OAUTH_KEEPALIVE_DISABLE", false)) {
|
|
52471
|
-
const { startOAuthKeepalive } = await import("./keepalive-
|
|
52557
|
+
const { startOAuthKeepalive } = await import("./keepalive-zhbmztqw.js");
|
|
52472
52558
|
startOAuthKeepalive();
|
|
52473
52559
|
}
|
|
52474
52560
|
if (!isEnvFlagEnabled("OAUTH_REFRESH_SWEEP_DISABLE", false)) {
|
|
52475
|
-
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-
|
|
52561
|
+
const { startOAuthRefreshSweep } = await import("./oauth-refresh-sweep-w3cqmxq7.js");
|
|
52476
52562
|
startOAuthRefreshSweep();
|
|
52477
52563
|
}
|
|
52478
52564
|
startOAuthPendingGc();
|
|
@@ -52482,22 +52568,22 @@ httpServer.listen(port, async () => {
|
|
|
52482
52568
|
startSavingsRollup(savingsRollupSql);
|
|
52483
52569
|
startHumanFreeDrain();
|
|
52484
52570
|
startTaskSearchBackfill();
|
|
52485
|
-
import("./embedding-space-
|
|
52571
|
+
import("./embedding-space-qepzrach.js").then(({ runEmbeddingMaintenance, setDeploymentEnvReader }) => {
|
|
52486
52572
|
setDeploymentEnvReader(getDeploymentEnvValue2);
|
|
52487
52573
|
return runEmbeddingMaintenance({ backfill: true });
|
|
52488
52574
|
}).catch((err) => {
|
|
52489
52575
|
console.error("[embedding-space] startup maintenance failed (non-fatal):", err);
|
|
52490
52576
|
});
|
|
52491
|
-
import("./boot-args-schema-
|
|
52577
|
+
import("./boot-args-schema-g27kpzr1.js").then(({ runBootArgsSchemaBackfill }) => runBootArgsSchemaBackfill()).catch((err) => {
|
|
52492
52578
|
console.error("[boot-args-schema] startup backfill failed (non-fatal):", err);
|
|
52493
52579
|
});
|
|
52494
|
-
import("./boot-scrub-sweep-
|
|
52580
|
+
import("./boot-scrub-sweep-ss1vcamw.js").then(({ runBootScrubSweep }) => runBootScrubSweep()).catch((err) => {
|
|
52495
52581
|
console.error("[boot-scrub-sweep] startup scrub failed (non-fatal):", err);
|
|
52496
52582
|
});
|
|
52497
|
-
import("./user-merge-jobs-
|
|
52583
|
+
import("./user-merge-jobs-mxrhamwt.js").then(({ resumeUserMergeJobs }) => resumeUserMergeJobs()).catch((err) => {
|
|
52498
52584
|
console.error("[user-merge] startup resume failed (non-fatal):", err);
|
|
52499
52585
|
});
|
|
52500
|
-
import("./session-source-backfill-
|
|
52586
|
+
import("./session-source-backfill-cdm5s046.js").then(({ runSessionSourceBackfill }) => runSessionSourceBackfill()).catch((err) => {
|
|
52501
52587
|
console.error("[session-source-backfill] startup run failed (non-fatal):", err);
|
|
52502
52588
|
});
|
|
52503
52589
|
}).on("error", (err) => {
|