@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,1358 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // ../premise/core/dist/index.js
4
- import * as fs3 from "fs";
5
- import * as yaml3 from "js-yaml";
6
- import { z as z2 } from "zod";
7
- import * as path3 from "path";
8
-
9
- // ../purpose/core/dist/index.js
10
- import * as fs from "fs";
11
- import * as yaml from "js-yaml";
12
- import { z } from "zod";
13
- import * as path from "path";
14
- import { glob } from "glob";
15
- var PurposeItemSchema = z.object({
16
- description: z.string(),
17
- // Component type and hierarchy (v4)
18
- type: z.string().optional(),
19
- parent: z.string().optional(),
20
- anchors: z.array(z.string()).optional(),
21
- tags: z.array(z.string()).optional(),
22
- // Standard fields
23
- endpoints: z.array(z.string()).optional(),
24
- tests: z.array(z.string()).optional(),
25
- rules: z.record(z.unknown()).optional(),
26
- aspects: z.array(z.string()).optional(),
27
- // Symbol reference arrays
28
- flows: z.array(z.string()).optional(),
29
- gates: z.array(z.string()).optional(),
30
- signals: z.array(z.string()).optional(),
31
- states: z.array(z.string()).optional(),
32
- components: z.array(z.string()).optional(),
33
- // Extra fields preserved
34
- location: z.string().optional(),
35
- locations: z.array(z.string()).optional(),
36
- uses: z.array(z.string()).optional(),
37
- "used-by": z.array(z.string()).optional(),
38
- "used-for": z.array(z.string()).optional(),
39
- exports: z.array(z.string()).optional(),
40
- status: z.string().optional(),
41
- properties: z.record(z.unknown()).optional(),
42
- handles: z.array(z.string()).optional()
43
- }).passthrough();
44
- var PurposeItemArraySchema = PurposeItemSchema.extend({
45
- id: z.string()
46
- });
47
- var SignalDefinitionObjectSchema = z.object({
48
- description: z.string().optional(),
49
- category: z.string().optional(),
50
- severity: z.enum(["info", "warn", "error"]).optional(),
51
- emitters: z.array(z.string()).optional(),
52
- related: z.array(z.string()).optional(),
53
- data: z.record(z.unknown()).optional()
54
- });
55
- var SignalDefinitionSchema = z.union([
56
- SignalDefinitionObjectSchema,
57
- z.string().transform((desc) => ({ description: desc }))
58
- ]);
59
- var RelationshipObjectSchema = z.object({
60
- from: z.string(),
61
- to: z.string(),
62
- type: z.string(),
63
- description: z.string().optional()
64
- });
65
- var RelationshipSchema = z.union([RelationshipObjectSchema, z.string()]);
66
- var FlowStepObjectSchema = z.object({
67
- component: z.string(),
68
- action: z.string(),
69
- description: z.string().optional()
70
- });
71
- var FlowStepSchema = z.union([FlowStepObjectSchema, z.string()]);
72
- var FlowWithStepsSchema = z.object({
73
- name: z.string(),
74
- description: z.string().optional(),
75
- steps: z.array(FlowStepSchema)
76
- });
77
- var FlowDefinitionSchema = z.object({
78
- description: z.string().optional(),
79
- gates: z.array(z.string()).optional(),
80
- signals: z.array(z.string()).optional(),
81
- components: z.array(z.string()).optional(),
82
- steps: z.array(FlowStepSchema).optional()
83
- });
84
- var GateDefinitionSchema = z.object({
85
- description: z.string().optional(),
86
- requires: z.array(z.string()).optional(),
87
- keys: z.array(z.string()).optional(),
88
- signals: z.array(z.string()).optional()
89
- });
90
- var StateDefinitionSchema = z.object({
91
- description: z.string().optional(),
92
- default: z.unknown().optional(),
93
- type: z.string().optional()
94
- });
95
- var AspectDefinitionSchema = z.object({
96
- description: z.string().optional(),
97
- tags: z.array(z.string()).optional(),
98
- anchors: z.array(z.string()).optional(),
99
- "applies-to": z.array(z.string()).optional(),
100
- enforcement: z.string().optional()
101
- });
102
- var ReferenceSchema = z.object({
103
- target: z.string(),
104
- type: z.string(),
105
- path: z.string()
106
- });
107
- var PurposeFileSchema = z.object({
108
- version: z.string().optional(),
109
- description: z.string().optional(),
110
- apiSpec: z.string().optional(),
111
- context: z.array(z.string()).optional(),
112
- rules: z.record(z.unknown()).optional(),
113
- // Support both array format [{ id, description }] and record format { id: { description } }
114
- features: z.union([
115
- z.array(PurposeItemArraySchema),
116
- z.record(PurposeItemSchema)
117
- ]).optional(),
118
- components: z.union([
119
- z.array(PurposeItemArraySchema),
120
- z.record(PurposeItemSchema)
121
- ]).optional(),
122
- gates: z.record(GateDefinitionSchema).optional(),
123
- states: z.record(StateDefinitionSchema).optional(),
124
- signals: z.record(SignalDefinitionSchema).optional(),
125
- aspects: z.record(AspectDefinitionSchema).optional(),
126
- relationships: z.array(RelationshipSchema).optional(),
127
- // Support both array format and record format for flows
128
- flows: z.union([
129
- z.array(FlowWithStepsSchema),
130
- z.record(FlowDefinitionSchema)
131
- ]).optional(),
132
- references: z.array(ReferenceSchema).optional()
133
- });
134
- function parsePurposeFile(filePath) {
135
- const result = parsePurposeFileDetailed(filePath);
136
- return { data: result.data, errors: result.errors };
137
- }
138
- function parsePurposeFileDetailed(filePath) {
139
- const errors = [];
140
- const detailedErrors = [];
141
- let rawContent;
142
- try {
143
- rawContent = fs.readFileSync(filePath, "utf8");
144
- } catch (e) {
145
- const error = `Cannot read file: ${e.message}`;
146
- errors.push(error);
147
- detailedErrors.push({ message: error, type: "file" });
148
- return { data: null, errors, detailedErrors, rawContent: void 0, isYamlValid: false };
149
- }
150
- const processedContent = rawContent.replace(/^([#~!$^][\w-]+):/gm, '"$1":').replace(/^(\s*-\s+)([!#][\w-]+)$/gm, '$1"$2"');
151
- let data = null;
152
- try {
153
- data = yaml.load(processedContent);
154
- } catch (e) {
155
- const yamlError = e;
156
- const line = yamlError.mark?.line ? yamlError.mark.line + 1 : void 0;
157
- const message = `YAML syntax error: ${yamlError.reason || e.message}`;
158
- errors.push(`${message}${line ? ` (line ${line})` : ""}`);
159
- detailedErrors.push({
160
- message,
161
- line,
162
- type: "yaml"
163
- });
164
- return { data: null, errors, detailedErrors, rawContent, isYamlValid: false };
165
- }
166
- if (data === null || data === void 0) {
167
- return {
168
- data: {},
169
- errors: [],
170
- detailedErrors: [],
171
- rawContent,
172
- isYamlValid: true
173
- };
174
- }
175
- if (typeof data === "object" && data !== null) {
176
- const obj = data;
177
- const prefixMap = {
178
- "#": "components",
179
- "$": "flows",
180
- "^": "gates",
181
- "!": "signals",
182
- "~": "aspects"
183
- };
184
- for (const key of Object.keys(obj)) {
185
- const prefix = key[0];
186
- const target = prefixMap[prefix];
187
- if (!target || key.length < 2) continue;
188
- const id = key.slice(1);
189
- const value = obj[key];
190
- if (typeof value !== "object" || value === null) continue;
191
- const dict = obj[target] || {};
192
- if (!(target in obj)) obj[target] = dict;
193
- if (!(id in dict)) dict[id] = value;
194
- delete obj[key];
195
- }
196
- }
197
- const parseResult = PurposeFileSchema.safeParse(data);
198
- if (!parseResult.success) {
199
- for (const issue of parseResult.error.issues) {
200
- const path22 = issue.path.join(".");
201
- const message = issue.message;
202
- errors.push(`Schema error at ${path22 || "/"}: ${message}`);
203
- detailedErrors.push({
204
- message,
205
- path: path22 || "/",
206
- type: "schema"
207
- });
208
- }
209
- return { data, errors, detailedErrors, rawContent, isYamlValid: true };
210
- }
211
- return { data: parseResult.data, errors: [], detailedErrors: [], rawContent, isYamlValid: true };
212
- }
213
- function normalizeItemsToEntries(items) {
214
- if (!items) return [];
215
- if (Array.isArray(items)) {
216
- return items.map((item) => [item.id, item]);
217
- } else {
218
- return Object.entries(items);
219
- }
220
- }
221
- async function findPurposeFiles(rootDir) {
222
- const absoluteRoot = path.resolve(rootDir);
223
- const files = await glob("**/.purpose", {
224
- cwd: absoluteRoot,
225
- absolute: true,
226
- ignore: ["**/node_modules/**", "**/dist/**", "**/.git/**"]
227
- });
228
- return files.sort((a, b) => {
229
- const depthA = a.split(path.sep).length;
230
- const depthB = b.split(path.sep).length;
231
- return depthA - depthB;
232
- });
233
- }
234
- async function getAllPurposeFiles(rootDir) {
235
- const files = await findPurposeFiles(rootDir);
236
- const parsed = [];
237
- for (const filePath of files) {
238
- const { data, errors } = parsePurposeFile(filePath);
239
- if (data) {
240
- parsed.push({ filePath, data });
241
- if (errors.length > 0) {
242
- console.warn(`Warnings parsing ${filePath}:`, errors);
243
- }
244
- }
245
- }
246
- return parsed;
247
- }
248
- function extractFeatures(parsedFiles) {
249
- const features = /* @__PURE__ */ new Map();
250
- for (const { filePath, data } of parsedFiles) {
251
- const entries = normalizeItemsToEntries(data.features);
252
- for (const [id, item] of entries) {
253
- features.set(id, { item, filePath });
254
- }
255
- }
256
- return features;
257
- }
258
- function extractComponents(parsedFiles) {
259
- const components = /* @__PURE__ */ new Map();
260
- for (const { filePath, data } of parsedFiles) {
261
- const entries = normalizeItemsToEntries(data.components);
262
- for (const [id, item] of entries) {
263
- components.set(id, { item, filePath });
264
- }
265
- }
266
- return components;
267
- }
268
- function extractGates(parsedFiles) {
269
- const gates = /* @__PURE__ */ new Map();
270
- for (const { filePath, data } of parsedFiles) {
271
- if (data.gates) {
272
- for (const [id, item] of Object.entries(data.gates)) {
273
- gates.set(id, { item, filePath });
274
- }
275
- }
276
- }
277
- return gates;
278
- }
279
- function extractStates(parsedFiles) {
280
- const states = /* @__PURE__ */ new Map();
281
- for (const { filePath, data } of parsedFiles) {
282
- if (data.states) {
283
- for (const [id, item] of Object.entries(data.states)) {
284
- states.set(id, { item, filePath });
285
- }
286
- }
287
- }
288
- return states;
289
- }
290
- function extractFlows(parsedFiles) {
291
- const flows = /* @__PURE__ */ new Map();
292
- for (const { filePath, data } of parsedFiles) {
293
- if (data.flows) {
294
- if (Array.isArray(data.flows)) {
295
- for (const flow of data.flows) {
296
- flows.set(flow.name, {
297
- item: {
298
- id: flow.name,
299
- description: flow.description,
300
- steps: flow.steps
301
- },
302
- filePath
303
- });
304
- }
305
- } else {
306
- for (const [id, flowDef] of Object.entries(data.flows)) {
307
- flows.set(id, {
308
- item: {
309
- id,
310
- description: flowDef.description,
311
- gates: flowDef.gates,
312
- signals: flowDef.signals,
313
- components: flowDef.components,
314
- steps: flowDef.steps
315
- },
316
- filePath
317
- });
318
- }
319
- }
320
- }
321
- }
322
- return flows;
323
- }
324
- function extractSignals(parsedFiles) {
325
- const signals = /* @__PURE__ */ new Map();
326
- for (const { filePath, data } of parsedFiles) {
327
- if (data.signals) {
328
- for (const [id, item] of Object.entries(data.signals)) {
329
- signals.set(id, { item, filePath });
330
- }
331
- }
332
- }
333
- return signals;
334
- }
335
- function extractAspects(parsedFiles) {
336
- const aspects = /* @__PURE__ */ new Map();
337
- for (const { filePath, data } of parsedFiles) {
338
- if (data.aspects) {
339
- for (const [id, item] of Object.entries(data.aspects)) {
340
- aspects.set(id, { item, filePath });
341
- }
342
- }
343
- }
344
- return aspects;
345
- }
346
- function extractSymbolReferences(parsedFiles) {
347
- const refs = [];
348
- const seen = /* @__PURE__ */ new Set();
349
- for (const { filePath, data } of parsedFiles) {
350
- const featureEntries = normalizeItemsToEntries(data.features);
351
- for (const [id, item] of featureEntries) {
352
- extractRefsFromItem(`#${id}`, item, filePath, refs, seen);
353
- }
354
- const componentEntries = normalizeItemsToEntries(data.components);
355
- for (const [id, item] of componentEntries) {
356
- extractRefsFromItem(`#${id}`, item, filePath, refs, seen);
357
- }
358
- }
359
- return refs;
360
- }
361
- function extractRefsFromItem(sourceSymbol, item, filePath, refs, seen) {
362
- if (item.flows) {
363
- for (const flow of item.flows) {
364
- const symbol = flow.startsWith("$") ? flow : `$${flow}`;
365
- if (!seen.has(symbol)) {
366
- seen.add(symbol);
367
- refs.push({ symbol, type: "flow", sourceSymbol, filePath });
368
- }
369
- }
370
- }
371
- if (item.gates) {
372
- for (const gate of item.gates) {
373
- const symbol = gate.startsWith("^") ? gate : `^${gate}`;
374
- if (!seen.has(symbol)) {
375
- seen.add(symbol);
376
- refs.push({ symbol, type: "gate", sourceSymbol, filePath });
377
- }
378
- }
379
- }
380
- if (item.signals) {
381
- for (const signal of item.signals) {
382
- const symbol = signal.startsWith("!") ? signal : `!${signal}`;
383
- if (!seen.has(symbol)) {
384
- seen.add(symbol);
385
- refs.push({ symbol, type: "signal", sourceSymbol, filePath });
386
- }
387
- }
388
- }
389
- if (item.states) {
390
- for (const state of item.states) {
391
- const symbol = state.startsWith("#") ? state : state.startsWith("%") ? `#${state.slice(1)}` : `#${state}`;
392
- if (!seen.has(symbol)) {
393
- seen.add(symbol);
394
- refs.push({ symbol, type: "component", sourceSymbol, filePath });
395
- }
396
- }
397
- }
398
- if (item.components) {
399
- for (const comp of item.components) {
400
- const symbol = comp.startsWith("#") ? comp : `#${comp}`;
401
- if (!seen.has(symbol)) {
402
- seen.add(symbol);
403
- refs.push({ symbol, type: "component", sourceSymbol, filePath });
404
- }
405
- }
406
- }
407
- if (item.aspects) {
408
- for (const aspect of item.aspects) {
409
- const symbol = aspect.startsWith("~") ? aspect : `~${aspect}`;
410
- if (!seen.has(symbol)) {
411
- seen.add(symbol);
412
- refs.push({ symbol, type: "aspect", sourceSymbol, filePath });
413
- }
414
- }
415
- }
416
- if (item.description) {
417
- const descRefs = extractSymbolsFromText(item.description);
418
- for (const { symbol, type } of descRefs) {
419
- if (!seen.has(symbol)) {
420
- seen.add(symbol);
421
- refs.push({ symbol, type, sourceSymbol, filePath });
422
- }
423
- }
424
- }
425
- }
426
- var SYMBOL_BLOCKLIST = /* @__PURE__ */ new Set([
427
- "$lib",
428
- "$env",
429
- "$app",
430
- "$service-worker",
431
- "$virtual",
432
- "$schema",
433
- "$ref",
434
- "$id",
435
- "$type"
436
- ]);
437
- function extractSymbolsFromText(text) {
438
- const results = [];
439
- const pattern = /([$^!#~%])([a-zA-Z][a-zA-Z0-9._-]*)/g;
440
- let match;
441
- while ((match = pattern.exec(text)) !== null) {
442
- const prefix = match[1];
443
- const id = match[2];
444
- let symbol;
445
- let type;
446
- switch (prefix) {
447
- case "#":
448
- type = "component";
449
- symbol = `#${id}`;
450
- break;
451
- case "$":
452
- type = "flow";
453
- symbol = `$${id}`;
454
- break;
455
- case "^":
456
- type = "gate";
457
- symbol = `^${id}`;
458
- break;
459
- case "!":
460
- type = "signal";
461
- symbol = `!${id}`;
462
- break;
463
- case "~":
464
- type = "aspect";
465
- symbol = `~${id}`;
466
- break;
467
- // Legacy: %state → #component
468
- case "%":
469
- type = "component";
470
- symbol = `#${id}`;
471
- break;
472
- default:
473
- continue;
474
- }
475
- if (SYMBOL_BLOCKLIST.has(symbol)) continue;
476
- results.push({ symbol, type });
477
- }
478
- return results;
479
- }
480
-
481
- // ../portal/core/dist/index.js
482
- import * as fs2 from "fs";
483
- import * as path2 from "path";
484
- import * as yaml2 from "js-yaml";
485
- import { glob as glob2 } from "glob";
486
- var DEFAULT_DEV_SETTINGS = {
487
- visualizerPort: 42195,
488
- // Marathon: 42.195km
489
- watcherPort: 42196,
490
- // Marathon + 1
491
- autoConnect: true
492
- };
493
- async function parseGateConfig(configPath) {
494
- const absolutePath = path2.resolve(configPath);
495
- const rootDir = path2.dirname(absolutePath);
496
- if (!fs2.existsSync(absolutePath)) {
497
- throw new Error(`Gate config not found: ${absolutePath}`);
498
- }
499
- const content = fs2.readFileSync(absolutePath, "utf8");
500
- const config = yaml2.load(content);
501
- if (!config.version) {
502
- throw new Error('Gate config missing required "version" field');
503
- }
504
- const gates = [];
505
- const configAny = config;
506
- const gatesSource = config.gates || configAny.portals;
507
- if (gatesSource) {
508
- for (const [id, gateDef] of Object.entries(gatesSource)) {
509
- gates.push(normalizeGate(id, gateDef));
510
- }
511
- }
512
- if (config.include) {
513
- for (const pattern of config.include) {
514
- const fullPattern = path2.join(rootDir, pattern);
515
- const files = await glob2(fullPattern.replace(/\\/g, "/"));
516
- for (const file of files) {
517
- const additionalGates = await parseGateFile(file);
518
- gates.push(...additionalGates);
519
- }
520
- }
521
- }
522
- const flows = [];
523
- if (config.flows) {
524
- for (const [id, flowDef] of Object.entries(config.flows)) {
525
- flows.push(normalizeFlow(id, flowDef));
526
- }
527
- }
528
- return {
529
- version: config.version,
530
- gates,
531
- flows,
532
- settings: {
533
- dev: {
534
- ...DEFAULT_DEV_SETTINGS,
535
- ...config.settings?.dev
536
- }
537
- }
538
- };
539
- }
540
- async function parseGateFile(filePath) {
541
- const content = fs2.readFileSync(filePath, "utf8");
542
- const data = yaml2.load(content);
543
- if (data.id) {
544
- return [normalizeGate(data.id, data)];
545
- }
546
- if (data.gates) {
547
- const gates = [];
548
- for (const [id, gateDef] of Object.entries(data.gates)) {
549
- gates.push(normalizeGate(id, gateDef));
550
- }
551
- return gates;
552
- }
553
- return [];
554
- }
555
- function normalizeGate(id, def) {
556
- const locks = [];
557
- if (def.locks) {
558
- for (const lockDef of def.locks) {
559
- locks.push(normalizeLock(lockDef));
560
- }
561
- }
562
- const prizes = [];
563
- if (def.prizes) {
564
- for (const prizeDef of def.prizes) {
565
- prizes.push(normalizePrize(prizeDef));
566
- }
567
- }
568
- return {
569
- id,
570
- description: def.description,
571
- locks,
572
- prizes,
573
- position: def.position
574
- };
575
- }
576
- function normalizeLock(def) {
577
- const lockDef = def;
578
- const keys = [];
579
- if (lockDef.keys) {
580
- for (const keyDef of lockDef.keys) {
581
- if (typeof keyDef === "string") {
582
- keys.push({ expression: keyDef });
583
- } else if (keyDef.expression) {
584
- const k = keyDef;
585
- keys.push({
586
- expression: k.expression,
587
- description: k.description
588
- });
589
- }
590
- }
591
- }
592
- return {
593
- id: lockDef.id,
594
- description: lockDef.description,
595
- keys,
596
- mode: lockDef.mode || "all"
597
- };
598
- }
599
- function normalizePrize(def) {
600
- const prizeDef = def;
601
- return {
602
- id: prizeDef.id,
603
- oneTime: prizeDef.oneTime ?? false,
604
- metadata: prizeDef.metadata
605
- };
606
- }
607
- function normalizeFlow(id, def) {
608
- return {
609
- id,
610
- description: def.description,
611
- gates: def.gates || [],
612
- forkable: def.forkable
613
- };
614
- }
615
- async function findGateFiles(rootDir) {
616
- const absoluteRoot = path2.resolve(rootDir);
617
- const files = await glob2("**/portal.yaml", {
618
- cwd: absoluteRoot,
619
- absolute: true,
620
- ignore: ["**/node_modules/**", "**/dist/**", "**/.git/**"]
621
- });
622
- return files;
623
- }
624
-
625
- // ../premise/core/dist/index.js
626
- var SYMBOL_PREFIXES = {
627
- component: "#",
628
- flow: "$",
629
- gate: "^",
630
- signal: "!",
631
- aspect: "~"
632
- };
633
- var PREFIX_TO_TYPE = {
634
- "#": "component",
635
- "$": "flow",
636
- "^": "gate",
637
- "!": "signal",
638
- "~": "aspect"
639
- };
640
- var VALID_PREFIXES = ["#", "$", "^", "!", "~"];
641
- function isValidPrefix(prefix) {
642
- return VALID_PREFIXES.includes(prefix);
643
- }
644
- var PositionSchema = z2.object({
645
- x: z2.number(),
646
- y: z2.number()
647
- });
648
- var ViewportSchema = z2.object({
649
- x: z2.number(),
650
- y: z2.number(),
651
- zoom: z2.number()
652
- });
653
- var PremiseSourceConfigSchema = z2.object({
654
- path: z2.string(),
655
- include: z2.array(z2.string()).optional(),
656
- exclude: z2.array(z2.string()).optional()
657
- });
658
- var PremiseNodeSchema = z2.object({
659
- id: z2.string(),
660
- symbol: z2.string(),
661
- type: z2.enum(["feature", "component", "flow", "state", "aspect", "gate", "signal", "idea"]),
662
- content: z2.string().optional(),
663
- position: PositionSchema,
664
- tags: z2.array(z2.string()).optional(),
665
- created: z2.string(),
666
- modified: z2.string().optional()
667
- });
668
- var PremiseConnectionSchema = z2.object({
669
- from: z2.string(),
670
- to: z2.string(),
671
- label: z2.string().optional(),
672
- type: z2.string().optional()
673
- });
674
- var PremiseGroupSchema = z2.object({
675
- id: z2.string(),
676
- name: z2.string(),
677
- nodes: z2.array(z2.string()),
678
- color: z2.string().optional()
679
- });
680
- var PremiseLayoutSchema = z2.object({
681
- viewport: ViewportSchema,
682
- groups: z2.array(PremiseGroupSchema).optional()
683
- });
684
- var PremiseSnapshotStateSchema = z2.object({
685
- nodes: z2.array(PremiseNodeSchema),
686
- connections: z2.array(PremiseConnectionSchema),
687
- layout: PremiseLayoutSchema
688
- });
689
- var PremiseSnapshotSchema = z2.object({
690
- id: z2.string(),
691
- name: z2.string(),
692
- timestamp: z2.string(),
693
- description: z2.string().optional(),
694
- state: PremiseSnapshotStateSchema
695
- });
696
- var PremiseFileSchema = z2.object({
697
- version: z2.string(),
698
- metadata: z2.object({
699
- name: z2.string(),
700
- created: z2.string(),
701
- modified: z2.string()
702
- }),
703
- sources: z2.object({
704
- purpose: z2.array(PremiseSourceConfigSchema).optional(),
705
- portal: z2.array(PremiseSourceConfigSchema).optional()
706
- }),
707
- nodes: z2.array(PremiseNodeSchema),
708
- connections: z2.array(PremiseConnectionSchema),
709
- layout: PremiseLayoutSchema,
710
- snapshots: z2.array(PremiseSnapshotSchema).optional()
711
- });
712
- function parsePremiseFile(filePath) {
713
- const errors = [];
714
- let rawContent;
715
- try {
716
- rawContent = fs3.readFileSync(filePath, "utf8");
717
- } catch (e) {
718
- errors.push(`Cannot read file: ${e.message}`);
719
- return { data: null, errors, rawContent: void 0 };
720
- }
721
- return parsePremiseContent(rawContent);
722
- }
723
- function parsePremiseContent(content) {
724
- const errors = [];
725
- let data = null;
726
- try {
727
- data = yaml3.load(content);
728
- } catch (e) {
729
- const yamlError = e;
730
- const line = yamlError.mark?.line ? yamlError.mark.line + 1 : void 0;
731
- errors.push(`YAML syntax error: ${yamlError.reason || e.message}${line ? ` (line ${line})` : ""}`);
732
- return { data: null, errors, rawContent: content };
733
- }
734
- if (data === null || data === void 0) {
735
- return {
736
- data: createEmptyPremiseFile(),
737
- errors: [],
738
- rawContent: content
739
- };
740
- }
741
- const parseResult = PremiseFileSchema.safeParse(data);
742
- if (!parseResult.success) {
743
- for (const issue of parseResult.error.issues) {
744
- const path22 = issue.path.join(".");
745
- errors.push(`Schema error at ${path22 || "/"}: ${issue.message}`);
746
- }
747
- return { data, errors, rawContent: content };
748
- }
749
- return { data: parseResult.data, errors: [], rawContent: content };
750
- }
751
- function createEmptyPremiseFile(name = "Untitled") {
752
- const now = (/* @__PURE__ */ new Date()).toISOString();
753
- return {
754
- version: "1.0.0",
755
- metadata: {
756
- name,
757
- created: now,
758
- modified: now
759
- },
760
- sources: {
761
- purpose: [{ path: "./" }],
762
- portal: [{ path: "./portal.yaml" }]
763
- },
764
- nodes: [],
765
- connections: [],
766
- layout: {
767
- viewport: { x: 0, y: 0, zoom: 1 }
768
- }
769
- };
770
- }
771
- function serializePremiseFile(data) {
772
- data.metadata.modified = (/* @__PURE__ */ new Date()).toISOString();
773
- return yaml3.dump(data, {
774
- indent: 2,
775
- lineWidth: -1,
776
- noRefs: true,
777
- sortKeys: false
778
- });
779
- }
780
- function getDefaultPremiseContent(projectName = "My Project") {
781
- return serializePremiseFile(createEmptyPremiseFile(projectName));
782
- }
783
- function addPremiseNode(premiseFile, node) {
784
- return {
785
- ...premiseFile,
786
- nodes: [...premiseFile.nodes, node],
787
- metadata: {
788
- ...premiseFile.metadata,
789
- modified: (/* @__PURE__ */ new Date()).toISOString()
790
- }
791
- };
792
- }
793
- function updateNodePosition(premiseFile, nodeId, position) {
794
- return {
795
- ...premiseFile,
796
- nodes: premiseFile.nodes.map(
797
- (n) => n.id === nodeId ? { ...n, position, modified: (/* @__PURE__ */ new Date()).toISOString() } : n
798
- ),
799
- metadata: {
800
- ...premiseFile.metadata,
801
- modified: (/* @__PURE__ */ new Date()).toISOString()
802
- }
803
- };
804
- }
805
- function addConnection(premiseFile, connection) {
806
- const exists = premiseFile.connections.some(
807
- (c) => c.from === connection.from && c.to === connection.to
808
- );
809
- if (exists) return premiseFile;
810
- return {
811
- ...premiseFile,
812
- connections: [...premiseFile.connections, connection],
813
- metadata: {
814
- ...premiseFile.metadata,
815
- modified: (/* @__PURE__ */ new Date()).toISOString()
816
- }
817
- };
818
- }
819
- function createSnapshot(premiseFile, name, description) {
820
- const snapshot = {
821
- id: `snap-${Date.now()}`,
822
- name,
823
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
824
- description,
825
- state: {
826
- nodes: [...premiseFile.nodes],
827
- connections: [...premiseFile.connections],
828
- layout: { ...premiseFile.layout }
829
- }
830
- };
831
- return {
832
- ...premiseFile,
833
- snapshots: [...premiseFile.snapshots || [], snapshot],
834
- metadata: {
835
- ...premiseFile.metadata,
836
- modified: (/* @__PURE__ */ new Date()).toISOString()
837
- }
838
- };
839
- }
840
- async function aggregateFromPremise(premiseFile, rootDir) {
841
- const symbols = [];
842
- const errors = [];
843
- const purposeFiles = [];
844
- const portalFiles = [];
845
- if (premiseFile.sources.purpose) {
846
- for (const source of premiseFile.sources.purpose) {
847
- const sourcePath = path3.resolve(rootDir, source.path);
848
- try {
849
- const parsed = await getAllPurposeFiles(sourcePath);
850
- purposeFiles.push(...parsed.map((p) => p.filePath));
851
- const features = extractFeatures(parsed);
852
- for (const [id, { item, filePath }] of features) {
853
- const featureTags = ["feature", ...item.tags || []];
854
- symbols.push(createSymbolEntry({
855
- id: `purpose-feature-${id}`,
856
- symbol: `#${id}`,
857
- type: "component",
858
- source: "purpose",
859
- filePath,
860
- data: item,
861
- description: item.description,
862
- tags: featureTags,
863
- componentType: item.type,
864
- parentSymbol: item.parent,
865
- anchors: item.anchors?.map((a) => parseAnchorString(a))
866
- }));
867
- }
868
- const components = extractComponents(parsed);
869
- for (const [id, { item, filePath }] of components) {
870
- symbols.push(createSymbolEntry({
871
- id: `purpose-component-${id}`,
872
- symbol: `#${id}`,
873
- type: "component",
874
- source: "purpose",
875
- filePath,
876
- data: item,
877
- description: item.description,
878
- tags: item.tags,
879
- componentType: item.type,
880
- parentSymbol: item.parent,
881
- anchors: item.anchors?.map((a) => parseAnchorString(a))
882
- }));
883
- }
884
- const gates = extractGates(parsed);
885
- for (const [id, { item, filePath }] of gates) {
886
- symbols.push(createSymbolEntry({
887
- id: `purpose-gate-${id}`,
888
- symbol: `^${id}`,
889
- type: "gate",
890
- source: "purpose",
891
- filePath,
892
- data: item,
893
- description: item.description
894
- }));
895
- }
896
- const states = extractStates(parsed);
897
- for (const [id, { item, filePath }] of states) {
898
- symbols.push(createSymbolEntry({
899
- id: `purpose-state-${id}`,
900
- symbol: `#${id}`,
901
- type: "component",
902
- source: "purpose",
903
- filePath,
904
- data: item,
905
- description: item.description,
906
- tags: ["state"]
907
- }));
908
- }
909
- const flows = extractFlows(parsed);
910
- for (const [id, { item, filePath }] of flows) {
911
- symbols.push(createSymbolEntry({
912
- id: `purpose-flow-${id}`,
913
- symbol: `$${id}`,
914
- type: "flow",
915
- source: "purpose",
916
- filePath,
917
- data: item,
918
- description: item.description
919
- }));
920
- }
921
- const signals = extractSignals(parsed);
922
- for (const [id, { item, filePath }] of signals) {
923
- symbols.push(createSymbolEntry({
924
- id: `purpose-signal-${id}`,
925
- symbol: `!${id}`,
926
- type: "signal",
927
- source: "purpose",
928
- filePath,
929
- data: item,
930
- description: item.description
931
- }));
932
- }
933
- const aspects = extractAspects(parsed);
934
- for (const [id, { item, filePath }] of aspects) {
935
- symbols.push(createSymbolEntry({
936
- id: `purpose-aspect-${id}`,
937
- symbol: `~${id}`,
938
- type: "aspect",
939
- source: "purpose",
940
- filePath,
941
- data: item,
942
- description: item.description,
943
- anchors: item.anchors?.map((a) => parseAnchorString(a)),
944
- appliesTo: item["applies-to"],
945
- tags: item.tags,
946
- enforcement: item.enforcement
947
- }));
948
- }
949
- const symbolRefs = extractSymbolReferences(parsed);
950
- const existingSymbols = new Set(symbols.map((s) => s.symbol));
951
- for (const ref of symbolRefs) {
952
- if (!existingSymbols.has(ref.symbol)) {
953
- existingSymbols.add(ref.symbol);
954
- symbols.push(createSymbolEntry({
955
- id: `purpose-ref-${ref.type}-${ref.symbol.slice(1)}`,
956
- symbol: ref.symbol,
957
- type: ref.type,
958
- source: "purpose",
959
- filePath: ref.filePath,
960
- data: { referencedFrom: ref.sourceSymbol },
961
- description: `Referenced from ${ref.sourceSymbol}`
962
- }));
963
- }
964
- }
965
- } catch (e) {
966
- errors.push({
967
- source: "purpose",
968
- filePath: sourcePath,
969
- message: e.message
970
- });
971
- }
972
- }
973
- }
974
- if (premiseFile.sources.portal) {
975
- for (const source of premiseFile.sources.portal) {
976
- const sourcePath = path3.resolve(rootDir, source.path);
977
- try {
978
- let gateConfig;
979
- if (sourcePath.endsWith(".yaml") || sourcePath.endsWith(".yml")) {
980
- gateConfig = await parseGateConfig(sourcePath);
981
- portalFiles.push(sourcePath);
982
- } else {
983
- const files = await findGateFiles(sourcePath);
984
- portalFiles.push(...files);
985
- if (files.length > 0) {
986
- gateConfig = await parseGateConfig(files[0]);
987
- for (let i = 1; i < files.length; i++) {
988
- const additional = await parseGateConfig(files[i]);
989
- gateConfig.gates.push(...additional.gates);
990
- gateConfig.flows.push(...additional.flows);
991
- }
992
- } else {
993
- continue;
994
- }
995
- }
996
- for (const gate of gateConfig.gates) {
997
- symbols.push(createGateSymbol(gate, sourcePath));
998
- for (const prize of gate.prizes) {
999
- symbols.push(createSymbolEntry({
1000
- id: `gate-signal-${gate.id}-${prize.id}`,
1001
- symbol: `!${prize.id}`,
1002
- type: "signal",
1003
- source: "portal",
1004
- filePath: sourcePath,
1005
- data: prize,
1006
- description: `Signal from gate ${gate.id}`
1007
- }));
1008
- }
1009
- }
1010
- for (const flow of gateConfig.flows) {
1011
- symbols.push(createFlowSymbol(flow, sourcePath));
1012
- }
1013
- } catch (e) {
1014
- errors.push({
1015
- source: "portal",
1016
- filePath: sourcePath,
1017
- message: e.message
1018
- });
1019
- }
1020
- }
1021
- }
1022
- for (const node of premiseFile.nodes) {
1023
- const hasIdeaTag = node.tags?.includes("idea");
1024
- if (!node.content && !hasIdeaTag) {
1025
- const existing = symbols.find((s) => s.symbol === node.symbol);
1026
- if (existing) {
1027
- existing.position = node.position;
1028
- existing.tags = node.tags;
1029
- continue;
1030
- }
1031
- }
1032
- symbols.push(createSymbolEntry({
1033
- id: node.id,
1034
- symbol: node.symbol,
1035
- type: node.type,
1036
- source: "premise",
1037
- filePath: ".premise",
1038
- data: node,
1039
- description: node.content,
1040
- position: node.position,
1041
- tags: node.tags,
1042
- created: node.created,
1043
- modified: node.modified
1044
- }));
1045
- }
1046
- resolveReferences(symbols);
1047
- const symbolFileMap = /* @__PURE__ */ new Map();
1048
- for (const sym of symbols) {
1049
- const files = symbolFileMap.get(sym.symbol) || [];
1050
- if (!files.includes(sym.filePath)) {
1051
- files.push(sym.filePath);
1052
- }
1053
- symbolFileMap.set(sym.symbol, files);
1054
- }
1055
- const duplicateSymbols = [];
1056
- for (const [symbol, files] of symbolFileMap) {
1057
- if (files.length > 1) {
1058
- duplicateSymbols.push({ symbol, files });
1059
- }
1060
- }
1061
- return {
1062
- symbols,
1063
- purposeFiles,
1064
- portalFiles,
1065
- errors,
1066
- timestamp: Date.now(),
1067
- ...duplicateSymbols.length > 0 ? { duplicateSymbols } : {}
1068
- };
1069
- }
1070
- function createSymbolEntry(partial) {
1071
- return {
1072
- ...partial,
1073
- data: partial.data ?? null,
1074
- references: partial.references ?? [],
1075
- referencedBy: partial.referencedBy ?? []
1076
- };
1077
- }
1078
- function createGateSymbol(gate, filePath) {
1079
- return createSymbolEntry({
1080
- id: `gate-${gate.id}`,
1081
- symbol: `^${gate.id}`,
1082
- type: "gate",
1083
- source: "portal",
1084
- filePath,
1085
- data: gate,
1086
- description: gate.description,
1087
- position: gate.position
1088
- });
1089
- }
1090
- function createFlowSymbol(flow, filePath) {
1091
- return createSymbolEntry({
1092
- id: `gate-flow-${flow.id}`,
1093
- symbol: `$${flow.id}`,
1094
- type: "flow",
1095
- source: "portal",
1096
- filePath,
1097
- data: flow,
1098
- description: flow.description
1099
- });
1100
- }
1101
- function parseAnchorString(raw) {
1102
- const colonIndex = raw.lastIndexOf(":");
1103
- if (colonIndex === -1 || colonIndex === raw.length - 1) {
1104
- return { path: raw, lines: 0, raw };
1105
- }
1106
- const afterColon = raw.slice(colonIndex + 1);
1107
- const filePath = raw.slice(0, colonIndex);
1108
- if (!/^[\d,\- ]+$/.test(afterColon)) {
1109
- return { path: raw, lines: 0, raw };
1110
- }
1111
- if (afterColon.includes("-")) {
1112
- const [start, end] = afterColon.split("-").map(Number);
1113
- return { path: filePath, lines: [start, end], raw };
1114
- } else if (afterColon.includes(",")) {
1115
- const lines = afterColon.split(",").map(Number);
1116
- return { path: filePath, lines, raw };
1117
- } else {
1118
- return { path: filePath, lines: Number(afterColon), raw };
1119
- }
1120
- }
1121
- var SYMBOL_BLOCKLIST2 = /* @__PURE__ */ new Set([
1122
- "$lib",
1123
- "$env",
1124
- "$app",
1125
- "$service-worker",
1126
- "$virtual",
1127
- "$schema",
1128
- "$ref",
1129
- "$id",
1130
- "$type"
1131
- ]);
1132
- function resolveReferences(symbols) {
1133
- const symbolMap = new Map(symbols.map((s) => [s.symbol, s]));
1134
- for (const symbol of symbols) {
1135
- const dataStr = JSON.stringify(symbol.data);
1136
- const refPattern = /(?:\?[@#$%~^!]|[@#$%~^!?])[a-zA-Z][\w-]*/g;
1137
- const matches = (dataStr.match(refPattern) || []).filter((m) => !SYMBOL_BLOCKLIST2.has(m));
1138
- for (const match of matches) {
1139
- if (match !== symbol.symbol && symbolMap.has(match)) {
1140
- if (!symbol.references.includes(match)) {
1141
- symbol.references.push(match);
1142
- }
1143
- const target = symbolMap.get(match);
1144
- if (target && !target.referencedBy.includes(symbol.symbol)) {
1145
- target.referencedBy.push(symbol.symbol);
1146
- }
1147
- }
1148
- }
1149
- }
1150
- }
1151
- async function aggregateFromDirectory(rootDir) {
1152
- const premiseFile = {
1153
- version: "1.0.0",
1154
- metadata: {
1155
- name: path3.basename(rootDir),
1156
- created: (/* @__PURE__ */ new Date()).toISOString(),
1157
- modified: (/* @__PURE__ */ new Date()).toISOString()
1158
- },
1159
- sources: {
1160
- purpose: [{ path: "./" }],
1161
- portal: [{ path: "./" }]
1162
- },
1163
- nodes: [],
1164
- connections: [],
1165
- layout: {
1166
- viewport: { x: 0, y: 0, zoom: 1 }
1167
- }
1168
- };
1169
- return aggregateFromPremise(premiseFile, rootDir);
1170
- }
1171
- function createSymbolIndex() {
1172
- return {
1173
- entries: /* @__PURE__ */ new Map(),
1174
- byType: /* @__PURE__ */ new Map(),
1175
- bySource: /* @__PURE__ */ new Map(),
1176
- timestamp: 0
1177
- };
1178
- }
1179
- function buildSymbolIndex(result) {
1180
- const index = createSymbolIndex();
1181
- index.timestamp = result.timestamp;
1182
- for (const symbol of result.symbols) {
1183
- index.entries.set(symbol.id, symbol);
1184
- if (!index.byType.has(symbol.type)) {
1185
- index.byType.set(symbol.type, []);
1186
- }
1187
- index.byType.get(symbol.type).push(symbol);
1188
- if (!index.bySource.has(symbol.source)) {
1189
- index.bySource.set(symbol.source, []);
1190
- }
1191
- index.bySource.get(symbol.source).push(symbol);
1192
- }
1193
- return index;
1194
- }
1195
- function getSymbol(index, symbol) {
1196
- for (const entry of index.entries.values()) {
1197
- if (entry.symbol === symbol) {
1198
- return entry;
1199
- }
1200
- }
1201
- return void 0;
1202
- }
1203
- function getSymbolById(index, id) {
1204
- return index.entries.get(id);
1205
- }
1206
- function getSymbolsByType(index, type) {
1207
- return index.byType.get(type) || [];
1208
- }
1209
- function getSymbolsBySource(index, source) {
1210
- return index.bySource.get(source) || [];
1211
- }
1212
- function searchSymbols(index, query) {
1213
- const lowerQuery = query.toLowerCase();
1214
- const results = [];
1215
- for (const entry of index.entries.values()) {
1216
- if (entry.symbol.toLowerCase().includes(lowerQuery)) {
1217
- results.push(entry);
1218
- continue;
1219
- }
1220
- if (entry.description?.toLowerCase().includes(lowerQuery)) {
1221
- results.push(entry);
1222
- continue;
1223
- }
1224
- if (entry.tags?.some((tag) => tag.toLowerCase().includes(lowerQuery))) {
1225
- results.push(entry);
1226
- continue;
1227
- }
1228
- if (entry.componentType?.toLowerCase().includes(lowerQuery)) {
1229
- results.push(entry);
1230
- continue;
1231
- }
1232
- }
1233
- return results;
1234
- }
1235
- function getComponentsByType(index, componentType) {
1236
- const components = getSymbolsByType(index, "component");
1237
- return components.filter((c) => c.componentType === componentType);
1238
- }
1239
- function getAllComponentTypes(index) {
1240
- const types = /* @__PURE__ */ new Set();
1241
- const components = getSymbolsByType(index, "component");
1242
- for (const comp of components) {
1243
- if (comp.componentType) {
1244
- types.add(comp.componentType);
1245
- }
1246
- }
1247
- return Array.from(types).sort();
1248
- }
1249
- function getChildComponents(index, parentSymbol) {
1250
- const components = getSymbolsByType(index, "component");
1251
- return components.filter((c) => c.parentSymbol === parentSymbol);
1252
- }
1253
- function getReferencesTo(index, symbol) {
1254
- const entry = getSymbol(index, symbol);
1255
- if (!entry) return [];
1256
- return entry.referencedBy.map((ref) => getSymbol(index, ref)).filter((e) => e !== void 0);
1257
- }
1258
- function getReferencesFrom(index, symbol) {
1259
- const entry = getSymbol(index, symbol);
1260
- if (!entry) return [];
1261
- return entry.references.map((ref) => getSymbol(index, ref)).filter((e) => e !== void 0);
1262
- }
1263
- function getSymbolsByTag(index, tag) {
1264
- const results = [];
1265
- for (const entry of index.entries.values()) {
1266
- if (entry.tags?.includes(tag)) {
1267
- results.push(entry);
1268
- }
1269
- }
1270
- return results;
1271
- }
1272
- function getAllTags(index) {
1273
- const tags = /* @__PURE__ */ new Set();
1274
- for (const entry of index.entries.values()) {
1275
- for (const tag of entry.tags || []) {
1276
- tags.add(tag);
1277
- }
1278
- }
1279
- return Array.from(tags).sort();
1280
- }
1281
- function getSymbolCounts(index) {
1282
- const counts = {
1283
- component: 0,
1284
- flow: 0,
1285
- gate: 0,
1286
- signal: 0,
1287
- aspect: 0
1288
- };
1289
- for (const [type, symbols] of index.byType) {
1290
- if (type in counts) {
1291
- counts[type] = symbols.length;
1292
- }
1293
- }
1294
- return counts;
1295
- }
1296
- function getAllSymbols(index) {
1297
- return Array.from(index.entries.values());
1298
- }
1299
- function parseSymbol(symbol) {
1300
- if (symbol.length < 2) return null;
1301
- const prefix = symbol[0];
1302
- const name = symbol.slice(1);
1303
- if (!isValidPrefix(prefix)) {
1304
- return null;
1305
- }
1306
- const type = PREFIX_TO_TYPE[prefix];
1307
- return { type, name };
1308
- }
1309
- function createSymbolString(type, name) {
1310
- return `${SYMBOL_PREFIXES[type]}${name}`;
1311
- }
1312
- function isValidSymbol(symbol) {
1313
- return parseSymbol(symbol) !== null;
1314
- }
1315
- function getAutocompleteSuggestions(index, partial, limit = 10) {
1316
- const lowerPartial = partial.toLowerCase();
1317
- const parsed = parseSymbol(partial);
1318
- if (parsed) {
1319
- const typeSymbols = getSymbolsByType(index, parsed.type);
1320
- return typeSymbols.filter((s) => s.symbol.toLowerCase().includes(lowerPartial)).slice(0, limit);
1321
- }
1322
- return searchSymbols(index, partial).slice(0, limit);
1323
- }
1324
- export {
1325
- PREFIX_TO_TYPE,
1326
- SYMBOL_PREFIXES,
1327
- addConnection,
1328
- addPremiseNode,
1329
- aggregateFromDirectory,
1330
- aggregateFromPremise,
1331
- buildSymbolIndex,
1332
- createEmptyPremiseFile,
1333
- createSnapshot,
1334
- createSymbolIndex,
1335
- createSymbolString,
1336
- getAllComponentTypes,
1337
- getAllSymbols,
1338
- getAllTags,
1339
- getAutocompleteSuggestions,
1340
- getChildComponents,
1341
- getComponentsByType,
1342
- getDefaultPremiseContent,
1343
- getReferencesFrom,
1344
- getReferencesTo,
1345
- getSymbol,
1346
- getSymbolById,
1347
- getSymbolCounts,
1348
- getSymbolsBySource,
1349
- getSymbolsByTag,
1350
- getSymbolsByType,
1351
- isValidSymbol,
1352
- parsePremiseContent,
1353
- parsePremiseFile,
1354
- parseSymbol,
1355
- searchSymbols,
1356
- serializePremiseFile,
1357
- updateNodePosition
1358
- };