@askexenow/exe-os 0.9.136 → 0.9.138

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 (195) hide show
  1. package/dist/{agentic-ontology-2TD5YS4O.js → agentic-ontology-TU2FNTHI.js} +1 -1
  2. package/dist/{backfill-metadata-5LNLRCA6.js → backfill-metadata-LVUAD6WY.js} +3 -3
  3. package/dist/{behaviors-PPFGGHYD.js → behaviors-V3O5YYUK.js} +2 -2
  4. package/dist/bin/agentic-ontology-backfill.js +4 -4
  5. package/dist/bin/agentic-reflection-backfill.js +5 -5
  6. package/dist/bin/agentic-semantic-label.js +4 -4
  7. package/dist/bin/backfill-conversations.js +3 -3
  8. package/dist/bin/backfill-responses.js +3 -3
  9. package/dist/bin/backfill-vectors.js +3 -3
  10. package/dist/bin/bulk-sync-postgres.js +5 -5
  11. package/dist/bin/cleanup-stale-review-tasks.js +5 -4
  12. package/dist/bin/cli.js +54 -11
  13. package/dist/bin/exe-agent.js +10 -10
  14. package/dist/bin/exe-assign.js +3 -3
  15. package/dist/bin/exe-boot.js +10 -9
  16. package/dist/bin/exe-call.js +3 -3
  17. package/dist/bin/exe-cloud.js +3 -3
  18. package/dist/bin/exe-dispatch.js +6 -5
  19. package/dist/bin/exe-doctor.js +1 -1
  20. package/dist/bin/exe-export-behaviors.js +6 -6
  21. package/dist/bin/exe-forget.js +5 -5
  22. package/dist/bin/exe-gateway.js +3 -3
  23. package/dist/bin/exe-heartbeat.js +5 -4
  24. package/dist/bin/exe-kill.js +5 -5
  25. package/dist/bin/exe-launch-agent.js +48 -14
  26. package/dist/bin/exe-new-employee.js +5 -5
  27. package/dist/bin/exe-pending-messages.js +6 -5
  28. package/dist/bin/exe-pending-notifications.js +5 -4
  29. package/dist/bin/exe-pending-reviews.js +5 -4
  30. package/dist/bin/exe-rename.js +3 -3
  31. package/dist/bin/exe-review.js +4 -4
  32. package/dist/bin/exe-search.js +4 -4
  33. package/dist/bin/exe-session-cleanup.js +9 -8
  34. package/dist/bin/exe-settings.js +3 -3
  35. package/dist/bin/exe-start-codex.js +7 -7
  36. package/dist/bin/exe-start-opencode.js +6 -6
  37. package/dist/bin/exe-status.js +6 -6
  38. package/dist/bin/exe-team.js +2 -2
  39. package/dist/bin/git-sweep.js +5 -4
  40. package/dist/bin/graph-backfill.js +3 -3
  41. package/dist/bin/graph-export.js +4 -4
  42. package/dist/bin/install.js +3 -3
  43. package/dist/bin/intercom-check.js +4 -4
  44. package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
  45. package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
  46. package/dist/bin/scan-tasks.js +10 -9
  47. package/dist/bin/setup.js +1 -1
  48. package/dist/bin/shard-migrate.js +3 -3
  49. package/dist/branding-JEE7MJF2.js +99 -0
  50. package/dist/{capacity-monitor-PFHHXTEN.js → capacity-monitor-56DTRWOS.js} +6 -5
  51. package/dist/{catchup-brief-Y75GOHWU.js → catchup-brief-6GRGQ2EK.js} +7 -6
  52. package/dist/{chunk-ZJ7N6BNZ.js → chunk-2G6QGXVX.js} +21 -0
  53. package/dist/{chunk-S67DRFRK.js → chunk-2ISCJ5PQ.js} +1 -1
  54. package/dist/{chunk-5NLZS5KX.js → chunk-5QCIPC7Z.js} +2 -2
  55. package/dist/{chunk-VIONSYFC.js → chunk-7FYOTSJP.js} +1 -1
  56. package/dist/{chunk-3BVZNKAZ.js → chunk-7GOVGBBM.js} +3 -3
  57. package/dist/{chunk-T65APBMF.js → chunk-7TW5HR4E.js} +39 -21
  58. package/dist/{chunk-YMMTBQQY.js → chunk-7V3BJHG6.js} +2 -2
  59. package/dist/{chunk-DIQOUMHM.js → chunk-ABIGFAFY.js} +1 -1
  60. package/dist/{chunk-MPZRPM5X.js → chunk-AHQDWRSM.js} +1 -1
  61. package/dist/{chunk-KHUJEI3A.js → chunk-BOPKW4AV.js} +1 -1
  62. package/dist/{chunk-3UKHLUXH.js → chunk-BQ5YXRBI.js} +1 -1
  63. package/dist/{chunk-TXRDECEW.js → chunk-BUHXM7ZL.js} +3 -3
  64. package/dist/{chunk-5DZTDWFU.js → chunk-BYNEC472.js} +1 -1
  65. package/dist/{chunk-X3KJ3TT7.js → chunk-E6ORBQHP.js} +1 -0
  66. package/dist/{chunk-XDWCEQLH.js → chunk-EBMHOMN2.js} +6 -6
  67. package/dist/{chunk-GISRZK6K.js → chunk-EZ2TJX6O.js} +19 -3
  68. package/dist/{chunk-ZNWYU3VE.js → chunk-EZTYTAVU.js} +8 -8
  69. package/dist/{chunk-E2XB56OH.js → chunk-F63ZHBZY.js} +1 -1
  70. package/dist/{chunk-CTEENZVZ.js → chunk-FQZY4M45.js} +20 -3
  71. package/dist/{chunk-ARZWYVYC.js → chunk-GRLQJ27R.js} +1 -1
  72. package/dist/{chunk-D7FYU6DX.js → chunk-I2LCIAUC.js} +2 -2
  73. package/dist/{chunk-UXGZ3V3U.js → chunk-ITMXM6GF.js} +1 -1
  74. package/dist/{chunk-FM4UBRBE.js → chunk-JN2RIMLI.js} +3 -3
  75. package/dist/{chunk-ARQQ4T47.js → chunk-K7W7UJ6Z.js} +1 -1
  76. package/dist/{chunk-NBJIGVPG.js → chunk-LEVPSCVX.js} +43 -7
  77. package/dist/{chunk-AVUQCUZC.js → chunk-LPIY2AUD.js} +1 -1
  78. package/dist/{chunk-GU2Z6K2T.js → chunk-MQNM4FW4.js} +3 -2
  79. package/dist/{chunk-O2ENLWKX.js → chunk-MSFSQSJO.js} +1 -1
  80. package/dist/{chunk-NSVI6RZ5.js → chunk-N2ZX27ID.js} +1 -1
  81. package/dist/{chunk-5DHM77JE.js → chunk-NBYMO4RZ.js} +2 -0
  82. package/dist/{chunk-A63V4QMR.js → chunk-NFMNO3XE.js} +732 -544
  83. package/dist/{chunk-4ADWX7S6.js → chunk-OVFU26ZD.js} +5 -5
  84. package/dist/{chunk-5XNCH6UM.js → chunk-OZ4SN7ZF.js} +1 -1
  85. package/dist/{chunk-REFUKSCU.js → chunk-PB5RHF74.js} +2 -2
  86. package/dist/{chunk-QKBDAHFM.js → chunk-PFGFOALA.js} +1 -1
  87. package/dist/chunk-PKPW2W33.js +134 -0
  88. package/dist/{chunk-IMZM3H6N.js → chunk-R3IILARI.js} +2 -2
  89. package/dist/{chunk-VAPODXIB.js → chunk-T5A4EGUG.js} +1 -1
  90. package/dist/{chunk-TERS54YJ.js → chunk-TIJYLKNW.js} +1 -1
  91. package/dist/{chunk-WQ6FW5JD.js → chunk-TRLP7FHS.js} +1 -1
  92. package/dist/{chunk-IUKRBQ2B.js → chunk-TT3ND3MM.js} +2 -2
  93. package/dist/{chunk-NR3MPNTF.js → chunk-UT3OZWST.js} +8 -8
  94. package/dist/{chunk-XK3P2PRN.js → chunk-VGOFRIAI.js} +2 -2
  95. package/dist/{chunk-NFRFF6QS.js → chunk-VOA7GHIO.js} +1 -1
  96. package/dist/{chunk-J7LFCZMQ.js → chunk-WTPYZG4I.js} +65 -15
  97. package/dist/{chunk-G2HJSPM4.js → chunk-Z36IJ3XX.js} +2 -2
  98. package/dist/{chunk-W7G2DOLC.js → chunk-ZKOQD4FT.js} +5 -5
  99. package/dist/core-memory-DUENM2P6.js +79 -0
  100. package/dist/{crdt-sync-UUJDUXTJ.js → crdt-sync-SENINDKP.js} +1 -1
  101. package/dist/{crm-webhook-UXZORR4I.js → crm-webhook-JIXOP3UR.js} +2 -2
  102. package/dist/{cto-delegation-gate-7MIMXB4T.js → cto-delegation-gate-5ETBWFAI.js} +4 -3
  103. package/dist/{daemon-orchestration-FIL7U2RV.js → daemon-orchestration-6UNZTZHX.js} +10 -6
  104. package/dist/{entity-boost-CSKKVLPV.js → entity-boost-CZZVTBSY.js} +79 -0
  105. package/dist/{exe-drift-D7YCMMR3.js → exe-drift-WLMWMSOM.js} +3 -3
  106. package/dist/{exe-export-YKP26EW6.js → exe-export-3RQMZAR3.js} +5 -5
  107. package/dist/{exe-import-HSQORBEH.js → exe-import-URXIQGOM.js} +5 -5
  108. package/dist/{exe-key-QLXFQGNV.js → exe-key-47ZUWMGT.js} +1 -1
  109. package/dist/{fast-db-init-RFYRERZL.js → fast-db-init-Z67ITX23.js} +1 -1
  110. package/dist/gateway/index.js +8 -8
  111. package/dist/{gateway-client-APTYJNCL.js → gateway-client-VFKE2WJX.js} +1 -1
  112. package/dist/{git-staleness-2IBA7MM2.js → git-staleness-PP7MPTZS.js} +1 -1
  113. package/dist/{git-task-sweep-ZZQHHVXR.js → git-task-sweep-TMVL5UUD.js} +5 -4
  114. package/dist/{global-procedures-6B5JT3B5.js → global-procedures-OQFOUA5G.js} +2 -2
  115. package/dist/hooks/bug-report-worker.js +8 -7
  116. package/dist/hooks/codex-stop-task-finalizer.js +8 -7
  117. package/dist/hooks/commit-complete.js +7 -6
  118. package/dist/hooks/error-recall.js +4 -4
  119. package/dist/hooks/ingest.js +2 -2
  120. package/dist/hooks/instructions-loaded.js +3 -3
  121. package/dist/hooks/notification.js +1 -1
  122. package/dist/hooks/post-compact.js +5 -4
  123. package/dist/hooks/post-tool-combined.js +3 -3
  124. package/dist/hooks/pre-compact.js +6 -5
  125. package/dist/hooks/pre-tool-use.js +9 -8
  126. package/dist/hooks/prompt-submit.js +12 -11
  127. package/dist/hooks/session-end.js +10 -9
  128. package/dist/hooks/session-start.js +4 -4
  129. package/dist/hooks/stop.js +8 -7
  130. package/dist/hooks/subagent-stop.js +5 -4
  131. package/dist/hooks/summary-worker.js +8 -7
  132. package/dist/index.js +13 -12
  133. package/dist/{installer-GDMELU5L.js → installer-RVGGMXQU.js} +4 -4
  134. package/dist/{installer-EIUTCCHV.js → installer-RVLKWR3X.js} +2 -2
  135. package/dist/{installer-WZEN2XJ7.js → installer-V7BGTU55.js} +2 -2
  136. package/dist/lib/cloud-sync.js +3 -3
  137. package/dist/lib/consolidation.js +4 -4
  138. package/dist/lib/database.js +1 -1
  139. package/dist/lib/db.js +1 -1
  140. package/dist/lib/employee-templates.js +3 -3
  141. package/dist/lib/exe-daemon.js +103 -21
  142. package/dist/lib/hybrid-search.js +4 -4
  143. package/dist/lib/identity.js +2 -2
  144. package/dist/lib/messaging.js +5 -4
  145. package/dist/lib/reminders.js +2 -2
  146. package/dist/lib/schedules.js +4 -4
  147. package/dist/lib/skill-learning.js +3 -3
  148. package/dist/lib/store.js +3 -3
  149. package/dist/lib/tasks.js +7 -6
  150. package/dist/lib/tmux-routing.js +4 -3
  151. package/dist/lib/token-spend.js +2 -2
  152. package/dist/lib/ws-client.js +1 -1
  153. package/dist/mcp/register-tools.js +45 -45
  154. package/dist/mcp/server.js +45 -45
  155. package/dist/mcp/tools/complete-reminder.js +3 -3
  156. package/dist/mcp/tools/create-reminder.js +3 -3
  157. package/dist/mcp/tools/create-task.js +8 -7
  158. package/dist/mcp/tools/deactivate-behavior.js +3 -3
  159. package/dist/mcp/tools/list-reminders.js +3 -3
  160. package/dist/mcp/tools/list-tasks.js +8 -7
  161. package/dist/mcp/tools/send-message.js +6 -5
  162. package/dist/mcp/tools/update-task.js +8 -7
  163. package/dist/{memory-cards-MA5SIQKN.js → memory-cards-H2GNWDF2.js} +1 -1
  164. package/dist/{memory-reflection-VHCEW3UN.js → memory-reflection-J3LYZM5Y.js} +1 -1
  165. package/dist/{notifications-NY2OVCDV.js → notifications-3ZZS36PK.js} +4 -3
  166. package/dist/{orchestrator-ZVOTKKV6.js → orchestrator-W7XYR7EZ.js} +6 -5
  167. package/dist/{plan-limits-UQTXKXJQ.js → plan-limits-3FXBGHWT.js} +2 -2
  168. package/dist/{projection-worker-UL47LRTS.js → projection-worker-XGV76EMZ.js} +1 -1
  169. package/dist/push-notifications-S4QIZWJI.js +17 -0
  170. package/dist/runtime/index.js +11 -10
  171. package/dist/{session-events-DU6PKAJN.js → session-events-27MUL77I.js} +5 -4
  172. package/dist/{session-kill-telemetry-5XGSTQJS.js → session-kill-telemetry-WVFJ4U3A.js} +2 -2
  173. package/dist/{session-scope-WJRSCUKP.js → session-scope-QZTSCYLT.js} +5 -4
  174. package/dist/{setup-wizard-36V5GCGG.js → setup-wizard-JEYXHYVS.js} +1 -1
  175. package/dist/{task-scope-7XCYEZAG.js → task-scope-2L5DLU6T.js} +4 -3
  176. package/dist/{tasks-crud-DUNJJUV3.js → tasks-crud-MDCY6JHU.js} +5 -4
  177. package/dist/{tasks-review-BPSW2TBZ.js → tasks-review-QO55FYZI.js} +4 -3
  178. package/dist/{tool-gates-CAFAD576.js → tool-gates-FSNGZNXW.js} +1 -1
  179. package/dist/{tool-gates-5IWU2EVV.js → tool-gates-P6HATVYH.js} +1 -1
  180. package/dist/{tool-telemetry-Q6ZSUTHS.js → tool-telemetry-NW6HQYPA.js} +1 -1
  181. package/dist/tui/App.js +13 -12
  182. package/dist/{tui-data-GUMMW3IG.js → tui-data-6CKBIJJJ.js} +4 -3
  183. package/dist/{workflow-engine-A6K4MHN3.js → workflow-engine-7W4MSNBF.js} +1 -1
  184. package/package.json +2 -1
  185. package/release-notes.json +33343 -0
  186. package/dist/{chunk-M6ODLM7X.js → chunk-2FWMSQWU.js} +0 -0
  187. package/dist/{chunk-4AZA3DZM.js → chunk-6AJ4KAAB.js} +0 -0
  188. package/dist/{chunk-7U65IF2W.js → chunk-DLMPVZ4I.js} +0 -0
  189. package/dist/{chunk-KQW5PWOA.js → chunk-F3MUSAZY.js} +3 -3
  190. /package/dist/{chunk-KI3UEJUR.js → chunk-G3LVAJON.js} +0 -0
  191. /package/dist/{chunk-M6FENV7U.js → chunk-GMARURIG.js} +0 -0
  192. /package/dist/{chunk-FR5FFQ6G.js → chunk-KJMSHBWT.js} +0 -0
  193. /package/dist/{chunk-RCKUCKED.js → chunk-N6BE2CUT.js} +0 -0
  194. /package/dist/{chunk-6ZXIG7R6.js → chunk-WZ63HFR2.js} +0 -0
  195. /package/dist/{wiki-acl-QY5EXWEQ.js → wiki-acl-RVCO4WSP.js} +0 -0
@@ -1,18 +1,22 @@
1
+ import {
2
+ getToolCapabilityIndex
3
+ } from "./chunk-ISPV5JR2.js";
1
4
  import {
2
5
  getCachedLicenseGate
3
6
  } from "./chunk-JXYZVTBX.js";
4
7
  import {
5
8
  getToolUsageStats
6
- } from "./chunk-M6FENV7U.js";
9
+ } from "./chunk-GMARURIG.js";
7
10
  import {
8
11
  AUTO_WAKE_MAX_RETRIES
9
- } from "./chunk-T65APBMF.js";
12
+ } from "./chunk-7TW5HR4E.js";
10
13
  import {
11
- getToolCapabilityIndex
12
- } from "./chunk-ISPV5JR2.js";
14
+ isToolAllowed,
15
+ isToolAllowedForPlan
16
+ } from "./chunk-E6ORBQHP.js";
13
17
  import {
14
18
  listRecentSessionEvents
15
- } from "./chunk-O2ENLWKX.js";
19
+ } from "./chunk-MSFSQSJO.js";
16
20
  import {
17
21
  isRerankerAvailable,
18
22
  rerankWithScores
@@ -25,10 +29,6 @@ import {
25
29
  getRelationships,
26
30
  searchEntities
27
31
  } from "./chunk-6LKDJ5WX.js";
28
- import {
29
- isToolAllowed,
30
- isToolAllowedForPlan
31
- } from "./chunk-X3KJ3TT7.js";
32
32
  import {
33
33
  analyzeBlastRadius,
34
34
  buildCodeContextIndex,
@@ -42,10 +42,10 @@ import {
42
42
  exportOrchestration,
43
43
  importOrchestration,
44
44
  validatePackage
45
- } from "./chunk-G2HJSPM4.js";
45
+ } from "./chunk-Z36IJ3XX.js";
46
46
  import {
47
47
  runDriftProbes
48
- } from "./chunk-TERS54YJ.js";
48
+ } from "./chunk-TIJYLKNW.js";
49
49
  import {
50
50
  loadOrchestrationPhase,
51
51
  setOrchestrationPhase
@@ -53,52 +53,52 @@ import {
53
53
  import {
54
54
  createOrRefreshResumeTask,
55
55
  init_capacity_monitor
56
- } from "./chunk-TXRDECEW.js";
56
+ } from "./chunk-BUHXM7ZL.js";
57
57
  import {
58
58
  registerCompleteReminder
59
- } from "./chunk-S67DRFRK.js";
59
+ } from "./chunk-2ISCJ5PQ.js";
60
60
  import {
61
61
  registerDeactivateBehavior
62
- } from "./chunk-YMMTBQQY.js";
62
+ } from "./chunk-7V3BJHG6.js";
63
63
  import {
64
64
  registerSendMessage
65
- } from "./chunk-E2XB56OH.js";
65
+ } from "./chunk-F63ZHBZY.js";
66
66
  import {
67
67
  registerCreateTask
68
- } from "./chunk-3BVZNKAZ.js";
68
+ } from "./chunk-7GOVGBBM.js";
69
69
  import {
70
70
  registerListTasks
71
- } from "./chunk-IUKRBQ2B.js";
71
+ } from "./chunk-TT3ND3MM.js";
72
72
  import {
73
73
  registerUpdateTask
74
- } from "./chunk-FM4UBRBE.js";
74
+ } from "./chunk-JN2RIMLI.js";
75
75
  import {
76
76
  registerCreateReminder
77
- } from "./chunk-NFRFF6QS.js";
77
+ } from "./chunk-VOA7GHIO.js";
78
78
  import {
79
79
  registerListReminders
80
- } from "./chunk-AVUQCUZC.js";
80
+ } from "./chunk-LPIY2AUD.js";
81
81
  import {
82
82
  completeReminder,
83
83
  createReminder,
84
84
  listReminders
85
- } from "./chunk-QKBDAHFM.js";
85
+ } from "./chunk-PFGFOALA.js";
86
86
  import {
87
87
  status
88
- } from "./chunk-ZNWYU3VE.js";
88
+ } from "./chunk-EZTYTAVU.js";
89
89
  import {
90
90
  TOKENS_PER_IDLE_MINUTE,
91
91
  countKillsSince,
92
92
  init_session_kill_telemetry,
93
93
  sumTokensSavedSince
94
- } from "./chunk-ARQQ4T47.js";
94
+ } from "./chunk-K7W7UJ6Z.js";
95
95
  import {
96
96
  getAgentSpend
97
- } from "./chunk-5DZTDWFU.js";
97
+ } from "./chunk-BYNEC472.js";
98
98
  import {
99
99
  createSchedule,
100
100
  parseHumanCron
101
- } from "./chunk-XK3P2PRN.js";
101
+ } from "./chunk-VGOFRIAI.js";
102
102
  import {
103
103
  exportGraphHTML,
104
104
  generateGraphReport
@@ -110,7 +110,7 @@ import {
110
110
  import {
111
111
  formatReport,
112
112
  runAudit
113
- } from "./chunk-MPZRPM5X.js";
113
+ } from "./chunk-AHQDWRSM.js";
114
114
  import {
115
115
  runHealthCheck
116
116
  } from "./chunk-XEZ64YCS.js";
@@ -123,27 +123,27 @@ import {
123
123
  findSimilarTrajectories,
124
124
  hashSignature,
125
125
  init_skill_learning
126
- } from "./chunk-5NLZS5KX.js";
126
+ } from "./chunk-5QCIPC7Z.js";
127
127
  import {
128
128
  deactivateBehavior,
129
129
  init_behaviors,
130
130
  listBehaviorsByDomain,
131
131
  storeBehavior
132
- } from "./chunk-NSVI6RZ5.js";
132
+ } from "./chunk-N2ZX27ID.js";
133
133
  import {
134
134
  countUnconsolidated,
135
135
  groupMemories,
136
136
  runConsolidation,
137
137
  selectUnconsolidated
138
- } from "./chunk-GU2Z6K2T.js";
138
+ } from "./chunk-MQNM4FW4.js";
139
139
  import {
140
140
  renderClientCOOTemplate
141
- } from "./chunk-VIONSYFC.js";
141
+ } from "./chunk-7FYOTSJP.js";
142
142
  import {
143
143
  deactivateGlobalProcedure,
144
144
  loadGlobalProcedures,
145
145
  storeGlobalProcedure
146
- } from "./chunk-3UKHLUXH.js";
146
+ } from "./chunk-BQ5YXRBI.js";
147
147
  import {
148
148
  PLATFORM_PROCEDURES
149
149
  } from "./chunk-N7GFMJSF.js";
@@ -152,7 +152,7 @@ import {
152
152
  cloudSync,
153
153
  getCloudReuploadRequired,
154
154
  markCloudReuploadRequired
155
- } from "./chunk-NBJIGVPG.js";
155
+ } from "./chunk-LEVPSCVX.js";
156
156
  import {
157
157
  createARecord
158
158
  } from "./chunk-X2Z5GT3V.js";
@@ -168,15 +168,15 @@ import {
168
168
  import {
169
169
  init_tasks,
170
170
  updateTask
171
- } from "./chunk-J7LFCZMQ.js";
171
+ } from "./chunk-WTPYZG4I.js";
172
172
  import {
173
173
  fastDbInit
174
- } from "./chunk-FR5FFQ6G.js";
174
+ } from "./chunk-KJMSHBWT.js";
175
175
  import {
176
176
  getIdentity,
177
177
  listIdentities,
178
178
  updateIdentity
179
- } from "./chunk-KHUJEI3A.js";
179
+ } from "./chunk-BOPKW4AV.js";
180
180
  import {
181
181
  MAX_CONCURRENT_WORKERS
182
182
  } from "./chunk-BI3COBMQ.js";
@@ -187,7 +187,7 @@ import {
187
187
  import {
188
188
  hybridSearch,
189
189
  recentRecords
190
- } from "./chunk-XDWCEQLH.js";
190
+ } from "./chunk-EBMHOMN2.js";
191
191
  import {
192
192
  getActiveAgent
193
193
  } from "./chunk-TCOTFMDP.js";
@@ -198,11 +198,11 @@ import {
198
198
  reserveVersions,
199
199
  vectorToBlob,
200
200
  writeMemory
201
- } from "./chunk-4ADWX7S6.js";
201
+ } from "./chunk-OVFU26ZD.js";
202
202
  import {
203
203
  resolveTask,
204
204
  writeCheckpoint
205
- } from "./chunk-GISRZK6K.js";
205
+ } from "./chunk-EZ2TJX6O.js";
206
206
  import {
207
207
  init_task_scope,
208
208
  init_tmux_routing,
@@ -210,7 +210,7 @@ import {
210
210
  sessionScopeFilter,
211
211
  strictSessionScopeFilter,
212
212
  tmux_routing_exports
213
- } from "./chunk-CTEENZVZ.js";
213
+ } from "./chunk-FQZY4M45.js";
214
214
  import {
215
215
  init_session_registry,
216
216
  listSessions
@@ -234,7 +234,7 @@ import {
234
234
  assertFeature,
235
235
  assertMemoryLimit,
236
236
  init_plan_limits
237
- } from "./chunk-ARZWYVYC.js";
237
+ } from "./chunk-GRLQJ27R.js";
238
238
  import {
239
239
  getAccountByName,
240
240
  getDefaultAccount
@@ -243,14 +243,14 @@ import {
243
243
  createNewTrigger,
244
244
  isScheduledTrigger,
245
245
  loadTriggers
246
- } from "./chunk-RCKUCKED.js";
246
+ } from "./chunk-N6BE2CUT.js";
247
247
  import {
248
248
  pushConversationToCRM
249
249
  } from "./chunk-GCNWCYJI.js";
250
250
  import {
251
251
  getClient,
252
252
  init_database
253
- } from "./chunk-ZJ7N6BNZ.js";
253
+ } from "./chunk-2G6QGXVX.js";
254
254
  import {
255
255
  EMPLOYEES_PATH,
256
256
  addEmployee,
@@ -317,7 +317,7 @@ function applyRetrievalMode(base, mode) {
317
317
  const next = { ...base };
318
318
  switch (mode) {
319
319
  case "decisions_only":
320
- next.memoryTypes = ["decision", "adr"];
320
+ next.memoryTypes = ["decision", "adr", "constraint", "goal"];
321
321
  next.includeRaw = false;
322
322
  break;
323
323
  case "behaviors_only":
@@ -336,7 +336,7 @@ function applyRetrievalMode(base, mode) {
336
336
  next.includeRaw = false;
337
337
  break;
338
338
  case "recent_high_value":
339
- next.memoryTypes = ["decision", "adr", "behavior", "procedure"];
339
+ next.memoryTypes = ["decision", "adr", "behavior", "procedure", "insight", "skill", "fact"];
340
340
  next.includeRaw = false;
341
341
  break;
342
342
  default:
@@ -720,10 +720,11 @@ function registerCommitMemory(server) {
720
720
  current_state: z4.string().optional().describe("What is true NOW \u2014 snapshot of current system state"),
721
721
  historical_context: z4.string().optional().describe("What led here \u2014 decisions, trade-offs, prior approaches"),
722
722
  importance: z4.number().min(1).max(10).optional().describe("Override importance (default 9)"),
723
- supersedes_id: z4.string().optional().describe("UUID of memory this replaces \u2014 old memory will be archived")
723
+ supersedes_id: z4.string().optional().describe("UUID of memory this replaces \u2014 old memory will be archived"),
724
+ kind: z4.enum(["decision", "procedure", "observation", "fact", "preference", "skill", "constraint", "insight", "correction", "goal", "episode", "context", "relationship"]).optional().describe("Semantic memory type. Defaults to 'decision' for coordinators, 'observation' for others. Enables typed retrieval via recall(kind=X).")
724
725
  }
725
726
  },
726
- async ({ summary, project, key_decisions, metadata_tags, topic, current_state, historical_context, importance: importanceOverride, supersedes_id }) => {
727
+ async ({ summary, project, key_decisions, metadata_tags, topic, current_state, historical_context, importance: importanceOverride, supersedes_id, kind }) => {
727
728
  const { agentId, agentRole } = getActiveAgent();
728
729
  const parts = [`CONTEXT COMMIT [${agentId}]:`, ""];
729
730
  if (topic) parts.push(`## ${topic}`, "");
@@ -753,7 +754,7 @@ function registerCommitMemory(server) {
753
754
  }
754
755
  const memoryId = crypto2.randomUUID();
755
756
  await assertMemoryLimit();
756
- const memoryType = canCoordinate(agentId, agentRole) ? "adr" : "raw";
757
+ const memoryType = kind ?? (canCoordinate(agentId, agentRole) ? "decision" : "observation");
757
758
  await writeMemory({
758
759
  id: memoryId,
759
760
  agent_id: agentId,
@@ -1366,7 +1367,10 @@ var ACTION_TO_LEGACY_TOOL = {
1366
1367
  get_by_id: "get_memory_by_id",
1367
1368
  consolidate: "consolidate_memories",
1368
1369
  cardinality: "get_memory_cardinality",
1369
- supersede: "__inline_supersede__"
1370
+ supersede: "__inline_supersede__",
1371
+ core_get: "__inline_core__",
1372
+ core_set: "__inline_core__",
1373
+ core_delete: "__inline_core__"
1370
1374
  };
1371
1375
  var REQUIRED_FIELDS = {
1372
1376
  recall: [],
@@ -1378,7 +1382,12 @@ var REQUIRED_FIELDS = {
1378
1382
  get_by_id: ["id"],
1379
1383
  consolidate: [],
1380
1384
  cardinality: [],
1381
- supersede: ["old_id", "text"]
1385
+ supersede: ["old_id", "text"],
1386
+ core_get: [],
1387
+ core_set: ["query"],
1388
+ // query = key, text = value
1389
+ core_delete: ["query"]
1390
+ // query = key
1382
1391
  };
1383
1392
  function errorResult(text3) {
1384
1393
  return {
@@ -1474,7 +1483,7 @@ function registerMemory(server) {
1474
1483
  title: "Memory",
1475
1484
  description: "Consolidated memory domain tool. Actions: recall, ask_team, store, commit, search, session_context, get_by_id, consolidate, cardinality, supersede. Legacy memory tools remain available during migration.",
1476
1485
  inputSchema: {
1477
- action: z10.enum(["recall", "ask_team", "store", "commit", "search", "session_context", "consolidate", "cardinality", "supersede"]).describe("Memory operation to perform"),
1486
+ action: z10.enum(["recall", "ask_team", "store", "commit", "search", "session_context", "consolidate", "cardinality", "supersede", "core_get", "core_set", "core_delete"]).describe("Memory operation to perform. core_get/core_set/core_delete manage always-in-context key facts."),
1478
1487
  query: z10.string().optional().describe("Search query. Also accepted as store text alias."),
1479
1488
  text: z10.string().optional().describe("Memory text for action=store"),
1480
1489
  summary: z10.string().optional().describe("High-importance summary for action=commit"),
@@ -1523,6 +1532,29 @@ function registerMemory(server) {
1523
1532
  if (action === "supersede") {
1524
1533
  return handleSupersede(input);
1525
1534
  }
1535
+ if (action === "core_get" || action === "core_set" || action === "core_delete") {
1536
+ const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-EFZ6YZIM.js");
1537
+ const { agentId } = getActiveAgent2();
1538
+ const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-DUENM2P6.js");
1539
+ if (action === "core_get") {
1540
+ const entries = await getCoreMemory(agentId);
1541
+ const block = formatCoreMemoryBlock(entries);
1542
+ return { content: [{ type: "text", text: block ?? "No core memory entries." }] };
1543
+ }
1544
+ if (action === "core_set") {
1545
+ const key = input.query;
1546
+ const value = input.text ?? "";
1547
+ if (!key || !value) return errorResult("core_set requires query (key) and text (value)");
1548
+ await setCoreMemory(agentId, key, value);
1549
+ return { content: [{ type: "text", text: `Core memory set: **${key}** = ${value}` }] };
1550
+ }
1551
+ if (action === "core_delete") {
1552
+ const key = input.query;
1553
+ if (!key) return errorResult("core_delete requires query (key)");
1554
+ const deleted = await deleteCoreMemory(agentId, key);
1555
+ return { content: [{ type: "text", text: deleted ? `Core memory deleted: ${key}` : `Key "${key}" not found` }] };
1556
+ }
1557
+ }
1526
1558
  const { action: _action, ...legacyArgs } = input;
1527
1559
  const missing = missingRequiredFields(legacyArgs, REQUIRED_FIELDS[action]);
1528
1560
  if (missing.length > 0) {
@@ -2009,7 +2041,7 @@ function registerResumeEmployee(server) {
2009
2041
  };
2010
2042
  }
2011
2043
  try {
2012
- const { isTmuxSessionAlive } = await import("./tasks-crud-DUNJJUV3.js");
2044
+ const { isTmuxSessionAlive } = await import("./tasks-crud-MDCY6JHU.js");
2013
2045
  const now = (/* @__PURE__ */ new Date()).toISOString();
2014
2046
  for (const row of openTasks.rows) {
2015
2047
  const status2 = String(row.status);
@@ -2832,8 +2864,8 @@ function registerIngestDocument(server) {
2832
2864
  },
2833
2865
  async (input) => {
2834
2866
  try {
2835
- const { assertFeature: assertFeature2 } = await import("./plan-limits-UQTXKXJQ.js");
2836
- const { assertMemoryLimit: assertMemoryLimit2 } = await import("./plan-limits-UQTXKXJQ.js");
2867
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-3FXBGHWT.js");
2868
+ const { assertMemoryLimit: assertMemoryLimit2 } = await import("./plan-limits-3FXBGHWT.js");
2837
2869
  await assertFeature2("wiki");
2838
2870
  await assertMemoryLimit2();
2839
2871
  const result3 = await ingestDocument(input);
@@ -3080,7 +3112,7 @@ function registerDocument(server) {
3080
3112
  }
3081
3113
 
3082
3114
  // src/mcp/tools/gateway.ts
3083
- import { z as z32 } from "zod";
3115
+ import { z as z33 } from "zod";
3084
3116
 
3085
3117
  // src/mcp/tools/send-whatsapp.ts
3086
3118
  import { z as z29 } from "zod";
@@ -3426,10 +3458,86 @@ function registerQueryConversations(server) {
3426
3458
 
3427
3459
  // src/mcp/tools/query-company-brain.ts
3428
3460
  init_config();
3461
+ import { z as z32 } from "zod";
3462
+
3463
+ // src/lib/unified-query.ts
3429
3464
  import { z as z31 } from "zod";
3465
+ var PaginationSchema = {
3466
+ limit: z31.coerce.number().int().min(1).max(100).optional().describe("Max results to return (default 25, max 100)"),
3467
+ offset: z31.coerce.number().int().min(0).optional().describe("Number of results to skip for pagination")
3468
+ };
3469
+ var DateRangeSchema = {
3470
+ date_from: z31.string().optional().describe("Filter records created/updated after this ISO date (inclusive)"),
3471
+ date_to: z31.string().optional().describe("Filter records created/updated before this ISO date (inclusive)")
3472
+ };
3473
+ var TextSearchSchema = {
3474
+ text_search: z31.string().optional().describe("Full-text search across relevant fields")
3475
+ };
3476
+ var SortSchema = {
3477
+ sort_by: z31.string().optional().describe("Field to sort by (tool-specific, default varies)"),
3478
+ sort_order: z31.enum(["asc", "desc"]).optional().describe("Sort direction (default desc)")
3479
+ };
3480
+ var SourceFilterSchema = {
3481
+ source: z31.string().optional().describe("Filter by data source/platform")
3482
+ };
3483
+ var StructuredFiltersSchema = {
3484
+ structured_filters: z31.record(z31.string(), z31.unknown()).optional().describe(
3485
+ "Structured field filters: { field: value } for equality, or { field: { op: 'gt'|'lt'|'gte'|'lte'|'contains'|'neq', value: ... } }"
3486
+ )
3487
+ };
3488
+ var UnifiedQuerySchema = {
3489
+ ...PaginationSchema,
3490
+ ...DateRangeSchema,
3491
+ ...TextSearchSchema,
3492
+ ...SortSchema,
3493
+ ...SourceFilterSchema,
3494
+ ...StructuredFiltersSchema
3495
+ };
3496
+ function buildStructuredFilterClauses(filters, columnMapping) {
3497
+ if (!filters) return [];
3498
+ const clauses = [];
3499
+ for (const [field, value] of Object.entries(filters)) {
3500
+ const column = columnMapping?.[field] ?? field;
3501
+ if (value === null || value === void 0) continue;
3502
+ if (typeof value === "object" && !Array.isArray(value)) {
3503
+ const filter = value;
3504
+ if (!filter.op || filter.value === void 0) continue;
3505
+ switch (filter.op) {
3506
+ case "eq":
3507
+ clauses.push({ sql: `${column} = ?`, args: [filter.value] });
3508
+ break;
3509
+ case "neq":
3510
+ clauses.push({ sql: `${column} != ?`, args: [filter.value] });
3511
+ break;
3512
+ case "gt":
3513
+ clauses.push({ sql: `${column} > ?`, args: [filter.value] });
3514
+ break;
3515
+ case "lt":
3516
+ clauses.push({ sql: `${column} < ?`, args: [filter.value] });
3517
+ break;
3518
+ case "gte":
3519
+ clauses.push({ sql: `${column} >= ?`, args: [filter.value] });
3520
+ break;
3521
+ case "lte":
3522
+ clauses.push({ sql: `${column} <= ?`, args: [filter.value] });
3523
+ break;
3524
+ case "contains":
3525
+ clauses.push({ sql: `${column} LIKE ?`, args: [`%${filter.value}%`] });
3526
+ break;
3527
+ default:
3528
+ break;
3529
+ }
3530
+ } else {
3531
+ clauses.push({ sql: `${column} = ?`, args: [value] });
3532
+ }
3533
+ }
3534
+ return clauses;
3535
+ }
3536
+
3537
+ // src/mcp/tools/query-company-brain.ts
3430
3538
  var FETCH_TIMEOUT_MS = 1e4;
3431
- var QUERY_SCOPE = z31.enum(["raw", "crm", "wiki", "memory", "gateway", "all"]);
3432
- var QUERY_ACTION = z31.enum(["search", "list_sources", "sql"]);
3539
+ var QUERY_SCOPE = z32.enum(["raw", "crm", "wiki", "memory", "gateway", "all"]);
3540
+ var QUERY_ACTION = z32.enum(["search", "list_sources", "sql"]);
3433
3541
  var LOCAL_GATEWAY_HTTP_HOSTS = /^(localhost|127\.0\.0\.1|::1|exe-gateway|gateway)$/i;
3434
3542
  function assertSecureGatewayUrlForToken(gatewayUrl, authToken) {
3435
3543
  if (!authToken) return;
@@ -3465,14 +3573,16 @@ function registerQueryCompanyBrain(server) {
3465
3573
  description: "Search the Company Brain \u2014 queries across all data (raw events, wiki docs, agent memories, gateway messages).",
3466
3574
  inputSchema: {
3467
3575
  action: QUERY_ACTION.default("search").describe("search = search exe-db; list_sources = list available sources; sql = run read-only SQL through gateway"),
3468
- query: z31.string().optional().describe("Search text. Required for action=search."),
3469
- sql: z31.string().optional().describe("Read-only SELECT/WITH SQL. Required for action=sql."),
3576
+ query: z32.string().optional().describe("Search text. Required for action=search."),
3577
+ sql: z32.string().optional().describe("Read-only SELECT/WITH SQL. Required for action=sql."),
3470
3578
  scope: QUERY_SCOPE.default("all").describe("Which data scope to search/read (raw, crm, wiki, memory, gateway, all)"),
3471
- source: z31.string().optional().describe("Filter raw events by source (shopify, asana, etc.)"),
3472
- limit: z31.coerce.number().int().min(1).max(100).default(20).describe("Max results per scope")
3579
+ source: z32.string().optional().describe("Filter raw events by source (shopify, asana, etc.)"),
3580
+ limit: z32.coerce.number().int().min(1).max(100).default(20).describe("Max results per scope"),
3581
+ ...DateRangeSchema,
3582
+ ...SortSchema
3473
3583
  }
3474
3584
  },
3475
- async ({ action, query, sql, scope, source, limit }) => {
3585
+ async ({ action, query, sql, scope, source, limit, date_from, date_to, sort_by, sort_order }) => {
3476
3586
  const resolvedAction = action ?? "search";
3477
3587
  if (resolvedAction === "search" && !query?.trim()) {
3478
3588
  return {
@@ -3534,6 +3644,10 @@ function registerQueryCompanyBrain(server) {
3534
3644
  url.searchParams.set("scope", scope);
3535
3645
  if (source) url.searchParams.set("source", source);
3536
3646
  url.searchParams.set("limit", String(limit));
3647
+ if (date_from) url.searchParams.set("date_from", date_from);
3648
+ if (date_to) url.searchParams.set("date_to", date_to);
3649
+ if (sort_by) url.searchParams.set("sort_by", sort_by);
3650
+ if (sort_order) url.searchParams.set("sort_order", sort_order);
3537
3651
  }
3538
3652
  try {
3539
3653
  const response = await fetch(url.toString(), {
@@ -3602,20 +3716,20 @@ function registerGateway(server) {
3602
3716
  title: "Gateway",
3603
3717
  description: "Consolidated gateway/customer communication tool. Actions: send_whatsapp, query_conversations, query_company_brain. Legacy gateway tools remain available during migration.",
3604
3718
  inputSchema: {
3605
- action: z32.enum(["send_whatsapp", "query_conversations", "query_company_brain"]).describe("Gateway operation to perform"),
3606
- recipients: z32.array(z32.string()).optional().describe("Names or phone numbers for action=send_whatsapp"),
3607
- message: z32.string().optional().describe("WhatsApp message text"),
3608
- account: z32.string().optional().describe("WhatsApp account name"),
3609
- query: z32.string().optional().describe("Search query"),
3610
- sender: z32.string().optional().describe("Conversation sender filter"),
3611
- platform: z32.string().optional().describe("Conversation platform filter"),
3612
- after: z32.string().optional().describe("Conversation lower date bound"),
3613
- before: z32.string().optional().describe("Conversation upper date bound"),
3614
- channel_id: z32.string().optional().describe("Conversation channel filter"),
3615
- thread_id: z32.string().optional().describe("Conversation thread filter"),
3616
- limit: z32.coerce.number().int().min(1).max(100).optional().describe("Max results"),
3617
- scope: z32.enum(["raw", "wiki", "memory", "gateway", "all"]).optional().describe("Company Brain scope"),
3618
- source: z32.string().optional().describe("Company Brain raw event source filter")
3719
+ action: z33.enum(["send_whatsapp", "query_conversations", "query_company_brain"]).describe("Gateway operation to perform"),
3720
+ recipients: z33.array(z33.string()).optional().describe("Names or phone numbers for action=send_whatsapp"),
3721
+ message: z33.string().optional().describe("WhatsApp message text"),
3722
+ account: z33.string().optional().describe("WhatsApp account name"),
3723
+ query: z33.string().optional().describe("Search query"),
3724
+ sender: z33.string().optional().describe("Conversation sender filter"),
3725
+ platform: z33.string().optional().describe("Conversation platform filter"),
3726
+ after: z33.string().optional().describe("Conversation lower date bound"),
3727
+ before: z33.string().optional().describe("Conversation upper date bound"),
3728
+ channel_id: z33.string().optional().describe("Conversation channel filter"),
3729
+ thread_id: z33.string().optional().describe("Conversation thread filter"),
3730
+ limit: z33.coerce.number().int().min(1).max(100).optional().describe("Max results"),
3731
+ scope: z33.enum(["raw", "wiki", "memory", "gateway", "all"]).optional().describe("Company Brain scope"),
3732
+ source: z33.string().optional().describe("Company Brain raw event source filter")
3619
3733
  }
3620
3734
  }, async (input, extra) => {
3621
3735
  const action = input.action;
@@ -3642,11 +3756,11 @@ function registerGateway(server) {
3642
3756
  }
3643
3757
 
3644
3758
  // src/mcp/tools/graph.ts
3645
- import { z as z39 } from "zod";
3759
+ import { z as z40 } from "zod";
3646
3760
 
3647
3761
  // src/mcp/tools/get-entity-neighbors.ts
3648
3762
  init_database();
3649
- import { z as z33 } from "zod";
3763
+ import { z as z34 } from "zod";
3650
3764
  function registerGetEntityNeighbors(server) {
3651
3765
  server.registerTool(
3652
3766
  "get_entity_neighbors",
@@ -3654,7 +3768,7 @@ function registerGetEntityNeighbors(server) {
3654
3768
  title: "Get Entity Neighbors",
3655
3769
  description: "Get connected entities for a given entity name. Returns neighbors with relationship types, directions, and weights.",
3656
3770
  inputSchema: {
3657
- entity_name: z33.string().describe("Name of the entity to find neighbors for")
3771
+ entity_name: z34.string().describe("Name of the entity to find neighbors for")
3658
3772
  }
3659
3773
  },
3660
3774
  async ({ entity_name }) => {
@@ -3722,7 +3836,7 @@ function registerGetEntityNeighbors(server) {
3722
3836
 
3723
3837
  // src/mcp/tools/get-hot-entities.ts
3724
3838
  init_database();
3725
- import { z as z34 } from "zod";
3839
+ import { z as z35 } from "zod";
3726
3840
  var PERIOD_MS = {
3727
3841
  "24h": 24 * 60 * 60 * 1e3,
3728
3842
  "7d": 7 * 24 * 60 * 60 * 1e3,
@@ -3735,8 +3849,8 @@ function registerGetHotEntities(server) {
3735
3849
  title: "Get Hot Entities",
3736
3850
  description: "Get trending entities \u2014 those with the most new relationships in a time period. Surfaces what's most active in the knowledge graph.",
3737
3851
  inputSchema: {
3738
- period: z34.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to look back"),
3739
- limit: z34.number().int().min(1).max(50).default(10).describe("Max entities to return")
3852
+ period: z35.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to look back"),
3853
+ limit: z35.number().int().min(1).max(50).default(10).describe("Max entities to return")
3740
3854
  }
3741
3855
  },
3742
3856
  async ({ period, limit }) => {
@@ -3784,7 +3898,7 @@ function registerGetHotEntities(server) {
3784
3898
 
3785
3899
  // src/mcp/tools/get-graph-stats.ts
3786
3900
  init_database();
3787
- import { z as z35 } from "zod";
3901
+ import { z as z36 } from "zod";
3788
3902
  function registerGetGraphStats(server) {
3789
3903
  server.registerTool(
3790
3904
  "get_graph_stats",
@@ -3792,7 +3906,7 @@ function registerGetGraphStats(server) {
3792
3906
  title: "Get Graph Stats",
3793
3907
  description: "Get knowledge graph summary statistics: entity count, relationship count, and entity type breakdown.",
3794
3908
  inputSchema: {
3795
- _dummy: z35.string().optional().describe("Unused \u2014 no input required")
3909
+ _dummy: z36.string().optional().describe("Unused \u2014 no input required")
3796
3910
  }
3797
3911
  },
3798
3912
  async () => {
@@ -3833,7 +3947,7 @@ function registerGetGraphStats(server) {
3833
3947
 
3834
3948
  // src/mcp/tools/export-graph.ts
3835
3949
  init_database();
3836
- import { z as z36 } from "zod";
3950
+ import { z as z37 } from "zod";
3837
3951
  function registerExportGraph(server) {
3838
3952
  server.registerTool(
3839
3953
  "export_graph",
@@ -3841,7 +3955,7 @@ function registerExportGraph(server) {
3841
3955
  title: "Export Graph",
3842
3956
  description: "Export the knowledge graph as a markdown report (inline) or an interactive HTML visualization (writes file, returns path).",
3843
3957
  inputSchema: {
3844
- format: z36.enum(["html", "markdown"]).default("markdown").describe("Export format: markdown (inline) or html (file)")
3958
+ format: z37.enum(["html", "markdown"]).default("markdown").describe("Export format: markdown (inline) or html (file)")
3845
3959
  }
3846
3960
  },
3847
3961
  async ({ format: format2 }) => {
@@ -3855,12 +3969,12 @@ function registerExportGraph(server) {
3855
3969
  }
3856
3970
  const html = await exportGraphHTML(client);
3857
3971
  const fs = await import("fs");
3858
- const path17 = await import("path");
3972
+ const path18 = await import("path");
3859
3973
  const os4 = await import("os");
3860
- const outDir = path17.join(os4.homedir(), ".exe-os", "exports");
3974
+ const outDir = path18.join(os4.homedir(), ".exe-os", "exports");
3861
3975
  fs.mkdirSync(outDir, { recursive: true });
3862
3976
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3863
- const filePath = path17.join(outDir, `graph-${timestamp}.html`);
3977
+ const filePath = path18.join(outDir, `graph-${timestamp}.html`);
3864
3978
  fs.writeFileSync(filePath, html, "utf-8");
3865
3979
  return {
3866
3980
  content: [
@@ -3891,7 +4005,7 @@ Open in a browser to explore interactively.`
3891
4005
 
3892
4006
  // src/mcp/tools/merge-entities.ts
3893
4007
  init_database();
3894
- import { z as z37 } from "zod";
4008
+ import { z as z38 } from "zod";
3895
4009
  function registerMergeEntities(server) {
3896
4010
  server.registerTool(
3897
4011
  "merge_entities",
@@ -3899,10 +4013,10 @@ function registerMergeEntities(server) {
3899
4013
  title: "Merge Entities",
3900
4014
  description: 'Merge duplicate GraphRAG entities. Moves all relationships and memory links from source to target entity, registers source name as alias, deletes source. Use when "Lenny" and "Leonard" should be the same entity.',
3901
4015
  inputSchema: {
3902
- source_name: z37.string().describe("Name of the entity to merge FROM (will be deleted)"),
3903
- source_type: z37.string().describe('Entity type (e.g., "person", "company", "product")'),
3904
- target_name: z37.string().describe("Name of the entity to merge INTO (will be kept)"),
3905
- target_type: z37.string().describe("Entity type of the target")
4016
+ source_name: z38.string().describe("Name of the entity to merge FROM (will be deleted)"),
4017
+ source_type: z38.string().describe('Entity type (e.g., "person", "company", "product")'),
4018
+ target_name: z38.string().describe("Name of the entity to merge INTO (will be kept)"),
4019
+ target_type: z38.string().describe("Entity type of the target")
3906
4020
  }
3907
4021
  },
3908
4022
  async ({ source_name, source_type, target_name, target_type }) => {
@@ -3948,7 +4062,7 @@ function registerMergeEntities(server) {
3948
4062
 
3949
4063
  // src/mcp/tools/find-similar-trajectories.ts
3950
4064
  init_skill_learning();
3951
- import { z as z38 } from "zod";
4065
+ import { z as z39 } from "zod";
3952
4066
  function registerFindSimilarTrajectories(server) {
3953
4067
  server.registerTool(
3954
4068
  "find_similar_trajectories",
@@ -3956,7 +4070,7 @@ function registerFindSimilarTrajectories(server) {
3956
4070
  title: "Find Similar Trajectories",
3957
4071
  description: 'Find past task trajectories that match a described tool sequence. Input a comma-separated tool sequence (e.g. "Read, Edit, Bash, Read") to find similar past workflows.',
3958
4072
  inputSchema: {
3959
- description: z38.string().describe(
4073
+ description: z39.string().describe(
3960
4074
  'Tool sequence to match \u2014 comma-separated tool names (e.g. "Read, Grep, Edit, Bash:npm, Bash:git")'
3961
4075
  )
3962
4076
  }
@@ -4060,23 +4174,23 @@ function registerGraph(server) {
4060
4174
  title: "Graph",
4061
4175
  description: "Consolidated GraphRAG tool. Actions: query_relationships, entity_neighbors, hot_entities, stats, export, merge_entities, similar_trajectories.",
4062
4176
  inputSchema: {
4063
- action: z39.enum(["query_relationships", "entity_neighbors", "hot_entities", "stats", "export", "merge_entities", "similar_trajectories"]).describe("Graph operation"),
4064
- query: z39.string().optional().describe("Query text for relationship or trajectory search"),
4065
- entity: z39.string().optional().describe("Entity name for entity_neighbors"),
4066
- entity_id: z39.string().optional().describe("Entity id for entity_neighbors/merge"),
4067
- from_entity: z39.string().optional().describe("Source entity for relationship query"),
4068
- to_entity: z39.string().optional().describe("Target entity for relationship query"),
4069
- source_id: z39.string().optional().describe("Source entity id for merge_entities"),
4070
- target_id: z39.string().optional().describe("Target entity id for merge_entities"),
4071
- entity_type: z39.string().optional().describe("Entity type filter"),
4072
- project_name: z39.string().optional().describe("Project filter"),
4073
- relationship_type: z39.string().optional().describe("Relationship type filter"),
4074
- since: z39.string().optional().describe("ISO lower-bound timestamp"),
4075
- limit: z39.coerce.number().int().min(1).max(200).optional().describe("Result limit"),
4076
- depth: z39.coerce.number().int().min(1).max(3).optional().describe("Neighbor traversal depth"),
4077
- output_path: z39.string().optional().describe("Path for export_graph output"),
4078
- format: z39.enum(["json", "graphml"]).optional().describe("Export format"),
4079
- min_count: z39.coerce.number().int().min(1).optional().describe("Minimum count for hot_entities")
4177
+ action: z40.enum(["query_relationships", "entity_neighbors", "hot_entities", "stats", "export", "merge_entities", "similar_trajectories"]).describe("Graph operation"),
4178
+ query: z40.string().optional().describe("Query text for relationship or trajectory search"),
4179
+ entity: z40.string().optional().describe("Entity name for entity_neighbors"),
4180
+ entity_id: z40.string().optional().describe("Entity id for entity_neighbors/merge"),
4181
+ from_entity: z40.string().optional().describe("Source entity for relationship query"),
4182
+ to_entity: z40.string().optional().describe("Target entity for relationship query"),
4183
+ source_id: z40.string().optional().describe("Source entity id for merge_entities"),
4184
+ target_id: z40.string().optional().describe("Target entity id for merge_entities"),
4185
+ entity_type: z40.string().optional().describe("Entity type filter"),
4186
+ project_name: z40.string().optional().describe("Project filter"),
4187
+ relationship_type: z40.string().optional().describe("Relationship type filter"),
4188
+ since: z40.string().optional().describe("ISO lower-bound timestamp"),
4189
+ limit: z40.coerce.number().int().min(1).max(200).optional().describe("Result limit"),
4190
+ depth: z40.coerce.number().int().min(1).max(3).optional().describe("Neighbor traversal depth"),
4191
+ output_path: z40.string().optional().describe("Path for export_graph output"),
4192
+ format: z40.enum(["json", "graphml"]).optional().describe("Export format"),
4193
+ min_count: z40.coerce.number().int().min(1).optional().describe("Minimum count for hot_entities")
4080
4194
  }
4081
4195
  }, async (input, extra) => {
4082
4196
  const action = input.action;
@@ -4102,10 +4216,10 @@ function registerGraph(server) {
4102
4216
  }
4103
4217
 
4104
4218
  // src/mcp/tools/config.ts
4105
- import { z as z66 } from "zod";
4219
+ import { z as z67 } from "zod";
4106
4220
 
4107
4221
  // src/mcp/tools/set-agent-config.ts
4108
- import { z as z40 } from "zod";
4222
+ import { z as z41 } from "zod";
4109
4223
  init_agent_config();
4110
4224
  init_runtime_table();
4111
4225
  init_employees();
@@ -4116,11 +4230,11 @@ function registerSetAgentConfig(server) {
4116
4230
  title: "Set Agent Config",
4117
4231
  description: "Set or view per-agent runtime, model, and MCP configuration. Controls which runtime (claude, codex, opencode), model, and MCP servers each agent uses when dispatched. COO-only. Omit runtime/model to view current config for an agent or all agents. Pass mcps to restrict which MCP servers an agent loads (exe-os always included).",
4118
4232
  inputSchema: {
4119
- agent_id: z40.string().optional().describe("Agent name, or 'default' for org-wide default. Omit to view all agents."),
4120
- runtime: z40.string().optional().describe(`Runtime: ${Object.keys(KNOWN_RUNTIMES).join(", ")}`),
4121
- model: z40.string().optional().describe("Model name (e.g. claude-opus-4, gpt-5.4, anthropic/claude-sonnet-4-6)"),
4122
- reasoning_effort: z40.string().optional().describe("Codex reasoning effort: low, medium, high, xhigh. Per-agent override for thinking/reasoning depth."),
4123
- mcps: z40.array(z40.string()).optional().describe("MCP server allowlist. Only these servers load for this agent. exe-os always included. Omit to load all MCPs.")
4233
+ agent_id: z41.string().optional().describe("Agent name, or 'default' for org-wide default. Omit to view all agents."),
4234
+ runtime: z41.string().optional().describe(`Runtime: ${Object.keys(KNOWN_RUNTIMES).join(", ")}`),
4235
+ model: z41.string().optional().describe("Model name (e.g. claude-opus-4, gpt-5.4, anthropic/claude-sonnet-4-6)"),
4236
+ reasoning_effort: z41.string().optional().describe("Codex reasoning effort: low, medium, high, xhigh. Per-agent override for thinking/reasoning depth."),
4237
+ mcps: z41.array(z41.string()).optional().describe("MCP server allowlist. Only these servers load for this agent. exe-os always included. Omit to load all MCPs.")
4124
4238
  }
4125
4239
  },
4126
4240
  async ({ agent_id, runtime, model, reasoning_effort, mcps }) => {
@@ -4241,7 +4355,7 @@ function registerSetAgentConfig(server) {
4241
4355
  // src/mcp/tools/list-employees.ts
4242
4356
  init_employees();
4243
4357
  init_agent_config();
4244
- import { z as z41 } from "zod";
4358
+ import { z as z42 } from "zod";
4245
4359
  function registerListEmployees(server) {
4246
4360
  server.registerTool(
4247
4361
  "list_employees",
@@ -4249,7 +4363,7 @@ function registerListEmployees(server) {
4249
4363
  title: "List Employees",
4250
4364
  description: "List all AI employees in the organization with their role, runtime, and model configuration. Use to see who's on the team and how they're configured.",
4251
4365
  inputSchema: {
4252
- role: z41.string().optional().describe("Filter by role (case-insensitive)")
4366
+ role: z42.string().optional().describe("Filter by role (case-insensitive)")
4253
4367
  }
4254
4368
  },
4255
4369
  async ({ role }) => {
@@ -4305,7 +4419,7 @@ function registerListEmployees(server) {
4305
4419
  }
4306
4420
 
4307
4421
  // src/mcp/tools/get-agent-spend.ts
4308
- import { z as z42 } from "zod";
4422
+ import { z as z43 } from "zod";
4309
4423
  function estimateCost(input, output, cacheRead) {
4310
4424
  const inputCost = input / 1e6 * 15;
4311
4425
  const outputCost = output / 1e6 * 75;
@@ -4319,8 +4433,8 @@ function registerGetAgentSpend(server) {
4319
4433
  title: "Get Agent Spend",
4320
4434
  description: "Get per-agent token spend attribution. Shows input, output, and cache tokens consumed by each agent over a time period, with estimated cost.",
4321
4435
  inputSchema: {
4322
- period: z42.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to query"),
4323
- agent_id: z42.string().optional().describe("Filter to a specific agent (e.g. 'tom', 'yoshi')")
4436
+ period: z43.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to query"),
4437
+ agent_id: z43.string().optional().describe("Filter to a specific agent (e.g. 'tom', 'yoshi')")
4324
4438
  }
4325
4439
  },
4326
4440
  async ({ period, agent_id }) => {
@@ -4385,7 +4499,7 @@ function registerGetAgentSpend(server) {
4385
4499
 
4386
4500
  // src/mcp/tools/list-agent-sessions.ts
4387
4501
  init_session_registry();
4388
- import { z as z43 } from "zod";
4502
+ import { z as z44 } from "zod";
4389
4503
  function registerListAgentSessions(server) {
4390
4504
  server.registerTool(
4391
4505
  "list_agent_sessions",
@@ -4393,7 +4507,7 @@ function registerListAgentSessions(server) {
4393
4507
  title: "List Agent Sessions",
4394
4508
  description: "List all registered agent sessions with their agent ID, project, PID, and registration time.",
4395
4509
  inputSchema: {
4396
- _placeholder: z43.string().optional().describe("No input required")
4510
+ _placeholder: z44.string().optional().describe("No input required")
4397
4511
  }
4398
4512
  },
4399
4513
  async () => {
@@ -4440,7 +4554,7 @@ function registerListAgentSessions(server) {
4440
4554
 
4441
4555
  // src/mcp/tools/get-session-kills.ts
4442
4556
  init_session_kill_telemetry();
4443
- import { z as z44 } from "zod";
4557
+ import { z as z45 } from "zod";
4444
4558
  var PERIOD_MS2 = {
4445
4559
  "24h": 24 * 60 * 60 * 1e3,
4446
4560
  "7d": 7 * 24 * 60 * 60 * 1e3,
@@ -4456,7 +4570,7 @@ function registerGetSessionKills(server) {
4456
4570
  title: "Get Session Kills",
4457
4571
  description: "Get session kill telemetry: how many idle/TTL sessions were killed, tokens saved, and estimated cost savings over a time period.",
4458
4572
  inputSchema: {
4459
- period: z44.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to query")
4573
+ period: z45.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to query")
4460
4574
  }
4461
4575
  },
4462
4576
  async ({ period }) => {
@@ -4495,7 +4609,7 @@ function registerGetSessionKills(server) {
4495
4609
  }
4496
4610
 
4497
4611
  // src/mcp/tools/get-daemon-health.ts
4498
- import { z as z45 } from "zod";
4612
+ import { z as z46 } from "zod";
4499
4613
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
4500
4614
  import path3 from "path";
4501
4615
  import { homedir as homedir2 } from "os";
@@ -4526,7 +4640,7 @@ function registerGetDaemonHealth(server) {
4526
4640
  title: "Get Daemon Health",
4527
4641
  description: "Check the embedding daemon (exed) health: whether it's running, its PID, uptime, and requests served.",
4528
4642
  inputSchema: {
4529
- _placeholder: z45.string().optional().describe("No input required")
4643
+ _placeholder: z46.string().optional().describe("No input required")
4530
4644
  }
4531
4645
  },
4532
4646
  async () => {
@@ -4600,7 +4714,7 @@ function registerGetDaemonHealth(server) {
4600
4714
  import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
4601
4715
  import path4 from "path";
4602
4716
  import { homedir as homedir3 } from "os";
4603
- import { z as z46 } from "zod";
4717
+ import { z as z47 } from "zod";
4604
4718
  var PID_PATH2 = path4.join(homedir3(), ".exe-os", "exed.pid");
4605
4719
  function isDaemonAlive2() {
4606
4720
  try {
@@ -4620,7 +4734,7 @@ function registerMcpPing(server) {
4620
4734
  title: "MCP Ping",
4621
4735
  description: "Safe local MCP synthetic probe: daemon liveness plus privacy-safe transport/session summary.",
4622
4736
  inputSchema: {
4623
- _placeholder: z46.string().optional().describe("No input required")
4737
+ _placeholder: z47.string().optional().describe("No input required")
4624
4738
  }
4625
4739
  },
4626
4740
  async () => {
@@ -4655,7 +4769,7 @@ function registerMcpPing(server) {
4655
4769
  // src/mcp/tools/get-auto-wake-status.ts
4656
4770
  init_database();
4657
4771
  init_session_registry();
4658
- import { z as z47 } from "zod";
4772
+ import { z as z48 } from "zod";
4659
4773
  init_employees();
4660
4774
  init_task_scope();
4661
4775
  function registerGetAutoWakeStatus(server) {
@@ -4665,7 +4779,7 @@ function registerGetAutoWakeStatus(server) {
4665
4779
  title: "Get Auto-Wake Status",
4666
4780
  description: "Check auto-wake status: orphaned tasks (assigned agent has no running session), tasks blocked by auto-wake retry limit, and session activity.",
4667
4781
  inputSchema: {
4668
- _placeholder: z47.string().optional().describe("No input required")
4782
+ _placeholder: z48.string().optional().describe("No input required")
4669
4783
  }
4670
4784
  },
4671
4785
  async () => {
@@ -4744,7 +4858,7 @@ function registerGetAutoWakeStatus(server) {
4744
4858
  }
4745
4859
 
4746
4860
  // src/mcp/tools/get-worker-gate.ts
4747
- import { z as z48 } from "zod";
4861
+ import { z as z49 } from "zod";
4748
4862
  import { readdirSync, existsSync as existsSync4 } from "fs";
4749
4863
  import path5 from "path";
4750
4864
  init_config();
@@ -4792,7 +4906,7 @@ async function getAgentSessionLoad() {
4792
4906
  return { sessions: [], totalLive: 0, busySessions: 0, idleSessions: 0 };
4793
4907
  }
4794
4908
  const { getClient: getClient2 } = await import("./lib/database.js");
4795
- const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-7XCYEZAG.js");
4909
+ const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-2L5DLU6T.js");
4796
4910
  const client = getClient2();
4797
4911
  const scope = sessionScopeFilter2();
4798
4912
  for (const s of liveAgentSessions) {
@@ -4823,7 +4937,7 @@ function registerGetWorkerGate(server) {
4823
4937
  title: "Get Worker Gate",
4824
4938
  description: "Check worker concurrency gate and agent session utilization. Reports embed/summary worker slots AND live agent sessions with task load. Idle sessions (alive tmux, zero tasks) are excluded from the effective session count \u2014 they should not block new dispatches.",
4825
4939
  inputSchema: {
4826
- _placeholder: z48.string().optional().describe("No input required")
4940
+ _placeholder: z49.string().optional().describe("No input required")
4827
4941
  }
4828
4942
  },
4829
4943
  async () => {
@@ -4881,7 +4995,7 @@ function registerGetWorkerGate(server) {
4881
4995
 
4882
4996
  // src/mcp/tools/run-memory-audit.ts
4883
4997
  init_database();
4884
- import { z as z49 } from "zod";
4998
+ import { z as z50 } from "zod";
4885
4999
  function registerRunMemoryAudit(server) {
4886
5000
  server.registerTool(
4887
5001
  "run_memory_audit",
@@ -4889,8 +5003,8 @@ function registerRunMemoryAudit(server) {
4889
5003
  title: "Run Memory Audit",
4890
5004
  description: "Run a memory health audit: total counts, per-agent breakdown, null vectors, duplicates, FTS sync status, bloated records, and conflict detection (contradictory/superseded memories).",
4891
5005
  inputSchema: {
4892
- agent_id: z49.string().optional().describe("Filter audit to a specific agent"),
4893
- project_name: z49.string().optional().describe("Filter audit to a specific project")
5006
+ agent_id: z50.string().optional().describe("Filter audit to a specific agent"),
5007
+ project_name: z50.string().optional().describe("Filter audit to a specific project")
4894
5008
  }
4895
5009
  },
4896
5010
  async ({ agent_id, project_name }) => {
@@ -4926,7 +5040,7 @@ function registerRunMemoryAudit(server) {
4926
5040
 
4927
5041
  // src/mcp/tools/run-consolidation.ts
4928
5042
  init_database();
4929
- import { z as z50 } from "zod";
5043
+ import { z as z51 } from "zod";
4930
5044
  init_config();
4931
5045
  function registerRunConsolidation(server) {
4932
5046
  server.registerTool(
@@ -4935,7 +5049,7 @@ function registerRunConsolidation(server) {
4935
5049
  title: "Run Consolidation",
4936
5050
  description: "Run memory consolidation \u2014 synthesizes unconsolidated memories into meta-insights. Use dry_run=true (default) to preview without executing.",
4937
5051
  inputSchema: {
4938
- dry_run: z50.boolean().default(true).describe("Preview mode \u2014 show what would be consolidated without doing it")
5052
+ dry_run: z51.boolean().default(true).describe("Preview mode \u2014 show what would be consolidated without doing it")
4939
5053
  }
4940
5054
  },
4941
5055
  async ({ dry_run }) => {
@@ -5003,7 +5117,7 @@ function registerRunConsolidation(server) {
5003
5117
  }
5004
5118
 
5005
5119
  // src/mcp/tools/cloud-sync.ts
5006
- import { z as z51 } from "zod";
5120
+ import { z as z52 } from "zod";
5007
5121
  init_config();
5008
5122
  init_database();
5009
5123
  function result(text3, isError = false) {
@@ -5086,9 +5200,9 @@ function registerCloudSync(server) {
5086
5200
  title: "Cloud Sync",
5087
5201
  description: "Consolidated Exe Cloud tool. Supports read-only status, normal sync-now, and explicitly confirmed post-key-rotation re-upload. Does not reveal recovery phrases and does not rotate keys.",
5088
5202
  inputSchema: {
5089
- action: z51.enum(["status", "sync", "reupload"]).default("sync").describe("Cloud operation. status is read-only; sync is normal sync-now; reupload repairs cloud after key rotation."),
5090
- force: z51.boolean().default(false).describe("Reserved for sync compatibility; normal cloud sync already runs when requested."),
5091
- confirm_local_db_source_of_truth: z51.string().optional().describe('Required for action=reupload. Must exactly equal "LOCAL DB IS SOURCE OF TRUTH".')
5203
+ action: z52.enum(["status", "sync", "reupload"]).default("sync").describe("Cloud operation. status is read-only; sync is normal sync-now; reupload repairs cloud after key rotation."),
5204
+ force: z52.boolean().default(false).describe("Reserved for sync compatibility; normal cloud sync already runs when requested."),
5205
+ confirm_local_db_source_of_truth: z52.string().optional().describe('Required for action=reupload. Must exactly equal "LOCAL DB IS SOURCE OF TRUTH".')
5092
5206
  }
5093
5207
  },
5094
5208
  async ({ action = "sync", confirm_local_db_source_of_truth }) => {
@@ -5160,7 +5274,7 @@ function registerCloudSync(server) {
5160
5274
  }
5161
5275
 
5162
5276
  // src/mcp/tools/orchestration-phase.ts
5163
- import { z as z52 } from "zod";
5277
+ import { z as z53 } from "zod";
5164
5278
  function render(info, prefix) {
5165
5279
  return [
5166
5280
  prefix,
@@ -5179,8 +5293,8 @@ function registerOrchestrationPhase(server) {
5179
5293
  title: "Orchestration Phase",
5180
5294
  description: "View or change the customer-owned orchestration maturity phase. MCP parity for `exe-os org phase`, `exe-os org unlock executives`, and `exe-os org unlock parallel`. This is a recommendation layer, not a blocker; it never exposes recovery phrases or secrets.",
5181
5295
  inputSchema: {
5182
- action: z52.enum(["status", "set", "unlock_executives", "unlock_parallel"]).default("status"),
5183
- phase: z52.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Phase to set when action='set'.")
5296
+ action: z53.enum(["status", "set", "unlock_executives", "unlock_parallel"]).default("status"),
5297
+ phase: z53.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Phase to set when action='set'.")
5184
5298
  }
5185
5299
  },
5186
5300
  async ({ action = "status", phase }) => {
@@ -5220,7 +5334,7 @@ function registerOrchestrationPhase(server) {
5220
5334
  }
5221
5335
 
5222
5336
  // src/mcp/tools/backup-vps.ts
5223
- import { z as z53 } from "zod";
5337
+ import { z as z54 } from "zod";
5224
5338
 
5225
5339
  // src/lib/vps-backup.ts
5226
5340
  import { createCipheriv, createDecipheriv, randomBytes } from "crypto";
@@ -5545,43 +5659,43 @@ function registerBackupVps(server) {
5545
5659
  {
5546
5660
  title: "VPS Backup",
5547
5661
  description: "Run VPS Postgres backup/restore workflows and check status.",
5548
- inputSchema: z53.discriminatedUnion("action", [
5549
- z53.object({
5550
- action: z53.literal("backup"),
5551
- databaseUrl: z53.string().min(1).describe("Postgres DATABASE_URL to dump from"),
5552
- encryptionKeyB64: z53.string().min(1).max(4096).optional().describe(
5662
+ inputSchema: z54.discriminatedUnion("action", [
5663
+ z54.object({
5664
+ action: z54.literal("backup"),
5665
+ databaseUrl: z54.string().min(1).describe("Postgres DATABASE_URL to dump from"),
5666
+ encryptionKeyB64: z54.string().min(1).max(4096).optional().describe(
5553
5667
  "Base64 AES-256 key (defaults to local master key if omitted)"
5554
5668
  ),
5555
- r2Bucket: z53.string().min(1).describe("R2 bucket name"),
5556
- r2Endpoint: z53.string().min(1).describe("R2 endpoint URL"),
5557
- r2AccessKeyId: z53.string().min(1).describe("R2 access key ID"),
5558
- r2SecretAccessKey: z53.string().min(1).describe("R2 secret access key")
5669
+ r2Bucket: z54.string().min(1).describe("R2 bucket name"),
5670
+ r2Endpoint: z54.string().min(1).describe("R2 endpoint URL"),
5671
+ r2AccessKeyId: z54.string().min(1).describe("R2 access key ID"),
5672
+ r2SecretAccessKey: z54.string().min(1).describe("R2 secret access key")
5559
5673
  }),
5560
- z53.object({
5561
- action: z53.literal("restore"),
5562
- databaseUrl: z53.string().min(1).describe("Target Postgres DATABASE_URL for restore"),
5563
- backupKey: z53.string().min(1).describe("R2 object key to restore from"),
5564
- encryptionKeyB64: z53.string().min(1).max(4096).optional().describe(
5674
+ z54.object({
5675
+ action: z54.literal("restore"),
5676
+ databaseUrl: z54.string().min(1).describe("Target Postgres DATABASE_URL for restore"),
5677
+ backupKey: z54.string().min(1).describe("R2 object key to restore from"),
5678
+ encryptionKeyB64: z54.string().min(1).max(4096).optional().describe(
5565
5679
  "Base64 AES-256 key (defaults to local master key if omitted)"
5566
5680
  ),
5567
- r2Bucket: z53.string().min(1).describe("R2 bucket name"),
5568
- r2Endpoint: z53.string().min(1).describe("R2 endpoint URL"),
5569
- r2AccessKeyId: z53.string().min(1).describe("R2 access key ID"),
5570
- r2SecretAccessKey: z53.string().min(1).describe("R2 secret access key")
5681
+ r2Bucket: z54.string().min(1).describe("R2 bucket name"),
5682
+ r2Endpoint: z54.string().min(1).describe("R2 endpoint URL"),
5683
+ r2AccessKeyId: z54.string().min(1).describe("R2 access key ID"),
5684
+ r2SecretAccessKey: z54.string().min(1).describe("R2 secret access key")
5571
5685
  }),
5572
- z53.object({
5573
- action: z53.literal("list"),
5574
- r2Bucket: z53.string().min(1).describe("R2 bucket name"),
5575
- r2Endpoint: z53.string().min(1).describe("R2 endpoint URL"),
5576
- r2AccessKeyId: z53.string().min(1).describe("R2 access key ID"),
5577
- r2SecretAccessKey: z53.string().min(1).describe("R2 secret access key")
5686
+ z54.object({
5687
+ action: z54.literal("list"),
5688
+ r2Bucket: z54.string().min(1).describe("R2 bucket name"),
5689
+ r2Endpoint: z54.string().min(1).describe("R2 endpoint URL"),
5690
+ r2AccessKeyId: z54.string().min(1).describe("R2 access key ID"),
5691
+ r2SecretAccessKey: z54.string().min(1).describe("R2 secret access key")
5578
5692
  }),
5579
- z53.object({
5580
- action: z53.literal("health"),
5581
- r2Bucket: z53.string().min(1).describe("R2 bucket name"),
5582
- r2Endpoint: z53.string().min(1).describe("R2 endpoint URL"),
5583
- r2AccessKeyId: z53.string().min(1).describe("R2 access key ID"),
5584
- r2SecretAccessKey: z53.string().min(1).describe("R2 secret access key")
5693
+ z54.object({
5694
+ action: z54.literal("health"),
5695
+ r2Bucket: z54.string().min(1).describe("R2 bucket name"),
5696
+ r2Endpoint: z54.string().min(1).describe("R2 endpoint URL"),
5697
+ r2AccessKeyId: z54.string().min(1).describe("R2 access key ID"),
5698
+ r2SecretAccessKey: z54.string().min(1).describe("R2 secret access key")
5585
5699
  })
5586
5700
  ])
5587
5701
  },
@@ -5719,7 +5833,7 @@ async function resolveEncryptionKey(providedB64) {
5719
5833
  }
5720
5834
 
5721
5835
  // src/mcp/tools/deploy-client.ts
5722
- import { z as z54 } from "zod";
5836
+ import { z as z55 } from "zod";
5723
5837
  import { execFile } from "child_process";
5724
5838
  import { promisify } from "util";
5725
5839
  import path6 from "path";
@@ -5771,9 +5885,9 @@ var HostingerApiClient = class {
5771
5885
  }
5772
5886
  this.lastRequestTime = Date.now();
5773
5887
  }
5774
- async request(method, path17, body) {
5888
+ async request(method, path18, body) {
5775
5889
  await this.rateLimit();
5776
- const url = `${this.baseUrl}${path17}`;
5890
+ const url = `${this.baseUrl}${path18}`;
5777
5891
  const headers = {
5778
5892
  Authorization: `Bearer ${this.apiKey}`,
5779
5893
  "Content-Type": "application/json",
@@ -5893,12 +6007,12 @@ function registerDeployClient(server) {
5893
6007
  title: "Deploy Client",
5894
6008
  description: "Provision a Hostinger VPS and deploy exe-os for a client. Creates VPS, waits for ready state, runs Ansible playbook, verifies health.",
5895
6009
  inputSchema: {
5896
- client_name: z54.string().min(1).describe("Client name (used for hostname and identification)"),
5897
- domain: z54.string().min(1).describe("Domain name for the deployment (e.g., client.exe.ai)"),
5898
- region: z54.string().default("jakarta").describe("VPS region (default: jakarta)"),
5899
- plan: z54.string().default("kvm-2").describe("Hostinger VPS plan (default: kvm-2)"),
5900
- ssl_email: z54.string().email().describe("Email for Let's Encrypt SSL certificate"),
5901
- user_id: z54.string().min(1).describe("User/customer ID for inventory tracking")
6010
+ client_name: z55.string().min(1).describe("Client name (used for hostname and identification)"),
6011
+ domain: z55.string().min(1).describe("Domain name for the deployment (e.g., client.exe.ai)"),
6012
+ region: z55.string().default("jakarta").describe("VPS region (default: jakarta)"),
6013
+ plan: z55.string().default("kvm-2").describe("Hostinger VPS plan (default: kvm-2)"),
6014
+ ssl_email: z55.string().email().describe("Email for Let's Encrypt SSL certificate"),
6015
+ user_id: z55.string().min(1).describe("User/customer ID for inventory tracking")
5902
6016
  }
5903
6017
  },
5904
6018
  async ({ client_name, domain, region, plan, ssl_email, user_id }) => {
@@ -6060,7 +6174,7 @@ function buildInventoryRecord(params) {
6060
6174
 
6061
6175
  // src/mcp/tools/get-license-status.ts
6062
6176
  init_license();
6063
- import { z as z55 } from "zod";
6177
+ import { z as z56 } from "zod";
6064
6178
  var FEATURES = [
6065
6179
  "cloud_sync",
6066
6180
  "external_agents",
@@ -6074,7 +6188,7 @@ function registerGetLicenseStatus(server) {
6074
6188
  title: "Get License Status",
6075
6189
  description: "Get current license status: plan, validity, feature gates, limits, and expiry.",
6076
6190
  inputSchema: {
6077
- _dummy: z55.string().optional().describe("Unused \u2014 no input required")
6191
+ _dummy: z56.string().optional().describe("Unused \u2014 no input required")
6078
6192
  }
6079
6193
  },
6080
6194
  async () => {
@@ -6132,7 +6246,7 @@ import path7 from "path";
6132
6246
  import { randomBytes as randomBytes2, randomUUID } from "crypto";
6133
6247
  import { createRequire } from "module";
6134
6248
  import { pathToFileURL } from "url";
6135
- import { z as z56 } from "zod";
6249
+ import { z as z57 } from "zod";
6136
6250
  var prismaPromise = null;
6137
6251
  function loadPrisma() {
6138
6252
  if (!prismaPromise) {
@@ -6165,10 +6279,10 @@ function registerCreateLicense(server) {
6165
6279
  title: "Create License",
6166
6280
  description: "Generate an exe_sk_* license key for a user. Stores in billing.licenses. Returns the key to give to the customer.",
6167
6281
  inputSchema: {
6168
- email: z56.string().email().describe("Customer email address"),
6169
- name: z56.string().optional().describe("Customer name"),
6170
- plan: z56.enum(["free", "pro", "team", "agency", "enterprise"]).default("pro").describe("License plan tier"),
6171
- expires_in_days: z56.number().int().positive().default(365).describe("Days until expiration (default 365)")
6282
+ email: z57.string().email().describe("Customer email address"),
6283
+ name: z57.string().optional().describe("Customer name"),
6284
+ plan: z57.enum(["free", "pro", "team", "agency", "enterprise"]).default("pro").describe("License plan tier"),
6285
+ expires_in_days: z57.number().int().positive().default(365).describe("Days until expiration (default 365)")
6172
6286
  }
6173
6287
  },
6174
6288
  async ({ email, name, plan, expires_in_days }) => {
@@ -6223,7 +6337,7 @@ import os2 from "os";
6223
6337
  import path8 from "path";
6224
6338
  import { createRequire as createRequire2 } from "module";
6225
6339
  import { pathToFileURL as pathToFileURL2 } from "url";
6226
- import { z as z57 } from "zod";
6340
+ import { z as z58 } from "zod";
6227
6341
  var prismaPromise2 = null;
6228
6342
  function loadPrisma2() {
6229
6343
  if (!prismaPromise2) {
@@ -6253,7 +6367,7 @@ function registerListLicenses(server) {
6253
6367
  title: "List Licenses",
6254
6368
  description: "List all issued licenses with status (active/expired/revoked). Optionally filter by plan.",
6255
6369
  inputSchema: {
6256
- plan: z57.enum(["free", "pro", "team", "agency", "enterprise"]).optional().describe("Filter by plan tier (omit for all)")
6370
+ plan: z58.enum(["free", "pro", "team", "agency", "enterprise"]).optional().describe("Filter by plan tier (omit for all)")
6257
6371
  }
6258
6372
  },
6259
6373
  async ({ plan }) => {
@@ -6304,7 +6418,7 @@ function registerListLicenses(server) {
6304
6418
 
6305
6419
  // src/mcp/tools/activate-license.ts
6306
6420
  init_license();
6307
- import { z as z58 } from "zod";
6421
+ import { z as z59 } from "zod";
6308
6422
  function registerActivateLicense(server) {
6309
6423
  server.registerTool(
6310
6424
  "activate_license",
@@ -6312,7 +6426,7 @@ function registerActivateLicense(server) {
6312
6426
  title: "Activate License",
6313
6427
  description: "Activate an exe_sk_* license key on this device. Writes to ~/.exe-os/license.key, validates against Postgres, and caches the result.",
6314
6428
  inputSchema: {
6315
- key: z58.string().startsWith("exe_sk_").describe("License key (exe_sk_*)")
6429
+ key: z59.string().startsWith("exe_sk_").describe("License key (exe_sk_*)")
6316
6430
  }
6317
6431
  },
6318
6432
  async ({ key }) => {
@@ -6358,15 +6472,15 @@ Key saved to ~/.exe-os/license.key. Device ID: ${deviceId}`);
6358
6472
  }
6359
6473
 
6360
6474
  // src/mcp/tools/create-trigger.ts
6361
- import { z as z59 } from "zod";
6362
- var conditionSchema = z59.object({
6363
- field: z59.string().describe("Dot-path field to evaluate, e.g., 'stage' or 'amount'"),
6364
- op: z59.enum(["eq", "neq", "gt", "lt", "gte", "lte", "contains", "not_contains"]).describe("Comparison operator"),
6365
- value: z59.string().or(z59.number()).or(z59.boolean()).describe("Value to compare against")
6475
+ import { z as z60 } from "zod";
6476
+ var conditionSchema = z60.object({
6477
+ field: z60.string().describe("Dot-path field to evaluate, e.g., 'stage' or 'amount'"),
6478
+ op: z60.enum(["eq", "neq", "gt", "lt", "gte", "lte", "contains", "not_contains"]).describe("Comparison operator"),
6479
+ value: z60.string().or(z60.number()).or(z60.boolean()).describe("Value to compare against")
6366
6480
  });
6367
- var actionSchema = z59.object({
6368
- type: z59.enum(["send_whatsapp", "send_message", "create_task", "mcp_tool"]).describe("Action type to execute"),
6369
- params: z59.record(z59.string(), z59.string()).describe(
6481
+ var actionSchema = z60.object({
6482
+ type: z60.enum(["send_whatsapp", "send_message", "create_task", "mcp_tool"]).describe("Action type to execute"),
6483
+ params: z60.record(z60.string(), z60.string()).describe(
6370
6484
  "Action parameters. Supports {{record.field}} templates for dynamic values."
6371
6485
  )
6372
6486
  });
@@ -6377,24 +6491,24 @@ function registerCreateTrigger(server) {
6377
6491
  title: "Create Trigger",
6378
6492
  description: "Create a CRM event trigger or scheduled automation. When matching events occur (e.g., Deal.updated with stage=won), configured actions fire automatically (send_whatsapp, create_task, etc.).",
6379
6493
  inputSchema: {
6380
- name: z59.string().describe("Human-readable trigger name"),
6381
- event: z59.string().describe(
6494
+ name: z60.string().describe("Human-readable trigger name"),
6495
+ event: z60.string().describe(
6382
6496
  'CRM event to match, e.g., "Deal.updated", "Order.created", "*" for all'
6383
6497
  ),
6384
- conditions: z59.array(conditionSchema).default([]).describe("Conditions that must all match (AND logic)"),
6385
- actions: z59.array(actionSchema).min(1).describe("Actions to execute when trigger fires"),
6386
- project: z59.string().optional().describe("Scope trigger to a specific project"),
6387
- enabled: z59.boolean().default(true).describe("Whether trigger is active"),
6388
- schedule: z59.string().optional().describe(
6498
+ conditions: z60.array(conditionSchema).default([]).describe("Conditions that must all match (AND logic)"),
6499
+ actions: z60.array(actionSchema).min(1).describe("Actions to execute when trigger fires"),
6500
+ project: z60.string().optional().describe("Scope trigger to a specific project"),
6501
+ enabled: z60.boolean().default(true).describe("Whether trigger is active"),
6502
+ schedule: z60.string().optional().describe(
6389
6503
  'Cron schedule for time-based triggers, e.g., "0 9 * * *" or "Monday 9am"'
6390
6504
  ),
6391
- query: z59.string().optional().describe(
6505
+ query: z60.string().optional().describe(
6392
6506
  "CRM GraphQL query to run on schedule (required if schedule is set)"
6393
6507
  )
6394
6508
  }
6395
6509
  },
6396
6510
  async ({ name, event, conditions, actions, project, enabled, schedule, query }) => {
6397
- const { assertFeature: assertFeature2 } = await import("./plan-limits-UQTXKXJQ.js");
6511
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-3FXBGHWT.js");
6398
6512
  const gatedActions = {
6399
6513
  send_whatsapp: "external_agents",
6400
6514
  update_wiki: "wiki"
@@ -6461,7 +6575,7 @@ Enabled: ${trigger.enabled}` + scheduleInfo;
6461
6575
  }
6462
6576
 
6463
6577
  // src/mcp/tools/list-triggers.ts
6464
- import { z as z60 } from "zod";
6578
+ import { z as z61 } from "zod";
6465
6579
  function registerListTriggers(server) {
6466
6580
  server.registerTool(
6467
6581
  "list_triggers",
@@ -6469,7 +6583,7 @@ function registerListTriggers(server) {
6469
6583
  title: "List Triggers",
6470
6584
  description: "List configured CRM event triggers and scheduled automations.",
6471
6585
  inputSchema: {
6472
- project: z60.string().optional().describe("Filter triggers by project name")
6586
+ project: z61.string().optional().describe("Filter triggers by project name")
6473
6587
  }
6474
6588
  },
6475
6589
  async ({ project }) => {
@@ -6504,7 +6618,7 @@ function registerListTriggers(server) {
6504
6618
  }
6505
6619
 
6506
6620
  // src/mcp/tools/apply-starter-pack.ts
6507
- import { z as z61 } from "zod";
6621
+ import { z as z62 } from "zod";
6508
6622
 
6509
6623
  // src/automation/starter-packs/index.ts
6510
6624
  import { readFileSync as readFileSync4, readdirSync as readdirSync2, existsSync as existsSync6 } from "fs";
@@ -6690,17 +6804,17 @@ function registerApplyStarterPack(server) {
6690
6804
  title: "Apply Starter Pack",
6691
6805
  description: "Apply an industry starter pack to a project. Sets up CRM custom objects, pre-wired automation triggers, and wiki seed content. When the pack creates a Client COO (e.g. distribution) and agent_name, company_name, founder_name are all provided, also provisions the COO identity, roster entry, and feedback-loop behavior. Available packs: distribution. More coming.",
6692
6806
  inputSchema: {
6693
- industry: z61.string().describe(
6807
+ industry: z62.string().describe(
6694
6808
  'Industry pack to apply (e.g., "distribution"). Use without args to list available packs.'
6695
6809
  ),
6696
- project: z61.string().describe("Project name to scope the triggers to"),
6697
- agent_name: z61.string().optional().describe(
6810
+ project: z62.string().describe("Project name to scope the triggers to"),
6811
+ agent_name: z62.string().optional().describe(
6698
6812
  "Optional. Lowercase alphanumeric name for the Client COO agent. Required (alongside company_name and founder_name) to provision a COO."
6699
6813
  ),
6700
- company_name: z61.string().optional().describe(
6814
+ company_name: z62.string().optional().describe(
6701
6815
  "Optional. The client company the COO serves. Required to provision a COO."
6702
6816
  ),
6703
- founder_name: z61.string().optional().describe(
6817
+ founder_name: z62.string().optional().describe(
6704
6818
  "Optional. The founder the COO reports to. Required to provision a COO."
6705
6819
  )
6706
6820
  }
@@ -6845,7 +6959,7 @@ ${err.message}`
6845
6959
  }
6846
6960
 
6847
6961
  // src/mcp/tools/load-skill.ts
6848
- import { z as z62 } from "zod";
6962
+ import { z as z63 } from "zod";
6849
6963
  import { readFileSync as readFileSync5, readdirSync as readdirSync3, statSync } from "fs";
6850
6964
  import path11 from "path";
6851
6965
  import { homedir as homedir4 } from "os";
@@ -6875,7 +6989,7 @@ function registerLoadSkill(server) {
6875
6989
  title: "Load Skill",
6876
6990
  description: "Load domain-specific guidance into your context. Use when you need specialized knowledge for a task (e.g., load_skill('seo') before doing SEO work, load_skill('code-reviewer') before reviewing code). Pass skill_name='list' to see all available skills.",
6877
6991
  inputSchema: {
6878
- skill_name: z62.string().describe(
6992
+ skill_name: z63.string().describe(
6879
6993
  "Skill to load (e.g. 'seo', 'code-reviewer', 'frontend-design'). Pass 'list' to see all available skills."
6880
6994
  )
6881
6995
  }
@@ -6932,7 +7046,7 @@ ${available.map((s) => `- ${s}`).join("\n")}` : "\n\nNo skills found in ~/.claud
6932
7046
  // src/mcp/tools/export-orchestration.ts
6933
7047
  import { mkdirSync as mkdirSync2, writeFileSync as writeFileSync4 } from "fs";
6934
7048
  import path12 from "path";
6935
- import { z as z63 } from "zod";
7049
+ import { z as z64 } from "zod";
6936
7050
  function registerExportOrchestration(server) {
6937
7051
  server.registerTool(
6938
7052
  "export_orchestration",
@@ -6940,7 +7054,7 @@ function registerExportOrchestration(server) {
6940
7054
  title: "Export Orchestration",
6941
7055
  description: "Export roster, identities, behaviors, and customer procedures to a JSON package.",
6942
7056
  inputSchema: {
6943
- output_path: z63.string().describe("File path to write the JSON package")
7057
+ output_path: z64.string().describe("File path to write the JSON package")
6944
7058
  }
6945
7059
  },
6946
7060
  async ({ output_path }) => {
@@ -6971,7 +7085,7 @@ function registerExportOrchestration(server) {
6971
7085
 
6972
7086
  // src/mcp/tools/import-orchestration.ts
6973
7087
  import { readFileSync as readFileSync6 } from "fs";
6974
- import { z as z64 } from "zod";
7088
+ import { z as z65 } from "zod";
6975
7089
  init_employees();
6976
7090
  function registerImportOrchestration(server) {
6977
7091
  server.registerTool(
@@ -6980,8 +7094,8 @@ function registerImportOrchestration(server) {
6980
7094
  title: "Import Orchestration",
6981
7095
  description: "Import roster, identities, behaviors, and procedures from an orchestration package. Restricted to coordinator/founder.",
6982
7096
  inputSchema: {
6983
- package_path: z64.string().describe("Path to the orchestration package JSON file"),
6984
- merge_strategy: z64.enum(["replace", "merge"]).default("merge").describe("How to apply the package: both strategies are additive-only \u2014 existing data is never deleted or overwritten")
7097
+ package_path: z65.string().describe("Path to the orchestration package JSON file"),
7098
+ merge_strategy: z65.enum(["replace", "merge"]).default("merge").describe("How to apply the package: both strategies are additive-only \u2014 existing data is never deleted or overwritten")
6985
7099
  }
6986
7100
  },
6987
7101
  async ({ package_path, merge_strategy }) => {
@@ -7021,7 +7135,7 @@ function registerImportOrchestration(server) {
7021
7135
  }
7022
7136
 
7023
7137
  // src/mcp/tools/global-procedure.ts
7024
- import { z as z65 } from "zod";
7138
+ import { z as z66 } from "zod";
7025
7139
  init_database();
7026
7140
  init_employees();
7027
7141
  function registerCompanyProcedureTool(server, toolName) {
@@ -7031,12 +7145,12 @@ function registerCompanyProcedureTool(server, toolName) {
7031
7145
  title: "Company Procedure",
7032
7146
  description: "Manage company procedures (customer-owned Layer 0 rules) that supersede identity, expertise, and experience. Actions: store (create new, restricted), list (view all, open), deactivate (soft-delete, restricted).",
7033
7147
  inputSchema: {
7034
- action: z65.enum(["store", "list", "deactivate"]).describe("Action to perform"),
7035
- title: z65.string().optional().describe("Short title for the procedure (store)"),
7036
- content: z65.string().max(500).optional().describe("The procedure content \u2014 clear, actionable instruction (store)"),
7037
- priority: z65.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default). p1 = standard. p2 = nice-to-have."),
7038
- domain: z65.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security"),
7039
- procedure_id: z65.string().optional().describe("UUID of the company procedure (deactivate)")
7148
+ action: z66.enum(["store", "list", "deactivate"]).describe("Action to perform"),
7149
+ title: z66.string().optional().describe("Short title for the procedure (store)"),
7150
+ content: z66.string().max(500).optional().describe("The procedure content \u2014 clear, actionable instruction (store)"),
7151
+ priority: z66.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default). p1 = standard. p2 = nice-to-have."),
7152
+ domain: z66.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security"),
7153
+ procedure_id: z66.string().optional().describe("UUID of the company procedure (deactivate)")
7040
7154
  }
7041
7155
  },
7042
7156
  async ({ action, title, content, priority, domain, procedure_id }) => {
@@ -7231,44 +7345,44 @@ function registerConfig(server) {
7231
7345
  title: "Config",
7232
7346
  description: "Consolidated COO/admin tool for runtime config, system health, licensing, triggers, orchestration import/export, and company procedures.",
7233
7347
  inputSchema: {
7234
- action: z66.enum(Object.keys(ACTION_TO_TOOL2)).describe("Admin/config operation"),
7235
- agent_id: z66.string().optional().describe("Agent id for set_agent_config/agent_spend/session queries"),
7236
- runtime: z66.string().optional().describe("Runtime for set_agent_config"),
7237
- model: z66.string().optional().describe("Model for set_agent_config"),
7238
- reasoning_effort: z66.string().optional().describe("Reasoning effort for Codex agents"),
7239
- dry_run: z66.boolean().optional().describe("Preview without applying where supported"),
7240
- fix: z66.boolean().optional().describe("Apply fixes for memory_audit where supported"),
7241
- verbose: z66.boolean().optional().describe("Verbose output where supported"),
7242
- project_name: z66.string().optional().describe("Project filter/name"),
7243
- since: z66.string().optional().describe("ISO lower-bound timestamp"),
7244
- limit: z66.coerce.number().optional().describe("Result limit"),
7245
- output_path: z66.string().optional().describe("Output path for export/backup"),
7246
- input_path: z66.string().optional().describe("Input path for import_orchestration"),
7247
- strategy: z66.enum(["merge", "replace"]).optional().describe("Import strategy; replace must still be additive-only per platform rules"),
7248
- license_key: z66.string().optional().describe("License key for activation/status"),
7249
- email: z66.string().optional().describe("Customer email for license creation"),
7250
- plan: z66.string().optional().describe("License plan"),
7251
- name: z66.string().optional().describe("Trigger/starter pack/procedure/client name"),
7252
- event: z66.string().optional().describe("Trigger event"),
7253
- conditions: z66.array(z66.record(z66.string(), z66.unknown())).optional().describe("Trigger conditions"),
7254
- actions: z66.array(z66.record(z66.string(), z66.unknown())).optional().describe("Trigger actions"),
7255
- enabled: z66.boolean().optional().describe("Trigger enabled flag"),
7256
- schedule: z66.string().optional().describe("Trigger schedule"),
7257
- query: z66.string().optional().describe("Trigger query or filter"),
7258
- skill_name: z66.string().optional().describe("Skill name for load_skill"),
7259
- pack_name: z66.string().optional().describe("Starter pack name"),
7260
- title: z66.string().optional().describe("Procedure title"),
7261
- content: z66.string().optional().describe("Procedure content"),
7262
- priority: z66.enum(["p0", "p1", "p2"]).optional().describe("Procedure priority"),
7263
- domain: z66.string().optional().describe("Procedure domain"),
7264
- procedure_id: z66.string().optional().describe("Procedure id for deactivate"),
7265
- subaction: z66.enum(["store", "list", "deactivate"]).optional().describe("Nested action for company_procedure/global_procedure"),
7266
- max_clusters: z66.coerce.number().optional().describe("Consolidation max clusters"),
7267
- force: z66.boolean().optional().describe("Force operation where supported"),
7268
- cloud_action: z66.enum(["status", "sync", "reupload"]).optional().describe("Nested operation for action=cloud_sync"),
7269
- confirm_local_db_source_of_truth: z66.string().optional().describe("Required for cloud_action=reupload; must exactly equal LOCAL DB IS SOURCE OF TRUTH"),
7270
- domain_name: z66.string().optional().describe("Client deployment domain"),
7271
- phase: z66.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Orchestration phase for orchestration_phase action")
7348
+ action: z67.enum(Object.keys(ACTION_TO_TOOL2)).describe("Admin/config operation"),
7349
+ agent_id: z67.string().optional().describe("Agent id for set_agent_config/agent_spend/session queries"),
7350
+ runtime: z67.string().optional().describe("Runtime for set_agent_config"),
7351
+ model: z67.string().optional().describe("Model for set_agent_config"),
7352
+ reasoning_effort: z67.string().optional().describe("Reasoning effort for Codex agents"),
7353
+ dry_run: z67.boolean().optional().describe("Preview without applying where supported"),
7354
+ fix: z67.boolean().optional().describe("Apply fixes for memory_audit where supported"),
7355
+ verbose: z67.boolean().optional().describe("Verbose output where supported"),
7356
+ project_name: z67.string().optional().describe("Project filter/name"),
7357
+ since: z67.string().optional().describe("ISO lower-bound timestamp"),
7358
+ limit: z67.coerce.number().optional().describe("Result limit"),
7359
+ output_path: z67.string().optional().describe("Output path for export/backup"),
7360
+ input_path: z67.string().optional().describe("Input path for import_orchestration"),
7361
+ strategy: z67.enum(["merge", "replace"]).optional().describe("Import strategy; replace must still be additive-only per platform rules"),
7362
+ license_key: z67.string().optional().describe("License key for activation/status"),
7363
+ email: z67.string().optional().describe("Customer email for license creation"),
7364
+ plan: z67.string().optional().describe("License plan"),
7365
+ name: z67.string().optional().describe("Trigger/starter pack/procedure/client name"),
7366
+ event: z67.string().optional().describe("Trigger event"),
7367
+ conditions: z67.array(z67.record(z67.string(), z67.unknown())).optional().describe("Trigger conditions"),
7368
+ actions: z67.array(z67.record(z67.string(), z67.unknown())).optional().describe("Trigger actions"),
7369
+ enabled: z67.boolean().optional().describe("Trigger enabled flag"),
7370
+ schedule: z67.string().optional().describe("Trigger schedule"),
7371
+ query: z67.string().optional().describe("Trigger query or filter"),
7372
+ skill_name: z67.string().optional().describe("Skill name for load_skill"),
7373
+ pack_name: z67.string().optional().describe("Starter pack name"),
7374
+ title: z67.string().optional().describe("Procedure title"),
7375
+ content: z67.string().optional().describe("Procedure content"),
7376
+ priority: z67.enum(["p0", "p1", "p2"]).optional().describe("Procedure priority"),
7377
+ domain: z67.string().optional().describe("Procedure domain"),
7378
+ procedure_id: z67.string().optional().describe("Procedure id for deactivate"),
7379
+ subaction: z67.enum(["store", "list", "deactivate"]).optional().describe("Nested action for company_procedure/global_procedure"),
7380
+ max_clusters: z67.coerce.number().optional().describe("Consolidation max clusters"),
7381
+ force: z67.boolean().optional().describe("Force operation where supported"),
7382
+ cloud_action: z67.enum(["status", "sync", "reupload"]).optional().describe("Nested operation for action=cloud_sync"),
7383
+ confirm_local_db_source_of_truth: z67.string().optional().describe("Required for cloud_action=reupload; must exactly equal LOCAL DB IS SOURCE OF TRUTH"),
7384
+ domain_name: z67.string().optional().describe("Client deployment domain"),
7385
+ phase: z67.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Orchestration phase for orchestration_phase action")
7272
7386
  }
7273
7387
  }, async (input, extra) => {
7274
7388
  const action = input.action;
@@ -7292,10 +7406,10 @@ function registerConfig(server) {
7292
7406
  }
7293
7407
 
7294
7408
  // src/mcp/tools/wiki.ts
7295
- import { z as z69 } from "zod";
7409
+ import { z as z70 } from "zod";
7296
7410
 
7297
7411
  // src/mcp/tools/list-wiki-pages.ts
7298
- import { z as z67 } from "zod";
7412
+ import { z as z68 } from "zod";
7299
7413
  var FETCH_TIMEOUT_MS2 = 1e4;
7300
7414
  function registerListWikiPages(server) {
7301
7415
  server.registerTool(
@@ -7304,12 +7418,12 @@ function registerListWikiPages(server) {
7304
7418
  title: "List Wiki Pages",
7305
7419
  description: "List documents in an exe-wiki workspace. Optionally filter by folder.",
7306
7420
  inputSchema: {
7307
- workspace: z67.string().describe('Wiki workspace slug (e.g., "hygo")'),
7308
- folder: z67.string().optional().describe("Filter by folder path")
7421
+ workspace: z68.string().describe('Wiki workspace slug (e.g., "hygo")'),
7422
+ folder: z68.string().optional().describe("Filter by folder path")
7309
7423
  }
7310
7424
  },
7311
7425
  async ({ workspace, folder }) => {
7312
- const { assertFeature: assertFeature2 } = await import("./plan-limits-UQTXKXJQ.js");
7426
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-3FXBGHWT.js");
7313
7427
  await assertFeature2("wiki");
7314
7428
  const apiUrl = process.env.EXE_WIKI_API_URL;
7315
7429
  const apiKey = process.env.EXE_WIKI_API_KEY;
@@ -7394,7 +7508,7 @@ function registerListWikiPages(server) {
7394
7508
  }
7395
7509
 
7396
7510
  // src/mcp/tools/get-wiki-page.ts
7397
- import { z as z68 } from "zod";
7511
+ import { z as z69 } from "zod";
7398
7512
  var FETCH_TIMEOUT_MS3 = 1e4;
7399
7513
  function registerGetWikiPage(server) {
7400
7514
  server.registerTool(
@@ -7403,13 +7517,13 @@ function registerGetWikiPage(server) {
7403
7517
  title: "Get Wiki Page",
7404
7518
  description: "Read a wiki page by document ID or title. Returns content, metadata, and folder path. Use title search when you know the page name but not the ID.",
7405
7519
  inputSchema: {
7406
- workspace: z68.string().describe('Wiki workspace slug (e.g., "hygo")'),
7407
- document_id: z68.string().optional().describe("Specific document ID (exact lookup)"),
7408
- title: z68.string().optional().describe("Search by title (fuzzy match)")
7520
+ workspace: z69.string().describe('Wiki workspace slug (e.g., "hygo")'),
7521
+ document_id: z69.string().optional().describe("Specific document ID (exact lookup)"),
7522
+ title: z69.string().optional().describe("Search by title (fuzzy match)")
7409
7523
  }
7410
7524
  },
7411
7525
  async ({ workspace, document_id, title }) => {
7412
- const { assertFeature: assertFeature2 } = await import("./plan-limits-UQTXKXJQ.js");
7526
+ const { assertFeature: assertFeature2 } = await import("./plan-limits-3FXBGHWT.js");
7413
7527
  await assertFeature2("wiki");
7414
7528
  const apiUrl = process.env.EXE_WIKI_API_URL;
7415
7529
  const apiKey = process.env.EXE_WIKI_API_KEY;
@@ -7587,15 +7701,15 @@ function registerWiki(server) {
7587
7701
  title: "Wiki",
7588
7702
  description: "Consolidated wiki domain tool. Actions: list, get. Wiki writes flow through raw data ingestion/projection into the curated wiki store; direct create/update MCP tools have been removed.",
7589
7703
  inputSchema: {
7590
- action: z69.enum(["list", "get"]).describe("Wiki read operation. Writes use raw-data ingestion/projection, not direct MCP writes."),
7591
- workspace: z69.string().optional().describe("Wiki workspace slug"),
7592
- title: z69.string().optional().describe("Fuzzy page title lookup for get"),
7593
- content: z69.string().optional().describe("Reserved; wiki writes use raw-data ingestion/projection"),
7594
- folder: z69.string().optional().describe("Optional folder path for list"),
7595
- document_id: z69.string().optional().describe("Document ID for get"),
7596
- mode: z69.enum(["replace", "append"]).optional().describe("Reserved; direct wiki updates are removed"),
7597
- section: z69.string().optional().describe("Reserved; direct wiki updates are removed"),
7598
- user_id: z69.string().optional().describe("User ID for ACL enforcement. When set, workspace access is checked against wiki_acl table.")
7704
+ action: z70.enum(["list", "get"]).describe("Wiki read operation. Writes use raw-data ingestion/projection, not direct MCP writes."),
7705
+ workspace: z70.string().optional().describe("Wiki workspace slug"),
7706
+ title: z70.string().optional().describe("Fuzzy page title lookup for get"),
7707
+ content: z70.string().optional().describe("Reserved; wiki writes use raw-data ingestion/projection"),
7708
+ folder: z70.string().optional().describe("Optional folder path for list"),
7709
+ document_id: z70.string().optional().describe("Document ID for get"),
7710
+ mode: z70.enum(["replace", "append"]).optional().describe("Reserved; direct wiki updates are removed"),
7711
+ section: z70.string().optional().describe("Reserved; direct wiki updates are removed"),
7712
+ user_id: z70.string().optional().describe("User ID for ACL enforcement. When set, workspace access is checked against wiki_acl table.")
7599
7713
  }
7600
7714
  },
7601
7715
  async (input, extra) => {
@@ -7604,7 +7718,7 @@ function registerWiki(server) {
7604
7718
  if (!legacyToolName) return errorResult9(`Unknown wiki action: ${String(input.action)}`);
7605
7719
  const { action: _action, user_id, ...legacyArgs } = input;
7606
7720
  if (user_id && legacyArgs.workspace) {
7607
- const { checkWikiAccess } = await import("./wiki-acl-QY5EXWEQ.js");
7721
+ const { checkWikiAccess } = await import("./wiki-acl-RVCO4WSP.js");
7608
7722
  const { allowed } = await checkWikiAccess(
7609
7723
  String(user_id),
7610
7724
  String(legacyArgs.workspace),
@@ -7630,7 +7744,7 @@ function registerWiki(server) {
7630
7744
 
7631
7745
  // src/mcp/tools/behavior.ts
7632
7746
  init_behaviors();
7633
- import { z as z70 } from "zod";
7747
+ import { z as z71 } from "zod";
7634
7748
  init_project_name();
7635
7749
  init_database();
7636
7750
  init_employees();
@@ -7658,13 +7772,13 @@ function registerBehavior(server) {
7658
7772
  title: "Behavior",
7659
7773
  description: "Manage behavioral patterns, corrections, and reusable procedures for employees. Actions: store (create new), list (query existing), audit (creation context), deactivate (soft-delete, restricted).",
7660
7774
  inputSchema: {
7661
- action: z70.enum(["store", "list", "deactivate", "audit"]).describe("Action to perform"),
7662
- content: z70.string().max(500).optional().describe("The behavioral instruction \u2014 one clear sentence (store)"),
7663
- domain: z70.string().optional().describe("Category: workflow, code-style, tool-use, communication, architecture, testing"),
7664
- priority: z70.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always included. p1 = standard (default). p2 = nice-to-have."),
7665
- agent_id: z70.string().optional().describe("Employee name. Defaults to current agent. Pass 'all' to list everyone's (list only)."),
7666
- project_name: z70.string().optional().describe("Defaults to current project. Pass 'global' for a behavior that applies everywhere (store)."),
7667
- behavior_id: z70.string().optional().describe("UUID of the behavior (deactivate)")
7775
+ action: z71.enum(["store", "list", "deactivate", "audit"]).describe("Action to perform"),
7776
+ content: z71.string().max(500).optional().describe("The behavioral instruction \u2014 one clear sentence (store)"),
7777
+ domain: z71.string().optional().describe("Category: workflow, code-style, tool-use, communication, architecture, testing"),
7778
+ priority: z71.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always included. p1 = standard (default). p2 = nice-to-have."),
7779
+ agent_id: z71.string().optional().describe("Employee name. Defaults to current agent. Pass 'all' to list everyone's (list only)."),
7780
+ project_name: z71.string().optional().describe("Defaults to current project. Pass 'global' for a behavior that applies everywhere (store)."),
7781
+ behavior_id: z71.string().optional().describe("UUID of the behavior (deactivate)")
7668
7782
  }
7669
7783
  },
7670
7784
  async ({ action, content, domain, priority, agent_id, project_name, behavior_id }) => {
@@ -7885,7 +7999,7 @@ Content: ${row.content}`
7885
7999
  }
7886
8000
 
7887
8001
  // src/mcp/tools/reminder.ts
7888
- import { z as z71 } from "zod";
8002
+ import { z as z72 } from "zod";
7889
8003
  function registerReminder(server) {
7890
8004
  server.registerTool(
7891
8005
  "reminder",
@@ -7893,11 +8007,11 @@ function registerReminder(server) {
7893
8007
  title: "Reminder",
7894
8008
  description: "Manage reminders for the founder. Shown in the boot brief every session. Actions: create (set new), list (view active), complete (mark done).",
7895
8009
  inputSchema: {
7896
- action: z71.enum(["create", "list", "complete"]).describe("Action to perform"),
7897
- text: z71.string().optional().describe("What to remind about (create)"),
7898
- due_date: z71.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent (create)"),
7899
- reminder_id: z71.string().optional().describe("Reminder UUID or text substring to match (complete)"),
7900
- include_completed: z71.boolean().optional().default(false).describe("Include completed reminders (list)")
8010
+ action: z72.enum(["create", "list", "complete"]).describe("Action to perform"),
8011
+ text: z72.string().optional().describe("What to remind about (create)"),
8012
+ due_date: z72.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent (create)"),
8013
+ reminder_id: z72.string().optional().describe("Reminder UUID or text substring to match (complete)"),
8014
+ include_completed: z72.boolean().optional().default(false).describe("Include completed reminders (list)")
7901
8015
  }
7902
8016
  },
7903
8017
  async ({ action, text: text3, due_date, reminder_id, include_completed }) => {
@@ -7950,7 +8064,7 @@ function registerReminder(server) {
7950
8064
  }
7951
8065
 
7952
8066
  // src/mcp/tools/store-global-procedure.ts
7953
- import { z as z72 } from "zod";
8067
+ import { z as z73 } from "zod";
7954
8068
  init_employees();
7955
8069
  function registerStoreGlobalProcedure(server) {
7956
8070
  server.registerTool(
@@ -7959,10 +8073,10 @@ function registerStoreGlobalProcedure(server) {
7959
8073
  title: "Store Company Procedure (use global_procedure instead)",
7960
8074
  description: "DEPRECATED \u2014 use global_procedure with action='store'. Create a company procedure (customer-owned Layer 0 rule). RESTRICTED: only coordinator or founder sessions.",
7961
8075
  inputSchema: {
7962
- title: z72.string().describe("Short title for the procedure"),
7963
- content: z72.string().max(500).describe("The procedure content \u2014 clear, actionable instruction"),
7964
- priority: z72.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default)."),
7965
- domain: z72.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security")
8076
+ title: z73.string().describe("Short title for the procedure"),
8077
+ content: z73.string().max(500).describe("The procedure content \u2014 clear, actionable instruction"),
8078
+ priority: z73.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default)."),
8079
+ domain: z73.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security")
7966
8080
  }
7967
8081
  },
7968
8082
  async ({ title, content, priority, domain }) => {
@@ -8034,7 +8148,7 @@ ${lines.join("\n\n")}`
8034
8148
  }
8035
8149
 
8036
8150
  // src/mcp/tools/deactivate-global-procedure.ts
8037
- import { z as z73 } from "zod";
8151
+ import { z as z74 } from "zod";
8038
8152
  init_database();
8039
8153
  init_employees();
8040
8154
  function registerDeactivateGlobalProcedure(server) {
@@ -8044,7 +8158,7 @@ function registerDeactivateGlobalProcedure(server) {
8044
8158
  title: "Deactivate Company Procedure (use global_procedure instead)",
8045
8159
  description: "DEPRECATED \u2014 use global_procedure with action='deactivate'. Soft-delete a company procedure. RESTRICTED: only coordinator or founder sessions.",
8046
8160
  inputSchema: {
8047
- procedure_id: z73.string().describe("UUID of the company procedure to deactivate")
8161
+ procedure_id: z74.string().describe("UUID of the company procedure to deactivate")
8048
8162
  }
8049
8163
  },
8050
8164
  async ({ procedure_id }) => {
@@ -8100,7 +8214,7 @@ Content: ${row.content}`
8100
8214
 
8101
8215
  // src/mcp/tools/store-decision.ts
8102
8216
  init_embedder();
8103
- import { z as z74 } from "zod";
8217
+ import { z as z75 } from "zod";
8104
8218
  import crypto4 from "crypto";
8105
8219
  init_database();
8106
8220
  init_plan_limits();
@@ -8111,13 +8225,13 @@ function registerStoreDecision(server) {
8111
8225
  title: "Store Decision",
8112
8226
  description: "Store an authoritative decision keyed by domain. Use this when a decision is made that should be canonical \u2014 future lookups via get_decision return the latest decision for that domain. Supports supersession chains.",
8113
8227
  inputSchema: {
8114
- domain: z74.string().describe(
8228
+ domain: z75.string().describe(
8115
8229
  "Domain key, e.g. 'auth-strategy', 'db-migration-approach', 'api-versioning'"
8116
8230
  ),
8117
- decision: z74.string().describe("The decision text \u2014 what was decided"),
8118
- rationale: z74.string().optional().describe("Why this decision was made \u2014 constraints, trade-offs, context"),
8119
- supersedes: z74.string().optional().describe("UUID of the decision this supersedes (previous decision for this domain)"),
8120
- project_name: z74.string().optional().describe("Project name")
8231
+ decision: z75.string().describe("The decision text \u2014 what was decided"),
8232
+ rationale: z75.string().optional().describe("Why this decision was made \u2014 constraints, trade-offs, context"),
8233
+ supersedes: z75.string().optional().describe("UUID of the decision this supersedes (previous decision for this domain)"),
8234
+ project_name: z75.string().optional().describe("Project name")
8121
8235
  }
8122
8236
  },
8123
8237
  async ({ domain, decision, rationale, supersedes, project_name }) => {
@@ -8185,7 +8299,7 @@ Supersedes: ${supersedes}` : ""}`
8185
8299
 
8186
8300
  // src/mcp/tools/get-decision.ts
8187
8301
  init_database();
8188
- import { z as z75 } from "zod";
8302
+ import { z as z76 } from "zod";
8189
8303
  function registerGetDecision(server) {
8190
8304
  server.registerTool(
8191
8305
  "get_decision",
@@ -8193,7 +8307,7 @@ function registerGetDecision(server) {
8193
8307
  title: "Get Decision",
8194
8308
  description: "Retrieve the latest authoritative decision for a domain. Returns the current active decision and the supersession history.",
8195
8309
  inputSchema: {
8196
- domain: z75.string().describe(
8310
+ domain: z76.string().describe(
8197
8311
  "Domain key to look up, e.g. 'auth-strategy', 'db-migration-approach'"
8198
8312
  )
8199
8313
  }
@@ -8256,7 +8370,7 @@ function registerGetDecision(server) {
8256
8370
  }
8257
8371
 
8258
8372
  // src/mcp/tools/people-roster.ts
8259
- import { z as z76 } from "zod";
8373
+ import { z as z77 } from "zod";
8260
8374
 
8261
8375
  // src/lib/people.ts
8262
8376
  init_config();
@@ -8304,10 +8418,10 @@ function registerAddPerson(server) {
8304
8418
  title: "Add Person",
8305
8419
  description: "Add or update a key human in the people roster. Used for co-founders, partners, customers \u2014 anyone agents need to know about.",
8306
8420
  inputSchema: {
8307
- name: z76.string().describe("Person's name"),
8308
- role: z76.string().describe("Their role (e.g. co-founder, customer, partner)"),
8309
- relationship: z76.string().describe("Relationship to the organization (e.g. co-founder, early adopter, investor)"),
8310
- notes: z76.string().optional().describe("Additional context about this person")
8421
+ name: z77.string().describe("Person's name"),
8422
+ role: z77.string().describe("Their role (e.g. co-founder, customer, partner)"),
8423
+ relationship: z77.string().describe("Relationship to the organization (e.g. co-founder, early adopter, investor)"),
8424
+ notes: z77.string().optional().describe("Additional context about this person")
8311
8425
  }
8312
8426
  },
8313
8427
  async ({ name, role, relationship, notes }) => {
@@ -8353,7 +8467,7 @@ function registerGetPerson(server) {
8353
8467
  title: "Get Person",
8354
8468
  description: "Look up a specific person by name from the people roster.",
8355
8469
  inputSchema: {
8356
- name: z76.string().describe("Person's name to look up")
8470
+ name: z77.string().describe("Person's name to look up")
8357
8471
  }
8358
8472
  },
8359
8473
  async ({ name }) => {
@@ -8377,7 +8491,7 @@ Notes: ${person.notes}` : ""}`
8377
8491
  }
8378
8492
 
8379
8493
  // src/mcp/tools/crm.ts
8380
- import { z as z77 } from "zod";
8494
+ import { z as z78 } from "zod";
8381
8495
 
8382
8496
  // src/lib/exe-db-read.ts
8383
8497
  import path14 from "path";
@@ -8448,14 +8562,16 @@ function registerCrm(server) {
8448
8562
  title: "CRM",
8449
8563
  description: "Read-only CRM access from exe-db crm schema. Actions: list_people, get_person, list_tables, describe_table.",
8450
8564
  inputSchema: {
8451
- action: z77.enum(["list_people", "get_person", "list_tables", "describe_table"]).describe("CRM read operation"),
8452
- id: z77.string().optional().describe("CRM row/person id for get_person"),
8453
- query: z77.string().optional().describe("Text search for list_people/get_person"),
8454
- table: z77.string().optional().describe("crm schema table name for describe_table"),
8455
- limit: z77.coerce.number().int().min(1).max(50).optional().describe("Max rows, capped at 50"),
8456
- offset: z77.coerce.number().int().min(0).optional().describe("Rows to skip")
8457
- }
8458
- }, async ({ action, id, query, table, limit, offset }) => {
8565
+ action: z78.enum(["list_people", "get_person", "list_tables", "describe_table"]).describe("CRM read operation"),
8566
+ id: z78.string().optional().describe("CRM row/person id for get_person"),
8567
+ query: z78.string().optional().describe("Text search for list_people/get_person"),
8568
+ table: z78.string().optional().describe("crm schema table name for describe_table"),
8569
+ ...PaginationSchema,
8570
+ ...DateRangeSchema,
8571
+ ...TextSearchSchema,
8572
+ ...SortSchema
8573
+ }
8574
+ }, async ({ action, id, query, table, limit, offset, date_from, date_to, text_search, sort_by, sort_order }) => {
8459
8575
  try {
8460
8576
  if (action === "get_person" && !id && !query) return text('crm action "get_person" requires id or query', true);
8461
8577
  if (action === "describe_table" && !table) return text('crm action "describe_table" requires table', true);
@@ -8494,15 +8610,28 @@ function registerCrm(server) {
8494
8610
  );
8495
8611
  return rows2.length === 0 ? text("No CRM person found.") : text(JSON.stringify(rows2[0]?.person ?? rows2[0], null, 2));
8496
8612
  }
8497
- const rows = query ? await prisma.$queryRawUnsafe(
8498
- `SELECT to_jsonb(p) AS person FROM ${relation} p WHERE to_jsonb(p)::text ILIKE $1 ORDER BY (p.id)::text LIMIT $2 OFFSET $3`,
8499
- `%${query}%`,
8500
- lim,
8501
- off
8502
- ) : await prisma.$queryRawUnsafe(
8503
- `SELECT to_jsonb(p) AS person FROM ${relation} p ORDER BY (p.id)::text LIMIT $1 OFFSET $2`,
8504
- lim,
8505
- off
8613
+ const searchTerm = text_search || query;
8614
+ const clauses = [];
8615
+ const args = [];
8616
+ if (searchTerm) {
8617
+ args.push(`%${searchTerm}%`);
8618
+ clauses.push(`to_jsonb(p)::text ILIKE $${args.length}`);
8619
+ }
8620
+ if (date_from) {
8621
+ args.push(date_from);
8622
+ clauses.push(`p.created_at >= $${args.length}`);
8623
+ }
8624
+ if (date_to) {
8625
+ args.push(date_to);
8626
+ clauses.push(`p.created_at <= $${args.length}`);
8627
+ }
8628
+ const where = clauses.length > 0 ? `WHERE ${clauses.join(" AND ")}` : "";
8629
+ const orderCol = sort_by && /^[a-zA-Z_]+$/.test(sort_by) ? `p.${sort_by}` : "(p.id)::text";
8630
+ const orderDir = sort_order === "asc" ? "ASC" : "DESC";
8631
+ args.push(lim, off);
8632
+ const rows = await prisma.$queryRawUnsafe(
8633
+ `SELECT to_jsonb(p) AS person FROM ${relation} p ${where} ORDER BY ${orderCol} ${orderDir} LIMIT $${args.length - 1} OFFSET $${args.length}`,
8634
+ ...args
8506
8635
  );
8507
8636
  return text(JSON.stringify({ people: rows.map((r) => r.person ?? r) }, null, 2));
8508
8637
  } catch (err) {
@@ -8512,7 +8641,7 @@ function registerCrm(server) {
8512
8641
  }
8513
8642
 
8514
8643
  // src/mcp/tools/raw-data.ts
8515
- import { z as z78 } from "zod";
8644
+ import { z as z79 } from "zod";
8516
8645
  function text2(content, isError = false) {
8517
8646
  return { content: [{ type: "text", text: content }], ...isError ? { isError: true } : {} };
8518
8647
  }
@@ -8521,21 +8650,19 @@ function registerRawData(server) {
8521
8650
  title: "Raw Data",
8522
8651
  description: "Read-only access to exe-db raw.raw_events landing pad. Actions: list_sources, query, get. Results are capped because raw payloads can consume many tokens.",
8523
8652
  inputSchema: {
8524
- action: z78.enum(["list_sources", "query", "get"]).describe("Raw data read operation"),
8525
- id: z78.string().optional().describe("raw.raw_events id for action=get"),
8526
- source: z78.string().optional().describe("Filter by raw source"),
8527
- event_type: z78.string().optional().describe("Filter by event_type"),
8528
- query: z78.string().optional().describe("Search payload/metadata text"),
8529
- processed: z78.boolean().optional().describe("Filter processed_at IS NULL/NOT NULL"),
8530
- limit: z78.coerce.number().int().min(1).max(50).optional().describe("Max rows, capped at 50"),
8531
- offset: z78.coerce.number().int().min(0).optional().describe("Rows to skip"),
8532
- include_payload: z78.boolean().optional().describe("Include full payload JSON. Default false to save tokens."),
8533
- date_from: z78.string().optional().describe("Filter events after this ISO date (inclusive)"),
8534
- date_to: z78.string().optional().describe("Filter events before this ISO date (inclusive)"),
8535
- sort_by: z78.string().optional().describe("Sort field: timestamp (default), source, event_type"),
8536
- sort_order: z78.enum(["asc", "desc"]).optional().describe("Sort direction (default desc)")
8537
- }
8538
- }, async ({ action, id, source, event_type, query, processed, limit, offset, include_payload, date_from, date_to, sort_by, sort_order }) => {
8653
+ action: z79.enum(["list_sources", "query", "get"]).describe("Raw data read operation"),
8654
+ id: z79.string().optional().describe("raw.raw_events id for action=get"),
8655
+ source: z79.string().optional().describe("Filter by raw source"),
8656
+ event_type: z79.string().optional().describe("Filter by event_type"),
8657
+ query: z79.string().optional().describe("Search payload/metadata text"),
8658
+ processed: z79.boolean().optional().describe("Filter processed_at IS NULL/NOT NULL"),
8659
+ ...PaginationSchema,
8660
+ include_payload: z79.boolean().optional().describe("Include full payload JSON. Default false to save tokens."),
8661
+ ...DateRangeSchema,
8662
+ ...SortSchema,
8663
+ ...StructuredFiltersSchema
8664
+ }
8665
+ }, async ({ action, id, source, event_type, query, processed, limit, offset, include_payload, date_from, date_to, sort_by, sort_order, structured_filters }) => {
8539
8666
  try {
8540
8667
  if (action === "get" && !id) return text2('raw_data action "get" requires id', true);
8541
8668
  if (!await relationExists("raw", "raw_events")) {
@@ -8576,6 +8703,14 @@ function registerRawData(server) {
8576
8703
  if (processed !== void 0) clauses.push(processed ? "processed_at IS NOT NULL" : "processed_at IS NULL");
8577
8704
  if (date_from) add("timestamp >= ?", date_from);
8578
8705
  if (date_to) add("timestamp <= ?", date_to);
8706
+ const sfClauses = buildStructuredFilterClauses(
8707
+ structured_filters,
8708
+ { timestamp: "timestamp", source: "source", event_type: "event_type" }
8709
+ );
8710
+ for (const sf of sfClauses) {
8711
+ args.push(...sf.args);
8712
+ clauses.push(sf.sql.replace(/\?/g, () => `$${args.length}`));
8713
+ }
8579
8714
  const lim = Math.min(limit ?? 25, 50);
8580
8715
  const off = offset ?? 0;
8581
8716
  const payloadSelect = include_payload ? "payload," : "jsonb_typeof(payload) AS payload_type,";
@@ -8598,9 +8733,9 @@ function registerRawData(server) {
8598
8733
 
8599
8734
  // src/mcp/tools/company-actions.ts
8600
8735
  init_config();
8601
- import { z as z79 } from "zod";
8736
+ import { z as z80 } from "zod";
8602
8737
  var FETCH_TIMEOUT_MS4 = 15e3;
8603
- var ACTION = z79.enum(["list_connectors", "describe_connector", "preview", "execute", "list_runs", "get_run"]);
8738
+ var ACTION = z80.enum(["list_connectors", "describe_connector", "preview", "execute", "list_runs", "get_run"]);
8604
8739
  function format(payload) {
8605
8740
  return ["# Company Actions", "", JSON.stringify(payload, null, 2)].join("\n");
8606
8741
  }
@@ -8612,13 +8747,13 @@ function registerCompanyActions(server) {
8612
8747
  description: "Preview and execute external connector actions (Asana, WhatsApp) through exe-gateway with audit/safety gates.",
8613
8748
  inputSchema: {
8614
8749
  action: ACTION.describe("list_connectors, describe_connector, preview, execute, list_runs, get_run"),
8615
- connector: z79.string().optional().describe("Connector to use, e.g. asana, whatsapp, airtable, notion"),
8616
- connector_ref: z79.string().optional().describe("Exact connector ref from list_connectors when connector names overlap"),
8617
- operation: z79.string().optional().describe("Connector operation, e.g. create_task or send_message"),
8618
- payload: z79.record(z79.string(), z79.unknown()).optional().describe("Operation payload"),
8619
- idempotency_key: z79.string().optional().describe("Stable key to prevent duplicate execution"),
8620
- confirm_token: z79.string().optional().describe("Optional future approval token"),
8621
- run_id: z79.string().optional().describe("Run id for get_run")
8750
+ connector: z80.string().optional().describe("Connector to use, e.g. asana, whatsapp, airtable, notion"),
8751
+ connector_ref: z80.string().optional().describe("Exact connector ref from list_connectors when connector names overlap"),
8752
+ operation: z80.string().optional().describe("Connector operation, e.g. create_task or send_message"),
8753
+ payload: z80.record(z80.string(), z80.unknown()).optional().describe("Operation payload"),
8754
+ idempotency_key: z80.string().optional().describe("Stable key to prevent duplicate execution"),
8755
+ confirm_token: z80.string().optional().describe("Optional future approval token"),
8756
+ run_id: z80.string().optional().describe("Run id for get_run")
8622
8757
  }
8623
8758
  },
8624
8759
  async (input) => {
@@ -8663,8 +8798,8 @@ function registerCompanyActions(server) {
8663
8798
  }
8664
8799
 
8665
8800
  // src/mcp/tools/workflow.ts
8666
- import { z as z80 } from "zod";
8667
- var ACTION2 = z80.enum([
8801
+ import { z as z81 } from "zod";
8802
+ var ACTION2 = z81.enum([
8668
8803
  "create_workflow",
8669
8804
  "start_workflow",
8670
8805
  "get_workflow_status",
@@ -8672,23 +8807,23 @@ var ACTION2 = z80.enum([
8672
8807
  "list_workflows",
8673
8808
  "list_instances"
8674
8809
  ]);
8675
- var StepSchema = z80.object({
8676
- name: z80.string().describe("Human-readable step name"),
8677
- type: z80.enum(["execute_action", "wait_for_approval", "conditional"]).describe("Step type"),
8678
- action: z80.object({
8679
- type: z80.enum(["send_whatsapp", "send_message", "create_task", "update_wiki", "mcp_tool"]),
8680
- params: z80.record(z80.string(), z80.string()),
8681
- requires_approval: z80.boolean().optional()
8810
+ var StepSchema = z81.object({
8811
+ name: z81.string().describe("Human-readable step name"),
8812
+ type: z81.enum(["execute_action", "wait_for_approval", "conditional"]).describe("Step type"),
8813
+ action: z81.object({
8814
+ type: z81.enum(["send_whatsapp", "send_message", "create_task", "update_wiki", "mcp_tool"]),
8815
+ params: z81.record(z81.string(), z81.string()),
8816
+ requires_approval: z81.boolean().optional()
8682
8817
  }).optional().describe("Action to execute (for execute_action steps)"),
8683
- connector: z80.string().optional().describe("Connector name (e.g., asana, whatsapp)"),
8684
- operation: z80.string().optional().describe("Connector operation (e.g., create_task)"),
8685
- payload: z80.record(z80.string(), z80.unknown()).optional().describe("Operation payload"),
8686
- condition: z80.object({
8687
- expression: z80.string().describe("Expression like '{{step.1.result.status}} == completed'"),
8688
- then_step: z80.number().optional(),
8689
- else_step: z80.number().optional()
8818
+ connector: z81.string().optional().describe("Connector name (e.g., asana, whatsapp)"),
8819
+ operation: z81.string().optional().describe("Connector operation (e.g., create_task)"),
8820
+ payload: z81.record(z81.string(), z81.unknown()).optional().describe("Operation payload"),
8821
+ condition: z81.object({
8822
+ expression: z81.string().describe("Expression like '{{step.1.result.status}} == completed'"),
8823
+ then_step: z81.number().optional(),
8824
+ else_step: z81.number().optional()
8690
8825
  }).optional().describe("Condition for conditional steps"),
8691
- approval_message: z80.string().optional().describe("Message shown when waiting for approval")
8826
+ approval_message: z81.string().optional().describe("Message shown when waiting for approval")
8692
8827
  });
8693
8828
  function registerWorkflowTool(server) {
8694
8829
  server.registerTool(
@@ -8698,14 +8833,14 @@ function registerWorkflowTool(server) {
8698
8833
  description: "Create, run, and manage multi-step workflows that chain actions with approval gates. Steps reference previous outputs via {{step.N.result}}. Actions: create_workflow, start_workflow, get_workflow_status, approve_workflow_step, list_workflows, list_instances.",
8699
8834
  inputSchema: {
8700
8835
  action: ACTION2.describe("create_workflow | start_workflow | get_workflow_status | approve_workflow_step | list_workflows | list_instances"),
8701
- name: z80.string().optional().describe("Workflow name (for create_workflow)"),
8702
- description: z80.string().optional().describe("Workflow description (for create_workflow)"),
8703
- steps: z80.array(StepSchema).optional().describe("Workflow steps (for create_workflow)"),
8704
- definition_id: z80.string().optional().describe("Workflow definition ID (for start_workflow)"),
8705
- instance_id: z80.string().optional().describe("Workflow instance ID (for get_workflow_status, approve_workflow_step)"),
8706
- context: z80.record(z80.string(), z80.unknown()).optional().describe("Initial context/record (for start_workflow)"),
8707
- approved: z80.boolean().optional().describe("Approve (true) or reject (false) the step (for approve_workflow_step)"),
8708
- status_filter: z80.string().optional().describe("Filter instances by status (for list_instances)")
8836
+ name: z81.string().optional().describe("Workflow name (for create_workflow)"),
8837
+ description: z81.string().optional().describe("Workflow description (for create_workflow)"),
8838
+ steps: z81.array(StepSchema).optional().describe("Workflow steps (for create_workflow)"),
8839
+ definition_id: z81.string().optional().describe("Workflow definition ID (for start_workflow)"),
8840
+ instance_id: z81.string().optional().describe("Workflow instance ID (for get_workflow_status, approve_workflow_step)"),
8841
+ context: z81.record(z81.string(), z81.unknown()).optional().describe("Initial context/record (for start_workflow)"),
8842
+ approved: z81.boolean().optional().describe("Approve (true) or reject (false) the step (for approve_workflow_step)"),
8843
+ status_filter: z81.string().optional().describe("Filter instances by status (for list_instances)")
8709
8844
  }
8710
8845
  },
8711
8846
  async (input) => {
@@ -8718,7 +8853,7 @@ function registerWorkflowTool(server) {
8718
8853
  getWorkflowInstance,
8719
8854
  listWorkflowInstances,
8720
8855
  approveWorkflowStep
8721
- } = await import("./workflow-engine-A6K4MHN3.js");
8856
+ } = await import("./workflow-engine-7W4MSNBF.js");
8722
8857
  try {
8723
8858
  switch (input.action) {
8724
8859
  case "create_workflow": {
@@ -8840,21 +8975,73 @@ function formatInstanceStatus(inst, def) {
8840
8975
  return lines.join("\n");
8841
8976
  }
8842
8977
 
8978
+ // src/mcp/tools/file-copy.ts
8979
+ import { z as z82 } from "zod";
8980
+ import { copyFileSync, existsSync as existsSync9, mkdirSync as mkdirSync3, statSync as statSync2 } from "fs";
8981
+ import path15 from "path";
8982
+ function registerFileCopy(server) {
8983
+ server.registerTool(
8984
+ "file_copy",
8985
+ {
8986
+ title: "File Copy",
8987
+ description: "Copy a file from source to destination without streaming through the LLM. Saves tokens for literal file copies.",
8988
+ inputSchema: {
8989
+ source: z82.string().describe("Source file path (absolute or relative to cwd)"),
8990
+ destination: z82.string().describe("Destination file path (absolute or relative to cwd)"),
8991
+ overwrite: z82.boolean().optional().default(false).describe("Overwrite destination if it exists")
8992
+ }
8993
+ },
8994
+ async ({ source, destination, overwrite }) => {
8995
+ try {
8996
+ const srcPath = path15.resolve(source);
8997
+ const dstPath = path15.resolve(destination);
8998
+ if (!existsSync9(srcPath)) {
8999
+ return { content: [{ type: "text", text: `Source file not found: ${srcPath}` }], isError: true };
9000
+ }
9001
+ const srcStat = statSync2(srcPath);
9002
+ if (!srcStat.isFile()) {
9003
+ return { content: [{ type: "text", text: `Source is not a file: ${srcPath}` }], isError: true };
9004
+ }
9005
+ if (existsSync9(dstPath) && !overwrite) {
9006
+ return { content: [{ type: "text", text: `Destination already exists: ${dstPath}. Set overwrite=true to replace.` }], isError: true };
9007
+ }
9008
+ const dstDir = path15.dirname(dstPath);
9009
+ if (!existsSync9(dstDir)) {
9010
+ mkdirSync3(dstDir, { recursive: true });
9011
+ }
9012
+ copyFileSync(srcPath, dstPath);
9013
+ const sizeMB = (srcStat.size / (1024 * 1024)).toFixed(2);
9014
+ return {
9015
+ content: [{
9016
+ type: "text",
9017
+ text: `Copied ${srcPath} \u2192 ${dstPath} (${sizeMB} MB)`
9018
+ }]
9019
+ };
9020
+ } catch (err) {
9021
+ return {
9022
+ content: [{ type: "text", text: `File copy failed: ${err instanceof Error ? err.message : String(err)}` }],
9023
+ isError: true
9024
+ };
9025
+ }
9026
+ }
9027
+ );
9028
+ }
9029
+
8843
9030
  // src/mcp/tools/create-bug-report.ts
8844
9031
  init_embedder();
8845
- import { z as z81 } from "zod";
9032
+ import { z as z83 } from "zod";
8846
9033
  import crypto5 from "crypto";
8847
9034
  import { mkdir as mkdir2, writeFile as writeFile2 } from "fs/promises";
8848
- import path15 from "path";
9035
+ import path16 from "path";
8849
9036
  init_config();
8850
9037
  init_license();
8851
- var CLASSIFICATION = z81.enum([
9038
+ var CLASSIFICATION = z83.enum([
8852
9039
  "upstream_bug",
8853
9040
  "customer_customization",
8854
9041
  "emergency_hotfix",
8855
9042
  "unclear"
8856
9043
  ]);
8857
- var SEVERITY = z81.enum(["p0", "p1", "p2", "p3"]);
9044
+ var SEVERITY = z83.enum(["p0", "p1", "p2", "p3"]);
8858
9045
  function slugify(input) {
8859
9046
  return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "bug-report";
8860
9047
  }
@@ -8935,23 +9122,23 @@ function registerCreateBugReport(server) {
8935
9122
  title: "Create Bug Report",
8936
9123
  description: "Classify and file an exe-os issue as upstream_bug, customer_customization, emergency_hotfix, or unclear. Writes a local report, stores memory, and optionally sends to AskExe support when a support endpoint is configured.",
8937
9124
  inputSchema: {
8938
- title: z81.string().min(3).describe("Short descriptive title"),
9125
+ title: z83.string().min(3).describe("Short descriptive title"),
8939
9126
  classification: CLASSIFICATION.describe(
8940
9127
  "upstream_bug = platform defect; customer_customization = local preference; emergency_hotfix = temporary local patch; unclear = needs maintainer triage"
8941
9128
  ),
8942
9129
  severity: SEVERITY.default("p2").describe("p0 critical \u2192 p3 low"),
8943
- summary: z81.string().min(10).describe("What happened and why it matters"),
8944
- customer_impact: z81.string().optional().describe("How this affects the customer/founder"),
8945
- reproduction_steps: z81.array(z81.string()).optional().describe("Steps to reproduce"),
8946
- expected: z81.string().optional().describe("Expected behavior"),
8947
- actual: z81.string().optional().describe("Actual behavior"),
8948
- files_changed: z81.array(z81.string()).optional().describe("Files changed or suspected"),
8949
- workaround: z81.string().optional().describe("Temporary local workaround/hotfix, if any"),
8950
- local_patch_diff: z81.string().optional().describe("Small local diff or patch summary"),
8951
- product: z81.string().optional().describe("Product this bug is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
8952
- package_version: z81.string().optional().describe("Installed package version"),
8953
- project_name: z81.string().optional().describe("Project/customer context"),
8954
- send_upstream: z81.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint")
9130
+ summary: z83.string().min(10).describe("What happened and why it matters"),
9131
+ customer_impact: z83.string().optional().describe("How this affects the customer/founder"),
9132
+ reproduction_steps: z83.array(z83.string()).optional().describe("Steps to reproduce"),
9133
+ expected: z83.string().optional().describe("Expected behavior"),
9134
+ actual: z83.string().optional().describe("Actual behavior"),
9135
+ files_changed: z83.array(z83.string()).optional().describe("Files changed or suspected"),
9136
+ workaround: z83.string().optional().describe("Temporary local workaround/hotfix, if any"),
9137
+ local_patch_diff: z83.string().optional().describe("Small local diff or patch summary"),
9138
+ product: z83.string().optional().describe("Product this bug is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
9139
+ package_version: z83.string().optional().describe("Installed package version"),
9140
+ project_name: z83.string().optional().describe("Project/customer context"),
9141
+ send_upstream: z83.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint")
8955
9142
  }
8956
9143
  },
8957
9144
  async ({
@@ -9003,9 +9190,9 @@ function registerCreateBugReport(server) {
9003
9190
  filesChanged: files_changed,
9004
9191
  projectName: project_name
9005
9192
  });
9006
- const outDir = path15.join(EXE_AI_DIR, "bug-reports");
9193
+ const outDir = path16.join(EXE_AI_DIR, "bug-reports");
9007
9194
  await mkdir2(outDir, { recursive: true });
9008
- const reportPath = path15.join(outDir, `${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}-${slugify(title)}-${id.slice(0, 8)}.md`);
9195
+ const reportPath = path16.join(outDir, `${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}-${slugify(title)}-${id.slice(0, 8)}.md`);
9009
9196
  await writeFile2(reportPath, markdown, "utf-8");
9010
9197
  let vector = null;
9011
9198
  try {
@@ -9074,19 +9261,19 @@ Upstream status: ${upstreamStatus}`
9074
9261
 
9075
9262
  // src/mcp/tools/create-feature-request.ts
9076
9263
  init_embedder();
9077
- import { z as z82 } from "zod";
9264
+ import { z as z84 } from "zod";
9078
9265
  import crypto6 from "crypto";
9079
9266
  import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
9080
- import path16 from "path";
9267
+ import path17 from "path";
9081
9268
  init_config();
9082
9269
  init_license();
9083
- var CATEGORY = z82.enum([
9270
+ var CATEGORY = z84.enum([
9084
9271
  "upstream_feature",
9085
9272
  "local_customization",
9086
9273
  "integration",
9087
9274
  "unclear"
9088
9275
  ]);
9089
- var PRIORITY = z82.enum(["p0", "p1", "p2", "p3"]);
9276
+ var PRIORITY = z84.enum(["p0", "p1", "p2", "p3"]);
9090
9277
  function slugify2(input) {
9091
9278
  return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "feature-request";
9092
9279
  }
@@ -9154,20 +9341,20 @@ function registerCreateFeatureRequest(server) {
9154
9341
  title: "Create Feature Request",
9155
9342
  description: "File a feature request for exe-os: upstream_feature (requires platform changes), local_customization (configurable in customer layers), integration (third-party), or unclear. Writes a local report, stores memory, and optionally sends to AskExe.",
9156
9343
  inputSchema: {
9157
- title: z82.string().min(3).describe("Short descriptive title"),
9344
+ title: z84.string().min(3).describe("Short descriptive title"),
9158
9345
  category: CATEGORY.describe(
9159
9346
  "upstream_feature = platform capability change; local_customization = configurable in customer layers; integration = third-party connector; unclear = needs product triage"
9160
9347
  ),
9161
9348
  priority: PRIORITY.default("p2").describe("p0 critical \u2192 p3 low"),
9162
- description: z82.string().min(10).describe("What capability is needed and why"),
9163
- use_case: z82.string().optional().describe("Concrete scenario where this feature would be used"),
9164
- current_workaround: z82.string().optional().describe("How the need is currently addressed, if at all"),
9165
- proposed_solution: z82.string().optional().describe("Suggested implementation approach"),
9166
- business_impact: z82.string().optional().describe("Impact on business/workflow if this ships"),
9167
- product: z82.string().optional().describe("Product this feature is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
9168
- package_version: z82.string().optional().describe("Installed package version"),
9169
- project_name: z82.string().optional().describe("Project/customer context"),
9170
- send_upstream: z82.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint")
9349
+ description: z84.string().min(10).describe("What capability is needed and why"),
9350
+ use_case: z84.string().optional().describe("Concrete scenario where this feature would be used"),
9351
+ current_workaround: z84.string().optional().describe("How the need is currently addressed, if at all"),
9352
+ proposed_solution: z84.string().optional().describe("Suggested implementation approach"),
9353
+ business_impact: z84.string().optional().describe("Impact on business/workflow if this ships"),
9354
+ product: z84.string().optional().describe("Product this feature is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
9355
+ package_version: z84.string().optional().describe("Installed package version"),
9356
+ project_name: z84.string().optional().describe("Project/customer context"),
9357
+ send_upstream: z84.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint")
9171
9358
  }
9172
9359
  },
9173
9360
  async ({
@@ -9204,9 +9391,9 @@ function registerCreateFeatureRequest(server) {
9204
9391
  businessImpact: business_impact,
9205
9392
  projectName: project_name
9206
9393
  });
9207
- const outDir = path16.join(EXE_AI_DIR, "feature-requests");
9394
+ const outDir = path17.join(EXE_AI_DIR, "feature-requests");
9208
9395
  await mkdir3(outDir, { recursive: true });
9209
- const reportPath = path16.join(outDir, `${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}-${slugify2(title)}-${id.slice(0, 8)}.md`);
9396
+ const reportPath = path17.join(outDir, `${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}-${slugify2(title)}-${id.slice(0, 8)}.md`);
9210
9397
  await writeFile3(reportPath, markdown, "utf-8");
9211
9398
  let vector = null;
9212
9399
  try {
@@ -9269,7 +9456,7 @@ Upstream status: ${upstreamStatus}`
9269
9456
  }
9270
9457
 
9271
9458
  // src/mcp/tools/support.ts
9272
- import { z as z83 } from "zod";
9459
+ import { z as z85 } from "zod";
9273
9460
  init_license();
9274
9461
  function formatRows(rows, mode) {
9275
9462
  const lines = [`exe-os support ${mode}`, ""];
@@ -9311,7 +9498,7 @@ function registerSupportTools(server) {
9311
9498
  title: "Support Test",
9312
9499
  description: "End-to-end support intake smoke test. Files a clearly marked test report upstream and auto-closes it on AskExe machines with admin credentials.",
9313
9500
  inputSchema: {
9314
- project: z83.string().default("support-smoke").describe("Customer/project name, e.g. hygo")
9501
+ project: z85.string().default("support-smoke").describe("Customer/project name, e.g. hygo")
9315
9502
  }
9316
9503
  },
9317
9504
  async ({ project }) => {
@@ -9329,8 +9516,8 @@ function registerSupportTools(server) {
9329
9516
  title: "My Bug Reports",
9330
9517
  description: "List bug reports you've filed, scoped to your license. Shows status (open/triaged/fixed/closed), severity, and fixed_version so you know when to update.",
9331
9518
  inputSchema: {
9332
- status: z83.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("all").describe("Filter by status. Default: all"),
9333
- limit: z83.number().min(1).max(50).default(25).describe("Max results")
9519
+ status: z85.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("all").describe("Filter by status. Default: all"),
9520
+ limit: z85.number().min(1).max(50).default(25).describe("Max results")
9334
9521
  }
9335
9522
  },
9336
9523
  async ({ status: status2, limit }) => {
@@ -9395,8 +9582,8 @@ function registerSupportTools(server) {
9395
9582
  title: "My Feature Requests",
9396
9583
  description: "List feature requests you've filed, scoped to your license. Shows status (open/planned/in_progress/shipped/closed), priority, and shipped_version so you know when to update.",
9397
9584
  inputSchema: {
9398
- status: z83.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("all").describe("Filter by status. Default: all"),
9399
- limit: z83.number().min(1).max(50).default(25).describe("Max results")
9585
+ status: z85.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("all").describe("Filter by status. Default: all"),
9586
+ limit: z85.number().min(1).max(50).default(25).describe("Max results")
9400
9587
  }
9401
9588
  },
9402
9589
  async ({ status: status2, limit }) => {
@@ -9461,7 +9648,7 @@ function registerSupportTools(server) {
9461
9648
  // src/mcp/tools/cli-parity.ts
9462
9649
  import { execFile as execFile2 } from "child_process";
9463
9650
  import { promisify as promisify2 } from "util";
9464
- import { z as z84 } from "zod";
9651
+ import { z as z86 } from "zod";
9465
9652
  var execFileAsync2 = promisify2(execFile2);
9466
9653
  async function runCommand(command, args, timeout = 6e4) {
9467
9654
  const printable = [command, ...args].join(" ");
@@ -9497,12 +9684,12 @@ function registerCliParityTools(server) {
9497
9684
  title: "Doctor",
9498
9685
  description: "Run exe-os doctor audit. Defaults to read-only diagnostics; optional dry-run/fix flags mirror CLI.",
9499
9686
  inputSchema: {
9500
- agent: z84.string().optional(),
9501
- project: z84.string().optional(),
9502
- verbose: z84.boolean().default(false),
9503
- conflicts: z84.boolean().default(false),
9504
- dry_run: z84.boolean().default(false),
9505
- fix: z84.boolean().default(false)
9687
+ agent: z86.string().optional(),
9688
+ project: z86.string().optional(),
9689
+ verbose: z86.boolean().default(false),
9690
+ conflicts: z86.boolean().default(false),
9691
+ dry_run: z86.boolean().default(false),
9692
+ fix: z86.boolean().default(false)
9506
9693
  }
9507
9694
  }, async ({ agent, project, verbose, conflicts, dry_run, fix }) => {
9508
9695
  const args = [];
@@ -9519,9 +9706,9 @@ function registerCliParityTools(server) {
9519
9706
  title: "Rename Employee",
9520
9707
  description: "Rename an employee using the same path as `exe-os rename <old> <new>`. Use for customer roster/identity renames.",
9521
9708
  inputSchema: {
9522
- old_name: z84.string().min(1),
9523
- new_name: z84.string().min(1),
9524
- dry_run: z84.boolean().default(false)
9709
+ old_name: z86.string().min(1),
9710
+ new_name: z86.string().min(1),
9711
+ dry_run: z86.boolean().default(false)
9525
9712
  }
9526
9713
  }, async ({ old_name, new_name, dry_run }) => {
9527
9714
  if (dry_run) {
@@ -9534,7 +9721,7 @@ function registerCliParityTools(server) {
9534
9721
  server.registerTool("status_brief", {
9535
9722
  title: "Status Brief",
9536
9723
  description: "Return current employee/tmux status. Mirrors `exe-status` and supports optional deep view for one employee.",
9537
- inputSchema: { employee: z84.string().optional() }
9724
+ inputSchema: { employee: z86.string().optional() }
9538
9725
  }, async ({ employee }) => {
9539
9726
  const text3 = await status(employee);
9540
9727
  return result2(text3, { ok: true, employee: employee ?? null });
@@ -9542,7 +9729,7 @@ function registerCliParityTools(server) {
9542
9729
  server.registerTool("pending_work_summary", {
9543
9730
  title: "Pending Work Summary",
9544
9731
  description: "Return pending reviews, messages, and notifications using the same summaries as the CLI tools.",
9545
- inputSchema: { agent: z84.string().optional() }
9732
+ inputSchema: { agent: z86.string().optional() }
9546
9733
  }, async ({ agent }) => {
9547
9734
  const settled = await Promise.allSettled([
9548
9735
  runCommand("exe-pending-reviews", [], 3e4),
@@ -9566,7 +9753,7 @@ function registerCliParityTools(server) {
9566
9753
  server.registerTool("key_rotation_preflight", {
9567
9754
  title: "Key Rotation Preflight",
9568
9755
  description: "Dry-run key rotation/update preflight. No destructive changes.",
9569
- inputSchema: { mode: z84.enum(["rotate", "update"]).default("rotate") }
9756
+ inputSchema: { mode: z86.enum(["rotate", "update"]).default("rotate") }
9570
9757
  }, async ({ mode }) => {
9571
9758
  const out = await runCommand("exe-os", ["key", mode, "--dry-run"], 6e4);
9572
9759
  return result2(out.text, { ok: out.ok, command: out.command, mode }, !out.ok);
@@ -9585,11 +9772,11 @@ function registerCliParityTools(server) {
9585
9772
  title: "Stack Update Check",
9586
9773
  description: "Plan/check a customer stack update without applying Docker changes. Mirrors `exe-os stack-update --check`.",
9587
9774
  inputSchema: {
9588
- target: z84.string().optional(),
9589
- manifest: z84.string().optional(),
9590
- compose_file: z84.string().optional(),
9591
- env_file: z84.string().optional(),
9592
- deployment_persona: z84.enum(["customer", "askexe-control-plane"]).default("customer")
9775
+ target: z86.string().optional(),
9776
+ manifest: z86.string().optional(),
9777
+ compose_file: z86.string().optional(),
9778
+ env_file: z86.string().optional(),
9779
+ deployment_persona: z86.enum(["customer", "askexe-control-plane"]).default("customer")
9593
9780
  }
9594
9781
  }, async ({ target, manifest, compose_file, env_file, deployment_persona }) => {
9595
9782
  const args = ["stack-update", "--check", "--deployment-persona", deployment_persona];
@@ -9611,8 +9798,8 @@ function registerCliParityTools(server) {
9611
9798
  }
9612
9799
 
9613
9800
  // src/mcp/tools/get-session-events.ts
9614
- import { z as z85 } from "zod";
9615
- var EVENT_TYPE = z85.enum([
9801
+ import { z as z87 } from "zod";
9802
+ var EVENT_TYPE = z87.enum([
9616
9803
  "user_prompt",
9617
9804
  "assistant_response",
9618
9805
  "tool_call",
@@ -9642,11 +9829,11 @@ function registerGetSessionEvents(server) {
9642
9829
  title: "Get Session Events",
9643
9830
  description: "Return exact recent chronological user prompts, assistant responses, and tool calls from the append-only session journal. Use this when asked what happened last, not semantic memory search.",
9644
9831
  inputSchema: {
9645
- agent_id: z85.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9646
- session_id: z85.string().optional().describe("Optional exact runtime session id."),
9832
+ agent_id: z87.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9833
+ session_id: z87.string().optional().describe("Optional exact runtime session id."),
9647
9834
  event_type: EVENT_TYPE.optional().describe("Filter to one event type."),
9648
- project_name: z85.string().optional().describe("Optional project filter. Pass 'all' for all projects."),
9649
- limit: z85.number().int().min(1).max(100).default(20).describe("Number of events to return.")
9835
+ project_name: z87.string().optional().describe("Optional project filter. Pass 'all' for all projects."),
9836
+ limit: z87.number().int().min(1).max(100).default(20).describe("Number of events to return.")
9650
9837
  }
9651
9838
  },
9652
9839
  async ({ agent_id, session_id, event_type, project_name, limit }) => {
@@ -9682,8 +9869,8 @@ function registerGetLastAssistantResponse(server) {
9682
9869
  title: "Get Last Assistant Response",
9683
9870
  description: "Return the exact last assistant response for an agent from the session event journal. Use for 'what was the last thing you said?'",
9684
9871
  inputSchema: {
9685
- agent_id: z85.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9686
- project_name: z85.string().optional().describe("Optional project filter. Pass 'all' for all projects.")
9872
+ agent_id: z87.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
9873
+ project_name: z87.string().optional().describe("Optional project filter. Pass 'all' for all projects.")
9687
9874
  }
9688
9875
  },
9689
9876
  async ({ agent_id, project_name }) => {
@@ -9713,7 +9900,7 @@ function registerGetLastAssistantResponse(server) {
9713
9900
  }
9714
9901
 
9715
9902
  // src/mcp/tools/code-context.ts
9716
- import { z as z86 } from "zod";
9903
+ import { z as z88 } from "zod";
9717
9904
  function errorResult10(text3) {
9718
9905
  return { content: [{ type: "text", text: text3 }], isError: true };
9719
9906
  }
@@ -9725,20 +9912,20 @@ function registerCodeContext(server) {
9725
9912
  title: "Code Context",
9726
9913
  description: "Persistent codebase context engine with semantic vector search. One consolidated tool to avoid MCP bloat. Actions: index (structural only), index_embed (structural + vector embeddings), search (semantic+lexical hybrid), trace, blast_radius, stats. Search uses RRF fusion of Jina v5 embeddings (cosine similarity) + lexical scoring. Falls back to lexical if daemon unavailable.",
9727
9914
  inputSchema: {
9728
- action: z86.enum(["index", "index_embed", "search", "trace", "blast_radius", "stats"]).describe("Code context operation. index_embed = index + generate embeddings for semantic search."),
9729
- project_root: z86.string().optional().describe("Repository root. Defaults to current working directory."),
9730
- query: z86.string().optional().describe("Natural language search query (e.g. 'authentication logic', 'database migration'). Semantic search finds conceptual matches, not just keywords."),
9731
- symbol: z86.string().optional().describe("Symbol/function/class/type name for trace or blast_radius"),
9732
- file_path: z86.string().optional().describe("File path for blast_radius"),
9733
- force: z86.boolean().optional().describe("Force rebuild before answering"),
9734
- limit: z86.coerce.number().int().min(1).max(100).optional().describe("Max results"),
9735
- offset: z86.coerce.number().int().min(0).optional().describe("Search pagination offset"),
9736
- refresh_index: z86.boolean().optional().describe("Refresh/rebuild index before searching"),
9737
- languages: z86.array(z86.string()).optional().describe('Language filters, e.g. ["python", "typescript"]'),
9738
- paths: z86.array(z86.string()).optional().describe("Path/glob filters"),
9739
- depth: z86.coerce.number().int().min(1).max(5).optional().describe("Dependent traversal depth for blast_radius"),
9740
- max_files: z86.coerce.number().int().min(1).max(1e4).optional().describe("Max code files to index"),
9741
- lexical_only: z86.boolean().optional().describe("Force lexical-only search (skip vector similarity). Default: false \u2014 uses semantic hybrid search.")
9915
+ action: z88.enum(["index", "index_embed", "search", "trace", "blast_radius", "stats"]).describe("Code context operation. index_embed = index + generate embeddings for semantic search."),
9916
+ project_root: z88.string().optional().describe("Repository root. Defaults to current working directory."),
9917
+ query: z88.string().optional().describe("Natural language search query (e.g. 'authentication logic', 'database migration'). Semantic search finds conceptual matches, not just keywords."),
9918
+ symbol: z88.string().optional().describe("Symbol/function/class/type name for trace or blast_radius"),
9919
+ file_path: z88.string().optional().describe("File path for blast_radius"),
9920
+ force: z88.boolean().optional().describe("Force rebuild before answering"),
9921
+ limit: z88.coerce.number().int().min(1).max(100).optional().describe("Max results"),
9922
+ offset: z88.coerce.number().int().min(0).optional().describe("Search pagination offset"),
9923
+ refresh_index: z88.boolean().optional().describe("Refresh/rebuild index before searching"),
9924
+ languages: z88.array(z88.string()).optional().describe('Language filters, e.g. ["python", "typescript"]'),
9925
+ paths: z88.array(z88.string()).optional().describe("Path/glob filters"),
9926
+ depth: z88.coerce.number().int().min(1).max(5).optional().describe("Dependent traversal depth for blast_radius"),
9927
+ max_files: z88.coerce.number().int().min(1).max(1e4).optional().describe("Max code files to index"),
9928
+ lexical_only: z88.boolean().optional().describe("Force lexical-only search (skip vector similarity). Default: false \u2014 uses semantic hybrid search.")
9742
9929
  }
9743
9930
  }, async ({ action, project_root, query, symbol, file_path, force, limit, offset, refresh_index, languages, paths, depth, max_files, lexical_only }) => {
9744
9931
  const opts = { projectRoot: project_root, force, maxFiles: max_files };
@@ -9814,9 +10001,9 @@ function registerCodeContext(server) {
9814
10001
  }
9815
10002
 
9816
10003
  // src/mcp/tools/support-inbox.ts
9817
- import { z as z87 } from "zod";
10004
+ import { z as z89 } from "zod";
9818
10005
  var DEFAULT_ENDPOINT = "https://askexe.com/admin/support/bug-reports";
9819
- var STATUS = z87.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
10006
+ var STATUS = z89.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
9820
10007
  function adminToken() {
9821
10008
  return process.env.ASKEXE_SUPPORT_ADMIN_TOKEN || process.env.EXE_SUPPORT_ADMIN_TOKEN;
9822
10009
  }
@@ -9855,9 +10042,9 @@ function registerListBugReports(server) {
9855
10042
  title: "List Bug Reports",
9856
10043
  description: "AskExe-internal only: list incoming customer bug reports from the support inbox.",
9857
10044
  inputSchema: {
9858
- status: z87.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("open"),
9859
- severity: z87.enum(["p0", "p1", "p2", "p3"]).optional(),
9860
- limit: z87.number().int().min(1).max(100).default(25)
10045
+ status: z89.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("open"),
10046
+ severity: z89.enum(["p0", "p1", "p2", "p3"]).optional(),
10047
+ limit: z89.number().int().min(1).max(100).default(25)
9861
10048
  }
9862
10049
  },
9863
10050
  async ({ status: status2, severity, limit }) => {
@@ -9876,7 +10063,7 @@ function registerGetBugReport(server) {
9876
10063
  {
9877
10064
  title: "Get Bug Report",
9878
10065
  description: "AskExe-internal only: fetch one customer bug report with full markdown payload.",
9879
- inputSchema: { id: z87.string().min(8) }
10066
+ inputSchema: { id: z89.string().min(8) }
9880
10067
  },
9881
10068
  async ({ id }) => {
9882
10069
  const data = await requestJson(`${endpoint()}/${encodeURIComponent(id)}`);
@@ -9891,12 +10078,12 @@ function registerTriageBugReport(server) {
9891
10078
  title: "Triage Bug Report",
9892
10079
  description: "AskExe-internal only: update bug report status and link task/commit/release metadata.",
9893
10080
  inputSchema: {
9894
- id: z87.string().min(8),
10081
+ id: z89.string().min(8),
9895
10082
  status: STATUS.optional(),
9896
- triage_notes: z87.string().optional(),
9897
- linked_task_id: z87.string().optional(),
9898
- linked_commit: z87.string().optional(),
9899
- fixed_version: z87.string().optional()
10083
+ triage_notes: z89.string().optional(),
10084
+ linked_task_id: z89.string().optional(),
10085
+ linked_commit: z89.string().optional(),
10086
+ fixed_version: z89.string().optional()
9900
10087
  }
9901
10088
  },
9902
10089
  async ({ id, status: status2, triage_notes, linked_task_id, linked_commit, fixed_version }) => {
@@ -9909,7 +10096,7 @@ function registerTriageBugReport(server) {
9909
10096
  }
9910
10097
  );
9911
10098
  }
9912
- var FEATURE_STATUS = z87.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
10099
+ var FEATURE_STATUS = z89.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
9913
10100
  function featureEndpoint() {
9914
10101
  return endpoint().replace(/\/bug-reports\/?$/, "/feature-requests");
9915
10102
  }
@@ -9920,9 +10107,9 @@ function registerListFeatureRequests(server) {
9920
10107
  title: "List Feature Requests",
9921
10108
  description: "AskExe-internal only: list incoming customer feature requests from the support inbox.",
9922
10109
  inputSchema: {
9923
- status: z87.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("open"),
9924
- priority: z87.enum(["p0", "p1", "p2", "p3"]).optional(),
9925
- limit: z87.number().int().min(1).max(100).default(25)
10110
+ status: z89.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("open"),
10111
+ priority: z89.enum(["p0", "p1", "p2", "p3"]).optional(),
10112
+ limit: z89.number().int().min(1).max(100).default(25)
9926
10113
  }
9927
10114
  },
9928
10115
  async ({ status: status2, priority, limit }) => {
@@ -9941,7 +10128,7 @@ function registerGetFeatureRequest(server) {
9941
10128
  {
9942
10129
  title: "Get Feature Request",
9943
10130
  description: "AskExe-internal only: fetch one customer feature request with full payload.",
9944
- inputSchema: { id: z87.string().min(8) }
10131
+ inputSchema: { id: z89.string().min(8) }
9945
10132
  },
9946
10133
  async ({ id }) => {
9947
10134
  const data = await requestJson(`${featureEndpoint()}/${encodeURIComponent(id)}`);
@@ -9956,11 +10143,11 @@ function registerTriageFeatureRequest(server) {
9956
10143
  title: "Triage Feature Request",
9957
10144
  description: "AskExe-internal only: update feature request status, response notes, and version metadata.",
9958
10145
  inputSchema: {
9959
- id: z87.string().min(8),
10146
+ id: z89.string().min(8),
9960
10147
  status: FEATURE_STATUS.optional(),
9961
- response_notes: z87.string().optional(),
9962
- target_version: z87.string().optional(),
9963
- shipped_version: z87.string().optional()
10148
+ response_notes: z89.string().optional(),
10149
+ target_version: z89.string().optional(),
10150
+ shipped_version: z89.string().optional()
9964
10151
  }
9965
10152
  },
9966
10153
  async ({ id, status: status2, response_notes, target_version, shipped_version }) => {
@@ -9975,7 +10162,7 @@ function registerTriageFeatureRequest(server) {
9975
10162
  }
9976
10163
 
9977
10164
  // src/mcp/tools/decision.ts
9978
- import { z as z88 } from "zod";
10165
+ import { z as z90 } from "zod";
9979
10166
  function buildHandlers6() {
9980
10167
  const tools = /* @__PURE__ */ new Map();
9981
10168
  const fake = {
@@ -9999,12 +10186,12 @@ function registerDecision(server) {
9999
10186
  title: "Decision",
10000
10187
  description: "Store or retrieve authoritative decisions. Actions: store (persist a decision by domain), get (look up a decision by domain/query).",
10001
10188
  inputSchema: {
10002
- action: z88.enum(["store", "get"]).describe("Decision operation"),
10003
- domain: z88.string().optional().describe("Decision domain (e.g. 'architecture', 'hiring')"),
10004
- decision: z88.string().optional().describe("Decision text for action=store"),
10005
- rationale: z88.string().optional().describe("Why this decision was made (action=store)"),
10006
- query: z88.string().optional().describe("Search query for action=get"),
10007
- limit: z88.coerce.number().optional().describe("Max results for action=get")
10189
+ action: z90.enum(["store", "get"]).describe("Decision operation"),
10190
+ domain: z90.string().optional().describe("Decision domain (e.g. 'architecture', 'hiring')"),
10191
+ decision: z90.string().optional().describe("Decision text for action=store"),
10192
+ rationale: z90.string().optional().describe("Why this decision was made (action=store)"),
10193
+ query: z90.string().optional().describe("Search query for action=get"),
10194
+ limit: z90.coerce.number().optional().describe("Max results for action=get")
10008
10195
  }
10009
10196
  },
10010
10197
  async (input, extra) => {
@@ -10020,7 +10207,7 @@ function registerDecision(server) {
10020
10207
  }
10021
10208
 
10022
10209
  // src/mcp/tools/session.ts
10023
- import { z as z89 } from "zod";
10210
+ import { z as z91 } from "zod";
10024
10211
  function buildHandlers7() {
10025
10212
  const tools = /* @__PURE__ */ new Map();
10026
10213
  const fake = {
@@ -10044,9 +10231,9 @@ function registerSession(server) {
10044
10231
  title: "Session",
10045
10232
  description: "Session inspection tools. Actions: events (get session event log), last_response (get the most recent assistant response text).",
10046
10233
  inputSchema: {
10047
- action: z89.enum(["events", "last_response"]).describe("Session operation"),
10048
- session_id: z89.string().optional().describe("Session ID for action=events"),
10049
- limit: z89.coerce.number().optional().describe("Max events for action=events")
10234
+ action: z91.enum(["events", "last_response"]).describe("Session operation"),
10235
+ session_id: z91.string().optional().describe("Session ID for action=events"),
10236
+ limit: z91.coerce.number().optional().describe("Max events for action=events")
10050
10237
  }
10051
10238
  },
10052
10239
  async (input, extra) => {
@@ -10062,7 +10249,7 @@ function registerSession(server) {
10062
10249
  }
10063
10250
 
10064
10251
  // src/mcp/tools/support-consolidated.ts
10065
- import { z as z90 } from "zod";
10252
+ import { z as z92 } from "zod";
10066
10253
  function buildHandlers8() {
10067
10254
  const tools = /* @__PURE__ */ new Map();
10068
10255
  const fake = {
@@ -10103,7 +10290,7 @@ function registerSupportConsolidated(server) {
10103
10290
  title: "Support",
10104
10291
  description: "Bug reports, feature requests, and support system. Actions: create_bug, create_feature, list_my_bugs, list_my_features, list_bugs, get_bug, triage_bug, list_features, get_feature, triage_feature, health, test. Use 'product' param to file bugs for any AskExe product (exe-os, exe-create, exe-wiki, etc.).",
10105
10292
  inputSchema: {
10106
- action: z90.enum([
10293
+ action: z92.enum([
10107
10294
  "create_bug",
10108
10295
  "create_feature",
10109
10296
  "list_my_bugs",
@@ -10117,26 +10304,26 @@ function registerSupportConsolidated(server) {
10117
10304
  "health",
10118
10305
  "test"
10119
10306
  ]).describe("Support operation"),
10120
- title: z90.string().optional().describe("Bug/feature title"),
10121
- description: z90.string().optional().describe("Bug/feature description"),
10122
- steps_to_reproduce: z90.string().optional().describe("Steps to reproduce (bugs)"),
10123
- expected_behavior: z90.string().optional().describe("Expected behavior (bugs)"),
10124
- actual_behavior: z90.string().optional().describe("Actual behavior (bugs)"),
10125
- severity: z90.string().optional().describe("Severity: p0/p1/p2/p3"),
10126
- product: z90.string().optional().describe("Product: exe-os (default), exe-create, exe-wiki, exe-gateway, exe-crm, exe-build"),
10127
- use_case: z90.string().optional().describe("Use case (features)"),
10128
- proposed_solution: z90.string().optional().describe("Proposed solution (features)"),
10129
- priority: z90.string().optional().describe("Priority (features)"),
10130
- id: z90.string().optional().describe("Bug/feature ID for get/triage"),
10131
- status: z90.string().optional().describe("Filter by status"),
10132
- classification: z90.string().optional().describe("Triage classification"),
10133
- resolution: z90.string().optional().describe("Triage resolution"),
10134
- notes: z90.string().optional().describe("Triage notes (mapped to triage_notes for bug/feature triage)"),
10135
- triage_notes: z90.string().optional().describe("Triage notes (legacy field name)"),
10136
- linked_task_id: z90.string().optional().describe("Linked task ID for triage"),
10137
- linked_commit: z90.string().optional().describe("Linked commit hash for triage"),
10138
- fixed_version: z90.string().optional().describe("Version that fixes this bug"),
10139
- limit: z90.coerce.number().optional().describe("Max results")
10307
+ title: z92.string().optional().describe("Bug/feature title"),
10308
+ description: z92.string().optional().describe("Bug/feature description"),
10309
+ steps_to_reproduce: z92.string().optional().describe("Steps to reproduce (bugs)"),
10310
+ expected_behavior: z92.string().optional().describe("Expected behavior (bugs)"),
10311
+ actual_behavior: z92.string().optional().describe("Actual behavior (bugs)"),
10312
+ severity: z92.string().optional().describe("Severity: p0/p1/p2/p3"),
10313
+ product: z92.string().optional().describe("Product: exe-os (default), exe-create, exe-wiki, exe-gateway, exe-crm, exe-build"),
10314
+ use_case: z92.string().optional().describe("Use case (features)"),
10315
+ proposed_solution: z92.string().optional().describe("Proposed solution (features)"),
10316
+ priority: z92.string().optional().describe("Priority (features)"),
10317
+ id: z92.string().optional().describe("Bug/feature ID for get/triage"),
10318
+ status: z92.string().optional().describe("Filter by status"),
10319
+ classification: z92.string().optional().describe("Triage classification"),
10320
+ resolution: z92.string().optional().describe("Triage resolution"),
10321
+ notes: z92.string().optional().describe("Triage notes (mapped to triage_notes for bug/feature triage)"),
10322
+ triage_notes: z92.string().optional().describe("Triage notes (legacy field name)"),
10323
+ linked_task_id: z92.string().optional().describe("Linked task ID for triage"),
10324
+ linked_commit: z92.string().optional().describe("Linked commit hash for triage"),
10325
+ fixed_version: z92.string().optional().describe("Version that fixes this bug"),
10326
+ limit: z92.coerce.number().optional().describe("Max results")
10140
10327
  }
10141
10328
  },
10142
10329
  async (input, extra) => {
@@ -10198,7 +10385,7 @@ function registerSupportConsolidated(server) {
10198
10385
  }
10199
10386
 
10200
10387
  // src/mcp/tools/diagnostics.ts
10201
- import { z as z91 } from "zod";
10388
+ import { z as z93 } from "zod";
10202
10389
  function buildHandlers9() {
10203
10390
  const tools = /* @__PURE__ */ new Map();
10204
10391
  const fake = {
@@ -10219,14 +10406,14 @@ function registerDiagnostics(server) {
10219
10406
  title: "Diagnostics",
10220
10407
  description: `System diagnostics and admin operations. Actions: ${toolNames.join(", ")}. Covers health checks, update status, cloud status, key management, employee rename, semantic tool discovery (tool_search), and identity drift detection (drift).`,
10221
10408
  inputSchema: {
10222
- action: z91.string().describe(`Diagnostic operation: ${toolNames.join(", ")}`),
10409
+ action: z93.string().describe(`Diagnostic operation: ${toolNames.join(", ")}`),
10223
10410
  // Pass-through params used by various sub-tools
10224
- agent_id: z91.string().optional().describe("Agent to probe (drift). Defaults to all agents."),
10225
- name: z91.string().optional().describe("Employee name (rename_employee)"),
10226
- new_name: z91.string().optional().describe("New employee name (rename_employee)"),
10227
- query: z91.string().optional().describe("Search/filter query, or natural language for tool_search"),
10228
- format: z91.string().optional().describe("Output format"),
10229
- limit: z91.coerce.number().int().min(1).max(100).optional().describe("Max results for tool_search (default 20)")
10411
+ agent_id: z93.string().optional().describe("Agent to probe (drift). Defaults to all agents."),
10412
+ name: z93.string().optional().describe("Employee name (rename_employee)"),
10413
+ new_name: z93.string().optional().describe("New employee name (rename_employee)"),
10414
+ query: z93.string().optional().describe("Search/filter query, or natural language for tool_search"),
10415
+ format: z93.string().optional().describe("Output format"),
10416
+ limit: z93.coerce.number().int().min(1).max(100).optional().describe("Max results for tool_search (default 20)")
10230
10417
  }
10231
10418
  },
10232
10419
  async (input, extra) => {
@@ -10554,6 +10741,7 @@ function registerAllTools(server, license, hasKey) {
10554
10741
  gate("registerCompanyActions", registerCompanyActions);
10555
10742
  gate("registerWorkflowTool", registerWorkflowTool);
10556
10743
  }
10744
+ gate("registerFileCopy", registerFileCopy);
10557
10745
  }
10558
10746
 
10559
10747
  export {