@desplega.ai/agent-swarm 2.4.1 → 2.4.3

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 (153) hide show
  1. package/dist/{acp-adapter-zvzr538d.js → acp-adapter-1885dpr7.js} +4 -4
  2. package/dist/{actions-jhtqdw69.js → actions-pn76n32q.js} +18 -18
  3. package/dist/{amp-adapter-bd84rhs2.js → amp-adapter-af84rx1d.js} +3 -3
  4. package/dist/{app-kreq1gwg.js → app-6sv8mhzm.js} +3 -3
  5. package/dist/{assistant-3k22sbsq.js → assistant-sc2tf825.js} +20 -20
  6. package/dist/{boot-reembed-f6z923ny.js → boot-reembed-gvxjs2py.js} +1 -1
  7. package/dist/{boot-reembed-e53x6b9v.js → boot-reembed-y3m0ydzj.js} +1 -1
  8. package/dist/{boot-scrub-sweep-0538vsb7.js → boot-scrub-sweep-1j9mk05f.js} +3 -3
  9. package/dist/{boot-seeds-6wxqkfk2.js → boot-seeds-37sp626b.js} +4 -4
  10. package/dist/{claude-adapter-gfts5044.js → claude-adapter-rp0jtnwr.js} +4 -4
  11. package/dist/{claude-managed-setup-h00hsgtz.js → claude-managed-setup-rdt248k7.js} +1 -1
  12. package/dist/{claude-sdk-session-56besmfz.js → claude-sdk-session-53rcw5we.js} +9822 -9749
  13. package/dist/{cli-3tnpj2bh.js → cli-038fga5k.js} +2 -2
  14. package/dist/{cli-kmqgmcnb.js → cli-0dxxwfkt.js} +8 -8
  15. package/dist/{cli-471qk6s2.js → cli-1012xb7j.js} +28 -28
  16. package/dist/{cli-sv5gb0yb.js → cli-1eszr343.js} +1 -1
  17. package/dist/{cli-7225gwj7.js → cli-1m17dc9d.js} +1 -1
  18. package/dist/{cli-xftrvxag.js → cli-1ma335fz.js} +3 -3
  19. package/dist/{cli-s48yvzb8.js → cli-1n9gdg56.js} +4 -4
  20. package/dist/{cli-ash6xxk7.js → cli-1xsraagq.js} +3 -3
  21. package/dist/{cli-xbzvet96.js → cli-36ckw0wx.js} +5 -4
  22. package/dist/{cli-mhywgrrz.js → cli-4sydckyj.js} +1 -1
  23. package/dist/{cli-3r448dqn.js → cli-4yef8ghv.js} +3 -3
  24. package/dist/{cli-g0hgtz4p.js → cli-58vwn100.js} +3 -3
  25. package/dist/{cli-pw7v69vp.js → cli-625tb7aq.js} +1 -1
  26. package/dist/{cli-m2qgh5sv.js → cli-6aen3ezb.js} +1 -1
  27. package/dist/{cli-z071fb95.js → cli-6eyncg0y.js} +6 -6
  28. package/dist/{cli-0bh477zn.js → cli-73ezfhha.js} +120 -12
  29. package/dist/{cli-x5mq1fyq.js → cli-74c1wpm0.js} +3 -3
  30. package/dist/{cli-b1dfr1m4.js → cli-7a6p4e65.js} +1 -1
  31. package/dist/{cli-fpmsqq59.js → cli-836ehxmt.js} +1 -1
  32. package/dist/{cli-1pa3rz69.js → cli-8vverzf7.js} +1 -1
  33. package/dist/{cli-rdq7tzwm.js → cli-8y99kfey.js} +11 -11
  34. package/dist/{cli-z1ew8vbq.js → cli-aa3tb29r.js} +10 -5
  35. package/dist/{cli-6ncjvx55.js → cli-aypbg9r2.js} +1 -1
  36. package/dist/{cli-3kh4kpqy.js → cli-bxrqvpg5.js} +6 -6
  37. package/dist/{cli-0hyhdkdk.js → cli-cebvbc9t.js} +4 -1
  38. package/dist/{cli-p6argxh9.js → cli-dm8p2dpf.js} +7 -7
  39. package/dist/{cli-jh0qcrga.js → cli-e4d78xsv.js} +1 -1
  40. package/dist/{cli-7a91w22y.js → cli-e8xyjvfc.js} +1 -1
  41. package/dist/{cli-axh29tyr.js → cli-f0p0f6ja.js} +10 -10
  42. package/dist/{cli-w9g4sz81.js → cli-gf2850q7.js} +1 -1
  43. package/dist/{cli-bn5kevnf.js → cli-gx0j2khs.js} +4 -4
  44. package/dist/{cli-gf0kfg81.js → cli-h0mgxann.js} +5 -5
  45. package/dist/{cli-kr2pmfqx.js → cli-kgnkyabk.js} +85 -71
  46. package/dist/{cli-hqhzg1qq.js → cli-mzkwkbdy.js} +1 -1
  47. package/dist/{cli-k9z4zd4p.js → cli-npfe9t1s.js} +2 -2
  48. package/dist/{cli-syhq378v.js → cli-p0qerd2r.js} +1 -1
  49. package/dist/{cli-sjyetj21.js → cli-pygdsgh8.js} +1 -1
  50. package/dist/{cli-2wag8973.js → cli-qeaq3j6t.js} +1 -1
  51. package/dist/{cli-nx462e4v.js → cli-qp2m4btv.js} +3 -3
  52. package/dist/{cli-tbhwrxpt.js → cli-s9rr4gr2.js} +5 -5
  53. package/dist/{cli-fz9kewbh.js → cli-sds5zzs8.js} +1 -1
  54. package/dist/{cli-vy0fay6k.js → cli-tkf4x6ha.js} +15 -15
  55. package/dist/{cli-mfe7f7b5.js → cli-v87dr6e3.js} +2 -2
  56. package/dist/{cli-rqqsfz30.js → cli-vcgscaan.js} +91 -21
  57. package/dist/{cli-zfg9enh9.js → cli-vfha21c9.js} +6 -1
  58. package/dist/{cli-3p8fqcnh.js → cli-vq9gqarq.js} +1 -1
  59. package/dist/{cli-a4gvwttf.js → cli-wk28hzqn.js} +2 -2
  60. package/dist/{cli-p0rakbrk.js → cli-zvbb4n0e.js} +6 -5
  61. package/dist/cli.js +17 -17
  62. package/dist/{codex-adapter-p6rmm7vv.js → codex-adapter-2zrmab9b.js} +2 -2
  63. package/dist/{codex-hook-x7nejyrr.js → codex-hook-e2he7aca.js} +2 -2
  64. package/dist/{codex-session-runner-8vd5t9t0.js → codex-session-runner-kbkz62vc.js} +2 -2
  65. package/dist/{commands-7ems2p13.js → commands-hd574th6.js} +3 -3
  66. package/dist/{controller-m263fg43.js → controller-pz5mcfg4.js} +3 -3
  67. package/dist/{controllers-connect-bg33ae53.js → controllers-connect-5rgq2hfk.js} +19 -19
  68. package/dist/{cursor-adapter-cz6nm6mj.js → cursor-adapter-mgaprq0j.js} +2 -2
  69. package/dist/{db-w505dwa8.js → db-6nf1207q.js} +6 -2
  70. package/dist/{db-ys2rbdft.js → db-h06dxp05.js} +3 -3
  71. package/dist/{dispatcher-0s0mckqr.js → dispatcher-zthpy4m1.js} +17 -17
  72. package/dist/{dsh-adapter-3n3net33.js → dsh-adapter-64dhw0j7.js} +2 -2
  73. package/dist/{e2b-thdcxtjd.js → e2b-16d6ch39.js} +1 -1
  74. package/dist/{e2b-7am6tmq6.js → e2b-zn0b4w5w.js} +1 -1
  75. package/dist/{external-channel-5b23fv8z.js → external-channel-x01t7ke6.js} +2 -2
  76. package/dist/{grok-adapter-q9fghe5q.js → grok-adapter-h21jv594.js} +5 -5
  77. package/dist/handlers-2qjw434w.js +39 -0
  78. package/dist/{heartbeat-tww6yx1w.js → heartbeat-zzfksckz.js} +20 -20
  79. package/dist/{hook-pvmh9b6m.js → hook-3xfqhh2s.js} +2 -2
  80. package/dist/{hook-dx0pkvar.js → hook-z4zhzj1f.js} +10 -5
  81. package/dist/{http-k2ejbt05.js → http-q813tmya.js} +121 -75
  82. package/dist/{index-2z710v4x.js → index-220tk9bw.js} +9 -9
  83. package/dist/index-d0g18bax.js +41 -0
  84. package/dist/{index-dgz61nff.js → index-m0a4ydqj.js} +17 -17
  85. package/dist/{index-h2ek08d6.js → index-wbbs14c5.js} +17 -17
  86. package/dist/{index-x5aktmp8.js → index-x8xbyn1t.js} +1 -1
  87. package/dist/{keepalive-nhvpw10z.js → keepalive-y5t1my7m.js} +3 -3
  88. package/dist/{lead-jb6sf69z.js → lead-2xwtq66b.js} +30 -30
  89. package/dist/{maintenance-agakc519.js → maintenance-ybfsaedv.js} +1 -1
  90. package/dist/{oauth-refresh-sweep-4dcbhtn0.js → oauth-refresh-sweep-909jmn12.js} +2 -2
  91. package/dist/{onboard-4n2kwa4v.js → onboard-xn6fkkys.js} +3 -3
  92. package/dist/{opencode-adapter-3s7ax02e.js → opencode-adapter-x4tqzhkh.js} +3 -3
  93. package/dist/{otel-impl-tfa12080.js → otel-impl-e6mn0z13.js} +1 -1
  94. package/dist/{pi-mono-adapter-ytp7gz8b.js → pi-mono-adapter-mcfkn9vf.js} +3 -3
  95. package/dist/{pricing-refresh-3cqx3f3x.js → pricing-refresh-ygd362ep.js} +3 -3
  96. package/dist/{rbac-roles-9fae5rnv.js → rbac-roles-c9axvfnz.js} +3 -3
  97. package/dist/{rbac-roles-y6zbfzve.js → rbac-roles-mb470p4e.js} +2 -2
  98. package/dist/{render-v2-emawjvc4.js → render-v2-g0306nh1.js} +3 -3
  99. package/dist/{resume-zhgts7h7.js → resume-v315hnq6.js} +5 -5
  100. package/dist/{session-access-cm823e06.js → session-access-2zg285a1.js} +4 -4
  101. package/dist/{setup-tkp99w1e.js → setup-a4mtf02k.js} +1 -1
  102. package/dist/{work-objects-f722h263.js → work-objects-9fr0fgtn.js} +21 -21
  103. package/dist/{worker-p7f336rq.js → worker-qae22jeb.js} +30 -30
  104. package/openapi.json +393 -1
  105. package/package.json +3 -3
  106. package/src/apps/catalog.generated.json +3 -2
  107. package/src/apps/definition.ts +152 -4
  108. package/src/apps/row-store.ts +19 -7
  109. package/src/apps/schema-migrate.ts +14 -6
  110. package/src/apps/script-types.ts +1 -0
  111. package/src/apps/sync.ts +20 -19
  112. package/src/be/db/tasks/read.ts +112 -0
  113. package/src/be/db.ts +9 -4
  114. package/src/be/migrations/231_slack_tasks_last_updated_index.sql +5 -0
  115. package/src/be/swarm-config-guard.ts +15 -0
  116. package/src/github/handlers.ts +6 -5
  117. package/src/hooks/hook.ts +2 -1
  118. package/src/http/apps.ts +15 -2
  119. package/src/http/status.ts +49 -43
  120. package/src/http/tasks.ts +47 -0
  121. package/src/providers/acp-targets.ts +1 -1
  122. package/src/providers/amp-adapter.ts +1 -1
  123. package/src/providers/codex-adapter.ts +4 -4
  124. package/src/providers/opencode-adapter.ts +2 -2
  125. package/src/providers/pi-mono-extension.ts +2 -1
  126. package/src/telemetry.ts +15 -3
  127. package/src/tests/app-row-tools.test.ts +25 -0
  128. package/src/tests/apps-json-column.test.ts +611 -0
  129. package/src/tests/apps-script-types.test.ts +2 -0
  130. package/src/tests/apps-sync-engine.test.ts +42 -0
  131. package/src/tests/claude-stop-hook.test.ts +47 -0
  132. package/src/tests/codex-adapter.test.ts +42 -0
  133. package/src/tests/db-task-read-contract.test.ts +4 -0
  134. package/src/tests/db-task-write-contract.test.ts +2 -0
  135. package/src/tests/docs-index-footprint.test.js +2 -2
  136. package/src/tests/env-flag.test.ts +15 -1
  137. package/src/tests/github-handlers-cancel-config.test.ts +29 -8
  138. package/src/tests/github-handlers-inline-comments.test.ts +9 -2
  139. package/src/tests/runner-harness-telemetry-env.test.ts +6 -0
  140. package/src/tests/script-connections.test.ts +2 -0
  141. package/src/tests/skill-script-refs.test.ts +63 -0
  142. package/src/tests/slack-render-v2-query-plans.test.ts +147 -0
  143. package/src/tests/status.test.ts +158 -9
  144. package/src/tests/task-lineage.test.ts +180 -0
  145. package/src/tests/telemetry-init.test.ts +62 -5
  146. package/src/tests/user-token-rest-auth.test.ts +38 -0
  147. package/src/tools/app-rows.ts +5 -0
  148. package/src/utils/env-flag.ts +9 -0
  149. package/templates/skills/apps/SKILL.md +4 -2
  150. package/templates/skills/apps/content.md +4 -2
  151. package/templates/skills/code-quality/content.md +9 -14
  152. package/dist/handlers-mqrym347.js +0 -39
  153. package/dist/index-pqfwh9nn.js +0 -41
@@ -2,14 +2,14 @@ import {
2
2
  getDb2,
3
3
  getDbClient2,
4
4
  init_db3
5
- } from "./cli-rqqsfz30.js";
5
+ } from "./cli-vcgscaan.js";
6
6
  import {
7
7
  PermissionVerbSchema,
8
8
  init_rbac
9
- } from "./cli-1pa3rz69.js";
9
+ } from "./cli-8vverzf7.js";
10
10
  import {
11
11
  init_env_flag
12
- } from "./cli-0hyhdkdk.js";
12
+ } from "./cli-cebvbc9t.js";
13
13
  import {
14
14
  __esm
15
15
  } from "./cli-242037k3.js";
@@ -5,10 +5,10 @@ import {
5
5
  completeApprovalCancellationNotificationClaim2,
6
6
  releaseApprovalCancellationNotificationClaim2,
7
7
  init_db3
8
- } from "./cli-rqqsfz30.js";
8
+ } from "./cli-vcgscaan.js";
9
9
  import {
10
10
  getSlackApp2
11
- } from "./cli-vy0fay6k.js";
11
+ } from "./cli-tkf4x6ha.js";
12
12
  import {
13
13
  DEFAULT_MODEL,
14
14
  resolveCredential
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  TERMINAL_TASK_STATUSES,
18
18
  init_types
19
- } from "./cli-fpmsqq59.js";
19
+ } from "./cli-836ehxmt.js";
20
20
  import {
21
21
  selectCredential,
22
22
  init_credentials
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  getAppUrl,
54
54
  init_constants2
55
- } from "./cli-w9g4sz81.js";
55
+ } from "./cli-gf2850q7.js";
56
56
  import {
57
57
  scrubSecrets,
58
58
  init_secret_scrubber
@@ -454,7 +454,7 @@ class HumanInTheLoopExecutor extends BaseExecutor {
454
454
  }
455
455
  if (notification.channel === "slack") {
456
456
  try {
457
- const { getSlackApp } = await import("./app-kreq1gwg.js");
457
+ const { getSlackApp } = await import("./app-6sv8mhzm.js");
458
458
  const slackApp = getSlackApp();
459
459
  if (!slackApp) {
460
460
  console.warn("[HITL] Slack not initialized — cannot send notification");
@@ -5,7 +5,7 @@ import {
5
5
  validateRuntimeTokenTtlHours,
6
6
  init_swarm_config_guard,
7
7
  init_db3
8
- } from "./cli-rqqsfz30.js";
8
+ } from "./cli-vcgscaan.js";
9
9
  import {
10
10
  unregisterVolatileSecret,
11
11
  init_secret_scrubber
@@ -47,10 +47,10 @@ import {
47
47
  checkDependencies2,
48
48
  emitBuiltInIntegrationConnectedOnce2,
49
49
  init_db3
50
- } from "./cli-rqqsfz30.js";
50
+ } from "./cli-vcgscaan.js";
51
51
  import {
52
52
  getChannelBlockReason2
53
- } from "./cli-mfe7f7b5.js";
53
+ } from "./cli-v87dr6e3.js";
54
54
  import {
55
55
  require_dist5,
56
56
  require_axios,
@@ -67,15 +67,15 @@ import {
67
67
  import {
68
68
  isTerminalTaskStatus,
69
69
  init_types
70
- } from "./cli-fpmsqq59.js";
70
+ } from "./cli-836ehxmt.js";
71
71
  import {
72
72
  taskAttachmentDisplayUrl,
73
73
  init_task_attachment_links
74
- } from "./cli-x5mq1fyq.js";
74
+ } from "./cli-74c1wpm0.js";
75
75
  import {
76
76
  getSlackConfiguration,
77
77
  init_config
78
- } from "./cli-2wag8973.js";
78
+ } from "./cli-qeaq3j6t.js";
79
79
  import {
80
80
  init_zod
81
81
  } from "./cli-4chz1hye.js";
@@ -93,11 +93,11 @@ import {
93
93
  import {
94
94
  getAppUrl,
95
95
  init_constants2
96
- } from "./cli-w9g4sz81.js";
96
+ } from "./cli-gf2850q7.js";
97
97
  import {
98
98
  isEnvFlagEnabled,
99
99
  init_env_flag
100
- } from "./cli-0hyhdkdk.js";
100
+ } from "./cli-cebvbc9t.js";
101
101
  import {
102
102
  scrubSecrets,
103
103
  scrubObject,
@@ -6235,7 +6235,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
6235
6235
  return;
6236
6236
  initialized = true;
6237
6237
  try {
6238
- const impl = await import("./otel-impl-tfa12080.js");
6238
+ const impl = await import("./otel-impl-e6mn0z13.js");
6239
6239
  await impl.boot(serviceRole, {
6240
6240
  exportConsoleLogs: serviceRole === "api" && isApiLogExportEnabled()
6241
6241
  });
@@ -10080,17 +10080,17 @@ async function initSlackApp2() {
10080
10080
  });
10081
10081
  initialized2 = true;
10082
10082
  app.use(slackInboundOutcomeMiddleware());
10083
- const { registerMessageHandler } = await import("./handlers-mqrym347.js");
10084
- const { registerCommandHandler } = await import("./commands-7ems2p13.js");
10085
- const { registerActionHandlers } = await import("./actions-jhtqdw69.js");
10086
- const { registerWorkObjectHandlers } = await import("./work-objects-f722h263.js");
10083
+ const { registerMessageHandler } = await import("./handlers-2qjw434w.js");
10084
+ const { registerCommandHandler } = await import("./commands-hd574th6.js");
10085
+ const { registerActionHandlers } = await import("./actions-pn76n32q.js");
10086
+ const { registerWorkObjectHandlers } = await import("./work-objects-9fr0fgtn.js");
10087
10087
  registerMessageHandler(app);
10088
10088
  registerCommandHandler(app);
10089
10089
  registerActionHandlers(app);
10090
10090
  registerWorkObjectHandlers(app);
10091
- const { createAssistant } = await import("./assistant-3k22sbsq.js");
10091
+ const { createAssistant } = await import("./assistant-sc2tf825.js");
10092
10092
  app.assistant(createAssistant());
10093
- const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-5b23fv8z.js");
10093
+ const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-x01t7ke6.js");
10094
10094
  if (isBlockExternalEnabled()) {
10095
10095
  scanExternalChannelsOnBoot(app.client).catch((error) => {
10096
10096
  console.error("[Slack] External channel boot scan failed:", error);
@@ -10103,7 +10103,7 @@ async function startSlackApp2() {
10103
10103
  await initSlackApp2();
10104
10104
  }
10105
10105
  if (app) {
10106
- const { isSlackRenderV2Enabled } = await import("./render-v2-emawjvc4.js");
10106
+ const { isSlackRenderV2Enabled } = await import("./render-v2-g0306nh1.js");
10107
10107
  if (isSlackRenderV2Enabled())
10108
10108
  await ensureSlackRenderV2Activation2();
10109
10109
  await app.start();
@@ -4,11 +4,11 @@ import {
4
4
  claimKv2,
5
5
  deleteKv2,
6
6
  init_db3
7
- } from "./cli-rqqsfz30.js";
7
+ } from "./cli-vcgscaan.js";
8
8
  import {
9
9
  isEnvFlagEnabled,
10
10
  init_env_flag
11
- } from "./cli-0hyhdkdk.js";
11
+ } from "./cli-cebvbc9t.js";
12
12
  import {
13
13
  scrubSecrets,
14
14
  init_secret_scrubber
@@ -22,7 +22,7 @@ import {
22
22
  VersionableFieldSchema,
23
23
  SessionCostModelBreakdownSchema,
24
24
  init_types
25
- } from "./cli-fpmsqq59.js";
25
+ } from "./cli-836ehxmt.js";
26
26
  import {
27
27
  generateDefaultClaudeMd2,
28
28
  generateDefaultSoulMd2,
@@ -36,15 +36,15 @@ import {
36
36
  init_identity_field_budget,
37
37
  contentSha256,
38
38
  init_profile_sync
39
- } from "./cli-x5mq1fyq.js";
39
+ } from "./cli-74c1wpm0.js";
40
40
  import {
41
41
  isSlackConfigured,
42
42
  init_config
43
- } from "./cli-2wag8973.js";
43
+ } from "./cli-qeaq3j6t.js";
44
44
  import {
45
45
  isSteeringEnabled2,
46
46
  init_steering_enabled
47
- } from "./cli-mhywgrrz.js";
47
+ } from "./cli-4sydckyj.js";
48
48
  import {
49
49
  deriveProviderFromKeyType,
50
50
  init_credentials
@@ -105,7 +105,7 @@ import {
105
105
  import {
106
106
  init_package,
107
107
  package_default
108
- } from "./cli-ash6xxk7.js";
108
+ } from "./cli-1xsraagq.js";
109
109
  import {
110
110
  realtimeBus,
111
111
  init_bus
@@ -113,7 +113,7 @@ import {
113
113
  import {
114
114
  isEnvFlagEnabled,
115
115
  init_env_flag
116
- } from "./cli-0hyhdkdk.js";
116
+ } from "./cli-cebvbc9t.js";
117
117
  import {
118
118
  scrubSecrets,
119
119
  scrubObject,
@@ -2533,6 +2533,7 @@ var init_request_auth_context = __esm(() => {
2533
2533
 
2534
2534
  // src/telemetry.ts
2535
2535
  import { randomUUID } from "node:crypto";
2536
+ import { existsSync } from "node:fs";
2536
2537
  function setTelemetryIngestObserver(observer) {
2537
2538
  ingestObserver = observer;
2538
2539
  }
@@ -2718,13 +2719,20 @@ function isCloudDeployment() {
2718
2719
  const raw = process.env.SWARM_CLOUD;
2719
2720
  return raw === "true" || raw === "1";
2720
2721
  }
2721
- function getTelemetryEnvironment() {
2722
+ function getTelemetryEnvironment(packageRoot = new URL("../", import.meta.url)) {
2722
2723
  const explicit = process.env.DESPLEGA_TELEMETRY_ENV?.trim();
2723
2724
  if (explicit)
2724
2725
  return explicit;
2725
2726
  if (getNodeEnv() === "test")
2726
2727
  return "test";
2727
- 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";
2728
2736
  }
2729
2737
  function track(options) {
2730
2738
  emit(options.event, options.properties, options.metadata, options.actor);
@@ -2813,7 +2821,7 @@ function emitIntegrationConnected(type, providerSlug, firstOfType) {
2813
2821
  }, { userId: getCurrentRequestUserId() ?? null });
2814
2822
  return true;
2815
2823
  }
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;
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;
2817
2825
  var init_telemetry = __esm(() => {
2818
2826
  init_package();
2819
2827
  init_config();
@@ -3526,7 +3534,7 @@ var init_secrets_cipher = () => {};
3526
3534
 
3527
3535
  // src/be/crypto/key-bootstrap.ts
3528
3536
  import { randomBytes as randomBytes3 } from "node:crypto";
3529
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
3537
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "node:fs";
3530
3538
  import path from "node:path";
3531
3539
  function keyGenerationHelp() {
3532
3540
  return [
@@ -3565,7 +3573,7 @@ function resolveEncryptionKey(dbPath, options = {}) {
3565
3573
  }
3566
3574
  const envKeyFile = process.env[ENV_KEY_FILE];
3567
3575
  if (envKeyFile && envKeyFile.length > 0) {
3568
- if (!existsSync(envKeyFile)) {
3576
+ if (!existsSync2(envKeyFile)) {
3569
3577
  throw new Error(`Invalid encryption key at env:${ENV_KEY_FILE} (${envKeyFile}): file does not exist`);
3570
3578
  }
3571
3579
  const content = readFileSync(envKeyFile, "utf8");
@@ -3576,7 +3584,7 @@ function resolveEncryptionKey(dbPath, options = {}) {
3576
3584
  throw new Error(`In-memory database requires ${ENV_KEY} or ${ENV_KEY_FILE} to be set explicitly`);
3577
3585
  }
3578
3586
  const keyFilePath = path.join(path.dirname(dbPath), KEY_FILENAME);
3579
- if (existsSync(keyFilePath)) {
3587
+ if (existsSync2(keyFilePath)) {
3580
3588
  const content = readFileSync(keyFilePath, "utf8");
3581
3589
  cachedKey = decodeAndValidate(`file:${keyFilePath}`, content);
3582
3590
  return cachedKey;
@@ -4829,7 +4837,7 @@ var init_runtime = __esm(() => {
4829
4837
  // src/telemetry-identity.ts
4830
4838
  async function loadUserRole(userId) {
4831
4839
  try {
4832
- const { getUserGrant } = await import("./rbac-roles-y6zbfzve.js");
4840
+ const { getUserGrant } = await import("./rbac-roles-mb470p4e.js");
4833
4841
  const grant = await getUserGrant(userId);
4834
4842
  const role = grant.grantsAll ? "admin" : "member";
4835
4843
  const user = await getDbClient2().get("SELECT json_extract(metadata, '$.jobFunction') AS jobFunction FROM users WHERE id = ? AND json_valid(metadata)", [userId]);
@@ -5854,6 +5862,61 @@ async function getChildTasks2(parentTaskId) {
5854
5862
  const rows = await getDbClient2().query(`SELECT * FROM agent_tasks WHERE parentTaskId = ? ORDER BY createdAt ASC, rowid ASC`, [parentTaskId]);
5855
5863
  return rows.map(rowToAgentTask);
5856
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
+ }
5857
5920
  async function hasNonTerminalResumeChild2(parentId) {
5858
5921
  const row = await getDbClient2().get(`SELECT 1 FROM agent_tasks
5859
5922
  WHERE parentTaskId = ?
@@ -6539,7 +6602,7 @@ async function findRecentCancelledTaskInThread2(channelId, threadTs, windowMinut
6539
6602
  LIMIT 1`, [channelId, threadTs, since]);
6540
6603
  return row ? rowToAgentTask(row) : null;
6541
6604
  }
6542
- 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
6543
6606
  OR (julianday(?) - julianday(obligation.last_attempt_at)) * 86400000.0 >=
6544
6607
  CASE WHEN obligation.attempt_count >= 8 THEN 600000
6545
6608
  ELSE 3000 * (1 << obligation.attempt_count) END)`, LINEAR_TRACKER_CONTEXT_KEY_PREFIX = "task:trackers:linear:";
@@ -6569,6 +6632,9 @@ var init_read = __esm(() => {
6569
6632
  agent_tasks.title, agent_tasks.status, agent_tasks.createdAt, agent_tasks.lastUpdatedAt,
6570
6633
  agent_tasks.finishedAt, agent_tasks.peakContextTokens`
6571
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`;
6572
6638
  SUPERSEDED_RESUME_REPAIR_WINDOW_MS2 = 24 * 60 * 60 * 1000;
6573
6639
  NEVER_STARTED_TASK_STATUSES = [
6574
6640
  "draft",
@@ -8279,7 +8345,7 @@ function validateConfigValue(key, value) {
8279
8345
  function validateExportToEnv(key, exportToEnv) {
8280
8346
  return exportToEnv === true && isEnvExportRestrictedKey(key) ? envExportRestrictedError(key) : null;
8281
8347
  }
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;
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;
8283
8349
  var init_swarm_config_guard = __esm(() => {
8284
8350
  init_schema();
8285
8351
  init_telemetry_ranking();
@@ -8321,6 +8387,7 @@ var init_swarm_config_guard = __esm(() => {
8321
8387
  DB_RETENTION_CATCHUP_INTERVAL_MS: { min: 5000, max: 3600000 },
8322
8388
  DB_RETENTION_MAX_STATEMENT_MS: { min: 25, max: 5000 }
8323
8389
  };
8390
+ APPS_JSON_COLUMN_MAX_BYTES_BOUNDS = { min: 1024, max: 16777216 };
8324
8391
  validateControllerTokenTtlDays = boundedIntegerValidators(["RUNTIME_CONTROLLER_TOKEN_TTL_DAYS"], 1, 3650).RUNTIME_CONTROLLER_TOKEN_TTL_DAYS;
8325
8392
  validateControllerGraceSec = boundedIntegerValidators(["RUNTIME_CONTROLLER_GRACE_SEC"], 0, 86400).RUNTIME_CONTROLLER_GRACE_SEC;
8326
8393
  VALIDATED_KEYS = {
@@ -8525,6 +8592,7 @@ var init_swarm_config_guard = __esm(() => {
8525
8592
  "SLACK_TREE_STALL_MIN"
8526
8593
  ], 1),
8527
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),
8528
8596
  ...boundedIntegerValidators([
8529
8597
  "SESSION_LOG_RETENTION_DAYS",
8530
8598
  "AGENT_LOG_RETENTION_DAYS",
@@ -19017,7 +19085,7 @@ async function loadSecretRegistry() {
19017
19085
  result.failed += 1;
19018
19086
  }
19019
19087
  try {
19020
- const { loadRuntimeControllerSecrets } = await import("./db-ys2rbdft.js");
19088
+ const { loadRuntimeControllerSecrets } = await import("./db-h06dxp05.js");
19021
19089
  const loaded = await loadRuntimeControllerSecrets();
19022
19090
  result.runtimeController = loaded.count;
19023
19091
  result.failed += loaded.failed;
@@ -19341,6 +19409,7 @@ __export(exports_db, {
19341
19409
  SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS: () => SESSION_ACTIVITY_REFRESH_MIN_INTERVAL_MS2,
19342
19410
  SKILL_FILE_LIMITS: () => SKILL_FILE_LIMITS2,
19343
19411
  SUPERSEDED_RESUME_REPAIR_WINDOW_MS: () => SUPERSEDED_RESUME_REPAIR_WINDOW_MS2,
19412
+ TASK_LINEAGE_LIMITS: () => TASK_LINEAGE_LIMITS2,
19344
19413
  UNATTRIBUTED_USER_ID: () => UNATTRIBUTED_USER_ID2,
19345
19414
  __resetSqliteVecExtensionPathCacheForTests: () => __resetSqliteVecExtensionPathCacheForTests2,
19346
19415
  abandonSlackOutcomeDelivery: () => abandonSlackOutcomeDelivery2,
@@ -19642,6 +19711,7 @@ __export(exports_db, {
19642
19711
  getTaskAttachments: () => getTaskAttachments2,
19643
19712
  getTaskById: () => getTaskById2,
19644
19713
  getTaskByWorkflowRunStepId: () => getTaskByWorkflowRunStepId2,
19714
+ getTaskLineage: () => getTaskLineage2,
19645
19715
  getTaskStats: () => getTaskStats2,
19646
19716
  getTasksByAgentId: () => getTasksByAgentId2,
19647
19717
  getTasksByStatus: () => getTasksByStatus2,
@@ -20065,13 +20135,13 @@ async function getResolvableDeferralOutcomes2(limit = 50) {
20065
20135
  AND card.ts NOT LIKE 'pending:%'
20066
20136
  UNION
20067
20137
  SELECT chain.card_id, wake.id FROM chain
20068
- JOIN agent_tasks parent ON parent.id = chain.task_id AND parent.deferredAt IS NOT NULL
20069
- JOIN agent_tasks wake ON wake.parentTaskId = parent.id AND wake.taskType = 'deferred'
20138
+ CROSS JOIN agent_tasks parent ON parent.id = chain.task_id AND parent.deferredAt IS NOT NULL
20139
+ CROSS JOIN agent_tasks wake ON wake.parentTaskId = parent.id AND +wake.taskType = 'deferred'
20070
20140
  )
20071
20141
  SELECT card.*, wake.id AS wake_task_id
20072
20142
  FROM chain
20073
- JOIN slack_messages card ON card.id = chain.card_id
20074
- JOIN agent_tasks wake ON wake.id = chain.task_id AND wake.id != card.task_id
20143
+ CROSS JOIN slack_messages card ON card.id = chain.card_id
20144
+ CROSS JOIN agent_tasks wake ON wake.id = chain.task_id AND wake.id != card.task_id
20075
20145
  WHERE card.kind = 'outcome'
20076
20146
  AND card.finalized_at IS NOT NULL
20077
20147
  AND card.deferral_resolved_at IS NULL
@@ -27605,4 +27675,4 @@ var init_db3 = __esm(() => {
27605
27675
  };
27606
27676
  });
27607
27677
 
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 };
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 };
@@ -21,6 +21,10 @@ import {
21
21
  getOpenRouterAttributionHeaders,
22
22
  init_openrouter_base_url
23
23
  } from "./cli-dfyv0jdy.js";
24
+ import {
25
+ isSessionSummarySkipped,
26
+ init_env_flag
27
+ } from "./cli-cebvbc9t.js";
24
28
  import {
25
29
  scrubSecrets,
26
30
  init_secret_scrubber
@@ -46,6 +50,7 @@ Current Progress: ${task.progress}` : ""
46
50
  }
47
51
 
48
52
  // src/providers/pi-mono-extension.ts
53
+ init_env_flag();
49
54
  init_openrouter_base_url();
50
55
  init_secret_scrubber();
51
56
  function apiHeaders(config) {
@@ -509,7 +514,7 @@ function createSwarmHooksExtension(config) {
509
514
  await syncIdentityFilesToServer(config);
510
515
  await syncSetupScriptToServer(config);
511
516
  const sessionFile = ctx.sessionManager.getSessionFile?.();
512
- if (!process.env.SKIP_SESSION_SUMMARY) {
517
+ if (!isSessionSummarySkipped()) {
513
518
  await summarizeSessionForPi(config, sessionFile);
514
519
  } else {
515
520
  console.debug("session_summary skipped (pi): SKIP_SESSION_SUMMARY is set");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDb2,
3
3
  init_db3
4
- } from "./cli-rqqsfz30.js";
4
+ } from "./cli-vcgscaan.js";
5
5
  import {
6
6
  openAICompatibleProviderIds,
7
7
  withRegistryCatalogSections,
@@ -5,7 +5,7 @@ import {
5
5
  } from "./cli-a5ebc95n.js";
6
6
  import {
7
7
  swarmRuntimeInstanceId
8
- } from "./cli-7a91w22y.js";
8
+ } from "./cli-e8xyjvfc.js";
9
9
  import {
10
10
  detachedProcessGroup,
11
11
  registerProcessGroup,
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_MODEL_TIER_MAP,
23
23
  init_types
24
- } from "./cli-fpmsqq59.js";
24
+ } from "./cli-836ehxmt.js";
25
25
  import {
26
26
  getOpenRouterBaseUrl,
27
27
  getOpenRouterAttributionHeaders,
@@ -22,7 +22,7 @@ import {
22
22
  } from "./cli-pnp2j5zg.js";
23
23
  import {
24
24
  swarmRuntimeInstanceId
25
- } from "./cli-7a91w22y.js";
25
+ } from "./cli-e8xyjvfc.js";
26
26
  import {
27
27
  detachedProcessGroup,
28
28
  registerProcessGroup,
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  DEFAULT_MODEL_TIER_MAP,
54
54
  init_types
55
- } from "./cli-fpmsqq59.js";
55
+ } from "./cli-836ehxmt.js";
56
56
  import {
57
57
  runtimeCatalogModel,
58
58
  init_runtime_model_catalog
@@ -60,11 +60,12 @@ import {
60
60
  import {
61
61
  init_package,
62
62
  package_default
63
- } from "./cli-ash6xxk7.js";
63
+ } from "./cli-1xsraagq.js";
64
64
  import {
65
65
  isEnvFlagEnabled,
66
+ isSessionSummarySkipped,
66
67
  init_env_flag
67
- } from "./cli-0hyhdkdk.js";
68
+ } from "./cli-cebvbc9t.js";
68
69
  import {
69
70
  getApiKey,
70
71
  init_api_key
@@ -1693,7 +1694,7 @@ class CodexSession {
1693
1694
  });
1694
1695
  } finally {
1695
1696
  const sessionWasAborted = this.aborted || this.abortController?.signal.aborted === true || this.pendingResult?.exitCode === 130;
1696
- if (process.env.SKIP_SESSION_SUMMARY !== "1" && !sessionWasAborted) {
1697
+ if (!isSessionSummarySkipped() && !sessionWasAborted) {
1697
1698
  try {
1698
1699
  await this.summarizeAtEnd();
1699
1700
  } catch (err) {