@orkestrel/probe 0.0.25 → 0.0.27

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.
@@ -1,5 +1,4 @@
1
1
  import type { Case } from '@orkestrel/probe';
2
- import type { Check } from '@orkestrel/probe';
3
2
  import type { Claim } from '@orkestrel/probe';
4
3
  import type { EmitterInterface } from '@orkestrel/emitter';
5
4
  import type { EventEmitter } from 'node:events';
@@ -12,6 +11,7 @@ import type { ProbeInterface } from '@orkestrel/probe';
12
11
  import type { ProbeOptions } from '@orkestrel/probe';
13
12
  import type { Project } from '@orkestrel/probe';
14
13
  import type { Stage } from '@orkestrel/probe';
14
+ import type { StageResult } from '@orkestrel/probe';
15
15
  import type { Toolchain } from '@orkestrel/probe';
16
16
  import type { Verdict } from '@orkestrel/probe';
17
17
  import type * as VitestNode from 'vitest/node';
@@ -86,10 +86,10 @@ export declare function collectWorkspaceFiles(workspace: string): readonly strin
86
86
  *
87
87
  * @example
88
88
  * ```ts
89
- * computeDigest('/srv/checkout', { strict: true }).length // 32
89
+ * computeWorkspaceDigest('/srv/checkout', { strict: true }).length // 32
90
90
  * ```
91
91
  */
92
- export declare function computeDigest(workspace: string, value: unknown): string;
92
+ export declare function computeWorkspaceDigest(workspace: string, value: unknown): string;
93
93
 
94
94
  /**
95
95
  * Creates the protocol failure returned when the MCP handshake cannot arm the probe.
@@ -397,7 +397,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
397
397
  *
398
398
  * @remarks
399
399
  * Starting launches the target workspace's Oxlint binary with its Language Server Protocol mode
400
- * and hands the conversation to `@orkestrel/lsp`: `createStdioClientTransport` owns the child
400
+ * and hands the conversation to `@orkestrel/lsp`: `createLSPStdioTransport` owns the child
401
401
  * process and its bytes, and `createLSPClient` owns the framing, the request correlation, the
402
402
  * capabilities this stage advertises, and the choice between pulled and pushed diagnostics. This
403
403
  * stage owns the workspace, the candidate identity, and the projection from a diagnostic to an
@@ -425,7 +425,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
425
425
  * @example
426
426
  * ```ts
427
427
  * const stage = new LintStage('/srv/checkout')
428
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
428
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
429
429
  * await stage.destroy()
430
430
  * ```
431
431
  */
@@ -441,7 +441,7 @@ export declare class LintStage implements LintStageInterface {
441
441
  get progress(): number;
442
442
  get exit(): Promise<never>;
443
443
  start(): Promise<void>;
444
- inspect(subject: Case, options?: InspectionOptions): Promise<Check>;
444
+ inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
445
445
  destroy(): Promise<void>;
446
446
  }
447
447
 
@@ -461,7 +461,7 @@ export declare class LintStage implements LintStageInterface {
461
461
  *
462
462
  * @example
463
463
  * ```ts
464
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
464
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
465
465
  * ```
466
466
  */
467
467
  export declare interface LintStageInterface extends StageInterface {
@@ -478,10 +478,10 @@ export declare interface LintStageInterface extends StageInterface {
478
478
  *
479
479
  * @example
480
480
  * ```ts
481
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
481
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
482
482
  * ```
483
483
  */
484
- inspect(subject: Case, options?: InspectionOptions): Promise<Check>;
484
+ inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
485
485
  }
486
486
 
487
487
  /**
@@ -524,13 +524,11 @@ export declare type ListenerCapture = ReadonlyMap<string, readonly Function[]>;
524
524
  export declare function loadWorkspaceVitest(workspace: string): typeof VitestNode;
525
525
 
526
526
  /**
527
- * Reports whether the host that wrote one file is still running.
527
+ * Reports whether a file's owning host is running or cannot be judged.
528
528
  *
529
529
  * @remarks
530
- * Signal 0 delivers nothing and reports reachability alone. A process this one may not signal
531
- * reports `EPERM` and reads as running, and a non-positive identity names a process group rather
532
- * than a process, so both answer true: the safe direction is to keep a file this package cannot
533
- * account for.
530
+ * Keeps a file when its identity is invalid or `inspectProcess` reports existence, denied
531
+ * permission, or an indeterminate host failure. Only a confirmed absent process answers false.
534
532
  *
535
533
  * @param id - The process id a file's own revision names
536
534
  * @returns True if that process is running or cannot be judged; false otherwise
@@ -586,7 +584,8 @@ export declare function normalizePath(path: string): string;
586
584
  * its relative form keeps one commit checked out at two roots reading to one digest. A path that
587
585
  * escapes the workspace is left as it stands, because rewriting it would name a file outside the
588
586
  * tree by a relative spelling. Key order is the compiler's own and it differs between the supported
589
- * majors, so sorting removes a difference that means nothing.
587
+ * majors, so sorting removes a difference that means nothing. A `__proto__` key is dropped, as
588
+ * the earlier assignment-built record dropped it, so a digest stays the same across releases.
590
589
  *
591
590
  * @param workspace - The target workspace root
592
591
  * @param value - The value to rewrite
@@ -1308,7 +1307,7 @@ export declare function resolveWorkspaceModule(workspace: string, specifier: str
1308
1307
  * @example
1309
1308
  * ```ts
1310
1309
  * const stage = new RuntimeStage('/srv/checkout')
1311
- * const check = await stage.inspect(subject)
1310
+ * const result = await stage.inspect(subject)
1312
1311
  * await stage.destroy()
1313
1312
  * ```
1314
1313
  */
@@ -1336,7 +1335,7 @@ export declare class RuntimeStage implements StageInterface {
1336
1335
  * @returns One outcome for this stage
1337
1336
  * @throws When the workspace's own tool cannot start or has already been destroyed
1338
1337
  */
1339
- inspect(subject: Case): Promise<Check>;
1338
+ inspect(subject: Case): Promise<StageResult>;
1340
1339
  /**
1341
1340
  * Tears down the resident tool or the mirror and releases its resources.
1342
1341
  *
@@ -1396,8 +1395,8 @@ export declare function scanDiagnostics(text: string): readonly Diagnostic[];
1396
1395
  *
1397
1396
  * @example
1398
1397
  * ```ts
1399
- * const check = await stage.inspect(subject)
1400
- * console.log(check.stage)
1398
+ * const result = await stage.inspect(subject)
1399
+ * console.log(result.stage)
1401
1400
  * await stage.destroy()
1402
1401
  * ```
1403
1402
  */
@@ -1431,11 +1430,11 @@ export declare interface StageInterface {
1431
1430
  *
1432
1431
  * @example
1433
1432
  * ```ts
1434
- * const check = await stage.inspect(subject)
1435
- * console.log(check.stage, check.elapsed, check.issues.length)
1433
+ * const result = await stage.inspect(subject)
1434
+ * console.log(result.stage, result.elapsed, result.issues.length)
1436
1435
  * ```
1437
1436
  */
1438
- inspect(subject: Case): Promise<Check>;
1437
+ inspect(subject: Case): Promise<StageResult>;
1439
1438
  /**
1440
1439
  * Tears down the resident tool or the mirror and releases its resources.
1441
1440
  *
@@ -1485,7 +1484,7 @@ export declare interface StageInterface {
1485
1484
  * @example
1486
1485
  * ```ts
1487
1486
  * const stage = new TypeStage('/srv/checkout')
1488
- * const check = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1487
+ * const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1489
1488
  * await stage.destroy()
1490
1489
  * ```
1491
1490
  */
@@ -1515,7 +1514,7 @@ export declare class TypeStage implements TypeStageInterface {
1515
1514
  * @throws When the workspace refuses the mirror, when a project the run reads is malformed, or
1516
1515
  * when the stage has already been destroyed
1517
1516
  */
1518
- inspect(subject: Case, project?: string): Promise<Check>;
1517
+ inspect(subject: Case, project?: string): Promise<StageResult>;
1519
1518
  /**
1520
1519
  * Resolves one project to the path and digest this stage applies for it.
1521
1520
  *
@@ -1533,6 +1532,14 @@ export declare class TypeStage implements TypeStageInterface {
1533
1532
  * stage has already been destroyed
1534
1533
  */
1535
1534
  resolve(project: string): Promise<Project>;
1535
+ /**
1536
+ * Tears down the compiler processes and releases the mirror without awaiting inspections.
1537
+ *
1538
+ * @remarks
1539
+ * On Windows, awaits each tree termination attempt before removing the mirror. Each attempt
1540
+ * uses `PROBE_DEADLINE`, the existing default inspection budget, as its utility timeout.
1541
+ * On POSIX, sends `SIGTERM` to each compiler. Warming settles before the mirror is removed.
1542
+ */
1536
1543
  destroy(): Promise<void>;
1537
1544
  }
1538
1545
 
@@ -1548,7 +1555,7 @@ export declare class TypeStage implements TypeStageInterface {
1548
1555
  * @example
1549
1556
  * ```ts
1550
1557
  * const project = await stage.resolve('configs/src/tsconfig.core.json')
1551
- * const check = await stage.inspect(subject, project.path)
1558
+ * const result = await stage.inspect(subject, project.path)
1552
1559
  * ```
1553
1560
  */
1554
1561
  export declare interface TypeStageInterface extends StageInterface {
@@ -1564,10 +1571,10 @@ export declare interface TypeStageInterface extends StageInterface {
1564
1571
  *
1565
1572
  * @example
1566
1573
  * ```ts
1567
- * const check = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1574
+ * const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1568
1575
  * ```
1569
1576
  */
1570
- inspect(subject: Case, project?: string): Promise<Check>;
1577
+ inspect(subject: Case, project?: string): Promise<StageResult>;
1571
1578
  /**
1572
1579
  * Resolves one project to the path and digest the stage applies for it.
1573
1580
  * Calls `start()` before reading the project.
@@ -1,5 +1,4 @@
1
1
  import type { Case } from '@orkestrel/probe';
2
- import type { Check } from '@orkestrel/probe';
3
2
  import type { Claim } from '@orkestrel/probe';
4
3
  import type { EmitterInterface } from '@orkestrel/emitter';
5
4
  import type { EventEmitter } from 'node:events';
@@ -12,6 +11,7 @@ import type { ProbeInterface } from '@orkestrel/probe';
12
11
  import type { ProbeOptions } from '@orkestrel/probe';
13
12
  import type { Project } from '@orkestrel/probe';
14
13
  import type { Stage } from '@orkestrel/probe';
14
+ import type { StageResult } from '@orkestrel/probe';
15
15
  import type { Toolchain } from '@orkestrel/probe';
16
16
  import type { Verdict } from '@orkestrel/probe';
17
17
  import type * as VitestNode from 'vitest/node';
@@ -86,10 +86,10 @@ export declare function collectWorkspaceFiles(workspace: string): readonly strin
86
86
  *
87
87
  * @example
88
88
  * ```ts
89
- * computeDigest('/srv/checkout', { strict: true }).length // 32
89
+ * computeWorkspaceDigest('/srv/checkout', { strict: true }).length // 32
90
90
  * ```
91
91
  */
92
- export declare function computeDigest(workspace: string, value: unknown): string;
92
+ export declare function computeWorkspaceDigest(workspace: string, value: unknown): string;
93
93
 
94
94
  /**
95
95
  * Creates the protocol failure returned when the MCP handshake cannot arm the probe.
@@ -397,7 +397,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
397
397
  *
398
398
  * @remarks
399
399
  * Starting launches the target workspace's Oxlint binary with its Language Server Protocol mode
400
- * and hands the conversation to `@orkestrel/lsp`: `createStdioClientTransport` owns the child
400
+ * and hands the conversation to `@orkestrel/lsp`: `createLSPStdioTransport` owns the child
401
401
  * process and its bytes, and `createLSPClient` owns the framing, the request correlation, the
402
402
  * capabilities this stage advertises, and the choice between pulled and pushed diagnostics. This
403
403
  * stage owns the workspace, the candidate identity, and the projection from a diagnostic to an
@@ -425,7 +425,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
425
425
  * @example
426
426
  * ```ts
427
427
  * const stage = new LintStage('/srv/checkout')
428
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
428
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
429
429
  * await stage.destroy()
430
430
  * ```
431
431
  */
@@ -441,7 +441,7 @@ export declare class LintStage implements LintStageInterface {
441
441
  get progress(): number;
442
442
  get exit(): Promise<never>;
443
443
  start(): Promise<void>;
444
- inspect(subject: Case, options?: InspectionOptions): Promise<Check>;
444
+ inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
445
445
  destroy(): Promise<void>;
446
446
  }
447
447
 
@@ -461,7 +461,7 @@ export declare class LintStage implements LintStageInterface {
461
461
  *
462
462
  * @example
463
463
  * ```ts
464
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
464
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
465
465
  * ```
466
466
  */
467
467
  export declare interface LintStageInterface extends StageInterface {
@@ -478,10 +478,10 @@ export declare interface LintStageInterface extends StageInterface {
478
478
  *
479
479
  * @example
480
480
  * ```ts
481
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
481
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
482
482
  * ```
483
483
  */
484
- inspect(subject: Case, options?: InspectionOptions): Promise<Check>;
484
+ inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
485
485
  }
486
486
 
487
487
  /**
@@ -524,13 +524,11 @@ export declare type ListenerCapture = ReadonlyMap<string, readonly Function[]>;
524
524
  export declare function loadWorkspaceVitest(workspace: string): typeof VitestNode;
525
525
 
526
526
  /**
527
- * Reports whether the host that wrote one file is still running.
527
+ * Reports whether a file's owning host is running or cannot be judged.
528
528
  *
529
529
  * @remarks
530
- * Signal 0 delivers nothing and reports reachability alone. A process this one may not signal
531
- * reports `EPERM` and reads as running, and a non-positive identity names a process group rather
532
- * than a process, so both answer true: the safe direction is to keep a file this package cannot
533
- * account for.
530
+ * Keeps a file when its identity is invalid or `inspectProcess` reports existence, denied
531
+ * permission, or an indeterminate host failure. Only a confirmed absent process answers false.
534
532
  *
535
533
  * @param id - The process id a file's own revision names
536
534
  * @returns True if that process is running or cannot be judged; false otherwise
@@ -586,7 +584,8 @@ export declare function normalizePath(path: string): string;
586
584
  * its relative form keeps one commit checked out at two roots reading to one digest. A path that
587
585
  * escapes the workspace is left as it stands, because rewriting it would name a file outside the
588
586
  * tree by a relative spelling. Key order is the compiler's own and it differs between the supported
589
- * majors, so sorting removes a difference that means nothing.
587
+ * majors, so sorting removes a difference that means nothing. A `__proto__` key is dropped, as
588
+ * the earlier assignment-built record dropped it, so a digest stays the same across releases.
590
589
  *
591
590
  * @param workspace - The target workspace root
592
591
  * @param value - The value to rewrite
@@ -1308,7 +1307,7 @@ export declare function resolveWorkspaceModule(workspace: string, specifier: str
1308
1307
  * @example
1309
1308
  * ```ts
1310
1309
  * const stage = new RuntimeStage('/srv/checkout')
1311
- * const check = await stage.inspect(subject)
1310
+ * const result = await stage.inspect(subject)
1312
1311
  * await stage.destroy()
1313
1312
  * ```
1314
1313
  */
@@ -1336,7 +1335,7 @@ export declare class RuntimeStage implements StageInterface {
1336
1335
  * @returns One outcome for this stage
1337
1336
  * @throws When the workspace's own tool cannot start or has already been destroyed
1338
1337
  */
1339
- inspect(subject: Case): Promise<Check>;
1338
+ inspect(subject: Case): Promise<StageResult>;
1340
1339
  /**
1341
1340
  * Tears down the resident tool or the mirror and releases its resources.
1342
1341
  *
@@ -1396,8 +1395,8 @@ export declare function scanDiagnostics(text: string): readonly Diagnostic[];
1396
1395
  *
1397
1396
  * @example
1398
1397
  * ```ts
1399
- * const check = await stage.inspect(subject)
1400
- * console.log(check.stage)
1398
+ * const result = await stage.inspect(subject)
1399
+ * console.log(result.stage)
1401
1400
  * await stage.destroy()
1402
1401
  * ```
1403
1402
  */
@@ -1431,11 +1430,11 @@ export declare interface StageInterface {
1431
1430
  *
1432
1431
  * @example
1433
1432
  * ```ts
1434
- * const check = await stage.inspect(subject)
1435
- * console.log(check.stage, check.elapsed, check.issues.length)
1433
+ * const result = await stage.inspect(subject)
1434
+ * console.log(result.stage, result.elapsed, result.issues.length)
1436
1435
  * ```
1437
1436
  */
1438
- inspect(subject: Case): Promise<Check>;
1437
+ inspect(subject: Case): Promise<StageResult>;
1439
1438
  /**
1440
1439
  * Tears down the resident tool or the mirror and releases its resources.
1441
1440
  *
@@ -1485,7 +1484,7 @@ export declare interface StageInterface {
1485
1484
  * @example
1486
1485
  * ```ts
1487
1486
  * const stage = new TypeStage('/srv/checkout')
1488
- * const check = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1487
+ * const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1489
1488
  * await stage.destroy()
1490
1489
  * ```
1491
1490
  */
@@ -1515,7 +1514,7 @@ export declare class TypeStage implements TypeStageInterface {
1515
1514
  * @throws When the workspace refuses the mirror, when a project the run reads is malformed, or
1516
1515
  * when the stage has already been destroyed
1517
1516
  */
1518
- inspect(subject: Case, project?: string): Promise<Check>;
1517
+ inspect(subject: Case, project?: string): Promise<StageResult>;
1519
1518
  /**
1520
1519
  * Resolves one project to the path and digest this stage applies for it.
1521
1520
  *
@@ -1533,6 +1532,14 @@ export declare class TypeStage implements TypeStageInterface {
1533
1532
  * stage has already been destroyed
1534
1533
  */
1535
1534
  resolve(project: string): Promise<Project>;
1535
+ /**
1536
+ * Tears down the compiler processes and releases the mirror without awaiting inspections.
1537
+ *
1538
+ * @remarks
1539
+ * On Windows, awaits each tree termination attempt before removing the mirror. Each attempt
1540
+ * uses `PROBE_DEADLINE`, the existing default inspection budget, as its utility timeout.
1541
+ * On POSIX, sends `SIGTERM` to each compiler. Warming settles before the mirror is removed.
1542
+ */
1536
1543
  destroy(): Promise<void>;
1537
1544
  }
1538
1545
 
@@ -1548,7 +1555,7 @@ export declare class TypeStage implements TypeStageInterface {
1548
1555
  * @example
1549
1556
  * ```ts
1550
1557
  * const project = await stage.resolve('configs/src/tsconfig.core.json')
1551
- * const check = await stage.inspect(subject, project.path)
1558
+ * const result = await stage.inspect(subject, project.path)
1552
1559
  * ```
1553
1560
  */
1554
1561
  export declare interface TypeStageInterface extends StageInterface {
@@ -1564,10 +1571,10 @@ export declare interface TypeStageInterface extends StageInterface {
1564
1571
  *
1565
1572
  * @example
1566
1573
  * ```ts
1567
- * const check = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1574
+ * const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
1568
1575
  * ```
1569
1576
  */
1570
- inspect(subject: Case, project?: string): Promise<Check>;
1577
+ inspect(subject: Case, project?: string): Promise<StageResult>;
1571
1578
  /**
1572
1579
  * Resolves one project to the path and digest the stage applies for it.
1573
1580
  * Calls `start()` before reading the project.