skeleton-crew-runtime 0.1.3 → 0.1.5
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/dist/.tsbuildinfo +1 -0
- package/dist/action-engine.d.ts +0 -75
- package/dist/action-engine.d.ts.map +1 -1
- package/dist/action-engine.js +13 -96
- package/dist/action-engine.js.map +1 -1
- package/dist/event-bus.d.ts +0 -44
- package/dist/event-bus.d.ts.map +1 -1
- package/dist/event-bus.js +13 -59
- package/dist/event-bus.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/performance.d.ts +18 -0
- package/dist/performance.d.ts.map +1 -0
- package/dist/performance.js +31 -0
- package/dist/performance.js.map +1 -0
- package/dist/plugin-registry.d.ts +0 -8
- package/dist/plugin-registry.d.ts.map +1 -1
- package/dist/plugin-registry.js +2 -23
- package/dist/plugin-registry.js.map +1 -1
- package/dist/runtime-context.d.ts +17 -68
- package/dist/runtime-context.d.ts.map +1 -1
- package/dist/runtime-context.js +26 -99
- package/dist/runtime-context.js.map +1 -1
- package/dist/runtime.d.ts +3 -100
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +7 -136
- package/dist/runtime.js.map +1 -1
- package/dist/screen-registry.d.ts +0 -40
- package/dist/screen-registry.d.ts.map +1 -1
- package/dist/screen-registry.js +0 -44
- package/dist/screen-registry.js.map +1 -1
- package/dist/types.d.ts +2 -70
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -27
- package/dist/types.js.map +1 -1
- package/dist/ui-bridge.d.ts +0 -27
- package/dist/ui-bridge.d.ts.map +1 -1
- package/dist/ui-bridge.js +0 -29
- package/dist/ui-bridge.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../src/performance.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,MAAM,CAAC;IACxC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAKD,qBAAa,sBAAuB,YAAW,kBAAkB;IAC/D,UAAU,IAAI,MAAM,MAAM;IAI1B,YAAY,IAAI,IAAI;IAIpB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAGrC;AAKD,qBAAa,wBAAyB,YAAW,kBAAkB;IACjE,OAAO,CAAC,OAAO,CAAkC;IAEjD,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,MAAM;IASvC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/C,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAGrC;AAKD,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,OAAe,GAAG,kBAAkB,CAErF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export class NoOpPerformanceMonitor {
|
|
2
|
+
startTimer() {
|
|
3
|
+
return () => 0;
|
|
4
|
+
}
|
|
5
|
+
recordMetric() {
|
|
6
|
+
}
|
|
7
|
+
getMetrics() {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class SimplePerformanceMonitor {
|
|
12
|
+
metrics = new Map();
|
|
13
|
+
startTimer(label) {
|
|
14
|
+
const start = performance.now();
|
|
15
|
+
return () => {
|
|
16
|
+
const duration = performance.now() - start;
|
|
17
|
+
this.recordMetric(label, duration);
|
|
18
|
+
return duration;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
recordMetric(name, value) {
|
|
22
|
+
this.metrics.set(name, value);
|
|
23
|
+
}
|
|
24
|
+
getMetrics() {
|
|
25
|
+
return Object.fromEntries(this.metrics);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function createPerformanceMonitor(enabled = false) {
|
|
29
|
+
return enabled ? new SimplePerformanceMonitor() : new NoOpPerformanceMonitor();
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../src/performance.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,sBAAsB;IACjC,UAAU;QACR,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,YAAY;IAEZ,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAKD,MAAM,OAAO,wBAAwB;IAC3B,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;IAEjD,UAAU,CAAC,KAAa;QACtB,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAChC,OAAO,GAAG,EAAE;YACV,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;YAC3C,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YACnC,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,IAAY,EAAE,KAAa;QACtC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,UAAU;QACR,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAKD,MAAM,UAAU,wBAAwB,CAAC,UAAmB,KAAK;IAC/D,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,wBAAwB,EAAE,CAAC,CAAC,CAAC,IAAI,sBAAsB,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -7,14 +7,6 @@ export declare class PluginRegistry {
|
|
|
7
7
|
registerPlugin(plugin: PluginDefinition): void;
|
|
8
8
|
getPlugin(name: string): PluginDefinition | null;
|
|
9
9
|
getAllPlugins(): PluginDefinition[];
|
|
10
|
-
/**
|
|
11
|
-
* Returns the names of all successfully initialized plugins.
|
|
12
|
-
* Returns an array copy to prevent external mutation.
|
|
13
|
-
*
|
|
14
|
-
* @returns Array of initialized plugin names in initialization order
|
|
15
|
-
*
|
|
16
|
-
* Requirements: 13.1, 13.2, 13.3, 13.4, 13.5
|
|
17
|
-
*/
|
|
18
10
|
getInitializedPlugins(): string[];
|
|
19
11
|
executeSetup(context: RuntimeContext): Promise<void>;
|
|
20
12
|
executeDispose(context: RuntimeContext): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-registry.d.ts","sourceRoot":"","sources":["../src/plugin-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,EAA+C,MAAM,YAAY,CAAC;AAEnH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,kBAAkB,CAAW;IACrC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAM1B,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAoB9C,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAIhD,aAAa,IAAI,gBAAgB,EAAE;
|
|
1
|
+
{"version":3,"file":"plugin-registry.d.ts","sourceRoot":"","sources":["../src/plugin-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,EAA+C,MAAM,YAAY,CAAC;AAEnH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,kBAAkB,CAAW;IACrC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAM1B,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAoB9C,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAIhD,aAAa,IAAI,gBAAgB,EAAE;IAanC,qBAAqB,IAAI,MAAM,EAAE;IAK3B,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA0CpD,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB5D,KAAK,IAAI,IAAI;CAId"}
|
package/dist/plugin-registry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ValidationError, DuplicateRegistrationError } from './types.js';
|
|
2
2
|
export class PluginRegistry {
|
|
3
3
|
plugins;
|
|
4
|
-
initializedPlugins;
|
|
4
|
+
initializedPlugins;
|
|
5
5
|
logger;
|
|
6
6
|
constructor(logger) {
|
|
7
7
|
this.plugins = new Map();
|
|
@@ -9,7 +9,6 @@ export class PluginRegistry {
|
|
|
9
9
|
this.logger = logger;
|
|
10
10
|
}
|
|
11
11
|
registerPlugin(plugin) {
|
|
12
|
-
// Validate required fields with ValidationError
|
|
13
12
|
if (!plugin.name || typeof plugin.name !== 'string') {
|
|
14
13
|
throw new ValidationError('Plugin', 'name');
|
|
15
14
|
}
|
|
@@ -19,7 +18,6 @@ export class PluginRegistry {
|
|
|
19
18
|
if (!plugin.setup || typeof plugin.setup !== 'function') {
|
|
20
19
|
throw new ValidationError('Plugin', 'setup', plugin.name);
|
|
21
20
|
}
|
|
22
|
-
// Check for duplicate plugin name with DuplicateRegistrationError
|
|
23
21
|
if (this.plugins.has(plugin.name)) {
|
|
24
22
|
throw new DuplicateRegistrationError('Plugin', plugin.name);
|
|
25
23
|
}
|
|
@@ -29,38 +27,24 @@ export class PluginRegistry {
|
|
|
29
27
|
return this.plugins.get(name) ?? null;
|
|
30
28
|
}
|
|
31
29
|
getAllPlugins() {
|
|
32
|
-
// Return array copy to prevent external mutation
|
|
33
30
|
return Array.from(this.plugins.values());
|
|
34
31
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Returns the names of all successfully initialized plugins.
|
|
37
|
-
* Returns an array copy to prevent external mutation.
|
|
38
|
-
*
|
|
39
|
-
* @returns Array of initialized plugin names in initialization order
|
|
40
|
-
*
|
|
41
|
-
* Requirements: 13.1, 13.2, 13.3, 13.4, 13.5
|
|
42
|
-
*/
|
|
43
32
|
getInitializedPlugins() {
|
|
44
|
-
// Return array copy to prevent external mutation
|
|
45
33
|
return [...this.initializedPlugins];
|
|
46
34
|
}
|
|
47
35
|
async executeSetup(context) {
|
|
48
36
|
const initialized = [];
|
|
49
37
|
let failingPluginName;
|
|
50
38
|
try {
|
|
51
|
-
// Execute plugin setup callbacks sequentially in registration order
|
|
52
39
|
for (const plugin of this.plugins.values()) {
|
|
53
|
-
failingPluginName = plugin.name;
|
|
54
|
-
// Support both sync and async setup callbacks
|
|
40
|
+
failingPluginName = plugin.name;
|
|
55
41
|
await plugin.setup(context);
|
|
56
|
-
// Track successfully initialized plugins
|
|
57
42
|
initialized.push(plugin.name);
|
|
58
43
|
this.initializedPlugins.push(plugin.name);
|
|
59
44
|
this.logger.debug(`Plugin "${plugin.name}" initialized successfully`);
|
|
60
45
|
}
|
|
61
46
|
}
|
|
62
47
|
catch (error) {
|
|
63
|
-
// Rollback: dispose already-initialized plugins in reverse order
|
|
64
48
|
this.logger.error('Plugin setup failed, rolling back initialized plugins');
|
|
65
49
|
for (let i = initialized.length - 1; i >= 0; i--) {
|
|
66
50
|
const pluginName = initialized[i];
|
|
@@ -75,26 +59,21 @@ export class PluginRegistry {
|
|
|
75
59
|
}
|
|
76
60
|
}
|
|
77
61
|
}
|
|
78
|
-
// Clear initializedPlugins after rollback
|
|
79
62
|
this.initializedPlugins = [];
|
|
80
|
-
// Re-throw with context including plugin name
|
|
81
63
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
82
64
|
throw new Error(`Plugin "${failingPluginName}" setup failed: ${errorMessage}`);
|
|
83
65
|
}
|
|
84
66
|
}
|
|
85
67
|
async executeDispose(context) {
|
|
86
|
-
// Dispose in reverse order of initialization
|
|
87
68
|
for (let i = this.initializedPlugins.length - 1; i >= 0; i--) {
|
|
88
69
|
const pluginName = this.initializedPlugins[i];
|
|
89
70
|
const plugin = this.plugins.get(pluginName);
|
|
90
71
|
if (plugin?.dispose) {
|
|
91
72
|
try {
|
|
92
|
-
// Support both sync and async dispose callbacks
|
|
93
73
|
await plugin.dispose(context);
|
|
94
74
|
this.logger.debug(`Disposed plugin: ${pluginName}`);
|
|
95
75
|
}
|
|
96
76
|
catch (error) {
|
|
97
|
-
// Log dispose errors but continue cleanup
|
|
98
77
|
this.logger.error(`Plugin "${pluginName}" dispose failed`, error);
|
|
99
78
|
}
|
|
100
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-registry.js","sourceRoot":"","sources":["../src/plugin-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,eAAe,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAEnH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAgC;IACvC,kBAAkB,CAAW
|
|
1
|
+
{"version":3,"file":"plugin-registry.js","sourceRoot":"","sources":["../src/plugin-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,eAAe,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAEnH,MAAM,OAAO,cAAc;IACjB,OAAO,CAAgC;IACvC,kBAAkB,CAAW;IAC7B,MAAM,CAAS;IAEvB,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,cAAc,CAAC,MAAwB;QAErC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,MAAM,CAAC,IAAI,KA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K,CAAC,CAAC;YAC5E,MAAM,IAAI,KAAK,CAAC,WAAW,iBAAiB,mBAAmB,YAAY,EAAE,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAuB;QAE1C,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;YAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAE5C,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;gBACpB,IAAI,CAAC;oBAEH,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;oBAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,UAAU,EAAE,CAAC,CAAC;gBACtD,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBAEf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,UAAU,kBAAkB,EAAE,KAAK,CAAC,CAAC;gBACpE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type { RuntimeContext,
|
|
1
|
+
import type { RuntimeContext, IntrospectionAPI, Logger } from './types.js';
|
|
2
2
|
import type { ScreenRegistry } from './screen-registry.js';
|
|
3
3
|
import type { ActionEngine } from './action-engine.js';
|
|
4
4
|
import type { PluginRegistry } from './plugin-registry.js';
|
|
5
5
|
import type { EventBus } from './event-bus.js';
|
|
6
|
-
import type { Runtime } from './
|
|
7
|
-
/**
|
|
8
|
-
* RuntimeContext provides a safe API facade for subsystems.
|
|
9
|
-
* Passed to plugins and action handlers without exposing internal mutable structures.
|
|
10
|
-
*
|
|
11
|
-
* Requirements: 1.2, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6
|
|
12
|
-
*/
|
|
6
|
+
import type { Runtime } from './runtime.js';
|
|
13
7
|
export declare class RuntimeContextImpl implements RuntimeContext {
|
|
14
8
|
private screenRegistry;
|
|
15
9
|
private actionEngine;
|
|
@@ -18,69 +12,24 @@ export declare class RuntimeContextImpl implements RuntimeContext {
|
|
|
18
12
|
private runtime;
|
|
19
13
|
private frozenHostContext;
|
|
20
14
|
private introspectionAPI;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
get actions(): {
|
|
36
|
-
registerAction: <P = unknown, R = unknown>(action: ActionDefinition<P, R>) => (() => void);
|
|
37
|
-
runAction: <P = unknown, R = unknown>(id: string, params?: P) => Promise<R>;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Plugins API - exposes Plugin Registry operations
|
|
41
|
-
* Requirements: 13.1, 13.2, 13.3, 13.4, 13.5
|
|
42
|
-
*/
|
|
43
|
-
get plugins(): {
|
|
44
|
-
registerPlugin: (plugin: PluginDefinition) => void;
|
|
45
|
-
getPlugin: (name: string) => PluginDefinition | null;
|
|
46
|
-
getAllPlugins: () => PluginDefinition[];
|
|
47
|
-
getInitializedPlugins: () => string[];
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Events API - exposes Event Bus operations
|
|
51
|
-
* Requirements: 12.1, 12.2, 12.3, 12.4, 12.5
|
|
52
|
-
*/
|
|
53
|
-
get events(): {
|
|
54
|
-
emit: (event: string, data?: unknown) => void;
|
|
55
|
-
emitAsync: (event: string, data?: unknown) => Promise<void>;
|
|
56
|
-
on: (event: string, handler: (data: unknown) => void) => (() => void);
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Returns the Runtime instance
|
|
60
|
-
* Requirement: 9.6
|
|
61
|
-
*/
|
|
15
|
+
private loggerInstance;
|
|
16
|
+
private cachedScreensAPI;
|
|
17
|
+
private cachedActionsAPI;
|
|
18
|
+
private cachedPluginsAPI;
|
|
19
|
+
private cachedEventsAPI;
|
|
20
|
+
constructor(screenRegistry: ScreenRegistry, actionEngine: ActionEngine, pluginRegistry: PluginRegistry, eventBus: EventBus, runtime: Runtime, hostContext: Record<string, unknown>, logger: Logger);
|
|
21
|
+
get screens(): any;
|
|
22
|
+
private createScreensAPI;
|
|
23
|
+
get actions(): any;
|
|
24
|
+
private createActionsAPI;
|
|
25
|
+
get plugins(): any;
|
|
26
|
+
private createPluginsAPI;
|
|
27
|
+
get events(): any;
|
|
28
|
+
private createEventsAPI;
|
|
62
29
|
getRuntime(): Runtime;
|
|
63
|
-
|
|
64
|
-
* Host context - readonly access to injected host services
|
|
65
|
-
* Requirements: 1.2, 1.3, 1.4
|
|
66
|
-
*
|
|
67
|
-
* Returns a cached frozen shallow copy of the host context to prevent mutation.
|
|
68
|
-
* This ensures plugins can access host services but cannot modify them.
|
|
69
|
-
* The frozen copy is cached to avoid memory leaks from repeated access.
|
|
70
|
-
*/
|
|
30
|
+
get logger(): Logger;
|
|
71
31
|
get host(): Readonly<Record<string, unknown>>;
|
|
72
|
-
/**
|
|
73
|
-
* Introspection API - query runtime metadata
|
|
74
|
-
* Requirements: 3.1, 4.1, 5.1, 6.1
|
|
75
|
-
*
|
|
76
|
-
* Returns a cached introspection API object to prevent memory leaks
|
|
77
|
-
* from repeated access.
|
|
78
|
-
*/
|
|
79
32
|
get introspect(): IntrospectionAPI;
|
|
80
|
-
/**
|
|
81
|
-
* Creates the introspection API object.
|
|
82
|
-
* Called once during construction and cached.
|
|
83
|
-
*/
|
|
84
33
|
private createIntrospectionAPI;
|
|
85
34
|
}
|
|
86
35
|
//# sourceMappingURL=runtime-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../src/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"runtime-context.d.ts","sourceRoot":"","sources":["../src/runtime-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAwD,gBAAgB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACjI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwC5C,qBAAa,kBAAmB,YAAW,cAAc;IACvD,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,cAAc,CAAS;IAG/B,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,eAAe,CAAM;gBAG3B,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,MAAM,EAAE,MAAM;IA2BhB,IAAI,OAAO,QAEV;IAED,OAAO,CAAC,gBAAgB;IAkBxB,IAAI,OAAO,QAEV;IAED,OAAO,CAAC,gBAAgB;IAexB,IAAI,OAAO,QAEV;IAED,OAAO,CAAC,gBAAgB;IAqBxB,IAAI,MAAM,QAET;IAED,OAAO,CAAC,eAAe;IAkBvB,UAAU,IAAI,OAAO;IAOrB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAUD,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAE5C;IASD,IAAI,UAAU,IAAI,gBAAgB,CAEjC;IAMD,OAAO,CAAC,sBAAsB;CAkG/B"}
|
package/dist/runtime-context.js
CHANGED
|
@@ -1,36 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deep freeze utility - recursively freezes an object and all nested objects.
|
|
3
|
-
* Internal use only, not exported.
|
|
4
|
-
*
|
|
5
|
-
* Requirements: 7.1, 7.2, 7.3, 7.4, 7.5
|
|
6
|
-
*
|
|
7
|
-
* @param obj - The object to deep freeze
|
|
8
|
-
* @returns The frozen object with proper typing
|
|
9
|
-
*/
|
|
10
1
|
function deepFreeze(obj) {
|
|
11
|
-
// Freeze the object itself (Requirement 7.1)
|
|
12
2
|
Object.freeze(obj);
|
|
13
|
-
// Iterate over all properties (Requirement 7.2)
|
|
14
3
|
Object.getOwnPropertyNames(obj).forEach(prop => {
|
|
15
4
|
const value = obj[prop];
|
|
16
|
-
// Skip functions (Requirement 7.4)
|
|
17
5
|
if (typeof value === 'function') {
|
|
18
6
|
return;
|
|
19
7
|
}
|
|
20
|
-
// Skip already frozen objects (Requirement 7.5)
|
|
21
8
|
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
22
|
-
// Recursively freeze nested objects and arrays (Requirements 7.2, 7.3)
|
|
23
9
|
deepFreeze(value);
|
|
24
10
|
}
|
|
25
11
|
});
|
|
26
12
|
return obj;
|
|
27
13
|
}
|
|
28
|
-
/**
|
|
29
|
-
* RuntimeContext provides a safe API facade for subsystems.
|
|
30
|
-
* Passed to plugins and action handlers without exposing internal mutable structures.
|
|
31
|
-
*
|
|
32
|
-
* Requirements: 1.2, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6
|
|
33
|
-
*/
|
|
34
14
|
export class RuntimeContextImpl {
|
|
35
15
|
screenRegistry;
|
|
36
16
|
actionEngine;
|
|
@@ -39,24 +19,29 @@ export class RuntimeContextImpl {
|
|
|
39
19
|
runtime;
|
|
40
20
|
frozenHostContext;
|
|
41
21
|
introspectionAPI;
|
|
42
|
-
|
|
22
|
+
loggerInstance;
|
|
23
|
+
cachedScreensAPI;
|
|
24
|
+
cachedActionsAPI;
|
|
25
|
+
cachedPluginsAPI;
|
|
26
|
+
cachedEventsAPI;
|
|
27
|
+
constructor(screenRegistry, actionEngine, pluginRegistry, eventBus, runtime, hostContext, logger) {
|
|
43
28
|
this.screenRegistry = screenRegistry;
|
|
44
29
|
this.actionEngine = actionEngine;
|
|
45
30
|
this.pluginRegistry = pluginRegistry;
|
|
46
31
|
this.eventBus = eventBus;
|
|
47
32
|
this.runtime = runtime;
|
|
48
|
-
|
|
49
|
-
// This prevents memory leaks when host context is accessed repeatedly
|
|
33
|
+
this.loggerInstance = logger;
|
|
50
34
|
this.frozenHostContext = Object.freeze({ ...hostContext });
|
|
51
|
-
// Cache the introspection API to avoid creating new objects on every access
|
|
52
|
-
// This prevents memory leaks when introspection is used repeatedly
|
|
53
35
|
this.introspectionAPI = this.createIntrospectionAPI();
|
|
36
|
+
this.cachedScreensAPI = this.createScreensAPI();
|
|
37
|
+
this.cachedActionsAPI = this.createActionsAPI();
|
|
38
|
+
this.cachedPluginsAPI = this.createPluginsAPI();
|
|
39
|
+
this.cachedEventsAPI = this.createEventsAPI();
|
|
54
40
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Screens API - exposes Screen Registry operations
|
|
57
|
-
* Requirements: 4.1, 4.2, 4.3, 4.4, 4.5, 10.1, 10.2, 10.3, 10.4, 10.5
|
|
58
|
-
*/
|
|
59
41
|
get screens() {
|
|
42
|
+
return this.cachedScreensAPI;
|
|
43
|
+
}
|
|
44
|
+
createScreensAPI() {
|
|
60
45
|
return {
|
|
61
46
|
registerScreen: (screen) => {
|
|
62
47
|
return this.screenRegistry.registerScreen(screen);
|
|
@@ -69,11 +54,10 @@ export class RuntimeContextImpl {
|
|
|
69
54
|
}
|
|
70
55
|
};
|
|
71
56
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Actions API - exposes Action Engine operations
|
|
74
|
-
* Requirements: 4.1, 4.2, 4.3, 4.4, 4.5
|
|
75
|
-
*/
|
|
76
57
|
get actions() {
|
|
58
|
+
return this.cachedActionsAPI;
|
|
59
|
+
}
|
|
60
|
+
createActionsAPI() {
|
|
77
61
|
return {
|
|
78
62
|
registerAction: (action) => {
|
|
79
63
|
return this.actionEngine.registerAction(action);
|
|
@@ -83,11 +67,10 @@ export class RuntimeContextImpl {
|
|
|
83
67
|
}
|
|
84
68
|
};
|
|
85
69
|
}
|
|
86
|
-
/**
|
|
87
|
-
* Plugins API - exposes Plugin Registry operations
|
|
88
|
-
* Requirements: 13.1, 13.2, 13.3, 13.4, 13.5
|
|
89
|
-
*/
|
|
90
70
|
get plugins() {
|
|
71
|
+
return this.cachedPluginsAPI;
|
|
72
|
+
}
|
|
73
|
+
createPluginsAPI() {
|
|
91
74
|
return {
|
|
92
75
|
registerPlugin: (plugin) => {
|
|
93
76
|
this.pluginRegistry.registerPlugin(plugin);
|
|
@@ -103,11 +86,10 @@ export class RuntimeContextImpl {
|
|
|
103
86
|
}
|
|
104
87
|
};
|
|
105
88
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Events API - exposes Event Bus operations
|
|
108
|
-
* Requirements: 12.1, 12.2, 12.3, 12.4, 12.5
|
|
109
|
-
*/
|
|
110
89
|
get events() {
|
|
90
|
+
return this.cachedEventsAPI;
|
|
91
|
+
}
|
|
92
|
+
createEventsAPI() {
|
|
111
93
|
return {
|
|
112
94
|
emit: (event, data) => {
|
|
113
95
|
this.eventBus.emit(event, data);
|
|
@@ -120,114 +102,60 @@ export class RuntimeContextImpl {
|
|
|
120
102
|
}
|
|
121
103
|
};
|
|
122
104
|
}
|
|
123
|
-
/**
|
|
124
|
-
* Returns the Runtime instance
|
|
125
|
-
* Requirement: 9.6
|
|
126
|
-
*/
|
|
127
105
|
getRuntime() {
|
|
128
106
|
return this.runtime;
|
|
129
107
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
* Returns a cached frozen shallow copy of the host context to prevent mutation.
|
|
135
|
-
* This ensures plugins can access host services but cannot modify them.
|
|
136
|
-
* The frozen copy is cached to avoid memory leaks from repeated access.
|
|
137
|
-
*/
|
|
108
|
+
get logger() {
|
|
109
|
+
return this.loggerInstance;
|
|
110
|
+
}
|
|
138
111
|
get host() {
|
|
139
112
|
return this.frozenHostContext;
|
|
140
113
|
}
|
|
141
|
-
/**
|
|
142
|
-
* Introspection API - query runtime metadata
|
|
143
|
-
* Requirements: 3.1, 4.1, 5.1, 6.1
|
|
144
|
-
*
|
|
145
|
-
* Returns a cached introspection API object to prevent memory leaks
|
|
146
|
-
* from repeated access.
|
|
147
|
-
*/
|
|
148
114
|
get introspect() {
|
|
149
115
|
return this.introspectionAPI;
|
|
150
116
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Creates the introspection API object.
|
|
153
|
-
* Called once during construction and cached.
|
|
154
|
-
*/
|
|
155
117
|
createIntrospectionAPI() {
|
|
156
118
|
return {
|
|
157
|
-
/**
|
|
158
|
-
* List all registered action IDs
|
|
159
|
-
* Requirements: 3.1
|
|
160
|
-
*/
|
|
161
119
|
listActions: () => {
|
|
162
120
|
return this.actionEngine.getAllActions().map(action => action.id);
|
|
163
121
|
},
|
|
164
|
-
/**
|
|
165
|
-
* Get action metadata by ID (excludes handler function)
|
|
166
|
-
* Requirements: 3.2, 3.3, 3.4, 3.5
|
|
167
|
-
*/
|
|
168
122
|
getActionDefinition: (id) => {
|
|
169
123
|
const action = this.actionEngine.getAction(id);
|
|
170
124
|
if (!action)
|
|
171
125
|
return null;
|
|
172
|
-
// Extract only id and timeout (exclude handler function)
|
|
173
126
|
const metadata = {
|
|
174
127
|
id: action.id,
|
|
175
128
|
timeout: action.timeout
|
|
176
129
|
};
|
|
177
|
-
// Deep freeze the metadata
|
|
178
130
|
return deepFreeze(metadata);
|
|
179
131
|
},
|
|
180
|
-
/**
|
|
181
|
-
* List all registered plugin names
|
|
182
|
-
* Requirements: 4.1
|
|
183
|
-
*/
|
|
184
132
|
listPlugins: () => {
|
|
185
133
|
return this.pluginRegistry.getAllPlugins().map(plugin => plugin.name);
|
|
186
134
|
},
|
|
187
|
-
/**
|
|
188
|
-
* Get plugin metadata by name (excludes setup/dispose functions)
|
|
189
|
-
* Requirements: 4.2, 4.3, 4.4, 4.5
|
|
190
|
-
*/
|
|
191
135
|
getPluginDefinition: (name) => {
|
|
192
136
|
const plugin = this.pluginRegistry.getPlugin(name);
|
|
193
137
|
if (!plugin)
|
|
194
138
|
return null;
|
|
195
|
-
// Extract only name and version (exclude setup/dispose functions)
|
|
196
139
|
const metadata = {
|
|
197
140
|
name: plugin.name,
|
|
198
141
|
version: plugin.version
|
|
199
142
|
};
|
|
200
|
-
// Deep freeze the metadata
|
|
201
143
|
return deepFreeze(metadata);
|
|
202
144
|
},
|
|
203
|
-
/**
|
|
204
|
-
* List all registered screen IDs
|
|
205
|
-
* Requirements: 5.1
|
|
206
|
-
*/
|
|
207
145
|
listScreens: () => {
|
|
208
146
|
return this.screenRegistry.getAllScreens().map(screen => screen.id);
|
|
209
147
|
},
|
|
210
|
-
/**
|
|
211
|
-
* Get screen definition by ID (includes all properties)
|
|
212
|
-
* Requirements: 5.2, 5.3, 5.4, 5.5
|
|
213
|
-
*/
|
|
214
148
|
getScreenDefinition: (id) => {
|
|
215
149
|
const screen = this.screenRegistry.getScreen(id);
|
|
216
150
|
if (!screen)
|
|
217
151
|
return null;
|
|
218
|
-
// Include all screen properties
|
|
219
152
|
const metadata = {
|
|
220
153
|
id: screen.id,
|
|
221
154
|
title: screen.title,
|
|
222
155
|
component: screen.component
|
|
223
156
|
};
|
|
224
|
-
// Deep freeze the metadata
|
|
225
157
|
return deepFreeze(metadata);
|
|
226
158
|
},
|
|
227
|
-
/**
|
|
228
|
-
* Get runtime metadata with statistics
|
|
229
|
-
* Requirements: 6.1, 6.2, 6.3, 6.4, 6.5
|
|
230
|
-
*/
|
|
231
159
|
getMetadata: () => {
|
|
232
160
|
const metadata = {
|
|
233
161
|
runtimeVersion: '0.1.0',
|
|
@@ -235,7 +163,6 @@ export class RuntimeContextImpl {
|
|
|
235
163
|
totalPlugins: this.pluginRegistry.getAllPlugins().length,
|
|
236
164
|
totalScreens: this.screenRegistry.getAllScreens().length
|
|
237
165
|
};
|
|
238
|
-
// Deep freeze the metadata
|
|
239
166
|
return deepFreeze(metadata);
|
|
240
167
|
}
|
|
241
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../src/runtime-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-context.js","sourceRoot":"","sources":["../src/runtime-context.ts"],"names":[],"mappings":"AAgBA,SAAS,UAAU,CAAI,GAAM;IAE3B,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAGnB,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC7C,MAAM,KAAK,GAAI,GAAW,CAAC,IAAI,CAAC,CAAC;QAGjC,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;YAChC,OAAO;QACT,CAAC;QAGD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;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