@invinite-org/chartlang-host-worker 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +228 -0
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/createWorkerBoot.d.ts +45 -0
- package/dist/createWorkerBoot.d.ts.map +1 -0
- package/dist/createWorkerBoot.js +122 -0
- package/dist/createWorkerBoot.js.map +1 -0
- package/dist/createWorkerHost.d.ts +55 -0
- package/dist/createWorkerHost.d.ts.map +1 -0
- package/dist/createWorkerHost.js +167 -0
- package/dist/createWorkerHost.js.map +1 -0
- package/dist/defaultWorkerFactory.d.ts +19 -0
- package/dist/defaultWorkerFactory.d.ts.map +1 -0
- package/dist/defaultWorkerFactory.js +23 -0
- package/dist/defaultWorkerFactory.js.map +1 -0
- package/dist/filterEmissions.d.ts +21 -0
- package/dist/filterEmissions.d.ts.map +1 -0
- package/dist/filterEmissions.js +107 -0
- package/dist/filterEmissions.js.map +1 -0
- package/dist/idb.d.ts +2 -0
- package/dist/idb.d.ts.map +1 -0
- package/dist/idb.js +4 -0
- package/dist/idb.js.map +1 -0
- package/dist/idbStateStore.d.ts +22 -0
- package/dist/idbStateStore.d.ts.map +1 -0
- package/dist/idbStateStore.js +255 -0
- package/dist/idbStateStore.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/limits.d.ts +40 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +48 -0
- package/dist/limits.js.map +1 -0
- package/dist/protocol.d.ts +70 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +4 -0
- package/dist/protocol.js.map +1 -0
- package/dist/types.d.ts +164 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/worker-boot.d.ts +6 -0
- package/dist/worker-boot.js +14999 -0
- package/dist/worker-boot.js.map +7 -0
- package/dist/workerBoot.d.ts +2 -0
- package/dist/workerBoot.d.ts.map +1 -0
- package/dist/workerBoot.js +18 -0
- package/dist/workerBoot.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idbStateStore.js","sourceRoot":"","sources":["../src/idbStateStore.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAK/D,MAAM,eAAe,GAAG,WAAW,CAAC;AACpC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3C,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAC1C,MAAM,cAAc,GAAG,SAAS,CAAC;AASjC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgC,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CACzB,IAIE;IAEF,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,eAAe,CAAC;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,iBAAiB,CAAC;IACpD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEzC,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,KAAK,CAAC,IAAI;YACN,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;YAChC,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;YACpD,MAAM,IAAI,GAAG,eAAe,CAAC,EAAE,CAAC,CAAC;YACjC,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAChC,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAC9C,CAAC;YACF,MAAM,IAAI,CAAC;YACX,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC,CA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D,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,IAAI,CAAC,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACjF,IAAI,CAAC,CAAC,eAAe,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACzF,IAAI,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACzC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAc,EAAE,QAAgB;IAC7C,IAAI,KAAK,YAAY,YAAY;QAAE,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnE,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACvD,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createWorkerHost } from "./createWorkerHost.js";
|
|
2
|
+
export type { CreateWorkerHostOpts } from "./createWorkerHost.js";
|
|
3
|
+
export { createWorkerBoot } from "./createWorkerBoot.js";
|
|
4
|
+
export type { WorkerBootScope } from "./createWorkerBoot.js";
|
|
5
|
+
export { DEFAULT_LIMITS } from "./limits.js";
|
|
6
|
+
export type { HostCompiledScript, HostLimits, ScriptHost, WorkerLike, } from "./types.js";
|
|
7
|
+
export type { HostToWorker, WorkerToHost } from "./protocol.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EACR,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,GACb,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
export { createWorkerHost } from "./createWorkerHost.js";
|
|
4
|
+
export { createWorkerBoot } from "./createWorkerBoot.js";
|
|
5
|
+
export { DEFAULT_LIMITS } from "./limits.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/limits.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { HostLimits } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Phase-1 default `HostLimits`. `maxCpuMsPerStep` is the only enforced cap;
|
|
4
|
+
* `maxHeapBytes` is advisory (no per-worker heap API exists in browsers
|
|
5
|
+
* today) and `maxRingBufferBars` is forwarded for runtime sizing decisions.
|
|
6
|
+
* `maxLoadTimeoutMs` bounds `host.load()` so a silently-dead worker can't
|
|
7
|
+
* hang a consumer indefinitely; 30s is generous for module fetch + parse
|
|
8
|
+
* on a slow network and still bounded enough to recover.
|
|
9
|
+
* Frozen so consumers cannot mutate the singleton.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.1
|
|
12
|
+
* @stable
|
|
13
|
+
* @example
|
|
14
|
+
* import { DEFAULT_LIMITS } from "@invinite-org/chartlang-host-worker";
|
|
15
|
+
* const cpu = DEFAULT_LIMITS.maxCpuMsPerStep; // 50
|
|
16
|
+
* void cpu;
|
|
17
|
+
*/
|
|
18
|
+
export declare const DEFAULT_LIMITS: HostLimits;
|
|
19
|
+
/**
|
|
20
|
+
* Wall-clock measurement around `fn`. Returns `result` (always — Phase-1
|
|
21
|
+
* enforcement is measurement, not preemption) and `overshoot` (the observed
|
|
22
|
+
* elapsed ms when over budget, `0` otherwise). The worker boot uses this to
|
|
23
|
+
* post `step-overshoot` to the host; Phase 5's QuickJS host swaps this seam
|
|
24
|
+
* for real `setInterruptHandler`-based preemption.
|
|
25
|
+
*
|
|
26
|
+
* Re-throws if `fn` rejects — overshoot detection does not swallow errors.
|
|
27
|
+
*
|
|
28
|
+
* @since 0.1
|
|
29
|
+
* @stable
|
|
30
|
+
* @example
|
|
31
|
+
* // const { result, overshoot } = await watchStep(async () => 42, 100);
|
|
32
|
+
* // result === 42; overshoot === 0;
|
|
33
|
+
* const fn: typeof watchStep = watchStep;
|
|
34
|
+
* void fn;
|
|
35
|
+
*/
|
|
36
|
+
export declare function watchStep<T>(fn: () => Promise<T>, maxMs: number): Promise<{
|
|
37
|
+
readonly result: T;
|
|
38
|
+
readonly overshoot: number;
|
|
39
|
+
}>;
|
|
40
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,EAAE,UAK3B,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC7B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,KAAK,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAK7D"}
|
package/dist/limits.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
/**
|
|
4
|
+
* Phase-1 default `HostLimits`. `maxCpuMsPerStep` is the only enforced cap;
|
|
5
|
+
* `maxHeapBytes` is advisory (no per-worker heap API exists in browsers
|
|
6
|
+
* today) and `maxRingBufferBars` is forwarded for runtime sizing decisions.
|
|
7
|
+
* `maxLoadTimeoutMs` bounds `host.load()` so a silently-dead worker can't
|
|
8
|
+
* hang a consumer indefinitely; 30s is generous for module fetch + parse
|
|
9
|
+
* on a slow network and still bounded enough to recover.
|
|
10
|
+
* Frozen so consumers cannot mutate the singleton.
|
|
11
|
+
*
|
|
12
|
+
* @since 0.1
|
|
13
|
+
* @stable
|
|
14
|
+
* @example
|
|
15
|
+
* import { DEFAULT_LIMITS } from "@invinite-org/chartlang-host-worker";
|
|
16
|
+
* const cpu = DEFAULT_LIMITS.maxCpuMsPerStep; // 50
|
|
17
|
+
* void cpu;
|
|
18
|
+
*/
|
|
19
|
+
export const DEFAULT_LIMITS = Object.freeze({
|
|
20
|
+
maxHeapBytes: 64 * 1024 * 1024,
|
|
21
|
+
maxCpuMsPerStep: 50,
|
|
22
|
+
maxRingBufferBars: 5_000,
|
|
23
|
+
maxLoadTimeoutMs: 30_000,
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Wall-clock measurement around `fn`. Returns `result` (always — Phase-1
|
|
27
|
+
* enforcement is measurement, not preemption) and `overshoot` (the observed
|
|
28
|
+
* elapsed ms when over budget, `0` otherwise). The worker boot uses this to
|
|
29
|
+
* post `step-overshoot` to the host; Phase 5's QuickJS host swaps this seam
|
|
30
|
+
* for real `setInterruptHandler`-based preemption.
|
|
31
|
+
*
|
|
32
|
+
* Re-throws if `fn` rejects — overshoot detection does not swallow errors.
|
|
33
|
+
*
|
|
34
|
+
* @since 0.1
|
|
35
|
+
* @stable
|
|
36
|
+
* @example
|
|
37
|
+
* // const { result, overshoot } = await watchStep(async () => 42, 100);
|
|
38
|
+
* // result === 42; overshoot === 0;
|
|
39
|
+
* const fn: typeof watchStep = watchStep;
|
|
40
|
+
* void fn;
|
|
41
|
+
*/
|
|
42
|
+
export async function watchStep(fn, maxMs) {
|
|
43
|
+
const start = performance.now();
|
|
44
|
+
const result = await fn();
|
|
45
|
+
const elapsed = performance.now() - start;
|
|
46
|
+
return { result, overshoot: elapsed > maxMs ? elapsed : 0 };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.js","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAI/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAe,MAAM,CAAC,MAAM,CAAC;IACpD,YAAY,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IAC9B,eAAe,EAAE,EAAE;IACnB,iBAAiB,EAAE,KAAK;IACxB,gBAAgB,EAAE,MAAM;CAC3B,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC3B,EAAoB,EACpB,KAAa;IAEb,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;IAC1B,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { AdapterSymInfo, CandleEvent, Capabilities, RunnerEmissions } from "@invinite-org/chartlang-adapter-kit";
|
|
2
|
+
import type { HostCompiledScript, HostLimits } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Messages the main thread posts into the worker. JSON-clean by construction
|
|
5
|
+
* — every payload survives `structuredClone` without bespoke transferables.
|
|
6
|
+
*
|
|
7
|
+
* - `load` carries the compiled bundle, the adapter's `Capabilities`, and the
|
|
8
|
+
* host's `HostLimits`. Optional `inputOverrides` is already resolved on the
|
|
9
|
+
* host side because callbacks cannot cross the worker boundary.
|
|
10
|
+
* - `candleEvent` is fire-and-forget — the worker only replies on overshoot
|
|
11
|
+
* or fatal.
|
|
12
|
+
* - `drain` carries a host-issued `nonce`; the matching reply echoes it.
|
|
13
|
+
* - `dispose` has no reply.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.1
|
|
16
|
+
* @stable
|
|
17
|
+
* @example
|
|
18
|
+
* const m: HostToWorker = { kind: "dispose" };
|
|
19
|
+
* void m;
|
|
20
|
+
*/
|
|
21
|
+
export type HostToWorker = {
|
|
22
|
+
readonly kind: "load";
|
|
23
|
+
readonly compiled: HostCompiledScript;
|
|
24
|
+
readonly capabilities: Capabilities;
|
|
25
|
+
readonly symInfo?: AdapterSymInfo;
|
|
26
|
+
readonly inputOverrides?: Readonly<Record<string, unknown>>;
|
|
27
|
+
readonly limits: HostLimits;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "candleEvent";
|
|
30
|
+
readonly event: CandleEvent;
|
|
31
|
+
} | {
|
|
32
|
+
readonly kind: "drain";
|
|
33
|
+
readonly nonce: number;
|
|
34
|
+
} | {
|
|
35
|
+
readonly kind: "dispose";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Messages the worker posts back to the main thread.
|
|
39
|
+
*
|
|
40
|
+
* - `loaded` / `loadError` close the `load` round-trip.
|
|
41
|
+
* - `emissions` carries the matching `nonce` from the `drain` request.
|
|
42
|
+
* - `step-overshoot` is fire-and-forget — Phase-1 enforcement is
|
|
43
|
+
* measurement, not preemption. The host surfaces overshoots via
|
|
44
|
+
* `onWorkerError`; Phase 5's QuickJS host adds real interrupt-based
|
|
45
|
+
* preemption.
|
|
46
|
+
* - `fatal` reports any uncaught error inside the boot's message handler.
|
|
47
|
+
*
|
|
48
|
+
* @since 0.1
|
|
49
|
+
* @stable
|
|
50
|
+
* @example
|
|
51
|
+
* const m: WorkerToHost = { kind: "loaded" };
|
|
52
|
+
* void m;
|
|
53
|
+
*/
|
|
54
|
+
export type WorkerToHost = {
|
|
55
|
+
readonly kind: "loaded";
|
|
56
|
+
} | {
|
|
57
|
+
readonly kind: "loadError";
|
|
58
|
+
readonly message: string;
|
|
59
|
+
} | {
|
|
60
|
+
readonly kind: "emissions";
|
|
61
|
+
readonly nonce: number;
|
|
62
|
+
readonly emissions: RunnerEmissions;
|
|
63
|
+
} | {
|
|
64
|
+
readonly kind: "step-overshoot";
|
|
65
|
+
readonly observedMs: number;
|
|
66
|
+
} | {
|
|
67
|
+
readonly kind: "fatal";
|
|
68
|
+
readonly message: string;
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,cAAc,EACd,WAAW,EACX,YAAY,EACZ,eAAe,EAClB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,YAAY,GAClB;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5D,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CAC/B,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEnC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,YAAY,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACxD;IACI,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;CACvC,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/protocol.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { Bar, CompiledScriptObject, ScriptManifest } from "@invinite-org/chartlang-core";
|
|
2
|
+
import type { CandleEvent, RunnerEmissions } from "@invinite-org/chartlang-adapter-kit";
|
|
3
|
+
/**
|
|
4
|
+
* Resource caps a `ScriptHost` reports to its consumer. Phase-1 `host-worker`
|
|
5
|
+
* enforces `maxCpuMsPerStep` via measurement-only watchdog inside the worker
|
|
6
|
+
* boot; `maxHeapBytes` is advisory (no browser API exists for reliable
|
|
7
|
+
* per-worker heap caps — Phase 5's QuickJS host adds real limits).
|
|
8
|
+
* `maxRingBufferBars` is forwarded for runtime sizing decisions.
|
|
9
|
+
*
|
|
10
|
+
* `maxLoadTimeoutMs` bounds how long `host.load()` is allowed to wait for the
|
|
11
|
+
* worker's `loaded` reply before rejecting with a descriptive timeout error.
|
|
12
|
+
* A silently-dead worker (failed module fetch, exception during boot, OS-level
|
|
13
|
+
* crash) would otherwise leave `load()` pending forever.
|
|
14
|
+
*
|
|
15
|
+
* @since 0.1
|
|
16
|
+
* @stable
|
|
17
|
+
* @example
|
|
18
|
+
* const limits: HostLimits = {
|
|
19
|
+
* maxHeapBytes: 64 * 1024 * 1024,
|
|
20
|
+
* maxCpuMsPerStep: 50,
|
|
21
|
+
* maxRingBufferBars: 5_000,
|
|
22
|
+
* maxLoadTimeoutMs: 30_000,
|
|
23
|
+
* };
|
|
24
|
+
*/
|
|
25
|
+
export type HostLimits = {
|
|
26
|
+
readonly maxHeapBytes: number;
|
|
27
|
+
readonly maxCpuMsPerStep: number;
|
|
28
|
+
readonly maxRingBufferBars: number;
|
|
29
|
+
readonly maxLoadTimeoutMs: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The minimal compiled-script shape the host streams across the postMessage
|
|
33
|
+
* boundary. Mirrors `@invinite-org/chartlang-compiler`'s `CompiledScript`
|
|
34
|
+
* without naming it — keeps `host-worker` free of a compiler dependency while
|
|
35
|
+
* still pinning the wire contract (Phase 1 walking skeleton).
|
|
36
|
+
*
|
|
37
|
+
* @since 0.1
|
|
38
|
+
* @stable
|
|
39
|
+
* @example
|
|
40
|
+
* const cs: HostCompiledScript = {
|
|
41
|
+
* moduleSource: "export default { manifest: {...}, compute: () => {} };",
|
|
42
|
+
* manifest: {
|
|
43
|
+
* apiVersion: 1,
|
|
44
|
+
* kind: "indicator",
|
|
45
|
+
* name: "demo",
|
|
46
|
+
* inputs: {},
|
|
47
|
+
* capabilities: ["indicators"],
|
|
48
|
+
* requestedIntervals: [],
|
|
49
|
+
* userPickableInterval: false,
|
|
50
|
+
* seriesCapacities: {},
|
|
51
|
+
* maxLookback: 0,
|
|
52
|
+
* },
|
|
53
|
+
* };
|
|
54
|
+
*/
|
|
55
|
+
export type HostCompiledScript = {
|
|
56
|
+
readonly moduleSource: string;
|
|
57
|
+
readonly manifest: ScriptManifest;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Host-side lifecycle handle the worker host returns. Mirrors PLAN §8.1 — the
|
|
61
|
+
* Phase-1 Web Worker host owns the only declaration; Phase-5's QuickJS host
|
|
62
|
+
* re-uses the same shape. Methods cross the worker boundary via structured
|
|
63
|
+
* clones; `dispose` terminates the worker.
|
|
64
|
+
*
|
|
65
|
+
* @since 0.1
|
|
66
|
+
* @stable
|
|
67
|
+
* @example
|
|
68
|
+
* declare const host: ScriptHost;
|
|
69
|
+
* await host.load({
|
|
70
|
+
* moduleSource: "export default { manifest: m, compute: () => {} };",
|
|
71
|
+
* manifest: m,
|
|
72
|
+
* });
|
|
73
|
+
* await host.push({ kind: "history", bars: [] });
|
|
74
|
+
* const emissions = await host.drain();
|
|
75
|
+
* host.dispose();
|
|
76
|
+
* void emissions;
|
|
77
|
+
*/
|
|
78
|
+
export type ScriptHost = {
|
|
79
|
+
load(compiled: HostCompiledScript): Promise<void>;
|
|
80
|
+
push(event: CandleEvent): Promise<void>;
|
|
81
|
+
drain(): Promise<RunnerEmissions>;
|
|
82
|
+
dispose(): void;
|
|
83
|
+
readonly limits: HostLimits;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Duck-typed slice of the browser `Worker` / `MessagePort` surface the host
|
|
87
|
+
* needs. Tests supply a `MessageChannel` port; production supplies a real
|
|
88
|
+
* `Worker`. `terminate` is optional because `MessagePort` doesn't expose it —
|
|
89
|
+
* the host feature-detects before calling.
|
|
90
|
+
*
|
|
91
|
+
* The `addEventListener("error", ...)` overload models the browser `Worker`'s
|
|
92
|
+
* boot/runtime failure channel. `MessagePort`-backed fakes accept the
|
|
93
|
+
* subscription but never fire it; the host unconditionally subscribes and
|
|
94
|
+
* relies on the boundary's natural no-op.
|
|
95
|
+
*
|
|
96
|
+
* @since 0.1
|
|
97
|
+
* @stable
|
|
98
|
+
* @example
|
|
99
|
+
* const ch = new MessageChannel();
|
|
100
|
+
* const worker: WorkerLike = ch.port1;
|
|
101
|
+
* void worker;
|
|
102
|
+
*/
|
|
103
|
+
export type WorkerLike = {
|
|
104
|
+
addEventListener(type: "message", listener: (ev: MessageEvent<unknown>) => void): void;
|
|
105
|
+
addEventListener(type: "error", listener: (ev: WorkerErrorEvent) => void): void;
|
|
106
|
+
postMessage(msg: unknown): void;
|
|
107
|
+
terminate?(): void;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The minimum subset of `ErrorEvent` the host reads when a real `Worker`
|
|
111
|
+
* fails to boot or crashes. Defined locally because `MessagePort` doesn't
|
|
112
|
+
* dispatch `ErrorEvent` and we don't want to drag a DOM-typed alias through
|
|
113
|
+
* the worker boundary.
|
|
114
|
+
*
|
|
115
|
+
* @since 0.1
|
|
116
|
+
* @stable
|
|
117
|
+
* @example
|
|
118
|
+
* const ev: WorkerErrorEvent = { message: "boot failed" };
|
|
119
|
+
* void ev;
|
|
120
|
+
*/
|
|
121
|
+
export type WorkerErrorEvent = {
|
|
122
|
+
readonly message?: string;
|
|
123
|
+
readonly filename?: string;
|
|
124
|
+
readonly error?: unknown;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* The runtime-level surface a worker boot stands up around a compiled script.
|
|
128
|
+
* Re-declared here so the boot module doesn't pull `createScriptRunner`'s
|
|
129
|
+
* typings through `@invinite-org/chartlang-runtime`'s barrel during dynamic
|
|
130
|
+
* import resolution.
|
|
131
|
+
*
|
|
132
|
+
* @since 0.1
|
|
133
|
+
* @stable
|
|
134
|
+
* @example
|
|
135
|
+
* // declare const r: ScriptRunnerHandle;
|
|
136
|
+
* // await r.onBarClose({ time: 0, open: 1, high: 1, low: 1, close: 1, volume: 0, symbol: "", interval: "" });
|
|
137
|
+
* declare const r: ScriptRunnerHandle;
|
|
138
|
+
* void r;
|
|
139
|
+
*/
|
|
140
|
+
export type ScriptRunnerHandle = {
|
|
141
|
+
onHistory(bars: ReadonlyArray<Bar>): Promise<void>;
|
|
142
|
+
onBarClose(bar: Bar): Promise<void>;
|
|
143
|
+
onBarTick(bar: Bar): Promise<void>;
|
|
144
|
+
push(event: CandleEvent): Promise<void>;
|
|
145
|
+
drain(): RunnerEmissions;
|
|
146
|
+
dispose(): Promise<void>;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* The default ESM-export shape the worker boot expects from a dynamically
|
|
150
|
+
* imported compiled module. Matches `@invinite-org/chartlang-compiler`'s
|
|
151
|
+
* bundled output (`export default defineIndicator(...)`).
|
|
152
|
+
*
|
|
153
|
+
* @since 0.1
|
|
154
|
+
* @stable
|
|
155
|
+
* @example
|
|
156
|
+
* const m: CompiledModuleExport = {
|
|
157
|
+
* default: { manifest: {} as ScriptManifest, compute: () => {} },
|
|
158
|
+
* };
|
|
159
|
+
* void m;
|
|
160
|
+
*/
|
|
161
|
+
export type CompiledModuleExport = {
|
|
162
|
+
readonly default: CompiledScriptObject;
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;CACrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,IAAI,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAA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C,KAAK,IAAI,eAAe,CAAC;IACzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;CAC1C,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
// Generated by scripts/buildWorkerBoot.ts. Do not edit by hand.
|
|
4
|
+
// The worker-boot bundle is a side-effect module loaded via
|
|
5
|
+
// `new Worker(new URL(...))`; it has no importable type surface.
|
|
6
|
+
export {};
|