@ultrst-armada/kloks 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/kloks",
4
- "version": "1.5.1",
5
- "sourceCommit": "df4285ad26bbf5f16acaca63ba43fe4e40740051",
4
+ "version": "1.6.0",
5
+ "sourceCommit": "a44775f58baed156dbc5590d9d920e6b582f2eee",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "39943915592"
7
+ "workflowRunId": "39983348775"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/kloks",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -169,6 +169,10 @@ var WebContainerRuntime = class {
169
169
  release();
170
170
  }
171
171
  }
172
+ async spawnCommand(command, args = [], cwd, env) {
173
+ const container = await this.boot();
174
+ return container.spawn(command, args, { cwd, env });
175
+ }
172
176
  async teardown() {
173
177
  const container = this.container;
174
178
  this.container = null;
@@ -239,7 +243,8 @@ var DevelopmentServiceDefinition = createServiceDefinition({
239
243
  name: "describeProviders",
240
244
  handler: async () => ({
241
245
  providers: [
242
- { id: "webcontainer", capabilities: ["install", "lint", "test", "build", "validate", "check"] },
246
+ { id: "webcontainer", capabilities: ["install", "lint", "test", "build", "validate", "check", "process-host"] },
247
+ { id: "typescript-language-server", capabilities: ["lsp", "diagnostics", "completion", "hover", "definition", "references", "rename", "symbols"] },
243
248
  { id: "github-actions", capabilities: ["dispatch", "observe", "rerun", "cancel"] }
244
249
  ]
245
250
  })
@@ -284,6 +289,219 @@ var DevelopmentServiceFacade = {
284
289
  }
285
290
  };
286
291
 
292
+ // src/development/codeValidationService.ts
293
+ var COMMANDS2 = {
294
+ syntax: { command: "pnpm", args: ["exec", "tsc", "--noEmit"] },
295
+ lint: { command: "pnpm", args: ["run", "lint", "--if-present"] },
296
+ test: { command: "pnpm", args: ["run", "test", "--if-present"] },
297
+ build: { command: "pnpm", args: ["run", "build", "--if-present"] },
298
+ krnl: { command: "pnpm", args: ["exec", "krnl", "validate"] },
299
+ frnl: { command: "pnpm", args: ["exec", "frnl", "validate"] }
300
+ };
301
+ var DEFAULT_LAYERS = ["syntax", "lint", "krnl", "frnl"];
302
+ var commandText = (command, args) => [command, ...args].join(" ");
303
+ var CodeValidationRuntime = class {
304
+ constructor(runtime4 = new WebContainerRuntime()) {
305
+ this.runtime = runtime4;
306
+ }
307
+ runtime;
308
+ async validate(input = {}) {
309
+ if (input.files) await this.runtime.mount(input.files);
310
+ const diagnostics = [];
311
+ if (input.install) {
312
+ const installed = await this.runtime.runCommand("pnpm", ["install", "--no-frozen-lockfile"], input.cwd, input.env);
313
+ diagnostics.push({ layer: "lint", ok: installed.exitCode === 0, exitCode: installed.exitCode, output: installed.output, command: "pnpm install --no-frozen-lockfile" });
314
+ if (installed.exitCode !== 0) return { ok: false, diagnostics, failedLayers: ["lint"] };
315
+ }
316
+ const layers = input.layers?.length ? input.layers : DEFAULT_LAYERS;
317
+ for (const layer of layers) {
318
+ if (layer === "law-l9") {
319
+ diagnostics.push(await this.validateLawL9(input.cwd, input.maxLines ?? 200));
320
+ continue;
321
+ }
322
+ const spec = COMMANDS2[layer];
323
+ const result = await this.runtime.runCommand(spec.command, spec.args, input.cwd, input.env);
324
+ diagnostics.push({ layer, ok: result.exitCode === 0, exitCode: result.exitCode, output: result.output, command: commandText(spec.command, spec.args) });
325
+ if (result.exitCode !== 0) break;
326
+ }
327
+ return { ok: diagnostics.every((item) => item.ok), diagnostics, failedLayers: diagnostics.filter((item) => !item.ok).map((item) => item.layer) };
328
+ }
329
+ async validateLawL9(cwd = ".", maxLines = 200) {
330
+ const script = `python3 -c 'import os,sys; bad=[]; root="src"; [bad.append(os.path.join(r,f)+": "+str(len(open(os.path.join(r,f),encoding="utf-8",errors="ignore").readlines()))+" lines") for r,_,fs in os.walk(root) for f in fs if f.endswith((".ts",".tsx",".js",".jsx")) and not f.endswith(".d.ts") and len(open(os.path.join(r,f),encoding="utf-8",errors="ignore").readlines())>200]; print("\\n".join(bad)); sys.exit(1 if bad else 0)'`;
331
+ const result = await this.runtime.runCommand("sh", ["-lc", script], cwd);
332
+ return { layer: "law-l9", ok: result.exitCode === 0, exitCode: result.exitCode, output: result.output, command: script };
333
+ }
334
+ };
335
+ var runtime2 = new CodeValidationRuntime();
336
+ var CodeValidationServiceDefinition = createServiceDefinition({
337
+ id: "kloks.backend.codeValidation",
338
+ name: "CodeValidationService",
339
+ version: "1.0.0",
340
+ operations: { validate: { id: "CodeValidationService.validate", name: "validate", handler: async (input) => runtime2.validate(input) } }
341
+ });
342
+ var CodeValidationServiceFacade = {
343
+ id: CodeValidationServiceDefinition.id,
344
+ name: CodeValidationServiceDefinition.name,
345
+ version: CodeValidationServiceDefinition.version,
346
+ runtime: "client",
347
+ deployment: "local",
348
+ definition: CodeValidationServiceDefinition,
349
+ createInstance: () => createService(CodeValidationServiceDefinition),
350
+ execute: async (op, input) => {
351
+ const instance = createService(CodeValidationServiceDefinition);
352
+ await instance.start();
353
+ return instance.call(op, input);
354
+ }
355
+ };
356
+
357
+ // src/development/codeDiagnosticsService.ts
358
+ var CodeDiagnosticsService = class {
359
+ constructor(runtime4 = new WebContainerRuntime()) {
360
+ this.runtime = runtime4;
361
+ }
362
+ runtime;
363
+ async diagnostics(input = {}) {
364
+ const args = ["exec", "tsc", "--noEmit", "--pretty", "false"];
365
+ if (input.file) args.push(input.file);
366
+ const result = await this.runtime.runCommand("pnpm", args, input.cwd);
367
+ return { ok: result.exitCode === 0, output: result.output, command: ["pnpm", ...args].join(" ") };
368
+ }
369
+ };
370
+ var codeDiagnosticsService = new CodeDiagnosticsService();
371
+
372
+ // src/development/typescriptLanguageServerService.ts
373
+ var TYPESCRIPT_LANGUAGE_SERVER_PACKAGE = "typescript-language-server";
374
+ var TYPESCRIPT_LANGUAGE_SERVER_VERSION = "6.0.2";
375
+ var PACKAGE = TYPESCRIPT_LANGUAGE_SERVER_PACKAGE;
376
+ var DEFAULT_VERSION = TYPESCRIPT_LANGUAGE_SERVER_VERSION;
377
+ var TypeScriptLanguageServerRuntime = class {
378
+ constructor(runtime4 = new WebContainerRuntime()) {
379
+ this.runtime = runtime4;
380
+ }
381
+ runtime;
382
+ process = null;
383
+ writer = null;
384
+ pending = /* @__PURE__ */ new Map();
385
+ buffer = "";
386
+ cwd = ".";
387
+ version = DEFAULT_VERSION;
388
+ async start(input = {}) {
389
+ if (this.process) return this.status();
390
+ this.cwd = input.cwd ?? ".";
391
+ this.version = input.version ?? DEFAULT_VERSION;
392
+ if (input.install !== false) {
393
+ await this.runtime.runCommand("pnpm", ["add", "-D", "typescript@7.0.2", PACKAGE + "@" + this.version], this.cwd);
394
+ }
395
+ this.process = await this.runtime.spawnCommand("pnpm", ["exec", PACKAGE, "--stdio"], this.cwd);
396
+ this.writer = this.process.input.getWriter();
397
+ void this.readOutput(this.process.output);
398
+ return this.status();
399
+ }
400
+ async request(input) {
401
+ await this.ensureRunning();
402
+ const promise = new Promise((resolve, reject) => {
403
+ this.pending.set(input.id, { resolve, reject });
404
+ });
405
+ await this.write(input);
406
+ return promise;
407
+ }
408
+ async notify(input) {
409
+ await this.ensureRunning();
410
+ await this.write(input);
411
+ return { sent: true };
412
+ }
413
+ async stop() {
414
+ const process = this.process;
415
+ this.process = null;
416
+ this.writer?.releaseLock();
417
+ this.writer = null;
418
+ for (const pending of this.pending.values()) pending.reject(new Error("Language server stopped"));
419
+ this.pending.clear();
420
+ if (process) await process.kill();
421
+ return { stopped: true };
422
+ }
423
+ status() {
424
+ return { running: Boolean(this.process), cwd: this.cwd, package: PACKAGE, version: this.version };
425
+ }
426
+ async ensureRunning() {
427
+ if (!this.process) await this.start({ cwd: this.cwd, install: false, version: this.version });
428
+ }
429
+ async write(message) {
430
+ if (!this.writer) throw new Error("Language server input is unavailable");
431
+ const body = JSON.stringify({ jsonrpc: "2.0", ...message });
432
+ const frame = "Content-Length: " + new TextEncoder().encode(body).byteLength + "\r\n\r\n" + body;
433
+ await this.writer.write(frame);
434
+ }
435
+ async readOutput(output) {
436
+ const reader = output.getReader();
437
+ try {
438
+ while (true) {
439
+ const next = await reader.read();
440
+ if (next.done) break;
441
+ this.buffer += next.value;
442
+ this.consumeFrames();
443
+ }
444
+ } catch (error) {
445
+ for (const pending of this.pending.values()) pending.reject(error instanceof Error ? error : new Error(String(error)));
446
+ this.pending.clear();
447
+ } finally {
448
+ reader.releaseLock();
449
+ this.process = null;
450
+ this.writer?.releaseLock();
451
+ this.writer = null;
452
+ }
453
+ }
454
+ consumeFrames() {
455
+ while (true) {
456
+ const separator = this.buffer.indexOf("\r\n\r\n");
457
+ if (separator < 0) return;
458
+ const header = this.buffer.slice(0, separator);
459
+ const match = header.match(/Content-Length:\s*(\d+)/i);
460
+ if (!match) {
461
+ this.buffer = this.buffer.slice(separator + 4);
462
+ continue;
463
+ }
464
+ const length = Number(match[1]);
465
+ const start = separator + 4;
466
+ if (this.buffer.length - start < length) return;
467
+ const body = this.buffer.slice(start, start + length);
468
+ this.buffer = this.buffer.slice(start + length);
469
+ const response = JSON.parse(body);
470
+ if (response.id !== void 0 && response.id !== null) {
471
+ this.pending.get(response.id)?.resolve(response);
472
+ this.pending.delete(response.id);
473
+ }
474
+ }
475
+ }
476
+ };
477
+ var runtime3 = new TypeScriptLanguageServerRuntime();
478
+ var TypeScriptLanguageServerServiceDefinition = createServiceDefinition({
479
+ id: "kloks.backend.typescriptLanguageServer",
480
+ name: "TypeScriptLanguageServerService",
481
+ version: "1.0.0",
482
+ operations: {
483
+ start: { id: "TypeScriptLanguageServerService.start", name: "start", handler: async (input) => runtime3.start(input) },
484
+ request: { id: "TypeScriptLanguageServerService.request", name: "request", handler: async (input) => runtime3.request(input) },
485
+ notify: { id: "TypeScriptLanguageServerService.notify", name: "notify", handler: async (input) => runtime3.notify(input) },
486
+ stop: { id: "TypeScriptLanguageServerService.stop", name: "stop", handler: async () => runtime3.stop() },
487
+ status: { id: "TypeScriptLanguageServerService.status", name: "status", handler: async () => runtime3.status() }
488
+ }
489
+ });
490
+ var TypeScriptLanguageServerServiceFacade = {
491
+ id: TypeScriptLanguageServerServiceDefinition.id,
492
+ name: TypeScriptLanguageServerServiceDefinition.name,
493
+ version: TypeScriptLanguageServerServiceDefinition.version,
494
+ runtime: "client",
495
+ deployment: "local",
496
+ definition: TypeScriptLanguageServerServiceDefinition,
497
+ createInstance: () => createService(TypeScriptLanguageServerServiceDefinition),
498
+ execute: async (op, input) => {
499
+ const instance = createService(TypeScriptLanguageServerServiceDefinition);
500
+ await instance.start();
501
+ return instance.call(op, input);
502
+ }
503
+ };
504
+
287
505
  export {
288
506
  GitHubActionsClient,
289
507
  GitHubActionsServiceDefinition,
@@ -294,5 +512,14 @@ export {
294
512
  resolveDevelopmentCommand,
295
513
  DevelopmentServiceDefinition,
296
514
  DevelopmentRuntime,
297
- DevelopmentServiceFacade
515
+ DevelopmentServiceFacade,
516
+ CodeValidationRuntime,
517
+ CodeValidationServiceDefinition,
518
+ CodeValidationServiceFacade,
519
+ CodeDiagnosticsService,
520
+ codeDiagnosticsService,
521
+ TYPESCRIPT_LANGUAGE_SERVER_PACKAGE,
522
+ TYPESCRIPT_LANGUAGE_SERVER_VERSION,
523
+ TypeScriptLanguageServerServiceDefinition,
524
+ TypeScriptLanguageServerServiceFacade
298
525
  };
@@ -108,6 +108,7 @@ declare class WebContainerRuntime {
108
108
  exitCode: any;
109
109
  output: string;
110
110
  }>;
111
+ spawnCommand(command: string, args?: string[], cwd?: string, env?: Record<string, string | number | boolean>): Promise<any>;
111
112
  teardown(): Promise<{
112
113
  tornDown: boolean;
113
114
  }>;
@@ -143,4 +144,105 @@ declare const DevelopmentServiceFacade: {
143
144
  execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
144
145
  };
145
146
 
146
- export { type DevelopmentProvider, type DevelopmentRequest, type DevelopmentResult, DevelopmentRuntime, type DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, type DevelopmentTask, GitHubActionsClient, type GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, type WebContainerCommand, type WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, type WorkflowRun, resolveDevelopmentCommand };
147
+ type ValidationLayer = 'syntax' | 'lint' | 'test' | 'build' | 'krnl' | 'frnl' | 'law-l9';
148
+ interface CodeValidationInput {
149
+ layers?: ValidationLayer[];
150
+ cwd?: string;
151
+ env?: Record<string, string>;
152
+ maxLines?: number;
153
+ files?: Record<string, unknown>;
154
+ install?: boolean;
155
+ }
156
+ interface ValidationDiagnostic {
157
+ layer: ValidationLayer;
158
+ ok: boolean;
159
+ exitCode: number;
160
+ output: string;
161
+ command: string;
162
+ }
163
+ interface CodeValidationResult {
164
+ ok: boolean;
165
+ diagnostics: ValidationDiagnostic[];
166
+ failedLayers: ValidationLayer[];
167
+ }
168
+
169
+ declare class CodeValidationRuntime {
170
+ private readonly runtime;
171
+ constructor(runtime?: WebContainerRuntime);
172
+ validate(input?: CodeValidationInput): Promise<CodeValidationResult>;
173
+ private validateLawL9;
174
+ }
175
+ declare const CodeValidationServiceDefinition: ServiceDefinition;
176
+ declare const CodeValidationServiceFacade: {
177
+ id: string;
178
+ name: string;
179
+ version: string;
180
+ runtime: "client";
181
+ deployment: "local";
182
+ definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
183
+ createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
184
+ execute: <TIn = CodeValidationInput, TOut = CodeValidationResult>(op: string, input?: TIn) => Promise<TOut>;
185
+ };
186
+
187
+ interface CodeDiagnosticsInput {
188
+ cwd?: string;
189
+ file?: string;
190
+ }
191
+ interface CodeDiagnosticsResult {
192
+ ok: boolean;
193
+ output: string;
194
+ command: string;
195
+ }
196
+ declare class CodeDiagnosticsService {
197
+ private readonly runtime;
198
+ constructor(runtime?: WebContainerRuntime);
199
+ diagnostics(input?: CodeDiagnosticsInput): Promise<CodeDiagnosticsResult>;
200
+ }
201
+ declare const codeDiagnosticsService: CodeDiagnosticsService;
202
+
203
+ interface TypeScriptLanguageServerStartInput {
204
+ cwd?: string;
205
+ install?: boolean;
206
+ version?: string;
207
+ }
208
+ interface TypeScriptLanguageServerRequestInput {
209
+ id: number | string;
210
+ method: string;
211
+ params?: unknown;
212
+ }
213
+ interface TypeScriptLanguageServerNotificationInput {
214
+ method: string;
215
+ params?: unknown;
216
+ }
217
+ interface TypeScriptLanguageServerResponse {
218
+ jsonrpc: '2.0';
219
+ id?: number | string | null;
220
+ result?: unknown;
221
+ error?: {
222
+ code: number;
223
+ message: string;
224
+ data?: unknown;
225
+ };
226
+ }
227
+ interface TypeScriptLanguageServerStatus {
228
+ running: boolean;
229
+ cwd?: string;
230
+ package: string;
231
+ version: string;
232
+ }
233
+
234
+ declare const TYPESCRIPT_LANGUAGE_SERVER_PACKAGE = "typescript-language-server";
235
+ declare const TYPESCRIPT_LANGUAGE_SERVER_VERSION = "6.0.2";
236
+ declare const TypeScriptLanguageServerServiceDefinition: ServiceDefinition;
237
+ declare const TypeScriptLanguageServerServiceFacade: {
238
+ id: string;
239
+ name: string;
240
+ version: string;
241
+ runtime: "client";
242
+ deployment: "local";
243
+ definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
244
+ createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
245
+ execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
246
+ };
247
+
248
+ export { type CodeDiagnosticsInput, type CodeDiagnosticsResult, CodeDiagnosticsService, type CodeValidationInput, type CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, type DevelopmentProvider, type DevelopmentRequest, type DevelopmentResult, DevelopmentRuntime, type DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, type DevelopmentTask, GitHubActionsClient, type GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, TYPESCRIPT_LANGUAGE_SERVER_PACKAGE, TYPESCRIPT_LANGUAGE_SERVER_VERSION, type TypeScriptLanguageServerNotificationInput, type TypeScriptLanguageServerRequestInput, type TypeScriptLanguageServerResponse, TypeScriptLanguageServerServiceDefinition, TypeScriptLanguageServerServiceFacade, type TypeScriptLanguageServerStartInput, type TypeScriptLanguageServerStatus, type ValidationDiagnostic, type ValidationLayer, type WebContainerCommand, type WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, type WorkflowRun, codeDiagnosticsService, resolveDevelopmentCommand };
@@ -1,25 +1,43 @@
1
1
  import {
2
+ CodeDiagnosticsService,
3
+ CodeValidationRuntime,
4
+ CodeValidationServiceDefinition,
5
+ CodeValidationServiceFacade,
2
6
  DevelopmentRuntime,
3
7
  DevelopmentServiceDefinition,
4
8
  DevelopmentServiceFacade,
5
9
  GitHubActionsClient,
6
10
  GitHubActionsServiceDefinition,
7
11
  GitHubActionsServiceFacade,
12
+ TYPESCRIPT_LANGUAGE_SERVER_PACKAGE,
13
+ TYPESCRIPT_LANGUAGE_SERVER_VERSION,
14
+ TypeScriptLanguageServerServiceDefinition,
15
+ TypeScriptLanguageServerServiceFacade,
8
16
  WebContainerRuntime,
9
17
  WebContainerServiceDefinition,
10
18
  WebContainerServiceFacade,
19
+ codeDiagnosticsService,
11
20
  resolveDevelopmentCommand
12
- } from "../chunk-OVTXAGL6.js";
21
+ } from "../chunk-3HZYAZF4.js";
13
22
  import "../chunk-TY32TUNI.js";
14
23
  export {
24
+ CodeDiagnosticsService,
25
+ CodeValidationRuntime,
26
+ CodeValidationServiceDefinition,
27
+ CodeValidationServiceFacade,
15
28
  DevelopmentRuntime,
16
29
  DevelopmentServiceDefinition,
17
30
  DevelopmentServiceFacade,
18
31
  GitHubActionsClient,
19
32
  GitHubActionsServiceDefinition,
20
33
  GitHubActionsServiceFacade,
34
+ TYPESCRIPT_LANGUAGE_SERVER_PACKAGE,
35
+ TYPESCRIPT_LANGUAGE_SERVER_VERSION,
36
+ TypeScriptLanguageServerServiceDefinition,
37
+ TypeScriptLanguageServerServiceFacade,
21
38
  WebContainerRuntime,
22
39
  WebContainerServiceDefinition,
23
40
  WebContainerServiceFacade,
41
+ codeDiagnosticsService,
24
42
  resolveDevelopmentCommand
25
43
  };
@@ -13,7 +13,7 @@ export { AdaptedStorageConnection, AppAccountManifest, AppServiceDeclaration, CA
13
13
  export { CompositeBackend, EndpointGenerator, GeneratedEndpointSummary, LOCAL_STORAGE_GRAPHS_PREFIX, LocalService, NodeGraphPersistenceService, NodeGraphValidationResult, RemoteServiceProxy, SaveGraphOptions, UniversalAppEntity, UniversalGraphEdge, UniversalGraphNode, UniversalNodeGraphDocument, UniversalStorageConnection, WorkspaceGraphDocument, WorkspaceGraphSummary, createBackend, createCompositeService, createLocalService, createRemoteService, exportGraphAsJsonFile, nodeGraphPersistence, parseGraphJsonFile, validateGraphDocument, workspaceGraphService } from './services/index.js';
14
14
  import { AssetDataType as AssetDataType$1, AssetChannelType as AssetChannelType$1, GraphFolderInfo as GraphFolderInfo$1, GraphAssetItem as GraphAssetItem$1, SpaceNode, NodeConnection, DawProject } from '@ultrst-armada/kloks/state-graph';
15
15
  export { AuthServiceDefinition, AuthServiceFacade, ControlPlaneServiceDefinition, ControlPlaneServiceFacade, DatabaseServiceDefinition, DatabaseServiceFacade, GeminiServiceDefinition, GeminiServiceFacade, SrklServiceDefinition, SrklServiceFacade, StorageServiceDefinition, StorageServiceFacade, WorkspaceGraphServiceDefinition, WorkspaceGraphServiceFacade, WorkspaceServiceDefinition, WorkspaceServiceFacade, krnlAuthServiceDefinition, krnlAuthServiceFacade, krnlControlPlaneServiceDefinition, krnlControlPlaneServiceFacade, krnlDatabaseServiceDefinition, krnlDatabaseServiceFacade, krnlGeminiServiceDefinition, krnlGeminiServiceFacade, krnlSrklServiceDefinition, krnlSrklServiceFacade, krnlStorageServiceDefinition, krnlStorageServiceFacade, krnlWorkspaceGraphServiceDefinition, krnlWorkspaceGraphServiceFacade, krnlWorkspaceServiceDefinition, krnlWorkspaceServiceFacade } from './krnl-services.js';
16
- export { DevelopmentProvider, DevelopmentRequest, DevelopmentResult, DevelopmentRuntime, DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, DevelopmentTask, GitHubActionsClient, GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, WebContainerCommand, WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, WorkflowRun, resolveDevelopmentCommand } from './development/index.js';
16
+ export { CodeDiagnosticsInput, CodeDiagnosticsResult, CodeDiagnosticsService, CodeValidationInput, CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, DevelopmentProvider, DevelopmentRequest, DevelopmentResult, DevelopmentRuntime, DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, DevelopmentTask, GitHubActionsClient, GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, TYPESCRIPT_LANGUAGE_SERVER_PACKAGE, TYPESCRIPT_LANGUAGE_SERVER_VERSION, TypeScriptLanguageServerNotificationInput, TypeScriptLanguageServerRequestInput, TypeScriptLanguageServerResponse, TypeScriptLanguageServerServiceDefinition, TypeScriptLanguageServerServiceFacade, TypeScriptLanguageServerStartInput, TypeScriptLanguageServerStatus, ValidationDiagnostic, ValidationLayer, WebContainerCommand, WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, WorkflowRun, codeDiagnosticsService, resolveDevelopmentCommand } from './development/index.js';
17
17
  export { EndpointDescriptor, IService, ProtocolAdapter, ServiceDefinition } from '@ultrst-armada/krnl';
18
18
  import 'react';
19
19
 
@@ -195,17 +195,26 @@ import {
195
195
  resolveSystemDatabaseClusterNodes
196
196
  } from "./chunk-RCCQ7IRM.js";
197
197
  import {
198
+ CodeDiagnosticsService,
199
+ CodeValidationRuntime,
200
+ CodeValidationServiceDefinition,
201
+ CodeValidationServiceFacade,
198
202
  DevelopmentRuntime,
199
203
  DevelopmentServiceDefinition,
200
204
  DevelopmentServiceFacade,
201
205
  GitHubActionsClient,
202
206
  GitHubActionsServiceDefinition,
203
207
  GitHubActionsServiceFacade,
208
+ TYPESCRIPT_LANGUAGE_SERVER_PACKAGE,
209
+ TYPESCRIPT_LANGUAGE_SERVER_VERSION,
210
+ TypeScriptLanguageServerServiceDefinition,
211
+ TypeScriptLanguageServerServiceFacade,
204
212
  WebContainerRuntime,
205
213
  WebContainerServiceDefinition,
206
214
  WebContainerServiceFacade,
215
+ codeDiagnosticsService,
207
216
  resolveDevelopmentCommand
208
- } from "./chunk-OVTXAGL6.js";
217
+ } from "./chunk-3HZYAZF4.js";
209
218
  import "./chunk-TY32TUNI.js";
210
219
 
211
220
  // src/data/BaseDataProvider.ts
@@ -4379,6 +4388,10 @@ export {
4379
4388
  CANONICAL_SRKL_URL,
4380
4389
  CallbackRegistry,
4381
4390
  CloudflareResourceFetcher,
4391
+ CodeDiagnosticsService,
4392
+ CodeValidationRuntime,
4393
+ CodeValidationServiceDefinition,
4394
+ CodeValidationServiceFacade,
4382
4395
  CompositeBackend,
4383
4396
  ConcurrencyConflictError,
4384
4397
  ConcurrencyManager,
@@ -4436,6 +4449,10 @@ export {
4436
4449
  StorageServiceFacade,
4437
4450
  SupabaseStorageAdapter,
4438
4451
  SyncEngine,
4452
+ TYPESCRIPT_LANGUAGE_SERVER_PACKAGE,
4453
+ TYPESCRIPT_LANGUAGE_SERVER_VERSION,
4454
+ TypeScriptLanguageServerServiceDefinition,
4455
+ TypeScriptLanguageServerServiceFacade,
4439
4456
  VercelResourceFetcher,
4440
4457
  WORKSPACE_ASSETS_ROOT,
4441
4458
  WORKSPACE_ROOT,
@@ -4460,6 +4477,7 @@ export {
4460
4477
  buildProjectObservability,
4461
4478
  buildProjectsList,
4462
4479
  cleanDbUrl,
4480
+ codeDiagnosticsService,
4463
4481
  computeDeploymentFinalWeight,
4464
4482
  computeUsageWeightScore,
4465
4483
  configureStarterProjectTemplate,
@@ -258,6 +258,85 @@
258
258
  },
259
259
  "dependencies": [
260
260
  "github-actions",
261
+ "web-container",
262
+ "code-validation"
263
+ ]
264
+ },
265
+ {
266
+ "id": "code-validation",
267
+ "name": "Code Validation & Diagnostics",
268
+ "version": "1.0.0",
269
+ "description": "Shared syntax, lint, test, build, KrnlTS, FrnlTS and Law L9 validation pipeline backed by the canonical WebContainer runtime; diagnostics are consumable by IDEs and agents.",
270
+ "backend": {
271
+ "package": "@ultrst-armada/kloks",
272
+ "subpath": "development",
273
+ "export": "CodeValidationServiceFacade",
274
+ "facade": "CodeValidationServiceFacade"
275
+ },
276
+ "modes": [
277
+ "fullstack"
278
+ ],
279
+ "targets": {
280
+ "backend": [
281
+ "App.main-content"
282
+ ],
283
+ "frontend": [
284
+ "App.main-content"
285
+ ]
286
+ },
287
+ "dependencies": [
288
+ "web-container"
289
+ ]
290
+ },
291
+ {
292
+ "id": "code-diagnostics",
293
+ "name": "TypeScript Code Diagnostics",
294
+ "version": "1.0.0",
295
+ "description": "Editor-facing TypeScript diagnostics runner for authored source.",
296
+ "backend": {
297
+ "package": "@ultrst-armada/kloks",
298
+ "subpath": "development",
299
+ "export": "codeDiagnosticsService",
300
+ "facade": "codeDiagnosticsService"
301
+ },
302
+ "modes": [
303
+ "fullstack"
304
+ ],
305
+ "targets": {
306
+ "backend": [
307
+ "App.main-content"
308
+ ],
309
+ "frontend": [
310
+ "App.main-content"
311
+ ]
312
+ },
313
+ "dependencies": [
314
+ "web-container"
315
+ ]
316
+ },
317
+ {
318
+ "id": "typescript-language-server",
319
+ "name": "TypeScript Language Server",
320
+ "version": "1.0.0",
321
+ "description": "Reusable TypeScript Language Server Protocol service provisioned into a development runtime and consumable by IDEs and agents.",
322
+ "backend": {
323
+ "package": "@ultrst-armada/kloks",
324
+ "subpath": "development",
325
+ "export": "TypeScriptLanguageServerServiceFacade",
326
+ "facade": "TypeScriptLanguageServerServiceFacade"
327
+ },
328
+ "modes": [
329
+ "fullstack"
330
+ ],
331
+ "targets": {
332
+ "backend": [
333
+ "App.main-content"
334
+ ],
335
+ "frontend": [
336
+ "App.main-content"
337
+ ]
338
+ },
339
+ "dependencies": [
261
340
  "web-container"
262
341
  ]
263
342
  }
@@ -7,21 +7,6 @@ import {
7
7
  instantiateSubgraph
8
8
  } from "./chunk-S22PMERU.js";
9
9
  import "./chunk-RHRXPY2U.js";
10
- import {
11
- AttractionEngine,
12
- GhostInferenceEngine,
13
- GhostLayoutResolver,
14
- GhostTracePathBuilder,
15
- calculateSocketCoordinates,
16
- getBeamPoints,
17
- useMagneticTraces
18
- } from "./chunk-JXDJZSFW.js";
19
- import {
20
- ConnectionRuleStore,
21
- HandleTypeRegistry,
22
- WireTypeRegistry,
23
- initializeDefaultGraphRules
24
- } from "./chunk-TZOL3RN7.js";
25
10
  import {
26
11
  LifecycleCycleError,
27
12
  LifecycleGraph,
@@ -45,6 +30,21 @@ import {
45
30
  CustomViewWindow,
46
31
  DEFAULT_GRAPH_SETTINGS
47
32
  } from "./chunk-KG6QYS26.js";
33
+ import {
34
+ AttractionEngine,
35
+ GhostInferenceEngine,
36
+ GhostLayoutResolver,
37
+ GhostTracePathBuilder,
38
+ calculateSocketCoordinates,
39
+ getBeamPoints,
40
+ useMagneticTraces
41
+ } from "./chunk-JXDJZSFW.js";
42
+ import {
43
+ ConnectionRuleStore,
44
+ HandleTypeRegistry,
45
+ WireTypeRegistry,
46
+ initializeDefaultGraphRules
47
+ } from "./chunk-TZOL3RN7.js";
48
48
  import {
49
49
  AutoSolidify,
50
50
  SpatialEngine,