@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
File without changes
File without changes
@@ -11,7 +11,6 @@ import {
11
11
  cpSync,
12
12
  existsSync,
13
13
  globSync,
14
- lstatSync,
15
14
  mkdirSync,
16
15
  openSync,
17
16
  readdirSync,
@@ -126,6 +125,7 @@ import {
126
125
  POLICY_VUE_DOMAIN_CASES,
127
126
  } from './setupPolicy.js'
128
127
  import { describe, expect, it } from 'vitest'
128
+ import { defaultExclude } from 'vitest/config'
129
129
 
130
130
  describe('selected faces', () => {
131
131
  it('collects each selected sheet proof from the effective project root and rejects a wrong root', async () => {
@@ -624,6 +624,7 @@ describe('selected faces', () => {
624
624
  'srcVue',
625
625
  'appVue',
626
626
  'setupBrowser',
627
+ 'benchBrowser',
627
628
  'sheetProject',
628
629
  'integration',
629
630
  ]) {
@@ -725,6 +726,69 @@ describe('root configuration', () => {
725
726
  }
726
727
  })
727
728
 
729
+ it('runs the browser benches in a Chromium bench project and keeps them out of the Node workbench', () => {
730
+ const factories = readConfigRecord(rootConfiguration)
731
+ const manifest = readConfigRecord(
732
+ JSON.parse(readFileSync(resolve(POLICY_ROOT, 'package.json'), 'utf8')),
733
+ )
734
+ // Every face that runs in Chromium: each sheet, the themes target without a base sheet, each
735
+ // browser environment, and each framework face.
736
+ const sheets = collectSheets(POLICY_ROOT)
737
+ const browserBenches = [
738
+ ...sheets.map((face) => `src/${face}`),
739
+ ...(!sheets.includes('styles') &&
740
+ existsSync(resolve(POLICY_ROOT, 'src/styles/themes/index.scss'))
741
+ ? ['src/styles/themes']
742
+ : []),
743
+ ...['src/browser', 'app/browser'].filter((path) => existsSync(resolve(POLICY_ROOT, path))),
744
+ ...collectFrameworks(POLICY_ROOT),
745
+ ]
746
+ .map((path) => `tests/${path}/**/*.bench.ts`)
747
+ .sort()
748
+ const browser = browserBenches.length > 0
749
+ const projects = configuration.test?.projects
750
+ if (!Array.isArray(projects)) throw new Error('The root configuration carries no projects')
751
+ expect(
752
+ projects.some((entry) => typeof entry === 'function' && entry.name === 'benchBrowser'),
753
+ ).toBe(browser)
754
+ expect(typeof factories.benchBrowser === 'function').toBe(browser)
755
+
756
+ const probe = factories.probe
757
+ if (typeof probe !== 'function') throw new Error('The root configuration exports no probe')
758
+ const workbench = readConfigRecord(
759
+ readConfigRecord(readConfigRecord(Reflect.apply(probe, undefined, [])).test).benchmark,
760
+ )
761
+ expect(workbench.include).toStrictEqual(['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'])
762
+ // The exclusion keeps Vitest's default exclude, which a set `exclude` otherwise replaces, and
763
+ // a workspace with no browser-hosted face sets none.
764
+ expect(
765
+ Array.isArray(workbench.exclude) ? [...workbench.exclude].sort() : workbench.exclude,
766
+ ).toStrictEqual(browser ? [...defaultExclude, ...browserBenches].sort() : undefined)
767
+
768
+ // The script names each bench project it runs; a reporter flag beside them stays the package's.
769
+ const script = readConfigScript(readConfigRecord(manifest.scripts), 'test:bench')
770
+ expect(script.startsWith('vitest bench ')).toBe(true)
771
+ expect(
772
+ [...script.matchAll(/--project(?:=|\s+)("[^"]*"|\S+)/gu)].map(([, name]) =>
773
+ (name ?? '').replace(/^"(.*)"$/u, '$1'),
774
+ ),
775
+ ).toStrictEqual(['probe (bench)', ...(browser ? ['bench:browser'] : [])])
776
+
777
+ const factory = factories.benchBrowser
778
+ if (typeof factory !== 'function') return
779
+ const test = readConfigRecord(readConfigRecord(Reflect.apply(factory, undefined, [])).test)
780
+ expect(test.name).toStrictEqual({ label: 'bench:browser', color: 'black' })
781
+ expect(test.include).toStrictEqual([])
782
+ expect(test.setupFiles).toStrictEqual(['./tests/setup.ts', './tests/setupBrowser.ts'])
783
+ expect(test.globalSetup).toBeUndefined()
784
+ const included = readConfigRecord(test.benchmark).include
785
+ expect(Array.isArray(included) ? [...included].sort() : included).toStrictEqual(browserBenches)
786
+ expect(readConfigRecord(test.browser).enabled).toBe(true)
787
+ expect(readConfigRecord(test.browser).instances).toStrictEqual([
788
+ { browser: 'chromium', headless: true, name: 'bench:browser (chromium)' },
789
+ ])
790
+ })
791
+
728
792
  it('registers every workspace project with its fixed include and setup files', () => {
729
793
  const browserProofs = ['tests/setupBrowser.test.ts', 'tests/setupStyles.test.ts']
730
794
  const setupProofs = globSync('tests/setup*.test.ts', { cwd: POLICY_ROOT })
@@ -5492,8 +5556,12 @@ describe('configuration helpers', () => {
5492
5556
  const expected = realpathSync.native(packageRoot)
5493
5557
  const absent = resolve(packageRoot, 'src/absent.ts')
5494
5558
  const beneathFile = resolve(source, 'child')
5495
- expect(lstatSync(absent, { throwIfNoEntry: false })).toBeUndefined()
5496
- expect(lstatSync(beneathFile, { throwIfNoEntry: false })).toBeUndefined()
5559
+ expect(existsSync(absent)).toBe(false)
5560
+ expect(existsSync(beneathFile)).toBe(false)
5561
+ expect(configHelpers.isDirectoryPath(packageRoot)).toBe(true)
5562
+ expect(configHelpers.isDirectoryPath(source)).toBe(false)
5563
+ expect(configHelpers.isDirectoryPath(absent)).toBe(false)
5564
+ expect(configHelpers.isDirectoryPath(beneathFile)).toBe(false)
5497
5565
  expect(configHelpers.packageRootOf('@sample/package', absent)).toBe(expected)
5498
5566
  expect(configHelpers.packageRootForResolved(beneathFile)).toBe(expected)
5499
5567
  } finally {
@@ -4,7 +4,7 @@ let _orkestrel_template = require("@orkestrel/template");
4
4
  let _orkestrel_emitter = require("@orkestrel/emitter");
5
5
  var package_default = {
6
6
  name: "@orkestrel/scaffold",
7
- version: "0.0.135",
7
+ version: "0.0.136",
8
8
  description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
9
9
  keywords: [
10
10
  "audit",
@@ -97,7 +97,7 @@ var package_default = {
97
97
  },
98
98
  dependencies: {
99
99
  "@orkestrel/console": "^0.0.20",
100
- "@orkestrel/contract": "^0.0.23",
100
+ "@orkestrel/contract": "^0.0.24",
101
101
  "@orkestrel/emitter": "^0.0.16",
102
102
  "@orkestrel/markdown": "^0.0.21",
103
103
  "@orkestrel/process": "^0.0.19",
@@ -109,7 +109,7 @@ var package_default = {
109
109
  "@orkestrel/guide": "^0.0.31",
110
110
  "@orkestrel/html": "^0.0.16",
111
111
  "@orkestrel/probe": "^0.0.30",
112
- "@orkestrel/test": "^0.0.38",
112
+ "@orkestrel/test": "^0.0.39",
113
113
  "@types/node": "^24.19.2",
114
114
  "@vitest/browser-playwright": "^5.1.0",
115
115
  "oxfmt": "^0.78.0",
@@ -955,7 +955,7 @@ var CONFIG_TEMPLATES = Object.freeze({
955
955
  `,
956
956
  vite: `{{journey}}import type { PluginOption, UserConfig } from 'vite'
957
957
  import { mergeConfig } from 'vite'
958
- {{imports}}import { defineConfig } from 'vitest/config'
958
+ {{imports}}import { {{vitest}}defineConfig } from 'vitest/config'
959
959
  import manifest from './package.json' with { type: 'json' }
960
960
  import tsconfig from './tsconfig.json' with { type: 'json' }
961
961
  {{helpers}}{{browsers}}import { fileURLToPath, URL } from 'node:url'
@@ -1790,11 +1790,11 @@ export function studies(override?: UserConfig): UserConfig {
1790
1790
  return mergeOverride(project, override)
1791
1791
  }
1792
1792
  `,
1793
- probe: `// A workbench, not a proof. No gate selects this project. Run in test mode by the
1793
+ probe: `{{benches}}// A workbench, not a proof. No gate selects this project. Run in test mode by the
1794
1794
  // \`test:probe\` script, it collects \`tmp/probes/**/*.test.ts\`. Run in benchmark mode by the
1795
- // \`test:bench\` script, it collects \`*.bench.ts\` files under \`tmp/probes\` and \`tests\`.
1796
- // Each benchmark is a regular test that uses its context's \`bench\` fixture and awaits
1797
- // \`bench(name, options, fn).run()\` or \`bench.compare(...)\`.
1795
+ // \`test:bench\` script, it collects \`*.bench.ts\` files under \`tmp/probes\` and \`tests\`, other
1796
+ // than a browser-hosted face's benches. Each benchmark is a regular test that uses its
1797
+ // context's \`bench\` fixture and awaits \`bench(name, options, fn).run()\` or \`bench.compare(...)\`.
1798
1798
  export function probe(override?: UserConfig): UserConfig {
1799
1799
  const project: UserConfig = {
1800
1800
  resolve,
@@ -1807,7 +1807,29 @@ export function probe(override?: UserConfig): UserConfig {
1807
1807
  fileParallelism: false,
1808
1808
  sequence: { groupOrder: 1 },
1809
1809
  pool: 'threads',
1810
- benchmark: { include: ['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'] },
1810
+ {{benchmark}} },
1811
+ }
1812
+ return mergeOverride(project, override)
1813
+ }
1814
+ `,
1815
+ bench: `// Runs the browser benches in Playwright Chromium beside the \`probe\` workbench, through the
1816
+ // \`test:bench\` script. No gate selects this project, and it collects no test file.
1817
+ export function benchBrowser(override?: UserConfig): UserConfig {
1818
+ const project: UserConfig = {
1819
+ resolve,
1820
+ {{optimization}},
1821
+ {{plugins}} test: {
1822
+ name: { label: 'bench:browser', color: 'black' },
1823
+ include: [],
1824
+ setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
1825
+ browser: {
1826
+ enabled: true,
1827
+ provider: playwright(browserOptions),
1828
+ commands,
1829
+ screenshotDirectory: screenshots,
1830
+ instances: [{ browser: 'chromium', headless: true }],
1831
+ },
1832
+ benchmark: { include: browserBenches },
1811
1833
  },
1812
1834
  }
1813
1835
  return mergeOverride(project, override)
@@ -6329,6 +6351,35 @@ function matchesBarrel(blueprint) {
6329
6351
  return blueprint.studies && blueprint.app.includes("server");
6330
6352
  }
6331
6353
  /**
6354
+ * Lists the bench globs of the browser-hosted projects among a workspace's project labels.
6355
+ *
6356
+ * @param projects - The project labels, in registration order.
6357
+ * @returns One glob per browser-hosted label, matching every `*.bench.ts` file beneath that
6358
+ * label's directory under `tests/<axis>/`, in label order.
6359
+ *
6360
+ * @remarks
6361
+ * A label on the `src` or `app` axis names a project that runs in Playwright Chromium unless it
6362
+ * names `core`, `server`, or `bin`, which run in Node. The `src:themes` target collects
6363
+ * `tests/src/styles/themes`. Every other label sits on neither axis and adds no glob.
6364
+ *
6365
+ * @example
6366
+ * ```ts
6367
+ * import { projectsToBenches } from '@orkestrel/scaffold'
6368
+ *
6369
+ * const benches = projectsToBenches(['src:core', 'src:browser', 'app:vue', 'policy'])
6370
+ *
6371
+ * benches.length // 2
6372
+ * benches[1]?.startsWith('tests/app/vue/') // true
6373
+ * ```
6374
+ */
6375
+ function projectsToBenches(projects) {
6376
+ return projects.flatMap((label) => {
6377
+ const [axis, face, ...rest] = label.split(":");
6378
+ if (axis !== "src" && axis !== "app" || face === void 0 || face.length === 0 || rest.length > 0 || face === "core" || face === "server" || face === "bin") return [];
6379
+ return [`tests/${axis}/${face === "themes" ? "styles/themes" : face}/**/*.bench.ts`];
6380
+ });
6381
+ }
6382
+ /**
6332
6383
  * Selects the single published environment a package root points at.
6333
6384
  *
6334
6385
  * @param src - The declared published environments.
@@ -7601,7 +7652,11 @@ function blueprintToScripts(blueprint) {
7601
7652
  ...blueprint.conformance ? { "test:conformance": `${vitest} --project conformance` } : {},
7602
7653
  ...blueprint.tree ? { "test:tree": `${vitest} --project tree` } : {},
7603
7654
  "test:probe": "vitest run --config vite.config.ts --no-cache --reporter=verbose --project probe",
7604
- "test:bench": "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --mode benchmark",
7655
+ "test:bench": [
7656
+ "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\"",
7657
+ ...blueprintToProjects(blueprint).includes("bench:browser") ? ["--project bench:browser"] : [],
7658
+ "--mode benchmark"
7659
+ ].join(" "),
7605
7660
  ...publishes ? { "test:distribution": `${vitest} --project distribution` } : {},
7606
7661
  ...integrates ? { "test:integration": `${vitest} --project integration` } : {},
7607
7662
  ...blueprint.service ? { "test:service": `${vitest} --project service` } : {},
@@ -7677,10 +7732,11 @@ function blueprintToScripts(blueprint) {
7677
7732
  *
7678
7733
  * `accepted` carries each generated predecessor the region can replace. The
7679
7734
  * guides entry accepts the generated command that invoked the guides project
7680
- * through Vitest alone. The benchmark entry accepts the one command that ran the
7735
+ * through Vitest alone. The benchmark entry accepts the command that ran the
7681
7736
  * `probe` project through `vitest bench`, before the dedicated bench project
7682
- * existed. The pack hook accepts the build chain emitted before it
7683
- * delegated to `build`. The publication hook accepts the same gate chain without
7737
+ * existed, and the command planned for the other state of the browser bench project, so
7738
+ * the entry follows a browser-hosted face that arrives or leaves. The pack hook accepts the
7739
+ * build chain emitted before it delegated to `build`. The publication hook accepts the same gate chain without
7684
7740
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
7685
7741
  * step. `serve:build` accepts the server-only chain it ran before it delegated to `build`.
7686
7742
  * The value being written is always writable, so it is not repeated there. Any other value is a
@@ -7712,7 +7768,11 @@ function blueprintToWritableScripts(blueprint) {
7712
7768
  return [{
7713
7769
  name,
7714
7770
  command,
7715
- 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"] : []
7771
+ accepted: name === "test:guides" ? ["vitest run --config vite.config.ts --no-cache --reporter=dot --project guides"] : name === "test:bench" ? [
7772
+ "vitest bench --config vite.config.ts --no-cache --project probe",
7773
+ "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --mode benchmark",
7774
+ "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --project bench:browser --mode benchmark"
7775
+ ].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"] : []
7716
7776
  }];
7717
7777
  });
7718
7778
  const prepack = scripts.prepack;
@@ -7961,8 +8021,8 @@ function blueprintToRootTsconfig(blueprint) {
7961
8021
  * Projects a blueprint into the project labels its root Vitest configuration registers.
7962
8022
  *
7963
8023
  * @param blueprint - The workspace specification.
7964
- * @returns Project labels in registration order, including wrapper-registered sheet faces and
7965
- * the probe benchmark variant.
8024
+ * @returns Project labels in registration order, including wrapper-registered sheet faces,
8025
+ * the probe benchmark variant, and, beside a browser-hosted face, the browser bench project.
7966
8026
  *
7967
8027
  * @example
7968
8028
  * ```ts
@@ -7975,15 +8035,19 @@ function blueprintToProjects(blueprint) {
7975
8035
  const sheets = blueprintToSheets(blueprint);
7976
8036
  const styled = sheets.length > 0 || blueprint.themes;
7977
8037
  const faces = blueprintToFaces(blueprint);
7978
- return [
8038
+ const environments = AXES.flatMap((axis) => [
8039
+ ...ENVIRONMENTS.filter((environment) => (axis !== "app" || environment !== "server") && blueprint[axis].includes(environment)).map((environment) => `${axis}:${environment}`),
8040
+ ...faces.filter((face) => face.axes.includes(axis)).map((face) => `${axis}:${face.name}`),
8041
+ ...axis === "src" && blueprint.bin.length > 0 ? ["src:bin"] : [],
8042
+ ...axis === "app" && blueprint.app.includes("server") ? ["app:server"] : []
8043
+ ]);
8044
+ const labels = [
7979
8045
  ...sheets.map((name) => `src:${name}`),
7980
8046
  ...blueprint.themes && !blueprint.styles ? ["src:themes"] : [],
7981
- ...AXES.flatMap((axis) => [
7982
- ...ENVIRONMENTS.filter((environment) => (axis !== "app" || environment !== "server") && blueprint[axis].includes(environment)).map((environment) => `${axis}:${environment}`),
7983
- ...faces.filter((face) => face.axes.includes(axis)).map((face) => `${axis}:${face.name}`),
7984
- ...axis === "src" && blueprint.bin.length > 0 ? ["src:bin"] : [],
7985
- ...axis === "app" && blueprint.app.includes("server") ? ["app:server"] : []
7986
- ]),
8047
+ ...environments
8048
+ ];
8049
+ return [
8050
+ ...labels,
7987
8051
  "policy",
7988
8052
  "config",
7989
8053
  ...blueprint.setup.includes("node") || blueprint.global ? ["setup"] : [],
@@ -7997,7 +8061,8 @@ function blueprintToProjects(blueprint) {
7997
8061
  ...blueprint.src.length > 0 || styled ? ["distribution"] : [],
7998
8062
  ...blueprint.integration ? ["integration"] : [],
7999
8063
  "probe",
8000
- "probe (bench)"
8064
+ "probe (bench)",
8065
+ ...projectsToBenches(labels).length > 0 ? ["bench:browser"] : []
8001
8066
  ];
8002
8067
  }
8003
8068
  /**
@@ -8070,6 +8135,8 @@ function blueprintToRootVite(blueprint) {
8070
8135
  ...machinery.showcase ? ["import { viteSingleFile } from 'vite-plugin-singlefile'", "import { resolve as resolvePath } from 'node:path'"] : []
8071
8136
  ];
8072
8137
  const external = "external: resolveSourceExternal,";
8138
+ const benches = projectsToBenches([...planned]);
8139
+ const inlineBenches = `const browserBenches = [${benches.map((glob) => `'${glob}'`).join(", ")}]`;
8073
8140
  const factories = [
8074
8141
  ...blueprint.src.includes("browser") || blueprint.src.includes("server") ? [blueprint.src.includes("core") ? `function resolveSourceExternal(id: string): boolean {
8075
8142
  return (
@@ -8138,7 +8205,14 @@ function blueprintToRootVite(blueprint) {
8138
8205
  ...planned.has("studies") ? [CONFIG_TEMPLATES.factories.studies] : [],
8139
8206
  ...planned.has("distribution") ? [CONFIG_TEMPLATES.factories.distribution] : [],
8140
8207
  ...planned.has("integration") ? [(0, _orkestrel_template.fillTemplate)(styled ? CONFIG_TEMPLATES.factories.integration.sheet : CONFIG_TEMPLATES.factories.integration.module, { global })] : [],
8141
- CONFIG_TEMPLATES.factories.probe
8208
+ (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.probe, {
8209
+ 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`,
8210
+ 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"
8211
+ }),
8212
+ ...planned.has("bench:browser") ? [(0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.bench, {
8213
+ optimization: machinery.frameworks.includes("vue") ? "optimizeDeps: { include: [...optimizeDeps.include, 'vue'] }" : "optimizeDeps",
8214
+ plugins: machinery.frameworks.includes("vue") ? " plugins: [vue()],\n" : ""
8215
+ })] : []
8142
8216
  ];
8143
8217
  const projects = [
8144
8218
  ...styled ? [...sheets.map((name) => `'./configs/src/vite.${name}.config.ts'`), ...planned.has("src:themes") ? ["'./configs/src/vite.themes.config.ts'"] : []] : [],
@@ -8163,7 +8237,8 @@ function blueprintToRootVite(blueprint) {
8163
8237
  ...planned.has("studies") ? ["studies"] : [],
8164
8238
  ...planned.has("distribution") ? ["distribution"] : [],
8165
8239
  ...planned.has("integration") ? ["integration"] : [],
8166
- "probe"
8240
+ "probe",
8241
+ ...planned.has("bench:browser") ? ["benchBrowser"] : []
8167
8242
  ];
8168
8243
  const joinedProjects = `\t\tprojects: [${projects.join(", ")}],`;
8169
8244
  const projectRows = matchesPrintWidth(joinedProjects) ? joinedProjects : `\t\tprojects: [
@@ -8182,6 +8257,7 @@ ${projects.map((project) => `\t\t\t${project},`).join("\n")}
8182
8257
  return (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.root.vite, {
8183
8258
  journey: journeyed ? "import type { JourneyVariant } from '@orkestrel/test'\n" : "",
8184
8259
  imports: imports.length === 0 ? "" : `${imports.join("\n")}\n`,
8260
+ vitest: benches.length === 0 ? "" : "defaultExclude, ",
8185
8261
  helpers: helpers.length === 0 ? "" : matchesPrintWidth(helperImport.trimEnd()) ? helperImport : `import {\n${helpers.map((helper) => `\t${helper},`).join("\n")}\n} from './configs/helpers.js'\n`,
8186
8262
  browsers: machinery.browser ? "import { resolveBrowser, resolvePinnedBrowser } from './configs/browsers.js'\nimport { commands } from './configs/commands.js'\n" : "",
8187
8263
  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` : ""),
@@ -10605,6 +10681,7 @@ exports.pathToCondition = pathToCondition;
10605
10681
  exports.planToArtifactFindings = planToArtifactFindings;
10606
10682
  exports.planToHash = planToHash;
10607
10683
  exports.planToSummary = planToSummary;
10684
+ exports.projectsToBenches = projectsToBenches;
10608
10685
  exports.renderSkillPointer = renderSkillPointer;
10609
10686
  exports.replaceManifestOverride = replaceManifestOverride;
10610
10687
  exports.replaceManifestOverrides = replaceManifestOverrides;