@orkestrel/capture 0.0.4 → 0.0.6

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.
@@ -258,6 +258,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
258
258
  plan: Readonly<{
259
259
  type: "boolean";
260
260
  }>;
261
+ mode: Readonly<{
262
+ type: "string";
263
+ }>;
261
264
  }>;
262
265
  readonly capture: Readonly<{
263
266
  config: Readonly<{
@@ -279,6 +282,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
279
282
  plan: Readonly<{
280
283
  type: "boolean";
281
284
  }>;
285
+ mode: Readonly<{
286
+ type: "string";
287
+ }>;
282
288
  }>;
283
289
  readonly stale: Readonly<{
284
290
  config: Readonly<{
@@ -297,6 +303,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
297
303
  portfolio: Readonly<{
298
304
  type: "string";
299
305
  }>;
306
+ mode: Readonly<{
307
+ type: "string";
308
+ }>;
300
309
  }>;
301
310
  readonly preflight: Readonly<{
302
311
  variant: Readonly<{
@@ -321,6 +330,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
321
330
  checks: Readonly<{
322
331
  type: "string";
323
332
  }>;
333
+ mode: Readonly<{
334
+ type: "string";
335
+ }>;
324
336
  }>;
325
337
  readonly sheets: Readonly<{
326
338
  variant: Readonly<{
@@ -345,6 +357,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
345
357
  checks: Readonly<{
346
358
  type: "string";
347
359
  }>;
360
+ mode: Readonly<{
361
+ type: "string";
362
+ }>;
348
363
  output: Readonly<{
349
364
  type: "string";
350
365
  }>;
@@ -537,11 +552,11 @@ export declare const CAPTURE_REFUSAL_LIMIT = 16;
537
552
  export declare const CAPTURE_REGISTRY_LINE = "REGISTRY";
538
553
 
539
554
  /**
540
- * Names the stage each producing variant's complete journey runs in, ahead of the variant's name.
555
+ * Names the one stage a registry refresh runs every selected producing variant's complete journey in.
541
556
  *
542
557
  * @example
543
558
  * ```ts
544
- * `${CAPTURE_REGISTRY_STAGE}-light-390` // 'registry-light-390'
559
+ * `runs/${id}/${CAPTURE_REGISTRY_STAGE}/light-390.json` // 'runs/<id>/registry/light-390.json'
545
560
  * ```
546
561
  */
547
562
  export declare const CAPTURE_REGISTRY_STAGE = "registry";
@@ -696,7 +711,7 @@ export declare const CAPTURE_VITEST_ENTRY = "node_modules/vitest/vitest.mjs";
696
711
  * absolute JSON reporter path and `projects` the Vitest project labels the stage runs. `filter`
697
712
  * is the tag expression. An exact `case` adds the anchored name pattern for that case and the
698
713
  * `final` case, so the final case still writes the run record. A `mode` adds Vitest's `--mode`
699
- * flag, which the registry command forwards so a wrapper can select another registry.
714
+ * flag to discovery and execution children.
700
715
  *
701
716
  * @example
702
717
  * ```ts
@@ -1049,7 +1064,7 @@ export declare interface CaptureDiscoveryInterface {
1049
1064
  * @remarks
1050
1065
  * `ppid`, `argv`, `directory`, and `config` are the ones `CaptureRequestOptions` names. `projects`
1051
1066
  * is the wrapper's own `test.projects` list, each entry an inline project, a promise of one, or a
1052
- * factory, which the answer resolves the way Vitest does.
1067
+ * factory, which the answer resolves with the requested mode or the default test mode.
1053
1068
  *
1054
1069
  * @example
1055
1070
  * ```ts
@@ -1076,7 +1091,8 @@ export declare interface CaptureDiscoveryOptions {
1076
1091
  * `phase` is always `discover`, which is what tells a wrapper this is no execution request. `nonce`
1077
1092
  * is the challenge the wrapper must echo in its answer, `pid` the runner's process id, `config` the
1078
1093
  * repository-relative wrapper path, and `args` the exact arguments the discovery child was spawned
1079
- * with. The file has the name and location of an execution request, so one lease covers both.
1094
+ * with. `mode` is present when the command line selects one. The file has the name and location of
1095
+ * an execution request, so one lease covers both.
1080
1096
  *
1081
1097
  * @example
1082
1098
  * ```ts
@@ -1097,6 +1113,7 @@ export declare interface CaptureDiscoveryRequest {
1097
1113
  readonly id: string;
1098
1114
  readonly nonce: string;
1099
1115
  readonly config: string;
1116
+ readonly mode?: string;
1100
1117
  readonly pid: number;
1101
1118
  readonly args: readonly string[];
1102
1119
  }
@@ -2173,7 +2190,8 @@ export declare interface CaptureReaderDefaults {
2173
2190
  * Configures a read-only capture consumer using the wrapper's host declarations.
2174
2191
  *
2175
2192
  * @remarks
2176
- * `root` is the absolute workspace and `config` the absolute wrapper path. `selection` bounds the
2193
+ * `root` is the absolute workspace and `config` the absolute wrapper path. `mode` selects Vitest's
2194
+ * wrapper mode when present. `selection` bounds the
2177
2195
  * population, and `journeys` is the absolute directory of journey artifacts. `checks`, when
2178
2196
  * supplied, is the path of a module, absolute or relative to `root`, that exports the host's
2179
2197
  * `CAPTURE_CHECKS` list of frame readers. The reader loads it through the runtime's own module
@@ -2197,6 +2215,7 @@ export declare interface CaptureReaderDefaults {
2197
2215
  export declare interface CaptureReaderOptions {
2198
2216
  readonly root: string;
2199
2217
  readonly config: string;
2218
+ readonly mode?: string;
2200
2219
  readonly selection: CaptureReadOptions;
2201
2220
  readonly journeys: string;
2202
2221
  readonly checks?: string;
@@ -2273,15 +2292,16 @@ export declare interface CaptureReceiptInput {
2273
2292
  }
2274
2293
 
2275
2294
  /**
2276
- * Refreshes the accepted registry from one complete capture-free journey per producing variant.
2295
+ * Refreshes the accepted registry from one complete capture-free journey stage over the selected variants.
2277
2296
  *
2278
2297
  * @remarks
2279
2298
  * The refresh is the one route that bootstraps or replaces the registry the stage transaction
2280
2299
  * requires, so it cannot stamp through the integrity engine. It reads the wrapper through the same
2281
2300
  * discovery the runner uses, takes the same invocation entity, request file, and Vitest child, and runs
2282
- * each producing variant as a stage of its own with the `all` selector and no capture variable. It
2283
- * reads each stage's reporter and final record, takes the project's input population before and
2284
- * after, and builds the receipts through `buildCaptureRegistry`. The registry is written to a
2301
+ * every selected producing variant in one stage, one child that receives each variant's project, with
2302
+ * the `all` selector and no capture variable. It reads the stage's reporter once and each variant's
2303
+ * final record, takes each project's input population before and after, and builds one receipt per
2304
+ * variant, all naming the one reporter, through `buildCaptureRegistry`. The registry is written to a
2285
2305
  * candidate beside its target, read back through the integrity engine, and only then renamed into
2286
2306
  * place, so a registry the engine would refuse never replaces a good one. With `--variant`, the
2287
2307
  * existing registry's receipts for the other declared variants are kept. It never widens a scoped
@@ -2312,7 +2332,7 @@ export declare class CaptureRegistrar implements CaptureRegistrarInterface {
2312
2332
  }
2313
2333
 
2314
2334
  /**
2315
- * Refreshes the accepted registry from one complete capture-free journey per producing variant.
2335
+ * Refreshes the accepted registry from one complete capture-free journey stage over the selected variants.
2316
2336
  *
2317
2337
  * @example
2318
2338
  * ```ts
@@ -2474,7 +2494,8 @@ export declare class CaptureRunner implements CaptureRunnerInterface {
2474
2494
  }
2475
2495
 
2476
2496
  /**
2477
- * Carries parsed runner arguments while leaving omitted selectors available to the usage diagnostic.
2497
+ * Carries parsed runner arguments, including an optional wrapper mode, while leaving omitted
2498
+ * selectors available to the usage diagnostic.
2478
2499
  *
2479
2500
  * @example
2480
2501
  * ```ts
@@ -2486,6 +2507,7 @@ export declare interface CaptureRunnerArguments {
2486
2507
  readonly changed?: string;
2487
2508
  readonly plan?: boolean;
2488
2509
  readonly config: string;
2510
+ readonly mode?: string;
2489
2511
  readonly variants: readonly string[];
2490
2512
  readonly case?: string;
2491
2513
  readonly state?: string;
@@ -2560,7 +2582,7 @@ export declare interface CaptureRunnerOptions {
2560
2582
  * wrapper path, and `final` the full name of the case that closes a variant's run. `filter` is
2561
2583
  * the tag expression. `case` and `state` appear only when the command line named them, and `case`
2562
2584
  * holds the resolved declaring case once a state selects one. `command` is the request command
2563
- * every stage records.
2585
+ * every stage records. `mode` selects the wrapper's Vitest mode when present.
2564
2586
  *
2565
2587
  * @example
2566
2588
  * ```ts
@@ -2585,6 +2607,7 @@ export declare interface CaptureRunPlan {
2585
2607
  readonly final: string;
2586
2608
  readonly directory: string;
2587
2609
  readonly config: string;
2610
+ readonly mode?: string;
2588
2611
  }
2589
2612
 
2590
2613
  /**
@@ -3509,7 +3532,7 @@ export declare function readCaptureProject(test: unknown): CaptureProject;
3509
3532
  * @remarks
3510
3533
  * The first argument is the selector and every flag after it takes one nonempty value, separated
3511
3534
  * or in equals form. Only `--variant` repeats. `--output` belongs to sheets; the preflight option
3512
- * table refuses it before discovery. The wrapper, the journey artifact directory, and the checks module
3535
+ * table refuses it before discovery. `--mode` selects the wrapper's Vitest mode. The wrapper, the journey artifact directory, and the checks module
3513
3536
  * resolve against `root`; `defaults` supplies the first two when the command line names neither.
3514
3537
  *
3515
3538
  * @param argv - The arguments after the entry name
@@ -3845,8 +3868,8 @@ export declare function resolveCaptureVariants(selected: readonly string[], proj
3845
3868
  * Resolves one entry of a wrapper's project list to the project it declares.
3846
3869
  *
3847
3870
  * @remarks
3848
- * A factory entry is called with the serve command and the test mode, as Vitest calls it, and a
3849
- * promise is awaited. The result is the project as plain data, not yet judged: the runner reads
3871
+ * A factory entry is called with the serve command and the requested mode, or the default test
3872
+ * mode, as Vitest calls it, and a promise is awaited. The result is the project as plain data: the runner reads
3850
3873
  * and validates it, so one reader owns every refusal.
3851
3874
  *
3852
3875
  * @param input - The entry as the wrapper declared it: an inline project, a promise of one, or a factory
@@ -3857,7 +3880,7 @@ export declare function resolveCaptureVariants(selected: readonly string[], proj
3857
3880
  * const project = await resolveCaptureWrapperProject(wrapper.test.projects[0])
3858
3881
  * ```
3859
3882
  */
3860
- export declare function resolveCaptureWrapperProject(input: unknown): Promise<unknown>;
3883
+ export declare function resolveCaptureWrapperProject(input: unknown, mode?: string): Promise<unknown>;
3861
3884
 
3862
3885
  /**
3863
3886
  * Reports a portfolio, owner, and viewport whose frames mix cropped, viewport-sized, and page-sized images.
@@ -258,6 +258,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
258
258
  plan: Readonly<{
259
259
  type: "boolean";
260
260
  }>;
261
+ mode: Readonly<{
262
+ type: "string";
263
+ }>;
261
264
  }>;
262
265
  readonly capture: Readonly<{
263
266
  config: Readonly<{
@@ -279,6 +282,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
279
282
  plan: Readonly<{
280
283
  type: "boolean";
281
284
  }>;
285
+ mode: Readonly<{
286
+ type: "string";
287
+ }>;
282
288
  }>;
283
289
  readonly stale: Readonly<{
284
290
  config: Readonly<{
@@ -297,6 +303,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
297
303
  portfolio: Readonly<{
298
304
  type: "string";
299
305
  }>;
306
+ mode: Readonly<{
307
+ type: "string";
308
+ }>;
300
309
  }>;
301
310
  readonly preflight: Readonly<{
302
311
  variant: Readonly<{
@@ -321,6 +330,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
321
330
  checks: Readonly<{
322
331
  type: "string";
323
332
  }>;
333
+ mode: Readonly<{
334
+ type: "string";
335
+ }>;
324
336
  }>;
325
337
  readonly sheets: Readonly<{
326
338
  variant: Readonly<{
@@ -345,6 +357,9 @@ export declare const CAPTURE_COMMAND_OPTIONS: Readonly<{
345
357
  checks: Readonly<{
346
358
  type: "string";
347
359
  }>;
360
+ mode: Readonly<{
361
+ type: "string";
362
+ }>;
348
363
  output: Readonly<{
349
364
  type: "string";
350
365
  }>;
@@ -537,11 +552,11 @@ export declare const CAPTURE_REFUSAL_LIMIT = 16;
537
552
  export declare const CAPTURE_REGISTRY_LINE = "REGISTRY";
538
553
 
539
554
  /**
540
- * Names the stage each producing variant's complete journey runs in, ahead of the variant's name.
555
+ * Names the one stage a registry refresh runs every selected producing variant's complete journey in.
541
556
  *
542
557
  * @example
543
558
  * ```ts
544
- * `${CAPTURE_REGISTRY_STAGE}-light-390` // 'registry-light-390'
559
+ * `runs/${id}/${CAPTURE_REGISTRY_STAGE}/light-390.json` // 'runs/<id>/registry/light-390.json'
545
560
  * ```
546
561
  */
547
562
  export declare const CAPTURE_REGISTRY_STAGE = "registry";
@@ -696,7 +711,7 @@ export declare const CAPTURE_VITEST_ENTRY = "node_modules/vitest/vitest.mjs";
696
711
  * absolute JSON reporter path and `projects` the Vitest project labels the stage runs. `filter`
697
712
  * is the tag expression. An exact `case` adds the anchored name pattern for that case and the
698
713
  * `final` case, so the final case still writes the run record. A `mode` adds Vitest's `--mode`
699
- * flag, which the registry command forwards so a wrapper can select another registry.
714
+ * flag to discovery and execution children.
700
715
  *
701
716
  * @example
702
717
  * ```ts
@@ -1049,7 +1064,7 @@ export declare interface CaptureDiscoveryInterface {
1049
1064
  * @remarks
1050
1065
  * `ppid`, `argv`, `directory`, and `config` are the ones `CaptureRequestOptions` names. `projects`
1051
1066
  * is the wrapper's own `test.projects` list, each entry an inline project, a promise of one, or a
1052
- * factory, which the answer resolves the way Vitest does.
1067
+ * factory, which the answer resolves with the requested mode or the default test mode.
1053
1068
  *
1054
1069
  * @example
1055
1070
  * ```ts
@@ -1076,7 +1091,8 @@ export declare interface CaptureDiscoveryOptions {
1076
1091
  * `phase` is always `discover`, which is what tells a wrapper this is no execution request. `nonce`
1077
1092
  * is the challenge the wrapper must echo in its answer, `pid` the runner's process id, `config` the
1078
1093
  * repository-relative wrapper path, and `args` the exact arguments the discovery child was spawned
1079
- * with. The file has the name and location of an execution request, so one lease covers both.
1094
+ * with. `mode` is present when the command line selects one. The file has the name and location of
1095
+ * an execution request, so one lease covers both.
1080
1096
  *
1081
1097
  * @example
1082
1098
  * ```ts
@@ -1097,6 +1113,7 @@ export declare interface CaptureDiscoveryRequest {
1097
1113
  readonly id: string;
1098
1114
  readonly nonce: string;
1099
1115
  readonly config: string;
1116
+ readonly mode?: string;
1100
1117
  readonly pid: number;
1101
1118
  readonly args: readonly string[];
1102
1119
  }
@@ -2173,7 +2190,8 @@ export declare interface CaptureReaderDefaults {
2173
2190
  * Configures a read-only capture consumer using the wrapper's host declarations.
2174
2191
  *
2175
2192
  * @remarks
2176
- * `root` is the absolute workspace and `config` the absolute wrapper path. `selection` bounds the
2193
+ * `root` is the absolute workspace and `config` the absolute wrapper path. `mode` selects Vitest's
2194
+ * wrapper mode when present. `selection` bounds the
2177
2195
  * population, and `journeys` is the absolute directory of journey artifacts. `checks`, when
2178
2196
  * supplied, is the path of a module, absolute or relative to `root`, that exports the host's
2179
2197
  * `CAPTURE_CHECKS` list of frame readers. The reader loads it through the runtime's own module
@@ -2197,6 +2215,7 @@ export declare interface CaptureReaderDefaults {
2197
2215
  export declare interface CaptureReaderOptions {
2198
2216
  readonly root: string;
2199
2217
  readonly config: string;
2218
+ readonly mode?: string;
2200
2219
  readonly selection: CaptureReadOptions;
2201
2220
  readonly journeys: string;
2202
2221
  readonly checks?: string;
@@ -2273,15 +2292,16 @@ export declare interface CaptureReceiptInput {
2273
2292
  }
2274
2293
 
2275
2294
  /**
2276
- * Refreshes the accepted registry from one complete capture-free journey per producing variant.
2295
+ * Refreshes the accepted registry from one complete capture-free journey stage over the selected variants.
2277
2296
  *
2278
2297
  * @remarks
2279
2298
  * The refresh is the one route that bootstraps or replaces the registry the stage transaction
2280
2299
  * requires, so it cannot stamp through the integrity engine. It reads the wrapper through the same
2281
2300
  * discovery the runner uses, takes the same invocation entity, request file, and Vitest child, and runs
2282
- * each producing variant as a stage of its own with the `all` selector and no capture variable. It
2283
- * reads each stage's reporter and final record, takes the project's input population before and
2284
- * after, and builds the receipts through `buildCaptureRegistry`. The registry is written to a
2301
+ * every selected producing variant in one stage, one child that receives each variant's project, with
2302
+ * the `all` selector and no capture variable. It reads the stage's reporter once and each variant's
2303
+ * final record, takes each project's input population before and after, and builds one receipt per
2304
+ * variant, all naming the one reporter, through `buildCaptureRegistry`. The registry is written to a
2285
2305
  * candidate beside its target, read back through the integrity engine, and only then renamed into
2286
2306
  * place, so a registry the engine would refuse never replaces a good one. With `--variant`, the
2287
2307
  * existing registry's receipts for the other declared variants are kept. It never widens a scoped
@@ -2312,7 +2332,7 @@ export declare class CaptureRegistrar implements CaptureRegistrarInterface {
2312
2332
  }
2313
2333
 
2314
2334
  /**
2315
- * Refreshes the accepted registry from one complete capture-free journey per producing variant.
2335
+ * Refreshes the accepted registry from one complete capture-free journey stage over the selected variants.
2316
2336
  *
2317
2337
  * @example
2318
2338
  * ```ts
@@ -2474,7 +2494,8 @@ export declare class CaptureRunner implements CaptureRunnerInterface {
2474
2494
  }
2475
2495
 
2476
2496
  /**
2477
- * Carries parsed runner arguments while leaving omitted selectors available to the usage diagnostic.
2497
+ * Carries parsed runner arguments, including an optional wrapper mode, while leaving omitted
2498
+ * selectors available to the usage diagnostic.
2478
2499
  *
2479
2500
  * @example
2480
2501
  * ```ts
@@ -2486,6 +2507,7 @@ export declare interface CaptureRunnerArguments {
2486
2507
  readonly changed?: string;
2487
2508
  readonly plan?: boolean;
2488
2509
  readonly config: string;
2510
+ readonly mode?: string;
2489
2511
  readonly variants: readonly string[];
2490
2512
  readonly case?: string;
2491
2513
  readonly state?: string;
@@ -2560,7 +2582,7 @@ export declare interface CaptureRunnerOptions {
2560
2582
  * wrapper path, and `final` the full name of the case that closes a variant's run. `filter` is
2561
2583
  * the tag expression. `case` and `state` appear only when the command line named them, and `case`
2562
2584
  * holds the resolved declaring case once a state selects one. `command` is the request command
2563
- * every stage records.
2585
+ * every stage records. `mode` selects the wrapper's Vitest mode when present.
2564
2586
  *
2565
2587
  * @example
2566
2588
  * ```ts
@@ -2585,6 +2607,7 @@ export declare interface CaptureRunPlan {
2585
2607
  readonly final: string;
2586
2608
  readonly directory: string;
2587
2609
  readonly config: string;
2610
+ readonly mode?: string;
2588
2611
  }
2589
2612
 
2590
2613
  /**
@@ -3509,7 +3532,7 @@ export declare function readCaptureProject(test: unknown): CaptureProject;
3509
3532
  * @remarks
3510
3533
  * The first argument is the selector and every flag after it takes one nonempty value, separated
3511
3534
  * or in equals form. Only `--variant` repeats. `--output` belongs to sheets; the preflight option
3512
- * table refuses it before discovery. The wrapper, the journey artifact directory, and the checks module
3535
+ * table refuses it before discovery. `--mode` selects the wrapper's Vitest mode. The wrapper, the journey artifact directory, and the checks module
3513
3536
  * resolve against `root`; `defaults` supplies the first two when the command line names neither.
3514
3537
  *
3515
3538
  * @param argv - The arguments after the entry name
@@ -3845,8 +3868,8 @@ export declare function resolveCaptureVariants(selected: readonly string[], proj
3845
3868
  * Resolves one entry of a wrapper's project list to the project it declares.
3846
3869
  *
3847
3870
  * @remarks
3848
- * A factory entry is called with the serve command and the test mode, as Vitest calls it, and a
3849
- * promise is awaited. The result is the project as plain data, not yet judged: the runner reads
3871
+ * A factory entry is called with the serve command and the requested mode, or the default test
3872
+ * mode, as Vitest calls it, and a promise is awaited. The result is the project as plain data: the runner reads
3850
3873
  * and validates it, so one reader owns every refusal.
3851
3874
  *
3852
3875
  * @param input - The entry as the wrapper declared it: an inline project, a promise of one, or a factory
@@ -3857,7 +3880,7 @@ export declare function resolveCaptureVariants(selected: readonly string[], proj
3857
3880
  * const project = await resolveCaptureWrapperProject(wrapper.test.projects[0])
3858
3881
  * ```
3859
3882
  */
3860
- export declare function resolveCaptureWrapperProject(input: unknown): Promise<unknown>;
3883
+ export declare function resolveCaptureWrapperProject(input: unknown, mode?: string): Promise<unknown>;
3861
3884
 
3862
3885
  /**
3863
3886
  * Reports a portfolio, owner, and viewport whose frames mix cropped, viewport-sized, and page-sized images.