@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.
Files changed (73) hide show
  1. package/package.json +5 -5
  2. package/dist/attach-fencing.d.ts +0 -109
  3. package/dist/attach-fencing.d.ts.map +0 -1
  4. package/dist/attach-fencing.js +0 -215
  5. package/dist/attach-fencing.js.map +0 -1
  6. package/dist/capability-registry.d.ts +0 -9
  7. package/dist/capability-registry.d.ts.map +0 -1
  8. package/dist/capability-registry.js +0 -32
  9. package/dist/capability-registry.js.map +0 -1
  10. package/dist/collector-version.d.ts +0 -3
  11. package/dist/collector-version.d.ts.map +0 -1
  12. package/dist/collector-version.js +0 -5
  13. package/dist/collector-version.js.map +0 -1
  14. package/dist/container-sandbox.d.ts +0 -104
  15. package/dist/container-sandbox.d.ts.map +0 -1
  16. package/dist/container-sandbox.js +0 -152
  17. package/dist/container-sandbox.js.map +0 -1
  18. package/dist/controller.d.ts +0 -138
  19. package/dist/controller.d.ts.map +0 -1
  20. package/dist/controller.js +0 -449
  21. package/dist/controller.js.map +0 -1
  22. package/dist/dependency-version-check.d.ts +0 -36
  23. package/dist/dependency-version-check.d.ts.map +0 -1
  24. package/dist/dependency-version-check.js +0 -72
  25. package/dist/dependency-version-check.js.map +0 -1
  26. package/dist/env.d.ts +0 -10
  27. package/dist/env.d.ts.map +0 -1
  28. package/dist/env.js +0 -12
  29. package/dist/env.js.map +0 -1
  30. package/dist/environment-metadata.d.ts +0 -15
  31. package/dist/environment-metadata.d.ts.map +0 -1
  32. package/dist/environment-metadata.js +0 -63
  33. package/dist/environment-metadata.js.map +0 -1
  34. package/dist/environment-version-check.d.ts +0 -40
  35. package/dist/environment-version-check.d.ts.map +0 -1
  36. package/dist/environment-version-check.js +0 -176
  37. package/dist/environment-version-check.js.map +0 -1
  38. package/dist/execution-safety.d.ts +0 -96
  39. package/dist/execution-safety.d.ts.map +0 -1
  40. package/dist/execution-safety.js +0 -140
  41. package/dist/execution-safety.js.map +0 -1
  42. package/dist/index.d.ts +0 -31
  43. package/dist/index.d.ts.map +0 -1
  44. package/dist/index.js +0 -17
  45. package/dist/index.js.map +0 -1
  46. package/dist/orchestration.d.ts +0 -55
  47. package/dist/orchestration.d.ts.map +0 -1
  48. package/dist/orchestration.js +0 -219
  49. package/dist/orchestration.js.map +0 -1
  50. package/dist/preflight.d.ts +0 -121
  51. package/dist/preflight.d.ts.map +0 -1
  52. package/dist/preflight.js +0 -163
  53. package/dist/preflight.js.map +0 -1
  54. package/dist/process-collector.d.ts +0 -20
  55. package/dist/process-collector.d.ts.map +0 -1
  56. package/dist/process-collector.js +0 -116
  57. package/dist/process-collector.js.map +0 -1
  58. package/dist/process-identity.d.ts +0 -46
  59. package/dist/process-identity.d.ts.map +0 -1
  60. package/dist/process-identity.js +0 -186
  61. package/dist/process-identity.js.map +0 -1
  62. package/dist/process-manager.d.ts +0 -137
  63. package/dist/process-manager.d.ts.map +0 -1
  64. package/dist/process-manager.js +0 -365
  65. package/dist/process-manager.js.map +0 -1
  66. package/dist/readiness.d.ts +0 -122
  67. package/dist/readiness.d.ts.map +0 -1
  68. package/dist/readiness.js +0 -214
  69. package/dist/readiness.js.map +0 -1
  70. package/dist/sandbox.d.ts +0 -94
  71. package/dist/sandbox.d.ts.map +0 -1
  72. package/dist/sandbox.js +0 -228
  73. package/dist/sandbox.js.map +0 -1
@@ -1,63 +0,0 @@
1
- /**
2
- * §2/RT-193: `Execution.commit` alone can't reproduce a run — same commit, different
3
- * Node/OS/toolchain can behave differently. Fills the gap from the real host: OS
4
- * platform, this process's own `process.version`, and the version of every distinct
5
- * executable `configuration.services` invokes.
6
- *
7
- * Toolchain probe mirrors `scripts/preflight.mjs`'s `interpreters()` (version flag,
8
- * read stdout+stderr combined since some tools like `java -version` write to stderr
9
- * only, keep first line) but isn't the same function: that one checks a fixed tool
10
- * list against expected versions (a gate); this reports whatever `services[*].command`
11
- * names, no expected version to compare against.
12
- */
13
- import { execFile } from "node:child_process";
14
- import { platform } from "node:os";
15
- import { tokenizeCommand } from "./orchestration.js";
16
- /** Bounds a version probe so a hung command can't stall run() — same discipline as RT-030's readiness probes. */
17
- const VERSION_PROBE_TIMEOUT_MS = 3000;
18
- export async function captureEnvironmentMetadata(services) {
19
- const commands = new Set();
20
- for (const service of Object.values(services)) {
21
- // Attach-mode services have no `command` -- nothing to probe.
22
- if (service.command === undefined)
23
- continue;
24
- const tokenized = tokenizeCommand(service.command);
25
- if (tokenized.ok)
26
- commands.add(tokenized.command);
27
- }
28
- const toolchainVersions = {};
29
- for (const command of commands) {
30
- toolchainVersions[command] = await probeVersion(command);
31
- }
32
- return {
33
- platform: platform(),
34
- nodeVersion: process.version,
35
- toolchainVersions,
36
- };
37
- }
38
- /** Tries `--version`, `-version`, `-v` in order (covers `java -version`, `mvn -v`, etc). Returns the first line of whichever exits 0, or `null` — an unprobeable command is a disclosed gap, never a thrown error. */
39
- function probeVersion(command) {
40
- return tryFlags(command, ["--version", "-version", "-v"]);
41
- }
42
- async function tryFlags(command, flags) {
43
- for (const flag of flags) {
44
- const output = await runVersionFlag(command, flag);
45
- if (output !== null)
46
- return output;
47
- }
48
- return null;
49
- }
50
- function runVersionFlag(command, flag) {
51
- return new Promise((resolve) => {
52
- execFile(command, [flag], { timeout: VERSION_PROBE_TIMEOUT_MS }, (error, stdout, stderr) => {
53
- if (error !== null) {
54
- resolve(null);
55
- return;
56
- }
57
- const combined = `${stdout}${stderr}`.trim();
58
- const firstLine = combined.split("\n")[0];
59
- resolve(firstLine === undefined || firstLine === "" ? null : firstLine);
60
- });
61
- });
62
- }
63
- //# sourceMappingURL=environment-metadata.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment-metadata.js","sourceRoot":"","sources":["../src/environment-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EA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IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,cAAc,CAAC,OAAe,EAAE,IAAY;IACnD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACzF,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,OAAO;YACT,CAAC;YACD,MAAM,QAAQ,GAAG,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;YAC7C,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1C,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * `DEC-NEXT-fault-layer-empirical-confirmation.md`'s `environment` mechanism:
3
- * declared/expected runner version vs observed, at execution. Same shape as
4
- * `dependency-version-check.ts` -- cheap, always available, no rerun needed.
5
- *
6
- * - "Declared" reads `.nvmrc`/`package.json engines.node`, not a CI-workflow parser
7
- * -- nothing here already parses CI YAML, and these are the load-bearing
8
- * declarations `nvm`/`npm` themselves read. A future CI-file reader is a
9
- * disclosed extension point: `declaredSource` is a closed union so a third source
10
- * can be added without changing callers' shape.
11
- * - `satisfiesDeclaredNodeVersion`'s grammar supports `^x.y.z`, `~x.y.z`,
12
- * `>=`/`<=`/`>`/`<`, a bare version at any precision (x-range at that precision,
13
- * matching `actions/setup-node`), and space-separated AND clauses. Does NOT
14
- * support `||`, hyphen ranges, prerelease/build tags, or `x`/`*` wildcards --
15
- * those parse to `null` ("cannot say"), never a guessed true/false.
16
- */
17
- export declare const DECLARED_VERSION_SOURCES: readonly ["nvmrc", "package.json engines.node"];
18
- export type DeclaredVersionSource = (typeof DECLARED_VERSION_SOURCES)[number];
19
- export interface EnvironmentVersionCheckResult {
20
- /** `false` when no declared version was found, or declared/observed didn't parse -- "not applicable," never a guessed clean result. `mismatch` is `false` when this is. */
21
- readonly applicable: boolean;
22
- readonly mismatch: boolean;
23
- readonly declaredVersion: string | null;
24
- readonly declaredSource: DeclaredVersionSource | null;
25
- readonly observedVersion: string;
26
- }
27
- /**
28
- * Reads the declared Node version for the project at `cwd`, compares against
29
- * `observedVersion` (`process.version`/`EnvironmentMetadata.nodeVersion` -- never
30
- * probed here).
31
- *
32
- * `.nvmrc` takes precedence over `engines.node` when both exist -- it names one
33
- * exact version a developer runs locally, vs. a more often permissive compatibility
34
- * range. Narrower/more specific wins, same precedence `classifyFaultLayer`
35
- * (`descry-core`) applies between `dependency` and `environment`.
36
- */
37
- export declare function checkEnvironmentVersion(cwd: string, observedVersion: string): EnvironmentVersionCheckResult;
38
- /** Whether `observedVersion` satisfies `declaredRange` under the grammar above. `null` means the comparison couldn't be made -- distinct from `false`, a real "does not satisfy" answer. */
39
- export declare function satisfiesDeclaredNodeVersion(declaredRange: string, observedVersion: string): boolean | null;
40
- //# sourceMappingURL=environment-version-check.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment-version-check.d.ts","sourceRoot":"","sources":["../src/environment-version-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,eAAO,MAAM,wBAAwB,iDAAkD,CAAC;AACxF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,WAAW,6BAA6B;IAC5C,2KAA2K;IAC3K,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAMD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,6BAA6B,CAgD3G;AAmGD,4LAA4L;AAC5L,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAU3G"}
@@ -1,176 +0,0 @@
1
- /**
2
- * `DEC-NEXT-fault-layer-empirical-confirmation.md`'s `environment` mechanism:
3
- * declared/expected runner version vs observed, at execution. Same shape as
4
- * `dependency-version-check.ts` -- cheap, always available, no rerun needed.
5
- *
6
- * - "Declared" reads `.nvmrc`/`package.json engines.node`, not a CI-workflow parser
7
- * -- nothing here already parses CI YAML, and these are the load-bearing
8
- * declarations `nvm`/`npm` themselves read. A future CI-file reader is a
9
- * disclosed extension point: `declaredSource` is a closed union so a third source
10
- * can be added without changing callers' shape.
11
- * - `satisfiesDeclaredNodeVersion`'s grammar supports `^x.y.z`, `~x.y.z`,
12
- * `>=`/`<=`/`>`/`<`, a bare version at any precision (x-range at that precision,
13
- * matching `actions/setup-node`), and space-separated AND clauses. Does NOT
14
- * support `||`, hyphen ranges, prerelease/build tags, or `x`/`*` wildcards --
15
- * those parse to `null` ("cannot say"), never a guessed true/false.
16
- */
17
- import { existsSync, readFileSync } from "node:fs";
18
- import { join } from "node:path";
19
- export const DECLARED_VERSION_SOURCES = ["nvmrc", "package.json engines.node"];
20
- /**
21
- * Reads the declared Node version for the project at `cwd`, compares against
22
- * `observedVersion` (`process.version`/`EnvironmentMetadata.nodeVersion` -- never
23
- * probed here).
24
- *
25
- * `.nvmrc` takes precedence over `engines.node` when both exist -- it names one
26
- * exact version a developer runs locally, vs. a more often permissive compatibility
27
- * range. Narrower/more specific wins, same precedence `classifyFaultLayer`
28
- * (`descry-core`) applies between `dependency` and `environment`.
29
- */
30
- export function checkEnvironmentVersion(cwd, observedVersion) {
31
- const notApplicable = {
32
- applicable: false,
33
- mismatch: false,
34
- declaredVersion: null,
35
- declaredSource: null,
36
- observedVersion,
37
- };
38
- const nvmrcPath = join(cwd, ".nvmrc");
39
- let declaredVersion = null;
40
- let declaredSource = null;
41
- if (existsSync(nvmrcPath)) {
42
- const raw = readFileSync(nvmrcPath, "utf8").trim();
43
- if (raw.length > 0) {
44
- declaredVersion = raw;
45
- declaredSource = "nvmrc";
46
- }
47
- }
48
- else {
49
- const packageJsonPath = join(cwd, "package.json");
50
- if (existsSync(packageJsonPath)) {
51
- let parsed;
52
- try {
53
- parsed = JSON.parse(readFileSync(packageJsonPath, "utf8"));
54
- }
55
- catch {
56
- parsed = null;
57
- }
58
- const node = parsed?.engines?.node;
59
- if (typeof node === "string" && node.trim().length > 0) {
60
- declaredVersion = node;
61
- declaredSource = "package.json engines.node";
62
- }
63
- }
64
- }
65
- if (declaredVersion === null || declaredSource === null) {
66
- return notApplicable;
67
- }
68
- const satisfies = satisfiesDeclaredNodeVersion(declaredVersion, observedVersion);
69
- if (satisfies === null) {
70
- // Grammar not covered (or observed string unparseable) -- "not applicable",
71
- // not a comparison that was actually made.
72
- return { applicable: false, mismatch: false, declaredVersion, declaredSource, observedVersion };
73
- }
74
- return { applicable: true, mismatch: !satisfies, declaredVersion, declaredSource, observedVersion };
75
- }
76
- const VERSION_PATTERN = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?/;
77
- function parseVersion(raw) {
78
- const match = VERSION_PATTERN.exec(raw.trim());
79
- if (match === null)
80
- return null;
81
- const major = Number(match[1]);
82
- if (!Number.isFinite(major))
83
- return null;
84
- return {
85
- major,
86
- minor: match[2] !== undefined ? Number(match[2]) : 0,
87
- minorSpecified: match[2] !== undefined,
88
- patch: match[3] !== undefined ? Number(match[3]) : 0,
89
- patchSpecified: match[3] !== undefined,
90
- };
91
- }
92
- /** Positive when `a` > `b`, negative when `a` < `b`, zero when equal -- major.minor.patch only. */
93
- function compareVersions(a, b) {
94
- if (a.major !== b.major)
95
- return a.major - b.major;
96
- if (a.minor !== b.minor)
97
- return a.minor - b.minor;
98
- return a.patch - b.patch;
99
- }
100
- const CARET_PATTERN = /^\^(\d+)(?:\.(\d+))?(?:\.(\d+))?$/;
101
- const TILDE_PATTERN = /^~(\d+)(?:\.(\d+))?(?:\.(\d+))?$/;
102
- const COMPARATOR_PATTERN = /^(>=|<=|>|<|=)?(\d+)(?:\.(\d+))?(?:\.(\d+))?$/;
103
- /** `null` means the clause's grammar isn't covered -- propagated up, never coerced to a guessed true/false. */
104
- function satisfiesClause(clause, observed) {
105
- const trimmed = clause.trim();
106
- if (trimmed.length === 0)
107
- return null;
108
- const caret = CARET_PATTERN.exec(trimmed);
109
- if (caret !== null) {
110
- const base = {
111
- major: Number(caret[1]),
112
- minor: caret[2] !== undefined ? Number(caret[2]) : 0,
113
- minorSpecified: true,
114
- patch: caret[3] !== undefined ? Number(caret[3]) : 0,
115
- patchSpecified: true,
116
- };
117
- return compareVersions(observed, base) >= 0 && observed.major === base.major;
118
- }
119
- const tilde = TILDE_PATTERN.exec(trimmed);
120
- if (tilde !== null) {
121
- const base = {
122
- major: Number(tilde[1]),
123
- minor: tilde[2] !== undefined ? Number(tilde[2]) : 0,
124
- minorSpecified: true,
125
- patch: tilde[3] !== undefined ? Number(tilde[3]) : 0,
126
- patchSpecified: true,
127
- };
128
- return compareVersions(observed, base) >= 0 && observed.major === base.major && observed.minor === base.minor;
129
- }
130
- const comparator = COMPARATOR_PATTERN.exec(trimmed);
131
- if (comparator === null)
132
- return null;
133
- const op = comparator[1];
134
- const base = {
135
- major: Number(comparator[2]),
136
- minor: comparator[3] !== undefined ? Number(comparator[3]) : 0,
137
- minorSpecified: comparator[3] !== undefined,
138
- patch: comparator[4] !== undefined ? Number(comparator[4]) : 0,
139
- patchSpecified: comparator[4] !== undefined,
140
- };
141
- const cmp = compareVersions(observed, base);
142
- switch (op) {
143
- case ">=":
144
- return cmp >= 0;
145
- case "<=":
146
- return cmp <= 0;
147
- case ">":
148
- return cmp > 0;
149
- case "<":
150
- return cmp < 0;
151
- case "=":
152
- case undefined:
153
- // Bare version: an x-range at whatever precision was actually given.
154
- if (!base.minorSpecified)
155
- return observed.major === base.major;
156
- if (!base.patchSpecified)
157
- return observed.major === base.major && observed.minor === base.minor;
158
- return cmp === 0;
159
- default:
160
- return null;
161
- }
162
- }
163
- /** Whether `observedVersion` satisfies `declaredRange` under the grammar above. `null` means the comparison couldn't be made -- distinct from `false`, a real "does not satisfy" answer. */
164
- export function satisfiesDeclaredNodeVersion(declaredRange, observedVersion) {
165
- const observed = parseVersion(observedVersion);
166
- if (observed === null)
167
- return null;
168
- const clauses = declaredRange.split(/\s+/).filter((clause) => clause.length > 0);
169
- if (clauses.length === 0)
170
- return null;
171
- const results = clauses.map((clause) => satisfiesClause(clause, observed));
172
- if (results.some((result) => result === null))
173
- return null;
174
- return results.every((result) => result === true);
175
- }
176
- //# sourceMappingURL=environment-version-check.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment-version-check.js","sourceRoot":"","sources":["../src/environment-version-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,2BAA2B,CAAU,CAAC;AAgBxF;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAW,EAAE,eAAuB;IAC1E,MAAM,aAAa,GAAkC;QACnD,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,eAAe,EAAE,IAAI;QACrB,cAAc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AC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC3E,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3D,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -1,96 +0,0 @@
1
- /**
2
- * §21/RT-070's execution boundary: resource limits and privilege reporting for a
3
- * runtime declared trusted-local -- every spawned process runs with the invoking
4
- * user's own OS privileges, no filesystem/network restriction. Names the boundary
5
- * rather than leaving it absent (§38); real isolation (containers/namespaces) is a
6
- * separate decision this module does not invent (§29).
7
- *
8
- * Enforces for real, via the OS: CPU time, virtual memory, process count, through
9
- * `prlimit` -- an exec wrapper, never a shell (a shell would undo RT-036's
10
- * `tokenizeCommand` refusal of shell metacharacters). `prlimit` is util-linux, absent
11
- * on macOS, so it's reported as a capability, never assumed.
12
- */
13
- import type { CapabilityStatus, ResourceLimits } from "@descryy/runtime-contracts";
14
- /** Whether `prlimit` is reachable on PATH. `env` is a parameter (default `process.env`) so the "unavailable" branch is testable without mutating the real environment. */
15
- export declare function resourceLimitCapability(env?: NodeJS.ProcessEnv): CapabilityStatus;
16
- /**
17
- * RT-193 originally made this always `unavailable`. Now delegates to
18
- * `networkIsolationCapability()` (`./sandbox.ts`), real on Linux via a bwrap network
19
- * namespace -- kept as the stable name every caller already imports (the seam
20
- * RT-193 anticipated). Still unconditionally `unavailable` on macOS/Windows.
21
- */
22
- export declare function networkPolicyCapability(env?: NodeJS.ProcessEnv): CapabilityStatus;
23
- /**
24
- * Wraps `command`/`args` so the OS enforces `limits`, via `prlimit`. `undefined` or
25
- * empty `limits` returns them unchanged -- opt-in only.
26
- *
27
- * **Throws rather than silently spawning unconstrained** when a limit was requested
28
- * and `prlimit` is unavailable (refuse-not-guess, per RT-036) -- the alternative is a
29
- * caller asking for a memory cap and silently getting an unbounded process, the
30
- * "sandbox that doesn't sandbox" shape §38 bans.
31
- */
32
- export declare function applyResourceLimits(command: string, args: readonly string[], limits: ResourceLimits | undefined, env?: NodeJS.ProcessEnv): {
33
- readonly command: string;
34
- readonly args: readonly string[];
35
- };
36
- /**
37
- * DEC-272: the sandbox boundary (RT-070) must be stated to the user directly, not
38
- * left as a silent doc gap. Fixed, not derived from `runningAsRoot` -- the boundary
39
- * is the same regardless of privilege level found.
40
- *
41
- * **Scope: this is the unconditional-unisolated text, not a universal one.** Accurate
42
- * for every execution before `sandbox.ts` existed; no longer true once spawn-mode got
43
- * real bwrap-backed isolation (`applySandbox`) -- using this unconditionally for an
44
- * isolated process would understate its boundary, which is not the safe direction to
45
- * be wrong in. `sandboxBoundaryDisclosureFor()` below is the mode-aware replacement;
46
- * this constant remains its no-policy-applied return value and attach-mode's own
47
- * disclosure (attach-mode never has anything more accurate to say).
48
- */
49
- export declare const SANDBOX_BOUNDARY_DISCLOSURE: string;
50
- /**
51
- * Whether a real policy was actually enforced, not merely requested. `applySandbox`
52
- * already throws rather than proceed unconstrained when a declared policy can't be
53
- * enforced, so by the time a process is observed running, "declared" and "applied"
54
- * are the same fact -- this type makes the caller state it explicitly.
55
- */
56
- export interface AppliedIsolationPolicies {
57
- readonly filesystemPolicyApplied: boolean;
58
- readonly networkPolicyApplied: boolean;
59
- }
60
- /**
61
- * Mode-aware replacement for reading `SANDBOX_BOUNDARY_DISCLOSURE` unconditionally.
62
- * Defaults to no-policy-applied, so a no-arg call matches the old constant exactly.
63
- *
64
- * **Only ever true for spawn-mode.** Attach-mode has no path to produce
65
- * `filesystemPolicyApplied`/`networkPolicyApplied: true` for a process it didn't
66
- * spawn (structural, see `sandbox.ts`) -- attach-mode callers should never pass
67
- * anything but the default.
68
- */
69
- export declare function sandboxBoundaryDisclosureFor(policies?: AppliedIsolationPolicies): string;
70
- /**
71
- * Attach mode's contractual scope guarantee -- distinct from the sandbox-boundary
72
- * disclosure above: this is what an attach-mode `Collector` is permitted to *do*, not
73
- * what OS boundary wraps it. Mirrors `Collector` in `@descryy/runtime-contracts`.
74
- * Stated once so every attach-mode caller surfaces the identical sentence.
75
- */
76
- export declare const ATTACH_MODE_SCOPE_DISCLOSURE: string;
77
- export interface PrivilegeReport {
78
- /** Null when the platform has no uid concept (`process.getuid` undefined on Windows) -- distinct from `false`, a real answer. */
79
- readonly runningAsRoot: boolean | null;
80
- /** DEC-272: plain-language sandbox boundary statement, carried on this result rather than a new return path. Always populated, independent of `runningAsRoot`. */
81
- readonly disclosure: string;
82
- }
83
- /**
84
- * Reports, never enforces. §21's policy for trusted-local (RT-070) is not "refuse to
85
- * run as root" -- CI containers commonly do, and a hard refusal would turn a
86
- * documented boundary into an undocumented outage. The privilege level just becomes
87
- * observable instead of invisible.
88
- *
89
- * A required parameter, not defaulted: `undefined` is the real value a no-uid-concept
90
- * platform produces, and a default can't distinguish "explicitly undefined" from
91
- * "omitted." `currentPrivilegeReport()` below is the convenience wrapper; this makes
92
- * both branches testable without actually running as root or on Windows.
93
- */
94
- export declare function privilegeReportFor(getuid: (() => number) | undefined): PrivilegeReport;
95
- export declare function currentPrivilegeReport(): PrivilegeReport;
96
- //# sourceMappingURL=execution-safety.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-safety.d.ts","sourceRoot":"","sources":["../src/execution-safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGnF,0KAA0K;AAC1K,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,gBAAgB,CAU9F;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,gBAAgB,CAE9F;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAchE;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,QAGT,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;CACxC;AAID;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,GAAE,wBAA8C,GAAG,MAAM,CAwB7G;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAKoC,CAAC;AAE9E,MAAM,WAAW,eAAe;IAC9B,iIAAiI;IACjI,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC,kKAAkK;IAClK,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,SAAS,GAAG,eAAe,CAGtF;AAED,wBAAgB,sBAAsB,IAAI,eAAe,CAExD"}
@@ -1,140 +0,0 @@
1
- /**
2
- * §21/RT-070's execution boundary: resource limits and privilege reporting for a
3
- * runtime declared trusted-local -- every spawned process runs with the invoking
4
- * user's own OS privileges, no filesystem/network restriction. Names the boundary
5
- * rather than leaving it absent (§38); real isolation (containers/namespaces) is a
6
- * separate decision this module does not invent (§29).
7
- *
8
- * Enforces for real, via the OS: CPU time, virtual memory, process count, through
9
- * `prlimit` -- an exec wrapper, never a shell (a shell would undo RT-036's
10
- * `tokenizeCommand` refusal of shell metacharacters). `prlimit` is util-linux, absent
11
- * on macOS, so it's reported as a capability, never assumed.
12
- */
13
- import { execFileSync } from "node:child_process";
14
- import { networkIsolationCapability } from "./sandbox.js";
15
- /** Whether `prlimit` is reachable on PATH. `env` is a parameter (default `process.env`) so the "unavailable" branch is testable without mutating the real environment. */
16
- export function resourceLimitCapability(env = process.env) {
17
- try {
18
- execFileSync("prlimit", ["--version"], { env, stdio: "ignore" });
19
- return { availability: "available", reason: null };
20
- }
21
- catch {
22
- return {
23
- availability: "unavailable",
24
- reason: "prlimit (util-linux) is not on PATH -- CPU/memory/process limits cannot be enforced on this platform without reintroducing a shell, which this runtime refuses to do (RT-036)",
25
- };
26
- }
27
- }
28
- /**
29
- * RT-193 originally made this always `unavailable`. Now delegates to
30
- * `networkIsolationCapability()` (`./sandbox.ts`), real on Linux via a bwrap network
31
- * namespace -- kept as the stable name every caller already imports (the seam
32
- * RT-193 anticipated). Still unconditionally `unavailable` on macOS/Windows.
33
- */
34
- export function networkPolicyCapability(env = process.env) {
35
- return networkIsolationCapability(env);
36
- }
37
- /**
38
- * Wraps `command`/`args` so the OS enforces `limits`, via `prlimit`. `undefined` or
39
- * empty `limits` returns them unchanged -- opt-in only.
40
- *
41
- * **Throws rather than silently spawning unconstrained** when a limit was requested
42
- * and `prlimit` is unavailable (refuse-not-guess, per RT-036) -- the alternative is a
43
- * caller asking for a memory cap and silently getting an unbounded process, the
44
- * "sandbox that doesn't sandbox" shape §38 bans.
45
- */
46
- export function applyResourceLimits(command, args, limits, env = process.env) {
47
- if (limits === undefined)
48
- return { command, args };
49
- const flags = [];
50
- if (limits.maxMemoryBytes !== undefined)
51
- flags.push(`--as=${limits.maxMemoryBytes}`);
52
- if (limits.maxCpuSeconds !== undefined)
53
- flags.push(`--cpu=${limits.maxCpuSeconds}`);
54
- if (limits.maxProcesses !== undefined)
55
- flags.push(`--nproc=${limits.maxProcesses}`);
56
- if (flags.length === 0)
57
- return { command, args };
58
- const capability = resourceLimitCapability(env);
59
- if (capability.availability !== "available") {
60
- throw new Error(`resource limits were requested but cannot be enforced on this platform: ${capability.reason}`);
61
- }
62
- return { command: "prlimit", args: [...flags, "--", command, ...args] };
63
- }
64
- /**
65
- * DEC-272: the sandbox boundary (RT-070) must be stated to the user directly, not
66
- * left as a silent doc gap. Fixed, not derived from `runningAsRoot` -- the boundary
67
- * is the same regardless of privilege level found.
68
- *
69
- * **Scope: this is the unconditional-unisolated text, not a universal one.** Accurate
70
- * for every execution before `sandbox.ts` existed; no longer true once spawn-mode got
71
- * real bwrap-backed isolation (`applySandbox`) -- using this unconditionally for an
72
- * isolated process would understate its boundary, which is not the safe direction to
73
- * be wrong in. `sandboxBoundaryDisclosureFor()` below is the mode-aware replacement;
74
- * this constant remains its no-policy-applied return value and attach-mode's own
75
- * disclosure (attach-mode never has anything more accurate to say).
76
- */
77
- export const SANDBOX_BOUNDARY_DISCLOSURE = "This app runs with your own user permissions, the same as if you started it yourself. " +
78
- "The filesystem and network are not isolated -- anything your own account could read, write, " +
79
- "or reach, this run can too.";
80
- const NO_POLICIES_APPLIED = { filesystemPolicyApplied: false, networkPolicyApplied: false };
81
- /**
82
- * Mode-aware replacement for reading `SANDBOX_BOUNDARY_DISCLOSURE` unconditionally.
83
- * Defaults to no-policy-applied, so a no-arg call matches the old constant exactly.
84
- *
85
- * **Only ever true for spawn-mode.** Attach-mode has no path to produce
86
- * `filesystemPolicyApplied`/`networkPolicyApplied: true` for a process it didn't
87
- * spawn (structural, see `sandbox.ts`) -- attach-mode callers should never pass
88
- * anything but the default.
89
- */
90
- export function sandboxBoundaryDisclosureFor(policies = NO_POLICIES_APPLIED) {
91
- const { filesystemPolicyApplied, networkPolicyApplied } = policies;
92
- if (!filesystemPolicyApplied && !networkPolicyApplied)
93
- return SANDBOX_BOUNDARY_DISCLOSURE;
94
- if (filesystemPolicyApplied && networkPolicyApplied) {
95
- return ("This process was spawned inside a real OS-level sandbox (bubblewrap): filesystem access is restricted " +
96
- "to its declared allowedRoots (plus its own working directory) -- nothing else on this machine is visible " +
97
- "to it, not merely unwritable -- and network access is fully denied, including this machine's own loopback. " +
98
- "This is real isolation, not a name-only boundary.");
99
- }
100
- if (filesystemPolicyApplied) {
101
- return ("This process was spawned inside a real OS-level sandbox (bubblewrap): filesystem access is restricted " +
102
- "to its declared allowedRoots (plus its own working directory) -- nothing else on this machine is visible " +
103
- "to it, not merely unwritable. Network access was NOT restricted for this run -- it can reach anything " +
104
- "your own account's network could reach.");
105
- }
106
- return ("This process was spawned inside a real OS-level sandbox (bubblewrap): network access is fully denied " +
107
- "for this run, including this machine's own loopback. Filesystem access was NOT restricted for this run -- " +
108
- "it can read, write, or reach anything your own account's filesystem could.");
109
- }
110
- /**
111
- * Attach mode's contractual scope guarantee -- distinct from the sandbox-boundary
112
- * disclosure above: this is what an attach-mode `Collector` is permitted to *do*, not
113
- * what OS boundary wraps it. Mirrors `Collector` in `@descryy/runtime-contracts`.
114
- * Stated once so every attach-mode caller surfaces the identical sentence.
115
- */
116
- export const ATTACH_MODE_SCOPE_DISCLOSURE = "Attach mode observes an already-running process; it never executes code in it or applies changes to it. " +
117
- "This is a permanent, documented architectural limitation, not a temporary gap -- there is no honest way to " +
118
- "retroactively sandbox a process that was already running, unconfined, before this tool touched it. " +
119
- "Respawn-and-supervise and the cgroup resource-limit move are real alternatives next to attach mode, not " +
120
- "fixes to it; see their own documentation for what each actually gets you.";
121
- /**
122
- * Reports, never enforces. §21's policy for trusted-local (RT-070) is not "refuse to
123
- * run as root" -- CI containers commonly do, and a hard refusal would turn a
124
- * documented boundary into an undocumented outage. The privilege level just becomes
125
- * observable instead of invisible.
126
- *
127
- * A required parameter, not defaulted: `undefined` is the real value a no-uid-concept
128
- * platform produces, and a default can't distinguish "explicitly undefined" from
129
- * "omitted." `currentPrivilegeReport()` below is the convenience wrapper; this makes
130
- * both branches testable without actually running as root or on Windows.
131
- */
132
- export function privilegeReportFor(getuid) {
133
- if (getuid === undefined)
134
- return { runningAsRoot: null, disclosure: SANDBOX_BOUNDARY_DISCLOSURE };
135
- return { runningAsRoot: getuid() === 0, disclosure: SANDBOX_BOUNDARY_DISCLOSURE };
136
- }
137
- export function currentPrivilegeReport() {
138
- return privilegeReportFor(process.getuid?.bind(process));
139
- }
140
- //# sourceMappingURL=execution-safety.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-safety.js","sourceRoot":"","sources":["../src/execution-safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,0KAA0K;AAC1K,MAAM,UAAU,uBAAuB,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC1E,IAAI,CAAC;QACH,YAAY,CAAC,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACjE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,YAAY,EAAE,aAAa;YAC3B,MAAM,EAAE,+KAA+K;SACxL,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC1E,OAAO,0BAA0B,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAe,EACf,IAAuB,EACvB,MAAkC,EAClC,MAAyB,OAAO,CAAC,GAAG;IAEpC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAEnD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS;QAAE,KAAK,CAAC,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7G,mDAAmD,CACpD,CAAC;IACJ,CAAC;IACD,IAAI,uBAAuB,EAAE,CAAC;QAC5B,OAAO,CACL,wGAAwG;YACxG,2GAA2G;YAC3G,wGAAwG;YACxG,yCAAyC,CAC1C,CAAC;IACJ,CAAC;IACD,OAAO,CACL,uGAAuG;QACvG,4GAA4G;QAC5G,4EAA4E,CAC7E,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,0GAA0G;IAC1G,6GAA6G;IAC7G,qGAAqG;IACrG,0GAA0G;IAC1G,2EAA2E,CAAC;AAS9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAkC;IACnE,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAClG,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,2BAA2B,EAAE,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3D,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,31 +0,0 @@
1
- export { withDefaultProcessEnv } from "./env.ts";
2
- export type { SpawnProcessOptions, ProcessExitInfo, ManagedProcess, AttachProcessOptions, ProcessOutputInfo } from "./process-manager.ts";
3
- export { spawnProcess, attachManagedProcess, isProcessAlive } from "./process-manager.ts";
4
- export type { AttachFence, ProcessStartTimeResult, OtherLogWriterCheck } from "./attach-fencing.ts";
5
- export { computeAttachFence, getProcessStartTimeMs, detectOtherLogWriters } from "./attach-fencing.ts";
6
- export type { ReadinessMechanism, ReadinessIdentity, HttpReadinessCheck, TcpPortReadinessCheck, LogPatternReadinessCheck, CommandReadinessCheck, CustomHookReadinessCheck, ReadinessCheck, ReadinessResult, AwaitReadinessOptions, ProcessOutputReader, } from "./readiness.ts";
7
- export { READINESS_MECHANISMS, READINESS_IDENTITY_LEVELS, awaitReadiness, createProcessOutputReader } from "./readiness.ts";
8
- export type { IdentityVerification } from "./process-identity.ts";
9
- export { verifyListeningSocketOwner } from "./process-identity.ts";
10
- export type { CreateExecutionInput, RunOptions, ProcessLifecycleEvent } from "./controller.ts";
11
- export { ExecutionController } from "./controller.ts";
12
- export type { ProcessCollector } from "./process-collector.ts";
13
- export { createProcessCollector } from "./process-collector.ts";
14
- export type { RegisteredCollectorCapabilities, CollectorCapabilityKey } from "./capability-registry.ts";
15
- export { buildExecutionCapabilities, bestCapabilityStatus } from "./capability-registry.ts";
16
- export type { PrivilegeReport, AppliedIsolationPolicies } from "./execution-safety.ts";
17
- export { resourceLimitCapability, applyResourceLimits, networkPolicyCapability, privilegeReportFor, currentPrivilegeReport, SANDBOX_BOUNDARY_DISCLOSURE, sandboxBoundaryDisclosureFor, ATTACH_MODE_SCOPE_DISCLOSURE, } from "./execution-safety.ts";
18
- export type { SandboxOptions } from "./sandbox.ts";
19
- export { filesystemIsolationCapability, networkIsolationCapability, unsupportedNetworkPolicyReason, resolveExecutableDirectory, applySandbox, } from "./sandbox.ts";
20
- export type { ContainerSandboxOptions } from "./container-sandbox.ts";
21
- export { containerRuntimeCapability, containerFilesystemIsolationCapability, containerNetworkIsolationCapability, unsupportedContainerNetworkPolicyReason, resolveContainerImage, applyContainerSandbox, } from "./container-sandbox.ts";
22
- export { captureEnvironmentMetadata } from "./environment-metadata.ts";
23
- export type { DependencyVersionMismatch, DependencyVersionCheckResult } from "./dependency-version-check.ts";
24
- export { checkDependencyVersions } from "./dependency-version-check.ts";
25
- export type { DeclaredVersionSource, EnvironmentVersionCheckResult } from "./environment-version-check.ts";
26
- export { DECLARED_VERSION_SOURCES, checkEnvironmentVersion, satisfiesDeclaredNodeVersion } from "./environment-version-check.ts";
27
- export type { CommandTokenization, ServicesValidation } from "./orchestration.ts";
28
- export { tokenizeCommand, validateServicesConfiguration, substitutePortPlaceholders } from "./orchestration.ts";
29
- export type { PreflightCheckKind, PreflightStatus, PreflightProbeOutcome, PreflightCheckSpec, PreflightCheckResult, PreflightResult, } from "./preflight.ts";
30
- export { PREFLIGHT_CHECK_KINDS, PREFLIGHT_STATUSES, PREFLIGHT_CHECK_TIMEOUT_MS, runPreflight, portFreeCheck, portAnswersCheck, readinessTargetCheck, customCheck, } from "./preflight.ts";
31
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC1I,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1F,YAAY,EAAE,WAAW,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEvG,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE5H,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iB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BAAkB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAIhH,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- export { withDefaultProcessEnv } from "./env.js";
2
- export { spawnProcess, attachManagedProcess, isProcessAlive } from "./process-manager.js";
3
- export { computeAttachFence, getProcessStartTimeMs, detectOtherLogWriters } from "./attach-fencing.js";
4
- export { READINESS_MECHANISMS, READINESS_IDENTITY_LEVELS, awaitReadiness, createProcessOutputReader } from "./readiness.js";
5
- export { verifyListeningSocketOwner } from "./process-identity.js";
6
- export { ExecutionController } from "./controller.js";
7
- export { createProcessCollector } from "./process-collector.js";
8
- export { buildExecutionCapabilities, bestCapabilityStatus } from "./capability-registry.js";
9
- export { resourceLimitCapability, applyResourceLimits, networkPolicyCapability, privilegeReportFor, currentPrivilegeReport, SANDBOX_BOUNDARY_DISCLOSURE, sandboxBoundaryDisclosureFor, ATTACH_MODE_SCOPE_DISCLOSURE, } from "./execution-safety.js";
10
- export { filesystemIsolationCapability, networkIsolationCapability, unsupportedNetworkPolicyReason, resolveExecutableDirectory, applySandbox, } from "./sandbox.js";
11
- export { containerRuntimeCapability, containerFilesystemIsolationCapability, containerNetworkIsolationCapability, unsupportedContainerNetworkPolicyReason, resolveContainerImage, applyContainerSandbox, } from "./container-sandbox.js";
12
- export { captureEnvironmentMetadata } from "./environment-metadata.js";
13
- export { checkDependencyVersions } from "./dependency-version-check.js";
14
- export { DECLARED_VERSION_SOURCES, checkEnvironmentVersion, satisfiesDeclaredNodeVersion } from "./environment-version-check.js";
15
- export { tokenizeCommand, validateServicesConfiguration, substitutePortPlaceholders } from "./orchestration.js";
16
- export { PREFLIGHT_CHECK_KINDS, PREFLIGHT_STATUSES, PREFLIGHT_CHECK_TIMEOUT_MS, runPreflight, portFreeCheck, portAnswersCheck, readinessTargetCheck, customCheck, } from "./preflight.js";
17
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG1F,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAevG,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAG5H,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAG5F,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,EAC1B,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,0BAA0B,EAC1B,sCAAsC,EACtC,mCAAmC,EACnC,uCAA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