@desplega.ai/agent-swarm 2.3.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{acp-adapter-v85a2bqy.js → acp-adapter-zvzr538d.js} +9 -9
- package/dist/{actions-zgcxfspj.js → actions-jhtqdw69.js} +21 -19
- package/dist/{amp-adapter-jw9xfz42.js → amp-adapter-bd84rhs2.js} +4 -4
- package/dist/{app-4e1s4675.js → app-kreq1gwg.js} +3 -3
- package/dist/{assistant-v238n9dk.js → assistant-3k22sbsq.js} +23 -21
- package/dist/{boot-reembed-p666cw5n.js → boot-reembed-e53x6b9v.js} +1 -1
- package/dist/{boot-reembed-w6pm64j4.js → boot-reembed-f6z923ny.js} +1 -1
- package/dist/{boot-scrub-sweep-jcyjagn3.js → boot-scrub-sweep-0538vsb7.js} +4 -4
- package/dist/{boot-seeds-gbedmamp.js → boot-seeds-6wxqkfk2.js} +4 -4
- package/dist/{claude-adapter-q7wspzt8.js → claude-adapter-gfts5044.js} +9 -9
- package/dist/{claude-managed-adapter-n7ahjyx6.js → claude-managed-adapter-h2y889ge.js} +3 -3
- package/dist/{claude-managed-setup-wza784fb.js → claude-managed-setup-h00hsgtz.js} +2 -2
- package/dist/{claude-sdk-session-yf400ptr.js → claude-sdk-session-56besmfz.js} +13 -13
- package/dist/{cli-65q70v2v.js → cli-0bh477zn.js} +33 -6
- package/dist/{cli-4ync7m60.js → cli-0ebey9hg.js} +1 -1
- package/dist/{cli-665j3feb.js → cli-0xk505e8.js} +1 -1
- package/dist/{cli-7gh7020n.js → cli-1dmcq2eh.js} +1 -1
- package/dist/{cli-gzvb3d4a.js → cli-1jx0srjt.js} +3 -3
- package/dist/{cli-zj4d6afs.js → cli-1pa3rz69.js} +21 -6
- package/dist/{cli-7ayprxp7.js → cli-2dfbv8qr.js} +8 -0
- package/dist/{cli-30m5q8mc.js → cli-3kh4kpqy.js} +6 -6
- package/dist/{cli-qrwp40st.js → cli-3p8fqcnh.js} +2 -2
- package/dist/{cli-y3dvz6ge.js → cli-3r448dqn.js} +3 -3
- package/dist/{cli-a17tzmn0.js → cli-3tnpj2bh.js} +7 -7
- package/dist/{cli-ea7chd26.js → cli-471qk6s2.js} +93 -46
- package/dist/{cli-a49vpbf3.js → cli-5kqnemen.js} +1 -1
- package/dist/{cli-0rh20bp3.js → cli-6ncjvx55.js} +3 -3
- package/dist/{cli-fb6t92v8.js → cli-6x9ma5w5.js} +1 -1
- package/dist/{cli-k28p6xh7.js → cli-7225gwj7.js} +2 -2
- package/dist/{cli-8cvvytad.js → cli-8nyhf7za.js} +3 -3
- package/dist/{cli-e09hj50q.js → cli-8wkb09q5.js} +11 -11
- package/dist/{cli-j0v75y13.js → cli-a0kcty51.js} +4 -4
- package/dist/{cli-zes4tsbb.js → cli-a4gvwttf.js} +4 -4
- package/dist/{cli-jhp7w1fy.js → cli-a5ebc95n.js} +2 -2
- package/dist/{cli-5d1m1qca.js → cli-ash6xxk7.js} +2 -2
- package/dist/{cli-fp4xbw07.js → cli-axh29tyr.js} +14 -12
- package/dist/{cli-p22zdvnt.js → cli-bn0rewsy.js} +3 -3
- package/dist/{cli-hz64bcnj.js → cli-bn5kevnf.js} +11 -373
- package/dist/{cli-8jtrekpy.js → cli-d2mb5s8a.js} +7 -7
- package/dist/{cli-c5sbmw1v.js → cli-d82btycs.js} +94 -15
- package/dist/{cli-vjfpshn3.js → cli-ejs3m1sx.js} +1 -1
- package/dist/{cli-yv0vgscc.js → cli-fpmsqq59.js} +18 -2
- package/dist/cli-fz9kewbh.js +382 -0
- package/dist/{cli-4s1kqrqg.js → cli-g0hgtz4p.js} +6 -6
- package/dist/{cli-hn3pftj2.js → cli-gf0kfg81.js} +7 -7
- package/dist/{cli-d43xqzbe.js → cli-hqhzg1qq.js} +2 -2
- package/dist/{cli-azs9bhc5.js → cli-j4rqdf2n.js} +2 -2
- package/dist/{cli-wtg6edvd.js → cli-jh0qcrga.js} +1 -1
- package/dist/{cli-kqypty34.js → cli-k9z4zd4p.js} +6 -5
- package/dist/{cli-jhmjwqcg.js → cli-kmqgmcnb.js} +47 -14
- package/dist/{cli-8qsx817b.js → cli-kr2pmfqx.js} +583 -769
- package/dist/{cli-4g629sgr.js → cli-m2qgh5sv.js} +20 -1
- package/dist/{cli-9e9kjqsj.js → cli-mfe7f7b5.js} +2 -2
- package/dist/{cli-x3en6ct3.js → cli-nwyw3zhg.js} +1 -1
- package/dist/{cli-6vcyw6v7.js → cli-nx462e4v.js} +5 -3
- package/dist/{cli-tr24eeny.js → cli-p0rakbrk.js} +9 -9
- package/dist/{cli-4hmaheb6.js → cli-p6argxh9.js} +9 -9
- package/dist/{cli-3avfh5az.js → cli-pemywhfq.js} +2 -2
- package/dist/{cli-etvn5ej2.js → cli-pnp2j5zg.js} +2 -2
- package/dist/{cli-wk8ccrz6.js → cli-pw7v69vp.js} +2 -2
- package/dist/{cli-ka01m5rb.js → cli-rdq7tzwm.js} +17 -14
- package/dist/{cli-re4wkbzx.js → cli-rqqsfz30.js} +677 -104
- package/dist/{cli-xgn4rwyv.js → cli-s48yvzb8.js} +4 -4
- package/dist/{cli-zv4vy2b0.js → cli-s95dknxh.js} +1 -1
- package/dist/{cli-g6p7c2my.js → cli-sjyetj21.js} +2 -2
- package/dist/{cli-rdr166ht.js → cli-smvcw9z5.js} +1 -1
- package/dist/{cli-fhvqt2fp.js → cli-sv5gb0yb.js} +1 -1
- package/dist/{cli-yv3n83x8.js → cli-syhq378v.js} +2 -2
- package/dist/{cli-q1812jbw.js → cli-tbhwrxpt.js} +9 -9
- package/dist/{cli-w7z94e6c.js → cli-tx00c0h6.js} +4 -2
- package/dist/{cli-dxwh4j32.js → cli-vy0fay6k.js} +46 -37
- package/dist/{cli-ptkpaqfy.js → cli-wt645v7q.js} +1 -1
- package/dist/{cli-ppapy34w.js → cli-wxbn3yfx.js} +2 -2
- package/dist/{cli-cby329ny.js → cli-x5mq1fyq.js} +3 -3
- package/dist/{cli-rc3r0bnh.js → cli-xbzvet96.js} +6 -6
- package/dist/{cli-4mkvwgzr.js → cli-xf234ws8.js} +1 -1
- package/dist/{cli-6p7ddg72.js → cli-xftrvxag.js} +5 -5
- package/dist/cli-z071fb95.js +848 -0
- package/dist/{cli-1v8w782f.js → cli-z1ew8vbq.js} +14 -7
- package/dist/{cli-9td5ss65.js → cli-zfg9enh9.js} +3 -3
- package/dist/{cli-yxqag76b.js → cli-zw88zjba.js} +1 -1
- package/dist/cli.js +19 -19
- package/dist/{codex-adapter-nhjj2veb.js → codex-adapter-p6rmm7vv.js} +6 -6
- package/dist/{codex-hook-x6tm6y5m.js → codex-hook-x7nejyrr.js} +8 -5
- package/dist/{codex-login-35p4sk85.js → codex-login-m819c41r.js} +1 -1
- package/dist/{codex-session-runner-6hggrjbx.js → codex-session-runner-8vd5t9t0.js} +7 -7
- package/dist/{commands-mrw1ph2w.js → commands-7ems2p13.js} +2 -2
- package/dist/{controller-pt1zam5w.js → controller-m263fg43.js} +4 -4
- package/dist/{controllers-connect-ymw5541d.js → controllers-connect-bg33ae53.js} +28 -24
- package/dist/{cursor-adapter-cf4zh5x0.js → cursor-adapter-cz6nm6mj.js} +3 -3
- package/dist/{db-hy80219q.js → db-w505dwa8.js} +2 -2
- package/dist/{db-hhpy6m4x.js → db-ys2rbdft.js} +3 -2
- package/dist/{devin-adapter-7egzmt0k.js → devin-adapter-zgqadvnm.js} +1 -1
- package/dist/{dispatcher-6pdjtkr1.js → dispatcher-0s0mckqr.js} +20 -18
- package/dist/{docker-njavd3fb.js → docker-fkgtr75t.js} +2 -2
- package/dist/{dsh-adapter-fbx06re2.js → dsh-adapter-3n3net33.js} +3 -3
- package/dist/{e2b-5r6a5jeb.js → e2b-7am6tmq6.js} +2 -2
- package/dist/{e2b-pw1nvtmh.js → e2b-thdcxtjd.js} +2 -2
- package/dist/{easter-egg-3d-6hg2r942.js → easter-egg-3d-5cgynaja.js} +1 -1
- package/dist/{event-bus-101fenkh.js → event-bus-9vpk8gmq.js} +1 -1
- package/dist/{execute-bcqc69a5.js → execute-t4e6m3rw.js} +1 -1
- package/dist/{external-channel-j6vb6ya1.js → external-channel-5b23fv8z.js} +2 -2
- package/dist/{google-generative-ai-phpmwxvg.js → google-generative-ai-bmq8gkf3.js} +1 -1
- package/dist/{google-vertex-es9ybgdy.js → google-vertex-b1rvp52s.js} +1 -1
- package/dist/{grok-adapter-1193sprp.js → grok-adapter-q9fghe5q.js} +10 -10
- package/dist/handlers-mqrym347.js +39 -0
- package/dist/{heartbeat-h1w1ktce.js → heartbeat-tww6yx1w.js} +23 -21
- package/dist/{hook-ejja4bpe.js → hook-dx0pkvar.js} +16 -9
- package/dist/{hook-skrbja18.js → hook-pvmh9b6m.js} +6 -6
- package/dist/{http-mzh41mfj.js → http-k2ejbt05.js} +975 -292
- package/dist/{index-6rmnn89d.js → index-2z710v4x.js} +10 -10
- package/dist/{index-xmmkyx82.js → index-dgz61nff.js} +20 -18
- package/dist/{index-wgsw9xcz.js → index-g6tbb6ve.js} +1 -1
- package/dist/index-h2ek08d6.js +40 -0
- package/dist/index-pqfwh9nn.js +41 -0
- package/dist/{index-epr2gnbw.js → index-x5aktmp8.js} +1 -1
- package/dist/{index-x0q2a4f9.js → index-ysd45kgc.js} +1 -1
- package/dist/{index-g909y089.js → index-zgvqzjsw.js} +8 -8
- package/dist/{keepalive-4djvbm2j.js → keepalive-nhvpw10z.js} +4 -4
- package/dist/lead-jb6sf69z.js +78 -0
- package/dist/{maintenance-f3xhnjsm.js → maintenance-agakc519.js} +1 -1
- package/dist/{oauth-refresh-sweep-fpd6x6rw.js → oauth-refresh-sweep-4dcbhtn0.js} +3 -3
- package/dist/{onboard-196tjgyn.js → onboard-4n2kwa4v.js} +3 -3
- package/dist/{opencode-adapter-eeesgfqk.js → opencode-adapter-3s7ax02e.js} +7 -7
- package/dist/{otel-impl-g8fh4c21.js → otel-impl-tfa12080.js} +2 -2
- package/dist/{pi-mono-adapter-zasp3ze3.js → pi-mono-adapter-ytp7gz8b.js} +24 -13
- package/dist/{pricing-refresh-sdcf5yaz.js → pricing-refresh-3cqx3f3x.js} +3 -3
- package/dist/{rbac-roles-bsp5657v.js → rbac-roles-9fae5rnv.js} +5 -3
- package/dist/{rbac-roles-2x4g1wb5.js → rbac-roles-y6zbfzve.js} +2 -2
- package/dist/{render-v2-0pyb39bb.js → render-v2-emawjvc4.js} +3 -3
- package/dist/{resume-a86tkj6r.js → resume-zhgts7h7.js} +10 -8
- package/dist/{runtime-ar8310ba.js → runtime-xe3aqy4x.js} +1 -1
- package/dist/session-access-cm823e06.js +25 -0
- package/dist/{setup-ypbzcapd.js → setup-tkp99w1e.js} +1 -1
- package/dist/{virtual-modules-wzk6jf3a.js → virtual-modules-4r3zkc20.js} +2 -2
- package/dist/{work-objects-yjp8de12.js → work-objects-f722h263.js} +23 -21
- package/dist/worker-p7f336rq.js +78 -0
- package/dist/{x-8ewt8gxn.js → x-y45mthwn.js} +2 -2
- package/openapi.json +1086 -305
- package/package.json +2 -2
- package/src/apps/action-caller.ts +6 -0
- package/src/apps/action-runner.ts +146 -0
- package/src/apps/row-store.ts +4 -2
- package/src/apps/script-types.ts +17 -4
- package/src/be/db/active-sessions.ts +5 -0
- package/src/be/db/session-visibility.ts +29 -0
- package/src/be/db/tasks/read.ts +61 -3
- package/src/be/db/tasks/write.ts +15 -6
- package/src/be/db.ts +106 -37
- package/src/be/events.ts +11 -0
- package/src/be/fleet-benchmark-stats.ts +10 -5
- package/src/be/migrations/230_session_shares.sql +23 -0
- package/src/be/models-catalog.ts +4 -0
- package/src/be/onboarding.ts +6 -0
- package/src/be/rbac-roles.ts +2 -0
- package/src/be/scripts/typecheck.ts +13 -0
- package/src/be/session-shares.ts +244 -0
- package/src/be/swarm-config-guard.ts +33 -3
- package/src/be/telemetry-enable.ts +1 -1
- package/src/commands/provider-credentials.ts +12 -2
- package/src/commands/runner.ts +14 -0
- package/src/heartbeat/heartbeat.ts +2 -2
- package/src/hooks/codex-hook.ts +6 -2
- package/src/hooks/hook.ts +7 -0
- package/src/hooks/pr-body-guard.ts +38 -11
- package/src/hooks/pr-room-guard.ts +88 -0
- package/src/http/active-sessions.ts +13 -2
- package/src/http/agents.ts +11 -3
- package/src/http/all-routes.ts +1 -0
- package/src/http/api-keys.ts +3 -1
- package/src/http/approval-requests.ts +2 -1
- package/src/http/apps.ts +118 -190
- package/src/http/config.ts +3 -0
- package/src/http/context.ts +2 -0
- package/src/http/core.ts +39 -2
- package/src/http/events.ts +6 -2
- package/src/http/favorite-owner.ts +1 -1
- package/src/http/fleet-benchmark.ts +79 -30
- package/src/http/fs.ts +38 -3
- package/src/http/global-config.ts +7 -0
- package/src/http/index.ts +3 -1
- package/src/http/memory.ts +3 -1
- package/src/http/ranking.ts +351 -0
- package/src/http/realtime.ts +26 -21
- package/src/http/route-def.ts +77 -11
- package/src/http/script-runs.ts +2 -1
- package/src/http/scripts.ts +8 -0
- package/src/http/session-access.ts +179 -0
- package/src/http/session-data.ts +10 -2
- package/src/http/sessions.ts +212 -12
- package/src/http/stats.ts +7 -3
- package/src/http/tasks.ts +85 -8
- package/src/http/telemetry-ui.ts +1 -1
- package/src/http/used-by.ts +64 -20
- package/src/http/users.ts +2 -2
- package/src/prompts/session-templates.ts +3 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +15 -0
- package/src/providers/reasoning-effort.ts +2 -1
- package/src/providers/types.ts +2 -0
- package/src/ranking/telemetry-ranking.ts +119 -0
- package/src/ranking/usage.ts +57 -0
- package/src/rbac/admission.ts +22 -7
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +9 -0
- package/src/realtime/auth.ts +69 -0
- package/src/realtime/tickets.ts +4 -1
- package/src/realtime/transport.ts +77 -9
- package/src/scripts-runtime/sdk-allowlist.ts +7 -0
- package/src/scripts-runtime/types/stdlib.d.ts +31 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +31 -0
- package/src/server.ts +4 -0
- package/src/slack/blocks.ts +18 -0
- package/src/slack/dm.ts +29 -0
- package/src/telemetry-context.ts +19 -1
- package/src/telemetry-contract/EVENTS.md +45 -8
- package/src/telemetry-contract/SOURCE.json +38 -4
- package/src/telemetry-contract/catalog.json +294 -5
- package/src/telemetry-contract/ranking/fixtures/expected.json +30 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/bad-category.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/bad-claim.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/blank-description.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/blank-name.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/description-too-long.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/domain-uppercase.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/domain-with-scheme.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/domain-with-www.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/http-source-url.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/missing-description.json +10 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/missing-version.json +10 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/name-not-string.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/name-too-long.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/not-object.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/null.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/other-with-subcategory.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/oversize.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/short-claim.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/subcategory-other-category.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/trailing-data.json +1 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/unknown-field.json +12 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/unsupported-version.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/updated-at-not-date.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/updated-at-offset.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/invalid/wrong-case-field.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/category-without-subcategory.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/full.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/minimal.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/no-claim.json +10 -0
- package/src/telemetry-contract/ranking/fixtures/valid/padded-text.json +11 -0
- package/src/telemetry-contract/ranking/fixtures/valid/unicode-name.json +11 -0
- package/src/telemetry-contract/ranking/listing.v1.schema.json +61 -0
- package/src/telemetry-contract/ranking/taxonomy.json +8 -0
- package/src/telemetry-contract/ranking-taxonomy.gen.ts +11 -0
- package/src/telemetry-contract/types.gen.ts +963 -58
- package/src/telemetry-identity.ts +47 -9
- package/src/telemetry-snapshot.ts +9 -1
- package/src/telemetry-ui-events.ts +9 -2
- package/src/telemetry.ts +40 -5
- package/src/tests/app-action-run-tool.test.ts +178 -0
- package/src/tests/app-row-tools.test.ts +360 -0
- package/src/tests/apps-rbac.test.ts +189 -2
- package/src/tests/apps-script-types.test.ts +16 -3
- package/src/tests/credential-check.test.ts +38 -0
- package/src/tests/db-extraction-contract.test.ts +1 -0
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/docs-index-footprint.test.js +2 -2
- package/src/tests/fleet-benchmark.test.ts +122 -2
- package/src/tests/http-users.test.ts +62 -1
- package/src/tests/model-catalog-table.test.ts +63 -0
- package/src/tests/model-profiles-api.test.ts +19 -7
- package/src/tests/models-catalog.test.ts +50 -0
- package/src/tests/onboarding.test.ts +21 -0
- package/src/tests/org-identity.test.ts +44 -0
- package/src/tests/org-website.test.ts +62 -0
- package/src/tests/pi-mono-adapter.test.ts +23 -0
- package/src/tests/pr-body-leaks.test.ts +4 -0
- package/src/tests/pr-room-guard.test.ts +242 -0
- package/src/tests/ranking-listing.test.ts +97 -0
- package/src/tests/ranking-route.test.ts +321 -0
- package/src/tests/ranking-usage.test.ts +50 -0
- package/src/tests/rbac-admission-e2e.test.ts +8 -0
- package/src/tests/rbac-admission.test.ts +38 -0
- package/src/tests/rbac-charact-http.test.ts +4 -3
- package/src/tests/rbac-engine.test.ts +2 -0
- package/src/tests/rbac-roles.test.ts +2 -0
- package/src/tests/realtime-room-surfaces.test.ts +3 -1
- package/src/tests/realtime-session-join-race.test.ts +142 -0
- package/src/tests/realtime-tickets.test.ts +24 -17
- package/src/tests/realtime-transport.test.ts +91 -0
- package/src/tests/reasoning-effort.test.ts +39 -3
- package/src/tests/runner-harness-telemetry-env.test.ts +56 -1
- package/src/tests/session-route-posture.test.ts +639 -0
- package/src/tests/session-sharing-routes.test.ts +282 -0
- package/src/tests/session-sharing.test.ts +526 -0
- package/src/tests/sessions-detail-batch.test.ts +7 -1
- package/src/tests/slack-tool-blocks.test.ts +101 -0
- package/src/tests/slack-update.test.ts +55 -0
- package/src/tests/slack-user-dm.test.ts +177 -0
- package/src/tests/swarm-tool-result-gate.test.ts +2 -4
- package/src/tests/telemetry-context.test.ts +128 -2
- package/src/tests/telemetry-ui-route.test.ts +123 -0
- package/src/tests/tool-annotations.test.ts +3 -2
- package/src/tests/used-by-route.test.ts +153 -9
- package/src/tests/workflow-agent-task-retry.test.ts +130 -4
- package/src/tests/workflow-wait-recovery.test.ts +116 -4
- package/src/tools/app-action-run.ts +63 -0
- package/src/tools/app-rows.ts +234 -0
- package/src/tools/model-catalog/index.ts +1 -1
- package/src/tools/slack-post.ts +18 -12
- package/src/tools/slack-read.ts +13 -1
- package/src/tools/slack-reply.ts +7 -10
- package/src/tools/slack-start-thread.ts +18 -11
- package/src/tools/slack-update.ts +2 -9
- package/src/tools/tool-config.ts +8 -0
- package/src/tools/utils.ts +1 -1
- package/src/tools/workflows/retry-workflow-run.ts +1 -1
- package/src/types.ts +52 -0
- package/src/utils/company-profile.ts +24 -0
- package/src/utils/org-identity.ts +33 -0
- package/src/utils/org-website.ts +58 -21
- package/src/workflows/recovery.ts +10 -22
- package/src/workflows/resume.ts +16 -0
- package/src/workflows/task-step-routing.ts +47 -7
- package/templates/skills/apps/SKILL.md +58 -2
- package/templates/skills/apps/content.md +58 -2
- package/dist/handlers-tb3xgjnm.js +0 -37
- package/dist/index-nyfcdpky.js +0 -39
- package/dist/index-vjn3wbzf.js +0 -38
- package/dist/lead-61kqp604.js +0 -76
- package/dist/worker-4ptnn1ge.js +0 -76
- package/dist/{cli-n5mrsg0f.js → cli-60cgh1rv.js} +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ALL_TOOLS,
|
|
3
3
|
init_tool_config
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-2dfbv8qr.js";
|
|
5
5
|
import {
|
|
6
6
|
normalizeAssetKey,
|
|
7
7
|
defaultAssetKey,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
VersionableFieldSchema,
|
|
23
23
|
SessionCostModelBreakdownSchema,
|
|
24
24
|
init_types
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-fpmsqq59.js";
|
|
26
26
|
import {
|
|
27
27
|
generateDefaultClaudeMd2,
|
|
28
28
|
generateDefaultSoulMd2,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
init_identity_field_budget,
|
|
37
37
|
contentSha256,
|
|
38
38
|
init_profile_sync
|
|
39
|
-
} from "./cli-
|
|
39
|
+
} from "./cli-x5mq1fyq.js";
|
|
40
40
|
import {
|
|
41
41
|
isSlackConfigured,
|
|
42
42
|
init_config
|
|
@@ -48,10 +48,10 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
deriveProviderFromKeyType,
|
|
50
50
|
init_credentials
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-zw88zjba.js";
|
|
52
52
|
import {
|
|
53
53
|
init_templates3
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-0ebey9hg.js";
|
|
55
55
|
import {
|
|
56
56
|
registerTemplate,
|
|
57
57
|
getAllTemplateDefinitions,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
configureDbResolver,
|
|
60
60
|
init_resolver,
|
|
61
61
|
init_session_templates
|
|
62
|
-
} from "./cli-
|
|
62
|
+
} from "./cli-tx00c0h6.js";
|
|
63
63
|
import {
|
|
64
64
|
activeModelBlock,
|
|
65
65
|
init_model_rate_limit_windows
|
|
@@ -77,13 +77,15 @@ import {
|
|
|
77
77
|
import {
|
|
78
78
|
runtimeHarnessSections,
|
|
79
79
|
init_runtime_model_catalog
|
|
80
|
-
} from "./cli-
|
|
80
|
+
} from "./cli-6x9ma5w5.js";
|
|
81
81
|
import {
|
|
82
82
|
init_zod
|
|
83
83
|
} from "./cli-4chz1hye.js";
|
|
84
84
|
import {
|
|
85
|
+
exports_iso,
|
|
85
86
|
string2,
|
|
86
87
|
uuid,
|
|
88
|
+
url,
|
|
87
89
|
number2,
|
|
88
90
|
boolean,
|
|
89
91
|
array2,
|
|
@@ -91,8 +93,10 @@ import {
|
|
|
91
93
|
strictObject2,
|
|
92
94
|
looseObject,
|
|
93
95
|
union2,
|
|
96
|
+
discriminatedUnion,
|
|
94
97
|
record2,
|
|
95
|
-
_enum2
|
|
98
|
+
_enum2,
|
|
99
|
+
literal2
|
|
96
100
|
} from "./cli-d9f7gzeq.js";
|
|
97
101
|
import {
|
|
98
102
|
getNodeEnv,
|
|
@@ -101,7 +105,7 @@ import {
|
|
|
101
105
|
import {
|
|
102
106
|
init_package,
|
|
103
107
|
package_default
|
|
104
|
-
} from "./cli-
|
|
108
|
+
} from "./cli-ash6xxk7.js";
|
|
105
109
|
import {
|
|
106
110
|
realtimeBus,
|
|
107
111
|
init_bus
|
|
@@ -116,13 +120,13 @@ import {
|
|
|
116
120
|
registerVolatileSecret,
|
|
117
121
|
registerSensitiveKeyName,
|
|
118
122
|
init_secret_scrubber
|
|
119
|
-
} from "./cli-
|
|
123
|
+
} from "./cli-xf234ws8.js";
|
|
120
124
|
import {
|
|
121
125
|
isAlias,
|
|
122
126
|
parseAlias,
|
|
123
127
|
harnessModelMismatch,
|
|
124
128
|
init_src2
|
|
125
|
-
} from "./cli-
|
|
129
|
+
} from "./cli-nwyw3zhg.js";
|
|
126
130
|
import {
|
|
127
131
|
__toCommonJS,
|
|
128
132
|
__commonJS,
|
|
@@ -516,6 +520,64 @@ var init_catalog = __esm(() => {
|
|
|
516
520
|
"org_name",
|
|
517
521
|
"used_by"
|
|
518
522
|
]
|
|
523
|
+
},
|
|
524
|
+
team_size: {
|
|
525
|
+
type: "string",
|
|
526
|
+
description: "Size of the organization team.",
|
|
527
|
+
enum: [
|
|
528
|
+
"1",
|
|
529
|
+
"2-10",
|
|
530
|
+
"11-50",
|
|
531
|
+
"51+"
|
|
532
|
+
]
|
|
533
|
+
},
|
|
534
|
+
use_case: {
|
|
535
|
+
type: "string",
|
|
536
|
+
description: "Primary use of the swarm.",
|
|
537
|
+
enum: [
|
|
538
|
+
"features",
|
|
539
|
+
"bugs",
|
|
540
|
+
"review",
|
|
541
|
+
"ops",
|
|
542
|
+
"docs",
|
|
543
|
+
"data"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
acquisition_source: {
|
|
547
|
+
type: "string",
|
|
548
|
+
description: "How the organization found Agent Swarm.",
|
|
549
|
+
enum: [
|
|
550
|
+
"search",
|
|
551
|
+
"github",
|
|
552
|
+
"social",
|
|
553
|
+
"colleague",
|
|
554
|
+
"newsletter",
|
|
555
|
+
"event",
|
|
556
|
+
"ai_assistant",
|
|
557
|
+
"hacker_news",
|
|
558
|
+
"other"
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
user_function: {
|
|
562
|
+
type: "string",
|
|
563
|
+
description: "Job function of a user, separate from the RBAC user_role.",
|
|
564
|
+
enum: [
|
|
565
|
+
"engineer",
|
|
566
|
+
"eng_lead",
|
|
567
|
+
"founder",
|
|
568
|
+
"product",
|
|
569
|
+
"ops",
|
|
570
|
+
"other"
|
|
571
|
+
]
|
|
572
|
+
},
|
|
573
|
+
notification_moment: {
|
|
574
|
+
type: "string",
|
|
575
|
+
description: "Moment that made the Slack Connect invite relevant.",
|
|
576
|
+
enum: [
|
|
577
|
+
"task_failed",
|
|
578
|
+
"first_workflow",
|
|
579
|
+
"default"
|
|
580
|
+
]
|
|
519
581
|
}
|
|
520
582
|
},
|
|
521
583
|
common_properties: {
|
|
@@ -1614,6 +1676,9 @@ var init_catalog = __esm(() => {
|
|
|
1614
1676
|
key: {
|
|
1615
1677
|
type: "string",
|
|
1616
1678
|
required: true
|
|
1679
|
+
},
|
|
1680
|
+
moment: {
|
|
1681
|
+
ref: "notification_moment"
|
|
1617
1682
|
}
|
|
1618
1683
|
}
|
|
1619
1684
|
},
|
|
@@ -1627,6 +1692,9 @@ var init_catalog = __esm(() => {
|
|
|
1627
1692
|
key: {
|
|
1628
1693
|
type: "string",
|
|
1629
1694
|
required: true
|
|
1695
|
+
},
|
|
1696
|
+
moment: {
|
|
1697
|
+
ref: "notification_moment"
|
|
1630
1698
|
}
|
|
1631
1699
|
}
|
|
1632
1700
|
},
|
|
@@ -1644,6 +1712,12 @@ var init_catalog = __esm(() => {
|
|
|
1644
1712
|
email_domain: {
|
|
1645
1713
|
type: "string",
|
|
1646
1714
|
description: "Domain of the email typed into the item, never the address."
|
|
1715
|
+
},
|
|
1716
|
+
moment: {
|
|
1717
|
+
ref: "notification_moment"
|
|
1718
|
+
},
|
|
1719
|
+
user_function: {
|
|
1720
|
+
ref: "user_function"
|
|
1647
1721
|
}
|
|
1648
1722
|
}
|
|
1649
1723
|
},
|
|
@@ -1656,7 +1730,8 @@ var init_catalog = __esm(() => {
|
|
|
1656
1730
|
properties: {
|
|
1657
1731
|
feature: {
|
|
1658
1732
|
type: "string",
|
|
1659
|
-
required: true
|
|
1733
|
+
required: true,
|
|
1734
|
+
description: "Feature identifier, including health_popover and kickoff_call_opened. Existing identifiers remain accepted."
|
|
1660
1735
|
}
|
|
1661
1736
|
}
|
|
1662
1737
|
},
|
|
@@ -1711,7 +1786,8 @@ var init_catalog = __esm(() => {
|
|
|
1711
1786
|
properties: {
|
|
1712
1787
|
channel: {
|
|
1713
1788
|
type: "string",
|
|
1714
|
-
required: true
|
|
1789
|
+
required: true,
|
|
1790
|
+
description: "Lead channel, including setup_help and fleet_report. Existing channels remain accepted."
|
|
1715
1791
|
},
|
|
1716
1792
|
submission_id: {
|
|
1717
1793
|
type: "string",
|
|
@@ -1794,6 +1870,22 @@ var init_catalog = __esm(() => {
|
|
|
1794
1870
|
type: "boolean",
|
|
1795
1871
|
required: true,
|
|
1796
1872
|
description: "A name or email was left. The values go to /v1/feedback, never here."
|
|
1873
|
+
},
|
|
1874
|
+
answered: {
|
|
1875
|
+
type: "integer",
|
|
1876
|
+
minimum: 0,
|
|
1877
|
+
description: "Number of profile follow-up questions answered, never their values."
|
|
1878
|
+
},
|
|
1879
|
+
perks: {
|
|
1880
|
+
type: "array",
|
|
1881
|
+
items: {
|
|
1882
|
+
type: "string",
|
|
1883
|
+
enum: [
|
|
1884
|
+
"used_by",
|
|
1885
|
+
"slack_connect"
|
|
1886
|
+
]
|
|
1887
|
+
},
|
|
1888
|
+
description: "Perks the admin explicitly selected."
|
|
1797
1889
|
}
|
|
1798
1890
|
}
|
|
1799
1891
|
},
|
|
@@ -1806,8 +1898,18 @@ var init_catalog = __esm(() => {
|
|
|
1806
1898
|
properties: {
|
|
1807
1899
|
fields: {
|
|
1808
1900
|
type: "array",
|
|
1901
|
+
items: {
|
|
1902
|
+
type: "string",
|
|
1903
|
+
enum: [
|
|
1904
|
+
"name",
|
|
1905
|
+
"website",
|
|
1906
|
+
"team_size",
|
|
1907
|
+
"use_case",
|
|
1908
|
+
"acquisition_source"
|
|
1909
|
+
]
|
|
1910
|
+
},
|
|
1809
1911
|
required: true,
|
|
1810
|
-
description: "Changed field names
|
|
1912
|
+
description: "Changed profile field names, never their values."
|
|
1811
1913
|
},
|
|
1812
1914
|
surface: {
|
|
1813
1915
|
type: "string",
|
|
@@ -1815,7 +1917,12 @@ var init_catalog = __esm(() => {
|
|
|
1815
1917
|
enum: [
|
|
1816
1918
|
"prompt",
|
|
1817
1919
|
"setup",
|
|
1818
|
-
"settings"
|
|
1920
|
+
"settings",
|
|
1921
|
+
"org_name_popup",
|
|
1922
|
+
"feedback",
|
|
1923
|
+
"fleet_benchmark",
|
|
1924
|
+
"telemetry_banner",
|
|
1925
|
+
"identity_modal"
|
|
1819
1926
|
],
|
|
1820
1927
|
description: "Where the change was made. Not trigger_surface: that key fills the raw_events.trigger_surface column."
|
|
1821
1928
|
}
|
|
@@ -1831,6 +1938,12 @@ var init_catalog = __esm(() => {
|
|
|
1831
1938
|
granted: {
|
|
1832
1939
|
type: "boolean",
|
|
1833
1940
|
required: true
|
|
1941
|
+
},
|
|
1942
|
+
has_quote: {
|
|
1943
|
+
type: "boolean"
|
|
1944
|
+
},
|
|
1945
|
+
has_function: {
|
|
1946
|
+
type: "boolean"
|
|
1834
1947
|
}
|
|
1835
1948
|
}
|
|
1836
1949
|
},
|
|
@@ -1847,7 +1960,8 @@ var init_catalog = __esm(() => {
|
|
|
1847
1960
|
enum: [
|
|
1848
1961
|
"banner",
|
|
1849
1962
|
"settings",
|
|
1850
|
-
"env"
|
|
1963
|
+
"env",
|
|
1964
|
+
"benchmark"
|
|
1851
1965
|
]
|
|
1852
1966
|
}
|
|
1853
1967
|
}
|
|
@@ -1862,6 +1976,82 @@ var init_catalog = __esm(() => {
|
|
|
1862
1976
|
has_org_name: {
|
|
1863
1977
|
type: "boolean",
|
|
1864
1978
|
required: true
|
|
1979
|
+
},
|
|
1980
|
+
level: {
|
|
1981
|
+
type: "string",
|
|
1982
|
+
enum: [
|
|
1983
|
+
"basic",
|
|
1984
|
+
"full"
|
|
1985
|
+
]
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
product: "agent-swarm",
|
|
1991
|
+
event: "ranking.opted_in",
|
|
1992
|
+
description: "An admin opted the install into the public ranking, or the API rebuilt its listing after an org identity change.",
|
|
1993
|
+
since: "2026-10-18",
|
|
1994
|
+
source: "api-server",
|
|
1995
|
+
properties: {
|
|
1996
|
+
listing: {
|
|
1997
|
+
type: "string",
|
|
1998
|
+
required: true,
|
|
1999
|
+
description: "The stringified telemetry_ranking listing (contracts/telemetry/ranking/listing.v1.schema.json). The ingest also requires its name and domain to equal context.org_name and context.org_website."
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
product: "agent-swarm",
|
|
2005
|
+
event: "ranking.opted_out",
|
|
2006
|
+
description: "The install left the public ranking: the admin turned it off, or the org name or website was cleared or changed.",
|
|
2007
|
+
since: "2026-10-18",
|
|
2008
|
+
source: "api-server",
|
|
2009
|
+
properties: {
|
|
2010
|
+
domain: {
|
|
2011
|
+
type: "string",
|
|
2012
|
+
required: true,
|
|
2013
|
+
description: "The listing domain that leaves the ranking: a lowercase hostname."
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
product: "agent-swarm",
|
|
2019
|
+
event: "ranking.usage",
|
|
2020
|
+
description: "Token usage of one session on an install opted into the public ranking. Sent next to session.cost.",
|
|
2021
|
+
since: "2026-10-18",
|
|
2022
|
+
source: "worker",
|
|
2023
|
+
properties: {
|
|
2024
|
+
totalTokens: {
|
|
2025
|
+
type: "integer",
|
|
2026
|
+
required: true,
|
|
2027
|
+
minimum: 0,
|
|
2028
|
+
description: "inputTokens + cacheReadTokens + cacheWriteTokens + outputTokens. The ranking sums this."
|
|
2029
|
+
},
|
|
2030
|
+
inputTokens: {
|
|
2031
|
+
type: "integer",
|
|
2032
|
+
required: true,
|
|
2033
|
+
minimum: 0
|
|
2034
|
+
},
|
|
2035
|
+
outputTokens: {
|
|
2036
|
+
type: "integer",
|
|
2037
|
+
required: true,
|
|
2038
|
+
minimum: 0
|
|
2039
|
+
},
|
|
2040
|
+
cacheReadTokens: {
|
|
2041
|
+
type: "integer",
|
|
2042
|
+
minimum: 0
|
|
2043
|
+
},
|
|
2044
|
+
cacheWriteTokens: {
|
|
2045
|
+
type: "integer",
|
|
2046
|
+
minimum: 0
|
|
2047
|
+
},
|
|
2048
|
+
model: {
|
|
2049
|
+
type: "string",
|
|
2050
|
+
description: "The session's model, the same value as session.cost.model. Usage without it, or with a value the ranking does not accept, is shown as the model unknown."
|
|
2051
|
+
},
|
|
2052
|
+
provider: {
|
|
2053
|
+
type: "string",
|
|
2054
|
+
description: "The session's provider, the same value as session.cost.provider. Missing means unknown."
|
|
1865
2055
|
}
|
|
1866
2056
|
}
|
|
1867
2057
|
},
|
|
@@ -1974,11 +2164,140 @@ var init_catalog = __esm(() => {
|
|
|
1974
2164
|
required: true
|
|
1975
2165
|
}
|
|
1976
2166
|
}
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
product: "agent-swarm",
|
|
2170
|
+
event: "identity.lookup",
|
|
2171
|
+
description: "A dashboard identity lookup matched an existing user or found no match.",
|
|
2172
|
+
since: "2026-10-18",
|
|
2173
|
+
source: "ui",
|
|
2174
|
+
properties: {
|
|
2175
|
+
matched: {
|
|
2176
|
+
type: "boolean",
|
|
2177
|
+
required: true
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
product: "agent-swarm",
|
|
2183
|
+
event: "identity.user_created",
|
|
2184
|
+
description: "A user created a dashboard identity. Email and personal names stay out of telemetry.",
|
|
2185
|
+
since: "2026-10-18",
|
|
2186
|
+
source: "ui",
|
|
2187
|
+
properties: {
|
|
2188
|
+
surface: {
|
|
2189
|
+
type: "string",
|
|
2190
|
+
required: true,
|
|
2191
|
+
enum: [
|
|
2192
|
+
"identity_modal",
|
|
2193
|
+
"setup"
|
|
2194
|
+
]
|
|
2195
|
+
},
|
|
2196
|
+
email_kind: {
|
|
2197
|
+
type: "string",
|
|
2198
|
+
required: true,
|
|
2199
|
+
enum: [
|
|
2200
|
+
"work",
|
|
2201
|
+
"personal"
|
|
2202
|
+
]
|
|
2203
|
+
},
|
|
2204
|
+
has_function: {
|
|
2205
|
+
type: "boolean",
|
|
2206
|
+
required: true
|
|
2207
|
+
},
|
|
2208
|
+
has_company: {
|
|
2209
|
+
type: "boolean",
|
|
2210
|
+
required: true
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
product: "agent-swarm",
|
|
2216
|
+
event: "fleet_benchmark.unlocked",
|
|
2217
|
+
description: "An admin supplied the company profile fields for the full benchmark.",
|
|
2218
|
+
since: "2026-10-18",
|
|
2219
|
+
source: "ui",
|
|
2220
|
+
properties: {
|
|
2221
|
+
fields: {
|
|
2222
|
+
type: "array",
|
|
2223
|
+
items: {
|
|
2224
|
+
type: "string",
|
|
2225
|
+
enum: [
|
|
2226
|
+
"website",
|
|
2227
|
+
"team_size",
|
|
2228
|
+
"use_case"
|
|
2229
|
+
]
|
|
2230
|
+
},
|
|
2231
|
+
required: true,
|
|
2232
|
+
description: "Profile fields supplied, never their values."
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
product: "agent-swarm",
|
|
2238
|
+
event: "setup.worker_command_copied",
|
|
2239
|
+
description: "An admin copied a worker command from the setup health popover.",
|
|
2240
|
+
since: "2026-10-18",
|
|
2241
|
+
source: "ui",
|
|
2242
|
+
properties: {
|
|
2243
|
+
target: {
|
|
2244
|
+
type: "string",
|
|
2245
|
+
required: true,
|
|
2246
|
+
enum: [
|
|
2247
|
+
"compose",
|
|
2248
|
+
"docker",
|
|
2249
|
+
"kubernetes"
|
|
2250
|
+
]
|
|
2251
|
+
},
|
|
2252
|
+
harness: {
|
|
2253
|
+
type: "string",
|
|
2254
|
+
required: true,
|
|
2255
|
+
enum: [
|
|
2256
|
+
"claude",
|
|
2257
|
+
"codex",
|
|
2258
|
+
"pi",
|
|
2259
|
+
"devin",
|
|
2260
|
+
"claude-managed",
|
|
2261
|
+
"opencode",
|
|
2262
|
+
"acp",
|
|
2263
|
+
"dsh",
|
|
2264
|
+
"amp",
|
|
2265
|
+
"cursor",
|
|
2266
|
+
"grok"
|
|
2267
|
+
]
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
1977
2270
|
}
|
|
1978
2271
|
]
|
|
1979
2272
|
};
|
|
1980
2273
|
});
|
|
1981
2274
|
|
|
2275
|
+
// src/utils/company-profile.ts
|
|
2276
|
+
var COMPANY_TEAM_SIZES, COMPANY_USE_CASES, COMPANY_ACQUISITION_SOURCES, USER_FUNCTIONS;
|
|
2277
|
+
var init_company_profile = __esm(() => {
|
|
2278
|
+
COMPANY_TEAM_SIZES = ["1", "2-10", "11-50", "51+"];
|
|
2279
|
+
COMPANY_USE_CASES = ["features", "bugs", "review", "ops", "docs", "data"];
|
|
2280
|
+
COMPANY_ACQUISITION_SOURCES = [
|
|
2281
|
+
"search",
|
|
2282
|
+
"github",
|
|
2283
|
+
"social",
|
|
2284
|
+
"colleague",
|
|
2285
|
+
"newsletter",
|
|
2286
|
+
"event",
|
|
2287
|
+
"ai_assistant",
|
|
2288
|
+
"hacker_news",
|
|
2289
|
+
"other"
|
|
2290
|
+
];
|
|
2291
|
+
USER_FUNCTIONS = [
|
|
2292
|
+
"engineer",
|
|
2293
|
+
"eng_lead",
|
|
2294
|
+
"founder",
|
|
2295
|
+
"product",
|
|
2296
|
+
"ops",
|
|
2297
|
+
"other"
|
|
2298
|
+
];
|
|
2299
|
+
});
|
|
2300
|
+
|
|
1982
2301
|
// src/telemetry-context.ts
|
|
1983
2302
|
import { createHash, randomBytes } from "node:crypto";
|
|
1984
2303
|
function mapTriggerSurface(source) {
|
|
@@ -2021,6 +2340,9 @@ function buildContext(input) {
|
|
|
2021
2340
|
const orgName = input.orgName?.trim();
|
|
2022
2341
|
const orgDomain = validOrgDomain(input.orgDomain);
|
|
2023
2342
|
const orgWebsite = validOrgDomain(input.orgWebsite);
|
|
2343
|
+
const teamSize = COMPANY_TEAM_SIZES.find((value) => value === input.teamSize);
|
|
2344
|
+
const useCase = COMPANY_USE_CASES.find((value) => value === input.useCase);
|
|
2345
|
+
const userFunction = userId ? USER_FUNCTIONS.find((value) => value === input.userFunction) : undefined;
|
|
2024
2346
|
return {
|
|
2025
2347
|
org_id: input.orgId,
|
|
2026
2348
|
org_name: orgName ? orgName : null,
|
|
@@ -2032,8 +2354,11 @@ function buildContext(input) {
|
|
|
2032
2354
|
swarm_version: input.swarmVersion,
|
|
2033
2355
|
install_method: input.installMethod ?? null,
|
|
2034
2356
|
install_preset: input.installPreset ?? null,
|
|
2035
|
-
acquisition_source: input.acquisitionSource ?? null,
|
|
2036
|
-
...orgWebsite ? { org_website: orgWebsite } : {}
|
|
2357
|
+
acquisition_source: COMPANY_ACQUISITION_SOURCES.find((value) => value === input.acquisitionSource) ?? null,
|
|
2358
|
+
...orgWebsite ? { org_website: orgWebsite } : {},
|
|
2359
|
+
...teamSize ? { team_size: teamSize } : {},
|
|
2360
|
+
...useCase ? { use_case: useCase } : {},
|
|
2361
|
+
...userFunction ? { user_function: userFunction } : {}
|
|
2037
2362
|
};
|
|
2038
2363
|
}
|
|
2039
2364
|
function catalogSpecs(event) {
|
|
@@ -2070,6 +2395,7 @@ var ORG_ID_PATTERN, ORG_DOMAIN_PATTERN, specsByEvent = null;
|
|
|
2070
2395
|
var init_telemetry_context = __esm(() => {
|
|
2071
2396
|
init_telemetry_contract();
|
|
2072
2397
|
init_catalog();
|
|
2398
|
+
init_company_profile();
|
|
2073
2399
|
ORG_ID_PATTERN = /^org_([0-9a-f]{16}|[A-Za-z0-9]{27})$/;
|
|
2074
2400
|
ORG_DOMAIN_PATTERN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/;
|
|
2075
2401
|
});
|
|
@@ -2123,36 +2449,54 @@ function isFilledOrgLogoUrl(url, origin = TELEMETRY_PROXY_ORIGIN) {
|
|
|
2123
2449
|
return false;
|
|
2124
2450
|
}
|
|
2125
2451
|
}
|
|
2126
|
-
var LABEL, IPV4, BLOCKED_SUFFIXES, TELEMETRY_PROXY_ORIGIN = "https://proxy.desplega.sh", FREE_MAIL_DOMAINS;
|
|
2452
|
+
var LABEL, IPV4, BLOCKED_SUFFIXES, TELEMETRY_PROXY_ORIGIN = "https://proxy.desplega.sh", FREE_MAIL_FAMILIES, FREE_MAIL_DOMAINS, SECOND_LEVEL_LABELS;
|
|
2127
2453
|
var init_org_website = __esm(() => {
|
|
2128
2454
|
LABEL = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
|
|
2129
2455
|
IPV4 = /^\d{1,3}(\.\d{1,3}){3}$/;
|
|
2130
2456
|
BLOCKED_SUFFIXES = [".local", ".internal", ".localhost", ".lan", ".home", ".test"];
|
|
2457
|
+
FREE_MAIL_FAMILIES = new Set([
|
|
2458
|
+
"aol",
|
|
2459
|
+
"fastmail",
|
|
2460
|
+
"gmail",
|
|
2461
|
+
"gmx",
|
|
2462
|
+
"googlemail",
|
|
2463
|
+
"hotmail",
|
|
2464
|
+
"icloud",
|
|
2465
|
+
"live",
|
|
2466
|
+
"msn",
|
|
2467
|
+
"outlook",
|
|
2468
|
+
"protonmail",
|
|
2469
|
+
"rocketmail",
|
|
2470
|
+
"yahoo",
|
|
2471
|
+
"yandex",
|
|
2472
|
+
"ymail",
|
|
2473
|
+
"zoho"
|
|
2474
|
+
]);
|
|
2131
2475
|
FREE_MAIL_DOMAINS = new Set([
|
|
2132
|
-
"
|
|
2133
|
-
"
|
|
2134
|
-
"
|
|
2135
|
-
"
|
|
2136
|
-
"
|
|
2137
|
-
"
|
|
2138
|
-
"
|
|
2139
|
-
"
|
|
2140
|
-
"me.com",
|
|
2476
|
+
"126.com",
|
|
2477
|
+
"163.com",
|
|
2478
|
+
"comcast.net",
|
|
2479
|
+
"daum.net",
|
|
2480
|
+
"free.fr",
|
|
2481
|
+
"hanmail.net",
|
|
2482
|
+
"hey.com",
|
|
2483
|
+
"libero.it",
|
|
2141
2484
|
"mac.com",
|
|
2142
|
-
"aol.com",
|
|
2143
|
-
"proton.me",
|
|
2144
|
-
"protonmail.com",
|
|
2145
|
-
"gmx.com",
|
|
2146
|
-
"gmx.de",
|
|
2147
|
-
"yandex.com",
|
|
2148
|
-
"yandex.ru",
|
|
2149
2485
|
"mail.com",
|
|
2150
|
-
"
|
|
2486
|
+
"mail.ru",
|
|
2487
|
+
"me.com",
|
|
2488
|
+
"naver.com",
|
|
2489
|
+
"orange.fr",
|
|
2490
|
+
"pm.me",
|
|
2491
|
+
"proton.me",
|
|
2151
2492
|
"qq.com",
|
|
2152
|
-
"
|
|
2153
|
-
"
|
|
2154
|
-
"
|
|
2493
|
+
"rediffmail.com",
|
|
2494
|
+
"sina.com",
|
|
2495
|
+
"t-online.de",
|
|
2496
|
+
"tutanota.com",
|
|
2497
|
+
"web.de"
|
|
2155
2498
|
]);
|
|
2499
|
+
SECOND_LEVEL_LABELS = new Set(["ac", "co", "com", "edu", "gov", "ne", "net", "or", "org"]);
|
|
2156
2500
|
});
|
|
2157
2501
|
|
|
2158
2502
|
// src/utils/request-auth-context.ts
|
|
@@ -2347,6 +2691,9 @@ function setTelemetryOrgDomain(domain) {
|
|
|
2347
2691
|
function setTelemetryRoleResolver(resolver) {
|
|
2348
2692
|
roleResolver = resolver;
|
|
2349
2693
|
}
|
|
2694
|
+
function setTelemetryFunctionResolver(resolver) {
|
|
2695
|
+
functionResolver = resolver;
|
|
2696
|
+
}
|
|
2350
2697
|
function isTelemetryReady() {
|
|
2351
2698
|
return isTelemetryEnabled() && installationId !== null && currentOrgId() !== undefined;
|
|
2352
2699
|
}
|
|
@@ -2385,7 +2732,7 @@ function track(options) {
|
|
|
2385
2732
|
function trackRelayed(event, properties, options) {
|
|
2386
2733
|
emit(event, properties, undefined, options.actor, options.emitter);
|
|
2387
2734
|
}
|
|
2388
|
-
function emit(event, properties, metadata, actor, emitter = source) {
|
|
2735
|
+
function emit(event, properties, metadata, actor, emitter = source, identity) {
|
|
2389
2736
|
if (!isTelemetryEnabled() || !installationId)
|
|
2390
2737
|
return;
|
|
2391
2738
|
maybeRefreshOrgIdentity();
|
|
@@ -2396,7 +2743,7 @@ function emit(event, properties, metadata, actor, emitter = source) {
|
|
|
2396
2743
|
const occurredAt = new Date().toISOString();
|
|
2397
2744
|
const sentFor = installationId;
|
|
2398
2745
|
const isCloud = cachedIsCloud || isCloudDeployment();
|
|
2399
|
-
const orgIdentity = getOrgIdentity();
|
|
2746
|
+
const orgIdentity = identity ? { ...getOrgIdentity(), organization_name: identity.orgName } : getOrgIdentity();
|
|
2400
2747
|
const userId = actor?.userId?.trim() || undefined;
|
|
2401
2748
|
const payload = {
|
|
2402
2749
|
schema_version: 2,
|
|
@@ -2410,7 +2757,7 @@ function emit(event, properties, metadata, actor, emitter = source) {
|
|
|
2410
2757
|
orgId,
|
|
2411
2758
|
orgName: orgIdentity.organization_name,
|
|
2412
2759
|
orgDomain: cachedOrgDomain,
|
|
2413
|
-
orgWebsite: normalizeOrgWebsite(process.env.SWARM_ORG_WEBSITE),
|
|
2760
|
+
orgWebsite: identity?.orgWebsite ?? normalizeOrgWebsite(process.env.SWARM_ORG_WEBSITE),
|
|
2414
2761
|
installationId,
|
|
2415
2762
|
actor: userId ? { userId, role: actor?.role ?? roleResolver?.(userId) ?? null } : undefined,
|
|
2416
2763
|
isCloud,
|
|
@@ -2418,7 +2765,10 @@ function emit(event, properties, metadata, actor, emitter = source) {
|
|
|
2418
2765
|
swarmVersion: package_default.version,
|
|
2419
2766
|
installMethod: cachedInstallMethod,
|
|
2420
2767
|
installPreset: cachedInstallPreset,
|
|
2421
|
-
acquisitionSource:
|
|
2768
|
+
acquisitionSource: process.env.SWARM_ORG_ACQUISITION_SOURCE,
|
|
2769
|
+
teamSize: process.env.SWARM_ORG_TEAM_SIZE,
|
|
2770
|
+
useCase: process.env.SWARM_ORG_USE_CASE,
|
|
2771
|
+
userFunction: userId ? functionResolver?.(userId) : undefined
|
|
2422
2772
|
}),
|
|
2423
2773
|
properties: normalizeProperties(event, {
|
|
2424
2774
|
...properties,
|
|
@@ -2463,7 +2813,7 @@ function emitIntegrationConnected(type, providerSlug, firstOfType) {
|
|
|
2463
2813
|
}, { userId: getCurrentRequestUserId() ?? null });
|
|
2464
2814
|
return true;
|
|
2465
2815
|
}
|
|
2466
|
-
var TELEMETRY_ENDPOINT = "https://proxy.desplega.sh/v1/events", PRODUCT = "agent-swarm", TIMEOUT_MS = 5000, installationId = null, installedAt = null, ingestObserver = null, cachedOrgId, cachedOrgDomain, roleResolver = null, identityReloader = null, lastIdentityLoadAt = 0, source = "unknown", cachedIsCloud = false, cachedIsE2b = false, cachedHasEmbedding = false, cachedHasSlackChannel = false, cachedHasEmailChannel = false, cachedInstallMethod = "manual", cachedInstallPreset, CLOUD_HOST_EXACT, CLOUD_HOST_SUFFIXES, KNOWN_INSTALL_METHODS, KNOWN_INSTALL_PRESETS, KNOWN_INTEGRATION_TYPES, INTEGRATION_PROVIDERS, ORG_IDENTITY_RETRY_MS = 60000, ORG_IDENTITY_REFRESH_MS, telemetry;
|
|
2816
|
+
var TELEMETRY_ENDPOINT = "https://proxy.desplega.sh/v1/events", PRODUCT = "agent-swarm", TIMEOUT_MS = 5000, installationId = null, installedAt = null, ingestObserver = null, cachedOrgId, cachedOrgDomain, roleResolver = null, functionResolver = null, identityReloader = null, lastIdentityLoadAt = 0, source = "unknown", cachedIsCloud = false, cachedIsE2b = false, cachedHasEmbedding = false, cachedHasSlackChannel = false, cachedHasEmailChannel = false, cachedInstallMethod = "manual", cachedInstallPreset, CLOUD_HOST_EXACT, CLOUD_HOST_SUFFIXES, KNOWN_INSTALL_METHODS, KNOWN_INSTALL_PRESETS, KNOWN_INTEGRATION_TYPES, INTEGRATION_PROVIDERS, ORG_IDENTITY_RETRY_MS = 60000, ORG_IDENTITY_REFRESH_MS, telemetry;
|
|
2467
2817
|
var init_telemetry = __esm(() => {
|
|
2468
2818
|
init_package();
|
|
2469
2819
|
init_config();
|
|
@@ -2559,6 +2909,9 @@ var init_telemetry = __esm(() => {
|
|
|
2559
2909
|
...secondsSinceInstall !== undefined ? { seconds_since_install: secondsSinceInstall } : {}
|
|
2560
2910
|
}, undefined, actor);
|
|
2561
2911
|
},
|
|
2912
|
+
ranking(event, props, identity) {
|
|
2913
|
+
emit(`ranking.${event}`, props, undefined, undefined, source, identity);
|
|
2914
|
+
},
|
|
2562
2915
|
org(event, props) {
|
|
2563
2916
|
emit(`org.${event}`, props, undefined);
|
|
2564
2917
|
},
|
|
@@ -4476,16 +4829,15 @@ var init_runtime = __esm(() => {
|
|
|
4476
4829
|
// src/telemetry-identity.ts
|
|
4477
4830
|
async function loadUserRole(userId) {
|
|
4478
4831
|
try {
|
|
4479
|
-
const { getUserGrant } = await import("./rbac-roles-
|
|
4832
|
+
const { getUserGrant } = await import("./rbac-roles-y6zbfzve.js");
|
|
4480
4833
|
const grant = await getUserGrant(userId);
|
|
4481
4834
|
const role = grant.grantsAll ? "admin" : "member";
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
return role;
|
|
4835
|
+
const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
|
|
4836
|
+
return {
|
|
4837
|
+
role,
|
|
4838
|
+
userFunction: USER_FUNCTIONS.find((value) => value === user?.jobFunction),
|
|
4839
|
+
at: Date.now()
|
|
4840
|
+
};
|
|
4489
4841
|
} catch {
|
|
4490
4842
|
return;
|
|
4491
4843
|
}
|
|
@@ -4496,7 +4848,20 @@ function primeUserRole(userId) {
|
|
|
4496
4848
|
return Promise.resolve(hit.role);
|
|
4497
4849
|
let load = roleLoads.get(userId);
|
|
4498
4850
|
if (!load) {
|
|
4499
|
-
load = loadUserRole(userId).
|
|
4851
|
+
load = loadUserRole(userId).then((entry) => {
|
|
4852
|
+
if (entry && roleLoads.get(userId) === load) {
|
|
4853
|
+
if (roleCache.size >= ROLE_CACHE_LIMIT) {
|
|
4854
|
+
const oldest = roleCache.keys().next().value;
|
|
4855
|
+
if (oldest !== undefined)
|
|
4856
|
+
roleCache.delete(oldest);
|
|
4857
|
+
}
|
|
4858
|
+
roleCache.set(userId, entry);
|
|
4859
|
+
}
|
|
4860
|
+
return entry?.role;
|
|
4861
|
+
}).finally(() => {
|
|
4862
|
+
if (roleLoads.get(userId) === load)
|
|
4863
|
+
roleLoads.delete(userId);
|
|
4864
|
+
});
|
|
4500
4865
|
roleLoads.set(userId, load);
|
|
4501
4866
|
}
|
|
4502
4867
|
return load;
|
|
@@ -4507,6 +4872,16 @@ function cachedUserRole(userId) {
|
|
|
4507
4872
|
primeUserRole(userId);
|
|
4508
4873
|
return hit?.role;
|
|
4509
4874
|
}
|
|
4875
|
+
function cachedUserFunction(userId) {
|
|
4876
|
+
const hit = roleCache.get(userId);
|
|
4877
|
+
if (!hit || Date.now() - hit.at >= ROLE_TTL_MS)
|
|
4878
|
+
primeUserRole(userId);
|
|
4879
|
+
return hit?.userFunction;
|
|
4880
|
+
}
|
|
4881
|
+
function invalidateTelemetryUserRole(userId) {
|
|
4882
|
+
roleCache.delete(userId);
|
|
4883
|
+
roleLoads.delete(userId);
|
|
4884
|
+
}
|
|
4510
4885
|
async function computeOrgDomain() {
|
|
4511
4886
|
const rows = await getDbClient2().query(`SELECT u.email AS email
|
|
4512
4887
|
FROM users u
|
|
@@ -4553,6 +4928,7 @@ var init_telemetry_identity = __esm(() => {
|
|
|
4553
4928
|
init_runtime();
|
|
4554
4929
|
init_telemetry();
|
|
4555
4930
|
init_telemetry_context();
|
|
4931
|
+
init_company_profile();
|
|
4556
4932
|
ROLE_TTL_MS = 60 * 60000;
|
|
4557
4933
|
roleCache = new Map;
|
|
4558
4934
|
roleLoads = new Map;
|
|
@@ -5524,8 +5900,9 @@ async function hasNonTerminalRerouteDecisionChild2(parentId) {
|
|
|
5524
5900
|
LIMIT 1`, [parentId]);
|
|
5525
5901
|
return row !== undefined && row !== null;
|
|
5526
5902
|
}
|
|
5527
|
-
async function getTasksByAgentId2(agentId) {
|
|
5528
|
-
const
|
|
5903
|
+
async function getTasksByAgentId2(agentId, readableBy) {
|
|
5904
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId) : undefined;
|
|
5905
|
+
const rows = await getDbClient2().query(`SELECT * FROM agent_tasks WHERE agentId = ?${readable ? ` AND ${readable.sql}` : ""} ORDER BY createdAt DESC`, [agentId, ...readable?.params ?? []]);
|
|
5529
5906
|
return rows.map(rowToAgentTask);
|
|
5530
5907
|
}
|
|
5531
5908
|
async function getAgentCurrentTask2(agentId) {
|
|
@@ -5544,6 +5921,27 @@ async function findTaskByVcs2(vcsRepo, vcsNumber) {
|
|
|
5544
5921
|
LIMIT 1`, [vcsRepo, vcsNumber]);
|
|
5545
5922
|
return row ? rowToAgentTask(row) : null;
|
|
5546
5923
|
}
|
|
5924
|
+
function readableSessionCondition(userId, taskIdColumn = "agent_tasks.id", opts = {}) {
|
|
5925
|
+
const otherOwner = userId ? "r.requestedByUserId IS NOT NULL AND r.requestedByUserId != ?" : "r.requestedByUserId IS NOT NULL";
|
|
5926
|
+
const shareMatch = userId ? "(s.userId IS NULL OR s.userId = ?)" : "s.userId IS NULL";
|
|
5927
|
+
const notHidden = `${taskIdColumn} NOT IN (
|
|
5928
|
+
WITH RECURSIVE hidden(id) AS (
|
|
5929
|
+
SELECT r.id FROM agent_tasks r
|
|
5930
|
+
WHERE (r.parentTaskId IS NULL
|
|
5931
|
+
OR NOT EXISTS (SELECT 1 FROM agent_tasks p WHERE p.id = r.parentTaskId))
|
|
5932
|
+
AND ${otherOwner}
|
|
5933
|
+
AND NOT EXISTS (SELECT 1 FROM session_shares s
|
|
5934
|
+
WHERE s.rootTaskId = r.id AND s.revokedAt IS NULL AND ${shareMatch})
|
|
5935
|
+
UNION ALL
|
|
5936
|
+
SELECT c.id FROM agent_tasks c JOIN hidden ON c.parentTaskId = hidden.id
|
|
5937
|
+
)
|
|
5938
|
+
SELECT id FROM hidden
|
|
5939
|
+
)`;
|
|
5940
|
+
return {
|
|
5941
|
+
sql: opts.nullable ? `(${taskIdColumn} IS NULL OR ${notHidden})` : notHidden,
|
|
5942
|
+
params: userId ? [userId, userId] : []
|
|
5943
|
+
};
|
|
5944
|
+
}
|
|
5547
5945
|
async function getAllTasks2(filters, opts) {
|
|
5548
5946
|
const conditions = [];
|
|
5549
5947
|
const params = [];
|
|
@@ -5623,6 +6021,11 @@ async function getAllTasks2(filters, opts) {
|
|
|
5623
6021
|
if (!filters?.includeHeartbeat) {
|
|
5624
6022
|
conditions.push(`(IFNULL(taskType, '') NOT IN ('heartbeat', 'heartbeat-checklist', 'boot-triage') AND tags NOT LIKE '%"heartbeat"%')`);
|
|
5625
6023
|
}
|
|
6024
|
+
if (filters?.readableBy) {
|
|
6025
|
+
const readable = readableSessionCondition(filters.readableBy.userId);
|
|
6026
|
+
conditions.push(readable.sql);
|
|
6027
|
+
params.push(...readable.params);
|
|
6028
|
+
}
|
|
5626
6029
|
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
5627
6030
|
const limit = filters?.limit ?? 25;
|
|
5628
6031
|
const offset = filters?.offset ?? 0;
|
|
@@ -5740,6 +6143,11 @@ async function getTasksCount2(filters) {
|
|
|
5740
6143
|
if (!filters?.includeHeartbeat) {
|
|
5741
6144
|
conditions.push(`(IFNULL(taskType, '') NOT IN ('heartbeat', 'heartbeat-checklist', 'boot-triage') AND tags NOT LIKE '%"heartbeat"%')`);
|
|
5742
6145
|
}
|
|
6146
|
+
if (filters?.readableBy) {
|
|
6147
|
+
const readable = readableSessionCondition(filters.readableBy.userId);
|
|
6148
|
+
conditions.push(readable.sql);
|
|
6149
|
+
params.push(...readable.params);
|
|
6150
|
+
}
|
|
5743
6151
|
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
5744
6152
|
const query = `SELECT COUNT(*) as count FROM agent_tasks ${whereClause}`;
|
|
5745
6153
|
const result = await getDbClient2().get(query, params);
|
|
@@ -6329,6 +6737,26 @@ var init_model_profiles = __esm(() => {
|
|
|
6329
6737
|
init_read();
|
|
6330
6738
|
});
|
|
6331
6739
|
|
|
6740
|
+
// src/be/db/session-visibility.ts
|
|
6741
|
+
function sessionViewerCondition(viewer) {
|
|
6742
|
+
const shared = `EXISTS (SELECT 1 FROM session_shares s
|
|
6743
|
+
WHERE s.rootTaskId = r.id AND s.revokedAt IS NULL AND (s.userId IS NULL OR s.userId = ?))`;
|
|
6744
|
+
if (viewer.scope === "mine") {
|
|
6745
|
+
return { sql: "r.requestedByUserId = ?", params: [viewer.userId] };
|
|
6746
|
+
}
|
|
6747
|
+
if (viewer.scope === "shared") {
|
|
6748
|
+
return {
|
|
6749
|
+
sql: `(r.requestedByUserId IS NOT NULL AND r.requestedByUserId IS NOT ? AND ${shared})`,
|
|
6750
|
+
params: [viewer.userId, viewer.userId]
|
|
6751
|
+
};
|
|
6752
|
+
}
|
|
6753
|
+
return {
|
|
6754
|
+
sql: `(r.requestedByUserId IS NULL OR r.requestedByUserId = ? OR ${shared})`,
|
|
6755
|
+
params: [viewer.userId, viewer.userId]
|
|
6756
|
+
};
|
|
6757
|
+
}
|
|
6758
|
+
var init_session_visibility = () => {};
|
|
6759
|
+
|
|
6332
6760
|
// src/be/db/tasks/human-free.ts
|
|
6333
6761
|
function humanFreeCase(parentFlag) {
|
|
6334
6762
|
return `CASE
|
|
@@ -6844,7 +7272,7 @@ async function completeTask2(id, output, options) {
|
|
|
6844
7272
|
});
|
|
6845
7273
|
} catch {}
|
|
6846
7274
|
getDbClient2().afterCommit(() => {
|
|
6847
|
-
import("./event-bus-
|
|
7275
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
6848
7276
|
workflowEventBus.emit("task.completed", {
|
|
6849
7277
|
taskId: id,
|
|
6850
7278
|
output: scrubbedOutput,
|
|
@@ -6899,7 +7327,7 @@ async function failTask2(id, reason, opts = {}) {
|
|
|
6899
7327
|
});
|
|
6900
7328
|
} catch {}
|
|
6901
7329
|
getDbClient2().afterCommit(() => {
|
|
6902
|
-
import("./event-bus-
|
|
7330
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
6903
7331
|
workflowEventBus.emit("task.failed", {
|
|
6904
7332
|
taskId: id,
|
|
6905
7333
|
failureReason: scrubbedReason,
|
|
@@ -6981,7 +7409,7 @@ async function cancelTask2(id, reason) {
|
|
|
6981
7409
|
});
|
|
6982
7410
|
} catch {}
|
|
6983
7411
|
getDbClient2().afterCommit(() => {
|
|
6984
|
-
import("./event-bus-
|
|
7412
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
6985
7413
|
workflowEventBus.emit("task.cancelled", {
|
|
6986
7414
|
taskId: id,
|
|
6987
7415
|
agentId: row.agentId,
|
|
@@ -7038,7 +7466,7 @@ async function supersedeTask2(id, args) {
|
|
|
7038
7466
|
});
|
|
7039
7467
|
} catch {}
|
|
7040
7468
|
getDbClient2().afterCommit(() => {
|
|
7041
|
-
import("./event-bus-
|
|
7469
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
7042
7470
|
workflowEventBus.emit("task.superseded", {
|
|
7043
7471
|
taskId: id,
|
|
7044
7472
|
reason: args.reason,
|
|
@@ -7168,10 +7596,11 @@ async function resumeTask2(taskId) {
|
|
|
7168
7596
|
}
|
|
7169
7597
|
return row ? rowToAgentTask(row) : null;
|
|
7170
7598
|
}
|
|
7171
|
-
async function getPausedTasksForAgent2(agentId) {
|
|
7599
|
+
async function getPausedTasksForAgent2(agentId, readableBy) {
|
|
7600
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId) : undefined;
|
|
7172
7601
|
const rows = await getDbClient2().query(`SELECT * FROM agent_tasks
|
|
7173
|
-
WHERE agentId = ? AND status = 'paused'
|
|
7174
|
-
ORDER BY createdAt ASC, rowid ASC`, [agentId]);
|
|
7602
|
+
WHERE agentId = ? AND status = 'paused'${readable ? ` AND ${readable.sql}` : ""}
|
|
7603
|
+
ORDER BY createdAt ASC, rowid ASC`, [agentId, ...readable?.params ?? []]);
|
|
7175
7604
|
return rows.map(rowToAgentTask);
|
|
7176
7605
|
}
|
|
7177
7606
|
async function getOrphanedInProgressTasksForAgent2(agentId, minAgeSeconds = 60) {
|
|
@@ -7217,13 +7646,14 @@ async function resetOrphanedInProgressTasksForAgent2(agentId, minAgeSeconds = 60
|
|
|
7217
7646
|
}
|
|
7218
7647
|
return rows.map(rowToAgentTask);
|
|
7219
7648
|
}
|
|
7220
|
-
async function getRecentlyCancelledTasksForAgent2(agentId) {
|
|
7649
|
+
async function getRecentlyCancelledTasksForAgent2(agentId, readableBy) {
|
|
7221
7650
|
const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString();
|
|
7651
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId) : undefined;
|
|
7222
7652
|
const rows = await getDbClient2().query(`SELECT * FROM agent_tasks
|
|
7223
7653
|
WHERE agentId = ?
|
|
7224
7654
|
AND status = 'cancelled'
|
|
7225
|
-
AND finishedAt > ?
|
|
7226
|
-
ORDER BY finishedAt DESC`, [agentId, fiveMinutesAgo]);
|
|
7655
|
+
AND finishedAt > ?${readable ? ` AND ${readable.sql}` : ""}
|
|
7656
|
+
ORDER BY finishedAt DESC`, [agentId, fiveMinutesAgo, ...readable?.params ?? []]);
|
|
7227
7657
|
return rows.map(rowToAgentTask);
|
|
7228
7658
|
}
|
|
7229
7659
|
async function deleteTask2(id) {
|
|
@@ -7250,7 +7680,7 @@ async function updateTaskProgress2(id, progress) {
|
|
|
7250
7680
|
});
|
|
7251
7681
|
} catch {}
|
|
7252
7682
|
getDbClient2().afterCommit(() => {
|
|
7253
|
-
import("./event-bus-
|
|
7683
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
7254
7684
|
workflowEventBus.emit("task.progress", {
|
|
7255
7685
|
taskId: id,
|
|
7256
7686
|
progress: scrubbedProgress,
|
|
@@ -7321,7 +7751,7 @@ function emitChildRunFinished(childRunId, parentStepId, status) {
|
|
|
7321
7751
|
}
|
|
7322
7752
|
function emitAfterCommit(childRunId, parentStepId) {
|
|
7323
7753
|
getDbClient2().afterCommit(() => {
|
|
7324
|
-
import("./event-bus-
|
|
7754
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
7325
7755
|
workflowEventBus.emit("workflow.child.finished", { childRunId, parentStepId });
|
|
7326
7756
|
}).catch((err) => console.error("[db] workflow.child.finished event not emitted:", scrubSecrets(err instanceof Error ? err.message : String(err))));
|
|
7327
7757
|
});
|
|
@@ -7496,6 +7926,87 @@ var init_schema = __esm(() => {
|
|
|
7496
7926
|
};
|
|
7497
7927
|
});
|
|
7498
7928
|
|
|
7929
|
+
// src/telemetry-contract/ranking-taxonomy.gen.ts
|
|
7930
|
+
var RANKING_TAXONOMY;
|
|
7931
|
+
var init_ranking_taxonomy_gen = __esm(() => {
|
|
7932
|
+
RANKING_TAXONOMY = {
|
|
7933
|
+
engineering: ["coding-agents", "qa-testing", "devops", "code-review"],
|
|
7934
|
+
product: ["research", "design", "analytics"],
|
|
7935
|
+
marketing: ["content", "seo", "social"],
|
|
7936
|
+
support: ["customer-support", "docs"],
|
|
7937
|
+
operations: ["back-office", "sales-ops", "finance"],
|
|
7938
|
+
other: []
|
|
7939
|
+
};
|
|
7940
|
+
});
|
|
7941
|
+
|
|
7942
|
+
// src/ranking/telemetry-ranking.ts
|
|
7943
|
+
function inCategory(category, subcategory) {
|
|
7944
|
+
if (subcategory === null)
|
|
7945
|
+
return true;
|
|
7946
|
+
const subs = RANKING_TAXONOMY[category];
|
|
7947
|
+
return subs?.includes(subcategory) ?? false;
|
|
7948
|
+
}
|
|
7949
|
+
function parseTelemetryRanking(raw) {
|
|
7950
|
+
if (new TextEncoder().encode(raw).length > TELEMETRY_RANKING_MAX_BYTES) {
|
|
7951
|
+
throw new Error(`telemetry_ranking exceeds ${TELEMETRY_RANKING_MAX_BYTES} bytes`);
|
|
7952
|
+
}
|
|
7953
|
+
return telemetryRankingSchema.parse(JSON.parse(raw));
|
|
7954
|
+
}
|
|
7955
|
+
function readTelemetryRanking(raw) {
|
|
7956
|
+
if (!raw?.trim())
|
|
7957
|
+
return null;
|
|
7958
|
+
try {
|
|
7959
|
+
return parseTelemetryRanking(raw);
|
|
7960
|
+
} catch {
|
|
7961
|
+
return null;
|
|
7962
|
+
}
|
|
7963
|
+
}
|
|
7964
|
+
function buildListing(identity, form, now = new Date) {
|
|
7965
|
+
if (!identity.ok || !identity.name || !identity.website) {
|
|
7966
|
+
throw new Error(`Org identity is missing: ${identity.missing.join(", ")}`);
|
|
7967
|
+
}
|
|
7968
|
+
const listing = {
|
|
7969
|
+
v: 1,
|
|
7970
|
+
name: identity.name,
|
|
7971
|
+
domain: identity.website,
|
|
7972
|
+
category: form.category,
|
|
7973
|
+
subcategory: blankToNull(form.subcategory),
|
|
7974
|
+
description: blankToNull(form.description),
|
|
7975
|
+
sourceCodeUrl: blankToNull(form.sourceCodeUrl),
|
|
7976
|
+
updatedAt: now.toISOString()
|
|
7977
|
+
};
|
|
7978
|
+
return parseTelemetryRanking(JSON.stringify(listing));
|
|
7979
|
+
}
|
|
7980
|
+
var TELEMETRY_RANKING_KEY = "telemetry_ranking", PUBLIC_RANKING_ENABLED_KEY = "PUBLIC_RANKING_ENABLED", TELEMETRY_RANKING_MAX_BYTES = 2048, RANKING_CATEGORIES, hostname, nullableText = (max) => string2().trim().min(1).max(max).nullable(), telemetryRankingV1, telemetryRankingSchema, rankingFormSchema, blankToNull = (value) => value?.trim() || null;
|
|
7981
|
+
var init_telemetry_ranking = __esm(() => {
|
|
7982
|
+
init_zod();
|
|
7983
|
+
init_ranking_taxonomy_gen();
|
|
7984
|
+
init_org_website();
|
|
7985
|
+
RANKING_CATEGORIES = Object.keys(RANKING_TAXONOMY);
|
|
7986
|
+
hostname = string2().refine((v) => normalizeOrgWebsite(v) === v, "bare hostname");
|
|
7987
|
+
telemetryRankingV1 = strictObject2({
|
|
7988
|
+
v: literal2(1),
|
|
7989
|
+
claim: string2().regex(/^rk_[0-9a-f]{32}$/).optional(),
|
|
7990
|
+
name: string2().trim().min(1).max(60),
|
|
7991
|
+
domain: hostname,
|
|
7992
|
+
category: _enum2(RANKING_CATEGORIES),
|
|
7993
|
+
subcategory: string2().regex(/^[a-z0-9]+(-[a-z0-9]+)*$/).max(40).nullable(),
|
|
7994
|
+
description: nullableText(160),
|
|
7995
|
+
sourceCodeUrl: url({ protocol: /^https$/ }).max(200).nullable(),
|
|
7996
|
+
updatedAt: exports_iso.datetime()
|
|
7997
|
+
}).refine((l) => inCategory(l.category, l.subcategory), {
|
|
7998
|
+
path: ["subcategory"],
|
|
7999
|
+
message: "not in this category"
|
|
8000
|
+
});
|
|
8001
|
+
telemetryRankingSchema = discriminatedUnion("v", [telemetryRankingV1]);
|
|
8002
|
+
rankingFormSchema = object2({
|
|
8003
|
+
category: _enum2(RANKING_CATEGORIES),
|
|
8004
|
+
subcategory: string2().nullable().optional(),
|
|
8005
|
+
description: string2().nullable().optional(),
|
|
8006
|
+
sourceCodeUrl: string2().nullable().optional()
|
|
8007
|
+
});
|
|
8008
|
+
});
|
|
8009
|
+
|
|
7499
8010
|
// src/scripts-runtime/executors/quickjs-pool-config.ts
|
|
7500
8011
|
function validateQuickJSPoolSize(value) {
|
|
7501
8012
|
const error = `Invalid SCRIPT_QUICKJS_POOL_SIZE (must be an integer between 1 and ${MAX_QUICKJS_POOL_SIZE})`;
|
|
@@ -7660,7 +8171,8 @@ function isInternalConfigKey(key) {
|
|
|
7660
8171
|
return INTERNAL_CONFIG_KEYS.has(key.toLowerCase());
|
|
7661
8172
|
}
|
|
7662
8173
|
function internalConfigKeyError(key) {
|
|
7663
|
-
const
|
|
8174
|
+
const lower = key.toLowerCase();
|
|
8175
|
+
const owner = lower === "runtime_owner_id" ? "the runtime supervisor" : lower === TELEMETRY_RANKING_KEY ? "/api/ranking" : "/api/onboarding";
|
|
7664
8176
|
return new Error(`Key '${key}' is managed by ${owner}`);
|
|
7665
8177
|
}
|
|
7666
8178
|
function isReservedConfigKey(key) {
|
|
@@ -7681,7 +8193,8 @@ function booleanValidators(keys) {
|
|
|
7681
8193
|
]));
|
|
7682
8194
|
}
|
|
7683
8195
|
function enumValidator(key, options) {
|
|
7684
|
-
const
|
|
8196
|
+
const listed = options.filter(Boolean).join(", ");
|
|
8197
|
+
const message = `Invalid ${key} value (must be one of: ${listed}${options.includes("") ? ", or empty" : ""})`;
|
|
7685
8198
|
return {
|
|
7686
8199
|
[key]: (value) => {
|
|
7687
8200
|
if (typeof value !== "string")
|
|
@@ -7769,10 +8282,12 @@ function validateExportToEnv(key, exportToEnv) {
|
|
|
7769
8282
|
var TEAMS_SDK_ENV_KEYS, RESERVED_KEYS, API_ONLY_CONFIG_KEYS, INTERNAL_CONFIG_KEYS, BOOLEAN_LITERALS, MAX_DB_RETENTION_DAYS = 1e6, DB_RETENTION_TUNING_BOUNDS, validateControllerTokenTtlDays, validateControllerGraceSec, VALIDATED_KEYS;
|
|
7770
8283
|
var init_swarm_config_guard = __esm(() => {
|
|
7771
8284
|
init_schema();
|
|
8285
|
+
init_telemetry_ranking();
|
|
7772
8286
|
init_quickjs_pool_config();
|
|
7773
8287
|
init_reaction_shortcode();
|
|
7774
8288
|
init_types();
|
|
7775
8289
|
init_api_drain();
|
|
8290
|
+
init_company_profile();
|
|
7776
8291
|
init_config_env_export();
|
|
7777
8292
|
init_egress_guard();
|
|
7778
8293
|
init_enabled_tools();
|
|
@@ -7795,7 +8310,11 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
7795
8310
|
"CHAT_SDK_API_URL_OVERRIDES"
|
|
7796
8311
|
]);
|
|
7797
8312
|
API_ONLY_CONFIG_KEYS = new Set(["API_AGENT_FS_API_KEY", "SLACK_SIGNING_SECRET"]);
|
|
7798
|
-
INTERNAL_CONFIG_KEYS = new Set([
|
|
8313
|
+
INTERNAL_CONFIG_KEYS = new Set([
|
|
8314
|
+
"onboarding_state",
|
|
8315
|
+
"runtime_owner_id",
|
|
8316
|
+
TELEMETRY_RANKING_KEY
|
|
8317
|
+
]);
|
|
7799
8318
|
BOOLEAN_LITERALS = ["true", "false", "1", "0"];
|
|
7800
8319
|
DB_RETENTION_TUNING_BOUNDS = {
|
|
7801
8320
|
DB_RETENTION_TICK_BUDGET_MS: { min: 1000, max: 300000 },
|
|
@@ -7837,6 +8356,16 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
7837
8356
|
return "Invalid TASK_TOOL_MANIFESTS (expected JSON with taskTypes and/or schedules maps, each selecting at most 16 known swarm tools)";
|
|
7838
8357
|
}
|
|
7839
8358
|
},
|
|
8359
|
+
[TELEMETRY_RANKING_KEY.toUpperCase()]: (value) => {
|
|
8360
|
+
try {
|
|
8361
|
+
if (typeof value !== "string")
|
|
8362
|
+
throw new Error("Expected JSON string");
|
|
8363
|
+
parseTelemetryRanking(value);
|
|
8364
|
+
return null;
|
|
8365
|
+
} catch {
|
|
8366
|
+
return "Invalid telemetry_ranking (expected the v1 ranking listing JSON)";
|
|
8367
|
+
}
|
|
8368
|
+
},
|
|
7840
8369
|
SWARM_ENABLED_TOOLS: (value) => {
|
|
7841
8370
|
try {
|
|
7842
8371
|
if (typeof value !== "string")
|
|
@@ -7908,8 +8437,12 @@ var init_swarm_config_guard = __esm(() => {
|
|
|
7908
8437
|
const str = String(value).trim();
|
|
7909
8438
|
return str === "" || normalizeOrgWebsite(str) === str ? null : "Invalid SWARM_ORG_WEBSITE (must be a public hostname such as example.com, without scheme, www, path or port)";
|
|
7910
8439
|
},
|
|
8440
|
+
...enumValidator("SWARM_ORG_TEAM_SIZE", ["", ...COMPANY_TEAM_SIZES]),
|
|
8441
|
+
...enumValidator("SWARM_ORG_USE_CASE", ["", ...COMPANY_USE_CASES]),
|
|
8442
|
+
...enumValidator("SWARM_ORG_ACQUISITION_SOURCE", ["", ...COMPANY_ACQUISITION_SOURCES]),
|
|
7911
8443
|
...booleanValidators([
|
|
7912
8444
|
"SWARM_USED_BY_CONSENT",
|
|
8445
|
+
"PUBLIC_RANKING_ENABLED",
|
|
7913
8446
|
"SWARM_DEV_MODE",
|
|
7914
8447
|
"MULTI_RUNTIME_ENABLED",
|
|
7915
8448
|
"STEERING_ENABLED",
|
|
@@ -18484,7 +19017,7 @@ async function loadSecretRegistry() {
|
|
|
18484
19017
|
result.failed += 1;
|
|
18485
19018
|
}
|
|
18486
19019
|
try {
|
|
18487
|
-
const { loadRuntimeControllerSecrets } = await import("./db-
|
|
19020
|
+
const { loadRuntimeControllerSecrets } = await import("./db-ys2rbdft.js");
|
|
18488
19021
|
const loaded = await loadRuntimeControllerSecrets();
|
|
18489
19022
|
result.runtimeController = loaded.count;
|
|
18490
19023
|
result.failed += loaded.failed;
|
|
@@ -18741,6 +19274,9 @@ async function refreshActiveSessionOnActivity2(taskId, minIntervalMs = SESSION_A
|
|
|
18741
19274
|
const result = await getDbClient2().run("UPDATE active_sessions SET lastHeartbeatAt = ? WHERE taskId = ? AND lastHeartbeatAt < ?", [new Date(nowMs).toISOString(), taskId, new Date(nowMs - minIntervalMs).toISOString()]);
|
|
18742
19275
|
return result.changes > 0;
|
|
18743
19276
|
}
|
|
19277
|
+
async function getActiveSessionById(id) {
|
|
19278
|
+
return getDbClient2().get("SELECT * FROM active_sessions WHERE id = ?", [id]);
|
|
19279
|
+
}
|
|
18744
19280
|
var SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2 = 30000;
|
|
18745
19281
|
var init_active_sessions = __esm(() => {
|
|
18746
19282
|
init_runtime();
|
|
@@ -20329,11 +20865,12 @@ async function getSteeringMessageById2(id) {
|
|
|
20329
20865
|
async function getPendingSteeringForTask2(taskId) {
|
|
20330
20866
|
return await getSteeringMessagesForTask2(taskId, { status: "pending" });
|
|
20331
20867
|
}
|
|
20332
|
-
async function getPendingSteeringForAgent2(agentId) {
|
|
20868
|
+
async function getPendingSteeringForAgent2(agentId, readableBy) {
|
|
20869
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId, "t.id") : undefined;
|
|
20333
20870
|
const rows = await getDbClient2().query(`${STEERING_MESSAGE_SELECT}
|
|
20334
20871
|
JOIN agent_tasks t ON t.id = m.task_id
|
|
20335
|
-
WHERE t.agentId = ? AND m.status = 'pending'
|
|
20336
|
-
ORDER BY m.created_at ASC, m.rowid ASC`, [agentId]);
|
|
20872
|
+
WHERE t.agentId = ? AND m.status = 'pending'${readable ? ` AND ${readable.sql}` : ""}
|
|
20873
|
+
ORDER BY m.created_at ASC, m.rowid ASC`, [agentId, ...readable?.params ?? []]);
|
|
20337
20874
|
return rows.map(rowToSteeringMessage);
|
|
20338
20875
|
}
|
|
20339
20876
|
async function markSteeringDelivered2(id, deliveredMode, expectedTaskId) {
|
|
@@ -20389,12 +20926,12 @@ async function hasPendingSteering2(taskId) {
|
|
|
20389
20926
|
LIMIT 1`, [taskId]);
|
|
20390
20927
|
return row !== null;
|
|
20391
20928
|
}
|
|
20392
|
-
async function getAgentWithTasks2(id) {
|
|
20929
|
+
async function getAgentWithTasks2(id, readableBy) {
|
|
20393
20930
|
return await getDbClient2().transaction(async () => {
|
|
20394
20931
|
const agent = await getAgentById2(id);
|
|
20395
20932
|
if (!agent)
|
|
20396
20933
|
return null;
|
|
20397
|
-
const tasks = await getTasksByAgentId2(id);
|
|
20934
|
+
const tasks = await getTasksByAgentId2(id, readableBy);
|
|
20398
20935
|
return { ...agent, tasks };
|
|
20399
20936
|
}, { readOnly: true });
|
|
20400
20937
|
}
|
|
@@ -20403,7 +20940,7 @@ async function getAllAgentsWithTasks2(opts) {
|
|
|
20403
20940
|
const agents = await getAllAgents2({ slim: opts?.slim ?? false });
|
|
20404
20941
|
return await Promise.all(agents.map(async (agent) => ({
|
|
20405
20942
|
...agent,
|
|
20406
|
-
tasks: await getTasksByAgentId2(agent.id)
|
|
20943
|
+
tasks: await getTasksByAgentId2(agent.id, opts?.readableBy)
|
|
20407
20944
|
})));
|
|
20408
20945
|
}, { readOnly: true });
|
|
20409
20946
|
}
|
|
@@ -20436,8 +20973,9 @@ async function createLogEntry2(entry) {
|
|
|
20436
20973
|
throw new Error("Failed to create log entry");
|
|
20437
20974
|
return rowToAgentLog(row);
|
|
20438
20975
|
}
|
|
20439
|
-
async function getLogsByAgentId2(agentId) {
|
|
20440
|
-
const
|
|
20976
|
+
async function getLogsByAgentId2(agentId, readableBy) {
|
|
20977
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId, "agent_log.taskId", { nullable: true }) : undefined;
|
|
20978
|
+
const rows = await getDbClient2().query(`SELECT * FROM agent_log WHERE agentId = ?${readable ? ` AND ${readable.sql}` : ""} ORDER BY createdAt DESC`, [agentId, ...readable?.params ?? []]);
|
|
20441
20979
|
return rows.map(rowToAgentLog);
|
|
20442
20980
|
}
|
|
20443
20981
|
async function getLogsByTaskId2(taskId, limit = 200) {
|
|
@@ -20456,12 +20994,14 @@ async function getLogsByEventType2(eventType) {
|
|
|
20456
20994
|
const rows = await getDbClient2().query("SELECT * FROM agent_log WHERE eventType = ? ORDER BY createdAt DESC", [eventType]);
|
|
20457
20995
|
return rows.map(rowToAgentLog);
|
|
20458
20996
|
}
|
|
20459
|
-
async function getAllLogs2(limit) {
|
|
20997
|
+
async function getAllLogs2(limit, readableBy) {
|
|
20998
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId, "agent_log.taskId", { nullable: true }) : undefined;
|
|
20999
|
+
const readableParams = readable?.params ?? [];
|
|
20460
21000
|
if (limit) {
|
|
20461
|
-
const rows = await getDbClient2().query(
|
|
21001
|
+
const rows = await getDbClient2().query(`SELECT * FROM agent_log WHERE eventType != 'agent_status_change'${readable ? ` AND ${readable.sql}` : ""} ORDER BY createdAt DESC LIMIT ?`, [...readableParams, limit]);
|
|
20462
21002
|
return rows.map(rowToAgentLog);
|
|
20463
21003
|
}
|
|
20464
|
-
const rows = await getDbClient2().query(
|
|
21004
|
+
const rows = await getDbClient2().query(`SELECT * FROM agent_log${readable ? ` WHERE ${readable.sql}` : ""} ORDER BY createdAt DESC`, readableParams);
|
|
20465
21005
|
return rows.map(rowToAgentLog);
|
|
20466
21006
|
}
|
|
20467
21007
|
async function findRecentSimilarTasks2(opts) {
|
|
@@ -20837,7 +21377,7 @@ async function createTaskExtended2(task, options) {
|
|
|
20837
21377
|
priority: row.priority
|
|
20838
21378
|
}, (task) => task !== null, row.requestedByUserId);
|
|
20839
21379
|
getDbClient2().afterCommit(() => {
|
|
20840
|
-
import("./event-bus-
|
|
21380
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
|
|
20841
21381
|
workflowEventBus.emit("task.created", {
|
|
20842
21382
|
taskId: row.id,
|
|
20843
21383
|
task: row.task,
|
|
@@ -20919,7 +21459,7 @@ async function releaseTask2(taskId, wakeSnapshot) {
|
|
|
20919
21459
|
} catch {}
|
|
20920
21460
|
if (isRuntimePoolsEnabled() && !wakeSnapshot)
|
|
20921
21461
|
getDbClient2().afterCommit(() => {
|
|
20922
|
-
import("./event-bus-
|
|
21462
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
|
|
20923
21463
|
});
|
|
20924
21464
|
}
|
|
20925
21465
|
return row ? rowToAgentTask(row) : null;
|
|
@@ -20989,7 +21529,7 @@ async function rejectTask2(taskId, agentId, reason) {
|
|
|
20989
21529
|
} catch {}
|
|
20990
21530
|
if (isRuntimePoolsEnabled())
|
|
20991
21531
|
getDbClient2().afterCommit(() => {
|
|
20992
|
-
import("./event-bus-
|
|
21532
|
+
import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
|
|
20993
21533
|
});
|
|
20994
21534
|
}
|
|
20995
21535
|
return row ? rowToAgentTask(row) : null;
|
|
@@ -22336,21 +22876,24 @@ async function releaseStaleProcessingInbox2(timeoutMinutes = 30) {
|
|
|
22336
22876
|
WHERE status = 'processing' AND lastUpdatedAt < ?`, [now, cutoffTime]);
|
|
22337
22877
|
return result.changes;
|
|
22338
22878
|
}
|
|
22339
|
-
async function getConcurrentContext2() {
|
|
22879
|
+
async function getConcurrentContext2(readableBy) {
|
|
22340
22880
|
const client = getDbClient2();
|
|
22881
|
+
const readable = readableBy ? readableSessionCondition(readableBy.userId, "t.id") : undefined;
|
|
22882
|
+
const readableSql = readable ? ` AND ${readable.sql}` : "";
|
|
22883
|
+
const readableParams = readable?.params ?? [];
|
|
22341
22884
|
const processingInboxMessages = await client.query("SELECT id, content, source, slackChannelId, slackThreadTs, createdAt FROM inbox_messages WHERE status = 'processing' ORDER BY createdAt DESC");
|
|
22342
22885
|
const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString();
|
|
22343
22886
|
const recentTaskDelegations = await client.query(`SELECT t.id, t.task, t.agentId, a.name as agentName, t.creatorAgentId, t.status, t.createdAt
|
|
22344
22887
|
FROM agent_tasks t
|
|
22345
22888
|
LEFT JOIN agents a ON t.agentId = a.id
|
|
22346
22889
|
WHERE t.createdAt > ?
|
|
22347
|
-
AND t.creatorAgentId IN (SELECT id FROM agents WHERE isLead = 1)
|
|
22348
|
-
ORDER BY t.createdAt DESC`, [fiveMinutesAgo]);
|
|
22890
|
+
AND t.creatorAgentId IN (SELECT id FROM agents WHERE isLead = 1)${readableSql}
|
|
22891
|
+
ORDER BY t.createdAt DESC`, [fiveMinutesAgo, ...readableParams]);
|
|
22349
22892
|
const activeSwarmTasks = await client.query(`SELECT t.id, t.task, t.agentId, a.name as agentName, t.status, t.createdAt, t.progress
|
|
22350
22893
|
FROM agent_tasks t
|
|
22351
22894
|
LEFT JOIN agents a ON t.agentId = a.id
|
|
22352
|
-
WHERE t.status = 'in_progress'
|
|
22353
|
-
ORDER BY t.createdAt DESC
|
|
22895
|
+
WHERE t.status = 'in_progress'${readableSql}
|
|
22896
|
+
ORDER BY t.createdAt DESC`, readableParams);
|
|
22354
22897
|
return {
|
|
22355
22898
|
processingInboxMessages,
|
|
22356
22899
|
recentTaskDelegations,
|
|
@@ -23094,11 +23637,22 @@ async function deleteActiveSessionById2(id) {
|
|
|
23094
23637
|
const result = await getDbClient2().run("DELETE FROM active_sessions WHERE id = ?", [id]);
|
|
23095
23638
|
return result.changes > 0;
|
|
23096
23639
|
}
|
|
23097
|
-
async function getActiveSessions2(agentId) {
|
|
23640
|
+
async function getActiveSessions2(agentId, readableBy) {
|
|
23641
|
+
const conditions = [];
|
|
23642
|
+
const params = [];
|
|
23098
23643
|
if (agentId) {
|
|
23099
|
-
|
|
23644
|
+
conditions.push("agentId = ?");
|
|
23645
|
+
params.push(agentId);
|
|
23100
23646
|
}
|
|
23101
|
-
|
|
23647
|
+
if (readableBy) {
|
|
23648
|
+
const readable = readableSessionCondition(readableBy.userId, "active_sessions.taskId", {
|
|
23649
|
+
nullable: true
|
|
23650
|
+
});
|
|
23651
|
+
conditions.push(readable.sql);
|
|
23652
|
+
params.push(...readable.params);
|
|
23653
|
+
}
|
|
23654
|
+
const where = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
23655
|
+
return await getDbClient2().query(`SELECT * FROM active_sessions ${where} ORDER BY startedAt DESC`, params);
|
|
23102
23656
|
}
|
|
23103
23657
|
async function heartbeatActiveSession2(taskId) {
|
|
23104
23658
|
const now = new Date().toISOString();
|
|
@@ -25849,8 +26403,12 @@ async function updateUser2(id, data) {
|
|
|
25849
26403
|
params.push(new Date().toISOString());
|
|
25850
26404
|
params.push(id);
|
|
25851
26405
|
const row = await getDbClient2().get(`UPDATE users SET ${sets.join(", ")} WHERE id = ? RETURNING *`, params);
|
|
25852
|
-
if (row)
|
|
25853
|
-
getDbClient2().afterCommit(
|
|
26406
|
+
if (row) {
|
|
26407
|
+
getDbClient2().afterCommit(() => {
|
|
26408
|
+
invalidateTelemetryUserRole(id);
|
|
26409
|
+
scheduleOrgDomainRecompute();
|
|
26410
|
+
});
|
|
26411
|
+
}
|
|
25854
26412
|
return row ? rowToUser(row) : null;
|
|
25855
26413
|
}
|
|
25856
26414
|
function quoteSqlIdentifier(identifier) {
|
|
@@ -25935,8 +26493,12 @@ async function deleteUser2(id, replacementUserId) {
|
|
|
25935
26493
|
}
|
|
25936
26494
|
await reclassifyTaskHumanFree(reclassifySeedIds);
|
|
25937
26495
|
const result = await tx.run("DELETE FROM users WHERE id = ?", [id]);
|
|
25938
|
-
if (result.changes > 0)
|
|
25939
|
-
getDbClient2().afterCommit(
|
|
26496
|
+
if (result.changes > 0) {
|
|
26497
|
+
getDbClient2().afterCommit(() => {
|
|
26498
|
+
invalidateTelemetryUserRole(id);
|
|
26499
|
+
scheduleOrgDomainRecompute();
|
|
26500
|
+
});
|
|
26501
|
+
}
|
|
25940
26502
|
return result.changes > 0;
|
|
25941
26503
|
});
|
|
25942
26504
|
}
|
|
@@ -26153,6 +26715,11 @@ async function listRecentSessions2(opts) {
|
|
|
26153
26715
|
conditions.push(`r.contextKey LIKE ? ESCAPE '\\'`);
|
|
26154
26716
|
params.push(literalPrefixPattern(opts.contextKeyPrefix));
|
|
26155
26717
|
}
|
|
26718
|
+
if (opts?.viewer) {
|
|
26719
|
+
const viewer = sessionViewerCondition(opts.viewer);
|
|
26720
|
+
conditions.push(viewer.sql);
|
|
26721
|
+
params.push(...viewer.params);
|
|
26722
|
+
}
|
|
26156
26723
|
params.push(limit, offset);
|
|
26157
26724
|
const rootRows = await getDbClient2().query(`WITH RECURSIVE chain(root_id, id, lastUpdatedAt, status) AS (
|
|
26158
26725
|
SELECT r.id, r.id, r.lastUpdatedAt, r.status
|
|
@@ -26212,26 +26779,31 @@ async function countSessions2(opts) {
|
|
|
26212
26779
|
const sources = opts?.source?.filter((s) => s.length > 0) ?? [];
|
|
26213
26780
|
const q = opts?.q?.trim();
|
|
26214
26781
|
const requestedByUserId = opts?.requestedByUserId?.trim() || undefined;
|
|
26215
|
-
const conditions = ["parentTaskId IS NULL"];
|
|
26782
|
+
const conditions = ["r.parentTaskId IS NULL"];
|
|
26216
26783
|
const params = [];
|
|
26217
26784
|
if (sources.length > 0) {
|
|
26218
|
-
conditions.push(`source IN (${sources.map(() => "?").join(", ")})`);
|
|
26785
|
+
conditions.push(`r.source IN (${sources.map(() => "?").join(", ")})`);
|
|
26219
26786
|
params.push(...sources);
|
|
26220
26787
|
}
|
|
26221
26788
|
if (q && q.length > 0) {
|
|
26222
|
-
conditions.push("(lower(task) LIKE ? OR lower(COALESCE(title, '')) LIKE ?)");
|
|
26789
|
+
conditions.push("(lower(r.task) LIKE ? OR lower(COALESCE(r.title, '')) LIKE ?)");
|
|
26223
26790
|
const like = `%${q.toLowerCase()}%`;
|
|
26224
26791
|
params.push(like, like);
|
|
26225
26792
|
}
|
|
26226
26793
|
if (requestedByUserId) {
|
|
26227
|
-
conditions.push("requestedByUserId = ?");
|
|
26794
|
+
conditions.push("r.requestedByUserId = ?");
|
|
26228
26795
|
params.push(requestedByUserId);
|
|
26229
26796
|
}
|
|
26230
26797
|
if (opts?.contextKeyPrefix) {
|
|
26231
|
-
conditions.push(`contextKey LIKE ? ESCAPE '\\'`);
|
|
26798
|
+
conditions.push(`r.contextKey LIKE ? ESCAPE '\\'`);
|
|
26232
26799
|
params.push(literalPrefixPattern(opts.contextKeyPrefix));
|
|
26233
26800
|
}
|
|
26234
|
-
|
|
26801
|
+
if (opts?.viewer) {
|
|
26802
|
+
const viewer = sessionViewerCondition(opts.viewer);
|
|
26803
|
+
conditions.push(viewer.sql);
|
|
26804
|
+
params.push(...viewer.params);
|
|
26805
|
+
}
|
|
26806
|
+
const row = await getDbClient2().get(`SELECT COUNT(*) AS count FROM agent_tasks r WHERE ${conditions.join(" AND ")}`, params);
|
|
26235
26807
|
return row?.count ?? 0;
|
|
26236
26808
|
}
|
|
26237
26809
|
function rowToBudget(row) {
|
|
@@ -26960,6 +27532,7 @@ var init_db3 = __esm(() => {
|
|
|
26960
27532
|
init_context_versions();
|
|
26961
27533
|
init_model_profiles();
|
|
26962
27534
|
init_runtime();
|
|
27535
|
+
init_session_visibility();
|
|
26963
27536
|
init_human_free();
|
|
26964
27537
|
init_read();
|
|
26965
27538
|
init_write();
|
|
@@ -27032,4 +27605,4 @@ var init_db3 = __esm(() => {
|
|
|
27032
27605
|
};
|
|
27033
27606
|
});
|
|
27034
27607
|
|
|
27035
|
-
export { slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, getCurrentRequestAuth, runWithoutRequestAuth, getCurrentRequestUserId, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, init_scrub_json, sealJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates, init_templates2, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime, cachedUserRole, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, CODEX_AUTH_WATCH_NAMESPACE, codexAuthBenchMarkerKey, isCodexAuthFailureReason, init_codex_auth_failure, isEnvExportRestrictedKey, init_config_env_export, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, rowToAgentTask, getTaskById2, getChildTasks2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findTaskByGitHub2, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getMostRecentTaskInThread2, findCompletedTaskInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, modelProfileReferences, modelProfileRefError, deleteModelProfile, getAgentDefaultProfileName, repoModelOverrideKeys, taskProfileError, init_model_profiles, setHumanFreeQueueListener, drainHumanFreeReclassifyQueue, init_human_free, onTaskStarted, init_task_lifecycle_events, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, supersedeTask2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, getChildWorkflowRunId, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, init_workflow_runs, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, completedStatusIcon, init_reaction_shortcode, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain, parseEnabledTools, init_enabled_tools, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateExportToEnv, init_swarm_config_guard, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, OpenAI2, init_openai, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants, LONGTERM_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider, embedScript, searchScripts, reembedAllScripts, init_embeddings, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db2, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, STEERING_MOVED_ERROR, SteeringRequestError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering, WorkflowReplayStateError, init_workflow_replay, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, recordKeySeatMismatch2, getScriptRunExecutionArgs2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db3 };
|
|
27608
|
+
export { slackContextKey, chatSdkContextKey, chatThreadOfContextKey, agentmailContextKey, githubContextKey, gitlabContextKey, azureDevOpsContextKey, azureDevOpsWorkItemContextKey, linearContextKey, buildJiraContextKey, scheduleContextKey, workflowContextKey, agentContextKey, pageContextKey, init_context_key, checkSlackRoutingCoherence, init_slack_routing, init_catalog, catalog_default, COMPANY_TEAM_SIZES, COMPANY_USE_CASES, USER_FUNCTIONS, init_company_profile, mapTriggerSurface, init_telemetry_context, TELEMETRY_PROXY_ORIGIN, normalizeOrgWebsite, orgLogoUrl, isFilledOrgLogoUrl, init_org_website, beginRequestAuthScope, setRequestAuth, getRequestAuth, getCurrentRequestAuth, runWithoutRequestAuth, getCurrentRequestUserId, init_request_auth_context, setTelemetryIngestObserver, isTelemetryEnabled, _resolveIntegrationType, _resolveIntegrationProvider, initTelemetry, setTelemetryRoleResolver, setTelemetryFunctionResolver, isTelemetryReady, track, trackRelayed, telemetry, emitIntegrationConnected, init_telemetry, auditAssetKeys, init_asset_key_audit, CredentialBindingSchema, placeholderForConfigKey, CredentialBroker, DEFAULT_CREDENTIAL_BINDINGS, assertUrlSafe, parseEgressAllowlist, init_egress_guard, init_credential_broker, encryptSecret, decryptSecret, getEncryptionKey, init_crypto, isInTransaction, init_db_client, breaksJsonValidity, scrubJsonValue, init_scrub_json, sealJson, init_sealed_json, getPromptTemplateDefaultDrift, init_default_drift, init_templates, init_templates2, isSqliteVecAvailable2, resolveSqliteVecExtensionPath2, __resetSqliteVecExtensionPathCacheForTests2, initDb2, getDb2, closeDb2, getDbClient2, init_runtime, cachedUserRole, cachedUserFunction, configureOrgDomainPersistence, recomputeOrgDomain, scheduleOrgDomainRecompute, init_telemetry_identity, resolveTriggerSurface, emitTaskTelemetry, init_telemetry_trigger, CODEX_AUTH_WATCH_NAMESPACE, codexAuthBenchMarkerKey, isCodexAuthFailureReason, init_codex_auth_failure, isEnvExportRestrictedKey, init_config_env_export, MASKED_SECRET_VALUE, init_config_secrets, HeartbeatExpiryError, init_heartbeat_expiry, isRuntimePoolsEnabled, init_runtime_pools_flag, normalizeDate, normalizeDateRequired, init_date_utils, rowToAgent, updateAgentCredentialState2, updateAgentCredentialMissing2, createAgent2, getAgentById2, EXTENSION_AGENT_ROLE2, NOT_EXTENSION_AGENT_SQL2, isExtensionAgent2, extensionAgentAssignmentError2, ReservedAgentRoleError2, reservedRoleViolation2, ExtensionAgentAssignmentError2, getAllAgents2, getAgentStatusCounts2, getLeadAgent2, updateAgentStatus2, updateAgentMaxTasks2, updateAgentProvider2, setAgentHarnessProvider2, updateAgentCredStatus2, listAgentsWithCredStatusByProvider2, getAgentHarnessProviders2, updateAgentActivity2, MAX_EMPTY_POLLS2, incrementEmptyPollCount2, resetEmptyPollCount2, shouldBlockPolling2, deleteAgent2, getActiveTaskCount2, hasCapacity2, getRemainingCapacity2, updateAgentStatusFromCapacity2, isPoolAffinityEnforcementEnabled2, buildRoutingAffinityFromAgent2, isAgentEligibleForTask2, getAgentDailyTaskCounts2, init_agents, listApprovalRequestSummaries2, getPendingApprovalVoteState2, recordApprovalVotes2, computeContentHash2, createContextVersion2, getLatestContextVersion2, getContextVersion2, getContextVersionHistory2, vcsRepoName, vcsRepoUrlMatches, init_vcs_repo_match, rowToAgentTask, getTaskById2, getChildTasks2, hasNonTerminalResumeChild2, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, getSupersededTasksWithoutResume2, getSupersededTasksWithUnsettledDependents2, hasNonTerminalRerouteDecisionChild2, getTasksByAgentId2, getAgentCurrentTask2, getTasksByStatus2, findTaskByVcs2, findTaskByGitHub2, readableSessionCondition, getAllTasks2, getTasksCount2, getTaskStats2, getCompletedSlackTasks2, getPendingSlackRelayTasks2, markSlackRelayAttempted2, markSlackRelayDelivered2, markFinalizedSlackRelaysDelivered2, getPendingChatRelayTasks2, giveUpStaleChatRelays2, markChatRelayAttempted2, recordChatRelayError2, markChatRelayDelivered2, markChatRelayGivenUp2, getRecentlyFinishedWorkerTasks2, markTasksNotified2, resetTasksNotified2, getInProgressSlackTasks2, getSlackTasksMissingTree2, getInProgressTasksByContextKey2, isLinearTrackerContextKey2, findExistingLinearTrackerContextWork2, getLatestTaskByContextKey2, getLatestScriptRunStepTaskByContextKey2, getAgentWorkingOnThread2, getLatestActiveTaskInThread2, getLatestLeadTaskInThread2, getAgentWorkingOnContextKey2, getLatestActiveTaskByContextKey2, getLatestLeadTaskByContextKey2, getMostRecentTaskInThread2, findCompletedTaskInThread2, findRecentCancelledTaskInThread2, init_read, MODEL_PROFILE_CONFIG_KEY, listModelProfiles, getModelProfileByName, createModelProfile, updateModelProfile, modelProfileReferences, modelProfileRefError, deleteModelProfile, getAgentDefaultProfileName, repoModelOverrideKeys, taskProfileError, init_model_profiles, setHumanFreeQueueListener, drainHumanFreeReclassifyQueue, init_human_free, onTaskStarted, init_task_lifecycle_events, channelTopic, addWorkerSubscription, removeWorkerSubscription, listSubscribedWorkerAgents, init_channels, publishWorkerNudge, init_worker_nudges, createTask2, getPendingTaskForAgent2, assignUnassignedTaskPending2, startTask2, updateTaskClaudeSessionId2, recordTaskProviderIfUnset2, updateTaskTitle2, completeTask2, failTask2, overwriteTerminalTaskResultText2, cancelTask2, supersedeTask2, settleSupersededTaskDependents2, backfillSupersedeTaskResumeTaskId2, pauseTask2, resumeTask2, getPausedTasksForAgent2, getOrphanedInProgressTasksForAgent2, resetOrphanedInProgressTasksForAgent2, getRecentlyCancelledTasksForAgent2, deleteTask2, updateTaskProgress2, getChildWorkflowRunId, getWorkflowRunParent, getWorkflowRunLineage, getSettledChildRunParentSteps, init_workflow_runs, CHAT_SDK_ADAPTER_NAMES, CHAT_SDK_ADAPTER_SCHEMAS, ChatSdkAdaptersDraftSchema, firstIssueText, isAdapterEntryEnabled, init_schema, TELEMETRY_RANKING_KEY, PUBLIC_RANKING_ENABLED_KEY, RANKING_CATEGORIES, readTelemetryRanking, rankingFormSchema, buildListing, init_telemetry_ranking, resolveQuickJSPoolSize, init_quickjs_pool_config, SLACK_REACTION_DEFAULTS, SLACK_REACTION_CONFIG_KEYS, reactionName, completedStatusIcon, init_reaction_shortcode, API_DRAINING_HEADER, API_DRAIN_MAX_MS_LIMIT, isApiDrainingResponse, init_api_drain, parseEnabledTools, init_enabled_tools, parseTaskToolManifest, CHAT_TASK_ONLY_TOOLS, isChatSdkTask, selectTaskTools, init_task_tool_manifest, tierConfigKey, init_model_tier_keys, isApiOnlyConfigKey, isInternalConfigKey, internalConfigKeyError, isReservedConfigKey, reservedKeyError, MAX_DB_RETENTION_DAYS, DB_RETENTION_TUNING_BOUNDS, validateRuntimeTokenTtlHours, validateControllerTokenTtlDays, validateControllerGraceSec, validateConfigValue, validateExportToEnv, init_swarm_config_guard, getDefaultAuthorizationIdForProvider, getOAuthApp, getOAuthAppById, getOAuthAppIdByProvider, createOAuthApp, updateOAuthAppById, upsertOAuthApp, listAuthorizationsForApp, getAuthorizationById, upsertAuthorization, updateAuthorizationTokens, updateAuthorizationIdentity, deleteAuthorizationById, deleteAuthorizationsForApp, createOAuthPending, consumeOAuthPending, gcOAuthPending, markAuthorizationRefreshFailed, getOAuthTokens, listAuthorizationSweepRows, listKeepAliveAuthorizations, deleteOAuthTokens, acquireOAuthRefreshLock, releaseOAuthRefreshLock, init_oauth, OpenAI2, init_openai, CANDIDATE_SET_MULTIPLIER, isGraphExpansionEnabled, EMBEDDING_DIMENSIONS, init_constants, LONGTERM_ROOT, MEMORY_KEY_PATTERN, MEMORY_KEY_PATTERN_MESSAGE, MEMORY_KEY_MAX_LENGTH, isLongtermKey, longtermKeyError, isConsolidatedKey, consolidatedKeyMessage, resolveStoreKey, init_key_paths, computeScore, rerank, init_reranker, rowToCandidate, init_sqlite_store, getEmbeddingProvider2, resetEmbeddingProvider2, getMemoryStore2, init_memory, embeddingProvider, embedScript, searchScripts, reembedAllScripts, init_embeddings, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, init_db2, oauthSecretName, registerStoredSecret, loadSecretRegistry, init_secret_registry, STEERING_MOVED_ERROR, SteeringRequestError, isSteeringEnabled, getTaskSteeringFields, getTaskSteeringFieldsForTasks, promotePendingSteeringForTask, markSteeringUndeliverable, carryUnhandledSteering, requestSteering, init_steering, WorkflowReplayStateError, init_workflow_replay, SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2, refreshActiveSessionOnActivity2, getActiveSessionById, init_active_sessions, recordKeySeatMismatch2, getScriptRunExecutionArgs2, getSlackRenderV2ActivatedAt2, ensureSlackRenderV2Activation2, getSlackDelegationActivatedAt2, ensureSlackDelegationActivation2, isPendingSlackMessage2, isSettledSlackMessage2, recordSlackMessage2, reserveSlackMessage2, bindSlackMessageTimestamp2, updateSlackMessageRecord2, markSlackTreeRendered2, deleteSlackMessageRecord2, getSlackTreeMessage2, getSlackTreeMessageByThread2, getSlackOutcomeMessage2, getResolvableDeferralOutcomes2, markSlackDeferralResolved2, noteSlackOutcomeDeliveryFailure2, abandonSlackOutcomeDelivery2, getSlackTreeMessages2, getSlackMessageByChannelTs2, getSlackTasksInThread2, listSlackThreadsAwaitingHuman2, isSlackThreadAwaitingHuman2, markTaskSlackReplySent2, setSlackMessageTracking2, updateTaskVcs2, insertTaskAttachment2, recordTaskPullRequestAttachments2, getAssetKeyMappingByProvider2, upsertAssetKeyMapping2, getAssetKeyMapping2, listAssetSummaries2, moveAssetKey2, deleteTaskAttachment2, replaceTaskAttachment2, getTaskAttachments2, createSteeringMessage2, getSteeringMessagesForTask2, getSteeringMessageById2, getPendingSteeringForTask2, getPendingSteeringForAgent2, markSteeringDelivered2, markSteeringHandled2, markSteeringPromoted2, cancelPendingSteeringForTask2, hasPendingSteering2, getAgentWithTasks2, getAllAgentsWithTasks2, createLogEntry2, getLogsByAgentId2, getLogsByTaskId2, getLogsByTaskIdAndEventType2, getLogsByTaskIdChronological2, getLogsByEventType2, getAllLogs2, findRecentSimilarTasks2, createTaskExtended2, claimTask2, releaseTask2, acceptTask2, rejectTask2, moveTaskToBacklog2, moveTaskFromBacklog2, promoteDraftTask2, refreshDraftTaskLease2, promoteAbandonedDraftTasks2, releaseStaleReviewingTasks2, releaseStaleOfferedTasksForOfflineAgents2, getOfferedTasksForAgent2, claimOfferedTask2, getUnassignedTasksCount2, getUnassignedTaskIds2, getUnassignedTaskIdsForAgent2, checkDependencies2, getDependentTasks2, cascadeFailDependents2, updateAgentProfile2, updateAgentName2, createChannel2, getMessageById2, getChannelById2, getChannelByName2, getAllChannels2, deleteChannel2, postMessage2, getChannelMessages2, updateReadState2, getLastReadAt2, getUnreadMessages2, getMentionsForAgent2, getInboxSummary2, claimMentions2, releaseMentionProcessing2, releaseStaleMentionProcessing2, createService2, getServiceById2, getServiceByAgentAndName2, getServicesByAgentId2, getAllServices2, updateServiceStatus2, deleteService2, upsertService2, deleteServicesByAgentId2, createSessionLogs2, getSessionLogsByTaskId2, getSessionLogsBySession2, createSessionCost2, getSessionCostsByTaskId2, getSessionCostsByAgentId2, getAllSessionCosts2, getSessionCostsFiltered2, UNATTRIBUTED_USER_ID2, getSessionCostSummary2, getAttributionByPerson2, getDashboardCostSummary2, createInboxMessage2, getInboxMessageById2, getUnreadInboxMessages2, claimInboxMessages2, markInboxMessageRead2, markInboxMessageResponded2, markInboxMessageDelegated2, releaseStaleProcessingInbox2, getConcurrentContext2, getScheduledTasks2, getScheduledTaskById2, getScheduledTaskByName2, createScheduledTask2, updateScheduledTask2, deleteScheduledTask2, getDueScheduledTasks2, autoEncryptLegacyPlaintextSecrets2, maskSecrets2, getSwarmConfigs2, getInjectableGlobalConfigs2, getSwarmConfigById2, getSwarmConfigLookupById2, upsertSwarmConfig2, emitBuiltInIntegrationConnectedOnce2, deleteSwarmConfig2, deleteSwarmConfigByKey2, getResolvedConfig2, getSwarmRepos2, getSwarmRepoById2, getSwarmRepoByName2, getSwarmRepoByUrl2, createSwarmRepo2, updateSwarmRepo2, deleteSwarmRepo2, getAgentMailInboxMapping2, getAgentMailInboxMappingsByAgent2, getAllAgentMailInboxMappings2, createAgentMailInboxMapping2, deleteAgentMailInboxMapping2, findTaskByAgentMailThread2, insertActiveSession2, deleteActiveSession2, deleteActiveSessionById2, getActiveSessions2, heartbeatActiveSession2, cleanupStaleSessions2, cleanupAgentSessions2, updateActiveSessionProviderSessionId2, getActiveSessionForTask2, reassociateSessionLogs2, getStalledInProgressTasks2, getStalePinnedResumes2, failPendingResumeIfUnclaimed2, getIdleWorkersWithCapacity2, getUnassignedPoolTasks2, getStaleUnassignedAffinityTasks2, getRecentFailedTasks2, getRecentCompletedCount2, getRecentFailedCount2, createWorkflow2, getWorkflow2, listWorkflows2, updateWorkflow2, deleteWorkflow2, getWorkflowsByScheduleId2, createWorkflowRun2, getWorkflowRun2, updateWorkflowRun2, listWorkflowRuns2, countWorkflowRuns2, listWorkflowRunsPage2, createWorkflowRunStep2, getWorkflowRunStep2, updateWorkflowRunStep2, getWorkflowRunStepsByRunId2, getStuckWorkflowRuns2, getLastSuccessfulRun2, getLastRunStart2, getRetryableSteps2, getCompletedStepNodeIds2, getTaskByWorkflowRunStepId2, detachTaskFromWorkflowRunStep2, getStepByIdempotencyKey2, getStepCountForNode2, getLatestStepForNode2, getCurrentStepForNode2, createWorkflowVersion2, getWorkflowVersions2, getWorkflowVersion2, createAppVersion2, getAppVersions2, getAppVersion2, createPage2, getPage2, getPageBySlug2, getLatestPageBySlug2, listPagesByAgent2, listAllPages2, countAllPages2, countPagesByAgent2, updatePage2, deletePage2, incrementPageViewCount2, createPageVersion2, getPageVersions2, getPageVersion2, createMetric2, getMetric2, getMetricBySlug2, listMetricsByAgent2, listAllMetrics2, countAllMetrics2, countMetricsByAgent2, updateMetric2, deleteMetric2, createMetricVersion2, getMetricVersions2, getMetricVersion2, getPromptTemplates2, getPromptTemplateById2, upsertPromptTemplate2, deletePromptTemplate2, resetPromptTemplateToDefault2, getPromptTemplateHistory2, resolvePromptTemplate2, checkoutPromptTemplate2, getAllChannelActivityCursors2, getChannelActivityCursor2, upsertChannelActivityCursor2, createApprovalRequest2, getApprovalRequestById2, resolveApprovalRequest2, cancelApprovalRequestById2, cancelPendingApprovalRequestsForRun2, listCancelledApprovalRequestsForRun2, listCancelledApprovalRequestsForStep2, claimApprovalCancellationNotification2, completeApprovalCancellationNotificationClaim2, releaseApprovalCancellationNotificationClaim2, updateApprovalRequestNotifications2, listApprovalRequests2, getStuckApprovalRuns2, getApprovalRequestByStepId2, getExpiredPendingApprovals2, getStaleApprovalRequests2, createWaitState2, getWaitStateById2, getWaitStateByStepId2, getDueWaitStates2, getPendingEventWaitNames2, getPendingWaitsByEvent2, resolveWaitState2, getStuckWaitRuns2, SKILL_FILE_LIMITS2, normalizeSkillFilePath2, createSkill2, updateSkill2, listSkillFileManifest2, getSkillFiles2, getSkillFile2, upsertSkillFile2, upsertSkillFiles2, deleteSkillFile2, deleteSkill2, getSkillById2, getSkillByName2, listSkills2, searchSkills2, installSkill2, getSystemDefaultSkills2, installSystemDefaultSkillsForAgent2, uninstallSkill2, getAgentSkills2, toggleAgentSkill2, createMcpServer2, emitMcpServerConnectedTelemetry2, updateMcpServer2, deleteMcpServer2, getMcpServerById2, getMcpServerByName2, listMcpServers2, installMcpServer2, uninstallMcpServer2, getAgentMcpServers2, createContextSnapshot2, getContextSnapshotsByTaskId2, getContextSnapshotsBySessionId2, getContextSummaryByTaskId2, getAvailableKeyIndices2, recordKeyUsage2, setApiKeyPlan2, markKeyRateLimited2, recordKeyAuthFailure2, recordKeyRateLimitWindows2, setApiKeyName2, clearKeyRateLimit2, getKeyStatuses2, getKeyCostSummary2, getUserById2, getAllUsers2, createUser2, updateUser2, deleteUser2, listInboxState2, upsertInboxState2, listFavorites2, listUserFavorites2, getFavoriteItemIdSet2, setFavorite2, setUserFavorite2, withFavoriteFlags2, listTaskTemplates2, getRootTaskChain2, listRecentSessions2, countSessions2, getBudget2, getBudgets2, upsertBudget2, deleteBudget2, getAllPricingRows2, getPricingRows2, getActivePricingRow2, insertPricingRow2, deletePricingRow2, getDailySpendForAgent2, getDailySpendGlobal2, getDailySpendForUser2, recordBudgetRefusalNotification2, getBudgetRefusalNotification2, getRecentBudgetRefusalNotifications2, hasBudgetRefusalNotificationToday2, setBudgetRefusalFollowUpTaskId2, getLiveAgentCounts2, getReadyAgentCounts2, getInstanceActivity2, getSwarmMetrics2, hasFirstCompletedTask2, getKv2, sweepExpiredKv2, sweepExpiredKvPrefix2, upsertKv2, claimKv2, deleteKv2, KvTypeCollisionError2, incrKv2, kvPrefixUpperBound2, listKv2, countKv2, createScriptRun2, recordInlineScriptRun2, getScriptRun2, getScriptRunByIdempotencyKey2, listScriptRuns2, countScriptRuns2, countActiveScriptRuns2, updateScriptRun2, updateScriptRunIfNotTerminal2, updateScriptRunIfRunning2, getRunningScriptRuns2, getScriptRunJournalStep2, upsertScriptRunJournalStep2, listScriptRunJournalSteps2, countScriptRunJournalSteps2, countScriptRunJournalAgentTaskSteps2, exports_db, init_db3 };
|