@orkestrel/scaffold 0.0.60 → 0.0.61
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/README.md +13 -10
- package/dist/bin/main.js +632 -320
- package/dist/bin/main.js.map +1 -1
- package/dist/host/CLAUDE.md +5 -1
- package/dist/host/agents/orchestration.md +44 -19
- package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +5 -5
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +2 -2
- package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +10 -9
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +21 -11
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +20 -2
- package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +1 -1
- package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +1 -1
- package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +1 -1
- package/dist/host/agents/templates/brief.md +16 -7
- package/dist/host/agents/transports/claude.md +4 -2
- package/dist/host/agents/transports/codex.md +4 -1
- package/dist/host/claude/agents/analyst.md +3 -1
- package/dist/host/claude/agents/application.md +1 -1
- package/dist/host/claude/agents/builder.md +3 -3
- package/dist/host/claude/agents/checker.md +5 -0
- package/dist/host/claude/agents/grok.md +15 -5
- package/dist/host/claude/agents/implementer.md +1 -1
- package/dist/host/claude/agents/orkestrel.md +2 -2
- package/dist/host/claude/agents/planner.md +10 -0
- package/dist/host/claude/agents/reviewer.md +14 -8
- package/dist/host/claude/agents/sol.md +3 -1
- package/dist/host/claude/agents/verifier.md +2 -4
- package/dist/host/claude/rules/architecture.md +7 -5
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/names.md +23 -5
- package/dist/host/claude/rules/patterns.md +1 -0
- package/dist/host/claude/rules/quality.md +1 -1
- package/dist/host/claude/rules/tests.md +3 -3
- package/dist/host/claude/rules/typescript.md +4 -1
- package/dist/host/claude/rules/writing.md +2 -2
- package/dist/host/codex/agents/builder.toml +6 -6
- package/dist/host/codex/agents/checker.toml +2 -1
- package/dist/host/codex/agents/grok.toml +12 -5
- package/dist/host/codex/agents/implementer.toml +2 -2
- package/dist/host/codex/agents/opus.toml +6 -1
- package/dist/host/codex/agents/planner.toml +11 -6
- package/dist/host/codex/agents/reviewer.toml +8 -6
- package/dist/host/guides/scaffold.md +39 -14
- package/dist/host/manifest.json +41 -41
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/src/core/index.cjs +420 -278
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +361 -220
- package/dist/src/core/index.d.ts +361 -220
- package/dist/src/core/index.js +417 -279
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +208 -170
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +276 -152
- package/dist/src/server/index.d.ts +276 -152
- package/dist/src/server/index.js +200 -172
- package/dist/src/server/index.js.map +1 -1
- package/package.json +4 -3
|
@@ -4,14 +4,15 @@ import { EmitterInterface } from '@orkestrel/emitter';
|
|
|
4
4
|
import { Guard } from '@orkestrel/contract';
|
|
5
5
|
import { JSONValue } from '@orkestrel/contract';
|
|
6
6
|
|
|
7
|
-
/**
|
|
7
|
+
/** Lists the development dependencies a private Vue browser application adds. */
|
|
8
8
|
export declare const APP_BROWSER_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
9
9
|
|
|
10
|
-
/**
|
|
10
|
+
/** Names the development dependency every private `app` environment adds. */
|
|
11
11
|
export declare const APP_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Holds the configuration and runtime-entry settings each private `app` environment
|
|
15
|
+
* contributes, frozen.
|
|
15
16
|
*
|
|
16
17
|
* @remarks
|
|
17
18
|
* An application environment declares no exports, so it carries a runtime
|
|
@@ -20,10 +21,13 @@ export declare const APP_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
|
20
21
|
*/
|
|
21
22
|
export declare const APP_MATRIX: Readonly<Record<Environment, AppDefinition>>;
|
|
22
23
|
|
|
23
|
-
/**
|
|
24
|
+
/** Lists the development dependencies a private server application adds. */
|
|
24
25
|
export declare const APP_SERVER_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
25
26
|
|
|
26
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Describes the configuration and runtime-entry settings one private `app` environment
|
|
29
|
+
* contributes.
|
|
30
|
+
*/
|
|
27
31
|
export declare interface AppDefinition {
|
|
28
32
|
readonly configs: readonly string[];
|
|
29
33
|
readonly project: string;
|
|
@@ -31,7 +35,7 @@ export declare interface AppDefinition {
|
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
/**
|
|
34
|
-
*
|
|
38
|
+
* Replaces the content of every drafted artifact an override names.
|
|
35
39
|
*
|
|
36
40
|
* @param artifacts - The drafted artifacts.
|
|
37
41
|
* @param overrides - The blueprint's overrides.
|
|
@@ -56,7 +60,8 @@ export declare interface AppDefinition {
|
|
|
56
60
|
export declare function applyOverrides(artifacts: readonly Artifact[], overrides: readonly Override[]): readonly Artifact[];
|
|
57
61
|
|
|
58
62
|
/**
|
|
59
|
-
*
|
|
63
|
+
* Represents one file in a plan, discriminated by how its content is produced and what
|
|
64
|
+
* scaffold claims of it.
|
|
60
65
|
*
|
|
61
66
|
* @remarks
|
|
62
67
|
* Every branch that claims `content` ownership carries the bytes to back it:
|
|
@@ -66,7 +71,7 @@ export declare function applyOverrides(artifacts: readonly Artifact[], overrides
|
|
|
66
71
|
export declare type Artifact = HostArtifact | HydratedArtifact | ContentArtifact;
|
|
67
72
|
|
|
68
73
|
/**
|
|
69
|
-
*
|
|
74
|
+
* Holds formatter-stable template text for source, test, document, guide, and service artifacts.
|
|
70
75
|
*
|
|
71
76
|
* @remarks
|
|
72
77
|
* Builders in `compilers.ts` fill every varying span through
|
|
@@ -119,7 +124,7 @@ export declare const ARTIFACT_TEMPLATES: Readonly<{
|
|
|
119
124
|
}>;
|
|
120
125
|
}>;
|
|
121
126
|
|
|
122
|
-
/**
|
|
127
|
+
/** Describes the fields every planned file carries. */
|
|
123
128
|
export declare interface ArtifactBase {
|
|
124
129
|
readonly path: string;
|
|
125
130
|
readonly group: Group;
|
|
@@ -128,7 +133,7 @@ export declare interface ArtifactBase {
|
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
/**
|
|
131
|
-
*
|
|
136
|
+
* Measures a drafted artifact list against the laws a whole plan decides.
|
|
132
137
|
*
|
|
133
138
|
* @param artifacts - The drafted artifacts.
|
|
134
139
|
* @returns One blocking question per colliding path and per exceeded ceiling.
|
|
@@ -156,7 +161,7 @@ export declare interface ArtifactBase {
|
|
|
156
161
|
export declare function artifactsToQuestions(artifacts: readonly Artifact[]): readonly Question[];
|
|
157
162
|
|
|
158
163
|
/**
|
|
159
|
-
*
|
|
164
|
+
* Projects one planned artifact and the bytes found at its path into a verdict.
|
|
160
165
|
*
|
|
161
166
|
* @param artifact - The planned artifact.
|
|
162
167
|
* @param observed - The destination's exact bytes as hexadecimal; absent when
|
|
@@ -188,7 +193,7 @@ export declare function artifactsToQuestions(artifacts: readonly Artifact[]): re
|
|
|
188
193
|
export declare function artifactToFinding(artifact: Artifact, observed?: string): Finding;
|
|
189
194
|
|
|
190
195
|
/**
|
|
191
|
-
*
|
|
196
|
+
* Projects an artifact to the exact bytes it claims, as hexadecimal.
|
|
192
197
|
*
|
|
193
198
|
* @param artifact - The planned artifact to read.
|
|
194
199
|
* @returns The claimed bytes, or `undefined` when the artifact claims none.
|
|
@@ -215,7 +220,7 @@ export declare function artifactToFinding(artifact: Artifact, observed?: string)
|
|
|
215
220
|
export declare function artifactToHex(artifact: Artifact): string | undefined;
|
|
216
221
|
|
|
217
222
|
/**
|
|
218
|
-
*
|
|
223
|
+
* Represents the whole comparison of a plan against a target's current content.
|
|
219
224
|
*
|
|
220
225
|
* @remarks
|
|
221
226
|
* A blocking question means the gate refused the blueprint, so `findings` is
|
|
@@ -228,17 +233,17 @@ export declare interface Audit {
|
|
|
228
233
|
readonly questions: readonly Question[];
|
|
229
234
|
}
|
|
230
235
|
|
|
231
|
-
/**
|
|
236
|
+
/** Holds the tooling versions scaffold and every generated workspace share. */
|
|
232
237
|
export declare const BASE_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
233
238
|
|
|
234
|
-
/**
|
|
239
|
+
/** Lists the configuration files a workspace that ships its own executable adds, frozen. */
|
|
235
240
|
export declare const BIN_CONFIGS: readonly string[];
|
|
236
241
|
|
|
237
|
-
/**
|
|
242
|
+
/** Names the executable entry whose presence makes a workspace `bin`. */
|
|
238
243
|
export declare const BIN_ENTRY_PATH = "src/bin/main.ts";
|
|
239
244
|
|
|
240
245
|
/**
|
|
241
|
-
*
|
|
246
|
+
* Represents the closed, JSON-serializable workspace specification.
|
|
242
247
|
*
|
|
243
248
|
* @remarks
|
|
244
249
|
* `src` selects published library environments and `app` selects private
|
|
@@ -287,7 +292,7 @@ export declare interface Blueprint {
|
|
|
287
292
|
}
|
|
288
293
|
|
|
289
294
|
/**
|
|
290
|
-
*
|
|
295
|
+
* Compiles every artifact in the `configs` group.
|
|
291
296
|
*
|
|
292
297
|
* @param blueprint - The workspace specification.
|
|
293
298
|
* @returns Root and selected wrapper artifacts in matrix order.
|
|
@@ -304,7 +309,7 @@ export declare interface Blueprint {
|
|
|
304
309
|
export declare function blueprintToConfigArtifacts(blueprint: Blueprint): readonly Artifact[];
|
|
305
310
|
|
|
306
311
|
/**
|
|
307
|
-
*
|
|
312
|
+
* Projects a blueprint into the development dependencies its manifest declares.
|
|
308
313
|
*
|
|
309
314
|
* @param blueprint - The workspace specification.
|
|
310
315
|
* @returns The merged set, sorted by package name.
|
|
@@ -342,7 +347,7 @@ export declare function blueprintToConfigArtifacts(blueprint: Blueprint): readon
|
|
|
342
347
|
export declare function blueprintToDevDependencies(blueprint: Blueprint): Readonly<Record<string, string>>;
|
|
343
348
|
|
|
344
349
|
/**
|
|
345
|
-
*
|
|
350
|
+
* Compiles the generated workspace's root documentation.
|
|
346
351
|
*
|
|
347
352
|
* @param blueprint - The workspace specification.
|
|
348
353
|
* @returns The birth-owned package front page and the content-owned `AGENTS.md`
|
|
@@ -361,19 +366,37 @@ export declare function blueprintToDevDependencies(blueprint: Blueprint): Readon
|
|
|
361
366
|
* Neither pointer carries a varying span, so neither is filled: a workspace's
|
|
362
367
|
* name never reaches the text, and the paths a reader follows are the same in
|
|
363
368
|
* every target.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```ts
|
|
372
|
+
* import { blueprintToDocumentArtifacts, createBlueprint } from '@orkestrel/scaffold'
|
|
373
|
+
*
|
|
374
|
+
* const blueprint = createBlueprint('router', { src: ['core'] })
|
|
375
|
+
*
|
|
376
|
+
* blueprintToDocumentArtifacts(blueprint).map((artifact) => artifact.path) // ['README.md', 'AGENTS.md', 'CLAUDE.md']
|
|
377
|
+
* ```
|
|
364
378
|
*/
|
|
365
379
|
export declare function blueprintToDocumentArtifacts(blueprint: Blueprint): readonly ContentArtifact[];
|
|
366
380
|
|
|
367
381
|
/**
|
|
368
|
-
*
|
|
382
|
+
* Compiles the generated workspace's guide index.
|
|
369
383
|
*
|
|
370
384
|
* @param blueprint - The workspace specification.
|
|
371
385
|
* @returns One birth-owned guide index carrying the concept and directory views.
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```ts
|
|
389
|
+
* import { blueprintToGuideArtifacts, createBlueprint } from '@orkestrel/scaffold'
|
|
390
|
+
*
|
|
391
|
+
* const blueprint = createBlueprint('router', { src: ['core'] })
|
|
392
|
+
*
|
|
393
|
+
* blueprintToGuideArtifacts(blueprint)[0]?.path // 'guides/README.md'
|
|
394
|
+
* ```
|
|
372
395
|
*/
|
|
373
396
|
export declare function blueprintToGuideArtifacts(blueprint: Blueprint): readonly ContentArtifact[];
|
|
374
397
|
|
|
375
398
|
/**
|
|
376
|
-
*
|
|
399
|
+
* Derives the host-specific machinery a generated root Vite configuration carries.
|
|
377
400
|
*
|
|
378
401
|
* @param blueprint - The workspace specification.
|
|
379
402
|
* @returns The pipelines the generated configuration selects.
|
|
@@ -402,7 +425,7 @@ export declare function blueprintToGuideArtifacts(blueprint: Blueprint): readonl
|
|
|
402
425
|
export declare function blueprintToMachinery(blueprint: Blueprint): ViteMachinery;
|
|
403
426
|
|
|
404
427
|
/**
|
|
405
|
-
*
|
|
428
|
+
* Compiles a blueprint into its `package.json` content.
|
|
406
429
|
*
|
|
407
430
|
* @param blueprint - The workspace specification.
|
|
408
431
|
* @returns The manifest text, newline-terminated.
|
|
@@ -439,7 +462,7 @@ export declare function blueprintToMachinery(blueprint: Blueprint): ViteMachiner
|
|
|
439
462
|
export declare function blueprintToManifest(blueprint: Blueprint): string;
|
|
440
463
|
|
|
441
464
|
/**
|
|
442
|
-
*
|
|
465
|
+
* Compiles the blueprint-dependent orchestration artifacts.
|
|
443
466
|
*
|
|
444
467
|
* @param blueprint - The workspace specification.
|
|
445
468
|
* @returns A vendor inventory script when vendors are declared, otherwise none.
|
|
@@ -448,11 +471,22 @@ export declare function blueprintToManifest(blueprint: Blueprint): string;
|
|
|
448
471
|
* A vendor name does not describe startup, readiness, or cleanup. The script
|
|
449
472
|
* therefore records only the declared inventory and does not invent a service
|
|
450
473
|
* runner or test project.
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* ```ts
|
|
477
|
+
* import { blueprintToOrchestrationArtifacts, createBlueprint } from '@orkestrel/scaffold'
|
|
478
|
+
*
|
|
479
|
+
* const plain = createBlueprint('router', { src: ['core'] })
|
|
480
|
+
* const served = createBlueprint('router', { src: ['core'], vendors: ['ollama'] })
|
|
481
|
+
*
|
|
482
|
+
* blueprintToOrchestrationArtifacts(plain) // []
|
|
483
|
+
* blueprintToOrchestrationArtifacts(served)[0]?.path // 'scripts/service.sh'
|
|
484
|
+
* ```
|
|
451
485
|
*/
|
|
452
486
|
export declare function blueprintToOrchestrationArtifacts(blueprint: Blueprint): readonly ContentArtifact[];
|
|
453
487
|
|
|
454
488
|
/**
|
|
455
|
-
*
|
|
489
|
+
* Measures a blueprint against every law its own fields decide.
|
|
456
490
|
*
|
|
457
491
|
* @param blueprint - The workspace specification.
|
|
458
492
|
* @returns One question per rejected field, in blueprint field order, with the
|
|
@@ -498,7 +532,7 @@ export declare function blueprintToOrchestrationArtifacts(blueprint: Blueprint):
|
|
|
498
532
|
export declare function blueprintToQuestions(blueprint: Blueprint): readonly Question[];
|
|
499
533
|
|
|
500
534
|
/**
|
|
501
|
-
*
|
|
535
|
+
* Compiles the root TypeScript configuration for a blueprint.
|
|
502
536
|
*
|
|
503
537
|
* @param blueprint - The workspace specification.
|
|
504
538
|
* @returns Formatter-stable `tsconfig.json` text.
|
|
@@ -515,7 +549,7 @@ export declare function blueprintToQuestions(blueprint: Blueprint): readonly Que
|
|
|
515
549
|
export declare function blueprintToRootTsconfig(blueprint: Blueprint): string;
|
|
516
550
|
|
|
517
551
|
/**
|
|
518
|
-
*
|
|
552
|
+
* Compiles the root Vite and Vitest configuration for a blueprint.
|
|
519
553
|
*
|
|
520
554
|
* @param blueprint - The workspace specification.
|
|
521
555
|
* @returns Formatter-stable `vite.config.ts` text.
|
|
@@ -537,7 +571,7 @@ export declare function blueprintToRootTsconfig(blueprint: Blueprint): string;
|
|
|
537
571
|
export declare function blueprintToRootVite(blueprint: Blueprint): string;
|
|
538
572
|
|
|
539
573
|
/**
|
|
540
|
-
*
|
|
574
|
+
* Projects a blueprint into the scripts its manifest declares.
|
|
541
575
|
*
|
|
542
576
|
* @param blueprint - The workspace specification.
|
|
543
577
|
* @returns The scripts, in the order the manifest lists them.
|
|
@@ -575,7 +609,7 @@ export declare function blueprintToRootVite(blueprint: Blueprint): string;
|
|
|
575
609
|
export declare function blueprintToScripts(blueprint: Blueprint): Readonly<Record<string, string>>;
|
|
576
610
|
|
|
577
611
|
/**
|
|
578
|
-
*
|
|
612
|
+
* Compiles every artifact in the `source` group.
|
|
579
613
|
*
|
|
580
614
|
* @param blueprint - The workspace specification.
|
|
581
615
|
* @returns Empty published barrels, selected application entries, and the optional bin entry.
|
|
@@ -600,7 +634,7 @@ export declare function blueprintToScripts(blueprint: Blueprint): Readonly<Recor
|
|
|
600
634
|
export declare function blueprintToSourceArtifacts(blueprint: Blueprint): readonly ContentArtifact[];
|
|
601
635
|
|
|
602
636
|
/**
|
|
603
|
-
*
|
|
637
|
+
* Compiles every artifact in the `tests` group that is not vendored from the host.
|
|
604
638
|
*
|
|
605
639
|
* @param blueprint - The workspace specification.
|
|
606
640
|
* @returns Shared setup modules, axis tests, and the optional integration seed.
|
|
@@ -637,7 +671,7 @@ export declare function blueprintToSourceArtifacts(blueprint: Blueprint): readon
|
|
|
637
671
|
export declare function blueprintToTestArtifacts(blueprint: Blueprint): readonly ContentArtifact[];
|
|
638
672
|
|
|
639
673
|
/**
|
|
640
|
-
*
|
|
674
|
+
* Projects a blueprint into the manifest scripts a region write may replace.
|
|
641
675
|
*
|
|
642
676
|
* @param blueprint - The workspace specification.
|
|
643
677
|
* @returns One entry per writable script.
|
|
@@ -667,11 +701,11 @@ export declare function blueprintToTestArtifacts(blueprint: Blueprint): readonly
|
|
|
667
701
|
*/
|
|
668
702
|
export declare function blueprintToWritableScripts(blueprint: Blueprint): readonly ManifestScript[];
|
|
669
703
|
|
|
670
|
-
/**
|
|
704
|
+
/** Names one module format a published library environment builds. */
|
|
671
705
|
export declare type BuildFormat = 'es' | 'cjs';
|
|
672
706
|
|
|
673
707
|
/**
|
|
674
|
-
*
|
|
708
|
+
* Encodes bytes as exact lowercase hexadecimal text.
|
|
675
709
|
*
|
|
676
710
|
* @param bytes - The bytes to encode.
|
|
677
711
|
* @returns Two lowercase hexadecimal digits per input byte, and `''` for no bytes.
|
|
@@ -692,7 +726,7 @@ export declare type BuildFormat = 'es' | 'cjs';
|
|
|
692
726
|
export declare function bytesToHex(bytes: Uint8Array): string;
|
|
693
727
|
|
|
694
728
|
/**
|
|
695
|
-
*
|
|
729
|
+
* Lists the instruction-canon paths staged for reading rather than for a target, frozen.
|
|
696
730
|
*
|
|
697
731
|
* @remarks
|
|
698
732
|
* The root instruction documents, the orchestration contract every harness
|
|
@@ -725,7 +759,7 @@ export declare function bytesToHex(bytes: Uint8Array): string;
|
|
|
725
759
|
export declare const CANON_PATHS: readonly string[];
|
|
726
760
|
|
|
727
761
|
/**
|
|
728
|
-
*
|
|
762
|
+
* Names the agent file whose marker-bounded package table the catalog verb alone owns.
|
|
729
763
|
*
|
|
730
764
|
* @remarks
|
|
731
765
|
* A plan claims it at a canon path, because the catalog verb refuses a target
|
|
@@ -741,7 +775,27 @@ export declare const CANON_PATHS: readonly string[];
|
|
|
741
775
|
export declare const CATALOG_AGENT_PATH = ".claude/agents/orkestrel.md";
|
|
742
776
|
|
|
743
777
|
/**
|
|
744
|
-
*
|
|
778
|
+
* Names the marker closing the package table inside {@link CATALOG_AGENT_PATH}.
|
|
779
|
+
*
|
|
780
|
+
* @remarks
|
|
781
|
+
* It pairs with {@link CATALOG_OPENING_MARKER}; a file missing either marker is
|
|
782
|
+
* refused rather than rewritten.
|
|
783
|
+
*/
|
|
784
|
+
export declare const CATALOG_CLOSING_MARKER = "<!-- /orkestrel:catalog -->";
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Names the marker opening the package table inside {@link CATALOG_AGENT_PATH}.
|
|
788
|
+
*
|
|
789
|
+
* @remarks
|
|
790
|
+
* The catalog verb rewrites the region between this marker and
|
|
791
|
+
* {@link CATALOG_CLOSING_MARKER} and leaves every other byte of the file alone,
|
|
792
|
+
* so the writer and every proof that reads the rendered file read the pair from
|
|
793
|
+
* here rather than repeating a literal that only agrees by inspection.
|
|
794
|
+
*/
|
|
795
|
+
export declare const CATALOG_OPENING_MARKER = "<!-- orkestrel:catalog -->";
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Represents one package row of the fleet catalog.
|
|
745
799
|
*
|
|
746
800
|
* @remarks
|
|
747
801
|
* A row whose lookup did not find a version carries the cause instead. It is
|
|
@@ -772,7 +826,7 @@ export declare type CatalogEntry = {
|
|
|
772
826
|
};
|
|
773
827
|
|
|
774
828
|
/**
|
|
775
|
-
*
|
|
829
|
+
* Projects a catalog into the layers it publishes in.
|
|
776
830
|
*
|
|
777
831
|
* @param entries - The catalog rows to order.
|
|
778
832
|
* @returns One layer per round, each holding the names publishable together,
|
|
@@ -804,7 +858,7 @@ export declare type CatalogEntry = {
|
|
|
804
858
|
export declare function catalogToLayers(entries: readonly CatalogEntry[]): ReadonlyArray<readonly string[]>;
|
|
805
859
|
|
|
806
860
|
/**
|
|
807
|
-
*
|
|
861
|
+
* Snapshots an untrusted value into exact JSON data the caller owns.
|
|
808
862
|
*
|
|
809
863
|
* @param value - The untrusted value to take ownership of.
|
|
810
864
|
* @returns A deeply frozen copy sharing nothing with `value`, or `undefined`
|
|
@@ -848,7 +902,7 @@ export declare function catalogToLayers(entries: readonly CatalogEntry[]): Reado
|
|
|
848
902
|
export declare function cloneValue(value: unknown): JSONValue | undefined;
|
|
849
903
|
|
|
850
904
|
/**
|
|
851
|
-
*
|
|
905
|
+
* Compares two versions by their numeric components.
|
|
852
906
|
*
|
|
853
907
|
* @param left - The version ordered first when it compares lower.
|
|
854
908
|
* @param right - The version compared against.
|
|
@@ -870,14 +924,14 @@ export declare function cloneValue(value: unknown): JSONValue | undefined;
|
|
|
870
924
|
*/
|
|
871
925
|
export declare function compareVersions(left: string, right: string): number;
|
|
872
926
|
|
|
873
|
-
/**
|
|
927
|
+
/** Represents the coded reason one compile stage failed. */
|
|
874
928
|
export declare interface CompileFailure {
|
|
875
929
|
readonly code: ScaffoldErrorCode;
|
|
876
930
|
readonly message: string;
|
|
877
931
|
}
|
|
878
932
|
|
|
879
933
|
/**
|
|
880
|
-
*
|
|
934
|
+
* Represents the compile spine: draft, gate, pin, run in that order over a blueprint.
|
|
881
935
|
*
|
|
882
936
|
* @remarks
|
|
883
937
|
* The draft stage assembles the artifacts the selected groups cover. The gate
|
|
@@ -920,7 +974,7 @@ export declare interface CompileFailure {
|
|
|
920
974
|
export declare class Compiler implements CompilerInterface {
|
|
921
975
|
#private;
|
|
922
976
|
/**
|
|
923
|
-
*
|
|
977
|
+
* Constructs a compiler.
|
|
924
978
|
*
|
|
925
979
|
* @param options - The initial listeners and the listener-error handler.
|
|
926
980
|
* @throws {@link ScaffoldError} coded `INVALID` when `options` is present but
|
|
@@ -933,10 +987,10 @@ export declare class Compiler implements CompilerInterface {
|
|
|
933
987
|
* at construction instead of never firing.
|
|
934
988
|
*/
|
|
935
989
|
constructor(options?: CompilerOptions);
|
|
936
|
-
/**
|
|
990
|
+
/** Exposes the compiler's observation channel. */
|
|
937
991
|
get emitter(): EmitterInterface<CompilerEventMap>;
|
|
938
992
|
/**
|
|
939
|
-
*
|
|
993
|
+
* Compiles a blueprint into a plan through the draft, gate, and pin stages.
|
|
940
994
|
*
|
|
941
995
|
* @param blueprint - The workspace specification to compile.
|
|
942
996
|
* @param groups - The artifact groups to cover; every group when absent.
|
|
@@ -968,7 +1022,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
968
1022
|
*/
|
|
969
1023
|
compile(blueprint: Blueprint, groups?: readonly Group[]): Scaffolding;
|
|
970
1024
|
/**
|
|
971
|
-
*
|
|
1025
|
+
* Compiles a blueprint and compares its plan to a target's current content.
|
|
972
1026
|
*
|
|
973
1027
|
* @param blueprint - The workspace specification to compile.
|
|
974
1028
|
* @param current - The target's exact bytes, keyed by artifact-relative path.
|
|
@@ -999,7 +1053,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
999
1053
|
*/
|
|
1000
1054
|
audit(blueprint: Blueprint, current: Snapshot, groups?: readonly Group[]): Audit;
|
|
1001
1055
|
/**
|
|
1002
|
-
*
|
|
1056
|
+
* Tears the compiler down. Every later call throws, and teardown is idempotent.
|
|
1003
1057
|
*
|
|
1004
1058
|
* @returns Nothing.
|
|
1005
1059
|
*
|
|
@@ -1016,7 +1070,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1016
1070
|
}
|
|
1017
1071
|
|
|
1018
1072
|
/**
|
|
1019
|
-
*
|
|
1073
|
+
* Holds the input and output snapshot of one compile stage.
|
|
1020
1074
|
*
|
|
1021
1075
|
* @remarks
|
|
1022
1076
|
* `failure` is present exactly when the stage failed.
|
|
@@ -1028,7 +1082,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1028
1082
|
readonly failure?: CompileFailure;
|
|
1029
1083
|
}
|
|
1030
1084
|
|
|
1031
|
-
/**
|
|
1085
|
+
/** Represents the compiler's observation channel. */
|
|
1032
1086
|
export declare type CompilerEventMap = {
|
|
1033
1087
|
readonly compile: readonly [scaffolding: Scaffolding];
|
|
1034
1088
|
readonly audit: readonly [audit: Audit];
|
|
@@ -1037,11 +1091,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1037
1091
|
readonly destroy: readonly [];
|
|
1038
1092
|
};
|
|
1039
1093
|
|
|
1040
|
-
/**
|
|
1094
|
+
/** Describes the compilation contract: pure, synchronous, and host-independent. */
|
|
1041
1095
|
export declare interface CompilerInterface {
|
|
1042
1096
|
readonly emitter: EmitterInterface<CompilerEventMap>;
|
|
1043
1097
|
/**
|
|
1044
|
-
*
|
|
1098
|
+
* Compiles a blueprint into a plan through the draft, gate, and pin stages.
|
|
1045
1099
|
*
|
|
1046
1100
|
* @param blueprint - The workspace specification to compile.
|
|
1047
1101
|
* @param groups - The artifact groups to cover; every group when absent.
|
|
@@ -1049,7 +1103,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1049
1103
|
*/
|
|
1050
1104
|
compile(blueprint: Blueprint, groups?: readonly Group[]): Scaffolding;
|
|
1051
1105
|
/**
|
|
1052
|
-
*
|
|
1106
|
+
* Compiles a blueprint and compares its plan to a target's current content.
|
|
1053
1107
|
*
|
|
1054
1108
|
* @param blueprint - The workspace specification to compile.
|
|
1055
1109
|
* @param current - The target's exact bytes, keyed by artifact-relative path.
|
|
@@ -1058,24 +1112,24 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1058
1112
|
*/
|
|
1059
1113
|
audit(blueprint: Blueprint, current: Snapshot, groups?: readonly Group[]): Audit;
|
|
1060
1114
|
/**
|
|
1061
|
-
*
|
|
1115
|
+
* Tears the compiler down. Every later call throws, and teardown is idempotent.
|
|
1062
1116
|
*
|
|
1063
1117
|
* @returns Nothing.
|
|
1064
1118
|
*/
|
|
1065
1119
|
destroy(): void;
|
|
1066
1120
|
}
|
|
1067
1121
|
|
|
1068
|
-
/**
|
|
1122
|
+
/** Represents the options for the compiler. */
|
|
1069
1123
|
export declare interface CompilerOptions {
|
|
1070
1124
|
readonly on?: EmitterHooks<CompilerEventMap>;
|
|
1071
1125
|
readonly error?: EmitterErrorHandler;
|
|
1072
1126
|
}
|
|
1073
1127
|
|
|
1074
|
-
/**
|
|
1128
|
+
/** Names the compile phases, in the order they run. */
|
|
1075
1129
|
export declare type CompileStage = 'draft' | 'gate' | 'pin';
|
|
1076
1130
|
|
|
1077
1131
|
/**
|
|
1078
|
-
*
|
|
1132
|
+
* Counts the UTF-8 bytes text encodes to.
|
|
1079
1133
|
*
|
|
1080
1134
|
* @param content - The text to measure.
|
|
1081
1135
|
* @returns The exact number of UTF-8 bytes.
|
|
@@ -1097,7 +1151,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1097
1151
|
export declare function computeBytes(content: string): number;
|
|
1098
1152
|
|
|
1099
1153
|
/**
|
|
1100
|
-
*
|
|
1154
|
+
* Computes the deterministic content identity of text.
|
|
1101
1155
|
*
|
|
1102
1156
|
* @param text - The text to digest.
|
|
1103
1157
|
* @returns Sixteen lowercase hexadecimal digits.
|
|
@@ -1123,7 +1177,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1123
1177
|
export declare function computeHash(text: string): string;
|
|
1124
1178
|
|
|
1125
1179
|
/**
|
|
1126
|
-
*
|
|
1180
|
+
* Holds formatter-stable template text for every configuration artifact.
|
|
1127
1181
|
*
|
|
1128
1182
|
* @remarks
|
|
1129
1183
|
* Builders in `compilers.ts` fill these definitions through
|
|
@@ -1193,13 +1247,13 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1193
1247
|
showcase: "import { defineConfig } from 'vite'\nimport { appShowcase } from '../../vite.config.ts'\n\nexport default defineConfig(appShowcase())\n";
|
|
1194
1248
|
}>;
|
|
1195
1249
|
}>;
|
|
1196
|
-
browsers: "// A generated browser workspace resolves its own Chromium here rather than in\n// `configs/helpers.ts`, because that leaf is vendored byte-identical to every\n// workspace and most of them declare no `playwright` to import.\n\nimport type { PlaywrightProviderOptions } from '@vitest/browser-playwright'\nimport { chromium } from 'playwright'\nimport { accessSync, constants as FS_CONSTANTS, globSync, readdirSync, statSync } from 'node:fs'\nimport { basename, dirname, join, resolve as resolvePath } from 'node:path'\n\n/**\n * Chromium executable layouts inside a `chromium-<revision>` browsers-directory entry, per\n * platform.\n *\n * @remarks\n * The current Playwright build ships Chrome for Testing on macOS. The trailing `Chromium.app`\n * layouts are what earlier builds shipped, so the list spans Playwright versions instead of\n * pinning to the installed one.\n */\nexport const CHROMIUM_LAYOUTS = Object.freeze([\n\t'chrome-linux/chrome',\n\t'chrome-linux64/chrome',\n\t'chrome-win/chrome.exe',\n\t'chrome-win64/chrome.exe',\n\t'chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',\n\t'chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',\n\t'chrome-mac/Chromium.app/Contents/MacOS/Chromium',\n\t'chrome-mac-arm64/Chromium.app/Contents/MacOS/Chromium',\n])\n\n/** The `chromium-<revision>` entry name Playwright installs one managed build into. */\nexport const CHROMIUM_ENTRY_PATTERN = /^chromium-\\d+$/\n\n/** The revision number carried by any path containing a `chromium-<revision>` segment. */\nexport const CHROMIUM_REVISION_PATTERN = /chromium-(\\d+)/\n\n/** The directory a managed Linux container installs its bundled Playwright browsers into. */\nexport const BUNDLED_BROWSERS_ROOT = '/opt/pw-browsers'\n\n/**\n * Bundled Chromium layouts under the managed-container browsers root, as glob patterns.\n *\n * @remarks\n * The revision directory and its inner layout both drift across Playwright builds, and the\n * container also carries a top-level `chromium` alias, so every known shape is globbed.\n */\nexport const BUNDLED_CHROMIUM_LAYOUTS = Object.freeze([\n\t'chromium',\n\t'chromium-*/chrome-linux64/chrome',\n\t'chromium-*/chrome-linux/chrome',\n])\n\n/** Stable Playwright Chromium channels and their standard executable layouts. */\nexport const SYSTEM_BROWSER_CHANNELS = Object.freeze([\n\tObject.freeze({\n\t\tchannel: 'chrome',\n\t\tlayouts: Object.freeze({\n\t\t\tlinux: '/opt/google/chrome/chrome',\n\t\t\tdarwin: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',\n\t\t\twin32: Object.freeze(['Google', 'Chrome', 'Application', 'chrome.exe']),\n\t\t}),\n\t}),\n\tObject.freeze({\n\t\tchannel: 'msedge',\n\t\tlayouts: Object.freeze({\n\t\t\tlinux: '/opt/microsoft/msedge/msedge',\n\t\t\tdarwin: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',\n\t\t\twin32: Object.freeze(['Microsoft', 'Edge', 'Application', 'msedge.exe']),\n\t\t}),\n\t}),\n])\n\n/**\n * Determine whether a path identifies an executable regular file.\n *\n * @param path - The filesystem path to inspect.\n * @returns Whether the path is a regular file with execute access.\n *\n * @example\n * ```ts\n * isBrowserExecutable('/opt/google/chrome/chrome')\n * ```\n */\nexport function isBrowserExecutable(path: string): boolean {\n\ttry {\n\t\tif (!statSync(path).isFile()) return false\n\t\taccessSync(path, FS_CONSTANTS.X_OK)\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n\n/**\n * Order two Chromium paths so the highest revision sorts first.\n *\n * @param left - The first path or directory entry to compare.\n * @param right - The second path or directory entry to compare.\n * @returns A negative number when `left` sorts first, positive when `right` does.\n *\n * @remarks\n * Revisions are numbers, so `chromium-1200` outranks `chromium-999` despite sorting below it\n * lexically. A path carrying no revision falls back to descending name order.\n *\n * @example\n * ```ts\n * ['chromium-999', 'chromium-1200'].sort(compareRevisions)\n * ```\n */\nexport function compareRevisions(left: string, right: string): number {\n\tconst leftRevision = CHROMIUM_REVISION_PATTERN.exec(left)?.[1]\n\tconst rightRevision = CHROMIUM_REVISION_PATTERN.exec(right)?.[1]\n\tif (leftRevision === undefined || rightRevision === undefined) return right.localeCompare(left)\n\treturn Number(rightRevision) - Number(leftRevision)\n}\n\n/**\n * Read the executable path of Playwright's pinned Chromium revision.\n *\n * @returns The pinned executable path, or `undefined` when this platform has none.\n *\n * @remarks\n * Playwright throws rather than returning a path when the current platform carries no initialized\n * executable, and an unguarded call would fail configuration evaluation for every project.\n *\n * @example\n * ```ts\n * resolvePinnedBrowser()\n * ```\n */\nexport function resolvePinnedBrowser(): string | undefined {\n\ttry {\n\t\tconst pinned = chromium.executablePath()\n\t\treturn pinned.length === 0 ? undefined : pinned\n\t} catch {\n\t\treturn undefined\n\t}\n}\n\n/**\n * Resolve a launchable Playwright-managed Chromium executable: the pinned revision when installed,\n * otherwise a `chromium` / `chromium.exe` alias or any other `chromium-*` revision under the same\n * Playwright browsers directory. A pinned-revision miss is not Chromium absence — managed\n * containers ship one usable build, often behind a revision-agnostic alias, for many Playwright\n * versions.\n *\n * @param pinned - The executable path for Playwright's pinned Chromium revision.\n * @returns The managed executable path, or `undefined` when none is executable.\n *\n * @example\n * ```ts\n * resolveManagedBrowser('/root/.cache/ms-playwright/chromium-1234/chrome-linux64/chrome')\n * ```\n */\nexport function resolveManagedBrowser(pinned: string): string | undefined {\n\tif (isBrowserExecutable(pinned)) return pinned\n\tlet revisionRoot = dirname(pinned)\n\tfor (;;) {\n\t\tif (CHROMIUM_ENTRY_PATTERN.test(basename(revisionRoot))) break\n\t\tconst parent = dirname(revisionRoot)\n\t\tif (parent === revisionRoot) return undefined\n\t\trevisionRoot = parent\n\t}\n\tconst browsersRoot = dirname(revisionRoot)\n\tfor (const alias of ['chromium', 'chromium.exe']) {\n\t\tconst candidate = resolvePath(browsersRoot, alias)\n\t\tif (isBrowserExecutable(candidate)) return candidate\n\t}\n\tlet entries: readonly string[]\n\ttry {\n\t\tentries = readdirSync(browsersRoot)\n\t} catch {\n\t\treturn undefined\n\t}\n\tconst revisions = entries\n\t\t.filter((entry) => CHROMIUM_ENTRY_PATTERN.test(entry))\n\t\t.sort(compareRevisions)\n\tfor (const revision of revisions) {\n\t\tfor (const layout of CHROMIUM_LAYOUTS) {\n\t\t\tconst candidate = resolvePath(browsersRoot, revision, layout)\n\t\t\tif (isBrowserExecutable(candidate)) return candidate\n\t\t}\n\t}\n\treturn undefined\n}\n\n/**\n * Resolve the Chromium a managed Linux container bundles outside the Playwright cache.\n *\n * @param platform - The Node platform the container runs on.\n * @param root - The bundled browsers directory to search.\n * @returns The highest matching executable path, or `undefined` when none is executable.\n *\n * @example\n * ```ts\n * resolveBundledBrowser('linux', BUNDLED_BROWSERS_ROOT)\n * ```\n */\nexport function resolveBundledBrowser(platform: NodeJS.Platform, root: string): string | undefined {\n\tif (platform !== 'linux') return undefined\n\tfor (const layout of BUNDLED_CHROMIUM_LAYOUTS) {\n\t\tlet matches: readonly string[]\n\t\ttry {\n\t\t\tmatches = globSync(layout, { cwd: root })\n\t\t} catch {\n\t\t\treturn undefined\n\t\t}\n\t\tfor (const match of [...matches].sort(compareRevisions)) {\n\t\t\tconst candidate = resolvePath(root, match)\n\t\t\tif (isBrowserExecutable(candidate)) return candidate\n\t\t}\n\t}\n\treturn undefined\n}\n\n/**\n * Resolve the first installed stable system Chromium channel.\n *\n * @param platform - The Node platform whose standard layouts this call probes.\n * @param environment - The process environment supplying Windows installation roots.\n * @returns `chrome`, then `msedge`, or `undefined` when neither is executable.\n *\n * @example\n * ```ts\n * resolveSystemBrowser(process.platform, process.env)\n * ```\n */\nexport function resolveSystemBrowser(\n\tplatform: NodeJS.Platform,\n\tenvironment: NodeJS.ProcessEnv,\n): string | undefined {\n\tif (platform !== 'linux' && platform !== 'darwin' && platform !== 'win32') return undefined\n\tconst roots = new Set<string>()\n\tif (platform === 'win32') {\n\t\tfor (const root of [\n\t\t\tenvironment.LOCALAPPDATA,\n\t\t\tenvironment.PROGRAMFILES,\n\t\t\tenvironment['PROGRAMFILES(X86)'],\n\t\t]) {\n\t\t\tif (root !== undefined && root.length > 0) roots.add(root)\n\t\t}\n\t\tconst homeDrive = environment.HOMEDRIVE\n\t\tif (homeDrive !== undefined && homeDrive.length > 0) {\n\t\t\troots.add(join(homeDrive, 'Program Files'))\n\t\t\troots.add(join(homeDrive, 'Program Files (x86)'))\n\t\t}\n\t}\n\tfor (const browser of SYSTEM_BROWSER_CHANNELS) {\n\t\tif (platform === 'win32') {\n\t\t\tfor (const root of roots) {\n\t\t\t\tif (isBrowserExecutable(join(root, ...browser.layouts.win32))) return browser.channel\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif (isBrowserExecutable(browser.layouts[platform])) return browser.channel\n\t}\n\treturn undefined\n}\n\n/**\n * Resolve Playwright provider options for whatever browser this host can actually launch.\n *\n * @param pinned - The executable path for Playwright's pinned Chromium revision, when it has one.\n * @param platform - The Node platform whose standard layouts this call probes.\n * @param environment - The process environment supplying operator overrides and Windows roots.\n * @param root - The managed-container bundled browsers directory to search.\n * @returns Provider options naming an executable, a WebSocket endpoint, or a channel.\n *\n * @remarks\n * Precedence, most important first: `PLAYWRIGHT_EXECUTABLE_PATH`, `PLAYWRIGHT_WS_ENDPOINT`,\n * `PLAYWRIGHT_CHANNEL`, the managed Playwright Chromium, the container's bundled Chromium, a\n * verified system channel, then the platform default channel. An operator override outranks\n * discovery and is returned exactly as given: none of those environment values is checked\n * against the filesystem, because verifying an override would defeat the override. The pinned\n * managed revision outranks anything found on the host because it is deterministic. The installed\n * pinned revision returns empty options so Playwright keeps its own default launch semantics. Only\n * a discovered system channel is verified before it is named. The platform default is unverified\n * as well and exists only as a last resort: Windows takes `msedge`, which ships with the OS and\n * never collides with a foreground Chrome.\n *\n * @example\n * ```ts\n * resolveBrowser(resolvePinnedBrowser(), process.platform, process.env)\n * ```\n */\nexport function resolveBrowser(\n\tpinned: string | undefined,\n\tplatform: NodeJS.Platform,\n\tenvironment: NodeJS.ProcessEnv,\n\troot: string = BUNDLED_BROWSERS_ROOT,\n): PlaywrightProviderOptions {\n\tconst executable = environment.PLAYWRIGHT_EXECUTABLE_PATH\n\tif (executable !== undefined && executable.length > 0) {\n\t\treturn { launchOptions: { executablePath: executable } }\n\t}\n\tconst endpoint = environment.PLAYWRIGHT_WS_ENDPOINT\n\tif (endpoint !== undefined && endpoint.length > 0) {\n\t\treturn { connectOptions: { wsEndpoint: endpoint } }\n\t}\n\tconst requested = environment.PLAYWRIGHT_CHANNEL\n\tif (requested !== undefined && requested.length > 0) {\n\t\treturn { launchOptions: { channel: requested } }\n\t}\n\tconst managed = pinned === undefined ? undefined : resolveManagedBrowser(pinned)\n\tif (managed !== undefined) {\n\t\treturn managed === pinned ? {} : { launchOptions: { executablePath: managed } }\n\t}\n\tconst bundled = resolveBundledBrowser(platform, root)\n\tif (bundled !== undefined) return { launchOptions: { executablePath: bundled } }\n\tconst fallback = platform === 'win32' ? 'msedge' : 'chrome'\n\treturn { launchOptions: { channel: resolveSystemBrowser(platform, environment) ?? fallback } }\n}\n";
|
|
1250
|
+
browsers: "// A generated browser workspace resolves its own Chromium here rather than in\n// `configs/helpers.ts`, because that leaf is vendored byte-identical to every\n// workspace and most of them declare no `playwright` to import.\n\nimport type { PlaywrightProviderOptions } from '@vitest/browser-playwright'\nimport { chromium } from 'playwright'\nimport { accessSync, constants as FS_CONSTANTS, globSync, readdirSync, statSync } from 'node:fs'\nimport { basename, dirname, join, resolve as resolvePath } from 'node:path'\n\n/**\n * Lists the Chromium executable layouts inside a `chromium-<revision>` browsers-directory\n * entry, per platform.\n *\n * @remarks\n * The current Playwright build ships Chrome for Testing on macOS. The trailing `Chromium.app`\n * layouts are what earlier builds shipped, so the list spans Playwright versions instead of\n * pinning to the installed one.\n */\nexport const CHROMIUM_LAYOUTS = Object.freeze([\n\t'chrome-linux/chrome',\n\t'chrome-linux64/chrome',\n\t'chrome-win/chrome.exe',\n\t'chrome-win64/chrome.exe',\n\t'chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',\n\t'chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',\n\t'chrome-mac/Chromium.app/Contents/MacOS/Chromium',\n\t'chrome-mac-arm64/Chromium.app/Contents/MacOS/Chromium',\n])\n\n/** Matches the `chromium-<revision>` entry name Playwright installs one managed build into. */\nexport const CHROMIUM_ENTRY_PATTERN = /^chromium-\\d+$/\n\n/** Matches the revision number carried by any path containing a `chromium-<revision>` segment. */\nexport const CHROMIUM_REVISION_PATTERN = /chromium-(\\d+)/\n\n/** Names the directory a managed Linux container installs its bundled Playwright browsers into. */\nexport const BUNDLED_BROWSERS_ROOT = '/opt/pw-browsers'\n\n/**\n * Lists the bundled Chromium layouts under the managed-container browsers root, as glob patterns.\n *\n * @remarks\n * The revision directory and its inner layout both drift across Playwright builds, and the\n * container also carries a top-level `chromium` alias, so every known shape is globbed.\n */\nexport const BUNDLED_CHROMIUM_LAYOUTS = Object.freeze([\n\t'chromium',\n\t'chromium-*/chrome-linux64/chrome',\n\t'chromium-*/chrome-linux/chrome',\n])\n\n/** Lists the stable Playwright Chromium channels and their standard executable layouts. */\nexport const SYSTEM_BROWSER_CHANNELS = Object.freeze([\n\tObject.freeze({\n\t\tchannel: 'chrome',\n\t\tlayouts: Object.freeze({\n\t\t\tlinux: '/opt/google/chrome/chrome',\n\t\t\tdarwin: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',\n\t\t\twin32: Object.freeze(['Google', 'Chrome', 'Application', 'chrome.exe']),\n\t\t}),\n\t}),\n\tObject.freeze({\n\t\tchannel: 'msedge',\n\t\tlayouts: Object.freeze({\n\t\t\tlinux: '/opt/microsoft/msedge/msedge',\n\t\t\tdarwin: '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',\n\t\t\twin32: Object.freeze(['Microsoft', 'Edge', 'Application', 'msedge.exe']),\n\t\t}),\n\t}),\n])\n\n/**\n * Determines whether a path identifies an executable regular file.\n *\n * @param path - The filesystem path to inspect.\n * @returns True if the path is a regular file with execute access; false otherwise.\n *\n * @example\n * ```ts\n * isBrowserExecutable('/opt/google/chrome/chrome')\n * ```\n */\nexport function isBrowserExecutable(path: string): boolean {\n\ttry {\n\t\tif (!statSync(path).isFile()) return false\n\t\taccessSync(path, FS_CONSTANTS.X_OK)\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n\n/**\n * Orders two Chromium paths so the highest revision sorts first.\n *\n * @param left - The first path or directory entry to compare.\n * @param right - The second path or directory entry to compare.\n * @returns A negative number when `left` sorts first, positive when `right` does.\n *\n * @remarks\n * Revisions are numbers, so `chromium-1200` outranks `chromium-999` despite sorting below it\n * lexically. A path carrying no revision falls back to descending name order.\n *\n * @example\n * ```ts\n * ['chromium-999', 'chromium-1200'].sort(compareRevisions)\n * ```\n */\nexport function compareRevisions(left: string, right: string): number {\n\tconst leftRevision = CHROMIUM_REVISION_PATTERN.exec(left)?.[1]\n\tconst rightRevision = CHROMIUM_REVISION_PATTERN.exec(right)?.[1]\n\tif (leftRevision === undefined || rightRevision === undefined) return right.localeCompare(left)\n\treturn Number(rightRevision) - Number(leftRevision)\n}\n\n/**\n * Reads the executable path of Playwright's pinned Chromium revision.\n *\n * @returns The pinned executable path, or `undefined` when this platform has none.\n *\n * @remarks\n * Playwright throws rather than returning a path when the current platform carries no initialized\n * executable, and an unguarded call would fail configuration evaluation for every project.\n *\n * @example\n * ```ts\n * resolvePinnedBrowser()\n * ```\n */\nexport function resolvePinnedBrowser(): string | undefined {\n\ttry {\n\t\tconst pinned = chromium.executablePath()\n\t\treturn pinned.length === 0 ? undefined : pinned\n\t} catch {\n\t\treturn undefined\n\t}\n}\n\n/**\n * Resolves a launchable Playwright-managed Chromium executable: the pinned revision when installed,\n * otherwise a `chromium` / `chromium.exe` alias or any other `chromium-*` revision under the same\n * Playwright browsers directory. A pinned-revision miss is not Chromium absence — managed\n * containers ship one usable build, often behind a revision-agnostic alias, for many Playwright\n * versions.\n *\n * @param pinned - The executable path for Playwright's pinned Chromium revision.\n * @returns The managed executable path, or `undefined` when none is executable.\n *\n * @example\n * ```ts\n * resolveManagedBrowser('/root/.cache/ms-playwright/chromium-1234/chrome-linux64/chrome')\n * ```\n */\nexport function resolveManagedBrowser(pinned: string): string | undefined {\n\tif (isBrowserExecutable(pinned)) return pinned\n\tlet revisionRoot = dirname(pinned)\n\tfor (;;) {\n\t\tif (CHROMIUM_ENTRY_PATTERN.test(basename(revisionRoot))) break\n\t\tconst parent = dirname(revisionRoot)\n\t\tif (parent === revisionRoot) return undefined\n\t\trevisionRoot = parent\n\t}\n\tconst browsersRoot = dirname(revisionRoot)\n\tfor (const alias of ['chromium', 'chromium.exe']) {\n\t\tconst candidate = resolvePath(browsersRoot, alias)\n\t\tif (isBrowserExecutable(candidate)) return candidate\n\t}\n\tlet entries: readonly string[]\n\ttry {\n\t\tentries = readdirSync(browsersRoot)\n\t} catch {\n\t\treturn undefined\n\t}\n\tconst revisions = entries\n\t\t.filter((entry) => CHROMIUM_ENTRY_PATTERN.test(entry))\n\t\t.sort(compareRevisions)\n\tfor (const revision of revisions) {\n\t\tfor (const layout of CHROMIUM_LAYOUTS) {\n\t\t\tconst candidate = resolvePath(browsersRoot, revision, layout)\n\t\t\tif (isBrowserExecutable(candidate)) return candidate\n\t\t}\n\t}\n\treturn undefined\n}\n\n/**\n * Resolves the Chromium a managed Linux container bundles outside the Playwright cache.\n *\n * @param platform - The Node platform the container runs on.\n * @param root - The bundled browsers directory to search.\n * @returns The highest matching executable path, or `undefined` when none is executable.\n *\n * @example\n * ```ts\n * resolveBundledBrowser('linux', BUNDLED_BROWSERS_ROOT)\n * ```\n */\nexport function resolveBundledBrowser(platform: NodeJS.Platform, root: string): string | undefined {\n\tif (platform !== 'linux') return undefined\n\tfor (const layout of BUNDLED_CHROMIUM_LAYOUTS) {\n\t\tlet matches: readonly string[]\n\t\ttry {\n\t\t\tmatches = globSync(layout, { cwd: root })\n\t\t} catch {\n\t\t\treturn undefined\n\t\t}\n\t\tfor (const match of [...matches].sort(compareRevisions)) {\n\t\t\tconst candidate = resolvePath(root, match)\n\t\t\tif (isBrowserExecutable(candidate)) return candidate\n\t\t}\n\t}\n\treturn undefined\n}\n\n/**\n * Resolves the first installed stable system Chromium channel.\n *\n * @param platform - The Node platform whose standard layouts this call probes.\n * @param environment - The process environment supplying Windows installation roots.\n * @returns `chrome`, then `msedge`, or `undefined` when neither is executable.\n *\n * @example\n * ```ts\n * resolveSystemBrowser(process.platform, process.env)\n * ```\n */\nexport function resolveSystemBrowser(\n\tplatform: NodeJS.Platform,\n\tenvironment: NodeJS.ProcessEnv,\n): string | undefined {\n\tif (platform !== 'linux' && platform !== 'darwin' && platform !== 'win32') return undefined\n\tconst roots = new Set<string>()\n\tif (platform === 'win32') {\n\t\tfor (const root of [\n\t\t\tenvironment.LOCALAPPDATA,\n\t\t\tenvironment.PROGRAMFILES,\n\t\t\tenvironment['PROGRAMFILES(X86)'],\n\t\t]) {\n\t\t\tif (root !== undefined && root.length > 0) roots.add(root)\n\t\t}\n\t\tconst homeDrive = environment.HOMEDRIVE\n\t\tif (homeDrive !== undefined && homeDrive.length > 0) {\n\t\t\troots.add(join(homeDrive, 'Program Files'))\n\t\t\troots.add(join(homeDrive, 'Program Files (x86)'))\n\t\t}\n\t}\n\tfor (const browser of SYSTEM_BROWSER_CHANNELS) {\n\t\tif (platform === 'win32') {\n\t\t\tfor (const root of roots) {\n\t\t\t\tif (isBrowserExecutable(join(root, ...browser.layouts.win32))) return browser.channel\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tif (isBrowserExecutable(browser.layouts[platform])) return browser.channel\n\t}\n\treturn undefined\n}\n\n/**\n * Resolves Playwright provider options for whatever browser this host can actually launch.\n *\n * @param pinned - The executable path for Playwright's pinned Chromium revision, when it has one.\n * @param platform - The Node platform whose standard layouts this call probes.\n * @param environment - The process environment supplying operator overrides and Windows roots.\n * @param root - The managed-container bundled browsers directory to search.\n * @returns Provider options naming an executable, a WebSocket endpoint, or a channel.\n *\n * @remarks\n * Precedence, most important first: `PLAYWRIGHT_EXECUTABLE_PATH`, `PLAYWRIGHT_WS_ENDPOINT`,\n * `PLAYWRIGHT_CHANNEL`, the managed Playwright Chromium, the container's bundled Chromium, a\n * verified system channel, then the platform default channel. An operator override outranks\n * discovery and is returned exactly as given: none of those environment values is checked\n * against the filesystem, because verifying an override would defeat the override. The pinned\n * managed revision outranks anything found on the host because it is deterministic. The installed\n * pinned revision returns empty options so Playwright keeps its own default launch semantics. Only\n * a discovered system channel is verified before it is named. The platform default is unverified\n * as well and exists only as a last resort: Windows takes `msedge`, which ships with the OS and\n * never collides with a foreground Chrome.\n *\n * @example\n * ```ts\n * resolveBrowser(resolvePinnedBrowser(), process.platform, process.env)\n * ```\n */\nexport function resolveBrowser(\n\tpinned: string | undefined,\n\tplatform: NodeJS.Platform,\n\tenvironment: NodeJS.ProcessEnv,\n\troot: string = BUNDLED_BROWSERS_ROOT,\n): PlaywrightProviderOptions {\n\tconst executable = environment.PLAYWRIGHT_EXECUTABLE_PATH\n\tif (executable !== undefined && executable.length > 0) {\n\t\treturn { launchOptions: { executablePath: executable } }\n\t}\n\tconst endpoint = environment.PLAYWRIGHT_WS_ENDPOINT\n\tif (endpoint !== undefined && endpoint.length > 0) {\n\t\treturn { connectOptions: { wsEndpoint: endpoint } }\n\t}\n\tconst requested = environment.PLAYWRIGHT_CHANNEL\n\tif (requested !== undefined && requested.length > 0) {\n\t\treturn { launchOptions: { channel: requested } }\n\t}\n\tconst managed = pinned === undefined ? undefined : resolveManagedBrowser(pinned)\n\tif (managed !== undefined) {\n\t\treturn managed === pinned ? {} : { launchOptions: { executablePath: managed } }\n\t}\n\tconst bundled = resolveBundledBrowser(platform, root)\n\tif (bundled !== undefined) return { launchOptions: { executablePath: bundled } }\n\tconst fallback = platform === 'win32' ? 'msedge' : 'chrome'\n\treturn { launchOptions: { channel: resolveSystemBrowser(platform, environment) ?? fallback } }\n}\n";
|
|
1197
1251
|
}>;
|
|
1198
1252
|
|
|
1199
|
-
/**
|
|
1253
|
+
/** Names the official-tooling drift proof whose presence makes a workspace `conformance`. */
|
|
1200
1254
|
export declare const CONFORMANCE_TEST_PATH = "tests/conformance.test.ts";
|
|
1201
1255
|
|
|
1202
|
-
/**
|
|
1256
|
+
/** Represents a text file produced by the template or computed compilation path. */
|
|
1203
1257
|
export declare interface ContentArtifact extends ArtifactBase {
|
|
1204
1258
|
readonly origin: 'template' | 'computed';
|
|
1205
1259
|
readonly content: string;
|
|
@@ -1208,7 +1262,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1208
1262
|
}
|
|
1209
1263
|
|
|
1210
1264
|
/**
|
|
1211
|
-
*
|
|
1265
|
+
* Encodes text as the exact lowercase hexadecimal form of its UTF-8 bytes.
|
|
1212
1266
|
*
|
|
1213
1267
|
* @param content - The text to encode.
|
|
1214
1268
|
* @returns The hexadecimal form of the text's exact UTF-8 bytes.
|
|
@@ -1228,11 +1282,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1228
1282
|
*/
|
|
1229
1283
|
export declare function contentToHex(content: string): string;
|
|
1230
1284
|
|
|
1231
|
-
/**
|
|
1285
|
+
/**
|
|
1286
|
+
* Matches the Unicode controls, formatting controls, and line and paragraph separators
|
|
1287
|
+
* rejected in text.
|
|
1288
|
+
*/
|
|
1232
1289
|
export declare const CONTROL_CHARACTER_PATTERN: RegExp;
|
|
1233
1290
|
|
|
1234
1291
|
/**
|
|
1235
|
-
*
|
|
1292
|
+
* Constructs a {@link Blueprint} from a name and the fields that differ from the defaults.
|
|
1236
1293
|
*
|
|
1237
1294
|
* @param name - The bare workspace name.
|
|
1238
1295
|
* @param input - The fields to set; every omitted field takes its default.
|
|
@@ -1270,17 +1327,20 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1270
1327
|
*/
|
|
1271
1328
|
export declare function createBlueprint(name: string, input?: Partial<Omit<Blueprint, 'name'>>): Blueprint;
|
|
1272
1329
|
|
|
1273
|
-
/**
|
|
1330
|
+
/**
|
|
1331
|
+
* Lists the development dependencies that emit declarations for published source or an
|
|
1332
|
+
* executable.
|
|
1333
|
+
*/
|
|
1274
1334
|
export declare const DECLARATION_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
1275
1335
|
|
|
1276
|
-
/**
|
|
1336
|
+
/** Names the `engines.node` range a workspace starts with. */
|
|
1277
1337
|
export declare const DEFAULT_ENGINES = ">=22.12.0";
|
|
1278
1338
|
|
|
1279
|
-
/**
|
|
1339
|
+
/** Names the version a workspace starts at. */
|
|
1280
1340
|
export declare const DEFAULT_VERSION = "0.0.1";
|
|
1281
1341
|
|
|
1282
1342
|
/**
|
|
1283
|
-
*
|
|
1343
|
+
* Measures one declared package list against the name and range syntax it accepts.
|
|
1284
1344
|
*
|
|
1285
1345
|
* @param dependencies - The declared list.
|
|
1286
1346
|
* @param field - The blueprint field the list came from, reported on each question.
|
|
@@ -1316,7 +1376,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1316
1376
|
export declare function dependenciesToQuestions(dependencies: readonly Dependency[], field: string, name: RegExp, range: RegExp): readonly Question[];
|
|
1317
1377
|
|
|
1318
1378
|
/**
|
|
1319
|
-
*
|
|
1379
|
+
* Represents one runtime `@orkestrel/*` dependency of a generated workspace.
|
|
1320
1380
|
*
|
|
1321
1381
|
* @remarks
|
|
1322
1382
|
* `optional` is meaningful only on a blueprint's `peers`, where it emits a
|
|
@@ -1329,7 +1389,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1329
1389
|
}
|
|
1330
1390
|
|
|
1331
1391
|
/**
|
|
1332
|
-
*
|
|
1392
|
+
* Matches the runtime dependency name syntax: the `@orkestrel` scope and a bare name.
|
|
1333
1393
|
*
|
|
1334
1394
|
* @remarks
|
|
1335
1395
|
* A dependency name reaches a path, because a workspace's guide mirror is
|
|
@@ -1339,17 +1399,17 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1339
1399
|
*/
|
|
1340
1400
|
export declare const DEPENDENCY_NAME_PATTERN: RegExp;
|
|
1341
1401
|
|
|
1342
|
-
/**
|
|
1402
|
+
/** Describes the dependency sections a range-writing operation may change. */
|
|
1343
1403
|
export declare interface DependencyPinSet {
|
|
1344
1404
|
readonly runtime: readonly Dependency[];
|
|
1345
1405
|
readonly development: readonly Dependency[];
|
|
1346
1406
|
}
|
|
1347
1407
|
|
|
1348
|
-
/**
|
|
1408
|
+
/** Names the generated packed-package proof every publishing workspace is planned at. */
|
|
1349
1409
|
export declare const DISTRIBUTION_TEST_PATH = "tests/distribution.test.ts";
|
|
1350
1410
|
|
|
1351
1411
|
/**
|
|
1352
|
-
*
|
|
1412
|
+
* Names how one target path compares to the artifact planned for it.
|
|
1353
1413
|
*
|
|
1354
1414
|
* @remarks
|
|
1355
1415
|
* `foreign` is a path the plan does not own at all. It is also the set
|
|
@@ -1358,14 +1418,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1358
1418
|
*/
|
|
1359
1419
|
export declare type Drift = 'aligned' | 'stale' | 'missing' | 'foreign';
|
|
1360
1420
|
|
|
1361
|
-
/**
|
|
1421
|
+
/** Matches the minimum-Node engine syntax a blueprint declares. */
|
|
1362
1422
|
export declare const ENGINES_PATTERN: RegExp;
|
|
1363
1423
|
|
|
1364
|
-
/**
|
|
1424
|
+
/** Names one environment a generated workspace selects on its `src` or `app` axis. */
|
|
1365
1425
|
export declare type Environment = 'core' | 'browser' | 'server';
|
|
1366
1426
|
|
|
1367
1427
|
/**
|
|
1368
|
-
*
|
|
1428
|
+
* Lists the `Environment` values, frozen.
|
|
1369
1429
|
*
|
|
1370
1430
|
* @remarks
|
|
1371
1431
|
* A blueprint's `src` and `app` axes are caller-supplied, so the gate measures
|
|
@@ -1376,7 +1436,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1376
1436
|
export declare const ENVIRONMENTS: readonly Environment[];
|
|
1377
1437
|
|
|
1378
1438
|
/**
|
|
1379
|
-
*
|
|
1439
|
+
* Lists the vendored paths a target receives with its executable bit set, frozen.
|
|
1380
1440
|
*
|
|
1381
1441
|
* @remarks
|
|
1382
1442
|
* Declared rather than read from the staging host's filesystem, because that
|
|
@@ -1390,11 +1450,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1390
1450
|
*/
|
|
1391
1451
|
export declare const EXECUTABLE_PATHS: readonly string[];
|
|
1392
1452
|
|
|
1393
|
-
/**
|
|
1453
|
+
/** Matches the registry-only semver subset accepted for a development extra's range. */
|
|
1394
1454
|
export declare const EXTRA_RANGE_PATTERN: RegExp;
|
|
1395
1455
|
|
|
1396
1456
|
/**
|
|
1397
|
-
*
|
|
1457
|
+
* Extracts the major component of an admitted dependency range.
|
|
1398
1458
|
*
|
|
1399
1459
|
* @param range - The candidate range text.
|
|
1400
1460
|
* @returns The major number, or `undefined` when the text is not a canonical
|
|
@@ -1417,7 +1477,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1417
1477
|
export declare function extractRangeMajor(range: string): number | undefined;
|
|
1418
1478
|
|
|
1419
1479
|
/**
|
|
1420
|
-
*
|
|
1480
|
+
* Extracts the major, minor, and patch components of an exact version.
|
|
1421
1481
|
*
|
|
1422
1482
|
* @param version - The candidate version text.
|
|
1423
1483
|
* @returns The major, minor, and patch numbers, or `undefined` when the text is
|
|
@@ -1439,7 +1499,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1439
1499
|
export declare function extractVersion(version: string): readonly [major: number, minor: number, patch: number] | undefined;
|
|
1440
1500
|
|
|
1441
1501
|
/**
|
|
1442
|
-
*
|
|
1502
|
+
* Represents one drift verdict against a target path.
|
|
1443
1503
|
*
|
|
1444
1504
|
* @remarks
|
|
1445
1505
|
* `observed` carries the destination's exact bytes and is the precondition the
|
|
@@ -1494,7 +1554,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1494
1554
|
};
|
|
1495
1555
|
|
|
1496
1556
|
/**
|
|
1497
|
-
*
|
|
1557
|
+
* Matches the exact `major.minor.patch` floor accepted for a foreign peer's range.
|
|
1498
1558
|
*
|
|
1499
1559
|
* @remarks
|
|
1500
1560
|
* This is independent from {@link ENGINES_PATTERN}. An engine floors the Node
|
|
@@ -1504,7 +1564,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1504
1564
|
export declare const FLOOR_RANGE_PATTERN: RegExp;
|
|
1505
1565
|
|
|
1506
1566
|
/**
|
|
1507
|
-
*
|
|
1567
|
+
* Matches the package name syntax for a dependency this package does not publish.
|
|
1508
1568
|
*
|
|
1509
1569
|
* @remarks
|
|
1510
1570
|
* A foreign package is one this package does not publish, so its name reaches
|
|
@@ -1515,14 +1575,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1515
1575
|
*/
|
|
1516
1576
|
export declare const FOREIGN_NAME_PATTERN: RegExp;
|
|
1517
1577
|
|
|
1518
|
-
/**
|
|
1578
|
+
/** Names the shared Vitest global-setup module whose presence makes a workspace `global`. */
|
|
1519
1579
|
export declare const GLOBAL_SETUP_PATH = "tests/setupGlobal.ts";
|
|
1520
1580
|
|
|
1521
|
-
/**
|
|
1581
|
+
/** Names the artifact group a plan selects over. */
|
|
1522
1582
|
export declare type Group = 'manifest' | 'configs' | 'source' | 'tests' | 'guides' | 'docs' | 'orchestration';
|
|
1523
1583
|
|
|
1524
1584
|
/**
|
|
1525
|
-
*
|
|
1585
|
+
* Lists the `Group` values in plan order, frozen.
|
|
1526
1586
|
*
|
|
1527
1587
|
* @remarks
|
|
1528
1588
|
* A compile that names no groups covers every one of them, so this list is the
|
|
@@ -1531,29 +1591,30 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1531
1591
|
*/
|
|
1532
1592
|
export declare const GROUPS: readonly Group[];
|
|
1533
1593
|
|
|
1534
|
-
/**
|
|
1594
|
+
/** Names the guide-parity proof whose presence selects the planned `guides` project. */
|
|
1535
1595
|
export declare const GUIDES_TEST_PATH = "tests/guides.test.ts";
|
|
1536
1596
|
|
|
1537
|
-
/**
|
|
1597
|
+
/** Matches exact lowercase hexadecimal bytes: two digits per byte, and empty content is valid. */
|
|
1538
1598
|
export declare const HEX_PATTERN: RegExp;
|
|
1539
1599
|
|
|
1540
|
-
/**
|
|
1600
|
+
/** Names the repository-relative path where the committed vendored-file inventory is served. */
|
|
1541
1601
|
export declare const HOST_INVENTORY_PATH = "host.json";
|
|
1542
1602
|
|
|
1543
1603
|
/**
|
|
1544
|
-
*
|
|
1604
|
+
* Lists the paths a target receives from the vendored data root, frozen.
|
|
1545
1605
|
*
|
|
1546
1606
|
* @remarks
|
|
1547
|
-
* These are the files the fleet shares verbatim and
|
|
1548
|
-
* of: the licence, the harness permission file, the
|
|
1549
|
-
* shared policy register, the
|
|
1550
|
-
*
|
|
1551
|
-
*
|
|
1607
|
+
* These are the files the fleet shares verbatim, and each target holds a copy
|
|
1608
|
+
* of the paths it selects: the licence, the harness permission file, the
|
|
1609
|
+
* session-start hooks, the shared policy register, the shared policy proof,
|
|
1610
|
+
* the shared policy plugin, the shared configuration leaf and its proof, the
|
|
1611
|
+
* byte-identical root dotfiles, and the guide mirrors a generated workspace
|
|
1612
|
+
* starts from. A directory entry vendors everything beneath it.
|
|
1552
1613
|
*
|
|
1553
1614
|
* A plan carries the subset its target selects, which is why the list is a
|
|
1554
1615
|
* candidate set rather than a plan: a workspace never mirrors its own guide.
|
|
1555
1616
|
*
|
|
1556
|
-
* Neither the instruction canon nor the
|
|
1617
|
+
* Neither the instruction canon nor the bench and MCP wiring is here. A target reads
|
|
1557
1618
|
* its rules, its skills, its agent roles, its bench configuration, and its MCP
|
|
1558
1619
|
* registrations from {@link CANON_PATHS} inside the installed package, so no
|
|
1559
1620
|
* file scaffold leaves in a target names a path the target does not hold.
|
|
@@ -1563,7 +1624,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1563
1624
|
export declare const HOST_PATHS: readonly string[];
|
|
1564
1625
|
|
|
1565
1626
|
/**
|
|
1566
|
-
*
|
|
1627
|
+
* Represents a file byte-copied from the vendored data root, planned before its bytes are read.
|
|
1567
1628
|
*
|
|
1568
1629
|
* @remarks
|
|
1569
1630
|
* `source` falls back to `path` when absent. The pure core face cannot read the
|
|
@@ -1584,7 +1645,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1584
1645
|
}
|
|
1585
1646
|
|
|
1586
1647
|
/**
|
|
1587
|
-
*
|
|
1648
|
+
* Represents one vendored file read from the repository, beside the target bytes it answers for.
|
|
1588
1649
|
*
|
|
1589
1650
|
* @remarks
|
|
1590
1651
|
* `path` is the target-relative path, which is also the checkout-relative path
|
|
@@ -1614,7 +1675,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1614
1675
|
};
|
|
1615
1676
|
|
|
1616
1677
|
/**
|
|
1617
|
-
*
|
|
1678
|
+
* Represents a vendored file whose exact bytes have been read, so its content can be compared.
|
|
1618
1679
|
*
|
|
1619
1680
|
* @remarks
|
|
1620
1681
|
* `hex` is the canonical lowercase byte pairs of the vendored source. It is
|
|
@@ -1632,7 +1693,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1632
1693
|
}
|
|
1633
1694
|
|
|
1634
1695
|
/**
|
|
1635
|
-
*
|
|
1696
|
+
* Infers how one target path compares to the artifact planned for it.
|
|
1636
1697
|
*
|
|
1637
1698
|
* @param artifact - The planned artifact.
|
|
1638
1699
|
* @param observed - The destination's exact bytes as hexadecimal; absent when
|
|
@@ -1670,7 +1731,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1670
1731
|
export declare function inferDrift(artifact: Artifact, observed?: string): Exclude<Drift, 'foreign'>;
|
|
1671
1732
|
|
|
1672
1733
|
/**
|
|
1673
|
-
*
|
|
1734
|
+
* Infers the {@link Group} a path belongs to.
|
|
1674
1735
|
*
|
|
1675
1736
|
* @param path - The target-relative path to classify.
|
|
1676
1737
|
* @returns The group that owns the path.
|
|
@@ -1695,14 +1756,17 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1695
1756
|
*/
|
|
1696
1757
|
export declare function inferGroup(path: string): Group;
|
|
1697
1758
|
|
|
1698
|
-
/**
|
|
1759
|
+
/**
|
|
1760
|
+
* Names the cross-environment composition proof whose presence makes a workspace
|
|
1761
|
+
* `integration`.
|
|
1762
|
+
*/
|
|
1699
1763
|
export declare const INTEGRATION_TEST_PATH = "tests/integration.test.ts";
|
|
1700
1764
|
|
|
1701
|
-
/**
|
|
1765
|
+
/** Matches the visible characters a target-relative path and a Markdown path cell both forbid. */
|
|
1702
1766
|
export declare const INVALID_PATH_CHARACTER_PATTERN: RegExp;
|
|
1703
1767
|
|
|
1704
1768
|
/**
|
|
1705
|
-
*
|
|
1769
|
+
* Narrows a value to an {@link Artifact}.
|
|
1706
1770
|
*
|
|
1707
1771
|
* @remarks
|
|
1708
1772
|
* One branch per way content is produced, discriminated by `origin` and
|
|
@@ -1721,7 +1785,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1721
1785
|
export declare const isArtifact: Guard<Artifact>;
|
|
1722
1786
|
|
|
1723
1787
|
/**
|
|
1724
|
-
*
|
|
1788
|
+
* Narrows a value to an {@link Audit}.
|
|
1725
1789
|
*
|
|
1726
1790
|
* @remarks
|
|
1727
1791
|
* An audit reaches the writer and the destructive verb, so it is guarded as
|
|
@@ -1731,7 +1795,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1731
1795
|
export declare const isAudit: Guard<Audit>;
|
|
1732
1796
|
|
|
1733
1797
|
/**
|
|
1734
|
-
*
|
|
1798
|
+
* Narrows a value to a {@link Blueprint}.
|
|
1735
1799
|
*
|
|
1736
1800
|
* @remarks
|
|
1737
1801
|
* The whole closed record, its literal axes, and the count and length bounds
|
|
@@ -1752,8 +1816,8 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1752
1816
|
* Checks whether a path belongs to the instruction canon a target reads rather than holds.
|
|
1753
1817
|
*
|
|
1754
1818
|
* @param path - The target-relative path to test.
|
|
1755
|
-
* @returns
|
|
1756
|
-
* member that is a directory;
|
|
1819
|
+
* @returns True if the path is a {@link CANON_PATHS} member or sits beneath a
|
|
1820
|
+
* member that is a directory; false otherwise.
|
|
1757
1821
|
*
|
|
1758
1822
|
* @remarks
|
|
1759
1823
|
* The one reading of canon membership, so the live overlay and the executable's
|
|
@@ -1777,7 +1841,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1777
1841
|
export declare function isCanonPath(path: string): boolean;
|
|
1778
1842
|
|
|
1779
1843
|
/**
|
|
1780
|
-
*
|
|
1844
|
+
* Narrows a value to a {@link CatalogEntry}.
|
|
1781
1845
|
*
|
|
1782
1846
|
* @remarks
|
|
1783
1847
|
* A row that found no version carries the cause instead, and neither branch may
|
|
@@ -1786,10 +1850,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1786
1850
|
export declare const isCatalogEntry: Guard<CatalogEntry>;
|
|
1787
1851
|
|
|
1788
1852
|
/**
|
|
1789
|
-
*
|
|
1853
|
+
* Narrows a value to an array within the limit one public collection accepts.
|
|
1790
1854
|
*
|
|
1791
1855
|
* @param value - The candidate collection.
|
|
1792
|
-
* @returns
|
|
1856
|
+
* @returns True if the value is an array of no more than
|
|
1857
|
+
* `MAX_COLLECTION_ITEMS` items; false otherwise.
|
|
1793
1858
|
*
|
|
1794
1859
|
* @remarks
|
|
1795
1860
|
* Compose this ahead of an element guard so the item count is settled before
|
|
@@ -1807,7 +1872,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1807
1872
|
export declare function isCollection(value: unknown): value is readonly unknown[];
|
|
1808
1873
|
|
|
1809
1874
|
/**
|
|
1810
|
-
*
|
|
1875
|
+
* Narrows a value to the compiler's initial listener record.
|
|
1811
1876
|
*
|
|
1812
1877
|
* @remarks
|
|
1813
1878
|
* Every event is optional and every declared value is a function. A key outside
|
|
@@ -1817,7 +1882,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1817
1882
|
export declare const isCompilerHooks: Guard<EmitterHooks<CompilerEventMap>>;
|
|
1818
1883
|
|
|
1819
1884
|
/**
|
|
1820
|
-
*
|
|
1885
|
+
* Narrows a value to {@link CompilerOptions}.
|
|
1821
1886
|
*
|
|
1822
1887
|
* @example
|
|
1823
1888
|
* ```ts
|
|
@@ -1830,7 +1895,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1830
1895
|
export declare const isCompilerOptions: Guard<CompilerOptions>;
|
|
1831
1896
|
|
|
1832
1897
|
/**
|
|
1833
|
-
*
|
|
1898
|
+
* Narrows a value to text this package will accept as one artifact's content.
|
|
1834
1899
|
*
|
|
1835
1900
|
* @remarks
|
|
1836
1901
|
* The bound is a code-unit ceiling rather than a byte count, because a string
|
|
@@ -1845,8 +1910,8 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1845
1910
|
* Checks whether another surface owns the vendored bytes at a path.
|
|
1846
1911
|
*
|
|
1847
1912
|
* @param path - The target-relative vendored path to test.
|
|
1848
|
-
* @returns
|
|
1849
|
-
*
|
|
1913
|
+
* @returns True if the path is the catalog agent file or a Markdown guide
|
|
1914
|
+
* mirror; false otherwise.
|
|
1850
1915
|
*
|
|
1851
1916
|
* @remarks
|
|
1852
1917
|
* The materializer keeps these paths presence-owned because the catalog or
|
|
@@ -1864,7 +1929,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1864
1929
|
export declare function isDeferredPath(path: string): boolean;
|
|
1865
1930
|
|
|
1866
1931
|
/**
|
|
1867
|
-
*
|
|
1932
|
+
* Narrows a value to a {@link Dependency}.
|
|
1868
1933
|
*
|
|
1869
1934
|
* @remarks
|
|
1870
1935
|
* Structural and bounded: which names and ranges a blueprint may declare is a
|
|
@@ -1882,7 +1947,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1882
1947
|
export declare const isDependency: Guard<Dependency>;
|
|
1883
1948
|
|
|
1884
1949
|
/**
|
|
1885
|
-
*
|
|
1950
|
+
* Narrows a value to the scoped package name a runtime dependency carries.
|
|
1886
1951
|
*
|
|
1887
1952
|
* @remarks
|
|
1888
1953
|
* A dependency name reaches a path, because a workspace's guide mirror is
|
|
@@ -1902,7 +1967,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1902
1967
|
export declare const isDependencyName: Guard<string>;
|
|
1903
1968
|
|
|
1904
1969
|
/**
|
|
1905
|
-
*
|
|
1970
|
+
* Narrows a value to one {@link Environment} a workspace may select.
|
|
1906
1971
|
*
|
|
1907
1972
|
* @example
|
|
1908
1973
|
* ```ts
|
|
@@ -1915,7 +1980,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1915
1980
|
export declare const isEnvironment: Guard<Environment>;
|
|
1916
1981
|
|
|
1917
1982
|
/**
|
|
1918
|
-
*
|
|
1983
|
+
* Narrows a value to a {@link Finding}.
|
|
1919
1984
|
*
|
|
1920
1985
|
* @remarks
|
|
1921
1986
|
* `observed` is required exactly where the mutation it precedes is held to it,
|
|
@@ -1931,7 +1996,32 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1931
1996
|
export declare const isFinding: Guard<Finding>;
|
|
1932
1997
|
|
|
1933
1998
|
/**
|
|
1934
|
-
*
|
|
1999
|
+
* Checks whether a destination's floor bytes survive a live overlay.
|
|
2000
|
+
*
|
|
2001
|
+
* @param path - The target-relative destination to test.
|
|
2002
|
+
* @returns True if the path is deferred or belongs to the instruction
|
|
2003
|
+
* canon; false otherwise.
|
|
2004
|
+
*
|
|
2005
|
+
* @remarks
|
|
2006
|
+
* The one reading of what a live fill does not replace, so the overlay assembler
|
|
2007
|
+
* and the executable's fetch list never disagree about a destination. A deferred
|
|
2008
|
+
* path's bytes belong to the catalog or mirror verb, and a canon destination is
|
|
2009
|
+
* staged for reading rather than for a target, so the installed floor's bytes
|
|
2010
|
+
* stand for both. A reader that requested either would spend a round trip on
|
|
2011
|
+
* bytes the overlay would not take.
|
|
2012
|
+
*
|
|
2013
|
+
* @example
|
|
2014
|
+
* ```ts
|
|
2015
|
+
* import { isFloorPath } from '@orkestrel/scaffold'
|
|
2016
|
+
*
|
|
2017
|
+
* isFloorPath('AGENTS.md') // true
|
|
2018
|
+
* isFloorPath('scripts/codex.sh') // false
|
|
2019
|
+
* ```
|
|
2020
|
+
*/
|
|
2021
|
+
export declare function isFloorPath(path: string): boolean;
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* Narrows a value to one {@link Group} a plan selects over.
|
|
1935
2025
|
*
|
|
1936
2026
|
* @example
|
|
1937
2027
|
* ```ts
|
|
@@ -1943,11 +2033,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1943
2033
|
*/
|
|
1944
2034
|
export declare const isGroup: Guard<Group>;
|
|
1945
2035
|
|
|
1946
|
-
/**
|
|
2036
|
+
/** Narrows a value to a bounded group selection. */
|
|
1947
2037
|
export declare const isGroups: Guard<readonly Group[]>;
|
|
1948
2038
|
|
|
1949
2039
|
/**
|
|
1950
|
-
*
|
|
2040
|
+
* Narrows a value to exact lowercase hexadecimal bytes within one artifact's limit.
|
|
1951
2041
|
*
|
|
1952
2042
|
* @remarks
|
|
1953
2043
|
* Two digits per byte, so an odd length is refused and empty content is valid.
|
|
@@ -1965,7 +2055,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1965
2055
|
export declare const isHex: Guard<string>;
|
|
1966
2056
|
|
|
1967
2057
|
/**
|
|
1968
|
-
*
|
|
2058
|
+
* Narrows a value to a {@link ManifestScript}.
|
|
1969
2059
|
*
|
|
1970
2060
|
* @remarks
|
|
1971
2061
|
* Structural and bounded, exactly as {@link isDependency} is: a script name
|
|
@@ -1984,7 +2074,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1984
2074
|
export declare const isManifestScript: Guard<ManifestScript>;
|
|
1985
2075
|
|
|
1986
2076
|
/**
|
|
1987
|
-
*
|
|
2077
|
+
* Narrows a value to a {@link Mirror}.
|
|
1988
2078
|
*
|
|
1989
2079
|
* @remarks
|
|
1990
2080
|
* `content` is the fetched guide text and `observed` is the local mirror's
|
|
@@ -1994,7 +2084,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
1994
2084
|
export declare const isMirror: Guard<Mirror>;
|
|
1995
2085
|
|
|
1996
2086
|
/**
|
|
1997
|
-
*
|
|
2087
|
+
* Narrows a value to an {@link Override}.
|
|
1998
2088
|
*
|
|
1999
2089
|
* @remarks
|
|
2000
2090
|
* Whether the path names a planned artifact is a gate law; whether it names a
|
|
@@ -2010,11 +2100,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2010
2100
|
export declare const isOverride: Guard<Override>;
|
|
2011
2101
|
|
|
2012
2102
|
/**
|
|
2013
|
-
*
|
|
2103
|
+
* Narrows a value to a logical target-relative path.
|
|
2014
2104
|
*
|
|
2015
2105
|
* @param value - The candidate path.
|
|
2016
|
-
* @returns
|
|
2017
|
-
* control character, or reserved syntax character.
|
|
2106
|
+
* @returns True if the value is a bounded relative path with no traversal, empty
|
|
2107
|
+
* segment, control character, or reserved syntax character; false otherwise.
|
|
2018
2108
|
*
|
|
2019
2109
|
* @remarks
|
|
2020
2110
|
* Every path this package reads or writes passes here, so one law covers a
|
|
@@ -2036,7 +2126,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2036
2126
|
export declare function isPath(value: unknown): value is string;
|
|
2037
2127
|
|
|
2038
2128
|
/**
|
|
2039
|
-
*
|
|
2129
|
+
* Narrows a value to a {@link Plan}.
|
|
2040
2130
|
*
|
|
2041
2131
|
* @remarks
|
|
2042
2132
|
* A plan reaches the writer, and the writer has no question channel, so this
|
|
@@ -2048,7 +2138,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2048
2138
|
export declare const isPlan: Guard<Plan>;
|
|
2049
2139
|
|
|
2050
2140
|
/**
|
|
2051
|
-
*
|
|
2141
|
+
* Narrows a value to a {@link Question}.
|
|
2052
2142
|
*
|
|
2053
2143
|
* @example
|
|
2054
2144
|
* ```ts
|
|
@@ -2060,10 +2150,33 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2060
2150
|
export declare const isQuestion: Guard<Question>;
|
|
2061
2151
|
|
|
2062
2152
|
/**
|
|
2063
|
-
*
|
|
2153
|
+
* Checks whether a target's present bytes at a path are owned by another surface.
|
|
2154
|
+
*
|
|
2155
|
+
* @param path - The target-relative path to test.
|
|
2156
|
+
* @returns True if the path is a {@link WORKSPACE_OWNED_PATHS} member or a
|
|
2157
|
+
* deferred path; false otherwise.
|
|
2158
|
+
*
|
|
2159
|
+
* @remarks
|
|
2160
|
+
* The one reading of presence ownership. A workspace-owned path carries bytes
|
|
2161
|
+
* the consumer's own workspace writes, and a deferred path carries bytes the
|
|
2162
|
+
* catalog or mirror surface writes, so a vendored expansion plans either by
|
|
2163
|
+
* presence rather than reading and claiming its content.
|
|
2164
|
+
*
|
|
2165
|
+
* @example
|
|
2166
|
+
* ```ts
|
|
2167
|
+
* import { isRetainedPath } from '@orkestrel/scaffold'
|
|
2168
|
+
*
|
|
2169
|
+
* isRetainedPath('.gitignore') // true
|
|
2170
|
+
* isRetainedPath('LICENSE') // false
|
|
2171
|
+
* ```
|
|
2172
|
+
*/
|
|
2173
|
+
export declare function isRetainedPath(path: string): boolean;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* Narrows a caught value to a {@link ScaffoldError}.
|
|
2064
2177
|
*
|
|
2065
2178
|
* @param value - The caught value to narrow.
|
|
2066
|
-
* @returns
|
|
2179
|
+
* @returns True if `value` is a {@link ScaffoldError}; false otherwise.
|
|
2067
2180
|
*
|
|
2068
2181
|
* @example
|
|
2069
2182
|
* ```ts
|
|
@@ -2076,11 +2189,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2076
2189
|
export declare function isScaffoldError(value: unknown): value is ScaffoldError;
|
|
2077
2190
|
|
|
2078
2191
|
/**
|
|
2079
|
-
*
|
|
2192
|
+
* Narrows a value to a {@link Snapshot}.
|
|
2080
2193
|
*
|
|
2081
2194
|
* @param value - The candidate target snapshot.
|
|
2082
|
-
* @returns
|
|
2083
|
-
* whose every value is exact lowercase hexadecimal bytes.
|
|
2195
|
+
* @returns True if the value is a bounded plain record whose every key is a path and
|
|
2196
|
+
* whose every value is exact lowercase hexadecimal bytes; false otherwise.
|
|
2084
2197
|
*
|
|
2085
2198
|
* @remarks
|
|
2086
2199
|
* Read through the shared total key lens, so a hostile `ownKeys` trap and a
|
|
@@ -2099,7 +2212,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2099
2212
|
export declare function isSnapshot(value: unknown): value is Snapshot;
|
|
2100
2213
|
|
|
2101
2214
|
/**
|
|
2102
|
-
*
|
|
2215
|
+
* Names whether an upstream lookup produced an answer.
|
|
2103
2216
|
*
|
|
2104
2217
|
* @remarks
|
|
2105
2218
|
* `found` carries the answer. `missing` is an upstream `404`, which is a
|
|
@@ -2112,10 +2225,10 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2112
2225
|
*/
|
|
2113
2226
|
export declare type Lookup = 'found' | 'missing' | 'unmatched' | 'failed';
|
|
2114
2227
|
|
|
2115
|
-
/**
|
|
2228
|
+
/** Names the manifest path every compiler plan emits with birth ownership. */
|
|
2116
2229
|
export declare const MANIFEST_PATH = "package.json";
|
|
2117
2230
|
|
|
2118
|
-
/**
|
|
2231
|
+
/** Describes the dependency sections read from an existing package manifest. */
|
|
2119
2232
|
export declare interface ManifestDependencySet {
|
|
2120
2233
|
readonly runtime: readonly Dependency[];
|
|
2121
2234
|
readonly development: readonly Dependency[];
|
|
@@ -2123,7 +2236,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2123
2236
|
}
|
|
2124
2237
|
|
|
2125
2238
|
/**
|
|
2126
|
-
*
|
|
2239
|
+
* Describes the manifest regions a writing operation may change.
|
|
2127
2240
|
*
|
|
2128
2241
|
* @remarks
|
|
2129
2242
|
* Each region is written in place, so every byte outside the named ranges
|
|
@@ -2136,7 +2249,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2136
2249
|
}
|
|
2137
2250
|
|
|
2138
2251
|
/**
|
|
2139
|
-
*
|
|
2252
|
+
* Represents one manifest script a region-writing operation may replace.
|
|
2140
2253
|
*
|
|
2141
2254
|
* @remarks
|
|
2142
2255
|
* `command` is the value the write lands. `accepted` is the closed set of
|
|
@@ -2153,7 +2266,8 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2153
2266
|
}
|
|
2154
2267
|
|
|
2155
2268
|
/**
|
|
2156
|
-
*
|
|
2269
|
+
* Projects a package manifest's text to the `@orkestrel/*` packages each dependency
|
|
2270
|
+
* section declares.
|
|
2157
2271
|
*
|
|
2158
2272
|
* @param manifest - The `package.json` text.
|
|
2159
2273
|
* @returns The runtime, development, and peer declarations as separate lists.
|
|
@@ -2178,7 +2292,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2178
2292
|
export declare function manifestToDependencies(manifest: string): ManifestDependencySet;
|
|
2179
2293
|
|
|
2180
2294
|
/**
|
|
2181
|
-
*
|
|
2295
|
+
* Projects a package manifest's text to its own name.
|
|
2182
2296
|
*
|
|
2183
2297
|
* @param manifest - The `package.json` text.
|
|
2184
2298
|
* @returns The declared name, or `undefined` when the text is oversized,
|
|
@@ -2200,25 +2314,49 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2200
2314
|
export declare function manifestToName(manifest: string): string | undefined;
|
|
2201
2315
|
|
|
2202
2316
|
/**
|
|
2203
|
-
*
|
|
2317
|
+
* Tests whether {@link inferDrift} could have produced a finding for an ownership.
|
|
2204
2318
|
*
|
|
2205
2319
|
* @param ownership - What scaffold claims at the planned path.
|
|
2206
2320
|
* @param finding - The audit verdict to test.
|
|
2207
|
-
* @returns
|
|
2321
|
+
* @returns True if the ownership and verdict are reachable through
|
|
2322
|
+
* {@link inferDrift}; false otherwise.
|
|
2208
2323
|
*
|
|
2209
2324
|
* @remarks
|
|
2210
2325
|
* This predicate keeps the comparison law beside the reachability law it
|
|
2211
2326
|
* restates. A mutation uses it so a refusal can distinguish an impossible
|
|
2212
2327
|
* verdict from a target that genuinely moved after its audit.
|
|
2328
|
+
*
|
|
2329
|
+
* @example
|
|
2330
|
+
* ```ts
|
|
2331
|
+
* import type { Finding } from '@orkestrel/scaffold'
|
|
2332
|
+
* import { matchesDriftReachability } from '@orkestrel/scaffold'
|
|
2333
|
+
*
|
|
2334
|
+
* const aligned: Finding = {
|
|
2335
|
+
* path: 'README.md',
|
|
2336
|
+
* group: 'docs',
|
|
2337
|
+
* ownership: 'birth',
|
|
2338
|
+
* drift: 'aligned',
|
|
2339
|
+
* }
|
|
2340
|
+
* const stale: Finding = {
|
|
2341
|
+
* path: 'README.md',
|
|
2342
|
+
* group: 'docs',
|
|
2343
|
+
* ownership: 'birth',
|
|
2344
|
+
* drift: 'stale',
|
|
2345
|
+
* observed: '6279650a',
|
|
2346
|
+
* }
|
|
2347
|
+
*
|
|
2348
|
+
* matchesDriftReachability('birth', aligned) // true
|
|
2349
|
+
* matchesDriftReachability('birth', stale) // false
|
|
2350
|
+
* ```
|
|
2213
2351
|
*/
|
|
2214
2352
|
export declare function matchesDriftReachability(ownership: Ownership, finding: Finding): boolean;
|
|
2215
2353
|
|
|
2216
2354
|
/**
|
|
2217
|
-
*
|
|
2355
|
+
* Tests whether a declared engines floor is at or above the supported minimum.
|
|
2218
2356
|
*
|
|
2219
2357
|
* @param engines - The declared `engines.node` range.
|
|
2220
|
-
* @returns
|
|
2221
|
-
*
|
|
2358
|
+
* @returns True if the range is the accepted syntax and its floor is at or above
|
|
2359
|
+
* `MINIMUM_NODE_VERSION`; false otherwise.
|
|
2222
2360
|
*
|
|
2223
2361
|
* @remarks
|
|
2224
2362
|
* The declaration states a floor, so the comparison is against the oldest Node
|
|
@@ -2237,11 +2375,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2237
2375
|
export declare function matchesEngines(engines: string): boolean;
|
|
2238
2376
|
|
|
2239
2377
|
/**
|
|
2240
|
-
*
|
|
2378
|
+
* Tests whether a path instructs or wires an agent rather than the toolchain.
|
|
2241
2379
|
*
|
|
2242
2380
|
* @param path - The target-relative path to test.
|
|
2243
|
-
* @returns
|
|
2244
|
-
*
|
|
2381
|
+
* @returns True if the path is beneath a harness directory or is one of the exact
|
|
2382
|
+
* root filenames that wires an agent bench; false otherwise.
|
|
2245
2383
|
*
|
|
2246
2384
|
* @remarks
|
|
2247
2385
|
* The one home of the orchestration membership rule. A vendored path and a
|
|
@@ -2261,10 +2399,10 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2261
2399
|
export declare function matchesOrchestrationPath(path: string): boolean;
|
|
2262
2400
|
|
|
2263
2401
|
/**
|
|
2264
|
-
*
|
|
2402
|
+
* Tests whether one emitted line fits the vendored formatter width.
|
|
2265
2403
|
*
|
|
2266
2404
|
* @param line - One emitted line, leading tabs included.
|
|
2267
|
-
* @returns
|
|
2405
|
+
* @returns True if the expanded line fits; false otherwise.
|
|
2268
2406
|
*
|
|
2269
2407
|
* @remarks
|
|
2270
2408
|
* A generator writes source the formatter then reads back, so a line packed
|
|
@@ -2284,11 +2422,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2284
2422
|
export declare function matchesPrintWidth(line: string): boolean;
|
|
2285
2423
|
|
|
2286
2424
|
/**
|
|
2287
|
-
*
|
|
2425
|
+
* Tests whether a declared range already admits a published version.
|
|
2288
2426
|
*
|
|
2289
2427
|
* @param range - The declared dependency range.
|
|
2290
2428
|
* @param latest - The version the registry reported as latest.
|
|
2291
|
-
* @returns
|
|
2429
|
+
* @returns True if the range admits that version; false otherwise.
|
|
2292
2430
|
*
|
|
2293
2431
|
* @remarks
|
|
2294
2432
|
* The one place this comparison is made. A `Release` records the declared range
|
|
@@ -2328,26 +2466,26 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2328
2466
|
*/
|
|
2329
2467
|
export declare function matchesRange(range: string, latest: string): boolean;
|
|
2330
2468
|
|
|
2331
|
-
/**
|
|
2469
|
+
/** Caps the bytes accepted for one artifact. */
|
|
2332
2470
|
export declare const MAX_ARTIFACT_BYTES = 5242880;
|
|
2333
2471
|
|
|
2334
|
-
/**
|
|
2472
|
+
/** Caps the length of the hexadecimal string carrying one artifact's bytes. */
|
|
2335
2473
|
export declare const MAX_ARTIFACT_HEX_LENGTH: number;
|
|
2336
2474
|
|
|
2337
|
-
/**
|
|
2475
|
+
/** Caps the findings one audit can produce from a bounded plan and snapshot. */
|
|
2338
2476
|
export declare const MAX_AUDIT_FINDINGS: number;
|
|
2339
2477
|
|
|
2340
|
-
/**
|
|
2478
|
+
/** Caps the items accepted in one public collection. */
|
|
2341
2479
|
export declare const MAX_COLLECTION_ITEMS = 1000;
|
|
2342
2480
|
|
|
2343
|
-
/**
|
|
2481
|
+
/** Sets the maximum dependency package name length, scope included, as the registry caps it. */
|
|
2344
2482
|
export declare const MAX_DEPENDENCY_NAME_LENGTH = 214;
|
|
2345
2483
|
|
|
2346
|
-
/**
|
|
2484
|
+
/** Caps the bytes accepted for one package or vendored-host manifest. */
|
|
2347
2485
|
export declare const MAX_MANIFEST_BYTES = 1048576;
|
|
2348
2486
|
|
|
2349
2487
|
/**
|
|
2350
|
-
*
|
|
2488
|
+
* Caps the bare workspace name length.
|
|
2351
2489
|
*
|
|
2352
2490
|
* @remarks
|
|
2353
2491
|
* The registry caps a whole package name at 214 characters and the generated
|
|
@@ -2355,14 +2493,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2355
2493
|
*/
|
|
2356
2494
|
export declare const MAX_NAME_LENGTH = 203;
|
|
2357
2495
|
|
|
2358
|
-
/**
|
|
2496
|
+
/** Caps the length of one path, matching the longest a supported filesystem accepts. */
|
|
2359
2497
|
export declare const MAX_PATH_LENGTH = 32767;
|
|
2360
2498
|
|
|
2361
|
-
/**
|
|
2499
|
+
/** Caps the length of one declared package range. */
|
|
2362
2500
|
export declare const MAX_RANGE_LENGTH = 2048;
|
|
2363
2501
|
|
|
2364
2502
|
/**
|
|
2365
|
-
*
|
|
2503
|
+
* Caps the decoded bytes accepted from one registry response.
|
|
2366
2504
|
*
|
|
2367
2505
|
* @remarks
|
|
2368
2506
|
* The 2026-08-21 abbreviated-packument measurements were 8,647,138 bytes for
|
|
@@ -2372,14 +2510,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2372
2510
|
*/
|
|
2373
2511
|
export declare const MAX_REGISTRY_BYTES = 33554432;
|
|
2374
2512
|
|
|
2375
|
-
/**
|
|
2513
|
+
/** Caps the length of one manifest script name or command. */
|
|
2376
2514
|
export declare const MAX_SCRIPT_LENGTH = 4096;
|
|
2377
2515
|
|
|
2378
|
-
/**
|
|
2516
|
+
/** Caps the bytes retained across one whole plan or audit. */
|
|
2379
2517
|
export declare const MAX_TOTAL_ARTIFACT_BYTES = 104857600;
|
|
2380
2518
|
|
|
2381
2519
|
/**
|
|
2382
|
-
*
|
|
2520
|
+
* Caps the decoded bytes accepted across one registry-reading call.
|
|
2383
2521
|
*
|
|
2384
2522
|
* @remarks
|
|
2385
2523
|
* The 2026-08-21 browser-workspace registry set measured about 24 MiB. The
|
|
@@ -2387,11 +2525,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2387
2525
|
*/
|
|
2388
2526
|
export declare const MAX_TOTAL_REGISTRY_BYTES = 100663296;
|
|
2389
2527
|
|
|
2390
|
-
/**
|
|
2528
|
+
/** Names the oldest Node version the generated toolchain supports. */
|
|
2391
2529
|
export declare const MINIMUM_NODE_VERSION = "22.12.0";
|
|
2392
2530
|
|
|
2393
2531
|
/**
|
|
2394
|
-
*
|
|
2532
|
+
* Represents one dependency guide fetched from upstream, beside the local mirror it answers for.
|
|
2395
2533
|
*
|
|
2396
2534
|
* @remarks
|
|
2397
2535
|
* A found lookup carries the fetched bytes; one that produced no answer carries
|
|
@@ -2420,11 +2558,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2420
2558
|
readonly content?: never;
|
|
2421
2559
|
};
|
|
2422
2560
|
|
|
2423
|
-
/**
|
|
2561
|
+
/** Matches the bare workspace name syntax: lowercase alphanumeric with hyphens, letter first. */
|
|
2424
2562
|
export declare const NAME_PATTERN: RegExp;
|
|
2425
2563
|
|
|
2426
2564
|
/**
|
|
2427
|
-
*
|
|
2565
|
+
* Derives the guide mirror path a package name answers for.
|
|
2428
2566
|
*
|
|
2429
2567
|
* @param name - A bare or `@orkestrel`-scoped package name.
|
|
2430
2568
|
* @returns The mirror path, `guides/<bare name>.md`.
|
|
@@ -2448,7 +2586,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2448
2586
|
export declare function nameToGuide(name: string): string;
|
|
2449
2587
|
|
|
2450
2588
|
/**
|
|
2451
|
-
*
|
|
2589
|
+
* Compiles the vendored host artifacts a named workspace plans.
|
|
2452
2590
|
*
|
|
2453
2591
|
* @param name - The target workspace's own bare package name.
|
|
2454
2592
|
* @returns One artifact per vendored path in `HOST_PATHS` order, then the
|
|
@@ -2487,7 +2625,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2487
2625
|
export declare function nameToHostArtifacts(name: string): readonly Artifact[];
|
|
2488
2626
|
|
|
2489
2627
|
/**
|
|
2490
|
-
*
|
|
2628
|
+
* Derives the declaration rewrite a published face's `beforeWriteFile` applies.
|
|
2491
2629
|
*
|
|
2492
2630
|
* @param name - The workspace's own bare package name.
|
|
2493
2631
|
* @returns The ternary consequent an emitted `vite.{browser,server}.config.ts`
|
|
@@ -2517,7 +2655,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2517
2655
|
export declare function nameToRewrite(name: string): string;
|
|
2518
2656
|
|
|
2519
2657
|
/**
|
|
2520
|
-
*
|
|
2658
|
+
* Lists the exact root filenames that wire an agent bench rather than the toolchain, frozen.
|
|
2521
2659
|
*
|
|
2522
2660
|
* @remarks
|
|
2523
2661
|
* `.mcp.json` registers MCP servers for the harness. It sits among the root
|
|
@@ -2526,7 +2664,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2526
2664
|
export declare const ORCHESTRATION_PATH_NAMES: readonly string[];
|
|
2527
2665
|
|
|
2528
2666
|
/**
|
|
2529
|
-
*
|
|
2667
|
+
* Lists the path prefixes whose contents instruct or wire an agent, frozen.
|
|
2530
2668
|
*
|
|
2531
2669
|
* @remarks
|
|
2532
2670
|
* A path is grouped by what it governs rather than by where it sits: anything
|
|
@@ -2538,7 +2676,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2538
2676
|
export declare const ORCHESTRATION_PATH_PREFIXES: readonly string[];
|
|
2539
2677
|
|
|
2540
2678
|
/**
|
|
2541
|
-
*
|
|
2679
|
+
* Names how an artifact's content is produced.
|
|
2542
2680
|
*
|
|
2543
2681
|
* @remarks
|
|
2544
2682
|
* `host` is byte-copied from this package's vendored data root. `template` is
|
|
@@ -2549,7 +2687,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2549
2687
|
export declare type Origin = 'host' | 'template' | 'computed';
|
|
2550
2688
|
|
|
2551
2689
|
/**
|
|
2552
|
-
*
|
|
2690
|
+
* Matches the exact caret-pinned pre-1.0 range accepted for an `@orkestrel/*` runtime dependency.
|
|
2553
2691
|
*
|
|
2554
2692
|
* @remarks
|
|
2555
2693
|
* Pre-1.0 means any `0.x`, not `0.0.x`. The narrower form would refuse the first
|
|
@@ -2560,7 +2698,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2560
2698
|
export declare const ORKESTREL_RANGE_PATTERN: RegExp;
|
|
2561
2699
|
|
|
2562
2700
|
/**
|
|
2563
|
-
*
|
|
2701
|
+
* Represents one artifact override.
|
|
2564
2702
|
*
|
|
2565
2703
|
* @remarks
|
|
2566
2704
|
* `content` replaces the rendered artifact at `path` and never partially
|
|
@@ -2575,7 +2713,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2575
2713
|
}
|
|
2576
2714
|
|
|
2577
2715
|
/**
|
|
2578
|
-
*
|
|
2716
|
+
* Measures a blueprint's overrides against the artifacts drafted for it.
|
|
2579
2717
|
*
|
|
2580
2718
|
* @param overrides - The blueprint's overrides.
|
|
2581
2719
|
* @param artifacts - The drafted artifacts, before overrides are applied.
|
|
@@ -2602,7 +2740,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2602
2740
|
export declare function overridesToQuestions(overrides: readonly Override[], artifacts: readonly Artifact[]): readonly Question[];
|
|
2603
2741
|
|
|
2604
2742
|
/**
|
|
2605
|
-
*
|
|
2743
|
+
* Names what scaffold claims at an artifact's path.
|
|
2606
2744
|
*
|
|
2607
2745
|
* @remarks
|
|
2608
2746
|
* `content` claims the bytes: audit compares them, and a write restores a
|
|
@@ -2615,7 +2753,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2615
2753
|
export declare type Ownership = 'content' | 'presence' | 'birth';
|
|
2616
2754
|
|
|
2617
2755
|
/**
|
|
2618
|
-
*
|
|
2756
|
+
* Coerces an untrusted value to a {@link Blueprint}.
|
|
2619
2757
|
*
|
|
2620
2758
|
* @param value - The value to parse.
|
|
2621
2759
|
* @returns The blueprint, or `undefined` when the value is not one.
|
|
@@ -2636,7 +2774,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2636
2774
|
export declare function parseBlueprint(value: unknown): Blueprint | undefined;
|
|
2637
2775
|
|
|
2638
2776
|
/**
|
|
2639
|
-
*
|
|
2777
|
+
* Coerces an untrusted value to {@link CompilerOptions}.
|
|
2640
2778
|
*
|
|
2641
2779
|
* @param value - The value to parse.
|
|
2642
2780
|
* @returns The options, or `undefined` when the value is not an option bag.
|
|
@@ -2657,7 +2795,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2657
2795
|
export declare function parseCompilerOptions(value: unknown): CompilerOptions | undefined;
|
|
2658
2796
|
|
|
2659
2797
|
/**
|
|
2660
|
-
*
|
|
2798
|
+
* Coerces an untrusted value to a group selection.
|
|
2661
2799
|
*
|
|
2662
2800
|
* @param value - The value to parse.
|
|
2663
2801
|
* @returns The selection, or `undefined` when the value is not one.
|
|
@@ -2678,7 +2816,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2678
2816
|
export declare function parseGroups(value: unknown): readonly Group[] | undefined;
|
|
2679
2817
|
|
|
2680
2818
|
/**
|
|
2681
|
-
*
|
|
2819
|
+
* Coerces an untrusted value to a {@link Snapshot}.
|
|
2682
2820
|
*
|
|
2683
2821
|
* @param value - The value to parse.
|
|
2684
2822
|
* @returns The snapshot, or `undefined` when the value is not one.
|
|
@@ -2697,7 +2835,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2697
2835
|
export declare function parseSnapshot(value: unknown): Snapshot | undefined;
|
|
2698
2836
|
|
|
2699
2837
|
/**
|
|
2700
|
-
*
|
|
2838
|
+
* Builds one `exports` condition block for a built environment.
|
|
2701
2839
|
*
|
|
2702
2840
|
* @param path - The extensionless `dist` path both conditions point at.
|
|
2703
2841
|
* @param formats - The module formats that environment builds.
|
|
@@ -2721,7 +2859,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2721
2859
|
export declare function pathToCondition(path: string, formats: readonly BuildFormat[]): Readonly<Record<string, unknown>>;
|
|
2722
2860
|
|
|
2723
2861
|
/**
|
|
2724
|
-
*
|
|
2862
|
+
* Holds the compiled, ordered artifact list and the selection it covers.
|
|
2725
2863
|
*
|
|
2726
2864
|
* @remarks
|
|
2727
2865
|
* `hash` is the plan's content identity and is absent until the pin stage
|
|
@@ -2736,7 +2874,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2736
2874
|
readonly hash?: string;
|
|
2737
2875
|
}
|
|
2738
2876
|
|
|
2739
|
-
/**
|
|
2877
|
+
/** Represents the tally of one plan by artifact origin. */
|
|
2740
2878
|
export declare interface PlanSummary {
|
|
2741
2879
|
readonly name: string;
|
|
2742
2880
|
readonly src: readonly Environment[];
|
|
@@ -2748,7 +2886,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2748
2886
|
}
|
|
2749
2887
|
|
|
2750
2888
|
/**
|
|
2751
|
-
*
|
|
2889
|
+
* Compares a plan against a target's current content.
|
|
2752
2890
|
*
|
|
2753
2891
|
* @param plan - The compiled plan.
|
|
2754
2892
|
* @param current - The target's exact bytes, keyed by artifact-relative path.
|
|
@@ -2776,7 +2914,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2776
2914
|
export declare function planToFindings(plan: Plan, current: Snapshot): readonly Finding[];
|
|
2777
2915
|
|
|
2778
2916
|
/**
|
|
2779
|
-
*
|
|
2917
|
+
* Computes a plan's content identity.
|
|
2780
2918
|
*
|
|
2781
2919
|
* @param plan - The plan to identify.
|
|
2782
2920
|
* @returns Sixteen lowercase hexadecimal digits, or `undefined` when the plan
|
|
@@ -2806,7 +2944,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2806
2944
|
export declare function planToHash(plan: Plan): string | undefined;
|
|
2807
2945
|
|
|
2808
2946
|
/**
|
|
2809
|
-
*
|
|
2947
|
+
* Projects a plan into its tally by artifact origin.
|
|
2810
2948
|
*
|
|
2811
2949
|
* @param plan - The plan to summarize.
|
|
2812
2950
|
* @returns The workspace's name, both environment axes, the covered groups, and
|
|
@@ -2827,11 +2965,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2827
2965
|
*/
|
|
2828
2966
|
export declare function planToSummary(plan: Plan): PlanSummary;
|
|
2829
2967
|
|
|
2830
|
-
/**
|
|
2968
|
+
/** Caps the columns one emitted line may occupy, matching `printWidth` in `.oxfmtrc.json`. */
|
|
2831
2969
|
export declare const PRINT_WIDTH = 100;
|
|
2832
2970
|
|
|
2833
2971
|
/**
|
|
2834
|
-
*
|
|
2972
|
+
* Represents one validation issue raised against a blueprint or a plan.
|
|
2835
2973
|
*
|
|
2836
2974
|
* @remarks
|
|
2837
2975
|
* A blocking question fails the gate closed. A non-blocking question is an
|
|
@@ -2846,7 +2984,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2846
2984
|
}
|
|
2847
2985
|
|
|
2848
2986
|
/**
|
|
2849
|
-
*
|
|
2987
|
+
* Represents one declared dependency range measured against a registry release.
|
|
2850
2988
|
*
|
|
2851
2989
|
* @remarks
|
|
2852
2990
|
* `range` is the declared range, and `latest` is the version the producer
|
|
@@ -2871,7 +3009,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2871
3009
|
};
|
|
2872
3010
|
|
|
2873
3011
|
/**
|
|
2874
|
-
*
|
|
3012
|
+
* Names the `prepublishOnly` row that runs the packed-package proof against a real registry.
|
|
2875
3013
|
*
|
|
2876
3014
|
* @remarks
|
|
2877
3015
|
* The proof reads `import.meta.env.MODE`, so without `--mode release` it passes
|
|
@@ -2881,7 +3019,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2881
3019
|
export declare const RELEASE_PROOF_COMMAND = "npm run test:distribution -- --mode release";
|
|
2882
3020
|
|
|
2883
3021
|
/**
|
|
2884
|
-
*
|
|
3022
|
+
* Replaces declared dependency ranges in package manifest text.
|
|
2885
3023
|
*
|
|
2886
3024
|
* @param manifest - The manifest text to compile.
|
|
2887
3025
|
* @param pins - The runtime and development names and replacement ranges.
|
|
@@ -2911,7 +3049,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2911
3049
|
export declare function replaceManifestRanges(manifest: string, pins: DependencyPinSet): string | undefined;
|
|
2912
3050
|
|
|
2913
3051
|
/**
|
|
2914
|
-
*
|
|
3052
|
+
* Replaces named script values in package manifest text.
|
|
2915
3053
|
*
|
|
2916
3054
|
* @param manifest - The manifest text to compile.
|
|
2917
3055
|
* @param scripts - The scripts to write, each with the predecessors it accepts.
|
|
@@ -2950,7 +3088,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2950
3088
|
export declare function replaceManifestScripts(manifest: string, scripts: readonly ManifestScript[]): string | undefined;
|
|
2951
3089
|
|
|
2952
3090
|
/**
|
|
2953
|
-
*
|
|
3091
|
+
* Replaces dependency ranges in a plan's manifest and recomputes its identity.
|
|
2954
3092
|
*
|
|
2955
3093
|
* @param plan - The plan carrying the manifest artifact to compile.
|
|
2956
3094
|
* @param pins - The runtime and development names and replacement ranges.
|
|
@@ -2973,7 +3111,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
2973
3111
|
export declare function replacePlanRanges(plan: Plan, pins: DependencyPinSet): Plan | undefined;
|
|
2974
3112
|
|
|
2975
3113
|
/**
|
|
2976
|
-
*
|
|
3114
|
+
* Represents the one error this package throws, carrying the coded reason it was raised.
|
|
2977
3115
|
*
|
|
2978
3116
|
* @remarks
|
|
2979
3117
|
* Each code names one cause: `INVALID` for off-contract input, `DESTROYED` for
|
|
@@ -3010,7 +3148,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3010
3148
|
readonly code: ScaffoldErrorCode;
|
|
3011
3149
|
readonly context?: unknown;
|
|
3012
3150
|
/**
|
|
3013
|
-
*
|
|
3151
|
+
* Constructs a coded scaffold error.
|
|
3014
3152
|
*
|
|
3015
3153
|
* @param code - The coded reason the error is raised.
|
|
3016
3154
|
* @param message - What went wrong, in one sentence.
|
|
@@ -3019,11 +3157,11 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3019
3157
|
constructor(code: ScaffoldErrorCode, message: string, context?: unknown);
|
|
3020
3158
|
}
|
|
3021
3159
|
|
|
3022
|
-
/**
|
|
3160
|
+
/** Names the coded reasons a scaffold error is raised. */
|
|
3023
3161
|
export declare type ScaffoldErrorCode = 'INVALID' | 'BLOCKED' | 'DESTROYED' | 'TARGET' | 'WRITE' | 'FETCH';
|
|
3024
3162
|
|
|
3025
3163
|
/**
|
|
3026
|
-
*
|
|
3164
|
+
* Represents the replayable outcome of one compile.
|
|
3027
3165
|
*
|
|
3028
3166
|
* @remarks
|
|
3029
3167
|
* `plan` is present exactly when the compile completed, so it is also the
|
|
@@ -3040,7 +3178,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3040
3178
|
}
|
|
3041
3179
|
|
|
3042
3180
|
/**
|
|
3043
|
-
*
|
|
3181
|
+
* Selects the groups a compile covers, in plan order.
|
|
3044
3182
|
*
|
|
3045
3183
|
* @param groups - The requested selection; every group when absent.
|
|
3046
3184
|
* @returns The requested groups in `GROUPS` order, without repeats.
|
|
@@ -3063,7 +3201,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3063
3201
|
export declare function selectGroups(groups?: readonly Group[]): readonly Group[];
|
|
3064
3202
|
|
|
3065
3203
|
/**
|
|
3066
|
-
*
|
|
3204
|
+
* Selects the host paths a named workspace vendors.
|
|
3067
3205
|
*
|
|
3068
3206
|
* @param paths - The candidate host paths, in their declared order.
|
|
3069
3207
|
* @param name - The target workspace's own bare package name.
|
|
@@ -3084,7 +3222,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3084
3222
|
export declare function selectHostPaths(paths: readonly string[], name: string): readonly string[];
|
|
3085
3223
|
|
|
3086
3224
|
/**
|
|
3087
|
-
*
|
|
3225
|
+
* Serializes one string as a single-quoted TypeScript literal.
|
|
3088
3226
|
*
|
|
3089
3227
|
* @param value - The string to serialize.
|
|
3090
3228
|
* @returns A complete single-quoted literal with line-breaking and delimiter
|
|
@@ -3104,20 +3242,23 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3104
3242
|
*/
|
|
3105
3243
|
export declare function serializeTypeScriptString(value: string): string;
|
|
3106
3244
|
|
|
3107
|
-
/**
|
|
3245
|
+
/** Names the provisioner skeleton a workspace with declared service vendors is given once. */
|
|
3108
3246
|
export declare const SERVICE_SCRIPT_PATH = "scripts/service.sh";
|
|
3109
3247
|
|
|
3110
|
-
/**
|
|
3248
|
+
/** Names the live-service readiness module whose presence makes a workspace `service`. */
|
|
3111
3249
|
export declare const SERVICE_SETUP_PATH = "tests/setupService.ts";
|
|
3112
3250
|
|
|
3113
|
-
/**
|
|
3251
|
+
/**
|
|
3252
|
+
* Names the include the live-service project covers, which is a directory rather than
|
|
3253
|
+
* one proof.
|
|
3254
|
+
*/
|
|
3114
3255
|
export declare const SERVICE_TEST_INCLUDE = "tests/service/**/*.test.ts";
|
|
3115
3256
|
|
|
3116
|
-
/**
|
|
3257
|
+
/** Names the Vite wrapper whose presence makes a workspace `showcase`. */
|
|
3117
3258
|
export declare const SHOWCASE_CONFIG_PATH = "configs/app/vite.showcase.config.ts";
|
|
3118
3259
|
|
|
3119
3260
|
/**
|
|
3120
|
-
*
|
|
3261
|
+
* Names the development dependency used only by the optional single-file showcase build.
|
|
3121
3262
|
*
|
|
3122
3263
|
* @example
|
|
3123
3264
|
* ```ts
|
|
@@ -3128,14 +3269,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3128
3269
|
*/
|
|
3129
3270
|
export declare const SHOWCASE_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
3130
3271
|
|
|
3131
|
-
/**
|
|
3272
|
+
/** Holds exact lowercase hexadecimal target bytes keyed by artifact-relative path. */
|
|
3132
3273
|
export declare type Snapshot = Readonly<Record<string, string>>;
|
|
3133
3274
|
|
|
3134
|
-
/**
|
|
3275
|
+
/** Lists the development dependencies a published browser `src` environment adds. */
|
|
3135
3276
|
export declare const SOURCE_BROWSER_DEV_DEPENDENCIES: Readonly<Record<string, string>>;
|
|
3136
3277
|
|
|
3137
3278
|
/**
|
|
3138
|
-
*
|
|
3279
|
+
* Holds the build and export settings each published `src` environment contributes, frozen.
|
|
3139
3280
|
*
|
|
3140
3281
|
* @remarks
|
|
3141
3282
|
* Per environment: the thin configuration files it adds under `configs/src`,
|
|
@@ -3146,7 +3287,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3146
3287
|
*/
|
|
3147
3288
|
export declare const SRC_MATRIX: Readonly<Record<Environment, SrcDefinition>>;
|
|
3148
3289
|
|
|
3149
|
-
/**
|
|
3290
|
+
/** Describes the build and export settings one published `src` environment contributes. */
|
|
3150
3291
|
export declare interface SrcDefinition {
|
|
3151
3292
|
readonly configs: readonly string[];
|
|
3152
3293
|
readonly project: string;
|
|
@@ -3155,7 +3296,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3155
3296
|
}
|
|
3156
3297
|
|
|
3157
3298
|
/**
|
|
3158
|
-
*
|
|
3299
|
+
* Projects a published selection into the manifest's entry fields.
|
|
3159
3300
|
*
|
|
3160
3301
|
* @param src - The declared published environments.
|
|
3161
3302
|
* @returns The `main` and `module` fields, plus `types` when one environment
|
|
@@ -3183,7 +3324,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3183
3324
|
};
|
|
3184
3325
|
|
|
3185
3326
|
/**
|
|
3186
|
-
*
|
|
3327
|
+
* Projects a published selection into the manifest's `exports` map.
|
|
3187
3328
|
*
|
|
3188
3329
|
* @param src - The declared published environments.
|
|
3189
3330
|
* @returns The map, keyed by subpath in `ENVIRONMENTS` order.
|
|
@@ -3208,7 +3349,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3208
3349
|
export declare function srcToExports(src: readonly Environment[]): Readonly<Record<string, unknown>>;
|
|
3209
3350
|
|
|
3210
3351
|
/**
|
|
3211
|
-
*
|
|
3352
|
+
* Selects the single published environment a package root points at.
|
|
3212
3353
|
*
|
|
3213
3354
|
* @param src - The declared published environments.
|
|
3214
3355
|
* @returns That environment, or `undefined` when the selection declares none or
|
|
@@ -3232,14 +3373,14 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3232
3373
|
*/
|
|
3233
3374
|
export declare function srcToRoot(src: readonly Environment[]): Environment | undefined;
|
|
3234
3375
|
|
|
3235
|
-
/**
|
|
3376
|
+
/** Sets the columns one tab occupies when the formatter measures a line, matching `tabWidth`. */
|
|
3236
3377
|
export declare const TAB_WIDTH = 2;
|
|
3237
3378
|
|
|
3238
|
-
/**
|
|
3379
|
+
/** Matches the exact `major.minor.patch` version syntax a blueprint declares. */
|
|
3239
3380
|
export declare const VERSION_PATTERN: RegExp;
|
|
3240
3381
|
|
|
3241
3382
|
/**
|
|
3242
|
-
*
|
|
3383
|
+
* Names which host-specific pipelines a generated root Vite configuration carries.
|
|
3243
3384
|
*
|
|
3244
3385
|
* @remarks
|
|
3245
3386
|
* Boundary guarantees never vary by blueprint, so they are not selected here:
|
|
@@ -3258,7 +3399,7 @@ export declare class Compiler implements CompilerInterface {
|
|
|
3258
3399
|
}
|
|
3259
3400
|
|
|
3260
3401
|
/**
|
|
3261
|
-
*
|
|
3402
|
+
* Lists the vendored paths whose present bytes belong to each workspace, frozen.
|
|
3262
3403
|
*
|
|
3263
3404
|
* @remarks
|
|
3264
3405
|
* These paths are copied into a workspace when absent and are never compared
|