@orkestrel/scaffold 0.0.135 → 0.0.136

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.
Files changed (35) hide show
  1. package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +167 -4
  2. package/dist/agents/skills/orkestrel-publish/scripts/wave.js +20 -5
  3. package/dist/bin/main.js +3 -3
  4. package/dist/host/AGENTS.md +1 -1
  5. package/dist/host/agents/orchestration.md +2 -2
  6. package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +201 -8
  7. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +24 -5
  8. package/dist/host/claude/agents/orkestrel.md +7 -7
  9. package/dist/host/claude/agents/reviewer.md +1 -1
  10. package/dist/host/claude/rules/documentation.md +1 -1
  11. package/dist/host/claude/rules/patterns.md +2 -2
  12. package/dist/host/claude/rules/workspace.md +9 -4
  13. package/dist/host/configs/helpers.ts +21 -6
  14. package/dist/host/guides/contract.md +198 -163
  15. package/dist/host/guides/database.md +760 -300
  16. package/dist/host/guides/indexeddb.md +80 -66
  17. package/dist/host/guides/relation.md +56 -32
  18. package/dist/host/guides/scaffold.md +8 -2
  19. package/dist/host/guides/sqlite.md +44 -23
  20. package/dist/host/guides/test.md +7 -3
  21. package/dist/host/manifest.json +19 -19
  22. package/dist/host/scripts/browsers.sh +0 -0
  23. package/dist/host/scripts/codex.sh +0 -0
  24. package/dist/host/scripts/cursor.sh +0 -0
  25. package/dist/host/scripts/deps.sh +0 -0
  26. package/dist/host/scripts/npm.sh +0 -0
  27. package/dist/host/scripts/ollama.sh +0 -0
  28. package/dist/host/tests/config.test.ts +71 -3
  29. package/dist/src/core/index.cjs +103 -26
  30. package/dist/src/core/index.cjs.map +1 -1
  31. package/dist/src/core/index.d.cts +31 -5
  32. package/dist/src/core/index.d.ts +31 -5
  33. package/dist/src/core/index.js +103 -27
  34. package/dist/src/core/index.js.map +1 -1
  35. package/package.json +3 -3
@@ -802,8 +802,8 @@ export declare function blueprintToOrchestrationArtifacts(blueprint: Blueprint):
802
802
  * Projects a blueprint into the project labels its root Vitest configuration registers.
803
803
  *
804
804
  * @param blueprint - The workspace specification.
805
- * @returns Project labels in registration order, including wrapper-registered sheet faces and
806
- * the probe benchmark variant.
805
+ * @returns Project labels in registration order, including wrapper-registered sheet faces,
806
+ * the probe benchmark variant, and, beside a browser-hosted face, the browser bench project.
807
807
  *
808
808
  * @example
809
809
  * ```ts
@@ -1070,10 +1070,11 @@ export declare function blueprintToToolchainHolds(blueprint: Blueprint): Readonl
1070
1070
  *
1071
1071
  * `accepted` carries each generated predecessor the region can replace. The
1072
1072
  * guides entry accepts the generated command that invoked the guides project
1073
- * through Vitest alone. The benchmark entry accepts the one command that ran the
1073
+ * through Vitest alone. The benchmark entry accepts the command that ran the
1074
1074
  * `probe` project through `vitest bench`, before the dedicated bench project
1075
- * existed. The pack hook accepts the build chain emitted before it
1076
- * delegated to `build`. The publication hook accepts the same gate chain without
1075
+ * existed, and the command planned for the other state of the browser bench project, so
1076
+ * the entry follows a browser-hosted face that arrives or leaves. The pack hook accepts the
1077
+ * build chain emitted before it delegated to `build`. The publication hook accepts the same gate chain without
1077
1078
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
1078
1079
  * step. `serve:build` accepts the server-only chain it ran before it delegated to `build`.
1079
1080
  * The value being written is always writable, so it is not repeated there. Any other value is a
@@ -1793,6 +1794,7 @@ export declare class Compiler implements CompilerInterface {
1793
1794
  readonly studies: string;
1794
1795
  readonly distribution: string;
1795
1796
  readonly probe: string;
1797
+ readonly bench: string;
1796
1798
  readonly integration: {
1797
1799
  readonly sheet: string;
1798
1800
  readonly module: string;
@@ -3961,6 +3963,30 @@ export declare class Compiler implements CompilerInterface {
3961
3963
  /** Caps the columns one emitted line may occupy, matching `printWidth` in `.oxfmtrc.json`. */
3962
3964
  export declare const PRINT_WIDTH = 100;
3963
3965
 
3966
+ /**
3967
+ * Lists the bench globs of the browser-hosted projects among a workspace's project labels.
3968
+ *
3969
+ * @param projects - The project labels, in registration order.
3970
+ * @returns One glob per browser-hosted label, matching every `*.bench.ts` file beneath that
3971
+ * label's directory under `tests/<axis>/`, in label order.
3972
+ *
3973
+ * @remarks
3974
+ * A label on the `src` or `app` axis names a project that runs in Playwright Chromium unless it
3975
+ * names `core`, `server`, or `bin`, which run in Node. The `src:themes` target collects
3976
+ * `tests/src/styles/themes`. Every other label sits on neither axis and adds no glob.
3977
+ *
3978
+ * @example
3979
+ * ```ts
3980
+ * import { projectsToBenches } from '@orkestrel/scaffold'
3981
+ *
3982
+ * const benches = projectsToBenches(['src:core', 'src:browser', 'app:vue', 'policy'])
3983
+ *
3984
+ * benches.length // 2
3985
+ * benches[1]?.startsWith('tests/app/vue/') // true
3986
+ * ```
3987
+ */
3988
+ export declare function projectsToBenches(projects: readonly string[]): readonly string[];
3989
+
3964
3990
  /**
3965
3991
  * Represents one validation issue raised against a blueprint or a plan.
3966
3992
  *
@@ -802,8 +802,8 @@ export declare function blueprintToOrchestrationArtifacts(blueprint: Blueprint):
802
802
  * Projects a blueprint into the project labels its root Vitest configuration registers.
803
803
  *
804
804
  * @param blueprint - The workspace specification.
805
- * @returns Project labels in registration order, including wrapper-registered sheet faces and
806
- * the probe benchmark variant.
805
+ * @returns Project labels in registration order, including wrapper-registered sheet faces,
806
+ * the probe benchmark variant, and, beside a browser-hosted face, the browser bench project.
807
807
  *
808
808
  * @example
809
809
  * ```ts
@@ -1070,10 +1070,11 @@ export declare function blueprintToToolchainHolds(blueprint: Blueprint): Readonl
1070
1070
  *
1071
1071
  * `accepted` carries each generated predecessor the region can replace. The
1072
1072
  * guides entry accepts the generated command that invoked the guides project
1073
- * through Vitest alone. The benchmark entry accepts the one command that ran the
1073
+ * through Vitest alone. The benchmark entry accepts the command that ran the
1074
1074
  * `probe` project through `vitest bench`, before the dedicated bench project
1075
- * existed. The pack hook accepts the build chain emitted before it
1076
- * delegated to `build`. The publication hook accepts the same gate chain without
1075
+ * existed, and the command planned for the other state of the browser bench project, so
1076
+ * the entry follows a browser-hosted face that arrives or leaves. The pack hook accepts the
1077
+ * build chain emitted before it delegated to `build`. The publication hook accepts the same gate chain without
1077
1078
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
1078
1079
  * step. `serve:build` accepts the server-only chain it ran before it delegated to `build`.
1079
1080
  * The value being written is always writable, so it is not repeated there. Any other value is a
@@ -1793,6 +1794,7 @@ export declare class Compiler implements CompilerInterface {
1793
1794
  readonly studies: string;
1794
1795
  readonly distribution: string;
1795
1796
  readonly probe: string;
1797
+ readonly bench: string;
1796
1798
  readonly integration: {
1797
1799
  readonly sheet: string;
1798
1800
  readonly module: string;
@@ -3961,6 +3963,30 @@ export declare class Compiler implements CompilerInterface {
3961
3963
  /** Caps the columns one emitted line may occupy, matching `printWidth` in `.oxfmtrc.json`. */
3962
3964
  export declare const PRINT_WIDTH = 100;
3963
3965
 
3966
+ /**
3967
+ * Lists the bench globs of the browser-hosted projects among a workspace's project labels.
3968
+ *
3969
+ * @param projects - The project labels, in registration order.
3970
+ * @returns One glob per browser-hosted label, matching every `*.bench.ts` file beneath that
3971
+ * label's directory under `tests/<axis>/`, in label order.
3972
+ *
3973
+ * @remarks
3974
+ * A label on the `src` or `app` axis names a project that runs in Playwright Chromium unless it
3975
+ * names `core`, `server`, or `bin`, which run in Node. The `src:themes` target collects
3976
+ * `tests/src/styles/themes`. Every other label sits on neither axis and adds no glob.
3977
+ *
3978
+ * @example
3979
+ * ```ts
3980
+ * import { projectsToBenches } from '@orkestrel/scaffold'
3981
+ *
3982
+ * const benches = projectsToBenches(['src:core', 'src:browser', 'app:vue', 'policy'])
3983
+ *
3984
+ * benches.length // 2
3985
+ * benches[1]?.startsWith('tests/app/vue/') // true
3986
+ * ```
3987
+ */
3988
+ export declare function projectsToBenches(projects: readonly string[]): readonly string[];
3989
+
3964
3990
  /**
3965
3991
  * Represents one validation issue raised against a blueprint or a plan.
3966
3992
  *
@@ -3,7 +3,7 @@ import { fillTemplate } from "@orkestrel/template";
3
3
  import { Emitter } from "@orkestrel/emitter";
4
4
  var package_default = {
5
5
  name: "@orkestrel/scaffold",
6
- version: "0.0.135",
6
+ version: "0.0.136",
7
7
  description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
8
8
  keywords: [
9
9
  "audit",
@@ -96,7 +96,7 @@ var package_default = {
96
96
  },
97
97
  dependencies: {
98
98
  "@orkestrel/console": "^0.0.20",
99
- "@orkestrel/contract": "^0.0.23",
99
+ "@orkestrel/contract": "^0.0.24",
100
100
  "@orkestrel/emitter": "^0.0.16",
101
101
  "@orkestrel/markdown": "^0.0.21",
102
102
  "@orkestrel/process": "^0.0.19",
@@ -108,7 +108,7 @@ var package_default = {
108
108
  "@orkestrel/guide": "^0.0.31",
109
109
  "@orkestrel/html": "^0.0.16",
110
110
  "@orkestrel/probe": "^0.0.30",
111
- "@orkestrel/test": "^0.0.38",
111
+ "@orkestrel/test": "^0.0.39",
112
112
  "@types/node": "^24.19.2",
113
113
  "@vitest/browser-playwright": "^5.1.0",
114
114
  "oxfmt": "^0.78.0",
@@ -954,7 +954,7 @@ var CONFIG_TEMPLATES = Object.freeze({
954
954
  `,
955
955
  vite: `{{journey}}import type { PluginOption, UserConfig } from 'vite'
956
956
  import { mergeConfig } from 'vite'
957
- {{imports}}import { defineConfig } from 'vitest/config'
957
+ {{imports}}import { {{vitest}}defineConfig } from 'vitest/config'
958
958
  import manifest from './package.json' with { type: 'json' }
959
959
  import tsconfig from './tsconfig.json' with { type: 'json' }
960
960
  {{helpers}}{{browsers}}import { fileURLToPath, URL } from 'node:url'
@@ -1789,11 +1789,11 @@ export function studies(override?: UserConfig): UserConfig {
1789
1789
  return mergeOverride(project, override)
1790
1790
  }
1791
1791
  `,
1792
- probe: `// A workbench, not a proof. No gate selects this project. Run in test mode by the
1792
+ probe: `{{benches}}// A workbench, not a proof. No gate selects this project. Run in test mode by the
1793
1793
  // \`test:probe\` script, it collects \`tmp/probes/**/*.test.ts\`. Run in benchmark mode by the
1794
- // \`test:bench\` script, it collects \`*.bench.ts\` files under \`tmp/probes\` and \`tests\`.
1795
- // Each benchmark is a regular test that uses its context's \`bench\` fixture and awaits
1796
- // \`bench(name, options, fn).run()\` or \`bench.compare(...)\`.
1794
+ // \`test:bench\` script, it collects \`*.bench.ts\` files under \`tmp/probes\` and \`tests\`, other
1795
+ // than a browser-hosted face's benches. Each benchmark is a regular test that uses its
1796
+ // context's \`bench\` fixture and awaits \`bench(name, options, fn).run()\` or \`bench.compare(...)\`.
1797
1797
  export function probe(override?: UserConfig): UserConfig {
1798
1798
  const project: UserConfig = {
1799
1799
  resolve,
@@ -1806,7 +1806,29 @@ export function probe(override?: UserConfig): UserConfig {
1806
1806
  fileParallelism: false,
1807
1807
  sequence: { groupOrder: 1 },
1808
1808
  pool: 'threads',
1809
- benchmark: { include: ['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'] },
1809
+ {{benchmark}} },
1810
+ }
1811
+ return mergeOverride(project, override)
1812
+ }
1813
+ `,
1814
+ bench: `// Runs the browser benches in Playwright Chromium beside the \`probe\` workbench, through the
1815
+ // \`test:bench\` script. No gate selects this project, and it collects no test file.
1816
+ export function benchBrowser(override?: UserConfig): UserConfig {
1817
+ const project: UserConfig = {
1818
+ resolve,
1819
+ {{optimization}},
1820
+ {{plugins}} test: {
1821
+ name: { label: 'bench:browser', color: 'black' },
1822
+ include: [],
1823
+ setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
1824
+ browser: {
1825
+ enabled: true,
1826
+ provider: playwright(browserOptions),
1827
+ commands,
1828
+ screenshotDirectory: screenshots,
1829
+ instances: [{ browser: 'chromium', headless: true }],
1830
+ },
1831
+ benchmark: { include: browserBenches },
1810
1832
  },
1811
1833
  }
1812
1834
  return mergeOverride(project, override)
@@ -6328,6 +6350,35 @@ function matchesBarrel(blueprint) {
6328
6350
  return blueprint.studies && blueprint.app.includes("server");
6329
6351
  }
6330
6352
  /**
6353
+ * Lists the bench globs of the browser-hosted projects among a workspace's project labels.
6354
+ *
6355
+ * @param projects - The project labels, in registration order.
6356
+ * @returns One glob per browser-hosted label, matching every `*.bench.ts` file beneath that
6357
+ * label's directory under `tests/<axis>/`, in label order.
6358
+ *
6359
+ * @remarks
6360
+ * A label on the `src` or `app` axis names a project that runs in Playwright Chromium unless it
6361
+ * names `core`, `server`, or `bin`, which run in Node. The `src:themes` target collects
6362
+ * `tests/src/styles/themes`. Every other label sits on neither axis and adds no glob.
6363
+ *
6364
+ * @example
6365
+ * ```ts
6366
+ * import { projectsToBenches } from '@orkestrel/scaffold'
6367
+ *
6368
+ * const benches = projectsToBenches(['src:core', 'src:browser', 'app:vue', 'policy'])
6369
+ *
6370
+ * benches.length // 2
6371
+ * benches[1]?.startsWith('tests/app/vue/') // true
6372
+ * ```
6373
+ */
6374
+ function projectsToBenches(projects) {
6375
+ return projects.flatMap((label) => {
6376
+ const [axis, face, ...rest] = label.split(":");
6377
+ if (axis !== "src" && axis !== "app" || face === void 0 || face.length === 0 || rest.length > 0 || face === "core" || face === "server" || face === "bin") return [];
6378
+ return [`tests/${axis}/${face === "themes" ? "styles/themes" : face}/**/*.bench.ts`];
6379
+ });
6380
+ }
6381
+ /**
6331
6382
  * Selects the single published environment a package root points at.
6332
6383
  *
6333
6384
  * @param src - The declared published environments.
@@ -7600,7 +7651,11 @@ function blueprintToScripts(blueprint) {
7600
7651
  ...blueprint.conformance ? { "test:conformance": `${vitest} --project conformance` } : {},
7601
7652
  ...blueprint.tree ? { "test:tree": `${vitest} --project tree` } : {},
7602
7653
  "test:probe": "vitest run --config vite.config.ts --no-cache --reporter=verbose --project probe",
7603
- "test:bench": "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --mode benchmark",
7654
+ "test:bench": [
7655
+ "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\"",
7656
+ ...blueprintToProjects(blueprint).includes("bench:browser") ? ["--project bench:browser"] : [],
7657
+ "--mode benchmark"
7658
+ ].join(" "),
7604
7659
  ...publishes ? { "test:distribution": `${vitest} --project distribution` } : {},
7605
7660
  ...integrates ? { "test:integration": `${vitest} --project integration` } : {},
7606
7661
  ...blueprint.service ? { "test:service": `${vitest} --project service` } : {},
@@ -7676,10 +7731,11 @@ function blueprintToScripts(blueprint) {
7676
7731
  *
7677
7732
  * `accepted` carries each generated predecessor the region can replace. The
7678
7733
  * guides entry accepts the generated command that invoked the guides project
7679
- * through Vitest alone. The benchmark entry accepts the one command that ran the
7734
+ * through Vitest alone. The benchmark entry accepts the command that ran the
7680
7735
  * `probe` project through `vitest bench`, before the dedicated bench project
7681
- * existed. The pack hook accepts the build chain emitted before it
7682
- * delegated to `build`. The publication hook accepts the same gate chain without
7736
+ * existed, and the command planned for the other state of the browser bench project, so
7737
+ * the entry follows a browser-hosted face that arrives or leaves. The pack hook accepts the
7738
+ * build chain emitted before it delegated to `build`. The publication hook accepts the same gate chain without
7683
7739
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
7684
7740
  * step. `serve:build` accepts the server-only chain it ran before it delegated to `build`.
7685
7741
  * The value being written is always writable, so it is not repeated there. Any other value is a
@@ -7711,7 +7767,11 @@ function blueprintToWritableScripts(blueprint) {
7711
7767
  return [{
7712
7768
  name,
7713
7769
  command,
7714
- accepted: name === "test:guides" ? ["vitest run --config vite.config.ts --no-cache --reporter=dot --project guides"] : name === "test:bench" ? ["vitest bench --config vite.config.ts --no-cache --project probe"] : name === "build:src:styles" && blueprint.themes ? ["vite build --config configs/src/vite.styles.config.ts"] : sheets.some((face) => name === `test:src:${face}`) ? [command.slice(command.indexOf(" && ") + 4)] : name === "serve:build" ? ["npm run build:app:server && npm run serve"] : []
7770
+ accepted: name === "test:guides" ? ["vitest run --config vite.config.ts --no-cache --reporter=dot --project guides"] : name === "test:bench" ? [
7771
+ "vitest bench --config vite.config.ts --no-cache --project probe",
7772
+ "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --mode benchmark",
7773
+ "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --project bench:browser --mode benchmark"
7774
+ ].filter((predecessor) => predecessor !== command) : name === "build:src:styles" && blueprint.themes ? ["vite build --config configs/src/vite.styles.config.ts"] : sheets.some((face) => name === `test:src:${face}`) ? [command.slice(command.indexOf(" && ") + 4)] : name === "serve:build" ? ["npm run build:app:server && npm run serve"] : []
7715
7775
  }];
7716
7776
  });
7717
7777
  const prepack = scripts.prepack;
@@ -7960,8 +8020,8 @@ function blueprintToRootTsconfig(blueprint) {
7960
8020
  * Projects a blueprint into the project labels its root Vitest configuration registers.
7961
8021
  *
7962
8022
  * @param blueprint - The workspace specification.
7963
- * @returns Project labels in registration order, including wrapper-registered sheet faces and
7964
- * the probe benchmark variant.
8023
+ * @returns Project labels in registration order, including wrapper-registered sheet faces,
8024
+ * the probe benchmark variant, and, beside a browser-hosted face, the browser bench project.
7965
8025
  *
7966
8026
  * @example
7967
8027
  * ```ts
@@ -7974,15 +8034,19 @@ function blueprintToProjects(blueprint) {
7974
8034
  const sheets = blueprintToSheets(blueprint);
7975
8035
  const styled = sheets.length > 0 || blueprint.themes;
7976
8036
  const faces = blueprintToFaces(blueprint);
7977
- return [
8037
+ const environments = AXES.flatMap((axis) => [
8038
+ ...ENVIRONMENTS.filter((environment) => (axis !== "app" || environment !== "server") && blueprint[axis].includes(environment)).map((environment) => `${axis}:${environment}`),
8039
+ ...faces.filter((face) => face.axes.includes(axis)).map((face) => `${axis}:${face.name}`),
8040
+ ...axis === "src" && blueprint.bin.length > 0 ? ["src:bin"] : [],
8041
+ ...axis === "app" && blueprint.app.includes("server") ? ["app:server"] : []
8042
+ ]);
8043
+ const labels = [
7978
8044
  ...sheets.map((name) => `src:${name}`),
7979
8045
  ...blueprint.themes && !blueprint.styles ? ["src:themes"] : [],
7980
- ...AXES.flatMap((axis) => [
7981
- ...ENVIRONMENTS.filter((environment) => (axis !== "app" || environment !== "server") && blueprint[axis].includes(environment)).map((environment) => `${axis}:${environment}`),
7982
- ...faces.filter((face) => face.axes.includes(axis)).map((face) => `${axis}:${face.name}`),
7983
- ...axis === "src" && blueprint.bin.length > 0 ? ["src:bin"] : [],
7984
- ...axis === "app" && blueprint.app.includes("server") ? ["app:server"] : []
7985
- ]),
8046
+ ...environments
8047
+ ];
8048
+ return [
8049
+ ...labels,
7986
8050
  "policy",
7987
8051
  "config",
7988
8052
  ...blueprint.setup.includes("node") || blueprint.global ? ["setup"] : [],
@@ -7996,7 +8060,8 @@ function blueprintToProjects(blueprint) {
7996
8060
  ...blueprint.src.length > 0 || styled ? ["distribution"] : [],
7997
8061
  ...blueprint.integration ? ["integration"] : [],
7998
8062
  "probe",
7999
- "probe (bench)"
8063
+ "probe (bench)",
8064
+ ...projectsToBenches(labels).length > 0 ? ["bench:browser"] : []
8000
8065
  ];
8001
8066
  }
8002
8067
  /**
@@ -8069,6 +8134,8 @@ function blueprintToRootVite(blueprint) {
8069
8134
  ...machinery.showcase ? ["import { viteSingleFile } from 'vite-plugin-singlefile'", "import { resolve as resolvePath } from 'node:path'"] : []
8070
8135
  ];
8071
8136
  const external = "external: resolveSourceExternal,";
8137
+ const benches = projectsToBenches([...planned]);
8138
+ const inlineBenches = `const browserBenches = [${benches.map((glob) => `'${glob}'`).join(", ")}]`;
8072
8139
  const factories = [
8073
8140
  ...blueprint.src.includes("browser") || blueprint.src.includes("server") ? [blueprint.src.includes("core") ? `function resolveSourceExternal(id: string): boolean {
8074
8141
  return (
@@ -8137,7 +8204,14 @@ function blueprintToRootVite(blueprint) {
8137
8204
  ...planned.has("studies") ? [CONFIG_TEMPLATES.factories.studies] : [],
8138
8205
  ...planned.has("distribution") ? [CONFIG_TEMPLATES.factories.distribution] : [],
8139
8206
  ...planned.has("integration") ? [fillTemplate(styled ? CONFIG_TEMPLATES.factories.integration.sheet : CONFIG_TEMPLATES.factories.integration.module, { global })] : [],
8140
- CONFIG_TEMPLATES.factories.probe
8207
+ fillTemplate(CONFIG_TEMPLATES.factories.probe, {
8208
+ benches: benches.length === 0 ? "" : `// A browser-hosted face's bench reads host APIs that Node lacks, so only \`bench:browser\` runs it.\n${matchesPrintWidth(inlineBenches) ? inlineBenches : `const browserBenches = [\n${benches.map((glob) => `\t'${glob}',`).join("\n")}\n]`}\n\n`,
8209
+ benchmark: benches.length === 0 ? " benchmark: { include: ['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'] },\n" : " benchmark: {\n include: ['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'],\n // A set `exclude` replaces Vitest's default, so the default is kept.\n exclude: [...defaultExclude, ...browserBenches],\n },\n"
8210
+ }),
8211
+ ...planned.has("bench:browser") ? [fillTemplate(CONFIG_TEMPLATES.factories.bench, {
8212
+ optimization: machinery.frameworks.includes("vue") ? "optimizeDeps: { include: [...optimizeDeps.include, 'vue'] }" : "optimizeDeps",
8213
+ plugins: machinery.frameworks.includes("vue") ? " plugins: [vue()],\n" : ""
8214
+ })] : []
8141
8215
  ];
8142
8216
  const projects = [
8143
8217
  ...styled ? [...sheets.map((name) => `'./configs/src/vite.${name}.config.ts'`), ...planned.has("src:themes") ? ["'./configs/src/vite.themes.config.ts'"] : []] : [],
@@ -8162,7 +8236,8 @@ function blueprintToRootVite(blueprint) {
8162
8236
  ...planned.has("studies") ? ["studies"] : [],
8163
8237
  ...planned.has("distribution") ? ["distribution"] : [],
8164
8238
  ...planned.has("integration") ? ["integration"] : [],
8165
- "probe"
8239
+ "probe",
8240
+ ...planned.has("bench:browser") ? ["benchBrowser"] : []
8166
8241
  ];
8167
8242
  const joinedProjects = `\t\tprojects: [${projects.join(", ")}],`;
8168
8243
  const projectRows = matchesPrintWidth(joinedProjects) ? joinedProjects : `\t\tprojects: [
@@ -8181,6 +8256,7 @@ ${projects.map((project) => `\t\t\t${project},`).join("\n")}
8181
8256
  return fillTemplate(CONFIG_TEMPLATES.root.vite, {
8182
8257
  journey: journeyed ? "import type { JourneyVariant } from '@orkestrel/test'\n" : "",
8183
8258
  imports: imports.length === 0 ? "" : `${imports.join("\n")}\n`,
8259
+ vitest: benches.length === 0 ? "" : "defaultExclude, ",
8184
8260
  helpers: helpers.length === 0 ? "" : matchesPrintWidth(helperImport.trimEnd()) ? helperImport : `import {\n${helpers.map((helper) => `\t${helper},`).join("\n")}\n} from './configs/helpers.js'\n`,
8185
8261
  browsers: machinery.browser ? "import { resolveBrowser, resolvePinnedBrowser } from './configs/browsers.js'\nimport { commands } from './configs/commands.js'\n" : "",
8186
8262
  options: (machinery.browser ? "const browserOptions = resolveBrowser(resolvePinnedBrowser(), process.platform, process.env)\n// Vitest writes a page.screenshot() capture beside its test file unless a directory is named.\nconst screenshots = resolveWorkspacePath('tmp/captures/screenshots')\n\n" + blueprintToOptimizedDependencies(blueprint) : "") + (journeyed ? "const capture = process.env.CAPTURE === '1'\n\n" : "") + ((blueprint.journey || blueprint.showcase) && (base || applicationFaces.length > 0) ? `const applications = {\n${base ? " browser: appBrowser,\n" : ""}${applicationFaces.map((extension) => `\t${extension.name}: app${extension.name[0]?.toUpperCase()}${extension.name.slice(1)},\n`).join("")}}\n\n` : ""),
@@ -10395,6 +10471,6 @@ var Compiler = class {
10395
10471
  return error;
10396
10472
  }
10397
10473
  };
10398
- export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_GROUPS, ARTIFACT_TEMPLATES, AXES, BARREL_CONFIGS, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, BIN_MODULE_PATTERN, BIN_OUTPUT_PATH, BROWSER_ENTRIES, BROWSE_DEV_DEPENDENCIES, BROWSE_UPSTREAM, CANON_PATHS, CAPTURE_DEV_DEPENDENCIES, CAPTURE_UPSTREAM, CATALOG_AGENT_PATH, CATALOG_END_MARKER, CATALOG_START_MARKER, CENTRAL_FILE_NAMES, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DECLARATION_DEV_DEPENDENCIES, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, DISTRIBUTION_SETUP_PATH, DISTRIBUTION_TEST_PATH, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_RANGE_PATTERN, FLOOR_RANGE_PATTERN, FOREIGN_NAME_PATTERN, FRAMEWORKS, FRAMEWORK_MATRIX, GLOBAL_SETUP_PATH, GUIDES_TEST_PATH, HEX_PATTERN, HOST_INVENTORY_PATH, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, JOURNEY_CONFIG_PATH, MANIFEST_KEY_ORDER, MANIFEST_PATH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_SCRIPT_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, MINIMUM_NODE_VERSION, MINIMUM_NPM_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, PRINT_WIDTH, REFERENCE_PATHS, RELEASE_PROOF_COMMAND, RESERVED_SHEET_NAMES, SEED_GUIDE_PATHS, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHEET_ENTRY_NAME, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SHOWCASE_OVERRIDES, SHOWCASE_PAGES_PATH, SKILLS_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, STUDIES_TEST_INCLUDE, STYLES_DEV_DEPENDENCIES, STYLES_ENTRY_PATH, SURFACES, SURFACE_EDIT_LENGTH, SURFACE_TRANSFERS, ScaffoldError, TAB_WIDTH, TARGET_SKILL_NAMES, THEMES_BARREL_PATH, THEMES_ENTRY_PATH, TOOLCHAIN_HOLDS, TREE_TEST_PATH, VERSION_PATTERN, WORKSPACE_DEV_ENGINES, WORKSPACE_OWNED_PATHS, applyOverrides, artifactToArtifactFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToEntries, blueprintToExports, blueprintToFaces, blueprintToGuideArtifacts, blueprintToHostArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToManifestOverrides, blueprintToOptimizedDependencies, blueprintToOrchestrationArtifacts, blueprintToProjects, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSheets, blueprintToSourceArtifacts, blueprintToTestArtifacts, blueprintToToolchainHolds, blueprintToWritableScripts, bytesToHex, catalogToLayers, collectSurfaceAdvisories, collectSurfaceCollisions, collectSurfaceConflicts, compareSurfaceCollisions, compareVersions, computeBytes, computeHash, computeTotal, contentToHex, createBlueprint, dependenciesToQuestions, extractRangeMajor, extractVersion, inferArtifactDrift, inferArtifactGroup, inferSurfaceSimilarity, insertManifestDependencies, insertManifestEntries, insertManifestSection, isArtifact, isArtifactFinding, isArtifactGroup, isArtifactGroups, isAudit, isBinModule, isBlueprint, isBrowserExtension, isCanonPath, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDeferredPath, isDependency, isDependencyName, isEnvironment, isExtension, isFloorPath, isHexContent, isManifestScript, isMirror, isOverride, isPath, isPlan, isQuestion, isRetainedPath, isScaffoldError, isSheetName, isSnapshot, isStylesExtension, isSubpathMap, isSurface, iterateAnswers, manifestToDependencies, manifestToEntries, manifestToName, matchesArtifactDriftReachability, matchesBarrel, matchesEngines, matchesGuideRefusal, matchesOrchestrationPath, matchesPackedPath, matchesPrintWidth, matchesRange, matchesSurfaceStructure, nameToGuide, normalizePackagePath, overridesToQuestions, parseArtifactGroups, parseBlueprint, parseCompilerOptions, parseExtension, parseOwnedJSONValue, parseSnapshot, pathToCondition, planToArtifactFindings, planToHash, planToSummary, renderSkillPointer, replaceManifestOverride, replaceManifestOverrides, replaceManifestRanges, replaceManifestScripts, replacePlanRanges, scanManifestTokens, selectArtifactGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
10474
+ export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_GROUPS, ARTIFACT_TEMPLATES, AXES, BARREL_CONFIGS, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, BIN_MODULE_PATTERN, BIN_OUTPUT_PATH, BROWSER_ENTRIES, BROWSE_DEV_DEPENDENCIES, BROWSE_UPSTREAM, CANON_PATHS, CAPTURE_DEV_DEPENDENCIES, CAPTURE_UPSTREAM, CATALOG_AGENT_PATH, CATALOG_END_MARKER, CATALOG_START_MARKER, CENTRAL_FILE_NAMES, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DECLARATION_DEV_DEPENDENCIES, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, DISTRIBUTION_SETUP_PATH, DISTRIBUTION_TEST_PATH, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_RANGE_PATTERN, FLOOR_RANGE_PATTERN, FOREIGN_NAME_PATTERN, FRAMEWORKS, FRAMEWORK_MATRIX, GLOBAL_SETUP_PATH, GUIDES_TEST_PATH, HEX_PATTERN, HOST_INVENTORY_PATH, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, JOURNEY_CONFIG_PATH, MANIFEST_KEY_ORDER, MANIFEST_PATH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_SCRIPT_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, MINIMUM_NODE_VERSION, MINIMUM_NPM_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, PRINT_WIDTH, REFERENCE_PATHS, RELEASE_PROOF_COMMAND, RESERVED_SHEET_NAMES, SEED_GUIDE_PATHS, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHEET_ENTRY_NAME, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SHOWCASE_OVERRIDES, SHOWCASE_PAGES_PATH, SKILLS_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, STUDIES_TEST_INCLUDE, STYLES_DEV_DEPENDENCIES, STYLES_ENTRY_PATH, SURFACES, SURFACE_EDIT_LENGTH, SURFACE_TRANSFERS, ScaffoldError, TAB_WIDTH, TARGET_SKILL_NAMES, THEMES_BARREL_PATH, THEMES_ENTRY_PATH, TOOLCHAIN_HOLDS, TREE_TEST_PATH, VERSION_PATTERN, WORKSPACE_DEV_ENGINES, WORKSPACE_OWNED_PATHS, applyOverrides, artifactToArtifactFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToEntries, blueprintToExports, blueprintToFaces, blueprintToGuideArtifacts, blueprintToHostArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToManifestOverrides, blueprintToOptimizedDependencies, blueprintToOrchestrationArtifacts, blueprintToProjects, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSheets, blueprintToSourceArtifacts, blueprintToTestArtifacts, blueprintToToolchainHolds, blueprintToWritableScripts, bytesToHex, catalogToLayers, collectSurfaceAdvisories, collectSurfaceCollisions, collectSurfaceConflicts, compareSurfaceCollisions, compareVersions, computeBytes, computeHash, computeTotal, contentToHex, createBlueprint, dependenciesToQuestions, extractRangeMajor, extractVersion, inferArtifactDrift, inferArtifactGroup, inferSurfaceSimilarity, insertManifestDependencies, insertManifestEntries, insertManifestSection, isArtifact, isArtifactFinding, isArtifactGroup, isArtifactGroups, isAudit, isBinModule, isBlueprint, isBrowserExtension, isCanonPath, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDeferredPath, isDependency, isDependencyName, isEnvironment, isExtension, isFloorPath, isHexContent, isManifestScript, isMirror, isOverride, isPath, isPlan, isQuestion, isRetainedPath, isScaffoldError, isSheetName, isSnapshot, isStylesExtension, isSubpathMap, isSurface, iterateAnswers, manifestToDependencies, manifestToEntries, manifestToName, matchesArtifactDriftReachability, matchesBarrel, matchesEngines, matchesGuideRefusal, matchesOrchestrationPath, matchesPackedPath, matchesPrintWidth, matchesRange, matchesSurfaceStructure, nameToGuide, normalizePackagePath, overridesToQuestions, parseArtifactGroups, parseBlueprint, parseCompilerOptions, parseExtension, parseOwnedJSONValue, parseSnapshot, pathToCondition, planToArtifactFindings, planToHash, planToSummary, projectsToBenches, renderSkillPointer, replaceManifestOverride, replaceManifestOverrides, replaceManifestRanges, replaceManifestScripts, replacePlanRanges, scanManifestTokens, selectArtifactGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
10399
10475
 
10400
10476
  //# sourceMappingURL=index.js.map