@tellegen/engine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +19 -0
- package/README.md +53 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +20 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/contracts.d.ts +225 -0
- package/dist/generated/contracts.d.ts.map +1 -0
- package/dist/generated/contracts.js +8 -0
- package/dist/generated/contracts.js.map +1 -0
- package/dist/host.d.ts +13 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +95 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +333 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +393 -0
- package/dist/index.js.map +1 -0
- package/dist/module.d.ts +11 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +31 -0
- package/dist/module.js.map +1 -0
- package/dist/protocol.d.ts +101 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +63 -0
- package/dist/protocol.js.map +1 -0
- package/dist/wasm-pkg/LICENSE +6 -0
- package/dist/wasm-pkg/LICENSE-APACHE +201 -0
- package/dist/wasm-pkg/LICENSE-MIT +19 -0
- package/dist/wasm-pkg/package.json +21 -0
- package/dist/wasm-pkg/tellegen.d.ts +250 -0
- package/dist/wasm-pkg/tellegen.js +959 -0
- package/dist/wasm-pkg/tellegen_bg.wasm +0 -0
- package/dist/wasm-pkg/tellegen_bg.wasm.d.ts +33 -0
- package/dist/worker.d.ts +11 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +47 -0
- package/dist/worker.js.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2026 Samuel Talkington and contributors
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @tellegen/engine
|
|
2
|
+
|
|
3
|
+
Browser package for tellegen case ingestion, wasm solves, Study lifecycle calls, previews, commits, and sensitivity queries.
|
|
4
|
+
|
|
5
|
+
The package has no SvelteKit dependency. Host apps import the top level package and use either the direct functions or the `browserWasmTransport` facade:
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { browserWasmTransport, createStudy, solveJson } from "@tellegen/engine";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The wasm files are resolved relative to the package module. Host apps must serve
|
|
12
|
+
package asset files from `node_modules`.
|
|
13
|
+
|
|
14
|
+
## Contracts
|
|
15
|
+
|
|
16
|
+
The public contract version is `CONTRACT_VERSION`, which matches the package version. `CONTRACT_SOURCE_SHA256` records the `crates/tellegen/src/api.rs` content used to generate `src/generated/contracts.ts`.
|
|
17
|
+
|
|
18
|
+
Run the generator after Rust API changes:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm run contracts
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
CI runs `npm run build:engine` from the repository root, and that runs
|
|
25
|
+
`contracts:check`. A stale generated contract fails the build.
|
|
26
|
+
|
|
27
|
+
Breaking contract changes:
|
|
28
|
+
|
|
29
|
+
- Removing or renaming exported request or response fields.
|
|
30
|
+
- Changing field units, enum tags, formulation ids, solve status tags, or sensitivity operand/parameter shapes.
|
|
31
|
+
- Tightening a field from optional to required.
|
|
32
|
+
|
|
33
|
+
Nonbreaking changes:
|
|
34
|
+
|
|
35
|
+
- Adding optional fields.
|
|
36
|
+
- Adding new formulation ids, solve statuses, operands, or parameters when existing values keep their meaning.
|
|
37
|
+
|
|
38
|
+
## Release
|
|
39
|
+
|
|
40
|
+
Build and inspect the package from the repository root:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npm ci
|
|
44
|
+
npm run wasm
|
|
45
|
+
npm run build:engine
|
|
46
|
+
npm run pack:engine
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The first framework release publishes this package and `@tellegen/svelte`.
|
|
50
|
+
`@tellegen/engine` is the lower level browser package for custom UIs and for the
|
|
51
|
+
Svelte package. The hosted demo under `apps/web` is private and consumes
|
|
52
|
+
`@tellegen/svelte` through the same workspace file dependency used by the local
|
|
53
|
+
examples.
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Error helpers shared by the main-thread loader and the worker entry. Kept
|
|
2
|
+
* separate from module.ts so the worker bundle never touches the dynamic
|
|
3
|
+
* import there: the worker must stay a single chunk (Vite's default worker
|
|
4
|
+
* format cannot code-split). */
|
|
5
|
+
export declare function errorText(e: unknown): string;
|
|
6
|
+
export declare function isPermanentWasmLoadFailure(message: string): boolean;
|
|
7
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;gCAGgC;AAEhC,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAE5C;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAanE"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Error helpers shared by the main-thread loader and the worker entry. Kept
|
|
2
|
+
* separate from module.ts so the worker bundle never touches the dynamic
|
|
3
|
+
* import there: the worker must stay a single chunk (Vite's default worker
|
|
4
|
+
* format cannot code-split). */
|
|
5
|
+
export function errorText(e) {
|
|
6
|
+
return e instanceof Error ? e.message : String(e);
|
|
7
|
+
}
|
|
8
|
+
export function isPermanentWasmLoadFailure(message) {
|
|
9
|
+
// Latch only genuine browser-capability failures the engine module can
|
|
10
|
+
// never recover from in this browser: no WebAssembly, or an opcode the
|
|
11
|
+
// engine rejects. Transient fetch or
|
|
12
|
+
// instantiate failures (offline, 503, aborted navigation) routinely carry
|
|
13
|
+
// the .wasm URL or "Failed to fetch" in their message, so keying on the bare
|
|
14
|
+
// word "wasm"/"compile" wrongly disables the engine for the whole session.
|
|
15
|
+
// Those stay retryable.
|
|
16
|
+
if (/Failed to fetch|NetworkError|load failed|aborted|ERR_/i.test(message))
|
|
17
|
+
return false;
|
|
18
|
+
return /CompileError|LinkError|invalid opcode|unsupported|relaxed|WebAssembly is not defined/i.test(message);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;gCAGgC;AAEhC,MAAM,UAAU,SAAS,CAAC,CAAU;IAClC,OAAO,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,uEAAuE;IACvE,uEAAuE;IACvE,qCAAqC;IACrC,0EAA0E;IAC1E,6EAA6E;IAC7E,2EAA2E;IAC3E,wBAAwB;IACxB,IAAI,wDAAwD,CAAC,IAAI,CAAC,OAAO,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,OAAO,uFAAuF,CAAC,IAAI,CACjG,OAAO,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
export declare const CONTRACT_VERSION: "0.1.0";
|
|
2
|
+
export declare const CONTRACT_SOURCE_SHA256: "d17b92b8b23874c858ccb26b1740f253c95d7cfd78d9511c847b57c2f6eae05e";
|
|
3
|
+
export declare const FORMULATION_IDS: readonly ["dcpf", "dcopf", "acpf", "socwr", "acopf"];
|
|
4
|
+
export type FormulationId = (typeof FORMULATION_IDS)[number];
|
|
5
|
+
export declare const SOLVE_STATUSES: readonly ["optimal", "feasible"];
|
|
6
|
+
export type SolveStatus = (typeof SOLVE_STATUSES)[number];
|
|
7
|
+
export type BrowserFormulation = Extract<FormulationId, 'dcopf' | 'acopf' | 'socwr'>;
|
|
8
|
+
export type Power = 'Active' | 'Reactive';
|
|
9
|
+
export type End = 'From' | 'To';
|
|
10
|
+
export type VoltageKind = 'Magnitude' | 'Angle' | 'Squared' | 'ProductReal' | 'ProductImag';
|
|
11
|
+
export type CostTerm = 'Quadratic' | 'Linear';
|
|
12
|
+
export type GB = 'Conductance' | 'Susceptance';
|
|
13
|
+
export type Bound = 'Min' | 'Max';
|
|
14
|
+
export type TapKind = 'Ratio' | 'PhaseShift';
|
|
15
|
+
export type Mode = 'Forward' | 'Adjoint' | 'Auto';
|
|
16
|
+
export type Operand = {
|
|
17
|
+
Price: Power;
|
|
18
|
+
} | {
|
|
19
|
+
Dispatch: Power;
|
|
20
|
+
} | {
|
|
21
|
+
Flow: {
|
|
22
|
+
power: Power;
|
|
23
|
+
end: End;
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
Voltage: VoltageKind;
|
|
27
|
+
};
|
|
28
|
+
export type Parameter = {
|
|
29
|
+
Demand: Power;
|
|
30
|
+
} | {
|
|
31
|
+
Cost: CostTerm;
|
|
32
|
+
} | 'LineLimit' | {
|
|
33
|
+
SeriesAdmittance: GB;
|
|
34
|
+
} | {
|
|
35
|
+
ShuntAdmittance: GB;
|
|
36
|
+
} | {
|
|
37
|
+
VoltageBound: Bound;
|
|
38
|
+
} | {
|
|
39
|
+
GenBound: {
|
|
40
|
+
power: Power;
|
|
41
|
+
bound: Bound;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
Transformer: TapKind;
|
|
45
|
+
} | 'Switching';
|
|
46
|
+
export type ElementId = {
|
|
47
|
+
Bus: number;
|
|
48
|
+
} | {
|
|
49
|
+
Branch: number;
|
|
50
|
+
} | {
|
|
51
|
+
Generator: number;
|
|
52
|
+
};
|
|
53
|
+
export interface SensRequest {
|
|
54
|
+
operand: Operand;
|
|
55
|
+
parameter: Parameter;
|
|
56
|
+
indices?: number[] | null;
|
|
57
|
+
mode?: Mode;
|
|
58
|
+
}
|
|
59
|
+
export interface Edits {
|
|
60
|
+
deltas?: DemandDeltas;
|
|
61
|
+
rates?: BranchRatingDeltas;
|
|
62
|
+
}
|
|
63
|
+
export interface SolveOptions {
|
|
64
|
+
shed?: boolean;
|
|
65
|
+
warm_start?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface SolveRequest {
|
|
68
|
+
formulation?: FormulationId;
|
|
69
|
+
edits?: Edits;
|
|
70
|
+
sensitivities?: SensRequest[];
|
|
71
|
+
options?: SolveOptions;
|
|
72
|
+
}
|
|
73
|
+
export interface SolveIteration {
|
|
74
|
+
iter: number;
|
|
75
|
+
objective: number;
|
|
76
|
+
inf_pr: number;
|
|
77
|
+
inf_du: number;
|
|
78
|
+
}
|
|
79
|
+
export type NewtonIterations = {
|
|
80
|
+
count: number;
|
|
81
|
+
residual: number;
|
|
82
|
+
};
|
|
83
|
+
export type Iterations = SolveIteration[] | NewtonIterations;
|
|
84
|
+
export interface BusScalar {
|
|
85
|
+
bus: number;
|
|
86
|
+
/** powerio row uid, present when the solved network carried uids. */
|
|
87
|
+
uid?: string;
|
|
88
|
+
value: number;
|
|
89
|
+
}
|
|
90
|
+
export interface BusInjection {
|
|
91
|
+
bus: number;
|
|
92
|
+
uid?: string;
|
|
93
|
+
p: number;
|
|
94
|
+
q: number;
|
|
95
|
+
}
|
|
96
|
+
export interface BranchFlow {
|
|
97
|
+
branch: number;
|
|
98
|
+
/** powerio row uid, present when the solved network carried uids. */
|
|
99
|
+
uid?: string;
|
|
100
|
+
pf: number;
|
|
101
|
+
loading: number;
|
|
102
|
+
qf?: number;
|
|
103
|
+
pt?: number;
|
|
104
|
+
qt?: number;
|
|
105
|
+
}
|
|
106
|
+
export interface GenDispatch {
|
|
107
|
+
gen: number;
|
|
108
|
+
pg: number;
|
|
109
|
+
qg?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface RowMeta {
|
|
112
|
+
operand: Operand;
|
|
113
|
+
element: ElementId;
|
|
114
|
+
index: number;
|
|
115
|
+
}
|
|
116
|
+
export interface ColMeta {
|
|
117
|
+
parameter: Parameter;
|
|
118
|
+
element: ElementId;
|
|
119
|
+
index: number;
|
|
120
|
+
}
|
|
121
|
+
export interface SensitivityMatrix {
|
|
122
|
+
values: number[][];
|
|
123
|
+
rows: RowMeta[];
|
|
124
|
+
cols: ColMeta[];
|
|
125
|
+
units: string;
|
|
126
|
+
}
|
|
127
|
+
export interface SolveResponse {
|
|
128
|
+
formulation: FormulationId;
|
|
129
|
+
status: SolveStatus;
|
|
130
|
+
objective?: number;
|
|
131
|
+
iterations?: Iterations;
|
|
132
|
+
lmp?: BusScalar[];
|
|
133
|
+
lmp_q?: BusScalar[];
|
|
134
|
+
vm?: BusScalar[];
|
|
135
|
+
va?: BusScalar[];
|
|
136
|
+
w?: BusScalar[];
|
|
137
|
+
injections?: BusInjection[];
|
|
138
|
+
flows?: BranchFlow[];
|
|
139
|
+
dispatch?: GenDispatch[];
|
|
140
|
+
sensitivities?: SensitivityMatrix[];
|
|
141
|
+
}
|
|
142
|
+
export interface ProblemCaps {
|
|
143
|
+
formulation: FormulationId;
|
|
144
|
+
available: boolean;
|
|
145
|
+
blocks: string[];
|
|
146
|
+
operands?: Operand[];
|
|
147
|
+
parameters?: Parameter[];
|
|
148
|
+
}
|
|
149
|
+
export interface NetworkBus {
|
|
150
|
+
id: number;
|
|
151
|
+
/** powerio row uid; always present on an ingested case, absent on older payloads. */
|
|
152
|
+
uid?: string;
|
|
153
|
+
lon: number;
|
|
154
|
+
lat: number;
|
|
155
|
+
demand_mw: number;
|
|
156
|
+
gen_mw: number;
|
|
157
|
+
}
|
|
158
|
+
export interface NetworkBranch {
|
|
159
|
+
id: number;
|
|
160
|
+
/** powerio row uid; always present on an ingested case, absent on older payloads. */
|
|
161
|
+
uid?: string;
|
|
162
|
+
from: number;
|
|
163
|
+
to: number;
|
|
164
|
+
rate_mw: number;
|
|
165
|
+
status: number;
|
|
166
|
+
path: [number, number][];
|
|
167
|
+
}
|
|
168
|
+
export interface Network {
|
|
169
|
+
id: string;
|
|
170
|
+
name: string;
|
|
171
|
+
base_mva: number;
|
|
172
|
+
synthetic_coords: boolean;
|
|
173
|
+
buses: NetworkBus[];
|
|
174
|
+
branches: NetworkBranch[];
|
|
175
|
+
}
|
|
176
|
+
export interface Solution {
|
|
177
|
+
objective: number;
|
|
178
|
+
lmp: {
|
|
179
|
+
bus: number;
|
|
180
|
+
usd_per_mwh: number;
|
|
181
|
+
}[];
|
|
182
|
+
va: {
|
|
183
|
+
bus: number;
|
|
184
|
+
value: number;
|
|
185
|
+
}[];
|
|
186
|
+
w: {
|
|
187
|
+
bus: number;
|
|
188
|
+
value: number;
|
|
189
|
+
}[];
|
|
190
|
+
flows: {
|
|
191
|
+
branch: number;
|
|
192
|
+
mw: number;
|
|
193
|
+
loading: number;
|
|
194
|
+
}[];
|
|
195
|
+
dispatch: {
|
|
196
|
+
gen: number;
|
|
197
|
+
mw: number;
|
|
198
|
+
}[];
|
|
199
|
+
}
|
|
200
|
+
export interface SensitivityColumn {
|
|
201
|
+
case: string;
|
|
202
|
+
operand: string;
|
|
203
|
+
parameter: string;
|
|
204
|
+
/** The selected source bus, for a bus-axis parameter column (∂LMP/∂d). */
|
|
205
|
+
bus?: number;
|
|
206
|
+
/** The selected source branch, for a branch-axis parameter column (∂LMP/∂fmax). */
|
|
207
|
+
branch?: number;
|
|
208
|
+
units: string;
|
|
209
|
+
values: {
|
|
210
|
+
bus: number;
|
|
211
|
+
value: number;
|
|
212
|
+
}[];
|
|
213
|
+
}
|
|
214
|
+
export interface CaseSummary {
|
|
215
|
+
id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
n_bus: number;
|
|
218
|
+
n_branch: number;
|
|
219
|
+
n_gen: number;
|
|
220
|
+
}
|
|
221
|
+
/** Keys are element keys: the original numeric id, or the powerio row uid
|
|
222
|
+
* string (e.g. "buses:1") when the case carries uids. */
|
|
223
|
+
export type DemandDeltas = Record<number | string, number>;
|
|
224
|
+
export type BranchRatingDeltas = Record<number | string, number>;
|
|
225
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/generated/contracts.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AACjD,eAAO,MAAM,sBAAsB,EAAG,kEAA2E,CAAC;AAElH,eAAO,MAAM,eAAe,sDAAmD,CAAC;AAChF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,cAAc,kCAAkC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO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BAAkB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Generated by packages/engine/scripts/generate-contracts.mjs.
|
|
2
|
+
// Rust source: crates/tellegen/src/api.rs
|
|
3
|
+
// Rust source sha256: d17b92b8b23874c858ccb26b1740f253c95d7cfd78d9511c847b57c2f6eae05e
|
|
4
|
+
export const CONTRACT_VERSION = "0.1.0";
|
|
5
|
+
export const CONTRACT_SOURCE_SHA256 = "d17b92b8b23874c858ccb26b1740f253c95d7cfd78d9511c847b57c2f6eae05e";
|
|
6
|
+
export const FORMULATION_IDS = ["dcpf", "dcopf", "acpf", "socwr", "acopf"];
|
|
7
|
+
export const SOLVE_STATUSES = ["optimal", "feasible"];
|
|
8
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/generated/contracts.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,0CAA0C;AAC1C,uFAAuF;AAEvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAgB,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,kEAA2E,CAAC;AAElH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAC,OAAO,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAC,UAAU,CAAU,CAAC"}
|
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Where engine requests execute. The worker host is the default in browsers:
|
|
2
|
+
* the wasm instance lives in a dedicated module worker, so a multi-second
|
|
3
|
+
* solve never blocks the page. The direct host runs the same requests on the
|
|
4
|
+
* calling thread; it serves environments without workers (SSR, Node) and is
|
|
5
|
+
* the replay target when the worker errors before its first response — the
|
|
6
|
+
* failure mode of a browser that cannot run module workers. */
|
|
7
|
+
import { type EngineRequest } from "./protocol.js";
|
|
8
|
+
export interface EngineHost {
|
|
9
|
+
call(req: EngineRequest): Promise<string | null>;
|
|
10
|
+
}
|
|
11
|
+
export declare const directHost: EngineHost;
|
|
12
|
+
export declare function engineHost(): EngineHost;
|
|
13
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;+DAK+D;AAG/D,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAClD;AAID,eAAO,MAAM,UAAU,EAAE,UAIxB,CAAC;AAwEF,wBAAgB,UAAU,IAAI,UAAU,CAGvC"}
|
package/dist/host.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/** Where engine requests execute. The worker host is the default in browsers:
|
|
2
|
+
* the wasm instance lives in a dedicated module worker, so a multi-second
|
|
3
|
+
* solve never blocks the page. The direct host runs the same requests on the
|
|
4
|
+
* calling thread; it serves environments without workers (SSR, Node) and is
|
|
5
|
+
* the replay target when the worker errors before its first response — the
|
|
6
|
+
* failure mode of a browser that cannot run module workers. */
|
|
7
|
+
import { engineModule } from "./module.js";
|
|
8
|
+
import { runRequest, } from "./protocol.js";
|
|
9
|
+
const directStudies = new Map();
|
|
10
|
+
export const directHost = {
|
|
11
|
+
async call(req) {
|
|
12
|
+
return runRequest(await engineModule(), directStudies, req);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
class WorkerHost {
|
|
16
|
+
#worker;
|
|
17
|
+
#seq = 0;
|
|
18
|
+
#pending = new Map();
|
|
19
|
+
#answered = false;
|
|
20
|
+
/** Set once the worker is unusable: with a forward host when it never
|
|
21
|
+
* answered (requests reroute there), without one when it crashed mid
|
|
22
|
+
* session (requests reject; the next engineHost() spawns a fresh worker). */
|
|
23
|
+
#failed = null;
|
|
24
|
+
constructor(worker) {
|
|
25
|
+
this.#worker = worker;
|
|
26
|
+
worker.onmessage = (ev) => {
|
|
27
|
+
this.#answered = true;
|
|
28
|
+
const pending = this.#pending.get(ev.data.id);
|
|
29
|
+
if (!pending)
|
|
30
|
+
return;
|
|
31
|
+
this.#pending.delete(ev.data.id);
|
|
32
|
+
if (ev.data.ok)
|
|
33
|
+
pending.resolve(ev.data.value);
|
|
34
|
+
else
|
|
35
|
+
pending.reject(new Error(ev.data.error));
|
|
36
|
+
};
|
|
37
|
+
worker.onerror = () => this.#fail(new Error("engine worker failed"));
|
|
38
|
+
worker.onmessageerror = () => this.#fail(new Error("engine worker message failed"));
|
|
39
|
+
}
|
|
40
|
+
#fail(error) {
|
|
41
|
+
if (this.#failed)
|
|
42
|
+
return;
|
|
43
|
+
const pending = [...this.#pending.values()];
|
|
44
|
+
this.#pending.clear();
|
|
45
|
+
this.#worker.terminate();
|
|
46
|
+
if (!this.#answered) {
|
|
47
|
+
// The worker never started (module workers unsupported, script blocked):
|
|
48
|
+
// everything moves to the main thread, including the pending requests —
|
|
49
|
+
// their study handles stay valid because the caller allocated them.
|
|
50
|
+
this.#failed = { forward: directHost, error };
|
|
51
|
+
if (activeHost === this)
|
|
52
|
+
activeHost = directHost;
|
|
53
|
+
for (const p of pending)
|
|
54
|
+
directHost.call(p.req).then(p.resolve, p.reject);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// A crash mid session loses the worker's studies; callers see their next
|
|
58
|
+
// call fail, drop the study handle, and rebuild against a fresh worker.
|
|
59
|
+
this.#failed = { forward: null, error };
|
|
60
|
+
if (activeHost === this)
|
|
61
|
+
activeHost = null;
|
|
62
|
+
for (const p of pending)
|
|
63
|
+
p.reject(error);
|
|
64
|
+
}
|
|
65
|
+
call(req) {
|
|
66
|
+
const failed = this.#failed;
|
|
67
|
+
if (failed) {
|
|
68
|
+
return failed.forward
|
|
69
|
+
? failed.forward.call(req)
|
|
70
|
+
: Promise.reject(failed.error);
|
|
71
|
+
}
|
|
72
|
+
return new Promise((resolve, reject) => {
|
|
73
|
+
const id = ++this.#seq;
|
|
74
|
+
this.#pending.set(id, { req, resolve, reject });
|
|
75
|
+
const msg = { ...req, id };
|
|
76
|
+
this.#worker.postMessage(msg);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
let activeHost = null;
|
|
81
|
+
export function engineHost() {
|
|
82
|
+
activeHost ??= createHost();
|
|
83
|
+
return activeHost;
|
|
84
|
+
}
|
|
85
|
+
function createHost() {
|
|
86
|
+
if (typeof Worker === "undefined")
|
|
87
|
+
return directHost;
|
|
88
|
+
try {
|
|
89
|
+
return new WorkerHost(new Worker(new URL("./worker.js", import.meta.url), { type: "module" }));
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return directHost;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;+DAK+D;AAE/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,UAAU,GAIX,MAAM,eAAe,CAAC;AAMvB,MAAM,aAAa,GAAG,IAAI,GAAG,EAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,KAAK,CAAC,IAAI,CAAC,GAAG;QACZ,OAAO,UAAU,CAAC,MAAM,YAAY,EAAE,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC;AAQF,MAAM,UAAU;IACd,OAAO,CAAS;IAChB,IAAI,GAAG,CAAC,CAAC;IACT,QAAQ,GAAG,IAAI,GAAG,EAAuB,CA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