@ultrst-armada/krnl 1.0.2 → 1.0.4
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.
- package/README.md +67 -65
- package/package.json +15 -8
- package/packages/cli/dist/bin/krnl.cjs +808 -331
- package/packages/cli/dist/bin/krnl.js +50 -65
- package/packages/cli/dist/chunk-GHWYEAPD.js +1642 -0
- package/packages/cli/dist/index.cjs +761 -263
- package/packages/cli/dist/index.d.cts +45 -2
- package/packages/cli/dist/index.d.ts +45 -2
- package/packages/cli/dist/index.js +5 -1
- package/packages/cli/package.json +17 -10
- package/packages/core/dist/index.cjs +2912 -140
- package/packages/core/dist/index.d.cts +614 -27
- package/packages/core/dist/index.d.ts +614 -27
- package/packages/core/dist/index.js +2903 -140
- package/packages/core/package.json +15 -6
- package/packages/create-krnl/dist/index.cjs +102 -65
- package/packages/create-krnl/dist/index.js +102 -65
- package/packages/create-krnl/package.json +5 -3
- package/packages/eslint-plugin/dist/index.cjs +17 -55
- package/packages/eslint-plugin/dist/index.d.cts +8 -43
- package/packages/eslint-plugin/dist/index.d.ts +8 -43
- package/packages/eslint-plugin/dist/index.js +17 -55
- package/packages/eslint-plugin/package.json +5 -4
- package/packages/validate/dist/index.cjs +378 -85
- package/packages/validate/dist/index.d.cts +11 -1
- package/packages/validate/dist/index.d.ts +11 -1
- package/packages/validate/dist/index.js +375 -82
- package/packages/validate/package.json +14 -7
- package/packages/cli/dist/K_ENT_Entity-PQ5MURQY-ZG6FZXXX.js +0 -13
- package/packages/cli/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW-K4CRQYA5.js +0 -8
- package/packages/cli/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF-LNPXZYOE.js +0 -110
- package/packages/cli/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF-3ALZPNX4.js +0 -11
- package/packages/cli/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X-PJTICYSW.js +0 -11
- package/packages/cli/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW-M5TYU55O.js +0 -8
- package/packages/cli/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2-H6STOXRK.js +0 -20
- package/packages/cli/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK-XPJXSF7D.js +0 -19
- package/packages/cli/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7-CUYGTWOW.js +0 -7
- package/packages/cli/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU-VR6T4N6J.js +0 -17
- package/packages/cli/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5-RLJ4QWDP.js +0 -58
- package/packages/cli/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF-BOQGUASC.js +0 -22
- package/packages/cli/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG-XJI7KIT5.js +0 -8
- package/packages/cli/dist/K_LIB_Krnl_Telemetry-77FRZ3KV-K5VCWAFW.js +0 -9
- package/packages/cli/dist/chunk-3TRM6CYL.js +0 -152
- package/packages/cli/dist/chunk-5JDK35TG.js +0 -3872
- package/packages/cli/dist/chunk-63PTK33I.js +0 -997
- package/packages/cli/dist/chunk-6NIKAMUZ.js +0 -82
- package/packages/cli/dist/chunk-BOXWWXQG.js +0 -400
- package/packages/cli/dist/chunk-EEKLK7QJ.js +0 -565
- package/packages/cli/dist/chunk-EG7T2IAD.js +0 -107
- package/packages/cli/dist/chunk-ESTKOQ7T.js +0 -1146
- package/packages/cli/dist/chunk-F5EHXE2O.js +0 -1036
- package/packages/cli/dist/chunk-F65ANSQG.js +0 -269
- package/packages/cli/dist/chunk-FDNCADFE.js +0 -71
- package/packages/cli/dist/chunk-FZ6X7PHR.js +0 -1146
- package/packages/cli/dist/chunk-GDLRMDAN.js +0 -127
- package/packages/cli/dist/chunk-HWMTCMOS.js +0 -656
- package/packages/cli/dist/chunk-I74QIQOD.js +0 -5536
- package/packages/cli/dist/chunk-JTLSTO25.js +0 -71
- package/packages/cli/dist/chunk-JULBBJ27.js +0 -1033
- package/packages/cli/dist/chunk-OHVMVRBP.js +0 -117
- package/packages/cli/dist/chunk-P2PCLEKX.js +0 -666
- package/packages/cli/dist/chunk-PJQIUOX2.js +0 -7767
- package/packages/cli/dist/chunk-PPOF3DJW.js +0 -471
- package/packages/cli/dist/chunk-Q45257P6.js +0 -173
- package/packages/cli/dist/chunk-QNROWGBI.js +0 -1036
- package/packages/cli/dist/chunk-RJNYUXZD.js +0 -977
- package/packages/cli/dist/chunk-SRTOPJ5W.js +0 -104
- package/packages/cli/dist/chunk-TCEX3MPS.js +0 -702
- package/packages/cli/dist/chunk-TNOAJO2J.js +0 -675
- package/packages/cli/dist/chunk-UR2SUCSF.js +0 -701
- package/packages/cli/dist/chunk-X5LOIFM7.js +0 -68
- package/packages/cli/dist/chunk-XIRFOO3H.js +0 -589
- package/packages/cli/dist/chunk-ZAAV3JXQ.js +0 -809
- package/packages/core/dist/K_ENT_Entity-4MB7CU4A.js +0 -12
- package/packages/core/dist/K_ENT_Entity-DEJGIDGH.js +0 -12
- package/packages/core/dist/K_ENT_Entity-FXZO5UZ2.js +0 -12
- package/packages/core/dist/K_ENT_Entity-HDSCXC5F.js +0 -12
- package/packages/core/dist/K_ENT_Entity-JILABHLW.js +0 -12
- package/packages/core/dist/K_ENT_Entity-PQ5MURQY.js +0 -13
- package/packages/core/dist/K_ENT_Entity-ROAKDIHW.js +0 -12
- package/packages/core/dist/K_ENT_Entity-TBVFSKDV.js +0 -12
- package/packages/core/dist/K_ENT_Entity-ZFLKG3JO.js +0 -12
- package/packages/core/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF.js +0 -110
- package/packages/core/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF.js +0 -9
- package/packages/core/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X.js +0 -9
- package/packages/core/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2.js +0 -20
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-4C6GBQAG.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-6V23A6F6.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK.js +0 -19
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-DYLLC5G2.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-F4FOFAUP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-FBOXXMI3.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-Q73BWLNP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-QM2C4MVA.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-QUGI6SMP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-RGMTBHNP.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Registry-RWR7UNDW.js +0 -18
- package/packages/core/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7.js +0 -7
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-32MFJJ5Z.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-4J4CEWRY.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-A366YHF2.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-LK4LYJHI.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-NW3K63II.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-QDHTI5ZV.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-VHCT6VIW.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-WBRKF24R.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-XKYQYT6Q.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_App_Adapter-Z2PWZYDZ.js +0 -17
- package/packages/core/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5.js +0 -58
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-2EZU7QF4.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-6G3AQNAV.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-B2NZMQUG.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-C2RABMZP.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-HHE3NZ4F.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-LHFGR6WK.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-M74BLM3N.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-PT6ZA6EA.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-SP52V3CX.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF.js +0 -22
- package/packages/core/dist/K_LIB_Krnl_System_Magnetic_Loader-YNSEUHJJ.js +0 -21
- package/packages/core/dist/K_LIB_Krnl_System_Unified_Http_Adapter-M6SBHIVA.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG.js +0 -8
- package/packages/core/dist/K_LIB_Krnl_Telemetry-77FRZ3KV.js +0 -9
- package/packages/core/dist/chunk-33L2J7V7.js +0 -82
- package/packages/core/dist/chunk-3ES4K2ZP.js +0 -817
- package/packages/core/dist/chunk-3SMHVVLL.js +0 -82
- package/packages/core/dist/chunk-3UEZ7JQA.js +0 -4877
- package/packages/core/dist/chunk-3XIE6KBD.js +0 -4877
- package/packages/core/dist/chunk-46ZLCML6.js +0 -107
- package/packages/core/dist/chunk-4UEL3DWJ.js +0 -107
- package/packages/core/dist/chunk-54GWZ5PC.js +0 -82
- package/packages/core/dist/chunk-6QCYRS5L.js +0 -127
- package/packages/core/dist/chunk-6ULMHNXR.js +0 -104
- package/packages/core/dist/chunk-7WUETJEV.js +0 -117
- package/packages/core/dist/chunk-A5KRAYDB.js +0 -107
- package/packages/core/dist/chunk-ANEAZ3PO.js +0 -107
- package/packages/core/dist/chunk-BE76RL6F.js +0 -82
- package/packages/core/dist/chunk-CIARVYDO.js +0 -107
- package/packages/core/dist/chunk-CR2ANE62.js +0 -107
- package/packages/core/dist/chunk-DI27MOR7.js +0 -173
- package/packages/core/dist/chunk-E6RLFHM5.js +0 -596
- package/packages/core/dist/chunk-EELAPMNV.js +0 -4877
- package/packages/core/dist/chunk-ENZ2RQVJ.js +0 -107
- package/packages/core/dist/chunk-F2U6CX4F.js +0 -4877
- package/packages/core/dist/chunk-FKG64OHL.js +0 -82
- package/packages/core/dist/chunk-FYAZJYM5.js +0 -772
- package/packages/core/dist/chunk-G4NP4RDQ.js +0 -82
- package/packages/core/dist/chunk-GADIRLRS.js +0 -473
- package/packages/core/dist/chunk-GR6CSLQJ.js +0 -772
- package/packages/core/dist/chunk-HDS7AT6O.js +0 -772
- package/packages/core/dist/chunk-HIMEZUU2.js +0 -71
- package/packages/core/dist/chunk-IB4UHG5I.js +0 -596
- package/packages/core/dist/chunk-J7ZYNVRS.js +0 -772
- package/packages/core/dist/chunk-JVLZU4K7.js +0 -604
- package/packages/core/dist/chunk-JYXXI7Q3.js +0 -82
- package/packages/core/dist/chunk-K54K2KZW.js +0 -192
- package/packages/core/dist/chunk-K6VHLBNH.js +0 -3316
- package/packages/core/dist/chunk-KCBP7ZYA.js +0 -596
- package/packages/core/dist/chunk-KFQGP6VL.js +0 -33
- package/packages/core/dist/chunk-KIUEUI7K.js +0 -82
- package/packages/core/dist/chunk-LB67NIZP.js +0 -949
- package/packages/core/dist/chunk-LDTYFUNW.js +0 -596
- package/packages/core/dist/chunk-MLVWARD4.js +0 -596
- package/packages/core/dist/chunk-MPYVXHKO.js +0 -2777
- package/packages/core/dist/chunk-MRQ3MITU.js +0 -772
- package/packages/core/dist/chunk-MVUN7I7O.js +0 -107
- package/packages/core/dist/chunk-NDDOIRW7.js +0 -596
- package/packages/core/dist/chunk-O3KDB5MH.js +0 -3330
- package/packages/core/dist/chunk-OEINUDSE.js +0 -400
- package/packages/core/dist/chunk-OPDENPT4.js +0 -4877
- package/packages/core/dist/chunk-P6XEM2LA.js +0 -429
- package/packages/core/dist/chunk-QKMRSQV4.js +0 -82
- package/packages/core/dist/chunk-R6CCWALL.js +0 -4877
- package/packages/core/dist/chunk-RAMMOO73.js +0 -774
- package/packages/core/dist/chunk-S3FTZFG6.js +0 -772
- package/packages/core/dist/chunk-T2ZVN434.js +0 -4877
- package/packages/core/dist/chunk-TFHLDMIA.js +0 -107
- package/packages/core/dist/chunk-TI3QUCIJ.js +0 -107
- package/packages/core/dist/chunk-TR2BAIGI.js +0 -107
- package/packages/core/dist/chunk-UGVVJKC6.js +0 -4877
- package/packages/core/dist/chunk-V2DX7YIU.js +0 -984
- package/packages/core/dist/chunk-W4IHYUYD.js +0 -772
- package/packages/core/dist/chunk-W6WBG5OY.js +0 -4877
- package/packages/core/dist/chunk-WN3M7O7H.js +0 -3312
- package/packages/core/dist/chunk-WR3NCU7U.js +0 -4877
- package/packages/core/dist/chunk-XC6B6L27.js +0 -82
- package/packages/core/dist/chunk-XNSE64ZY.js +0 -3316
- package/packages/core/dist/chunk-XROES2WN.js +0 -634
- package/packages/core/dist/chunk-XSCKNRCZ.js +0 -5020
- package/packages/core/dist/chunk-XVABPAUZ.js +0 -82
- package/packages/core/dist/chunk-YOBCB5C5.js +0 -596
- package/packages/core/dist/chunk-YUK6Q563.js +0 -666
- package/packages/core/dist/chunk-YXGL3ZEU.js +0 -1030
- package/packages/core/dist/chunk-ZINJ5OUX.js +0 -596
- package/packages/core/dist/chunk-ZPFD4BIQ.js +0 -604
- package/packages/core/dist/chunk-ZQZBFG6F.js +0 -4826
- package/packages/core/dist/chunk-ZZFRJGXM.js +0 -4877
- package/packages/create-krnl/dist/K_ENT_Entity-PQ5MURQY-R2OH4VXE.js +0 -14
- package/packages/create-krnl/dist/K_LIB_Krnl_Aiko_Client-OPZAVZCW-AZM5HF4M.js +0 -9
- package/packages/create-krnl/dist/K_LIB_Krnl_Ep_Tools-ROOE2TQF-X5N6SV2S.js +0 -111
- package/packages/create-krnl/dist/K_LIB_Krnl_Frontend_Builder-2ZDUH6PF-5PFHF4JU.js +0 -12
- package/packages/create-krnl/dist/K_LIB_Krnl_Frontend_Generator-UYNRNX2X-ED33OQPH.js +0 -12
- package/packages/create-krnl/dist/K_LIB_Krnl_Registry_Client-NXV6D2QW-YGQLVR4P.js +0 -9
- package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Engine-7HR5HWW2-VM7CTU2L.js +0 -21
- package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Registry-7XYGDKJK-Y2GQFJ7I.js +0 -21
- package/packages/create-krnl/dist/K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7-L3JQWO54.js +0 -8
- package/packages/create-krnl/dist/K_LIB_Krnl_System_App_Adapter-M6FJKLGU-KQARASPR.js +0 -19
- package/packages/create-krnl/dist/K_LIB_Krnl_System_Base_Functionality_APIs-ZZUZ6ZG5-OF3IGLVL.js +0 -59
- package/packages/create-krnl/dist/K_LIB_Krnl_System_Magnetic_Loader-XBQO2KXF-JOLHKOEX.js +0 -24
- package/packages/create-krnl/dist/K_LIB_Krnl_System_Unified_Http_Adapter-RCEGP3OG-L46LSHKQ.js +0 -10
- package/packages/create-krnl/dist/K_LIB_Krnl_Telemetry-77FRZ3KV-4JUPRR3X.js +0 -10
- package/packages/create-krnl/dist/chunk-3TRM6CYL.js +0 -152
- package/packages/create-krnl/dist/chunk-3URCB3QS.js +0 -127
- package/packages/create-krnl/dist/chunk-5JDK35TG.js +0 -3872
- package/packages/create-krnl/dist/chunk-A2XAXDOW.js +0 -812
- package/packages/create-krnl/dist/chunk-AN6TMQHG.js +0 -1033
- package/packages/create-krnl/dist/chunk-BOXWWXQG.js +0 -400
- package/packages/create-krnl/dist/chunk-BPTBREBG.js +0 -38
- package/packages/create-krnl/dist/chunk-FDNCADFE.js +0 -71
- package/packages/create-krnl/dist/chunk-JTLSTO25.js +0 -71
- package/packages/create-krnl/dist/chunk-M3NCUIPL.js +0 -107
- package/packages/create-krnl/dist/chunk-N2EONSOC.js +0 -7769
- package/packages/create-krnl/dist/chunk-OHVMVRBP.js +0 -117
- package/packages/create-krnl/dist/chunk-Q45257P6.js +0 -173
- package/packages/create-krnl/dist/chunk-QGM4M3NI.js +0 -37
- package/packages/create-krnl/dist/chunk-RJNYUXZD.js +0 -977
- package/packages/create-krnl/dist/chunk-SRTOPJ5W.js +0 -104
- package/packages/create-krnl/dist/chunk-UPBIGEC3.js +0 -666
- package/packages/create-krnl/dist/chunk-V2DB7UD7.js +0 -82
- package/packages/create-krnl/dist/chunk-WMHLIUI6.js +0 -3644
- package/packages/create-krnl/dist/chunk-XIRFOO3H.js +0 -589
- package/packages/create-krnl/dist/chunk-Y2CEEVZP.js +0 -5536
- package/packages/create-krnl/dist/main-DXUMPBND.js +0 -2217
- package/packages/create-krnl/dist/wrapper-SDF2VKX3.js +0 -31
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
telemetry
|
|
3
|
-
} from "./chunk-DI27MOR7.js";
|
|
4
|
-
|
|
5
|
-
// src/core/K_LIB_Krnl_System_Base_Functionality_APIs.ts
|
|
6
|
-
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
7
|
-
function heartbeatApi(entity) {
|
|
8
|
-
return () => ({
|
|
9
|
-
name: entity.entityName,
|
|
10
|
-
type: entity.systemType,
|
|
11
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function telemetryApi(entity) {
|
|
15
|
-
return () => {
|
|
16
|
-
const summary = telemetry.getSummary();
|
|
17
|
-
return {
|
|
18
|
-
entityName: entity.entityName,
|
|
19
|
-
systemType: entity.systemType,
|
|
20
|
-
flags: entity.getSystemFlags(),
|
|
21
|
-
owner: entity.hierarchyManager.getOwnerEntity()?.entityName || null,
|
|
22
|
-
ownedEntities: entity.hierarchyManager.getAllOwnedComponentEntities().map((e) => e.entityName),
|
|
23
|
-
activeRoutes: entity.commComponent.listRoutes(),
|
|
24
|
-
uptime: typeof process !== "undefined" && process.uptime ? process.uptime() : null,
|
|
25
|
-
performance: summary.metrics || summary,
|
|
26
|
-
callLogs: summary.callLogs,
|
|
27
|
-
libraryUsage: summary.libraryUsage,
|
|
28
|
-
dataUsage: summary.dataUsage
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function adminCommandApi(entity) {
|
|
33
|
-
return async ({ command, args }) => {
|
|
34
|
-
console.log(`[${entity.entityName}] Admin command: ${command}`, args);
|
|
35
|
-
if (command === "set-discoverable") {
|
|
36
|
-
return {
|
|
37
|
-
status: "acknowledged",
|
|
38
|
-
command,
|
|
39
|
-
flags: entity.setDiscoverable(Boolean(args?.value))
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (command === "reserve") {
|
|
43
|
-
return {
|
|
44
|
-
status: "acknowledged",
|
|
45
|
-
command,
|
|
46
|
-
flags: entity.reserveFor(args?.serviceName || "unknown")
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
if (command === "release-reservation") {
|
|
50
|
-
return {
|
|
51
|
-
status: "acknowledged",
|
|
52
|
-
command,
|
|
53
|
-
flags: entity.releaseReservation(args?.serviceName || null)
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (command === "shutdown") {
|
|
57
|
-
console.log(`[${entity.entityName}] Graceful shutdown initiated via admin command.`);
|
|
58
|
-
setTimeout(() => {
|
|
59
|
-
entity.dispose();
|
|
60
|
-
process.exit(0);
|
|
61
|
-
}, 500);
|
|
62
|
-
return {
|
|
63
|
-
status: "acknowledged",
|
|
64
|
-
command,
|
|
65
|
-
message: "System will shutdown in 500ms"
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return { status: "acknowledged", command, flags: entity.getSystemFlags() };
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function discoverPeersApi(entity) {
|
|
72
|
-
return ({ includeBusy = true } = {}) => {
|
|
73
|
-
const peers = entity.listPeers();
|
|
74
|
-
if (includeBusy) return peers;
|
|
75
|
-
return peers.filter((peer) => !peer.busy);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function getManifestApi(entity) {
|
|
79
|
-
return () => entity.getManifest();
|
|
80
|
-
}
|
|
81
|
-
function getLastActionDocsApi(entity) {
|
|
82
|
-
return () => {
|
|
83
|
-
return {
|
|
84
|
-
preemptiveDocumentation: entity._lastPreemptiveDoc || null,
|
|
85
|
-
errorDocumentation: entity._lastErrorDoc || null
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function getFullDocumentationApi(entity) {
|
|
90
|
-
return () => {
|
|
91
|
-
if (entity._documentationProvider && typeof entity._documentationProvider.getDocsForLayer === "function") {
|
|
92
|
-
return entity._documentationProvider.getDocsForLayer("LAYER_1_ENTRY") || [];
|
|
93
|
-
}
|
|
94
|
-
return [];
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
function systemCommandsCollectorHandler(entity) {
|
|
98
|
-
return (msg) => {
|
|
99
|
-
console.log(`[${entity.entityName}] system-commands received:`, JSON.stringify(msg.data));
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function getUsedPortsApi(entity) {
|
|
103
|
-
return () => {
|
|
104
|
-
const registry = entity.getRegisteredPorts();
|
|
105
|
-
return {
|
|
106
|
-
entity: entity.entityName,
|
|
107
|
-
ports: Object.values(registry),
|
|
108
|
-
registry
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
function findFreePortsApi(entity) {
|
|
113
|
-
return async ({
|
|
114
|
-
count = 1,
|
|
115
|
-
rangeStart = 3e3,
|
|
116
|
-
rangeEnd = 65535
|
|
117
|
-
}) => {
|
|
118
|
-
if (count < 1) throw new Error("count must be \u2265 1");
|
|
119
|
-
if (rangeStart < 1 || rangeEnd > 65535 || rangeStart > rangeEnd) {
|
|
120
|
-
throw new Error("Invalid port range: 1 \u2264 rangeStart \u2264 rangeEnd \u2264 65535");
|
|
121
|
-
}
|
|
122
|
-
const usedSet = new Set(
|
|
123
|
-
Object.values(entity.getRegisteredPorts())
|
|
124
|
-
);
|
|
125
|
-
const usedByPeer = {
|
|
126
|
-
[entity.entityName]: Array.from(usedSet)
|
|
127
|
-
};
|
|
128
|
-
const peers = entity.listPeers();
|
|
129
|
-
await Promise.allSettled(
|
|
130
|
-
peers.map(async (peer) => {
|
|
131
|
-
try {
|
|
132
|
-
const remote = entity.getRemoteEntity(peer.id);
|
|
133
|
-
if (!remote) return;
|
|
134
|
-
const result = await remote.call("getUsedPorts", {});
|
|
135
|
-
const payload = result?.payload ?? result;
|
|
136
|
-
const peerPorts = Array.isArray(payload?.ports) ? payload.ports : [];
|
|
137
|
-
usedByPeer[peer.id] = peerPorts;
|
|
138
|
-
peerPorts.forEach((p) => usedSet.add(p));
|
|
139
|
-
} catch (_) {
|
|
140
|
-
}
|
|
141
|
-
})
|
|
142
|
-
);
|
|
143
|
-
const freePorts = [];
|
|
144
|
-
for (let p = rangeStart; p <= rangeEnd && freePorts.length < count; p++) {
|
|
145
|
-
if (!usedSet.has(p)) freePorts.push(p);
|
|
146
|
-
}
|
|
147
|
-
if (freePorts.length < count) {
|
|
148
|
-
throw new Error(
|
|
149
|
-
`Only ${freePorts.length} free port(s) available in [${rangeStart}, ${rangeEnd}]; requested ${count}.`
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
return { freePorts, queriedPeers: peers.length, totalUsedCount: usedSet.size, usedByPeer };
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
function shutdownApi(entity) {
|
|
156
|
-
return ({ timeoutMs = 1e4 } = {}) => {
|
|
157
|
-
setTimeout(() => {
|
|
158
|
-
entity.gracefulShutdown({ timeoutMs }).catch((err) => {
|
|
159
|
-
console.error(`[${entity.entityName}] gracefulShutdown error:`, err?.message ?? err);
|
|
160
|
-
process.exit(1);
|
|
161
|
-
});
|
|
162
|
-
}, 200);
|
|
163
|
-
return {
|
|
164
|
-
status: "acknowledged",
|
|
165
|
-
message: `Graceful shutdown initiated for '${entity.entityName}' and all owned microservices.`,
|
|
166
|
-
entity: entity.entityName,
|
|
167
|
-
timeoutMs
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function getSiblingNetworkTopologyApi(entity) {
|
|
172
|
-
return () => {
|
|
173
|
-
if (!entity._siblingNetwork) return null;
|
|
174
|
-
return entity.getSiblingNetworkTopology();
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function getSubAppTopologyApi(entity) {
|
|
178
|
-
return () => entity.getSubAppTopology();
|
|
179
|
-
}
|
|
180
|
-
function getIngressNetworkTopologyApi(entity) {
|
|
181
|
-
return getSiblingNetworkTopologyApi(entity);
|
|
182
|
-
}
|
|
183
|
-
function registerAppApi(entity) {
|
|
184
|
-
return ({ name, port, pid }) => {
|
|
185
|
-
if (!entity._registryApps) {
|
|
186
|
-
entity._registryApps = /* @__PURE__ */ new Map();
|
|
187
|
-
}
|
|
188
|
-
entity._registryApps.set(name, {
|
|
189
|
-
name,
|
|
190
|
-
port,
|
|
191
|
-
pid,
|
|
192
|
-
registeredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
193
|
-
lastHeartbeat: Date.now()
|
|
194
|
-
});
|
|
195
|
-
console.log(`[Registry] Registered app "${name}" on port ${port} (PID ${pid})`);
|
|
196
|
-
return { success: true };
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
function deregisterAppApi(entity) {
|
|
200
|
-
return ({ name }) => {
|
|
201
|
-
if (entity._registryApps) {
|
|
202
|
-
const deleted = entity._registryApps.delete(name);
|
|
203
|
-
if (deleted) {
|
|
204
|
-
console.log(`[Registry] Deregistered app "${name}"`);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return { success: true };
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
function heartbeatAppApi(entity) {
|
|
211
|
-
return ({ name }) => {
|
|
212
|
-
if (entity._registryApps && entity._registryApps.has(name)) {
|
|
213
|
-
const app = entity._registryApps.get(name);
|
|
214
|
-
app.lastHeartbeat = Date.now();
|
|
215
|
-
return { success: true };
|
|
216
|
-
}
|
|
217
|
-
return { success: false, error: `App "${name}" not registered` };
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
function lookupAppApi(entity) {
|
|
221
|
-
return ({ name }) => {
|
|
222
|
-
if (entity._registryApps && entity._registryApps.has(name)) {
|
|
223
|
-
const app = entity._registryApps.get(name);
|
|
224
|
-
return {
|
|
225
|
-
name: app.name,
|
|
226
|
-
port: app.port,
|
|
227
|
-
pid: app.pid,
|
|
228
|
-
registeredAt: app.registeredAt
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
return { error: `App "${name}" not found` };
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
function listAppsApi(entity) {
|
|
235
|
-
return () => {
|
|
236
|
-
if (!entity._registryApps) return [];
|
|
237
|
-
return Array.from(entity._registryApps.values()).map((app) => ({
|
|
238
|
-
name: app.name,
|
|
239
|
-
port: app.port,
|
|
240
|
-
pid: app.pid,
|
|
241
|
-
registeredAt: app.registeredAt
|
|
242
|
-
}));
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
function buildEndpointDefinition(fn, entity, runtimeOverride = null, memory = "") {
|
|
246
|
-
const isSystem = entity._krnlSystemEndpointIds?.has(fn.id) || fn.id === "getEndpointDefinitions" || fn.id === "setEndpointDefinition" || fn.id === "getTelemetryLog";
|
|
247
|
-
let inputSchema = {};
|
|
248
|
-
let outputSchema = {};
|
|
249
|
-
if (fn.schema) {
|
|
250
|
-
if (fn.schema.input) {
|
|
251
|
-
try {
|
|
252
|
-
inputSchema = zodToJsonSchema(fn.schema.input);
|
|
253
|
-
} catch (e) {
|
|
254
|
-
inputSchema = { type: "object" };
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
if (fn.schema.output) {
|
|
258
|
-
try {
|
|
259
|
-
outputSchema = zodToJsonSchema(fn.schema.output);
|
|
260
|
-
} catch (e) {
|
|
261
|
-
outputSchema = { type: "object" };
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
const defaultSpec = {
|
|
266
|
-
reasoning: 3,
|
|
267
|
-
planning: 1,
|
|
268
|
-
toolUsage: 1,
|
|
269
|
-
structuredOutput: 5,
|
|
270
|
-
jsonStrictness: 5,
|
|
271
|
-
coding: 1,
|
|
272
|
-
extraction: 3,
|
|
273
|
-
classification: 3,
|
|
274
|
-
summarization: 3,
|
|
275
|
-
creativity: 3,
|
|
276
|
-
determinism: 5,
|
|
277
|
-
context: 3,
|
|
278
|
-
vision: 1,
|
|
279
|
-
multimodal: 1,
|
|
280
|
-
outputComplexity: 3
|
|
281
|
-
};
|
|
282
|
-
const codeSpec = fn.ai?.intelligenceSpec || fn.intelligenceSpec || defaultSpec;
|
|
283
|
-
const mergedSpec = runtimeOverride?.intelligenceSpec || codeSpec;
|
|
284
|
-
const emittersList = [];
|
|
285
|
-
if (fn.emitters) {
|
|
286
|
-
fn.emitters.forEach((_, eid) => {
|
|
287
|
-
emittersList.push(`${fn.id}:${eid}`);
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
return {
|
|
291
|
-
id: fn.id,
|
|
292
|
-
category: isSystem ? "krnl_system" : "app",
|
|
293
|
-
method: fn.method || "POST",
|
|
294
|
-
visibility: fn.visibility || "public",
|
|
295
|
-
inputSchema,
|
|
296
|
-
outputSchema,
|
|
297
|
-
description: runtimeOverride?.description || fn.description || `Execute ${fn.id}`,
|
|
298
|
-
systemInstructions: runtimeOverride?.systemInstructions || fn.ai?.systemInstructions || "",
|
|
299
|
-
examples: runtimeOverride?.examples || fn.examples || [],
|
|
300
|
-
examplePayload: runtimeOverride?.examplePayload || fn.example || null,
|
|
301
|
-
intelligenceSpec: mergedSpec,
|
|
302
|
-
agentTools: runtimeOverride?.agentTools || fn.ai?.agentTools || [],
|
|
303
|
-
retryConfig: runtimeOverride?.retryConfig || fn.ai?.retryConfig || { maxRetries: 4, timeoutMs: 12e3, retryDelayMs: 500, backoffStrategy: "LINEAR" },
|
|
304
|
-
staticWatchVars: runtimeOverride?.staticWatchVars || fn.ai?.staticWatchVars || [],
|
|
305
|
-
dynamicWatchVars: runtimeOverride?.dynamicWatchVars || fn.ai?.dynamicWatchVars || [],
|
|
306
|
-
accessPolicy: fn.accessPolicy || null,
|
|
307
|
-
emitters: emittersList,
|
|
308
|
-
sourcePath: fn.sourcePath || null,
|
|
309
|
-
memory: memory || "",
|
|
310
|
-
runtimeEdited: !!runtimeOverride
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
function getEndpointDefinitionsApi(entity) {
|
|
314
|
-
return async () => {
|
|
315
|
-
const list = [];
|
|
316
|
-
const store = entity._aiProfilesStore;
|
|
317
|
-
const overrides = store ? await store.getAllEndpointDefinitions() : {};
|
|
318
|
-
const seen = /* @__PURE__ */ new Set();
|
|
319
|
-
const processF = async (fn) => {
|
|
320
|
-
if (seen.has(fn.id)) return;
|
|
321
|
-
seen.add(fn.id);
|
|
322
|
-
const override = overrides[fn.id] || null;
|
|
323
|
-
const mem = store ? await store.getEndpointMemory(fn.id) : "";
|
|
324
|
-
list.push(buildEndpointDefinition(fn, entity, override, mem));
|
|
325
|
-
};
|
|
326
|
-
if (entity.localFunctionalities) {
|
|
327
|
-
for (const fn of entity.localFunctionalities.values()) {
|
|
328
|
-
await processF(fn);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
if (entity.remoteFunctionalities) {
|
|
332
|
-
for (const fn of entity.remoteFunctionalities.values()) {
|
|
333
|
-
await processF(fn);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
return list;
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
function setEndpointDefinitionApi(entity) {
|
|
340
|
-
return async ({ id, override }) => {
|
|
341
|
-
const store = entity._aiProfilesStore;
|
|
342
|
-
if (!store) {
|
|
343
|
-
throw new Error("Runtime Store not initialized.");
|
|
344
|
-
}
|
|
345
|
-
const current = await store.getEndpointDefinition(id) || {};
|
|
346
|
-
const updated = { ...current, ...override };
|
|
347
|
-
await store.setEndpointDefinition(id, updated);
|
|
348
|
-
if (typeof entity.initializeAiLayer === "function") {
|
|
349
|
-
await entity.initializeAiLayer(entity._entityDataDir);
|
|
350
|
-
}
|
|
351
|
-
const fn = entity.localFunctionalities.get(id) || entity.remoteFunctionalities.get(id);
|
|
352
|
-
if (!fn) {
|
|
353
|
-
throw new Error(`Endpoint ${id} not found.`);
|
|
354
|
-
}
|
|
355
|
-
const mem = await store.getEndpointMemory(id);
|
|
356
|
-
return buildEndpointDefinition(fn, entity, updated, mem);
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function getTelemetryLogApi(entity) {
|
|
360
|
-
return async ({ limit } = {}) => {
|
|
361
|
-
const store = entity._aiProfilesStore;
|
|
362
|
-
if (!store) return [];
|
|
363
|
-
return await store.getTelemetryLog(limit);
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
function getAikoCatalogApi(entity) {
|
|
367
|
-
return async () => {
|
|
368
|
-
if (!entity._aikoClient) {
|
|
369
|
-
throw new Error("Aiko client not initialized.");
|
|
370
|
-
}
|
|
371
|
-
try {
|
|
372
|
-
entity._aikoCatalog = await entity._aikoClient.fetchCatalog();
|
|
373
|
-
return { status: "success", catalog: entity._aikoCatalog };
|
|
374
|
-
} catch (e) {
|
|
375
|
-
return { status: "error", message: `Failed to fetch catalog: ${e.message}`, catalog: entity._aikoCatalog };
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
function aiOrchestrationApi(entity) {
|
|
380
|
-
return async ({ message }) => {
|
|
381
|
-
if (!entity._aiOrchestrator) {
|
|
382
|
-
const { KrnlAikoClient } = await import("./K_LIB_Krnl_Aiko_Client-OPZAVZCW.js");
|
|
383
|
-
throw new Error(KrnlAikoClient.getNotRunningMessage());
|
|
384
|
-
}
|
|
385
|
-
try {
|
|
386
|
-
await entity._aiOrchestrator.orchestrate(message);
|
|
387
|
-
return { status: "pipeline-started", info: entity._aiOrchestrator.taskRunner.getStatus() };
|
|
388
|
-
} catch (e) {
|
|
389
|
-
return { status: "error", message: e.message };
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
function getTaskListApi(entity) {
|
|
394
|
-
return () => {
|
|
395
|
-
if (!entity._aiOrchestrator) {
|
|
396
|
-
return { status: "inactive", tasks: [], cursor: 0 };
|
|
397
|
-
}
|
|
398
|
-
return entity._aiOrchestrator.taskRunner.getStatus();
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
export {
|
|
403
|
-
heartbeatApi,
|
|
404
|
-
telemetryApi,
|
|
405
|
-
adminCommandApi,
|
|
406
|
-
discoverPeersApi,
|
|
407
|
-
getManifestApi,
|
|
408
|
-
getLastActionDocsApi,
|
|
409
|
-
getFullDocumentationApi,
|
|
410
|
-
systemCommandsCollectorHandler,
|
|
411
|
-
getUsedPortsApi,
|
|
412
|
-
findFreePortsApi,
|
|
413
|
-
shutdownApi,
|
|
414
|
-
getSiblingNetworkTopologyApi,
|
|
415
|
-
getSubAppTopologyApi,
|
|
416
|
-
getIngressNetworkTopologyApi,
|
|
417
|
-
registerAppApi,
|
|
418
|
-
deregisterAppApi,
|
|
419
|
-
heartbeatAppApi,
|
|
420
|
-
lookupAppApi,
|
|
421
|
-
listAppsApi,
|
|
422
|
-
buildEndpointDefinition,
|
|
423
|
-
getEndpointDefinitionsApi,
|
|
424
|
-
setEndpointDefinitionApi,
|
|
425
|
-
getTelemetryLogApi,
|
|
426
|
-
getAikoCatalogApi,
|
|
427
|
-
aiOrchestrationApi,
|
|
428
|
-
getTaskListApi
|
|
429
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
subappLocalStorage
|
|
3
|
-
} from "./chunk-KCBP7ZYA.js";
|
|
4
|
-
|
|
5
|
-
// src/core/K_LIB_Krnl_SubApp_Registry.ts
|
|
6
|
-
import path from "path";
|
|
7
|
-
import { pathToFileURL } from "url";
|
|
8
|
-
var KrnlSubAppLoader = class {
|
|
9
|
-
/**
|
|
10
|
-
* Loads a single sub-app into the parent entity's _subAppRegistry.
|
|
11
|
-
*
|
|
12
|
-
* For 'local' mode the sub-app class is instantiated directly in the parent process.
|
|
13
|
-
* Networking is suppressed automatically because the entity is constructed inside the
|
|
14
|
-
* subappLocalStorage async context (sets _isSubApp = true) and _startSharedServer()
|
|
15
|
-
* returns early for sub-app entities.
|
|
16
|
-
*
|
|
17
|
-
* For 'worker' mode a worker_thread is spawned and a KrnlSubAppWorkerHost proxy is
|
|
18
|
-
* registered in its place. All calls transit via MessagePort — no TCP/HTTP involved.
|
|
19
|
-
*/
|
|
20
|
-
static async load(parent, config) {
|
|
21
|
-
const mode = config.executionMode ?? "local";
|
|
22
|
-
const prefix = config.prefix.toLowerCase();
|
|
23
|
-
if (parent._subAppRegistry.has(prefix)) {
|
|
24
|
-
console.log(`[SubAppRegistry] Sub-app '${prefix}' already registered. Skipping.`);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
let entry;
|
|
28
|
-
if (mode === "local") {
|
|
29
|
-
const appDir = config.entryPath ? path.dirname(config.entryPath) : "";
|
|
30
|
-
let entity;
|
|
31
|
-
if (config.isKrnl === false || !config.ServiceClass) {
|
|
32
|
-
const { KrnlNonKrnlAppAdapter } = await import("./K_LIB_Krnl_System_App_Adapter-A366YHF2.js");
|
|
33
|
-
const adapter = new KrnlNonKrnlAppAdapter(config.prefix, config.entryPath || "");
|
|
34
|
-
await adapter.startApp();
|
|
35
|
-
entity = adapter;
|
|
36
|
-
} else {
|
|
37
|
-
const options = { host: "0.0.0.0" };
|
|
38
|
-
if (config.entryPath) options.sourcePath = pathToFileURL(config.entryPath).href;
|
|
39
|
-
entity = await subappLocalStorage.run({ appPath: appDir }, async () => {
|
|
40
|
-
const inst = new config.ServiceClass(-1, options, ...config.constructorArgs ?? []);
|
|
41
|
-
if (typeof inst.boot === "function") {
|
|
42
|
-
try {
|
|
43
|
-
await inst.boot();
|
|
44
|
-
} catch (bootErr) {
|
|
45
|
-
console.warn(`[SubAppRegistry] Auto-boot warning on sub-app '${prefix}':`, bootErr.message || bootErr);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (inst._magneticLoadPromise) {
|
|
49
|
-
await inst._magneticLoadPromise;
|
|
50
|
-
}
|
|
51
|
-
return inst;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (typeof entity._resolveReady === "function") {
|
|
55
|
-
entity._resolveReady();
|
|
56
|
-
}
|
|
57
|
-
parent.hierarchyManager.addComponentEntityInstance(entity);
|
|
58
|
-
entry = {
|
|
59
|
-
prefix,
|
|
60
|
-
executionMode: "local",
|
|
61
|
-
entity,
|
|
62
|
-
addedAt: Date.now()
|
|
63
|
-
};
|
|
64
|
-
console.log(`[SubAppRegistry] Loaded sub-app '${prefix}' in LOCAL mode (in-process).`);
|
|
65
|
-
} else {
|
|
66
|
-
const { KrnlSubAppWorkerHost } = await import("./K_LIB_Krnl_SubApp_Worker_Host-CQVTGGG7.js");
|
|
67
|
-
const host = await KrnlSubAppWorkerHost.create(config);
|
|
68
|
-
entry = {
|
|
69
|
-
prefix,
|
|
70
|
-
executionMode: "worker",
|
|
71
|
-
entity: host,
|
|
72
|
-
addedAt: Date.now()
|
|
73
|
-
};
|
|
74
|
-
console.log(`[SubAppRegistry] Loaded sub-app '${prefix}' in WORKER mode (isolated thread).`);
|
|
75
|
-
}
|
|
76
|
-
parent._subAppRegistry.set(prefix, entry);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export {
|
|
81
|
-
KrnlSubAppLoader
|
|
82
|
-
};
|