@orkestrel/scaffold 0.0.17 → 0.0.19

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 (66) hide show
  1. package/dist/host/AGENTS.md +4 -2
  2. package/dist/host/CLAUDE.md +22 -10
  3. package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +267 -0
  4. package/dist/host/agents/skills/enterprise-bootstrap/agents/openai.yaml +4 -0
  5. package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +609 -0
  6. package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +994 -0
  7. package/dist/host/agents/skills/enterprise-bootstrap/references/frontend-design.md +59 -0
  8. package/dist/host/agents/skills/enterprise-bootstrap/references/utilities.md +312 -0
  9. package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +4 -13
  10. package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +78 -50
  11. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +81 -0
  12. package/dist/host/agents/skills/orkestrel-debrief/agents/openai.yaml +4 -0
  13. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +75 -0
  14. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +11 -9
  15. package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +44 -59
  16. package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +14 -6
  17. package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +113 -0
  18. package/dist/host/agents/skills/orkestrel-polish-surface/agents/openai.yaml +4 -0
  19. package/dist/host/agents/skills/orkestrel-polish-surface/references/capture-harness.md +82 -0
  20. package/dist/host/claude/agents/builder.md +2 -0
  21. package/dist/host/claude/agents/codex.md +33 -26
  22. package/dist/host/claude/agents/grok.md +7 -0
  23. package/dist/host/claude/agents/implementer.md +2 -1
  24. package/dist/host/claude/agents/orkestrel.md +20 -15
  25. package/dist/host/claude/agents/planner.md +2 -1
  26. package/dist/host/claude/agents/reviewer.md +6 -0
  27. package/dist/host/claude/rules/documentation.md +1 -0
  28. package/dist/host/claude/rules/names.md +5 -7
  29. package/dist/host/claude/rules/quality.md +7 -5
  30. package/dist/host/claude/rules/styles.md +1 -0
  31. package/dist/host/claude/rules/tests.md +1 -0
  32. package/dist/host/claude/rules/typescript.md +3 -10
  33. package/dist/host/claude/rules/workspace.md +2 -5
  34. package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +12 -0
  35. package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +12 -0
  36. package/dist/host/claude/skills/orkestrel-polish-surface/SKILL.md +12 -0
  37. package/dist/host/codex/agents/analyst.toml +6 -3
  38. package/dist/host/codex/agents/builder.toml +3 -2
  39. package/dist/host/codex/agents/checker.toml +4 -2
  40. package/dist/host/codex/agents/grok.toml +3 -1
  41. package/dist/host/codex/agents/implementer.toml +4 -2
  42. package/dist/host/codex/agents/opus.toml +5 -3
  43. package/dist/host/codex/agents/orkestrel.toml +6 -5
  44. package/dist/host/codex/agents/planner.toml +6 -2
  45. package/dist/host/codex/agents/reviewer.toml +7 -2
  46. package/dist/host/codex/config.toml +11 -2
  47. package/dist/host/dotfiles/prettierignore +3 -0
  48. package/dist/host/guides/src/scaffold.md +42 -12
  49. package/dist/host/manifest.json +80 -9
  50. package/dist/host/tests/setupPolicy.ts +4 -3
  51. package/dist/src/core/index.cjs +188 -44
  52. package/dist/src/core/index.cjs.map +1 -1
  53. package/dist/src/core/index.d.cts +17 -6
  54. package/dist/src/core/index.d.ts +17 -6
  55. package/dist/src/core/index.js +188 -45
  56. package/dist/src/core/index.js.map +1 -1
  57. package/dist/src/server/index.cjs +11 -5
  58. package/dist/src/server/index.cjs.map +1 -1
  59. package/dist/src/server/index.d.cts +2 -1
  60. package/dist/src/server/index.d.ts +2 -1
  61. package/dist/src/server/index.js +10 -4
  62. package/dist/src/server/index.js.map +1 -1
  63. package/package.json +4 -4
  64. package/dist/host/agents/skills/orkestrel-build-application/references/application.md +0 -129
  65. package/dist/host/claude/agents/application.md +0 -30
  66. package/dist/host/codex/agents/application.toml +0 -25
@@ -144,6 +144,8 @@ var HOST_PATHS = Object.freeze([
144
144
  var SERVICE_SCRIPT_PATH = "scripts/service.sh";
145
145
  /** The consumer-owned Vitest global-setup module shared by its independently selected projects. */
146
146
  var GLOBAL_SETUP_PATH = "tests/setupGlobal.ts";
147
+ /** The consumer-owned Vite wrapper whose physical presence enables the optional app showcase. */
148
+ var SHOWCASE_CONFIG_PATH = "configs/app/vite.showcase.config.ts";
147
149
  /** The package-name RegExp — lowercase alphanumeric-with-hyphens, letter-first. */
148
150
  var NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
149
151
  /** Maximum bare workspace name length beneath the generated `@orkestrel/` scope. */
@@ -226,7 +228,7 @@ var DEFAULT_VERSION = "0.0.1";
226
228
  /** The `engines.node` range the `blueprint` builder fills. */
227
229
  var DEFAULT_ENGINES = `>=${MINIMUM_NODE_VERSION}`;
228
230
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
229
- var SCAFFOLD_RANGE = "^0.0.17";
231
+ var SCAFFOLD_RANGE = "^0.0.19";
230
232
  /** Tooling versions shared by scaffold and every generated workspace. */
231
233
  var BASE_DEV_DEPENDENCIES = Object.freeze({
232
234
  "@microsoft/api-extractor": "^7.58.12",
@@ -426,7 +428,7 @@ function member(name, category, summary, environment = "core") {
426
428
  * `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
427
429
  * `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
428
430
  * `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
429
- * `service` / `global` default `false`. `description` is OMITTED entirely
431
+ * `service` / `global` / `showcase` default `false`. `description` is OMITTED entirely
430
432
  * when absent, so the result round-trips the exact-record `Blueprint` guard.
431
433
  * @returns A complete `Blueprint`.
432
434
  *
@@ -452,7 +454,8 @@ function blueprint(name, options) {
452
454
  bin: options?.bin ?? false,
453
455
  integration: options?.integration ?? false,
454
456
  service: options?.service ?? false,
455
- global: options?.global ?? false
457
+ global: options?.global ?? false,
458
+ showcase: options?.showcase ?? false
456
459
  };
457
460
  return options?.description === void 0 ? base : {
458
461
  ...base,
@@ -1360,6 +1363,11 @@ function validateBlueprint(spec) {
1360
1363
  text: "At least one src or app environment is required",
1361
1364
  blocking: true
1362
1365
  });
1366
+ if (spec.showcase && !spec.app.includes("browser")) questions.push({
1367
+ field: "showcase",
1368
+ text: "Showcase requires the app browser environment",
1369
+ blocking: true
1370
+ });
1363
1371
  if (spec.src.length > 0) {
1364
1372
  for (const environment of spec.src) if (!ENVIRONMENTS.includes(environment)) questions.push({
1365
1373
  field: "src",
@@ -1823,7 +1831,8 @@ function blueprintShape() {
1823
1831
  bin: booleanShape(),
1824
1832
  integration: booleanShape(),
1825
1833
  service: booleanShape(),
1826
- global: booleanShape()
1834
+ global: booleanShape(),
1835
+ showcase: booleanShape()
1827
1836
  });
1828
1837
  }
1829
1838
  /**
@@ -4466,9 +4475,7 @@ describe('createApplication', () => {
4466
4475
  'x'.repeat(204),
4467
4476
  \`\${' '.repeat(MAX_APPLICATION_NAME_INPUT_LENGTH)}x\`,
4468
4477
  ]) {
4469
- expect(() => Reflect.apply(createApplication, undefined, [value])).toThrowError(
4470
- ApplicationError,
4471
- )
4478
+ expect(() => Reflect.apply(createApplication, undefined, [value])).toThrow(ApplicationError)
4472
4479
  }
4473
4480
  const error = new ApplicationError('CONFIG', 'invalid')
4474
4481
  expect(isApplicationError(error)).toBe(true)
@@ -4543,7 +4550,7 @@ describe('createBrowserApplication', () => {
4543
4550
  { name: 'x'.repeat(204) },
4544
4551
  { name: \`\${' '.repeat(MAX_BROWSER_APPLICATION_NAME_INPUT_LENGTH)}x\` },
4545
4552
  ]) {
4546
- expect(() => Reflect.apply(createBrowserApplication, undefined, [value])).toThrowError(
4553
+ expect(() => Reflect.apply(createBrowserApplication, undefined, [value])).toThrow(
4547
4554
  BrowserApplicationError,
4548
4555
  )
4549
4556
  }
@@ -4568,14 +4575,14 @@ describe('createBrowserApplication', () => {
4568
4575
  const revocable = Proxy.revocable({}, {})
4569
4576
  revocable.revoke()
4570
4577
 
4571
- expect(() => parseBrowserApplicationOptions(accessor)).toThrowError(BrowserApplicationError)
4578
+ expect(() => parseBrowserApplicationOptions(accessor)).toThrow(BrowserApplicationError)
4572
4579
  expect(reads).toBe(0)
4573
- expect(() => Reflect.apply(createBrowserApplication, undefined, [hostile])).toThrowError(
4580
+ expect(() => Reflect.apply(createBrowserApplication, undefined, [hostile])).toThrow(
4581
+ BrowserApplicationError,
4582
+ )
4583
+ expect(() => Reflect.apply(createBrowserApplication, undefined, [revocable.proxy])).toThrow(
4574
4584
  BrowserApplicationError,
4575
4585
  )
4576
- expect(() =>
4577
- Reflect.apply(createBrowserApplication, undefined, [revocable.proxy]),
4578
- ).toThrowError(BrowserApplicationError)
4579
4586
  expect(isBrowserApplicationError(new BrowserApplicationError('CONFIG', 'invalid'))).toBe(true)
4580
4587
  expect(isBrowserApplicationError(new Error('plain'))).toBe(false)
4581
4588
  expect(isBrowserApplicationError(revocable.proxy)).toBe(false)
@@ -4678,20 +4685,20 @@ describe('ApplicationServer', () => {
4678
4685
  })
4679
4686
 
4680
4687
  it('validates direct options before allocating a listener', () => {
4681
- expect(() => createApplicationServer({ host: ' ' })).toThrowError(
4688
+ expect(() => createApplicationServer({ host: ' ' })).toThrow(
4682
4689
  expect.objectContaining({ code: 'CONFIG' }),
4683
4690
  )
4684
- expect(() => createApplicationServer({ port: Number.NaN })).toThrowError(
4691
+ expect(() => createApplicationServer({ port: Number.NaN })).toThrow(
4685
4692
  expect.objectContaining({ code: 'CONFIG' }),
4686
4693
  )
4687
- expect(() => createApplicationServer({ port: -1 })).toThrowError(
4694
+ expect(() => createApplicationServer({ port: -1 })).toThrow(
4688
4695
  expect.objectContaining({ code: 'CONFIG' }),
4689
4696
  )
4690
- expect(() => createApplicationServer({ timeout: 0 })).toThrowError(
4697
+ expect(() => createApplicationServer({ timeout: 0 })).toThrow(
4691
4698
  expect.objectContaining({ code: 'CONFIG' }),
4692
4699
  )
4693
4700
  for (const value of [null, 42, [], { host: 42 }, { port: [42] }]) {
4694
- expect(() => Reflect.apply(createApplicationServer, undefined, [value])).toThrowError(
4701
+ expect(() => Reflect.apply(createApplicationServer, undefined, [value])).toThrow(
4695
4702
  expect.objectContaining({ code: 'CONFIG' }),
4696
4703
  )
4697
4704
  }
@@ -4711,14 +4718,10 @@ describe('ApplicationServer', () => {
4711
4718
  expect(server.port).toBe(0)
4712
4719
 
4713
4720
  process.env.APP_PORT = '1e3'
4714
- expect(() => createApplicationServer()).toThrowError(
4715
- expect.objectContaining({ code: 'CONFIG' }),
4716
- )
4721
+ expect(() => createApplicationServer()).toThrow(expect.objectContaining({ code: 'CONFIG' }))
4717
4722
  process.env.APP_PORT = '0'
4718
4723
  process.env.APP_START_TIMEOUT = '0'
4719
- expect(() => createApplicationServer()).toThrowError(
4720
- expect.objectContaining({ code: 'CONFIG' }),
4721
- )
4724
+ expect(() => createApplicationServer()).toThrow(expect.objectContaining({ code: 'CONFIG' }))
4722
4725
  } finally {
4723
4726
  if (previousHost === undefined) delete process.env.APP_HOST
4724
4727
  else process.env.APP_HOST = previousHost
@@ -5087,15 +5090,13 @@ describe('application environment parsers', () => {
5087
5090
  '999.999.999.999',
5088
5091
  \`\${'a'.repeat(64)}.example\`,
5089
5092
  ])('rejects hostile APP_HOST value %s before listener allocation', (value) => {
5090
- expect(() => parseApplicationHost(value)).toThrowError(
5091
- expect.objectContaining({ code: 'CONFIG' }),
5092
- )
5093
+ expect(() => parseApplicationHost(value)).toThrow(expect.objectContaining({ code: 'CONFIG' }))
5093
5094
  })
5094
5095
 
5095
5096
  it.each([null, 42, [], { port: [42] }, { timeout: 0 }])(
5096
5097
  'rejects hostile option container or leaf value %#',
5097
5098
  (value) => {
5098
- expect(() => parseApplicationServerOptions(value)).toThrowError(
5099
+ expect(() => parseApplicationServerOptions(value)).toThrow(
5099
5100
  expect.objectContaining({ code: 'CONFIG' }),
5100
5101
  )
5101
5102
  },
@@ -5118,7 +5119,7 @@ describe('application environment parsers', () => {
5118
5119
  ])(
5119
5120
  'rejects inherited, unknown, symbolic, accessor, instance, and hostile proxy options %#',
5120
5121
  (value) => {
5121
- expect(() => parseApplicationServerOptions(value)).toThrowError(
5122
+ expect(() => parseApplicationServerOptions(value)).toThrow(
5122
5123
  expect.objectContaining({ code: 'CONFIG' }),
5123
5124
  )
5124
5125
  },
@@ -5568,6 +5569,7 @@ function devDependenciesFor(spec) {
5568
5569
  ...dependencies,
5569
5570
  ...spec.src.includes("browser") ? SOURCE_BROWSER_DEV_DEPENDENCIES : {},
5570
5571
  ...spec.app.includes("browser") ? APP_BROWSER_DEV_DEPENDENCIES : {},
5572
+ ...spec.showcase ? { "vite-plugin-singlefile": "^2.3.3" } : {},
5571
5573
  ...spec.bin ? { "@vitest/browser-playwright": SOURCE_BROWSER_DEV_DEPENDENCIES["@vitest/browser-playwright"] } : {}
5572
5574
  };
5573
5575
  }
@@ -5629,7 +5631,7 @@ function packageManifest(spec) {
5629
5631
  }
5630
5632
  if (spec.bin) scripts["test:src:bin"] = "vitest run --config vite.config.ts --no-cache --reporter=dot --project src:bin";
5631
5633
  if (spec.integration) scripts["test:integration"] = "vitest run --config vite.config.ts --no-cache --reporter=dot --project integration";
5632
- if (spec.bin && spec.integration) scripts["test:equivalence"] = "node -e \"const c=require('node:child_process'),n=process.platform==='win32'?'npm.cmd':'npm',r=c.spawnSync(n,['run','test:integration'],{stdio:'inherit',env:{...process.env,SCAFFOLD_BOUNDARY_EQUIVALENCE:'1'}});process.exit(r.status??1)\"";
5634
+ if (spec.bin && spec.integration) scripts["test:equivalence"] = "node -e \"const c=require('node:child_process'),p=process.env.npm_execpath;if(p===undefined)process.exit(1);const r=c.spawnSync(process.execPath,[p,'run','test:integration'],{stdio:'inherit',env:{...process.env,SCAFFOLD_BOUNDARY_EQUIVALENCE:'1'}});process.exit(r.status??1)\"";
5633
5635
  if (spec.service) scripts["test:service"] = "vitest run --config vite.config.ts --no-cache --reporter=dot --project service";
5634
5636
  if (spec.app.length > 0) {
5635
5637
  scripts["test:app"] = "vitest run --config vite.config.ts --no-cache --reporter=dot " + spec.app.map((environment) => `--project ${APP_MATRIX[environment].project}`).join(" ");
@@ -5651,7 +5653,14 @@ function packageManifest(spec) {
5651
5653
  const runtime = spec.app.filter((environment) => environment !== "core");
5652
5654
  scripts["build:app"] = runtime.length > 0 ? runtime.map((environment) => `npm run build:app:${environment}`).join(" && ") : "npm run check:app:core";
5653
5655
  for (const environment of runtime) scripts[`build:app:${environment}`] = `vite build --config configs/app/vite.${environment}.config.ts`;
5654
- if (spec.app.includes("browser")) scripts.dev = "vite --config configs/app/vite.browser.config.ts";
5656
+ if (spec.app.includes("browser")) {
5657
+ scripts.dev = "vite --config configs/app/vite.browser.config.ts";
5658
+ if (spec.showcase) {
5659
+ scripts.showcase = `vite --config ${SHOWCASE_CONFIG_PATH}`;
5660
+ scripts["build:showcase"] = `vite build --config ${SHOWCASE_CONFIG_PATH}`;
5661
+ scripts.show = "npm run build:showcase && npm run copy dist/showcase/index.html demo/showcase.html";
5662
+ }
5663
+ }
5655
5664
  if (spec.app.includes("server")) {
5656
5665
  scripts.serve = "node dist/app/server/main.cjs";
5657
5666
  scripts["serve:build"] = "npm run build:app:server && npm run serve";
@@ -5723,6 +5732,7 @@ function rootTsconfig(src, app = []) {
5723
5732
  target: "ESNext",
5724
5733
  module: "ESNext",
5725
5734
  moduleResolution: "bundler",
5735
+ allowImportingTsExtensions: true,
5726
5736
  lib: [
5727
5737
  "ESNext",
5728
5738
  "DOM",
@@ -5768,20 +5778,22 @@ function rootTsconfig(src, app = []) {
5768
5778
  * @param src - The declared published `Environment[]`.
5769
5779
  * @param app - The declared application `Environment[]`, defaulting to none.
5770
5780
  * @param bin - Whether the workspace also builds its own executable.
5781
+ * @param showcase - Whether the workspace carries its optional app showcase.
5771
5782
  * @returns The machinery set the generated header renders.
5772
5783
  *
5773
5784
  * @example
5774
5785
  * ```ts
5775
- * viteMachinery(['core']) // { browser: false, vue: false, output: true }
5776
- * viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
5786
+ * viteMachinery(['core']) // { browser: false, vue: false, output: true, showcase: false }
5787
+ * viteMachinery([], ['core']) // { browser: false, vue: false, output: false, showcase: false }
5777
5788
  * ```
5778
5789
  */
5779
- function viteMachinery(src, app = [], bin = false) {
5790
+ function viteMachinery(src, app = [], bin = false, showcase = false) {
5780
5791
  const unbuilt = src.length === 0 && app.length > 0 && !bin && app.every((environment) => environment === "core");
5781
5792
  return {
5782
5793
  browser: src.includes("browser") || app.includes("browser"),
5783
5794
  vue: app.includes("browser"),
5784
- output: !unbuilt
5795
+ output: !unbuilt,
5796
+ showcase: showcase && app.includes("browser")
5785
5797
  };
5786
5798
  }
5787
5799
  /**
@@ -5895,7 +5907,7 @@ ${renderedRegistrations.map((registration) => ` ${registration},`).join("\n")}
5895
5907
  * ```
5896
5908
  */
5897
5909
  function viteHeader(machinery) {
5898
- const { browser: needsBrowser, vue: needsVue, output: needsOutput } = machinery;
5910
+ const { browser: needsBrowser, vue: needsVue, output: needsOutput, showcase: needsShowcase } = machinery;
5899
5911
  const playwrightTypeImports = needsBrowser ? `import type { PlaywrightProviderOptions } from '@vitest/browser-playwright'
5900
5912
  ` : "";
5901
5913
  const playwrightImports = needsBrowser ? `import { playwright } from '@vitest/browser-playwright'
@@ -5903,6 +5915,8 @@ import { chromium } from 'playwright'
5903
5915
  ` : "";
5904
5916
  const vueImports = needsVue ? `import vue from '@vitejs/plugin-vue'
5905
5917
  import { parse as parseVue } from 'vue/compiler-sfc'
5918
+ ` : "";
5919
+ const showcaseImports = needsShowcase ? `import { viteSingleFile } from 'vite-plugin-singlefile'
5906
5920
  ` : "";
5907
5921
  const viteTypeImports = needsVue ? `import type {
5908
5922
  CSSOptions,
@@ -6962,6 +6976,31 @@ ${EXPORT_KEYWORD} function finalizeHtml(): Plugin {
6962
6976
  }
6963
6977
  }
6964
6978
 
6979
+ ` : ""}${needsShowcase ? `${EXPORT_KEYWORD} ${CONST_KEYWORD} SHOWCASE_SECURITY_POLICY =
6980
+ "base-uri 'none'; object-src 'none'; script-src 'self' 'unsafe-inline'; script-src-attr 'none'; style-src 'self' 'unsafe-inline'"
6981
+
6982
+ ${EXPORT_KEYWORD} function showcaseHtml(): Plugin {
6983
+ return {
6984
+ name: 'orkestrel-showcase-html',
6985
+ enforce: 'post',
6986
+ transformIndexHtml: {
6987
+ order: 'post',
6988
+ handler(html, context) {
6989
+ if (!isBrowserHtmlEntry(context.filename)) return undefined
6990
+ if (!html.includes(HTML_SECURITY_META)) {
6991
+ throw new Error('[orkestrel-showcase] Browser HTML must retain its security policy')
6992
+ }
6993
+ const stamp = new Date().toISOString()
6994
+ return html.replace(
6995
+ HTML_SECURITY_META,
6996
+ HTML_SECURITY_META.replace(HTML_SECURITY_POLICY, SHOWCASE_SECURITY_POLICY) +
6997
+ \`\\n\\t\\t<meta name="build-id" content="\${stamp}" />\`,
6998
+ )
6999
+ },
7000
+ },
7001
+ }
7002
+ }
7003
+
6965
7004
  ` : ""}${EXPORT_KEYWORD} async function environmentAssetSources(
6966
7005
  code: string,
6967
7006
  id: string,
@@ -7273,7 +7312,7 @@ ${needsBrowser ? `import {
7273
7312
  resolve as resolvePath,
7274
7313
  sep,
7275
7314
  } from 'node:path'` : `import { dirname, isAbsolute, relative, resolve as resolvePath, sep } from 'node:path'`}
7276
- ${playwrightImports}${vueImports}${needsBrowser ? `\n/** Chromium executable layouts inside a \`chromium-<revision>\` browsers-directory entry, per platform. */
7315
+ ${playwrightImports}${vueImports}${showcaseImports}${needsBrowser ? `\n/** Chromium executable layouts inside a \`chromium-<revision>\` browsers-directory entry, per platform. */
7277
7316
  ${EXPORT_KEYWORD} ${CONST_KEYWORD} CHROMIUM_LAYOUTS = Object.freeze([
7278
7317
  'chrome-linux/chrome',
7279
7318
  'chrome-linux64/chrome',
@@ -7823,6 +7862,7 @@ ${EXPORT_KEYWORD} const srcServer = (config?: UserConfig): UserConfig =>
7823
7862
  outDir: 'dist/src/server',
7824
7863
  target: 'node22',
7825
7864
  rolldownOptions: {
7865
+ platform: 'node',
7826
7866
  external: (id: string) => id.startsWith('node:') || id.startsWith('@orkestrel/'),
7827
7867
  },
7828
7868
  },
@@ -7946,6 +7986,7 @@ ${EXPORT_KEYWORD} const srcServer = (config?: UserConfig): UserConfig =>
7946
7986
  outDir: 'dist/src/server',
7947
7987
  target: 'node22',
7948
7988
  rolldownOptions: {
7989
+ platform: 'node',
7949
7990
  external: (id: string) =>
7950
7991
  id === '@src/core' || id.startsWith('node:') || id.startsWith('@orkestrel/'),
7951
7992
  output: [
@@ -8020,7 +8061,7 @@ ${renderedTest}
8020
8061
  */
8021
8062
  function applicationViteConfig(src, app, facts = {}) {
8022
8063
  const hasSourceCore = src.includes("core");
8023
- const machinery = viteMachinery(src, app, facts.bin === true);
8064
+ const machinery = viteMachinery(src, app, facts.bin === true, facts.showcase === true);
8024
8065
  const header = viteHeader(machinery);
8025
8066
  const blocks = [];
8026
8067
  if (src.includes("core")) blocks.push(`
@@ -8130,6 +8171,7 @@ ${EXPORT_KEYWORD} const srcServer = (config?: UserConfig): UserConfig =>
8130
8171
  outDir: 'dist/src/server',
8131
8172
  target: 'node22',
8132
8173
  rolldownOptions: {
8174
+ platform: 'node',
8133
8175
  external: (id: string) =>
8134
8176
  ${coreExternal}id.startsWith('node:') || id.startsWith('@orkestrel/'),${coreOutput}
8135
8177
  },
@@ -8164,8 +8206,98 @@ ${EXPORT_KEYWORD} const appCore = (config?: UserConfig): UserConfig =>
8164
8206
  config ?? {},
8165
8207
  )
8166
8208
  `);
8167
- if (app.includes("browser")) blocks.push(`
8168
- ${EXPORT_KEYWORD} function appBrowser(...config: readonly never[]): UserConfig {
8209
+ if (app.includes("browser")) blocks.push(facts.showcase === true ? `
8210
+ ${FUNCTION_KEYWORD} applicationBrowser(showcase: boolean): UserConfig {
8211
+ const output = showcase ? 'dist/showcase' : 'dist/app/browser'
8212
+ return {
8213
+ resolve,
8214
+ css: ENVIRONMENT_CSS,
8215
+ html: environmentHtml(),
8216
+ plugins: [
8217
+ restoreHtml(),
8218
+ outputBoundary(output),
8219
+ environmentBoundary('app/browser'),
8220
+ vue(),
8221
+ prepareHtml(),
8222
+ finalizeHtml(),
8223
+ ...(showcase
8224
+ ? [
8225
+ viteSingleFile({
8226
+ removeViteModuleLoader: true,
8227
+ useRecommendedBuildConfig: true,
8228
+ }),
8229
+ showcaseHtml(),
8230
+ ]
8231
+ : []),
8232
+ ],
8233
+ root: resolveWorkspacePath('app/browser'),
8234
+ publicDir: false,
8235
+ server: {
8236
+ fs: {
8237
+ strict: true,
8238
+ allow: [...browserServerRoots()],
8239
+ },
8240
+ },
8241
+ build: {
8242
+ ...(showcase
8243
+ ? {
8244
+ cssMinify: 'lightningcss',
8245
+ minify: 'oxc',
8246
+ modulePreload: false,
8247
+ reportCompressedSize: false,
8248
+ sourcemap: false,
8249
+ target: 'esnext',
8250
+ }
8251
+ : { assetsInlineLimit: 0 }),
8252
+ emptyOutDir: true,
8253
+ outDir: resolveWorkspacePath(output),
8254
+ rolldownOptions: {
8255
+ input: resolveWorkspacePath('${APP_MATRIX.browser.entry}'),
8256
+ },
8257
+ },
8258
+ test: {
8259
+ name: { label: '${APP_MATRIX.browser.project}', color: 'blue' },
8260
+ root: resolveWorkspacePath('.'),
8261
+ dir: resolveWorkspacePath('.'),
8262
+ include: ['tests/app/browser/**/*.test.ts'],
8263
+ setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
8264
+ deps: {
8265
+ optimizer: {
8266
+ client: {
8267
+ enabled: true,
8268
+ include: ['vue', ...BROWSER_TEST_DEPENDENCIES],
8269
+ },
8270
+ },
8271
+ },
8272
+ browser: {
8273
+ enabled: true,
8274
+ provider: playwright(browserOptions),
8275
+ instances: [{ browser: 'chromium', headless: true }],
8276
+ },
8277
+ fileParallelism: false,
8278
+ },
8279
+ }
8280
+ }
8281
+
8282
+ ${EXPORT_KEYWORD} function appBrowser(...config: never[]): UserConfig {
8283
+ if (config.length > 0) {
8284
+ throw new Error(
8285
+ '[orkestrel-environment-boundary] Browser configuration overrides are not permitted by the generated boundary',
8286
+ )
8287
+ }
8288
+ return applicationBrowser(false)
8289
+ }
8290
+
8291
+ ${EXPORT_KEYWORD} function appShowcase(...config: never[]): UserConfig {
8292
+ if (config.length > 0) {
8293
+ throw new Error(
8294
+ '[orkestrel-environment-boundary] Showcase configuration overrides are not permitted by the generated boundary',
8295
+ )
8296
+ }
8297
+ return applicationBrowser(true)
8298
+ }
8299
+ ` : `
8300
+ ${EXPORT_KEYWORD} function appBrowser(...config: never[]): UserConfig {
8169
8301
  if (config.length > 0) {
8170
8302
  throw new Error(
8171
8303
  '[orkestrel-environment-boundary] Browser configuration overrides are not permitted by the generated boundary',
@@ -8308,7 +8440,7 @@ import {
8308
8440
  outputBoundary,
8309
8441
  srcCore,
8310
8442
  resolveWorkspacePath,
8311
- } from '../../vite.config'
8443
+ } from '../../vite.config.ts'
8312
8444
 
8313
8445
  export default defineConfig(
8314
8446
  srcCore({
@@ -8393,7 +8525,7 @@ function srcViteConfig(environment) {
8393
8525
  const anchor = environment === "browser" ? "srcBrowser" : "srcServer";
8394
8526
  return `import { defineConfig } from 'vite'
8395
8527
  import dts from 'vite-plugin-dts'
8396
- import { ${anchor}, resolveWorkspacePath } from '../../vite.config'
8528
+ import { ${anchor}, resolveWorkspacePath } from '../../vite.config.ts'
8397
8529
 
8398
8530
  // Types are bundled inline by vite-plugin-dts (see configs/src/vite.core.config.ts
8399
8531
  // for the same pattern).
@@ -8446,7 +8578,7 @@ function binTsconfig() {
8446
8578
  */
8447
8579
  function binViteConfig() {
8448
8580
  return `import { defineConfig } from 'vite'
8449
- import { srcBin } from '../../vite.config'
8581
+ import { srcBin } from '../../vite.config.ts'
8450
8582
 
8451
8583
  // The \`scaffold\` executable build — a single ESM lib file, no declarations (an
8452
8584
  // executable ships no types), with the \`#!/usr/bin/env node\` shebang re-emitted via
@@ -8513,7 +8645,7 @@ function appTsconfig(environment, hasCore) {
8513
8645
  function appViteConfig(environment) {
8514
8646
  const anchor = environment === "browser" ? "appBrowser" : "appServer";
8515
8647
  return `import { defineConfig } from 'vite'
8516
- import { ${anchor} } from '../../vite.config'
8648
+ import { ${anchor} } from '../../vite.config.ts'
8517
8649
 
8518
8650
  export default defineConfig(${anchor}())
8519
8651
  `;
@@ -8645,6 +8777,17 @@ function configArtifacts(spec) {
8645
8777
  });
8646
8778
  }
8647
8779
  }
8780
+ if (spec.showcase) artifacts.push({
8781
+ path: SHOWCASE_CONFIG_PATH,
8782
+ group: "configs",
8783
+ origin: "computed",
8784
+ environment: "browser",
8785
+ content: `import { defineConfig } from 'vite'
8786
+ import { appShowcase } from '../../vite.config.ts'
8787
+
8788
+ export default defineConfig(appShowcase())
8789
+ `
8790
+ });
8648
8791
  return artifacts;
8649
8792
  }
8650
8793
  /**
@@ -9779,6 +9922,6 @@ function createBlueprint(data) {
9779
9922
  return candidate;
9780
9923
  }
9781
9924
  //#endregion
9782
- export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, 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, GLOBAL_SETUP_PATH, 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, SERVICE_SCRIPT_PATH, 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, binTsconfig, binViteConfig, binViteProject, 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, fitsPrintWidth, formatJson, guideArtifacts, guideMemberTable, guideMethods, guideTests, guideUsage, guidesViteProject, hasBlueprintEnvironment, hasOnlyDataProperties, hasValidArtifactBytes, hasValidArtifactHex, hasValidAuditBytes, hasValidBlueprintBytes, hasValidOverrideBytes, hasValidPlanBytes, hasValidPlanHex, hasValidSnapshotBytes, hasValidSyncReportBytes, hostGroup, inferGroup, integrationViteProject, 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, renderViteTest, rootTsconfig, rootViteConfig, selectHostPaths, serializeTypeScriptString, serviceViteProject, singleSrcViteConfig, snapshotOf, snapshotPlan, sourceArtifacts, splitTableRow, srcTsconfig, srcVariant, srcViteConfig, stableStringify, syncReportShape, syncToReview, testArtifacts, validateBlueprint, validateDependencyArray, validatePlan, viteHeader, viteMachinery, viteProjectDefinitions, viteProjectRegistrations };
9925
+ export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, 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, GLOBAL_SETUP_PATH, 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, SERVICE_SCRIPT_PATH, SETUP_NODE_ACTION_SHA, SHOWCASE_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, SYNC_BASELINE_PATTERN, ScaffoldError, TEMPLATES, TYPESCRIPT_EXTENSIONS, VERSION_PATTERN, alignTable, appTsconfig, appViteConfig, applicationArtifacts, applicationViteConfig, applyOverrides, artifactShape, auditToReview, binTsconfig, binViteConfig, binViteProject, 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, fitsPrintWidth, formatJson, guideArtifacts, guideMemberTable, guideMethods, guideTests, guideUsage, guidesViteProject, hasBlueprintEnvironment, hasOnlyDataProperties, hasValidArtifactBytes, hasValidArtifactHex, hasValidAuditBytes, hasValidBlueprintBytes, hasValidOverrideBytes, hasValidPlanBytes, hasValidPlanHex, hasValidSnapshotBytes, hasValidSyncReportBytes, hostGroup, inferGroup, integrationViteProject, 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, renderViteTest, rootTsconfig, rootViteConfig, selectHostPaths, serializeTypeScriptString, serviceViteProject, singleSrcViteConfig, snapshotOf, snapshotPlan, sourceArtifacts, splitTableRow, srcTsconfig, srcVariant, srcViteConfig, stableStringify, syncReportShape, syncToReview, testArtifacts, validateBlueprint, validateDependencyArray, validatePlan, viteHeader, viteMachinery, viteProjectDefinitions, viteProjectRegistrations };
9783
9926
 
9784
9927
  //# sourceMappingURL=index.js.map