@askexenow/exe-os 0.9.166 → 0.9.167

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 (244) hide show
  1. package/deploy/compose/backup.sh +45 -7
  2. package/deploy/compose/setup.sh +7 -0
  3. package/deploy/stack-manifests/v0.9.json +40 -1
  4. package/dist/{active-agent-R2KMWMR6.js → active-agent-DGTIJN2U.js} +2 -2
  5. package/dist/{active-agent-CYMM3QQA.js → active-agent-HVMLG6FH.js} +2 -2
  6. package/dist/{agentic-ontology-GKAKYNPE.js → agentic-ontology-S54AFODT.js} +1 -1
  7. package/dist/{backfill-metadata-Z5SYUWAV.js → backfill-metadata-74IWETRF.js} +4 -3
  8. package/dist/{behaviors-QGU6XI5R.js → behaviors-LZVAVHTC.js} +2 -2
  9. package/dist/bin/agentic-ontology-backfill.js +5 -4
  10. package/dist/bin/agentic-reflection-backfill.js +6 -5
  11. package/dist/bin/agentic-semantic-label.js +5 -4
  12. package/dist/bin/backfill-conversations.js +5 -4
  13. package/dist/bin/backfill-responses.js +5 -4
  14. package/dist/bin/backfill-vectors.js +6 -5
  15. package/dist/bin/bulk-sync-postgres.js +6 -5
  16. package/dist/bin/cleanup-stale-review-tasks.js +9 -9
  17. package/dist/bin/cli.js +16 -13
  18. package/dist/bin/daily-summary.js +0 -217
  19. package/dist/bin/deferred-daemon-restart.js +8 -0
  20. package/dist/bin/exe-agent-config.js +1 -1
  21. package/dist/bin/exe-agent.js +10 -10
  22. package/dist/bin/exe-assign.js +7 -6
  23. package/dist/bin/exe-boot.js +20 -19
  24. package/dist/bin/exe-call.js +4 -4
  25. package/dist/bin/exe-cloud.js +3 -3
  26. package/dist/bin/exe-dispatch.js +9 -9
  27. package/dist/bin/exe-doctor.js +1 -1
  28. package/dist/bin/exe-export-behaviors.js +7 -6
  29. package/dist/bin/exe-forget.js +6 -5
  30. package/dist/bin/exe-gateway.js +5 -5
  31. package/dist/bin/exe-heartbeat.js +9 -9
  32. package/dist/bin/exe-kill.js +13 -12
  33. package/dist/bin/exe-launch-agent.js +11 -10
  34. package/dist/bin/exe-new-employee.js +6 -6
  35. package/dist/bin/exe-pending-messages.js +10 -10
  36. package/dist/bin/exe-pending-notifications.js +9 -9
  37. package/dist/bin/exe-pending-reviews.js +9 -9
  38. package/dist/bin/exe-rename.js +4 -4
  39. package/dist/bin/exe-review.js +12 -11
  40. package/dist/bin/exe-search.js +5 -4
  41. package/dist/bin/exe-session-cleanup.js +19 -14
  42. package/dist/bin/exe-settings.js +3 -3
  43. package/dist/bin/exe-start-codex.js +11 -10
  44. package/dist/bin/exe-start-opencode.js +8 -7
  45. package/dist/bin/exe-status.js +10 -10
  46. package/dist/bin/exe-team.js +2 -2
  47. package/dist/bin/git-sweep.js +9 -9
  48. package/dist/bin/graph-backfill.js +4 -3
  49. package/dist/bin/graph-export.js +5 -4
  50. package/dist/bin/import-history.js +171 -0
  51. package/dist/bin/install-launchd.js +41 -0
  52. package/dist/bin/install.js +50 -74
  53. package/dist/bin/intercom-check.js +4 -4
  54. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  55. package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
  56. package/dist/bin/pre-publish.js +1 -1
  57. package/dist/bin/scan-tasks.js +22 -12
  58. package/dist/bin/setup.js +1 -1
  59. package/dist/bin/shard-migrate.js +4 -3
  60. package/dist/bin/stack-update.js +61 -857
  61. package/dist/bin/vps-backup.js +170 -0
  62. package/dist/bin/vps-health-gate.js +232 -0
  63. package/dist/{capacity-monitor-ZEAE4WP2.js → capacity-monitor-JBZB2S4P.js} +10 -10
  64. package/dist/{catchup-brief-OGWCHENC.js → catchup-brief-HE2EMZS5.js} +12 -11
  65. package/dist/{chunk-DJJNB47C.js → chunk-27DO3EZO.js} +1 -1
  66. package/dist/{chunk-45FYZIHI.js → chunk-32YUET3Y.js} +2 -2
  67. package/dist/{chunk-Y75ECPO5.js → chunk-3FW5LUGI.js} +2 -2
  68. package/dist/{chunk-4OZGQZ4U.js → chunk-3M3O56VT.js} +636 -179
  69. package/dist/{chunk-77WQOD6J.js → chunk-4CXUZ4NI.js} +2 -2
  70. package/dist/{chunk-PBXWPHEK.js → chunk-4VEHJZ6R.js} +1 -1
  71. package/dist/{chunk-TH22QIEC.js → chunk-6A4COFDG.js} +1 -1
  72. package/dist/{chunk-ACBTCC2L.js → chunk-7OJH2A6I.js} +1 -1
  73. package/dist/{chunk-NHCOTCI6.js → chunk-A7SGEBXJ.js} +2 -2
  74. package/dist/{chunk-5MPQSNZF.js → chunk-AUTCT6AY.js} +1 -1
  75. package/dist/{chunk-OEKSTOTE.js → chunk-AZAZ2C75.js} +1 -1
  76. package/dist/chunk-CHCA3ZM2.js +167 -0
  77. package/dist/{chunk-X347L57O.js → chunk-CSTJQDOE.js} +4 -3
  78. package/dist/{chunk-B234R3VW.js → chunk-D7WLV6WD.js} +2 -2
  79. package/dist/{chunk-GMXF3AHJ.js → chunk-DGAONW36.js} +1 -1
  80. package/dist/chunk-EAT5YL3W.js +229 -0
  81. package/dist/{chunk-OD4H5YCJ.js → chunk-EKTQE2R5.js} +8 -8
  82. package/dist/{chunk-Z44PC42G.js → chunk-ELUBA7XL.js} +2 -2
  83. package/dist/{chunk-ZWS6XQER.js → chunk-F5AKOE4P.js} +7 -7
  84. package/dist/{chunk-T5YULDDO.js → chunk-FVI4UBKO.js} +27 -4
  85. package/dist/{chunk-ESRI7MFI.js → chunk-GAN7PW6G.js} +28 -24
  86. package/dist/{chunk-K4OWYJSP.js → chunk-GM2WZTG3.js} +2 -2
  87. package/dist/{chunk-TAB5QGIK.js → chunk-GZYQTPTF.js} +3 -3
  88. package/dist/{chunk-CXDU5DE3.js → chunk-IAUNGATJ.js} +1 -1
  89. package/dist/{chunk-YS63NS6M.js → chunk-IHSM5GR4.js} +1 -1
  90. package/dist/{chunk-23PTS2ZD.js → chunk-IP7KJAUW.js} +117 -15
  91. package/dist/{chunk-D6IMJAV2.js → chunk-J64P2LB2.js} +2 -2
  92. package/dist/{chunk-CXAVSQZM.js → chunk-JXMSCKRM.js} +1 -1
  93. package/dist/{chunk-RQMK3IQH.js → chunk-K4OTJP6N.js} +14 -7
  94. package/dist/{chunk-L7ROZR2H.js → chunk-KXAUMIOX.js} +1 -1
  95. package/dist/{chunk-TPC3LAP7.js → chunk-LGY2BIOT.js} +13 -0
  96. package/dist/{chunk-RPIDSBK7.js → chunk-LLHRJEE4.js} +3 -3
  97. package/dist/{chunk-6WG2VIKC.js → chunk-LM7H6XU4.js} +1 -1
  98. package/dist/{chunk-Y6GMKZZ2.js → chunk-LOFFGJSY.js} +150 -23
  99. package/dist/{chunk-W7SDGBEC.js → chunk-MFI5OXYW.js} +52 -84
  100. package/dist/{chunk-KNPEVPYG.js → chunk-MSSQWF6X.js} +2 -2
  101. package/dist/{chunk-QIQAO3VG.js → chunk-NEFFFKMD.js} +3 -3
  102. package/dist/{chunk-YUC552KZ.js → chunk-NEHONJJC.js} +3 -3
  103. package/dist/{chunk-KZ7SXZ2V.js → chunk-NFMQRLCD.js} +1 -1
  104. package/dist/{chunk-52HCNDPG.js → chunk-O4TATDOV.js} +1 -1
  105. package/dist/{chunk-AR3OYGLB.js → chunk-PEFBRL4S.js} +28 -6
  106. package/dist/{chunk-AEUXUEJG.js → chunk-PEXVU3HU.js} +5 -3
  107. package/dist/chunk-Q2G5C3HV.js +217 -0
  108. package/dist/{chunk-KOO56JVC.js → chunk-Q6N6LDEJ.js} +1 -1
  109. package/dist/{chunk-TXSJ2L5O.js → chunk-QI4IXJN7.js} +1 -1
  110. package/dist/{chunk-HLVQ5Y7B.js → chunk-RE4VLK45.js} +1 -1
  111. package/dist/{chunk-TF6SZGDT.js → chunk-SA2PH6WY.js} +1 -1
  112. package/dist/{chunk-5RSYY7BE.js → chunk-SJYOPYXH.js} +117 -9
  113. package/dist/{chunk-PJGHBANY.js → chunk-TTJE7CCU.js} +1 -1
  114. package/dist/{chunk-A7KEWR6S.js → chunk-TXWQPL2U.js} +1 -1
  115. package/dist/{chunk-XXSJ35J5.js → chunk-U5ZH52FB.js} +2 -2
  116. package/dist/{chunk-G4FDG3LK.js → chunk-UVNDLF74.js} +63 -40
  117. package/dist/{chunk-5OD3AFRW.js → chunk-V6RCZ25F.js} +1 -1
  118. package/dist/{chunk-LHMBIFKD.js → chunk-VYNNN2S3.js} +4 -4
  119. package/dist/chunk-WCYT54XP.js +934 -0
  120. package/dist/{chunk-5AMSQRHT.js → chunk-XGYSTVUH.js} +1 -1
  121. package/dist/{chunk-MKZBHM6A.js → chunk-XLWF3C4R.js} +4 -4
  122. package/dist/{chunk-YL36L2SN.js → chunk-Y7YHLV57.js} +1 -1
  123. package/dist/{chunk-HZC4MR4H.js → chunk-YBKB2PXY.js} +1 -1
  124. package/dist/{chunk-NWM3A4TK.js → chunk-ZDNLKXZA.js} +1 -1
  125. package/dist/{chunk-O7KW6QMH.js → chunk-ZW4TKQUM.js} +15 -5
  126. package/dist/{chunk-6BURHBE6.js → chunk-ZXB44R3E.js} +32 -11
  127. package/dist/co-occurrence-WCED475N.js +73 -0
  128. package/dist/{code-context-index-B6VIWPSF.js → code-context-index-LSZ3DKTJ.js} +2 -2
  129. package/dist/{crdt-sync-XA22KI3S.js → crdt-sync-PBXZTHZC.js} +1 -1
  130. package/dist/{crm-webhook-CIZNOEY4.js → crm-webhook-W7Q25VZU.js} +2 -2
  131. package/dist/{cto-delegation-gate-H5IULFRC.js → cto-delegation-gate-JKULOLMC.js} +8 -8
  132. package/dist/{daemon-orchestration-VO5XQIJL.js → daemon-orchestration-CHV6MB42.js} +13 -11
  133. package/dist/{exe-drift-DMT75WR3.js → exe-drift-PW36OULT.js} +2 -2
  134. package/dist/{exe-export-2RZWOSX6.js → exe-export-XQOD3KE6.js} +6 -5
  135. package/dist/{exe-import-NFNYATHL.js → exe-import-QOFP67LW.js} +6 -5
  136. package/dist/{exe-key-4D7CF3BU.js → exe-key-WQ34UZR6.js} +1 -1
  137. package/dist/{fast-db-init-LAEISZQ2.js → fast-db-init-UKETGWQI.js} +1 -1
  138. package/dist/gateway/index.js +6 -6
  139. package/dist/{git-staleness-M46AYLPP.js → git-staleness-ATV5CGAP.js} +1 -1
  140. package/dist/{git-task-sweep-PXOS56YT.js → git-task-sweep-KXZRIP4T.js} +9 -9
  141. package/dist/{global-procedures-KROQQX54.js → global-procedures-G6IKCYKM.js} +3 -3
  142. package/dist/{graph-auto-extract-QJ2BBJM2.js → graph-auto-extract-ZJXJOLE2.js} +1 -1
  143. package/dist/hooks/bug-report-worker.js +10 -10
  144. package/dist/hooks/codex-stop-task-finalizer.js +10 -10
  145. package/dist/hooks/commit-complete.js +11 -11
  146. package/dist/hooks/error-recall.js +8 -7
  147. package/dist/hooks/exe-heartbeat-hook.js +2 -2
  148. package/dist/hooks/ingest-worker.js +3 -3
  149. package/dist/hooks/ingest.js +9 -9
  150. package/dist/hooks/instructions-loaded.js +3 -3
  151. package/dist/hooks/notification.js +3 -3
  152. package/dist/hooks/post-compact.js +10 -10
  153. package/dist/hooks/post-tool-combined.js +5 -5
  154. package/dist/hooks/pre-compact.js +16 -16
  155. package/dist/hooks/pre-tool-use.js +14 -14
  156. package/dist/hooks/prompt-submit.js +30 -29
  157. package/dist/hooks/session-end.js +46 -25
  158. package/dist/hooks/session-start.js +48 -10
  159. package/dist/hooks/stop.js +17 -17
  160. package/dist/hooks/subagent-stop.js +10 -10
  161. package/dist/hooks/summary-worker.js +17 -16
  162. package/dist/index.js +17 -17
  163. package/dist/{installer-SDBLJBAB.js → installer-DE2LH5EC.js} +4 -4
  164. package/dist/{installer-ZA6QNQ4P.js → installer-M2MDS7HC.js} +4 -4
  165. package/dist/{installer-6KAY6LD6.js → installer-VE23YFXU.js} +4 -4
  166. package/dist/{intercom-queue-K3DVKSPJ.js → intercom-queue-RNM6EPGA.js} +1 -1
  167. package/dist/keyword-extractor-UJHFWVZE.js +11 -0
  168. package/dist/lib/cloud-sync.js +3 -3
  169. package/dist/lib/consolidation.js +5 -4
  170. package/dist/lib/database.js +1 -1
  171. package/dist/lib/db-daemon-client.js +1 -1
  172. package/dist/lib/db.js +1 -1
  173. package/dist/lib/embed-worker.js +98 -0
  174. package/dist/lib/embedder.js +2 -2
  175. package/dist/lib/employee-templates.js +4 -4
  176. package/dist/lib/employees.js +1 -1
  177. package/dist/lib/exe-daemon-client.js +1 -1
  178. package/dist/lib/exe-daemon.js +523 -500
  179. package/dist/lib/hybrid-search.js +5 -6
  180. package/dist/lib/identity.js +1 -1
  181. package/dist/lib/messaging.js +9 -9
  182. package/dist/lib/reminders.js +2 -2
  183. package/dist/lib/schedules.js +5 -4
  184. package/dist/lib/skill-learning.js +3 -3
  185. package/dist/lib/store.js +4 -3
  186. package/dist/lib/task-router.js +2 -2
  187. package/dist/lib/tasks.js +9 -9
  188. package/dist/lib/tmux-routing.js +8 -8
  189. package/dist/lib/tmux-transport.js +1 -1
  190. package/dist/lib/token-spend.js +2 -2
  191. package/dist/lib/transport.js +2 -2
  192. package/dist/lib/ws-client.js +3 -1
  193. package/dist/mcp/register-tools.js +54 -51
  194. package/dist/mcp/server.js +58 -55
  195. package/dist/mcp/tools/complete-reminder.js +3 -3
  196. package/dist/mcp/tools/create-reminder.js +3 -3
  197. package/dist/mcp/tools/create-task.js +11 -11
  198. package/dist/mcp/tools/deactivate-behavior.js +4 -4
  199. package/dist/mcp/tools/list-reminders.js +3 -3
  200. package/dist/mcp/tools/list-tasks.js +11 -11
  201. package/dist/mcp/tools/send-message.js +11 -11
  202. package/dist/mcp/tools/update-task.js +10 -10
  203. package/dist/{mcp-http-config-LK2EDOEJ.js → mcp-http-config-Z2E4VUOF.js} +2 -2
  204. package/dist/{memory-cards-V3DKSRWL.js → memory-cards-SFDKDIAW.js} +1 -1
  205. package/dist/memory-graph-extractor-YD4GNH7T.js +16 -0
  206. package/dist/{memory-poisoning-defense-3B75HS74.js → memory-poisoning-defense-VEGNFELN.js} +1 -1
  207. package/dist/{memory-queue-client-LFPZPPQA.js → memory-queue-client-5HB2XUH7.js} +2 -2
  208. package/dist/{memory-reflection-HTDAUUE5.js → memory-reflection-MTPRQNI6.js} +2 -2
  209. package/dist/{notifications-76VCYXWW.js → notifications-6TCE6OBG.js} +8 -8
  210. package/dist/{orchestrator-CBNSBI5P.js → orchestrator-W2GYJR23.js} +10 -10
  211. package/dist/{plan-limits-SOR3QXKV.js → plan-limits-4EP46323.js} +2 -2
  212. package/dist/{projection-worker-FK5YOEIL.js → projection-worker-EBUYNMU2.js} +1 -1
  213. package/dist/{review-polling-ZLNDUKL4.js → review-polling-2N7KQFZZ.js} +9 -9
  214. package/dist/runtime/index.js +15 -15
  215. package/dist/{session-events-CUSPL25D.js → session-events-K47FHAXJ.js} +9 -9
  216. package/dist/{session-kill-telemetry-FLBRHBDP.js → session-kill-telemetry-275YUXM5.js} +2 -2
  217. package/dist/{session-scope-PX2ABSJO.js → session-scope-XSFJZEER.js} +8 -8
  218. package/dist/{setup-wizard-Y6PBZGFX.js → setup-wizard-UEO7HYLQ.js} +1 -1
  219. package/dist/{skill-refinement-L7PGKCYO.js → skill-refinement-WXBTANDQ.js} +1 -1
  220. package/dist/stack-update-2B2UXREV.js +50 -0
  221. package/dist/{task-enforcement-7FUILB63.js → task-enforcement-2JIJSXPU.js} +14 -16
  222. package/dist/{task-scope-2N45TE32.js → task-scope-W73Z3XWE.js} +8 -8
  223. package/dist/{tasks-crud-ADLCGHGH.js → tasks-crud-HPJKI3QQ.js} +8 -8
  224. package/dist/{tasks-review-PJ2DUI6N.js → tasks-review-MXLMPGNZ.js} +8 -8
  225. package/dist/{token-budget-T5DFXVTM.js → token-budget-BA46CVHX.js} +1 -1
  226. package/dist/{tool-capability-index-6JJN6ZRC.js → tool-capability-index-42VVN5BS.js} +1 -1
  227. package/dist/{tool-telemetry-72PVO5HV.js → tool-telemetry-GZ5E2AUL.js} +1 -1
  228. package/dist/tui/App.js +22 -18
  229. package/dist/{tui-data-63JHE6EZ.js → tui-data-PVXWQCJX.js} +8 -8
  230. package/dist/{worker-gate-REVBJUZ6.js → worker-gate-WTTK64TK.js} +1 -1
  231. package/dist/{workflow-engine-W2WNHJG5.js → workflow-engine-LT3WTT7V.js} +2 -2
  232. package/package.json +1 -1
  233. package/release-notes.json +209 -209
  234. /package/dist/{chunk-BNOZUS6J.js → chunk-6VVCAVRT.js} +0 -0
  235. /package/dist/{chunk-IC7GKK6I.js → chunk-CWQZZ7X3.js} +0 -0
  236. /package/dist/{chunk-ZI2ZVERO.js → chunk-EIW5GOBW.js} +0 -0
  237. /package/dist/{chunk-2BGGDNRD.js → chunk-IPPJEM26.js} +0 -0
  238. /package/dist/{chunk-4ISDU5KR.js → chunk-K5UR73PM.js} +0 -0
  239. /package/dist/{chunk-ZWRTVUQ6.js → chunk-KIMO5S45.js} +0 -0
  240. /package/dist/{chunk-S2FX5KJ4.js → chunk-WBLILGAP.js} +0 -0
  241. /package/dist/{core-memory-PCJ3L46L.js → core-memory-RAC6M67J.js} +0 -0
  242. /package/dist/{entity-boost-GHFPE6A2.js → entity-boost-5FIRFRDC.js} +0 -0
  243. /package/dist/{message-queue-client-CHRQYBH5.js → message-queue-client-PTQ2S7D7.js} +0 -0
  244. /package/dist/{wiki-acl-QYRAYYVQ.js → wiki-acl-MSDRCIAI.js} +0 -0
@@ -3,24 +3,24 @@ import {
3
3
  } from "./chunk-MLXJ5EZG.js";
4
4
  import {
5
5
  createTask
6
- } from "./chunk-ZWS6XQER.js";
6
+ } from "./chunk-F5AKOE4P.js";
7
7
  import {
8
8
  getActiveAgent
9
- } from "./chunk-6WG2VIKC.js";
9
+ } from "./chunk-LM7H6XU4.js";
10
10
  import {
11
11
  ensureEmployee,
12
12
  logTaskDispatch,
13
13
  resolveExeSession
14
- } from "./chunk-W7SDGBEC.js";
14
+ } from "./chunk-MFI5OXYW.js";
15
15
  import {
16
16
  getLicenseSync
17
- } from "./chunk-HLVQ5Y7B.js";
17
+ } from "./chunk-RE4VLK45.js";
18
18
  import {
19
19
  getAgentContext
20
20
  } from "./chunk-GJV3WDWM.js";
21
21
  import {
22
22
  isCoordinatorName
23
- } from "./chunk-5RSYY7BE.js";
23
+ } from "./chunk-SJYOPYXH.js";
24
24
 
25
25
  // src/mcp/tools/create-task.ts
26
26
  import { z } from "zod";
@@ -185,7 +185,7 @@ function registerCreateTask(server) {
185
185
  let projectConflictOpts = {};
186
186
  try {
187
187
  const { getClient } = await import("./lib/database.js");
188
- const { sessionScopeFilter } = await import("./task-scope-2N45TE32.js");
188
+ const { sessionScopeFilter } = await import("./task-scope-W73Z3XWE.js");
189
189
  const client = getClient();
190
190
  const scope = sessionScopeFilter();
191
191
  const existing = await client.execute({
@@ -228,6 +228,28 @@ Dispatched: spawned ${result.sessionName}`;
228
228
  Dispatch failed: ${result.error ?? "unknown"}`;
229
229
  break;
230
230
  }
231
+ try {
232
+ const { sendIntercom: si } = await import("./lib/tmux-routing.js");
233
+ const { listTmuxSessions } = await import("./lib/tmux-status.js");
234
+ const liveSessions = listTmuxSessions();
235
+ for (const s of liveSessions) {
236
+ const agentPart = s.split("-")[0]?.replace(/\d+$/, "") ?? "";
237
+ if (agentPart === assigned_to && s !== result.sessionName) {
238
+ si(s, { force: true });
239
+ }
240
+ }
241
+ } catch {
242
+ }
243
+ if (result.sessionName && result.status === "spawned") {
244
+ try {
245
+ const { getClient: gc } = await import("./lib/database.js");
246
+ await gc().execute({
247
+ sql: "UPDATE tasks SET instance_id = ? WHERE id = ?",
248
+ args: [result.sessionName, task.id]
249
+ });
250
+ } catch {
251
+ }
252
+ }
231
253
  try {
232
254
  writeDispatchPending(task.id, assigned_to, result.sessionName);
233
255
  } catch {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getActiveAgent
3
- } from "./chunk-6WG2VIKC.js";
3
+ } from "./chunk-LM7H6XU4.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-W7SDGBEC.js";
6
+ } from "./chunk-MFI5OXYW.js";
7
7
  import {
8
8
  getProjectName
9
9
  } from "./chunk-OPU3NYOO.js";
@@ -43,12 +43,14 @@ function registerListTasks(server) {
43
43
  } else {
44
44
  resolvedProject = getProjectName() || void 0;
45
45
  }
46
+ const { canCoordinate: canCoord } = await import("./lib/employees.js");
47
+ const effectiveCrossSession = canCoord(agentId, agentRole) ? cross_session ?? false : false;
46
48
  const tasks = await listTasks({
47
49
  assignedTo: assigned_to,
48
50
  status,
49
51
  projectName: resolvedProject,
50
52
  priority,
51
- crossSession: cross_session ?? false
53
+ crossSession: effectiveCrossSession
52
54
  });
53
55
  if (tasks.length === 0) {
54
56
  return {
@@ -0,0 +1,217 @@
1
+ // src/lib/conversation-parser.ts
2
+ function detectFormat(content, filePath) {
3
+ const lower = filePath.toLowerCase();
4
+ if (lower.endsWith(".md") || lower.endsWith(".markdown")) {
5
+ return "markdown";
6
+ }
7
+ try {
8
+ const parsed = JSON.parse(content);
9
+ if (Array.isArray(parsed) && parsed.length > 0) {
10
+ const first = parsed[0];
11
+ if (first && typeof first === "object") {
12
+ if ("mapping" in first && typeof first.mapping === "object") {
13
+ return "chatgpt";
14
+ }
15
+ if (("chat_messages" in first || "messages" in first) && ("name" in first || "uuid" in first)) {
16
+ return "claude";
17
+ }
18
+ if ("role" in first && "content" in first) {
19
+ return "generic";
20
+ }
21
+ }
22
+ }
23
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
24
+ if ("mapping" in parsed) return "chatgpt";
25
+ if ("chat_messages" in parsed || "messages" in parsed) return "claude";
26
+ }
27
+ } catch {
28
+ }
29
+ return "generic";
30
+ }
31
+ function parseChatGPT(content, sourceFile) {
32
+ const raw = JSON.parse(content);
33
+ const conversations = Array.isArray(raw) ? raw : [raw];
34
+ const results = [];
35
+ for (const convo of conversations) {
36
+ if (!convo.mapping) continue;
37
+ const messages = [];
38
+ const nodes = Object.values(convo.mapping);
39
+ const sorted = nodes.filter(
40
+ (n) => !!n.message?.content?.parts && n.message.author?.role !== "system"
41
+ ).sort((a, b) => (a.message.create_time ?? 0) - (b.message.create_time ?? 0));
42
+ for (const node of sorted) {
43
+ const role = node.message.author?.role ?? "unknown";
44
+ const parts = node.message.content?.parts ?? [];
45
+ const textParts = parts.filter((p) => typeof p === "string");
46
+ const text = textParts.join("\n").trim();
47
+ if (!text) continue;
48
+ messages.push({
49
+ role,
50
+ content: text,
51
+ timestamp: node.message.create_time ? new Date(node.message.create_time * 1e3).toISOString() : void 0
52
+ });
53
+ }
54
+ if (messages.length > 0) {
55
+ results.push({
56
+ title: convo.title ?? "Untitled ChatGPT Conversation",
57
+ messages,
58
+ sourceFile
59
+ });
60
+ }
61
+ }
62
+ return results;
63
+ }
64
+ function parseClaude(content, sourceFile) {
65
+ const raw = JSON.parse(content);
66
+ const conversations = Array.isArray(raw) ? raw : [raw];
67
+ const results = [];
68
+ for (const convo of conversations) {
69
+ const rawMessages = convo.chat_messages ?? convo.messages ?? [];
70
+ const messages = [];
71
+ for (const msg of rawMessages) {
72
+ const role = msg.sender ?? msg.role ?? "unknown";
73
+ let text;
74
+ if (typeof msg.text === "string") {
75
+ text = msg.text;
76
+ } else if (typeof msg.content === "string") {
77
+ text = msg.content;
78
+ } else if (Array.isArray(msg.content)) {
79
+ text = msg.content.filter((b) => b.type === "text" && typeof b.text === "string").map((b) => b.text).join("\n");
80
+ } else {
81
+ continue;
82
+ }
83
+ text = text.trim();
84
+ if (!text) continue;
85
+ messages.push({
86
+ role: normalizeRole(role),
87
+ content: text,
88
+ timestamp: msg.created_at ?? msg.timestamp
89
+ });
90
+ }
91
+ if (messages.length > 0) {
92
+ results.push({
93
+ title: convo.name ?? convo.uuid ?? "Untitled Claude Conversation",
94
+ messages,
95
+ sourceFile
96
+ });
97
+ }
98
+ }
99
+ return results;
100
+ }
101
+ function parseGeneric(content, sourceFile) {
102
+ try {
103
+ const raw = JSON.parse(content);
104
+ const messages = Array.isArray(raw) ? raw : raw.messages ?? [];
105
+ const title = !Array.isArray(raw) ? raw.title : void 0;
106
+ const parsed = [];
107
+ for (const msg of messages) {
108
+ const text = (msg.content ?? msg.text ?? "").trim();
109
+ if (!text) continue;
110
+ parsed.push({
111
+ role: normalizeRole(msg.role ?? "unknown"),
112
+ content: text,
113
+ timestamp: msg.timestamp ?? msg.created_at
114
+ });
115
+ }
116
+ if (parsed.length > 0) {
117
+ return [{
118
+ title: title ?? `Imported from ${sourceFile}`,
119
+ messages: parsed,
120
+ sourceFile
121
+ }];
122
+ }
123
+ } catch {
124
+ }
125
+ return parseMarkdown(content, sourceFile);
126
+ }
127
+ function parseMarkdown(content, sourceFile) {
128
+ const lines = content.split("\n");
129
+ const messages = [];
130
+ let currentRole = "unknown";
131
+ let currentContent = [];
132
+ const ROLE_PATTERNS = [
133
+ /^#{1,3}\s+(User|Human|Assistant|AI|System|Claude|GPT|Bot)\s*$/i,
134
+ /^\*\*(User|Human|Assistant|AI|System|Claude|GPT|Bot)\*?\*?:?\s*/i,
135
+ /^(User|Human|Assistant|AI|System|Claude|GPT|Bot)\s*:\s*/i
136
+ ];
137
+ function flushMessage() {
138
+ const text = currentContent.join("\n").trim();
139
+ if (text) {
140
+ messages.push({ role: normalizeRole(currentRole), content: text });
141
+ }
142
+ currentContent = [];
143
+ }
144
+ for (const line of lines) {
145
+ let matched = false;
146
+ for (const pattern of ROLE_PATTERNS) {
147
+ const match = line.match(pattern);
148
+ if (match) {
149
+ flushMessage();
150
+ currentRole = match[1];
151
+ const remaining = line.replace(pattern, "").trim();
152
+ if (remaining) currentContent.push(remaining);
153
+ matched = true;
154
+ break;
155
+ }
156
+ }
157
+ if (!matched) {
158
+ currentContent.push(line);
159
+ }
160
+ }
161
+ flushMessage();
162
+ if (messages.length === 0) {
163
+ const text = content.trim();
164
+ if (text) {
165
+ messages.push({ role: "unknown", content: text });
166
+ }
167
+ }
168
+ return messages.length > 0 ? [{ title: `Imported from ${sourceFile}`, messages, sourceFile }] : [];
169
+ }
170
+ function conversationsToMemories(conversations, format) {
171
+ const memories = [];
172
+ for (const convo of conversations) {
173
+ for (const msg of convo.messages) {
174
+ if (msg.content.length < 10) continue;
175
+ memories.push({
176
+ text: `[${convo.title}] ${msg.role}: ${msg.content}`,
177
+ kind: "conversation",
178
+ metadata: {
179
+ source_type: "import",
180
+ source_format: format,
181
+ source_path: convo.sourceFile,
182
+ conversation_title: convo.title,
183
+ role: msg.role,
184
+ original_timestamp: msg.timestamp
185
+ }
186
+ });
187
+ }
188
+ }
189
+ return memories;
190
+ }
191
+ function normalizeRole(role) {
192
+ const lower = role.toLowerCase().trim();
193
+ switch (lower) {
194
+ case "human":
195
+ case "user":
196
+ return "user";
197
+ case "assistant":
198
+ case "ai":
199
+ case "bot":
200
+ case "claude":
201
+ case "gpt":
202
+ case "chatgpt":
203
+ return "assistant";
204
+ case "system":
205
+ return "system";
206
+ default:
207
+ return lower;
208
+ }
209
+ }
210
+
211
+ export {
212
+ detectFormat,
213
+ parseChatGPT,
214
+ parseClaude,
215
+ parseGeneric,
216
+ conversationsToMemories
217
+ };
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  connectEmbedDaemon,
9
9
  embedBatchViaClient
10
- } from "./chunk-G4FDG3LK.js";
10
+ } from "./chunk-UVNDLF74.js";
11
11
  import {
12
12
  EXE_AI_DIR
13
13
  } from "./chunk-4GXRETYL.js";
@@ -3,7 +3,7 @@ import { readFileSync, writeFileSync, renameSync, existsSync, mkdirSync, appendF
3
3
  import path from "path";
4
4
  import os from "os";
5
5
  var QUEUE_PATH = path.join(os.homedir(), ".exe-os", "intercom-queue.json");
6
- var MAX_RETRIES = 5;
6
+ var MAX_RETRIES = 10;
7
7
  var TTL_MS = 60 * 60 * 1e3;
8
8
  function ensureDir() {
9
9
  const dir = path.dirname(QUEUE_PATH);
@@ -3,7 +3,7 @@ import {
3
3
  getClient,
4
4
  isInitialized,
5
5
  loadEmployees
6
- } from "./chunk-5RSYY7BE.js";
6
+ } from "./chunk-SJYOPYXH.js";
7
7
  import {
8
8
  PLAN_LIMITS,
9
9
  checkLicense,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createReminder
3
- } from "./chunk-TH22QIEC.js";
3
+ } from "./chunk-6A4COFDG.js";
4
4
 
5
5
  // src/mcp/tools/create-reminder.ts
6
6
  import { z } from "zod";
@@ -329,10 +329,7 @@ function baseAgentName(name, employees) {
329
329
  var MULTI_INSTANCE_ROLES = /* @__PURE__ */ new Set([
330
330
  "principal engineer",
331
331
  "content production specialist",
332
- "staff code reviewer",
333
- "cto",
334
- "cmo",
335
- "gm"
332
+ "staff code reviewer"
336
333
  ]);
337
334
  function isMultiInstance(agentName, employees) {
338
335
  const roster = employees ?? loadEmployeesSync();
@@ -1442,33 +1439,81 @@ async function ensureSchema() {
1442
1439
  CREATE INDEX IF NOT EXISTS idx_memories_agent_project
1443
1440
  ON memories(agent_id, project_name);
1444
1441
  `);
1442
+ try {
1443
+ await client.execute("ALTER TABLE memories ADD COLUMN keywords TEXT DEFAULT ''");
1444
+ } catch (e) {
1445
+ const msg = e instanceof Error ? e.message : String(e);
1446
+ if (!msg.includes("duplicate column")) {
1447
+ logCatchDebug("migration", e);
1448
+ }
1449
+ }
1450
+ try {
1451
+ await client.execute("ALTER TABLE memories ADD COLUMN graph_extracted INTEGER DEFAULT 0");
1452
+ } catch (e) {
1453
+ const msg = e instanceof Error ? e.message : String(e);
1454
+ if (!msg.includes("duplicate column")) {
1455
+ logCatchDebug("migration", e);
1456
+ }
1457
+ }
1458
+ let needsFtsMigration = false;
1459
+ try {
1460
+ const ftsCheck = await client.execute(
1461
+ "SELECT sql FROM sqlite_master WHERE type='table' AND name='memories_fts'"
1462
+ );
1463
+ const ftsSql = ftsCheck.rows[0]?.sql ?? "";
1464
+ needsFtsMigration = ftsSql.length > 0 && !ftsSql.includes("keywords");
1465
+ if (ftsCheck.rows.length === 0) {
1466
+ needsFtsMigration = true;
1467
+ }
1468
+ } catch {
1469
+ needsFtsMigration = true;
1470
+ }
1471
+ if (needsFtsMigration) {
1472
+ try {
1473
+ await client.execute("DROP TRIGGER IF EXISTS memories_fts_ai");
1474
+ await client.execute("DROP TRIGGER IF EXISTS memories_fts_ad");
1475
+ await client.execute("DROP TRIGGER IF EXISTS memories_fts_au");
1476
+ await client.execute("DROP TRIGGER IF EXISTS memories_fts_soft_delete");
1477
+ await client.execute("DROP TABLE IF EXISTS memories_fts");
1478
+ } catch (e) {
1479
+ logCatchDebug("fts-migration-drop", e);
1480
+ }
1481
+ }
1445
1482
  await client.executeMultiple(`
1446
1483
  CREATE VIRTUAL TABLE IF NOT EXISTS memories_fts USING fts5(
1447
1484
  raw_text,
1485
+ keywords,
1448
1486
  content='memories',
1449
1487
  content_rowid='rowid'
1450
1488
  );
1451
1489
 
1452
1490
  CREATE TRIGGER IF NOT EXISTS memories_fts_ai AFTER INSERT ON memories BEGIN
1453
- INSERT INTO memories_fts(rowid, raw_text) VALUES (new.rowid, new.raw_text);
1491
+ INSERT INTO memories_fts(rowid, raw_text, keywords) VALUES (new.rowid, new.raw_text, COALESCE(new.keywords, ''));
1454
1492
  END;
1455
1493
 
1456
1494
  CREATE TRIGGER IF NOT EXISTS memories_fts_ad AFTER DELETE ON memories BEGIN
1457
- INSERT INTO memories_fts(memories_fts, rowid, raw_text) VALUES('delete', old.rowid, old.raw_text);
1495
+ INSERT INTO memories_fts(memories_fts, rowid, raw_text, keywords) VALUES('delete', old.rowid, old.raw_text, COALESCE(old.keywords, ''));
1458
1496
  END;
1459
1497
 
1460
1498
  CREATE TRIGGER IF NOT EXISTS memories_fts_au AFTER UPDATE ON memories
1461
1499
  WHEN new.status IS NULL OR new.status != 'deleted' BEGIN
1462
- INSERT INTO memories_fts(memories_fts, rowid, raw_text) VALUES('delete', old.rowid, old.raw_text);
1463
- INSERT INTO memories_fts(rowid, raw_text) VALUES (new.rowid, new.raw_text);
1500
+ INSERT INTO memories_fts(memories_fts, rowid, raw_text, keywords) VALUES('delete', old.rowid, old.raw_text, COALESCE(old.keywords, ''));
1501
+ INSERT INTO memories_fts(rowid, raw_text, keywords) VALUES (new.rowid, new.raw_text, COALESCE(new.keywords, ''));
1464
1502
  END;
1465
1503
 
1466
1504
  -- Soft-delete trigger: remove from FTS when status changes to 'deleted'
1467
1505
  CREATE TRIGGER IF NOT EXISTS memories_fts_soft_delete AFTER UPDATE ON memories
1468
1506
  WHEN new.status = 'deleted' AND (old.status IS NULL OR old.status != 'deleted') BEGIN
1469
- INSERT INTO memories_fts(memories_fts, rowid, raw_text) VALUES('delete', old.rowid, old.raw_text);
1507
+ INSERT INTO memories_fts(memories_fts, rowid, raw_text, keywords) VALUES('delete', old.rowid, old.raw_text, COALESCE(old.keywords, ''));
1470
1508
  END;
1471
1509
  `);
1510
+ if (needsFtsMigration) {
1511
+ try {
1512
+ await client.execute("INSERT INTO memories_fts(memories_fts) VALUES('rebuild')");
1513
+ } catch (e) {
1514
+ logCatchDebug("fts-rebuild", e);
1515
+ }
1516
+ }
1472
1517
  try {
1473
1518
  await client.execute("SELECT COUNT(*) FROM memories_fts LIMIT 1");
1474
1519
  } catch (ftsErr) {
@@ -1672,6 +1717,14 @@ async function ensureSchema() {
1672
1717
  } catch (e) {
1673
1718
  logCatchDebug("migration", e);
1674
1719
  }
1720
+ try {
1721
+ await client.execute({
1722
+ sql: `ALTER TABLE tasks ADD COLUMN instance_id TEXT`,
1723
+ args: []
1724
+ });
1725
+ } catch (e) {
1726
+ logCatchDebug("migration", e);
1727
+ }
1675
1728
  try {
1676
1729
  await client.execute({
1677
1730
  sql: `ALTER TABLE memories ADD COLUMN task_id TEXT`,
@@ -3148,6 +3201,61 @@ async function ensureSchema() {
3148
3201
  } catch (e) {
3149
3202
  logCatchDebug("migration", e);
3150
3203
  }
3204
+ try {
3205
+ await client.execute({
3206
+ sql: `ALTER TABLE memories ADD COLUMN keywords TEXT DEFAULT ''`,
3207
+ args: []
3208
+ });
3209
+ } catch (e) {
3210
+ logCatchDebug("migration", e);
3211
+ }
3212
+ try {
3213
+ await client.execute("SELECT keywords FROM memories_fts LIMIT 0");
3214
+ } catch {
3215
+ process.stderr.write("[database] Upgrading FTS5 to dual-column (raw_text + keywords)...\n");
3216
+ try {
3217
+ await client.executeMultiple(`
3218
+ DROP TRIGGER IF EXISTS memories_fts_ai;
3219
+ DROP TRIGGER IF EXISTS memories_fts_ad;
3220
+ DROP TRIGGER IF EXISTS memories_fts_au;
3221
+ DROP TRIGGER IF EXISTS memories_fts_soft_delete;
3222
+ DROP TABLE IF EXISTS memories_fts;
3223
+
3224
+ CREATE VIRTUAL TABLE IF NOT EXISTS memories_fts USING fts5(
3225
+ raw_text,
3226
+ keywords,
3227
+ content='memories',
3228
+ content_rowid='rowid'
3229
+ );
3230
+
3231
+ CREATE TRIGGER IF NOT EXISTS memories_fts_ai AFTER INSERT ON memories BEGIN
3232
+ INSERT INTO memories_fts(rowid, raw_text, keywords) VALUES (new.rowid, new.raw_text, COALESCE(new.keywords, ''));
3233
+ END;
3234
+
3235
+ CREATE TRIGGER IF NOT EXISTS memories_fts_ad AFTER DELETE ON memories BEGIN
3236
+ INSERT INTO memories_fts(memories_fts, rowid, raw_text, keywords) VALUES('delete', old.rowid, old.raw_text, COALESCE(old.keywords, ''));
3237
+ END;
3238
+
3239
+ CREATE TRIGGER IF NOT EXISTS memories_fts_au AFTER UPDATE ON memories
3240
+ WHEN new.status IS NULL OR new.status != 'deleted' BEGIN
3241
+ INSERT INTO memories_fts(memories_fts, rowid, raw_text, keywords) VALUES('delete', old.rowid, old.raw_text, COALESCE(old.keywords, ''));
3242
+ INSERT INTO memories_fts(rowid, raw_text, keywords) VALUES (new.rowid, new.raw_text, COALESCE(new.keywords, ''));
3243
+ END;
3244
+
3245
+ CREATE TRIGGER IF NOT EXISTS memories_fts_soft_delete AFTER UPDATE ON memories
3246
+ WHEN new.status = 'deleted' AND (old.status IS NULL OR old.status != 'deleted') BEGIN
3247
+ INSERT INTO memories_fts(memories_fts, rowid, raw_text, keywords) VALUES('delete', old.rowid, old.raw_text, COALESCE(old.keywords, ''));
3248
+ END;
3249
+ `);
3250
+ await client.execute("INSERT INTO memories_fts(memories_fts) VALUES('rebuild')");
3251
+ process.stderr.write("[database] FTS5 dual-column upgrade complete.\n");
3252
+ } catch (ftsUpgradeErr) {
3253
+ process.stderr.write(
3254
+ `[database] FTS5 upgrade failed: ${ftsUpgradeErr instanceof Error ? ftsUpgradeErr.message : String(ftsUpgradeErr)}
3255
+ `
3256
+ );
3257
+ }
3258
+ }
3151
3259
  }
3152
3260
  var disposeTurso = disposeDatabase;
3153
3261
  async function disposeDatabase() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getClient
3
- } from "./chunk-5RSYY7BE.js";
3
+ } from "./chunk-SJYOPYXH.js";
4
4
 
5
5
  // src/lib/behaviors.ts
6
6
  import crypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TmuxTransport
3
- } from "./chunk-X347L57O.js";
3
+ } from "./chunk-CSTJQDOE.js";
4
4
 
5
5
  // src/lib/transport.ts
6
6
  var _transport = null;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  PLATFORM_PROCEDURE_TITLES
3
- } from "./chunk-TPC3LAP7.js";
3
+ } from "./chunk-LGY2BIOT.js";
4
4
  import {
5
5
  getClient,
6
6
  getIdentity,
7
7
  listIdentities,
8
8
  updateIdentity
9
- } from "./chunk-5RSYY7BE.js";
9
+ } from "./chunk-SJYOPYXH.js";
10
10
  import {
11
11
  atomicWriteJsonSync
12
12
  } from "./chunk-LYH5HE24.js";