@ultrst-armada/krnl 1.0.7 → 1.0.9
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 +15 -0
- package/package.json +14 -2
- package/packages/cli/dist/bin/krnl.cjs +5 -15
- package/packages/cli/dist/bin/krnl.js +1 -1
- package/packages/cli/dist/{chunk-GHWYEAPD.js → chunk-OOVZPIMX.js} +4 -14
- package/packages/cli/dist/index.cjs +5 -15
- package/packages/cli/dist/index.js +1 -1
- package/packages/core/dist/index.cjs +590 -102
- package/packages/core/dist/index.d.cts +310 -24
- package/packages/core/dist/index.d.ts +310 -24
- package/packages/core/dist/index.js +582 -102
- package/packages/core/package.json +2 -2
package/README.md
CHANGED
|
@@ -61,6 +61,21 @@ A stopped service may be restarted. Invalid lifecycle transitions fail determini
|
|
|
61
61
|
|
|
62
62
|
Proxy lifecycle is local client lifecycle. Proxy state is a local cache and proxy events are local subscriptions unless a transport explicitly implements synchronization.
|
|
63
63
|
|
|
64
|
+
## Native Telemetry
|
|
65
|
+
|
|
66
|
+
Every `ServiceFacade` includes a framework-owned telemetry controller. Services do not implement telemetry APIs individually.
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
service.telemetry.enable();
|
|
70
|
+
service.telemetry.setMode('standard' | 'detailed' | 'profile' | 'off');
|
|
71
|
+
service.telemetry.status();
|
|
72
|
+
service.telemetry.snapshot();
|
|
73
|
+
service.telemetry.reset();
|
|
74
|
+
service.telemetry.functionalities();
|
|
75
|
+
service.telemetry.functionality('operationName');
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Telemetry is disabled by default. Standard mode records invocation timing, counts, success/error state, correlation IDs, and bounded recent traces. Detailed and profile modes additionally capture capability-detected runtime resource samples such as CPU, memory, and event-loop utilization. Service calls, functionality execution, and functionality orchestrations are instrumented automatically and correlated into trace/span hierarchies. No service-specific telemetry code is required.
|
|
64
79
|
## Validation
|
|
65
80
|
|
|
66
81
|
KrnlTS has two complementary validation layers:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultrst-armada/krnl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "KrnlTS backend semantic kernel for authoring, validating, and running modular TypeScript services",
|
|
6
6
|
"type": "module",
|
|
@@ -79,9 +79,21 @@
|
|
|
79
79
|
"url": "git+https://github.com/dinilmusick/KrnlTS.git"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@dinilmusick/gutts": "^0.
|
|
82
|
+
"@dinilmusick/gutts": "^1.0.0",
|
|
83
83
|
"esbuild": "^0.28.2",
|
|
84
84
|
"ts-morph": "^25.0.1",
|
|
85
85
|
"ws": "^8.20.0"
|
|
86
|
+
},
|
|
87
|
+
"packageManager": "pnpm@10.33.0",
|
|
88
|
+
"pnpm": {
|
|
89
|
+
"overrides": {
|
|
90
|
+
"onnxruntime-node": "1.20.1"
|
|
91
|
+
},
|
|
92
|
+
"onlyBuiltDependencies": [
|
|
93
|
+
"better-sqlite3",
|
|
94
|
+
"esbuild",
|
|
95
|
+
"onnxruntime-node",
|
|
96
|
+
"protobufjs"
|
|
97
|
+
]
|
|
86
98
|
}
|
|
87
99
|
}
|
|
@@ -919,20 +919,10 @@ var path7 = __toESM(require("path"), 1);
|
|
|
919
919
|
// ../core/dist/index.js
|
|
920
920
|
var fs5 = __toESM(require("fs"), 1);
|
|
921
921
|
var path6 = __toESM(require("path"), 1);
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
}
|
|
927
|
-
function tryParseJson(text) {
|
|
928
|
-
try {
|
|
929
|
-
return parseJson(text);
|
|
930
|
-
} catch {
|
|
931
|
-
return void 0;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
// ../core/dist/index.js
|
|
922
|
+
var import_gutts = require("@dinilmusick/gutts");
|
|
923
|
+
var gutts = __toESM(require("@dinilmusick/gutts"), 1);
|
|
924
|
+
var runtimeProcess = typeof globalThis !== "undefined" ? globalThis.process : void 0;
|
|
925
|
+
var runtimePerformance = typeof globalThis !== "undefined" ? globalThis.performance : void 0;
|
|
936
926
|
var asyncHooks = globalThis.process?.getBuiltinModule?.("node:async_hooks");
|
|
937
927
|
var KrnlPackageReconciler = class {
|
|
938
928
|
/**
|
|
@@ -945,7 +935,7 @@ var KrnlPackageReconciler = class {
|
|
|
945
935
|
for (const mPath of manifests) {
|
|
946
936
|
try {
|
|
947
937
|
const raw = fs5.readFileSync(mPath, "utf8");
|
|
948
|
-
const json = tryParseJson(raw) ?? {};
|
|
938
|
+
const json = (0, import_gutts.tryParseJson)(raw) ?? {};
|
|
949
939
|
if (json.dependencies && typeof json.dependencies === "object") {
|
|
950
940
|
for (const [pkg, ver] of Object.entries(json.dependencies)) {
|
|
951
941
|
if (!aggregatedDeps[pkg]) aggregatedDeps[pkg] = [];
|
|
@@ -814,20 +814,10 @@ async function runValidate(projectRoot = process.cwd()) {
|
|
|
814
814
|
// ../core/dist/index.js
|
|
815
815
|
import * as fs3 from "fs";
|
|
816
816
|
import * as path4 from "path";
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}
|
|
822
|
-
function tryParseJson(text) {
|
|
823
|
-
try {
|
|
824
|
-
return parseJson(text);
|
|
825
|
-
} catch {
|
|
826
|
-
return void 0;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
// ../core/dist/index.js
|
|
817
|
+
import { tryParseJson } from "@dinilmusick/gutts";
|
|
818
|
+
import * as gutts from "@dinilmusick/gutts";
|
|
819
|
+
var runtimeProcess = typeof globalThis !== "undefined" ? globalThis.process : void 0;
|
|
820
|
+
var runtimePerformance = typeof globalThis !== "undefined" ? globalThis.performance : void 0;
|
|
831
821
|
var asyncHooks = globalThis.process?.getBuiltinModule?.("node:async_hooks");
|
|
832
822
|
var KrnlPackageReconciler = class {
|
|
833
823
|
/**
|
|
@@ -930,20 +930,10 @@ var path7 = __toESM(require("path"), 1);
|
|
|
930
930
|
// ../core/dist/index.js
|
|
931
931
|
var fs5 = __toESM(require("fs"), 1);
|
|
932
932
|
var path6 = __toESM(require("path"), 1);
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
}
|
|
938
|
-
function tryParseJson(text) {
|
|
939
|
-
try {
|
|
940
|
-
return parseJson(text);
|
|
941
|
-
} catch {
|
|
942
|
-
return void 0;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
// ../core/dist/index.js
|
|
933
|
+
var import_gutts = require("@dinilmusick/gutts");
|
|
934
|
+
var gutts = __toESM(require("@dinilmusick/gutts"), 1);
|
|
935
|
+
var runtimeProcess = typeof globalThis !== "undefined" ? globalThis.process : void 0;
|
|
936
|
+
var runtimePerformance = typeof globalThis !== "undefined" ? globalThis.performance : void 0;
|
|
947
937
|
var asyncHooks = globalThis.process?.getBuiltinModule?.("node:async_hooks");
|
|
948
938
|
var KrnlPackageReconciler = class {
|
|
949
939
|
/**
|
|
@@ -956,7 +946,7 @@ var KrnlPackageReconciler = class {
|
|
|
956
946
|
for (const mPath of manifests) {
|
|
957
947
|
try {
|
|
958
948
|
const raw = fs5.readFileSync(mPath, "utf8");
|
|
959
|
-
const json = tryParseJson(raw) ?? {};
|
|
949
|
+
const json = (0, import_gutts.tryParseJson)(raw) ?? {};
|
|
960
950
|
if (json.dependencies && typeof json.dependencies === "object") {
|
|
961
951
|
for (const [pkg, ver] of Object.entries(json.dependencies)) {
|
|
962
952
|
if (!aggregatedDeps[pkg]) aggregatedDeps[pkg] = [];
|