@cyberismo/backend 1.2.0 → 1.3.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 (468) hide show
  1. package/dist/app.d.ts +5 -15
  2. package/dist/app.js +28 -38
  3. package/dist/app.js.map +1 -1
  4. package/dist/auth/index.d.ts +0 -12
  5. package/dist/auth/index.js +2 -12
  6. package/dist/auth/index.js.map +1 -1
  7. package/dist/auth/keycloak.d.ts +0 -12
  8. package/dist/auth/keycloak.js +2 -12
  9. package/dist/auth/keycloak.js.map +1 -1
  10. package/dist/auth/mock.d.ts +0 -12
  11. package/dist/auth/mock.js +2 -12
  12. package/dist/auth/mock.js.map +1 -1
  13. package/dist/auth/types.d.ts +0 -12
  14. package/dist/auth/types.js +2 -12
  15. package/dist/auth/types.js.map +1 -1
  16. package/dist/common/errors.d.ts +12 -0
  17. package/dist/common/errors.js +31 -0
  18. package/dist/common/errors.js.map +1 -0
  19. package/dist/common/validationSchemas.d.ts +0 -12
  20. package/dist/common/validationSchemas.js +2 -12
  21. package/dist/common/validationSchemas.js.map +1 -1
  22. package/dist/domain/auth/index.d.ts +0 -12
  23. package/dist/domain/auth/index.js +2 -12
  24. package/dist/domain/auth/index.js.map +1 -1
  25. package/dist/domain/calculations/index.d.ts +0 -12
  26. package/dist/domain/calculations/index.js +4 -14
  27. package/dist/domain/calculations/index.js.map +1 -1
  28. package/dist/domain/calculations/schema.d.ts +0 -12
  29. package/dist/domain/calculations/schema.js +2 -12
  30. package/dist/domain/calculations/schema.js.map +1 -1
  31. package/dist/domain/calculations/service.d.ts +2 -14
  32. package/dist/domain/calculations/service.js +7 -17
  33. package/dist/domain/calculations/service.js.map +1 -1
  34. package/dist/domain/cardTypes/index.d.ts +0 -12
  35. package/dist/domain/cardTypes/index.js +10 -20
  36. package/dist/domain/cardTypes/index.js.map +1 -1
  37. package/dist/domain/cardTypes/schema.d.ts +0 -12
  38. package/dist/domain/cardTypes/schema.js +2 -12
  39. package/dist/domain/cardTypes/schema.js.map +1 -1
  40. package/dist/domain/cardTypes/service.d.ts +4 -16
  41. package/dist/domain/cardTypes/service.js +17 -25
  42. package/dist/domain/cardTypes/service.js.map +1 -1
  43. package/dist/domain/cards/index.d.ts +0 -12
  44. package/dist/domain/cards/index.js +120 -102
  45. package/dist/domain/cards/index.js.map +1 -1
  46. package/dist/domain/cards/lib.d.ts +6 -23
  47. package/dist/domain/cards/lib.js +7 -126
  48. package/dist/domain/cards/lib.js.map +1 -1
  49. package/dist/domain/cards/mermaid.d.ts +8 -0
  50. package/dist/domain/cards/mermaid.js +23 -0
  51. package/dist/domain/cards/mermaid.js.map +1 -0
  52. package/dist/domain/cards/schema.d.ts +6 -12
  53. package/dist/domain/cards/schema.js +6 -12
  54. package/dist/domain/cards/schema.js.map +1 -1
  55. package/dist/domain/cards/service.d.ts +28 -32
  56. package/dist/domain/cards/service.js +119 -83
  57. package/dist/domain/cards/service.js.map +1 -1
  58. package/dist/domain/connectors/index.d.ts +0 -12
  59. package/dist/domain/connectors/index.js +4 -14
  60. package/dist/domain/connectors/index.js.map +1 -1
  61. package/dist/domain/connectors/service.d.ts +2 -14
  62. package/dist/domain/connectors/service.js +4 -14
  63. package/dist/domain/connectors/service.js.map +1 -1
  64. package/dist/domain/events/events-by-project.d.ts +19 -0
  65. package/dist/domain/events/events-by-project.js +57 -0
  66. package/dist/domain/events/events-by-project.js.map +1 -0
  67. package/dist/domain/events/index.d.ts +0 -12
  68. package/dist/domain/events/index.js +3 -13
  69. package/dist/domain/events/index.js.map +1 -1
  70. package/dist/domain/events/lifetime.d.ts +0 -12
  71. package/dist/domain/events/lifetime.js +2 -12
  72. package/dist/domain/events/lifetime.js.map +1 -1
  73. package/dist/domain/events/project-events.d.ts +10 -14
  74. package/dist/domain/events/project-events.js +22 -18
  75. package/dist/domain/events/project-events.js.map +1 -1
  76. package/dist/domain/events/schema.d.ts +0 -12
  77. package/dist/domain/events/schema.js +2 -12
  78. package/dist/domain/events/schema.js.map +1 -1
  79. package/dist/domain/fieldTypes/index.d.ts +0 -12
  80. package/dist/domain/fieldTypes/index.js +6 -16
  81. package/dist/domain/fieldTypes/index.js.map +1 -1
  82. package/dist/domain/fieldTypes/schema.d.ts +0 -12
  83. package/dist/domain/fieldTypes/schema.js +2 -12
  84. package/dist/domain/fieldTypes/schema.js.map +1 -1
  85. package/dist/domain/fieldTypes/service.d.ts +4 -16
  86. package/dist/domain/fieldTypes/service.js +7 -17
  87. package/dist/domain/fieldTypes/service.js.map +1 -1
  88. package/dist/domain/graphModels/index.d.ts +0 -12
  89. package/dist/domain/graphModels/index.js +4 -14
  90. package/dist/domain/graphModels/index.js.map +1 -1
  91. package/dist/domain/graphModels/schema.d.ts +0 -12
  92. package/dist/domain/graphModels/schema.js +2 -12
  93. package/dist/domain/graphModels/schema.js.map +1 -1
  94. package/dist/domain/graphModels/service.d.ts +2 -14
  95. package/dist/domain/graphModels/service.js +4 -14
  96. package/dist/domain/graphModels/service.js.map +1 -1
  97. package/dist/domain/graphViews/index.d.ts +0 -12
  98. package/dist/domain/graphViews/index.js +4 -14
  99. package/dist/domain/graphViews/index.js.map +1 -1
  100. package/dist/domain/graphViews/schema.js +2 -0
  101. package/dist/domain/graphViews/schema.js.map +1 -1
  102. package/dist/domain/graphViews/service.d.ts +2 -14
  103. package/dist/domain/graphViews/service.js +4 -14
  104. package/dist/domain/graphViews/service.js.map +1 -1
  105. package/dist/domain/labels/index.d.ts +0 -12
  106. package/dist/domain/labels/index.js +4 -14
  107. package/dist/domain/labels/index.js.map +1 -1
  108. package/dist/domain/labels/service.d.ts +3 -15
  109. package/dist/domain/labels/service.js +5 -15
  110. package/dist/domain/labels/service.js.map +1 -1
  111. package/dist/domain/linkTypes/index.d.ts +0 -12
  112. package/dist/domain/linkTypes/index.js +6 -16
  113. package/dist/domain/linkTypes/index.js.map +1 -1
  114. package/dist/domain/linkTypes/schema.d.ts +0 -12
  115. package/dist/domain/linkTypes/schema.js +2 -12
  116. package/dist/domain/linkTypes/schema.js.map +1 -1
  117. package/dist/domain/linkTypes/service.d.ts +3 -15
  118. package/dist/domain/linkTypes/service.js +7 -17
  119. package/dist/domain/linkTypes/service.js.map +1 -1
  120. package/dist/domain/logicPrograms/index.d.ts +0 -12
  121. package/dist/domain/logicPrograms/index.js +4 -14
  122. package/dist/domain/logicPrograms/index.js.map +1 -1
  123. package/dist/domain/logicPrograms/service.d.ts +2 -14
  124. package/dist/domain/logicPrograms/service.js +5 -3
  125. package/dist/domain/logicPrograms/service.js.map +1 -1
  126. package/dist/domain/mcp/index.d.ts +3 -15
  127. package/dist/domain/mcp/index.js +27 -21
  128. package/dist/domain/mcp/index.js.map +1 -1
  129. package/dist/domain/project/index.d.ts +0 -12
  130. package/dist/domain/project/index.js +30 -40
  131. package/dist/domain/project/index.js.map +1 -1
  132. package/dist/domain/project/schema.d.ts +0 -12
  133. package/dist/domain/project/schema.js +2 -12
  134. package/dist/domain/project/schema.js.map +1 -1
  135. package/dist/domain/project/service.d.ts +16 -28
  136. package/dist/domain/project/service.js +48 -58
  137. package/dist/domain/project/service.js.map +1 -1
  138. package/dist/domain/projects/index.d.ts +2 -14
  139. package/dist/domain/projects/index.js +19 -36
  140. package/dist/domain/projects/index.js.map +1 -1
  141. package/dist/domain/projects/schema.d.ts +1 -12
  142. package/dist/domain/projects/schema.js +3 -12
  143. package/dist/domain/projects/schema.js.map +1 -1
  144. package/dist/domain/projects/service.d.ts +9 -35
  145. package/dist/domain/projects/service.js +12 -48
  146. package/dist/domain/projects/service.js.map +1 -1
  147. package/dist/domain/reports/index.d.ts +0 -12
  148. package/dist/domain/reports/index.js +4 -14
  149. package/dist/domain/reports/index.js.map +1 -1
  150. package/dist/domain/reports/schema.d.ts +0 -12
  151. package/dist/domain/reports/schema.js +2 -12
  152. package/dist/domain/reports/schema.js.map +1 -1
  153. package/dist/domain/reports/service.d.ts +2 -14
  154. package/dist/domain/reports/service.js +4 -14
  155. package/dist/domain/reports/service.js.map +1 -1
  156. package/dist/domain/resources/index.d.ts +0 -12
  157. package/dist/domain/resources/index.js +19 -26
  158. package/dist/domain/resources/index.js.map +1 -1
  159. package/dist/domain/resources/schema.js +2 -0
  160. package/dist/domain/resources/schema.js.map +1 -1
  161. package/dist/domain/resources/service.d.ts +11 -23
  162. package/dist/domain/resources/service.js +48 -59
  163. package/dist/domain/resources/service.js.map +1 -1
  164. package/dist/domain/skills/index.d.ts +0 -12
  165. package/dist/domain/skills/index.js +4 -14
  166. package/dist/domain/skills/index.js.map +1 -1
  167. package/dist/domain/skills/schema.d.ts +0 -12
  168. package/dist/domain/skills/schema.js +2 -12
  169. package/dist/domain/skills/schema.js.map +1 -1
  170. package/dist/domain/skills/service.d.ts +2 -14
  171. package/dist/domain/skills/service.js +4 -14
  172. package/dist/domain/skills/service.js.map +1 -1
  173. package/dist/domain/templates/index.d.ts +0 -12
  174. package/dist/domain/templates/index.js +8 -18
  175. package/dist/domain/templates/index.js.map +1 -1
  176. package/dist/domain/templates/schema.d.ts +0 -12
  177. package/dist/domain/templates/schema.js +2 -12
  178. package/dist/domain/templates/schema.js.map +1 -1
  179. package/dist/domain/templates/service.d.ts +4 -16
  180. package/dist/domain/templates/service.js +8 -18
  181. package/dist/domain/templates/service.js.map +1 -1
  182. package/dist/domain/tree/index.d.ts +0 -12
  183. package/dist/domain/tree/index.js +4 -14
  184. package/dist/domain/tree/index.js.map +1 -1
  185. package/dist/domain/tree/service.d.ts +3 -15
  186. package/dist/domain/tree/service.js +8 -15
  187. package/dist/domain/tree/service.js.map +1 -1
  188. package/dist/domain/workflows/index.d.ts +0 -12
  189. package/dist/domain/workflows/index.js +4 -14
  190. package/dist/domain/workflows/index.js.map +1 -1
  191. package/dist/domain/workflows/schema.d.ts +0 -12
  192. package/dist/domain/workflows/schema.js +2 -12
  193. package/dist/domain/workflows/schema.js.map +1 -1
  194. package/dist/domain/workflows/service.d.ts +2 -14
  195. package/dist/domain/workflows/service.js +4 -14
  196. package/dist/domain/workflows/service.js.map +1 -1
  197. package/dist/export.d.ts +6 -20
  198. package/dist/export.js +19 -29
  199. package/dist/export.js.map +1 -1
  200. package/dist/index.d.ts +3 -5
  201. package/dist/index.js +19 -43
  202. package/dist/index.js.map +1 -1
  203. package/dist/main.js +19 -30
  204. package/dist/main.js.map +1 -1
  205. package/dist/middleware/auth.d.ts +0 -12
  206. package/dist/middleware/auth.js +2 -12
  207. package/dist/middleware/auth.js.map +1 -1
  208. package/dist/middleware/commandManager.d.ts +15 -20
  209. package/dist/middleware/commandManager.js +27 -36
  210. package/dist/middleware/commandManager.js.map +1 -1
  211. package/dist/middleware/tree.js +2 -0
  212. package/dist/middleware/tree.js.map +1 -1
  213. package/dist/middleware/zvalidator.js +2 -0
  214. package/dist/middleware/zvalidator.js.map +1 -1
  215. package/dist/overlay.d.ts +4 -16
  216. package/dist/overlay.js +22 -17
  217. package/dist/overlay.js.map +1 -1
  218. package/dist/public/THIRD-PARTY.txt +1397 -286
  219. package/dist/public/assets/__vite-browser-external-DGgK3jMU.js +1 -0
  220. package/dist/public/assets/abnfDiagram-WEYOIA3C-B3qq7PKv.js +1 -0
  221. package/dist/public/assets/architecture-WOLXFQ4H-Bzau2LI0.js +1 -0
  222. package/dist/public/assets/architectureDiagram-ZHVYKT53-Bg0cUwdb.js +36 -0
  223. package/dist/public/assets/blockDiagram-RJAE7QA3-0RJB-ra-.js +140 -0
  224. package/dist/public/assets/c4Diagram-XDPPPE54-BzoQcLvf.js +38 -0
  225. package/dist/public/assets/channel-6BNdw4Ax.js +1 -0
  226. package/dist/public/assets/{chunk-SVP7TREG-CIQMl7hl.js → chunk-2E7WHVMD-6aqPk-Hk.js} +4 -4
  227. package/dist/public/assets/chunk-4EMNKR2T-vovNSAaE.js +1 -0
  228. package/dist/public/assets/{chunk-F27PBJKO-tDfs6zeO.js → chunk-55XCU76K-DXkKnt2y.js} +1 -1
  229. package/dist/public/assets/chunk-7S6XSTFO-B9bfO0l3.js +2 -0
  230. package/dist/public/assets/chunk-AQDTSKZB-ilLy_cYP.js +72 -0
  231. package/dist/public/assets/chunk-DSNLSHJZ-DAudglXu.js +129 -0
  232. package/dist/public/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
  233. package/dist/public/assets/chunk-HAGFOTED-CSKFgs6b.js +62 -0
  234. package/dist/public/assets/chunk-HNE4Q36P-Cu5gPBVk.js +1 -0
  235. package/dist/public/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
  236. package/dist/public/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +136 -0
  237. package/dist/public/assets/chunk-NQOKRVIF-Bpcvhq1n.js +213 -0
  238. package/dist/public/assets/chunk-UHW7PFBP-BDjvOaTH.js +1 -0
  239. package/dist/public/assets/chunk-VQ5W62QI-DHTcO93W.js +1 -0
  240. package/dist/public/assets/chunk-WQQL4CDK-H6nAhuck.js +10 -0
  241. package/dist/public/assets/{chunk-XXDRQBXY-B7bWyHjt.js → chunk-XXDRQBXY-BUghdEVl.js} +1 -1
  242. package/dist/public/assets/chunk-YZO67HFG-D13E0_Yh.js +1 -0
  243. package/dist/public/assets/chunk-ZAUX2LTX-Dp5y-2wt.js +1 -0
  244. package/dist/public/assets/chunk-ZCHMQSOR-RJjlln1D.js +2 -0
  245. package/dist/public/assets/classDiagram-v2-4MYWR3UA-CAqiFCSv.js +217 -0
  246. package/dist/public/assets/cose-bilkent-JH36ORCC-C_VOHzoP.js +1 -0
  247. package/dist/public/assets/cynefin-EF2NZ3EQ-Dyk4ZPjK.js +1 -0
  248. package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-_V_nrIhD.js → cynefinDiagram-WF24UDRP-b_Ia8gQX.js} +1 -1
  249. package/dist/public/assets/cytoscape.esm-GRKmfDkD.js +321 -0
  250. package/dist/public/assets/dagre-NK4GIZVX-CH1K1yF8.js +4 -0
  251. package/dist/public/assets/{diagram-VX7I27RA-De_UQv8C.js → diagram-CBK3MWTC-OaKd5avy.js} +13 -13
  252. package/dist/public/assets/diagram-I5XIIV2D-Cmu5z1ad.js +24 -0
  253. package/dist/public/assets/{diagram-S7CK7UJ4-25IjIKyo.js → diagram-ODIL2UCW-Cz1kkDDX.js} +7 -7
  254. package/dist/public/assets/diagram-PFBEJUXE-faMkmqUW.js +3 -0
  255. package/dist/public/assets/{diagram-UQ7AKVKN-C5VvsV7x.js → diagram-RJA3I4VV-nycvfte-.js} +2 -2
  256. package/dist/public/assets/diagram-TYUNFSNR-CjEv5QCm.js +200 -0
  257. package/dist/public/assets/{dist-BDCdLWk4.js → dist-DGs_yUrP.js} +1 -1
  258. package/dist/public/assets/ebnfDiagram-V4P3TTPT-DN-IIxCy.js +1 -0
  259. package/dist/public/assets/elk-QONTBCTQ-Bsam88GP.js +27 -0
  260. package/dist/public/assets/erDiagram-KYQIGQAA-DEU_qqNK.js +99 -0
  261. package/dist/public/assets/eventmodeling-K75KTNOO-Bl6NCM9E.js +1 -0
  262. package/dist/public/assets/flowDiagram-IUGLLWBU-Cl4qZ-36.js +1 -0
  263. package/dist/public/assets/ganttDiagram-R7GPNTJY-BmMd4aGi.js +292 -0
  264. package/dist/public/assets/gitGraph-VSP46ZUC-Q0H2PWek.js +1 -0
  265. package/dist/public/assets/gitGraphDiagram-PDYL7XHY-BlCTBYTj.js +106 -0
  266. package/dist/public/assets/index-CuBJ0hof.css +1 -0
  267. package/dist/public/assets/index-D701BZPh.js +2219 -0
  268. package/dist/public/assets/info-OHQRW6UA-D0TMPJxW.js +1 -0
  269. package/dist/public/assets/infoDiagram-MVDRKAX5-CljbtJXu.js +2 -0
  270. package/dist/public/assets/{ishikawaDiagram-5VMMS53U-KvT4DU1u.js → ishikawaDiagram-HPEHV2GE-_Y3Fr0hu.js} +6 -6
  271. package/dist/public/assets/{journeyDiagram-3NMN7TZE-PhGRkXkq.js → journeyDiagram-BOSHW7O7-Bo55jJ4m.js} +39 -39
  272. package/dist/public/assets/kanban-definition-FNSA4HC5-Cd-10MtF.js +89 -0
  273. package/dist/public/assets/katex-MEuSR36T.js +257 -0
  274. package/dist/public/assets/line-BDmh4sWC.js +1 -0
  275. package/dist/public/assets/linear-Dt7xjMrI.js +1 -0
  276. package/dist/public/assets/mermaid-parser.core-BJ1yyzvV.js +7 -0
  277. package/dist/public/assets/mindmap-definition-6OY57UG3-CRgumPuN.js +98 -0
  278. package/dist/public/assets/packet-JDAUHWVQ-DsTMT3Kw.js +1 -0
  279. package/dist/public/assets/pegDiagram-ECIUJNBX-BEGI5k3m.js +1 -0
  280. package/dist/public/assets/pie-XZMESJXO-COyqzA3N.js +1 -0
  281. package/dist/public/assets/pieDiagram-GNMPY74T-CrLJhZJJ.js +39 -0
  282. package/dist/public/assets/{quadrantDiagram-AXDQQJYC-B9dlNtZl.js → quadrantDiagram-D57K4MC3-Fl7HMHxK.js} +6 -6
  283. package/dist/public/assets/radar-ABXABTNO-DeXHKowk.js +1 -0
  284. package/dist/public/assets/railroad-I3PHUGI6-CUjKUdPz.js +1 -0
  285. package/dist/public/assets/railroad-abnf-LNEFI6M7-B1aEgHE6.js +1 -0
  286. package/dist/public/assets/railroad-ebnf-DWYD2UWJ-DmmI3Voz.js +1 -0
  287. package/dist/public/assets/railroad-peg-JR7BVNR7-BHzi9m7r.js +1 -0
  288. package/dist/public/assets/railroadDiagram-Y72NRBL7-D1oeE5fy.js +1 -0
  289. package/dist/public/assets/requirementDiagram-EQYSW5RA-BJDKK1aS.js +84 -0
  290. package/dist/public/assets/rolldown-runtime-BCiCTKAo.js +1 -0
  291. package/dist/public/assets/{sankeyDiagram-P5KCCOFB-C4rb2pZ9.js → sankeyDiagram-SY24JHO5-C4g0OwZ9.js} +7 -7
  292. package/dist/public/assets/sequenceDiagram-BLEHNHQU-CEvy4P-b.js +169 -0
  293. package/dist/public/assets/src-MPsEqXxq.js +1 -0
  294. package/dist/public/assets/stateDiagram-v2-A6IESKWZ-BFhvw4Gl.js +291 -0
  295. package/dist/public/assets/swimlanes-B3ENRKFQ-BIl_Q-FM.js +1 -0
  296. package/dist/public/assets/swimlanesDiagram-AYQRV4AK-rvDbKEHQ.js +8 -0
  297. package/dist/public/assets/timeline-definition-JXYKGLGB-qAoWTH4N.js +120 -0
  298. package/dist/public/assets/treeView-D4JQ5SDB-vq16JKkJ.js +1 -0
  299. package/dist/public/assets/treemap-SAJKECNS-C0IZTaDk.js +1 -0
  300. package/dist/public/assets/usecaseDiagram-WPOLBNNX-Dq8iz49r.js +328 -0
  301. package/dist/public/assets/vennDiagram-Q3Y3IDCW-Br4JmRjM.js +34 -0
  302. package/dist/public/assets/wardley-7MLQ67FV-CEPlAQ79.js +1 -0
  303. package/dist/public/assets/{wardleyDiagram-VM6X3IG4-BOXpwLCv.js → wardleyDiagram-IVAIDKWA-DURB7Ue6.js} +4 -4
  304. package/dist/public/assets/xychartDiagram-4URNHDU4-BiZywfhy.js +7 -0
  305. package/dist/public/index.html +27 -21
  306. package/dist/public/sbom.cdx.json +1 -1
  307. package/dist/types.d.ts +0 -12
  308. package/dist/types.js +2 -12
  309. package/dist/types.js.map +1 -1
  310. package/dist/utils.d.ts +12 -5
  311. package/dist/utils.js +18 -43
  312. package/dist/utils.js.map +1 -1
  313. package/package.json +13 -12
  314. package/src/app.ts +33 -43
  315. package/src/auth/index.ts +2 -12
  316. package/src/auth/keycloak.ts +2 -12
  317. package/src/auth/mock.ts +2 -12
  318. package/src/auth/types.ts +2 -12
  319. package/src/common/errors.ts +45 -0
  320. package/src/common/validationSchemas.ts +3 -12
  321. package/src/domain/auth/index.ts +2 -12
  322. package/src/domain/calculations/index.ts +4 -14
  323. package/src/domain/calculations/schema.ts +2 -12
  324. package/src/domain/calculations/service.ts +8 -21
  325. package/src/domain/cardTypes/index.ts +10 -20
  326. package/src/domain/cardTypes/schema.ts +3 -12
  327. package/src/domain/cardTypes/service.ts +22 -29
  328. package/src/domain/cards/index.ts +158 -128
  329. package/src/domain/cards/lib.ts +9 -161
  330. package/src/domain/cards/mermaid.ts +25 -0
  331. package/src/domain/cards/schema.ts +8 -12
  332. package/src/domain/cards/service.ts +165 -118
  333. package/src/domain/connectors/index.ts +5 -14
  334. package/src/domain/connectors/service.ts +5 -20
  335. package/src/domain/events/events-by-project.ts +59 -0
  336. package/src/domain/events/index.ts +3 -13
  337. package/src/domain/events/lifetime.ts +2 -12
  338. package/src/domain/events/project-events.ts +30 -18
  339. package/src/domain/events/schema.ts +2 -12
  340. package/src/domain/fieldTypes/index.ts +6 -16
  341. package/src/domain/fieldTypes/schema.ts +3 -12
  342. package/src/domain/fieldTypes/service.ts +9 -21
  343. package/src/domain/graphModels/index.ts +4 -14
  344. package/src/domain/graphModels/schema.ts +3 -12
  345. package/src/domain/graphModels/service.ts +5 -18
  346. package/src/domain/graphViews/index.ts +4 -14
  347. package/src/domain/graphViews/schema.ts +3 -0
  348. package/src/domain/graphViews/service.ts +5 -18
  349. package/src/domain/labels/index.ts +4 -14
  350. package/src/domain/labels/service.ts +6 -16
  351. package/src/domain/linkTypes/index.ts +6 -16
  352. package/src/domain/linkTypes/schema.ts +2 -12
  353. package/src/domain/linkTypes/service.ts +8 -21
  354. package/src/domain/logicPrograms/index.ts +5 -17
  355. package/src/domain/logicPrograms/service.ts +7 -16
  356. package/src/domain/mcp/index.ts +33 -24
  357. package/src/domain/project/index.ts +34 -40
  358. package/src/domain/project/schema.ts +2 -12
  359. package/src/domain/project/service.ts +56 -71
  360. package/src/domain/projects/index.ts +34 -50
  361. package/src/domain/projects/schema.ts +3 -12
  362. package/src/domain/projects/service.ts +18 -88
  363. package/src/domain/reports/index.ts +4 -14
  364. package/src/domain/reports/schema.ts +2 -12
  365. package/src/domain/reports/service.ts +5 -18
  366. package/src/domain/resources/index.ts +19 -30
  367. package/src/domain/resources/schema.ts +3 -0
  368. package/src/domain/resources/service.ts +55 -90
  369. package/src/domain/skills/index.ts +4 -14
  370. package/src/domain/skills/schema.ts +2 -12
  371. package/src/domain/skills/service.ts +5 -15
  372. package/src/domain/templates/index.ts +8 -18
  373. package/src/domain/templates/schema.ts +2 -12
  374. package/src/domain/templates/service.ts +9 -22
  375. package/src/domain/tree/index.ts +4 -14
  376. package/src/domain/tree/service.ts +10 -21
  377. package/src/domain/workflows/index.ts +4 -14
  378. package/src/domain/workflows/schema.ts +2 -12
  379. package/src/domain/workflows/service.ts +5 -18
  380. package/src/export.ts +24 -33
  381. package/src/index.ts +29 -48
  382. package/src/main.ts +25 -35
  383. package/src/middleware/auth.ts +2 -12
  384. package/src/middleware/commandManager.ts +35 -50
  385. package/src/middleware/tree.ts +3 -0
  386. package/src/middleware/zvalidator.ts +3 -0
  387. package/src/overlay.ts +29 -19
  388. package/src/types.ts +2 -12
  389. package/src/utils.ts +26 -46
  390. package/dist/project-errors.d.ts +0 -18
  391. package/dist/project-errors.js +0 -25
  392. package/dist/project-errors.js.map +0 -1
  393. package/dist/project-registry.d.ts +0 -65
  394. package/dist/project-registry.js +0 -121
  395. package/dist/project-registry.js.map +0 -1
  396. package/dist/public/assets/__vite-browser-external-PaJ7c2l8.js +0 -1
  397. package/dist/public/assets/abnfDiagram-VCTEODGH-DB2dfOGe.js +0 -1
  398. package/dist/public/assets/architecture-7GRP2DOG-2V0X8hxt.js +0 -1
  399. package/dist/public/assets/architectureDiagram-5GKGNRK7-CRhUR2Ul.js +0 -36
  400. package/dist/public/assets/blockDiagram-I7D4REHJ-DJKsYF1v.js +0 -129
  401. package/dist/public/assets/c4Diagram-7LVT6UL2-BTwMzoAF.js +0 -38
  402. package/dist/public/assets/channel-C0JtPpMA.js +0 -1
  403. package/dist/public/assets/chunk-4HAMMTFA-DjjgrBsB.js +0 -62
  404. package/dist/public/assets/chunk-75Z2AOVW-CKqXRGJV.js +0 -2
  405. package/dist/public/assets/chunk-DU6HZSFF-iJGdiRt7.js +0 -127
  406. package/dist/public/assets/chunk-FOHPRMQF-DzxwRta7.js +0 -161
  407. package/dist/public/assets/chunk-GMAD6QVW-DxHVEaGj.js +0 -72
  408. package/dist/public/assets/chunk-GVQU2GXP-AMxD4_Ta.js +0 -1
  409. package/dist/public/assets/chunk-IMKFNOWR-0rz8QrYC.js +0 -231
  410. package/dist/public/assets/chunk-L3NEJ4N5-BK3KAKMe.js +0 -1
  411. package/dist/public/assets/chunk-OSK3NFVY-B8MdrI_M.js +0 -10
  412. package/dist/public/assets/chunk-P2QGCYS3-D3J5AcHg.js +0 -1
  413. package/dist/public/assets/chunk-POPQ4Y6H-CsYg_XkK.js +0 -1
  414. package/dist/public/assets/chunk-PWAF6VOD-D9cdEIZp.js +0 -1
  415. package/dist/public/assets/chunk-SHT3W25Y-1jjokCf3.js +0 -168
  416. package/dist/public/assets/chunk-TICWLB2K-Ccsy2PYz.js +0 -206
  417. package/dist/public/assets/classDiagram-ZZMXUADV-mWyXNAXi.js +0 -1
  418. package/dist/public/assets/classDiagram-v2-VYDZK3BY-mWyXNAXi.js +0 -1
  419. package/dist/public/assets/cose-bilkent-JH36ORCC-DPzc3Pv4.js +0 -1
  420. package/dist/public/assets/cynefin-OW5HDTMX-BIVDCYOU.js +0 -1
  421. package/dist/public/assets/cytoscape.esm-NgwPT4ez.js +0 -321
  422. package/dist/public/assets/dagre-C-rnJpZF.js +0 -1
  423. package/dist/public/assets/dagre-GXQ25YYZ-CJc0wc6f.js +0 -4
  424. package/dist/public/assets/diagram-VSXAHHWV-Dw3rKVL_.js +0 -3
  425. package/dist/public/assets/diagram-Z3DM3KII-Bd-65QQW.js +0 -24
  426. package/dist/public/assets/ebnfDiagram-PWID7BFC-CrxdET5U.js +0 -1
  427. package/dist/public/assets/erDiagram-RLTQ6QDP-BKo0Uyna.js +0 -99
  428. package/dist/public/assets/eventmodeling-NTZA5JFV-DKkAdJZd.js +0 -1
  429. package/dist/public/assets/flowDiagram-HODETNUW-CEE2wjdt.js +0 -1
  430. package/dist/public/assets/ganttDiagram-EL5Y4UJY-BHFn8vk0.js +0 -292
  431. package/dist/public/assets/gitGraph-4MIJSDKK-Bpvnb45u.js +0 -1
  432. package/dist/public/assets/gitGraphDiagram-WWUBYQGX-Bw0EoxBY.js +0 -106
  433. package/dist/public/assets/index-D3HS7YxF.js +0 -2228
  434. package/dist/public/assets/index-Sv3WxZ_8.css +0 -1
  435. package/dist/public/assets/info-A6RAGUB7-BvvG_zrk.js +0 -1
  436. package/dist/public/assets/infoDiagram-27XIBGKW-CtpdJmtL.js +0 -2
  437. package/dist/public/assets/kanban-definition-UXKFOSKX-Oyx5QgRq.js +0 -89
  438. package/dist/public/assets/katex-ZlcWpGUi.js +0 -257
  439. package/dist/public/assets/line-Dr41HTk1.js +0 -1
  440. package/dist/public/assets/linear-DDBi9FwZ.js +0 -1
  441. package/dist/public/assets/mermaid-parser.core-DsIAxDBa.js +0 -7
  442. package/dist/public/assets/mindmap-definition-YA3MSWOX-r8hvd6gP.js +0 -96
  443. package/dist/public/assets/packet-AYTQ26CC-B0EpJ2Sc.js +0 -1
  444. package/dist/public/assets/pegDiagram-XKGWAZYB-DaNkQTQF.js +0 -1
  445. package/dist/public/assets/pie-WAS4IAKB-Dt2zttL9.js +0 -1
  446. package/dist/public/assets/pieDiagram-E7YTZNPT-x0XWEGbd.js +0 -39
  447. package/dist/public/assets/radar-RG4KPBEZ-DjbR4-5l.js +0 -1
  448. package/dist/public/assets/railroad-74A4TZTK-Bk3B5r_R.js +0 -1
  449. package/dist/public/assets/railroad-abnf-HS5TGJTU-DxaWfACD.js +0 -1
  450. package/dist/public/assets/railroad-ebnf-LZEXJU2U-DscxXZO0.js +0 -1
  451. package/dist/public/assets/railroad-peg-WCYAUIDC-BCWzRFzw.js +0 -1
  452. package/dist/public/assets/railroadDiagram-O6MQD6OU-DhwsoX6A.js +0 -1
  453. package/dist/public/assets/requirementDiagram-BXWQKSXE-BiqZ6axf.js +0 -84
  454. package/dist/public/assets/rolldown-runtime-B0Z9INg1.js +0 -1
  455. package/dist/public/assets/sequenceDiagram-WJ2MYXX4-DRKTnGD7.js +0 -162
  456. package/dist/public/assets/src-an_qrnIj.js +0 -1
  457. package/dist/public/assets/stateDiagram-D77RDMKH-xxdybg5Z.js +0 -1
  458. package/dist/public/assets/stateDiagram-v2-MP3YSRHH-CXzmJy_a.js +0 -1
  459. package/dist/public/assets/swimlanes-42K2YHIH-DyGI1gI6.js +0 -1
  460. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-7hqb6VoW.js +0 -8
  461. package/dist/public/assets/timeline-definition-24CTP7MA-C2pIp77Q.js +0 -120
  462. package/dist/public/assets/treeView-Q6P3EWNA-CxRtaaB8.js +0 -1
  463. package/dist/public/assets/treemap-WGGIJYW6-G1IHiwTa.js +0 -1
  464. package/dist/public/assets/vennDiagram-4TSXK5OY-CwimQRR9.js +0 -34
  465. package/dist/public/assets/wardley-WFR3VGLG-DkQ3TjZX.js +0 -1
  466. package/dist/public/assets/xychartDiagram-S5SC5T6Z-ChOPYsHc.js +0 -7
  467. package/src/project-errors.ts +0 -33
  468. package/src/project-registry.ts +0 -161
@@ -0,0 +1,23 @@
1
+ // SPDX-FileCopyrightText: Cyberismo Ltd and contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ /**
4
+ * Regex that matches standard AsciiDoc mermaid diagram blocks.
5
+ * Supports [mermaid], [mermaid,id], [mermaid,id,format=svg], etc.
6
+ * Matches both literal blocks (....) and listing blocks (----).
7
+ * Supports both LF and CRLF line endings.
8
+ */
9
+ const MERMAID_BLOCK_REGEX = /\[mermaid[^\]]*\]\r?\n(\.{4,}|-{4,})\r?\n([\s\S]*?)\r?\n\1/g;
10
+ /**
11
+ * Pre-processes AsciiDoc content to convert [mermaid] blocks into passthrough HTML
12
+ * that can be detected and rendered by the frontend.
13
+ * This must run BEFORE asciidoctor.js converts the AsciiDoc to HTML.
14
+ * @param content - Raw AsciiDoc content
15
+ * @returns AsciiDoc content with mermaid blocks replaced by passthrough HTML divs
16
+ */
17
+ export function preprocessMermaidBlocksForHtml(content) {
18
+ return content.replace(MERMAID_BLOCK_REGEX, (_match, _delim, code) => {
19
+ const encoded = Buffer.from(code, 'utf-8').toString('base64');
20
+ return `++++\n<div class="mermaid-block" data-mermaid-code="${encoded}"></div>\n++++`;
21
+ });
22
+ }
23
+ //# sourceMappingURL=mermaid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mermaid.js","sourceRoot":"","sources":["../../../src/domain/cards/mermaid.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC;;;;;GAKG;AACH,MAAM,mBAAmB,GACvB,6DAA6D,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAAC,OAAe;IAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACnE,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC9D,OAAO,uDAAuD,OAAO,gBAAgB,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,16 +1,7 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2026
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation.
7
- This program is distributed in the hope that it will be useful, but WITHOUT
8
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
10
- details. You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
13
1
  import { z } from 'zod';
2
+ export declare const cardKeyParamSchema: z.ZodObject<{
3
+ key: z.ZodString;
4
+ }, z.core.$strip>;
14
5
  export declare const createLinkSchema: z.ZodObject<{
15
6
  toCard: z.ZodString;
16
7
  linkType: z.ZodString;
@@ -53,3 +44,6 @@ export declare const exportCardPdfSchema: z.ZodObject<{
53
44
  version: z.ZodOptional<z.ZodString>;
54
45
  }, z.core.$strip>;
55
46
  export type ExportCardPdfRequestBody = z.infer<typeof exportCardPdfSchema>;
47
+ export declare const cardBatchSchema: z.ZodObject<{
48
+ keys: z.ZodArray<z.ZodString>;
49
+ }, z.core.$strip>;
@@ -1,16 +1,7 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2026
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation.
7
- This program is distributed in the hope that it will be useful, but WITHOUT
8
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
10
- details. You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
1
+ // SPDX-FileCopyrightText: Cyberismo Ltd and contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only
13
3
  import { z } from 'zod';
4
+ export const cardKeyParamSchema = z.object({ key: z.string().min(1) });
14
5
  const linkDirection = z.enum(['outbound', 'inbound']);
15
6
  export const createLinkSchema = z.object({
16
7
  toCard: z.string(),
@@ -47,4 +38,7 @@ export const exportCardPdfSchema = z.object({
47
38
  exportChildCards: z.boolean(),
48
39
  version: headerValue.optional(),
49
40
  });
41
+ export const cardBatchSchema = z.object({
42
+ keys: z.array(z.string()).min(1).max(100),
43
+ });
50
44
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/cards/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,aAA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AC,CAAC,MAAM,EAAE;IAC1B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,iBAAiB,EAAE,aAAa;IAChC,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,gFAAgF;AAChF,gCAAgC;AAChC,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,KAAK,CAAC,YAAY,EAAE,8BAA8B,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7B,OAAO,EAAE,WAAW,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAC1C,CAAC,CAAC"}
@@ -1,64 +1,60 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2025
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation.
7
- This program is distributed in the hope that it will be useful, but WITHOUT
8
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
10
- details. You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
13
- import type { ExportPdfOptions } from '@cyberismo/data-handler/interfaces/project-interfaces';
14
- import type { attachmentPayload } from '@cyberismo/data-handler/interfaces/request-status-interfaces';
15
- import { type CommandManager } from '@cyberismo/data-handler';
1
+ import type { AttachmentContent, Card, ExportPdfOptions, QueryResult } from '@cyberismo/model';
2
+ import { type Workspace } from '@cyberismo/data-handler';
16
3
  import { allCards } from './lib.js';
17
4
  import type { TreeOptions } from '../../types.js';
18
- export declare function getProjectInfo(commands: CommandManager): Promise<{
5
+ export declare function getCardData(ws: Workspace, key: string, staticMode: boolean): Promise<QueryResult<'card'>>;
6
+ /** One solve for many cards; keys the project does not hold are left out. */
7
+ export declare function getCardBatch(ws: Workspace, keys: string[]): Promise<Record<string, QueryResult<'card'>>>;
8
+ export declare function getCardContent(ws: Workspace, key: string, staticMode: boolean): Promise<{
9
+ adocContent: string;
10
+ }>;
11
+ type StaticCardSource = Pick<Card, 'key' | 'path' | 'content' | 'attachments'>;
12
+ export declare function getCardSource(ws: Workspace, key: string, staticMode: boolean): Promise<Card | StaticCardSource>;
13
+ export declare function getProjectInfo(ws: Workspace): Promise<{
19
14
  name: string;
20
15
  prefix: string;
21
- workflows: (import("@cyberismo/data-handler/interfaces/resource-interfaces").Workflow | undefined)[];
22
- cardTypes: (import("@cyberismo/data-handler/interfaces/resource-interfaces").CardType | undefined)[];
16
+ workflows: import("@cyberismo/model").Workflow[];
17
+ cardTypes: import("@cyberismo/model").CardType[];
23
18
  }>;
24
- export declare function updateCard(commands: CommandManager, key: string, body: any): Promise<boolean>;
25
- export declare function deleteCard(commands: CommandManager, key: string): Promise<void>;
26
- export declare function createCard(commands: CommandManager, template: string, parentKey?: string): Promise<import("@cyberismo/data-handler").Card[]>;
27
- export declare function uploadAttachments(commands: CommandManager, key: string, files: File[]): Promise<{
19
+ export declare function updateCard(ws: Workspace, key: string, body: any): Promise<void>;
20
+ export declare function deleteCard(ws: Workspace, key: string): Promise<void>;
21
+ export declare function createCard(ws: Workspace, template: string, parentKey?: string): Promise<Card[]>;
22
+ export declare function uploadAttachments(ws: Workspace, key: string, files: File[]): Promise<{
28
23
  message: string;
29
24
  files: string[];
30
25
  }>;
31
- export declare function removeAttachment(commands: CommandManager, key: string, filename: string): Promise<{
26
+ export declare function removeAttachment(ws: Workspace, key: string, filename: string): Promise<{
32
27
  message: string;
33
28
  }>;
34
- export declare function parseContent(commands: CommandManager, key: string, content: string): Promise<{
29
+ export declare function parseContent(ws: Workspace, key: string, content: string): Promise<{
35
30
  adocContent: string;
36
31
  }>;
37
- export declare function createLink(commands: CommandManager, key: string, target: string, linkType: string, direction?: 'outbound' | 'inbound', description?: string): Promise<{
32
+ export declare function createLink(ws: Workspace, key: string, target: string, linkType: string, direction?: 'outbound' | 'inbound', description?: string): Promise<{
38
33
  message: string;
39
34
  }>;
40
- export declare function removeLink(commands: CommandManager, key: string, target: string, linkType: string, direction?: 'outbound' | 'inbound', description?: string): Promise<{
35
+ export declare function removeLink(ws: Workspace, key: string, target: string, linkType: string, direction?: 'outbound' | 'inbound', description?: string): Promise<{
41
36
  message: string;
42
37
  }>;
43
- export declare function updateLink(commands: CommandManager, key: string, toCard: string, linkType: string, direction: 'outbound' | 'inbound', previousToCard: string, previousLinkType: string, previousDirection: 'outbound' | 'inbound', linkDescription?: string, previousLinkDescription?: string): Promise<{
38
+ export declare function updateLink(ws: Workspace, key: string, toCard: string, linkType: string, direction: 'outbound' | 'inbound', previousToCard: string, previousLinkType: string, previousDirection: 'outbound' | 'inbound', linkDescription?: string, previousLinkDescription?: string): Promise<{
44
39
  message: string;
45
40
  }>;
46
- export declare function getAttachment(commands: CommandManager, key: string, filename: string): Promise<attachmentPayload>;
41
+ export declare function getAttachment(ws: Workspace, key: string, filename: string): Promise<AttachmentContent>;
47
42
  /**
48
43
  * Used for exporting cards, thus static mode is assumed
49
44
  * @param commandsthe command manager used for the query
50
45
  * @param options optional tree query options
51
46
  * @returns all cards in a flattened array
52
47
  */
53
- export declare function findAllCards(commands: CommandManager, options?: TreeOptions): ReturnType<typeof allCards>;
48
+ export declare function findAllCards(ws: Workspace, options?: TreeOptions): ReturnType<typeof allCards>;
54
49
  /**
55
50
  * Gets all attachments that are required for rendering the wanted cards
56
- * @param commands the command manager used for the query
51
+ * @param ws the command manager used for the query
57
52
  * @param options optional tree query options
58
53
  * @returns all attachments for cards returned by the tree query
59
54
  */
60
- export declare function findRelevantAttachments(commands: CommandManager, options?: TreeOptions): Promise<{
55
+ export declare function findRelevantAttachments(ws: Workspace, options?: TreeOptions): Promise<{
61
56
  key: string;
62
57
  attachment: string;
63
58
  }[]>;
64
- export declare function exportCard(commands: CommandManager, options: ExportPdfOptions): Promise<Buffer>;
59
+ export declare function exportCard(ws: Workspace, options: ExportPdfOptions): Promise<Uint8Array>;
60
+ export {};
@@ -1,27 +1,79 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2025
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation.
7
- This program is distributed in the hope that it will be useful, but WITHOUT
8
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
10
- details. You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
13
- import { evaluateMacros } from '@cyberismo/data-handler';
14
- import { preprocessMermaidBlocksForHtml } from '@cyberismo/data-handler/utils/mermaid-renderer';
15
- import { rewriteAsciidocCardXrefs } from '@cyberismo/data-handler/utils/asciidoc-xref';
1
+ // SPDX-FileCopyrightText: Cyberismo Ltd and contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ import { AsciidoctorPdfError } from '@cyberismo/data-handler';
4
+ import { preprocessMermaidBlocksForHtml } from './mermaid.js';
16
5
  import { allCards } from './lib.js';
17
- export async function getProjectInfo(commands) {
18
- return commands.consistent(async () => {
19
- const projectResponse = await commands.showCmd.showProject();
20
- const workflowsResponse = await commands.showCmd.showWorkflowsWithDetails();
6
+ import { getCardQueryResult } from '../../export.js';
7
+ async function renderAdoc(ws, key, content, mode, fallback) {
8
+ let { content: asciidocContent } = await ws.render.macros(content, {
9
+ context: mode === 'staticSite' ? 'exportedSite' : 'localApp',
10
+ mode,
11
+ cardKey: key,
12
+ fallback,
13
+ });
14
+ // Convert [mermaid] AsciiDoc blocks to passthrough HTML before asciidoctor processes them
15
+ asciidocContent = preprocessMermaidBlocksForHtml(asciidocContent);
16
+ // Rewrite native AsciiDoc xrefs that target other cards into
17
+ // /projects/<prefix>/cards/<key> links.
18
+ return ws.render.xrefs(asciidocContent, mode);
19
+ }
20
+ export async function getCardData(ws, key, staticMode) {
21
+ return ws.consistent(async () => {
22
+ // The key reaches the logic program unchecked; details() rejects unknown keys first.
23
+ await ws.cards.details(key);
24
+ const card = staticMode
25
+ ? await getCardQueryResult(ws, key)
26
+ : await ws.queries.runQuery('card', 'localApp', { cardKey: key });
27
+ if (card.length !== 1) {
28
+ throw new Error('Query failed. Check card-query syntax');
29
+ }
30
+ // Hidden fields stay off the static site; the card view never shows them.
31
+ const data = staticMode
32
+ ? { ...card[0], fields: card[0].fields.filter((f) => f.visibility) }
33
+ : card[0];
34
+ return data;
35
+ });
36
+ }
37
+ /** One solve for many cards; keys the project does not hold are left out. */
38
+ export async function getCardBatch(ws, keys) {
39
+ return ws.consistent(async () => {
40
+ // The keys reach the logic program unchecked; only known ones go through.
41
+ const cardKeys = [...new Set(keys)].filter((key) => ws.cards.has(key));
42
+ // The card query reads an empty list as no list and answers every card.
43
+ if (cardKeys.length === 0) {
44
+ return {};
45
+ }
46
+ const cards = await ws.queries.runQuery('card', 'localApp', { cardKeys });
47
+ return Object.fromEntries(cards.map((card) => [card.key, card]));
48
+ });
49
+ }
50
+ export async function getCardContent(ws, key, staticMode) {
51
+ return ws.consistent(async () => {
52
+ const card = await ws.cards.details(key);
53
+ const adocContent = await renderAdoc(ws, key, card.content || '', staticMode ? 'staticSite' : 'inject', '');
54
+ return { adocContent };
55
+ });
56
+ }
57
+ export async function getCardSource(ws, key, staticMode) {
58
+ const card = await ws.cards.details(key);
59
+ if (!staticMode) {
60
+ return card;
61
+ }
62
+ return {
63
+ key: card.key,
64
+ path: card.path,
65
+ content: card.content,
66
+ attachments: card.attachments,
67
+ };
68
+ }
69
+ export async function getProjectInfo(ws) {
70
+ return ws.consistent(async () => {
71
+ const projectResponse = await ws.settings.info();
72
+ const workflowsResponse = await ws.resources.contents('workflows');
21
73
  if (!workflowsResponse) {
22
74
  throw new Error('No workflows found');
23
75
  }
24
- const cardTypesResponse = await commands.showCmd.showCardTypesWithDetails();
76
+ const cardTypesResponse = await ws.resources.contents('cardTypes');
25
77
  if (!cardTypesResponse) {
26
78
  throw new Error('No card types found');
27
79
  }
@@ -33,53 +85,46 @@ export async function getProjectInfo(commands) {
33
85
  };
34
86
  });
35
87
  }
36
- export async function updateCard(commands, key,
88
+ export async function updateCard(ws, key,
37
89
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
90
  body) {
39
- let written = false;
40
- await commands.atomic(async () => {
91
+ await ws.atomic(async () => {
41
92
  if (body.state) {
42
- await commands.transitionCmd.cardTransition(key, body.state);
43
- written = true;
93
+ await ws.cards.transition(key, body.state);
44
94
  }
45
95
  if (body.content != null) {
46
- await commands.editCmd.editCardContent(key, body.content);
47
- written = true;
96
+ await ws.cards.edit(key, body.content);
48
97
  }
49
98
  if (body.metadata) {
50
99
  for (const [metadataKey, metadataValue] of Object.entries(body.metadata)) {
51
- await commands.editCmd.editCardMetadata(key, metadataKey, metadataValue);
52
- written = true;
100
+ await ws.cards.editField(key, metadataKey, metadataValue);
53
101
  }
54
102
  }
55
103
  if (body.parent) {
56
- await commands.moveCmd.moveCard(key, body.parent);
57
- written = true;
104
+ await ws.cards.move(key, body.parent);
58
105
  }
59
106
  if (body.index != null) {
60
- await commands.moveCmd.rankByIndex(key, body.index);
61
- written = true;
107
+ await ws.cards.rankAt(key, body.index);
62
108
  }
63
109
  }, `Update card ${key}`);
64
- return written;
65
110
  }
66
- export async function deleteCard(commands, key) {
67
- await commands.removeCmd.remove('card', key);
111
+ export async function deleteCard(ws, key) {
112
+ await ws.cards.remove(key);
68
113
  }
69
- export async function createCard(commands, template, parentKey) {
70
- const result = await commands.createCmd.createCard(template, parentKey === 'root' ? undefined : parentKey);
114
+ export async function createCard(ws, template, parentKey) {
115
+ const result = await ws.cards.create(template, parentKey === 'root' ? undefined : parentKey);
71
116
  if (result.length === 0) {
72
117
  throw new Error('No cards created');
73
118
  }
74
119
  return result;
75
120
  }
76
- export async function uploadAttachments(commands, key, files) {
121
+ export async function uploadAttachments(ws, key, files) {
77
122
  const succeeded = [];
78
- await commands.atomic(async () => {
123
+ await ws.atomic(async () => {
79
124
  for (const file of files) {
80
125
  if (file instanceof File) {
81
126
  const buffer = await file.arrayBuffer();
82
- await commands.createCmd.createAttachment(key, file.name, Buffer.from(buffer));
127
+ await ws.cards.addAttachment(key, file.name, Buffer.from(buffer));
83
128
  succeeded.push(file.name);
84
129
  }
85
130
  }
@@ -95,61 +140,44 @@ function validateAttachmentFileName(filename) {
95
140
  throw new Error('Invalid attachment filename');
96
141
  }
97
142
  }
98
- export async function removeAttachment(commands, key, filename) {
143
+ export async function removeAttachment(ws, key, filename) {
99
144
  validateAttachmentFileName(filename);
100
- await commands.removeCmd.remove('attachment', key, filename);
145
+ await ws.cards.removeAttachment(key, filename);
101
146
  return { message: 'Attachment removed successfully' };
102
147
  }
103
- export async function parseContent(commands, key, content) {
104
- return commands.consistent(async () => {
105
- let asciidocContent;
106
- try {
107
- asciidocContent = await evaluateMacros(content, {
108
- context: 'localApp',
109
- mode: 'inject',
110
- project: commands.project,
111
- cardKey: key,
112
- });
113
- }
114
- catch (error) {
115
- asciidocContent = `Macro error: ${error instanceof Error ? error.message : 'Unknown error'}\n\n${content}`;
116
- }
117
- // Convert [mermaid] AsciiDoc blocks to passthrough HTML before asciidoctor processes them
118
- asciidocContent = preprocessMermaidBlocksForHtml(asciidocContent);
119
- // Rewrite native AsciiDoc xrefs that target other cards into
120
- // /projects/<prefix>/cards/<key> links.
121
- asciidocContent = rewriteAsciidocCardXrefs(asciidocContent, commands.project, 'inject');
122
- return { adocContent: asciidocContent };
123
- });
148
+ export async function parseContent(ws, key, content) {
149
+ return ws.consistent(async () => ({
150
+ adocContent: await renderAdoc(ws, key, content, 'inject'),
151
+ }));
124
152
  }
125
- export async function createLink(commands, key, target, linkType, direction = 'outbound', description) {
153
+ export async function createLink(ws, key, target, linkType, direction = 'outbound', description) {
126
154
  // For outbound: key is source, target is destination
127
155
  // For inbound: target is source, key is destination
128
156
  const source = direction === 'outbound' ? key : target;
129
157
  const destination = direction === 'outbound' ? target : key;
130
- await commands.createCmd.createLink(source, destination, linkType, description, direction);
158
+ await ws.cards.addLink(source, destination, linkType, description, direction);
131
159
  return { message: 'Link created successfully' };
132
160
  }
133
- export async function removeLink(commands, key, target, linkType, direction = 'outbound', description) {
161
+ export async function removeLink(ws, key, target, linkType, direction = 'outbound', description) {
134
162
  // For outbound: key is source, target is destination
135
163
  // For inbound: target is source, key is destination
136
164
  const source = direction === 'outbound' ? key : target;
137
165
  const destination = direction === 'outbound' ? target : key;
138
- await commands.removeCmd.remove('link', source, destination, linkType, description);
166
+ await ws.cards.removeLink(source, destination, linkType, description);
139
167
  return { message: 'Link removed successfully' };
140
168
  }
141
- export async function updateLink(commands, key, toCard, linkType, direction, previousToCard, previousLinkType, previousDirection, linkDescription, previousLinkDescription) {
169
+ export async function updateLink(ws, key, toCard, linkType, direction, previousToCard, previousLinkType, previousDirection, linkDescription, previousLinkDescription) {
142
170
  // For simplicity create the new link first so that duplicate-link validation runs before
143
171
  // the old link is removed. This also handles direction changes.
144
- return commands.atomic(async () => {
145
- await createLink(commands, key, toCard, linkType, direction, linkDescription);
146
- await removeLink(commands, key, previousToCard, previousLinkType, previousDirection, previousLinkDescription);
172
+ return ws.atomic(async () => {
173
+ await createLink(ws, key, toCard, linkType, direction, linkDescription);
174
+ await removeLink(ws, key, previousToCard, previousLinkType, previousDirection, previousLinkDescription);
147
175
  return { message: 'Link updated successfully' };
148
176
  }, `Update link on ${key} to ${toCard}`);
149
177
  }
150
- export async function getAttachment(commands, key, filename) {
178
+ export async function getAttachment(ws, key, filename) {
151
179
  validateAttachmentFileName(filename);
152
- return commands.showCmd.showAttachment(key, filename);
180
+ return ws.cards.attachment(key, filename);
153
181
  }
154
182
  /**
155
183
  * Used for exporting cards, thus static mode is assumed
@@ -157,18 +185,18 @@ export async function getAttachment(commands, key, filename) {
157
185
  * @param options optional tree query options
158
186
  * @returns all cards in a flattened array
159
187
  */
160
- export async function findAllCards(commands, options) {
161
- return allCards(commands, options);
188
+ export async function findAllCards(ws, options) {
189
+ return allCards(ws, options);
162
190
  }
163
191
  /**
164
192
  * Gets all attachments that are required for rendering the wanted cards
165
- * @param commands the command manager used for the query
193
+ * @param ws the command manager used for the query
166
194
  * @param options optional tree query options
167
195
  * @returns all attachments for cards returned by the tree query
168
196
  */
169
- export async function findRelevantAttachments(commands, options) {
170
- const cards = new Set((await allCards(commands, options)).map((c) => c.key));
171
- const attachments = await commands.showCmd.showAttachments();
197
+ export async function findRelevantAttachments(ws, options) {
198
+ const cards = new Set((await allCards(ws, options)).map((c) => c.key));
199
+ const attachments = await ws.cards.attachments();
172
200
  return attachments
173
201
  .filter((attachment) => cards.has(attachment.card) && attachment.mimeType?.startsWith('image/'))
174
202
  .map((attachment) => ({
@@ -176,8 +204,16 @@ export async function findRelevantAttachments(commands, options) {
176
204
  attachment: attachment.fileName,
177
205
  }));
178
206
  }
179
- export async function exportCard(commands, options) {
180
- const result = await commands.exportCmd.exportPdfBuffer(options);
181
- return result;
207
+ export async function exportCard(ws, options) {
208
+ try {
209
+ return (await ws.export.pdf(options)).pdf;
210
+ }
211
+ catch (error) {
212
+ // Diagnostics can carry server paths: logged here, never sent.
213
+ if (error instanceof AsciidoctorPdfError) {
214
+ console.error(error.message, error.diagnostics.join('\n'));
215
+ }
216
+ throw error;
217
+ }
182
218
  }
183
219
  //# sourceMappingURL=service.js.map
@@ -1 +1 @@
1
- {"version":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CAAC,IAAI;QACpB,UAAU,EAAE,UAAU,CAAC,QAAQ;KAChC,CAAC,CAAC,CAAC;AACR,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,EAAa,EACb,OAAyB;IAEzB,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,+DAA+D;QAC/D,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;YACzC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,15 +1,3 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2026
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation. This program is distributed in the hope that it
7
- will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
8
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
- See the GNU Affero General Public License for more details.
10
- You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
13
1
  import { Hono } from 'hono';
14
2
  declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
3
  export default router;
@@ -1,15 +1,5 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2026
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation. This program is distributed in the hope that it
7
- will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
8
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
- See the GNU Affero General Public License for more details.
10
- You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
1
+ // SPDX-FileCopyrightText: Cyberismo Ltd and contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only
13
3
  import { Hono } from 'hono';
14
4
  import { isSSGContext } from 'hono/ssg';
15
5
  import * as connectorsService from './service.js';
@@ -29,8 +19,8 @@ router.get('/', requireRole(UserRole.Reader), async (c) => {
29
19
  if (isSSGContext(c)) {
30
20
  return c.json([]);
31
21
  }
32
- const commands = c.get('commands');
33
- const connectors = await connectorsService.getConnectors(commands);
22
+ const ws = c.get('ws');
23
+ const connectors = await connectorsService.getConnectors(ws);
34
24
  return c.json(connectors);
35
25
  });
36
26
  export default router;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/connectors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AACF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,iBAAiB,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACxD,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACnE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/connectors/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,iBAAiB,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACxD,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC7D,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -1,16 +1,4 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2024
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation.
7
- This program is distributed in the hope that it will be useful, but WITHOUT
8
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
10
- details. You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
13
- import type { CommandManager } from '@cyberismo/data-handler';
1
+ import type { Workspace } from '@cyberismo/data-handler';
14
2
  export interface ExternalItem {
15
3
  key: string;
16
4
  title: string;
@@ -20,4 +8,4 @@ export interface Connector {
20
8
  displayName: string;
21
9
  items: ExternalItem[];
22
10
  }
23
- export declare function getConnectors(commands: CommandManager): Promise<Connector[]>;
11
+ export declare function getConnectors(ws: Workspace): Promise<Connector[]>;
@@ -1,17 +1,7 @@
1
- /**
2
- Cyberismo
3
- Copyright © Cyberismo Ltd and contributors 2024
4
- This program is free software: you can redistribute it and/or modify it under
5
- the terms of the GNU Affero General Public License version 3 as published by
6
- the Free Software Foundation.
7
- This program is distributed in the hope that it will be useful, but WITHOUT
8
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9
- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
10
- details. You should have received a copy of the GNU Affero General Public
11
- License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
- */
13
- export async function getConnectors(commands) {
14
- const results = await commands.calculateCmd.runQuery('connectors', 'localApp');
1
+ // SPDX-FileCopyrightText: Cyberismo Ltd and contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only
3
+ export async function getConnectors(ws) {
4
+ const results = await ws.queries.runQuery('connectors', 'localApp');
15
5
  // Separate connectors from items based on type field
16
6
  const connectorsMap = new Map();
17
7
  const items = [];