@a-company/paradigm 5.11.0 → 5.21.0

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 (408) hide show
  1. package/dist/accept-orchestration-IUAWQZUN.js +18 -0
  2. package/dist/add-P76GEMGF.js +8 -0
  3. package/dist/agent-UUTYOFTH.js +33 -0
  4. package/dist/agent-loader-EPXURMO7.js +2 -0
  5. package/dist/agent-loader-PYGPX6D2.js +2 -0
  6. package/dist/agent-state-KSQ3S7OB.js +2 -0
  7. package/dist/agents-suggest-HYTFMQD3.js +10 -0
  8. package/dist/aggregate-W66DM3GA.js +10 -0
  9. package/dist/ambient-HYZR42NX.js +35 -0
  10. package/dist/assess-UFPYEJKP.js +9 -0
  11. package/dist/auto-RHJXOZFL.js +14 -0
  12. package/dist/beacon-5QVYV5DF.js +13 -0
  13. package/dist/calibration-OLJYB5HN.js +7 -0
  14. package/dist/check-THVGY4R5.js +14 -0
  15. package/dist/chunk-22ISTMKI.js +31 -0
  16. package/dist/chunk-2QO33NYK.js +3 -0
  17. package/dist/chunk-33LKBMVK.js +134 -0
  18. package/dist/chunk-4QADCWPU.js +7 -0
  19. package/dist/chunk-4TXOVRWD.js +3 -0
  20. package/dist/chunk-4UJ4NIEQ.js +4 -0
  21. package/dist/chunk-4ZGGWZ32.js +3 -0
  22. package/dist/chunk-5TAVYPOV.js +2 -0
  23. package/dist/chunk-6EX37L4Q.js +8 -0
  24. package/dist/chunk-AD5TAD2A.js +5 -0
  25. package/dist/chunk-AGVAHVUA.js +2 -0
  26. package/dist/chunk-AO7ZSRME.js +13 -0
  27. package/dist/chunk-BFD3GFRK.js +2 -0
  28. package/dist/chunk-D34YFK4M.js +6 -0
  29. package/dist/chunk-DVZWCXB6.js +2 -0
  30. package/dist/chunk-EKZDFEJW.js +2 -0
  31. package/dist/chunk-ET5XJTSX.js +2 -0
  32. package/dist/chunk-FYDRENK7.js +3 -0
  33. package/dist/chunk-HMQ5BHP2.js +743 -0
  34. package/dist/chunk-HXKWL3VK.js +29 -0
  35. package/dist/chunk-IZSBGW6E.js +2 -0
  36. package/dist/chunk-J32OPJEX.js +2 -0
  37. package/dist/chunk-JBDMCRPP.js +7 -0
  38. package/dist/chunk-JIXHEBGK.js +7 -0
  39. package/dist/chunk-JNSJVCTU.js +2 -0
  40. package/dist/chunk-JQKKVAAN.js +2 -0
  41. package/dist/chunk-KLBH26PA.js +429 -0
  42. package/dist/chunk-L6K5HNDL.js +24 -0
  43. package/dist/chunk-LKAT7IAK.js +2 -0
  44. package/dist/chunk-M4UMM6DC.js +5 -0
  45. package/dist/chunk-NKYNHSA5.js +424 -0
  46. package/dist/chunk-NW6OKHE6.js +5 -0
  47. package/dist/chunk-NXRVR37G.js +60 -0
  48. package/dist/chunk-ODVKPZZ4.js +2 -0
  49. package/dist/chunk-PUBB7LIT.js +5 -0
  50. package/dist/chunk-Q2J542ST.js +2 -0
  51. package/dist/chunk-QGZRM6ZB.js +2 -0
  52. package/dist/chunk-QNZEG7IT.js +13 -0
  53. package/dist/chunk-QT2LKB3P.js +7 -0
  54. package/dist/chunk-RVRARWSY.js +9 -0
  55. package/dist/chunk-T6IDXUUA.js +2 -0
  56. package/dist/chunk-TYWB5IQJ.js +3 -0
  57. package/dist/chunk-UIKLE3WD.js +2 -0
  58. package/dist/chunk-V7K6CQVX.js +111 -0
  59. package/dist/chunk-VCKKJDLP.js +8 -0
  60. package/dist/chunk-VG7FN2TU.js +4 -0
  61. package/dist/chunk-W5IWDW4Y.js +16 -0
  62. package/dist/chunk-W7C6FFMO.js +8 -0
  63. package/dist/chunk-WESTEMIM.js +10 -0
  64. package/dist/chunk-WR6D3SC6.js +5 -0
  65. package/dist/chunk-WS2N27RX.js +3 -0
  66. package/dist/chunk-XMAV5AG6.js +2 -0
  67. package/dist/chunk-XROULIQN.js +2 -0
  68. package/dist/chunk-XUFYOXOU.js +3 -0
  69. package/dist/chunk-Y4XFVDZC.js +3 -0
  70. package/dist/chunk-Y6KXTQBG.js +2 -0
  71. package/dist/{chunk-GTR2TBIJ.js → chunk-Z2UZUCY6.js} +237 -1047
  72. package/dist/chunk-Z34K6GY2.js +8 -0
  73. package/dist/claude-4LR3LJQZ.js +13 -0
  74. package/dist/claude-cli-UP6HGH7C.js +6 -0
  75. package/dist/claude-code-RLJ4GX77.js +11 -0
  76. package/dist/claude-code-teams-R37HJY3Y.js +29 -0
  77. package/dist/commands-LMUD5L6R.js +455 -0
  78. package/dist/compliance-GZ7UAOG3.js +6 -0
  79. package/dist/conductor-Y5IXELTL.js +4 -0
  80. package/dist/config-schema-HR7LDEQ6.js +2 -0
  81. package/dist/constellation-CG7C4WFE.js +13 -0
  82. package/dist/context-audit-RSSRX6XC.js +6 -0
  83. package/dist/cost-IDNVMAEV.js +10 -0
  84. package/dist/cost-PK4KIF7R.js +2 -0
  85. package/dist/cursor-cli-QKF7Z6M2.js +4 -0
  86. package/dist/cursorrules-U5O4G5T4.js +14 -0
  87. package/dist/decision-loader-2XPZE4EZ.js +2 -0
  88. package/dist/delete-P5VULXR4.js +14 -0
  89. package/dist/diff-RTFUKJHF.js +9 -0
  90. package/dist/discipline-H7LDI6NT.js +2 -0
  91. package/dist/dist-3ZCH25SG.js +2 -0
  92. package/dist/dist-KGRCLBJP-2QAPFYNF.js +39 -0
  93. package/dist/dist-R3RWD35F.js +2 -0
  94. package/dist/dist-VGFSP3XM.js +2 -0
  95. package/dist/dist-VXCZWVVJ.js +2 -0
  96. package/dist/dist-W3XCATBJ.js +2 -0
  97. package/dist/docs-EDQ2STFK.js +2 -0
  98. package/dist/docs-RXPN6CK7.js +12 -0
  99. package/dist/doctor-2T2QL6VM.js +2 -0
  100. package/dist/drift-ILZE5BFJ.js +13 -0
  101. package/dist/echo-UPTQUEDU.js +46 -0
  102. package/dist/edit-GUU3HBVW.js +9 -0
  103. package/dist/event-Y3VXC2RV.js +3 -0
  104. package/dist/explain-files-3GPZUETV.js +4 -0
  105. package/dist/export-CV5KCTPS.js +2 -0
  106. package/dist/flow-S3RQ4YPY.js +11 -0
  107. package/dist/global-C44FW4G2.js +13 -0
  108. package/dist/graduate-3BBSC27A.js +5 -0
  109. package/dist/graph-CNDE5TAT.js +2 -0
  110. package/dist/graph-server-COZR5C3Z.js +14 -0
  111. package/dist/habits-4J2KRYUL.js +42 -0
  112. package/dist/history-UW454SDP.js +12 -0
  113. package/dist/hooks-XH52VGOU.js +2 -0
  114. package/dist/index.js +15 -1039
  115. package/dist/init-24MAQJFM.js +2 -0
  116. package/dist/integrity-UYDOOJDP.js +7 -0
  117. package/dist/integrity-checker-DHGMZQDG.js +2 -0
  118. package/dist/journal-loader-GLH7XFTK.js +2 -0
  119. package/dist/lint-IGKE6UPS.js +26 -0
  120. package/dist/list-5IUGP3ZB.js +7 -0
  121. package/dist/list-YKIQNKGB.js +6 -0
  122. package/dist/lore-loader-RVQI5GXL.js +2 -0
  123. package/dist/lore-loader-XY5MZRR2.js +2 -0
  124. package/dist/lore-server-FC2GMDLT.js +14 -0
  125. package/dist/manual-RXSPSFLL.js +20 -0
  126. package/dist/mcp.js +93 -20529
  127. package/dist/migrate-X5OMAFAQ.js +59 -0
  128. package/dist/migrate-assessments-GEI5WMI2.js +4 -0
  129. package/dist/model-discovery-HMB3YI4L.js +2 -0
  130. package/dist/nomination-engine-XF7TWPAP.js +2 -0
  131. package/dist/notebook-PE3JSYZI.js +11 -0
  132. package/dist/notebook-loader-CENTDDUJ.js +2 -0
  133. package/dist/orchestrate-35HBQ3O3.js +8 -0
  134. package/dist/peers-P2KXU7ZK.js +5 -0
  135. package/dist/persona-STQWZH5P.js +29 -0
  136. package/dist/pipeline-MZUITRVN.js +4 -0
  137. package/dist/platform-server-2KXHGHFV.js +25 -0
  138. package/dist/plugin-update-checker-M7PW434O.js +2 -0
  139. package/dist/portal-check-3JVNLOEP.js +8 -0
  140. package/dist/portal-compliance-2UG4VKWH.js +2 -0
  141. package/dist/probe-5L5BQDGE.js +6 -0
  142. package/dist/project-type-SURTOIG7.js +2 -0
  143. package/dist/promote-NJQDZBZA.js +8 -0
  144. package/dist/providers-4PXMWA7V.js +8 -0
  145. package/dist/quiz-FE5UGAY2.js +10 -0
  146. package/dist/record-YXPB34MY.js +6 -0
  147. package/dist/reindex-PGDQSM42.js +2 -0
  148. package/dist/remember-MJRNTXYS.js +14 -0
  149. package/dist/retag-N5XF3KXP.js +6 -0
  150. package/dist/review-6UAH6V3R.js +11 -0
  151. package/dist/review-77QI6VOC.js +6 -0
  152. package/dist/ripple-ZGDITCGB.js +10 -0
  153. package/dist/roster-FLRZ5J42.js +2 -0
  154. package/dist/sentinel-HYAZ3CO5.js +19 -0
  155. package/dist/sentinel-bridge-VR357PKL.js +2 -0
  156. package/dist/sentinel-mcp.js +38 -3808
  157. package/dist/sentinel.js +1 -34
  158. package/dist/serve-JE6UF5P2.js +8 -0
  159. package/dist/serve-L52ZUTU6.js +10 -0
  160. package/dist/serve-OY6XYL7F.js +12 -0
  161. package/dist/server-2MNROHF6.js +7 -0
  162. package/dist/server-4YNUIK4W.js +8 -0
  163. package/dist/session-tracker-SKOMBDOW.js +2 -0
  164. package/dist/session-work-log-3MNUDEZ6.js +2 -0
  165. package/dist/session-work-log-J2H5OZBR.js +2 -0
  166. package/dist/setup-3F5IK7MO.js +31 -0
  167. package/dist/setup-KPIMRZ4Q.js +2 -0
  168. package/dist/shift-6GCNH666.js +11 -0
  169. package/dist/show-BOAVWZPZ.js +7 -0
  170. package/dist/show-PJ5LFLIL.js +5 -0
  171. package/dist/snapshot-L2G56RPL.js +8 -0
  172. package/dist/spawn-UH5RENSE.js +12 -0
  173. package/dist/status-77M3SDIF.js +8 -0
  174. package/dist/status-A37ECYNJ.js +6 -0
  175. package/dist/summary-ZJLQ6KHB.js +7 -0
  176. package/dist/sweep-HU74OPVW.js +17 -0
  177. package/dist/switch-CTW4PDGI.js +17 -0
  178. package/dist/symphony-3QMBGCZY.js +2 -0
  179. package/dist/symphony-QI63XL62.js +53 -0
  180. package/dist/symphony-loader-XACVV2E3.js +2 -0
  181. package/dist/symphony-peers-U4KHMKGI.js +2 -0
  182. package/dist/symphony-peers-X5NGWXFP.js +2 -0
  183. package/dist/symphony-relay-5GY5JIPT.js +3 -0
  184. package/dist/sync-QRDSFETO.js +2 -0
  185. package/dist/sync-llms-HL5PPW3M.js +15 -0
  186. package/dist/task-loader-NZFDTUQ5.js +2 -0
  187. package/dist/team-WGERKGNP.js +2 -0
  188. package/dist/test-BQJMS4Y2.js +111 -0
  189. package/dist/thread-HFXK65D4.js +41 -0
  190. package/dist/timeline-K3ZFKJ3R.js +6 -0
  191. package/dist/triage-FCWOZASE.js +18 -0
  192. package/dist/tutorial-UC6YQMNN.js +305 -0
  193. package/dist/university-content/courses/.purpose +74 -5
  194. package/dist/university-content/plsat/.purpose +3 -2
  195. package/dist/university-ui/assets/{index-BjewBB6s.js → index-CGFJczb1.js} +2 -2
  196. package/dist/university-ui/assets/{index-BjewBB6s.js.map → index-CGFJczb1.js.map} +1 -1
  197. package/dist/university-ui/index.html +1 -1
  198. package/dist/upgrade-B4IOLZYK.js +53 -0
  199. package/dist/validate-C6SMKGYD.js +9 -0
  200. package/dist/validate-LSCDOLBO.js +13 -0
  201. package/dist/validate-VZXTJHGO.js +6 -0
  202. package/dist/watch-LRM5XD46.js +8 -0
  203. package/dist/watch-PZCCUP6K.js +9 -0
  204. package/dist/wisdom-XZ3QKPNP.js +7 -0
  205. package/dist/work-log-loader-DL5GZ2BQ.js +2 -0
  206. package/dist/workspace-2ODL5WLY.js +2 -0
  207. package/package.json +1 -1
  208. package/platform-ui/dist/assets/AmbientSection-DqQ2mfCO.js +1 -0
  209. package/platform-ui/dist/assets/{CanvasSection-DwPTRdIN.js → CanvasSection-DLW0s-Bu.js} +1 -1
  210. package/platform-ui/dist/assets/{DocsSection-BJc_ws4I.js → DocsSection-BQ9Hi51g.js} +1 -1
  211. package/platform-ui/dist/assets/{GitSection-DhqBo1xc.js → GitSection-QQeUX6o3.js} +1 -1
  212. package/platform-ui/dist/assets/{GraphSection-D9fhVnZ0.js → GraphSection-0c9C-w7K.js} +2 -2
  213. package/platform-ui/dist/assets/{GraphSection-BlgXTl53.css → GraphSection-Bbs2a8sC.css} +1 -1
  214. package/platform-ui/dist/assets/LoreSection--t56kCj2.js +1 -0
  215. package/platform-ui/dist/assets/LoreSection-qnmm3o4y.css +1 -0
  216. package/platform-ui/dist/assets/SentinelSection-C4OoME9U.js +1 -0
  217. package/platform-ui/dist/assets/{SymphonySection-BRoBaUSS.js → SymphonySection-B-rvsLxq.js} +1 -1
  218. package/platform-ui/dist/assets/TeamSection-CBFmNEEo.js +1 -0
  219. package/platform-ui/dist/assets/index-Bxp0TVaf.css +1 -0
  220. package/platform-ui/dist/assets/index-DPpOdAtC.js +57 -0
  221. package/platform-ui/dist/index.html +2 -2
  222. package/dist/accept-orchestration-UQLM7PTQ.js +0 -189
  223. package/dist/add-FZRKEGH4.js +0 -81
  224. package/dist/agent-WERIO2XV.js +0 -523
  225. package/dist/agent-loader-TFIANSF4.js +0 -44
  226. package/dist/agent-state-S5DAWPTF.js +0 -24
  227. package/dist/agents-suggest-DNSYJ6IA.js +0 -83
  228. package/dist/aggregate-H57K7PNV.js +0 -88
  229. package/dist/assess-4WVXZLZQ.js +0 -68
  230. package/dist/auto-QFS5NHQU.js +0 -504
  231. package/dist/beacon-KXZXYQHX.js +0 -251
  232. package/dist/calibration-V46G7JTY.js +0 -135
  233. package/dist/check-OWAIWV23.js +0 -175
  234. package/dist/chunk-2IO7JAG2.js +0 -148
  235. package/dist/chunk-2T6BTYBN.js +0 -712
  236. package/dist/chunk-36TKPM5Z.js +0 -400
  237. package/dist/chunk-45MUDW6E.js +0 -804
  238. package/dist/chunk-4BLYIB7J.js +0 -5701
  239. package/dist/chunk-4L3UTYQX.js +0 -677
  240. package/dist/chunk-4NCFWYGG.js +0 -110
  241. package/dist/chunk-54LTTQBH.js +0 -138
  242. package/dist/chunk-5EWAQHFY.js +0 -269
  243. package/dist/chunk-5JGJACDU.js +0 -37
  244. package/dist/chunk-5OUOLN6M.js +0 -659
  245. package/dist/chunk-5VKJBNJL.js +0 -444
  246. package/dist/chunk-6N3JTACN.js +0 -2260
  247. package/dist/chunk-6QC3YGB6.js +0 -114
  248. package/dist/chunk-7N7GSU6K.js +0 -34
  249. package/dist/chunk-ABVQGRF7.js +0 -268
  250. package/dist/chunk-CL7JSK52.js +0 -129
  251. package/dist/chunk-CSD7IHSN.js +0 -152
  252. package/dist/chunk-EDOAWN7J.js +0 -717
  253. package/dist/chunk-EKGMAM62.js +0 -525
  254. package/dist/chunk-EZ3GOCYC.js +0 -132
  255. package/dist/chunk-F3BCHPYT.js +0 -143
  256. package/dist/chunk-FKJUBQU3.js +0 -3081
  257. package/dist/chunk-GT5QGC2H.js +0 -253
  258. package/dist/chunk-GZDFVP2N.js +0 -540
  259. package/dist/chunk-IRKUEJVW.js +0 -405
  260. package/dist/chunk-J2JEQRT3.js +0 -164
  261. package/dist/chunk-JASGXLK3.js +0 -679
  262. package/dist/chunk-KVDYJLTC.js +0 -121
  263. package/dist/chunk-L27I3CPZ.js +0 -357
  264. package/dist/chunk-LHLIAYQ3.js +0 -185
  265. package/dist/chunk-MCMOGQMU.js +0 -145
  266. package/dist/chunk-NQKQG45G.js +0 -688
  267. package/dist/chunk-PBHIFAL4.js +0 -259
  268. package/dist/chunk-PDX44BCA.js +0 -11
  269. package/dist/chunk-PMXRGPRQ.js +0 -305
  270. package/dist/chunk-RAB5IKPR.js +0 -487
  271. package/dist/chunk-RJE5G7WO.js +0 -590
  272. package/dist/chunk-RTHA3XRE.js +0 -880
  273. package/dist/chunk-S2HO5MLR.js +0 -621
  274. package/dist/chunk-S3ORKP3V.js +0 -716
  275. package/dist/chunk-TAIJOFOE.js +0 -124
  276. package/dist/chunk-TXESEO7Y.js +0 -245
  277. package/dist/chunk-UPLDI7CN.js +0 -1334
  278. package/dist/chunk-VL67H5IC.js +0 -506
  279. package/dist/chunk-VPPK3SY4.js +0 -1136
  280. package/dist/chunk-YMDLDELF.js +0 -314
  281. package/dist/chunk-YO6DVTL7.js +0 -99
  282. package/dist/chunk-YRZ5RPEB.js +0 -1561
  283. package/dist/chunk-ZDHLG5VP.js +0 -5676
  284. package/dist/chunk-ZGUAAVMA.js +0 -756
  285. package/dist/chunk-ZSYVKSY6.js +0 -2602
  286. package/dist/claude-FRRWJSTJ.js +0 -362
  287. package/dist/claude-cli-XJLK2X4L.js +0 -276
  288. package/dist/claude-code-HTBA4XRB.js +0 -126
  289. package/dist/claude-code-teams-T4SP24MD.js +0 -199
  290. package/dist/commands-5N4ILTPH.js +0 -5859
  291. package/dist/conductor-CQVGTEQN.js +0 -161
  292. package/dist/config-schema-EA4XALGG.js +0 -154
  293. package/dist/constellation-A26CCGQS.js +0 -225
  294. package/dist/context-audit-RLO3ETRP.js +0 -682
  295. package/dist/cost-BGM32XJU.js +0 -93
  296. package/dist/cost-VI46A4XL.js +0 -174
  297. package/dist/cursor-cli-JVEZGHWQ.js +0 -269
  298. package/dist/cursorrules-HLIKJJZT.js +0 -84
  299. package/dist/decision-loader-WWCLIQPJ.js +0 -20
  300. package/dist/delete-KBRPQLPC.js +0 -56
  301. package/dist/diff-D4X53HAC.js +0 -126
  302. package/dist/discipline-FA4OZXIS.js +0 -24
  303. package/dist/dist-34NA5RS5.js +0 -74
  304. package/dist/dist-5QE2BB2B-5S3T6Y3T.js +0 -6919
  305. package/dist/dist-77JDTVAY.js +0 -62
  306. package/dist/dist-OGTSAZ55.js +0 -1358
  307. package/dist/dist-QK4SQAK7.js +0 -64
  308. package/dist/dist-TA6LSC2Q.js +0 -20
  309. package/dist/docs-PBZB7LYP.js +0 -89
  310. package/dist/docs-QIYKO3BR.js +0 -155
  311. package/dist/doctor-ULBOHEIC.js +0 -11
  312. package/dist/drift-R5NRKFHI.js +0 -251
  313. package/dist/echo-O2LY7CC2.js +0 -248
  314. package/dist/edit-R2HNLMOG.js +0 -63
  315. package/dist/event-25OJKDCE.js +0 -31
  316. package/dist/export-IWVL7XLF.js +0 -38
  317. package/dist/flow-CRRVV3O3.js +0 -185
  318. package/dist/global-3NG5JXUB.js +0 -136
  319. package/dist/graduate-USAWGBJM.js +0 -160
  320. package/dist/graph-VHUMAAS6.js +0 -12
  321. package/dist/graph-server-YL22VBBN.js +0 -116
  322. package/dist/habits-OL5NGPXO.js +0 -1405
  323. package/dist/history-WOWC573W.js +0 -277
  324. package/dist/hooks-HFWSCGPV.js +0 -12
  325. package/dist/integrity-IHO4FZTS.js +0 -194
  326. package/dist/integrity-checker-PSKJA5SB.js +0 -12
  327. package/dist/journal-loader-5EYSBFFY.js +0 -18
  328. package/dist/lint-K6CJGGPH.js +0 -456
  329. package/dist/list-4YK7QKFF.js +0 -57
  330. package/dist/list-ENR7Q4CR.js +0 -56
  331. package/dist/lore-loader-7NO6N6FT.js +0 -26
  332. package/dist/lore-server-UNJY5KC3.js +0 -118
  333. package/dist/manual-G6FISID5.js +0 -204
  334. package/dist/migrate-LS45DNEV.js +0 -889
  335. package/dist/migrate-assessments-RGH4O6IX.js +0 -97
  336. package/dist/model-discovery-D2H3VBGC.js +0 -8
  337. package/dist/nomination-engine-RV5CNO5B.js +0 -42
  338. package/dist/notebook-YWIYGEHV.js +0 -155
  339. package/dist/orchestrate-JLILBBJE.js +0 -324
  340. package/dist/peers-DEOUIZM6.js +0 -82
  341. package/dist/persona-UHAHIVST.js +0 -390
  342. package/dist/pipeline-L4HCSBGN.js +0 -263
  343. package/dist/platform-server-H5YO3DQD.js +0 -1475
  344. package/dist/plugin-update-checker-KRRSGXMV.js +0 -12
  345. package/dist/portal-check-NPYGII2D.js +0 -42
  346. package/dist/portal-compliance-J7DGAPFX.js +0 -18
  347. package/dist/probe-MHL5HQZ2.js +0 -167
  348. package/dist/promote-F6ZYZZAL.js +0 -182
  349. package/dist/providers-GK7PB2OL.js +0 -104
  350. package/dist/quiz-M66SC7F7.js +0 -99
  351. package/dist/record-RA4WR2BO.js +0 -49
  352. package/dist/reindex-5LTD53ZC.js +0 -16
  353. package/dist/remember-HBWJ655S.js +0 -77
  354. package/dist/retag-3OLCVDEQ.js +0 -62
  355. package/dist/review-27ATYTD2.js +0 -33
  356. package/dist/review-57QMURZV.js +0 -334
  357. package/dist/ripple-JPBXP5I3.js +0 -215
  358. package/dist/sentinel-4XIG4STA.js +0 -63
  359. package/dist/sentinel-bridge-MDUXTQRL.js +0 -109
  360. package/dist/serve-CAH3PHE7.js +0 -33
  361. package/dist/serve-INL7SNBK.js +0 -36
  362. package/dist/serve-KBSE36PL.js +0 -49
  363. package/dist/server-54SKYFFY.js +0 -1647
  364. package/dist/server-XUOIO7E6.js +0 -338
  365. package/dist/session-tracker-C4BMD5WG.js +0 -13
  366. package/dist/session-work-log-MZ47OAPB.js +0 -20
  367. package/dist/setup-EDS27WUR.js +0 -25
  368. package/dist/setup-KO5AFC4K.js +0 -296
  369. package/dist/shift-D2JOHHBF.js +0 -668
  370. package/dist/show-5PV5KFJE.js +0 -176
  371. package/dist/show-NQKYX6WQ.js +0 -82
  372. package/dist/snapshot-BK4RBPCG.js +0 -62
  373. package/dist/spawn-RCHNXDHE.js +0 -196
  374. package/dist/status-WGIAQODY.js +0 -71
  375. package/dist/summary-NIRABMF5.js +0 -140
  376. package/dist/sweep-QMHNSIY5.js +0 -934
  377. package/dist/switch-6EJPZDIA.js +0 -232
  378. package/dist/symphony-4OCY36AI.js +0 -791
  379. package/dist/symphony-B75X2MME.js +0 -326
  380. package/dist/symphony-loader-UZGON56V.js +0 -90
  381. package/dist/symphony-peers-2ZQYLRNI.js +0 -34
  382. package/dist/symphony-peers-OL7F6M5S.js +0 -121
  383. package/dist/symphony-relay-UJYUXN65.js +0 -710
  384. package/dist/sync-VEHUH4OA.js +0 -11
  385. package/dist/sync-llms-YHCFIE6X.js +0 -166
  386. package/dist/task-loader-LDYWQSLM.js +0 -20
  387. package/dist/team-O5MIIFMA.js +0 -34
  388. package/dist/test-566CP5KC.js +0 -1017
  389. package/dist/thread-N754I4D5.js +0 -274
  390. package/dist/timeline-M3CICQFE.js +0 -112
  391. package/dist/triage-HHYGT3HY.js +0 -671
  392. package/dist/tutorial-KD22SUNO.js +0 -666
  393. package/dist/upgrade-H5PF32BW.js +0 -551
  394. package/dist/validate-CNKEKO6A.js +0 -134
  395. package/dist/validate-MB5ULIHS.js +0 -39
  396. package/dist/validate-QH3LADM6.js +0 -64
  397. package/dist/watch-2TKP5PVL.js +0 -199
  398. package/dist/watch-ZF4ML6CD.js +0 -111
  399. package/dist/wisdom-AATMGNFA.js +0 -319
  400. package/dist/work-log-loader-5L45XNYZ.js +0 -14
  401. package/dist/workspace-6E6OSRNU.js +0 -21
  402. package/platform-ui/dist/assets/AmbientSection-WtHfNedO.js +0 -1
  403. package/platform-ui/dist/assets/LoreSection-C3EixkjW.css +0 -1
  404. package/platform-ui/dist/assets/LoreSection-CwDDHrz9.js +0 -1
  405. package/platform-ui/dist/assets/SentinelSection-Cl7e5oZ6.js +0 -1
  406. package/platform-ui/dist/assets/TeamSection-CqSIMrKz.js +0 -1
  407. package/platform-ui/dist/assets/index-CfpZFjea.css +0 -1
  408. package/platform-ui/dist/assets/index-F0KL9xrN.js +0 -57
@@ -1,677 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- init_session_work_log,
4
- session_work_log_exports
5
- } from "./chunk-CL7JSK52.js";
6
- import {
7
- __toCommonJS
8
- } from "./chunk-7N7GSU6K.js";
9
-
10
- // ../paradigm-mcp/src/utils/session-tracker.ts
11
- import * as fs2 from "fs";
12
- import * as path2 from "path";
13
-
14
- // ../paradigm-mcp/src/utils/global-store.ts
15
- import * as fs from "fs";
16
- import * as path from "path";
17
- import * as os from "os";
18
- import * as crypto from "crypto";
19
- import * as yaml from "js-yaml";
20
- function getGlobalDir() {
21
- const dir = path.join(os.homedir(), ".paradigm");
22
- if (!fs.existsSync(dir)) {
23
- fs.mkdirSync(dir, { recursive: true });
24
- }
25
- return dir;
26
- }
27
- function getProjectHash(rootDir) {
28
- const absolute = path.resolve(rootDir);
29
- return crypto.createHash("sha256").update(absolute).digest("hex").slice(0, 12);
30
- }
31
- function getSessionDir(rootDir) {
32
- const hash = getProjectHash(rootDir);
33
- const dir = path.join(getGlobalDir(), "sessions", hash);
34
- if (!fs.existsSync(dir)) {
35
- fs.mkdirSync(dir, { recursive: true });
36
- }
37
- const handoffsDir = path.join(dir, "pending-handoffs");
38
- if (!fs.existsSync(handoffsDir)) {
39
- fs.mkdirSync(handoffsDir, { recursive: true });
40
- }
41
- return dir;
42
- }
43
- function writeProjectMeta(rootDir) {
44
- const sessionDir = getSessionDir(rootDir);
45
- const metaPath = path.join(sessionDir, "_project-meta.json");
46
- const projectName = path.basename(path.resolve(rootDir));
47
- const meta = {
48
- name: projectName,
49
- path: path.resolve(rootDir),
50
- lastSeen: (/* @__PURE__ */ new Date()).toISOString()
51
- };
52
- fs.writeFileSync(metaPath, JSON.stringify(meta, null, 2));
53
- }
54
- function writePendingHandoff(rootDir, handoff) {
55
- const sessionDir = getSessionDir(rootDir);
56
- const filePath = path.join(sessionDir, "pending-handoffs", `${handoff.id}.json`);
57
- fs.writeFileSync(filePath, JSON.stringify(handoff, null, 2));
58
- }
59
- function loadPendingHandoffs(rootDir) {
60
- const sessionDir = getSessionDir(rootDir);
61
- const handoffsDir = path.join(sessionDir, "pending-handoffs");
62
- if (!fs.existsSync(handoffsDir)) {
63
- return [];
64
- }
65
- const handoffs = [];
66
- try {
67
- const files = fs.readdirSync(handoffsDir);
68
- for (const file of files) {
69
- if (!file.endsWith(".json")) continue;
70
- try {
71
- const content = fs.readFileSync(path.join(handoffsDir, file), "utf8");
72
- const handoff = JSON.parse(content);
73
- if (handoff.status === "pending") {
74
- handoffs.push(handoff);
75
- }
76
- } catch {
77
- }
78
- }
79
- } catch {
80
- }
81
- handoffs.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
82
- return handoffs;
83
- }
84
- function markHandoffDelivered(rootDir, handoffId) {
85
- const sessionDir = getSessionDir(rootDir);
86
- const filePath = path.join(sessionDir, "pending-handoffs", `${handoffId}.json`);
87
- if (!fs.existsSync(filePath)) return;
88
- try {
89
- const content = fs.readFileSync(filePath, "utf8");
90
- const handoff = JSON.parse(content);
91
- handoff.status = "delivered";
92
- fs.writeFileSync(filePath, JSON.stringify(handoff, null, 2));
93
- } catch {
94
- }
95
- }
96
- function getGlobalWisdomDir() {
97
- const dir = path.join(getGlobalDir(), "wisdom");
98
- if (!fs.existsSync(dir)) {
99
- fs.mkdirSync(dir, { recursive: true });
100
- }
101
- return dir;
102
- }
103
- function loadGlobalAntipatterns() {
104
- const filePath = path.join(getGlobalWisdomDir(), "antipatterns.yaml");
105
- if (!fs.existsSync(filePath)) return [];
106
- try {
107
- const content = fs.readFileSync(filePath, "utf8");
108
- const data = yaml.load(content);
109
- return data?.antipatterns || [];
110
- } catch {
111
- return [];
112
- }
113
- }
114
- function loadGlobalDecisions() {
115
- const decisionsDir = path.join(getGlobalWisdomDir(), "decisions");
116
- if (!fs.existsSync(decisionsDir)) return [];
117
- const decisions = [];
118
- try {
119
- const files = fs.readdirSync(decisionsDir);
120
- for (const file of files) {
121
- if (!file.endsWith(".yaml") && !file.endsWith(".yml")) continue;
122
- try {
123
- const content = fs.readFileSync(path.join(decisionsDir, file), "utf8");
124
- const decision = yaml.load(content);
125
- decisions.push(decision);
126
- } catch {
127
- }
128
- }
129
- } catch {
130
- }
131
- decisions.sort((a, b) => a.id.localeCompare(b.id));
132
- return decisions;
133
- }
134
- function loadGlobalPreferences() {
135
- const filePath = path.join(getGlobalWisdomDir(), "preferences.yaml");
136
- if (!fs.existsSync(filePath)) return null;
137
- try {
138
- const content = fs.readFileSync(filePath, "utf8");
139
- return yaml.load(content);
140
- } catch {
141
- return null;
142
- }
143
- }
144
- function recordGlobalAntipattern(antipattern) {
145
- const filePath = path.join(getGlobalWisdomDir(), "antipatterns.yaml");
146
- let data = { version: "1.0", antipatterns: [] };
147
- if (fs.existsSync(filePath)) {
148
- try {
149
- const content = fs.readFileSync(filePath, "utf8");
150
- data = yaml.load(content);
151
- if (!data.antipatterns) data.antipatterns = [];
152
- } catch {
153
- }
154
- }
155
- data.antipatterns.push({
156
- ...antipattern,
157
- added: (/* @__PURE__ */ new Date()).toISOString()
158
- });
159
- fs.writeFileSync(filePath, yaml.dump(data, { lineWidth: -1 }));
160
- }
161
- function recordGlobalDecision(decision) {
162
- const decisionsDir = path.join(getGlobalWisdomDir(), "decisions");
163
- if (!fs.existsSync(decisionsDir)) {
164
- fs.mkdirSync(decisionsDir, { recursive: true });
165
- }
166
- const slug = decision.title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
167
- const fileName = `${decision.id}-${slug}.yaml`;
168
- const filePath = path.join(decisionsDir, fileName);
169
- fs.writeFileSync(filePath, yaml.dump(decision, { lineWidth: -1 }));
170
- }
171
-
172
- // ../paradigm-mcp/src/utils/session-tracker.ts
173
- var MODEL_PRICING = {
174
- "claude-opus-4": { input: 15, output: 75, name: "Claude Opus 4" },
175
- "claude-sonnet-4": { input: 3, output: 15, name: "Claude Sonnet 4" },
176
- "claude-haiku-3.5": { input: 0.8, output: 4, name: "Claude Haiku 3.5" }
177
- };
178
- var MAX_BREADCRUMBS = 50;
179
- var BREADCRUMBS_FILE = ".paradigm/session-breadcrumbs.json";
180
- var CHECKPOINT_FILE = ".paradigm/session-checkpoint.json";
181
- var CHECKPOINT_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
182
- var SessionTracker = class {
183
- session;
184
- rootDir = null;
185
- _recovered = false;
186
- lastLoreEntryId = null;
187
- constructor() {
188
- this.session = this.createNewSession();
189
- }
190
- /**
191
- * Set the project root directory (for persisting breadcrumbs)
192
- */
193
- setRootDir(rootDir) {
194
- this.rootDir = rootDir;
195
- try {
196
- const { clearSessionWorkLog } = (init_session_work_log(), __toCommonJS(session_work_log_exports));
197
- clearSessionWorkLog(rootDir);
198
- } catch {
199
- }
200
- }
201
- createNewSession() {
202
- return {
203
- sessionId: `s${Date.now().toString(36)}`,
204
- startTime: Date.now(),
205
- lastActivity: Date.now(),
206
- model: "claude-sonnet-4",
207
- resourceReads: [],
208
- toolCalls: [],
209
- breadcrumbs: [],
210
- totals: {
211
- resourceReadCount: 0,
212
- toolCallCount: 0,
213
- totalBytes: 0,
214
- totalTokens: 0,
215
- estimatedCostUsd: 0
216
- }
217
- };
218
- }
219
- /**
220
- * Add a breadcrumb (summarized action for session recovery)
221
- */
222
- addBreadcrumb(action, summary, options = {}) {
223
- this.session.breadcrumbs.push({
224
- timestamp: Date.now(),
225
- action,
226
- tool: options.tool,
227
- symbol: options.symbol,
228
- summary
229
- });
230
- if (this.session.breadcrumbs.length > MAX_BREADCRUMBS) {
231
- this.session.breadcrumbs = this.session.breadcrumbs.slice(-MAX_BREADCRUMBS);
232
- }
233
- this.persistBreadcrumbs();
234
- }
235
- /**
236
- * Get recent breadcrumbs
237
- */
238
- getBreadcrumbs(limit = 20) {
239
- return this.session.breadcrumbs.slice(-limit);
240
- }
241
- /**
242
- * Persist breadcrumbs to file (dual-write: local + global)
243
- */
244
- persistBreadcrumbs() {
245
- if (!this.rootDir) return;
246
- const data = {
247
- sessionId: this.session.sessionId,
248
- startTime: this.session.startTime,
249
- lastActivity: this.session.lastActivity,
250
- breadcrumbs: this.session.breadcrumbs,
251
- symbolsModified: this.extractSymbolsFromBreadcrumbs(),
252
- filesExplored: this.extractFilesFromBreadcrumbs()
253
- };
254
- let jsonData;
255
- try {
256
- jsonData = JSON.stringify(data, null, 2);
257
- } catch (err) {
258
- console.error("[paradigm-mcp] persistBreadcrumbs: JSON.stringify failed:", err.message);
259
- return;
260
- }
261
- try {
262
- const filePath = path2.join(this.rootDir, BREADCRUMBS_FILE);
263
- const dir = path2.dirname(filePath);
264
- if (!fs2.existsSync(dir)) {
265
- fs2.mkdirSync(dir, { recursive: true });
266
- }
267
- fs2.writeFileSync(filePath, jsonData);
268
- } catch (err) {
269
- console.error("[paradigm-mcp] persistBreadcrumbs: local write failed:", err.message);
270
- }
271
- try {
272
- const globalSessionDir = getSessionDir(this.rootDir);
273
- fs2.writeFileSync(path2.join(globalSessionDir, "breadcrumbs.json"), jsonData);
274
- writeProjectMeta(this.rootDir);
275
- } catch (err) {
276
- console.error("[paradigm-mcp] persistBreadcrumbs: global write failed:", err.message);
277
- }
278
- }
279
- /**
280
- * Load previous session breadcrumbs from file.
281
- * Prefers global path (~/.paradigm/sessions/{hash}/breadcrumbs.json),
282
- * falls back to local (.paradigm/session-breadcrumbs.json).
283
- */
284
- loadPreviousSession() {
285
- if (!this.rootDir) return null;
286
- try {
287
- const globalSessionDir = getSessionDir(this.rootDir);
288
- const globalPath = path2.join(globalSessionDir, "breadcrumbs.json");
289
- if (fs2.existsSync(globalPath)) {
290
- const content = fs2.readFileSync(globalPath, "utf8");
291
- return JSON.parse(content);
292
- }
293
- } catch {
294
- }
295
- try {
296
- const filePath = path2.join(this.rootDir, BREADCRUMBS_FILE);
297
- if (!fs2.existsSync(filePath)) return null;
298
- const content = fs2.readFileSync(filePath, "utf8");
299
- return JSON.parse(content);
300
- } catch {
301
- return null;
302
- }
303
- }
304
- /**
305
- * Save a cognitive-transition checkpoint for crash recovery.
306
- * Fills in timestamp, sessionId, and snapshots recent breadcrumbs.
307
- * Returns the checkpoint and whether it was persisted to disk.
308
- */
309
- saveCheckpoint(data) {
310
- const checkpoint = {
311
- phase: data.phase,
312
- context: data.context,
313
- timestamp: Date.now(),
314
- sessionId: this.session.sessionId,
315
- externalId: data.externalId,
316
- plan: data.plan,
317
- modifiedFiles: data.modifiedFiles,
318
- symbolsTouched: data.symbolsTouched,
319
- decisions: data.decisions,
320
- recentBreadcrumbs: this.session.breadcrumbs.slice(-10)
321
- };
322
- const persisted = this.persistCheckpoint(checkpoint);
323
- return { checkpoint, persisted };
324
- }
325
- /**
326
- * Load the most recent checkpoint.
327
- * Prefers global path, falls back to local.
328
- * Returns null for checkpoints older than 7 days.
329
- */
330
- loadCheckpoint() {
331
- if (!this.rootDir) return null;
332
- let checkpoint = null;
333
- try {
334
- const globalSessionDir = getSessionDir(this.rootDir);
335
- const globalPath = path2.join(globalSessionDir, "checkpoint.json");
336
- if (fs2.existsSync(globalPath)) {
337
- const content = fs2.readFileSync(globalPath, "utf8");
338
- checkpoint = JSON.parse(content);
339
- }
340
- } catch {
341
- }
342
- if (!checkpoint) {
343
- try {
344
- const localPath = path2.join(this.rootDir, CHECKPOINT_FILE);
345
- if (fs2.existsSync(localPath)) {
346
- const content = fs2.readFileSync(localPath, "utf8");
347
- checkpoint = JSON.parse(content);
348
- }
349
- } catch {
350
- }
351
- }
352
- if (checkpoint && Date.now() - checkpoint.timestamp > CHECKPOINT_MAX_AGE_MS) {
353
- return null;
354
- }
355
- if (checkpoint) {
356
- for (const key of ["modifiedFiles", "symbolsTouched", "decisions"]) {
357
- const val = checkpoint[key];
358
- if (typeof val === "string") {
359
- try {
360
- checkpoint[key] = JSON.parse(val);
361
- } catch {
362
- checkpoint[key] = [];
363
- }
364
- }
365
- }
366
- }
367
- return checkpoint;
368
- }
369
- /**
370
- * Persist checkpoint to both local and global paths.
371
- * Returns which writes succeeded so callers can report accurately.
372
- */
373
- persistCheckpoint(checkpoint) {
374
- const result = { local: false, global: false };
375
- if (!this.rootDir) {
376
- console.error("[paradigm-mcp] persistCheckpoint: rootDir not set, skipping write");
377
- return result;
378
- }
379
- let jsonData;
380
- try {
381
- jsonData = JSON.stringify(checkpoint, null, 2);
382
- } catch (err) {
383
- console.error("[paradigm-mcp] persistCheckpoint: JSON.stringify failed:", err.message);
384
- return result;
385
- }
386
- try {
387
- const filePath = path2.join(this.rootDir, CHECKPOINT_FILE);
388
- const dir = path2.dirname(filePath);
389
- if (!fs2.existsSync(dir)) {
390
- fs2.mkdirSync(dir, { recursive: true });
391
- }
392
- fs2.writeFileSync(filePath, jsonData);
393
- result.local = true;
394
- } catch (err) {
395
- console.error("[paradigm-mcp] persistCheckpoint: local write failed:", err.message);
396
- }
397
- try {
398
- const globalSessionDir = getSessionDir(this.rootDir);
399
- fs2.writeFileSync(path2.join(globalSessionDir, "checkpoint.json"), jsonData);
400
- writeProjectMeta(this.rootDir);
401
- result.global = true;
402
- } catch (err) {
403
- console.error("[paradigm-mcp] persistCheckpoint: global write failed:", err.message);
404
- }
405
- return result;
406
- }
407
- /**
408
- * Set the last lore entry ID recorded in this session
409
- */
410
- setLastLoreEntryId(id) {
411
- this.lastLoreEntryId = id;
412
- }
413
- /**
414
- * Get the last lore entry ID recorded in this session
415
- */
416
- getLastLoreEntryId() {
417
- return this.lastLoreEntryId;
418
- }
419
- /**
420
- * Check whether auto-recovery has already fired this session.
421
- */
422
- hasRecoveredThisSession() {
423
- return this._recovered;
424
- }
425
- /**
426
- * Mark that auto-recovery has fired (so it only fires once per session).
427
- */
428
- markRecovered() {
429
- this._recovered = true;
430
- }
431
- /**
432
- * Extract symbols from breadcrumbs
433
- */
434
- extractSymbolsFromBreadcrumbs() {
435
- const symbols = /* @__PURE__ */ new Set();
436
- for (const bc of this.session.breadcrumbs) {
437
- if (bc.symbol) symbols.add(bc.symbol);
438
- }
439
- return Array.from(symbols);
440
- }
441
- /**
442
- * Extract files from breadcrumbs
443
- */
444
- extractFilesFromBreadcrumbs() {
445
- const files = /* @__PURE__ */ new Set();
446
- for (const bc of this.session.breadcrumbs) {
447
- const matches = bc.summary.match(/\b[\w./]+\.(ts|js|tsx|jsx|py|go|rs|yaml|json|md)\b/g);
448
- if (matches) {
449
- for (const m of matches) {
450
- files.add(m);
451
- }
452
- }
453
- }
454
- return Array.from(files);
455
- }
456
- /**
457
- * Estimate tokens from text (approx 3.5 chars per token)
458
- */
459
- estimateTokens(text) {
460
- const len = typeof text === "number" ? text : text.length;
461
- return Math.ceil(len / 3.5);
462
- }
463
- /**
464
- * Calculate cost for tokens using current model pricing
465
- */
466
- calculateCost(tokens, isOutput = true) {
467
- const pricing = MODEL_PRICING[this.session.model];
468
- const rate = isOutput ? pricing.output : pricing.input;
469
- return tokens / 1e6 * rate;
470
- }
471
- /**
472
- * Set the model for cost calculations
473
- */
474
- setModel(model) {
475
- this.session.model = model;
476
- this.recalculateTotals();
477
- }
478
- /**
479
- * Get current model
480
- */
481
- getModel() {
482
- return this.session.model;
483
- }
484
- /**
485
- * Track a resource read
486
- */
487
- trackResourceRead(uri, bytes) {
488
- const resourceType = this.extractResourceType(uri);
489
- const tokens = this.estimateTokens(bytes);
490
- this.session.resourceReads.push({
491
- timestamp: Date.now(),
492
- resourceType,
493
- uri,
494
- bytes,
495
- tokens
496
- });
497
- this.session.lastActivity = Date.now();
498
- this.updateTotals(bytes, tokens);
499
- }
500
- /**
501
- * Track a tool call
502
- */
503
- trackToolCall(toolName, responseBytes) {
504
- const tokens = this.estimateTokens(responseBytes);
505
- this.session.toolCalls.push({
506
- timestamp: Date.now(),
507
- toolName,
508
- responseBytes,
509
- responseTokens: tokens
510
- });
511
- this.session.lastActivity = Date.now();
512
- this.updateTotals(responseBytes, tokens);
513
- }
514
- /**
515
- * Update running totals
516
- */
517
- updateTotals(bytes, tokens) {
518
- this.session.totals.resourceReadCount = this.session.resourceReads.length;
519
- this.session.totals.toolCallCount = this.session.toolCalls.length;
520
- this.session.totals.totalBytes += bytes;
521
- this.session.totals.totalTokens += tokens;
522
- this.session.totals.estimatedCostUsd = this.calculateCost(this.session.totals.totalTokens);
523
- }
524
- /**
525
- * Recalculate totals (used when model changes)
526
- */
527
- recalculateTotals() {
528
- this.session.totals.estimatedCostUsd = this.calculateCost(this.session.totals.totalTokens);
529
- }
530
- /**
531
- * Extract resource type from URI
532
- */
533
- extractResourceType(uri) {
534
- const path3 = uri.replace("paradigm://", "");
535
- const firstPart = path3.split("/")[0];
536
- return firstPart || "unknown";
537
- }
538
- /**
539
- * Get session statistics
540
- */
541
- getStats() {
542
- return { ...this.session };
543
- }
544
- /**
545
- * Get detailed cost breakdown
546
- */
547
- getCostBreakdown() {
548
- const resourcesByType = {};
549
- let resourceBytes = 0;
550
- let resourceTokens = 0;
551
- for (const read of this.session.resourceReads) {
552
- if (!resourcesByType[read.resourceType]) {
553
- resourcesByType[read.resourceType] = { count: 0, bytes: 0, tokens: 0 };
554
- }
555
- resourcesByType[read.resourceType].count++;
556
- resourcesByType[read.resourceType].bytes += read.bytes;
557
- resourcesByType[read.resourceType].tokens += read.tokens;
558
- resourceBytes += read.bytes;
559
- resourceTokens += read.tokens;
560
- }
561
- const toolsByName = {};
562
- let toolBytes = 0;
563
- let toolTokens = 0;
564
- for (const call of this.session.toolCalls) {
565
- if (!toolsByName[call.toolName]) {
566
- toolsByName[call.toolName] = { count: 0, bytes: 0, tokens: 0 };
567
- }
568
- toolsByName[call.toolName].count++;
569
- toolsByName[call.toolName].bytes += call.responseBytes;
570
- toolsByName[call.toolName].tokens += call.responseTokens;
571
- toolBytes += call.responseBytes;
572
- toolTokens += call.responseTokens;
573
- }
574
- const totalTokens = resourceTokens + toolTokens;
575
- const totalCost = this.calculateCost(totalTokens);
576
- return {
577
- model: MODEL_PRICING[this.session.model].name,
578
- modelId: this.session.model,
579
- pricing: MODEL_PRICING[this.session.model],
580
- resources: {
581
- count: this.session.resourceReads.length,
582
- bytes: resourceBytes,
583
- tokens: resourceTokens,
584
- costUsd: this.calculateCost(resourceTokens),
585
- byType: resourcesByType
586
- },
587
- tools: {
588
- count: this.session.toolCalls.length,
589
- bytes: toolBytes,
590
- tokens: toolTokens,
591
- costUsd: this.calculateCost(toolTokens),
592
- byName: toolsByName
593
- },
594
- total: {
595
- tokens: totalTokens,
596
- costUsd: totalCost
597
- }
598
- };
599
- }
600
- /**
601
- * Get handoff recommendation based on context usage
602
- */
603
- getHandoffRecommendation(contextWindowSize = 2e5, estimatedTotalTokens) {
604
- const mcpTokens = this.session.totals.totalTokens;
605
- const estimatedConversationOverhead = mcpTokens * 4;
606
- const totalEstimate = estimatedTotalTokens || mcpTokens + estimatedConversationOverhead;
607
- const usagePercent = Math.round(totalEstimate / contextWindowSize * 100);
608
- let recommendation;
609
- let message;
610
- if (usagePercent >= 85) {
611
- recommendation = "handoff-urgent";
612
- message = "Context is nearly full. Initiate handoff immediately to preserve session continuity.";
613
- } else if (usagePercent >= 70) {
614
- recommendation = "handoff-recommended";
615
- message = "Context usage is high. Consider initiating handoff soon to ensure smooth transition.";
616
- } else if (usagePercent >= 50) {
617
- recommendation = "consider-handoff";
618
- message = "Context usage is moderate. Plan a good stopping point for potential handoff.";
619
- } else {
620
- recommendation = "continue";
621
- message = "Context usage is healthy. Continue working.";
622
- }
623
- const signals = [];
624
- const durationMin = Math.round((Date.now() - this.session.startTime) / 6e4);
625
- const totalCalls = this.session.toolCalls.length + this.session.resourceReads.length;
626
- if (totalCalls > 50) {
627
- signals.push(`High number of MCP interactions (${totalCalls})`);
628
- }
629
- if (durationMin > 30) {
630
- signals.push(`Session duration >30 min (${durationMin} min)`);
631
- }
632
- if (this.session.totals.totalBytes > 5e5) {
633
- signals.push(`Large data volume (${Math.round(this.session.totals.totalBytes / 1024)}KB)`);
634
- }
635
- return { recommendation, message, usagePercent, signals };
636
- }
637
- /**
638
- * Get session duration in minutes
639
- */
640
- getDurationMinutes() {
641
- return Math.round((Date.now() - this.session.startTime) / 6e4);
642
- }
643
- /**
644
- * Reset session (for handoff or new session)
645
- */
646
- reset() {
647
- this.session = this.createNewSession();
648
- this._recovered = false;
649
- this.lastLoreEntryId = null;
650
- }
651
- };
652
- var tracker = null;
653
- function getSessionTracker() {
654
- if (!tracker) {
655
- tracker = new SessionTracker();
656
- }
657
- return tracker;
658
- }
659
- function resetSessionTracker() {
660
- if (tracker) {
661
- tracker.reset();
662
- }
663
- }
664
-
665
- export {
666
- writePendingHandoff,
667
- loadPendingHandoffs,
668
- markHandoffDelivered,
669
- loadGlobalAntipatterns,
670
- loadGlobalDecisions,
671
- loadGlobalPreferences,
672
- recordGlobalAntipattern,
673
- recordGlobalDecision,
674
- MODEL_PRICING,
675
- getSessionTracker,
676
- resetSessionTracker
677
- };