@descryy/runtime-controller 0.3.7 → 0.3.8
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/package.json +5 -5
- package/dist/attach-fencing.d.ts +0 -109
- package/dist/attach-fencing.d.ts.map +0 -1
- package/dist/attach-fencing.js +0 -215
- package/dist/attach-fencing.js.map +0 -1
- package/dist/capability-registry.d.ts +0 -9
- package/dist/capability-registry.d.ts.map +0 -1
- package/dist/capability-registry.js +0 -32
- package/dist/capability-registry.js.map +0 -1
- package/dist/collector-version.d.ts +0 -3
- package/dist/collector-version.d.ts.map +0 -1
- package/dist/collector-version.js +0 -5
- package/dist/collector-version.js.map +0 -1
- package/dist/container-sandbox.d.ts +0 -104
- package/dist/container-sandbox.d.ts.map +0 -1
- package/dist/container-sandbox.js +0 -152
- package/dist/container-sandbox.js.map +0 -1
- package/dist/controller.d.ts +0 -138
- package/dist/controller.d.ts.map +0 -1
- package/dist/controller.js +0 -449
- package/dist/controller.js.map +0 -1
- package/dist/dependency-version-check.d.ts +0 -36
- package/dist/dependency-version-check.d.ts.map +0 -1
- package/dist/dependency-version-check.js +0 -72
- package/dist/dependency-version-check.js.map +0 -1
- package/dist/env.d.ts +0 -10
- package/dist/env.d.ts.map +0 -1
- package/dist/env.js +0 -12
- package/dist/env.js.map +0 -1
- package/dist/environment-metadata.d.ts +0 -15
- package/dist/environment-metadata.d.ts.map +0 -1
- package/dist/environment-metadata.js +0 -63
- package/dist/environment-metadata.js.map +0 -1
- package/dist/environment-version-check.d.ts +0 -40
- package/dist/environment-version-check.d.ts.map +0 -1
- package/dist/environment-version-check.js +0 -176
- package/dist/environment-version-check.js.map +0 -1
- package/dist/execution-safety.d.ts +0 -96
- package/dist/execution-safety.d.ts.map +0 -1
- package/dist/execution-safety.js +0 -140
- package/dist/execution-safety.js.map +0 -1
- package/dist/index.d.ts +0 -31
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +0 -1
- package/dist/orchestration.d.ts +0 -55
- package/dist/orchestration.d.ts.map +0 -1
- package/dist/orchestration.js +0 -219
- package/dist/orchestration.js.map +0 -1
- package/dist/preflight.d.ts +0 -121
- package/dist/preflight.d.ts.map +0 -1
- package/dist/preflight.js +0 -163
- package/dist/preflight.js.map +0 -1
- package/dist/process-collector.d.ts +0 -20
- package/dist/process-collector.d.ts.map +0 -1
- package/dist/process-collector.js +0 -116
- package/dist/process-collector.js.map +0 -1
- package/dist/process-identity.d.ts +0 -46
- package/dist/process-identity.d.ts.map +0 -1
- package/dist/process-identity.js +0 -186
- package/dist/process-identity.js.map +0 -1
- package/dist/process-manager.d.ts +0 -137
- package/dist/process-manager.d.ts.map +0 -1
- package/dist/process-manager.js +0 -365
- package/dist/process-manager.js.map +0 -1
- package/dist/readiness.d.ts +0 -122
- package/dist/readiness.d.ts.map +0 -1
- package/dist/readiness.js +0 -214
- package/dist/readiness.js.map +0 -1
- package/dist/sandbox.d.ts +0 -94
- package/dist/sandbox.d.ts.map +0 -1
- package/dist/sandbox.js +0 -228
- package/dist/sandbox.js.map +0 -1
package/dist/orchestration.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Turns a declarative `services` map (§6, RT-028) into a concrete spawn order for
|
|
3
|
-
* `ExecutionController.run()` (RT-032). Pure and side-effect-free -- validated and
|
|
4
|
-
* ordered before anything is spawned, so a bad reference is refused atomically
|
|
5
|
-
* rather than discovered mid-sequence.
|
|
6
|
-
*
|
|
7
|
-
* Start order and port injection are declared, never inferred (RT-023's "ask, don't
|
|
8
|
-
* guess"): a `${name.port}` reference alone doesn't create an ordering guarantee --
|
|
9
|
-
* `name` must also appear in the referencing service's `dependsOn`, or validation refuses.
|
|
10
|
-
*/
|
|
11
|
-
import type { ServiceConfiguration } from "@descryy/runtime-contracts";
|
|
12
|
-
export type ServicesValidation = {
|
|
13
|
-
readonly valid: true;
|
|
14
|
-
readonly order: readonly string[];
|
|
15
|
-
} | {
|
|
16
|
-
readonly valid: false;
|
|
17
|
-
readonly reason: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Validates a `services` map and returns a topological spawn order. Checks, all
|
|
21
|
-
* before anything is spawned: every `dependsOn` names a real key; the `dependsOn`
|
|
22
|
-
* graph has no cycle; every `${name}.port` placeholder in a service's `env` has
|
|
23
|
-
* `name` in that service's own `dependsOn`.
|
|
24
|
-
*/
|
|
25
|
-
export declare function validateServicesConfiguration(services: Readonly<Record<string, ServiceConfiguration>>): ServicesValidation;
|
|
26
|
-
/**
|
|
27
|
-
* Replaces every `${name}.port` in `env`'s values with the resolved port for `name`.
|
|
28
|
-
* Assumes `validateServicesConfiguration` already confirmed the reference. An
|
|
29
|
-
* unresolvable reference is left untouched, not dropped -- a caller that skipped
|
|
30
|
-
* validation sees an obviously-wrong literal instead of a silent empty substitution.
|
|
31
|
-
*/
|
|
32
|
-
export declare function substitutePortPlaceholders(env: Readonly<Record<string, string>> | undefined, resolvedPorts: ReadonlyMap<string, number>): Record<string, string>;
|
|
33
|
-
export type CommandTokenization = {
|
|
34
|
-
readonly ok: true;
|
|
35
|
-
readonly command: string;
|
|
36
|
-
readonly args: readonly string[];
|
|
37
|
-
} | {
|
|
38
|
-
readonly ok: false;
|
|
39
|
-
readonly reason: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* POSIX-style tokenizer for `ServiceConfiguration.command`: single quotes (literal),
|
|
43
|
-
* double quotes (`\` escapes `"` and `\`), backslash escapes outside quotes. Needed
|
|
44
|
-
* because config carries one string (§6) but `spawnProcess` wants `command`/`args`
|
|
45
|
-
* separately, and plain whitespace-split breaks paths with spaces.
|
|
46
|
-
*
|
|
47
|
-
* Refuses rather than guesses on an unterminated quote, trailing backslash, or
|
|
48
|
-
* unquoted shell operator -- a plausible-but-wrong tokenization would disguise a
|
|
49
|
-
* config error as an application failure.
|
|
50
|
-
*
|
|
51
|
-
* Globs and `~` pass through literally, unrefused -- exactly what happens with no
|
|
52
|
-
* shell, and frequently intended literally.
|
|
53
|
-
*/
|
|
54
|
-
export declare function tokenizeCommand(raw: string): CommandTokenization;
|
|
55
|
-
//# sourceMappingURL=orchestration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["../src/orchestration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAUvE,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,GACvD,kBAAkB,CAyDpB;AAkCD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EACjD,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB;AAED,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAWpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CA6EhE"}
|
package/dist/orchestration.js
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Turns a declarative `services` map (§6, RT-028) into a concrete spawn order for
|
|
3
|
-
* `ExecutionController.run()` (RT-032). Pure and side-effect-free -- validated and
|
|
4
|
-
* ordered before anything is spawned, so a bad reference is refused atomically
|
|
5
|
-
* rather than discovered mid-sequence.
|
|
6
|
-
*
|
|
7
|
-
* Start order and port injection are declared, never inferred (RT-023's "ask, don't
|
|
8
|
-
* guess"): a `${name.port}` reference alone doesn't create an ordering guarantee --
|
|
9
|
-
* `name` must also appear in the referencing service's `dependsOn`, or validation refuses.
|
|
10
|
-
*/
|
|
11
|
-
// Bounded at {1,256}, not `+`: RT-070's regex audit (after RT-069's ReDoS finding in
|
|
12
|
-
// evidence-store/redaction.ts) flagged this exact shape -- unbounded class followed by
|
|
13
|
-
// a literal (`.port}`) that can be absent -- as O(n^2) backtracking on a long
|
|
14
|
-
// unterminated string. Low-risk since `service.env` is developer-authored, not
|
|
15
|
-
// adversarial, but the shape matches a real same-day DoS elsewhere. 256 is far more
|
|
16
|
-
// than any real name needs.
|
|
17
|
-
const PORT_PLACEHOLDER = /\$\{([^}]{1,256})\.port\}/g;
|
|
18
|
-
/**
|
|
19
|
-
* Validates a `services` map and returns a topological spawn order. Checks, all
|
|
20
|
-
* before anything is spawned: every `dependsOn` names a real key; the `dependsOn`
|
|
21
|
-
* graph has no cycle; every `${name}.port` placeholder in a service's `env` has
|
|
22
|
-
* `name` in that service's own `dependsOn`.
|
|
23
|
-
*/
|
|
24
|
-
export function validateServicesConfiguration(services) {
|
|
25
|
-
const names = Object.keys(services);
|
|
26
|
-
for (const name of names) {
|
|
27
|
-
for (const dep of services[name]?.dependsOn ?? []) {
|
|
28
|
-
if (!(dep in services)) {
|
|
29
|
-
return { valid: false, reason: `service "${name}" depends on "${dep}", which is not in services` };
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const orderResult = topologicalOrder(services, names);
|
|
34
|
-
if (!orderResult.valid) {
|
|
35
|
-
return orderResult;
|
|
36
|
-
}
|
|
37
|
-
for (const name of names) {
|
|
38
|
-
const declared = new Set(services[name]?.dependsOn ?? []);
|
|
39
|
-
for (const value of Object.values(services[name]?.env ?? {})) {
|
|
40
|
-
for (const match of value.matchAll(PORT_PLACEHOLDER)) {
|
|
41
|
-
const referenced = match[1];
|
|
42
|
-
if (referenced !== undefined && !declared.has(referenced)) {
|
|
43
|
-
return {
|
|
44
|
-
valid: false,
|
|
45
|
-
reason: `service "${name}" references "\${${referenced}.port}" in env but does not declare "${referenced}" in dependsOn`,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Exactly one of `command`/`attach` per service, checked before spawning.
|
|
52
|
-
// Neither: nothing tells run() how to start it. Both: ambiguous, don't guess.
|
|
53
|
-
for (const name of names) {
|
|
54
|
-
const service = services[name];
|
|
55
|
-
const hasCommand = service?.command !== undefined;
|
|
56
|
-
const hasAttach = service?.attach !== undefined;
|
|
57
|
-
if (hasCommand === hasAttach) {
|
|
58
|
-
return {
|
|
59
|
-
valid: false,
|
|
60
|
-
reason: `service "${name}" must declare exactly one of "command" (spawn) or "attach" (attach to an already-running process), not ${hasCommand ? "both" : "neither"}`,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
// A command that can't be tokenized is a config error -- check before spawning
|
|
65
|
-
// rather than discovering it mid-sequence with earlier services already running.
|
|
66
|
-
for (const name of names) {
|
|
67
|
-
const command = services[name]?.command;
|
|
68
|
-
if (command === undefined)
|
|
69
|
-
continue;
|
|
70
|
-
const tokenized = tokenizeCommand(command);
|
|
71
|
-
if (!tokenized.ok) {
|
|
72
|
-
return { valid: false, reason: `service "${name}": ${tokenized.reason}` };
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return orderResult;
|
|
76
|
-
}
|
|
77
|
-
function topologicalOrder(services, names) {
|
|
78
|
-
const order = [];
|
|
79
|
-
const visited = new Set();
|
|
80
|
-
const visiting = new Set();
|
|
81
|
-
function visit(name) {
|
|
82
|
-
if (visited.has(name))
|
|
83
|
-
return null;
|
|
84
|
-
if (visiting.has(name))
|
|
85
|
-
return `cycle detected in dependsOn involving "${name}"`;
|
|
86
|
-
visiting.add(name);
|
|
87
|
-
for (const dep of services[name]?.dependsOn ?? []) {
|
|
88
|
-
const err = visit(dep);
|
|
89
|
-
if (err !== null)
|
|
90
|
-
return err;
|
|
91
|
-
}
|
|
92
|
-
visiting.delete(name);
|
|
93
|
-
visited.add(name);
|
|
94
|
-
order.push(name);
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
for (const name of names) {
|
|
98
|
-
const err = visit(name);
|
|
99
|
-
if (err !== null) {
|
|
100
|
-
return { valid: false, reason: err };
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return { valid: true, order };
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Replaces every `${name}.port` in `env`'s values with the resolved port for `name`.
|
|
107
|
-
* Assumes `validateServicesConfiguration` already confirmed the reference. An
|
|
108
|
-
* unresolvable reference is left untouched, not dropped -- a caller that skipped
|
|
109
|
-
* validation sees an obviously-wrong literal instead of a silent empty substitution.
|
|
110
|
-
*/
|
|
111
|
-
export function substitutePortPlaceholders(env, resolvedPorts) {
|
|
112
|
-
const result = {};
|
|
113
|
-
for (const [key, value] of Object.entries(env ?? {})) {
|
|
114
|
-
result[key] = value.replace(PORT_PLACEHOLDER, (literal, name) => {
|
|
115
|
-
const port = resolvedPorts.get(name);
|
|
116
|
-
return port === undefined ? literal : String(port);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
return result;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Shell operators that only mean anything to a shell. `spawnProcess` uses
|
|
123
|
-
* `child_process.spawn` without one -- no implicit shell, no injection surface. A
|
|
124
|
-
* command containing these was never going to behave as written; refusing beats the
|
|
125
|
-
* old whitespace-split behavior of silently passing `> out.log` as literal args to
|
|
126
|
-
* `node`. `sh -c "..."` still works for anyone who wants a real shell.
|
|
127
|
-
*/
|
|
128
|
-
const SHELL_OPERATORS = new Set(["|", "&", ";", "<", ">", "`", "$"]);
|
|
129
|
-
/**
|
|
130
|
-
* POSIX-style tokenizer for `ServiceConfiguration.command`: single quotes (literal),
|
|
131
|
-
* double quotes (`\` escapes `"` and `\`), backslash escapes outside quotes. Needed
|
|
132
|
-
* because config carries one string (§6) but `spawnProcess` wants `command`/`args`
|
|
133
|
-
* separately, and plain whitespace-split breaks paths with spaces.
|
|
134
|
-
*
|
|
135
|
-
* Refuses rather than guesses on an unterminated quote, trailing backslash, or
|
|
136
|
-
* unquoted shell operator -- a plausible-but-wrong tokenization would disguise a
|
|
137
|
-
* config error as an application failure.
|
|
138
|
-
*
|
|
139
|
-
* Globs and `~` pass through literally, unrefused -- exactly what happens with no
|
|
140
|
-
* shell, and frequently intended literally.
|
|
141
|
-
*/
|
|
142
|
-
export function tokenizeCommand(raw) {
|
|
143
|
-
const tokens = [];
|
|
144
|
-
let current = "";
|
|
145
|
-
let started = false; // distinguishes an empty quoted token ('') from no token
|
|
146
|
-
let quote = null;
|
|
147
|
-
for (let i = 0; i < raw.length; i++) {
|
|
148
|
-
const char = raw[i];
|
|
149
|
-
if (quote === "'") {
|
|
150
|
-
if (char === "'")
|
|
151
|
-
quote = null;
|
|
152
|
-
else
|
|
153
|
-
current += char;
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
if (quote === '"') {
|
|
157
|
-
if (char === "\\") {
|
|
158
|
-
const next = raw[i + 1];
|
|
159
|
-
if (next === undefined)
|
|
160
|
-
return { ok: false, reason: 'command ends with a trailing backslash inside a double-quoted string, which escapes nothing' };
|
|
161
|
-
// Only `"` and `\` are escapable in double quotes; else keep the backslash.
|
|
162
|
-
if (next === '"' || next === "\\") {
|
|
163
|
-
current += next;
|
|
164
|
-
i++;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
current += char;
|
|
168
|
-
}
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
if (char === '"')
|
|
172
|
-
quote = null;
|
|
173
|
-
else
|
|
174
|
-
current += char;
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
if (char === "'" || char === '"') {
|
|
178
|
-
quote = char;
|
|
179
|
-
started = true;
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
if (char === "\\") {
|
|
183
|
-
const next = raw[i + 1];
|
|
184
|
-
if (next === undefined)
|
|
185
|
-
return { ok: false, reason: "command ends with a trailing backslash, which escapes nothing" };
|
|
186
|
-
current += next;
|
|
187
|
-
started = true;
|
|
188
|
-
i++;
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
if (SHELL_OPERATORS.has(char)) {
|
|
192
|
-
return {
|
|
193
|
-
ok: false,
|
|
194
|
-
reason: `command contains the shell operator "${char}" outside quotes, but processes are spawned without a shell — ` +
|
|
195
|
-
`it would be passed to the program as a literal argument rather than interpreted. ` +
|
|
196
|
-
`Use an explicit shell (sh -c "...") if that is what you meant.`,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
if (/\s/.test(char)) {
|
|
200
|
-
if (started) {
|
|
201
|
-
tokens.push(current);
|
|
202
|
-
current = "";
|
|
203
|
-
started = false;
|
|
204
|
-
}
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
current += char;
|
|
208
|
-
started = true;
|
|
209
|
-
}
|
|
210
|
-
if (quote !== null)
|
|
211
|
-
return { ok: false, reason: `command has an unterminated ${quote === '"' ? "double" : "single"} quote` };
|
|
212
|
-
if (started)
|
|
213
|
-
tokens.push(current);
|
|
214
|
-
const [head, ...rest] = tokens;
|
|
215
|
-
if (head === undefined || head === "")
|
|
216
|
-
return { ok: false, reason: "command is empty" };
|
|
217
|
-
return { ok: true, command: head, args: rest };
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=orchestration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.js","sourceRoot":"","sources":["../src/orchestration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,qFAAqF;AACrF,uFAAuF;AACvF,8EAA8E;AAC9E,+EAA+E;AAC/E,oFAAoF;AACpF,4BAA4B;AAC5B,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AAMtD;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,QAAwD;IAExD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,IAAI,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC,EAAE,CAAC;gBACvB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,IAAI,iBAAiB,GAAG,6BAA6B,EAAE,CAAC;YACrG,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,WAAW,GAAG,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACtD,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACvB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;QAC1D,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG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AM,EACJ,wCAAwC,IAAI,gEAAgE;oBAC5G,mFAAmF;oBACnF,gEAAgE;aACnE,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACpB,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACrB,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,GAAG,KAAK,CAAC;YAClB,CAAC;YACD,SAAS;QACX,CAAC;QAED,OAAO,IAAI,IAAI,CAAC;QAChB,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAED,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,+BAA+B,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,QAAQ,EAAE,CAAC;IAC7H,IAAI,OAAO;QAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAElC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC;IAC/B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACxF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
package/dist/preflight.d.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ready check before a run (RT-263). A broken setup used to be discovered only after a
|
|
3
|
-
* full readiness wait (up to `RunOptions.readiness[*].timeoutMs`, often ~30s-2min) had
|
|
4
|
-
* already failed. This runs a short, read-only pass first — the same declared checks a
|
|
5
|
-
* run is about to depend on, single-shot rather than polled to a full timeout — and
|
|
6
|
-
* reports a plain-words problem and fix before the caller starts anything.
|
|
7
|
-
*
|
|
8
|
-
* Deliberately generic: this module owns the engine (status, timing, disclosure), never
|
|
9
|
-
* a specific check's mechanism it would have to import a language, a browser, a graph
|
|
10
|
-
* store or a database driver to perform. `customCheck` is the seam every one of those
|
|
11
|
-
* uses — `chromiumCanLaunch`, `graphExists`, and any future "database reachable" check
|
|
12
|
-
* are built by the caller that already depends on the thing being checked, and handed in
|
|
13
|
-
* as a probe. Nothing here decides what a broken setup is, only how many of the caller's
|
|
14
|
-
* own answers it takes to call one "ready", "partial" or "broken".
|
|
15
|
-
*
|
|
16
|
-
* **Read-only, always.** Every probe built here (`portFreeCheck`, `portAnswersCheck`,
|
|
17
|
-
* `readinessTargetCheck`) only ever connects or asks; none binds a port, starts a
|
|
18
|
-
* process or writes anything. A `customCheck` probe is the caller's own code and this
|
|
19
|
-
* module cannot enforce that discipline on it, but every caller in this codebase that
|
|
20
|
-
* builds one must hold to it too (Build A step 4).
|
|
21
|
-
*/
|
|
22
|
-
import { type ReadinessCheck } from "./readiness.ts";
|
|
23
|
-
export declare const PREFLIGHT_CHECK_KINDS: readonly ["port", "readiness", "chromium", "graph", "database", "custom"];
|
|
24
|
-
export type PreflightCheckKind = (typeof PREFLIGHT_CHECK_KINDS)[number];
|
|
25
|
-
export declare const PREFLIGHT_STATUSES: readonly ["ready", "partial", "broken"];
|
|
26
|
-
export type PreflightStatus = (typeof PREFLIGHT_STATUSES)[number];
|
|
27
|
-
/**
|
|
28
|
-
* Bounds one check's own probe — not the whole preflight. Every check in a call runs
|
|
29
|
-
* concurrently (`Promise.all`), so a caller with several checks still finishes near this
|
|
30
|
-
* bound rather than their sum. Starting value, not a measurement: it is what lets a
|
|
31
|
-
* `broken` setup report within the lane's 5s target while still giving a slow-but-honest
|
|
32
|
-
* TCP probe (a loaded machine, a container cold-starting) more than an instant to answer.
|
|
33
|
-
*/
|
|
34
|
-
export declare const PREFLIGHT_CHECK_TIMEOUT_MS = 4000;
|
|
35
|
-
export interface PreflightProbeOutcome {
|
|
36
|
-
readonly ok: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Plain words, always — this is what the user sees. When `!ok`, names the exact
|
|
39
|
-
* problem AND the fix ("Nothing is listening on localhost:3000. Is your app
|
|
40
|
-
* running?"), never a bare boolean or a stack trace. Ignored (by convention "ok")
|
|
41
|
-
* when `ok` is true.
|
|
42
|
-
*/
|
|
43
|
-
readonly message: string;
|
|
44
|
-
}
|
|
45
|
-
export interface PreflightCheckSpec {
|
|
46
|
-
readonly kind: PreflightCheckKind;
|
|
47
|
-
/** Named for the report — "port 3000 is free", "chromium can launch". */
|
|
48
|
-
readonly label: string;
|
|
49
|
-
/**
|
|
50
|
-
* A failing required check makes the whole preflight `broken` — this run cannot
|
|
51
|
-
* proceed without it. A failing non-required check makes it `partial` instead: the
|
|
52
|
-
* run continues, and the failure becomes a disclosed gap (what won't be observed),
|
|
53
|
-
* never silently dropped (rule 7).
|
|
54
|
-
*/
|
|
55
|
-
readonly required: boolean;
|
|
56
|
-
readonly probe: () => Promise<PreflightProbeOutcome>;
|
|
57
|
-
}
|
|
58
|
-
export interface PreflightCheckResult {
|
|
59
|
-
readonly kind: PreflightCheckKind;
|
|
60
|
-
readonly label: string;
|
|
61
|
-
readonly required: boolean;
|
|
62
|
-
readonly ok: boolean;
|
|
63
|
-
readonly message: string;
|
|
64
|
-
}
|
|
65
|
-
export interface PreflightResult {
|
|
66
|
-
readonly status: PreflightStatus;
|
|
67
|
-
readonly elapsedMs: number;
|
|
68
|
-
readonly checks: readonly PreflightCheckResult[];
|
|
69
|
-
/**
|
|
70
|
-
* Plain-word problems from every failed non-required check — what this run will
|
|
71
|
-
* proceed without observing. Empty exactly when `status === "ready"`. A `broken`
|
|
72
|
-
* result's problems are read off `checks` instead (every failed required check),
|
|
73
|
-
* because those stop the run rather than being disclosed alongside it.
|
|
74
|
-
*/
|
|
75
|
-
readonly disclosures: readonly string[];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Runs every check concurrently and folds the results into one status. Never throws —
|
|
79
|
-
* a probe that rejects or hangs past its own bound is recorded as a failed check
|
|
80
|
-
* (`runOne` below), not a crash of the preflight itself, because "the check broke" and
|
|
81
|
-
* "the setup is broken" are different facts the caller still needs told apart... except
|
|
82
|
-
* they aren't told apart here: a check that cannot even answer is exactly as blocking as
|
|
83
|
-
* one that answered "no", which is why it is folded in as `!ok` rather than a third
|
|
84
|
-
* outcome. What is preserved is the message, which always names which check and why.
|
|
85
|
-
*/
|
|
86
|
-
export declare function runPreflight(checks: readonly PreflightCheckSpec[]): Promise<PreflightResult>;
|
|
87
|
-
/**
|
|
88
|
-
* Boot precondition: nothing may already be listening at `host:port` before this run
|
|
89
|
-
* spawns its own process there — a stale listener from a dead session would otherwise
|
|
90
|
-
* be mistaken for this run's own (the same RT-024 hazard `readiness.ts` names). `ready`
|
|
91
|
-
* is `!answered` — the inverse polarity of `portAnswersCheck` below, for the attach case.
|
|
92
|
-
*/
|
|
93
|
-
export declare function portFreeCheck(host: string, port: number, label?: string): PreflightCheckSpec;
|
|
94
|
-
/**
|
|
95
|
-
* Attach precondition: the caller is attaching to an app it expects to already be
|
|
96
|
-
* running, so something must already answer at `host:port`. `ready` is `answered` —
|
|
97
|
-
* the inverse polarity of `portFreeCheck` above, for the boot case.
|
|
98
|
-
*/
|
|
99
|
-
export declare function portAnswersCheck(host: string, port: number, label?: string): PreflightCheckSpec;
|
|
100
|
-
/**
|
|
101
|
-
* Wraps a run's own declared `ReadinessCheck`s as a single-shot preflight probe — one
|
|
102
|
-
* pass at `PREFLIGHT_CHECK_TIMEOUT_MS`, never the full poll loop `awaitReadiness` runs
|
|
103
|
-
* once the run actually starts. Reuses `awaitReadiness` itself rather than a second
|
|
104
|
-
* probing mechanism that could drift from what the real readiness wait checks.
|
|
105
|
-
*
|
|
106
|
-
* Required by default: a target this run declared and cannot reach is this run being
|
|
107
|
-
* broken, not a gap it can disclose and continue past. A caller may mark a secondary
|
|
108
|
-
* target `required: false` when the run can genuinely proceed without it.
|
|
109
|
-
*/
|
|
110
|
-
export declare function readinessTargetCheck(label: string, checks: readonly ReadinessCheck[], options?: {
|
|
111
|
-
readonly required?: boolean;
|
|
112
|
-
}): PreflightCheckSpec;
|
|
113
|
-
/**
|
|
114
|
-
* The seam for anything this package must not name (rule 1's dependency-direction
|
|
115
|
-
* cousin: `@descryy/runtime-controller` has no browser, graph or database dependency,
|
|
116
|
-
* and must not gain one just to phrase a preflight check). A caller that already
|
|
117
|
-
* depends on the thing being checked — `@descryy/runtime-browser` for Chromium,
|
|
118
|
-
* `@descryy/mcp` for the graph — builds the probe and hands it in with this.
|
|
119
|
-
*/
|
|
120
|
-
export declare function customCheck(kind: PreflightCheckKind, label: string, required: boolean, probe: () => Promise<PreflightProbeOutcome>): PreflightCheckSpec;
|
|
121
|
-
//# sourceMappingURL=preflight.d.ts.map
|
package/dist/preflight.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErE,eAAO,MAAM,qBAAqB,2EAA4E,CAAC;AAC/G,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,kBAAkB,yCAA0C,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,OAAQ,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC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AAO,GAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,kBAAkB,CAUpB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,GAC1C,kBAAkB,CAEpB"}
|
package/dist/preflight.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ready check before a run (RT-263). A broken setup used to be discovered only after a
|
|
3
|
-
* full readiness wait (up to `RunOptions.readiness[*].timeoutMs`, often ~30s-2min) had
|
|
4
|
-
* already failed. This runs a short, read-only pass first — the same declared checks a
|
|
5
|
-
* run is about to depend on, single-shot rather than polled to a full timeout — and
|
|
6
|
-
* reports a plain-words problem and fix before the caller starts anything.
|
|
7
|
-
*
|
|
8
|
-
* Deliberately generic: this module owns the engine (status, timing, disclosure), never
|
|
9
|
-
* a specific check's mechanism it would have to import a language, a browser, a graph
|
|
10
|
-
* store or a database driver to perform. `customCheck` is the seam every one of those
|
|
11
|
-
* uses — `chromiumCanLaunch`, `graphExists`, and any future "database reachable" check
|
|
12
|
-
* are built by the caller that already depends on the thing being checked, and handed in
|
|
13
|
-
* as a probe. Nothing here decides what a broken setup is, only how many of the caller's
|
|
14
|
-
* own answers it takes to call one "ready", "partial" or "broken".
|
|
15
|
-
*
|
|
16
|
-
* **Read-only, always.** Every probe built here (`portFreeCheck`, `portAnswersCheck`,
|
|
17
|
-
* `readinessTargetCheck`) only ever connects or asks; none binds a port, starts a
|
|
18
|
-
* process or writes anything. A `customCheck` probe is the caller's own code and this
|
|
19
|
-
* module cannot enforce that discipline on it, but every caller in this codebase that
|
|
20
|
-
* builds one must hold to it too (Build A step 4).
|
|
21
|
-
*/
|
|
22
|
-
import { createConnection } from "node:net";
|
|
23
|
-
import { awaitReadiness } from "./readiness.js";
|
|
24
|
-
export const PREFLIGHT_CHECK_KINDS = ["port", "readiness", "chromium", "graph", "database", "custom"];
|
|
25
|
-
export const PREFLIGHT_STATUSES = ["ready", "partial", "broken"];
|
|
26
|
-
/**
|
|
27
|
-
* Bounds one check's own probe — not the whole preflight. Every check in a call runs
|
|
28
|
-
* concurrently (`Promise.all`), so a caller with several checks still finishes near this
|
|
29
|
-
* bound rather than their sum. Starting value, not a measurement: it is what lets a
|
|
30
|
-
* `broken` setup report within the lane's 5s target while still giving a slow-but-honest
|
|
31
|
-
* TCP probe (a loaded machine, a container cold-starting) more than an instant to answer.
|
|
32
|
-
*/
|
|
33
|
-
export const PREFLIGHT_CHECK_TIMEOUT_MS = 4_000;
|
|
34
|
-
/**
|
|
35
|
-
* Runs every check concurrently and folds the results into one status. Never throws —
|
|
36
|
-
* a probe that rejects or hangs past its own bound is recorded as a failed check
|
|
37
|
-
* (`runOne` below), not a crash of the preflight itself, because "the check broke" and
|
|
38
|
-
* "the setup is broken" are different facts the caller still needs told apart... except
|
|
39
|
-
* they aren't told apart here: a check that cannot even answer is exactly as blocking as
|
|
40
|
-
* one that answered "no", which is why it is folded in as `!ok` rather than a third
|
|
41
|
-
* outcome. What is preserved is the message, which always names which check and why.
|
|
42
|
-
*/
|
|
43
|
-
export async function runPreflight(checks) {
|
|
44
|
-
const startedAt = Date.now();
|
|
45
|
-
const results = await Promise.all(checks.map((check) => runOne(check)));
|
|
46
|
-
const elapsedMs = Date.now() - startedAt;
|
|
47
|
-
const brokenChecks = results.filter((result) => result.required && !result.ok);
|
|
48
|
-
const gaps = results.filter((result) => !result.required && !result.ok);
|
|
49
|
-
const status = brokenChecks.length > 0 ? "broken" : gaps.length > 0 ? "partial" : "ready";
|
|
50
|
-
return { status, elapsedMs, checks: results, disclosures: gaps.map((gap) => gap.message) };
|
|
51
|
-
}
|
|
52
|
-
async function runOne(check) {
|
|
53
|
-
try {
|
|
54
|
-
const outcome = await withTimeout(check.probe(), PREFLIGHT_CHECK_TIMEOUT_MS, check.label);
|
|
55
|
-
return { kind: check.kind, label: check.label, required: check.required, ok: outcome.ok, message: outcome.message };
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
return {
|
|
59
|
-
kind: check.kind,
|
|
60
|
-
label: check.label,
|
|
61
|
-
required: check.required,
|
|
62
|
-
ok: false,
|
|
63
|
-
message: `${check.label}: the check itself did not complete — ${error instanceof Error ? error.message : String(error)}`,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function withTimeout(promise, ms, label) {
|
|
68
|
-
return new Promise((resolve, reject) => {
|
|
69
|
-
const timer = setTimeout(() => reject(new Error(`no answer within ${String(ms)}ms while checking ${label}`)), ms);
|
|
70
|
-
promise.then((value) => {
|
|
71
|
-
clearTimeout(timer);
|
|
72
|
-
resolve(value);
|
|
73
|
-
}, (error) => {
|
|
74
|
-
clearTimeout(timer);
|
|
75
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function tcpAnswers(host, port) {
|
|
80
|
-
return new Promise((resolve) => {
|
|
81
|
-
const socket = createConnection({ host, port });
|
|
82
|
-
socket.setTimeout(PREFLIGHT_CHECK_TIMEOUT_MS);
|
|
83
|
-
const finish = (ok) => {
|
|
84
|
-
socket.destroy();
|
|
85
|
-
resolve(ok);
|
|
86
|
-
};
|
|
87
|
-
socket.once("connect", () => finish(true));
|
|
88
|
-
socket.once("error", () => finish(false));
|
|
89
|
-
socket.once("timeout", () => finish(false));
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Boot precondition: nothing may already be listening at `host:port` before this run
|
|
94
|
-
* spawns its own process there — a stale listener from a dead session would otherwise
|
|
95
|
-
* be mistaken for this run's own (the same RT-024 hazard `readiness.ts` names). `ready`
|
|
96
|
-
* is `!answered` — the inverse polarity of `portAnswersCheck` below, for the attach case.
|
|
97
|
-
*/
|
|
98
|
-
export function portFreeCheck(host, port, label) {
|
|
99
|
-
const checkLabel = label ?? `port ${String(port)} on ${host} is free`;
|
|
100
|
-
return {
|
|
101
|
-
kind: "port",
|
|
102
|
-
label: checkLabel,
|
|
103
|
-
required: true,
|
|
104
|
-
probe: async () => {
|
|
105
|
-
const answered = await tcpAnswers(host, port);
|
|
106
|
-
return answered
|
|
107
|
-
? {
|
|
108
|
-
ok: false,
|
|
109
|
-
message: `Something is already listening on ${host}:${String(port)}. Stop it, or configure a different port, before starting this run.`,
|
|
110
|
-
}
|
|
111
|
-
: { ok: true, message: "ok" };
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Attach precondition: the caller is attaching to an app it expects to already be
|
|
117
|
-
* running, so something must already answer at `host:port`. `ready` is `answered` —
|
|
118
|
-
* the inverse polarity of `portFreeCheck` above, for the boot case.
|
|
119
|
-
*/
|
|
120
|
-
export function portAnswersCheck(host, port, label) {
|
|
121
|
-
const checkLabel = label ?? `${host}:${String(port)} answers`;
|
|
122
|
-
return {
|
|
123
|
-
kind: "port",
|
|
124
|
-
label: checkLabel,
|
|
125
|
-
required: true,
|
|
126
|
-
probe: async () => {
|
|
127
|
-
const answered = await tcpAnswers(host, port);
|
|
128
|
-
return answered ? { ok: true, message: "ok" } : { ok: false, message: `Nothing is listening on ${host}:${String(port)}. Is your app running?` };
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Wraps a run's own declared `ReadinessCheck`s as a single-shot preflight probe — one
|
|
134
|
-
* pass at `PREFLIGHT_CHECK_TIMEOUT_MS`, never the full poll loop `awaitReadiness` runs
|
|
135
|
-
* once the run actually starts. Reuses `awaitReadiness` itself rather than a second
|
|
136
|
-
* probing mechanism that could drift from what the real readiness wait checks.
|
|
137
|
-
*
|
|
138
|
-
* Required by default: a target this run declared and cannot reach is this run being
|
|
139
|
-
* broken, not a gap it can disclose and continue past. A caller may mark a secondary
|
|
140
|
-
* target `required: false` when the run can genuinely proceed without it.
|
|
141
|
-
*/
|
|
142
|
-
export function readinessTargetCheck(label, checks, options = {}) {
|
|
143
|
-
return {
|
|
144
|
-
kind: "readiness",
|
|
145
|
-
label,
|
|
146
|
-
required: options.required ?? true,
|
|
147
|
-
probe: async () => {
|
|
148
|
-
const result = await awaitReadiness(checks, { timeoutMs: PREFLIGHT_CHECK_TIMEOUT_MS, pollIntervalMs: 200 });
|
|
149
|
-
return result.ready ? { ok: true, message: "ok" } : { ok: false, message: result.reason ?? `${label} did not answer` };
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* The seam for anything this package must not name (rule 1's dependency-direction
|
|
155
|
-
* cousin: `@descryy/runtime-controller` has no browser, graph or database dependency,
|
|
156
|
-
* and must not gain one just to phrase a preflight check). A caller that already
|
|
157
|
-
* depends on the thing being checked — `@descryy/runtime-browser` for Chromium,
|
|
158
|
-
* `@descryy/mcp` for the graph — builds the probe and hands it in with this.
|
|
159
|
-
*/
|
|
160
|
-
export function customCheck(kind, label, required, probe) {
|
|
161
|
-
return { kind, label, required, probe };
|
|
162
|
-
}
|
|
163
|
-
//# sourceMappingURL=preflight.js.map
|
package/dist/preflight.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAuB,MAAM,gBAAgB,CAAC;AAErE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAG/G,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,SAAS,EAA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AAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,iBAAiB,EAAE,CAAC;QACzH,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,IAAwB,EACxB,KAAa,EACb,QAAiB,EACjB,KAA2C;IAE3C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `ProcessCollector`: turns `ProcessLifecycleEvent` (`controller.ts`) into
|
|
3
|
-
* `PROCESS_STARTED` / `PROCESS_READY` / `PROCESS_EXITED` Evidence. A plain translator
|
|
4
|
-
* with no lifecycle logic of its own — `ExecutionController` decides when each
|
|
5
|
-
* transition happens and calls `RunOptions.onProcessLifecycleEvent`; this collector
|
|
6
|
-
* just turns that call into one `context.emit()`.
|
|
7
|
-
*
|
|
8
|
-
* **Wiring order is load-bearing.** `start(context)` must run before
|
|
9
|
-
* `onProcessLifecycleEvent` can fire. `handleLifecycleEvent` throws rather than
|
|
10
|
-
* silently dropping an event on violation — a lost PROCESS_STARTED would otherwise
|
|
11
|
-
* read downstream as "never observed," a worse, quieter failure than a thrown error.
|
|
12
|
-
*/
|
|
13
|
-
import type { Collector } from "@descryy/runtime-contracts";
|
|
14
|
-
import type { ProcessLifecycleEvent } from "./controller.ts";
|
|
15
|
-
export interface ProcessCollector extends Collector {
|
|
16
|
-
/** Wire as `RunOptions.onProcessLifecycleEvent` — see the module doc for the ordering this depends on. */
|
|
17
|
-
handleLifecycleEvent(event: ProcessLifecycleEvent): void;
|
|
18
|
-
}
|
|
19
|
-
export declare function createProcessCollector(): ProcessCollector;
|
|
20
|
-
//# sourceMappingURL=process-collector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process-collector.d.ts","sourceRoot":"","sources":["../src/process-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAmF,MAAM,4BAA4B,CAAC;AAC7I,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAG7D,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,0GAA0G;IAC1G,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC1D;AA6DD,wBAAgB,sBAAsB,IAAI,gBAAgB,CAoDzD"}
|