skeleton-crew-runtime 0.1.3 → 0.1.4
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 +13 -66
- package/dist/runtime-context.d.ts.map +1 -1
- package/dist/runtime-context.js +20 -98
- package/dist/runtime-context.js.map +1 -1
- package/dist/runtime.d.ts +1 -98
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +6 -135
- 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 +1 -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
package/dist/types.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
// Core type definitions will be implemented in task 2
|
|
2
|
-
// Error Classes
|
|
3
|
-
/**
|
|
4
|
-
* Error thrown when validation fails for a resource
|
|
5
|
-
* @see Requirements 14.1, 14.2, 14.3, 14.4, 14.5, 14.6
|
|
6
|
-
*/
|
|
7
1
|
export class ValidationError extends Error {
|
|
8
2
|
resourceType;
|
|
9
3
|
field;
|
|
@@ -16,10 +10,6 @@ export class ValidationError extends Error {
|
|
|
16
10
|
this.name = 'ValidationError';
|
|
17
11
|
}
|
|
18
12
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Error thrown when attempting to register a duplicate resource
|
|
21
|
-
* @see Requirements 15.1, 15.2, 15.3, 15.4, 15.5
|
|
22
|
-
*/
|
|
23
13
|
export class DuplicateRegistrationError extends Error {
|
|
24
14
|
resourceType;
|
|
25
15
|
identifier;
|
|
@@ -30,10 +20,6 @@ export class DuplicateRegistrationError extends Error {
|
|
|
30
20
|
this.name = 'DuplicateRegistrationError';
|
|
31
21
|
}
|
|
32
22
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Error thrown when an action execution exceeds its timeout
|
|
35
|
-
* @see Requirements 11.1, 11.2, 11.3, 11.4, 11.5
|
|
36
|
-
*/
|
|
37
23
|
export class ActionTimeoutError extends Error {
|
|
38
24
|
actionId;
|
|
39
25
|
timeoutMs;
|
|
@@ -44,10 +30,6 @@ export class ActionTimeoutError extends Error {
|
|
|
44
30
|
this.name = 'ActionTimeoutError';
|
|
45
31
|
}
|
|
46
32
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Error thrown when an action handler throws an error
|
|
49
|
-
* @see Requirements 3.1, 3.2, 3.3, 3.4, 3.5
|
|
50
|
-
*/
|
|
51
33
|
export class ActionExecutionError extends Error {
|
|
52
34
|
actionId;
|
|
53
35
|
cause;
|
|
@@ -59,10 +41,6 @@ export class ActionExecutionError extends Error {
|
|
|
59
41
|
this.cause = cause;
|
|
60
42
|
}
|
|
61
43
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Default console-based logger implementation
|
|
64
|
-
* @see Requirements 7.1, 7.2, 7.3, 7.4, 7.5, 7.6
|
|
65
|
-
*/
|
|
66
44
|
export class ConsoleLogger {
|
|
67
45
|
debug(message, ...args) {
|
|
68
46
|
console.debug(message, ...args);
|
|
@@ -77,11 +55,6 @@ export class ConsoleLogger {
|
|
|
77
55
|
console.error(message, ...args);
|
|
78
56
|
}
|
|
79
57
|
}
|
|
80
|
-
// Runtime State Enum
|
|
81
|
-
/**
|
|
82
|
-
* Runtime lifecycle states
|
|
83
|
-
* @see Requirements 16.1, 16.2, 16.3, 16.4, 16.5
|
|
84
|
-
*/
|
|
85
58
|
export var RuntimeState;
|
|
86
59
|
(function (RuntimeState) {
|
|
87
60
|
RuntimeState["Uninitialized"] = "uninitialized";
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAE/B;IACA;IACA;IAHT,YACS,YAAoB,EACpB,KAAa,EACb,UAAmB;QAE1B,KAAK,CACH,yBAAyB,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,+BAA+B,KAAK,GAAG,CACpH,CAAC;QANK,iBAAY,GAAZ,YAAY,CAAQ;QACpB,UAAK,GAAL,KAAK,CAAQ;QACb,eAAU,GAAV,UAAU,CAAS;QAK1B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAMD,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAE1C;IACA;IAFT,YACS,YAAoB,EACpB,UAAkB;QAEzB,KAAK,CAAC,GAAG,YAAY,qBAAqB,UAAU,yBAAyB,CAAC,CAAC;QAHxE,iBAAY,GAAZ,YAAY,CAAQ;QACpB,eAAU,GAAV,UAAU,CAAQ;QAGzB,IAAI,CAAC,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AA6B,CAAA;IAC7B,2CAA2B,CAAA;IAC3B,8CAA8B,CAAA;IAC9B,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
|
package/dist/ui-bridge.d.ts
CHANGED
|
@@ -1,39 +1,12 @@
|
|
|
1
1
|
import { UIProvider, ScreenDefinition, Logger } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* UIBridge manages optional UI provider registration and screen rendering.
|
|
4
|
-
* Validates provider implements required methods and rejects duplicate registration.
|
|
5
|
-
* @see Requirements 9.1, 9.2, 9.3, 9.4, 9.5, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5
|
|
6
|
-
*/
|
|
7
2
|
export declare class UIBridge {
|
|
8
3
|
private provider;
|
|
9
4
|
private logger;
|
|
10
5
|
constructor(logger: Logger);
|
|
11
|
-
/**
|
|
12
|
-
* Register a UI provider with the runtime.
|
|
13
|
-
* @throws ValidationError if provider is missing required methods
|
|
14
|
-
* @throws DuplicateRegistrationError if provider is already registered
|
|
15
|
-
* @see Requirements 9.1, 9.2, 9.4, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5
|
|
16
|
-
*/
|
|
17
6
|
setProvider(provider: UIProvider): void;
|
|
18
|
-
/**
|
|
19
|
-
* Get the registered UI provider.
|
|
20
|
-
* @returns The registered UIProvider or null if none registered
|
|
21
|
-
*/
|
|
22
7
|
getProvider(): UIProvider | null;
|
|
23
|
-
/**
|
|
24
|
-
* Render a screen using the registered UI provider.
|
|
25
|
-
* @throws Error if no UI provider is registered
|
|
26
|
-
* @see Requirements 9.2
|
|
27
|
-
*/
|
|
28
8
|
renderScreen(screen: ScreenDefinition): unknown;
|
|
29
|
-
/**
|
|
30
|
-
* Shutdown the UI provider by calling unmount if it exists.
|
|
31
|
-
* @see Requirements 9.5
|
|
32
|
-
*/
|
|
33
9
|
shutdown(): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Clear the UI provider during shutdown.
|
|
36
|
-
*/
|
|
37
10
|
clear(): void;
|
|
38
11
|
}
|
|
39
12
|
//# sourceMappingURL=ui-bridge.d.ts.map
|
package/dist/ui-bridge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-bridge.d.ts","sourceRoot":"","sources":["../src/ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAA+C,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-bridge.d.ts","sourceRoot":"","sources":["../src/ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAA+C,MAAM,YAAY,CAAC;AAO/G,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAU1B,WAAW,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI;IAsBvC,WAAW,IAAI,UAAU,GAAG,IAAI;IAShC,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO;IAYzC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAe/B,KAAK,IAAI,IAAI;CAGd"}
|
package/dist/ui-bridge.js
CHANGED
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
import { ValidationError, DuplicateRegistrationError } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* UIBridge manages optional UI provider registration and screen rendering.
|
|
4
|
-
* Validates provider implements required methods and rejects duplicate registration.
|
|
5
|
-
* @see Requirements 9.1, 9.2, 9.3, 9.4, 9.5, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5
|
|
6
|
-
*/
|
|
7
2
|
export class UIBridge {
|
|
8
3
|
provider = null;
|
|
9
4
|
logger;
|
|
10
5
|
constructor(logger) {
|
|
11
6
|
this.logger = logger;
|
|
12
7
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Register a UI provider with the runtime.
|
|
15
|
-
* @throws ValidationError if provider is missing required methods
|
|
16
|
-
* @throws DuplicateRegistrationError if provider is already registered
|
|
17
|
-
* @see Requirements 9.1, 9.2, 9.4, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5
|
|
18
|
-
*/
|
|
19
8
|
setProvider(provider) {
|
|
20
|
-
// Reject duplicate provider registration
|
|
21
9
|
if (this.provider !== null) {
|
|
22
10
|
throw new DuplicateRegistrationError('UIProvider', 'default');
|
|
23
11
|
}
|
|
24
|
-
// Validate provider has required methods
|
|
25
12
|
if (typeof provider.mount !== 'function') {
|
|
26
13
|
throw new ValidationError('UIProvider', 'mount');
|
|
27
14
|
}
|
|
@@ -30,28 +17,15 @@ export class UIBridge {
|
|
|
30
17
|
}
|
|
31
18
|
this.provider = provider;
|
|
32
19
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Get the registered UI provider.
|
|
35
|
-
* @returns The registered UIProvider or null if none registered
|
|
36
|
-
*/
|
|
37
20
|
getProvider() {
|
|
38
21
|
return this.provider;
|
|
39
22
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Render a screen using the registered UI provider.
|
|
42
|
-
* @throws Error if no UI provider is registered
|
|
43
|
-
* @see Requirements 9.2
|
|
44
|
-
*/
|
|
45
23
|
renderScreen(screen) {
|
|
46
24
|
if (this.provider === null) {
|
|
47
25
|
throw new Error('No UI provider registered');
|
|
48
26
|
}
|
|
49
27
|
return this.provider.renderScreen(screen);
|
|
50
28
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Shutdown the UI provider by calling unmount if it exists.
|
|
53
|
-
* @see Requirements 9.5
|
|
54
|
-
*/
|
|
55
29
|
async shutdown() {
|
|
56
30
|
if (this.provider?.unmount) {
|
|
57
31
|
try {
|
|
@@ -64,9 +38,6 @@ export class UIBridge {
|
|
|
64
38
|
}
|
|
65
39
|
this.provider = null;
|
|
66
40
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Clear the UI provider during shutdown.
|
|
69
|
-
*/
|
|
70
41
|
clear() {
|
|
71
42
|
this.provider = null;
|
|
72
43
|
}
|
package/dist/ui-bridge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-bridge.js","sourceRoot":"","sources":["../src/ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,eAAe,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-bridge.js","sourceRoot":"","sources":["../src/ui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,eAAe,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAO/G,MAAM,OAAO,QAAQ;IACX,QAAQ,GAAsB,IAAI,CAAC;IACnC,MAAM,CAAS;IAEvB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAQD,WAAW,CAAC,QAAoB;QAE9B,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC3B,MAAM,IAAI,0BAA0B,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QAChE,CAAC;QAGD,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;YACzC,MAAM,IAAI,eAAe,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,OAAO,QAAQ,CAAC,YAAY,KAAK,UAAU,EAAE,CAAC;YAChD,MAAM,IAAI,eAAe,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAMD,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAOD,YAAY,CAAC,MAAwB;QACnC,IAAI,IAA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