@orkestrel/scaffold 0.0.70 → 0.0.72

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 (67) hide show
  1. package/dist/bin/main.js +8 -8
  2. package/dist/bin/main.js.map +1 -1
  3. package/dist/host/CLAUDE.md +3 -3
  4. package/dist/host/agents/orchestration.md +66 -32
  5. package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +36 -6
  6. package/dist/host/agents/skills/enterprise-bootstrap/references/color-modes.md +3 -2
  7. package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +1 -1
  8. package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +18 -1
  9. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +1 -1
  10. package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +2 -4
  11. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +12 -9
  12. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +16 -8
  13. package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +2 -2
  14. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +1 -1
  15. package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +2 -1
  16. package/dist/host/agents/skills/orkestrel-prove-journey/SKILL.md +19 -8
  17. package/dist/host/agents/skills/orkestrel-prove-journey/references/layer.md +16 -15
  18. package/dist/host/agents/skills/orkestrel-prove-journey/references/statechart.md +5 -2
  19. package/dist/host/agents/skills/orkestrel-prove-journey/references/styles.md +5 -1
  20. package/dist/host/agents/templates/brief.md +4 -3
  21. package/dist/host/agents/transports/claude.md +13 -6
  22. package/dist/host/agents/transports/codex.md +2 -2
  23. package/dist/host/agents/transports/cursor.md +85 -0
  24. package/dist/host/claude/agents/application.md +5 -6
  25. package/dist/host/claude/agents/builder.md +3 -13
  26. package/dist/host/claude/agents/checker.md +9 -2
  27. package/dist/host/claude/agents/distiller.md +37 -0
  28. package/dist/host/claude/agents/grok.md +9 -56
  29. package/dist/host/claude/agents/{implementer.md → opus.md} +8 -9
  30. package/dist/host/claude/agents/orkestrel.md +14 -7
  31. package/dist/host/claude/agents/planner.md +12 -5
  32. package/dist/host/claude/agents/researcher.md +7 -0
  33. package/dist/host/claude/agents/reviewer.md +14 -7
  34. package/dist/host/claude/agents/scout.md +8 -1
  35. package/dist/host/claude/agents/sol.md +5 -5
  36. package/dist/host/claude/rules/documentation.md +1 -0
  37. package/dist/host/claude/rules/writing.md +27 -24
  38. package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +1 -1
  39. package/dist/host/codex/agents/analyst.toml +10 -4
  40. package/dist/host/codex/agents/application.toml +5 -6
  41. package/dist/host/codex/agents/builder.toml +5 -5
  42. package/dist/host/codex/agents/checker.toml +4 -0
  43. package/dist/host/codex/agents/distiller.toml +28 -0
  44. package/dist/host/codex/agents/grok.toml +27 -19
  45. package/dist/host/codex/agents/opus.toml +5 -4
  46. package/dist/host/codex/agents/orkestrel.toml +5 -0
  47. package/dist/host/codex/agents/planner.toml +10 -0
  48. package/dist/host/codex/agents/researcher.toml +4 -0
  49. package/dist/host/codex/agents/reviewer.toml +12 -2
  50. package/dist/host/codex/agents/scout.toml +5 -2
  51. package/dist/host/codex/agents/{implementer.toml → sol.toml} +5 -6
  52. package/dist/host/codex/agents/verifier.toml +3 -0
  53. package/dist/host/codex/config.toml +2 -2
  54. package/dist/host/configs/policy.ts +5 -2
  55. package/dist/host/guides/scaffold.md +19 -8
  56. package/dist/host/manifest.json +75 -57
  57. package/dist/src/core/index.cjs +456 -357
  58. package/dist/src/core/index.cjs.map +1 -1
  59. package/dist/src/core/index.d.cts +22 -21
  60. package/dist/src/core/index.d.ts +22 -21
  61. package/dist/src/core/index.js +457 -358
  62. package/dist/src/core/index.js.map +1 -1
  63. package/dist/src/server/index.cjs +4 -4
  64. package/dist/src/server/index.cjs.map +1 -1
  65. package/dist/src/server/index.js +5 -5
  66. package/dist/src/server/index.js.map +1 -1
  67. package/package.json +9 -9
@@ -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.70",
7
+ version: "0.0.72",
8
8
  description: "Scaffold workspaces with commands: new, audit, repair, catalog, and overwrite.",
9
9
  keywords: [
10
10
  "audit",
@@ -90,19 +90,19 @@ var package_default = {
90
90
  "prepublishOnly": "npm run format:check && npm run lint:check && npm run check && npm run build && npm test && npm run test:distribution -- --mode release"
91
91
  },
92
92
  dependencies: {
93
- "@orkestrel/console": "^0.0.13",
93
+ "@orkestrel/console": "^0.0.14",
94
94
  "@orkestrel/contract": "^0.0.17",
95
95
  "@orkestrel/emitter": "^0.0.10",
96
- "@orkestrel/markdown": "^0.0.14",
97
- "@orkestrel/process": "^0.0.12",
98
- "@orkestrel/template": "^0.0.7"
96
+ "@orkestrel/markdown": "^0.0.15",
97
+ "@orkestrel/process": "^0.0.13",
98
+ "@orkestrel/template": "^0.0.8"
99
99
  },
100
100
  devDependencies: {
101
101
  "@microsoft/api-extractor": "^7.59.1",
102
- "@orkestrel/guide": "^0.0.19",
103
- "@orkestrel/html": "^0.0.9",
104
- "@orkestrel/probe": "^0.0.14",
105
- "@orkestrel/test": "^0.0.14",
102
+ "@orkestrel/guide": "^0.0.20",
103
+ "@orkestrel/html": "^0.0.10",
104
+ "@orkestrel/probe": "^0.0.16",
105
+ "@orkestrel/test": "^0.0.16",
106
106
  "@types/node": "^26.5.1",
107
107
  "@vitest/browser-playwright": "^4.1.11",
108
108
  "oxfmt": "^0.68.0",
@@ -671,7 +671,8 @@ var CONFIG_TEMPLATES = Object.freeze({
671
671
  "exclude": ["node_modules", "dist", "tmp"]
672
672
  }
673
673
  `,
674
- vite: `import type { {{viteTypes}} } from 'vite'
674
+ vite: `import type { PluginOption, UserConfig } from 'vite'
675
+ import { mergeConfig } from 'vite'
675
676
  {{imports}}import { defineConfig } from 'vitest/config'
676
677
  import manifest from './package.json' with { type: 'json' }
677
678
  import tsconfig from './tsconfig.json' with { type: 'json' }
@@ -701,6 +702,68 @@ const resolve = {
701
702
  }, {}),
702
703
  }
703
704
 
705
+ // Merges a caller's override onto the configuration a factory declares, so a
706
+ // package's own configuration reaches the factory through its parameter instead of
707
+ // wrapping the call from outside.
708
+ //
709
+ // Vitest calls every registered project factory with its own invocation record —
710
+ // \`command\`, \`mode\`, \`isSsrBuild\`, \`isPreview\` — so a factory that also takes an
711
+ // override receives that record in the same position. A \`UserConfig\` declares \`mode\`
712
+ // but not \`command\`, and the invocation record always carries both, so a value
713
+ // carrying the pair is that record rather than an override. The merge returns the
714
+ // base unchanged and reports nothing. The \`tests/config.test.ts\` file drives every
715
+ // registered factory through it.
716
+ //
717
+ // \`mergeConfig\` concatenates arrays, so an override carrying \`plugins\` would otherwise
718
+ // add a second copy of a plugin the base already declares. Only named top-level
719
+ // objects replace a base plugin of the same name, in the base's position, and one
720
+ // override entry is taken at most once. An entry no base position took appends in its
721
+ // written order; the caller's own entries never merge with each other. Nested arrays,
722
+ // promises, falsy entries, and anonymous objects pass through unchanged. An override
723
+ // cannot remove a base plugin. Every key other than \`plugins\` merges as \`mergeConfig\`
724
+ // merges it, so an override's arrays elsewhere concatenate with the base's rather than
725
+ // replacing them.
726
+ export function mergeOverride(base: UserConfig, override?: UserConfig): UserConfig {
727
+ if (override === undefined || ('command' in override && 'mode' in override)) return base
728
+ const merged: UserConfig = mergeConfig(base, override)
729
+ if (merged.plugins === undefined) return merged
730
+ const candidates = override.plugins ?? []
731
+ const taken = new Set<number>()
732
+ const selected: PluginOption[] = []
733
+ for (const plugin of base.plugins ?? []) {
734
+ if (!isNamedPlugin(plugin)) {
735
+ selected.push(plugin)
736
+ continue
737
+ }
738
+ const index = candidates.findIndex(
739
+ (candidate, position) =>
740
+ !taken.has(position) && isNamedPlugin(candidate) && candidate.name === plugin.name,
741
+ )
742
+ const replacement = candidates[index]
743
+ if (replacement === undefined) {
744
+ selected.push(plugin)
745
+ } else {
746
+ selected.push(replacement)
747
+ taken.add(index)
748
+ }
749
+ }
750
+ for (const [index, plugin] of candidates.entries()) {
751
+ if (!taken.has(index)) selected.push(plugin)
752
+ }
753
+ return { ...merged, plugins: selected }
754
+ }
755
+
756
+ function isNamedPlugin(plugin: PluginOption): plugin is { name: string } {
757
+ return (
758
+ typeof plugin === 'object' &&
759
+ plugin !== null &&
760
+ !Array.isArray(plugin) &&
761
+ !('then' in plugin && typeof plugin.then === 'function') &&
762
+ 'name' in plugin &&
763
+ typeof plugin.name === 'string'
764
+ )
765
+ }
766
+
704
767
  {{factories}}export default defineConfig({
705
768
  resolve,
706
769
  test: {
@@ -711,149 +774,166 @@ const resolve = {
711
774
  }),
712
775
  factories: Object.freeze({
713
776
  src: Object.freeze({
714
- core: `export const srcCore = (): UserConfig => ({
715
- resolve,
716
- publicDir: false,
717
- build: {
718
- emptyOutDir: true,
719
- sourcemap: true,
720
- minify: false,
721
- rolldownOptions: { onLog: enforceBuildLog },
722
- },
723
- test: {
724
- name: { label: 'src:core', color: 'magenta' },
725
- include: ['tests/src/core/**/*.test.ts'],
726
- setupFiles: ['./tests/setup.ts'],
727
- environment: 'node',
728
- browser: { enabled: false },
729
- },
730
- })
731
- `,
732
- browser: `export const srcBrowser = (): UserConfig => ({
733
- resolve,
734
- publicDir: false,
735
- plugins: [outputBoundary('dist/src/browser'), environmentBoundary('src/browser')],
736
- build: {
737
- emptyOutDir: true,
738
- sourcemap: true,
739
- minify: false,
740
- lib: {
741
- entry: resolveWorkspacePath('src/browser/index.ts'),
742
- formats: ['es'],
743
- fileName: () => 'index.js',
777
+ core: `export function srcCore(override?: UserConfig): UserConfig {
778
+ const project: UserConfig = {
779
+ resolve,
780
+ publicDir: false,
781
+ build: {
782
+ emptyOutDir: true,
783
+ sourcemap: true,
784
+ minify: false,
785
+ rolldownOptions: { onLog: enforceBuildLog },
786
+ },
787
+ test: {
788
+ name: { label: 'src:core', color: 'magenta' },
789
+ include: ['tests/src/core/**/*.test.ts'],
790
+ setupFiles: ['./tests/setup.ts'],
791
+ environment: 'node',
792
+ browser: { enabled: false },
744
793
  },
745
- outDir: 'dist/src/browser',
746
- rolldownOptions: {
747
- onLog: enforceBuildLog,
748
- {{external}}
794
+ }
795
+ return mergeOverride(project, override)
796
+ }
797
+ `,
798
+ browser: `export function srcBrowser(override?: UserConfig): UserConfig {
799
+ const project: UserConfig = {
800
+ resolve,
801
+ publicDir: false,
802
+ plugins: [outputBoundary('dist/src/browser'), environmentBoundary('src/browser')],
803
+ build: {
804
+ emptyOutDir: true,
805
+ sourcemap: true,
806
+ minify: false,
807
+ lib: {
808
+ entry: resolveWorkspacePath('src/browser/index.ts'),
809
+ formats: ['es'],
810
+ fileName: () => 'index.js',
811
+ },
812
+ outDir: 'dist/src/browser',
813
+ rolldownOptions: {
814
+ onLog: enforceBuildLog,
815
+ {{external}}
749
816
  {{output}}
817
+ },
750
818
  },
751
- },
752
- test: {
753
- name: { label: 'src:browser', color: 'yellow' },
754
- include: ['tests/src/browser/**/*.test.ts'],
755
- {{exclude}} setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
819
+ test: {
820
+ name: { label: 'src:browser', color: 'yellow' },
821
+ include: ['tests/src/browser/**/*.test.ts'],
822
+ {{exclude}} setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
756
823
  {{global}}
757
- browser: {
758
- enabled: true,
759
- provider: playwright(browserOptions),
760
- instances: [{ browser: 'chromium', headless: true }],
824
+ browser: {
825
+ enabled: true,
826
+ provider: playwright(browserOptions),
827
+ instances: [{ browser: 'chromium', headless: true }],
828
+ },
829
+ fileParallelism: false,
761
830
  },
762
- fileParallelism: false,
763
- },
764
- })
831
+ }
832
+ return mergeOverride(project, override)
833
+ }
765
834
  `,
766
- server: `export const srcServer = (): UserConfig => ({
767
- resolve,
768
- publicDir: false,
769
- plugins: [outputBoundary('dist/src/server'), environmentBoundary('src/server')],
770
- build: {
771
- emptyOutDir: true,
772
- sourcemap: true,
773
- minify: false,
774
- lib: {
775
- entry: resolveWorkspacePath('src/server/index.ts'),
776
- formats: ['es', 'cjs'],
777
- fileName: (format: string) => (format === 'es' ? 'index.js' : 'index.cjs'),
778
- },
779
- outDir: 'dist/src/server',
780
- target: 'node22',
781
- rolldownOptions: {
782
- onLog: enforceBuildLog,
783
- platform: 'node',
784
- {{external}}
835
+ server: `export function srcServer(override?: UserConfig): UserConfig {
836
+ const project: UserConfig = {
837
+ resolve,
838
+ publicDir: false,
839
+ plugins: [outputBoundary('dist/src/server'), environmentBoundary('src/server')],
840
+ build: {
841
+ emptyOutDir: true,
842
+ sourcemap: true,
843
+ minify: false,
844
+ lib: {
845
+ entry: resolveWorkspacePath('src/server/index.ts'),
846
+ formats: ['es', 'cjs'],
847
+ fileName: (format: string) => (format === 'es' ? 'index.js' : 'index.cjs'),
848
+ },
849
+ outDir: 'dist/src/server',
850
+ target: 'node22',
851
+ rolldownOptions: {
852
+ onLog: enforceBuildLog,
853
+ platform: 'node',
854
+ {{external}}
785
855
  {{output}}
856
+ },
786
857
  },
787
- },
788
- test: {
789
- name: { label: 'src:server', color: 'red' },
790
- include: ['tests/src/server/**/*.test.ts'],
791
- {{exclude}} setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
792
- environment: 'node',
793
- browser: { enabled: false },
794
- },
795
- })
858
+ test: {
859
+ name: { label: 'src:server', color: 'red' },
860
+ include: ['tests/src/server/**/*.test.ts'],
861
+ {{exclude}} setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
862
+ environment: 'node',
863
+ browser: { enabled: false },
864
+ },
865
+ }
866
+ return mergeOverride(project, override)
867
+ }
796
868
  `,
797
- bin: `export const srcBin = (): UserConfig => ({
798
- resolve,
799
- publicDir: false,
800
- plugins: [outputBoundary('dist/bin')],
801
- build: {
802
- emptyOutDir: true,
803
- sourcemap: true,
804
- minify: false,
805
- lib: {
806
- entry: resolveWorkspacePath('${BIN_ENTRY_PATH}'),
807
- formats: ['es'],
808
- fileName: () => 'main.js',
869
+ bin: `export function srcBin(override?: UserConfig): UserConfig {
870
+ const project: UserConfig = {
871
+ resolve,
872
+ publicDir: false,
873
+ plugins: [outputBoundary('dist/bin')],
874
+ build: {
875
+ emptyOutDir: true,
876
+ sourcemap: true,
877
+ minify: false,
878
+ lib: {
879
+ entry: resolveWorkspacePath('${BIN_ENTRY_PATH}'),
880
+ formats: ['es'],
881
+ fileName: () => 'main.js',
882
+ },
883
+ outDir: 'dist/bin',
884
+ target: 'node22',
885
+ rolldownOptions: {
886
+ onLog: enforceBuildLog,
887
+ external: (id: string) =>
888
+ id.startsWith('node:') ||
889
+ id.startsWith('@orkestrel/') ||
890
+ id.startsWith('@src/') ||
891
+ peers.some((peer) => id === peer || id.startsWith(peer + '/')),
892
+ },
809
893
  },
810
- outDir: 'dist/bin',
811
- target: 'node22',
812
- rolldownOptions: {
813
- onLog: enforceBuildLog,
814
- external: (id: string) =>
815
- id.startsWith('node:') ||
816
- id.startsWith('@orkestrel/') ||
817
- id.startsWith('@src/') ||
818
- peers.some((peer) => id === peer || id.startsWith(peer + '/')),
894
+ test: {
895
+ name: { label: 'src:bin', color: 'yellow' },
896
+ include: ['tests/src/bin/**/*.test.ts'],
897
+ setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
898
+ environment: 'node',
899
+ browser: { enabled: false },
900
+ // A bin test drives the real executable over a real temporary repository, so it
901
+ // spends seconds in process startup and filesystem work rather than milliseconds.
902
+ // Vitest's five-second default clears one alone and times out under a full suite.
903
+ testTimeout: 15_000,
819
904
  },
820
- },
821
- test: {
822
- name: { label: 'src:bin', color: 'yellow' },
823
- include: ['tests/src/bin/**/*.test.ts'],
824
- setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
825
- environment: 'node',
826
- browser: { enabled: false },
827
- // A bin test drives the real executable over a real temporary repository, so it
828
- // spends seconds in process startup and filesystem work rather than milliseconds.
829
- // Vitest's five-second default clears one alone and times out under a full suite.
830
- testTimeout: 15_000,
831
- },
832
- })
905
+ }
906
+ return mergeOverride(project, override)
907
+ }
833
908
  `
834
909
  }),
835
910
  app: Object.freeze({
836
- core: `export const appCore = (): UserConfig => ({
837
- resolve,
838
- publicDir: false,
839
- plugins: [environmentBoundary('app/core')],
840
- test: {
841
- name: { label: 'app:core', color: 'cyan' },
842
- include: ['tests/app/core/**/*.test.ts'],
843
- setupFiles: ['./tests/setup.ts'],
844
- environment: 'node',
845
- browser: { enabled: false },
846
- },
847
- })
911
+ core: `export function appCore(override?: UserConfig): UserConfig {
912
+ const project: UserConfig = {
913
+ resolve,
914
+ publicDir: false,
915
+ plugins: [environmentBoundary('app/core')],
916
+ test: {
917
+ name: { label: 'app:core', color: 'cyan' },
918
+ include: ['tests/app/core/**/*.test.ts'],
919
+ setupFiles: ['./tests/setup.ts'],
920
+ environment: 'node',
921
+ browser: { enabled: false },
922
+ },
923
+ }
924
+ return mergeOverride(project, override)
925
+ }
848
926
  `,
849
- browser: `function applicationBrowser(showcase: boolean): UserConfig {
850
- const output = showcase ? 'dist/showcase' : 'dist/app/browser'
851
- {{showcasePlugins}} return {
927
+ browser: `export function appBrowser(override?: UserConfig): UserConfig {
928
+ const output = 'dist/app/browser'
929
+ const project: UserConfig = {
852
930
  resolve,
853
- {{plugins}} root: resolveWorkspacePath('app/browser'),
931
+ plugins: [outputBoundary(output), environmentBoundary('app/browser'), vue()],
932
+ root: resolveWorkspacePath('app/browser'),
854
933
  publicDir: false,
855
934
  build: {
856
- {{showcaseBuild}} emptyOutDir: true,
935
+ assetsInlineLimit: 0,
936
+ emptyOutDir: true,
857
937
  outDir: resolveWorkspacePath(output),
858
938
  rolldownOptions: {
859
939
  onLog: enforceBuildLog,
@@ -874,160 +954,229 @@ const resolve = {
874
954
  fileParallelism: false,
875
955
  },
876
956
  }
877
- }
878
-
879
- export function appBrowser(): UserConfig {
880
- return applicationBrowser(false)
957
+ return mergeOverride(project, override)
881
958
  }
882
959
  {{showcaseFactory}}`,
883
- server: `export const appServer = (): UserConfig => ({
884
- resolve,
885
- publicDir: false,
886
- plugins: [outputBoundary('dist/app/server'), environmentBoundary('app/server')],
887
- build: {
888
- emptyOutDir: true,
889
- lib: {
890
- entry: resolveWorkspacePath('app/server/main.ts'),
891
- formats: ['cjs'],
892
- fileName: () => 'main.cjs',
960
+ showcase: `
961
+ export function appShowcase(override?: UserConfig): UserConfig {
962
+ const output = 'dist/showcase'
963
+ const showcase: UserConfig = {
964
+ plugins: [
965
+ outputBoundary(output),
966
+ viteSingleFile({
967
+ removeViteModuleLoader: true,
968
+ useRecommendedBuildConfig: true,
969
+ }),
970
+ {
971
+ name: 'orkestrel-showcase-html',
972
+ transformIndexHtml: {
973
+ order: 'post',
974
+ handler(html) {
975
+ const stamp = new Date().toISOString()
976
+ return html.replace(
977
+ '</head>',
978
+ '\t\t<meta name="build-id" content="' + stamp + '" />\\n\t</head>',
979
+ )
980
+ },
981
+ },
982
+ },
983
+ ],
984
+ build: {
985
+ // The \`appBrowser\` factory sets \`assetsInlineLimit\` to 0, so every asset becomes
986
+ // its own file, and 4096 is Vite's own default put back. The \`viteSingleFile\`
987
+ // plugin overwrites the value while the \`useRecommendedBuildConfig\` option stays
988
+ // true, so this line takes effect only in a workspace that turns that option off.
989
+ assetsInlineLimit: 4096,
990
+ cssMinify: 'lightningcss',
991
+ minify: 'oxc',
992
+ modulePreload: false,
993
+ outDir: resolveWorkspacePath(output),
994
+ reportCompressedSize: false,
995
+ sourcemap: false,
996
+ target: 'esnext',
893
997
  },
894
- outDir: resolveWorkspacePath('dist/app/server'),
895
- target: 'node22',
896
- rolldownOptions: {
897
- onLog: enforceBuildLog,
898
- external: (id: string) => id.startsWith('node:'),
998
+ }
999
+ return appBrowser(mergeOverride(showcase, override))
1000
+ }
1001
+ `,
1002
+ server: `export function appServer(override?: UserConfig): UserConfig {
1003
+ const project: UserConfig = {
1004
+ resolve,
1005
+ publicDir: false,
1006
+ plugins: [outputBoundary('dist/app/server'), environmentBoundary('app/server')],
1007
+ build: {
1008
+ emptyOutDir: true,
1009
+ lib: {
1010
+ entry: resolveWorkspacePath('app/server/main.ts'),
1011
+ formats: ['cjs'],
1012
+ fileName: () => 'main.cjs',
1013
+ },
1014
+ outDir: resolveWorkspacePath('dist/app/server'),
1015
+ target: 'node22',
1016
+ rolldownOptions: {
1017
+ onLog: enforceBuildLog,
1018
+ external: (id: string) => id.startsWith('node:'),
1019
+ },
899
1020
  },
900
- },
901
- test: {
902
- name: { label: 'app:server', color: 'green' },
903
- include: ['tests/app/server/**/*.test.ts'],
904
- setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
905
- environment: 'node',
906
- browser: { enabled: false },
907
- },
908
- })
1021
+ test: {
1022
+ name: { label: 'app:server', color: 'green' },
1023
+ include: ['tests/app/server/**/*.test.ts'],
1024
+ setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
1025
+ environment: 'node',
1026
+ browser: { enabled: false },
1027
+ },
1028
+ }
1029
+ return mergeOverride(project, override)
1030
+ }
909
1031
  `
910
1032
  }),
911
- policy: `export const policy = (): UserConfig => ({
912
- resolve,
913
- test: {
914
- name: { label: 'policy', color: 'white' },
915
- include: ['tests/policy.test.ts'],
916
- setupFiles: ['./tests/setup.ts'],
917
- environment: 'node',
918
- browser: { enabled: false },
919
- },
920
- })
1033
+ policy: `export function policy(override?: UserConfig): UserConfig {
1034
+ const project: UserConfig = {
1035
+ resolve,
1036
+ test: {
1037
+ name: { label: 'policy', color: 'white' },
1038
+ include: ['tests/policy.test.ts'],
1039
+ setupFiles: ['./tests/setup.ts'],
1040
+ environment: 'node',
1041
+ browser: { enabled: false },
1042
+ },
1043
+ }
1044
+ return mergeOverride(project, override)
1045
+ }
921
1046
  `,
922
- config: `export const config = (): UserConfig => ({
923
- resolve,
924
- test: {
925
- name: { label: 'config', color: 'yellow' },
926
- include: ['tests/config.test.ts'],
927
- setupFiles: ['./tests/setup.ts'],
928
- environment: 'node',
929
- browser: { enabled: false },
930
- // A config test validates every target wrapper, spawns the real linter twice under
931
- // 15-second child caps, and rolls one face up through the compiler and the extractor it
932
- // spawns, so this budget clears the capped pair with room for a contended host.
933
- testTimeout: 60_000,
934
- },
935
- })
1047
+ config: `export function config(override?: UserConfig): UserConfig {
1048
+ const project: UserConfig = {
1049
+ resolve,
1050
+ test: {
1051
+ name: { label: 'config', color: 'yellow' },
1052
+ include: ['tests/config.test.ts'],
1053
+ setupFiles: ['./tests/setup.ts'],
1054
+ environment: 'node',
1055
+ browser: { enabled: false },
1056
+ // A config test validates every target wrapper, spawns the real linter twice under
1057
+ // 15-second child caps, and rolls one face up through the compiler and the extractor it
1058
+ // spawns, so this budget clears the capped pair with room for a contended host.
1059
+ testTimeout: 60_000,
1060
+ },
1061
+ }
1062
+ return mergeOverride(project, override)
1063
+ }
936
1064
  `,
937
- setup: `export const setup = (): UserConfig => ({
938
- resolve,
939
- test: {
940
- name: { label: 'setup', color: 'white' },
941
- include: ['tests/setup*.test.ts'],
942
- setupFiles: ['./tests/setup.ts'],
943
- environment: 'node',
944
- browser: { enabled: false },
945
- },
946
- })
1065
+ setup: `export function setup(override?: UserConfig): UserConfig {
1066
+ const project: UserConfig = {
1067
+ resolve,
1068
+ test: {
1069
+ name: { label: 'setup', color: 'white' },
1070
+ include: ['tests/setup*.test.ts'],
1071
+ setupFiles: ['./tests/setup.ts'],
1072
+ environment: 'node',
1073
+ browser: { enabled: false },
1074
+ },
1075
+ }
1076
+ return mergeOverride(project, override)
1077
+ }
947
1078
  `,
948
- guides: `export const guides = (): UserConfig => ({
949
- resolve,
950
- test: {
951
- name: { label: 'guides', color: 'green' },
952
- include: ['${GUIDES_TEST_PATH}'],
953
- exclude: ['tests/src/**/*.test.ts', 'tests/app/**/*.test.ts', 'tests/setup.test.ts'],
954
- setupFiles: ['./tests/setup.ts'],
955
- environment: 'node',
956
- browser: { enabled: false },
957
- },
958
- })
1079
+ guides: `export function guides(override?: UserConfig): UserConfig {
1080
+ const project: UserConfig = {
1081
+ resolve,
1082
+ test: {
1083
+ name: { label: 'guides', color: 'green' },
1084
+ include: ['${GUIDES_TEST_PATH}'],
1085
+ exclude: ['tests/src/**/*.test.ts', 'tests/app/**/*.test.ts', 'tests/setup.test.ts'],
1086
+ setupFiles: ['./tests/setup.ts'],
1087
+ environment: 'node',
1088
+ browser: { enabled: false },
1089
+ },
1090
+ }
1091
+ return mergeOverride(project, override)
1092
+ }
959
1093
  `,
960
1094
  conformance: `// Where this package drifts from the official tooling it stays compatible with.
961
1095
  // The subject is this package, so the proof is hermetic and stays in \`npm test\`.
962
- export const conformance = (): UserConfig => ({
963
- resolve,
964
- test: {
965
- name: { label: 'conformance', color: 'magenta' },
966
- include: ['${CONFORMANCE_TEST_PATH}'],
967
- setupFiles: ['./tests/setup.ts'],
968
- environment: 'node',
969
- browser: { enabled: false },
970
- },
971
- })
1096
+ export function conformance(override?: UserConfig): UserConfig {
1097
+ const project: UserConfig = {
1098
+ resolve,
1099
+ test: {
1100
+ name: { label: 'conformance', color: 'magenta' },
1101
+ include: ['${CONFORMANCE_TEST_PATH}'],
1102
+ setupFiles: ['./tests/setup.ts'],
1103
+ environment: 'node',
1104
+ browser: { enabled: false },
1105
+ },
1106
+ }
1107
+ return mergeOverride(project, override)
1108
+ }
972
1109
  `,
973
1110
  service: `// The caller prepares the live external services before this project.
974
1111
  // \`tests/setupService.ts\` verifies readiness, and the project stays out of \`npm test\`
975
1112
  // because a real service answers it.
976
- export const service = (): UserConfig => ({
977
- resolve,
978
- test: {
979
- name: { label: 'service', color: 'red' },
980
- include: ['${SERVICE_TEST_INCLUDE}'],
981
- setupFiles: ['./tests/setup.ts', './tests/setupService.ts'],
982
- environment: 'node',
983
- browser: { enabled: false },
984
- testTimeout: 120_000,
985
- hookTimeout: 120_000,
986
- fileParallelism: false,
987
- },
988
- })
1113
+ export function service(override?: UserConfig): UserConfig {
1114
+ const project: UserConfig = {
1115
+ resolve,
1116
+ test: {
1117
+ name: { label: 'service', color: 'red' },
1118
+ include: ['${SERVICE_TEST_INCLUDE}'],
1119
+ setupFiles: ['./tests/setup.ts', './tests/setupService.ts'],
1120
+ environment: 'node',
1121
+ browser: { enabled: false },
1122
+ testTimeout: 120_000,
1123
+ hookTimeout: 120_000,
1124
+ fileParallelism: false,
1125
+ },
1126
+ }
1127
+ return mergeOverride(project, override)
1128
+ }
989
1129
  `,
990
- distribution: `export const distribution = (): UserConfig => ({
991
- resolve,
992
- test: {
993
- name: { label: 'distribution', color: 'cyan' },
994
- include: ['${DISTRIBUTION_TEST_PATH}'],
995
- setupFiles: ['./tests/setup.ts'],
996
- environment: 'node',
997
- testTimeout: 120_000,
998
- hookTimeout: 120_000,
999
- fileParallelism: false,
1000
- },
1001
- })
1130
+ distribution: `export function distribution(override?: UserConfig): UserConfig {
1131
+ const project: UserConfig = {
1132
+ resolve,
1133
+ test: {
1134
+ name: { label: 'distribution', color: 'cyan' },
1135
+ include: ['${DISTRIBUTION_TEST_PATH}'],
1136
+ setupFiles: ['./tests/setup.ts'],
1137
+ environment: 'node',
1138
+ testTimeout: 120_000,
1139
+ hookTimeout: 120_000,
1140
+ fileParallelism: false,
1141
+ },
1142
+ }
1143
+ return mergeOverride(project, override)
1144
+ }
1002
1145
  `,
1003
1146
  probe: `// A workbench, not a proof. No gate selects this project. Run in test mode by the
1004
1147
  // \`test:probe\` script, it collects \`tmp/probe/**/*.test.ts\`. Run in benchmark mode by the
1005
1148
  // \`test:bench\` script, the same workbench also collects \`tests/**/*.test.ts\` for a \`bench\` block,
1006
1149
  // so a suite may carry a bench beside its ordinary tests without a second project. The mode
1007
1150
  // guard around each \`bench\` call keeps it out of test mode, so it never executes there.
1008
- export const probe = (): UserConfig => ({
1009
- resolve,
1010
- test: {
1011
- name: { label: 'probe', color: 'black' },
1012
- include: ['tmp/probe/**/*.test.ts'],
1013
- setupFiles: ['./tests/setup.ts'],
1014
- environment: 'node',
1015
- browser: { enabled: false },
1016
- fileParallelism: false,
1017
- pool: 'threads',
1018
- benchmark: { include: ['tmp/probe/**/*.test.ts', 'tests/**/*.test.ts'] },
1019
- },
1020
- })
1151
+ export function probe(override?: UserConfig): UserConfig {
1152
+ const project: UserConfig = {
1153
+ resolve,
1154
+ test: {
1155
+ name: { label: 'probe', color: 'black' },
1156
+ include: ['tmp/probe/**/*.test.ts'],
1157
+ setupFiles: ['./tests/setup.ts'],
1158
+ environment: 'node',
1159
+ browser: { enabled: false },
1160
+ fileParallelism: false,
1161
+ pool: 'threads',
1162
+ benchmark: { include: ['tmp/probe/**/*.test.ts', 'tests/**/*.test.ts'] },
1163
+ },
1164
+ }
1165
+ return mergeOverride(project, override)
1166
+ }
1021
1167
  `,
1022
- integration: `export const integration = (): UserConfig => ({
1023
- resolve,
1024
- test: {
1025
- name: { label: 'integration', color: 'blue' },
1026
- include: ['${INTEGRATION_TEST_PATH}'],
1027
- setupFiles: ['./tests/setup.ts'],
1028
- {{global}} environment: 'node',
1029
- },
1030
- })
1168
+ integration: `export function integration(override?: UserConfig): UserConfig {
1169
+ const project: UserConfig = {
1170
+ resolve,
1171
+ test: {
1172
+ name: { label: 'integration', color: 'blue' },
1173
+ include: ['${INTEGRATION_TEST_PATH}'],
1174
+ setupFiles: ['./tests/setup.ts'],
1175
+ {{global}} environment: 'node',
1176
+ },
1177
+ }
1178
+ return mergeOverride(project, override)
1179
+ }
1031
1180
  `
1032
1181
  }),
1033
1182
  tsconfigs: Object.freeze({
@@ -1155,12 +1304,12 @@ export const probe = (): UserConfig => ({
1155
1304
  }),
1156
1305
  vites: Object.freeze({
1157
1306
  src: Object.freeze({
1158
- core: `import { defineConfig, mergeConfig } from 'vite'
1307
+ core: `import { defineConfig } from 'vite'
1159
1308
  import { declarationRollup, environmentBoundary, outputBoundary } from '../helpers.js'
1160
1309
  import { peers, srcCore, resolveWorkspacePath } from '../../vite.config.ts'
1161
1310
 
1162
1311
  export default defineConfig(
1163
- mergeConfig(srcCore(), {
1312
+ srcCore({
1164
1313
  publicDir: false,
1165
1314
  plugins: [
1166
1315
  outputBoundary('dist/src/core'),
@@ -1187,14 +1336,14 @@ export default defineConfig(
1187
1336
  }),
1188
1337
  )
1189
1338
  `,
1190
- browser: `import { defineConfig, mergeConfig } from 'vite'
1339
+ browser: `import { defineConfig } from 'vite'
1191
1340
  import { declarationRollup, rewriteCoreSpecifier } from '../helpers.js'
1192
1341
  import { srcBrowser, resolveWorkspacePath } from '../../vite.config.ts'
1193
1342
 
1194
1343
  // The roll-up reaches src/core through a specifier the tarball does not carry, so the rewrite
1195
1344
  // externalizes core through the package's own published root export, on the final roll-up alone.
1196
1345
  export default defineConfig(
1197
- mergeConfig(srcBrowser(), {
1346
+ srcBrowser({
1198
1347
  plugins: [
1199
1348
  declarationRollup({
1200
1349
  project: resolveWorkspacePath('configs/src/tsconfig.browser.json'),
@@ -1204,14 +1353,14 @@ export default defineConfig(
1204
1353
  }),
1205
1354
  )
1206
1355
  `,
1207
- server: `import { defineConfig, mergeConfig } from 'vite'
1356
+ server: `import { defineConfig } from 'vite'
1208
1357
  import { declarationRollup, rewriteCoreSpecifier } from '../helpers.js'
1209
1358
  import { srcServer, resolveWorkspacePath } from '../../vite.config.ts'
1210
1359
 
1211
1360
  // The roll-up reaches src/core through a specifier the tarball does not carry, so the rewrite
1212
1361
  // externalizes core through the package's own published root export, on the final roll-up alone.
1213
1362
  export default defineConfig(
1214
- mergeConfig(srcServer(), {
1363
+ srcServer({
1215
1364
  plugins: [
1216
1365
  declarationRollup({
1217
1366
  project: resolveWorkspacePath('configs/src/tsconfig.server.json'),
@@ -1222,7 +1371,7 @@ export default defineConfig(
1222
1371
  )
1223
1372
  `
1224
1373
  }),
1225
- bin: `import { defineConfig, mergeConfig } from 'vite'
1374
+ bin: `import { defineConfig } from 'vite'
1226
1375
  import { srcBin } from '../../vite.config.ts'
1227
1376
 
1228
1377
  // The \`scaffold\` executable build — a single ESM lib file, no declarations (an
@@ -1231,7 +1380,7 @@ import { srcBin } from '../../vite.config.ts'
1231
1380
  // \`output.paths\` rewriting the externalized \`@src/*\` specifiers to the built sibling
1232
1381
  // src environments (relative to \`dist/bin/\`), so the emitted bin resolves at runtime.
1233
1382
  export default defineConfig(
1234
- mergeConfig(srcBin(), {
1383
+ srcBin({
1235
1384
  build: {
1236
1385
  rolldownOptions: {
1237
1386
  output: {
@@ -2851,7 +3000,7 @@ var ScaffoldError = class extends Error {
2851
3000
  * ```
2852
3001
  */
2853
3002
  function isScaffoldError(value) {
2854
- return value instanceof ScaffoldError;
3003
+ return (0, _orkestrel_contract.isInstance)(value, ScaffoldError);
2855
3004
  }
2856
3005
  //#endregion
2857
3006
  //#region src/core/validators.ts
@@ -4999,14 +5148,14 @@ function blueprintToRootVite(blueprint) {
4999
5148
  const core = blueprint.src.includes("core");
5000
5149
  factories.push((0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.src.browser, {
5001
5150
  external: core ? `external: (id: string) =>
5002
- id === '@src/core' ||
5003
- id.startsWith('@orkestrel/') ||
5004
- peers.some((peer) => id === peer || id.startsWith(peer + '/')),` : `external: (id: string) =>
5005
- id.startsWith('@orkestrel/') ||
5006
- peers.some((peer) => id === peer || id.startsWith(peer + '/')),`,
5007
- output: core ? " output: { paths: { '@src/core': '../core/index.js' } }," : " output: {},",
5008
- exclude: core ? " exclude: ['tests/src/core/**/*.test.ts'],\n" : "",
5009
- global: blueprint.global ? " globalSetup: ['./tests/setupGlobal.ts'],\n" : ""
5151
+ id === '@src/core' ||
5152
+ id.startsWith('@orkestrel/') ||
5153
+ peers.some((peer) => id === peer || id.startsWith(peer + '/')),` : `external: (id: string) =>
5154
+ id.startsWith('@orkestrel/') ||
5155
+ peers.some((peer) => id === peer || id.startsWith(peer + '/')),`,
5156
+ output: core ? " output: { paths: { '@src/core': '../core/index.js' } }," : " output: {},",
5157
+ exclude: core ? " exclude: ['tests/src/core/**/*.test.ts'],\n" : "",
5158
+ global: blueprint.global ? " globalSetup: ['./tests/setupGlobal.ts'],\n" : ""
5010
5159
  }));
5011
5160
  projects.push("srcBrowser");
5012
5161
  }
@@ -5014,26 +5163,26 @@ function blueprintToRootVite(blueprint) {
5014
5163
  const core = blueprint.src.includes("core");
5015
5164
  factories.push((0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.src.server, {
5016
5165
  external: core ? `external: (id: string) =>
5017
- id === '@src/core' ||
5018
- id.startsWith('node:') ||
5019
- id.startsWith('@orkestrel/') ||
5020
- peers.some((peer) => id === peer || id.startsWith(peer + '/')),` : `external: (id: string) =>
5021
- id.startsWith('node:') ||
5022
- id.startsWith('@orkestrel/') ||
5023
- peers.some((peer) => id === peer || id.startsWith(peer + '/')),`,
5024
- output: core ? `\t\t\toutput: [
5025
- {
5026
- format: 'es',
5027
- entryFileNames: 'index.js',
5028
- paths: { '@src/core': '../core/index.js' },
5029
- },
5030
- {
5031
- format: 'cjs',
5032
- entryFileNames: 'index.cjs',
5033
- paths: { '@src/core': '../core/index.cjs' },
5034
- },
5035
- ],` : " output: {},",
5036
- exclude: core ? " exclude: ['tests/src/core/**/*.test.ts'],\n" : ""
5166
+ id === '@src/core' ||
5167
+ id.startsWith('node:') ||
5168
+ id.startsWith('@orkestrel/') ||
5169
+ peers.some((peer) => id === peer || id.startsWith(peer + '/')),` : `external: (id: string) =>
5170
+ id.startsWith('node:') ||
5171
+ id.startsWith('@orkestrel/') ||
5172
+ peers.some((peer) => id === peer || id.startsWith(peer + '/')),`,
5173
+ output: core ? `\t\t\t\toutput: [
5174
+ {
5175
+ format: 'es',
5176
+ entryFileNames: 'index.js',
5177
+ paths: { '@src/core': '../core/index.js' },
5178
+ },
5179
+ {
5180
+ format: 'cjs',
5181
+ entryFileNames: 'index.cjs',
5182
+ paths: { '@src/core': '../core/index.cjs' },
5183
+ },
5184
+ ],` : " output: {},",
5185
+ exclude: core ? " exclude: ['tests/src/core/**/*.test.ts'],\n" : ""
5037
5186
  }));
5038
5187
  projects.push("srcServer");
5039
5188
  }
@@ -5046,57 +5195,8 @@ function blueprintToRootVite(blueprint) {
5046
5195
  projects.push("appCore");
5047
5196
  }
5048
5197
  if (blueprint.app.includes("browser")) {
5049
- const showcasePlugins = machinery.showcase ? ` const showcasePlugins: PluginOption[] = showcase
5050
- ? [
5051
- viteSingleFile({
5052
- removeViteModuleLoader: true,
5053
- useRecommendedBuildConfig: true,
5054
- }),
5055
- {
5056
- name: 'orkestrel-showcase-html',
5057
- transformIndexHtml: {
5058
- order: 'post',
5059
- handler(html) {
5060
- const stamp = new Date().toISOString()
5061
- return html.replace(
5062
- '</head>',
5063
- '\t\t<meta name="build-id" content="' + stamp + '" />\\n\t</head>',
5064
- )
5065
- },
5066
- },
5067
- },
5068
- ]
5069
- : []
5070
- ` : "";
5071
- const plugins = machinery.showcase ? `\t\tplugins: [
5072
- outputBoundary(output),
5073
- environmentBoundary('app/browser'),
5074
- vue(),
5075
- ...showcasePlugins,
5076
- ],
5077
- ` : " plugins: [outputBoundary(output), environmentBoundary('app/browser'), vue()],\n";
5078
- const showcaseBuild = machinery.showcase ? `\t\t\t...(showcase
5079
- ? {
5080
- cssMinify: 'lightningcss',
5081
- minify: 'oxc',
5082
- modulePreload: false,
5083
- reportCompressedSize: false,
5084
- sourcemap: false,
5085
- target: 'esnext',
5086
- }
5087
- : { assetsInlineLimit: 0 }),
5088
- ` : " assetsInlineLimit: 0,\n";
5089
- const showcaseFactory = machinery.showcase ? `
5090
- export function appShowcase(): UserConfig {
5091
- return applicationBrowser(true)
5092
- }
5093
- ` : "";
5094
- factories.push((0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.app.browser, {
5095
- plugins,
5096
- showcasePlugins,
5097
- showcaseBuild,
5098
- showcaseFactory
5099
- }));
5198
+ const showcaseFactory = machinery.showcase ? CONFIG_TEMPLATES.factories.app.showcase : "";
5199
+ factories.push((0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.app.browser, { showcaseFactory }));
5100
5200
  projects.push("appBrowser");
5101
5201
  }
5102
5202
  if (blueprint.app.includes("server")) {
@@ -5128,7 +5228,7 @@ export function appShowcase(): UserConfig {
5128
5228
  projects.push("distribution");
5129
5229
  }
5130
5230
  if (blueprint.integration) {
5131
- factories.push((0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.integration, { global: blueprint.global ? " globalSetup: ['./tests/setupGlobal.ts'],\n" : "" }));
5231
+ factories.push((0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.integration, { global: blueprint.global ? " globalSetup: ['./tests/setupGlobal.ts'],\n" : "" }));
5132
5232
  projects.push("integration");
5133
5233
  }
5134
5234
  factories.push(CONFIG_TEMPLATES.factories.probe);
@@ -5144,7 +5244,6 @@ ${projects.map((project) => `\t\t\t${project},`).join("\n")}
5144
5244
  "outputBoundary"
5145
5245
  ].filter((helper) => body.includes(helper));
5146
5246
  return (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.root.vite, {
5147
- viteTypes: machinery.showcase ? "PluginOption, UserConfig" : "UserConfig",
5148
5247
  imports: imports.length === 0 ? "" : `${imports.join("\n")}\n`,
5149
5248
  helpers: helpers.length === 0 ? "" : `import { ${helpers.join(", ")} } from './configs/helpers.js'\n`,
5150
5249
  browsers: machinery.browser ? "import { resolveBrowser, resolvePinnedBrowser } from './configs/browsers.js'\n" : "",
@@ -5791,7 +5890,7 @@ function replaceManifestRanges(manifest, pins) {
5791
5890
  if (manifest.charAt(value) === ":") {
5792
5891
  value += 1;
5793
5892
  while (value < manifest.length && /\s/u.test(manifest.charAt(value))) value += 1;
5794
- if (typeof key === "string" && sectionNames.has(key) && manifest.charAt(value) === "{") {
5893
+ if ((0, _orkestrel_contract.isString)(key) && sectionNames.has(key) && manifest.charAt(value) === "{") {
5795
5894
  let sectionDepth = 0;
5796
5895
  let sectionCursor = value;
5797
5896
  while (sectionCursor < manifest.length) {
@@ -5873,7 +5972,7 @@ function replaceManifestRanges(manifest, pins) {
5873
5972
  }
5874
5973
  valueStart += 1;
5875
5974
  while (valueStart < section.length && /\s/u.test(section.charAt(valueStart))) valueStart += 1;
5876
- if (typeof key !== "string" || section.charAt(valueStart) !== "\"") {
5975
+ if (!(0, _orkestrel_contract.isString)(key) || section.charAt(valueStart) !== "\"") {
5877
5976
  sectionCursor = keyEnd;
5878
5977
  continue;
5879
5978
  }