@askexenow/exe-os 0.9.289 → 0.9.290

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/dist/active-agent-L22OENGJ.js +26 -0
  2. package/dist/active-agent-SVG6F6HY.js +27 -0
  3. package/dist/agentic-ontology-3GHJHLDY.js +25 -0
  4. package/dist/backfill-metadata-HJNVBORD.js +599 -0
  5. package/dist/behaviors-ROOZS234.js +39 -0
  6. package/dist/bin/agentic-ontology-backfill.js +5 -5
  7. package/dist/bin/agentic-reflection-backfill.js +6 -6
  8. package/dist/bin/agentic-semantic-label.js +5 -5
  9. package/dist/bin/backfill-conversations.js +4 -4
  10. package/dist/bin/backfill-responses.js +4 -4
  11. package/dist/bin/backfill-vectors.js +98 -13
  12. package/dist/bin/bulk-sync-postgres.js +6 -6
  13. package/dist/bin/cc-doctor.js +4 -4
  14. package/dist/bin/cleanup-stale-review-tasks.js +9 -9
  15. package/dist/bin/cli.js +51 -15
  16. package/dist/bin/exe-agent-config.js +2 -2
  17. package/dist/bin/exe-agent.js +4 -4
  18. package/dist/bin/exe-assign.js +5 -5
  19. package/dist/bin/exe-boot.js +16 -16
  20. package/dist/bin/exe-call.js +4 -4
  21. package/dist/bin/exe-cloud.js +23 -5
  22. package/dist/bin/exe-dispatch.js +9 -9
  23. package/dist/bin/exe-doctor.js +1 -1
  24. package/dist/bin/exe-export-behaviors.js +7 -7
  25. package/dist/bin/exe-forget.js +6 -6
  26. package/dist/bin/exe-gateway.js +7 -7
  27. package/dist/bin/exe-healthcheck.js +4 -4
  28. package/dist/bin/exe-heartbeat.js +9 -9
  29. package/dist/bin/exe-kill.js +12 -12
  30. package/dist/bin/exe-launch-agent.js +16 -16
  31. package/dist/bin/exe-new-employee.js +6 -6
  32. package/dist/bin/exe-pending-messages.js +10 -10
  33. package/dist/bin/exe-pending-notifications.js +9 -9
  34. package/dist/bin/exe-pending-reviews.js +9 -9
  35. package/dist/bin/exe-rename.js +4 -4
  36. package/dist/bin/exe-review.js +11 -11
  37. package/dist/bin/exe-search.js +5 -5
  38. package/dist/bin/exe-session-cleanup.js +14 -14
  39. package/dist/bin/exe-settings.js +4 -4
  40. package/dist/bin/exe-start-codex.js +11 -11
  41. package/dist/bin/exe-start-opencode.js +8 -8
  42. package/dist/bin/exe-status.js +10 -10
  43. package/dist/bin/exe-team.js +3 -3
  44. package/dist/bin/git-sweep.js +10 -10
  45. package/dist/bin/graph-backfill.js +4 -4
  46. package/dist/bin/graph-export.js +5 -5
  47. package/dist/bin/import-history.js +7 -7
  48. package/dist/bin/install.js +6 -6
  49. package/dist/bin/intercom-check.js +4 -4
  50. package/dist/bin/mcp-sessions.js +2 -2
  51. package/dist/bin/orchestration-metrics.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 +9 -9
  55. package/dist/bin/setup.js +1 -1
  56. package/dist/bin/shard-migrate.js +4 -4
  57. package/dist/capability-cards-O6XB2AU4.js +88 -0
  58. package/dist/capacity-monitor-ZE7CFVWH.js +50 -0
  59. package/dist/catchup-brief-3NONSIMA.js +174 -0
  60. package/dist/chunk-232DHK5C.js +1119 -0
  61. package/dist/chunk-272SJ4RN.js +129 -0
  62. package/dist/chunk-4NMTGHUE.js +127 -0
  63. package/dist/chunk-5PLW3QL6.js +668 -0
  64. package/dist/chunk-66EIYAF2.js +157 -0
  65. package/dist/chunk-6IPJF5QD.js +630 -0
  66. package/dist/chunk-6NSJTOXE.js +122 -0
  67. package/dist/chunk-6TLURATK.js +4318 -0
  68. package/dist/chunk-73JAJQRY.js +85 -0
  69. package/dist/chunk-7FTKXL5A.js +286 -0
  70. package/dist/chunk-7IRQSO3F.js +735 -0
  71. package/dist/chunk-7MINWZ3J.js +214 -0
  72. package/dist/chunk-7T5PS5DG.js +14439 -0
  73. package/dist/chunk-A74WXY4S.js +227 -0
  74. package/dist/chunk-AVD5C3NG.js +197 -0
  75. package/dist/chunk-B36MRLEP.js +58 -0
  76. package/dist/chunk-B4TCZ3PS.js +373 -0
  77. package/dist/chunk-BPLEJ3EU.js +411 -0
  78. package/dist/chunk-BTDPLFGK.js +221 -0
  79. package/dist/chunk-BU45UYTK.js +185 -0
  80. package/dist/chunk-CCAA6XOZ.js +284 -0
  81. package/dist/chunk-DBQ6I6K2.js +3276 -0
  82. package/dist/chunk-DDWFHEPG.js +345 -0
  83. package/dist/chunk-DSOKTUTT.js +167 -0
  84. package/dist/chunk-ETCARC76.js +836 -0
  85. package/dist/chunk-EZHTLPOS.js +280 -0
  86. package/dist/chunk-F3DQ3HDH.js +333 -0
  87. package/dist/chunk-F6ZCUDCN.js +244 -0
  88. package/dist/chunk-FI5Q6F5S.js +382 -0
  89. package/dist/chunk-FNQZGNSG.js +1094 -0
  90. package/dist/chunk-FVKTXXKK.js +128 -0
  91. package/dist/chunk-HHR5NB6N.js +377 -0
  92. package/dist/chunk-HRZLGHT6.js +290 -0
  93. package/dist/chunk-HSSRWMVA.js +68 -0
  94. package/dist/chunk-I3NVB5MG.js +85 -0
  95. package/dist/chunk-I7Z6MK2B.js +240 -0
  96. package/dist/chunk-ID4SMRYX.js +2078 -0
  97. package/dist/chunk-JXGHDROV.js +546 -0
  98. package/dist/chunk-KQY4QIEN.js +731 -0
  99. package/dist/chunk-LRSU2ZU2.js +38 -0
  100. package/dist/chunk-MFCL4GAN.js +2113 -0
  101. package/dist/chunk-MFGMVKGM.js +150 -0
  102. package/dist/chunk-NHGBVLCD.js +210 -0
  103. package/dist/chunk-NOEBJMNN.js +33 -0
  104. package/dist/chunk-NQ2VNTGL.js +538 -0
  105. package/dist/chunk-O4PZPM6H.js +204 -0
  106. package/dist/chunk-O5OW3YGQ.js +262 -0
  107. package/dist/chunk-OJQTONDJ.js +171 -0
  108. package/dist/chunk-OKZGUHE5.js +76 -0
  109. package/dist/chunk-OOH5M36Q.js +448 -0
  110. package/dist/chunk-P5ARTZP2.js +128 -0
  111. package/dist/chunk-PKRSYS7F.js +402 -0
  112. package/dist/chunk-PQWO5D3F.js +348 -0
  113. package/dist/chunk-Q6MJIJ2O.js +1352 -0
  114. package/dist/chunk-QKDRYZ2N.js +231 -0
  115. package/dist/chunk-RAV356E6.js +30 -0
  116. package/dist/chunk-RK7EAA53.js +1157 -0
  117. package/dist/chunk-RSLVAYWS.js +192 -0
  118. package/dist/chunk-SL6WJP2Q.js +123 -0
  119. package/dist/chunk-T57DOVGE.js +97 -0
  120. package/dist/chunk-TMCKL43Q.js +181 -0
  121. package/dist/chunk-TQZABASE.js +97 -0
  122. package/dist/chunk-UBWBEY6I.js +81 -0
  123. package/dist/chunk-UP7DNYG7.js +456 -0
  124. package/dist/chunk-V5MGYIZS.js +70 -0
  125. package/dist/chunk-XCPVYQVK.js +336 -0
  126. package/dist/chunk-XWVBLZRP.js +50 -0
  127. package/dist/chunk-YBTN5F2U.js +1068 -0
  128. package/dist/chunk-Z772TGD2.js +54 -0
  129. package/dist/chunk-ZAMPIXLH.js +1350 -0
  130. package/dist/chunk-ZYEOHGU5.js +362 -0
  131. package/dist/co-activation-WJTFJOTK.js +73 -0
  132. package/dist/co-occurrence-KFP6ZS7G.js +94 -0
  133. package/dist/core-memory-DBZJ72TV.js +110 -0
  134. package/dist/crdt-sync-6DVGRMTV.js +33 -0
  135. package/dist/crm-webhook-55T4Z6XJ.js +10 -0
  136. package/dist/cto-delegation-gate-SPM6LAL2.js +279 -0
  137. package/dist/daemon-orchestration-XZLWWIV4.js +138 -0
  138. package/dist/db-backup-JHCI47JQ.js +37 -0
  139. package/dist/doc-graph-extractor-4X23NP4I.js +132 -0
  140. package/dist/dreaming-TFZDGA72.js +33 -0
  141. package/dist/exe-drift-TEM7ELNY.js +69 -0
  142. package/dist/exe-export-CRCA4T4S.js +75 -0
  143. package/dist/exe-import-UZMMWNHJ.js +78 -0
  144. package/dist/exe-key-NQQXEDUA.js +672 -0
  145. package/dist/exe-snapshot-P7PUAJTV.js +337 -0
  146. package/dist/fast-db-init-G63PRINQ.js +7 -0
  147. package/dist/gateway/index.js +8 -8
  148. package/dist/git-staleness-42TTCFDP.js +111 -0
  149. package/dist/git-task-sweep-4LW5RYYO.js +41 -0
  150. package/dist/global-procedures-BVFRWJAV.js +21 -0
  151. package/dist/graph-auto-extract-4ZA7UC6C.js +182 -0
  152. package/dist/hooks/bug-report-worker.js +11 -11
  153. package/dist/hooks/codex-stop-task-finalizer.js +11 -11
  154. package/dist/hooks/commit-complete.js +11 -11
  155. package/dist/hooks/error-recall.js +6 -6
  156. package/dist/hooks/exe-heartbeat-hook.js +3 -3
  157. package/dist/hooks/ingest.js +6 -6
  158. package/dist/hooks/instructions-loaded.js +4 -4
  159. package/dist/hooks/manifest.json +19 -19
  160. package/dist/hooks/notification.js +4 -4
  161. package/dist/hooks/post-compact.js +10 -10
  162. package/dist/hooks/post-tool-combined.js +5 -5
  163. package/dist/hooks/pre-compact.js +11 -11
  164. package/dist/hooks/pre-tool-use.js +14 -14
  165. package/dist/hooks/prompt-submit.js +21 -21
  166. package/dist/hooks/session-end.js +15 -15
  167. package/dist/hooks/session-start.js +12 -12
  168. package/dist/hooks/stop.js +14 -14
  169. package/dist/hooks/subagent-stop.js +10 -10
  170. package/dist/hooks/summary-worker.js +14 -14
  171. package/dist/index.js +17 -17
  172. package/dist/installer-CBGRTGIF.js +297 -0
  173. package/dist/installer-DGU4WZKJ.js +39 -0
  174. package/dist/installer-WTWEOSEK.js +343 -0
  175. package/dist/lib/cloud-sync.js +4 -4
  176. package/dist/lib/consolidation.js +7 -5
  177. package/dist/lib/database.js +2 -2
  178. package/dist/lib/db.js +2 -2
  179. package/dist/lib/employee-templates.js +4 -4
  180. package/dist/lib/employees.js +2 -2
  181. package/dist/lib/exe-daemon.js +64 -43
  182. package/dist/lib/hybrid-search.js +5 -5
  183. package/dist/lib/identity.js +2 -2
  184. package/dist/lib/messaging.js +9 -9
  185. package/dist/lib/reminders.js +3 -3
  186. package/dist/lib/schedules.js +5 -5
  187. package/dist/lib/session-registry.js +4 -4
  188. package/dist/lib/skill-learning.js +6 -6
  189. package/dist/lib/store.js +4 -4
  190. package/dist/lib/task-router.js +3 -3
  191. package/dist/lib/tasks.js +10 -10
  192. package/dist/lib/tmux-routing.js +8 -8
  193. package/dist/lib/token-spend.js +3 -3
  194. package/dist/license-gate-OSPA2OD7.js +16 -0
  195. package/dist/mcp/register-tools.js +55 -55
  196. package/dist/mcp/server.js +117 -73
  197. package/dist/mcp/tools/complete-reminder.js +4 -4
  198. package/dist/mcp/tools/create-reminder.js +4 -4
  199. package/dist/mcp/tools/create-task.js +12 -12
  200. package/dist/mcp/tools/deactivate-behavior.js +7 -7
  201. package/dist/mcp/tools/list-reminders.js +4 -4
  202. package/dist/mcp/tools/list-tasks.js +12 -12
  203. package/dist/mcp/tools/send-message.js +11 -11
  204. package/dist/mcp/tools/update-task.js +11 -11
  205. package/dist/mcp-http-config-OGFPLJYH.js +28 -0
  206. package/dist/memory-cards-GJ3VHKAM.js +179 -0
  207. package/dist/memory-graph-extractor-TCTCM7PZ.js +21 -0
  208. package/dist/memory-poisoning-defense-FVLGA35X.js +223 -0
  209. package/dist/memory-reflection-BYJFIFSV.js +243 -0
  210. package/dist/notifications-AQKZFSR3.js +46 -0
  211. package/dist/orchestration-events-RDSYLFXZ.js +26 -0
  212. package/dist/orchestrator-2JTJQLPG.js +34 -0
  213. package/dist/pipeline-router-HBSTKHG5.js +14 -0
  214. package/dist/plan-limits-GQENSNTG.js +27 -0
  215. package/dist/project-boot-W2LTP7WW.js +299 -0
  216. package/dist/projection-worker-ZMT5KNJJ.js +1084 -0
  217. package/dist/prospective-memory-LANRNOJX.js +231 -0
  218. package/dist/reranker-QGJO6EHO.js +19 -0
  219. package/dist/retrieval-health-JE66LJ3I.js +11 -0
  220. package/dist/review-polling-IXJ57M6Q.js +125 -0
  221. package/dist/runtime/index.js +11 -11
  222. package/dist/session-events-XKG66APL.js +37 -0
  223. package/dist/session-kill-telemetry-VTU7YBII.js +30 -0
  224. package/dist/session-scope-TQZONLZL.js +87 -0
  225. package/dist/setup-wizard-PXK6SC2D.js +12 -0
  226. package/dist/skill-refinement-Y6LLKYRL.js +158 -0
  227. package/dist/steward-gate-QV2APBFB.js +14 -0
  228. package/dist/task-enforcement-GLDD2W5D.js +505 -0
  229. package/dist/task-scope-HMPIP6XB.js +36 -0
  230. package/dist/tasks-crud-FH2SFCNQ.js +78 -0
  231. package/dist/tasks-notify-3ZW2GLCS.js +39 -0
  232. package/dist/tasks-review-XERV6KZD.js +48 -0
  233. package/dist/telemetry-upload-R77W7I7G.js +740 -0
  234. package/dist/token-budget-NA4WQAY6.js +85 -0
  235. package/dist/tool-telemetry-D4Q76LAS.js +17 -0
  236. package/dist/tui/App.js +16 -16
  237. package/dist/tui-data-NJSEIA2Q.js +259 -0
  238. package/dist/wiki-acl-RE5IR5VV.js +111 -0
  239. package/dist/worker-gate-VN2POPFL.js +21 -0
  240. package/dist/workflow-engine-D7ALMSDM.js +28 -0
  241. package/dist/worktree-6I45JV5N.js +27 -0
  242. package/dist/worktree-sweep-IMDR3XHT.js +20 -0
  243. package/package.json +1 -1
  244. package/release-notes.json +88 -88
@@ -0,0 +1,231 @@
1
+ import {
2
+ recordOrchestrationEventBestEffort
3
+ } from "./chunk-6IPJF5QD.js";
4
+ import {
5
+ atomicWriteJsonSync
6
+ } from "./chunk-LYH5HE24.js";
7
+
8
+ // src/lib/session-registry.ts
9
+ import { readFileSync, mkdirSync, existsSync, openSync, closeSync, writeSync, unlinkSync, constants } from "fs";
10
+ import { execFileSync } from "child_process";
11
+ import path from "path";
12
+ import os from "os";
13
+ var REGISTRY_PATH = path.join(os.homedir(), ".exe-os", "session-registry.json");
14
+ var REGISTRY_LOCK_PATH = `${REGISTRY_PATH}.lock`;
15
+ var REGISTRY_CACHE_TTL_MS = 100;
16
+ var registryCache = null;
17
+ function acquireRegistryLock() {
18
+ const dir = path.dirname(REGISTRY_PATH);
19
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
20
+ const data = JSON.stringify({ pid: process.pid, timestamp: Date.now() });
21
+ const deadline = Date.now() + 250;
22
+ while (Date.now() < deadline) {
23
+ try {
24
+ const fd = openSync(REGISTRY_LOCK_PATH, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL, 384);
25
+ writeSync(fd, data);
26
+ closeSync(fd);
27
+ return true;
28
+ } catch (err) {
29
+ if (err.code !== "EEXIST") return false;
30
+ try {
31
+ const lock = JSON.parse(readFileSync(REGISTRY_LOCK_PATH, "utf8"));
32
+ if (Date.now() - Number(lock.timestamp ?? 0) > 3e4) unlinkSync(REGISTRY_LOCK_PATH);
33
+ } catch {
34
+ try {
35
+ unlinkSync(REGISTRY_LOCK_PATH);
36
+ } catch {
37
+ }
38
+ }
39
+ }
40
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 25);
41
+ }
42
+ return false;
43
+ }
44
+ function releaseRegistryLock() {
45
+ try {
46
+ unlinkSync(REGISTRY_LOCK_PATH);
47
+ } catch {
48
+ }
49
+ }
50
+ function readSessionsUncached() {
51
+ try {
52
+ const raw = readFileSync(REGISTRY_PATH, "utf8");
53
+ return JSON.parse(raw);
54
+ } catch {
55
+ return [];
56
+ }
57
+ }
58
+ function writeSessions(sessions) {
59
+ atomicWriteJsonSync(REGISTRY_PATH, sessions);
60
+ registryCache = { at: Date.now(), sessions };
61
+ }
62
+ function registerSession(entry) {
63
+ const dir = path.dirname(REGISTRY_PATH);
64
+ if (!existsSync(dir)) {
65
+ mkdirSync(dir, { recursive: true });
66
+ }
67
+ const _locked = acquireRegistryLock();
68
+ try {
69
+ const sessions = readSessionsUncached();
70
+ const idx = sessions.findIndex((s) => s.windowName === entry.windowName);
71
+ if (idx >= 0) {
72
+ sessions[idx] = entry;
73
+ } else {
74
+ sessions.push(entry);
75
+ }
76
+ writeSessions(sessions);
77
+ } finally {
78
+ if (_locked) releaseRegistryLock();
79
+ }
80
+ recordOrchestrationEventBestEffort({
81
+ eventType: "registry.registered",
82
+ source: "session-registry.registerSession",
83
+ agentId: entry.agentId,
84
+ sessionScope: entry.parentExe,
85
+ tmuxSession: entry.windowName,
86
+ payload: { hasProjectDir: Boolean(entry.projectDir) }
87
+ });
88
+ }
89
+ function refreshSessionProject(windowName, projectDir) {
90
+ if (!acquireRegistryLock()) return;
91
+ try {
92
+ const sessions = readSessionsUncached();
93
+ const entry = sessions.find((s) => s.windowName === windowName);
94
+ if (!entry || entry.projectDir === projectDir) return;
95
+ entry.projectDir = projectDir;
96
+ writeSessions(sessions);
97
+ } catch {
98
+ } finally {
99
+ releaseRegistryLock();
100
+ }
101
+ }
102
+ function listSessions() {
103
+ const now = Date.now();
104
+ if (registryCache && now - registryCache.at < REGISTRY_CACHE_TTL_MS) {
105
+ return registryCache.sessions;
106
+ }
107
+ const sessions = readSessionsUncached();
108
+ registryCache = { at: now, sessions };
109
+ return sessions;
110
+ }
111
+ function pruneStaleSessions() {
112
+ if (!acquireRegistryLock()) return 0;
113
+ const sessions = readSessionsUncached();
114
+ if (sessions.length === 0) {
115
+ releaseRegistryLock();
116
+ return 0;
117
+ }
118
+ let liveSessions = [];
119
+ try {
120
+ liveSessions = execFileSync("tmux", ["list-sessions", "-F", "#{session_name}"], {
121
+ encoding: "utf8",
122
+ stdio: ["pipe", "pipe", "pipe"]
123
+ }).trim().split("\n").filter(Boolean);
124
+ } catch {
125
+ releaseRegistryLock();
126
+ return 0;
127
+ }
128
+ const liveSet = new Set(liveSessions);
129
+ const alive = sessions.filter((s) => liveSet.has(s.windowName));
130
+ const staleSessions = sessions.filter((s) => !liveSet.has(s.windowName));
131
+ if (staleSessions.length > 0) {
132
+ recordOrchestrationEventBestEffort({
133
+ eventType: "registry.missing_tmux",
134
+ source: "session-registry.pruneStaleSessions",
135
+ severity: "warn",
136
+ attempt: staleSessions.length,
137
+ payload: {
138
+ count: staleSessions.length,
139
+ examples: staleSessions.slice(0, 5).map((s) => s.windowName)
140
+ }
141
+ });
142
+ }
143
+ const pruned = sessions.length - alive.length;
144
+ if (pruned > 0) {
145
+ writeSessions(alive);
146
+ }
147
+ releaseRegistryLock();
148
+ return pruned;
149
+ }
150
+ function checkSessionRegistryConsistency(liveSessionsOverride) {
151
+ const sessions = listSessions();
152
+ const result = { missingTmux: 0, missingRegistry: 0 };
153
+ let liveSessions = liveSessionsOverride;
154
+ if (!liveSessions) {
155
+ try {
156
+ liveSessions = execFileSync("tmux", ["list-sessions", "-F", "#{session_name}"], {
157
+ encoding: "utf8",
158
+ stdio: ["pipe", "pipe", "pipe"]
159
+ }).trim().split("\n").filter(Boolean);
160
+ } catch {
161
+ return result;
162
+ }
163
+ }
164
+ const liveSet = new Set(liveSessions);
165
+ const registeredSet = new Set(sessions.map((s) => s.windowName));
166
+ const missingTmuxExamples = [];
167
+ const missingRegistryExamples = [];
168
+ for (const entry of sessions) {
169
+ if (liveSet.has(entry.windowName)) continue;
170
+ result.missingTmux++;
171
+ if (missingTmuxExamples.length < 5) missingTmuxExamples.push(entry.windowName);
172
+ }
173
+ for (const live of liveSessions) {
174
+ if (registeredSet.has(live)) continue;
175
+ if (!looksLikeExeOsSession(live)) continue;
176
+ result.missingRegistry++;
177
+ if (missingRegistryExamples.length < 5) missingRegistryExamples.push(live);
178
+ }
179
+ if (result.missingTmux > 0) {
180
+ recordOrchestrationEventBestEffort({
181
+ eventType: "registry.missing_tmux",
182
+ source: "session-registry.checkSessionRegistryConsistency",
183
+ severity: "warn",
184
+ attempt: result.missingTmux,
185
+ payload: {
186
+ count: result.missingTmux,
187
+ examples: missingTmuxExamples
188
+ }
189
+ });
190
+ }
191
+ if (result.missingRegistry > 0) {
192
+ recordOrchestrationEventBestEffort({
193
+ eventType: "registry.missing_entry",
194
+ source: "session-registry.checkSessionRegistryConsistency",
195
+ severity: "warn",
196
+ attempt: result.missingRegistry,
197
+ payload: {
198
+ count: result.missingRegistry,
199
+ examples: missingRegistryExamples
200
+ }
201
+ });
202
+ }
203
+ return result;
204
+ }
205
+ function looksLikeExeOsSession(sessionName) {
206
+ const coordName = getCoordinatorNameCached();
207
+ const escaped = coordName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
208
+ const coordPattern = new RegExp(`^${escaped}\\d*$`);
209
+ const employeePattern = new RegExp(`-${escaped}\\d*$`);
210
+ return coordPattern.test(sessionName) || employeePattern.test(sessionName);
211
+ }
212
+ function getCoordinatorNameCached() {
213
+ try {
214
+ const rosterPath = path.join(os.homedir(), ".exe-os", "exe-employees.json");
215
+ if (existsSync(rosterPath)) {
216
+ const roster = JSON.parse(readFileSync(rosterPath, "utf8"));
217
+ const coo = roster.find((e) => (e.role ?? "").toUpperCase() === "COO");
218
+ if (coo?.name) return coo.name;
219
+ }
220
+ } catch {
221
+ }
222
+ return "exe";
223
+ }
224
+
225
+ export {
226
+ registerSession,
227
+ refreshSessionProject,
228
+ listSessions,
229
+ pruneStaleSessions,
230
+ checkSessionRegistryConsistency
231
+ };
@@ -0,0 +1,30 @@
1
+ import {
2
+ createReminder
3
+ } from "./chunk-TMCKL43Q.js";
4
+
5
+ // src/mcp/tools/create-reminder.ts
6
+ import { z } from "zod";
7
+ function registerCreateReminder(server) {
8
+ server.registerTool(
9
+ "create_reminder",
10
+ {
11
+ title: "Create Reminder",
12
+ description: "Set a reminder for the founder. Shown in the boot brief every session.",
13
+ inputSchema: {
14
+ text: z.string().describe("What to remind about"),
15
+ due_date: z.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent")
16
+ }
17
+ },
18
+ async ({ text, due_date }) => {
19
+ const reminder = await createReminder(text, due_date);
20
+ const dueStr = reminder.dueDate ? ` (due: ${reminder.dueDate})` : "";
21
+ return {
22
+ content: [{ type: "text", text: `Reminder set: "${reminder.text}"${dueStr}` }]
23
+ };
24
+ }
25
+ );
26
+ }
27
+
28
+ export {
29
+ registerCreateReminder
30
+ };