@askexenow/exe-os 0.9.148 → 0.9.150

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 (203) hide show
  1. package/dist/{active-agent-NCZCDDZ2.js → active-agent-HDUT3T3I.js} +2 -2
  2. package/dist/{active-agent-KMQCNXXD.js → active-agent-XHERKXH6.js} +2 -2
  3. package/dist/{agentic-ontology-SQR74CO7.js → agentic-ontology-GMK3MB3U.js} +1 -1
  4. package/dist/{backfill-metadata-KMDWLDXU.js → backfill-metadata-7IANPCAL.js} +3 -3
  5. package/dist/{behaviors-4U2N5L4E.js → behaviors-JG75DNG3.js} +2 -2
  6. package/dist/bin/agentic-ontology-backfill.js +4 -4
  7. package/dist/bin/agentic-reflection-backfill.js +5 -5
  8. package/dist/bin/agentic-semantic-label.js +4 -4
  9. package/dist/bin/backfill-conversations.js +3 -3
  10. package/dist/bin/backfill-responses.js +3 -3
  11. package/dist/bin/backfill-vectors.js +4 -4
  12. package/dist/bin/bulk-sync-postgres.js +5 -5
  13. package/dist/bin/cleanup-stale-review-tasks.js +5 -5
  14. package/dist/bin/cli.js +12 -12
  15. package/dist/bin/exe-agent-config.js +1 -1
  16. package/dist/bin/exe-agent.js +3 -3
  17. package/dist/bin/exe-assign.js +4 -4
  18. package/dist/bin/exe-boot.js +12 -12
  19. package/dist/bin/exe-call.js +3 -3
  20. package/dist/bin/exe-cloud.js +3 -3
  21. package/dist/bin/exe-dispatch.js +5 -5
  22. package/dist/bin/exe-doctor.js +1 -1
  23. package/dist/bin/exe-export-behaviors.js +6 -6
  24. package/dist/bin/exe-forget.js +5 -5
  25. package/dist/bin/exe-gateway.js +5 -5
  26. package/dist/bin/exe-heartbeat.js +5 -5
  27. package/dist/bin/exe-kill.js +28 -6
  28. package/dist/bin/exe-launch-agent.js +9 -9
  29. package/dist/bin/exe-new-employee.js +5 -5
  30. package/dist/bin/exe-pending-messages.js +6 -6
  31. package/dist/bin/exe-pending-notifications.js +5 -5
  32. package/dist/bin/exe-pending-reviews.js +5 -5
  33. package/dist/bin/exe-rename.js +3 -3
  34. package/dist/bin/exe-review.js +7 -7
  35. package/dist/bin/exe-search.js +4 -4
  36. package/dist/bin/exe-session-cleanup.js +9 -9
  37. package/dist/bin/exe-settings.js +3 -3
  38. package/dist/bin/exe-start-codex.js +10 -10
  39. package/dist/bin/exe-start-opencode.js +7 -7
  40. package/dist/bin/exe-status.js +6 -6
  41. package/dist/bin/exe-team.js +2 -2
  42. package/dist/bin/git-sweep.js +5 -5
  43. package/dist/bin/graph-backfill.js +3 -3
  44. package/dist/bin/graph-export.js +4 -4
  45. package/dist/bin/install.js +5 -5
  46. package/dist/bin/intercom-check.js +4 -4
  47. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  48. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  49. package/dist/bin/scan-tasks.js +5 -5
  50. package/dist/bin/setup.js +1 -1
  51. package/dist/bin/shard-migrate.js +3 -3
  52. package/dist/bin/stack-update.js +21 -0
  53. package/dist/{capacity-monitor-Q5M5SVRC.js → capacity-monitor-J3SVO7LJ.js} +6 -6
  54. package/dist/{catchup-brief-IPNSW7RQ.js → catchup-brief-AIFZT456.js} +7 -7
  55. package/dist/{chunk-MKUVEDUE.js → chunk-26VUCVSE.js} +2 -2
  56. package/dist/{chunk-XK7VZFCC.js → chunk-3JR37K7C.js} +6 -6
  57. package/dist/{chunk-YPSN64BU.js → chunk-3VHX5XFJ.js} +1 -1
  58. package/dist/{chunk-DBXKWFTK.js → chunk-4K7HJL37.js} +3 -3
  59. package/dist/{chunk-4EINMZNO.js → chunk-4WIWYUU2.js} +2 -2
  60. package/dist/{chunk-ZUAXTH6Z.js → chunk-5NQKE3X4.js} +2 -2
  61. package/dist/{chunk-AERGE6GC.js → chunk-5NSTNICM.js} +1 -1
  62. package/dist/{chunk-Y6TS42WD.js → chunk-72XIEBYJ.js} +6 -6
  63. package/dist/chunk-7HONLLJ2.js +94 -0
  64. package/dist/{chunk-J4RAXKTC.js → chunk-7JTZNHA4.js} +3 -3
  65. package/dist/{chunk-LL5EY6OQ.js → chunk-BQ3KXWA7.js} +1 -1
  66. package/dist/{chunk-MBA4NNTS.js → chunk-BR5UVRA2.js} +1 -1
  67. package/dist/{chunk-4GLEFA2X.js → chunk-BV2JVO2U.js} +1 -1
  68. package/dist/{chunk-PMWDO5FR.js → chunk-CO2SF5SB.js} +1 -1
  69. package/dist/{chunk-LC53LVOT.js → chunk-CRS6YTBM.js} +2 -2
  70. package/dist/{chunk-FNMNKYVH.js → chunk-DJVXUJIR.js} +56 -56
  71. package/dist/{chunk-CGQ5PWS3.js → chunk-DMBFPZOP.js} +4 -4
  72. package/dist/{chunk-HHMHL4FB.js → chunk-DSKUPORS.js} +2 -2
  73. package/dist/{chunk-3FIWKONP.js → chunk-EEXG4ZJS.js} +10 -10
  74. package/dist/{chunk-ARGBV4PP.js → chunk-EOU4ZLRZ.js} +1 -1
  75. package/dist/{chunk-ONMRBKAX.js → chunk-EYTMNAU7.js} +34 -39
  76. package/dist/{chunk-B4HAUSVQ.js → chunk-FSH4VWSL.js} +2 -2
  77. package/dist/{chunk-TOXHEZN5.js → chunk-GIAAHYMW.js} +2 -2
  78. package/dist/{chunk-JH7Z2AZ7.js → chunk-GJMHN45Z.js} +1 -1
  79. package/dist/{chunk-VK2AWQ6D.js → chunk-GPHURFBS.js} +2 -2
  80. package/dist/{chunk-ZMJHXDZR.js → chunk-IGYF67K3.js} +3 -3
  81. package/dist/{chunk-VNTDQUOG.js → chunk-IT2JDL5L.js} +3 -3
  82. package/dist/{chunk-UPL5FEZY.js → chunk-JM4A2E5A.js} +1 -1
  83. package/dist/{chunk-UPMKSFBU.js → chunk-LBX2VQCC.js} +1 -1
  84. package/dist/{chunk-NJKERRSG.js → chunk-LJX5SV6L.js} +2 -2
  85. package/dist/{chunk-3MLGUSKS.js → chunk-LLDY5HPV.js} +1 -1
  86. package/dist/{chunk-DTLASDQM.js → chunk-LM7TQYLW.js} +1 -1
  87. package/dist/{chunk-TH6HTK2L.js → chunk-MBYJEE3B.js} +5 -1
  88. package/dist/{chunk-YOG7TWMO.js → chunk-MNIJA5BL.js} +1 -1
  89. package/dist/{chunk-AGFWOII2.js → chunk-O2Y4WJYW.js} +5 -5
  90. package/dist/{chunk-FG4Z2XFU.js → chunk-OEPEY47B.js} +1 -1
  91. package/dist/{chunk-2OATM2JZ.js → chunk-Q7GVSS2J.js} +1 -1
  92. package/dist/{chunk-LJML7HT2.js → chunk-RAMU6E5T.js} +1 -1
  93. package/dist/{chunk-26UVGP3I.js → chunk-SFV2XRPY.js} +1 -1
  94. package/dist/{chunk-EHNSK2Y4.js → chunk-TCKZYGC5.js} +1 -1
  95. package/dist/{chunk-NFHFNPTN.js → chunk-UHL4QL5E.js} +1 -1
  96. package/dist/{chunk-IFACD7E6.js → chunk-UPAEAL6K.js} +3 -3
  97. package/dist/{chunk-MKPSMRVX.js → chunk-WLSSSDAR.js} +1 -1
  98. package/dist/{chunk-JF3Q5YKI.js → chunk-WR45FP7O.js} +1 -1
  99. package/dist/{chunk-QB66MH2V.js → chunk-XEH3USTI.js} +1 -1
  100. package/dist/{chunk-VYVESELG.js → chunk-XQSGAG2G.js} +2 -2
  101. package/dist/{chunk-2BPO7VQF.js → chunk-Z43CJQ7T.js} +4 -4
  102. package/dist/{chunk-ZZLTJXKR.js → chunk-ZGKU4PMY.js} +2 -2
  103. package/dist/{crdt-sync-XMC6LT2Q.js → crdt-sync-3VQP2ISB.js} +1 -1
  104. package/dist/{crm-webhook-QMHD5YYQ.js → crm-webhook-AJYXEFZD.js} +2 -2
  105. package/dist/{cto-delegation-gate-BTZWAA4E.js → cto-delegation-gate-7OIN66NU.js} +4 -4
  106. package/dist/{daemon-orchestration-HFODCB52.js → daemon-orchestration-EHONVEHN.js} +7 -7
  107. package/dist/{exe-drift-SED6KQTZ.js → exe-drift-L5ZHO3CZ.js} +2 -2
  108. package/dist/{exe-export-ADSWDE5U.js → exe-export-IVFME5VN.js} +4 -4
  109. package/dist/{exe-import-WFLNGJZP.js → exe-import-O76AYBUE.js} +4 -4
  110. package/dist/{exe-key-4L32R46F.js → exe-key-6HV5GYHH.js} +1 -1
  111. package/dist/{fast-db-init-HVAVS35N.js → fast-db-init-NCOIEAM6.js} +1 -1
  112. package/dist/gateway/index.js +6 -6
  113. package/dist/{git-staleness-BY4ZK6MW.js → git-staleness-MSTOMG55.js} +1 -1
  114. package/dist/{git-task-sweep-RSRASAHB.js → git-task-sweep-NOXCELFQ.js} +5 -5
  115. package/dist/{global-procedures-EKYSVONR.js → global-procedures-FXWQ35RU.js} +2 -2
  116. package/dist/{graph-auto-extract-HWZ5GVXZ.js → graph-auto-extract-D4I7DF2S.js} +1 -1
  117. package/dist/hooks/bug-report-worker.js +6 -6
  118. package/dist/hooks/codex-stop-task-finalizer.js +6 -6
  119. package/dist/hooks/commit-complete.js +7 -7
  120. package/dist/hooks/error-recall.js +5 -5
  121. package/dist/hooks/exe-heartbeat-hook.js +2 -2
  122. package/dist/hooks/ingest.js +5 -5
  123. package/dist/hooks/instructions-loaded.js +3 -3
  124. package/dist/hooks/notification.js +3 -3
  125. package/dist/hooks/post-compact.js +6 -6
  126. package/dist/hooks/post-tool-combined.js +4 -4
  127. package/dist/hooks/pre-compact.js +7 -7
  128. package/dist/hooks/pre-tool-use.js +19 -10
  129. package/dist/hooks/prompt-submit.js +14 -14
  130. package/dist/hooks/session-end.js +11 -11
  131. package/dist/hooks/session-start.js +7 -7
  132. package/dist/hooks/stop.js +10 -10
  133. package/dist/hooks/subagent-stop.js +6 -6
  134. package/dist/hooks/summary-worker.js +10 -10
  135. package/dist/index.js +12 -12
  136. package/dist/{installer-X5FEYJIA.js → installer-5NAISFMT.js} +4 -4
  137. package/dist/{installer-RLKOACKG.js → installer-FTGXXYRA.js} +4 -4
  138. package/dist/{installer-W4NY3OBF.js → installer-Q4IWV2GB.js} +4 -4
  139. package/dist/lib/cloud-sync.js +3 -3
  140. package/dist/lib/consolidation.js +4 -4
  141. package/dist/lib/database.js +1 -1
  142. package/dist/lib/db.js +1 -1
  143. package/dist/lib/employee-templates.js +3 -3
  144. package/dist/lib/employees.js +1 -1
  145. package/dist/lib/exe-daemon.js +20 -20
  146. package/dist/lib/hybrid-search.js +4 -4
  147. package/dist/lib/identity.js +1 -1
  148. package/dist/lib/messaging.js +5 -5
  149. package/dist/lib/reminders.js +2 -2
  150. package/dist/lib/schedules.js +4 -4
  151. package/dist/lib/skill-learning.js +3 -3
  152. package/dist/lib/store.js +3 -3
  153. package/dist/lib/task-router.js +2 -2
  154. package/dist/lib/tasks.js +5 -5
  155. package/dist/lib/tmux-routing.js +4 -4
  156. package/dist/lib/token-spend.js +2 -2
  157. package/dist/mcp/register-tools.js +41 -41
  158. package/dist/mcp/server.js +42 -42
  159. package/dist/mcp/tools/complete-reminder.js +3 -3
  160. package/dist/mcp/tools/create-reminder.js +3 -3
  161. package/dist/mcp/tools/create-task.js +7 -7
  162. package/dist/mcp/tools/deactivate-behavior.js +4 -4
  163. package/dist/mcp/tools/list-reminders.js +3 -3
  164. package/dist/mcp/tools/list-tasks.js +7 -7
  165. package/dist/mcp/tools/send-message.js +7 -7
  166. package/dist/mcp/tools/update-task.js +6 -6
  167. package/dist/{mcp-http-config-6YLW4PFG.js → mcp-http-config-PSQCITKG.js} +2 -2
  168. package/dist/{memory-cards-UAQCO4QR.js → memory-cards-SYVGSLXW.js} +1 -1
  169. package/dist/{memory-poisoning-defense-VWITZ4WO.js → memory-poisoning-defense-T7AC4LZN.js} +1 -1
  170. package/dist/{memory-reflection-JQC4ZSUD.js → memory-reflection-FNJU7VFC.js} +1 -1
  171. package/dist/{notifications-YDOKTVCH.js → notifications-LD563XOM.js} +4 -4
  172. package/dist/{orchestrator-BZ2D6ZM6.js → orchestrator-WQGPXMLN.js} +6 -6
  173. package/dist/{plan-limits-KUTODKG6.js → plan-limits-IAUNTZUW.js} +2 -2
  174. package/dist/{projection-worker-UY7R2EQJ.js → projection-worker-S6LYSY22.js} +1 -1
  175. package/dist/{review-polling-DORNZ2KI.js → review-polling-J3R7MLT4.js} +5 -5
  176. package/dist/runtime/index.js +7 -7
  177. package/dist/{session-events-5WR5RVDK.js → session-events-XDDQ3M4A.js} +5 -5
  178. package/dist/{session-kill-telemetry-DHSQV2CI.js → session-kill-telemetry-TX5NCPUV.js} +2 -2
  179. package/dist/{session-scope-D4Q62ZOZ.js → session-scope-6MAGVHBA.js} +4 -4
  180. package/dist/{setup-wizard-QVNTI3T4.js → setup-wizard-WJ73A2FY.js} +1 -1
  181. package/dist/{task-enforcement-OYCQXBBC.js → task-enforcement-3RV64YVR.js} +4 -4
  182. package/dist/{task-scope-WWRNU2LU.js → task-scope-2T3WIQQY.js} +4 -4
  183. package/dist/{tasks-crud-75AUVZPO.js → tasks-crud-B2BGA44L.js} +4 -4
  184. package/dist/{tasks-review-UMZN5ZPQ.js → tasks-review-ZO3QDMT7.js} +4 -4
  185. package/dist/{token-budget-62TYDIMI.js → token-budget-LJC7HHKB.js} +1 -1
  186. package/dist/{tool-telemetry-JL6NY3KP.js → tool-telemetry-L3WQDRMH.js} +1 -1
  187. package/dist/tui/App.js +12 -12
  188. package/dist/{tui-data-C5I2YU4C.js → tui-data-UAPARPDX.js} +4 -4
  189. package/dist/{worker-gate-Q5Y6B5N7.js → worker-gate-TG6PR2S5.js} +1 -1
  190. package/dist/{workflow-engine-KAKVU7NC.js → workflow-engine-VIFLD5IV.js} +2 -2
  191. package/package.json +1 -1
  192. package/release-notes.json +177 -177
  193. package/dist/chunk-QHQJ7DLL.js +0 -153
  194. /package/dist/{chunk-7B5DQGXG.js → chunk-34XNU32S.js} +0 -0
  195. /package/dist/{chunk-ZBA74MMX.js → chunk-BF4W2VDS.js} +0 -0
  196. /package/dist/{chunk-524VLFFY.js → chunk-BRXDLJBU.js} +0 -0
  197. /package/dist/{chunk-TKEDF7KV.js → chunk-II3NQJGV.js} +0 -0
  198. /package/dist/{chunk-UJMDHPIN.js → chunk-OLVZBBVO.js} +0 -0
  199. /package/dist/{chunk-H6ADW3YC.js → chunk-OU7SLHNA.js} +0 -0
  200. /package/dist/{chunk-TSCZMB3P.js → chunk-PJCTBGWN.js} +0 -0
  201. /package/dist/{chunk-A3A2E42I.js → chunk-VN6UUZNO.js} +0 -0
  202. /package/dist/{core-memory-C3JLISAU.js → core-memory-MT7P34HU.js} +0 -0
  203. /package/dist/{wiki-acl-5EC5VNYG.js → wiki-acl-UE3CRAPQ.js} +0 -0
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  PlanLimitError,
32
32
  assertEmployeeLimitSync
33
- } from "./chunk-AERGE6GC.js";
33
+ } from "./chunk-5NSTNICM.js";
34
34
  import {
35
35
  getProjectName
36
36
  } from "./chunk-OPU3NYOO.js";
@@ -45,7 +45,7 @@ import {
45
45
  } from "./chunk-MP2AFCGL.js";
46
46
  import {
47
47
  ensureAgentSymlink
48
- } from "./chunk-DTLASDQM.js";
48
+ } from "./chunk-LM7TQYLW.js";
49
49
  import {
50
50
  expandDualPrefixTools
51
51
  } from "./chunk-HYZV25LY.js";
@@ -58,7 +58,7 @@ import {
58
58
  isCoordinatorName,
59
59
  loadEmployees,
60
60
  loadEmployeesSync
61
- } from "./chunk-TH6HTK2L.js";
61
+ } from "./chunk-MBYJEE3B.js";
62
62
  import {
63
63
  loadDeviceId
64
64
  } from "./chunk-NNT2ZNMC.js";
@@ -359,7 +359,7 @@ async function createTaskCore(input) {
359
359
  if (isCoordinatorSession) {
360
360
  earlySessionScope = resolved;
361
361
  } else {
362
- const { getSessionProject } = await import("./session-scope-D4Q62ZOZ.js");
362
+ const { getSessionProject } = await import("./session-scope-6MAGVHBA.js");
363
363
  const sessionProject = getSessionProject(resolved);
364
364
  if (sessionProject && sessionProject !== input.projectName) {
365
365
  scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
@@ -716,30 +716,12 @@ async function updateTaskStatus(input) {
716
716
  const taskFile = String(row.task_file);
717
717
  const requestedStatus = input.status;
718
718
  const previousStatus = String(row.status);
719
- const isReviewTransition = (input.status === "done" || input.status === "needs_review") && previousStatus !== "needs_review" && previousStatus !== "closed" && row.reviewer && !isCoordinatorName(String(row.assigned_to));
720
- if (isReviewTransition) {
719
+ if (input.status === "done") {
721
720
  input.status = "needs_review";
721
+ }
722
+ const isReviewTransition = input.status === "needs_review" && previousStatus !== "needs_review" && previousStatus !== "closed";
723
+ if (isReviewTransition && row.reviewer) {
722
724
  const reviewer = String(row.reviewer);
723
- try {
724
- const { mkdirSync: mkdirSync3, writeFileSync: writeFileSync2 } = await import("fs");
725
- const { join } = await import("path");
726
- const { homedir } = await import("os");
727
- const signalDir = join(homedir(), ".exe-os", "task-signals");
728
- mkdirSync3(signalDir, { recursive: true });
729
- const signalPath = join(signalDir, `${reviewer}.review-pending`);
730
- writeFileSync2(signalPath, JSON.stringify({
731
- task_id: taskId,
732
- title: String(row.title),
733
- assigned_to: String(row.assigned_to),
734
- reviewer,
735
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
736
- }));
737
- process.stderr.write(
738
- `[tasks-crud] Review signal written for ${reviewer}: "${String(row.title)}"
739
- `
740
- );
741
- } catch {
742
- }
743
725
  try {
744
726
  const { sendIntercom: sendIntercom2, employeeSessionName: employeeSessionName2, resolveExeSession: resolveExeSession2, isExeSession: isExeSession2 } = await import("./lib/tmux-routing.js");
745
727
  const exeSession = resolveExeSession2();
@@ -747,21 +729,34 @@ async function updateTaskStatus(input) {
747
729
  if (isCoordinatorName(reviewer)) {
748
730
  if (isExeSession2(exeSession)) {
749
731
  sendIntercom2(exeSession, { force: true });
732
+ process.stderr.write(
733
+ `[tasks-crud] Review intercom sent to ${exeSession}: "${String(row.title)}" by ${String(row.assigned_to)}
734
+ `
735
+ );
750
736
  }
751
737
  } else {
752
738
  const reviewerSession = employeeSessionName2(reviewer, exeSession);
753
739
  sendIntercom2(reviewerSession, { force: true });
740
+ process.stderr.write(
741
+ `[tasks-crud] Review intercom sent to ${reviewerSession}: "${String(row.title)}" by ${String(row.assigned_to)}
742
+ `
743
+ );
754
744
  }
755
745
  }
756
- } catch {
746
+ } catch (err) {
747
+ process.stderr.write(
748
+ `[tasks-crud] Review intercom failed for ${reviewer}: ${err instanceof Error ? err.message : String(err)}
749
+ `
750
+ );
757
751
  }
758
752
  }
759
753
  const VALID_TRANSITIONS = {
760
- open: ["in_progress", "done", "needs_review", "cancelled", "blocked"],
761
- in_progress: ["in_progress", "open", "done", "needs_review", "blocked", "cancelled"],
762
- done: ["needs_review", "closed"],
754
+ open: ["in_progress", "needs_review", "cancelled", "blocked"],
755
+ in_progress: ["in_progress", "open", "needs_review", "blocked", "cancelled"],
763
756
  blocked: ["open", "in_progress", "cancelled"],
764
- needs_review: ["done", "closed", "in_progress", "open"],
757
+ needs_review: ["closed", "in_progress", "open"],
758
+ closed: [],
759
+ // terminal — no transitions out
765
760
  cancelled: ["open"]
766
761
  // allow re-opening cancelled tasks
767
762
  };
@@ -1309,7 +1304,7 @@ async function cleanupOrphanedReviews(sessionScope) {
1309
1304
  });
1310
1305
  const staleThreshold = new Date(Date.now() - 60 * 60 * 1e3).toISOString();
1311
1306
  const r2 = await client.execute({
1312
- sql: `UPDATE tasks SET status = 'done', updated_at = ?
1307
+ sql: `UPDATE tasks SET status = 'closed', updated_at = ?
1313
1308
  WHERE status = 'needs_review'
1314
1309
  AND result IS NOT NULL
1315
1310
  AND updated_at < ?
@@ -1387,7 +1382,7 @@ async function createReviewForCompletedTask(row, result, _baseDir, now) {
1387
1382
  const rawReviewer = row.reviewer || row.assigned_by;
1388
1383
  const reviewer = rawReviewer ? String(rawReviewer) : coordinatorName;
1389
1384
  const currentStatus = String(row.status ?? "");
1390
- if (currentStatus === "done") return;
1385
+ if (currentStatus === "closed") return;
1391
1386
  const existingResult = String(row.result ?? "");
1392
1387
  if (existingResult.includes("## Review notes")) return;
1393
1388
  let reviewerRole = "unknown";
@@ -1463,10 +1458,10 @@ async function createReviewForCompletedTask(row, result, _baseDir, now) {
1463
1458
  `
1464
1459
  );
1465
1460
  try {
1466
- await updateTaskStatus({ taskId: originalTaskId, status: "done", skipReviewCreation: true });
1461
+ await updateTaskStatus({ taskId: originalTaskId, status: "closed", skipReviewCreation: true });
1467
1462
  } catch {
1468
1463
  await client.execute({
1469
- sql: "UPDATE tasks SET status = 'done', updated_at = ? WHERE id = ?",
1464
+ sql: "UPDATE tasks SET status = 'closed', updated_at = ? WHERE id = ?",
1470
1465
  args: [now, originalTaskId]
1471
1466
  });
1472
1467
  }
@@ -1481,11 +1476,11 @@ async function cleanupReviewFile(row, taskFile, _baseDir) {
1481
1476
  if (parentId) {
1482
1477
  let cascaded = false;
1483
1478
  try {
1484
- await updateTaskStatus({ taskId: parentId, status: "done", skipReviewCreation: true });
1479
+ await updateTaskStatus({ taskId: parentId, status: "closed", skipReviewCreation: true });
1485
1480
  cascaded = true;
1486
1481
  } catch {
1487
1482
  const result = await client.execute({
1488
- sql: "UPDATE tasks SET status = 'done', updated_at = ? WHERE id = ? AND status = 'needs_review'",
1483
+ sql: "UPDATE tasks SET status = 'closed', updated_at = ? WHERE id = ? AND status = 'needs_review'",
1489
1484
  args: [now, parentId]
1490
1485
  });
1491
1486
  cascaded = result.rowsAffected > 0;
@@ -1506,7 +1501,7 @@ async function cleanupReviewFile(row, taskFile, _baseDir) {
1506
1501
  const legacyTaskFile = `exe/${agent}/${slug}.md`;
1507
1502
  const legacyScope = sessionScopeFilter();
1508
1503
  const result = await client.execute({
1509
- sql: `UPDATE tasks SET status = 'done', updated_at = ? WHERE (task_file = ? OR task_file LIKE ?) AND status = 'needs_review'${legacyScope.sql}`,
1504
+ sql: `UPDATE tasks SET status = 'closed', updated_at = ? WHERE (task_file = ? OR task_file LIKE ?) AND status = 'needs_review'${legacyScope.sql}`,
1510
1505
  args: [now, legacyTaskFile, `tasks/%/${agent}/${slug}.md`, ...legacyScope.args]
1511
1506
  });
1512
1507
  if (result.rowsAffected > 0) {
@@ -1947,7 +1942,7 @@ async function verifyPaneAtCapacity(sessionName) {
1947
1942
  reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
1948
1943
  };
1949
1944
  }
1950
- const { isAtCapacity } = await import("./capacity-monitor-Q5M5SVRC.js");
1945
+ const { isAtCapacity } = await import("./capacity-monitor-J3SVO7LJ.js");
1951
1946
  if (!isAtCapacity(pane)) {
1952
1947
  return {
1953
1948
  atCapacity: false,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionScopeFilter
3
- } from "./chunk-ONMRBKAX.js";
3
+ } from "./chunk-EYTMNAU7.js";
4
4
 
5
5
  // src/lib/git-task-sweep.ts
6
6
  import { execSync } from "child_process";
@@ -178,7 +178,7 @@ async function sweepTasks(projectName, options = {}) {
178
178
  }
179
179
  if (!dryRun) {
180
180
  try {
181
- const { updateTaskStatus } = await import("./tasks-crud-75AUVZPO.js");
181
+ const { updateTaskStatus } = await import("./tasks-crud-B2BGA44L.js");
182
182
  await updateTaskStatus({
183
183
  taskId: task.id,
184
184
  status: "needs_review",
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GNHN5HRQ.js";
4
4
  import {
5
5
  buildClaudeHttpMcpEntry
6
- } from "./chunk-EHNSK2Y4.js";
6
+ } from "./chunk-TCKZYGC5.js";
7
7
  import {
8
8
  EXE_HOOKS,
9
9
  isLegacyHomeDirHookCommand,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-L3TB7CC3.js";
12
12
  import {
13
13
  ensureAllAgentSymlinks
14
- } from "./chunk-DTLASDQM.js";
14
+ } from "./chunk-LM7TQYLW.js";
15
15
  import {
16
16
  MCP_LEGACY_KEY,
17
17
  MCP_PRIMARY_KEY
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listReminders
3
- } from "./chunk-2OATM2JZ.js";
3
+ } from "./chunk-Q7GVSS2J.js";
4
4
 
5
5
  // src/mcp/tools/list-reminders.ts
6
6
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  sendMessage
3
- } from "./chunk-LC53LVOT.js";
3
+ } from "./chunk-CRS6YTBM.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-NFHFNPTN.js";
6
+ } from "./chunk-UHL4QL5E.js";
7
7
 
8
8
  // src/mcp/tools/send-message.ts
9
9
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  fastDbInit
3
- } from "./chunk-7B5DQGXG.js";
3
+ } from "./chunk-34XNU32S.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-ONMRBKAX.js";
6
+ } from "./chunk-EYTMNAU7.js";
7
7
  import {
8
8
  formatStatusAll,
9
9
  formatStatusDeep,
@@ -14,7 +14,7 @@ import {
14
14
  getClient,
15
15
  isCoordinatorRole,
16
16
  loadEmployees
17
- } from "./chunk-TH6HTK2L.js";
17
+ } from "./chunk-MBYJEE3B.js";
18
18
  import {
19
19
  isMainModule
20
20
  } from "./chunk-6Y4B3QF6.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isCrdtSyncEnabled
3
- } from "./chunk-A3A2E42I.js";
3
+ } from "./chunk-VN6UUZNO.js";
4
4
  import {
5
5
  decryptSyncBlob,
6
6
  encryptSyncBlob,
@@ -12,7 +12,7 @@ import {
12
12
  loadEmployees,
13
13
  registerBinSymlinks,
14
14
  saveEmployees
15
- } from "./chunk-TH6HTK2L.js";
15
+ } from "./chunk-MBYJEE3B.js";
16
16
  import {
17
17
  loadDeviceId
18
18
  } from "./chunk-NNT2ZNMC.js";
@@ -482,7 +482,7 @@ async function cloudSync(config) {
482
482
  let pulled = 0;
483
483
  if (pullResult.records.length > 0) {
484
484
  if (isCrdtSyncEnabled()) {
485
- const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-XMC6LT2Q.js");
485
+ const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-3VQP2ISB.js");
486
486
  initCrdtDoc();
487
487
  importExistingMemories(
488
488
  pullResult.records.map((rec) => ({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-ZBA74MMX.js";
3
+ } from "./chunk-BF4W2VDS.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-XWQKCCCO.js";
5
5
  import {
6
6
  getClient
7
- } from "./chunk-TH6HTK2L.js";
7
+ } from "./chunk-MBYJEE3B.js";
8
8
 
9
9
  // src/lib/global-procedures.ts
10
10
  import { randomUUID } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createCRMWebhookHandler,
6
6
  parseTwentyWebhook
7
- } from "./chunk-UPL5FEZY.js";
7
+ } from "./chunk-JM4A2E5A.js";
8
8
  import {
9
9
  WhatsAppAdapter
10
10
  } from "./chunk-ECSNSHZ7.js";
@@ -42,7 +42,7 @@ import {
42
42
  retryWithBackoff,
43
43
  routeMessage,
44
44
  validateGatewayConfig
45
- } from "./chunk-HHMHL4FB.js";
45
+ } from "./chunk-DSKUPORS.js";
46
46
  import {
47
47
  OllamaProvider
48
48
  } from "./chunk-FWFFZGSC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getGlobalProceduresBlock
3
- } from "./chunk-UPMKSFBU.js";
3
+ } from "./chunk-LBX2VQCC.js";
4
4
 
5
5
  // src/lib/employee-templates.ts
6
6
  var BASE_OPERATING_PROCEDURES = `
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadEmployees
3
- } from "./chunk-TH6HTK2L.js";
3
+ } from "./chunk-MBYJEE3B.js";
4
4
 
5
5
  // src/lib/agent-symlinks.ts
6
6
  import os from "os";
@@ -1576,7 +1576,11 @@ async function ensureSchema() {
1576
1576
  }
1577
1577
  try {
1578
1578
  await client.execute({
1579
- sql: `UPDATE tasks SET status = 'done' WHERE status = 'completed'`,
1579
+ sql: `UPDATE tasks SET status = 'closed' WHERE status IN ('completed', 'done') AND result IS NOT NULL`,
1580
+ args: []
1581
+ });
1582
+ await client.execute({
1583
+ sql: `UPDATE tasks SET status = 'needs_review' WHERE status IN ('completed', 'done') AND result IS NULL`,
1580
1584
  args: []
1581
1585
  });
1582
1586
  } catch (e) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clean,
3
3
  stableId
4
- } from "./chunk-H6ADW3YC.js";
4
+ } from "./chunk-OU7SLHNA.js";
5
5
 
6
6
  // src/lib/reflection-checkpoints.ts
7
7
  function parsePayload(payload) {
@@ -3,10 +3,10 @@ import {
3
3
  buildRawVisibilityFilter,
4
4
  buildWikiScopeFilter,
5
5
  searchMemories
6
- } from "./chunk-Y6TS42WD.js";
6
+ } from "./chunk-72XIEBYJ.js";
7
7
  import {
8
8
  getClient
9
- } from "./chunk-TH6HTK2L.js";
9
+ } from "./chunk-MBYJEE3B.js";
10
10
 
11
11
  // src/lib/hybrid-search.ts
12
12
  var RRF_K = 60;
@@ -118,7 +118,7 @@ async function hybridSearch(queryText, agentId, options) {
118
118
  queryVector ? searchMemories(queryVector, agentId, fetchOptions) : Promise.resolve([]),
119
119
  includeStructuredCards ? (async () => {
120
120
  try {
121
- const { searchMemoryCards } = await import("./memory-cards-UAQCO4QR.js");
121
+ const { searchMemoryCards } = await import("./memory-cards-SYVGSLXW.js");
122
122
  return await searchMemoryCards(effectiveQuery, agentId, fetchOptions);
123
123
  } catch {
124
124
  return [];
@@ -127,7 +127,7 @@ async function hybridSearch(queryText, agentId, options) {
127
127
  // Reflection insights: patterns, contradictions, summaries across sessions
128
128
  includeStructuredCards ? (async () => {
129
129
  try {
130
- const { searchReflections } = await import("./memory-reflection-JQC4ZSUD.js");
130
+ const { searchReflections } = await import("./memory-reflection-FNJU7VFC.js");
131
131
  const insights = await searchReflections(effectiveQuery, agentId, 5);
132
132
  return insights.map((ins) => ({
133
133
  id: ins.id,
@@ -394,7 +394,7 @@ async function lightweightSearch(queryText, agentId, options) {
394
394
  }
395
395
  if (options?.includeStructuredCards !== true) return results;
396
396
  try {
397
- const { searchMemoryCards } = await import("./memory-cards-UAQCO4QR.js");
397
+ const { searchMemoryCards } = await import("./memory-cards-SYVGSLXW.js");
398
398
  const cardResults = await searchMemoryCards(queryText, agentId, options);
399
399
  if (cardResults.length > 0) {
400
400
  return rrfMergeMulti([results, cardResults], limit, RRF_K, [1, 0.85]);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  completeReminder
3
- } from "./chunk-2OATM2JZ.js";
3
+ } from "./chunk-Q7GVSS2J.js";
4
4
 
5
5
  // src/mcp/tools/complete-reminder.ts
6
6
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-TH6HTK2L.js";
3
+ } from "./chunk-MBYJEE3B.js";
4
4
 
5
5
  // src/lib/reminders.ts
6
6
  import crypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isCoordinatorRole
3
- } from "./chunk-TH6HTK2L.js";
3
+ } from "./chunk-MBYJEE3B.js";
4
4
 
5
5
  // src/lib/task-router.ts
6
6
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createReminder
3
- } from "./chunk-2OATM2JZ.js";
3
+ } from "./chunk-Q7GVSS2J.js";
4
4
 
5
5
  // src/mcp/tools/create-reminder.ts
6
6
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadEmployeesSync
3
- } from "./chunk-TH6HTK2L.js";
3
+ } from "./chunk-MBYJEE3B.js";
4
4
 
5
5
  // src/adapters/mcp-http-config.ts
6
6
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -9,7 +9,7 @@ import {
9
9
  getCoordinatorEmployee,
10
10
  getEmployee,
11
11
  loadEmployeesSync
12
- } from "./chunk-TH6HTK2L.js";
12
+ } from "./chunk-MBYJEE3B.js";
13
13
  import {
14
14
  EXE_AI_DIR
15
15
  } from "./chunk-TOWAZ5IV.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  deactivateBehavior
3
- } from "./chunk-ARGBV4PP.js";
3
+ } from "./chunk-EOU4ZLRZ.js";
4
4
  import {
5
5
  getActiveAgent
6
- } from "./chunk-NFHFNPTN.js";
6
+ } from "./chunk-UHL4QL5E.js";
7
7
  import {
8
8
  canCoordinate,
9
9
  getClient
10
- } from "./chunk-TH6HTK2L.js";
10
+ } from "./chunk-MBYJEE3B.js";
11
11
 
12
12
  // src/mcp/tools/deactivate-behavior.ts
13
13
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-TH6HTK2L.js";
3
+ } from "./chunk-MBYJEE3B.js";
4
4
 
5
5
  // src/lib/token-spend.ts
6
6
  import { readdir } from "fs/promises";
@@ -6,7 +6,7 @@ import {
6
6
  getIdentity,
7
7
  listIdentities,
8
8
  updateIdentity
9
- } from "./chunk-TH6HTK2L.js";
9
+ } from "./chunk-MBYJEE3B.js";
10
10
  import {
11
11
  atomicWriteJsonSync
12
12
  } from "./chunk-LYH5HE24.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCurrentSessionScope,
3
3
  strictSessionScopeFilter
4
- } from "./chunk-ONMRBKAX.js";
4
+ } from "./chunk-EYTMNAU7.js";
5
5
  import {
6
6
  getProjectName
7
7
  } from "./chunk-OPU3NYOO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getActiveAgent
3
- } from "./chunk-NFHFNPTN.js";
3
+ } from "./chunk-UHL4QL5E.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-ONMRBKAX.js";
6
+ } from "./chunk-EYTMNAU7.js";
7
7
  import {
8
8
  getProjectName
9
9
  } from "./chunk-OPU3NYOO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  recordSessionKill
3
- } from "./chunk-PMWDO5FR.js";
3
+ } from "./chunk-CO2SF5SB.js";
4
4
  import {
5
5
  updateTask
6
- } from "./chunk-3FIWKONP.js";
6
+ } from "./chunk-EEXG4ZJS.js";
7
7
  import {
8
8
  ensureEmployee,
9
9
  extractRootExe,
@@ -14,7 +14,7 @@ import {
14
14
  sessionScopeFilter,
15
15
  strictSessionScopeFilter,
16
16
  writeNotification
17
- } from "./chunk-ONMRBKAX.js";
17
+ } from "./chunk-EYTMNAU7.js";
18
18
  import {
19
19
  queueIntercom
20
20
  } from "./chunk-TXSJ2L5O.js";
@@ -32,7 +32,7 @@ import {
32
32
  baseAgentName,
33
33
  isCoordinatorName,
34
34
  shouldAutoInstance
35
- } from "./chunk-TH6HTK2L.js";
35
+ } from "./chunk-MBYJEE3B.js";
36
36
  import {
37
37
  loadConfigSync
38
38
  } from "./chunk-TOWAZ5IV.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  storeBehavior
3
- } from "./chunk-ARGBV4PP.js";
3
+ } from "./chunk-EOU4ZLRZ.js";
4
4
  import {
5
5
  getClient
6
- } from "./chunk-TH6HTK2L.js";
6
+ } from "./chunk-MBYJEE3B.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-TOWAZ5IV.js";
@@ -13,7 +13,7 @@ import {
13
13
  readAllBehaviors,
14
14
  readAllMemories,
15
15
  rebuildFromDb
16
- } from "./chunk-A3A2E42I.js";
16
+ } from "./chunk-VN6UUZNO.js";
17
17
  import "./chunk-MLKGABMK.js";
18
18
  export {
19
19
  _setStatePath,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createCRMWebhookHandler,
3
3
  parseTwentyWebhook
4
- } from "./chunk-UPL5FEZY.js";
5
- import "./chunk-ZBA74MMX.js";
4
+ } from "./chunk-JM4A2E5A.js";
5
+ import "./chunk-BF4W2VDS.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
  export {
8
8
  createCRMWebhookHandler,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionScopeFilter
3
- } from "./chunk-ONMRBKAX.js";
3
+ } from "./chunk-EYTMNAU7.js";
4
4
  import "./chunk-LOQCOHEW.js";
5
5
  import "./chunk-TXSJ2L5O.js";
6
6
  import "./chunk-64WZEXXA.js";
@@ -10,18 +10,18 @@ import "./chunk-GZIAQYGI.js";
10
10
  import "./chunk-ZQX6UOP6.js";
11
11
  import "./chunk-KIUU4PNX.js";
12
12
  import "./chunk-NGP6LSV2.js";
13
- import "./chunk-AERGE6GC.js";
13
+ import "./chunk-5NSTNICM.js";
14
14
  import "./chunk-OPU3NYOO.js";
15
15
  import "./chunk-CVYC6DUW.js";
16
16
  import "./chunk-GJV3WDWM.js";
17
17
  import "./chunk-MP2AFCGL.js";
18
- import "./chunk-DTLASDQM.js";
18
+ import "./chunk-LM7TQYLW.js";
19
19
  import "./chunk-HYZV25LY.js";
20
20
  import {
21
21
  getClient,
22
22
  getEmployeeByRole,
23
23
  loadEmployeesSync
24
- } from "./chunk-TH6HTK2L.js";
24
+ } from "./chunk-MBYJEE3B.js";
25
25
  import "./chunk-EOO32RJZ.js";
26
26
  import "./chunk-FXU7JOXK.js";
27
27
  import "./chunk-NNT2ZNMC.js";
@@ -38,10 +38,10 @@ import {
38
38
  shouldKillIdleSession,
39
39
  shouldKillSession,
40
40
  shouldNudgeEmployee
41
- } from "./chunk-2BPO7VQF.js";
42
- import "./chunk-PMWDO5FR.js";
43
- import "./chunk-3FIWKONP.js";
44
- import "./chunk-ONMRBKAX.js";
41
+ } from "./chunk-Z43CJQ7T.js";
42
+ import "./chunk-CO2SF5SB.js";
43
+ import "./chunk-EEXG4ZJS.js";
44
+ import "./chunk-EYTMNAU7.js";
45
45
  import "./chunk-LOQCOHEW.js";
46
46
  import "./chunk-TXSJ2L5O.js";
47
47
  import "./chunk-64WZEXXA.js";
@@ -51,14 +51,14 @@ import "./chunk-GZIAQYGI.js";
51
51
  import "./chunk-ZQX6UOP6.js";
52
52
  import "./chunk-KIUU4PNX.js";
53
53
  import "./chunk-NGP6LSV2.js";
54
- import "./chunk-AERGE6GC.js";
54
+ import "./chunk-5NSTNICM.js";
55
55
  import "./chunk-OPU3NYOO.js";
56
56
  import "./chunk-CVYC6DUW.js";
57
57
  import "./chunk-GJV3WDWM.js";
58
58
  import "./chunk-MP2AFCGL.js";
59
- import "./chunk-DTLASDQM.js";
59
+ import "./chunk-LM7TQYLW.js";
60
60
  import "./chunk-HYZV25LY.js";
61
- import "./chunk-TH6HTK2L.js";
61
+ import "./chunk-MBYJEE3B.js";
62
62
  import "./chunk-EOO32RJZ.js";
63
63
  import "./chunk-FXU7JOXK.js";
64
64
  import "./chunk-NNT2ZNMC.js";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDriftProbes
4
- } from "./chunk-4GLEFA2X.js";
5
- import "./chunk-TH6HTK2L.js";
4
+ } from "./chunk-BV2JVO2U.js";
5
+ import "./chunk-MBYJEE3B.js";
6
6
  import "./chunk-EOO32RJZ.js";
7
7
  import "./chunk-FXU7JOXK.js";
8
8
  import "./chunk-TOWAZ5IV.js";