@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
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import {t,g as g$1,f,h}from'./chunk-XUFYOXOU.js';import {g as g$2,f as f$1}from'./chunk-QGZRM6ZB.js';import {g as g$3,f as f$2}from'./chunk-VG7FN2TU.js';import {b,a,d}from'./chunk-5TAVYPOV.js';import*as u from'fs';import*as g from'path';import*as W from'js-yaml';import*as R from'os';function G(e){return g.join(e,q,st)}function at(){let e=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `ev-${e}-${t}`}function k(e,t){let n={id:at(),timestamp:new Date().toISOString(),...t};w.push(n),w.length>N&&(w=w.slice(-N));try{let r=g.join(e,q);u.mkdirSync(r,{recursive:!0});let o=G(e);u.appendFileSync(o,JSON.stringify(n)+`
3
+ `,"utf8"),ct(o);}catch{}return n}function ct(e){try{if(u.statSync(e).size>512*1024){let r=u.readFileSync(e,"utf8").trim().split(`
4
+ `);if(r.length>N){let o=r.slice(-N);u.writeFileSync(e,o.join(`
5
+ `)+`
6
+ `,"utf8");}}}catch{}}function Dt(e,t){let n=lt(e);return t?.type&&(n=n.filter(r=>r.type===t.type)),t?.source&&(n=n.filter(r=>r.source===t.source)),t?.symbol&&(n=n.filter(r=>r.symbols?.includes(t.symbol))),t?.agent&&(n=n.filter(r=>r.agent===t.agent)),t?.since&&(n=n.filter(r=>r.timestamp>=t.since)),n.sort((r,o)=>o.timestamp.localeCompare(r.timestamp)),t?.limit&&(n=n.slice(0,t.limit)),n}function lt(e){let t=G(e);if(!u.existsSync(t))return [...w];try{return u.readFileSync(t,"utf8").trim().split(`
7
+ `).filter(o=>o.trim()).map(o=>{try{return JSON.parse(o)}catch{return null}}).filter(o=>o!==null)}catch{return [...w]}}function Y(e,t,n){let r=0,o=0,i=0,a=0;if(n.symbols?.length&&e.symbols?.length)for(let l of n.symbols)for(let s of e.symbols)B(l,s)&&(r=Math.max(r,1));if(n.paths?.length&&e.path){for(let l of n.paths)if(B(l,e.path)){o=1;break}}if(n.concepts?.length){let l=[e.context||"",...e.keywords||[],e.type].join(" ").toLowerCase(),s=0;for(let m of n.concepts)l.includes(m.toLowerCase())&&s++;n.concepts.length>0&&(i=s/n.concepts.length);}if(n.signals?.length){for(let l of n.signals)if(l.type===e.type){a=1;break}}let f=[r,o,i,a].sort((l,s)=>s-l),c=f[0]*.5+f[1]*.2+f[2]*.15+f[3]*.15,d=n.threshold??.6;return {agentId:t,score:c,breakdown:{symbolMatch:r,pathMatch:o,conceptMatch:i,signalMatch:a},shouldNominate:c>=d,quietReason:c<d?"below-threshold":void 0}}function B(e,t){if(e===t)return true;let n=e.replace(/\*\*/g,"\xA7\xA7").replace(/\*/g,"[^/]*").replace(/§§/g,".*");try{return new RegExp(`^${n}$`).test(t)}catch{return false}}var q,st,N,w,z=b(()=>{q=".paradigm/events",st="stream.jsonl",N=1e3,w=[];});var j,H=b(()=>{j={version:"1.0",default_ring:"project-locked",observation:{allow:["src/**",".paradigm/**","portal.yaml"],deny:[".env*","**/*.key","**/*.pem","**/secrets/**"]},streams:{work_log:{ring:"project-locked",allow_content:["file_paths","symbol_names","outcome"],deny_content:["code_snippets","file_contents","diff_content"]},learning_journal:{ring:"user-scoped",allow_content:["pattern_descriptions","confidence_adjustments","approach_descriptions"],deny_content:["code_snippets","file_contents","symbol_names_with_context"],redaction:[{pattern:"\\b[A-Z_]{2,}_KEY\\b"},{pattern:"password|secret|token"}]},team_decisions:{ring:"project-locked",allow_content:["rationale","alternatives","symbol_references"],deny_content:["implementation_details"]}},upstream:{ring:"creator-upstream",allowed:["task_type","outcome","helpfulness","duration_bucket","error_category"],denied:["code_of_any_kind","file_paths","symbol_names","conversation_content","user_identity"]},network:{ring:"network-public",opt_in:false,if_opted_in:["aggregated_task_success_rates","anonymized_pattern_frequency"]}};});function C(e){let t=g.join(e,dt);if(!u.existsSync(t))return {...j};try{let n=u.readFileSync(t,"utf8"),r=W.load(n);return ut(j,r)}catch{return {...j}}}function ut(e,t){let n={...e};if(t.version&&(n.version=t.version),t.default_ring&&(n.default_ring=t.default_ring),t.observation&&(n.observation={allow:t.observation.allow||e.observation?.allow,deny:[...e.observation?.deny||[],...t.observation.deny||[]].filter((r,o,i)=>i.indexOf(r)===o)}),t.streams){n.streams={...e.streams};for(let r of ["work_log","learning_journal","team_decisions"])t.streams[r]&&(n.streams[r]={...e.streams?.[r],...t.streams[r],deny_content:[...e.streams?.[r]?.deny_content||[],...t.streams[r]?.deny_content||[]].filter((o,i,a)=>a.indexOf(o)===i)});}return t.upstream&&(n.upstream={...e.upstream,...t.upstream}),t.network&&(n.network={...e.network,...t.network}),t.agent_overrides&&(n.agent_overrides={...e.agent_overrides,...t.agent_overrides}),t.deployment&&(n.deployment={...e.deployment,...t.deployment}),n}function $(e,t,n){return n&&e.agent_overrides?.[n]?.observation&&e.agent_overrides[n].observation.deny?.some(o=>F(o,t))||e.observation?.deny?.some(r=>F(r,t))?false:e.observation?.allow?.length?e.observation.allow.some(r=>F(r,t)):true}function Ot(e,t,n){let r=t.streams?.[n];if(!r)return {filtered:e,redacted:[]};let o=[],i=e;if(r.redaction)for(let a of r.redaction)try{let f=new RegExp(a.pattern,"gi"),c=i.match(f);c&&(o.push(...c),i=i.replace(f,a.replacement||"[REDACTED]"));}catch{}return {filtered:i,redacted:o}}function F(e,t){if(e===t)return true;let n=e.replace(/\*\*/g,"\xA7\xA7").replace(/\*/g,"[^/]*").replace(/§§/g,".*");try{return new RegExp(`^${n}$`).test(t)}catch{return false}}var dt,X=b(()=>{H();dt=".paradigm/data-policy.yaml";});function _t(){let e=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `nom-${e}-${t}`}function St(){let e=Date.now(),t=Math.floor(Math.random()*9999).toString().padStart(4,"0");return `dbt-${e}-${t}`}function Z(e,t){let n=g$1(e),r=C(e),o=[];for(let d of n){if(!d.attention||d.benched||t.path&&!$(r,t.path,d.id))continue;let l=Y(t,d.id,d.attention);l.shouldNominate&&o.push({profile:d,score:l});}if(o.length===0)return {nominations:[],debates:[]};let i=D(e,{since:new Date(Date.now()-3e4).toISOString()}),a=o.filter(({profile:d})=>!i.find(s=>s.agent===d.id&&s.brief===K(d,t,{...o.find(m=>m.profile.id===d.id).score})));if(a.length===0)return {nominations:[],debates:[]};let f=a.map(({profile:d,score:l})=>{let s=wt(t,l),m=kt(d,t);return {id:_t(),agent:d.id,relevance:l.score,urgency:s,type:m,brief:K(d,t,l),triggered_by:[t.id],timestamp:new Date().toISOString(),surfaced:false}});vt(e,f);let c=xt(e,f);return c.length>0&&Et(e,c),{nominations:f,debates:c}}function wt(e,t){return e.severity==="critical"?"critical":e.severity==="error"||e.type==="compliance-violation"||e.type==="error-encountered"?"high":e.type==="gate-added"||e.type==="route-created"||t.score>=.9?"medium":"low"}function kt(e,t){let n=e.collaboration?.stance;return t.type==="compliance-violation"||t.type==="error-encountered"?"warning":t.type==="gate-added"||t.type==="route-created"?"observation":n==="advisory"||n==="lead"?"suggestion":"observation"}function K(e,t,n){let r=e.role||e.id;switch(t.type){case "gate-checked":return `${r}: Gate check on ${t.symbols?.join(", ")||"route"} \u2014 verify gate coverage is complete`;case "file-modified":return `${r}: ${t.path||"File"} modified \u2014 review for ${e.id==="security"?"security implications":e.id==="tester"?"test coverage":e.id==="reviewer"?"code quality":"consistency"}`;case "compliance-violation":return `${r}: Compliance violation detected \u2014 ${t.context||"check .purpose and portal.yaml coverage"}`;case "route-created":return `${r}: New route ${t.symbols?.join(", ")||""} \u2014 ${e.id==="security"?"needs gate assignment in portal.yaml":"review route structure"}`;case "gate-added":return `${r}: Gate ${t.symbols?.join(", ")||""} added \u2014 ${e.id==="security"?"verify enforcement points":"check downstream impact"}`;case "decision-made":return `${r}: Decision recorded \u2014 ${t.context?.slice(0,80)||"review for alignment with project patterns"}`;case "work-completed":return `${r}: Work completed on ${t.symbols?.join(", ")||t.context?.slice(0,40)||"task"} \u2014 review outcome`;case "error-encountered":return `${r}: Error detected \u2014 ${t.context?.slice(0,80)||"investigate root cause"}`;default:{let o=n.breakdown.symbolMatch>0?`symbol match on ${t.symbols?.join(", ")||"unknown"}`:n.breakdown.pathMatch>0?`path ${t.path||"unknown"}`:t.context?.slice(0,60)||t.type;return `${r}: ${o}`}}}function xt(e,t){if(t.length<2)return [];let n=[],r=new Map;for(let o of t)for(let i of o.triggered_by){let a=r.get(i)||[];a.push(o),r.set(i,a);}for(let[o,i]of r){if(i.length<2||new Set(i.map(d=>d.agent)).size<2)continue;let f=new Set(i.map(d=>d.type)),c=f.size>1&&f.has("warning")&&f.has("suggestion");n.push({id:St(),topic:`Multiple agents responded to event ${o}`,nominations:i.map(d=>d.id),type:c?"conflicting":"complementary",overlap_events:[o]});}return n}function O(e){return g.join(e,_,ft)}function M(e){return g.join(e,_,mt)}function vt(e,t){try{let n=g.join(e,_);u.mkdirSync(n,{recursive:!0});let r=O(e),o=t.map(a=>JSON.stringify(a)).join(`
8
+ `)+`
9
+ `;u.appendFileSync(r,o,"utf8"),Q(r,gt);let{nominationTtlDays:i}=A(e);tt(r,i*24*60*60*1e3);}catch{}}function Et(e,t){try{let n=g.join(e,_);u.mkdirSync(n,{recursive:!0});let r=M(e),o=t.map(a=>JSON.stringify(a)).join(`
10
+ `)+`
11
+ `;u.appendFileSync(r,o,"utf8"),Q(r,pt);let{debateTtlDays:i}=A(e);tt(r,i*24*60*60*1e3);}catch{}}function Q(e,t){try{let r=u.readFileSync(e,"utf8").trim().split(`
12
+ `).filter(o=>o.trim());if(r.length>t){let o=r.slice(-t);u.writeFileSync(e,o.join(`
13
+ `)+`
14
+ `,"utf8");}}catch{}}function A(e){let t={nominationTtlDays:yt,debateTtlDays:ht};try{let n=g.join(e,".paradigm","config.yaml");if(!u.existsSync(n))return t;let r=a("js-yaml"),o=u.readFileSync(n,"utf8"),a$1=r.load(o)?.ambient;return a$1?{nominationTtlDays:typeof a$1["nomination-ttl-days"]=="number"?a$1["nomination-ttl-days"]:t.nominationTtlDays,debateTtlDays:typeof a$1["debate-ttl-days"]=="number"?a$1["debate-ttl-days"]:t.debateTtlDays}:t}catch{return t}}function tt(e,t){try{if(!u.existsSync(e))return;let r=u.readFileSync(e,"utf8").trim().split(`
15
+ `).filter(a=>a.trim());if(r.length<=bt)return;let o=Date.now()-t,i=r.filter(a=>{try{let f=JSON.parse(a);return (f.timestamp?new Date(f.timestamp).getTime():Date.now())>=o}catch{return !0}});i.length<r.length&&u.writeFileSync(e,i.join(`
16
+ `)+`
17
+ `,"utf8");}catch{}}function D(e,t){let n=O(e);if(!u.existsSync(n))return [];try{let o=u.readFileSync(n,"utf8").trim().split(`
18
+ `).filter(i=>i.trim()).map(i=>{try{return JSON.parse(i)}catch{return null}}).filter(i=>i!==null);return t?.agent&&(o=o.filter(i=>i.agent===t.agent)),t?.urgency&&(o=o.filter(i=>i.urgency===t.urgency)),t?.surfaced!==void 0&&(o=o.filter(i=>i.surfaced===t.surfaced)),t?.pending_only&&(o=o.filter(i=>!i.engaged)),t?.since&&(o=o.filter(i=>i.timestamp>=t.since)),o.sort((i,a)=>a.timestamp.localeCompare(i.timestamp)),t?.limit&&(o=o.slice(0,t.limit)),o}catch{return []}}function Jt(e){let t=M(e);if(!u.existsSync(t))return [];try{return u.readFileSync(t,"utf8").trim().split(`
19
+ `).filter(r=>r.trim()).map(r=>{try{return JSON.parse(r)}catch{return null}}).filter(r=>r!==null)}catch{return []}}function Bt(e,t,n,r){let o=O(e);if(!u.existsSync(o))return false;try{let a=u.readFileSync(o,"utf8").trim().split(`
20
+ `),f=!1,c=a.map(d=>{try{let l=JSON.parse(d);return l.id===t?(l.engaged=!0,l.response=n,r&&(l.reason=r),f=!0,JSON.stringify(l)):d}catch{return d}});if(f&&(u.writeFileSync(o,c.join(`
21
+ `)+`
22
+ `,"utf8"),n==="accepted"||n==="dismissed")){let d=JSON.parse(a.find(s=>{try{return JSON.parse(s).id===t}catch{return !1}}));g$1(e).find(s=>s.id===d.agent)?.learning?.intrinsic?.feedback?.after_recommendation&&k(e,{type:"work-completed",source:"agent-action",agent:d.agent,context:`Nomination ${t} ${n} \u2014 feedback for learning`,data:{nomination_id:t,response:n}});}return f}catch{return false}}function qt(e,t,n,r){let o=M(e);if(!u.existsSync(o))return false;try{let a=u.readFileSync(o,"utf8").trim().split(`
23
+ `),f=!1,c=a.map(d=>{try{let l=JSON.parse(d);if(l.id===t){l.resolution={chosen:n,reason:r,resolved_by:"human",resolved_at:new Date().toISOString()},f=!0;let s=l.nominations.filter(m=>m!==n);for(let m of s){let p=D(e).find(y=>y.id===m);p&&k(e,{type:"work-completed",source:"agent-action",agent:p.agent,context:`Debate ${t} resolved \u2014 nomination ${m} not chosen`,data:{debate_id:t,chosen:n,reason:r}});}return JSON.stringify(l)}return d}catch{return d}});return f&&u.writeFileSync(o,c.join(`
24
+ `)+`
25
+ `,"utf8"),f}catch{return false}}function Gt(e){let t=g.join(e,_,".last-processed"),n="";try{u.existsSync(t)&&(n=u.readFileSync(t,"utf8").trim());}catch{}let r=g.join(e,_,"stream.jsonl");if(!u.existsSync(r))return {processed:0,nominations:[]};let o=[];try{o=u.readFileSync(r,"utf8").trim().split(`
26
+ `).filter(s=>s.trim()).map(s=>{try{return JSON.parse(s)}catch{return null}}).filter(s=>s!==null);}catch{return {processed:0,nominations:[]}}let i=0;if(n){let l=o.findIndex(s=>s.id===n);l>=0&&(i=l+1);}let a=o.slice(i);if(a.length===0)return {processed:0,nominations:[]};let f=[],c=a.slice(0,50);for(let l of c){let{nominations:s}=Z(e,l);f.push(...s);}let d=c[c.length-1];try{u.mkdirSync(g.join(e,_),{recursive:!0}),u.writeFileSync(t,d.id,"utf8");}catch{}return {processed:c.length,nominations:f}}function Yt(e,t,n){let r=C(e);if(t.path&&!$(r,t.path))return {event:k(e,t),nominations:[],debates:[]};let o=k(e,t);if(n?.skipNominations)return {event:o,nominations:[],debates:[]};let{nominations:i,debates:a}=Z(e,o);return i.length>0&&jt(e,i),{event:o,nominations:i,debates:a}}function zt(e,t){let n=f(e,t);if(!n?.attention)return {adjusted:false,oldThreshold:.6,newThreshold:.6,reason:"No attention config"};let r=n.attention.threshold??.6,{nominationTtlDays:o}=A(e),i=o*24*60*60*1e3,c=D(e,{agent:t}).filter(b=>b.engaged||Date.now()-new Date(b.timestamp).getTime()<i).filter(b=>b.engaged);if(c.length<5)return {adjusted:false,oldThreshold:r,newThreshold:r,reason:`Insufficient data (${c.length}/5 engaged nominations)`};let d=c.filter(b=>b.response==="accepted").length,l=c.filter(b=>b.response==="dismissed").length,s=d/c.length,m=l/c.length,p=r,y="No adjustment needed";if(m>.6?(p=Math.min(.95,r+.05),y=`High dismiss rate (${(m*100).toFixed(0)}%) \u2014 raising threshold to reduce noise`):s>.8&&(p=Math.max(.2,r-.05),y=`High accept rate (${(s*100).toFixed(0)}%) \u2014 lowering threshold to contribute more`),p===r)return {adjusted:false,oldThreshold:r,newThreshold:p,reason:y};n.attention.threshold=p;let S=g.join(e,".paradigm/agents",`${t}.agent`),x=u.existsSync(S)?"project":"global";return h(t,n,x,e),k(e,{type:"work-completed",source:"agent-action",agent:t,context:`Attention threshold adjusted: ${r.toFixed(2)} \u2192 ${p.toFixed(2)} (${y})`,data:{old_threshold:r,new_threshold:p,accept_rate:s,dismiss_rate:m}}),{adjusted:true,oldThreshold:r,newThreshold:p,reason:y}}function Nt(e,t){let{nominationTtlDays:n}=A(e),r=n*24*60*60*1e3,i=D(e,{agent:t}).filter(s=>s.engaged||Date.now()-new Date(s.timestamp).getTime()<r),a=i.filter(s=>s.response==="accepted").length,f=i.filter(s=>s.response==="dismissed").length,c=i.filter(s=>s.response==="deferred").length,d=i.filter(s=>!s.engaged).length,l=a+f+c;return {total:i.length,accepted:a,dismissed:f,deferred:c,pending:d,acceptRate:l>0?a/l:0}}function Ht(e){let n=g$1(e).filter(s=>!s.benched).map(s=>{let m=Nt(e,s.id),p=0;try{let y=g.join(R.homedir(),".paradigm","notebooks",s.id);u.existsSync(y)&&(p=u.readdirSync(y).filter(S=>S.endsWith(".yaml")).length);}catch{}return {id:s.id,acceptRate:m.acceptRate,threshold:s.attention?.threshold??.5,expertiseCount:(s.expertise||[]).length,notebookCount:p,transferableCount:(s.transferable||[]).length,totalNominations:m.total}}),r=n.length||1,o=n.reduce((s,m)=>s+m.acceptRate,0)/r,i=n.reduce((s,m)=>s+m.threshold,0)/r,a=n.reduce((s,m)=>s+m.expertiseCount,0),f=n.reduce((s,m)=>s+m.notebookCount,0),c=n.reduce((s,m)=>s+m.transferableCount,0),d=n.reduce((s,m)=>s+m.totalNominations,0),l;return d<10?l="cold-start":o<.5?l="accumulating":o<.7?l="calibrating":l="mature",{agents:n,aggregate:{avgAcceptRate:o,avgThreshold:i,totalExpertise:a,totalNotebooks:f,totalTransferable:c},healthStatus:l}}function jt(e,t){if(t.length===0)return;let n=g.join(R.homedir(),".paradigm","score","outbox");if(u.existsSync(n))try{let r=g.join(n,`nom-${Date.now()}.json`),o={type:"nomination_forward",nominations:t.map(i=>({...i})),origin:Tt(e),timestamp:new Date().toISOString()};u.writeFileSync(r,JSON.stringify(o),"utf8");}catch{}}function Tt(e){try{let t=g.join(e,".paradigm","config.yaml");if(u.existsSync(t)){let r=u.readFileSync(t,"utf8").match(/project:\s*(.+)/);if(r)return r[1].trim()}}catch{}return g.basename(e)}function Vt(e,t){let n,r;try{let c=(g$2(),d(f$1)),d$1=(g$3(),d(f$2));n=c.loadJournalEntries,r=d$1.addNotebookEntry;}catch{return {promoted:0,entries:[]}}let o=n(t,{trigger:"pattern_discovered",limit:100}),i=n(t,{trigger:"human_feedback",limit:100}),a=[...o,...i],f=[];for(let c of a)if(!c.promoted_to_notebook&&!((c.confidence_after??0)<.8))try{let{entry:d}=r(t,{context:c.pattern?.applies_when||c.insight.slice(0,80),snippet:c.pattern?.correct_approach||c.insight,concepts:c.tags||[c.pattern?.id||"learned-pattern"],provenance:{source:"journal-auto-promote",sourceId:c.id,createdBy:t}},"global",e);f.push({journalId:c.id,notebookId:d.id});try{let l=g.join(R.homedir(),".paradigm","agents",t,"journal");if(u.existsSync(l)){let s=u.readdirSync(l).filter(m=>m.endsWith(".yaml"));for(let m of s){let p=g.join(l,m),y=u.readFileSync(p,"utf8");if(y.includes(c.id)){let S=y.replace(/promoted_to_notebook:.*$/m,`promoted_to_notebook: "${d.id}"`);if(S===y){let x=y.trimEnd().split(`
27
+ `);x.push(`promoted_to_notebook: "${d.id}"`),u.writeFileSync(p,x.join(`
28
+ `)+`
29
+ `,"utf8");}else u.writeFileSync(p,S,"utf8");break}}}}catch{}}catch{}return {promoted:f.length,entries:f}}function Wt(e){let t=g.join(e,Rt),n={default_min_urgency:"low",enable_debates:true};if(!u.existsSync(t))return n;try{let r=a("js-yaml"),o=u.readFileSync(t,"utf8"),i=r.load(o);return {...n,...i}}catch{return n}}function Xt(e,t){let n={critical:0,high:1,medium:2,low:3},r=n[t.default_min_urgency||"low"]??3;return e.filter(o=>{let i=n[o.urgency]??3;if(t.preferences){let a=t.preferences.find(f=>f.agent===o.agent);if(a){if(a.always_show)return true;if(a.mute_unless?.length&&!a.mute_unless.some(c=>o.urgency===c||o.type===c))return false;if(a.min_urgency){let f=n[a.min_urgency]??3;return i<=f}}}return i<=r})}var _,ft,mt,gt,pt,yt,ht,bt,Rt,At=b(()=>{z();X();t();_=".paradigm/events",ft="nominations.jsonl",mt="debates.jsonl",gt=500,pt=200,yt=7,ht=14,bt=100;Rt=".paradigm/surfacing.yaml";});export{Dt as a,z as b,C as c,Ot as d,X as e,Z as f,xt as g,vt as h,D as i,Jt as j,Bt as k,qt as l,Gt as m,Yt as n,zt as o,Nt as p,Ht as q,jt as r,Vt as s,Wt as t,Xt as u,At as v};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import*as i from'fs';import*as d from'path';import*as f from'js-yaml';var o=new Map,u=null,P=false,m=["claude","claude-code-teams","claude-code","cursor-cli","claude-cli","manual"],p=["auto",...m],g=null;function l(r){o.set(r.name,r);}function h(r){return r&&o.has(r)?o.get(r)||null:u&&o.has(u)&&o.get(u)||null}function y(r){let a=process.env.PARADIGM_AGENT_PROVIDER;if(a&&p.includes(a))return a;if(g!==null)return g;let e=r||process.cwd(),t=d.join(e,".paradigm","config.yaml");if(i.existsSync(t))try{let n=i.readFileSync(t,"utf-8"),c=f.load(n)["agent-provider"];if(c&&p.includes(c))return g=c,c}catch{}return "auto"}async function A(r,a){if(!p.includes(r))throw new Error(`Invalid provider: ${r}. Valid options: ${p.join(", ")}`);let e=a||process.cwd(),t=d.join(e,".paradigm","config.yaml"),n={};if(i.existsSync(t))try{let c=i.readFileSync(t,"utf-8");n=f.load(c);}catch{}n["agent-provider"]=r,g=r;let s=d.dirname(t);i.existsSync(s)||i.mkdirSync(s,{recursive:true}),i.writeFileSync(t,f.dump(n));}async function I(r,a){await w(r);let e=a||y(r),t=e!=="auto";if(t){let n=o.get(e);if(n){try{if(await n.isAvailable())return {provider:n,name:e,reason:`Configured: ${v(e)}`,configured:!0}}catch{}console.warn(`Configured provider '${e}' not available, falling back...`);}}for(let n of m){let s=o.get(n);if(s)try{if(await s.isAvailable())return {provider:s,name:n,reason:t?`Fallback: ${v(n)} (configured '${e}' unavailable)`:v(n),configured:!1}}catch{}}throw new Error("No providers available")}async function R(r){await w(r);let a=[];for(let e of m){let t=o.get(e);if(!t)continue;let n=false;try{n=await t.isAvailable();}catch{}a.push({name:e,available:n,reason:n?v(e):C(e),features:{parallel:t.supportsParallel(),mcp:t.supportsMcp(),billing:b(e)}});}return a}async function w(r){if(P)return;let a=r||process.cwd();try{let{ClaudeAgentProvider:e}=await import('./claude-4LR3LJQZ.js');l(new e);}catch{}try{let{ClaudeCodeTeamsProvider:e}=await import('./claude-code-teams-R37HJY3Y.js');l(new e(a));}catch{}try{let{ClaudeCodeTaskProvider:e}=await import('./claude-code-RLJ4GX77.js');l(new e(a));}catch{}try{let{CursorCliProvider:e}=await import('./cursor-cli-QKF7Z6M2.js');l(new e);}catch{}try{let{ClaudeCliProvider:e}=await import('./claude-cli-UP6HGH7C.js');l(new e);}catch{}try{let{ManualProvider:e}=await import('./manual-RXSPSFLL.js');l(new e(a));}catch{}for(let e of m){let t=o.get(e);if(t)try{if(await t.isAvailable()){u=e;break}}catch{}}!u&&o.has("manual")&&(u="manual"),P=true;}function v(r){switch(r){case "claude":return "Using Anthropic API (ANTHROPIC_API_KEY found)";case "claude-code-teams":return "Using Claude Code Agent Teams (experimental, parallel teammates)";case "claude-code":return "Using Claude Code Task tool (running in Claude Code)";case "cursor-cli":return "Using Cursor agent CLI (running in Cursor)";case "claude-cli":return "Using Claude CLI (claude command found)";case "manual":return "Using manual handoff (no automation available)";default:return "Unknown provider"}}function C(r){switch(r){case "claude":return "ANTHROPIC_API_KEY not set";case "claude-code-teams":return "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS not set or not in Claude Code";case "claude-code":return "Not running inside Claude Code";case "cursor-cli":return "Not running in Cursor or agent CLI not found";case "claude-cli":return "claude CLI not found in PATH";case "manual":return "Should always be available";default:return "Unknown"}}function b(r){switch(r){case "claude":return "api";case "claude-code-teams":case "claude-code":case "cursor-cli":case "claude-cli":return "subscription";case "manual":return "none";default:return "none"}}export{h as a,y as b,A as c,I as d,R as e,w as f};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import*as n from'fs';import*as f from'path';import*as p from'os';import*as s from'crypto';var d=f.join(p.homedir(),".paradigm","score"),a=f.join(d,"peers.json"),g=300*1e3;function i(){try{if(!n.existsSync(a))return [];let r=n.readFileSync(a,"utf-8"),e=JSON.parse(r);return Array.isArray(e)?e:[]}catch{return []}}function c(r){n.existsSync(d)||n.mkdirSync(d,{recursive:true}),n.writeFileSync(a,JSON.stringify(r,null,2),{mode:384});}function S(r){return i().find(t=>t.id===r)??null}function l(r){let e=i(),t=e.findIndex(o=>o.id===r.id);t>=0?e[t]=r:e.push(r),c(e);}function m(r){let e=i(),t=e.find(o=>o.id===r);return t?(t.revoked=true,c(e),true):false}function x(){let e=i().length;return n.existsSync(a)&&n.unlinkSync(a),e}function y(r){let e=i(),t=e.find(o=>o.id===r);t&&(t.lastSeen=new Date().toISOString(),c(e));}function P(r,e){let t=i(),o=t.find(u=>u.id===r);o&&(o.agents=e,c(t));}function A(){let r=s.randomBytes(32).toString("hex"),e=(parseInt(s.randomBytes(3).toString("hex"),16)%1e6).toString().padStart(6,"0"),t=s.createHash("sha256").update(e).digest("hex");return {code:e,codeHash:t,sharedSecret:r,createdAt:Date.now()}}function v(r,e){return Date.now()-r.createdAt>g?false:s.createHash("sha256").update(e).digest("hex")===r.codeHash}function h(r,e){return s.createHmac("sha256",e).update(r).digest("hex")}function R(r,e,t){let o=h(r,e);if(o.length!==t.length)return false;try{return s.timingSafeEqual(Buffer.from(o,"hex"),Buffer.from(t,"hex"))}catch{return false}}export{a,g as b,i as c,c as d,S as e,l as f,m as g,x as h,y as i,P as j,A as k,v as l,h as m,R as n};
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import {a,b}from'./chunk-4TXOVRWD.js';import {m}from'./chunk-T6IDXUUA.js';import {b as b$1}from'./chunk-VCKKJDLP.js';import*as u from'fs';import*as p from'path';import*as $ from'js-yaml';import g from'chalk';import q from'ora';var _={"@":{category:"features",prefix:"@"},"#":{category:"components",prefix:"#"},"^":{category:"gates",prefix:"^"},$:{category:"flows",prefix:"$"},"&":{category:"integrations",prefix:"&"},"!":{category:"signals",prefix:"!"},"%":{category:"state",prefix:"%"}},N={features:["src/features/","features/","app/","src/app/","src/modules/","modules/"],components:["src/components/","components/","src/lib/","lib/","src/ui/","ui/"],gates:["middleware/","src/middleware/","auth/","src/auth/","guards/","src/guards/"],flows:["flows/","src/flows/","workflows/","src/workflows/","sagas/","src/sagas/"],integrations:["integrations/","src/integrations/","external/","src/external/","vendors/"],signals:["events/","src/events/","handlers/","src/handlers/"],state:["stores/","src/stores/","state/","src/state/","reducers/","src/reducers/"]},z={config:[".paradigm/config.yaml","package.json","tsconfig.json",".env.example"],entry:["src/index.ts","src/index.tsx","src/main.ts","src/main.tsx","index.ts","main.ts","src/app.ts","src/app.tsx"],types:["src/types/","types/","src/types.ts","types.ts"]},G={always:["node_modules/","dist/","build/",".git/",".next/",".nuxt/",".cache/","*.lock","*.log"],unless_testing:["**/*.test.ts","**/*.test.tsx","**/*.spec.ts","**/*.spec.tsx","__tests__/","test/","tests/"],unless_docs:["docs/","*.md","README*","CHANGELOG*"]};async function A(o,t,n={}){let r=n.quiet?null:q();r?.start("Generating navigator.yaml...");let s=M(o),e=L(o),c=H(o),i=U(t.symbols,t.purposeFiles),f={version:"1.0",generated:new Date().toISOString(),structure:s,key_files:e,skip_patterns:c,symbols:i},a=p.join(o,".paradigm"),l=p.join(a,"navigator.yaml");u.existsSync(a)||u.mkdirSync(a,{recursive:true}),u.writeFileSync(l,$.dump(f,{indent:2,lineWidth:120,noRefs:true,sortKeys:false}),"utf8"),r?.succeed(g.green("Navigator generated")),n.quiet||(console.log(g.gray(` Output: ${l}`)),console.log(g.gray(` Structure categories: ${Object.keys(s).length}`)),console.log(g.gray(` Symbol mappings: ${Object.keys(i).length}`)),console.log());}function M(o){let t={};for(let[n,r]of Object.entries(N)){let s=r.filter(e=>{let c=p.join(o,e);return u.existsSync(c)});if(s.length>0){let e=Object.values(_).find(c=>c.category===n);t[n]={paths:s,symbol:e?.prefix||"@"};}}return t}function L(o){let t={};for(let[n,r]of Object.entries(z)){let s=r.filter(e=>{let c=p.join(o,e);return u.existsSync(c)});s.length>0&&(t[n]=s);}return t.config||(t.config=[]),t.entry||(t.entry=[]),t.types||(t.types=[]),t}function H(o){let t={...G},n=p.join(o,".gitignore");if(u.existsSync(n))try{let s=u.readFileSync(n,"utf8").split(`
3
+ `).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#")).filter(e=>e.endsWith("/")||e.includes("*")||["node_modules","dist","build",".cache"].some(c=>e.includes(c))).slice(0,20);for(let e of s)t.always.includes(e)||t.always.push(e);}catch{}return t}function U(o,t,n){let r={},s=new Map;for(let e of t){let c=p.dirname(e);s.set(e,c);}for(let e of o){let i=`${W(e.type)}${e.id}`;if(e.path)r[i]=e.path;else if(e.directory)r[i]=e.directory;else {let f=t.find(a=>{let l=p.dirname(a),y=e.id.toLowerCase();return l.toLowerCase().includes(y)});f&&(r[i]=p.dirname(f)+"/");}}return r}function W(o){switch(o){case "feature":return "@";case "component":return "#";case "gate":return "^";case "flow":return "$";case "integration":return "&";case "signal":return "!";case "state":return "%";case "idea":return "?";case "deprecated":return "~";default:return "@"}}function P(o){return $.load(o)}async function ce(o,t){let n=o?p.resolve(o):process.cwd(),r=p.basename(n),s=q(),e=p.join(n,".paradigm"),c=u.existsSync(e)&&u.statSync(e).isFile(),i;t.output?i=p.resolve(t.output):c?i=p.join(n,".paradigm-scan-index.json"):(i=p.join(n,".paradigm","scan-index.json"),u.existsSync(p.dirname(i))||u.mkdirSync(p.dirname(i),{recursive:true})),t.quiet||console.log(g.blue(`
4
+ \u{1F52D} Generating Paradigm Scan Index
5
+ `));let f,a$1,l,y=[p.join(n,".paradigm"),p.join(n,".paradigm","config.yaml")];for(let h of y)if(u.existsSync(h)&&u.statSync(h).isFile())try{let m=u.readFileSync(h,"utf8"),F=P(m);f=F.scan,a$1=F.graph,l=F.context?.tiers;break}catch{}s.start("Aggregating symbols from purpose and portal files...");let d;try{d=await m(n);}catch(h){s.fail(g.red("Failed to aggregate symbols")),console.error(g.gray(h.message)),process.exit(1);}if(s.succeed(`Found ${d.symbols.length} symbols`),!t.quiet){let h={components:d.symbols.filter(m=>m.type==="component").length,flows:d.symbols.filter(m=>m.type==="flow").length,gates:d.symbols.filter(m=>m.type==="gate").length,signals:d.symbols.filter(m=>m.type==="signal").length,aspects:d.symbols.filter(m=>m.type==="aspect").length};console.log(g.gray(" Breakdown:"));for(let[m,S]of Object.entries(h))S>0&&console.log(g.gray(` ${m}: ${S}`));console.log();}s.start("Generating scan index...");let b$2=a({symbols:d.symbols,purposeFiles:d.purposeFiles,portalFiles:d.portalFiles},{projectName:r,visualTagMappings:f?.visualTagMappings,screenDefinitions:f?.screens});K(b$2,{hot:l?.["hot-threshold"],warm:l?.["warm-threshold"]});try{u.writeFileSync(i,b(b$2),"utf8"),s.succeed(g.green("Scan index generated"));}catch(h){s.fail(g.red("Failed to write scan index")),console.error(g.gray(h.message)),process.exit(1);}await A(n,d,{quiet:t.quiet});let j=await Y(n,d.purposeFiles,{quiet:t.quiet});if(j&&Object.keys(j.flows).length>0){let h=p.join(n,".paradigm","flow-index.json");u.writeFileSync(h,JSON.stringify(j,null,2),"utf8"),t.quiet||s.succeed(g.green(`Flow index generated (${Object.keys(j.flows).length} flows)`));}if(a$1?.["auto-generate"]!==false)try{let h=b$1(n),m=p.join(n,".paradigm","graphs");u.existsSync(m)||u.mkdirSync(m,{recursive:!0});let S=p.join(m,"auto.graph.json");u.writeFileSync(S,JSON.stringify(h,null,2),"utf8"),t.quiet||s.succeed(g.green(`Symbol graph updated (${h.nodes.length} nodes)`));}catch{t.quiet||s.warn(g.yellow("Could not auto-generate symbol graph"));}return t.quiet||(console.log(g.gray(`
6
+ Output: ${i}`)),console.log(g.gray(` Components: ${Object.keys(b$2.components).length}`)),console.log(g.gray(` Features: ${Object.keys(b$2.features).length}`)),console.log(g.gray(` Flows: ${Object.keys(b$2.flows).length}`)),console.log(g.gray(` State: ${Object.keys(b$2.state).length}`)),console.log(g.gray(` Gates: ${Object.keys(b$2.gates).length}`)),console.log(g.gray(` Signals: ${Object.keys(b$2.signals).length}`)),console.log(),console.log(g.blue('\u2728 Scan index ready for "paradigm probe" queries')),console.log(g.gray(` Attach an image and say "paradigm probe" to map UI to code
7
+ `))),b$2}function K(o,t){let n=t?.hot??15,r=t?.warm??5,s=new Map,e=["components","flows","gates","signals","aspects","features","state"];for(let c of e){let i=o[c];if(i)for(let[,f]of Object.entries(i)){let a=f.related;if(a)for(let l of a){let y=l.replace(/^[#$^!~]/,"");s.set(y,(s.get(y)||0)+1);}}}for(let c of e){let i=o[c];if(i)for(let[f,a]of Object.entries(i)){let l=s.get(f)||0,d=(a.visualTags||[]).length,b=l*3+d;a.tier=b>n?"hot":b>r?"warm":"cold";}}}async function Y(o,t,n){let r={},s={};for(let e of t)try{let c=u.readFileSync(e,"utf8"),i=$.load(c);if(!i?.flows)continue;if(Array.isArray(i.flows))for(let f of i.flows){let a=f;if(!a.name)continue;let l=`$${a.name}`,y=T(a.steps);if(y.length>0){let d={id:l,description:a.description||"",steps:y,definedIn:p.relative(o,e)};r[l]=d,D(l,y,s);}}else for(let[f,a]of Object.entries(i.flows)){let l=f.startsWith("$")?f:`$${f}`,y=T(a.steps);if(y.length>0){let d={id:l,description:a.description||"",trigger:a.trigger,steps:y,validation:a.validation,definedIn:p.relative(o,e)};r[l]=d,D(l,y,s);}}}catch(c){n.quiet||console.warn(g.yellow(` Warning: Could not parse flows from ${e}: ${c.message}`));}return Object.keys(r).length===0?null:{version:"1.0",generatedAt:new Date().toISOString(),flows:r,symbolToFlows:s}}function T(o){if(!o||!Array.isArray(o))return [];let t=[];for(let n=0;n<o.length;n++){let r=o[n];if(typeof r=="object"&&r!==null){let s=r,e=s.action||s.description||s.component||"";e&&t.push({id:s.id||`step-${n+1}`,action:e,symbol:s.symbol||s.component,expect:s.expect});}}return t}function D(o,t,n){for(let r of t)r.symbol&&(n[r.symbol]||(n[r.symbol]=[]),n[r.symbol].includes(o)||n[r.symbol].push(o));}export{A as a,ce as b,Y as c};
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import*as A from'fs';import*as h from'js-yaml';import {z as z$1}from'zod';import*as l from'path';import {glob}from'glob';var w=z$1.object({description:z$1.string(),type:z$1.string().optional(),parent:z$1.string().optional(),anchors:z$1.array(z$1.string()).optional(),tags:z$1.array(z$1.string()).optional(),endpoints:z$1.array(z$1.string()).optional(),tests:z$1.array(z$1.string()).optional(),rules:z$1.record(z$1.unknown()).optional(),aspects:z$1.array(z$1.string()).optional(),flows:z$1.array(z$1.string()).optional(),gates:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional(),states:z$1.array(z$1.string()).optional(),components:z$1.array(z$1.string()).optional(),location:z$1.string().optional(),locations:z$1.array(z$1.string()).optional(),uses:z$1.array(z$1.string()).optional(),"used-by":z$1.array(z$1.string()).optional(),"used-for":z$1.array(z$1.string()).optional(),exports:z$1.array(z$1.string()).optional(),status:z$1.string().optional(),properties:z$1.record(z$1.unknown()).optional(),handles:z$1.array(z$1.string()).optional()}).passthrough(),j=w.extend({id:z$1.string()}),P=z$1.object({description:z$1.string().optional(),category:z$1.string().optional(),severity:z$1.enum(["info","warn","error"]).optional(),emitters:z$1.array(z$1.string()).optional(),related:z$1.array(z$1.string()).optional(),data:z$1.record(z$1.unknown()).optional()}),E=z$1.union([P,z$1.string().transform(o=>({description:o}))]),O=z$1.object({from:z$1.string(),to:z$1.string(),type:z$1.string(),description:z$1.string().optional()}),C=z$1.union([O,z$1.string()]),F=z$1.object({component:z$1.string(),action:z$1.string(),description:z$1.string().optional()}),k=z$1.union([F,z$1.string()]),I=z$1.object({name:z$1.string(),description:z$1.string().optional(),steps:z$1.array(k)}),R=z$1.object({description:z$1.string().optional(),gates:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional(),components:z$1.array(z$1.string()).optional(),steps:z$1.array(k).optional()}),D=z$1.object({description:z$1.string().optional(),requires:z$1.array(z$1.string()).optional(),keys:z$1.array(z$1.string()).optional(),signals:z$1.array(z$1.string()).optional()}),M=z$1.object({description:z$1.string().optional(),default:z$1.unknown().optional(),type:z$1.string().optional()}),Y=z$1.object({description:z$1.string().optional(),tags:z$1.array(z$1.string()).optional(),anchors:z$1.array(z$1.string()).optional(),"applies-to":z$1.array(z$1.string()).optional(),enforcement:z$1.string().optional()}),V=z$1.object({target:z$1.string(),type:z$1.string(),path:z$1.string()}),W=z$1.object({version:z$1.string().optional(),description:z$1.string().optional(),apiSpec:z$1.string().optional(),context:z$1.array(z$1.string()).optional(),rules:z$1.record(z$1.unknown()).optional(),features:z$1.union([z$1.array(j),z$1.record(w)]).optional(),components:z$1.union([z$1.array(j),z$1.record(w)]).optional(),gates:z$1.record(D).optional(),states:z$1.record(M).optional(),signals:z$1.record(E).optional(),aspects:z$1.record(Y).optional(),relationships:z$1.array(C).optional(),flows:z$1.union([z$1.array(I),z$1.record(R)]).optional(),references:z$1.array(V).optional()});function T(o){let e=z(o);return {data:e.data,errors:e.errors}}function z(o){let e=[],c=[],n;try{n=A.readFileSync(o,"utf8");}catch(r){let p=`Cannot read file: ${r.message}`;return e.push(p),c.push({message:p,type:"file"}),{data:null,errors:e,detailedErrors:c,rawContent:void 0,isYamlValid:false}}let a=n.replace(/^([#~!$^][\w-]+):/gm,'"$1":').replace(/^(\s*-\s+)([!#][\w-]+)$/gm,'$1"$2"'),s=null;try{s=h.load(a);}catch(r){let p=r,f=p.mark?.line?p.mark.line+1:void 0,u=`YAML syntax error: ${p.reason||r.message}`;return e.push(`${u}${f?` (line ${f})`:""}`),c.push({message:u,line:f,type:"yaml"}),{data:null,errors:e,detailedErrors:c,rawContent:n,isYamlValid:false}}if(s==null)return {data:{},errors:[],detailedErrors:[],rawContent:n,isYamlValid:true};if(typeof s=="object"&&s!==null){let r=s,p={"#":"components",$:"flows","^":"gates","!":"signals","~":"aspects"};for(let f of Object.keys(r)){let u=f[0],g=p[u];if(!g||f.length<2)continue;let b=f.slice(1),m=r[f];if(typeof m!="object"||m===null)continue;let y=r[g]||{};g in r||(r[g]=y),b in y||(y[b]=m),delete r[f];}}let i=W.safeParse(s);if(!i.success){for(let r of i.error.issues){let p=r.path.join("."),f=r.message;e.push(`Schema error at ${p||"/"}: ${f}`),c.push({message:f,path:p||"/",type:"schema"});}return {data:s,errors:e,detailedErrors:c,rawContent:n,isYamlValid:true}}return {data:i.data,errors:[],detailedErrors:[],rawContent:n,isYamlValid:true}}function L(o){return h.dump(o,{indent:2,lineWidth:-1,noRefs:true,sortKeys:false})}function H(){return L({version:"1.0.0",description:"Project purpose and context",context:["Add contextual notes for AI agents here"],features:{},components:{}})}function d(o){return o?Array.isArray(o)?o.map(e=>[e.id,e]):Object.entries(o):[]}function N(o){let e={description:"",context:[],rules:{},features:{},components:{},referencedItems:{},ruleConflicts:[]};if(!o||o.length===0)return e;o.forEach(({data:n})=>{let a=new Set(e.context);for(let r of n.context||[])a.has(r)||(e.context.push(r),a.add(r));if(n.rules)for(let[r,p]of Object.entries(n.rules))e.rules[r]!==void 0&&e.rules[r]!==p&&e.ruleConflicts.push(`Conflict on rule "${r}": existing value "${e.rules[r]}" overwritten with "${p}"`),e.rules[r]=p;let s=d(n.features);for(let[r,p]of s)e.features[r]=p;let i=d(n.components);for(let[r,p]of i)e.components[r]=p;});let c=o[o.length-1];return e.description=c.data.description||e.description,e.apiSpec=c.data.apiSpec||e.apiSpec,e}async function Z(o){let e=l.resolve(o);return (await glob("**/.purpose",{cwd:e,absolute:true,ignore:["**/node_modules/**","**/dist/**","**/.git/**"]})).sort((n,a)=>{let s=n.split(l.sep).length,i=a.split(l.sep).length;return s-i})}async function U(o){let e=await Z(o),c=[];for(let n of e){let{data:a,errors:s}=T(n);a&&(c.push({filePath:n,data:a}),s.length>0&&console.warn(`Warnings parsing ${n}:`,s));}return c}function J(o){let e=new Map;for(let{filePath:c,data:n}of o){let a=d(n.features);for(let[s,i]of a)e.set(s,{item:i,filePath:c});}return e}function Q(o){let e=new Map;for(let{filePath:c,data:n}of o){let a=d(n.components);for(let[s,i]of a)e.set(s,{item:i,filePath:c});}return e}function X(o){let e=new Map;for(let{filePath:c,data:n}of o)if(n.gates)for(let[a,s]of Object.entries(n.gates))e.set(a,{item:s,filePath:c});return e}function tt(o){let e=new Map;for(let{filePath:c,data:n}of o)if(n.states)for(let[a,s]of Object.entries(n.states))e.set(a,{item:s,filePath:c});return e}function et(o){let e=new Map;for(let{filePath:c,data:n}of o)if(n.flows)if(Array.isArray(n.flows))for(let a of n.flows)e.set(a.name,{item:{id:a.name,description:a.description,steps:a.steps},filePath:c});else for(let[a,s]of Object.entries(n.flows))e.set(a,{item:{id:a,description:s.description,gates:s.gates,signals:s.signals,components:s.components,steps:s.steps},filePath:c});return e}function ot(o){let e=new Map;for(let{filePath:c,data:n}of o)if(n.signals)for(let[a,s]of Object.entries(n.signals))e.set(a,{item:s,filePath:c});return e}function st(o){let e=new Map;for(let{filePath:c,data:n}of o)if(n.aspects)for(let[a,s]of Object.entries(n.aspects))e.set(a,{item:s,filePath:c});return e}function nt(o){let e=[],c=new Set;for(let{filePath:n,data:a}of o){let s=d(a.features);for(let[r,p]of s)v(`#${r}`,p,n,e,c);let i=d(a.components);for(let[r,p]of i)v(`#${r}`,p,n,e,c);}return e}function v(o,e,c,n,a){if(e.flows)for(let s of e.flows){let i=s.startsWith("$")?s:`$${s}`;a.has(i)||(a.add(i),n.push({symbol:i,type:"flow",sourceSymbol:o,filePath:c}));}if(e.gates)for(let s of e.gates){let i=s.startsWith("^")?s:`^${s}`;a.has(i)||(a.add(i),n.push({symbol:i,type:"gate",sourceSymbol:o,filePath:c}));}if(e.signals)for(let s of e.signals){let i=s.startsWith("!")?s:`!${s}`;a.has(i)||(a.add(i),n.push({symbol:i,type:"signal",sourceSymbol:o,filePath:c}));}if(e.states)for(let s of e.states){let i=s.startsWith("#")?s:s.startsWith("%")?`#${s.slice(1)}`:`#${s}`;a.has(i)||(a.add(i),n.push({symbol:i,type:"component",sourceSymbol:o,filePath:c}));}if(e.components)for(let s of e.components){let i=s.startsWith("#")?s:`#${s}`;a.has(i)||(a.add(i),n.push({symbol:i,type:"component",sourceSymbol:o,filePath:c}));}if(e.aspects)for(let s of e.aspects){let i=s.startsWith("~")?s:`~${s}`;a.has(i)||(a.add(i),n.push({symbol:i,type:"aspect",sourceSymbol:o,filePath:c}));}if(e.description){let s=_(e.description);for(let{symbol:i,type:r}of s)a.has(i)||(a.add(i),n.push({symbol:i,type:r,sourceSymbol:o,filePath:c}));}}var B=new Set(["$lib","$env","$app","$service-worker","$virtual","$schema","$ref","$id","$type"]);function _(o){let e=[],c=/([$^!#~%])([a-zA-Z][a-zA-Z0-9._-]*)/g,n;for(;(n=c.exec(o))!==null;){let a=n[1],s=n[2],i,r;switch(a){case "#":r="component",i=`#${s}`;break;case "$":r="flow",i=`$${s}`;break;case "^":r="gate",i=`^${s}`;break;case "!":r="signal",i=`!${s}`;break;case "~":r="aspect",i=`~${s}`;break;case "%":r="component",i=`#${s}`;break;default:continue}B.has(i)||e.push({symbol:i,type:r});}return e}function S(o){return o?Array.isArray(o)?o.map(e=>[e.id,e]):Object.entries(o):[]}function $(o){return o?Array.isArray(o)?o.map(e=>e.id):Object.keys(o):[]}function rt(o,e){let c=[],n=e?`${e}: `:"",a=S(o.features);for(let[i,r]of a)x(i,r,"feature",n,c);let s=S(o.components);for(let[i,r]of s)x(i,r,"component",n,c);if(o.relationships){let i=new Set([...$(o.features),...$(o.components)]);for(let r of o.relationships){if(typeof r=="string"||!r||!r.from||!r.to)continue;let p=r.from.replace(/^[@#$%~^!?]/,"");!i.has(p)&&!r.from.includes(".")&&c.push({type:"warning",message:`${n}Relationship references unknown source: "${r.from}"`,path:"relationships"});let f=r.to.replace(/^[@#$%~^!?]/,"");!i.has(f)&&!r.to.includes(".")&&c.push({type:"warning",message:`${n}Relationship references unknown target: "${r.to}"`,path:"relationships"});}}if(o.flows){let i=new Set($(o.components));if(Array.isArray(o.flows)){for(let r of o.flows)if(!(!r||typeof r!="object")&&(r.name||c.push({type:"error",message:`${n}Flow missing required "name" field`,path:"flows"}),r.steps&&Array.isArray(r.steps)))for(let p of r.steps){if(typeof p=="string"||!p||!p.component)continue;let f=p.component.replace(/^#/,"");i.has(f)||c.push({type:"warning",message:`${n}Flow "${r.name}" references unknown component: "${p.component}"`,path:`flows.${r.name}`});}}else for(let[r,p]of Object.entries(o.flows))if(!(!p||typeof p!="object")&&p.steps&&Array.isArray(p.steps))for(let f of p.steps){if(typeof f=="string"||!f||!f.component)continue;let u=f.component.replace(/^#/,"");i.has(u)||c.push({type:"warning",message:`${n}Flow "${r}" references unknown component: "${f.component}"`,path:`flows.${r}`});}}return {valid:c.filter(i=>i.type==="error").length===0,issues:c}}function x(o,e,c,n,a){let s=`${c}s.${o}`;if(/^[a-zA-Z][a-zA-Z0-9-]*$/.test(o)||a.push({type:"warning",message:`${n}${c} ID "${o}" should use alphanumeric characters and hyphens`,path:s}),(!e.description||e.description.trim()==="")&&a.push({type:"warning",message:`${n}${c} "${o}" has no description`,path:s}),e.endpoints)for(let i of e.endpoints)/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+\//.test(i)||a.push({type:"warning",message:`${n}Endpoint "${i}" in ${c} "${o}" may not be in standard format (e.g., "GET /api/users")`,path:`${s}.endpoints`});}function at(o){if(o.valid&&o.issues.length===0)return "\u2705 Purpose file is valid";let e=[],c=o.issues.filter(a=>a.type==="error"),n=o.issues.filter(a=>a.type==="warning");if(c.length>0){e.push(`
3
+ \u274C ${c.length} error(s):`);for(let a of c)e.push(` \u2022 ${a.message}${a.path?` (${a.path})`:""}`);}if(n.length>0){e.push(`
4
+ \u26A0\uFE0F ${n.length} warning(s):`);for(let a of n)e.push(` \u2022 ${a.message}${a.path?` (${a.path})`:""}`);}return o.valid?e.push(`
5
+ \u2705 Purpose file is valid (with warnings)`):e.push(`
6
+ \u274C Purpose file is invalid`),e.join(`
7
+ `)}export{z as a,L as b,H as c,N as d,Z as e,U as f,J as g,Q as h,X as i,tt as j,et as k,ot as l,st as m,nt as n,rt as o,at as p};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import*as s from'fs';import*as m from'path';import*as u from'js-yaml';var d=".paradigm/work-log";function p(a){let n=new Date().toISOString().slice(0,10),c=a.toLowerCase().replace(/[^a-z0-9-]/g,"-").slice(0,20),i=String(Math.floor(Math.random()*999)+1).padStart(3,"0");return `WL-${c}-${n}-${i}`}function k(a,o){return m.join(a,d,o)}function h(a,o){let n=new Date,c=n.toISOString().slice(0,10),i=p(o.agent),e={id:i,timestamp:n.toISOString(),...o},t=k(a,c);s.mkdirSync(t,{recursive:true});let r=m.join(t,`${i}.yaml`);return s.writeFileSync(r,u.dump(e,{lineWidth:120,noRefs:true}),"utf8"),e}function W(a,o){let n=m.join(a,d);if(!s.existsSync(n))return [];let c=[],i=s.readdirSync(n,{withFileTypes:true}).filter(t=>t.isDirectory()&&/^\d{4}-\d{2}-\d{2}$/.test(t.name)).map(t=>t.name).sort().reverse();for(let t of i){if(o?.dateFrom&&t<o.dateFrom||o?.dateTo&&t>o.dateTo)continue;let r=m.join(n,t),l=s.readdirSync(r).filter(g=>g.endsWith(".yaml"));for(let g of l)try{let y=s.readFileSync(m.join(r,g),"utf8"),f=u.load(y);f&&f.id&&c.push(f);}catch{}}let e=c;return o?.agent&&(e=e.filter(t=>t.agent===o.agent)),o?.outcome&&(e=e.filter(t=>t.outcome===o.outcome)),o?.task_ref&&(e=e.filter(t=>t.task_ref===o.task_ref)),o?.symbol&&(e=e.filter(t=>t.symbols_touched?.includes(o.symbol))),e.sort((t,r)=>r.timestamp.localeCompare(t.timestamp)),o?.limit&&(e=e.slice(0,o.limit)),e}function S(a,o){let n=m.join(a,d);if(!s.existsSync(n))return null;let c=o.match(/WL-[^-]+-(\d{4}-\d{2}-\d{2})-/);if(c){let e=m.join(n,c[1],`${o}.yaml`);if(s.existsSync(e)){let t=s.readFileSync(e,"utf8");return u.load(t)}}let i=s.readdirSync(n,{withFileTypes:true}).filter(e=>e.isDirectory());for(let e of i){let t=m.join(n,e.name,`${o}.yaml`);if(s.existsSync(t)){let r=s.readFileSync(t,"utf8");return u.load(r)}}return null}function L(a,o=7){let n=new Date;n.setDate(n.getDate()-o);let c=n.toISOString().slice(0,10),i=W(a,{dateFrom:c}),e={pass:0,fail:0,partial:0,blocked:0},t={};for(let r of i)e[r.outcome]=(e[r.outcome]||0)+1,t[r.agent]=(t[r.agent]||0)+1;return {total:i.length,byOutcome:e,byAgent:t,recentEntries:i.slice(0,10).map(r=>({id:r.id,agent:r.agent,summary:r.summary,outcome:r.outcome,timestamp:r.timestamp}))}}export{h as a,W as b,S as c,L as d};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import*as t from'js-yaml';var n={"#":{name:"Component",description:"Any documented code unit",owner:"purpose",examples:["#Button","#api-client","#AuthProvider"]},$:{name:"Flow",description:"Multi-step processes or user journeys",owner:"shared",examples:["$checkout-flow","$auth-flow"]},"^":{name:"Gate",description:"Authorization checkpoints",owner:"portal",examples:["^authenticated","^admin-only","^resource-owner"]},"!":{name:"Signal",description:"Events for side effects",owner:"portal",examples:["!payment-completed","!login-failed","!rate-limited"]},"~":{name:"Aspect",description:"Rules with required code anchors",owner:"purpose",examples:["~audit-required","~rate-limited","~cache-invalidation"]}},i=["Use kebab-case for all symbol IDs (feature-name, not featureName)","Document flows when logic spans 3+ components","Reference related items using symbol prefixes (@ # $ % ~ ^ ! ?)","Add descriptions to all features and gates","Update .purpose files when changing feature behavior","Keep gates minimal - one responsibility per gate","Use signals for side effects, not direct state mutations"];function r(e){return {version:"1.0","agent-guidelines":{overview:`${e} uses Paradigm for structured planning and context management.`,"how-to-use":["Check .purpose files in directories for context before making changes","Run `paradigm status` to see the project symbol index","Run `paradigm visualize` to explore the Dreamscape","Reference symbols using prefixes: @feature #component ^gate",'Attach an image and say "paradigm scan" to map UI to code'],"update-rules":["When adding a feature, create/update the nearest .purpose file","When adding authorization, update portal.yaml","When exploring ideas, add to .premise or use ?symbol prefix","Always update references when renaming symbols"]},"symbol-system":n,states:{user:{authenticated:{type:"boolean",default:false,description:"User is logged in"},role:{type:"enum",values:["guest","user","admin"],description:"User access level"}},app:{loading:{type:"boolean",default:false,description:"App is loading"}}},"purpose-required":[{pattern:"src/features/*",depth:1},{pattern:"src/components/*",depth:1}],conventions:i,scan:{enabled:true,autoInclude:true}}}function o(e){return t.dump(e,{lineWidth:-1,quotingType:'"'})}function a(e){return t.load(e)}export{n as a,i as b,r as c,o as d,a as e};