@askexenow/exe-os 0.9.225 → 0.9.227

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 (446) hide show
  1. package/package.json +1 -1
  2. package/dist/active-agent-HWGGCRZZ.js +0 -24
  3. package/dist/active-agent-QN6UYVDF.js +0 -25
  4. package/dist/agent-context-ZPDQOAD2.js +0 -9
  5. package/dist/agent-heartbeat-AWTVGE4C.js +0 -60
  6. package/dist/agent-loop-7UM2ENGU.js +0 -10
  7. package/dist/agentic-ontology-DOGTSZVP.js +0 -25
  8. package/dist/asana-JN2UF47A.js +0 -129
  9. package/dist/assets/ghostty.conf +0 -83
  10. package/dist/assets/statusline-command.sh +0 -44
  11. package/dist/assets/tmux.conf +0 -56
  12. package/dist/assets/wezterm.lua +0 -68
  13. package/dist/backfill-metadata-LVC55ZQI.js +0 -596
  14. package/dist/background-jobs-ZX3RLNWC.js +0 -25
  15. package/dist/bash-XA65M6T6.js +0 -8
  16. package/dist/behaviors-MCOIXNLQ.js +0 -24
  17. package/dist/bin/age-ontology-load.js +0 -85
  18. package/dist/bin/agentic-ontology-backfill.js +0 -84
  19. package/dist/bin/agentic-reflection-backfill.js +0 -45
  20. package/dist/bin/agentic-semantic-label.js +0 -193
  21. package/dist/bin/backfill-conversations.js +0 -399
  22. package/dist/bin/backfill-responses.js +0 -227
  23. package/dist/bin/backfill-vectors.js +0 -149
  24. package/dist/bin/bulk-sync-postgres.js +0 -92
  25. package/dist/bin/cc-doctor.js +0 -51
  26. package/dist/bin/cleanup-stale-review-tasks.js +0 -139
  27. package/dist/bin/cli.js +0 -1032
  28. package/dist/bin/customer-readiness.js +0 -389
  29. package/dist/bin/deferred-daemon-restart.js +0 -123
  30. package/dist/bin/exe-agent-config.js +0 -87
  31. package/dist/bin/exe-agent.js +0 -190
  32. package/dist/bin/exe-assign.js +0 -93
  33. package/dist/bin/exe-boot.js +0 -1114
  34. package/dist/bin/exe-call.js +0 -127
  35. package/dist/bin/exe-cloud.js +0 -484
  36. package/dist/bin/exe-dispatch.js +0 -72
  37. package/dist/bin/exe-doctor.js +0 -48
  38. package/dist/bin/exe-export-behaviors.js +0 -48
  39. package/dist/bin/exe-forget.js +0 -204
  40. package/dist/bin/exe-gateway.js +0 -1137
  41. package/dist/bin/exe-healthcheck.js +0 -14
  42. package/dist/bin/exe-heartbeat.js +0 -233
  43. package/dist/bin/exe-kill.js +0 -126
  44. package/dist/bin/exe-launch-agent.js +0 -678
  45. package/dist/bin/exe-new-employee.js +0 -160
  46. package/dist/bin/exe-pending-messages.js +0 -60
  47. package/dist/bin/exe-pending-notifications.js +0 -107
  48. package/dist/bin/exe-pending-reviews.js +0 -81
  49. package/dist/bin/exe-rename.js +0 -219
  50. package/dist/bin/exe-repo-drift.js +0 -95
  51. package/dist/bin/exe-review.js +0 -251
  52. package/dist/bin/exe-search.js +0 -65
  53. package/dist/bin/exe-session-cleanup.js +0 -331
  54. package/dist/bin/exe-settings.js +0 -364
  55. package/dist/bin/exe-start-codex.js +0 -404
  56. package/dist/bin/exe-start-opencode.js +0 -233
  57. package/dist/bin/exe-start.sh +0 -190
  58. package/dist/bin/exe-status.js +0 -34
  59. package/dist/bin/exe-support.js +0 -17
  60. package/dist/bin/exe-team.js +0 -83
  61. package/dist/bin/generate-hook-manifest.js +0 -30
  62. package/dist/bin/git-sweep.js +0 -74
  63. package/dist/bin/graph-backfill.js +0 -78
  64. package/dist/bin/graph-export.js +0 -66
  65. package/dist/bin/graph-layer-benchmark.js +0 -113
  66. package/dist/bin/import-history.js +0 -84
  67. package/dist/bin/install-launchd.js +0 -41
  68. package/dist/bin/install.js +0 -366
  69. package/dist/bin/intercom-check.js +0 -137
  70. package/dist/bin/list-providers.js +0 -128
  71. package/dist/bin/mcp-sessions.js +0 -194
  72. package/dist/bin/orchestration-metrics.js +0 -61
  73. package/dist/bin/postgres-agentic-reflection-backfill.js +0 -123
  74. package/dist/bin/postgres-agentic-semantic-backfill.js +0 -126
  75. package/dist/bin/pre-build-guard.js +0 -98
  76. package/dist/bin/pre-publish.js +0 -224
  77. package/dist/bin/registry-proxy.js +0 -44
  78. package/dist/bin/scan-tasks.js +0 -265
  79. package/dist/bin/setup.js +0 -19
  80. package/dist/bin/shard-migrate.js +0 -162
  81. package/dist/bin/stack-update.js +0 -372
  82. package/dist/bin/update.js +0 -354
  83. package/dist/bin/verify-stack.js +0 -389
  84. package/dist/bin/vps-backup.js +0 -170
  85. package/dist/bin/vps-health-gate.js +0 -232
  86. package/dist/branding-Q6HNW3JX.js +0 -97
  87. package/dist/browser-sanitizer-MRSSEJZE.js +0 -229
  88. package/dist/browser-session-store-RF45DSJR.js +0 -232
  89. package/dist/capacity-monitor-FNVWLAZL.js +0 -48
  90. package/dist/catchup-brief-FHMT7TRP.js +0 -150
  91. package/dist/chunk-24O54E7A.js +0 -1919
  92. package/dist/chunk-2VKESAZB.js +0 -3506
  93. package/dist/chunk-32NB4ZYS.js +0 -227
  94. package/dist/chunk-3FYSV5AI.js +0 -382
  95. package/dist/chunk-4524GLEQ.js +0 -204
  96. package/dist/chunk-465VKMEV.js +0 -85
  97. package/dist/chunk-46SQTBQW.js +0 -207
  98. package/dist/chunk-4ENKQHHV.js +0 -262
  99. package/dist/chunk-4JERP7NT.js +0 -132
  100. package/dist/chunk-4L35E6O7.js +0 -280
  101. package/dist/chunk-4UKEZJMM.js +0 -50
  102. package/dist/chunk-4ZEGEULO.js +0 -627
  103. package/dist/chunk-54GARVEX.js +0 -294
  104. package/dist/chunk-54IWHLZU.js +0 -129
  105. package/dist/chunk-557C2IGL.js +0 -0
  106. package/dist/chunk-5BS5ELMC.js +0 -85
  107. package/dist/chunk-5NFBE376.js +0 -391
  108. package/dist/chunk-5R7FJZWJ.js +0 -157
  109. package/dist/chunk-6A7P74QV.js +0 -53
  110. package/dist/chunk-6D23UNXU.js +0 -531
  111. package/dist/chunk-6HBCYEMA.js +0 -58
  112. package/dist/chunk-6KFICEAT.js +0 -20
  113. package/dist/chunk-6RX2XEET.js +0 -113
  114. package/dist/chunk-6XDH5H5V.js +0 -147
  115. package/dist/chunk-6Y4B3QF6.js +0 -19
  116. package/dist/chunk-72DJ42IE.js +0 -377
  117. package/dist/chunk-7JGZWG4U.js +0 -76
  118. package/dist/chunk-ABREUO7D.js +0 -403
  119. package/dist/chunk-ADNX3MBF.js +0 -197
  120. package/dist/chunk-AFYZGDFX.js +0 -356
  121. package/dist/chunk-AH4IJYYP.js +0 -54
  122. package/dist/chunk-AHMUF6RO.js +0 -147
  123. package/dist/chunk-AIAODMIW.js +0 -1051
  124. package/dist/chunk-AJWFPKQS.js +0 -573
  125. package/dist/chunk-AQX4SHLQ.js +0 -357
  126. package/dist/chunk-ARWBYEVQ.js +0 -183
  127. package/dist/chunk-AVE2B4DQ.js +0 -140
  128. package/dist/chunk-B4MV6W2S.js +0 -81
  129. package/dist/chunk-B7K6C6T7.js +0 -240
  130. package/dist/chunk-BDHQMDCD.js +0 -128
  131. package/dist/chunk-BDTCA647.js +0 -123
  132. package/dist/chunk-BW2CW4LG.js +0 -346
  133. package/dist/chunk-BXL7RBRI.js +0 -214
  134. package/dist/chunk-C27C2OZM.js +0 -70
  135. package/dist/chunk-CF6TE3YY.js +0 -614
  136. package/dist/chunk-CFVDND7E.js +0 -171
  137. package/dist/chunk-CHCA3ZM2.js +0 -167
  138. package/dist/chunk-CLGB3FGL.js +0 -48
  139. package/dist/chunk-CVYC6DUW.js +0 -78
  140. package/dist/chunk-CX6GL3ZJ.js +0 -274
  141. package/dist/chunk-DR75RGZS.js +0 -75
  142. package/dist/chunk-E6ORBQHP.js +0 -225
  143. package/dist/chunk-ECGTESAP.js +0 -236
  144. package/dist/chunk-ECSNSHZ7.js +0 -431
  145. package/dist/chunk-EF4PA3TY.js +0 -498
  146. package/dist/chunk-EIT6J37V.js +0 -119
  147. package/dist/chunk-EQSQ4HBW.js +0 -9
  148. package/dist/chunk-EZEU2YJQ.js +0 -38
  149. package/dist/chunk-F2DMSZZO.js +0 -69
  150. package/dist/chunk-F7LU65PQ.js +0 -33
  151. package/dist/chunk-FI4ESHBS.js +0 -244
  152. package/dist/chunk-FLLCEGSL.js +0 -55
  153. package/dist/chunk-FLSASUV3.js +0 -177
  154. package/dist/chunk-FOHKYDTJ.js +0 -2017
  155. package/dist/chunk-FWFFZGSC.js +0 -94
  156. package/dist/chunk-FXU7JOXK.js +0 -6
  157. package/dist/chunk-GCMXBQ7Y.js +0 -41
  158. package/dist/chunk-GD4VXNXO.js +0 -169
  159. package/dist/chunk-GJV3WDWM.js +0 -14
  160. package/dist/chunk-GKA5QAFL.js +0 -1345
  161. package/dist/chunk-GNBOSFEX.js +0 -363
  162. package/dist/chunk-GNHN5HRQ.js +0 -40
  163. package/dist/chunk-GP6G6EQI.js +0 -632
  164. package/dist/chunk-GQYIMXUW.js +0 -575
  165. package/dist/chunk-GUMRIUI5.js +0 -63
  166. package/dist/chunk-H6CS2GG5.js +0 -221
  167. package/dist/chunk-HA7PFCJ6.js +0 -574
  168. package/dist/chunk-HF25XPZE.js +0 -83
  169. package/dist/chunk-HOKOOBDL.js +0 -52
  170. package/dist/chunk-HU2GB7EP.js +0 -13097
  171. package/dist/chunk-HYZV25LY.js +0 -34
  172. package/dist/chunk-I7AW4237.js +0 -251
  173. package/dist/chunk-IVUL6LTK.js +0 -77
  174. package/dist/chunk-JKBHO7HA.js +0 -121
  175. package/dist/chunk-JMDBTBTS.js +0 -284
  176. package/dist/chunk-JQ6TLNIV.js +0 -133
  177. package/dist/chunk-KAUKA5JX.js +0 -1104
  178. package/dist/chunk-KCUYRZSX.js +0 -72
  179. package/dist/chunk-KH5Y6RR4.js +0 -360
  180. package/dist/chunk-KVP2UQ7R.js +0 -30
  181. package/dist/chunk-L3TB7CC3.js +0 -170
  182. package/dist/chunk-L6TSZOAD.js +0 -667
  183. package/dist/chunk-LJ36AKUW.js +0 -297
  184. package/dist/chunk-LMSRF47U.js +0 -42
  185. package/dist/chunk-LNICJE6C.js +0 -1073
  186. package/dist/chunk-LWVZLTMD.js +0 -412
  187. package/dist/chunk-LYH5HE24.js +0 -73
  188. package/dist/chunk-MLXJ5EZG.js +0 -90
  189. package/dist/chunk-MP2AFCGL.js +0 -53
  190. package/dist/chunk-MVW62NIZ.js +0 -20
  191. package/dist/chunk-MZIGUUDQ.js +0 -42
  192. package/dist/chunk-N2EVTB35.js +0 -731
  193. package/dist/chunk-N5RRQOAC.js +0 -134
  194. package/dist/chunk-NDAC3SSO.js +0 -1090
  195. package/dist/chunk-NGP6LSV2.js +0 -25
  196. package/dist/chunk-NGVOA6ZQ.js +0 -84
  197. package/dist/chunk-NHAEAOJL.js +0 -463
  198. package/dist/chunk-O377P7GM.js +0 -100
  199. package/dist/chunk-OADQCC5E.js +0 -333
  200. package/dist/chunk-OCR7A6VV.js +0 -817
  201. package/dist/chunk-ONKIWA3R.js +0 -249
  202. package/dist/chunk-OOKYLZTO.js +0 -993
  203. package/dist/chunk-OPU3NYOO.js +0 -55
  204. package/dist/chunk-ORCCI2VV.js +0 -140
  205. package/dist/chunk-OSYUNKBM.js +0 -213
  206. package/dist/chunk-OYNKIAVW.js +0 -181
  207. package/dist/chunk-PRKVT4KN.js +0 -90
  208. package/dist/chunk-PWMMIGVQ.js +0 -332
  209. package/dist/chunk-PZPQVIXS.js +0 -348
  210. package/dist/chunk-Q3V7K4ME.js +0 -149
  211. package/dist/chunk-QGGH7LOU.js +0 -93
  212. package/dist/chunk-QI4IXJN7.js +0 -132
  213. package/dist/chunk-QQZSKURD.js +0 -210
  214. package/dist/chunk-R4PJKJXP.js +0 -159
  215. package/dist/chunk-R4WMF32C.js +0 -81
  216. package/dist/chunk-R5U7XKVJ.js +0 -16
  217. package/dist/chunk-RAV23DU2.js +0 -390
  218. package/dist/chunk-RJT7H2KR.js +0 -349
  219. package/dist/chunk-SH45SJQW.js +0 -0
  220. package/dist/chunk-SUNYJ6YE.js +0 -204
  221. package/dist/chunk-SVXDCELZ.js +0 -163
  222. package/dist/chunk-T2L43P65.js +0 -495
  223. package/dist/chunk-TJ6VZK5N.js +0 -97
  224. package/dist/chunk-TLM2DDBX.js +0 -258
  225. package/dist/chunk-TMEE7AT7.js +0 -72
  226. package/dist/chunk-TPSACMM2.js +0 -3753
  227. package/dist/chunk-TQBUAZXA.js +0 -128
  228. package/dist/chunk-UKP2WIND.js +0 -330
  229. package/dist/chunk-V4TZI6EO.js +0 -60
  230. package/dist/chunk-VKACBTUG.js +0 -56
  231. package/dist/chunk-VZ5ELOUC.js +0 -33
  232. package/dist/chunk-WHEFT5FS.js +0 -290
  233. package/dist/chunk-WSKWSZQB.js +0 -90
  234. package/dist/chunk-WWTYMPKI.js +0 -159
  235. package/dist/chunk-WXW3XGWX.js +0 -332
  236. package/dist/chunk-X2Z5GT3V.js +0 -118
  237. package/dist/chunk-X4QO5DXP.js +0 -190
  238. package/dist/chunk-XEKO37NM.js +0 -43
  239. package/dist/chunk-XGOYEQMQ.js +0 -1051
  240. package/dist/chunk-XHTOAJYD.js +0 -106
  241. package/dist/chunk-Y2FNO5SU.js +0 -135
  242. package/dist/chunk-YGAAZN3E.js +0 -47
  243. package/dist/chunk-YSU7JB7H.js +0 -0
  244. package/dist/chunk-YZFZDJWZ.js +0 -107
  245. package/dist/chunk-ZGUSJ6BG.js +0 -151
  246. package/dist/chunk-ZHMQDTGE.js +0 -136
  247. package/dist/co-activation-IC5XKEXV.js +0 -71
  248. package/dist/co-occurrence-5X54MZDP.js +0 -73
  249. package/dist/code-context-index-3FHYHWV3.js +0 -29
  250. package/dist/content-extractor-CUJOBFBU.js +0 -9
  251. package/dist/conversation-entity-extractor-TW4W57K4.js +0 -114
  252. package/dist/conversation-wiki-populator-MTRQYBQZ.js +0 -105
  253. package/dist/core-memory-YHFDOGBC.js +0 -110
  254. package/dist/crdt-sync-XHQ6HC2X.js +0 -33
  255. package/dist/crm-bridge-NG5WJMGF.js +0 -19
  256. package/dist/crm-webhook-3JWHNIPR.js +0 -10
  257. package/dist/cto-delegation-gate-CNXEBVDU.js +0 -205
  258. package/dist/daemon-auth-6QSCVMPV.js +0 -13
  259. package/dist/daemon-orchestration-7BY7POV2.js +0 -133
  260. package/dist/daemon-protocol-4FUHT5NH.js +0 -17
  261. package/dist/db-backup-XGB725XE.js +0 -25
  262. package/dist/devtools-J4QYYO7U.js +0 -8
  263. package/dist/discord-7UHIZNJ3.js +0 -7
  264. package/dist/dispatch-ack-RMVFHO4I.js +0 -13
  265. package/dist/dreaming-KYPSZZA2.js +0 -12
  266. package/dist/email-T6PQUUY6.js +0 -137
  267. package/dist/entity-boost-6PC4KAGM.js +0 -332
  268. package/dist/exe-drift-HXATDG6V.js +0 -67
  269. package/dist/exe-export-JQSD3D4D.js +0 -72
  270. package/dist/exe-import-G4BFRTBN.js +0 -75
  271. package/dist/exe-key-CORPDZ7F.js +0 -573
  272. package/dist/exe-org-DR7IKYC5.js +0 -73
  273. package/dist/exe-snapshot-L6UZDFCH.js +0 -145
  274. package/dist/factory-UQSRMKJW.js +0 -67
  275. package/dist/fast-db-init-O3JWHJEE.js +0 -7
  276. package/dist/file-edit-YORRFENG.js +0 -8
  277. package/dist/file-read-RMQFDE5L.js +0 -8
  278. package/dist/file-write-VO4MQW5Y.js +0 -8
  279. package/dist/founder-context-DYPGK265.js +0 -96
  280. package/dist/gateway/index.js +0 -148
  281. package/dist/gateway-client-4GDNTHMN.js +0 -11
  282. package/dist/git-staleness-47T5DHHD.js +0 -109
  283. package/dist/git-task-sweep-CXLXWILF.js +0 -39
  284. package/dist/glob-2LXRC3F5.js +0 -7
  285. package/dist/global-procedures-A5OG775F.js +0 -19
  286. package/dist/graph-auto-extract-ATKNU47J.js +0 -161
  287. package/dist/graph-query-YZ4RZEIL.js +0 -26
  288. package/dist/graph-rag-S5SBJW5J.js +0 -29
  289. package/dist/grep-OY7KCRLQ.js +0 -7
  290. package/dist/hook-integrity-WNIRU724.js +0 -89
  291. package/dist/hooks/bug-report-worker.js +0 -179
  292. package/dist/hooks/codex-stop-task-finalizer.js +0 -258
  293. package/dist/hooks/commit-complete.js +0 -162
  294. package/dist/hooks/error-recall.js +0 -129
  295. package/dist/hooks/exe-heartbeat-hook.js +0 -78
  296. package/dist/hooks/ingest-worker.js +0 -51
  297. package/dist/hooks/ingest.js +0 -491
  298. package/dist/hooks/instructions-loaded.js +0 -119
  299. package/dist/hooks/manifest.json +0 -25
  300. package/dist/hooks/notification.js +0 -67
  301. package/dist/hooks/post-compact.js +0 -138
  302. package/dist/hooks/post-tool-combined.js +0 -152
  303. package/dist/hooks/pre-compact.js +0 -159
  304. package/dist/hooks/pre-tool-use.js +0 -512
  305. package/dist/hooks/prompt-submit.js +0 -699
  306. package/dist/hooks/session-end.js +0 -482
  307. package/dist/hooks/session-start.js +0 -362
  308. package/dist/hooks/stop.js +0 -332
  309. package/dist/hooks/subagent-stop.js +0 -85
  310. package/dist/hooks/summary-worker.js +0 -298
  311. package/dist/hooks-RPTZV5KX.js +0 -9
  312. package/dist/imessage-CE5USLTI.js +0 -7
  313. package/dist/index.js +0 -60
  314. package/dist/installer-6EN626JD.js +0 -37
  315. package/dist/installer-KLGJVSB7.js +0 -341
  316. package/dist/installer-X7IYABLB.js +0 -295
  317. package/dist/intercom-queue-USIXVVJQ.js +0 -17
  318. package/dist/key-backup-status-PSBX547O.js +0 -39
  319. package/dist/keyword-extractor-OGQRRVTB.js +0 -11
  320. package/dist/lib/agent-config.js +0 -30
  321. package/dist/lib/cloud-sync.js +0 -103
  322. package/dist/lib/cloudflare-dns.js +0 -13
  323. package/dist/lib/config.js +0 -32
  324. package/dist/lib/consolidation.js +0 -38
  325. package/dist/lib/crypto.js +0 -13
  326. package/dist/lib/database.js +0 -31
  327. package/dist/lib/db-daemon-client.js +0 -141
  328. package/dist/lib/db.js +0 -31
  329. package/dist/lib/device-registry.js +0 -70
  330. package/dist/lib/embed-worker.js +0 -165
  331. package/dist/lib/embedder.js +0 -19
  332. package/dist/lib/employee-templates.js +0 -34
  333. package/dist/lib/employees.js +0 -63
  334. package/dist/lib/error-detector.js +0 -16
  335. package/dist/lib/exe-daemon-client.js +0 -25
  336. package/dist/lib/exe-daemon.js +0 -4417
  337. package/dist/lib/file-grep.js +0 -242
  338. package/dist/lib/hybrid-search.js +0 -28
  339. package/dist/lib/identity-templates.js +0 -650
  340. package/dist/lib/identity.js +0 -19
  341. package/dist/lib/keychain.js +0 -17
  342. package/dist/lib/license.js +0 -35
  343. package/dist/lib/messaging.js +0 -59
  344. package/dist/lib/post-tool-memory.js +0 -13
  345. package/dist/lib/registry-proxy.js +0 -15
  346. package/dist/lib/reminders.js +0 -16
  347. package/dist/lib/runtime-table.js +0 -9
  348. package/dist/lib/schedules.js +0 -24
  349. package/dist/lib/session-registry.js +0 -21
  350. package/dist/lib/session-wrappers.js +0 -7
  351. package/dist/lib/skill-learning.js +0 -29
  352. package/dist/lib/status-brief.js +0 -7
  353. package/dist/lib/store.js +0 -43
  354. package/dist/lib/task-router.js +0 -22
  355. package/dist/lib/tasks.js +0 -66
  356. package/dist/lib/tmux-routing.js +0 -70
  357. package/dist/lib/tmux-status.js +0 -29
  358. package/dist/lib/tmux-transport.js +0 -7
  359. package/dist/lib/token-spend.js +0 -12
  360. package/dist/lib/transport.js +0 -10
  361. package/dist/lib/ws-auth.js +0 -11
  362. package/dist/lib/ws-client.js +0 -190
  363. package/dist/license-gate-7MTUBAQ6.js +0 -14
  364. package/dist/mcp/register-tools.js +0 -102
  365. package/dist/mcp/server.js +0 -370
  366. package/dist/mcp/tools/complete-reminder.js +0 -13
  367. package/dist/mcp/tools/create-reminder.js +0 -13
  368. package/dist/mcp/tools/create-task.js +0 -34
  369. package/dist/mcp/tools/deactivate-behavior.js +0 -16
  370. package/dist/mcp/tools/list-reminders.js +0 -13
  371. package/dist/mcp/tools/list-tasks.js +0 -33
  372. package/dist/mcp/tools/send-message.js +0 -33
  373. package/dist/mcp/tools/update-task.js +0 -32
  374. package/dist/mcp-diagnostics-5T5OZ52S.js +0 -200
  375. package/dist/mcp-disconnect-tracker-VINUVEZJ.js +0 -79
  376. package/dist/mcp-http-config-MODBCWK5.js +0 -26
  377. package/dist/memory-cards-33TRK6LU.js +0 -173
  378. package/dist/memory-graph-extractor-OBPRJKLY.js +0 -16
  379. package/dist/memory-poisoning-defense-PQV674AN.js +0 -224
  380. package/dist/memory-queue-EFSUQITE.js +0 -19
  381. package/dist/memory-queue-client-3RRVVVSZ.js +0 -15
  382. package/dist/memory-reflection-RFHRFSUD.js +0 -237
  383. package/dist/message-queue-client-P2LRY5EG.js +0 -92
  384. package/dist/notifications-P7K3ZWXX.js +0 -44
  385. package/dist/oauth-server-2QW23H7W.js +0 -437
  386. package/dist/orchestration-events-CWG6V7CV.js +0 -24
  387. package/dist/orchestration-phase-ZMMLNZAY.js +0 -23
  388. package/dist/orchestrator-O5BMUTIC.js +0 -32
  389. package/dist/permission-presets-UPVLJWZD.js +0 -25
  390. package/dist/permissions-C4EMHPDD.js +0 -14
  391. package/dist/pg-ssl-GD3332YS.js +0 -7
  392. package/dist/pipeline-router-SOF3OPQK.js +0 -12
  393. package/dist/plan-limits-DQYHBNVM.js +0 -25
  394. package/dist/prediction-log-4OYMLWU6.js +0 -120
  395. package/dist/preferences-5ARPMYE7.js +0 -10
  396. package/dist/preflight-TZOGLBZU.js +0 -287
  397. package/dist/project-boot-SC7HKBDP.js +0 -254
  398. package/dist/project-name-4SKOH2UO.js +0 -10
  399. package/dist/projection-worker-KP5ZNYQS.js +0 -877
  400. package/dist/push-notifications-IR3Z7WAT.js +0 -15
  401. package/dist/reranker-CKSUJEVR.js +0 -19
  402. package/dist/review-gate-I66GDXNR.js +0 -120
  403. package/dist/review-polling-KXD6IHFG.js +0 -123
  404. package/dist/runtime/index.js +0 -129
  405. package/dist/self-query-router-QMK5ZSZR.js +0 -188
  406. package/dist/session-events-HHOCWMZD.js +0 -35
  407. package/dist/session-kill-telemetry-PQVX3DCZ.js +0 -28
  408. package/dist/session-scope-UYHT6CHN.js +0 -85
  409. package/dist/setup-wizard-GKBK4WFY.js +0 -12
  410. package/dist/shard-manager-67Y6WYV4.js +0 -29
  411. package/dist/signal-KF2LIO7Y.js +0 -7
  412. package/dist/signal-paths-5ZTWCBUX.js +0 -19
  413. package/dist/skill-refinement-GVPVMADH.js +0 -156
  414. package/dist/slack-JRDUD5Z7.js +0 -7
  415. package/dist/stack-update-WLDGSSKX.js +0 -50
  416. package/dist/steward-gate-5P54P23O.js +0 -12
  417. package/dist/support-outbox-HIJVUDA2.js +0 -206
  418. package/dist/task-enforcement-2XZHFJSH.js +0 -292
  419. package/dist/task-scanner-5OQBNC2N.js +0 -11
  420. package/dist/task-scope-JWX77L6K.js +0 -34
  421. package/dist/tasks-crud-EFCAVOLV.js +0 -76
  422. package/dist/tasks-review-3HNBOQCH.js +0 -46
  423. package/dist/telegram-COCYUCT7.js +0 -7
  424. package/dist/telemetry-QKWQKAUC.js +0 -9
  425. package/dist/telemetry-upload-EH6KDKJN.js +0 -609
  426. package/dist/token-budget-SXD3WYQ2.js +0 -83
  427. package/dist/tool-capability-index-3UK7U6I3.js +0 -10
  428. package/dist/tool-gates-6A6LE4DZ.js +0 -14
  429. package/dist/tool-gates-RNWEH5IK.js +0 -13
  430. package/dist/tool-registry-KL24CAFR.js +0 -11
  431. package/dist/tool-telemetry-H4JCEGKN.js +0 -17
  432. package/dist/tui/App.js +0 -10223
  433. package/dist/tui-data-M2PDKZL5.js +0 -161
  434. package/dist/typed-messages-53Q7L3LB.js +0 -17
  435. package/dist/update-check-5IL5I3E2.js +0 -11
  436. package/dist/webhook-VXGIH7PN.js +0 -96
  437. package/dist/webhook-pipe-6JPL3ERE.js +0 -114
  438. package/dist/whatsapp-PSMKCDS7.js +0 -9
  439. package/dist/whatsapp-accounts-4OKWFRWL.js +0 -15
  440. package/dist/whatsapp-config-ZG5LX4O4.js +0 -125
  441. package/dist/wiki-acl-KKGKE57D.js +0 -111
  442. package/dist/wiki-client-P55NUEDE.js +0 -157
  443. package/dist/worker-gate-GAQP7EFH.js +0 -21
  444. package/dist/workflow-engine-DVOBNVA7.js +0 -28
  445. package/dist/working-memory-Z3EB3FW6.js +0 -77
  446. package/dist/worktree-LADUN5X3.js +0 -25
@@ -1,877 +0,0 @@
1
- import {
2
- extractGoalCandidates,
3
- inferIntention,
4
- inferOntologyEventType,
5
- inferOutcome,
6
- inferSemanticLabel,
7
- ontologyPayload
8
- } from "./chunk-4ENKQHHV.js";
9
- import {
10
- loadConfig
11
- } from "./chunk-WXW3XGWX.js";
12
- import "./chunk-LYH5HE24.js";
13
- import "./chunk-R5U7XKVJ.js";
14
-
15
- // src/lib/projection-worker.ts
16
- import os from "os";
17
- import path from "path";
18
- import { existsSync } from "fs";
19
- import { createRequire } from "module";
20
- import { pathToFileURL } from "url";
21
- var prismaPromise = null;
22
- var ontologySchemaReady = false;
23
- var filteredSchemaReady = false;
24
- function loadPrisma() {
25
- if (!prismaPromise) {
26
- prismaPromise = (async () => {
27
- const explicitPath = process.env.EXE_OS_PRISMA_CLIENT_PATH;
28
- if (explicitPath) {
29
- const mod = await import(pathToFileURL(explicitPath).href);
30
- const Ctor = mod.PrismaClient ?? mod.default?.PrismaClient;
31
- if (!Ctor) throw new Error(`No PrismaClient at ${explicitPath}`);
32
- return new Ctor();
33
- }
34
- const exeDbRoot = process.env.EXE_DB_ROOT ?? path.join(os.homedir(), "exe-db");
35
- const packagePath = path.join(exeDbRoot, "package.json");
36
- if (existsSync(packagePath)) {
37
- const req = createRequire(packagePath);
38
- const entry = req.resolve("@prisma/client");
39
- const mod = await import(pathToFileURL(entry).href);
40
- const Ctor = mod.PrismaClient ?? mod.default?.PrismaClient;
41
- if (!Ctor) throw new Error(`No PrismaClient in ${entry}`);
42
- return new Ctor();
43
- }
44
- const { Pool } = await import("pg");
45
- const { pgSslConfig } = await import("./pg-ssl-GD3332YS.js");
46
- const pool = new Pool({ connectionString: process.env.DATABASE_URL, ...pgSslConfig() });
47
- return {
48
- async $queryRawUnsafe(query, ...values) {
49
- const result = await pool.query(query, values);
50
- return result.rows;
51
- },
52
- async $executeRawUnsafe(query, ...values) {
53
- const result = await pool.query(query, values);
54
- return result.rowCount ?? 0;
55
- },
56
- async $disconnect() {
57
- await pool.end();
58
- }
59
- };
60
- })();
61
- }
62
- return prismaPromise;
63
- }
64
- function setProjectionWorkerPrismaClientForTests(client) {
65
- prismaPromise = client ? Promise.resolve(client) : null;
66
- }
67
- function resetProjectionWorkerForTests() {
68
- running = false;
69
- if (pollTimer) {
70
- clearTimeout(pollTimer);
71
- pollTimer = null;
72
- }
73
- consecutivePollErrors = 0;
74
- prismaPromise = null;
75
- ontologySchemaReady = false;
76
- filteredSchemaReady = false;
77
- lastWikiApiPushAt = 0;
78
- }
79
- function stableId(input) {
80
- let h1 = 3735928559;
81
- let h2 = 1103547991;
82
- for (let i = 0; i < input.length; i++) {
83
- const ch = input.charCodeAt(i);
84
- h1 = Math.imul(h1 ^ ch, 2654435761);
85
- h2 = Math.imul(h2 ^ ch, 1597334677);
86
- }
87
- h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507) ^ Math.imul(h2 ^ h2 >>> 13, 3266489909);
88
- h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507) ^ Math.imul(h1 ^ h1 >>> 13, 3266489909);
89
- let h3 = 305419896;
90
- let h4 = 2596069104;
91
- for (let i = 0; i < input.length; i++) {
92
- const ch = input.charCodeAt(i);
93
- h3 = Math.imul(h3 ^ ch, 2246822507);
94
- h4 = Math.imul(h4 ^ ch, 3266489909);
95
- }
96
- h3 = Math.imul(h3 ^ h3 >>> 16, 2654435761) ^ Math.imul(h4 ^ h4 >>> 13, 1597334677);
97
- h4 = Math.imul(h4 ^ h4 >>> 16, 2654435761) ^ Math.imul(h3 ^ h3 >>> 13, 1597334677);
98
- const a = (h1 >>> 0).toString(16).padStart(8, "0");
99
- const b = (h2 >>> 0).toString(16).padStart(8, "0");
100
- const c = (h3 >>> 0).toString(16).padStart(8, "0");
101
- const d = (h4 >>> 0).toString(16).padStart(8, "0");
102
- const hex = a + b + c + d;
103
- return hex.slice(0, 8) + "-" + hex.slice(8, 12) + "-4" + hex.slice(13, 16) + "-" + (parseInt(hex[16], 16) & 3 | 8).toString(16) + hex.slice(17, 20) + "-" + hex.slice(20, 32);
104
- }
105
- function graphEntityId(name, type) {
106
- return stableId(`${name.toLowerCase()}::${type.toLowerCase()}`);
107
- }
108
- function normalizeEntityName(name) {
109
- return name.trim().replace(/\s+/g, " ").slice(0, 160);
110
- }
111
- function addGraphEntity(entities, name, type, properties = {}) {
112
- if (typeof name !== "string") return null;
113
- const normalized = normalizeEntityName(name);
114
- if (!normalized || normalized.length < 2) return null;
115
- const id = graphEntityId(normalized, type);
116
- if (!entities.has(id)) entities.set(id, { id, name: normalized, type, properties });
117
- return id;
118
- }
119
- function addGraphRelationship(relationships, sourceId, targetId, type, confidence = 0.7, properties = {}) {
120
- if (!sourceId || !targetId || sourceId === targetId) return;
121
- const id = graphEntityId(`${sourceId}->${type}->${targetId}`, "relationship");
122
- if (!relationships.has(id)) relationships.set(id, { id, sourceId, targetId, type, confidence, properties });
123
- }
124
- function deriveLightweightMemoryGraph(payload) {
125
- const entities = /* @__PURE__ */ new Map();
126
- const relationships = /* @__PURE__ */ new Map();
127
- const memoryId = typeof payload.id === "string" ? payload.id : "";
128
- const rawText = typeof payload.raw_text === "string" ? payload.raw_text : "";
129
- const memoryEntity = addGraphEntity(entities, memoryId || stableId(rawText.slice(0, 256)), "memory", {
130
- source: "cloud_sync",
131
- version: payload.version
132
- });
133
- const agentEntity = addGraphEntity(entities, payload.agent_id, "person", { role: payload.agent_role });
134
- const projectEntity = addGraphEntity(entities, payload.project_name, "project");
135
- const toolEntity = addGraphEntity(entities, payload.tool_name, "tool");
136
- const taskEntity = addGraphEntity(entities, payload.task_id, "task");
137
- const domainEntity = addGraphEntity(entities, payload.domain, "concept");
138
- const memoryTypeEntity = addGraphEntity(entities, payload.memory_type, "concept", { kind: "memory_type" });
139
- addGraphRelationship(relationships, agentEntity, projectEntity, "worked_on", 0.8);
140
- addGraphRelationship(relationships, agentEntity, toolEntity, "uses", 0.9);
141
- addGraphRelationship(relationships, memoryEntity, agentEntity, "created_by", 0.9);
142
- addGraphRelationship(relationships, memoryEntity, projectEntity, "part_of", 0.9);
143
- addGraphRelationship(relationships, memoryEntity, toolEntity, "uses", 0.8);
144
- addGraphRelationship(relationships, memoryEntity, taskEntity, "part_of", 0.8);
145
- addGraphRelationship(relationships, memoryEntity, domainEntity, "about", 0.7);
146
- addGraphRelationship(relationships, memoryEntity, memoryTypeEntity, "classified_as", 0.7);
147
- const pathRegex = /(?:\/[\w .@-]+)+(?:\.[A-Za-z0-9]{1,10})|(?:[\w@.-]+\/)+[\w@.-]+\.(?:ts|tsx|js|jsx|json|md|yml|yaml|sql|py|go|rs|sh|css|html)/g;
148
- const fileMatches = new Set((rawText.match(pathRegex) ?? []).slice(0, 8));
149
- for (const filePath of fileMatches) {
150
- const fileEntity = addGraphEntity(entities, filePath, "file", { source: "raw_text" });
151
- addGraphRelationship(relationships, memoryEntity, fileEntity, "references", 0.75);
152
- addGraphRelationship(relationships, projectEntity, fileEntity, "uses", 0.55);
153
- }
154
- const backtickMatches = [...rawText.matchAll(/`([^`\n]{2,80})`/g)].map((m) => m[1]).slice(0, 8);
155
- for (const term of backtickMatches) {
156
- if (!term || /[\s]{30,}/.test(term)) continue;
157
- const conceptEntity = addGraphEntity(entities, term, term.includes("/") || term.includes(".") ? "file" : "concept", { source: "backtick" });
158
- addGraphRelationship(relationships, memoryEntity, conceptEntity, "references", 0.65);
159
- }
160
- return { entities: [...entities.values()], relationships: [...relationships.values()] };
161
- }
162
- async function projectMemoryGraph(prisma, payload, memoryId, timestamp) {
163
- const graph = deriveLightweightMemoryGraph(payload);
164
- if (graph.entities.length === 0) return { entities: 0, relationships: 0 };
165
- let entities = 0;
166
- let relationships = 0;
167
- const actualEntityIds = /* @__PURE__ */ new Map();
168
- for (const entity of graph.entities) {
169
- const inserted = await prisma.$queryRawUnsafe(
170
- `INSERT INTO "memory"."entities" ("id", "name", "type", "first_seen", "last_seen", "properties")
171
- VALUES ($1, $2, $3, $4, $4, $5::jsonb)
172
- ON CONFLICT ("name", "type") DO UPDATE SET
173
- "last_seen" = GREATEST("memory"."entities"."last_seen", EXCLUDED."last_seen"),
174
- "properties" = "memory"."entities"."properties" || EXCLUDED."properties"
175
- RETURNING "id"`,
176
- entity.id,
177
- entity.name,
178
- entity.type,
179
- timestamp,
180
- JSON.stringify(entity.properties ?? {})
181
- );
182
- const actualId = inserted[0]?.id ?? entity.id;
183
- actualEntityIds.set(entity.id, actualId);
184
- await prisma.$executeRawUnsafe(
185
- `INSERT INTO "memory"."entity_memories" ("entity_id", "memory_id")
186
- VALUES ($1, $2)
187
- ON CONFLICT DO NOTHING`,
188
- actualId,
189
- memoryId
190
- );
191
- entities++;
192
- }
193
- for (const relationship of graph.relationships) {
194
- const sourceId = actualEntityIds.get(relationship.sourceId) ?? relationship.sourceId;
195
- const targetId = actualEntityIds.get(relationship.targetId) ?? relationship.targetId;
196
- const relId = graphEntityId(`${sourceId}->${relationship.type}->${targetId}`, "relationship");
197
- await prisma.$executeRawUnsafe(
198
- `INSERT INTO "memory"."relationships" ("id", "source_entity_id", "target_entity_id", "type", "weight", "confidence", "timestamp", "properties")
199
- VALUES ($1, $2, $3, $4, 1.0, $5, $6, $7::jsonb)
200
- ON CONFLICT ("source_entity_id", "target_entity_id", "type")
201
- DO UPDATE SET "weight" = LEAST("memory"."relationships"."weight" + 0.1, 2.0),
202
- "confidence" = GREATEST("memory"."relationships"."confidence", EXCLUDED."confidence"),
203
- "timestamp" = GREATEST("memory"."relationships"."timestamp", EXCLUDED."timestamp"),
204
- "properties" = "memory"."relationships"."properties" || EXCLUDED."properties"`,
205
- relId,
206
- sourceId,
207
- targetId,
208
- relationship.type,
209
- relationship.confidence,
210
- timestamp,
211
- JSON.stringify(relationship.properties ?? {})
212
- );
213
- relationships++;
214
- }
215
- return { entities, relationships };
216
- }
217
- async function ensurePostgresOntologySchema(prisma) {
218
- if (ontologySchemaReady) return;
219
- await prisma.$executeRawUnsafe(`
220
- CREATE TABLE IF NOT EXISTS "memory"."agent_sessions" (
221
- "id" text PRIMARY KEY,
222
- "agent_id" text NOT NULL,
223
- "project_name" text,
224
- "started_at" timestamp(3) NOT NULL,
225
- "last_event_at" timestamp(3) NOT NULL,
226
- "event_count" integer NOT NULL DEFAULT 0,
227
- "properties" jsonb NOT NULL DEFAULT '{}'::jsonb
228
- )`);
229
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_sessions_agent_time" ON "memory"."agent_sessions" ("agent_id", "started_at")`);
230
- await prisma.$executeRawUnsafe(`
231
- CREATE TABLE IF NOT EXISTS "memory"."agent_goals" (
232
- "id" text PRIMARY KEY,
233
- "statement" text NOT NULL,
234
- "owner_agent_id" text,
235
- "project_name" text,
236
- "status" text NOT NULL DEFAULT 'open',
237
- "priority" integer NOT NULL DEFAULT 5,
238
- "success_criteria" text,
239
- "parent_goal_id" text,
240
- "due_at" timestamp(3),
241
- "achieved_at" timestamp(3),
242
- "supersedes_id" text,
243
- "created_at" timestamp(3) NOT NULL,
244
- "updated_at" timestamp(3) NOT NULL,
245
- "source_memory_id" text
246
- )`);
247
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_goals_project_status" ON "memory"."agent_goals" ("project_name", "status", "priority")`);
248
- await prisma.$executeRawUnsafe(`
249
- CREATE TABLE IF NOT EXISTS "memory"."agent_events" (
250
- "id" text PRIMARY KEY,
251
- "event_type" text NOT NULL,
252
- "occurred_at" timestamp(3) NOT NULL,
253
- "sequence_index" integer NOT NULL,
254
- "actor_agent_id" text,
255
- "agent_role" text,
256
- "project_name" text,
257
- "session_id" text,
258
- "task_id" text,
259
- "goal_id" text,
260
- "parent_event_id" text,
261
- "intention" text,
262
- "outcome" text,
263
- "evidence_memory_id" text,
264
- "impact" text,
265
- "payload" jsonb NOT NULL DEFAULT '{}'::jsonb,
266
- "created_at" timestamp(3) NOT NULL
267
- )`);
268
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_events_time" ON "memory"."agent_events" ("occurred_at", "sequence_index")`);
269
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_events_session_seq" ON "memory"."agent_events" ("session_id", "sequence_index")`);
270
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_events_goal_time" ON "memory"."agent_events" ("goal_id", "occurred_at")`);
271
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_events_memory" ON "memory"."agent_events" ("evidence_memory_id")`);
272
- await prisma.$executeRawUnsafe(`
273
- CREATE TABLE IF NOT EXISTS "memory"."agent_goal_links" (
274
- "id" text PRIMARY KEY,
275
- "goal_id" text NOT NULL,
276
- "link_type" text NOT NULL,
277
- "target_id" text NOT NULL,
278
- "target_type" text NOT NULL,
279
- "created_at" timestamp(3) NOT NULL
280
- )`);
281
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_goal_links_goal" ON "memory"."agent_goal_links" ("goal_id", "target_type")`);
282
- await prisma.$executeRawUnsafe(`
283
- CREATE TABLE IF NOT EXISTS "memory"."agent_semantic_labels" (
284
- "id" text PRIMARY KEY,
285
- "source_memory_id" text NOT NULL,
286
- "event_id" text,
287
- "labeler" text NOT NULL,
288
- "schema_version" integer NOT NULL DEFAULT 1,
289
- "confidence" double precision NOT NULL DEFAULT 0,
290
- "labels" jsonb NOT NULL,
291
- "created_at" timestamp(3) NOT NULL,
292
- "updated_at" timestamp(3) NOT NULL
293
- )`);
294
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_semantic_labels_memory" ON "memory"."agent_semantic_labels" ("source_memory_id", "labeler")`);
295
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_semantic_labels_event" ON "memory"."agent_semantic_labels" ("event_id")`);
296
- await prisma.$executeRawUnsafe(`
297
- CREATE TABLE IF NOT EXISTS "memory"."agent_reflection_checkpoints" (
298
- "id" text PRIMARY KEY,
299
- "project_name" text,
300
- "session_id" text,
301
- "window_start_at" timestamp(3) NOT NULL,
302
- "window_end_at" timestamp(3) NOT NULL,
303
- "event_count" integer NOT NULL DEFAULT 0,
304
- "goal_count" integer NOT NULL DEFAULT 0,
305
- "success_count" integer NOT NULL DEFAULT 0,
306
- "failure_count" integer NOT NULL DEFAULT 0,
307
- "risk_count" integer NOT NULL DEFAULT 0,
308
- "summary" text NOT NULL,
309
- "learnings" jsonb NOT NULL DEFAULT '[]'::jsonb,
310
- "next_actions" jsonb NOT NULL DEFAULT '[]'::jsonb,
311
- "evidence_event_ids" jsonb NOT NULL DEFAULT '[]'::jsonb,
312
- "confidence" double precision NOT NULL DEFAULT 0,
313
- "created_at" timestamp(3) NOT NULL
314
- )`);
315
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_reflection_project_time" ON "memory"."agent_reflection_checkpoints" ("project_name", "window_end_at")`);
316
- await prisma.$executeRawUnsafe(`CREATE INDEX IF NOT EXISTS "idx_agent_reflection_session_time" ON "memory"."agent_reflection_checkpoints" ("session_id", "window_end_at")`);
317
- ontologySchemaReady = true;
318
- }
319
- async function ensureFilteredSchema(prisma) {
320
- if (filteredSchemaReady) return;
321
- await prisma.$executeRawUnsafe(`CREATE SCHEMA IF NOT EXISTS filtered`);
322
- await prisma.$executeRawUnsafe(`
323
- CREATE TABLE IF NOT EXISTS "filtered"."documents" (
324
- "id" UUID PRIMARY KEY DEFAULT gen_random_uuid(),
325
- "title" TEXT NOT NULL,
326
- "content" TEXT NOT NULL,
327
- "doc_type" TEXT NOT NULL DEFAULT 'memory',
328
- "source" TEXT NOT NULL DEFAULT 'exe-os',
329
- "source_id" TEXT,
330
- "metadata" JSONB DEFAULT '{}',
331
- "created_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
332
- UNIQUE("source", "source_id")
333
- )`);
334
- await prisma.$executeRawUnsafe(`
335
- CREATE TABLE IF NOT EXISTS "filtered"."contacts" (
336
- "id" UUID PRIMARY KEY DEFAULT gen_random_uuid(),
337
- "name" TEXT,
338
- "phone" TEXT,
339
- "email" TEXT,
340
- "platform" TEXT NOT NULL DEFAULT 'whatsapp',
341
- "platform_id" TEXT,
342
- "metadata" JSONB DEFAULT '{}',
343
- "first_seen" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
344
- "last_seen" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
345
- UNIQUE("platform", "platform_id")
346
- )`);
347
- await prisma.$executeRawUnsafe(`
348
- CREATE TABLE IF NOT EXISTS "filtered"."conversations" (
349
- "id" UUID PRIMARY KEY DEFAULT gen_random_uuid(),
350
- "contact_id" UUID REFERENCES "filtered"."contacts"("id"),
351
- "platform" TEXT NOT NULL DEFAULT 'whatsapp',
352
- "thread_id" TEXT,
353
- "direction" TEXT NOT NULL DEFAULT 'inbound',
354
- "content" TEXT NOT NULL,
355
- "message_type" TEXT NOT NULL DEFAULT 'text',
356
- "metadata" JSONB DEFAULT '{}',
357
- "sent_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
358
- UNIQUE("platform", "thread_id", "sent_at")
359
- )`);
360
- filteredSchemaReady = true;
361
- }
362
- async function projectAgenticOntology(prisma, payload, memoryId, timestamp) {
363
- await ensurePostgresOntologySchema(prisma);
364
- const row = {
365
- id: memoryId,
366
- agent_id: String(payload.agent_id ?? "system"),
367
- agent_role: String(payload.agent_role ?? "ingest"),
368
- session_id: String(payload.session_id ?? "projection-worker"),
369
- timestamp: timestamp.toISOString(),
370
- tool_name: String(payload.tool_name ?? "cloud_sync"),
371
- project_name: String(payload.project_name ?? "exe-os"),
372
- has_error: payload.has_error ? 1 : 0,
373
- raw_text: String(payload.raw_text ?? JSON.stringify(payload)),
374
- version: typeof payload.version === "number" ? payload.version : Number(payload.version ?? 0),
375
- task_id: typeof payload.task_id === "string" ? payload.task_id : null,
376
- intent: typeof payload.intent === "string" ? payload.intent : null,
377
- outcome: typeof payload.outcome === "string" ? payload.outcome : null,
378
- domain: typeof payload.domain === "string" ? payload.domain : null,
379
- trajectory: typeof payload.trajectory === "string" ? payload.trajectory : null
380
- };
381
- const eventId = stableId(`event:${memoryId}`);
382
- const sequence = Number(row.version ?? 0) || Math.floor(timestamp.getTime() / 1e3);
383
- const intention = inferIntention(row);
384
- const outcome = inferOutcome(row);
385
- const now = /* @__PURE__ */ new Date();
386
- await prisma.$executeRawUnsafe(
387
- `INSERT INTO "memory"."agent_sessions" ("id", "agent_id", "project_name", "started_at", "last_event_at", "event_count", "properties")
388
- VALUES ($1, $2, $3, $4, $4, 1, $5::jsonb)
389
- ON CONFLICT ("id") DO UPDATE SET "last_event_at" = GREATEST("memory"."agent_sessions"."last_event_at", EXCLUDED."last_event_at"),
390
- "event_count" = "memory"."agent_sessions"."event_count" + 1`,
391
- row.session_id,
392
- row.agent_id,
393
- row.project_name,
394
- timestamp,
395
- JSON.stringify({ agent_role: row.agent_role })
396
- );
397
- await prisma.$executeRawUnsafe(
398
- `INSERT INTO "memory"."agent_events"
399
- ("id", "event_type", "occurred_at", "sequence_index", "actor_agent_id", "agent_role", "project_name",
400
- "session_id", "task_id", "goal_id", "parent_event_id", "intention", "outcome", "evidence_memory_id",
401
- "impact", "payload", "created_at")
402
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, NULL, NULL, $10, $11, $12, $13, $14::jsonb, $15)
403
- ON CONFLICT ("id") DO NOTHING`,
404
- eventId,
405
- inferOntologyEventType(row),
406
- timestamp,
407
- sequence,
408
- row.agent_id,
409
- row.agent_role,
410
- row.project_name,
411
- row.session_id,
412
- row.task_id ?? null,
413
- intention,
414
- outcome,
415
- row.id,
416
- row.has_error ? "negative" : outcome === "success_signal" ? "positive" : "neutral",
417
- JSON.stringify(ontologyPayload(row)),
418
- now
419
- );
420
- const semantic = inferSemanticLabel(row);
421
- await prisma.$executeRawUnsafe(
422
- `INSERT INTO "memory"."agent_semantic_labels"
423
- ("id", "source_memory_id", "event_id", "labeler", "schema_version", "confidence", "labels", "created_at", "updated_at")
424
- VALUES ($1, $2, $3, $4, $5, $6, $7::jsonb, $8, $8)
425
- ON CONFLICT ("id") DO UPDATE SET "confidence" = EXCLUDED."confidence",
426
- "labels" = EXCLUDED."labels", "updated_at" = EXCLUDED."updated_at"`,
427
- stableId(`semantic:${row.id}:${semantic.labeler}:${semantic.schemaVersion}`),
428
- row.id,
429
- eventId,
430
- semantic.labeler,
431
- semantic.schemaVersion,
432
- semantic.confidence,
433
- JSON.stringify(semantic),
434
- now
435
- );
436
- let goals = 0;
437
- for (const statement of extractGoalCandidates(row)) {
438
- const goalId = stableId(`goal:${row.project_name}:${statement.toLowerCase()}`);
439
- await prisma.$executeRawUnsafe(
440
- `INSERT INTO "memory"."agent_goals"
441
- ("id", "statement", "owner_agent_id", "project_name", "status", "priority", "created_at", "updated_at", "source_memory_id")
442
- VALUES ($1, $2, $3, $4, 'open', 5, $5, $5, $6)
443
- ON CONFLICT ("id") DO UPDATE SET "updated_at" = EXCLUDED."updated_at"`,
444
- goalId,
445
- statement,
446
- row.agent_id,
447
- row.project_name,
448
- now,
449
- row.id
450
- );
451
- await prisma.$executeRawUnsafe(
452
- `INSERT INTO "memory"."agent_goal_links" ("id", "goal_id", "link_type", "target_id", "target_type", "created_at")
453
- VALUES ($1, $2, 'evidence', $3, 'memory', $4)
454
- ON CONFLICT ("id") DO NOTHING`,
455
- stableId(`goal_link:${goalId}:${row.id}:memory`),
456
- goalId,
457
- row.id,
458
- now
459
- );
460
- await prisma.$executeRawUnsafe(
461
- `INSERT INTO "memory"."agent_goal_links" ("id", "goal_id", "link_type", "target_id", "target_type", "created_at")
462
- VALUES ($1, $2, 'event', $3, 'event', $4)
463
- ON CONFLICT ("id") DO NOTHING`,
464
- stableId(`goal_link:${goalId}:${eventId}:event`),
465
- goalId,
466
- eventId,
467
- now
468
- );
469
- goals++;
470
- }
471
- return { events: 1, goals };
472
- }
473
- var WIKI_PROJECTABLE_TOOLS = /* @__PURE__ */ new Set(["manual", "auto-decision", "SessionEnd", "AssistantResponse"]);
474
- var WIKI_MIN_TEXT_LENGTH = 100;
475
- async function ensureWikiWorkspace(prisma, projectName) {
476
- const slug = projectName.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-");
477
- const existing = await prisma.$queryRawUnsafe(
478
- `SELECT "id" FROM "wiki"."workspaces" WHERE "slug" = $1`,
479
- slug
480
- );
481
- if (existing.length > 0) return existing[0].id;
482
- const inserted = await prisma.$queryRawUnsafe(
483
- `INSERT INTO "wiki"."workspaces" ("name", "slug", "chat_mode", "updated_at")
484
- VALUES ($1, $2, 'chat', NOW())
485
- ON CONFLICT ("slug") DO UPDATE SET "name" = EXCLUDED."name"
486
- RETURNING "id"`,
487
- projectName,
488
- slug
489
- );
490
- return inserted[0].id;
491
- }
492
- function isWikiWorthy(payload) {
493
- const toolName = String(payload.tool_name ?? "");
494
- const rawText = String(payload.raw_text ?? "");
495
- const importance = typeof payload.importance === "number" ? payload.importance : 5;
496
- const memoryType = String(payload.memory_type ?? "raw");
497
- if (memoryType === "decision" || memoryType === "procedure") return true;
498
- if (WIKI_PROJECTABLE_TOOLS.has(toolName)) return true;
499
- if (importance >= 7 && rawText.length >= WIKI_MIN_TEXT_LENGTH) return true;
500
- return false;
501
- }
502
- async function projectToWiki(prisma, payload, timestamp) {
503
- if (!isWikiWorthy(payload)) return { documents: 0 };
504
- const rawText = String(payload.raw_text ?? "");
505
- if (rawText.length < WIKI_MIN_TEXT_LENGTH) return { documents: 0 };
506
- const projectName = String(payload.project_name ?? "exe-os");
507
- const agentId = String(payload.agent_id ?? "system");
508
- const toolName = String(payload.tool_name ?? "unknown");
509
- const memoryId = String(payload.id ?? "");
510
- const docId = memoryId || stableId(rawText.slice(0, 512));
511
- const firstLine = rawText.split("\n")[0]?.slice(0, 120)?.replace(/[^a-zA-Z0-9 _-]/g, "") || "untitled";
512
- const filename = `${agentId}-${firstLine.slice(0, 80).trim().replace(/\s+/g, "-").toLowerCase()}.md`;
513
- const docpath = `${projectName}/${filename}`;
514
- const workspaceId = await ensureWikiWorkspace(prisma, projectName);
515
- await prisma.$executeRawUnsafe(
516
- `INSERT INTO "wiki"."workspace_documents" ("doc_id", "filename", "docpath", "workspace_id", "metadata", "pinned")
517
- VALUES ($1, $2, $3, $4, $5, false)
518
- ON CONFLICT ("doc_id") DO UPDATE SET
519
- "filename" = EXCLUDED."filename",
520
- "metadata" = EXCLUDED."metadata"`,
521
- docId,
522
- filename,
523
- docpath,
524
- workspaceId,
525
- JSON.stringify({
526
- agent_id: agentId,
527
- tool_name: toolName,
528
- memory_type: payload.memory_type ?? "raw",
529
- importance: payload.importance ?? 5,
530
- timestamp: timestamp.toISOString(),
531
- content_preview: rawText.slice(0, 500)
532
- })
533
- );
534
- return { documents: 1 };
535
- }
536
- var lastWikiApiPushAt = 0;
537
- var WIKI_API_MIN_INTERVAL_MS = 500;
538
- async function pushToWikiApi(payload, _timestamp) {
539
- const now = Date.now();
540
- if (now - lastWikiApiPushAt < WIKI_API_MIN_INTERVAL_MS) {
541
- return false;
542
- }
543
- try {
544
- const { createWikiClient, uploadDocumentToWiki } = await import("./wiki-client-P55NUEDE.js");
545
- const client = await createWikiClient();
546
- if (!client) return false;
547
- const rawText = String(payload.raw_text ?? "");
548
- const projectName = String(payload.project_name ?? "exe-os");
549
- const agentId = String(payload.agent_id ?? "system");
550
- const firstLine = rawText.split("\n")[0]?.slice(0, 120) ?? "Untitled";
551
- const title = `[${agentId}] ${firstLine}`;
552
- const slug = projectName.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-");
553
- const result = await uploadDocumentToWiki(client, slug, title, rawText);
554
- lastWikiApiPushAt = Date.now();
555
- if (!result.success) {
556
- process.stderr.write(`[projection-worker] Wiki API push failed: ${result.error}
557
- `);
558
- }
559
- return result.success;
560
- } catch (err) {
561
- process.stderr.write(`[projection-worker] Wiki API push error: ${err instanceof Error ? err.message : String(err)}
562
- `);
563
- return false;
564
- }
565
- }
566
- function resetLastWikiApiPushAtForTests() {
567
- lastWikiApiPushAt = 0;
568
- }
569
- var projectionHandlers = {
570
- async whatsapp(event, prisma) {
571
- const targets = [];
572
- const payload = event.payload;
573
- await prisma.$executeRawUnsafe(
574
- `INSERT INTO "memory"."memory_records" ("id", "agent_id", "agent_role", "session_id", "tool_name", "project_name", "raw_text", "memory_type", "source_type", "intent")
575
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
576
- ON CONFLICT ("id") DO NOTHING`,
577
- crypto.randomUUID(),
578
- "system",
579
- "ingest",
580
- "projection-worker",
581
- "projection_worker",
582
- "exe-os",
583
- JSON.stringify(payload),
584
- "raw",
585
- "whatsapp",
586
- event.event_type
587
- );
588
- targets.push("memory");
589
- await ensureFilteredSchema(prisma);
590
- const senderName = payload.sender_name ?? payload.contact_name ?? null;
591
- const senderPhone = payload.from ?? payload.phone ?? null;
592
- const threadId = payload.conversation_id ?? payload.chat_id ?? event.source_id;
593
- if (senderPhone) {
594
- const contactResult = await prisma.$queryRawUnsafe(
595
- `INSERT INTO "filtered"."contacts" ("name", "phone", "platform", "platform_id", "last_seen")
596
- VALUES ($1, $2, 'whatsapp', $3, $4)
597
- ON CONFLICT ("platform", "platform_id") DO UPDATE SET
598
- "name" = COALESCE(EXCLUDED."name", "filtered"."contacts"."name"),
599
- "last_seen" = GREATEST("filtered"."contacts"."last_seen", EXCLUDED."last_seen")
600
- RETURNING "id"`,
601
- senderName,
602
- senderPhone,
603
- senderPhone,
604
- event.timestamp
605
- );
606
- const contactId = contactResult[0]?.id;
607
- targets.push("filtered.contacts");
608
- const messageContent = payload.message ?? payload.text ?? payload.body ?? JSON.stringify(payload);
609
- const direction = payload.direction ?? "inbound";
610
- if (contactId && messageContent) {
611
- await prisma.$executeRawUnsafe(
612
- `INSERT INTO "filtered"."conversations" ("contact_id", "platform", "thread_id", "direction", "content", "message_type", "sent_at")
613
- VALUES ($1, 'whatsapp', $2, $3, $4, $5, $6)
614
- ON CONFLICT ("platform", "thread_id", "sent_at") DO NOTHING`,
615
- contactId,
616
- threadId,
617
- direction,
618
- typeof messageContent === "string" ? messageContent : JSON.stringify(messageContent),
619
- payload.type ?? "text",
620
- event.timestamp
621
- );
622
- targets.push("filtered.conversations");
623
- }
624
- }
625
- return { targets };
626
- },
627
- async shopify(event, prisma) {
628
- const targets = [];
629
- const payload = event.payload;
630
- await prisma.$executeRawUnsafe(
631
- `INSERT INTO "memory"."memory_records" ("id", "agent_id", "agent_role", "session_id", "tool_name", "project_name", "raw_text", "memory_type", "source_type", "intent")
632
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
633
- ON CONFLICT ("id") DO NOTHING`,
634
- crypto.randomUUID(),
635
- "system",
636
- "ingest",
637
- "projection-worker",
638
- "projection_worker",
639
- "exe-os",
640
- JSON.stringify(payload),
641
- "raw",
642
- "shopify",
643
- event.event_type
644
- );
645
- targets.push("memory");
646
- return { targets };
647
- },
648
- async cloud_sync(event, prisma) {
649
- const targets = [];
650
- const payload = event.payload;
651
- const memoryId = payload.id ?? crypto.randomUUID();
652
- await prisma.$executeRawUnsafe(
653
- `INSERT INTO "memory"."memory_records" ("id", "agent_id", "agent_role", "session_id", "tool_name", "project_name", "raw_text", "memory_type", "source_type", "intent", "domain")
654
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
655
- ON CONFLICT ("id") DO NOTHING`,
656
- memoryId,
657
- payload.agent_id ?? "system",
658
- payload.agent_role ?? "ingest",
659
- payload.session_id ?? "projection-worker",
660
- payload.tool_name ?? "cloud_sync",
661
- payload.project_name ?? "exe-os",
662
- payload.raw_text ?? JSON.stringify(payload),
663
- payload.memory_type ?? "raw",
664
- "cloud_sync",
665
- event.event_type,
666
- payload.domain ?? null
667
- );
668
- targets.push("memory");
669
- const graph = await projectMemoryGraph(prisma, payload, memoryId, event.timestamp);
670
- if (graph.entities > 0 || graph.relationships > 0) targets.push("graph");
671
- const ontology = await projectAgenticOntology(prisma, payload, memoryId, event.timestamp);
672
- if (ontology.events > 0) targets.push("ontology");
673
- const wiki = await projectToWiki(prisma, payload, event.timestamp);
674
- if (wiki.documents > 0) {
675
- targets.push("wiki");
676
- await pushToWikiApi(payload, event.timestamp);
677
- }
678
- await ensureFilteredSchema(prisma);
679
- const rawText = payload.raw_text ?? "";
680
- if (rawText.length > 50) {
681
- await prisma.$executeRawUnsafe(
682
- `INSERT INTO "filtered"."documents" ("title", "content", "doc_type", "source", "source_id", "metadata", "created_at")
683
- VALUES ($1, $2, $3, $4, $5, $6::jsonb, $7)
684
- ON CONFLICT ("source", "source_id") DO NOTHING`,
685
- rawText.slice(0, 80),
686
- rawText,
687
- payload.tool_name ?? "memory",
688
- "exe-os",
689
- memoryId,
690
- JSON.stringify({
691
- agent_id: payload.agent_id,
692
- project_name: payload.project_name
693
- }),
694
- event.timestamp
695
- );
696
- targets.push("filtered.documents");
697
- }
698
- return { targets };
699
- },
700
- async external_agent(event, prisma) {
701
- const targets = [];
702
- const payload = event.payload;
703
- await prisma.$executeRawUnsafe(
704
- `INSERT INTO "memory"."memory_records" ("id", "agent_id", "agent_role", "session_id", "tool_name", "project_name", "raw_text", "memory_type", "source_type", "intent", "domain")
705
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
706
- ON CONFLICT ("id") DO NOTHING`,
707
- crypto.randomUUID(),
708
- "system",
709
- "ingest",
710
- "projection-worker",
711
- "projection_worker",
712
- "exe-os",
713
- JSON.stringify(payload),
714
- "raw",
715
- "external_agent",
716
- event.event_type,
717
- payload.domain ?? null
718
- );
719
- targets.push("memory");
720
- return { targets };
721
- }
722
- };
723
- var projectionHandlersForTests = projectionHandlers;
724
- var defaultHandler = async (event, prisma) => {
725
- await prisma.$executeRawUnsafe(
726
- `INSERT INTO "memory"."memory_records" ("id", "agent_id", "agent_role", "session_id", "tool_name", "project_name", "raw_text", "memory_type", "source_type", "intent")
727
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
728
- ON CONFLICT ("id") DO NOTHING`,
729
- crypto.randomUUID(),
730
- "system",
731
- "ingest",
732
- "projection-worker",
733
- "projection_worker",
734
- "exe-os",
735
- JSON.stringify(event.payload),
736
- "raw",
737
- event.source,
738
- event.event_type
739
- );
740
- return { targets: ["memory"] };
741
- };
742
- var BATCH_SIZE = 50;
743
- var POLL_INTERVAL_MS = 1e4;
744
- var MAX_POLL_BACKOFF_MS = 5 * 6e4;
745
- function isTruthyEnv(value) {
746
- return /^(1|true|yes|on)$/i.test(value ?? "");
747
- }
748
- var running = false;
749
- var pollTimer = null;
750
- var consecutivePollErrors = 0;
751
- async function processBatch() {
752
- const prisma = await loadPrisma();
753
- const events = await prisma.$queryRawUnsafe(
754
- `SELECT "id", "source", "source_id", "event_type", "payload", "metadata", "timestamp"
755
- FROM "raw"."raw_events"
756
- WHERE "processed_at" IS NULL
757
- ORDER BY "timestamp" ASC
758
- LIMIT $1`,
759
- BATCH_SIZE
760
- );
761
- if (events.length === 0) return 0;
762
- let processed = 0;
763
- for (const event of events) {
764
- try {
765
- const handler = projectionHandlers[event.source] ?? defaultHandler;
766
- const result = await handler(event, prisma);
767
- await prisma.$executeRawUnsafe(
768
- `UPDATE "raw"."raw_events"
769
- SET "processed_at" = NOW(), "projections" = $1::jsonb
770
- WHERE "id" = $2`,
771
- JSON.stringify({ targets: result.targets, skipped: result.skipped }),
772
- event.id
773
- );
774
- processed++;
775
- } catch (err) {
776
- const message = err instanceof Error ? err.message : String(err);
777
- process.stderr.write(
778
- `[projection-worker] Error processing event ${event.id}: ${message}
779
- `
780
- );
781
- await prisma.$executeRawUnsafe(
782
- `UPDATE "raw"."raw_events"
783
- SET "processed_at" = NOW(), "projections" = $1::jsonb
784
- WHERE "id" = $2`,
785
- JSON.stringify({ error: message }),
786
- event.id
787
- );
788
- }
789
- }
790
- return processed;
791
- }
792
- async function shouldStartProjectionWorker() {
793
- try {
794
- const config = await loadConfig();
795
- const envEnabled = isTruthyEnv(process.env.EXE_CLOUD_SYNC_TO_POSTGRES);
796
- if (!envEnabled && config.cloud?.syncToPostgres !== true) {
797
- return { start: false, reason: "cloud.syncToPostgres is not enabled" };
798
- }
799
- } catch (err) {
800
- return { start: false, reason: `config unavailable: ${err instanceof Error ? err.message : String(err)}` };
801
- }
802
- if (!process.env.DATABASE_URL) {
803
- return { start: false, reason: "DATABASE_URL is not set" };
804
- }
805
- const exeDbRoot = process.env.EXE_DB_ROOT ?? path.join(os.homedir(), "exe-db");
806
- if (!existsSync(path.join(exeDbRoot, "package.json")) && !process.env.EXE_OS_PRISMA_CLIENT_PATH) {
807
- try {
808
- await import("pg");
809
- } catch {
810
- return { start: false, reason: "no exe-db Prisma client or pg adapter available" };
811
- }
812
- }
813
- return { start: true };
814
- }
815
- function computeProjectionBackoffMs(errorCount) {
816
- if (errorCount <= 0) return POLL_INTERVAL_MS;
817
- return Math.min(POLL_INTERVAL_MS * 2 ** Math.min(errorCount, 5), MAX_POLL_BACKOFF_MS);
818
- }
819
- function startProjectionWorker() {
820
- if (running) return;
821
- void (async () => {
822
- const decision = await shouldStartProjectionWorker();
823
- if (!decision.start) {
824
- process.stderr.write(`[projection-worker] Skipped \u2014 ${decision.reason}.
825
- `);
826
- return;
827
- }
828
- running = true;
829
- consecutivePollErrors = 0;
830
- process.stderr.write("[projection-worker] Starting...\n");
831
- const tick = async () => {
832
- if (!running) return;
833
- let nextDelay = POLL_INTERVAL_MS;
834
- try {
835
- const count = await processBatch();
836
- consecutivePollErrors = 0;
837
- if (count > 0) {
838
- process.stderr.write(`[projection-worker] Processed ${count} events.
839
- `);
840
- }
841
- } catch (err) {
842
- consecutivePollErrors++;
843
- nextDelay = computeProjectionBackoffMs(consecutivePollErrors);
844
- process.stderr.write(
845
- `[projection-worker] Poll error (${consecutivePollErrors}; next retry ${Math.round(nextDelay / 1e3)}s): ${err instanceof Error ? err.message : String(err)}
846
- `
847
- );
848
- }
849
- if (running) {
850
- pollTimer = setTimeout(tick, nextDelay);
851
- }
852
- };
853
- void tick();
854
- })();
855
- }
856
- function stopProjectionWorker() {
857
- running = false;
858
- if (pollTimer) {
859
- clearTimeout(pollTimer);
860
- pollTimer = null;
861
- }
862
- process.stderr.write("[projection-worker] Stopped.\n");
863
- }
864
- async function processProjectionBatch() {
865
- return processBatch();
866
- }
867
- export {
868
- computeProjectionBackoffMs,
869
- processProjectionBatch,
870
- projectionHandlersForTests,
871
- resetLastWikiApiPushAtForTests,
872
- resetProjectionWorkerForTests,
873
- setProjectionWorkerPrismaClientForTests,
874
- shouldStartProjectionWorker,
875
- startProjectionWorker,
876
- stopProjectionWorker
877
- };