@orkestrel/scaffold 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -144,7 +144,7 @@ export declare interface ArtifactBase {
144
144
  *
145
145
  * @returns A fresh `ContractShape` describing one planned file.
146
146
  */
147
- export declare function artifactShape(): UnionShape<[ ObjectShape<{
147
+ export declare function artifactShape(): UnionShape<readonly [ ObjectShape<{
148
148
  path: StringShape;
149
149
  group: LiteralShape<readonly Group[]>;
150
150
  origin: LiteralShape<readonly ["host"]>;
@@ -305,7 +305,7 @@ export declare function blueprintToMembers(spec: Blueprint): readonly Member[];
305
305
  /**
306
306
  * The full pure compilation: draft a blueprint's artifacts — the manifest and
307
307
  * exports combination rules over the per-environment `SRC_MATRIX` rows, plus
308
- * `HOST_PATHS` and `overrides` — then pin.
308
+ * the `selectHostPaths` selection of `HOST_PATHS` and `overrides` — then pin.
309
309
  *
310
310
  * @param blueprint - The `Blueprint` to compile.
311
311
  * @param groups - An optional `Group[]` selection (default: all groups).
@@ -644,7 +644,7 @@ export declare function contentToHex(content: string): string;
644
644
  export declare const CONTROL_CHARACTER_PATTERN: RegExp;
645
645
 
646
646
  /**
647
- * `configs/src/tsconfig.core.json` — unchanged core shape.
647
+ * `configs/src/tsconfig.core.json` — host-neutral core with web interop declarations.
648
648
  *
649
649
  * @returns The core environment `tsconfig` file content, newline-terminated.
650
650
  *
@@ -1042,12 +1042,15 @@ export declare function coreViteConfig(browser?: boolean): string;
1042
1042
 
1043
1043
  /**
1044
1044
  * Draft the `guides` group's artifacts — the package's own filled guide stub,
1045
- * the guides index, and any vendored dependency guide mirrors.
1045
+ * the guides index, and vendored dependency guide mirrors whose paths are
1046
+ * neither the package's own guide nor already carried by the selected host
1047
+ * set.
1046
1048
  *
1047
1049
  * @param spec - The `Blueprint` to derive guide artifacts from.
1048
1050
  * @param pascal - The package's PascalCase entity name.
1049
1051
  * @param members - The blueprint's derived `Member[]`.
1050
- * @returns The `guides` group's `Artifact[]`.
1052
+ * @returns The `guides` group's `Artifact[]`, with one contributor per guide
1053
+ * path.
1051
1054
  *
1052
1055
  * @example
1053
1056
  * ```ts
@@ -1184,9 +1187,12 @@ export declare function coreViteConfig(browser?: boolean): string;
1184
1187
  * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
1185
1188
  * the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
1186
1189
  * `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
1187
- * the line's seven byte-identical root dotfiles, and the two guides-grouped mirrors every repo carries: the line-wide
1188
- * dev-tooling guide (`guides/src/guide.md`) and the
1189
- * scaffold engine's own self-guide (`guides/src/scaffold.md`).
1190
+ * the line's seven byte-identical root dotfiles, and the two guides-grouped
1191
+ * mirror candidates: the line-wide dev-tooling guide
1192
+ * (`guides/src/guide.md`) and the scaffold engine's own self-guide
1193
+ * (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
1194
+ * subset selected by `selectHostPaths`, omitting the target blueprint's own
1195
+ * guide.
1190
1196
  */
1191
1197
  export declare const HOST_PATHS: readonly string[];
1192
1198
 
@@ -1393,6 +1399,24 @@ export declare function coreViteConfig(browser?: boolean): string;
1393
1399
  */
1394
1400
  export declare function manifestToDependencies(manifestText: string): readonly Dependency[];
1395
1401
 
1402
+ /**
1403
+ * Project a `package.json` text to its own string `name`.
1404
+ *
1405
+ * @param manifest - The `package.json` file content.
1406
+ * @returns The own string `name`, or `undefined` when the manifest exceeds its
1407
+ * byte ceiling, is malformed, has a non-object root, or has no own string
1408
+ * `name`.
1409
+ *
1410
+ * @example
1411
+ * ```ts
1412
+ * import { manifestToName } from '@orkestrel/scaffold'
1413
+ *
1414
+ * manifestToName('{"name":"@orkestrel/router"}') // '@orkestrel/router'
1415
+ * manifestToName('{}') // undefined
1416
+ * ```
1417
+ */
1418
+ export declare function manifestToName(manifest: string): string | undefined;
1419
+
1396
1420
  /** Maximum byte size accepted for one scaffold artifact. */
1397
1421
  export declare const MAX_ARTIFACT_BYTES = 5242880;
1398
1422
 
@@ -1493,12 +1517,13 @@ export declare function coreViteConfig(browser?: boolean): string;
1493
1517
  export declare const ORKESTREL_RANGE_PATTERN: RegExp;
1494
1518
 
1495
1519
  /**
1496
- * One caller template override.
1520
+ * One artifact override.
1497
1521
  *
1498
1522
  * @remarks
1499
1523
  * `content` REPLACES the rendered artifact at `path`, never partially merges.
1500
- * An override whose `path` matches no planned artifact, or targets a
1501
- * `host`-origin path, is a BLOCKING question — never a silent add.
1524
+ * An override whose `path` matches no planned artifact, targets a
1525
+ * `host`-origin path, or targets `package.json` is a BLOCKING question.
1526
+ * Accepted overrides surface as retained non-blocking advisories.
1502
1527
  */
1503
1528
  export declare interface Override {
1504
1529
  readonly path: string;
@@ -1931,7 +1956,7 @@ export declare function coreViteConfig(browser?: boolean): string;
1931
1956
  engine: BooleanShape;
1932
1957
  }, false>;
1933
1958
  groups: ArrayShape<LiteralShape<readonly Group[]>>;
1934
- artifacts: ArrayShape<UnionShape<[ ObjectShape<{
1959
+ artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
1935
1960
  path: StringShape;
1936
1961
  group: LiteralShape<readonly Group[]>;
1937
1962
  origin: LiteralShape<readonly ["host"]>;
@@ -2132,7 +2157,7 @@ export declare function coreViteConfig(browser?: boolean): string;
2132
2157
  export declare function rootViteConfig(src: readonly Environment[], engine?: boolean): string;
2133
2158
 
2134
2159
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2135
- export declare const SCAFFOLD_RANGE = "^0.0.5";
2160
+ export declare const SCAFFOLD_RANGE = "^0.0.6";
2136
2161
 
2137
2162
  /**
2138
2163
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2175,6 +2200,20 @@ export declare function coreViteConfig(browser?: boolean): string;
2175
2200
  readonly digest: string;
2176
2201
  }
2177
2202
 
2203
+ /**
2204
+ * Select host paths without the guide owned by the target blueprint.
2205
+ *
2206
+ * @param paths - Host artifact paths in deterministic input order.
2207
+ * @param name - The target blueprint's unscoped package name.
2208
+ * @returns Every host path except `guides/src/<name>.md`, in input order.
2209
+ *
2210
+ * @example
2211
+ * ```ts
2212
+ * selectHostPaths(['guides/src/guide.md', 'LICENSE'], 'guide') // ['LICENSE']
2213
+ * ```
2214
+ */
2215
+ export declare function selectHostPaths(paths: readonly string[], name: string): readonly string[];
2216
+
2178
2217
  /**
2179
2218
  * Serialize text as a single-quoted TypeScript string literal.
2180
2219
  *
@@ -144,7 +144,7 @@ export declare interface ArtifactBase {
144
144
  *
145
145
  * @returns A fresh `ContractShape` describing one planned file.
146
146
  */
147
- export declare function artifactShape(): UnionShape<[ ObjectShape<{
147
+ export declare function artifactShape(): UnionShape<readonly [ ObjectShape<{
148
148
  path: StringShape;
149
149
  group: LiteralShape<readonly Group[]>;
150
150
  origin: LiteralShape<readonly ["host"]>;
@@ -305,7 +305,7 @@ export declare function blueprintToMembers(spec: Blueprint): readonly Member[];
305
305
  /**
306
306
  * The full pure compilation: draft a blueprint's artifacts — the manifest and
307
307
  * exports combination rules over the per-environment `SRC_MATRIX` rows, plus
308
- * `HOST_PATHS` and `overrides` — then pin.
308
+ * the `selectHostPaths` selection of `HOST_PATHS` and `overrides` — then pin.
309
309
  *
310
310
  * @param blueprint - The `Blueprint` to compile.
311
311
  * @param groups - An optional `Group[]` selection (default: all groups).
@@ -644,7 +644,7 @@ export declare function contentToHex(content: string): string;
644
644
  export declare const CONTROL_CHARACTER_PATTERN: RegExp;
645
645
 
646
646
  /**
647
- * `configs/src/tsconfig.core.json` — unchanged core shape.
647
+ * `configs/src/tsconfig.core.json` — host-neutral core with web interop declarations.
648
648
  *
649
649
  * @returns The core environment `tsconfig` file content, newline-terminated.
650
650
  *
@@ -1042,12 +1042,15 @@ export declare function coreViteConfig(browser?: boolean): string;
1042
1042
 
1043
1043
  /**
1044
1044
  * Draft the `guides` group's artifacts — the package's own filled guide stub,
1045
- * the guides index, and any vendored dependency guide mirrors.
1045
+ * the guides index, and vendored dependency guide mirrors whose paths are
1046
+ * neither the package's own guide nor already carried by the selected host
1047
+ * set.
1046
1048
  *
1047
1049
  * @param spec - The `Blueprint` to derive guide artifacts from.
1048
1050
  * @param pascal - The package's PascalCase entity name.
1049
1051
  * @param members - The blueprint's derived `Member[]`.
1050
- * @returns The `guides` group's `Artifact[]`.
1052
+ * @returns The `guides` group's `Artifact[]`, with one contributor per guide
1053
+ * path.
1051
1054
  *
1052
1055
  * @example
1053
1056
  * ```ts
@@ -1184,9 +1187,12 @@ export declare function coreViteConfig(browser?: boolean): string;
1184
1187
  * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
1185
1188
  * the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
1186
1189
  * `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
1187
- * the line's seven byte-identical root dotfiles, and the two guides-grouped mirrors every repo carries: the line-wide
1188
- * dev-tooling guide (`guides/src/guide.md`) and the
1189
- * scaffold engine's own self-guide (`guides/src/scaffold.md`).
1190
+ * the line's seven byte-identical root dotfiles, and the two guides-grouped
1191
+ * mirror candidates: the line-wide dev-tooling guide
1192
+ * (`guides/src/guide.md`) and the scaffold engine's own self-guide
1193
+ * (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
1194
+ * subset selected by `selectHostPaths`, omitting the target blueprint's own
1195
+ * guide.
1190
1196
  */
1191
1197
  export declare const HOST_PATHS: readonly string[];
1192
1198
 
@@ -1393,6 +1399,24 @@ export declare function coreViteConfig(browser?: boolean): string;
1393
1399
  */
1394
1400
  export declare function manifestToDependencies(manifestText: string): readonly Dependency[];
1395
1401
 
1402
+ /**
1403
+ * Project a `package.json` text to its own string `name`.
1404
+ *
1405
+ * @param manifest - The `package.json` file content.
1406
+ * @returns The own string `name`, or `undefined` when the manifest exceeds its
1407
+ * byte ceiling, is malformed, has a non-object root, or has no own string
1408
+ * `name`.
1409
+ *
1410
+ * @example
1411
+ * ```ts
1412
+ * import { manifestToName } from '@orkestrel/scaffold'
1413
+ *
1414
+ * manifestToName('{"name":"@orkestrel/router"}') // '@orkestrel/router'
1415
+ * manifestToName('{}') // undefined
1416
+ * ```
1417
+ */
1418
+ export declare function manifestToName(manifest: string): string | undefined;
1419
+
1396
1420
  /** Maximum byte size accepted for one scaffold artifact. */
1397
1421
  export declare const MAX_ARTIFACT_BYTES = 5242880;
1398
1422
 
@@ -1493,12 +1517,13 @@ export declare function coreViteConfig(browser?: boolean): string;
1493
1517
  export declare const ORKESTREL_RANGE_PATTERN: RegExp;
1494
1518
 
1495
1519
  /**
1496
- * One caller template override.
1520
+ * One artifact override.
1497
1521
  *
1498
1522
  * @remarks
1499
1523
  * `content` REPLACES the rendered artifact at `path`, never partially merges.
1500
- * An override whose `path` matches no planned artifact, or targets a
1501
- * `host`-origin path, is a BLOCKING question — never a silent add.
1524
+ * An override whose `path` matches no planned artifact, targets a
1525
+ * `host`-origin path, or targets `package.json` is a BLOCKING question.
1526
+ * Accepted overrides surface as retained non-blocking advisories.
1502
1527
  */
1503
1528
  export declare interface Override {
1504
1529
  readonly path: string;
@@ -1931,7 +1956,7 @@ export declare function coreViteConfig(browser?: boolean): string;
1931
1956
  engine: BooleanShape;
1932
1957
  }, false>;
1933
1958
  groups: ArrayShape<LiteralShape<readonly Group[]>>;
1934
- artifacts: ArrayShape<UnionShape<[ ObjectShape<{
1959
+ artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
1935
1960
  path: StringShape;
1936
1961
  group: LiteralShape<readonly Group[]>;
1937
1962
  origin: LiteralShape<readonly ["host"]>;
@@ -2132,7 +2157,7 @@ export declare function coreViteConfig(browser?: boolean): string;
2132
2157
  export declare function rootViteConfig(src: readonly Environment[], engine?: boolean): string;
2133
2158
 
2134
2159
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2135
- export declare const SCAFFOLD_RANGE = "^0.0.5";
2160
+ export declare const SCAFFOLD_RANGE = "^0.0.6";
2136
2161
 
2137
2162
  /**
2138
2163
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2175,6 +2200,20 @@ export declare function coreViteConfig(browser?: boolean): string;
2175
2200
  readonly digest: string;
2176
2201
  }
2177
2202
 
2203
+ /**
2204
+ * Select host paths without the guide owned by the target blueprint.
2205
+ *
2206
+ * @param paths - Host artifact paths in deterministic input order.
2207
+ * @param name - The target blueprint's unscoped package name.
2208
+ * @returns Every host path except `guides/src/<name>.md`, in input order.
2209
+ *
2210
+ * @example
2211
+ * ```ts
2212
+ * selectHostPaths(['guides/src/guide.md', 'LICENSE'], 'guide') // ['LICENSE']
2213
+ * ```
2214
+ */
2215
+ export declare function selectHostPaths(paths: readonly string[], name: string): readonly string[];
2216
+
2178
2217
  /**
2179
2218
  * Serialize text as a single-quoted TypeScript string literal.
2180
2219
  *
@@ -103,9 +103,12 @@ var APP_MATRIX = Object.freeze({
103
103
  * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
104
104
  * the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
105
105
  * `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
106
- * the line's seven byte-identical root dotfiles, and the two guides-grouped mirrors every repo carries: the line-wide
107
- * dev-tooling guide (`guides/src/guide.md`) and the
108
- * scaffold engine's own self-guide (`guides/src/scaffold.md`).
106
+ * the line's seven byte-identical root dotfiles, and the two guides-grouped
107
+ * mirror candidates: the line-wide dev-tooling guide
108
+ * (`guides/src/guide.md`) and the scaffold engine's own self-guide
109
+ * (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
110
+ * subset selected by `selectHostPaths`, omitting the target blueprint's own
111
+ * guide.
109
112
  */
110
113
  var HOST_PATHS = Object.freeze([
111
114
  "AGENTS.md",
@@ -217,15 +220,15 @@ var DEFAULT_VERSION = "0.0.1";
217
220
  /** The `engines.node` range the `blueprint` builder fills. */
218
221
  var DEFAULT_ENGINES = `>=${MINIMUM_NODE_VERSION}`;
219
222
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
220
- var SCAFFOLD_RANGE = "^0.0.5";
223
+ var SCAFFOLD_RANGE = "^0.0.6";
221
224
  /** Tooling versions shared by scaffold and every generated workspace. */
222
225
  var BASE_DEV_DEPENDENCIES = Object.freeze({
223
226
  "@microsoft/api-extractor": "^7.58.12",
224
227
  "@orkestrel/guide": "^0.0.5",
225
228
  "@orkestrel/scaffold": SCAFFOLD_RANGE,
226
- "@types/node": "^26.1.1",
227
- oxfmt: "^0.60.0",
228
- oxlint: "^1.75.0",
229
+ "@types/node": "^26.1.2",
230
+ oxfmt: "^0.61.0",
231
+ oxlint: "^1.76.0",
229
232
  typescript: "^6.0.3",
230
233
  vite: "^8.1.5",
231
234
  "vite-plugin-dts": "^5.0.3",
@@ -1139,6 +1142,22 @@ function snapshotOf(current) {
1139
1142
  return Object.fromEntries(entries);
1140
1143
  }
1141
1144
  /**
1145
+ * Select host paths without the guide owned by the target blueprint.
1146
+ *
1147
+ * @param paths - Host artifact paths in deterministic input order.
1148
+ * @param name - The target blueprint's unscoped package name.
1149
+ * @returns Every host path except `guides/src/<name>.md`, in input order.
1150
+ *
1151
+ * @example
1152
+ * ```ts
1153
+ * selectHostPaths(['guides/src/guide.md', 'LICENSE'], 'guide') // ['LICENSE']
1154
+ * ```
1155
+ */
1156
+ function selectHostPaths(paths, name) {
1157
+ const guide = `guides/src/${name}.md`;
1158
+ return paths.filter((path) => path !== guide);
1159
+ }
1160
+ /**
1142
1161
  * Find the first exact or portable case-insensitive path collision.
1143
1162
  *
1144
1163
  * @param paths - Portable paths in deterministic input order.
@@ -1441,6 +1460,29 @@ function manifestToDependencies(manifestText) {
1441
1460
  return dependencies;
1442
1461
  }
1443
1462
  /**
1463
+ * Project a `package.json` text to its own string `name`.
1464
+ *
1465
+ * @param manifest - The `package.json` file content.
1466
+ * @returns The own string `name`, or `undefined` when the manifest exceeds its
1467
+ * byte ceiling, is malformed, has a non-object root, or has no own string
1468
+ * `name`.
1469
+ *
1470
+ * @example
1471
+ * ```ts
1472
+ * import { manifestToName } from '@orkestrel/scaffold'
1473
+ *
1474
+ * manifestToName('{"name":"@orkestrel/router"}') // '@orkestrel/router'
1475
+ * manifestToName('{}') // undefined
1476
+ * ```
1477
+ */
1478
+ function manifestToName(manifest) {
1479
+ if (manifest.length > 1048576 || contentByteLength(manifest) > 1048576) return;
1480
+ const parsed = parseJSON(manifest);
1481
+ if (!isRecord(parsed)) return void 0;
1482
+ const name = ownDataValue(parsed, "name");
1483
+ return typeof name === "string" ? name : void 0;
1484
+ }
1485
+ /**
1444
1486
  * Compare a declared range to the registry latest.
1445
1487
  *
1446
1488
  * @param range - The declared semver range.
@@ -2145,6 +2187,7 @@ var isPlan = andOf(andOf(createContract(planShape()).is, hasValidPlanHex), hasVa
2145
2187
  function validatePlan(plan) {
2146
2188
  const blueprintValidation = validateBlueprint(plan.blueprint);
2147
2189
  const questions = [...blueprintValidation.questions];
2190
+ const warnings = [...blueprintValidation.warnings];
2148
2191
  if (!hasValidPlanBytes(plan)) questions.push({
2149
2192
  field: "artifacts",
2150
2193
  text: "Plan artifact content exceeds the retained byte limits",
@@ -2169,16 +2212,20 @@ function validatePlan(plan) {
2169
2212
  });
2170
2213
  continue;
2171
2214
  }
2172
- if (artifact.path === "package.json") questions.push({
2173
- field: "overrides",
2174
- text: "Override path \"package.json\" targets the blueprint-owned publication boundary",
2175
- blocking: true
2176
- });
2215
+ if (artifact.path === "package.json") {
2216
+ questions.push({
2217
+ field: "overrides",
2218
+ text: "Override path \"package.json\" targets the blueprint-owned publication boundary",
2219
+ blocking: true
2220
+ });
2221
+ continue;
2222
+ }
2223
+ warnings.push(`Override path "${item.path}" replaces its planned artifact content`);
2177
2224
  }
2178
2225
  return {
2179
2226
  valid: questions.length === 0,
2180
2227
  questions,
2181
- warnings: blueprintValidation.warnings
2228
+ warnings
2182
2229
  };
2183
2230
  }
2184
2231
  /** Determine whether every guide body fits the public UTF-8 artifact byte limit. */
@@ -7096,6 +7143,7 @@ function singleSrcViteConfig(environment) {
7096
7143
  const machinery = viteMachinery([environment]);
7097
7144
  const header = viteHeader(machinery);
7098
7145
  if (environment === "browser") return `${header}
7146
+ if (!hasChromium) console.warn('browser projects skipped: Chromium absent (${SRC_MATRIX.browser.project})')
7099
7147
  ${EXPORT_KEYWORD} const srcBrowser = (config?: UserConfig): UserConfig =>
7100
7148
  mergeConfig(
7101
7149
  {
@@ -7154,7 +7202,7 @@ ${EXPORT_KEYWORD} const guides = (config?: UserConfig): UserConfig =>
7154
7202
  export default defineConfig({
7155
7203
  resolve,
7156
7204
  test: {
7157
- projects: [srcBrowser, policy, guides],
7205
+ projects: [...(hasChromium ? [srcBrowser] : []), policy, guides],
7158
7206
  },
7159
7207
  })
7160
7208
  `;
@@ -7380,14 +7428,18 @@ ${EXPORT_KEYWORD} const integration = (config?: UserConfig): UserConfig =>
7380
7428
  const blocks = nonCore.map((environment) => environment === "browser" ? browserBlock : serverBlock).join("") + binBlock;
7381
7429
  const projectNames = [
7382
7430
  ...hasCore ? ["srcCore"] : [],
7383
- ...nonCore.map((environment) => `src${pascalCase(environment)}`),
7431
+ ...nonCore.map((environment) => environment === "browser" ? "...(hasChromium ? [srcBrowser] : [])" : `src${pascalCase(environment)}`),
7384
7432
  "policy",
7385
7433
  "guides",
7386
7434
  ...engine ? ["srcBin"] : [],
7387
7435
  ...engine ? ["integration"] : []
7388
7436
  ];
7437
+ const inlineProjects = ` projects: [${projectNames.join(", ")}],`;
7438
+ const renderedProjects = computeColumnWidth(inlineProjects) <= 100 ? inlineProjects : ` projects: [
7439
+ ${projectNames.map((project) => ` ${project},`).join("\n")}
7440
+ ],`;
7389
7441
  return `${header}
7390
- ${EXPORT_KEYWORD} const srcCore = (config?: UserConfig): UserConfig =>
7442
+ ${machinery.browser ? `if (!hasChromium) console.warn('browser projects skipped: Chromium absent (${SRC_MATRIX.browser.project})')\n` : ""}${EXPORT_KEYWORD} const srcCore = (config?: UserConfig): UserConfig =>
7391
7443
  mergeConfig(
7392
7444
  {
7393
7445
  resolve,
@@ -7426,7 +7478,7 @@ ${blocks}
7426
7478
  export default defineConfig({
7427
7479
  resolve,
7428
7480
  test: {
7429
- projects: [${projectNames.join(", ")}],
7481
+ ${renderedProjects}
7430
7482
  },
7431
7483
  })
7432
7484
  `;
@@ -7474,7 +7526,7 @@ ${EXPORT_KEYWORD} const srcCore = (config?: UserConfig): UserConfig =>
7474
7526
  `);
7475
7527
  }
7476
7528
  if (src.includes("browser")) {
7477
- projects.push("srcBrowser");
7529
+ projects.push("...(hasChromium ? [srcBrowser] : [])");
7478
7530
  const coreOutput = hasSourceCore ? `
7479
7531
  output: { paths: { '@src/core': '../core/index.js' } },` : "";
7480
7532
  const coreExternal = hasSourceCore ? `id === '@src/core' || ` : "";
@@ -7591,7 +7643,7 @@ ${EXPORT_KEYWORD} const appCore = (config?: UserConfig): UserConfig =>
7591
7643
  `);
7592
7644
  }
7593
7645
  if (app.includes("browser")) {
7594
- projects.push("appBrowser()");
7646
+ projects.push("...(hasChromium ? [appBrowser()] : [])");
7595
7647
  blocks.push(`
7596
7648
  ${EXPORT_KEYWORD} function appBrowser(...config: readonly never[]): UserConfig {
7597
7649
  if (config.length > 0) {
@@ -7725,8 +7777,22 @@ ${EXPORT_KEYWORD} const integration = (config?: UserConfig): UserConfig =>
7725
7777
  )
7726
7778
  `);
7727
7779
  }
7780
+ const projectNames = [
7781
+ ...projects,
7782
+ "policy",
7783
+ "guides"
7784
+ ];
7785
+ const inlineProjects = ` projects: [${projectNames.join(", ")}],`;
7786
+ const renderedProjects = computeColumnWidth(inlineProjects) <= 100 ? inlineProjects : ` projects: [
7787
+ ${projectNames.map((project) => ` ${project},`).join("\n")}
7788
+ ],`;
7789
+ const browserProjects = [...src.includes("browser") ? [SRC_MATRIX.browser.project] : [], ...app.includes("browser") ? [APP_MATRIX.browser.project] : []];
7790
+ const browserNotice = serializeTypeScriptString(`browser projects skipped: Chromium absent (${browserProjects.join(", ")})`);
7791
+ const inlineBrowserNotice = `if (!hasChromium) console.warn(${browserNotice})`;
7792
+ const renderedBrowserNotice = browserProjects.length === 0 ? void 0 : computeColumnWidth(inlineBrowserNotice) <= 100 ? inlineBrowserNotice : `if (!hasChromium)
7793
+ console.warn(${browserNotice})`;
7728
7794
  return `${header}
7729
- ${policyViteProject()}
7795
+ ${renderedBrowserNotice === void 0 ? "" : `${renderedBrowserNotice}\n`}${policyViteProject()}
7730
7796
  ${EXPORT_KEYWORD} const guides = (config?: UserConfig): UserConfig =>
7731
7797
  mergeConfig(
7732
7798
  {
@@ -7746,17 +7812,13 @@ ${blocks.join("")}
7746
7812
  export default defineConfig({
7747
7813
  resolve,
7748
7814
  test: {
7749
- projects: [${[
7750
- ...projects,
7751
- "policy",
7752
- "guides"
7753
- ].join(", ")}],
7815
+ ${renderedProjects}
7754
7816
  },
7755
7817
  })
7756
7818
  `;
7757
7819
  }
7758
7820
  /**
7759
- * `configs/src/tsconfig.core.json` — unchanged core shape.
7821
+ * `configs/src/tsconfig.core.json` — host-neutral core with web interop declarations.
7760
7822
  *
7761
7823
  * @returns The core environment `tsconfig` file content, newline-terminated.
7762
7824
  *
@@ -7769,7 +7831,7 @@ function coreTsconfig() {
7769
7831
  return formatJson({
7770
7832
  extends: "../../tsconfig.json",
7771
7833
  compilerOptions: {
7772
- lib: ["ESNext"],
7834
+ lib: ["ESNext", "WebWorker"],
7773
7835
  types: [],
7774
7836
  noEmit: false,
7775
7837
  declaration: true,
@@ -7924,7 +7986,7 @@ function appTsconfig(environment, hasCore) {
7924
7986
  "ESNext",
7925
7987
  "DOM",
7926
7988
  "DOM.Iterable"
7927
- ] : ["ESNext"],
7989
+ ] : environment === "core" ? ["ESNext", "WebWorker"] : ["ESNext"],
7928
7990
  types: environment === "browser" ? ["vite/client", "vue"] : environment === "server" ? ["node"] : []
7929
7991
  },
7930
7992
  include
@@ -8526,12 +8588,15 @@ function guideTests(spec, pascal) {
8526
8588
  }
8527
8589
  /**
8528
8590
  * Draft the `guides` group's artifacts — the package's own filled guide stub,
8529
- * the guides index, and any vendored dependency guide mirrors.
8591
+ * the guides index, and vendored dependency guide mirrors whose paths are
8592
+ * neither the package's own guide nor already carried by the selected host
8593
+ * set.
8530
8594
  *
8531
8595
  * @param spec - The `Blueprint` to derive guide artifacts from.
8532
8596
  * @param pascal - The package's PascalCase entity name.
8533
8597
  * @param members - The blueprint's derived `Member[]`.
8534
- * @returns The `guides` group's `Artifact[]`.
8598
+ * @returns The `guides` group's `Artifact[]`, with one contributor per guide
8599
+ * path.
8535
8600
  *
8536
8601
  * @example
8537
8602
  * ```ts
@@ -8584,14 +8649,16 @@ function guideArtifacts(spec, pascal, members) {
8584
8649
  ]]),
8585
8650
  directory: alignTable(["Directory", "Guide"], sourceDirectories.map((directory) => [directory, `[\`${spec.name}.md\`](src/${spec.name}.md)`]))
8586
8651
  })];
8652
+ const guidePath = `guides/src/${spec.name}.md`;
8587
8653
  for (const dep of spec.dependencies) {
8588
8654
  if (!vendoredGuides.includes(dep.name)) continue;
8589
- const short = dep.name.replace("@orkestrel/", "");
8655
+ const path = `guides/src/${dep.name.replace("@orkestrel/", "")}.md`;
8656
+ if (HOST_PATHS.includes(path) || path === guidePath) continue;
8590
8657
  artifacts.push({
8591
- path: `guides/src/${short}.md`,
8658
+ path,
8592
8659
  group: "guides",
8593
8660
  origin: "host",
8594
- source: `guides/src/${short}.md`
8661
+ source: path
8595
8662
  });
8596
8663
  }
8597
8664
  return artifacts;
@@ -8627,7 +8694,7 @@ function applyOverrides(artifacts, overrides) {
8627
8694
  /**
8628
8695
  * The full pure compilation: draft a blueprint's artifacts — the manifest and
8629
8696
  * exports combination rules over the per-environment `SRC_MATRIX` rows, plus
8630
- * `HOST_PATHS` and `overrides` — then pin.
8697
+ * the `selectHostPaths` selection of `HOST_PATHS` and `overrides` — then pin.
8631
8698
  *
8632
8699
  * @param blueprint - The `Blueprint` to compile.
8633
8700
  * @param groups - An optional `Group[]` selection (default: all groups).
@@ -8671,7 +8738,7 @@ npm install @orkestrel/${blueprint.name}
8671
8738
  origin: "computed",
8672
8739
  content: ciWorkflow(blueprint)
8673
8740
  });
8674
- for (const path of HOST_PATHS) {
8741
+ for (const path of selectHostPaths(HOST_PATHS, blueprint.name)) {
8675
8742
  const group = hostGroup(path);
8676
8743
  if (!selected.includes(group)) continue;
8677
8744
  artifacts.push({
@@ -8794,7 +8861,10 @@ var Compiler = class Compiler {
8794
8861
  this.#emitter.emit("audit", result);
8795
8862
  return result;
8796
8863
  }
8797
- const result = diffPlan(scaffolding.plan, current);
8864
+ const result = {
8865
+ ...diffPlan(scaffolding.plan, current),
8866
+ questions: scaffolding.questions
8867
+ };
8798
8868
  this.#emitter.emit("audit", result);
8799
8869
  return result;
8800
8870
  }
@@ -8858,7 +8928,16 @@ var Compiler = class Compiler {
8858
8928
  const validation = validatePlan(draft);
8859
8929
  const dependencyQuestions = this.#dependencyQuestions(blueprint);
8860
8930
  const blocking = [...validation.questions];
8861
- const questions = [...blocking, ...dependencyQuestions];
8931
+ const warningQuestions = validation.warnings.map((text) => ({
8932
+ field: "overrides",
8933
+ text,
8934
+ blocking: false
8935
+ }));
8936
+ const questions = [
8937
+ ...blocking,
8938
+ ...warningQuestions,
8939
+ ...dependencyQuestions
8940
+ ];
8862
8941
  stages.push({
8863
8942
  stage: "gate",
8864
8943
  input: draft,
@@ -8951,9 +9030,11 @@ var Compiler = class Compiler {
8951
9030
  }
8952
9031
  #pointerArtifacts(blueprint) {
8953
9032
  const artifacts = [];
9033
+ const guidePath = `guides/src/${blueprint.name}.md`;
8954
9034
  for (const item of blueprint.dependencies) {
8955
9035
  if (Compiler.#vendored.includes(item.name)) continue;
8956
9036
  const path = `guides/src/${item.name.replace("@orkestrel/", "")}.md`;
9037
+ if (path === guidePath || HOST_PATHS.includes(path)) continue;
8957
9038
  artifacts.push({
8958
9039
  path,
8959
9040
  group: "guides",
@@ -9178,6 +9259,6 @@ function createBlueprint(data) {
9178
9259
  return candidate;
9179
9260
  }
9180
9261
  //#endregion
9181
- export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, BASE_DEV_DEPENDENCIES, CATEGORIES, CHECKOUT_ACTION_SHA, COMPILER_ID, COMPILE_STAGES, CONST_KEYWORD, CONTROL_CHARACTER_PATTERN, Compiler, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENGINES_PATTERN, ENVIRONMENTS, EXPORT_KEYWORD, EXTRA_NAME_PATTERN, EXTRA_RANGE_PATTERN, FRESHNESS, FUNCTION_KEYWORD, GROUPS, HEX_PATTERN, HOST_PATHS, IMPORT_KEYWORD, INVALID_PATH_CHARACTER_PATTERN, JSON_PRINT_WIDTH, JSON_TAB_WIDTH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_COLLECTION_ITEMS, MAX_DATA_GRAPH_KEYS, MAX_DATA_GRAPH_NODES, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_SERIALIZED_INPUT_BYTES, MAX_TOTAL_ARTIFACT_BYTES, MINIMUM_NODE_VERSION, NAME_PATTERN, ORIGINS, ORKESTREL_RANGE_PATTERN, PlanManager, SCAFFOLD_RANGE, SETUP_NODE_ACTION_SHA, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, SYNC_BASELINE_PATTERN, ScaffoldError, TEMPLATES, TYPESCRIPT_EXTENSIONS, VERSION_PATTERN, alignTable, appTsconfig, appViteConfig, applicationArtifacts, applicationViteConfig, applyOverrides, artifactShape, auditToReview, blueprint, blueprintShape, blueprintToMembers, blueprintToPlan, bytesToHex, catalogNames, catalogToBlock, ciWorkflow, compareCodeUnit, computeColumnWidth, computeHash, configArtifacts, contentByteLength, contentCodePoint, contentToBytes, contentToHex, coreTsconfig, coreViteConfig, createBlueprint, createCompiler, createPlanManager, delimiterCell, dependency, dependencyShape, devDependenciesFor, diffPlan, dualCondition, entryFields, escapeHtmlText, exportsMap, fillArtifact, findFileConflict, findPathConflict, formatJson, guideArtifacts, guideMemberTable, guideMethods, guideTests, guideUsage, hasBlueprintEnvironment, hasOnlyDataProperties, hasValidArtifactBytes, hasValidArtifactHex, hasValidAuditBytes, hasValidBlueprintBytes, hasValidOverrideBytes, hasValidPlanBytes, hasValidPlanHex, hasValidSnapshotBytes, hasValidSyncReportBytes, hostGroup, inferGroup, isArtifact, isBehind, isBlueprint, isCompilerEventHooks, isDenseDataArray, isDependency, isEmitterErrorHandler, isMember, isOverride, isPlan, isPlanManagerEventHooks, isScaffoldError, isSyncReport, isWorkspaceName, manifestToDependencies, member, memberShape, override, overrideShape, ownDataValue, packageManifest, padCell, paritySpecifiers, parseBlueprint, parseBoundedJSON, parseCompilerOptions, parsePlan, parsePlanIds, parsePlanManagerOptions, parseSyncReport, pascalCase, pinPlan, planPayload, planShape, planToReview, planToSummary, policyViteProject, rangeToFreshness, renderArray, renderObject, renderValue, rootTsconfig, rootViteConfig, serializeTypeScriptString, singleSrcViteConfig, snapshotOf, snapshotPlan, sourceArtifacts, splitTableRow, srcTsconfig, srcVariant, srcViteConfig, stableStringify, syncReportShape, syncToReview, testArtifacts, validateBlueprint, validateDependencyArray, validatePlan, viteHeader, viteMachinery };
9262
+ export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, BASE_DEV_DEPENDENCIES, CATEGORIES, CHECKOUT_ACTION_SHA, COMPILER_ID, COMPILE_STAGES, CONST_KEYWORD, CONTROL_CHARACTER_PATTERN, Compiler, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENGINES_PATTERN, ENVIRONMENTS, EXPORT_KEYWORD, EXTRA_NAME_PATTERN, EXTRA_RANGE_PATTERN, FRESHNESS, FUNCTION_KEYWORD, GROUPS, HEX_PATTERN, HOST_PATHS, IMPORT_KEYWORD, INVALID_PATH_CHARACTER_PATTERN, JSON_PRINT_WIDTH, JSON_TAB_WIDTH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_COLLECTION_ITEMS, MAX_DATA_GRAPH_KEYS, MAX_DATA_GRAPH_NODES, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_SERIALIZED_INPUT_BYTES, MAX_TOTAL_ARTIFACT_BYTES, MINIMUM_NODE_VERSION, NAME_PATTERN, ORIGINS, ORKESTREL_RANGE_PATTERN, PlanManager, SCAFFOLD_RANGE, SETUP_NODE_ACTION_SHA, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, SYNC_BASELINE_PATTERN, ScaffoldError, TEMPLATES, TYPESCRIPT_EXTENSIONS, VERSION_PATTERN, alignTable, appTsconfig, appViteConfig, applicationArtifacts, applicationViteConfig, applyOverrides, artifactShape, auditToReview, blueprint, blueprintShape, blueprintToMembers, blueprintToPlan, bytesToHex, catalogNames, catalogToBlock, ciWorkflow, compareCodeUnit, computeColumnWidth, computeHash, configArtifacts, contentByteLength, contentCodePoint, contentToBytes, contentToHex, coreTsconfig, coreViteConfig, createBlueprint, createCompiler, createPlanManager, delimiterCell, dependency, dependencyShape, devDependenciesFor, diffPlan, dualCondition, entryFields, escapeHtmlText, exportsMap, fillArtifact, findFileConflict, findPathConflict, formatJson, guideArtifacts, guideMemberTable, guideMethods, guideTests, guideUsage, hasBlueprintEnvironment, hasOnlyDataProperties, hasValidArtifactBytes, hasValidArtifactHex, hasValidAuditBytes, hasValidBlueprintBytes, hasValidOverrideBytes, hasValidPlanBytes, hasValidPlanHex, hasValidSnapshotBytes, hasValidSyncReportBytes, hostGroup, inferGroup, isArtifact, isBehind, isBlueprint, isCompilerEventHooks, isDenseDataArray, isDependency, isEmitterErrorHandler, isMember, isOverride, isPlan, isPlanManagerEventHooks, isScaffoldError, isSyncReport, isWorkspaceName, manifestToDependencies, manifestToName, member, memberShape, override, overrideShape, ownDataValue, packageManifest, padCell, paritySpecifiers, parseBlueprint, parseBoundedJSON, parseCompilerOptions, parsePlan, parsePlanIds, parsePlanManagerOptions, parseSyncReport, pascalCase, pinPlan, planPayload, planShape, planToReview, planToSummary, policyViteProject, rangeToFreshness, renderArray, renderObject, renderValue, rootTsconfig, rootViteConfig, selectHostPaths, serializeTypeScriptString, singleSrcViteConfig, snapshotOf, snapshotPlan, sourceArtifacts, splitTableRow, srcTsconfig, srcVariant, srcViteConfig, stableStringify, syncReportShape, syncToReview, testArtifacts, validateBlueprint, validateDependencyArray, validatePlan, viteHeader, viteMachinery };
9182
9263
 
9183
9264
  //# sourceMappingURL=index.js.map