@ultrst-armada/kloks 1.24.1 → 1.24.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.
@@ -0,0 +1,253 @@
1
+ import {
2
+ createService,
3
+ createServiceDefinition
4
+ } from "./chunk-MWSYNRNZ.js";
5
+
6
+ // src/development/webContainerService.ts
7
+ var COMMANDS = {
8
+ install: { command: "pnpm", args: ["install", "--no-frozen-lockfile"] },
9
+ lint: { command: "pnpm", args: ["lint"] },
10
+ test: { command: "pnpm", args: ["test"] },
11
+ build: { command: "pnpm", args: ["build"] },
12
+ validate: { command: "pnpm", args: ["validate"] },
13
+ check: { command: "pnpm", args: ["lint"] }
14
+ };
15
+ function parseDevelopmentDiagnostics(output, exitCode = 0) {
16
+ const diagnostics = [];
17
+ const seen = /* @__PURE__ */ new Set();
18
+ const add = (diagnostic) => {
19
+ const key = [diagnostic.source, diagnostic.code, diagnostic.file, diagnostic.line, diagnostic.message].join("|");
20
+ if (!seen.has(key)) {
21
+ seen.add(key);
22
+ diagnostics.push(diagnostic);
23
+ }
24
+ };
25
+ for (const line of output.split(/\r?\n/)) {
26
+ const typescript = line.match(/^(.+?)\((\d+),(\d+)\):\s*(error|warning)\s+(TS\d+):\s*(.+)$/);
27
+ if (typescript) {
28
+ add({ source: "typescript", severity: typescript[4], file: typescript[1], line: Number(typescript[2]), column: Number(typescript[3]), code: typescript[5], message: typescript[6] });
29
+ continue;
30
+ }
31
+ const eslint = line.match(/^(.+?):(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+([^\s]+)$/);
32
+ if (eslint) {
33
+ add({ source: "eslint", severity: eslint[4], file: eslint[1], line: Number(eslint[2]), column: Number(eslint[3]), code: eslint[6], message: eslint[5] });
34
+ continue;
35
+ }
36
+ const bundler = line.match(/(?:✘|×|ERROR|error:|Error:)\s*(.+)$/);
37
+ if (bundler) add({ source: "bundler", severity: "error", message: bundler[1].trim() });
38
+ if (/\bWARN(?:ING)?\b/i.test(line)) add({ source: "package-manager", severity: "warning", message: line.trim() });
39
+ }
40
+ if (exitCode !== 0 && diagnostics.every((item) => item.severity !== "error")) {
41
+ add({ source: "unknown", severity: "error", message: "Command failed with exit code " + exitCode + "; inspect captured output for details." });
42
+ }
43
+ return diagnostics;
44
+ }
45
+ function captureDevelopmentProcess(process) {
46
+ const [consumerOutput, diagnosticOutput] = process.output.tee();
47
+ const logs = (async () => {
48
+ const reader = diagnosticOutput.getReader();
49
+ let output = "";
50
+ try {
51
+ while (true) {
52
+ const next = await reader.read();
53
+ if (next.done) break;
54
+ output += next.value;
55
+ }
56
+ } finally {
57
+ reader.releaseLock();
58
+ }
59
+ const exitCode = await process.exit;
60
+ return { output, exitCode, diagnostics: parseDevelopmentDiagnostics(output, exitCode) };
61
+ })();
62
+ return { ...process, output: consumerOutput, logs };
63
+ }
64
+ function resolveWebContainerCommand(task) {
65
+ const command = COMMANDS[task];
66
+ return { command: command.command, args: [...command.args] };
67
+ }
68
+ var runQueue = Promise.resolve();
69
+ var sharedContainer = null;
70
+ var sharedContainerPromise = null;
71
+ var WebContainerRuntime = class {
72
+ async boot() {
73
+ if (typeof window !== "undefined" && !window.crossOriginIsolated) {
74
+ throw new Error("WebContainer requires a cross-origin-isolated page. Ensure COOP=same-origin and COEP=require-corp are served.");
75
+ }
76
+ if (sharedContainer) return sharedContainer;
77
+ if (!sharedContainerPromise) {
78
+ sharedContainerPromise = import("@webcontainer/api").then(async (module) => {
79
+ const container = await module.WebContainer.boot({
80
+ coep: "require-corp",
81
+ workdirName: "kloks-development"
82
+ });
83
+ sharedContainer = container;
84
+ return container;
85
+ }).catch((error) => {
86
+ sharedContainerPromise = null;
87
+ throw error;
88
+ });
89
+ }
90
+ return sharedContainerPromise;
91
+ }
92
+ async mount(files, mountPoint) {
93
+ const container = await this.boot();
94
+ await container.mount(files, mountPoint ? { mountPoint } : void 0);
95
+ return { mounted: true, mountPoint: mountPoint ?? "/" };
96
+ }
97
+ async runProcess(command, args, cwd, env) {
98
+ const container = await this.boot();
99
+ const process = await container.spawn(command, args, { cwd, env });
100
+ const started = Date.now();
101
+ let output = "";
102
+ const reader = process.output.getReader();
103
+ try {
104
+ while (true) {
105
+ const next = await reader.read();
106
+ if (next.done) break;
107
+ output += next.value;
108
+ }
109
+ } finally {
110
+ reader.releaseLock();
111
+ }
112
+ const exitCode = await process.exit;
113
+ return { exitCode, output, command: [command, ...args].join(" "), durationMs: Date.now() - started, diagnostics: parseDevelopmentDiagnostics(output, exitCode) };
114
+ }
115
+ async run(task, cwd, env) {
116
+ const spec = resolveWebContainerCommand(task);
117
+ return this.runCommand(spec.command, spec.args, cwd, env);
118
+ }
119
+ async runCommand(command, args = [], cwd, env) {
120
+ const previous = runQueue;
121
+ let release;
122
+ runQueue = new Promise((resolve) => {
123
+ release = resolve;
124
+ });
125
+ await previous;
126
+ try {
127
+ return await this.runProcess(command, args, cwd, env);
128
+ } finally {
129
+ release();
130
+ }
131
+ }
132
+ async spawnCommand(command, args = [], cwd, env) {
133
+ const container = await this.boot();
134
+ const process = await container.spawn(command, args, { cwd, env });
135
+ return captureDevelopmentProcess(process);
136
+ }
137
+ async teardown() {
138
+ const container = sharedContainer;
139
+ sharedContainer = null;
140
+ sharedContainerPromise = null;
141
+ await container?.teardown();
142
+ return { tornDown: true };
143
+ }
144
+ };
145
+ var runtime = new WebContainerRuntime();
146
+ var WebContainerServiceDefinition = createServiceDefinition({
147
+ id: "kloks.backend.webContainer",
148
+ name: "WebContainerService",
149
+ version: "1.2.0",
150
+ operations: {
151
+ boot: { id: "WebContainerService.boot", name: "boot", handler: async () => {
152
+ await runtime.boot();
153
+ return { ready: true };
154
+ } },
155
+ mount: { id: "WebContainerService.mount", name: "mount", handler: async (input) => runtime.mount(input.files, input.mountPoint) },
156
+ run: { id: "WebContainerService.run", name: "run", handler: async (input) => runtime.run(input.task, input.cwd, input.env) },
157
+ runCommand: { id: "WebContainerService.runCommand", name: "runCommand", handler: async (input) => runtime.runCommand(input.command, input.args, input.cwd, input.env) },
158
+ teardown: { id: "WebContainerService.teardown", name: "teardown", handler: async () => runtime.teardown() },
159
+ command: { id: "WebContainerService.command", name: "command", handler: async (input) => ({ task: input.task, command: resolveWebContainerCommand(input.task) }) }
160
+ }
161
+ });
162
+ var WebContainerServiceFacade = {
163
+ id: WebContainerServiceDefinition.id,
164
+ name: WebContainerServiceDefinition.name,
165
+ version: WebContainerServiceDefinition.version,
166
+ runtime: "client",
167
+ deployment: "local",
168
+ definition: WebContainerServiceDefinition,
169
+ createInstance: () => createService(WebContainerServiceDefinition),
170
+ execute: async (op, input) => {
171
+ const instance = createService(WebContainerServiceDefinition);
172
+ await instance.start();
173
+ return instance.call(op, input);
174
+ }
175
+ };
176
+
177
+ // src/development/codeValidationService.ts
178
+ var COMMANDS2 = {
179
+ syntax: { command: "pnpm", args: ["exec", "tsc", "--noEmit"] },
180
+ lint: { command: "pnpm", args: ["run", "lint", "--if-present"] },
181
+ test: { command: "pnpm", args: ["run", "test", "--if-present"] },
182
+ build: { command: "pnpm", args: ["run", "build", "--if-present"] },
183
+ krnl: { command: "pnpm", args: ["exec", "krnl", "validate"] },
184
+ frnl: { command: "pnpm", args: ["exec", "frnl", "validate"] },
185
+ "lockfile-check": { command: "pnpm", args: ["install", "--frozen-lockfile", "--ignore-scripts"] }
186
+ };
187
+ var DEFAULT_LAYERS = ["lockfile-check", "syntax", "lint", "krnl", "frnl"];
188
+ var commandText = (command, args) => [command, ...args].join(" ");
189
+ var CodeValidationRuntime = class {
190
+ constructor(runtime3 = new WebContainerRuntime()) {
191
+ this.runtime = runtime3;
192
+ }
193
+ runtime;
194
+ async validate(input = {}) {
195
+ if (input.files) await this.runtime.mount(input.files);
196
+ const diagnostics = [];
197
+ if (input.install) {
198
+ const installed = await this.runtime.runCommand("pnpm", ["install", "--frozen-lockfile", "--ignore-scripts"], input.cwd, input.env);
199
+ diagnostics.push({ layer: "lockfile-check", ok: installed.exitCode === 0, exitCode: installed.exitCode, output: installed.output, command: "pnpm install --frozen-lockfile --ignore-scripts" });
200
+ if (installed.exitCode !== 0) return { ok: false, diagnostics, failedLayers: ["lockfile-check"] };
201
+ }
202
+ const layers = input.layers?.length ? input.layers : DEFAULT_LAYERS;
203
+ for (const layer of layers) {
204
+ if (layer === "law-l9") {
205
+ diagnostics.push(await this.validateLawL9(input.cwd, input.maxLines ?? 200));
206
+ continue;
207
+ }
208
+ const spec = COMMANDS2[layer];
209
+ const result = await this.runtime.runCommand(spec.command, spec.args, input.cwd, input.env);
210
+ diagnostics.push({ layer, ok: result.exitCode === 0, exitCode: result.exitCode, output: result.output, command: commandText(spec.command, spec.args) });
211
+ if (result.exitCode !== 0) break;
212
+ }
213
+ return { ok: diagnostics.every((item) => item.ok), diagnostics, failedLayers: diagnostics.filter((item) => !item.ok).map((item) => item.layer) };
214
+ }
215
+ async validateLawL9(cwd = ".", maxLines = 200) {
216
+ 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)'`;
217
+ const result = await this.runtime.runCommand("sh", ["-lc", script], cwd);
218
+ return { layer: "law-l9", ok: result.exitCode === 0, exitCode: result.exitCode, output: result.output, command: script };
219
+ }
220
+ };
221
+ var runtime2 = new CodeValidationRuntime();
222
+ var CodeValidationServiceDefinition = createServiceDefinition({
223
+ id: "kloks.backend.codeValidation",
224
+ name: "CodeValidationService",
225
+ version: "1.1.0",
226
+ operations: { validate: { id: "CodeValidationService.validate", name: "validate", handler: async (input) => runtime2.validate(input) } }
227
+ });
228
+ var CodeValidationServiceFacade = {
229
+ id: CodeValidationServiceDefinition.id,
230
+ name: CodeValidationServiceDefinition.name,
231
+ version: CodeValidationServiceDefinition.version,
232
+ runtime: "client",
233
+ deployment: "local",
234
+ definition: CodeValidationServiceDefinition,
235
+ createInstance: () => createService(CodeValidationServiceDefinition),
236
+ execute: async (op, input) => {
237
+ const instance = createService(CodeValidationServiceDefinition);
238
+ await instance.start();
239
+ return instance.call(op, input);
240
+ }
241
+ };
242
+
243
+ export {
244
+ parseDevelopmentDiagnostics,
245
+ captureDevelopmentProcess,
246
+ resolveWebContainerCommand,
247
+ WebContainerRuntime,
248
+ WebContainerServiceDefinition,
249
+ WebContainerServiceFacade,
250
+ CodeValidationRuntime,
251
+ CodeValidationServiceDefinition,
252
+ CodeValidationServiceFacade
253
+ };
File without changes
@@ -0,0 +1,142 @@
1
+ import * as _ultrst_armada_krnl from '@ultrst-armada/krnl';
2
+ import { ServiceDefinition } from '@ultrst-armada/krnl';
3
+
4
+ type DevelopmentProvider = 'webcontainer' | 'github-actions';
5
+ type DevelopmentTask = 'install' | 'lint' | 'test' | 'build' | 'validate' | 'check';
6
+ interface DevelopmentRequest {
7
+ provider: DevelopmentProvider;
8
+ task: DevelopmentTask;
9
+ repository?: string;
10
+ ref?: string;
11
+ workflowId?: string | number;
12
+ workflowInputs?: Record<string, string>;
13
+ cwd?: string;
14
+ env?: Record<string, string>;
15
+ }
16
+ interface DevelopmentDiagnostic {
17
+ severity: 'error' | 'warning' | 'info';
18
+ source: 'typescript' | 'eslint' | 'bundler' | 'package-manager' | 'runtime' | 'unknown';
19
+ code?: string;
20
+ file?: string;
21
+ line?: number;
22
+ column?: number;
23
+ message: string;
24
+ }
25
+ interface DevelopmentResult {
26
+ provider: DevelopmentProvider;
27
+ task: DevelopmentTask;
28
+ ok: boolean;
29
+ exitCode?: number;
30
+ output?: string;
31
+ command?: string;
32
+ durationMs?: number;
33
+ diagnostics?: DevelopmentDiagnostic[];
34
+ runId?: number;
35
+ url?: string;
36
+ }
37
+ interface WebContainerCommand {
38
+ command: string;
39
+ args: string[];
40
+ }
41
+ interface DevelopmentServiceContract {
42
+ definition: ServiceDefinition;
43
+ }
44
+
45
+ declare function parseDevelopmentDiagnostics(output: string, exitCode?: number): DevelopmentDiagnostic[];
46
+ declare function captureDevelopmentProcess<T extends {
47
+ output: ReadableStream<string>;
48
+ exit: Promise<number>;
49
+ }>(process: T): T & {
50
+ output: ReadableStream<string>;
51
+ logs: Promise<{
52
+ output: string;
53
+ exitCode: number;
54
+ diagnostics: DevelopmentDiagnostic[];
55
+ }>;
56
+ };
57
+ declare function resolveWebContainerCommand(task: DevelopmentTask): WebContainerCommand;
58
+ interface WebContainerRunCommandInput {
59
+ command: string;
60
+ args?: string[];
61
+ cwd?: string;
62
+ env?: Record<string, string | number | boolean>;
63
+ }
64
+ declare class WebContainerRuntime {
65
+ boot(): Promise<any>;
66
+ mount(files: Record<string, unknown>, mountPoint?: string): Promise<{
67
+ mounted: boolean;
68
+ mountPoint: string;
69
+ }>;
70
+ private runProcess;
71
+ run(task: DevelopmentTask, cwd?: string, env?: Record<string, string>): Promise<{
72
+ exitCode: any;
73
+ output: string;
74
+ command: string;
75
+ durationMs: number;
76
+ diagnostics: DevelopmentDiagnostic[];
77
+ }>;
78
+ runCommand(command: string, args?: string[], cwd?: string, env?: Record<string, string | number | boolean>): Promise<{
79
+ exitCode: any;
80
+ output: string;
81
+ command: string;
82
+ durationMs: number;
83
+ diagnostics: DevelopmentDiagnostic[];
84
+ }>;
85
+ spawnCommand(command: string, args?: string[], cwd?: string, env?: Record<string, string | number | boolean>): Promise<any>;
86
+ teardown(): Promise<{
87
+ tornDown: boolean;
88
+ }>;
89
+ }
90
+ declare const WebContainerServiceDefinition: ServiceDefinition;
91
+ declare const WebContainerServiceFacade: {
92
+ id: string;
93
+ name: string;
94
+ version: string;
95
+ runtime: "client";
96
+ deployment: "local";
97
+ definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
98
+ createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
99
+ execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
100
+ };
101
+
102
+ type ValidationLayer = 'syntax' | 'lint' | 'test' | 'build' | 'krnl' | 'frnl' | 'lockfile-check' | 'law-l9';
103
+ interface CodeValidationInput {
104
+ layers?: ValidationLayer[];
105
+ cwd?: string;
106
+ env?: Record<string, string>;
107
+ maxLines?: number;
108
+ files?: Record<string, unknown>;
109
+ install?: boolean;
110
+ }
111
+ interface ValidationDiagnostic {
112
+ layer: ValidationLayer;
113
+ ok: boolean;
114
+ exitCode: number;
115
+ output: string;
116
+ command: string;
117
+ }
118
+ interface CodeValidationResult {
119
+ ok: boolean;
120
+ diagnostics: ValidationDiagnostic[];
121
+ failedLayers: ValidationLayer[];
122
+ }
123
+
124
+ declare class CodeValidationRuntime {
125
+ private readonly runtime;
126
+ constructor(runtime?: WebContainerRuntime);
127
+ validate(input?: CodeValidationInput): Promise<CodeValidationResult>;
128
+ private validateLawL9;
129
+ }
130
+ declare const CodeValidationServiceDefinition: ServiceDefinition;
131
+ declare const CodeValidationServiceFacade: {
132
+ id: string;
133
+ name: string;
134
+ version: string;
135
+ runtime: "client";
136
+ deployment: "local";
137
+ definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
138
+ createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
139
+ execute: <TIn = CodeValidationInput, TOut = CodeValidationResult>(op: string, input?: TIn) => Promise<TOut>;
140
+ };
141
+
142
+ export { type CodeValidationInput, type CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, type DevelopmentDiagnostic, type DevelopmentProvider, type DevelopmentRequest, type DevelopmentResult, type DevelopmentServiceContract, type DevelopmentTask, type ValidationDiagnostic, type ValidationLayer, type WebContainerCommand, type WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, captureDevelopmentProcess, parseDevelopmentDiagnostics, resolveWebContainerCommand };
@@ -0,0 +1,24 @@
1
+ import {
2
+ CodeValidationRuntime,
3
+ CodeValidationServiceDefinition,
4
+ CodeValidationServiceFacade,
5
+ WebContainerRuntime,
6
+ WebContainerServiceDefinition,
7
+ WebContainerServiceFacade,
8
+ captureDevelopmentProcess,
9
+ parseDevelopmentDiagnostics,
10
+ resolveWebContainerCommand
11
+ } from "../chunk-AGI3VKCZ.js";
12
+ import "../chunk-MWSYNRNZ.js";
13
+ import "../chunk-QGM4M3NI.js";
14
+ export {
15
+ CodeValidationRuntime,
16
+ CodeValidationServiceDefinition,
17
+ CodeValidationServiceFacade,
18
+ WebContainerRuntime,
19
+ WebContainerServiceDefinition,
20
+ WebContainerServiceFacade,
21
+ captureDevelopmentProcess,
22
+ parseDevelopmentDiagnostics,
23
+ resolveWebContainerCommand
24
+ };
@@ -1,46 +1,9 @@
1
+ import { WebContainerRuntime, DevelopmentRequest, DevelopmentResult } from './client.js';
2
+ export { CodeValidationInput, CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, DevelopmentDiagnostic, DevelopmentProvider, DevelopmentServiceContract, DevelopmentTask, ValidationDiagnostic, ValidationLayer, WebContainerCommand, WebContainerRunCommandInput, WebContainerServiceDefinition, WebContainerServiceFacade, captureDevelopmentProcess, parseDevelopmentDiagnostics, resolveWebContainerCommand } from './client.js';
1
3
  import * as _ultrst_armada_krnl from '@ultrst-armada/krnl';
2
4
  import { ServiceDefinition } from '@ultrst-armada/krnl';
3
-
4
- type DevelopmentProvider = 'webcontainer' | 'github-actions';
5
- type DevelopmentTask = 'install' | 'lint' | 'test' | 'build' | 'validate' | 'check';
6
- interface DevelopmentRequest {
7
- provider: DevelopmentProvider;
8
- task: DevelopmentTask;
9
- repository?: string;
10
- ref?: string;
11
- workflowId?: string | number;
12
- workflowInputs?: Record<string, string>;
13
- cwd?: string;
14
- env?: Record<string, string>;
15
- }
16
- interface DevelopmentDiagnostic {
17
- severity: 'error' | 'warning' | 'info';
18
- source: 'typescript' | 'eslint' | 'bundler' | 'package-manager' | 'runtime' | 'unknown';
19
- code?: string;
20
- file?: string;
21
- line?: number;
22
- column?: number;
23
- message: string;
24
- }
25
- interface DevelopmentResult {
26
- provider: DevelopmentProvider;
27
- task: DevelopmentTask;
28
- ok: boolean;
29
- exitCode?: number;
30
- output?: string;
31
- command?: string;
32
- durationMs?: number;
33
- diagnostics?: DevelopmentDiagnostic[];
34
- runId?: number;
35
- url?: string;
36
- }
37
- interface WebContainerCommand {
38
- command: string;
39
- args: string[];
40
- }
41
- interface DevelopmentServiceContract {
42
- definition: ServiceDefinition;
43
- }
5
+ export { InspectionCheck, InspectionCheckResult, InspectionError, InspectionErrorKind, InspectionLog, InspectionViewport, PlaywrightInspectionRequest, PlaywrightInspectionResult } from './playwrightInspectionTypes.js';
6
+ export { PlaywrightInspectionRuntime, PlaywrightInspectionServiceDefinition, PlaywrightInspectionServiceFacade } from './playwrightInspectionService.js';
44
7
 
45
8
  interface GitHubActionsConfig {
46
9
  token: string;
@@ -97,63 +60,6 @@ declare const GitHubActionsServiceFacade: {
97
60
  execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
98
61
  };
99
62
 
100
- declare function parseDevelopmentDiagnostics(output: string, exitCode?: number): DevelopmentDiagnostic[];
101
- declare function captureDevelopmentProcess<T extends {
102
- output: ReadableStream<string>;
103
- exit: Promise<number>;
104
- }>(process: T): T & {
105
- output: ReadableStream<string>;
106
- logs: Promise<{
107
- output: string;
108
- exitCode: number;
109
- diagnostics: DevelopmentDiagnostic[];
110
- }>;
111
- };
112
- declare function resolveWebContainerCommand(task: DevelopmentTask): WebContainerCommand;
113
- interface WebContainerRunCommandInput {
114
- command: string;
115
- args?: string[];
116
- cwd?: string;
117
- env?: Record<string, string | number | boolean>;
118
- }
119
- declare class WebContainerRuntime {
120
- boot(): Promise<any>;
121
- mount(files: Record<string, unknown>, mountPoint?: string): Promise<{
122
- mounted: boolean;
123
- mountPoint: string;
124
- }>;
125
- private runProcess;
126
- run(task: DevelopmentTask, cwd?: string, env?: Record<string, string>): Promise<{
127
- exitCode: any;
128
- output: string;
129
- command: string;
130
- durationMs: number;
131
- diagnostics: DevelopmentDiagnostic[];
132
- }>;
133
- runCommand(command: string, args?: string[], cwd?: string, env?: Record<string, string | number | boolean>): Promise<{
134
- exitCode: any;
135
- output: string;
136
- command: string;
137
- durationMs: number;
138
- diagnostics: DevelopmentDiagnostic[];
139
- }>;
140
- spawnCommand(command: string, args?: string[], cwd?: string, env?: Record<string, string | number | boolean>): Promise<any>;
141
- teardown(): Promise<{
142
- tornDown: boolean;
143
- }>;
144
- }
145
- declare const WebContainerServiceDefinition: ServiceDefinition;
146
- declare const WebContainerServiceFacade: {
147
- id: string;
148
- name: string;
149
- version: string;
150
- runtime: "client";
151
- deployment: "local";
152
- definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
153
- createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
154
- execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
155
- };
156
-
157
63
  declare function resolveDevelopmentCommand(task: DevelopmentRequest['task']): [string, string[]];
158
64
  declare const DevelopmentServiceDefinition: ServiceDefinition;
159
65
  declare class DevelopmentRuntime {
@@ -173,46 +79,6 @@ declare const DevelopmentServiceFacade: {
173
79
  execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
174
80
  };
175
81
 
176
- type ValidationLayer = 'syntax' | 'lint' | 'test' | 'build' | 'krnl' | 'frnl' | 'lockfile-check' | 'law-l9';
177
- interface CodeValidationInput {
178
- layers?: ValidationLayer[];
179
- cwd?: string;
180
- env?: Record<string, string>;
181
- maxLines?: number;
182
- files?: Record<string, unknown>;
183
- install?: boolean;
184
- }
185
- interface ValidationDiagnostic {
186
- layer: ValidationLayer;
187
- ok: boolean;
188
- exitCode: number;
189
- output: string;
190
- command: string;
191
- }
192
- interface CodeValidationResult {
193
- ok: boolean;
194
- diagnostics: ValidationDiagnostic[];
195
- failedLayers: ValidationLayer[];
196
- }
197
-
198
- declare class CodeValidationRuntime {
199
- private readonly runtime;
200
- constructor(runtime?: WebContainerRuntime);
201
- validate(input?: CodeValidationInput): Promise<CodeValidationResult>;
202
- private validateLawL9;
203
- }
204
- declare const CodeValidationServiceDefinition: ServiceDefinition;
205
- declare const CodeValidationServiceFacade: {
206
- id: string;
207
- name: string;
208
- version: string;
209
- runtime: "client";
210
- deployment: "local";
211
- definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
212
- createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
213
- execute: <TIn = CodeValidationInput, TOut = CodeValidationResult>(op: string, input?: TIn) => Promise<TOut>;
214
- };
215
-
216
82
  interface CodeDiagnosticsInput {
217
83
  cwd?: string;
218
84
  file?: string;
@@ -327,77 +193,4 @@ declare const AgentHarnessServiceFacade: {
327
193
  execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
328
194
  };
329
195
 
330
- type InspectionErrorKind = 'console' | 'pageerror' | 'requestfailed' | 'http' | 'navigation' | 'assertion' | 'crash' | 'dialog' | 'browser' | 'screenshot' | 'dom' | 'layout' | 'asset';
331
- interface InspectionError {
332
- kind: InspectionErrorKind;
333
- message: string;
334
- url?: string;
335
- status?: number;
336
- method?: string;
337
- }
338
- interface InspectionLog {
339
- type: 'error' | 'warning' | 'log' | 'info' | 'debug' | 'dir' | 'trace' | 'assert' | 'other';
340
- message: string;
341
- url?: string;
342
- line?: number;
343
- column?: number;
344
- }
345
- interface InspectionCheck {
346
- selector: string;
347
- visible?: boolean;
348
- text?: string;
349
- action?: {
350
- type: 'click' | 'fill';
351
- value?: string;
352
- };
353
- }
354
- interface InspectionViewport {
355
- width: number;
356
- height: number;
357
- }
358
- interface PlaywrightInspectionRequest {
359
- url: string;
360
- timeoutMs?: number;
361
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
362
- viewports?: InspectionViewport[];
363
- checks?: InspectionCheck[];
364
- screenshotDirectory?: string;
365
- reportPath?: string;
366
- captureDom?: boolean;
367
- maxDomCharacters?: number;
368
- }
369
- interface InspectionCheckResult {
370
- selector: string;
371
- passed: boolean;
372
- details?: string;
373
- }
374
- interface PlaywrightInspectionResult {
375
- ok: boolean;
376
- url: string;
377
- title?: string;
378
- status?: number;
379
- durationMs: number;
380
- errors: InspectionError[];
381
- logs: InspectionLog[];
382
- checks: InspectionCheckResult[];
383
- screenshots: string[];
384
- reportPath?: string;
385
- domSnapshot?: string;
386
- }
387
-
388
- declare class PlaywrightInspectionRuntime {
389
- inspect(request: PlaywrightInspectionRequest): Promise<PlaywrightInspectionResult>;
390
- }
391
- declare const PlaywrightInspectionServiceDefinition: ServiceDefinition;
392
- declare const PlaywrightInspectionServiceFacade: {
393
- id: string;
394
- name: string;
395
- version: string;
396
- runtime: "server";
397
- deployment: "local";
398
- definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
399
- createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
400
- execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
401
- };
402
-
403
- export { type AgentHarnessProvider, type AgentHarnessProviderInfo, type AgentHarnessResult, type AgentHarnessRunInput, AgentHarnessRuntime, type AgentHarnessServiceContract, AgentHarnessServiceDefinition, AgentHarnessServiceFacade, type CodeDiagnosticsInput, type CodeDiagnosticsResult, CodeDiagnosticsService, type CodeValidationInput, type CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, type DevelopmentDiagnostic, type DevelopmentProvider, type DevelopmentRequest, type DevelopmentResult, DevelopmentRuntime, type DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, type DevelopmentTask, GitHubActionsClient, type GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, type InspectionCheck, type InspectionCheckResult, type InspectionError, type InspectionErrorKind, type InspectionLog, type InspectionViewport, type PlaywrightInspectionRequest, type PlaywrightInspectionResult, PlaywrightInspectionRuntime, PlaywrightInspectionServiceDefinition, PlaywrightInspectionServiceFacade, 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, captureDevelopmentProcess, codeDiagnosticsService, parseDevelopmentDiagnostics, resolveDevelopmentCommand, resolveWebContainerCommand };
196
+ export { type AgentHarnessProvider, type AgentHarnessProviderInfo, type AgentHarnessResult, type AgentHarnessRunInput, AgentHarnessRuntime, type AgentHarnessServiceContract, AgentHarnessServiceDefinition, AgentHarnessServiceFacade, type CodeDiagnosticsInput, type CodeDiagnosticsResult, CodeDiagnosticsService, DevelopmentRequest, DevelopmentResult, DevelopmentRuntime, DevelopmentServiceDefinition, DevelopmentServiceFacade, 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, WebContainerRuntime, type WorkflowRun, codeDiagnosticsService, resolveDevelopmentCommand };