@desplega.ai/agent-swarm 2.4.0 → 2.4.2

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.
Files changed (239) hide show
  1. package/README.md +1 -1
  2. package/dist/{acp-adapter-kedstxx6.js → acp-adapter-dv7hmx4r.js} +9 -9
  3. package/dist/{actions-vget6r1k.js → actions-51nc1gny.js} +21 -21
  4. package/dist/{amp-adapter-xeb5mktv.js → amp-adapter-abp5tdx8.js} +4 -4
  5. package/dist/{app-mqap8t8m.js → app-9h14qvr6.js} +3 -3
  6. package/dist/{assistant-h0gv97mv.js → assistant-wv1gz3mt.js} +22 -22
  7. package/dist/{boot-reembed-qr8a894z.js → boot-reembed-6yn53ms9.js} +1 -1
  8. package/dist/{boot-reembed-rj85jjhw.js → boot-reembed-7fcka4z5.js} +1 -1
  9. package/dist/{boot-scrub-sweep-eyfvn6v9.js → boot-scrub-sweep-pm1580ax.js} +4 -4
  10. package/dist/{boot-seeds-xs9a8dx1.js → boot-seeds-g5hfc1x8.js} +4 -4
  11. package/dist/{claude-adapter-bm23cye7.js → claude-adapter-gf3kxhf0.js} +9 -9
  12. package/dist/{claude-managed-adapter-1mwrsm9d.js → claude-managed-adapter-h2y889ge.js} +2 -2
  13. package/dist/{claude-managed-setup-gkfgks4j.js → claude-managed-setup-h00hsgtz.js} +2 -2
  14. package/dist/{claude-sdk-session-apb4ypz3.js → claude-sdk-session-s2k1qd8y.js} +13 -13
  15. package/dist/{cli-tj4j2ts4.js → cli-02qm7src.js} +8 -8
  16. package/dist/{cli-1cevz46c.js → cli-0qvtffe9.js} +6 -6
  17. package/dist/{cli-avmqhatn.js → cli-10hhg0km.js} +8 -8
  18. package/dist/{cli-7gh7020n.js → cli-1dmcq2eh.js} +1 -1
  19. package/dist/{cli-kz116kvw.js → cli-239yjk27.js} +7 -7
  20. package/dist/{cli-7ayprxp7.js → cli-2dfbv8qr.js} +8 -0
  21. package/dist/{cli-a49vpbf3.js → cli-5kqnemen.js} +1 -1
  22. package/dist/{cli-x719j3vs.js → cli-5rk36sjf.js} +442 -205
  23. package/dist/{cli-fb6t92v8.js → cli-6x9ma5w5.js} +1 -1
  24. package/dist/{cli-c8fwpgqb.js → cli-7225gwj7.js} +2 -2
  25. package/dist/{cli-5s5hx57y.js → cli-7awf1fp8.js} +1 -1
  26. package/dist/{cli-bn26xbcs.js → cli-8nyhf7za.js} +1 -1
  27. package/dist/{cli-ywyrffff.js → cli-8sxqsbbq.js} +1 -1
  28. package/dist/{cli-rsd7ga7v.js → cli-8zwe9mpk.js} +11 -11
  29. package/dist/{cli-y83zk5sb.js → cli-a0kcty51.js} +4 -4
  30. package/dist/{cli-8b9wvjps.js → cli-a4gvwttf.js} +4 -4
  31. package/dist/{cli-jhp7w1fy.js → cli-a5ebc95n.js} +2 -2
  32. package/dist/{cli-mvg2hf8p.js → cli-ahtpy9kf.js} +14 -7
  33. package/dist/{cli-x1p5dhq2.js → cli-bcj753sq.js} +3 -3
  34. package/dist/{cli-p22zdvnt.js → cli-bn0rewsy.js} +3 -3
  35. package/dist/{cli-p1m2b6gc.js → cli-d2mb5s8a.js} +7 -7
  36. package/dist/{cli-rg7ntypm.js → cli-d3qqdy4c.js} +456 -94
  37. package/dist/{cli-c5sbmw1v.js → cli-d82btycs.js} +94 -15
  38. package/dist/{cli-02vhhssk.js → cli-efaqv1c7.js} +5 -5
  39. package/dist/{cli-vjfpshn3.js → cli-ejs3m1sx.js} +1 -1
  40. package/dist/{cli-kk2r80n5.js → cli-faypxz7q.js} +4 -4
  41. package/dist/{cli-a1esmmee.js → cli-fpmsqq59.js} +7 -2
  42. package/dist/{cli-wrv09v7q.js → cli-ftyypbg5.js} +1 -1
  43. package/dist/{cli-zvze9rbm.js → cli-fyzjmseb.js} +3 -3
  44. package/dist/{cli-8rwvksbc.js → cli-g0hgtz4p.js} +5 -5
  45. package/dist/{cli-nrrg0fvy.js → cli-h38rjv87.js} +133 -12
  46. package/dist/{cli-tg9ksbn8.js → cli-h93c9vb3.js} +2 -2
  47. package/dist/{cli-eqgfs202.js → cli-hqhzg1qq.js} +2 -2
  48. package/dist/{cli-bhwa8rzc.js → cli-hyfw2j1e.js} +13 -12
  49. package/dist/{cli-3wjs22x3.js → cli-j4rqdf2n.js} +2 -2
  50. package/dist/{cli-6ftrrwm1.js → cli-n85dqg6d.js} +5 -5
  51. package/dist/{cli-8cxkw1f5.js → cli-nmqdc2t3.js} +2 -2
  52. package/dist/{cli-4fhyq711.js → cli-nn47d7e8.js} +13 -13
  53. package/dist/{cli-x3en6ct3.js → cli-nwyw3zhg.js} +1 -1
  54. package/dist/{cli-3avfh5az.js → cli-pemywhfq.js} +2 -2
  55. package/dist/{cli-xfe63zx3.js → cli-pkht5hap.js} +2 -2
  56. package/dist/{cli-sppc0cmw.js → cli-pnp2j5zg.js} +2 -2
  57. package/dist/{cli-wk8ccrz6.js → cli-pw7v69vp.js} +2 -2
  58. package/dist/{cli-tgvpmnwz.js → cli-r99kc9yq.js} +5 -5
  59. package/dist/{cli-bfc3k1x5.js → cli-rdyw3mct.js} +9 -9
  60. package/dist/{cli-b80a1100.js → cli-s6vr7r2d.js} +2 -2
  61. package/dist/{cli-zv4vy2b0.js → cli-s95dknxh.js} +1 -1
  62. package/dist/{cli-ttaz6c7m.js → cli-saw9a6f6.js} +6 -5
  63. package/dist/{cli-mz1ezzzh.js → cli-shvfedvm.js} +3 -3
  64. package/dist/{cli-rdr166ht.js → cli-smvcw9z5.js} +1 -1
  65. package/dist/{cli-2rwet3r7.js → cli-sv5gb0yb.js} +1 -1
  66. package/dist/{cli-5ff2sjyt.js → cli-t30yj95q.js} +2 -2
  67. package/dist/{cli-ptkpaqfy.js → cli-wt645v7q.js} +1 -1
  68. package/dist/{cli-f3nx1h8z.js → cli-wxbn3yfx.js} +2 -2
  69. package/dist/{cli-wyrr38xm.js → cli-x5mq1fyq.js} +1 -1
  70. package/dist/{cli-ccn0eybf.js → cli-xbzvet96.js} +6 -6
  71. package/dist/{cli-4mkvwgzr.js → cli-xf234ws8.js} +1 -1
  72. package/dist/{cli-nme7wery.js → cli-y2x52gs2.js} +46 -13
  73. package/dist/{cli-ffbrkh1r.js → cli-y8n5k515.js} +46 -38
  74. package/dist/{cli-ecshf504.js → cli-z4wd2ftv.js} +7 -7
  75. package/dist/{cli-dsgj3e7a.js → cli-zfg9enh9.js} +2 -2
  76. package/dist/{cli-yxqag76b.js → cli-zw88zjba.js} +1 -1
  77. package/dist/cli.js +20 -20
  78. package/dist/{codex-adapter-pp2gq8gr.js → codex-adapter-ttygw382.js} +6 -6
  79. package/dist/{codex-hook-qwzccd64.js → codex-hook-x7nejyrr.js} +7 -4
  80. package/dist/{codex-login-35p4sk85.js → codex-login-m819c41r.js} +1 -1
  81. package/dist/{codex-session-runner-0vzn09t8.js → codex-session-runner-60b58vv3.js} +7 -7
  82. package/dist/{commands-psqhkttb.js → commands-edmdwa4x.js} +2 -2
  83. package/dist/{controller-t20vz2k8.js → controller-m263fg43.js} +4 -4
  84. package/dist/{controllers-connect-gkxmqw9d.js → controllers-connect-5fym8sw1.js} +23 -23
  85. package/dist/{cursor-adapter-3v542qe5.js → cursor-adapter-cz6nm6mj.js} +3 -3
  86. package/dist/{db-nc1rd869.js → db-2y0mgstc.js} +3 -3
  87. package/dist/{db-2xbyenjr.js → db-nn0hcmx5.js} +6 -2
  88. package/dist/{devin-adapter-7egzmt0k.js → devin-adapter-zgqadvnm.js} +1 -1
  89. package/dist/{dispatcher-ewceb8ts.js → dispatcher-0a9wwjcx.js} +20 -20
  90. package/dist/{docker-njavd3fb.js → docker-fkgtr75t.js} +2 -2
  91. package/dist/{dsh-adapter-75xwh78t.js → dsh-adapter-3n3net33.js} +3 -3
  92. package/dist/{e2b-5r6a5jeb.js → e2b-7am6tmq6.js} +2 -2
  93. package/dist/{e2b-pw1nvtmh.js → e2b-thdcxtjd.js} +2 -2
  94. package/dist/{easter-egg-3d-xsc47jwf.js → easter-egg-3d-5cgynaja.js} +1 -1
  95. package/dist/{event-bus-101fenkh.js → event-bus-9vpk8gmq.js} +1 -1
  96. package/dist/{execute-gzmw1mnw.js → execute-t4e6m3rw.js} +1 -1
  97. package/dist/{external-channel-a5dsmxn4.js → external-channel-zhvt95n3.js} +2 -2
  98. package/dist/{grok-adapter-vj88xr23.js → grok-adapter-qnr1hp2y.js} +10 -10
  99. package/dist/handlers-dkcarkd0.js +39 -0
  100. package/dist/{heartbeat-t2m9r3wa.js → heartbeat-gz97r7ac.js} +23 -23
  101. package/dist/{hook-xa677f8r.js → hook-1mmdgjqs.js} +16 -9
  102. package/dist/{hook-8femx1bg.js → hook-x8rthca4.js} +6 -6
  103. package/dist/{http-xpmmq028.js → http-r8f85xr9.js} +274 -160
  104. package/dist/index-5jecgp3n.js +41 -0
  105. package/dist/index-aex0eba9.js +40 -0
  106. package/dist/{index-syztqdt6.js → index-g6tbb6ve.js} +1 -1
  107. package/dist/{index-cdzyfrsp.js → index-smxyk04s.js} +1 -1
  108. package/dist/{index-dg2tmj99.js → index-vzvfqzfj.js} +20 -20
  109. package/dist/{index-s7ckdajq.js → index-y7rbcrc1.js} +10 -10
  110. package/dist/{keepalive-3nr4st3r.js → keepalive-64c0f34c.js} +4 -4
  111. package/dist/lead-b1da0f97.js +78 -0
  112. package/dist/{maintenance-verwpe2c.js → maintenance-mnxpar12.js} +1 -1
  113. package/dist/{oauth-refresh-sweep-9q2t0y3q.js → oauth-refresh-sweep-36hs2v4h.js} +3 -3
  114. package/dist/{onboard-aytqedmq.js → onboard-xes8de61.js} +3 -3
  115. package/dist/{opencode-adapter-f4hryjny.js → opencode-adapter-3s7ax02e.js} +7 -7
  116. package/dist/{otel-impl-hckw4wt1.js → otel-impl-fzc57kcq.js} +2 -2
  117. package/dist/{pi-mono-adapter-hxby0ce1.js → pi-mono-adapter-ytp7gz8b.js} +22 -11
  118. package/dist/{pricing-refresh-5nvme3sm.js → pricing-refresh-1nek2w7b.js} +3 -3
  119. package/dist/{rbac-roles-vbpy21mg.js → rbac-roles-sqefb5hw.js} +2 -2
  120. package/dist/{rbac-roles-pd8c26m1.js → rbac-roles-ttyfaep2.js} +1 -1
  121. package/dist/{render-v2-7nqgvk2q.js → render-v2-vb527jwn.js} +3 -3
  122. package/dist/{resume-b6djcj3c.js → resume-jcdzg1bn.js} +10 -8
  123. package/dist/{runtime-txrxc9za.js → runtime-xe3aqy4x.js} +1 -1
  124. package/dist/{session-access-fc3f9y12.js → session-access-zsp4wsp0.js} +4 -4
  125. package/dist/{setup-n39szm6b.js → setup-1nb2zqd3.js} +1 -1
  126. package/dist/{virtual-modules-wyp2k6z3.js → virtual-modules-4r3zkc20.js} +2 -2
  127. package/dist/{work-objects-jem2fre0.js → work-objects-61w08fwr.js} +23 -23
  128. package/dist/worker-c1e68hpa.js +78 -0
  129. package/dist/{x-8ewt8gxn.js → x-y45mthwn.js} +2 -2
  130. package/openapi.json +491 -52
  131. package/package.json +3 -3
  132. package/src/apps/action-runner.ts +146 -0
  133. package/src/apps/catalog.generated.json +3 -2
  134. package/src/apps/definition.ts +152 -4
  135. package/src/apps/row-store.ts +23 -9
  136. package/src/apps/schema-migrate.ts +14 -6
  137. package/src/apps/script-types.ts +2 -1
  138. package/src/apps/sync.ts +20 -19
  139. package/src/be/db/tasks/read.ts +112 -0
  140. package/src/be/db.ts +16 -4
  141. package/src/be/fleet-benchmark-stats.ts +10 -5
  142. package/src/be/models-catalog.ts +4 -0
  143. package/src/be/onboarding.ts +6 -0
  144. package/src/be/scripts/typecheck.ts +13 -0
  145. package/src/be/swarm-config-guard.ts +25 -1
  146. package/src/be/telemetry-enable.ts +1 -1
  147. package/src/commands/provider-credentials.ts +12 -2
  148. package/src/commands/runner.ts +3 -0
  149. package/src/heartbeat/heartbeat.ts +2 -2
  150. package/src/hooks/codex-hook.ts +6 -2
  151. package/src/hooks/hook.ts +7 -0
  152. package/src/hooks/pr-body-guard.ts +38 -11
  153. package/src/hooks/pr-room-guard.ts +88 -0
  154. package/src/http/agents.ts +1 -0
  155. package/src/http/apps.ts +99 -183
  156. package/src/http/fleet-benchmark.ts +79 -30
  157. package/src/http/global-config.ts +7 -0
  158. package/src/http/ranking.ts +24 -40
  159. package/src/http/status.ts +49 -43
  160. package/src/http/tasks.ts +49 -1
  161. package/src/http/telemetry-ui.ts +1 -1
  162. package/src/http/used-by.ts +55 -19
  163. package/src/http/users.ts +2 -2
  164. package/src/providers/acp-targets.ts +1 -1
  165. package/src/providers/amp-adapter.ts +1 -1
  166. package/src/providers/pi-mono-adapter.ts +15 -0
  167. package/src/providers/reasoning-effort.ts +2 -1
  168. package/src/providers/types.ts +2 -0
  169. package/src/ranking/telemetry-ranking.ts +5 -33
  170. package/src/scripts-runtime/sdk-allowlist.ts +7 -0
  171. package/src/scripts-runtime/types/stdlib.d.ts +31 -0
  172. package/src/scripts-runtime/types/swarm-sdk.d.ts +31 -0
  173. package/src/server.ts +4 -0
  174. package/src/telemetry-context.ts +19 -1
  175. package/src/telemetry-contract/EVENTS.md +42 -8
  176. package/src/telemetry-contract/SOURCE.json +6 -5
  177. package/src/telemetry-contract/catalog.json +225 -5
  178. package/src/telemetry-contract/ranking/fixtures/valid/no-claim.json +10 -0
  179. package/src/telemetry-contract/ranking/listing.v1.schema.json +2 -2
  180. package/src/telemetry-contract/types.gen.ts +225 -27
  181. package/src/telemetry-identity.ts +47 -9
  182. package/src/telemetry-snapshot.ts +9 -1
  183. package/src/telemetry-ui-events.ts +9 -2
  184. package/src/telemetry.ts +29 -6
  185. package/src/tests/app-action-run-tool.test.ts +178 -0
  186. package/src/tests/app-row-tools.test.ts +385 -0
  187. package/src/tests/apps-json-column.test.ts +611 -0
  188. package/src/tests/apps-script-types.test.ts +2 -0
  189. package/src/tests/apps-sync-engine.test.ts +42 -0
  190. package/src/tests/check-pr-body.test.ts +0 -23
  191. package/src/tests/credential-check.test.ts +38 -0
  192. package/src/tests/db-task-read-contract.test.ts +4 -0
  193. package/src/tests/db-task-write-contract.test.ts +2 -0
  194. package/src/tests/docs-index-footprint.test.js +2 -2
  195. package/src/tests/fleet-benchmark.test.ts +122 -2
  196. package/src/tests/http-users.test.ts +62 -1
  197. package/src/tests/model-catalog-table.test.ts +63 -0
  198. package/src/tests/model-profiles-api.test.ts +19 -7
  199. package/src/tests/models-catalog.test.ts +50 -0
  200. package/src/tests/onboarding.test.ts +21 -0
  201. package/src/tests/org-website.test.ts +62 -0
  202. package/src/tests/pi-mono-adapter.test.ts +23 -0
  203. package/src/tests/pr-body-leaks.test.ts +4 -0
  204. package/src/tests/pr-room-guard.test.ts +242 -0
  205. package/src/tests/ranking-listing.test.ts +8 -23
  206. package/src/tests/ranking-route.test.ts +49 -47
  207. package/src/tests/reasoning-effort.test.ts +39 -3
  208. package/src/tests/runner-harness-telemetry-env.test.ts +62 -1
  209. package/src/tests/status.test.ts +158 -9
  210. package/src/tests/swarm-tool-result-gate.test.ts +2 -4
  211. package/src/tests/task-lineage.test.ts +180 -0
  212. package/src/tests/telemetry-context.test.ts +128 -2
  213. package/src/tests/telemetry-init.test.ts +62 -5
  214. package/src/tests/telemetry-ui-route.test.ts +123 -0
  215. package/src/tests/tool-annotations.test.ts +3 -2
  216. package/src/tests/used-by-route.test.ts +144 -10
  217. package/src/tests/user-token-rest-auth.test.ts +38 -0
  218. package/src/tests/workflow-agent-task-retry.test.ts +130 -4
  219. package/src/tests/workflow-wait-recovery.test.ts +116 -4
  220. package/src/tools/app-action-run.ts +63 -0
  221. package/src/tools/app-rows.ts +239 -0
  222. package/src/tools/model-catalog/index.ts +1 -1
  223. package/src/tools/tool-config.ts +8 -0
  224. package/src/tools/utils.ts +1 -1
  225. package/src/tools/workflows/retry-workflow-run.ts +1 -1
  226. package/src/types.ts +17 -0
  227. package/src/utils/company-profile.ts +24 -0
  228. package/src/utils/org-website.ts +58 -21
  229. package/src/workflows/recovery.ts +10 -22
  230. package/src/workflows/resume.ts +16 -0
  231. package/src/workflows/task-step-routing.ts +47 -7
  232. package/templates/skills/apps/SKILL.md +44 -4
  233. package/templates/skills/apps/content.md +44 -4
  234. package/dist/handlers-zbs90bny.js +0 -39
  235. package/dist/index-8pwc1jc8.js +0 -40
  236. package/dist/index-nxa6me0q.js +0 -41
  237. package/dist/lead-td8h2sfn.js +0 -78
  238. package/dist/worker-wr6xgfr2.js +0 -78
  239. package/src/tests/check-ranking-entry.test.ts +0 -146
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ALL_TOOLS,
3
3
  init_tool_config
4
- } from "./cli-7ayprxp7.js";
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-a1esmmee.js";
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-wyrr38xm.js";
39
+ } from "./cli-x5mq1fyq.js";
40
40
  import {
41
41
  isSlackConfigured,
42
42
  init_config
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  deriveProviderFromKeyType,
50
50
  init_credentials
51
- } from "./cli-yxqag76b.js";
51
+ } from "./cli-zw88zjba.js";
52
52
  import {
53
53
  init_templates3
54
54
  } from "./cli-0ebey9hg.js";
@@ -77,7 +77,7 @@ import {
77
77
  import {
78
78
  runtimeHarnessSections,
79
79
  init_runtime_model_catalog
80
- } from "./cli-fb6t92v8.js";
80
+ } from "./cli-6x9ma5w5.js";
81
81
  import {
82
82
  init_zod
83
83
  } from "./cli-4chz1hye.js";
@@ -105,7 +105,7 @@ import {
105
105
  import {
106
106
  init_package,
107
107
  package_default
108
- } from "./cli-mz1ezzzh.js";
108
+ } from "./cli-shvfedvm.js";
109
109
  import {
110
110
  realtimeBus,
111
111
  init_bus
@@ -120,13 +120,13 @@ import {
120
120
  registerVolatileSecret,
121
121
  registerSensitiveKeyName,
122
122
  init_secret_scrubber
123
- } from "./cli-4mkvwgzr.js";
123
+ } from "./cli-xf234ws8.js";
124
124
  import {
125
125
  isAlias,
126
126
  parseAlias,
127
127
  harnessModelMismatch,
128
128
  init_src2
129
- } from "./cli-x3en6ct3.js";
129
+ } from "./cli-nwyw3zhg.js";
130
130
  import {
131
131
  __toCommonJS,
132
132
  __commonJS,
@@ -520,6 +520,64 @@ var init_catalog = __esm(() => {
520
520
  "org_name",
521
521
  "used_by"
522
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
+ ]
523
581
  }
524
582
  },
525
583
  common_properties: {
@@ -1618,6 +1676,9 @@ var init_catalog = __esm(() => {
1618
1676
  key: {
1619
1677
  type: "string",
1620
1678
  required: true
1679
+ },
1680
+ moment: {
1681
+ ref: "notification_moment"
1621
1682
  }
1622
1683
  }
1623
1684
  },
@@ -1631,6 +1692,9 @@ var init_catalog = __esm(() => {
1631
1692
  key: {
1632
1693
  type: "string",
1633
1694
  required: true
1695
+ },
1696
+ moment: {
1697
+ ref: "notification_moment"
1634
1698
  }
1635
1699
  }
1636
1700
  },
@@ -1648,6 +1712,12 @@ var init_catalog = __esm(() => {
1648
1712
  email_domain: {
1649
1713
  type: "string",
1650
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"
1651
1721
  }
1652
1722
  }
1653
1723
  },
@@ -1660,7 +1730,8 @@ var init_catalog = __esm(() => {
1660
1730
  properties: {
1661
1731
  feature: {
1662
1732
  type: "string",
1663
- required: true
1733
+ required: true,
1734
+ description: "Feature identifier, including health_popover and kickoff_call_opened. Existing identifiers remain accepted."
1664
1735
  }
1665
1736
  }
1666
1737
  },
@@ -1715,7 +1786,8 @@ var init_catalog = __esm(() => {
1715
1786
  properties: {
1716
1787
  channel: {
1717
1788
  type: "string",
1718
- required: true
1789
+ required: true,
1790
+ description: "Lead channel, including setup_help and fleet_report. Existing channels remain accepted."
1719
1791
  },
1720
1792
  submission_id: {
1721
1793
  type: "string",
@@ -1798,6 +1870,22 @@ var init_catalog = __esm(() => {
1798
1870
  type: "boolean",
1799
1871
  required: true,
1800
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."
1801
1889
  }
1802
1890
  }
1803
1891
  },
@@ -1810,8 +1898,18 @@ var init_catalog = __esm(() => {
1810
1898
  properties: {
1811
1899
  fields: {
1812
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
+ },
1813
1911
  required: true,
1814
- description: "Changed field names: name, website."
1912
+ description: "Changed profile field names, never their values."
1815
1913
  },
1816
1914
  surface: {
1817
1915
  type: "string",
@@ -1819,7 +1917,12 @@ var init_catalog = __esm(() => {
1819
1917
  enum: [
1820
1918
  "prompt",
1821
1919
  "setup",
1822
- "settings"
1920
+ "settings",
1921
+ "org_name_popup",
1922
+ "feedback",
1923
+ "fleet_benchmark",
1924
+ "telemetry_banner",
1925
+ "identity_modal"
1823
1926
  ],
1824
1927
  description: "Where the change was made. Not trigger_surface: that key fills the raw_events.trigger_surface column."
1825
1928
  }
@@ -1835,6 +1938,12 @@ var init_catalog = __esm(() => {
1835
1938
  granted: {
1836
1939
  type: "boolean",
1837
1940
  required: true
1941
+ },
1942
+ has_quote: {
1943
+ type: "boolean"
1944
+ },
1945
+ has_function: {
1946
+ type: "boolean"
1838
1947
  }
1839
1948
  }
1840
1949
  },
@@ -1851,7 +1960,8 @@ var init_catalog = __esm(() => {
1851
1960
  enum: [
1852
1961
  "banner",
1853
1962
  "settings",
1854
- "env"
1963
+ "env",
1964
+ "benchmark"
1855
1965
  ]
1856
1966
  }
1857
1967
  }
@@ -1866,6 +1976,13 @@ var init_catalog = __esm(() => {
1866
1976
  has_org_name: {
1867
1977
  type: "boolean",
1868
1978
  required: true
1979
+ },
1980
+ level: {
1981
+ type: "string",
1982
+ enum: [
1983
+ "basic",
1984
+ "full"
1985
+ ]
1869
1986
  }
1870
1987
  }
1871
1988
  },
@@ -2047,11 +2164,140 @@ var init_catalog = __esm(() => {
2047
2164
  required: true
2048
2165
  }
2049
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
+ }
2050
2270
  }
2051
2271
  ]
2052
2272
  };
2053
2273
  });
2054
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
+
2055
2301
  // src/telemetry-context.ts
2056
2302
  import { createHash, randomBytes } from "node:crypto";
2057
2303
  function mapTriggerSurface(source) {
@@ -2094,6 +2340,9 @@ function buildContext(input) {
2094
2340
  const orgName = input.orgName?.trim();
2095
2341
  const orgDomain = validOrgDomain(input.orgDomain);
2096
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;
2097
2346
  return {
2098
2347
  org_id: input.orgId,
2099
2348
  org_name: orgName ? orgName : null,
@@ -2105,8 +2354,11 @@ function buildContext(input) {
2105
2354
  swarm_version: input.swarmVersion,
2106
2355
  install_method: input.installMethod ?? null,
2107
2356
  install_preset: input.installPreset ?? null,
2108
- acquisition_source: input.acquisitionSource ?? null,
2109
- ...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 } : {}
2110
2362
  };
2111
2363
  }
2112
2364
  function catalogSpecs(event) {
@@ -2143,6 +2395,7 @@ var ORG_ID_PATTERN, ORG_DOMAIN_PATTERN, specsByEvent = null;
2143
2395
  var init_telemetry_context = __esm(() => {
2144
2396
  init_telemetry_contract();
2145
2397
  init_catalog();
2398
+ init_company_profile();
2146
2399
  ORG_ID_PATTERN = /^org_([0-9a-f]{16}|[A-Za-z0-9]{27})$/;
2147
2400
  ORG_DOMAIN_PATTERN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/;
2148
2401
  });
@@ -2196,36 +2449,54 @@ function isFilledOrgLogoUrl(url, origin = TELEMETRY_PROXY_ORIGIN) {
2196
2449
  return false;
2197
2450
  }
2198
2451
  }
2199
- 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;
2200
2453
  var init_org_website = __esm(() => {
2201
2454
  LABEL = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
2202
2455
  IPV4 = /^\d{1,3}(\.\d{1,3}){3}$/;
2203
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
+ ]);
2204
2475
  FREE_MAIL_DOMAINS = new Set([
2205
- "gmail.com",
2206
- "googlemail.com",
2207
- "outlook.com",
2208
- "hotmail.com",
2209
- "live.com",
2210
- "msn.com",
2211
- "yahoo.com",
2212
- "icloud.com",
2213
- "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",
2214
2484
  "mac.com",
2215
- "aol.com",
2216
- "proton.me",
2217
- "protonmail.com",
2218
- "gmx.com",
2219
- "gmx.de",
2220
- "yandex.com",
2221
- "yandex.ru",
2222
2485
  "mail.com",
2223
- "zoho.com",
2486
+ "mail.ru",
2487
+ "me.com",
2488
+ "naver.com",
2489
+ "orange.fr",
2490
+ "pm.me",
2491
+ "proton.me",
2224
2492
  "qq.com",
2225
- "163.com",
2226
- "hey.com",
2227
- "fastmail.com"
2493
+ "rediffmail.com",
2494
+ "sina.com",
2495
+ "t-online.de",
2496
+ "tutanota.com",
2497
+ "web.de"
2228
2498
  ]);
2499
+ SECOND_LEVEL_LABELS = new Set(["ac", "co", "com", "edu", "gov", "ne", "net", "or", "org"]);
2229
2500
  });
2230
2501
 
2231
2502
  // src/utils/request-auth-context.ts
@@ -2262,6 +2533,7 @@ var init_request_auth_context = __esm(() => {
2262
2533
 
2263
2534
  // src/telemetry.ts
2264
2535
  import { randomUUID } from "node:crypto";
2536
+ import { existsSync } from "node:fs";
2265
2537
  function setTelemetryIngestObserver(observer) {
2266
2538
  ingestObserver = observer;
2267
2539
  }
@@ -2420,6 +2692,9 @@ function setTelemetryOrgDomain(domain) {
2420
2692
  function setTelemetryRoleResolver(resolver) {
2421
2693
  roleResolver = resolver;
2422
2694
  }
2695
+ function setTelemetryFunctionResolver(resolver) {
2696
+ functionResolver = resolver;
2697
+ }
2423
2698
  function isTelemetryReady() {
2424
2699
  return isTelemetryEnabled() && installationId !== null && currentOrgId() !== undefined;
2425
2700
  }
@@ -2444,13 +2719,20 @@ function isCloudDeployment() {
2444
2719
  const raw = process.env.SWARM_CLOUD;
2445
2720
  return raw === "true" || raw === "1";
2446
2721
  }
2447
- function getTelemetryEnvironment() {
2722
+ function getTelemetryEnvironment(packageRoot = new URL("../", import.meta.url)) {
2448
2723
  const explicit = process.env.DESPLEGA_TELEMETRY_ENV?.trim();
2449
2724
  if (explicit)
2450
2725
  return explicit;
2451
2726
  if (getNodeEnv() === "test")
2452
2727
  return "test";
2453
- return "production";
2728
+ if (cachedIsGitCheckout === undefined) {
2729
+ try {
2730
+ cachedIsGitCheckout = existsSync(new URL(".git", packageRoot));
2731
+ } catch {
2732
+ cachedIsGitCheckout = false;
2733
+ }
2734
+ }
2735
+ return cachedIsGitCheckout ? "development" : "production";
2454
2736
  }
2455
2737
  function track(options) {
2456
2738
  emit(options.event, options.properties, options.metadata, options.actor);
@@ -2491,7 +2773,10 @@ function emit(event, properties, metadata, actor, emitter = source, identity) {
2491
2773
  swarmVersion: package_default.version,
2492
2774
  installMethod: cachedInstallMethod,
2493
2775
  installPreset: cachedInstallPreset,
2494
- acquisitionSource: null
2776
+ acquisitionSource: process.env.SWARM_ORG_ACQUISITION_SOURCE,
2777
+ teamSize: process.env.SWARM_ORG_TEAM_SIZE,
2778
+ useCase: process.env.SWARM_ORG_USE_CASE,
2779
+ userFunction: userId ? functionResolver?.(userId) : undefined
2495
2780
  }),
2496
2781
  properties: normalizeProperties(event, {
2497
2782
  ...properties,
@@ -2536,7 +2821,7 @@ function emitIntegrationConnected(type, providerSlug, firstOfType) {
2536
2821
  }, { userId: getCurrentRequestUserId() ?? null });
2537
2822
  return true;
2538
2823
  }
2539
- 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;
2824
+ 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, cachedIsGitCheckout, telemetry;
2540
2825
  var init_telemetry = __esm(() => {
2541
2826
  init_package();
2542
2827
  init_config();
@@ -3249,7 +3534,7 @@ var init_secrets_cipher = () => {};
3249
3534
 
3250
3535
  // src/be/crypto/key-bootstrap.ts
3251
3536
  import { randomBytes as randomBytes3 } from "node:crypto";
3252
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
3537
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "node:fs";
3253
3538
  import path from "node:path";
3254
3539
  function keyGenerationHelp() {
3255
3540
  return [
@@ -3288,7 +3573,7 @@ function resolveEncryptionKey(dbPath, options = {}) {
3288
3573
  }
3289
3574
  const envKeyFile = process.env[ENV_KEY_FILE];
3290
3575
  if (envKeyFile && envKeyFile.length > 0) {
3291
- if (!existsSync(envKeyFile)) {
3576
+ if (!existsSync2(envKeyFile)) {
3292
3577
  throw new Error(`Invalid encryption key at env:${ENV_KEY_FILE} (${envKeyFile}): file does not exist`);
3293
3578
  }
3294
3579
  const content = readFileSync(envKeyFile, "utf8");
@@ -3299,7 +3584,7 @@ function resolveEncryptionKey(dbPath, options = {}) {
3299
3584
  throw new Error(`In-memory database requires ${ENV_KEY} or ${ENV_KEY_FILE} to be set explicitly`);
3300
3585
  }
3301
3586
  const keyFilePath = path.join(path.dirname(dbPath), KEY_FILENAME);
3302
- if (existsSync(keyFilePath)) {
3587
+ if (existsSync2(keyFilePath)) {
3303
3588
  const content = readFileSync(keyFilePath, "utf8");
3304
3589
  cachedKey = decodeAndValidate(`file:${keyFilePath}`, content);
3305
3590
  return cachedKey;
@@ -4552,16 +4837,15 @@ var init_runtime = __esm(() => {
4552
4837
  // src/telemetry-identity.ts
4553
4838
  async function loadUserRole(userId) {
4554
4839
  try {
4555
- const { getUserGrant } = await import("./rbac-roles-vbpy21mg.js");
4840
+ const { getUserGrant } = await import("./rbac-roles-sqefb5hw.js");
4556
4841
  const grant = await getUserGrant(userId);
4557
4842
  const role = grant.grantsAll ? "admin" : "member";
4558
- if (roleCache.size >= ROLE_CACHE_LIMIT) {
4559
- const oldest = roleCache.keys().next().value;
4560
- if (oldest !== undefined)
4561
- roleCache.delete(oldest);
4562
- }
4563
- roleCache.set(userId, { role, at: Date.now() });
4564
- return role;
4843
+ const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
4844
+ return {
4845
+ role,
4846
+ userFunction: USER_FUNCTIONS.find((value) => value === user?.jobFunction),
4847
+ at: Date.now()
4848
+ };
4565
4849
  } catch {
4566
4850
  return;
4567
4851
  }
@@ -4572,7 +4856,20 @@ function primeUserRole(userId) {
4572
4856
  return Promise.resolve(hit.role);
4573
4857
  let load = roleLoads.get(userId);
4574
4858
  if (!load) {
4575
- load = loadUserRole(userId).finally(() => roleLoads.delete(userId));
4859
+ load = loadUserRole(userId).then((entry) => {
4860
+ if (entry && roleLoads.get(userId) === load) {
4861
+ if (roleCache.size >= ROLE_CACHE_LIMIT) {
4862
+ const oldest = roleCache.keys().next().value;
4863
+ if (oldest !== undefined)
4864
+ roleCache.delete(oldest);
4865
+ }
4866
+ roleCache.set(userId, entry);
4867
+ }
4868
+ return entry?.role;
4869
+ }).finally(() => {
4870
+ if (roleLoads.get(userId) === load)
4871
+ roleLoads.delete(userId);
4872
+ });
4576
4873
  roleLoads.set(userId, load);
4577
4874
  }
4578
4875
  return load;
@@ -4583,6 +4880,16 @@ function cachedUserRole(userId) {
4583
4880
  primeUserRole(userId);
4584
4881
  return hit?.role;
4585
4882
  }
4883
+ function cachedUserFunction(userId) {
4884
+ const hit = roleCache.get(userId);
4885
+ if (!hit || Date.now() - hit.at >= ROLE_TTL_MS)
4886
+ primeUserRole(userId);
4887
+ return hit?.userFunction;
4888
+ }
4889
+ function invalidateTelemetryUserRole(userId) {
4890
+ roleCache.delete(userId);
4891
+ roleLoads.delete(userId);
4892
+ }
4586
4893
  async function computeOrgDomain() {
4587
4894
  const rows = await getDbClient2().query(`SELECT u.email AS email
4588
4895
  FROM users u
@@ -4629,6 +4936,7 @@ var init_telemetry_identity = __esm(() => {
4629
4936
  init_runtime();
4630
4937
  init_telemetry();
4631
4938
  init_telemetry_context();
4939
+ init_company_profile();
4632
4940
  ROLE_TTL_MS = 60 * 60000;
4633
4941
  roleCache = new Map;
4634
4942
  roleLoads = new Map;
@@ -5554,6 +5862,61 @@ async function getChildTasks2(parentTaskId) {
5554
5862
  const rows = await getDbClient2().query(`SELECT * FROM agent_tasks WHERE parentTaskId = ? ORDER BY createdAt ASC, rowid ASC`, [parentTaskId]);
5555
5863
  return rows.map(rowToAgentTask);
5556
5864
  }
5865
+ function rowToTaskLineageNode(row) {
5866
+ return { ...rowToAgentTaskSummary(row), workflowRunId: row.workflowRunId ?? undefined };
5867
+ }
5868
+ async function getTaskLineage2(taskId, limits = {}) {
5869
+ const maxNodes = limits.maxNodes ?? TASK_LINEAGE_LIMITS2.maxNodes;
5870
+ const maxDepth = limits.maxDepth ?? TASK_LINEAGE_LIMITS2.maxDepth;
5871
+ const maxAncestors = limits.maxAncestors ?? TASK_LINEAGE_LIMITS2.maxAncestors;
5872
+ const db = getDbClient2();
5873
+ const path = await db.query(`WITH RECURSIVE up(id, parentTaskId, hops) AS (
5874
+ SELECT id, parentTaskId, 0 FROM agent_tasks WHERE id = ?
5875
+ UNION ALL
5876
+ SELECT t.id, t.parentTaskId, up.hops + 1 FROM agent_tasks t
5877
+ JOIN up ON t.id = up.parentTaskId
5878
+ WHERE up.hops < ?
5879
+ )
5880
+ SELECT id, parentTaskId, hops FROM up ORDER BY hops`, [taskId, maxAncestors]);
5881
+ if (path.length === 0)
5882
+ return null;
5883
+ const top = path[path.length - 1];
5884
+ let truncated = top.hops === maxAncestors && top.parentTaskId !== null;
5885
+ const descendants = (startId) => db.query(`WITH RECURSIVE down(id, depth) AS (
5886
+ SELECT ?, 0
5887
+ UNION ALL
5888
+ SELECT t.id, down.depth + 1 FROM down
5889
+ JOIN agent_tasks t ON t.parentTaskId = down.id
5890
+ WHERE down.depth < ?
5891
+ ORDER BY 2
5892
+ LIMIT ?
5893
+ )
5894
+ SELECT ${LINEAGE_COLUMNS} FROM down
5895
+ CROSS JOIN agent_tasks ON agent_tasks.id = down.id
5896
+ ORDER BY down.depth, agent_tasks.createdAt, agent_tasks.rowid`, [startId, maxDepth, maxNodes + 1]);
5897
+ const byId = new Map;
5898
+ const add = (rows) => {
5899
+ for (const row of rows) {
5900
+ if (!byId.has(row.id))
5901
+ byId.set(row.id, rowToTaskLineageNode(row));
5902
+ }
5903
+ };
5904
+ const ownSubtree = await descendants(taskId);
5905
+ const fromRoot = top.id === taskId ? ownSubtree : await descendants(top.id);
5906
+ add(fromRoot.slice(0, maxNodes));
5907
+ add(ownSubtree.slice(0, maxNodes));
5908
+ const missing = path.map((row) => row.id).filter((id) => !byId.has(id));
5909
+ if (missing.length > 0) {
5910
+ add(await db.query(`SELECT ${LINEAGE_COLUMNS} FROM agent_tasks WHERE id IN (${missing.map(() => "?").join(", ")})`, missing));
5911
+ }
5912
+ if (!truncated) {
5913
+ const ids = [...byId.keys()];
5914
+ const list = ids.map(() => "?").join(", ");
5915
+ const omitted = await db.get(`SELECT 1 FROM agent_tasks WHERE parentTaskId IN (${list}) AND id NOT IN (${list}) LIMIT 1`, [...ids, ...ids]);
5916
+ truncated = omitted !== undefined && omitted !== null;
5917
+ }
5918
+ return { rootTaskId: top.id, tasks: [...byId.values()], truncated };
5919
+ }
5557
5920
  async function hasNonTerminalResumeChild2(parentId) {
5558
5921
  const row = await getDbClient2().get(`SELECT 1 FROM agent_tasks
5559
5922
  WHERE parentTaskId = ?
@@ -6239,7 +6602,7 @@ async function findRecentCancelledTaskInThread2(channelId, threadTs, windowMinut
6239
6602
  LIMIT 1`, [channelId, threadTs, since]);
6240
6603
  return row ? rowToAgentTask(row) : null;
6241
6604
  }
6242
- var dependencies2, TASK_PREVIEW_LENGTH = 300, TASK_PREVIEW_BYTES, TASK_PREVIEW_SQL, taskPreviewDecoder, LIST_COLUMNS, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, NEVER_STARTED_TASK_STATUSES, findTaskByGitHub2, CHAT_RELAY_ELIGIBLE_SQL = `(obligation.last_attempt_at IS NULL
6605
+ var dependencies2, TASK_PREVIEW_LENGTH = 300, TASK_PREVIEW_BYTES, TASK_PREVIEW_SQL, taskPreviewDecoder, LIST_COLUMNS, TASK_LINEAGE_LIMITS2, LINEAGE_COLUMNS, SUPERSEDED_RESUME_REPAIR_WINDOW_MS2, NEVER_STARTED_TASK_STATUSES, findTaskByGitHub2, CHAT_RELAY_ELIGIBLE_SQL = `(obligation.last_attempt_at IS NULL
6243
6606
  OR (julianday(?) - julianday(obligation.last_attempt_at)) * 86400000.0 >=
6244
6607
  CASE WHEN obligation.attempt_count >= 8 THEN 600000
6245
6608
  ELSE 3000 * (1 << obligation.attempt_count) END)`, LINEAR_TRACKER_CONTEXT_KEY_PREFIX = "task:trackers:linear:";
@@ -6269,6 +6632,9 @@ var init_read = __esm(() => {
6269
6632
  agent_tasks.title, agent_tasks.status, agent_tasks.createdAt, agent_tasks.lastUpdatedAt,
6270
6633
  agent_tasks.finishedAt, agent_tasks.peakContextTokens`
6271
6634
  };
6635
+ TASK_LINEAGE_LIMITS2 = { maxNodes: 500, maxDepth: 30, maxAncestors: 50 };
6636
+ LINEAGE_COLUMNS = `${LIST_COLUMNS.slim}, agent_tasks.workflowRunId,
6637
+ (SELECT SUM(totalCostUsd) FROM session_costs WHERE session_costs.taskId = agent_tasks.id) AS totalCostUsd`;
6272
6638
  SUPERSEDED_RESUME_REPAIR_WINDOW_MS2 = 24 * 60 * 60 * 1000;
6273
6639
  NEVER_STARTED_TASK_STATUSES = [
6274
6640
  "draft",
@@ -6972,7 +7338,7 @@ async function completeTask2(id, output, options) {
6972
7338
  });
6973
7339
  } catch {}
6974
7340
  getDbClient2().afterCommit(() => {
6975
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
7341
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
6976
7342
  workflowEventBus.emit("task.completed", {
6977
7343
  taskId: id,
6978
7344
  output: scrubbedOutput,
@@ -7027,7 +7393,7 @@ async function failTask2(id, reason, opts = {}) {
7027
7393
  });
7028
7394
  } catch {}
7029
7395
  getDbClient2().afterCommit(() => {
7030
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
7396
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
7031
7397
  workflowEventBus.emit("task.failed", {
7032
7398
  taskId: id,
7033
7399
  failureReason: scrubbedReason,
@@ -7109,7 +7475,7 @@ async function cancelTask2(id, reason) {
7109
7475
  });
7110
7476
  } catch {}
7111
7477
  getDbClient2().afterCommit(() => {
7112
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
7478
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
7113
7479
  workflowEventBus.emit("task.cancelled", {
7114
7480
  taskId: id,
7115
7481
  agentId: row.agentId,
@@ -7166,7 +7532,7 @@ async function supersedeTask2(id, args) {
7166
7532
  });
7167
7533
  } catch {}
7168
7534
  getDbClient2().afterCommit(() => {
7169
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
7535
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
7170
7536
  workflowEventBus.emit("task.superseded", {
7171
7537
  taskId: id,
7172
7538
  reason: args.reason,
@@ -7380,7 +7746,7 @@ async function updateTaskProgress2(id, progress) {
7380
7746
  });
7381
7747
  } catch {}
7382
7748
  getDbClient2().afterCommit(() => {
7383
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
7749
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
7384
7750
  workflowEventBus.emit("task.progress", {
7385
7751
  taskId: id,
7386
7752
  progress: scrubbedProgress,
@@ -7451,7 +7817,7 @@ function emitChildRunFinished(childRunId, parentStepId, status) {
7451
7817
  }
7452
7818
  function emitAfterCommit(childRunId, parentStepId) {
7453
7819
  getDbClient2().afterCommit(() => {
7454
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
7820
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
7455
7821
  workflowEventBus.emit("workflow.child.finished", { childRunId, parentStepId });
7456
7822
  }).catch((err) => console.error("[db] workflow.child.finished event not emitted:", scrubSecrets(err instanceof Error ? err.message : String(err))));
7457
7823
  });
@@ -7661,17 +8027,12 @@ function readTelemetryRanking(raw) {
7661
8027
  return null;
7662
8028
  }
7663
8029
  }
7664
- function mintRankingClaim() {
7665
- const bytes = crypto.getRandomValues(new Uint8Array(16));
7666
- return `rk_${Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("")}`;
7667
- }
7668
- function buildListing(identity, form, claim, now = new Date) {
8030
+ function buildListing(identity, form, now = new Date) {
7669
8031
  if (!identity.ok || !identity.name || !identity.website) {
7670
8032
  throw new Error(`Org identity is missing: ${identity.missing.join(", ")}`);
7671
8033
  }
7672
8034
  const listing = {
7673
8035
  v: 1,
7674
- claim,
7675
8036
  name: identity.name,
7676
8037
  domain: identity.website,
7677
8038
  category: form.category,
@@ -7682,32 +8043,16 @@ function buildListing(identity, form, claim, now = new Date) {
7682
8043
  };
7683
8044
  return parseTelemetryRanking(JSON.stringify(listing));
7684
8045
  }
7685
- function rankingEntryFile(listing) {
7686
- return `${JSON.stringify({ $schema: "./schema.json", domain: listing.domain, claim: listing.claim }, null, 2)}
7687
- `;
7688
- }
7689
- function rankingPrUrl(listing) {
7690
- const params = new URLSearchParams({
7691
- filename: `community/ranking/${listing.domain}.json`,
7692
- value: rankingEntryFile(listing),
7693
- message: `chore(ranking): add ${listing.domain}`
7694
- });
7695
- return `https://github.com/${RANKING_REPO}/new/main?${params.toString()}`;
7696
- }
7697
- function rankingLeaveUrl(domain) {
7698
- return `https://github.com/${RANKING_REPO}/delete/main/community/ranking/${domain}.json`;
7699
- }
7700
- var TELEMETRY_RANKING_KEY = "telemetry_ranking", PUBLIC_RANKING_ENABLED_KEY = "PUBLIC_RANKING_ENABLED", TELEMETRY_RANKING_MAX_BYTES = 2048, RANKING_CATEGORIES, RANKING_CLAIM_PATTERN, hostname, nullableText = (max) => string2().trim().min(1).max(max).nullable(), telemetryRankingV1, telemetryRankingSchema, rankingFormSchema, blankToNull = (value) => value?.trim() || null, RANKING_REPO = "desplega-ai/agent-swarm";
8046
+ 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;
7701
8047
  var init_telemetry_ranking = __esm(() => {
7702
8048
  init_zod();
7703
8049
  init_ranking_taxonomy_gen();
7704
8050
  init_org_website();
7705
8051
  RANKING_CATEGORIES = Object.keys(RANKING_TAXONOMY);
7706
- RANKING_CLAIM_PATTERN = /^rk_[0-9a-f]{32}$/;
7707
8052
  hostname = string2().refine((v) => normalizeOrgWebsite(v) === v, "bare hostname");
7708
8053
  telemetryRankingV1 = strictObject2({
7709
8054
  v: literal2(1),
7710
- claim: string2().regex(RANKING_CLAIM_PATTERN),
8055
+ claim: string2().regex(/^rk_[0-9a-f]{32}$/).optional(),
7711
8056
  name: string2().trim().min(1).max(60),
7712
8057
  domain: hostname,
7713
8058
  category: _enum2(RANKING_CATEGORIES),
@@ -7914,7 +8259,8 @@ function booleanValidators(keys) {
7914
8259
  ]));
7915
8260
  }
7916
8261
  function enumValidator(key, options) {
7917
- const message = `Invalid ${key} value (must be one of: ${options.join(", ")})`;
8262
+ const listed = options.filter(Boolean).join(", ");
8263
+ const message = `Invalid ${key} value (must be one of: ${listed}${options.includes("") ? ", or empty" : ""})`;
7918
8264
  return {
7919
8265
  [key]: (value) => {
7920
8266
  if (typeof value !== "string")
@@ -7999,7 +8345,7 @@ function validateConfigValue(key, value) {
7999
8345
  function validateExportToEnv(key, exportToEnv) {
8000
8346
  return exportToEnv === true && isEnvExportRestrictedKey(key) ? envExportRestrictedError(key) : null;
8001
8347
  }
8002
- 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;
8348
+ 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, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS, validateControllerTokenTtlDays, validateControllerGraceSec, VALIDATED_KEYS;
8003
8349
  var init_swarm_config_guard = __esm(() => {
8004
8350
  init_schema();
8005
8351
  init_telemetry_ranking();
@@ -8007,6 +8353,7 @@ var init_swarm_config_guard = __esm(() => {
8007
8353
  init_reaction_shortcode();
8008
8354
  init_types();
8009
8355
  init_api_drain();
8356
+ init_company_profile();
8010
8357
  init_config_env_export();
8011
8358
  init_egress_guard();
8012
8359
  init_enabled_tools();
@@ -8040,6 +8387,7 @@ var init_swarm_config_guard = __esm(() => {
8040
8387
  DB_RETENTION_CATCHUP_INTERVAL_MS: { min: 5000, max: 3600000 },
8041
8388
  DB_RETENTION_MAX_STATEMENT_MS: { min: 25, max: 5000 }
8042
8389
  };
8390
+ APPS_JSON_COLUMN_MAX_BYTES_BOUNDS = { min: 1024, max: 16777216 };
8043
8391
  validateControllerTokenTtlDays = boundedIntegerValidators(["RUNTIME_CONTROLLER_TOKEN_TTL_DAYS"], 1, 3650).RUNTIME_CONTROLLER_TOKEN_TTL_DAYS;
8044
8392
  validateControllerGraceSec = boundedIntegerValidators(["RUNTIME_CONTROLLER_GRACE_SEC"], 0, 86400).RUNTIME_CONTROLLER_GRACE_SEC;
8045
8393
  VALIDATED_KEYS = {
@@ -8156,6 +8504,9 @@ var init_swarm_config_guard = __esm(() => {
8156
8504
  const str = String(value).trim();
8157
8505
  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)";
8158
8506
  },
8507
+ ...enumValidator("SWARM_ORG_TEAM_SIZE", ["", ...COMPANY_TEAM_SIZES]),
8508
+ ...enumValidator("SWARM_ORG_USE_CASE", ["", ...COMPANY_USE_CASES]),
8509
+ ...enumValidator("SWARM_ORG_ACQUISITION_SOURCE", ["", ...COMPANY_ACQUISITION_SOURCES]),
8159
8510
  ...booleanValidators([
8160
8511
  "SWARM_USED_BY_CONSENT",
8161
8512
  "PUBLIC_RANKING_ENABLED",
@@ -8241,6 +8592,7 @@ var init_swarm_config_guard = __esm(() => {
8241
8592
  "SLACK_TREE_STALL_MIN"
8242
8593
  ], 1),
8243
8594
  ...boundedIntegerValidatorsFor(DB_RETENTION_TUNING_BOUNDS),
8595
+ ...boundedIntegerValidators(["APPS_JSON_COLUMN_MAX_BYTES"], APPS_JSON_COLUMN_MAX_BYTES_BOUNDS.min, APPS_JSON_COLUMN_MAX_BYTES_BOUNDS.max),
8244
8596
  ...boundedIntegerValidators([
8245
8597
  "SESSION_LOG_RETENTION_DAYS",
8246
8598
  "AGENT_LOG_RETENTION_DAYS",
@@ -18733,7 +19085,7 @@ async function loadSecretRegistry() {
18733
19085
  result.failed += 1;
18734
19086
  }
18735
19087
  try {
18736
- const { loadRuntimeControllerSecrets } = await import("./db-nc1rd869.js");
19088
+ const { loadRuntimeControllerSecrets } = await import("./db-2y0mgstc.js");
18737
19089
  const loaded = await loadRuntimeControllerSecrets();
18738
19090
  result.runtimeController = loaded.count;
18739
19091
  result.failed += loaded.failed;
@@ -19057,6 +19409,7 @@ __export(exports_db, {
19057
19409
  SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS: () => SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2,
19058
19410
  SKILL_FILE_LIMITS: () => SKILL_FILE_LIMITS2,
19059
19411
  SUPERSEDED_RESUME_REPAIR_WINDOW_MS: () => SUPERSEDED_RESUME_REPAIR_WINDOW_MS2,
19412
+ TASK_LINEAGE_LIMITS: () => TASK_LINEAGE_LIMITS2,
19060
19413
  UNATTRIBUTED_USER_ID: () => UNATTRIBUTED_USER_ID2,
19061
19414
  __resetSqliteVecExtensionPathCacheForTests: () => __resetSqliteVecExtensionPathCacheForTests2,
19062
19415
  abandonSlackOutcomeDelivery: () => abandonSlackOutcomeDelivery2,
@@ -19358,6 +19711,7 @@ __export(exports_db, {
19358
19711
  getTaskAttachments: () => getTaskAttachments2,
19359
19712
  getTaskById: () => getTaskById2,
19360
19713
  getTaskByWorkflowRunStepId: () => getTaskByWorkflowRunStepId2,
19714
+ getTaskLineage: () => getTaskLineage2,
19361
19715
  getTaskStats: () => getTaskStats2,
19362
19716
  getTasksByAgentId: () => getTasksByAgentId2,
19363
19717
  getTasksByStatus: () => getTasksByStatus2,
@@ -21093,7 +21447,7 @@ async function createTaskExtended2(task, options) {
21093
21447
  priority: row.priority
21094
21448
  }, (task) => task !== null, row.requestedByUserId);
21095
21449
  getDbClient2().afterCommit(() => {
21096
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => {
21450
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => {
21097
21451
  workflowEventBus.emit("task.created", {
21098
21452
  taskId: row.id,
21099
21453
  task: row.task,
@@ -21175,7 +21529,7 @@ async function releaseTask2(taskId, wakeSnapshot) {
21175
21529
  } catch {}
21176
21530
  if (isRuntimePoolsEnabled() && !wakeSnapshot)
21177
21531
  getDbClient2().afterCommit(() => {
21178
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
21532
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
21179
21533
  });
21180
21534
  }
21181
21535
  return row ? rowToAgentTask(row) : null;
@@ -21245,7 +21599,7 @@ async function rejectTask2(taskId, agentId, reason) {
21245
21599
  } catch {}
21246
21600
  if (isRuntimePoolsEnabled())
21247
21601
  getDbClient2().afterCommit(() => {
21248
- import("./event-bus-101fenkh.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
21602
+ import("./event-bus-9vpk8gmq.js").then(({ workflowEventBus }) => workflowEventBus.emit("task.unassigned", { taskId })).catch((error) => console.error("[db] Routing event failed:", scrubSecrets(String(error))));
21249
21603
  });
21250
21604
  }
21251
21605
  return row ? rowToAgentTask(row) : null;
@@ -26119,8 +26473,12 @@ async function updateUser2(id, data) {
26119
26473
  params.push(new Date().toISOString());
26120
26474
  params.push(id);
26121
26475
  const row = await getDbClient2().get(`UPDATE users SET ${sets.join(", ")} WHERE id = ? RETURNING *`, params);
26122
- if (row)
26123
- getDbClient2().afterCommit(scheduleOrgDomainRecompute);
26476
+ if (row) {
26477
+ getDbClient2().afterCommit(() => {
26478
+ invalidateTelemetryUserRole(id);
26479
+ scheduleOrgDomainRecompute();
26480
+ });
26481
+ }
26124
26482
  return row ? rowToUser(row) : null;
26125
26483
  }
26126
26484
  function quoteSqlIdentifier(identifier) {
@@ -26205,8 +26563,12 @@ async function deleteUser2(id, replacementUserId) {
26205
26563
  }
26206
26564
  await reclassifyTaskHumanFree(reclassifySeedIds);
26207
26565
  const result = await tx.run("DELETE FROM users WHERE id = ?", [id]);
26208
- if (result.changes > 0)
26209
- getDbClient2().afterCommit(scheduleOrgDomainRecompute);
26566
+ if (result.changes > 0) {
26567
+ getDbClient2().afterCommit(() => {
26568
+ invalidateTelemetryUserRole(id);
26569
+ scheduleOrgDomainRecompute();
26570
+ });
26571
+ }
26210
26572
  return result.changes > 0;
26211
26573
  });
26212
26574
  }
@@ -27313,4 +27675,4 @@ var init_db3 = __esm(() => {
27313
27675
  };
27314
27676
  });
27315
27677
 
27316
- 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, 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, mintRankingClaim, buildListing, rankingEntryFile, rankingPrUrl, rankingLeaveUrl, 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 };
27678
+ 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, TASK_LINEAGE_LIMITS2, getTaskLineage2, 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, APPS_JSON_COLUMN_MAX_BYTES_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 };