@a-company/paradigm 5.10.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 (409) 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 -20484
  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/courses/para-701.json +807 -0
  195. package/dist/university-content/plsat/.purpose +3 -2
  196. package/dist/university-ui/assets/{index-BjewBB6s.js → index-CGFJczb1.js} +2 -2
  197. package/dist/university-ui/assets/{index-BjewBB6s.js.map → index-CGFJczb1.js.map} +1 -1
  198. package/dist/university-ui/index.html +1 -1
  199. package/dist/upgrade-B4IOLZYK.js +53 -0
  200. package/dist/validate-C6SMKGYD.js +9 -0
  201. package/dist/validate-LSCDOLBO.js +13 -0
  202. package/dist/validate-VZXTJHGO.js +6 -0
  203. package/dist/watch-LRM5XD46.js +8 -0
  204. package/dist/watch-PZCCUP6K.js +9 -0
  205. package/dist/wisdom-XZ3QKPNP.js +7 -0
  206. package/dist/work-log-loader-DL5GZ2BQ.js +2 -0
  207. package/dist/workspace-2ODL5WLY.js +2 -0
  208. package/package.json +1 -1
  209. package/platform-ui/dist/assets/AmbientSection-DqQ2mfCO.js +1 -0
  210. package/platform-ui/dist/assets/{CanvasSection-DwPTRdIN.js → CanvasSection-DLW0s-Bu.js} +1 -1
  211. package/platform-ui/dist/assets/{DocsSection-BJc_ws4I.js → DocsSection-BQ9Hi51g.js} +1 -1
  212. package/platform-ui/dist/assets/{GitSection-DhqBo1xc.js → GitSection-QQeUX6o3.js} +1 -1
  213. package/platform-ui/dist/assets/{GraphSection-D9fhVnZ0.js → GraphSection-0c9C-w7K.js} +2 -2
  214. package/platform-ui/dist/assets/{GraphSection-BlgXTl53.css → GraphSection-Bbs2a8sC.css} +1 -1
  215. package/platform-ui/dist/assets/LoreSection--t56kCj2.js +1 -0
  216. package/platform-ui/dist/assets/LoreSection-qnmm3o4y.css +1 -0
  217. package/platform-ui/dist/assets/SentinelSection-C4OoME9U.js +1 -0
  218. package/platform-ui/dist/assets/{SymphonySection-BRoBaUSS.js → SymphonySection-B-rvsLxq.js} +1 -1
  219. package/platform-ui/dist/assets/TeamSection-CBFmNEEo.js +1 -0
  220. package/platform-ui/dist/assets/index-Bxp0TVaf.css +1 -0
  221. package/platform-ui/dist/assets/index-DPpOdAtC.js +57 -0
  222. package/platform-ui/dist/index.html +2 -2
  223. package/dist/accept-orchestration-UQLM7PTQ.js +0 -189
  224. package/dist/add-FZRKEGH4.js +0 -81
  225. package/dist/agent-WERIO2XV.js +0 -523
  226. package/dist/agent-loader-TFIANSF4.js +0 -44
  227. package/dist/agent-state-S5DAWPTF.js +0 -24
  228. package/dist/agents-suggest-DNSYJ6IA.js +0 -83
  229. package/dist/aggregate-H57K7PNV.js +0 -88
  230. package/dist/assess-4WVXZLZQ.js +0 -68
  231. package/dist/auto-QFS5NHQU.js +0 -504
  232. package/dist/beacon-KXZXYQHX.js +0 -251
  233. package/dist/calibration-V46G7JTY.js +0 -135
  234. package/dist/check-OWAIWV23.js +0 -175
  235. package/dist/chunk-2IO7JAG2.js +0 -148
  236. package/dist/chunk-2T6BTYBN.js +0 -712
  237. package/dist/chunk-36TKPM5Z.js +0 -400
  238. package/dist/chunk-45MUDW6E.js +0 -804
  239. package/dist/chunk-4BLYIB7J.js +0 -5701
  240. package/dist/chunk-4L3UTYQX.js +0 -677
  241. package/dist/chunk-4NCFWYGG.js +0 -110
  242. package/dist/chunk-54LTTQBH.js +0 -138
  243. package/dist/chunk-5EWAQHFY.js +0 -269
  244. package/dist/chunk-5JGJACDU.js +0 -37
  245. package/dist/chunk-5OUOLN6M.js +0 -659
  246. package/dist/chunk-5VKJBNJL.js +0 -444
  247. package/dist/chunk-6N3JTACN.js +0 -2260
  248. package/dist/chunk-6QC3YGB6.js +0 -114
  249. package/dist/chunk-7N7GSU6K.js +0 -34
  250. package/dist/chunk-ABVQGRF7.js +0 -268
  251. package/dist/chunk-CL7JSK52.js +0 -129
  252. package/dist/chunk-CSD7IHSN.js +0 -152
  253. package/dist/chunk-EDOAWN7J.js +0 -717
  254. package/dist/chunk-EKGMAM62.js +0 -525
  255. package/dist/chunk-EZ3GOCYC.js +0 -132
  256. package/dist/chunk-F3BCHPYT.js +0 -143
  257. package/dist/chunk-FKJUBQU3.js +0 -3081
  258. package/dist/chunk-GT5QGC2H.js +0 -253
  259. package/dist/chunk-GZDFVP2N.js +0 -540
  260. package/dist/chunk-IRKUEJVW.js +0 -405
  261. package/dist/chunk-J2JEQRT3.js +0 -164
  262. package/dist/chunk-JASGXLK3.js +0 -679
  263. package/dist/chunk-KVDYJLTC.js +0 -121
  264. package/dist/chunk-L27I3CPZ.js +0 -357
  265. package/dist/chunk-LHLIAYQ3.js +0 -185
  266. package/dist/chunk-MCMOGQMU.js +0 -145
  267. package/dist/chunk-NQKQG45G.js +0 -688
  268. package/dist/chunk-PBHIFAL4.js +0 -259
  269. package/dist/chunk-PDX44BCA.js +0 -11
  270. package/dist/chunk-PMXRGPRQ.js +0 -305
  271. package/dist/chunk-RAB5IKPR.js +0 -487
  272. package/dist/chunk-RJE5G7WO.js +0 -590
  273. package/dist/chunk-RTHA3XRE.js +0 -880
  274. package/dist/chunk-S2HO5MLR.js +0 -621
  275. package/dist/chunk-S3ORKP3V.js +0 -716
  276. package/dist/chunk-TAIJOFOE.js +0 -124
  277. package/dist/chunk-TXESEO7Y.js +0 -245
  278. package/dist/chunk-UPLDI7CN.js +0 -1334
  279. package/dist/chunk-VL67H5IC.js +0 -506
  280. package/dist/chunk-VPPK3SY4.js +0 -1136
  281. package/dist/chunk-YMDLDELF.js +0 -314
  282. package/dist/chunk-YO6DVTL7.js +0 -99
  283. package/dist/chunk-YRZ5RPEB.js +0 -1561
  284. package/dist/chunk-ZDHLG5VP.js +0 -5676
  285. package/dist/chunk-ZGUAAVMA.js +0 -756
  286. package/dist/chunk-ZSYVKSY6.js +0 -2602
  287. package/dist/claude-FRRWJSTJ.js +0 -362
  288. package/dist/claude-cli-XJLK2X4L.js +0 -276
  289. package/dist/claude-code-HTBA4XRB.js +0 -126
  290. package/dist/claude-code-teams-T4SP24MD.js +0 -199
  291. package/dist/commands-5N4ILTPH.js +0 -5859
  292. package/dist/conductor-CQVGTEQN.js +0 -161
  293. package/dist/config-schema-EA4XALGG.js +0 -154
  294. package/dist/constellation-A26CCGQS.js +0 -225
  295. package/dist/context-audit-RLO3ETRP.js +0 -682
  296. package/dist/cost-BGM32XJU.js +0 -93
  297. package/dist/cost-VI46A4XL.js +0 -174
  298. package/dist/cursor-cli-JVEZGHWQ.js +0 -269
  299. package/dist/cursorrules-HLIKJJZT.js +0 -84
  300. package/dist/decision-loader-WWCLIQPJ.js +0 -20
  301. package/dist/delete-KBRPQLPC.js +0 -56
  302. package/dist/diff-D4X53HAC.js +0 -126
  303. package/dist/discipline-FA4OZXIS.js +0 -24
  304. package/dist/dist-34NA5RS5.js +0 -74
  305. package/dist/dist-5QE2BB2B-5S3T6Y3T.js +0 -6919
  306. package/dist/dist-77JDTVAY.js +0 -62
  307. package/dist/dist-OGTSAZ55.js +0 -1358
  308. package/dist/dist-QK4SQAK7.js +0 -64
  309. package/dist/dist-TA6LSC2Q.js +0 -20
  310. package/dist/docs-PBZB7LYP.js +0 -89
  311. package/dist/docs-QIYKO3BR.js +0 -155
  312. package/dist/doctor-ULBOHEIC.js +0 -11
  313. package/dist/drift-R5NRKFHI.js +0 -251
  314. package/dist/echo-O2LY7CC2.js +0 -248
  315. package/dist/edit-R2HNLMOG.js +0 -63
  316. package/dist/event-25OJKDCE.js +0 -31
  317. package/dist/export-IWVL7XLF.js +0 -38
  318. package/dist/flow-CRRVV3O3.js +0 -185
  319. package/dist/global-3NG5JXUB.js +0 -136
  320. package/dist/graduate-USAWGBJM.js +0 -160
  321. package/dist/graph-VHUMAAS6.js +0 -12
  322. package/dist/graph-server-YL22VBBN.js +0 -116
  323. package/dist/habits-OL5NGPXO.js +0 -1405
  324. package/dist/history-WOWC573W.js +0 -277
  325. package/dist/hooks-HFWSCGPV.js +0 -12
  326. package/dist/integrity-IHO4FZTS.js +0 -194
  327. package/dist/integrity-checker-PSKJA5SB.js +0 -12
  328. package/dist/journal-loader-5EYSBFFY.js +0 -18
  329. package/dist/lint-K6CJGGPH.js +0 -456
  330. package/dist/list-4YK7QKFF.js +0 -57
  331. package/dist/list-ENR7Q4CR.js +0 -56
  332. package/dist/lore-loader-7NO6N6FT.js +0 -26
  333. package/dist/lore-server-UNJY5KC3.js +0 -118
  334. package/dist/manual-G6FISID5.js +0 -204
  335. package/dist/migrate-LS45DNEV.js +0 -889
  336. package/dist/migrate-assessments-RGH4O6IX.js +0 -97
  337. package/dist/model-discovery-D2H3VBGC.js +0 -8
  338. package/dist/nomination-engine-RV5CNO5B.js +0 -42
  339. package/dist/notebook-YWIYGEHV.js +0 -155
  340. package/dist/orchestrate-JLILBBJE.js +0 -324
  341. package/dist/peers-DEOUIZM6.js +0 -82
  342. package/dist/persona-UHAHIVST.js +0 -390
  343. package/dist/pipeline-L4HCSBGN.js +0 -263
  344. package/dist/platform-server-H5YO3DQD.js +0 -1475
  345. package/dist/plugin-update-checker-KRRSGXMV.js +0 -12
  346. package/dist/portal-check-NPYGII2D.js +0 -42
  347. package/dist/portal-compliance-J7DGAPFX.js +0 -18
  348. package/dist/probe-MHL5HQZ2.js +0 -167
  349. package/dist/promote-F6ZYZZAL.js +0 -182
  350. package/dist/providers-GK7PB2OL.js +0 -104
  351. package/dist/quiz-M66SC7F7.js +0 -99
  352. package/dist/record-RA4WR2BO.js +0 -49
  353. package/dist/reindex-5LTD53ZC.js +0 -16
  354. package/dist/remember-HBWJ655S.js +0 -77
  355. package/dist/retag-3OLCVDEQ.js +0 -62
  356. package/dist/review-27ATYTD2.js +0 -33
  357. package/dist/review-57QMURZV.js +0 -334
  358. package/dist/ripple-JPBXP5I3.js +0 -215
  359. package/dist/sentinel-4XIG4STA.js +0 -63
  360. package/dist/sentinel-bridge-MDUXTQRL.js +0 -109
  361. package/dist/serve-CAH3PHE7.js +0 -33
  362. package/dist/serve-INL7SNBK.js +0 -36
  363. package/dist/serve-KBSE36PL.js +0 -49
  364. package/dist/server-54SKYFFY.js +0 -1647
  365. package/dist/server-XUOIO7E6.js +0 -338
  366. package/dist/session-tracker-C4BMD5WG.js +0 -13
  367. package/dist/session-work-log-MZ47OAPB.js +0 -20
  368. package/dist/setup-EDS27WUR.js +0 -25
  369. package/dist/setup-KO5AFC4K.js +0 -296
  370. package/dist/shift-D2JOHHBF.js +0 -668
  371. package/dist/show-5PV5KFJE.js +0 -176
  372. package/dist/show-NQKYX6WQ.js +0 -82
  373. package/dist/snapshot-BK4RBPCG.js +0 -62
  374. package/dist/spawn-RCHNXDHE.js +0 -196
  375. package/dist/status-WGIAQODY.js +0 -71
  376. package/dist/summary-NIRABMF5.js +0 -140
  377. package/dist/sweep-QMHNSIY5.js +0 -934
  378. package/dist/switch-6EJPZDIA.js +0 -232
  379. package/dist/symphony-4OCY36AI.js +0 -791
  380. package/dist/symphony-B75X2MME.js +0 -326
  381. package/dist/symphony-loader-UZGON56V.js +0 -90
  382. package/dist/symphony-peers-2ZQYLRNI.js +0 -34
  383. package/dist/symphony-peers-OL7F6M5S.js +0 -121
  384. package/dist/symphony-relay-UJYUXN65.js +0 -710
  385. package/dist/sync-VEHUH4OA.js +0 -11
  386. package/dist/sync-llms-YHCFIE6X.js +0 -166
  387. package/dist/task-loader-LDYWQSLM.js +0 -20
  388. package/dist/team-O5MIIFMA.js +0 -34
  389. package/dist/test-566CP5KC.js +0 -1017
  390. package/dist/thread-N754I4D5.js +0 -274
  391. package/dist/timeline-M3CICQFE.js +0 -112
  392. package/dist/triage-HHYGT3HY.js +0 -671
  393. package/dist/tutorial-KD22SUNO.js +0 -666
  394. package/dist/upgrade-H5PF32BW.js +0 -551
  395. package/dist/validate-CNKEKO6A.js +0 -134
  396. package/dist/validate-MB5ULIHS.js +0 -39
  397. package/dist/validate-QH3LADM6.js +0 -64
  398. package/dist/watch-2TKP5PVL.js +0 -199
  399. package/dist/watch-ZF4ML6CD.js +0 -111
  400. package/dist/wisdom-AATMGNFA.js +0 -319
  401. package/dist/work-log-loader-5L45XNYZ.js +0 -14
  402. package/dist/workspace-6E6OSRNU.js +0 -21
  403. package/platform-ui/dist/assets/AmbientSection-WtHfNedO.js +0 -1
  404. package/platform-ui/dist/assets/LoreSection-C3EixkjW.css +0 -1
  405. package/platform-ui/dist/assets/LoreSection-CwDDHrz9.js +0 -1
  406. package/platform-ui/dist/assets/SentinelSection-Cl7e5oZ6.js +0 -1
  407. package/platform-ui/dist/assets/TeamSection-CqSIMrKz.js +0 -1
  408. package/platform-ui/dist/assets/index-CfpZFjea.css +0 -1
  409. package/platform-ui/dist/assets/index-F0KL9xrN.js +0 -57
@@ -1,717 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // ../purpose/core/dist/index.js
4
- import * as fs from "fs";
5
- import * as yaml from "js-yaml";
6
- import { z } from "zod";
7
- import * as path from "path";
8
- import { glob } from "glob";
9
- var PurposeItemSchema = z.object({
10
- description: z.string(),
11
- // Component type and hierarchy (v4)
12
- type: z.string().optional(),
13
- parent: z.string().optional(),
14
- anchors: z.array(z.string()).optional(),
15
- tags: z.array(z.string()).optional(),
16
- // Standard fields
17
- endpoints: z.array(z.string()).optional(),
18
- tests: z.array(z.string()).optional(),
19
- rules: z.record(z.unknown()).optional(),
20
- aspects: z.array(z.string()).optional(),
21
- // Symbol reference arrays
22
- flows: z.array(z.string()).optional(),
23
- gates: z.array(z.string()).optional(),
24
- signals: z.array(z.string()).optional(),
25
- states: z.array(z.string()).optional(),
26
- components: z.array(z.string()).optional(),
27
- // Extra fields preserved
28
- location: z.string().optional(),
29
- locations: z.array(z.string()).optional(),
30
- uses: z.array(z.string()).optional(),
31
- "used-by": z.array(z.string()).optional(),
32
- "used-for": z.array(z.string()).optional(),
33
- exports: z.array(z.string()).optional(),
34
- status: z.string().optional(),
35
- properties: z.record(z.unknown()).optional(),
36
- handles: z.array(z.string()).optional()
37
- }).passthrough();
38
- var PurposeItemArraySchema = PurposeItemSchema.extend({
39
- id: z.string()
40
- });
41
- var SignalDefinitionObjectSchema = z.object({
42
- description: z.string().optional(),
43
- category: z.string().optional(),
44
- severity: z.enum(["info", "warn", "error"]).optional(),
45
- emitters: z.array(z.string()).optional(),
46
- related: z.array(z.string()).optional(),
47
- data: z.record(z.unknown()).optional()
48
- });
49
- var SignalDefinitionSchema = z.union([
50
- SignalDefinitionObjectSchema,
51
- z.string().transform((desc) => ({ description: desc }))
52
- ]);
53
- var RelationshipObjectSchema = z.object({
54
- from: z.string(),
55
- to: z.string(),
56
- type: z.string(),
57
- description: z.string().optional()
58
- });
59
- var RelationshipSchema = z.union([RelationshipObjectSchema, z.string()]);
60
- var FlowStepObjectSchema = z.object({
61
- component: z.string(),
62
- action: z.string(),
63
- description: z.string().optional()
64
- });
65
- var FlowStepSchema = z.union([FlowStepObjectSchema, z.string()]);
66
- var FlowWithStepsSchema = z.object({
67
- name: z.string(),
68
- description: z.string().optional(),
69
- steps: z.array(FlowStepSchema)
70
- });
71
- var FlowDefinitionSchema = z.object({
72
- description: z.string().optional(),
73
- gates: z.array(z.string()).optional(),
74
- signals: z.array(z.string()).optional(),
75
- components: z.array(z.string()).optional(),
76
- steps: z.array(FlowStepSchema).optional()
77
- });
78
- var GateDefinitionSchema = z.object({
79
- description: z.string().optional(),
80
- requires: z.array(z.string()).optional(),
81
- keys: z.array(z.string()).optional(),
82
- signals: z.array(z.string()).optional()
83
- });
84
- var StateDefinitionSchema = z.object({
85
- description: z.string().optional(),
86
- default: z.unknown().optional(),
87
- type: z.string().optional()
88
- });
89
- var AspectDefinitionSchema = z.object({
90
- description: z.string().optional(),
91
- tags: z.array(z.string()).optional(),
92
- anchors: z.array(z.string()).optional(),
93
- "applies-to": z.array(z.string()).optional(),
94
- enforcement: z.string().optional()
95
- });
96
- var ReferenceSchema = z.object({
97
- target: z.string(),
98
- type: z.string(),
99
- path: z.string()
100
- });
101
- var PurposeFileSchema = z.object({
102
- version: z.string().optional(),
103
- description: z.string().optional(),
104
- apiSpec: z.string().optional(),
105
- context: z.array(z.string()).optional(),
106
- rules: z.record(z.unknown()).optional(),
107
- // Support both array format [{ id, description }] and record format { id: { description } }
108
- features: z.union([
109
- z.array(PurposeItemArraySchema),
110
- z.record(PurposeItemSchema)
111
- ]).optional(),
112
- components: z.union([
113
- z.array(PurposeItemArraySchema),
114
- z.record(PurposeItemSchema)
115
- ]).optional(),
116
- gates: z.record(GateDefinitionSchema).optional(),
117
- states: z.record(StateDefinitionSchema).optional(),
118
- signals: z.record(SignalDefinitionSchema).optional(),
119
- aspects: z.record(AspectDefinitionSchema).optional(),
120
- relationships: z.array(RelationshipSchema).optional(),
121
- // Support both array format and record format for flows
122
- flows: z.union([
123
- z.array(FlowWithStepsSchema),
124
- z.record(FlowDefinitionSchema)
125
- ]).optional(),
126
- references: z.array(ReferenceSchema).optional()
127
- });
128
- function parsePurposeFile(filePath) {
129
- const result = parsePurposeFileDetailed(filePath);
130
- return { data: result.data, errors: result.errors };
131
- }
132
- function parsePurposeFileDetailed(filePath) {
133
- const errors = [];
134
- const detailedErrors = [];
135
- let rawContent;
136
- try {
137
- rawContent = fs.readFileSync(filePath, "utf8");
138
- } catch (e) {
139
- const error = `Cannot read file: ${e.message}`;
140
- errors.push(error);
141
- detailedErrors.push({ message: error, type: "file" });
142
- return { data: null, errors, detailedErrors, rawContent: void 0, isYamlValid: false };
143
- }
144
- const processedContent = rawContent.replace(/^([#~!$^][\w-]+):/gm, '"$1":').replace(/^(\s*-\s+)([!#][\w-]+)$/gm, '$1"$2"');
145
- let data = null;
146
- try {
147
- data = yaml.load(processedContent);
148
- } catch (e) {
149
- const yamlError = e;
150
- const line = yamlError.mark?.line ? yamlError.mark.line + 1 : void 0;
151
- const message = `YAML syntax error: ${yamlError.reason || e.message}`;
152
- errors.push(`${message}${line ? ` (line ${line})` : ""}`);
153
- detailedErrors.push({
154
- message,
155
- line,
156
- type: "yaml"
157
- });
158
- return { data: null, errors, detailedErrors, rawContent, isYamlValid: false };
159
- }
160
- if (data === null || data === void 0) {
161
- return {
162
- data: {},
163
- errors: [],
164
- detailedErrors: [],
165
- rawContent,
166
- isYamlValid: true
167
- };
168
- }
169
- if (typeof data === "object" && data !== null) {
170
- const obj = data;
171
- const prefixMap = {
172
- "#": "components",
173
- "$": "flows",
174
- "^": "gates",
175
- "!": "signals",
176
- "~": "aspects"
177
- };
178
- for (const key of Object.keys(obj)) {
179
- const prefix = key[0];
180
- const target = prefixMap[prefix];
181
- if (!target || key.length < 2) continue;
182
- const id = key.slice(1);
183
- const value = obj[key];
184
- if (typeof value !== "object" || value === null) continue;
185
- const dict = obj[target] || {};
186
- if (!(target in obj)) obj[target] = dict;
187
- if (!(id in dict)) dict[id] = value;
188
- delete obj[key];
189
- }
190
- }
191
- const parseResult = PurposeFileSchema.safeParse(data);
192
- if (!parseResult.success) {
193
- for (const issue of parseResult.error.issues) {
194
- const path2 = issue.path.join(".");
195
- const message = issue.message;
196
- errors.push(`Schema error at ${path2 || "/"}: ${message}`);
197
- detailedErrors.push({
198
- message,
199
- path: path2 || "/",
200
- type: "schema"
201
- });
202
- }
203
- return { data, errors, detailedErrors, rawContent, isYamlValid: true };
204
- }
205
- return { data: parseResult.data, errors: [], detailedErrors: [], rawContent, isYamlValid: true };
206
- }
207
- function serializePurposeFile(data) {
208
- return yaml.dump(data, {
209
- indent: 2,
210
- lineWidth: -1,
211
- noRefs: true,
212
- sortKeys: false
213
- });
214
- }
215
- function getDefaultPurposeContent() {
216
- const defaultFile = {
217
- version: "1.0.0",
218
- description: "Project purpose and context",
219
- context: [
220
- "Add contextual notes for AI agents here"
221
- ],
222
- features: {},
223
- components: {}
224
- };
225
- return serializePurposeFile(defaultFile);
226
- }
227
- function normalizeItemsToEntries(items) {
228
- if (!items) return [];
229
- if (Array.isArray(items)) {
230
- return items.map((item) => [item.id, item]);
231
- } else {
232
- return Object.entries(items);
233
- }
234
- }
235
- function aggregatePurposes(parsedFiles) {
236
- const basePurpose = {
237
- description: "",
238
- context: [],
239
- rules: {},
240
- features: {},
241
- components: {},
242
- referencedItems: {},
243
- ruleConflicts: []
244
- };
245
- if (!parsedFiles || parsedFiles.length === 0) {
246
- return basePurpose;
247
- }
248
- parsedFiles.forEach(({ data }) => {
249
- const existingContext = new Set(basePurpose.context);
250
- for (const ctx of data.context || []) {
251
- if (!existingContext.has(ctx)) {
252
- basePurpose.context.push(ctx);
253
- existingContext.add(ctx);
254
- }
255
- }
256
- if (data.rules) {
257
- for (const [key, value] of Object.entries(data.rules)) {
258
- if (basePurpose.rules[key] !== void 0 && basePurpose.rules[key] !== value) {
259
- basePurpose.ruleConflicts.push(
260
- `Conflict on rule "${key}": existing value "${basePurpose.rules[key]}" overwritten with "${value}"`
261
- );
262
- }
263
- basePurpose.rules[key] = value;
264
- }
265
- }
266
- const featureEntries = normalizeItemsToEntries(data.features);
267
- for (const [id, item] of featureEntries) {
268
- basePurpose.features[id] = item;
269
- }
270
- const componentEntries = normalizeItemsToEntries(data.components);
271
- for (const [id, item] of componentEntries) {
272
- basePurpose.components[id] = item;
273
- }
274
- });
275
- const lastFile = parsedFiles[parsedFiles.length - 1];
276
- basePurpose.description = lastFile.data.description || basePurpose.description;
277
- basePurpose.apiSpec = lastFile.data.apiSpec || basePurpose.apiSpec;
278
- return basePurpose;
279
- }
280
- async function findPurposeFiles(rootDir) {
281
- const absoluteRoot = path.resolve(rootDir);
282
- const files = await glob("**/.purpose", {
283
- cwd: absoluteRoot,
284
- absolute: true,
285
- ignore: ["**/node_modules/**", "**/dist/**", "**/.git/**"]
286
- });
287
- return files.sort((a, b) => {
288
- const depthA = a.split(path.sep).length;
289
- const depthB = b.split(path.sep).length;
290
- return depthA - depthB;
291
- });
292
- }
293
- async function getAllPurposeFiles(rootDir) {
294
- const files = await findPurposeFiles(rootDir);
295
- const parsed = [];
296
- for (const filePath of files) {
297
- const { data, errors } = parsePurposeFile(filePath);
298
- if (data) {
299
- parsed.push({ filePath, data });
300
- if (errors.length > 0) {
301
- console.warn(`Warnings parsing ${filePath}:`, errors);
302
- }
303
- }
304
- }
305
- return parsed;
306
- }
307
- function extractFeatures(parsedFiles) {
308
- const features = /* @__PURE__ */ new Map();
309
- for (const { filePath, data } of parsedFiles) {
310
- const entries = normalizeItemsToEntries(data.features);
311
- for (const [id, item] of entries) {
312
- features.set(id, { item, filePath });
313
- }
314
- }
315
- return features;
316
- }
317
- function extractComponents(parsedFiles) {
318
- const components = /* @__PURE__ */ new Map();
319
- for (const { filePath, data } of parsedFiles) {
320
- const entries = normalizeItemsToEntries(data.components);
321
- for (const [id, item] of entries) {
322
- components.set(id, { item, filePath });
323
- }
324
- }
325
- return components;
326
- }
327
- function extractGates(parsedFiles) {
328
- const gates = /* @__PURE__ */ new Map();
329
- for (const { filePath, data } of parsedFiles) {
330
- if (data.gates) {
331
- for (const [id, item] of Object.entries(data.gates)) {
332
- gates.set(id, { item, filePath });
333
- }
334
- }
335
- }
336
- return gates;
337
- }
338
- function extractStates(parsedFiles) {
339
- const states = /* @__PURE__ */ new Map();
340
- for (const { filePath, data } of parsedFiles) {
341
- if (data.states) {
342
- for (const [id, item] of Object.entries(data.states)) {
343
- states.set(id, { item, filePath });
344
- }
345
- }
346
- }
347
- return states;
348
- }
349
- function extractFlows(parsedFiles) {
350
- const flows = /* @__PURE__ */ new Map();
351
- for (const { filePath, data } of parsedFiles) {
352
- if (data.flows) {
353
- if (Array.isArray(data.flows)) {
354
- for (const flow of data.flows) {
355
- flows.set(flow.name, {
356
- item: {
357
- id: flow.name,
358
- description: flow.description,
359
- steps: flow.steps
360
- },
361
- filePath
362
- });
363
- }
364
- } else {
365
- for (const [id, flowDef] of Object.entries(data.flows)) {
366
- flows.set(id, {
367
- item: {
368
- id,
369
- description: flowDef.description,
370
- gates: flowDef.gates,
371
- signals: flowDef.signals,
372
- components: flowDef.components,
373
- steps: flowDef.steps
374
- },
375
- filePath
376
- });
377
- }
378
- }
379
- }
380
- }
381
- return flows;
382
- }
383
- function extractSignals(parsedFiles) {
384
- const signals = /* @__PURE__ */ new Map();
385
- for (const { filePath, data } of parsedFiles) {
386
- if (data.signals) {
387
- for (const [id, item] of Object.entries(data.signals)) {
388
- signals.set(id, { item, filePath });
389
- }
390
- }
391
- }
392
- return signals;
393
- }
394
- function extractAspects(parsedFiles) {
395
- const aspects = /* @__PURE__ */ new Map();
396
- for (const { filePath, data } of parsedFiles) {
397
- if (data.aspects) {
398
- for (const [id, item] of Object.entries(data.aspects)) {
399
- aspects.set(id, { item, filePath });
400
- }
401
- }
402
- }
403
- return aspects;
404
- }
405
- function extractSymbolReferences(parsedFiles) {
406
- const refs = [];
407
- const seen = /* @__PURE__ */ new Set();
408
- for (const { filePath, data } of parsedFiles) {
409
- const featureEntries = normalizeItemsToEntries(data.features);
410
- for (const [id, item] of featureEntries) {
411
- extractRefsFromItem(`#${id}`, item, filePath, refs, seen);
412
- }
413
- const componentEntries = normalizeItemsToEntries(data.components);
414
- for (const [id, item] of componentEntries) {
415
- extractRefsFromItem(`#${id}`, item, filePath, refs, seen);
416
- }
417
- }
418
- return refs;
419
- }
420
- function extractRefsFromItem(sourceSymbol, item, filePath, refs, seen) {
421
- if (item.flows) {
422
- for (const flow of item.flows) {
423
- const symbol = flow.startsWith("$") ? flow : `$${flow}`;
424
- if (!seen.has(symbol)) {
425
- seen.add(symbol);
426
- refs.push({ symbol, type: "flow", sourceSymbol, filePath });
427
- }
428
- }
429
- }
430
- if (item.gates) {
431
- for (const gate of item.gates) {
432
- const symbol = gate.startsWith("^") ? gate : `^${gate}`;
433
- if (!seen.has(symbol)) {
434
- seen.add(symbol);
435
- refs.push({ symbol, type: "gate", sourceSymbol, filePath });
436
- }
437
- }
438
- }
439
- if (item.signals) {
440
- for (const signal of item.signals) {
441
- const symbol = signal.startsWith("!") ? signal : `!${signal}`;
442
- if (!seen.has(symbol)) {
443
- seen.add(symbol);
444
- refs.push({ symbol, type: "signal", sourceSymbol, filePath });
445
- }
446
- }
447
- }
448
- if (item.states) {
449
- for (const state of item.states) {
450
- const symbol = state.startsWith("#") ? state : state.startsWith("%") ? `#${state.slice(1)}` : `#${state}`;
451
- if (!seen.has(symbol)) {
452
- seen.add(symbol);
453
- refs.push({ symbol, type: "component", sourceSymbol, filePath });
454
- }
455
- }
456
- }
457
- if (item.components) {
458
- for (const comp of item.components) {
459
- const symbol = comp.startsWith("#") ? comp : `#${comp}`;
460
- if (!seen.has(symbol)) {
461
- seen.add(symbol);
462
- refs.push({ symbol, type: "component", sourceSymbol, filePath });
463
- }
464
- }
465
- }
466
- if (item.aspects) {
467
- for (const aspect of item.aspects) {
468
- const symbol = aspect.startsWith("~") ? aspect : `~${aspect}`;
469
- if (!seen.has(symbol)) {
470
- seen.add(symbol);
471
- refs.push({ symbol, type: "aspect", sourceSymbol, filePath });
472
- }
473
- }
474
- }
475
- if (item.description) {
476
- const descRefs = extractSymbolsFromText(item.description);
477
- for (const { symbol, type } of descRefs) {
478
- if (!seen.has(symbol)) {
479
- seen.add(symbol);
480
- refs.push({ symbol, type, sourceSymbol, filePath });
481
- }
482
- }
483
- }
484
- }
485
- var SYMBOL_BLOCKLIST = /* @__PURE__ */ new Set([
486
- "$lib",
487
- "$env",
488
- "$app",
489
- "$service-worker",
490
- "$virtual",
491
- "$schema",
492
- "$ref",
493
- "$id",
494
- "$type"
495
- ]);
496
- function extractSymbolsFromText(text) {
497
- const results = [];
498
- const pattern = /([$^!#~%])([a-zA-Z][a-zA-Z0-9._-]*)/g;
499
- let match;
500
- while ((match = pattern.exec(text)) !== null) {
501
- const prefix = match[1];
502
- const id = match[2];
503
- let symbol;
504
- let type;
505
- switch (prefix) {
506
- case "#":
507
- type = "component";
508
- symbol = `#${id}`;
509
- break;
510
- case "$":
511
- type = "flow";
512
- symbol = `$${id}`;
513
- break;
514
- case "^":
515
- type = "gate";
516
- symbol = `^${id}`;
517
- break;
518
- case "!":
519
- type = "signal";
520
- symbol = `!${id}`;
521
- break;
522
- case "~":
523
- type = "aspect";
524
- symbol = `~${id}`;
525
- break;
526
- // Legacy: %state → #component
527
- case "%":
528
- type = "component";
529
- symbol = `#${id}`;
530
- break;
531
- default:
532
- continue;
533
- }
534
- if (SYMBOL_BLOCKLIST.has(symbol)) continue;
535
- results.push({ symbol, type });
536
- }
537
- return results;
538
- }
539
- function normalizeToEntries(items) {
540
- if (!items) return [];
541
- if (Array.isArray(items)) {
542
- return items.map((item) => [item.id, item]);
543
- } else {
544
- return Object.entries(items);
545
- }
546
- }
547
- function getItemIds(items) {
548
- if (!items) return [];
549
- if (Array.isArray(items)) {
550
- return items.map((item) => item.id);
551
- } else {
552
- return Object.keys(items);
553
- }
554
- }
555
- function validatePurposeFile(data, filePath) {
556
- const issues = [];
557
- const prefix = filePath ? `${filePath}: ` : "";
558
- const featureEntries = normalizeToEntries(data.features);
559
- for (const [id, feature] of featureEntries) {
560
- validatePurposeItem(id, feature, "feature", prefix, issues);
561
- }
562
- const componentEntries = normalizeToEntries(data.components);
563
- for (const [id, component] of componentEntries) {
564
- validatePurposeItem(id, component, "component", prefix, issues);
565
- }
566
- if (data.relationships) {
567
- const allIds = /* @__PURE__ */ new Set([
568
- ...getItemIds(data.features),
569
- ...getItemIds(data.components)
570
- ]);
571
- for (const rel of data.relationships) {
572
- if (typeof rel === "string" || !rel || !rel.from || !rel.to) {
573
- continue;
574
- }
575
- const fromId = rel.from.replace(/^[@#$%~^!?]/, "");
576
- if (!allIds.has(fromId) && !rel.from.includes(".")) {
577
- issues.push({
578
- type: "warning",
579
- message: `${prefix}Relationship references unknown source: "${rel.from}"`,
580
- path: "relationships"
581
- });
582
- }
583
- const toId = rel.to.replace(/^[@#$%~^!?]/, "");
584
- if (!allIds.has(toId) && !rel.to.includes(".")) {
585
- issues.push({
586
- type: "warning",
587
- message: `${prefix}Relationship references unknown target: "${rel.to}"`,
588
- path: "relationships"
589
- });
590
- }
591
- }
592
- }
593
- if (data.flows) {
594
- const componentIds = new Set(getItemIds(data.components));
595
- if (Array.isArray(data.flows)) {
596
- for (const flow of data.flows) {
597
- if (!flow || typeof flow !== "object") continue;
598
- if (!flow.name) {
599
- issues.push({
600
- type: "error",
601
- message: `${prefix}Flow missing required "name" field`,
602
- path: "flows"
603
- });
604
- }
605
- if (flow.steps && Array.isArray(flow.steps)) {
606
- for (const step of flow.steps) {
607
- if (typeof step === "string" || !step || !step.component) continue;
608
- const componentId = step.component.replace(/^#/, "");
609
- if (!componentIds.has(componentId)) {
610
- issues.push({
611
- type: "warning",
612
- message: `${prefix}Flow "${flow.name}" references unknown component: "${step.component}"`,
613
- path: `flows.${flow.name}`
614
- });
615
- }
616
- }
617
- }
618
- }
619
- } else {
620
- for (const [flowId, flowDef] of Object.entries(data.flows)) {
621
- if (!flowDef || typeof flowDef !== "object") continue;
622
- if (flowDef.steps && Array.isArray(flowDef.steps)) {
623
- for (const step of flowDef.steps) {
624
- if (typeof step === "string" || !step || !step.component) continue;
625
- const componentId = step.component.replace(/^#/, "");
626
- if (!componentIds.has(componentId)) {
627
- issues.push({
628
- type: "warning",
629
- message: `${prefix}Flow "${flowId}" references unknown component: "${step.component}"`,
630
- path: `flows.${flowId}`
631
- });
632
- }
633
- }
634
- }
635
- }
636
- }
637
- }
638
- return {
639
- valid: issues.filter((i) => i.type === "error").length === 0,
640
- issues
641
- };
642
- }
643
- function validatePurposeItem(id, item, itemType, prefix, issues) {
644
- const path2 = `${itemType}s.${id}`;
645
- if (!/^[a-zA-Z][a-zA-Z0-9-]*$/.test(id)) {
646
- issues.push({
647
- type: "warning",
648
- message: `${prefix}${itemType} ID "${id}" should use alphanumeric characters and hyphens`,
649
- path: path2
650
- });
651
- }
652
- if (!item.description || item.description.trim() === "") {
653
- issues.push({
654
- type: "warning",
655
- message: `${prefix}${itemType} "${id}" has no description`,
656
- path: path2
657
- });
658
- }
659
- if (item.endpoints) {
660
- for (const endpoint of item.endpoints) {
661
- if (!/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+\//.test(endpoint)) {
662
- issues.push({
663
- type: "warning",
664
- message: `${prefix}Endpoint "${endpoint}" in ${itemType} "${id}" may not be in standard format (e.g., "GET /api/users")`,
665
- path: `${path2}.endpoints`
666
- });
667
- }
668
- }
669
- }
670
- }
671
- function formatValidationResult(result) {
672
- if (result.valid && result.issues.length === 0) {
673
- return "\u2705 Purpose file is valid";
674
- }
675
- const lines = [];
676
- const errors = result.issues.filter((i) => i.type === "error");
677
- const warnings = result.issues.filter((i) => i.type === "warning");
678
- if (errors.length > 0) {
679
- lines.push(`
680
- \u274C ${errors.length} error(s):`);
681
- for (const issue of errors) {
682
- lines.push(` \u2022 ${issue.message}${issue.path ? ` (${issue.path})` : ""}`);
683
- }
684
- }
685
- if (warnings.length > 0) {
686
- lines.push(`
687
- \u26A0\uFE0F ${warnings.length} warning(s):`);
688
- for (const issue of warnings) {
689
- lines.push(` \u2022 ${issue.message}${issue.path ? ` (${issue.path})` : ""}`);
690
- }
691
- }
692
- if (result.valid) {
693
- lines.push("\n\u2705 Purpose file is valid (with warnings)");
694
- } else {
695
- lines.push("\n\u274C Purpose file is invalid");
696
- }
697
- return lines.join("\n");
698
- }
699
-
700
- export {
701
- parsePurposeFileDetailed,
702
- serializePurposeFile,
703
- getDefaultPurposeContent,
704
- aggregatePurposes,
705
- findPurposeFiles,
706
- getAllPurposeFiles,
707
- extractFeatures,
708
- extractComponents,
709
- extractGates,
710
- extractStates,
711
- extractFlows,
712
- extractSignals,
713
- extractAspects,
714
- extractSymbolReferences,
715
- validatePurposeFile,
716
- formatValidationResult
717
- };