repo-contract 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,7 +1,23 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project are documented here. This file is generated by
4
- [release-please](https://github.com/googleapis/release-please) from the Conventional Commits on
5
- `main` — do not edit it by hand. The project follows
6
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html); before 1.0, a breaking change is a
7
- minor version bump (see [`VERSIONING.md`](VERSIONING.md)).
3
+ ## [0.2.0](https://github.com/MaverickCER/repo-contract/compare/repo-contract-v0.1.1...repo-contract-v0.2.0) (2026-09-03)
4
+
5
+
6
+ ### BREAKING CHANGES
7
+
8
+ * defineRepoContract/runRepoContract now require spawn and env on the config (e.g. spawn: child_process.spawn, env: process.env). See ADR 0011 and README's "Supplying spawn/env" section for migration.
9
+
10
+ ### Features
11
+
12
+ * make process spawning and env access consumer-supplied capabilities ([640a961](https://github.com/MaverickCER/repo-contract/commit/640a961b65fd73511586c3b4f6274284bf5172a9))
13
+
14
+ ## [0.1.1](https://github.com/MaverickCER/repo-contract/compare/repo-contract-v0.1.0...repo-contract-v0.1.1) (2026-09-01)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * clear Socket supply-chain alerts (unminified dist, no prepare script) ([71c9230](https://github.com/MaverickCER/repo-contract/commit/71c92306fcf00e3858f0596c2d56f3272199339d))
20
+ * publish the dist bundle unminified ([266ae47](https://github.com/MaverickCER/repo-contract/commit/266ae47919753c55f10364713fe0c7c5876815b7))
21
+ * remove the prepare install script from the published package ([9153540](https://github.com/MaverickCER/repo-contract/commit/9153540e4f0f1a069e07c12ddfee8ba62827ce5b))
22
+
23
+ ## Changelog
package/README.md CHANGED
@@ -1,15 +1,11 @@
1
1
  # repo-contract
2
2
 
3
- <!--
4
- [![CI](https://github.com/maverickcer/repo-contract/actions/workflows/ci.yml/badge.svg)](https://github.com/maverickcer/repo-contract/actions/workflows/ci.yml)
3
+ [![CI](https://github.com/MaverickCER/repo-contract/actions/workflows/ci.yml/badge.svg)](https://github.com/MaverickCER/repo-contract/actions/workflows/ci.yml)
5
4
  [![npm version](https://img.shields.io/npm/v/repo-contract.svg)](https://www.npmjs.com/package/repo-contract)
6
5
  [![License](https://img.shields.io/npm/l/repo-contract.svg)](LICENSE)
7
- [![Coverage](https://img.shields.io/badge/coverage-pending-lightgrey)]()
8
- [![Bundle size](https://img.shields.io/badge/gzip-%3C8KB-brightgreen)]()
9
- [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)]()
10
- [![Node](https://img.shields.io/node/v/repo-contract.svg)]()
11
- TODO(readme-badges): uncomment once the first version is published to npm and CI is live.
12
- -->
6
+ [![Coverage](https://img.shields.io/badge/coverage-%E2%89%A585%25-brightgreen)](scripts/coverage-thresholds.mjs)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)](tsconfig.json)
8
+ [![Node](https://img.shields.io/node/v/repo-contract.svg)](package.json)
13
9
 
14
10
  **Turn your repository's engineering standards into enforceable contracts.**
15
11
 
@@ -96,7 +92,7 @@ npm install --save-dev yaml
96
92
 
97
93
  ### Runtime support matrix
98
94
 
99
- repo-contract spawns processes and reads `process.env` it is server/CLI-only by design, not an isomorphic/browser package.
95
+ repo-contract's checks run as spawned processes and read the ambient environment — but repo-contract never imports a process-spawning implementation or reads `process.env` itself (see [Supplying `spawn`/`env`](#supplying-spawnenv) below); it is server/CLI-only by design regardless, not an isomorphic/browser package, since the capability a consumer supplies is itself always a real Node-only spawning mechanism.
100
96
 
101
97
  | Environment | Supported |
102
98
  | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
@@ -117,9 +113,14 @@ Define your repository's standards as checks:
117
113
 
118
114
  ```ts
119
115
  // repo-contract.config.ts
116
+ import { spawn } from "node:child_process"
120
117
  import { defineRepoContract } from "repo-contract"
121
118
 
122
119
  export default defineRepoContract({
120
+ // repo-contract never spawns a process or reads process.env itself -- see
121
+ // "Supplying spawn/env" below for why, and what to pass on Windows.
122
+ spawn,
123
+ env: process.env,
123
124
  checks: {
124
125
  tests: {
125
126
  run: "npm test",
@@ -183,6 +184,49 @@ process.exitCode = verdict.passed ? 0 : 1
183
184
 
184
185
  There is no CLI, no config-file discovery magic, and no hidden state.
185
186
 
187
+ ### Supplying `spawn`/`env`
188
+
189
+ `spawn` and `env` are required fields on the config — repo-contract never imports a process-spawning implementation or reads `process.env` internally (see [ADR 0011](specs/decisions/0011-process-spawning-and-ambient-environment-access-are-consumer-supplied-capabilities-not-package-owned.md)). You supply both, as trusted capabilities repo-contract calls with a resolved command/argv/options — it does not inspect, wrap, or sanitize them.
190
+
191
+ **macOS/Linux** — plain `node:child_process` is enough:
192
+
193
+ ```ts
194
+ import { spawn } from "node:child_process"
195
+
196
+ export default defineRepoContract({
197
+ spawn,
198
+ env: process.env,
199
+ checks: {/* ... */},
200
+ })
201
+ ```
202
+
203
+ **Windows** — most npm-installed CLI tools (`eslint`, `prettier`, `tsc`, …) resolve to `.cmd` shims, and plain `node:child_process.spawn` refuses to run those at all without `shell: true` (Node's own CVE-2024-27980 mitigation). Install [`cross-spawn`](https://www.npmjs.com/package/cross-spawn) and pass it instead — it resolves `.cmd`/`.bat` shims and quotes arguments safely for `cmd.exe`, **without** turning on shell metacharacter interpretation:
204
+
205
+ ```ts
206
+ import crossSpawn, { sync as crossSpawnSync } from "cross-spawn"
207
+
208
+ export default defineRepoContract({
209
+ spawn: crossSpawn,
210
+ env: process.env,
211
+ // Optional: lets a timed-out/aborted/Ctrl+C-killed check's full process
212
+ // tree (not just its immediate process) get cleaned up on Windows too.
213
+ killProcessTree: crossSpawnSync,
214
+ checks: {/* ... */},
215
+ })
216
+ ```
217
+
218
+ **`cross-spawn` does not mean "shell execution."** These are two independent choices:
219
+
220
+ | `Spawner` choice | `shell` option | Result |
221
+ | ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
222
+ | native `spawn` | `false` (default) | argv-only, no shell interpretation |
223
+ | `cross-spawn` | `false` (default) | Windows `.cmd`/`.bat` resolution + safe `cmd.exe` quoting, still argv-only |
224
+ | either | `true` | shell metacharacters (`&&`, `\|`, …) interpreted — a per-check or global opt-in, see [`shell`](docs/api-report/repo-contract.api.md) |
225
+
226
+ Passing `cross-spawn` fixes Windows command resolution; it does not by itself enable shell metacharacter interpretation. `check.shell` (or the config-level `shell` default) is the separate, explicit opt-in for that — see `SECURITY.md` before enabling it.
227
+
228
+ `repo-contract` doesn't ship a ready-made spawner of its own, on purpose (see ADR 0011's Alternatives) — the two snippets above are the whole integration.
229
+
186
230
  ## The model
187
231
 
188
232
  ```text
@@ -645,10 +689,13 @@ It does **not** encode your repository's definition of quality.
645
689
  Import a preset, spread it into your own `checks` record, and override whatever you need — most often `policy`:
646
690
 
647
691
  ```ts
692
+ import { spawn } from "node:child_process"
648
693
  import { defineRepoContract } from "repo-contract"
649
694
  import { format, typecheck, license } from "repo-contract/presets"
650
695
 
651
696
  export default defineRepoContract({
697
+ spawn,
698
+ env: process.env,
652
699
  checks: {
653
700
  format,
654
701
  typecheck: {
@@ -666,10 +713,13 @@ export default defineRepoContract({
666
713
  Some presets are factories because they expose options that change what gets executed:
667
714
 
668
715
  ```ts
716
+ import { spawn } from "node:child_process"
669
717
  import { defineRepoContract } from "repo-contract"
670
718
  import { lint, deadCode } from "repo-contract/presets"
671
719
 
672
720
  export default defineRepoContract({
721
+ spawn,
722
+ env: process.env,
673
723
  checks: {
674
724
  lint: lint({ path: "src" }),
675
725
  deadCode: deadCode({
@@ -1 +1 @@
1
- {"version":3,"file":"validate-config.d.ts","sourceRoot":"","sources":["../../../src/config/validate-config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAgB,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAKnE;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAwC3E;AA6QD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,GACxD,IAAI,CAoBN"}
1
+ {"version":3,"file":"validate-config.d.ts","sourceRoot":"","sources":["../../../src/config/validate-config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAgB,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAKnE;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAuE3E;AAqSD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,GACxD,IAAI,CAoBN"}
@@ -1,3 +1,4 @@
1
+ import type { SyncSpawner } from "../types.js";
1
2
  /**
2
3
  * Whether a check's process should be spawned with `detached: true`. On
3
4
  * POSIX this makes the spawned process the leader of a new process group
@@ -20,11 +21,20 @@ export declare function shouldSpawnDetached(): boolean;
20
21
  *
21
22
  * On POSIX, sends `signal` to the whole process group via the negative-pid
22
23
  * convention (requires the process to have been spawned with
23
- * `detached: true`, see `shouldSpawnDetached`). On Windows, process groups
24
+ * `detached: true`, see `shouldSpawnDetached`) -- no process spawning
25
+ * required, a single syscall via `process.kill`. On Windows, process groups
24
26
  * don't work the same way, so this shells out to `taskkill /pid <pid> /t
25
27
  * /f` -- the same technique the `tree-kill` package uses internally -- which
26
28
  * walks the system process table for descendants of `pid` regardless of how
27
- * it was spawned.
29
+ * it was spawned; that requires a synchronous spawn, which -- like every
30
+ * other process-spawning capability in this package -- is a trusted
31
+ * capability the caller supplies (`killProcessTree`, threaded from
32
+ * `RepoContractConfig.killProcessTree`), never imported internally (see
33
+ * specs/decisions/0011-process-spawning-and-ambient-environment-access-are-consumer-supplied-capabilities-not-package-owned.md).
34
+ * When `killProcessTree` is omitted on Windows, this function is a
35
+ * documented no-op -- the caller (`spawn-check.ts`) falls back to
36
+ * terminating just the tracked child process handle directly, which needs
37
+ * no spawn at all.
28
38
  *
29
39
  * Swallows the expected best-effort-cleanup failures, but not every failure: a
30
40
  * process that has already exited (POSIX `ESRCH`, or `taskkill`'s "not found"
@@ -43,6 +53,7 @@ export declare function shouldSpawnDetached(): boolean;
43
53
  * more-cooperative alternative to fall back to here the way there is on POSIX.
44
54
  * @param pid - the pid of the tree's root process (the process group id on POSIX, since it was spawned detached)
45
55
  * @param signal - the POSIX signal to send (on Windows, ignored -- see doc comment above)
56
+ * @param killProcessTree - the consumer-supplied synchronous spawner used only on Windows; a no-op there when omitted (see doc comment above)
46
57
  */
47
- export declare function killTree(pid: number, signal: NodeJS.Signals): void;
58
+ export declare function killTree(pid: number, signal: NodeJS.Signals, killProcessTree?: SyncSpawner): void;
48
59
  //# sourceMappingURL=process-tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-tree.d.ts","sourceRoot":"","sources":["../../../src/execution/process-tree.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CA8ClE"}
1
+ {"version":3,"file":"process-tree.d.ts","sourceRoot":"","sources":["../../../src/execution/process-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAoDjG"}
@@ -1,4 +1,5 @@
1
1
  import type { CheckDefinition, CheckEvidence, CheckSchema, RunRepoContractOptions } from "../types.js";
2
+ import type { ExecutionCapability } from "./spawn-check.js";
2
3
  /**
3
4
  * One check's id, its original definition, and its raw execution evidence,
4
5
  * threaded together as a triple rather than three separately-keyed maps --
@@ -22,8 +23,9 @@ export declare const SELF_TERMINATE_DELAY_MS: number;
22
23
  * simply absent from the result, not present with some placeholder value.
23
24
  * @param checks - the full set of configured checks, keyed by id
24
25
  * @param concurrency - the maximum number of checks to run in parallel at once
26
+ * @param execution - the run's trusted execution capabilities (`spawn`, `env`, resolved global `shell` default), forwarded to every `spawnCheck` call
25
27
  * @param options - run options; `options.checks` restricts execution to those ids (plus their dependencies), `options.signal` cancels the whole run
26
28
  * @returns each executed check's id, definition, and raw evidence, one entry per resolved check regardless of whether it actually spawned
27
29
  */
28
- export declare function runChecks(checks: CheckSchema, concurrency: number, options?: RunRepoContractOptions): Promise<readonly CheckExecutionEntry[]>;
30
+ export declare function runChecks(checks: CheckSchema, concurrency: number, execution: ExecutionCapability, options?: RunRepoContractOptions): Promise<readonly CheckExecutionEntry[]>;
29
31
  //# sourceMappingURL=run-checks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run-checks.d.ts","sourceRoot":"","sources":["../../../src/execution/run-checks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,WAAW,EACX,sBAAsB,EACvB,MAAM,aAAa,CAAA;AAOpB;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,aAAa,CAAC,CAAA;AAYnF,eAAO,MAAM,uBAAuB,QAAgC,CAAA;AAoJpE;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAkJzC"}
1
+ {"version":3,"file":"run-checks.d.ts","sourceRoot":"","sources":["../../../src/execution/run-checks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,WAAW,EACX,sBAAsB,EACvB,MAAM,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAqB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAG9E;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,aAAa,CAAC,CAAA;AAYnF,eAAO,MAAM,uBAAuB,QAAgC,CAAA;AAoJpE;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,mBAAmB,EAC9B,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAkJzC"}
@@ -1,4 +1,22 @@
1
- import type { CheckDefinition, CheckEvidence } from "../types.js";
1
+ import type { CheckDefinition, CheckEvidence, Spawner, SyncSpawner } from "../types.js";
2
+ /**
3
+ * The trusted execution capabilities a run supplies once (see
4
+ * specs/decisions/0011-process-spawning-and-ambient-environment-access-are-consumer-supplied-capabilities-not-package-owned.md)
5
+ * and every spawned check draws from -- `spawn`/`env` verbatim from
6
+ * `RepoContractConfig`, `shell` already resolved to its effective global
7
+ * default (`config.shell ?? false`). Internal only: not exported from
8
+ * `src/types.ts` or `src/index.ts`. Grouped into one object, rather than
9
+ * threaded as independent parameters through `run-repo-contract.ts` ->
10
+ * `run-checks.ts` -> `spawn-check.ts`, purely to keep related
11
+ * execution-capability concerns from drifting into unrelated positional
12
+ * parameters as more get added later.
13
+ */
14
+ export interface ExecutionCapability {
15
+ readonly spawn: Spawner;
16
+ readonly env: NodeJS.ProcessEnv;
17
+ readonly shell: boolean;
18
+ readonly killProcessTree?: SyncSpawner;
19
+ }
2
20
  export declare const SIGKILL_GRACE_PERIOD_MS = 2000;
3
21
  /** Handle a caller can use to forcibly terminate one in-flight check's process tree, independent of that check's own timeout/abort wiring -- used by run-checks.ts to clean up every active check when the host process itself receives SIGINT/SIGTERM. */
4
22
  export interface ActiveCheckHandle {
@@ -24,7 +42,8 @@ export interface ActiveCheckHandle {
24
42
  * @param check - the check definition to run (command, timeout, env, cwd, shell, etc.)
25
43
  * @param runSignal - the whole run's abort signal, if any; already-aborted before this is called means the check never spawns
26
44
  * @param activeHandles - the shared registry this check's kill handle is added to while running, so a host-process SIGINT/SIGTERM can terminate it
45
+ * @param execution - the run's trusted execution capabilities (`spawn`, `env`, resolved global `shell` default) -- see `ExecutionCapability`
27
46
  * @returns a fully-formed `CheckEvidence` reflecting however the process ended; this function itself never rejects
28
47
  */
29
- export declare function spawnCheck(checkId: string, check: CheckDefinition, runSignal: AbortSignal | undefined, activeHandles: Set<ActiveCheckHandle>): Promise<CheckEvidence>;
48
+ export declare function spawnCheck(checkId: string, check: CheckDefinition, runSignal: AbortSignal | undefined, activeHandles: Set<ActiveCheckHandle>, execution: ExecutionCapability): Promise<CheckEvidence>;
30
49
  //# sourceMappingURL=spawn-check.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spawn-check.d.ts","sourceRoot":"","sources":["../../../src/execution/spawn-check.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAe,MAAM,aAAa,CAAA;AA6B9E,eAAO,MAAM,uBAAuB,OAAO,CAAA;AA6D3C,2PAA2P;AAC3P,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;CACnC;AAoHD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,eAAe,EACtB,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,GACpC,OAAO,CAAC,aAAa,CAAC,CA6PxB"}
1
+ {"version":3,"file":"spawn-check.d.ts","sourceRoot":"","sources":["../../../src/execution/spawn-check.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAe,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAIpG;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,eAAe,CAAC,EAAE,WAAW,CAAA;CACvC;AA2BD,eAAO,MAAM,uBAAuB,OAAO,CAAA;AA6D3C,2PAA2P;AAC3P,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;CACnC;AAyHD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,eAAe,EACtB,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,EACrC,SAAS,EAAE,mBAAmB,GAC7B,OAAO,CAAC,aAAa,CAAC,CA4QxB"}
@@ -9,5 +9,5 @@
9
9
  export { defineRepoContract } from "./config/define-repo-contract.js";
10
10
  export { runRepoContract } from "./run-repo-contract.js";
11
11
  export { DependencyDeclaredLaterError, InvalidCheckConfigError, InvalidRepoContractConfigError, ParserDependencyMissingError, PolicyReadFailedParseValueError, PolicyReadUnrequestedOutputError, PolicyThrewError, RepoContractError, UnknownCheckIdError, } from "./errors.js";
12
- export type { CheckDefinition, CheckDefinitionConfig, CheckEvidence, CheckSchema, CheckStatus, Evidence, OutputFormat, ParsedOutput, ParsedOutputFailure, ParsedOutputSuccess, Policy, PolicyContext, PolicyOutcome, PolicyResult, RepoContractConfig, RunRepoContractOptions, ValidatedCheckSchema, Verdict, } from "./types.js";
12
+ export type { CheckDefinition, CheckDefinitionConfig, CheckEvidence, CheckSchema, CheckStatus, Evidence, OutputFormat, ParsedOutput, ParsedOutputFailure, ParsedOutputSuccess, Policy, PolicyContext, PolicyOutcome, PolicyResult, RepoContractConfig, RunRepoContractOptions, Spawner, SyncSpawner, ValidatedCheckSchema, Verdict, } from "./types.js";
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAEpB,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,OAAO,GACR,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAEpB,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,OAAO,GACR,MAAM,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"run-repo-contract.d.ts","sourceRoot":"","sources":["../../src/run-repo-contract.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACR,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,eAAe,CAAC,KAAK,CAAC,OAAO,SAAS,WAAW,EAC/D,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EACnC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC,CAGrE"}
1
+ {"version":3,"file":"run-repo-contract.d.ts","sourceRoot":"","sources":["../../src/run-repo-contract.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACR,MAAM,YAAY,CAAA;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,eAAe,CAAC,KAAK,CAAC,OAAO,SAAS,WAAW,EAC/D,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,EACnC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC,CAGrE"}
@@ -4,6 +4,7 @@
4
4
  * separate concepts (see specs/architecture.md) even though
5
5
  * `runRepoContract` returns both together.
6
6
  */
7
+ import type { ChildProcess, SpawnOptions, SpawnSyncOptions, SpawnSyncReturns } from "node:child_process";
7
8
  /** Output interpretation a check can explicitly request. No format requested means no parsing -- the consumer gets raw stdout/stderr only. */
8
9
  export type OutputFormat = "json" | "yaml" | "text";
9
10
  /**
@@ -202,9 +203,11 @@ export interface CheckDefinitionConfig {
202
203
  readonly run: string | readonly string[];
203
204
  /**
204
205
  * Opt into real shell execution instead of the safe argv-only default.
205
- * When `true`, `run` must be a `string` and is passed to the platform
206
- * shell as-is (via cross-spawn's own `shell` option) -- shell metacharacter
207
- * rejection does not apply. See SECURITY.md before enabling this.
206
+ * When `true` (or left unset with `RepoContractConfig.shell: true` as the
207
+ * run-wide default -- see that field), `run` must be a `string` and is
208
+ * passed to the platform shell as-is (via the supplied `Spawner`'s own
209
+ * `shell` option) -- shell metacharacter rejection does not apply. See
210
+ * SECURITY.md before enabling this.
208
211
  */
209
212
  readonly shell?: boolean;
210
213
  /** Working directory for the spawned process. Defaults to the current process's `cwd`. */
@@ -285,12 +288,76 @@ export type ValidatedCheckSchema<T> = {
285
288
  readonly dependsOn?: readonly (Exclude<keyof T, K> & string)[];
286
289
  } : never;
287
290
  };
291
+ /**
292
+ * Spawns a child process, given a resolved command, argv, and options --
293
+ * modeled directly on `node:child_process`'s own `spawn(command, args,
294
+ * options)` signature so both `node:child_process.spawn` and cross-spawn's
295
+ * exported `spawn` are valid, drop-in values with no adapter code required
296
+ * (see specs/decisions/0011-process-spawning-and-ambient-environment-access-are-consumer-supplied-capabilities-not-package-owned.md).
297
+ * repo-contract treats whatever function is supplied as a trusted
298
+ * capability: it calls it with a resolved command/argv/options and does not
299
+ * inspect, wrap, or sanitize it -- the security properties of the spawned
300
+ * process are entirely the supplied function's own.
301
+ */
302
+ export type Spawner = (command: string, args: readonly string[], options: SpawnOptions) => ChildProcess;
303
+ /**
304
+ * Synchronously spawns a child process and waits for it to exit -- modeled directly on
305
+ * `node:child_process`'s own `spawnSync(command, args, options)` signature, the same
306
+ * drop-in-compatibility approach as `Spawner`. Used only for `RepoContractConfig.killProcessTree`
307
+ * (Windows process-tree cleanup via `taskkill`, which fundamentally needs to run synchronously from
308
+ * a signal-handling context that cannot `await` anything else -- see
309
+ * specs/decisions/0011-process-spawning-and-ambient-environment-access-are-consumer-supplied-capabilities-not-package-owned.md).
310
+ * `node:child_process.spawnSync` and cross-spawn's exported `sync` are both valid, drop-in values.
311
+ */
312
+ export type SyncSpawner = (command: string, args: readonly string[], options: SpawnSyncOptions) => SpawnSyncReturns<Buffer | string>;
288
313
  /** Top-level configuration passed to `defineRepoContract`/`runRepoContract`. */
289
314
  export interface RepoContractConfig<TChecks extends CheckSchema = CheckSchema> {
290
315
  /** Every check to run, keyed by check id. */
291
316
  readonly checks: TChecks;
292
317
  /** Maximum number of checks to execute concurrently. Defaults to `os.availableParallelism()`. Must be a positive integer. */
293
318
  readonly concurrency?: number;
319
+ /**
320
+ * The trusted capability repo-contract calls to spawn every check's
321
+ * process -- e.g. `child_process.spawn` (from `"node:child_process"`) or
322
+ * cross-spawn's exported `spawn`. Required: repo-contract never imports a
323
+ * process-spawning implementation itself (see ADR 0011 above `Spawner`).
324
+ * `child_process.spawn` alone does not resolve Windows `.cmd`/`.bat`
325
+ * shims (most npm-installed CLI tools on Windows) without `shell: true`;
326
+ * pass cross-spawn instead for that correctness without enabling shell
327
+ * metacharacter interpretation -- cross-spawn is a spawn implementation
328
+ * choice, not a `shell: true` equivalent. See `shell` below.
329
+ */
330
+ readonly spawn: Spawner;
331
+ /**
332
+ * The ambient environment repo-contract treats as inheritable by each
333
+ * check whose `inheritEnv` is not `false` (the default) -- typically
334
+ * `process.env`, passed straight through by reference (never copied
335
+ * internally) so a consumer that mutates `process.env` mid-run still sees
336
+ * that reflected in later-spawned checks, exactly as if repo-contract had
337
+ * read `process.env` itself. Required: repo-contract never reads
338
+ * `process.env` internally (see ADR 0011 above `Spawner`). Typed as
339
+ * `NodeJS.ProcessEnv` so `env: process.env` needs no casting.
340
+ */
341
+ readonly env: NodeJS.ProcessEnv;
342
+ /**
343
+ * Global default for every check's own `shell` when that check doesn't
344
+ * set one itself (`check.shell ?? shell ?? false`). Defaults to `false`,
345
+ * the safe argv-only mode -- unrelated to which `spawn` is supplied; see
346
+ * `spawn`'s own doc comment for that distinction.
347
+ */
348
+ readonly shell?: boolean;
349
+ /**
350
+ * The trusted capability repo-contract calls, on Windows only, to forcibly terminate a check's
351
+ * entire process tree (not just its immediate process) on a timeout, an aborted run, or a
352
+ * host-process SIGINT/SIGTERM -- e.g. `child_process.spawnSync` (from `"node:child_process"`) or
353
+ * cross-spawn's exported `sync`. Optional, unlike `spawn`/`env`: when omitted, Windows cleanup
354
+ * falls back to terminating only the check's own immediate process (not any subprocess it spawned
355
+ * internally) -- correct for the common case, but a check that spawns its own descendants (e.g.
356
+ * `npm test` spawning the real test runner) may leave them running. POSIX cleanup never needs
357
+ * this at all (`process.kill(-pid, signal)` reaches the whole process group directly, no spawning
358
+ * required) -- see specs/decisions/0011-process-spawning-and-ambient-environment-access-are-consumer-supplied-capabilities-not-package-owned.md.
359
+ */
360
+ readonly killProcessTree?: SyncSpawner;
294
361
  }
295
362
  /** Optional per-run controls for `runRepoContract`. */
296
363
  export interface RunRepoContractOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA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