@ultrst-armada/krnl 1.0.0 โ†’ 1.0.1

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 CHANGED
@@ -1,6 +1,18 @@
1
1
  # Krnl Framework
2
2
 
3
- > **Krnl**: High-Performance Full-Stack TypeScript Framework with Direct-DOM VanJS Reactivity, ts-morph AST Purity Gates, Autonomous Code Evolution, and the **Krnl Studio Visual Node IDE**.
3
+ > **Krnl**: Backend Service Framework for Skipo โ€” a modular TypeScript framework for authoring, composing, executing, and validating backend services, facades, protocols, and workflows.
4
+
5
+ ---
6
+
7
+ ## ๐Ÿš€ Overview
8
+
9
+ In the **Skipo** ecosystem, services are the foundational backend modules. **Krnl** provides the kernel architecture, lifecycle hooks, transport gateways, protocol decoders, and validation engine for building robust, decoupled backend services.
10
+
11
+ - **Modular Service Architecture**: Define pure, stateful, and protocol-enabled backend service facades.
12
+ - **Workflow & Flow Execution**: Compose multi-service pipelines and background execution boundaries.
13
+ - **AST Purity & Validation**: Enforce 4-layer function purity, contract standards, and architecture rules via `ts-morph`.
14
+ - **Protocol & Network Ingress**: Support REST, WebSocket, RPC, and MCP protocol bindings out of the box.
15
+ - **Universal Backend Readiness**: Run seamlessly across Local FS, Local-Hosted, and Serverless environments.
4
16
 
5
17
  ---
6
18
 
@@ -11,44 +23,45 @@ Run the official interactive project generator:
11
23
 
12
24
  ```bash
13
25
  # Using npm
14
- npm create krnl my-app
26
+ npm create krnl my-service-app
15
27
 
16
28
  # Using npx
17
- npx create-krnl my-app
29
+ npx create-krnl my-service-app
18
30
 
19
31
  # Using pnpm
20
- pnpm dlx create-krnl my-app
32
+ pnpm dlx create-krnl my-service-app
21
33
  ```
22
34
 
23
- This generates a fully configured Krnl workspace:
35
+ This generates a fully configured Krnl backend workspace:
24
36
  - `krnl.json` (Workspace manifest & provider bindings)
25
37
  - `package.json` & `tsconfig.json`
26
- - `src/entities/App/` (Root entity with magnetic auto-discovery)
27
- - `src/entities/App/functionalities/Hello/` (Sample Quad-Unit functionality)
28
- - `src/libraries/AppConcepts.ts` (Layer 0 pure concept library)
38
+ - `src/services/` (Backend service definitions & facades)
39
+ - `src/libraries/` (Layer 0 pure concept libraries)
29
40
  - `docs/HISTORY.md` (Project intent & architectural memory)
30
41
 
31
42
  ---
32
43
 
33
- ### 2. Launch Krnl Studio (Visual Node IDE)
44
+ ### 2. Run and Validate Services
34
45
 
35
46
  ```bash
36
- cd my-app
47
+ cd my-service-app
48
+
49
+ # Start Krnl service dev server
37
50
  krnl dev
38
- ```
39
- Open **`http://localhost:8080`** in your browser (Brave, Chrome, Safari).
40
51
 
41
- Krnl Studio provides three visual canvases switchable via the bottom dock:
42
- - **๐Ÿ—๏ธ Architecture Canvas**: Node graph for visually adding Entities, Quad-Unit Functionalities, and Concept Libraries (surgically writing `.ts` code to disk).
43
- - **๐ŸŽจ UI Composer Canvas**: Drag-and-drop palette of KrnlUI atoms (`KrnlButton`, `KrnlTextInput`, `KrnlDropdown`, `KrnlTile`, `KrnlDock`) with real-time **Monaco TypeScript** code generation.
44
- - **๐Ÿงช Live Test Console**: Sandboxed per-function execution in isolated worker threads with **Monaco JSON Editor** inputs and latency benchmarking.
52
+ # Run deep AST 4-layer service purity validation
53
+ krnl validate
54
+
55
+ # Build production bundle
56
+ krnl build
57
+ ```
45
58
 
46
59
  ---
47
60
 
48
61
  ### 3. CLI Commands Reference
49
62
 
50
63
  ```bash
51
- # Start Visual Node IDE and dev server
64
+ # Start Krnl service dev server & boot service entrypoint
52
65
  krnl dev
53
66
 
54
67
  # Run deep AST 4-layer function purity audit
@@ -71,13 +84,11 @@ krnl generate subapp OrderEngine
71
84
 
72
85
  ## ๐Ÿ›๏ธ Monorepo Framework Packages
73
86
 
74
- - **[`@dinilmusick/krnl-core`](packages/core)**: Entity hierarchy, Flow builder, MagneticLoader, Universal Backend suite.
75
- - **[`@dinilmusick/krnl-ui`](packages/ui)**: Direct-DOM VanJS reactive atoms with Neo-Brutalist 2.5D theme and Monaco editor.
76
- - **[`@dinilmusick/krnl-validate`](packages/validate)**: `ts-morph` AST engine enforcing 4-layer function purity and 200-line limits.
77
- - **[`@dinilmusick/eslint-plugin-krnl`](packages/eslint-plugin)**: 6 ESLint rules with auto-fixers for Krnl paradigms.
78
- - **[`@dinilmusick/krnl-studio`](packages/studio)**: Visual Node IDE, UI Composer, and Live Test Console.
79
- - **[`@dinilmusick/krnl-cli`](packages/cli)**: Unified `krnl` binary.
80
- - **[`create-krnl`](packages/create-krnl)**: Interactive project scaffolder.
87
+ - **[`@ultrst-armada/krnl`](packages/core)**: Core runtime engine, Service facades, Protocols, Transports, Registry, Lifecycle, and Execution flows.
88
+ - **[`@dinilmusick/krnl-validate`](packages/validate)**: `ts-morph` AST engine enforcing 4-layer function purity, backend contracts, and line limits.
89
+ - **[`@dinilmusick/eslint-plugin-krnl`](packages/eslint-plugin)**: ESLint rules with auto-fixers for Krnl backend service standards.
90
+ - **[`@dinilmusick/krnl-cli`](packages/cli)**: Unified `krnl` binary for running, building, and validating backend services.
91
+ - **[`create-krnl`](packages/create-krnl)**: Interactive project scaffolder for Krnl backend service modules.
81
92
 
82
93
  ---
83
94
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ultrst-armada/krnl",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
- "description": "Krnl: Full-Stack Multiplatform Framework with Direct-DOM Reactivity, AST Purity Gates, Code Evolution, and Visual Node IDE",
5
+ "description": "Krnl: Backend Service Framework for Skipo โ€” authoring, executing, and validating modular backend services, facades, and workflows",
6
6
  "type": "module",
7
7
  "main": "./packages/core/dist/index.js",
8
8
  "module": "./packages/core/dist/index.js",
@@ -49,15 +49,15 @@
49
49
  },
50
50
  "keywords": [
51
51
  "krnl",
52
- "framework",
53
- "full-stack",
54
- "multiplatform",
55
- "vanjs",
56
- "code-evolution",
57
- "visual-ide",
58
- "node-editor",
59
- "ast-purity",
60
- "orchestrator"
52
+ "skipo",
53
+ "service-framework",
54
+ "backend",
55
+ "backend-modules",
56
+ "services",
57
+ "service-facades",
58
+ "protocols",
59
+ "workflows",
60
+ "ast-purity"
61
61
  ],
62
62
  "author": "Dinil Palackal",
63
63
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dinilmusick/krnl-cli",
3
- "version": "1.0.0",
4
- "description": "Unified CLI for the Krnl Framework",
3
+ "version": "1.0.1",
4
+ "description": "Unified CLI for the Krnl Backend Service Framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -383,7 +383,6 @@ var HttpProtocolAdapter = class {
383
383
 
384
384
  // src/protocols/WebSocketProtocolAdapter.ts
385
385
  var import_http2 = __toESM(require("http"), 1);
386
- var import_ws = require("ws");
387
386
  var WebSocketProtocolAdapter = class {
388
387
  protocol = "ws";
389
388
  capabilities = {
@@ -399,8 +398,10 @@ var WebSocketProtocolAdapter = class {
399
398
  wss;
400
399
  port;
401
400
  async expose(service, port = 0) {
401
+ const wsMod = await import("ws");
402
+ const WebSocketServer = wsMod.WebSocketServer || wsMod.default?.WebSocketServer || wsMod.Server;
402
403
  this.server = import_http2.default.createServer();
403
- this.wss = new import_ws.WebSocketServer({ server: this.server });
404
+ this.wss = new WebSocketServer({ server: this.server });
404
405
  this.wss.on("connection", (ws) => {
405
406
  ws.on("message", async (raw) => {
406
407
  try {
@@ -445,8 +446,10 @@ var WebSocketProtocolAdapter = class {
445
446
  };
446
447
  }
447
448
  async send(endpoint, envelope) {
449
+ const wsMod = await import("ws");
450
+ const WS = wsMod.WebSocket || wsMod.default || globalThis.WebSocket;
448
451
  return new Promise((resolve, reject) => {
449
- const ws = new import_ws.WebSocket(`ws://${endpoint.address}:${endpoint.port}`);
452
+ const ws = new WS(`ws://${endpoint.address}:${endpoint.port}`);
450
453
  ws.on("open", () => {
451
454
  ws.send(JSON.stringify(envelope));
452
455
  });
@@ -203,7 +203,7 @@ declare class HttpProtocolAdapter implements ProtocolAdapter {
203
203
 
204
204
  /**
205
205
  * @file WebSocketProtocolAdapter.ts
206
- * @description WebSocket full-duplex protocol adapter for services.
206
+ * @description WebSocket full-duplex protocol adapter for services (browser + Node safe).
207
207
  */
208
208
 
209
209
  declare class WebSocketProtocolAdapter implements ProtocolAdapter {
@@ -203,7 +203,7 @@ declare class HttpProtocolAdapter implements ProtocolAdapter {
203
203
 
204
204
  /**
205
205
  * @file WebSocketProtocolAdapter.ts
206
- * @description WebSocket full-duplex protocol adapter for services.
206
+ * @description WebSocket full-duplex protocol adapter for services (browser + Node safe).
207
207
  */
208
208
 
209
209
  declare class WebSocketProtocolAdapter implements ProtocolAdapter {
@@ -331,7 +331,6 @@ var HttpProtocolAdapter = class {
331
331
 
332
332
  // src/protocols/WebSocketProtocolAdapter.ts
333
333
  import http2 from "http";
334
- import { WebSocketServer, WebSocket } from "ws";
335
334
  var WebSocketProtocolAdapter = class {
336
335
  protocol = "ws";
337
336
  capabilities = {
@@ -347,6 +346,8 @@ var WebSocketProtocolAdapter = class {
347
346
  wss;
348
347
  port;
349
348
  async expose(service, port = 0) {
349
+ const wsMod = await import("ws");
350
+ const WebSocketServer = wsMod.WebSocketServer || wsMod.default?.WebSocketServer || wsMod.Server;
350
351
  this.server = http2.createServer();
351
352
  this.wss = new WebSocketServer({ server: this.server });
352
353
  this.wss.on("connection", (ws) => {
@@ -393,8 +394,10 @@ var WebSocketProtocolAdapter = class {
393
394
  };
394
395
  }
395
396
  async send(endpoint, envelope) {
397
+ const wsMod = await import("ws");
398
+ const WS = wsMod.WebSocket || wsMod.default || globalThis.WebSocket;
396
399
  return new Promise((resolve, reject) => {
397
- const ws = new WebSocket(`ws://${endpoint.address}:${endpoint.port}`);
400
+ const ws = new WS(`ws://${endpoint.address}:${endpoint.port}`);
398
401
  ws.on("open", () => {
399
402
  ws.send(JSON.stringify(envelope));
400
403
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dinilmusick/krnl-core",
3
- "version": "1.0.0",
4
- "description": "Core runtime engine, Entity system, Flows, and Universal Backend for Krnl",
3
+ "version": "1.0.1",
4
+ "description": "Core runtime engine, Service facades, Protocols, Transports, and Execution flows for Krnl backend services",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-krnl",
3
- "version": "1.0.0",
4
- "description": "Interactive project scaffolder for the Krnl Framework",
3
+ "version": "1.0.1",
4
+ "description": "Interactive project scaffolder for Krnl backend service projects",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dinilmusick/eslint-plugin-krnl",
3
- "version": "1.0.0",
4
- "description": "ESLint plugin enforcing Krnl 4-layer function purity, line limits, and architectural paradigms",
3
+ "version": "1.0.1",
4
+ "description": "ESLint plugin enforcing Krnl backend service purity, 4-layer architecture, and backend standards",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dinilmusick/krnl-validate",
3
- "version": "1.0.0",
4
- "description": "Deep AST Validation and 4-Layer Function Purity Engine for Krnl",
3
+ "version": "1.0.1",
4
+ "description": "Deep AST validation and 4-layer function purity engine for Krnl backend services",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",