@askexenow/exe-os 0.9.147 → 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 (208) hide show
  1. package/deploy/compose/.env.customer.example +1 -1
  2. package/deploy/compose/.env.default +1 -1
  3. package/deploy/compose/.env.example +1 -1
  4. package/deploy/compose/README.md +1 -1
  5. package/deploy/compose/docker-compose.yml +16 -14
  6. package/dist/{active-agent-NCZCDDZ2.js → active-agent-HDUT3T3I.js} +2 -2
  7. package/dist/{active-agent-KMQCNXXD.js → active-agent-XHERKXH6.js} +2 -2
  8. package/dist/{agentic-ontology-SQR74CO7.js → agentic-ontology-GMK3MB3U.js} +1 -1
  9. package/dist/{backfill-metadata-KMDWLDXU.js → backfill-metadata-7IANPCAL.js} +3 -3
  10. package/dist/{behaviors-4U2N5L4E.js → behaviors-JG75DNG3.js} +2 -2
  11. package/dist/bin/agentic-ontology-backfill.js +4 -4
  12. package/dist/bin/agentic-reflection-backfill.js +5 -5
  13. package/dist/bin/agentic-semantic-label.js +4 -4
  14. package/dist/bin/backfill-conversations.js +3 -3
  15. package/dist/bin/backfill-responses.js +3 -3
  16. package/dist/bin/backfill-vectors.js +4 -4
  17. package/dist/bin/bulk-sync-postgres.js +5 -5
  18. package/dist/bin/cleanup-stale-review-tasks.js +5 -5
  19. package/dist/bin/cli.js +12 -12
  20. package/dist/bin/exe-agent-config.js +1 -1
  21. package/dist/bin/exe-agent.js +3 -3
  22. package/dist/bin/exe-assign.js +4 -4
  23. package/dist/bin/exe-boot.js +12 -12
  24. package/dist/bin/exe-call.js +3 -3
  25. package/dist/bin/exe-cloud.js +3 -3
  26. package/dist/bin/exe-dispatch.js +5 -5
  27. package/dist/bin/exe-doctor.js +1 -1
  28. package/dist/bin/exe-export-behaviors.js +6 -6
  29. package/dist/bin/exe-forget.js +5 -5
  30. package/dist/bin/exe-gateway.js +5 -5
  31. package/dist/bin/exe-heartbeat.js +5 -5
  32. package/dist/bin/exe-kill.js +28 -6
  33. package/dist/bin/exe-launch-agent.js +9 -9
  34. package/dist/bin/exe-new-employee.js +5 -5
  35. package/dist/bin/exe-pending-messages.js +6 -6
  36. package/dist/bin/exe-pending-notifications.js +5 -5
  37. package/dist/bin/exe-pending-reviews.js +5 -5
  38. package/dist/bin/exe-rename.js +3 -3
  39. package/dist/bin/exe-review.js +7 -7
  40. package/dist/bin/exe-search.js +4 -4
  41. package/dist/bin/exe-session-cleanup.js +9 -9
  42. package/dist/bin/exe-settings.js +3 -3
  43. package/dist/bin/exe-start-codex.js +10 -10
  44. package/dist/bin/exe-start-opencode.js +7 -7
  45. package/dist/bin/exe-status.js +6 -6
  46. package/dist/bin/exe-team.js +2 -2
  47. package/dist/bin/git-sweep.js +5 -5
  48. package/dist/bin/graph-backfill.js +3 -3
  49. package/dist/bin/graph-export.js +4 -4
  50. package/dist/bin/install.js +5 -5
  51. package/dist/bin/intercom-check.js +4 -4
  52. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  53. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  54. package/dist/bin/scan-tasks.js +5 -5
  55. package/dist/bin/setup.js +1 -1
  56. package/dist/bin/shard-migrate.js +3 -3
  57. package/dist/bin/stack-update.js +22 -1
  58. package/dist/{capacity-monitor-Q5M5SVRC.js → capacity-monitor-J3SVO7LJ.js} +6 -6
  59. package/dist/{catchup-brief-IPNSW7RQ.js → catchup-brief-AIFZT456.js} +7 -7
  60. package/dist/{chunk-MKUVEDUE.js → chunk-26VUCVSE.js} +2 -2
  61. package/dist/{chunk-XK7VZFCC.js → chunk-3JR37K7C.js} +6 -6
  62. package/dist/{chunk-YPSN64BU.js → chunk-3VHX5XFJ.js} +1 -1
  63. package/dist/{chunk-DBXKWFTK.js → chunk-4K7HJL37.js} +3 -3
  64. package/dist/{chunk-4EINMZNO.js → chunk-4WIWYUU2.js} +2 -2
  65. package/dist/{chunk-ZUAXTH6Z.js → chunk-5NQKE3X4.js} +2 -2
  66. package/dist/{chunk-AERGE6GC.js → chunk-5NSTNICM.js} +1 -1
  67. package/dist/{chunk-Y6TS42WD.js → chunk-72XIEBYJ.js} +6 -6
  68. package/dist/chunk-7HONLLJ2.js +94 -0
  69. package/dist/{chunk-J4RAXKTC.js → chunk-7JTZNHA4.js} +3 -3
  70. package/dist/{chunk-LL5EY6OQ.js → chunk-BQ3KXWA7.js} +1 -1
  71. package/dist/{chunk-MBA4NNTS.js → chunk-BR5UVRA2.js} +1 -1
  72. package/dist/{chunk-4GLEFA2X.js → chunk-BV2JVO2U.js} +1 -1
  73. package/dist/{chunk-PMWDO5FR.js → chunk-CO2SF5SB.js} +1 -1
  74. package/dist/{chunk-LC53LVOT.js → chunk-CRS6YTBM.js} +2 -2
  75. package/dist/{chunk-FNMNKYVH.js → chunk-DJVXUJIR.js} +56 -56
  76. package/dist/{chunk-CGQ5PWS3.js → chunk-DMBFPZOP.js} +4 -4
  77. package/dist/{chunk-HHMHL4FB.js → chunk-DSKUPORS.js} +2 -2
  78. package/dist/{chunk-3FIWKONP.js → chunk-EEXG4ZJS.js} +10 -10
  79. package/dist/{chunk-ARGBV4PP.js → chunk-EOU4ZLRZ.js} +1 -1
  80. package/dist/{chunk-ONMRBKAX.js → chunk-EYTMNAU7.js} +34 -39
  81. package/dist/{chunk-B4HAUSVQ.js → chunk-FSH4VWSL.js} +2 -2
  82. package/dist/{chunk-TOXHEZN5.js → chunk-GIAAHYMW.js} +2 -2
  83. package/dist/{chunk-JH7Z2AZ7.js → chunk-GJMHN45Z.js} +1 -1
  84. package/dist/{chunk-VK2AWQ6D.js → chunk-GPHURFBS.js} +2 -2
  85. package/dist/{chunk-ZMJHXDZR.js → chunk-IGYF67K3.js} +3 -3
  86. package/dist/{chunk-VNTDQUOG.js → chunk-IT2JDL5L.js} +3 -3
  87. package/dist/{chunk-UPL5FEZY.js → chunk-JM4A2E5A.js} +1 -1
  88. package/dist/{chunk-UPMKSFBU.js → chunk-LBX2VQCC.js} +1 -1
  89. package/dist/{chunk-NJKERRSG.js → chunk-LJX5SV6L.js} +2 -2
  90. package/dist/{chunk-3MLGUSKS.js → chunk-LLDY5HPV.js} +1 -1
  91. package/dist/{chunk-DTLASDQM.js → chunk-LM7TQYLW.js} +1 -1
  92. package/dist/{chunk-TH6HTK2L.js → chunk-MBYJEE3B.js} +5 -1
  93. package/dist/{chunk-YOG7TWMO.js → chunk-MNIJA5BL.js} +1 -1
  94. package/dist/{chunk-AGFWOII2.js → chunk-O2Y4WJYW.js} +5 -5
  95. package/dist/{chunk-FG4Z2XFU.js → chunk-OEPEY47B.js} +1 -1
  96. package/dist/{chunk-2OATM2JZ.js → chunk-Q7GVSS2J.js} +1 -1
  97. package/dist/{chunk-LJML7HT2.js → chunk-RAMU6E5T.js} +1 -1
  98. package/dist/{chunk-26UVGP3I.js → chunk-SFV2XRPY.js} +1 -1
  99. package/dist/{chunk-EHNSK2Y4.js → chunk-TCKZYGC5.js} +1 -1
  100. package/dist/{chunk-NFHFNPTN.js → chunk-UHL4QL5E.js} +1 -1
  101. package/dist/{chunk-IFACD7E6.js → chunk-UPAEAL6K.js} +3 -3
  102. package/dist/{chunk-MKPSMRVX.js → chunk-WLSSSDAR.js} +1 -1
  103. package/dist/{chunk-JF3Q5YKI.js → chunk-WR45FP7O.js} +1 -1
  104. package/dist/{chunk-QB66MH2V.js → chunk-XEH3USTI.js} +1 -1
  105. package/dist/{chunk-VYVESELG.js → chunk-XQSGAG2G.js} +2 -2
  106. package/dist/{chunk-2BPO7VQF.js → chunk-Z43CJQ7T.js} +4 -4
  107. package/dist/{chunk-ZZLTJXKR.js → chunk-ZGKU4PMY.js} +2 -2
  108. package/dist/{crdt-sync-XMC6LT2Q.js → crdt-sync-3VQP2ISB.js} +1 -1
  109. package/dist/{crm-webhook-QMHD5YYQ.js → crm-webhook-AJYXEFZD.js} +2 -2
  110. package/dist/{cto-delegation-gate-BTZWAA4E.js → cto-delegation-gate-7OIN66NU.js} +4 -4
  111. package/dist/{daemon-orchestration-HFODCB52.js → daemon-orchestration-EHONVEHN.js} +7 -7
  112. package/dist/{exe-drift-SED6KQTZ.js → exe-drift-L5ZHO3CZ.js} +2 -2
  113. package/dist/{exe-export-ADSWDE5U.js → exe-export-IVFME5VN.js} +4 -4
  114. package/dist/{exe-import-WFLNGJZP.js → exe-import-O76AYBUE.js} +4 -4
  115. package/dist/{exe-key-4L32R46F.js → exe-key-6HV5GYHH.js} +1 -1
  116. package/dist/{fast-db-init-HVAVS35N.js → fast-db-init-NCOIEAM6.js} +1 -1
  117. package/dist/gateway/index.js +6 -6
  118. package/dist/{git-staleness-BY4ZK6MW.js → git-staleness-MSTOMG55.js} +1 -1
  119. package/dist/{git-task-sweep-RSRASAHB.js → git-task-sweep-NOXCELFQ.js} +5 -5
  120. package/dist/{global-procedures-EKYSVONR.js → global-procedures-FXWQ35RU.js} +2 -2
  121. package/dist/{graph-auto-extract-HWZ5GVXZ.js → graph-auto-extract-D4I7DF2S.js} +1 -1
  122. package/dist/hooks/bug-report-worker.js +6 -6
  123. package/dist/hooks/codex-stop-task-finalizer.js +6 -6
  124. package/dist/hooks/commit-complete.js +7 -7
  125. package/dist/hooks/error-recall.js +5 -5
  126. package/dist/hooks/exe-heartbeat-hook.js +2 -2
  127. package/dist/hooks/ingest.js +5 -5
  128. package/dist/hooks/instructions-loaded.js +3 -3
  129. package/dist/hooks/notification.js +3 -3
  130. package/dist/hooks/post-compact.js +6 -6
  131. package/dist/hooks/post-tool-combined.js +4 -4
  132. package/dist/hooks/pre-compact.js +7 -7
  133. package/dist/hooks/pre-tool-use.js +19 -10
  134. package/dist/hooks/prompt-submit.js +14 -14
  135. package/dist/hooks/session-end.js +11 -11
  136. package/dist/hooks/session-start.js +7 -7
  137. package/dist/hooks/stop.js +10 -10
  138. package/dist/hooks/subagent-stop.js +6 -6
  139. package/dist/hooks/summary-worker.js +10 -10
  140. package/dist/index.js +12 -12
  141. package/dist/{installer-X5FEYJIA.js → installer-5NAISFMT.js} +4 -4
  142. package/dist/{installer-RLKOACKG.js → installer-FTGXXYRA.js} +4 -4
  143. package/dist/{installer-W4NY3OBF.js → installer-Q4IWV2GB.js} +4 -4
  144. package/dist/lib/cloud-sync.js +3 -3
  145. package/dist/lib/consolidation.js +4 -4
  146. package/dist/lib/database.js +1 -1
  147. package/dist/lib/db.js +1 -1
  148. package/dist/lib/employee-templates.js +3 -3
  149. package/dist/lib/employees.js +1 -1
  150. package/dist/lib/exe-daemon.js +20 -20
  151. package/dist/lib/hybrid-search.js +4 -4
  152. package/dist/lib/identity.js +1 -1
  153. package/dist/lib/messaging.js +5 -5
  154. package/dist/lib/reminders.js +2 -2
  155. package/dist/lib/schedules.js +4 -4
  156. package/dist/lib/skill-learning.js +3 -3
  157. package/dist/lib/store.js +3 -3
  158. package/dist/lib/task-router.js +2 -2
  159. package/dist/lib/tasks.js +5 -5
  160. package/dist/lib/tmux-routing.js +4 -4
  161. package/dist/lib/token-spend.js +2 -2
  162. package/dist/mcp/register-tools.js +41 -41
  163. package/dist/mcp/server.js +42 -42
  164. package/dist/mcp/tools/complete-reminder.js +3 -3
  165. package/dist/mcp/tools/create-reminder.js +3 -3
  166. package/dist/mcp/tools/create-task.js +7 -7
  167. package/dist/mcp/tools/deactivate-behavior.js +4 -4
  168. package/dist/mcp/tools/list-reminders.js +3 -3
  169. package/dist/mcp/tools/list-tasks.js +7 -7
  170. package/dist/mcp/tools/send-message.js +7 -7
  171. package/dist/mcp/tools/update-task.js +6 -6
  172. package/dist/{mcp-http-config-6YLW4PFG.js → mcp-http-config-PSQCITKG.js} +2 -2
  173. package/dist/{memory-cards-UAQCO4QR.js → memory-cards-SYVGSLXW.js} +1 -1
  174. package/dist/{memory-poisoning-defense-VWITZ4WO.js → memory-poisoning-defense-T7AC4LZN.js} +1 -1
  175. package/dist/{memory-reflection-JQC4ZSUD.js → memory-reflection-FNJU7VFC.js} +1 -1
  176. package/dist/{notifications-YDOKTVCH.js → notifications-LD563XOM.js} +4 -4
  177. package/dist/{orchestrator-BZ2D6ZM6.js → orchestrator-WQGPXMLN.js} +6 -6
  178. package/dist/{plan-limits-KUTODKG6.js → plan-limits-IAUNTZUW.js} +2 -2
  179. package/dist/{projection-worker-UY7R2EQJ.js → projection-worker-S6LYSY22.js} +1 -1
  180. package/dist/{review-polling-DORNZ2KI.js → review-polling-J3R7MLT4.js} +5 -5
  181. package/dist/runtime/index.js +7 -7
  182. package/dist/{session-events-5WR5RVDK.js → session-events-XDDQ3M4A.js} +5 -5
  183. package/dist/{session-kill-telemetry-DHSQV2CI.js → session-kill-telemetry-TX5NCPUV.js} +2 -2
  184. package/dist/{session-scope-D4Q62ZOZ.js → session-scope-6MAGVHBA.js} +4 -4
  185. package/dist/{setup-wizard-QVNTI3T4.js → setup-wizard-WJ73A2FY.js} +1 -1
  186. package/dist/{task-enforcement-OYCQXBBC.js → task-enforcement-3RV64YVR.js} +4 -4
  187. package/dist/{task-scope-WWRNU2LU.js → task-scope-2T3WIQQY.js} +4 -4
  188. package/dist/{tasks-crud-75AUVZPO.js → tasks-crud-B2BGA44L.js} +4 -4
  189. package/dist/{tasks-review-UMZN5ZPQ.js → tasks-review-ZO3QDMT7.js} +4 -4
  190. package/dist/{token-budget-62TYDIMI.js → token-budget-LJC7HHKB.js} +1 -1
  191. package/dist/{tool-telemetry-JL6NY3KP.js → tool-telemetry-L3WQDRMH.js} +1 -1
  192. package/dist/tui/App.js +12 -12
  193. package/dist/{tui-data-C5I2YU4C.js → tui-data-UAPARPDX.js} +4 -4
  194. package/dist/{worker-gate-Q5Y6B5N7.js → worker-gate-TG6PR2S5.js} +1 -1
  195. package/dist/{workflow-engine-KAKVU7NC.js → workflow-engine-VIFLD5IV.js} +2 -2
  196. package/package.json +1 -1
  197. package/release-notes.json +114 -114
  198. package/dist/chunk-QHQJ7DLL.js +0 -153
  199. /package/dist/{chunk-7B5DQGXG.js → chunk-34XNU32S.js} +0 -0
  200. /package/dist/{chunk-ZBA74MMX.js → chunk-BF4W2VDS.js} +0 -0
  201. /package/dist/{chunk-524VLFFY.js → chunk-BRXDLJBU.js} +0 -0
  202. /package/dist/{chunk-TKEDF7KV.js → chunk-II3NQJGV.js} +0 -0
  203. /package/dist/{chunk-UJMDHPIN.js → chunk-OLVZBBVO.js} +0 -0
  204. /package/dist/{chunk-H6ADW3YC.js → chunk-OU7SLHNA.js} +0 -0
  205. /package/dist/{chunk-TSCZMB3P.js → chunk-PJCTBGWN.js} +0 -0
  206. /package/dist/{chunk-A3A2E42I.js → chunk-VN6UUZNO.js} +0 -0
  207. /package/dist/{core-memory-C3JLISAU.js → core-memory-MT7P34HU.js} +0 -0
  208. /package/dist/{wiki-acl-5EC5VNYG.js → wiki-acl-UE3CRAPQ.js} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  sessionScopeFilter,
12
12
  updateTaskStatus,
13
13
  writeNotification
14
- } from "./chunk-ONMRBKAX.js";
14
+ } from "./chunk-EYTMNAU7.js";
15
15
  import {
16
16
  getTransport
17
17
  } from "./chunk-3TXOH3SJ.js";
@@ -27,7 +27,7 @@ import {
27
27
  isCoordinatorName,
28
28
  isMultiInstance,
29
29
  shouldAutoInstance
30
- } from "./chunk-TH6HTK2L.js";
30
+ } from "./chunk-MBYJEE3B.js";
31
31
  import {
32
32
  EXE_AI_DIR
33
33
  } from "./chunk-TOWAZ5IV.js";
@@ -136,7 +136,7 @@ async function dispatchTaskToEmployee(input) {
136
136
  let crossProject = false;
137
137
  if (input.projectName) {
138
138
  try {
139
- const { assertSessionScope } = await import("./session-scope-D4Q62ZOZ.js");
139
+ const { assertSessionScope } = await import("./session-scope-6MAGVHBA.js");
140
140
  const check = assertSessionScope("dispatch_task", input.projectName);
141
141
  if (check.reason === "cross_session_denied") {
142
142
  crossProject = true;
@@ -250,7 +250,7 @@ async function updateTask(input) {
250
250
  if (input.status === "in_progress") {
251
251
  mkdirSync(cacheDir, { recursive: true });
252
252
  writeFileSync(cachePath, JSON.stringify({ taskId, title: String(row.title) }));
253
- } else if (input.status === "done" || input.status === "blocked" || input.status === "cancelled" || input.status === "closed") {
253
+ } else if (input.status === "needs_review" || input.status === "done" || input.status === "blocked" || input.status === "cancelled" || input.status === "closed") {
254
254
  try {
255
255
  unlinkSync(cachePath);
256
256
  } catch {
@@ -260,10 +260,10 @@ async function updateTask(input) {
260
260
  process.stderr.write(`[tasks] trajectory tagging failed: ${e instanceof Error ? e.message : String(e)}
261
261
  `);
262
262
  }
263
- if (input.status === "done" || input.status === "closed") {
263
+ if (input.status === "needs_review" || input.status === "done" || input.status === "closed") {
264
264
  await cleanupReviewFile(row, taskFile, input.baseDir);
265
265
  }
266
- if (input.status === "done" || input.status === "cancelled" || input.status === "closed") {
266
+ if (input.status === "needs_review" || input.status === "done" || input.status === "cancelled" || input.status === "closed") {
267
267
  try {
268
268
  const client = getClient();
269
269
  const taskTitle = String(row.title);
@@ -281,7 +281,7 @@ async function updateTask(input) {
281
281
  if (!isCoordinatorName(assignedAgent)) {
282
282
  try {
283
283
  const draftClient = getClient();
284
- if (input.status === "done" || input.status === "closed") {
284
+ if (input.status === "needs_review" || input.status === "done" || input.status === "closed") {
285
285
  await draftClient.execute({
286
286
  sql: `UPDATE memories SET draft = 0 WHERE agent_id = ? AND draft = 1`,
287
287
  args: [assignedAgent]
@@ -396,7 +396,7 @@ async function updateTask(input) {
396
396
  await markTaskNotificationsRead(taskFile);
397
397
  if (input.status === "needs_review" && !isCoordinator) {
398
398
  try {
399
- const { writeNotification: writeNotification2 } = await import("./notifications-YDOKTVCH.js");
399
+ const { writeNotification: writeNotification2 } = await import("./notifications-LD563XOM.js");
400
400
  await writeNotification2({
401
401
  agentId: String(row.assigned_to),
402
402
  agentRole: String(row.assigned_to),
@@ -410,7 +410,7 @@ async function updateTask(input) {
410
410
  `);
411
411
  }
412
412
  }
413
- if (input.status === "done" || input.status === "closed") {
413
+ if (input.status === "needs_review" || input.status === "done" || input.status === "closed") {
414
414
  try {
415
415
  await cascadeUnblock(taskId, input.baseDir, now);
416
416
  } catch (e) {
@@ -442,7 +442,7 @@ async function updateTask(input) {
442
442
  `);
443
443
  }
444
444
  }
445
- if ((input.status === "done" || input.status === "closed") && !isCoordinatorName(String(row.assigned_to)) && !process.env.VITEST) {
445
+ if ((input.status === "needs_review" || input.status === "done" || input.status === "closed") && !isCoordinatorName(String(row.assigned_to)) && !process.env.VITEST) {
446
446
  import("./lib/skill-learning.js").then(
447
447
  ({ captureAndLearn }) => captureAndLearn({
448
448
  taskId,
@@ -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/behaviors.ts
6
6
  import crypto from "crypto";
@@ -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,