@askexenow/exe-os 0.9.326 → 0.9.327

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 (176) hide show
  1. package/dist/{anthropic-auth-EIGM3FAZ.js → anthropic-auth-S7HEBGUG.js} +1 -1
  2. package/dist/{backfill-metadata-CE35JGTX.js → backfill-metadata-G4NYR2AR.js} +1 -1
  3. package/dist/{behaviors-HZ6BIOGX.js → behaviors-MJHQQHA3.js} +2 -2
  4. package/dist/bin/agentic-ontology-backfill.js +1 -1
  5. package/dist/bin/agentic-reflection-backfill.js +1 -1
  6. package/dist/bin/agentic-semantic-label.js +1 -1
  7. package/dist/bin/backfill-conversations.js +1 -1
  8. package/dist/bin/backfill-responses.js +1 -1
  9. package/dist/bin/backfill-vectors.js +2 -2
  10. package/dist/bin/bulk-sync-postgres.js +3 -3
  11. package/dist/bin/cleanup-stale-review-tasks.js +4 -4
  12. package/dist/bin/cli.js +6 -6
  13. package/dist/bin/deferred-daemon-restart.js +36 -36
  14. package/dist/bin/exe-assign.js +1 -1
  15. package/dist/bin/exe-boot.js +8 -8
  16. package/dist/bin/exe-cloud.js +3 -3
  17. package/dist/bin/exe-dispatch.js +4 -4
  18. package/dist/bin/exe-doctor.js +3 -3
  19. package/dist/bin/exe-export-behaviors.js +4 -4
  20. package/dist/bin/exe-forget.js +3 -3
  21. package/dist/bin/exe-gateway.js +5 -5
  22. package/dist/bin/exe-heartbeat.js +4 -4
  23. package/dist/bin/exe-kill.js +6 -6
  24. package/dist/bin/exe-launch-agent.js +7 -7
  25. package/dist/bin/exe-pending-messages.js +5 -5
  26. package/dist/bin/exe-pending-notifications.js +4 -4
  27. package/dist/bin/exe-pending-reviews.js +4 -4
  28. package/dist/bin/exe-review.js +5 -5
  29. package/dist/bin/exe-search.js +2 -2
  30. package/dist/bin/exe-session-cleanup.js +7 -7
  31. package/dist/bin/exe-settings.js +3 -3
  32. package/dist/bin/exe-start-codex.js +4 -4
  33. package/dist/bin/exe-start-opencode.js +3 -3
  34. package/dist/bin/exe-status.js +5 -5
  35. package/dist/bin/exe-team.js +1 -1
  36. package/dist/bin/git-sweep.js +5 -5
  37. package/dist/bin/graph-backfill.js +1 -1
  38. package/dist/bin/graph-export.js +2 -2
  39. package/dist/bin/import-history.js +2 -2
  40. package/dist/bin/install.js +59 -38
  41. package/dist/bin/intercom-check.js +4 -4
  42. package/dist/bin/mcp-sessions.js +2 -2
  43. package/dist/bin/orchestration-metrics.js +1 -1
  44. package/dist/bin/scan-tasks.js +4 -4
  45. package/dist/bin/setup.js +1 -1
  46. package/dist/bin/shard-migrate.js +1 -1
  47. package/dist/{capacity-monitor-HVWEYDCG.js → capacity-monitor-VMKR23KP.js} +5 -5
  48. package/dist/{catchup-brief-YYEVWAZN.js → catchup-brief-VKI6KS2Y.js} +5 -5
  49. package/dist/{chunk-VCQNILOK.js → chunk-26MWYEOV.js} +3 -3
  50. package/dist/{chunk-SG6N2YPV.js → chunk-2STMA5XS.js} +1 -1
  51. package/dist/{chunk-E6TB5MMR.js → chunk-3ZM6ETUZ.js} +3 -3
  52. package/dist/{chunk-VDHLCILZ.js → chunk-4C6HNTC3.js} +4 -4
  53. package/dist/{chunk-7A3E5ZWF.js → chunk-4MHWV4OP.js} +1 -1
  54. package/dist/{chunk-O4FGIGAS.js → chunk-4RRSCGBI.js} +1 -1
  55. package/dist/{chunk-6APWOKOT.js → chunk-4TATUT6T.js} +1 -1
  56. package/dist/{chunk-LFRFAGV2.js → chunk-5BVVHNYL.js} +1 -1
  57. package/dist/{chunk-RULJKRL7.js → chunk-5H46HNHN.js} +7 -7
  58. package/dist/{chunk-5QYY6QIP.js → chunk-6NM5LLKK.js} +2 -2
  59. package/dist/{chunk-MDMYOY6A.js → chunk-6PFVY2IQ.js} +40 -6
  60. package/dist/{chunk-3COTSHKH.js → chunk-7V5EBDP4.js} +1 -1
  61. package/dist/{chunk-4YDFTZTH.js → chunk-B2GZO7GQ.js} +1 -1
  62. package/dist/{chunk-FDNYBZPT.js → chunk-CFWPUWBR.js} +1 -1
  63. package/dist/{chunk-AKQJILJK.js → chunk-CVQLACEJ.js} +1 -1
  64. package/dist/{chunk-WA6X7HFB.js → chunk-D6WLF65C.js} +2 -2
  65. package/dist/{chunk-MPF33E6Q.js → chunk-DQBB4E5A.js} +6 -6
  66. package/dist/{chunk-RXMYEWEC.js → chunk-E2ZJFHUE.js} +1 -1
  67. package/dist/{chunk-ZDPQTWYD.js → chunk-HNWJAA6M.js} +5 -5
  68. package/dist/{chunk-4O7Y6WQX.js → chunk-I5P6HMIR.js} +55 -55
  69. package/dist/{chunk-V4HBRYKM.js → chunk-JE3LZC4F.js} +1 -1
  70. package/dist/{chunk-3EA2MF23.js → chunk-JKUG5ENJ.js} +7 -7
  71. package/dist/{chunk-HAQUN74P.js → chunk-K5VC65BV.js} +2 -2
  72. package/dist/{chunk-I5YP6SUP.js → chunk-KDIX5B6B.js} +1 -1
  73. package/dist/{chunk-F4PFF7ZI.js → chunk-KXEGPANT.js} +1 -1
  74. package/dist/{chunk-H6WYBKVG.js → chunk-NAWS3DP6.js} +56 -0
  75. package/dist/{chunk-POAG6MGC.js → chunk-OA7JEC62.js} +1 -1
  76. package/dist/{chunk-LBG3TRZX.js → chunk-Q34ZIJDB.js} +1 -1
  77. package/dist/{chunk-HO5VLDK4.js → chunk-Q5H6BGUN.js} +1 -1
  78. package/dist/{chunk-YUFM7I7D.js → chunk-QRWK4SCC.js} +2 -2
  79. package/dist/{chunk-2G7MNOP2.js → chunk-RDRZYP2F.js} +1 -1
  80. package/dist/{chunk-F7DI6PDD.js → chunk-SSIW3H6B.js} +1 -1
  81. package/dist/{chunk-4IVWTJDR.js → chunk-TFR447JP.js} +1 -1
  82. package/dist/{chunk-BNCE4226.js → chunk-TTXESWLS.js} +37 -15
  83. package/dist/{chunk-CF2PNIN2.js → chunk-UA6BK6MR.js} +2 -2
  84. package/dist/{chunk-4TXRUGPA.js → chunk-VGMACSEV.js} +4 -1
  85. package/dist/{chunk-6QTLUPXB.js → chunk-WBOMQSIL.js} +1 -1
  86. package/dist/{chunk-FYWV3S2F.js → chunk-WFWAGITG.js} +1 -1
  87. package/dist/{chunk-FKE5HFPR.js → chunk-X23SNB2L.js} +2 -2
  88. package/dist/{chunk-KYWTZG2U.js → chunk-X4PBMDEL.js} +2 -2
  89. package/dist/{chunk-ZOMG6FSE.js → chunk-X4QOQGKK.js} +1 -1
  90. package/dist/{chunk-MMGYRA3H.js → chunk-Z5YHUF4U.js} +1 -1
  91. package/dist/{cleanup-graph-garbage-IGWP3WQY.js → cleanup-graph-garbage-BIHVTX6G.js} +1 -1
  92. package/dist/{crm-webhook-QSZYCR6W.js → crm-webhook-JAPAWSFX.js} +2 -2
  93. package/dist/{cto-delegation-gate-7WG3YIKI.js → cto-delegation-gate-HUYNJDR3.js} +3 -3
  94. package/dist/{daemon-orchestration-TPZS2O7J.js → daemon-orchestration-2C3IFP24.js} +7 -7
  95. package/dist/{documents-HTJ5JWXT.js → documents-KD4P3KK3.js} +2 -2
  96. package/dist/{dreaming-Q3C57VM7.js → dreaming-IILRKU2T.js} +4 -4
  97. package/dist/{exe-export-OEXUIYKT.js → exe-export-25LGMRBD.js} +3 -3
  98. package/dist/{exe-import-GEBZ6BIU.js → exe-import-OZRUFUCZ.js} +3 -3
  99. package/dist/{exe-key-HUYZOUI6.js → exe-key-22QBJYEZ.js} +36 -36
  100. package/dist/{exe-snapshot-PZ2IFXI6.js → exe-snapshot-XQHMEKWY.js} +6 -6
  101. package/dist/{fast-db-init-RQLJQFJG.js → fast-db-init-YMAULA2T.js} +1 -1
  102. package/dist/gateway/index.js +6 -6
  103. package/dist/hooks/bug-report-worker.js +6 -6
  104. package/dist/hooks/codex-stop-task-finalizer.js +6 -6
  105. package/dist/hooks/commit-complete.js +6 -6
  106. package/dist/hooks/error-recall.js +2 -2
  107. package/dist/hooks/ingest.js +2 -2
  108. package/dist/hooks/instructions-loaded.js +1 -1
  109. package/dist/hooks/manifest.json +18 -18
  110. package/dist/hooks/notification.js +1 -1
  111. package/dist/hooks/post-compact.js +4 -4
  112. package/dist/hooks/post-tool-combined.js +2 -2
  113. package/dist/hooks/pre-compact.js +5 -5
  114. package/dist/hooks/pre-tool-use.js +64 -14
  115. package/dist/hooks/prompt-submit.js +15 -15
  116. package/dist/hooks/session-end.js +7 -7
  117. package/dist/hooks/session-start.js +15 -10
  118. package/dist/hooks/stop.js +7 -7
  119. package/dist/hooks/subagent-stop.js +41 -17
  120. package/dist/hooks/summary-worker.js +7 -7
  121. package/dist/index.js +11 -11
  122. package/dist/{intercom-queue-4B2S5UR5.js → intercom-queue-ICTUFK7B.js} +3 -3
  123. package/dist/lib/cloud-sync.js +3 -3
  124. package/dist/lib/consolidation.js +3 -3
  125. package/dist/lib/exe-daemon.js +34 -34
  126. package/dist/lib/hybrid-search.js +2 -2
  127. package/dist/lib/messaging.js +4 -4
  128. package/dist/lib/schedules.js +2 -2
  129. package/dist/lib/skill-learning.js +3 -3
  130. package/dist/lib/store.js +1 -1
  131. package/dist/lib/tasks.js +5 -5
  132. package/dist/lib/tmux-routing.js +3 -3
  133. package/dist/mcp/register-tools.js +35 -35
  134. package/dist/mcp/server.js +36 -36
  135. package/dist/mcp/tools/create-task.js +6 -6
  136. package/dist/mcp/tools/deactivate-behavior.js +3 -3
  137. package/dist/mcp/tools/list-tasks.js +6 -6
  138. package/dist/mcp/tools/send-message.js +5 -5
  139. package/dist/mcp/tools/update-task.js +6 -6
  140. package/dist/{memory-cards-NCNSZRNK.js → memory-cards-LUEGLUID.js} +1 -1
  141. package/dist/{memory-pressure-watchdog-UX4XMMP6.js → memory-pressure-watchdog-TW64VHUL.js} +4 -4
  142. package/dist/{notifications-O2GZIMSH.js → notifications-EASXB2JE.js} +3 -3
  143. package/dist/{orchestrator-5JIQZQ5G.js → orchestrator-4SXBCLQV.js} +4 -4
  144. package/dist/{pipeline-router-JMKG24IL.js → pipeline-router-3SFCDHEK.js} +1 -1
  145. package/dist/{projection-worker-UCMUBSR3.js → projection-worker-G7RGIGRS.js} +1 -1
  146. package/dist/{reranker-NDRQJ3W6.js → reranker-CSBCUD3K.js} +1 -1
  147. package/dist/{retrieval-health-RWWVBLYS.js → retrieval-health-CIGIAIPO.js} +2 -2
  148. package/dist/{review-polling-3XGQGAZT.js → review-polling-TT7AJ5G3.js} +4 -4
  149. package/dist/runtime/index.js +5 -5
  150. package/dist/{self-query-router-EJ3ZWUOK.js → self-query-router-TWBB22QR.js} +2 -2
  151. package/dist/{session-events-RYV6U25T.js → session-events-XFBSFPQ4.js} +4 -4
  152. package/dist/{session-kill-telemetry-PDV5AT74.js → session-kill-telemetry-F3U42ZOH.js} +4 -4
  153. package/dist/{session-scope-EWPUHO7C.js → session-scope-SFJKNTYS.js} +3 -3
  154. package/dist/{setup-wizard-ZZUNU3YM.js → setup-wizard-J6IU42MO.js} +1 -1
  155. package/dist/{skill-refinement-TU54OAT7.js → skill-refinement-32URPZ6C.js} +1 -1
  156. package/dist/{task-enforcement-BIOCLX7K.js → task-enforcement-H7PIZQ32.js} +4 -4
  157. package/dist/{task-scope-SUWJ7NLW.js → task-scope-TJKJNOIY.js} +3 -3
  158. package/dist/{tasks-crud-ZFTYVPD3.js → tasks-crud-DH7KNBNH.js} +3 -3
  159. package/dist/{tasks-notify-VXHGONXH.js → tasks-notify-MXKDKJCJ.js} +4 -4
  160. package/dist/{tasks-review-MUHMWDLT.js → tasks-review-YWYNSD7S.js} +3 -3
  161. package/dist/{telemetry-upload-4NCZC5IX.js → telemetry-upload-6NWWX5TW.js} +1 -1
  162. package/dist/tui/App.js +9 -9
  163. package/dist/{tui-data-235ICHCM.js → tui-data-AURSEMGY.js} +3 -3
  164. package/dist/{worker-gate-CEVF4IZZ.js → worker-gate-TKGFTWNW.js} +1 -1
  165. package/dist/{workflow-engine-AGYTVD5E.js → workflow-engine-5GGI26XG.js} +2 -2
  166. package/dist/{worktree-B6YQISX7.js → worktree-XZRXYDOZ.js} +1 -1
  167. package/dist/{worktree-sweep-SEYVSPLG.js → worktree-sweep-PRRFGQD4.js} +2 -2
  168. package/package.json +1 -1
  169. package/release-notes.json +20 -22
  170. /package/dist/{chunk-WN5XF24Y.js → chunk-EXWHDHHZ.js} +0 -0
  171. /package/dist/{chunk-QGJAR4HP.js → chunk-IE2R3NJO.js} +0 -0
  172. /package/dist/{chunk-O5JGX347.js → chunk-LUNBOAYW.js} +0 -0
  173. /package/dist/{chunk-4WAJZ2HV.js → chunk-MPIYQUJS.js} +0 -0
  174. /package/dist/{chunk-XFMHIDL4.js → chunk-TADPFDZ4.js} +0 -0
  175. /package/dist/{chunk-NUVHBQM3.js → chunk-XZBQ6QJB.js} +0 -0
  176. /package/dist/{core-memory-3PQC5CJG.js → core-memory-MIS5DKJ4.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatDegradations,
3
3
  getRetrievalHealth
4
- } from "./chunk-4YDFTZTH.js";
4
+ } from "./chunk-B2GZO7GQ.js";
5
5
  import {
6
6
  buildRestartReport,
7
7
  formatRestartReport
@@ -959,7 +959,7 @@ function formatReport(report, flags) {
959
959
  return lines.join("\n");
960
960
  }
961
961
  async function fixNullVectors() {
962
- const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-CEVF4IZZ.js");
962
+ const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-TKGFTWNW.js");
963
963
  if (!tryAcquireWorkerSlot()) {
964
964
  process.stderr.write("[exe-doctor] Worker gate full \u2014 waiting for existing backfill workers to finish\n");
965
965
  await new Promise((r) => setTimeout(r, 5e3));
@@ -1144,7 +1144,7 @@ async function main(argv = process.argv.slice(2)) {
1144
1144
  console.log(formatRestartReport(restartReport));
1145
1145
  return emptyAuditReport();
1146
1146
  }
1147
- const { fastDbInit } = await import("./fast-db-init-RQLJQFJG.js");
1147
+ const { fastDbInit } = await import("./fast-db-init-YMAULA2T.js");
1148
1148
  const client = await fastDbInit();
1149
1149
  const report = await runAudit(client, flags);
1150
1150
  console.log(formatReport(report, flags));
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-UVVUWXTS.js";
4
4
  import {
5
5
  MultiAgentOrchestrator
6
- } from "./chunk-7A3E5ZWF.js";
6
+ } from "./chunk-4MHWV4OP.js";
7
7
  import {
8
8
  createQuietRenderer,
9
9
  createTerminalRenderer,
@@ -209,7 +209,7 @@ function createExeOSHooks(config) {
209
209
  );
210
210
  }
211
211
  try {
212
- const { listBehaviors } = await import("./behaviors-HZ6BIOGX.js");
212
+ const { listBehaviors } = await import("./behaviors-MJHQQHA3.js");
213
213
  const behaviors = await listBehaviors(config.agentId, config.projectName, 12);
214
214
  if (behaviors.length > 0) {
215
215
  process.stderr.write(
@@ -330,7 +330,7 @@ function createExeOSHooks(config) {
330
330
  async onSubagentStop(_reason) {
331
331
  try {
332
332
  const { getClient } = await import("./lib/database.js");
333
- const { sessionScopeFilter } = await import("./task-scope-SUWJ7NLW.js");
333
+ const { sessionScopeFilter } = await import("./task-scope-TJKJNOIY.js");
334
334
  const client = getClient();
335
335
  const ehScope = sessionScopeFilter();
336
336
  const tasks = await client.execute({
@@ -422,7 +422,7 @@ function createExeOSHooks(config) {
422
422
  try {
423
423
  const { writeMemory, flushBatch } = await import("./lib/store.js");
424
424
  const { getClient } = await import("./lib/database.js");
425
- const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-SUWJ7NLW.js");
425
+ const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-TJKJNOIY.js");
426
426
  const client = getClient();
427
427
  const cpScope = cpScopeFilter();
428
428
  const tasks = await client.execute({
@@ -9,7 +9,7 @@ import {
9
9
  isEmployeeAlive,
10
10
  sessionScopeFilter,
11
11
  updateTaskStatus
12
- } from "./chunk-MDMYOY6A.js";
12
+ } from "./chunk-6PFVY2IQ.js";
13
13
  import {
14
14
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
15
15
  getCoordinatorName
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-XFMHIDL4.js";
4
+ } from "./chunk-TADPFDZ4.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  GHOST_BEHAVIOR_SQL,
6
6
  isGhostBehaviorRow
7
- } from "./chunk-2G7MNOP2.js";
7
+ } from "./chunk-RDRZYP2F.js";
8
8
  import {
9
9
  decryptSyncBlob,
10
10
  encryptSyncBlob,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  flushBatch,
6
6
  writeMemory
7
- } from "./chunk-V4HBRYKM.js";
7
+ } from "./chunk-JE3LZC4F.js";
8
8
  import {
9
9
  extractKeywords
10
10
  } from "./chunk-CHCA3ZM2.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  recordSessionKill
3
- } from "./chunk-ZOMG6FSE.js";
3
+ } from "./chunk-X4QOQGKK.js";
4
4
  import {
5
5
  updateTask
6
- } from "./chunk-MPF33E6Q.js";
6
+ } from "./chunk-DQBB4E5A.js";
7
7
  import {
8
8
  countPendingReviews,
9
9
  ensureEmployeeAsync,
@@ -16,7 +16,7 @@ import {
16
16
  sessionScopeFilter,
17
17
  strictSessionScopeFilter,
18
18
  writeNotification
19
- } from "./chunk-MDMYOY6A.js";
19
+ } from "./chunk-6PFVY2IQ.js";
20
20
  import {
21
21
  isLeaseExpired
22
22
  } from "./chunk-E23LNUWJ.js";
@@ -1360,7 +1360,7 @@ function createStuckTaskRealDeps(getClient) {
1360
1360
  agentRole: "employee",
1361
1361
  event: "orphan_task",
1362
1362
  project: "",
1363
- summary: `Agent "${agentId}" session died \u2014 task ${taskId.slice(0, 8)} needs review (auto-closed: session ended without completion)`,
1363
+ summary: `Agent "${agentId}" session died \u2014 task ${taskId.slice(0, 8)} moved to needs_review for coordinator triage (session ended without completion)`,
1364
1364
  sessionScope: sessionScope ?? void 0
1365
1365
  });
1366
1366
  },
@@ -1410,7 +1410,7 @@ async function cleanupStaleReviews(deps) {
1410
1410
  }
1411
1411
  const cleaned = [];
1412
1412
  for (const t of stale) {
1413
- const reason = `auto-closed: stale review \u2014 no reviewer action for ${thresholdDays} days`;
1413
+ const reason = `cancelled: stale review \u2014 no reviewer action for ${thresholdDays} days`;
1414
1414
  try {
1415
1415
  await deps.cancelTask(t.taskId, reason);
1416
1416
  cleaned.push(t.taskId);
@@ -2298,7 +2298,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
2298
2298
  }
2299
2299
  async function createWorktreeReaperRealDeps() {
2300
2300
  const { getPaneCwdAsync } = await import("./lib/tmux-status.js");
2301
- const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-B6YQISX7.js");
2301
+ const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-XZRXYDOZ.js");
2302
2302
  const { statSync: statSync3 } = await import("fs");
2303
2303
  const { basename: basename2 } = await import("path");
2304
2304
  const { promisify: promisify2 } = await import("util");
@@ -2513,7 +2513,7 @@ async function gcStaleCheckpoints() {
2513
2513
  }
2514
2514
  async function pollTaskGroupBarriers() {
2515
2515
  try {
2516
- const { checkAndFireBarriers } = await import("./tasks-crud-ZFTYVPD3.js");
2516
+ const { checkAndFireBarriers } = await import("./tasks-crud-DH7KNBNH.js");
2517
2517
  const firedGroupIds = await checkAndFireBarriers();
2518
2518
  if (firedGroupIds.length === 0) return 0;
2519
2519
  const { getClient } = await import("./lib/database.js");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionScopeFilter
3
- } from "./chunk-MDMYOY6A.js";
3
+ } from "./chunk-6PFVY2IQ.js";
4
4
 
5
5
  // src/lib/git-task-sweep.ts
6
6
  import { execSync } from "child_process";
@@ -238,7 +238,7 @@ async function sweepTasks(projectName, options = {}) {
238
238
  }
239
239
  if (!dryRun) {
240
240
  try {
241
- const { updateTaskStatus } = await import("./tasks-crud-ZFTYVPD3.js");
241
+ const { updateTaskStatus } = await import("./tasks-crud-DH7KNBNH.js");
242
242
  await updateTaskStatus({
243
243
  taskId: task.id,
244
244
  status: "needs_review",
@@ -5,10 +5,10 @@ import {
5
5
  ensureWorktree,
6
6
  getGitRoot,
7
7
  isWorktreeDirty
8
- } from "./chunk-H6WYBKVG.js";
8
+ } from "./chunk-NAWS3DP6.js";
9
9
  import {
10
10
  incrementSkillSuccess
11
- } from "./chunk-WN5XF24Y.js";
11
+ } from "./chunk-EXWHDHHZ.js";
12
12
  import {
13
13
  reviewSignalPath,
14
14
  taskSignalDir
@@ -1219,7 +1219,7 @@ async function createTaskCore(input) {
1219
1219
  if (isCoordinatorSession) {
1220
1220
  earlySessionScope = resolved;
1221
1221
  } else {
1222
- const { getSessionProject } = await import("./session-scope-EWPUHO7C.js");
1222
+ const { getSessionProject } = await import("./session-scope-SFJKNTYS.js");
1223
1223
  const sessionProject = getSessionProject(resolved);
1224
1224
  if (sessionProject && sessionProject !== input.projectName) {
1225
1225
  scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
@@ -3934,7 +3934,7 @@ async function verifyPaneAtCapacity(sessionName) {
3934
3934
  reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
3935
3935
  };
3936
3936
  }
3937
- const { isAtCapacity } = await import("./capacity-monitor-HVWEYDCG.js");
3937
+ const { isAtCapacity } = await import("./capacity-monitor-VMKR23KP.js");
3938
3938
  if (!isAtCapacity(pane)) {
3939
3939
  return {
3940
3940
  atCapacity: false,
@@ -4297,7 +4297,7 @@ function scheduleDeferredSpawnNudge(input) {
4297
4297
  return;
4298
4298
  }
4299
4299
  queueIntercom(input.sessionName, `spawn nudge failed after ${attempt} attempts: ${msg}`, "signal");
4300
- void import("./notifications-O2GZIMSH.js").then(({ writeNotification: writeNotification2 }) => writeNotification2({
4300
+ void import("./notifications-EASXB2JE.js").then(({ writeNotification: writeNotification2 }) => writeNotification2({
4301
4301
  agentId: getCoordinatorName(),
4302
4302
  agentRole: "COO",
4303
4303
  event: "error_spike",
@@ -4509,7 +4509,41 @@ async function ensureWorktreeAsync(projectDir, employeeName, instance) {
4509
4509
  const label = instance != null && instance > 0 ? `${employeeName}${instance}` : employeeName;
4510
4510
  const wtPath = path8.join(repoRoot, ".worktrees", label);
4511
4511
  const branch = `${label}-work`;
4512
- if (existsSync9(path8.join(wtPath, ".git"))) return wtPath;
4512
+ if (existsSync9(path8.join(wtPath, ".git"))) {
4513
+ let currentBranch = null;
4514
+ try {
4515
+ const { stdout } = await execFileAsync("git", ["branch", "--show-current"], {
4516
+ cwd: wtPath,
4517
+ encoding: "utf8",
4518
+ timeout: 5e3
4519
+ });
4520
+ currentBranch = stdout.trim() || null;
4521
+ } catch {
4522
+ currentBranch = null;
4523
+ }
4524
+ if (currentBranch === branch) return wtPath;
4525
+ let dirty = true;
4526
+ try {
4527
+ const { stdout } = await execFileAsync("git", ["status", "--porcelain"], {
4528
+ cwd: wtPath,
4529
+ encoding: "utf8",
4530
+ timeout: 5e3
4531
+ });
4532
+ dirty = stdout.trim().length > 0;
4533
+ } catch {
4534
+ dirty = true;
4535
+ }
4536
+ recordOrchestrationEventBestEffort({
4537
+ eventType: "worktree.branch_mismatch",
4538
+ source: "tmux-routing.ensureWorktreeAsync",
4539
+ severity: "warn",
4540
+ agentId: employeeName,
4541
+ instanceId: instance != null ? String(instance) : null,
4542
+ payload: { expectedBranch: branch, actualBranch: currentBranch, dirty }
4543
+ });
4544
+ if (dirty) return null;
4545
+ await execFileAsync("git", ["worktree", "remove", wtPath], { cwd: repoRoot, timeout: 1e4 });
4546
+ }
4513
4547
  mkdirSync6(path8.join(repoRoot, ".worktrees"), { recursive: true });
4514
4548
  try {
4515
4549
  await execFileAsync("git", ["worktree", "prune"], { cwd: repoRoot, timeout: 1e4 });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  storeBehavior
3
- } from "./chunk-2G7MNOP2.js";
3
+ } from "./chunk-RDRZYP2F.js";
4
4
  import {
5
5
  getClient
6
6
  } from "./chunk-ZZOW4BPC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveAnthropicAuth
3
- } from "./chunk-4TXRUGPA.js";
3
+ } from "./chunk-VGMACSEV.js";
4
4
 
5
5
  // src/lib/retrieval-health.ts
6
6
  async function getRetrievalHealth() {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-75H4R62K.js";
4
4
  import {
5
5
  initStore
6
- } from "./chunk-V4HBRYKM.js";
6
+ } from "./chunk-JE3LZC4F.js";
7
7
  import {
8
8
  getClient,
9
9
  isInitialized
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-PQ5Y34JU.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-MDMYOY6A.js";
6
+ } from "./chunk-6PFVY2IQ.js";
7
7
  import {
8
8
  getAgentContext
9
9
  } from "./chunk-GJV3WDWM.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCRMWebhookHandler,
3
3
  parseTwentyWebhook
4
- } from "./chunk-RXMYEWEC.js";
4
+ } from "./chunk-E2ZJFHUE.js";
5
5
  import {
6
6
  WhatsAppAdapter
7
7
  } from "./chunk-ECSNSHZ7.js";
@@ -42,7 +42,7 @@ import {
42
42
  retryWithBackoff,
43
43
  routeMessage,
44
44
  validateGatewayConfig
45
- } from "./chunk-FKE5HFPR.js";
45
+ } from "./chunk-X23SNB2L.js";
46
46
  import {
47
47
  OllamaProvider
48
48
  } from "./chunk-FWFFZGSC.js";
@@ -2,7 +2,7 @@ import {
2
2
  dispatchTaskToEmployee,
3
3
  markTaskNotificationsRead,
4
4
  notifyTaskDone
5
- } from "./chunk-CF2PNIN2.js";
5
+ } from "./chunk-UA6BK6MR.js";
6
6
  import {
7
7
  cleanupReviewFile,
8
8
  createTaskCore,
@@ -11,7 +11,7 @@ import {
11
11
  sessionScopeFilter,
12
12
  updateTaskStatus,
13
13
  writeNotification
14
- } from "./chunk-MDMYOY6A.js";
14
+ } from "./chunk-6PFVY2IQ.js";
15
15
  import {
16
16
  orgBus
17
17
  } from "./chunk-MP2AFCGL.js";
@@ -61,7 +61,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
61
61
  }
62
62
  if (unblockedRows.rows.length > 0 && !process.env.VITEST) {
63
63
  try {
64
- const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-VXHGONXH.js");
64
+ const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-MXKDKJCJ.js");
65
65
  const dispatched = /* @__PURE__ */ new Set();
66
66
  for (const ur of unblockedRows.rows) {
67
67
  const assignee = String(ur.assigned_to);
@@ -86,7 +86,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
86
86
  }
87
87
  } catch {
88
88
  try {
89
- const { queueIntercom } = await import("./intercom-queue-4B2S5UR5.js");
89
+ const { queueIntercom } = await import("./intercom-queue-ICTUFK7B.js");
90
90
  const dispatched = /* @__PURE__ */ new Set();
91
91
  for (const ur of unblockedRows.rows) {
92
92
  const assignee = String(ur.assigned_to);
@@ -289,7 +289,7 @@ async function updateTask(input) {
289
289
  try {
290
290
  process.stderr.write(`[tasks] EVENT: tmux delivery failed for reviewer="${reviewer}". Queueing for daemon delivery.
291
291
  `);
292
- const { queueIntercom } = await import("./intercom-queue-4B2S5UR5.js");
292
+ const { queueIntercom } = await import("./intercom-queue-ICTUFK7B.js");
293
293
  const { resolveExeSession } = await import("./lib/tmux-routing.js");
294
294
  const exeSession = row.session_scope ? String(row.session_scope) : resolveExeSession();
295
295
  if (exeSession) {
@@ -333,7 +333,7 @@ async function updateTask(input) {
333
333
  await markTaskNotificationsRead(taskFile);
334
334
  if (isCompletionReviewTransition && !isCoordinator && row.reviewer) {
335
335
  try {
336
- const { writeNotification: writeNotification2 } = await import("./notifications-O2GZIMSH.js");
336
+ const { writeNotification: writeNotification2 } = await import("./notifications-EASXB2JE.js");
337
337
  const reviewer = String(row.reviewer);
338
338
  await writeNotification2({
339
339
  agentId: reviewer,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-XFMHIDL4.js";
3
+ } from "./chunk-TADPFDZ4.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-7UMCQQWS.js";
5
5
  import {
6
6
  resolveAnthropicAuth
7
- } from "./chunk-4TXRUGPA.js";
7
+ } from "./chunk-VGMACSEV.js";
8
8
  import {
9
9
  vectorToBlob
10
- } from "./chunk-V4HBRYKM.js";
10
+ } from "./chunk-JE3LZC4F.js";
11
11
  import {
12
12
  extractKeywords,
13
13
  keywordsToString
@@ -160,7 +160,7 @@ async function consolidateCluster(cluster, model, agentRole) {
160
160
  const auth = resolveAnthropicAuth2();
161
161
  if (!auth) {
162
162
  throw new Error(
163
- "Could not resolve authentication method for consolidation model: set ANTHROPIC_API_KEY (API key) or ANTHROPIC_AUTH_TOKEN (Claude subscription/OAuth) in the daemon environment."
163
+ "Could not resolve authentication method for consolidation model: set API_ROUTER_URL + API_ROUTER_KEY (metered customer deployments), or ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN (BYOK/dev hosts) in the daemon environment."
164
164
  );
165
165
  }
166
166
  const Anthropic = (await import("@anthropic-ai/sdk")).default;
@@ -311,7 +311,7 @@ async function pushToWiki(consolidation, config) {
311
311
  async function runConsolidation(client, options) {
312
312
  if (!resolveAnthropicAuth2()) {
313
313
  throw new Error(
314
- "[consolidation] No Anthropic credentials resolvable (ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN). Consolidation/dreaming layer cannot run. Skipping run."
314
+ "[consolidation] No Anthropic/API-router credentials resolvable (API_ROUTER_URL/API_ROUTER_KEY, ANTHROPIC_API_KEY, or ANTHROPIC_AUTH_TOKEN). Consolidation/dreaming layer cannot run. Skipping run."
315
315
  );
316
316
  }
317
317
  const memories = await selectUnconsolidated(client);
@@ -381,7 +381,7 @@ async function runConsolidation(client, options) {
381
381
  }, { label: "consolidation" });
382
382
  if (attemptedSynthesis > 0 && clustersFailed >= attemptedSynthesis) {
383
383
  throw new Error(
384
- `[consolidation] All ${clustersFailed} synthesis cluster(s) failed \u2014 consolidation is non-functional. Check ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN and consolidationModel (${options.model}).`
384
+ `[consolidation] All ${clustersFailed} synthesis cluster(s) failed \u2014 consolidation is non-functional. Check API_ROUTER_URL/API_ROUTER_KEY, ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN, and consolidationModel (${options.model}).`
385
385
  );
386
386
  }
387
387
  return { clustersProcessed, memoriesConsolidated, clustersFailed };