@ultrst-armada/krnl 1.0.2 → 1.0.3

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 (237) hide show
  1. package/README.md +67 -65
  2. package/package.json +12 -8
  3. package/packages/cli/dist/bin/krnl.cjs +793 -330
  4. package/packages/cli/dist/bin/krnl.js +50 -65
  5. package/packages/cli/dist/chunk-6SHSECXR.js +1628 -0
  6. package/packages/cli/dist/index.cjs +746 -262
  7. package/packages/cli/dist/index.d.cts +45 -2
  8. package/packages/cli/dist/index.d.ts +45 -2
  9. package/packages/cli/dist/index.js +5 -1
  10. package/packages/cli/package.json +17 -10
  11. package/packages/core/dist/index.cjs +2905 -139
  12. package/packages/core/dist/index.d.cts +611 -27
  13. package/packages/core/dist/index.d.ts +611 -27
  14. package/packages/core/dist/index.js +2897 -139
  15. package/packages/core/package.json +14 -6
  16. package/packages/create-krnl/dist/index.cjs +102 -65
  17. package/packages/create-krnl/dist/index.js +102 -65
  18. package/packages/create-krnl/package.json +5 -3
  19. package/packages/eslint-plugin/dist/index.cjs +17 -55
  20. package/packages/eslint-plugin/dist/index.d.cts +8 -43
  21. package/packages/eslint-plugin/dist/index.d.ts +8 -43
  22. package/packages/eslint-plugin/dist/index.js +17 -55
  23. package/packages/eslint-plugin/package.json +5 -4
  24. package/packages/validate/dist/index.cjs +378 -85
  25. package/packages/validate/dist/index.d.cts +11 -1
  26. package/packages/validate/dist/index.d.ts +11 -1
  27. package/packages/validate/dist/index.js +375 -82
  28. package/packages/validate/package.json +14 -7
  29. package/packages/cli/dist/K_ENT_Entity-PQ5MURQY-ZG6FZXXX.js +0 -13
  30. package/packages/cli/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW-K4CRQYA5.js +0 -8
  31. package/packages/cli/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF-LNPXZYOE.js +0 -110
  32. package/packages/cli/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF-3ALZPNX4.js +0 -11
  33. package/packages/cli/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X-PJTICYSW.js +0 -11
  34. package/packages/cli/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW-M5TYU55O.js +0 -8
  35. package/packages/cli/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2-H6STOXRK.js +0 -20
  36. package/packages/cli/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK-XPJXSF7D.js +0 -19
  37. package/packages/cli/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7-CUYGTWOW.js +0 -7
  38. package/packages/cli/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU-VR6T4N6J.js +0 -17
  39. package/packages/cli/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5-RLJ4QWDP.js +0 -58
  40. package/packages/cli/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF-BOQGUASC.js +0 -22
  41. package/packages/cli/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG-XJI7KIT5.js +0 -8
  42. package/packages/cli/dist/K_LIB_Krnl_Telemetry-77FRZ3KV-K5VCWAFW.js +0 -9
  43. package/packages/cli/dist/chunk-3TRM6CYL.js +0 -152
  44. package/packages/cli/dist/chunk-5JDK35TG.js +0 -3872
  45. package/packages/cli/dist/chunk-63PTK33I.js +0 -997
  46. package/packages/cli/dist/chunk-6NIKAMUZ.js +0 -82
  47. package/packages/cli/dist/chunk-BOXWWXQG.js +0 -400
  48. package/packages/cli/dist/chunk-EEKLK7QJ.js +0 -565
  49. package/packages/cli/dist/chunk-EG7T2IAD.js +0 -107
  50. package/packages/cli/dist/chunk-ESTKOQ7T.js +0 -1146
  51. package/packages/cli/dist/chunk-F5EHXE2O.js +0 -1036
  52. package/packages/cli/dist/chunk-F65ANSQG.js +0 -269
  53. package/packages/cli/dist/chunk-FDNCADFE.js +0 -71
  54. package/packages/cli/dist/chunk-FZ6X7PHR.js +0 -1146
  55. package/packages/cli/dist/chunk-GDLRMDAN.js +0 -127
  56. package/packages/cli/dist/chunk-HWMTCMOS.js +0 -656
  57. package/packages/cli/dist/chunk-I74QIQOD.js +0 -5536
  58. package/packages/cli/dist/chunk-JTLSTO25.js +0 -71
  59. package/packages/cli/dist/chunk-JULBBJ27.js +0 -1033
  60. package/packages/cli/dist/chunk-OHVMVRBP.js +0 -117
  61. package/packages/cli/dist/chunk-P2PCLEKX.js +0 -666
  62. package/packages/cli/dist/chunk-PJQIUOX2.js +0 -7767
  63. package/packages/cli/dist/chunk-PPOF3DJW.js +0 -471
  64. package/packages/cli/dist/chunk-Q45257P6.js +0 -173
  65. package/packages/cli/dist/chunk-QNROWGBI.js +0 -1036
  66. package/packages/cli/dist/chunk-RJNYUXZD.js +0 -977
  67. package/packages/cli/dist/chunk-SRTOPJ5W.js +0 -104
  68. package/packages/cli/dist/chunk-TCEX3MPS.js +0 -702
  69. package/packages/cli/dist/chunk-TNOAJO2J.js +0 -675
  70. package/packages/cli/dist/chunk-UR2SUCSF.js +0 -701
  71. package/packages/cli/dist/chunk-X5LOIFM7.js +0 -68
  72. package/packages/cli/dist/chunk-XIRFOO3H.js +0 -589
  73. package/packages/cli/dist/chunk-ZAAV3JXQ.js +0 -809
  74. package/packages/core/dist/K_ENT_Entity-4MB7CU4A.js +0 -12
  75. package/packages/core/dist/K_ENT_Entity-DEJGIDGH.js +0 -12
  76. package/packages/core/dist/K_ENT_Entity-FXZO5UZ2.js +0 -12
  77. package/packages/core/dist/K_ENT_Entity-HDSCXC5F.js +0 -12
  78. package/packages/core/dist/K_ENT_Entity-JILABHLW.js +0 -12
  79. package/packages/core/dist/K_ENT_Entity-PQ5MURQY.js +0 -13
  80. package/packages/core/dist/K_ENT_Entity-ROAKDIHW.js +0 -12
  81. package/packages/core/dist/K_ENT_Entity-TBVFSKDV.js +0 -12
  82. package/packages/core/dist/K_ENT_Entity-ZFLKG3JO.js +0 -12
  83. package/packages/core/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW.js +0 -8
  84. package/packages/core/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF.js +0 -110
  85. package/packages/core/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF.js +0 -9
  86. package/packages/core/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X.js +0 -9
  87. package/packages/core/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW.js +0 -8
  88. package/packages/core/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2.js +0 -20
  89. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-4C6GBQAG.js +0 -18
  90. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-6V23A6F6.js +0 -18
  91. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK.js +0 -19
  92. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-DYLLC5G2.js +0 -18
  93. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-F4FOFAUP.js +0 -18
  94. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-FBOXXMI3.js +0 -18
  95. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-Q73BWLNP.js +0 -18
  96. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-QM2C4MVA.js +0 -18
  97. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-QUGI6SMP.js +0 -18
  98. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-RGMTBHNP.js +0 -18
  99. package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-RWR7UNDW.js +0 -18
  100. package/packages/core/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7.js +0 -7
  101. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-32MFJJ5Z.js +0 -17
  102. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-4J4CEWRY.js +0 -17
  103. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-A366YHF2.js +0 -17
  104. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-LK4LYJHI.js +0 -17
  105. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU.js +0 -17
  106. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-NW3K63II.js +0 -17
  107. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-QDHTI5ZV.js +0 -17
  108. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-VHCT6VIW.js +0 -17
  109. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-WBRKF24R.js +0 -17
  110. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-XKYQYT6Q.js +0 -17
  111. package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-Z2PWZYDZ.js +0 -17
  112. package/packages/core/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5.js +0 -58
  113. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-2EZU7QF4.js +0 -21
  114. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-6G3AQNAV.js +0 -21
  115. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-B2NZMQUG.js +0 -21
  116. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-C2RABMZP.js +0 -21
  117. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-HHE3NZ4F.js +0 -21
  118. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-LHFGR6WK.js +0 -21
  119. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-M74BLM3N.js +0 -21
  120. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-PT6ZA6EA.js +0 -21
  121. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-SP52V3CX.js +0 -21
  122. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF.js +0 -22
  123. package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-YNSEUHJJ.js +0 -21
  124. package/packages/core/dist/K_LIB_Krnl_System_Unified_Http_Adapter-M6SBHIVA.js +0 -8
  125. package/packages/core/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG.js +0 -8
  126. package/packages/core/dist/K_LIB_Krnl_Telemetry-77FRZ3KV.js +0 -9
  127. package/packages/core/dist/chunk-33L2J7V7.js +0 -82
  128. package/packages/core/dist/chunk-3ES4K2ZP.js +0 -817
  129. package/packages/core/dist/chunk-3SMHVVLL.js +0 -82
  130. package/packages/core/dist/chunk-3UEZ7JQA.js +0 -4877
  131. package/packages/core/dist/chunk-3XIE6KBD.js +0 -4877
  132. package/packages/core/dist/chunk-46ZLCML6.js +0 -107
  133. package/packages/core/dist/chunk-4UEL3DWJ.js +0 -107
  134. package/packages/core/dist/chunk-54GWZ5PC.js +0 -82
  135. package/packages/core/dist/chunk-6QCYRS5L.js +0 -127
  136. package/packages/core/dist/chunk-6ULMHNXR.js +0 -104
  137. package/packages/core/dist/chunk-7WUETJEV.js +0 -117
  138. package/packages/core/dist/chunk-A5KRAYDB.js +0 -107
  139. package/packages/core/dist/chunk-ANEAZ3PO.js +0 -107
  140. package/packages/core/dist/chunk-BE76RL6F.js +0 -82
  141. package/packages/core/dist/chunk-CIARVYDO.js +0 -107
  142. package/packages/core/dist/chunk-CR2ANE62.js +0 -107
  143. package/packages/core/dist/chunk-DI27MOR7.js +0 -173
  144. package/packages/core/dist/chunk-E6RLFHM5.js +0 -596
  145. package/packages/core/dist/chunk-EELAPMNV.js +0 -4877
  146. package/packages/core/dist/chunk-ENZ2RQVJ.js +0 -107
  147. package/packages/core/dist/chunk-F2U6CX4F.js +0 -4877
  148. package/packages/core/dist/chunk-FKG64OHL.js +0 -82
  149. package/packages/core/dist/chunk-FYAZJYM5.js +0 -772
  150. package/packages/core/dist/chunk-G4NP4RDQ.js +0 -82
  151. package/packages/core/dist/chunk-GADIRLRS.js +0 -473
  152. package/packages/core/dist/chunk-GR6CSLQJ.js +0 -772
  153. package/packages/core/dist/chunk-HDS7AT6O.js +0 -772
  154. package/packages/core/dist/chunk-HIMEZUU2.js +0 -71
  155. package/packages/core/dist/chunk-IB4UHG5I.js +0 -596
  156. package/packages/core/dist/chunk-J7ZYNVRS.js +0 -772
  157. package/packages/core/dist/chunk-JVLZU4K7.js +0 -604
  158. package/packages/core/dist/chunk-JYXXI7Q3.js +0 -82
  159. package/packages/core/dist/chunk-K54K2KZW.js +0 -192
  160. package/packages/core/dist/chunk-K6VHLBNH.js +0 -3316
  161. package/packages/core/dist/chunk-KCBP7ZYA.js +0 -596
  162. package/packages/core/dist/chunk-KFQGP6VL.js +0 -33
  163. package/packages/core/dist/chunk-KIUEUI7K.js +0 -82
  164. package/packages/core/dist/chunk-LB67NIZP.js +0 -949
  165. package/packages/core/dist/chunk-LDTYFUNW.js +0 -596
  166. package/packages/core/dist/chunk-MLVWARD4.js +0 -596
  167. package/packages/core/dist/chunk-MPYVXHKO.js +0 -2777
  168. package/packages/core/dist/chunk-MRQ3MITU.js +0 -772
  169. package/packages/core/dist/chunk-MVUN7I7O.js +0 -107
  170. package/packages/core/dist/chunk-NDDOIRW7.js +0 -596
  171. package/packages/core/dist/chunk-O3KDB5MH.js +0 -3330
  172. package/packages/core/dist/chunk-OEINUDSE.js +0 -400
  173. package/packages/core/dist/chunk-OPDENPT4.js +0 -4877
  174. package/packages/core/dist/chunk-P6XEM2LA.js +0 -429
  175. package/packages/core/dist/chunk-QKMRSQV4.js +0 -82
  176. package/packages/core/dist/chunk-R6CCWALL.js +0 -4877
  177. package/packages/core/dist/chunk-RAMMOO73.js +0 -774
  178. package/packages/core/dist/chunk-S3FTZFG6.js +0 -772
  179. package/packages/core/dist/chunk-T2ZVN434.js +0 -4877
  180. package/packages/core/dist/chunk-TFHLDMIA.js +0 -107
  181. package/packages/core/dist/chunk-TI3QUCIJ.js +0 -107
  182. package/packages/core/dist/chunk-TR2BAIGI.js +0 -107
  183. package/packages/core/dist/chunk-UGVVJKC6.js +0 -4877
  184. package/packages/core/dist/chunk-V2DX7YIU.js +0 -984
  185. package/packages/core/dist/chunk-W4IHYUYD.js +0 -772
  186. package/packages/core/dist/chunk-W6WBG5OY.js +0 -4877
  187. package/packages/core/dist/chunk-WN3M7O7H.js +0 -3312
  188. package/packages/core/dist/chunk-WR3NCU7U.js +0 -4877
  189. package/packages/core/dist/chunk-XC6B6L27.js +0 -82
  190. package/packages/core/dist/chunk-XNSE64ZY.js +0 -3316
  191. package/packages/core/dist/chunk-XROES2WN.js +0 -634
  192. package/packages/core/dist/chunk-XSCKNRCZ.js +0 -5020
  193. package/packages/core/dist/chunk-XVABPAUZ.js +0 -82
  194. package/packages/core/dist/chunk-YOBCB5C5.js +0 -596
  195. package/packages/core/dist/chunk-YUK6Q563.js +0 -666
  196. package/packages/core/dist/chunk-YXGL3ZEU.js +0 -1030
  197. package/packages/core/dist/chunk-ZINJ5OUX.js +0 -596
  198. package/packages/core/dist/chunk-ZPFD4BIQ.js +0 -604
  199. package/packages/core/dist/chunk-ZQZBFG6F.js +0 -4826
  200. package/packages/core/dist/chunk-ZZFRJGXM.js +0 -4877
  201. package/packages/create-krnl/dist/K_ENT_Entity-PQ5MURQY-R2OH4VXE.js +0 -14
  202. package/packages/create-krnl/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW-AZM5HF4M.js +0 -9
  203. package/packages/create-krnl/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF-X5N6SV2S.js +0 -111
  204. package/packages/create-krnl/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF-5PFHF4JU.js +0 -12
  205. package/packages/create-krnl/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X-ED33OQPH.js +0 -12
  206. package/packages/create-krnl/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW-YGQLVR4P.js +0 -9
  207. package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2-VM7CTU2L.js +0 -21
  208. package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK-Y2GQFJ7I.js +0 -21
  209. package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7-L3JQWO54.js +0 -8
  210. package/packages/create-krnl/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU-KQARASPR.js +0 -19
  211. package/packages/create-krnl/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5-OF3IGLVL.js +0 -59
  212. package/packages/create-krnl/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF-JOLHKOEX.js +0 -24
  213. package/packages/create-krnl/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG-L46LSHKQ.js +0 -10
  214. package/packages/create-krnl/dist/K_LIB_Krnl_Telemetry-77FRZ3KV-4JUPRR3X.js +0 -10
  215. package/packages/create-krnl/dist/chunk-3TRM6CYL.js +0 -152
  216. package/packages/create-krnl/dist/chunk-3URCB3QS.js +0 -127
  217. package/packages/create-krnl/dist/chunk-5JDK35TG.js +0 -3872
  218. package/packages/create-krnl/dist/chunk-A2XAXDOW.js +0 -812
  219. package/packages/create-krnl/dist/chunk-AN6TMQHG.js +0 -1033
  220. package/packages/create-krnl/dist/chunk-BOXWWXQG.js +0 -400
  221. package/packages/create-krnl/dist/chunk-BPTBREBG.js +0 -38
  222. package/packages/create-krnl/dist/chunk-FDNCADFE.js +0 -71
  223. package/packages/create-krnl/dist/chunk-JTLSTO25.js +0 -71
  224. package/packages/create-krnl/dist/chunk-M3NCUIPL.js +0 -107
  225. package/packages/create-krnl/dist/chunk-N2EONSOC.js +0 -7769
  226. package/packages/create-krnl/dist/chunk-OHVMVRBP.js +0 -117
  227. package/packages/create-krnl/dist/chunk-Q45257P6.js +0 -173
  228. package/packages/create-krnl/dist/chunk-QGM4M3NI.js +0 -37
  229. package/packages/create-krnl/dist/chunk-RJNYUXZD.js +0 -977
  230. package/packages/create-krnl/dist/chunk-SRTOPJ5W.js +0 -104
  231. package/packages/create-krnl/dist/chunk-UPBIGEC3.js +0 -666
  232. package/packages/create-krnl/dist/chunk-V2DB7UD7.js +0 -82
  233. package/packages/create-krnl/dist/chunk-WMHLIUI6.js +0 -3644
  234. package/packages/create-krnl/dist/chunk-XIRFOO3H.js +0 -589
  235. package/packages/create-krnl/dist/chunk-Y2CEEVZP.js +0 -5536
  236. package/packages/create-krnl/dist/main-DXUMPBND.js +0 -2217
  237. package/packages/create-krnl/dist/wrapper-SDF2VKX3.js +0 -31
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "@dinilmusick/krnl-core",
2
+ "name": "@ultrst-armada/krnl-core",
3
3
  "version": "1.0.2",
4
4
  "description": "Core runtime engine, Service facades, Protocols, Transports, and Execution flows for Krnl backend services",
5
5
  "type": "module",
@@ -7,18 +7,24 @@
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
+ "types": "./dist/index.d.ts",
10
11
  "import": "./dist/index.js",
11
- "require": "./dist/index.cjs"
12
+ "require": "./dist/index.cjs",
13
+ "default": "./dist/index.js"
12
14
  }
13
15
  },
14
16
  "publishConfig": {
15
- "registry": "https://npm.pkg.github.com"
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
16
19
  },
17
20
  "scripts": {
18
- "build": "tsup src/index.ts --dts --format esm,cjs --external ws,zod,zod-to-json-schema,esbuild"
21
+ "build": "tsup --config tsup.config.ts",
22
+ "test": "vitest run",
23
+ "typecheck": "tsc --noEmit -p tsconfig.json"
19
24
  },
20
25
  "dependencies": {
21
26
  "esbuild": "^0.25.0",
27
+ "p-queue": "^10.0.0",
22
28
  "protobufjs": "^8.7.1",
23
29
  "ws": "^8.18.0",
24
30
  "zod": "3.24.1",
@@ -29,6 +35,8 @@
29
35
  "@types/ws": "^8.18.1",
30
36
  "protobufjs-cli": "^2.6.1",
31
37
  "tsup": "^8.4.0",
32
- "typescript": "^5.7.3"
33
- }
38
+ "typescript": "^5.7.3",
39
+ "vitest": "^3.1.0"
40
+ },
41
+ "module": "dist/index.js"
34
42
  }
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  // src/index.ts
27
27
  var fs3 = __toESM(require("fs"), 1);
28
28
  var path3 = __toESM(require("path"), 1);
29
- var import_krnl_core = require("@dinilmusick/krnl-core");
29
+ var import_krnl_core = require("@ultrst-armada/krnl-core");
30
30
 
31
31
  // src/templates/configTemplates.ts
32
32
  function getBasePackageJson(projectName2) {
@@ -45,14 +45,15 @@ function getBasePackageJson(projectName2) {
45
45
  sync: "krnl sync"
46
46
  },
47
47
  dependencies: {
48
- "@dinilmusick/krnl": "^1.0.0",
49
- "@dinilmusick/krnl-core": "^1.0.0",
50
- "@dinilmusick/krnl-ui": "^1.0.0"
48
+ "@ultrst-armada/krnl": "^1.0.0",
49
+ "@ultrst-armada/krnl-core": "^1.0.0",
50
+ "react": "^18.3.1"
51
51
  },
52
52
  devDependencies: {
53
- "@dinilmusick/krnl-cli": "^1.0.0",
54
- "@dinilmusick/krnl-validate": "^1.0.0",
55
- "@dinilmusick/eslint-plugin-krnl": "^1.0.0",
53
+ "@types/node": "^22.0.0",
54
+ "@types/react": "^18.3.1",
55
+ "@ultrst-armada/krnl-cli": "^1.0.0",
56
+ "@ultrst-armada/krnl-validate": "^1.0.0",
56
57
  typescript: "^5.7.3",
57
58
  vitest: "^1.6.0"
58
59
  }
@@ -86,26 +87,18 @@ function getTsConfig(projectName2) {
86
87
  );
87
88
  }
88
89
  function getAppEntrypoint(projectName2) {
89
- return `import { defineApp, Protocols } from "@dinilmusick/krnl-core";
90
- import { App } from "./krnl/backend/entities/App/App.js";
90
+ const safeIdentifier = projectName2.replace(/[^a-zA-Z0-9_$]/g, "_");
91
+ return `import { AppServiceFacade } from "./krnl/backend/services/App/AppServiceFacade.js";
91
92
 
92
- export default defineApp({
93
- name: "${projectName2}",
94
- version: "1.0.0",
95
- description: "${projectName2} application entrypoint",
96
- protocols: [
97
- Protocols.HTTP({ port: 8080, prefix: "/api" }),
98
- Protocols.WebSocket({ port: 8081 }),
99
- Protocols.MCP({ name: "${projectName2}-agent-tools" })
100
- ],
101
- entities: [
102
- App
103
- ],
104
- frontend: {
105
- rootEntity: "App",
106
- variant: 0
107
- }
108
- });
93
+ export const services = {
94
+ app: AppServiceFacade,
95
+ };
96
+
97
+ export const ${safeIdentifier}Backend = {
98
+ services,
99
+ };
100
+
101
+ export default AppServiceFacade;
109
102
  `;
110
103
  }
111
104
 
@@ -113,14 +106,14 @@ export default defineApp({
113
106
  var fs = __toESM(require("fs"), 1);
114
107
  var path = __toESM(require("path"), 1);
115
108
  function scaffoldBackend(targetDir2) {
116
- const bLibDir = path.join(targetDir2, "krnl", "backend", "libraries", "AppConcepts");
117
- const bEntityDir = path.join(targetDir2, "krnl", "backend", "entities", "App");
118
- const bFuncDir = path.join(targetDir2, "krnl", "backend", "functionalities", "Hello");
109
+ const bServiceDir = path.join(targetDir2, "krnl", "backend", "services", "App");
110
+ const bLibDir = path.join(bServiceDir, "libraries", "AppConcepts");
111
+ const bOrchDir = path.join(bServiceDir, "orchestrations", "App");
112
+ const bFuncDir = path.join(bServiceDir, "functionalities", "Hello");
119
113
  fs.mkdirSync(path.join(bLibDir, "tests"), { recursive: true });
120
- fs.mkdirSync(path.join(bEntityDir, "orchestrations"), { recursive: true });
121
- fs.mkdirSync(path.join(bEntityDir, "tests"), { recursive: true });
114
+ fs.mkdirSync(path.join(bOrchDir, "tests"), { recursive: true });
115
+ fs.mkdirSync(path.join(bServiceDir, "tests"), { recursive: true });
122
116
  fs.mkdirSync(path.join(bFuncDir, "main_function"), { recursive: true });
123
- fs.mkdirSync(path.join(bFuncDir, "state_data"), { recursive: true });
124
117
  fs.mkdirSync(path.join(bFuncDir, "helper_functions"), { recursive: true });
125
118
  fs.mkdirSync(path.join(bFuncDir, "events"), { recursive: true });
126
119
  fs.mkdirSync(path.join(bFuncDir, "tests"), { recursive: true });
@@ -132,42 +125,93 @@ function scaffoldBackend(targetDir2) {
132
125
  fs.writeFileSync(
133
126
  path.join(bLibDir, "functions.ts"),
134
127
  `import type { AppTransformOptions } from "./definitions.js";
135
- export function pureTransform<T>(data: T, _options?: AppTransformOptions): T { return data; }
128
+ export function appPureTransform<T>(data: T, _options?: AppTransformOptions): T { return data; }
129
+ `
130
+ );
131
+ fs.writeFileSync(
132
+ path.join(bLibDir, "index.ts"),
133
+ `export * from "./definitions.js";
134
+ export * from "./functions.js";
136
135
  `
137
136
  );
138
137
  fs.writeFileSync(
139
138
  path.join(bLibDir, "manifest.json"),
140
- JSON.stringify({ name: "AppConcepts", description: "Core utility concept library for App", dependencies: {} }, null, 2)
139
+ JSON.stringify({ name: "AppConcepts", service: "App", description: "Core utility concept library for App", dependencies: {} }, null, 2)
141
140
  );
142
141
  fs.writeFileSync(
143
142
  path.join(bLibDir, "tests", "AppConcepts.test.ts"),
144
143
  `import { describe, it, expect } from "vitest";
145
- import { pureTransform } from "../functions.js";
146
- describe("AppConcepts", () => { it("transforms data", () => { expect(pureTransform(42)).toBe(42); }); });
144
+ import { appPureTransform } from "../functions.js";
145
+ describe("AppConcepts", () => { it("transforms data", () => { expect(appPureTransform(42)).toBe(42); }); });
147
146
  `
148
147
  );
149
148
  fs.writeFileSync(
150
- path.join(bEntityDir, "App.ts"),
151
- `import { Entity, KrnlMagneticLoader } from "@dinilmusick/krnl-core";
152
- export class App extends Entity {
153
- constructor() { super({ id: "App", version: "1.0.0", description: "Root application entity" }); }
154
- async boot(): Promise<void> { await KrnlMagneticLoader.loadAll(this, import.meta.url); }
149
+ path.join(bOrchDir, "AppFunctionalityOrchestration.ts"),
150
+ `import { FunctionalityOrchestration } from "@ultrst-armada/krnl-core";
151
+
152
+ /**
153
+ * @role functionality-orchestration
154
+ * Declarative FunctionalityOrchestration flow for App.
155
+ */
156
+ export class AppFunctionalityOrchestration extends FunctionalityOrchestration {
157
+ constructor() {
158
+ super({
159
+ id: "AppFunctionalityOrchestration",
160
+ name: "App",
161
+ version: "1.0.0",
162
+ description: "Root service functionality orchestration flow",
163
+ });
164
+
165
+ this.flow("default")
166
+ .thenFunctionality("Hello")
167
+ .register({ visibility: "public" });
168
+ }
155
169
  }
156
- export default App;
170
+
171
+ export default AppFunctionalityOrchestration;
157
172
  `
158
173
  );
159
174
  fs.writeFileSync(
160
- path.join(bEntityDir, "orchestrations", "BootFlow.ts"),
161
- `export function configureBootFlow(entity: any) {
162
- return entity.flow("bootSequence").thenFunctionality("Hello").register({ visibility: "public" });
163
- }
175
+ path.join(bOrchDir, "tests", "AppFunctionalityOrchestration.test.ts"),
176
+ `import { describe, it, expect } from "vitest";
177
+ import { AppFunctionalityOrchestration } from "../AppFunctionalityOrchestration.js";
178
+ describe("AppFunctionalityOrchestration", () => { it("initializes flow correctly", () => { expect(new AppFunctionalityOrchestration().id).toBe("AppFunctionalityOrchestration"); }); });
179
+ `
180
+ );
181
+ fs.writeFileSync(
182
+ path.join(bServiceDir, "AppServiceFacade.ts"),
183
+ `import { ServiceFacade } from "@ultrst-armada/krnl-core";
184
+ import { AppFunctionalityOrchestration } from "./orchestrations/App/AppFunctionalityOrchestration.js";
185
+ import * as appConcepts from "./libraries/AppConcepts/index.js";
186
+
187
+ export const AppServiceFacade = new ServiceFacade({
188
+ id: "app.service",
189
+ name: "AppService",
190
+ version: "1.0.0",
191
+ description: "Primary application service facade",
192
+ functionalityOrchestrations: {
193
+ App: new AppFunctionalityOrchestration(),
194
+ },
195
+ libraries: {
196
+ AppConcepts: appConcepts,
197
+ },
198
+ });
199
+
200
+ export default AppServiceFacade;
164
201
  `
165
202
  );
166
203
  fs.writeFileSync(
167
- path.join(bEntityDir, "tests", "App.test.ts"),
204
+ path.join(bServiceDir, "tests", "AppServiceFacade.test.ts"),
168
205
  `import { describe, it, expect } from "vitest";
169
- import { App } from "../App.js";
170
- describe("App Entity", () => { it("initializes with id App", () => { expect(new App().id).toBe("App"); }); });
206
+ import { AppServiceFacade } from "../AppServiceFacade.js";
207
+ describe("AppServiceFacade", () => {
208
+ it("exposes orchestrations and libraries correctly", () => {
209
+ expect(AppServiceFacade.id).toBe("app.service");
210
+ expect(AppServiceFacade.functionalityOrchestrations.App).toBeDefined();
211
+ expect(AppServiceFacade.libraries.AppConcepts).toBeDefined();
212
+ expect(typeof AppServiceFacade.libraries.AppConcepts.appPureTransform).toBe("function");
213
+ });
214
+ });
171
215
  `
172
216
  );
173
217
  fs.writeFileSync(
@@ -178,15 +222,14 @@ export interface HelloOutput { greeting: string; timestamp: number; }
178
222
  );
179
223
  fs.writeFileSync(
180
224
  path.join(bFuncDir, "manifest.json"),
181
- JSON.stringify({ name: "Hello", description: "Greeting quad-unit functionality", dependencies: {} }, null, 2)
225
+ JSON.stringify({ name: "Hello", service: "App", description: "Greeting quad-unit functionality", dependencies: {} }, null, 2)
182
226
  );
183
227
  fs.writeFileSync(
184
228
  path.join(bFuncDir, "main_function", "logic.ts"),
185
229
  `import type { HelloInput, HelloOutput } from "../HelloAtom.js";
186
230
  import { formatGreeting } from "../helper_functions/formatGreeting.js";
187
- export const main = async (input: HelloInput, { state }: any): Promise<HelloOutput> => {
231
+ export const main = async (input: HelloInput, _ctx: any): Promise<HelloOutput> => {
188
232
  const greeting = formatGreeting(input.name || "World");
189
- if (state) state.callCount = (state.callCount || 0) + 1;
190
233
  return { greeting, timestamp: Date.now() };
191
234
  };
192
235
  `
@@ -195,12 +238,6 @@ export const main = async (input: HelloInput, { state }: any): Promise<HelloOutp
195
238
  path.join(bFuncDir, "main_function", "lifecycle.ts"),
196
239
  `export async function onMount() {}
197
240
  export async function onTeardown() {}
198
- `
199
- );
200
- fs.writeFileSync(
201
- path.join(bFuncDir, "state_data", "state.ts"),
202
- `export interface HelloState { callCount: number; }
203
- export const initialState: HelloState = { callCount: 0 };
204
241
  `
205
242
  );
206
243
  fs.writeFileSync(
@@ -227,13 +264,13 @@ var fs2 = __toESM(require("fs"), 1);
227
264
  var path2 = __toESM(require("path"), 1);
228
265
  function scaffoldFrontend(targetDir2, projectName2) {
229
266
  const fLibDir = path2.join(targetDir2, "krnl", "frontend", "libraries", "ButtonConcepts");
230
- const fEntityDir = path2.join(targetDir2, "krnl", "frontend", "entities", "App");
267
+ const fOrchDir = path2.join(targetDir2, "krnl", "frontend", "orchestrations", "App");
231
268
  const fFuncDir = path2.join(targetDir2, "krnl", "frontend", "functionalities", "Hello");
232
269
  fs2.mkdirSync(path2.join(fLibDir, "tests"), { recursive: true });
233
- fs2.mkdirSync(path2.join(fEntityDir, "tests"), { recursive: true });
270
+ fs2.mkdirSync(path2.join(fOrchDir, "tests"), { recursive: true });
234
271
  fs2.mkdirSync(path2.join(fFuncDir, "tests"), { recursive: true });
235
272
  fs2.mkdirSync(path2.join(targetDir2, "docs"), { recursive: true });
236
- fs2.mkdirSync(path2.join(targetDir2, ".skipo"), { recursive: true });
273
+ fs2.mkdirSync(path2.join(targetDir2, ".krnl"), { recursive: true });
237
274
  fs2.writeFileSync(
238
275
  path2.join(fLibDir, "definitions.ts"),
239
276
  `export type ButtonVariant = "primary" | "secondary";
@@ -267,12 +304,12 @@ describe("Button component", () => { it("defined correctly", () => { expect(true
267
304
  `
268
305
  );
269
306
  fs2.writeFileSync(
270
- path2.join(fEntityDir, "App0.tsx"),
307
+ path2.join(fOrchDir, "App0.tsx"),
271
308
  `import React from "react";
272
309
  import { Button } from "../../libraries/ButtonConcepts/components.js";
273
310
  export const App0: React.FC = () => {
274
311
  return (
275
- <div className="krnl-entity-app">
312
+ <div className="krnl-app-view">
276
313
  <h1>App View (Variant 0)</h1>
277
314
  <Button label="Click Me" onClick={() => alert("Welcome to Krnl!")} />
278
315
  </div>
@@ -282,7 +319,7 @@ export default App0;
282
319
  `
283
320
  );
284
321
  fs2.writeFileSync(
285
- path2.join(fEntityDir, "tests", "App0.test.tsx"),
322
+ path2.join(fOrchDir, "tests", "App0.test.tsx"),
286
323
  `import { describe, it, expect } from "vitest";
287
324
  describe("App0 Component", () => { it("mounts variant 0", () => { expect(true).toBe(true); }); });
288
325
  `
@@ -315,7 +352,7 @@ Initialized Krnl symmetric architecture.
315
352
  `
316
353
  );
317
354
  fs2.writeFileSync(
318
- path2.join(targetDir2, ".skipo", "agent-state.json"),
355
+ path2.join(targetDir2, ".krnl", "agent-state.json"),
319
356
  JSON.stringify(
320
357
  {
321
358
  schemaVersion: "1.0.0",
@@ -3,7 +3,7 @@
3
3
  // src/index.ts
4
4
  import * as fs3 from "fs";
5
5
  import * as path3 from "path";
6
- import { KrnlPackageReconciler } from "@dinilmusick/krnl-core";
6
+ import { KrnlPackageReconciler } from "@ultrst-armada/krnl-core";
7
7
 
8
8
  // src/templates/configTemplates.ts
9
9
  function getBasePackageJson(projectName2) {
@@ -22,14 +22,15 @@ function getBasePackageJson(projectName2) {
22
22
  sync: "krnl sync"
23
23
  },
24
24
  dependencies: {
25
- "@dinilmusick/krnl": "^1.0.0",
26
- "@dinilmusick/krnl-core": "^1.0.0",
27
- "@dinilmusick/krnl-ui": "^1.0.0"
25
+ "@ultrst-armada/krnl": "^1.0.0",
26
+ "@ultrst-armada/krnl-core": "^1.0.0",
27
+ "react": "^18.3.1"
28
28
  },
29
29
  devDependencies: {
30
- "@dinilmusick/krnl-cli": "^1.0.0",
31
- "@dinilmusick/krnl-validate": "^1.0.0",
32
- "@dinilmusick/eslint-plugin-krnl": "^1.0.0",
30
+ "@types/node": "^22.0.0",
31
+ "@types/react": "^18.3.1",
32
+ "@ultrst-armada/krnl-cli": "^1.0.0",
33
+ "@ultrst-armada/krnl-validate": "^1.0.0",
33
34
  typescript: "^5.7.3",
34
35
  vitest: "^1.6.0"
35
36
  }
@@ -63,26 +64,18 @@ function getTsConfig(projectName2) {
63
64
  );
64
65
  }
65
66
  function getAppEntrypoint(projectName2) {
66
- return `import { defineApp, Protocols } from "@dinilmusick/krnl-core";
67
- import { App } from "./krnl/backend/entities/App/App.js";
67
+ const safeIdentifier = projectName2.replace(/[^a-zA-Z0-9_$]/g, "_");
68
+ return `import { AppServiceFacade } from "./krnl/backend/services/App/AppServiceFacade.js";
68
69
 
69
- export default defineApp({
70
- name: "${projectName2}",
71
- version: "1.0.0",
72
- description: "${projectName2} application entrypoint",
73
- protocols: [
74
- Protocols.HTTP({ port: 8080, prefix: "/api" }),
75
- Protocols.WebSocket({ port: 8081 }),
76
- Protocols.MCP({ name: "${projectName2}-agent-tools" })
77
- ],
78
- entities: [
79
- App
80
- ],
81
- frontend: {
82
- rootEntity: "App",
83
- variant: 0
84
- }
85
- });
70
+ export const services = {
71
+ app: AppServiceFacade,
72
+ };
73
+
74
+ export const ${safeIdentifier}Backend = {
75
+ services,
76
+ };
77
+
78
+ export default AppServiceFacade;
86
79
  `;
87
80
  }
88
81
 
@@ -90,14 +83,14 @@ export default defineApp({
90
83
  import * as fs from "fs";
91
84
  import * as path from "path";
92
85
  function scaffoldBackend(targetDir2) {
93
- const bLibDir = path.join(targetDir2, "krnl", "backend", "libraries", "AppConcepts");
94
- const bEntityDir = path.join(targetDir2, "krnl", "backend", "entities", "App");
95
- const bFuncDir = path.join(targetDir2, "krnl", "backend", "functionalities", "Hello");
86
+ const bServiceDir = path.join(targetDir2, "krnl", "backend", "services", "App");
87
+ const bLibDir = path.join(bServiceDir, "libraries", "AppConcepts");
88
+ const bOrchDir = path.join(bServiceDir, "orchestrations", "App");
89
+ const bFuncDir = path.join(bServiceDir, "functionalities", "Hello");
96
90
  fs.mkdirSync(path.join(bLibDir, "tests"), { recursive: true });
97
- fs.mkdirSync(path.join(bEntityDir, "orchestrations"), { recursive: true });
98
- fs.mkdirSync(path.join(bEntityDir, "tests"), { recursive: true });
91
+ fs.mkdirSync(path.join(bOrchDir, "tests"), { recursive: true });
92
+ fs.mkdirSync(path.join(bServiceDir, "tests"), { recursive: true });
99
93
  fs.mkdirSync(path.join(bFuncDir, "main_function"), { recursive: true });
100
- fs.mkdirSync(path.join(bFuncDir, "state_data"), { recursive: true });
101
94
  fs.mkdirSync(path.join(bFuncDir, "helper_functions"), { recursive: true });
102
95
  fs.mkdirSync(path.join(bFuncDir, "events"), { recursive: true });
103
96
  fs.mkdirSync(path.join(bFuncDir, "tests"), { recursive: true });
@@ -109,42 +102,93 @@ function scaffoldBackend(targetDir2) {
109
102
  fs.writeFileSync(
110
103
  path.join(bLibDir, "functions.ts"),
111
104
  `import type { AppTransformOptions } from "./definitions.js";
112
- export function pureTransform<T>(data: T, _options?: AppTransformOptions): T { return data; }
105
+ export function appPureTransform<T>(data: T, _options?: AppTransformOptions): T { return data; }
106
+ `
107
+ );
108
+ fs.writeFileSync(
109
+ path.join(bLibDir, "index.ts"),
110
+ `export * from "./definitions.js";
111
+ export * from "./functions.js";
113
112
  `
114
113
  );
115
114
  fs.writeFileSync(
116
115
  path.join(bLibDir, "manifest.json"),
117
- JSON.stringify({ name: "AppConcepts", description: "Core utility concept library for App", dependencies: {} }, null, 2)
116
+ JSON.stringify({ name: "AppConcepts", service: "App", description: "Core utility concept library for App", dependencies: {} }, null, 2)
118
117
  );
119
118
  fs.writeFileSync(
120
119
  path.join(bLibDir, "tests", "AppConcepts.test.ts"),
121
120
  `import { describe, it, expect } from "vitest";
122
- import { pureTransform } from "../functions.js";
123
- describe("AppConcepts", () => { it("transforms data", () => { expect(pureTransform(42)).toBe(42); }); });
121
+ import { appPureTransform } from "../functions.js";
122
+ describe("AppConcepts", () => { it("transforms data", () => { expect(appPureTransform(42)).toBe(42); }); });
124
123
  `
125
124
  );
126
125
  fs.writeFileSync(
127
- path.join(bEntityDir, "App.ts"),
128
- `import { Entity, KrnlMagneticLoader } from "@dinilmusick/krnl-core";
129
- export class App extends Entity {
130
- constructor() { super({ id: "App", version: "1.0.0", description: "Root application entity" }); }
131
- async boot(): Promise<void> { await KrnlMagneticLoader.loadAll(this, import.meta.url); }
126
+ path.join(bOrchDir, "AppFunctionalityOrchestration.ts"),
127
+ `import { FunctionalityOrchestration } from "@ultrst-armada/krnl-core";
128
+
129
+ /**
130
+ * @role functionality-orchestration
131
+ * Declarative FunctionalityOrchestration flow for App.
132
+ */
133
+ export class AppFunctionalityOrchestration extends FunctionalityOrchestration {
134
+ constructor() {
135
+ super({
136
+ id: "AppFunctionalityOrchestration",
137
+ name: "App",
138
+ version: "1.0.0",
139
+ description: "Root service functionality orchestration flow",
140
+ });
141
+
142
+ this.flow("default")
143
+ .thenFunctionality("Hello")
144
+ .register({ visibility: "public" });
145
+ }
132
146
  }
133
- export default App;
147
+
148
+ export default AppFunctionalityOrchestration;
134
149
  `
135
150
  );
136
151
  fs.writeFileSync(
137
- path.join(bEntityDir, "orchestrations", "BootFlow.ts"),
138
- `export function configureBootFlow(entity: any) {
139
- return entity.flow("bootSequence").thenFunctionality("Hello").register({ visibility: "public" });
140
- }
152
+ path.join(bOrchDir, "tests", "AppFunctionalityOrchestration.test.ts"),
153
+ `import { describe, it, expect } from "vitest";
154
+ import { AppFunctionalityOrchestration } from "../AppFunctionalityOrchestration.js";
155
+ describe("AppFunctionalityOrchestration", () => { it("initializes flow correctly", () => { expect(new AppFunctionalityOrchestration().id).toBe("AppFunctionalityOrchestration"); }); });
156
+ `
157
+ );
158
+ fs.writeFileSync(
159
+ path.join(bServiceDir, "AppServiceFacade.ts"),
160
+ `import { ServiceFacade } from "@ultrst-armada/krnl-core";
161
+ import { AppFunctionalityOrchestration } from "./orchestrations/App/AppFunctionalityOrchestration.js";
162
+ import * as appConcepts from "./libraries/AppConcepts/index.js";
163
+
164
+ export const AppServiceFacade = new ServiceFacade({
165
+ id: "app.service",
166
+ name: "AppService",
167
+ version: "1.0.0",
168
+ description: "Primary application service facade",
169
+ functionalityOrchestrations: {
170
+ App: new AppFunctionalityOrchestration(),
171
+ },
172
+ libraries: {
173
+ AppConcepts: appConcepts,
174
+ },
175
+ });
176
+
177
+ export default AppServiceFacade;
141
178
  `
142
179
  );
143
180
  fs.writeFileSync(
144
- path.join(bEntityDir, "tests", "App.test.ts"),
181
+ path.join(bServiceDir, "tests", "AppServiceFacade.test.ts"),
145
182
  `import { describe, it, expect } from "vitest";
146
- import { App } from "../App.js";
147
- describe("App Entity", () => { it("initializes with id App", () => { expect(new App().id).toBe("App"); }); });
183
+ import { AppServiceFacade } from "../AppServiceFacade.js";
184
+ describe("AppServiceFacade", () => {
185
+ it("exposes orchestrations and libraries correctly", () => {
186
+ expect(AppServiceFacade.id).toBe("app.service");
187
+ expect(AppServiceFacade.functionalityOrchestrations.App).toBeDefined();
188
+ expect(AppServiceFacade.libraries.AppConcepts).toBeDefined();
189
+ expect(typeof AppServiceFacade.libraries.AppConcepts.appPureTransform).toBe("function");
190
+ });
191
+ });
148
192
  `
149
193
  );
150
194
  fs.writeFileSync(
@@ -155,15 +199,14 @@ export interface HelloOutput { greeting: string; timestamp: number; }
155
199
  );
156
200
  fs.writeFileSync(
157
201
  path.join(bFuncDir, "manifest.json"),
158
- JSON.stringify({ name: "Hello", description: "Greeting quad-unit functionality", dependencies: {} }, null, 2)
202
+ JSON.stringify({ name: "Hello", service: "App", description: "Greeting quad-unit functionality", dependencies: {} }, null, 2)
159
203
  );
160
204
  fs.writeFileSync(
161
205
  path.join(bFuncDir, "main_function", "logic.ts"),
162
206
  `import type { HelloInput, HelloOutput } from "../HelloAtom.js";
163
207
  import { formatGreeting } from "../helper_functions/formatGreeting.js";
164
- export const main = async (input: HelloInput, { state }: any): Promise<HelloOutput> => {
208
+ export const main = async (input: HelloInput, _ctx: any): Promise<HelloOutput> => {
165
209
  const greeting = formatGreeting(input.name || "World");
166
- if (state) state.callCount = (state.callCount || 0) + 1;
167
210
  return { greeting, timestamp: Date.now() };
168
211
  };
169
212
  `
@@ -172,12 +215,6 @@ export const main = async (input: HelloInput, { state }: any): Promise<HelloOutp
172
215
  path.join(bFuncDir, "main_function", "lifecycle.ts"),
173
216
  `export async function onMount() {}
174
217
  export async function onTeardown() {}
175
- `
176
- );
177
- fs.writeFileSync(
178
- path.join(bFuncDir, "state_data", "state.ts"),
179
- `export interface HelloState { callCount: number; }
180
- export const initialState: HelloState = { callCount: 0 };
181
218
  `
182
219
  );
183
220
  fs.writeFileSync(
@@ -204,13 +241,13 @@ import * as fs2 from "fs";
204
241
  import * as path2 from "path";
205
242
  function scaffoldFrontend(targetDir2, projectName2) {
206
243
  const fLibDir = path2.join(targetDir2, "krnl", "frontend", "libraries", "ButtonConcepts");
207
- const fEntityDir = path2.join(targetDir2, "krnl", "frontend", "entities", "App");
244
+ const fOrchDir = path2.join(targetDir2, "krnl", "frontend", "orchestrations", "App");
208
245
  const fFuncDir = path2.join(targetDir2, "krnl", "frontend", "functionalities", "Hello");
209
246
  fs2.mkdirSync(path2.join(fLibDir, "tests"), { recursive: true });
210
- fs2.mkdirSync(path2.join(fEntityDir, "tests"), { recursive: true });
247
+ fs2.mkdirSync(path2.join(fOrchDir, "tests"), { recursive: true });
211
248
  fs2.mkdirSync(path2.join(fFuncDir, "tests"), { recursive: true });
212
249
  fs2.mkdirSync(path2.join(targetDir2, "docs"), { recursive: true });
213
- fs2.mkdirSync(path2.join(targetDir2, ".skipo"), { recursive: true });
250
+ fs2.mkdirSync(path2.join(targetDir2, ".krnl"), { recursive: true });
214
251
  fs2.writeFileSync(
215
252
  path2.join(fLibDir, "definitions.ts"),
216
253
  `export type ButtonVariant = "primary" | "secondary";
@@ -244,12 +281,12 @@ describe("Button component", () => { it("defined correctly", () => { expect(true
244
281
  `
245
282
  );
246
283
  fs2.writeFileSync(
247
- path2.join(fEntityDir, "App0.tsx"),
284
+ path2.join(fOrchDir, "App0.tsx"),
248
285
  `import React from "react";
249
286
  import { Button } from "../../libraries/ButtonConcepts/components.js";
250
287
  export const App0: React.FC = () => {
251
288
  return (
252
- <div className="krnl-entity-app">
289
+ <div className="krnl-app-view">
253
290
  <h1>App View (Variant 0)</h1>
254
291
  <Button label="Click Me" onClick={() => alert("Welcome to Krnl!")} />
255
292
  </div>
@@ -259,7 +296,7 @@ export default App0;
259
296
  `
260
297
  );
261
298
  fs2.writeFileSync(
262
- path2.join(fEntityDir, "tests", "App0.test.tsx"),
299
+ path2.join(fOrchDir, "tests", "App0.test.tsx"),
263
300
  `import { describe, it, expect } from "vitest";
264
301
  describe("App0 Component", () => { it("mounts variant 0", () => { expect(true).toBe(true); }); });
265
302
  `
@@ -292,7 +329,7 @@ Initialized Krnl symmetric architecture.
292
329
  `
293
330
  );
294
331
  fs2.writeFileSync(
295
- path2.join(targetDir2, ".skipo", "agent-state.json"),
332
+ path2.join(targetDir2, ".krnl", "agent-state.json"),
296
333
  JSON.stringify(
297
334
  {
298
335
  schemaVersion: "1.0.0",
@@ -11,13 +11,15 @@
11
11
  "registry": "https://npm.pkg.github.com"
12
12
  },
13
13
  "scripts": {
14
- "build": "tsup"
14
+ "build": "tsup",
15
+ "test": "vitest run"
15
16
  },
16
17
  "devDependencies": {
17
18
  "tsup": "^8.4.0",
18
- "typescript": "^5.7.3"
19
+ "typescript": "^5.7.3",
20
+ "vitest": "^3.1.0"
19
21
  },
20
22
  "dependencies": {
21
- "@dinilmusick/krnl-core": "workspace:*"
23
+ "@ultrst-armada/krnl-core": "workspace:*"
22
24
  }
23
25
  }