@orkestrel/scaffold 0.0.133 → 0.0.134

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 (82) hide show
  1. package/dist/agents/skills/orkestrel-dispatch/scripts/bench.js +61 -96
  2. package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +48 -76
  3. package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +27 -66
  4. package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +31 -64
  5. package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +43 -57
  6. package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +43 -86
  7. package/dist/agents/skills/orkestrel-dispatch/scripts/patch.js +68 -104
  8. package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +35 -69
  9. package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +47 -84
  10. package/dist/agents/skills/orkestrel-falsify/scripts/mutate.js +134 -116
  11. package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +38 -90
  12. package/dist/agents/skills/orkestrel-harden/scripts/interleave.js +39 -103
  13. package/dist/agents/skills/orkestrel-harden/scripts/measure.js +40 -89
  14. package/dist/agents/skills/orkestrel-harden/scripts/titles.js +41 -87
  15. package/dist/agents/skills/orkestrel-parallel/scripts/cases.js +43 -88
  16. package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1018 -194
  17. package/dist/agents/skills/orkestrel-publish/scripts/compare.js +40 -60
  18. package/dist/agents/skills/orkestrel-publish/scripts/pins.js +47 -81
  19. package/dist/agents/skills/orkestrel-publish/scripts/steps.js +66 -104
  20. package/dist/agents/skills/orkestrel-publish/scripts/swap.js +74 -88
  21. package/dist/agents/skills/orkestrel-publish/scripts/wave.js +95 -108
  22. package/dist/agents/skills/orkestrel-publish/scripts/window.js +55 -96
  23. package/dist/agents/skills/orkestrel-scout/scripts/map.js +54 -101
  24. package/dist/bin/main.js +27 -3
  25. package/dist/bin/main.js.map +1 -1
  26. package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +81 -97
  27. package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +64 -72
  28. package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +41 -63
  29. package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +56 -79
  30. package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +61 -74
  31. package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +59 -89
  32. package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +87 -106
  33. package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +57 -76
  34. package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +73 -88
  35. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +2 -2
  36. package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +167 -119
  37. package/dist/host/agents/skills/orkestrel-harden/references/methods.md +1 -1
  38. package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +58 -75
  39. package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +55 -99
  40. package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +59 -90
  41. package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +60 -80
  42. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +4 -4
  43. package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +71 -108
  44. package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1288 -239
  45. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +10 -6
  46. package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +58 -79
  47. package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +66 -87
  48. package/dist/host/agents/skills/orkestrel-publish/scripts/steps.ts +84 -102
  49. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +92 -99
  50. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +130 -126
  51. package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +82 -120
  52. package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
  53. package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +85 -112
  54. package/dist/host/claude/agents/orkestrel.md +4 -4
  55. package/dist/host/claude/rules/documentation.md +1 -1
  56. package/dist/host/claude/rules/patterns.md +5 -4
  57. package/dist/host/claude/rules/styles.md +1 -1
  58. package/dist/host/claude/rules/tests.md +3 -3
  59. package/dist/host/claude/rules/workspace.md +47 -35
  60. package/dist/host/configs/helpers.ts +40 -15
  61. package/dist/host/dotfiles/oxlintrc.json +62 -0
  62. package/dist/host/guides/form.md +79 -4
  63. package/dist/host/guides/scaffold.md +93 -65
  64. package/dist/host/guides/table.md +20 -6
  65. package/dist/host/guides/test.md +9 -7
  66. package/dist/host/manifest.json +44 -44
  67. package/dist/host/tests/config.test.ts +201 -11
  68. package/dist/host/tests/policy.test.ts +14 -21
  69. package/dist/host/tests/setupPolicy.ts +43 -36
  70. package/dist/src/core/index.cjs +191 -93
  71. package/dist/src/core/index.cjs.map +1 -1
  72. package/dist/src/core/index.d.cts +27 -13
  73. package/dist/src/core/index.d.ts +27 -13
  74. package/dist/src/core/index.js +189 -93
  75. package/dist/src/core/index.js.map +1 -1
  76. package/dist/src/server/index.cjs +8 -9
  77. package/dist/src/server/index.cjs.map +1 -1
  78. package/dist/src/server/index.d.cts +1 -1
  79. package/dist/src/server/index.d.ts +1 -1
  80. package/dist/src/server/index.js +8 -9
  81. package/dist/src/server/index.js.map +1 -1
  82. package/package.json +2 -2
@@ -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.133",
7
+ version: "0.0.134",
8
8
  description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
9
9
  keywords: [
10
10
  "audit",
@@ -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.36",
112
+ "@orkestrel/test": "^0.0.37",
113
113
  "@types/node": "^24.19.2",
114
114
  "@vitest/browser-playwright": "^5.1.0",
115
115
  "oxfmt": "^0.78.0",
@@ -170,6 +170,7 @@ var STYLES_DEV_DEPENDENCIES = Object.freeze({ sass: "^1.105.1" });
170
170
  var RESERVED_SHEET_NAMES = Object.freeze([
171
171
  ...ENVIRONMENTS,
172
172
  "bin",
173
+ "reporter",
173
174
  "styles",
174
175
  "themes",
175
176
  ...FRAMEWORKS
@@ -248,12 +249,18 @@ var APP_MATRIX = Object.freeze({
248
249
  });
249
250
  /** Lists the configuration files a workspace that ships its own executable adds, frozen. */
250
251
  var BIN_CONFIGS = Object.freeze(["configs/src/vite.bin.config.ts", "configs/src/tsconfig.bin.json"]);
252
+ /** Lists the configuration files a workspace that publishes a Vitest reporter adds, frozen. */
253
+ var REPORTER_CONFIGS = Object.freeze(["configs/src/vite.reporter.config.ts", "configs/src/tsconfig.reporter.json"]);
251
254
  /** Lists the configuration file a workspace with studies and a server application adds, frozen. */
252
255
  var BARREL_CONFIGS = Object.freeze(["configs/app/vite.barrel.config.ts"]);
253
256
  /** Names the executable entry whose presence makes a workspace `bin`. */
254
257
  var BIN_ENTRY_PATH = "src/bin/main.ts";
255
258
  /** Names the built executable a bin workspace's manifest command runs. */
256
259
  var BIN_OUTPUT_PATH = "dist/bin/main.js";
260
+ /** Names the reporter entry whose presence makes a workspace `reporter`. */
261
+ var REPORTER_ENTRY_PATH = "src/reporter/main.ts";
262
+ /** Names the built reporter module a reporter workspace's `./reporter` export loads. */
263
+ var REPORTER_OUTPUT_PATH = "dist/reporter/main.js";
257
264
  /**
258
265
  * Lists the paths a target receives from the vendored data root, frozen.
259
266
  *
@@ -674,6 +681,7 @@ var WORKSPACE_DEV_ENGINES = Object.freeze({ packageManager: Object.freeze({
674
681
  }) });
675
682
  /** Holds the baseline tooling versions, before framework holds apply. */
676
683
  var BASE_DEV_DEPENDENCIES = Object.freeze({
684
+ "@orkestrel/contract": package_default.dependencies["@orkestrel/contract"],
677
685
  "@orkestrel/guide": package_default.devDependencies["@orkestrel/guide"],
678
686
  "@orkestrel/probe": package_default.devDependencies["@orkestrel/probe"],
679
687
  "@orkestrel/scaffold": `^${package_default.version}`,
@@ -813,8 +821,6 @@ var BROWSE_UPSTREAM = Object.freeze([
813
821
  "@orkestrel/tool",
814
822
  "@orkestrel/websocket"
815
823
  ]);
816
- /** Names the development dependency every private `app` environment adds. */
817
- var APP_DEV_DEPENDENCIES = Object.freeze({ "@orkestrel/contract": package_default.dependencies["@orkestrel/contract"] });
818
824
  /** Lists the development dependencies a private browser application adds. */
819
825
  var APP_BROWSER_DEV_DEPENDENCIES = Object.freeze({
820
826
  ...SOURCE_BROWSER_DEV_DEPENDENCIES,
@@ -1253,6 +1259,46 @@ export function srcBin(override?: UserConfig): UserConfig {
1253
1259
  }
1254
1260
  return mergeOverride(project, override)
1255
1261
  }
1262
+ `,
1263
+ reporter: `function resolveReporterFilename(): string {
1264
+ return 'main.js'
1265
+ }
1266
+
1267
+ function resolveReporterExternal(id: string): boolean {
1268
+ return id.startsWith('@src/') || resolveExternal(id, { peers, refused: [], siblings: [] })
1269
+ }
1270
+
1271
+ export function srcReporter(override?: UserConfig): UserConfig {
1272
+ const project: UserConfig = {
1273
+ resolve,
1274
+ publicDir: false,
1275
+ plugins: [outputBoundary('dist/reporter')],
1276
+ build: {
1277
+ emptyOutDir: true,
1278
+ sourcemap: true,
1279
+ minify: false,
1280
+ lib: {
1281
+ entry: resolveWorkspacePath('${REPORTER_ENTRY_PATH}'),
1282
+ formats: ['es'],
1283
+ fileName: resolveReporterFilename,
1284
+ },
1285
+ outDir: 'dist/reporter',
1286
+ target: 'node22',
1287
+ rolldownOptions: {
1288
+ onLog: enforceBuildLog,
1289
+ external: resolveReporterExternal,
1290
+ },
1291
+ },
1292
+ test: {
1293
+ name: { label: 'src:reporter', color: 'cyan' },
1294
+ include: ['tests/src/reporter/**/*.test.ts'],
1295
+ setupFiles: ['./tests/setup.ts', './tests/setupServer.ts'],
1296
+ environment: 'node',
1297
+ browser: { enabled: false },
1298
+ },
1299
+ }
1300
+ return mergeOverride(project, override)
1301
+ }
1256
1302
  `
1257
1303
  }),
1258
1304
  app: Object.freeze({
@@ -1937,6 +1983,25 @@ export function probe(override?: UserConfig): UserConfig {
1937
1983
  "../../src/bin/**/*.tsx"
1938
1984
  ]
1939
1985
  }
1986
+ `,
1987
+ reporter: `{
1988
+ "extends": "../../tsconfig.json",
1989
+ "compilerOptions": {
1990
+ "lib": ["ESNext"],
1991
+ "types": ["node"],
1992
+ "noEmit": false,
1993
+ "declaration": true,
1994
+ "emitDeclarationOnly": true,
1995
+ "rootDir": "../../src",
1996
+ "outDir": "../../dist/reporter"
1997
+ },
1998
+ "include": [
1999
+ "../../src/reporter/**/*.cts",
2000
+ "../../src/reporter/**/*.mts",
2001
+ "../../src/reporter/**/*.ts",
2002
+ "../../src/reporter/**/*.tsx"
2003
+ ]
2004
+ }
1940
2005
  `,
1941
2006
  skills: `{
1942
2007
  "extends": "../../tsconfig.json",
@@ -2102,6 +2167,29 @@ export default defineConfig(
2102
2167
  },
2103
2168
  }),
2104
2169
  )
2170
+ `,
2171
+ reporter: `import { defineConfig } from 'vite'
2172
+ import { declarationRollup, rewriteServerSpecifier } from '../helpers.js'
2173
+ import { resolveWorkspacePath, srcReporter } from '../../vite.config.ts'
2174
+
2175
+ // Each external \`@src/*\` path resolves from \`dist/reporter/\` to the built environment.
2176
+ export default defineConfig(
2177
+ srcReporter({
2178
+ plugins: [
2179
+ declarationRollup({
2180
+ project: resolveWorkspacePath('configs/src/tsconfig.reporter.json'),
2181
+ rewrite: rewriteServerSpecifier,
2182
+ }),
2183
+ ],
2184
+ build: {
2185
+ rolldownOptions: {
2186
+ output: {
2187
+ {{paths}}
2188
+ },
2189
+ },
2190
+ },
2191
+ }),
2192
+ )
2105
2193
  `,
2106
2194
  app: Object.freeze({
2107
2195
  vue: `import { defineConfig } from 'vite'
@@ -2702,12 +2790,22 @@ describe('bin entry', () => {
2702
2790
  expect(Object.keys(entry)).toStrictEqual([])
2703
2791
  })
2704
2792
  })
2793
+ `,
2794
+ reporter: `import { describe, expect, it } from 'vitest'
2795
+ import reporter from '../../../src/reporter/main.js'
2796
+
2797
+ describe('reporter entry', () => {
2798
+ it('exports the reporter class by default', () => {
2799
+ expect(reporter).toBeTypeOf('function')
2800
+ })
2801
+ })
2705
2802
  `,
2706
2803
  distribution: Object.freeze({
2707
2804
  module: `{{types}}import type { SpawnSyncReturns } from 'node:child_process'
2708
2805
  import type { TestContext } from 'vitest'
2806
+ import { arrayOf, isArray, isRecord, isString } from '@orkestrel/contract'
2709
2807
  import { spawnSync } from 'node:child_process'
2710
- import {
2808
+ {{events}}import {
2711
2809
  existsSync,
2712
2810
  mkdirSync,
2713
2811
  mkdtempSync,
@@ -2954,39 +3052,6 @@ export interface DistributionStage {
2954
3052
  readonly targets: readonly string[]
2955
3053
  }
2956
3054
 
2957
- /**
2958
- * Checks whether a value is a non-null object other than an array.
2959
- *
2960
- * @param value - The value to inspect.
2961
- * @returns True if the value is a record; false otherwise.
2962
- */
2963
- export function isDistributionRecord(value: unknown): value is Readonly<Record<string, unknown>> {
2964
- return typeof value === 'object' && value !== null && !Array.isArray(value)
2965
- }
2966
-
2967
- /**
2968
- * Checks whether a value is an array of strings.
2969
- *
2970
- * @param value - The value to inspect.
2971
- * @returns True if every array member is a string; false otherwise.
2972
- */
2973
- export function isDistributionNames(value: unknown): value is readonly string[] {
2974
- return Array.isArray(value) && value.every((name) => typeof name === 'string')
2975
- }
2976
-
2977
- // A fallback list, which is what Node reads an array in an exports entry as. The
2978
- // narrowing is what the following walkers need: \`Array.isArray\` widens an \`unknown\`
2979
- // member to \`any\`, and an entry read that way is not read at all.
2980
- /**
2981
- * Checks whether a value is a fallback array.
2982
- *
2983
- * @param value - The value to inspect.
2984
- * @returns True if the value is an array; false otherwise.
2985
- */
2986
- export function isDistributionList(value: unknown): value is readonly unknown[] {
2987
- return Array.isArray(value)
2988
- }
2989
-
2990
3055
  // Whether a string is a valid package target. Node rejects a target outside the
2991
3056
  // package and a target containing a dot, parent, or node_modules segment during
2992
3057
  // package-target resolution. A later module-resolution failure is not the same
@@ -3031,7 +3096,7 @@ export function readDistributionJSON(path: string): unknown {
3031
3096
  */
3032
3097
  export function readDistributionManifestName(path: string): string {
3033
3098
  const manifest = readDistributionJSON(path)
3034
- if (!isDistributionRecord(manifest) || typeof manifest.name !== 'string') {
3099
+ if (!isRecord(manifest) || typeof manifest.name !== 'string') {
3035
3100
  throw new Error(\`The manifest at \${path} declares no package name\`)
3036
3101
  }
3037
3102
  return manifest.name
@@ -3048,19 +3113,17 @@ export function readDistributionManifestName(path: string): string {
3048
3113
  */
3049
3114
  export function readDistributionPeers(path: string): Readonly<Record<string, string>> {
3050
3115
  const manifest = readDistributionJSON(path)
3051
- if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.peerDependencies)) {
3116
+ if (!isRecord(manifest) || !isRecord(manifest.peerDependencies)) {
3052
3117
  return {}
3053
3118
  }
3054
- const meta = isDistributionRecord(manifest.peerDependenciesMeta)
3055
- ? manifest.peerDependenciesMeta
3056
- : undefined
3119
+ const meta = isRecord(manifest.peerDependenciesMeta) ? manifest.peerDependenciesMeta : undefined
3057
3120
  const peers = Object.entries(manifest.peerDependencies).filter(
3058
3121
  (entry): entry is [string, string] => typeof entry[1] === 'string',
3059
3122
  )
3060
3123
  return Object.fromEntries(
3061
3124
  peers.filter(([name]) => {
3062
3125
  const entry = meta?.[name]
3063
- return !isDistributionRecord(entry) || entry.optional !== true
3126
+ return !isRecord(entry) || entry.optional !== true
3064
3127
  }),
3065
3128
  )
3066
3129
  }
@@ -3075,7 +3138,7 @@ export function createDistributionConsumerManifest(
3075
3138
  peers: Readonly<Record<string, string>>,
3076
3139
  ): string {
3077
3140
  const manifest: unknown = JSON.parse(DISTRIBUTION_CONSUMER_MANIFEST)
3078
- if (Object.keys(peers).length === 0 || !isDistributionRecord(manifest)) {
3141
+ if (Object.keys(peers).length === 0 || !isRecord(manifest)) {
3079
3142
  return DISTRIBUTION_CONSUMER_MANIFEST
3080
3143
  }
3081
3144
  return \`\${JSON.stringify({ ...manifest, dependencies: peers })}\\n\`
@@ -3196,7 +3259,7 @@ export function resolveDistributionPackageTarget(
3196
3259
  conditions: readonly string[],
3197
3260
  ): DistributionTargetResult | undefined {
3198
3261
  if (typeof entry === 'string') return { target: entry }
3199
- if (isDistributionList(entry)) {
3262
+ if (isArray(entry)) {
3200
3263
  for (const member of entry) {
3201
3264
  const resolved = resolveDistributionPackageTarget(member, conditions)
3202
3265
  if (resolved !== undefined && matchesDistributionPackageTarget(resolved.target))
@@ -3204,7 +3267,7 @@ export function resolveDistributionPackageTarget(
3204
3267
  }
3205
3268
  return undefined
3206
3269
  }
3207
- if (!isDistributionRecord(entry)) return undefined
3270
+ if (!isRecord(entry)) return undefined
3208
3271
  for (const [condition, nested] of Object.entries(entry)) {
3209
3272
  if (condition !== 'default' && !conditions.includes(condition)) continue
3210
3273
  const resolved = resolveDistributionPackageTarget(nested, conditions)
@@ -3289,14 +3352,14 @@ export function resolveDistributionDeclaration(
3289
3352
  installed: string,
3290
3353
  ): string | undefined {
3291
3354
  if (typeof entry === 'string') return targetToDistributionDeclaration(entry, installed)
3292
- if (isDistributionList(entry)) {
3355
+ if (isArray(entry)) {
3293
3356
  for (const member of entry) {
3294
3357
  const resolved = resolveDistributionDeclaration(member, conditions, installed)
3295
3358
  if (resolved !== undefined) return resolved
3296
3359
  }
3297
3360
  return undefined
3298
3361
  }
3299
- if (!isDistributionRecord(entry)) return undefined
3362
+ if (!isRecord(entry)) return undefined
3300
3363
  for (const [condition, nested] of Object.entries(entry)) {
3301
3364
  if (condition !== 'default' && !conditions.includes(condition)) continue
3302
3365
  const resolved = resolveDistributionDeclaration(nested, conditions, installed)
@@ -3329,7 +3392,7 @@ export function readDistributionPackageType(installed: string, target: string):
3329
3392
  if (scope === undefined) return undefined
3330
3393
  try {
3331
3394
  const manifest = readDistributionJSON(join(scope, 'package.json'))
3332
- return isDistributionRecord(manifest) ? manifest.type : undefined
3395
+ return isRecord(manifest) ? manifest.type : undefined
3333
3396
  } catch {
3334
3397
  return undefined
3335
3398
  }
@@ -3406,9 +3469,9 @@ export function declaresDistributionCommonJS(entry: unknown, installed: string):
3406
3469
  */
3407
3470
  export function collectDistributionTargets(entry: unknown): readonly string[] {
3408
3471
  if (typeof entry === 'string') return [entry]
3409
- if (isDistributionList(entry))
3472
+ if (isArray(entry))
3410
3473
  return entry.flatMap(collectDistributionTargets).filter(matchesDistributionPackageTarget)
3411
- if (!isDistributionRecord(entry)) return []
3474
+ if (!isRecord(entry)) return []
3412
3475
  return Object.values(entry).flatMap((nested) => collectDistributionTargets(nested))
3413
3476
  }
3414
3477
 
@@ -3539,7 +3602,7 @@ export function filterDistributionUntypable(
3539
3602
  return entries.filter(
3540
3603
  (entry) =>
3541
3604
  entry.requirable &&
3542
- isDistributionRecord(entry.mapping) &&
3605
+ isRecord(entry.mapping) &&
3543
3606
  Object.hasOwn(entry.mapping, 'require') &&
3544
3607
  !declaresDistributionCommonJS(entry.mapping, installed),
3545
3608
  )
@@ -3729,7 +3792,7 @@ export function driveDistributionRuntime(
3729
3792
  )
3730
3793
  }
3731
3794
  const published: unknown = JSON.parse(result.stdout)
3732
- if (!isDistributionNames(published))
3795
+ if (!arrayOf(isString)(published))
3733
3796
  throw new Error(\`The driver printed no name list for \${specifier}\`)
3734
3797
  return published
3735
3798
  }
@@ -3775,7 +3838,7 @@ export function buildDistributionStage(scratch: string): DistributionStage {
3775
3838
  const name = readDistributionManifestName(join(DISTRIBUTION_ROOT, 'package.json'))
3776
3839
  const installed = join(consumer, 'node_modules', ...name.split('/'))
3777
3840
  const manifest = readDistributionJSON(join(installed, 'package.json'))
3778
- if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.exports)) {
3841
+ if (!isRecord(manifest) || !isRecord(manifest.exports)) {
3779
3842
  throw new Error('The installed manifest publishes no exports map')
3780
3843
  }
3781
3844
  return { consumer, installed, archives, ...classifyDistributionStage(manifest, installed, name) }
@@ -3870,7 +3933,7 @@ export function classifyDistributionStage(
3870
3933
  installed: string,
3871
3934
  name: string,
3872
3935
  ): DistributionClassification {
3873
- if (!isDistributionRecord(manifest.exports))
3936
+ if (!isRecord(manifest.exports))
3874
3937
  throw new Error('The installed manifest publishes no exports map')
3875
3938
  const readings = Object.entries(manifest.exports).map(([subpath, mapping]) => {
3876
3939
  const files = collectDistributionTargets(mapping)
@@ -3960,8 +4023,8 @@ export function readDistributionFace(installed: string, path: string): string |
3960
4023
  return output === 'dist'
3961
4024
  ? axis === 'src'
3962
4025
  ? face
3963
- : axis === 'bin'
3964
- ? 'bin'
4026
+ : axis === 'bin' || axis === 'reporter'
4027
+ ? axis
3965
4028
  : undefined
3966
4029
  : undefined
3967
4030
  }
@@ -4049,8 +4112,8 @@ export function scanDistributionSourceMaps(installed: string): readonly string[]
4049
4112
  : Buffer.from(payload[2], 'base64').toString('utf8'),
4050
4113
  )
4051
4114
  if (
4052
- !isDistributionRecord(map) ||
4053
- !isDistributionNames(map.sources) ||
4115
+ !isRecord(map) ||
4116
+ !arrayOf(isString)(map.sources) ||
4054
4117
  (map.sourceRoot !== undefined && typeof map.sourceRoot !== 'string')
4055
4118
  ) {
4056
4119
  throw new Error('Unreadable source map')
@@ -4216,8 +4279,7 @@ export function checkDistributionManifest(installed: string, scratch: string): r
4216
4279
  if (result.status !== 0)
4217
4280
  throw new Error(\`npm pkg fix failed: \${readDistributionOutput(result)}\`)
4218
4281
  const after = readDistributionJSON(path)
4219
- if (!isDistributionRecord(before) || !isDistributionRecord(after))
4220
- throw new Error('Unreadable manifest')
4282
+ if (!isRecord(before) || !isRecord(after)) throw new Error('Unreadable manifest')
4221
4283
  return [...new Set([...Object.keys(before), ...Object.keys(after)])]
4222
4284
  .filter((key) => !isDeepStrictEqual(before[key], after[key]))
4223
4285
  .sort()
@@ -4269,7 +4331,7 @@ export function buildDistributionCases(
4269
4331
  writeDistributionFile(join(root, 'module/package.json'), '{ "type": "module" }\\n')
4270
4332
  writeDistributionFile(join(root, 'commonjs/package.json'), '{ "type": "commonjs" }\\n')
4271
4333
  const manifest = readDistributionJSON(join(root, 'package.json'))
4272
- if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.exports)) {
4334
+ if (!isRecord(manifest) || !isRecord(manifest.exports)) {
4273
4335
  throw new Error('The classifier fixture declares no exports map')
4274
4336
  }
4275
4337
  const mappings = manifest.exports
@@ -4394,7 +4456,7 @@ export function buildDistributionCases(
4394
4456
  },
4395
4457
  expected: {
4396
4458
  undeclared: [],
4397
- partitioned: [...stage.subpaths].sort(),
4459
+ partitioned: stage.subpaths.toSorted(),
4398
4460
  unreachable: [],
4399
4461
  untypable: [],
4400
4462
  },
@@ -4540,6 +4602,8 @@ describe('installed package consumer', () => {
4540
4602
  })
4541
4603
  }
4542
4604
  {{guard}}{{drive}}})
4605
+ `,
4606
+ events: `import { once } from 'node:events'
4543
4607
  `,
4544
4608
  transport: `import { createServer } from 'node:http'
4545
4609
  `,
@@ -4668,9 +4732,8 @@ export async function readDistributionBrowserExports(
4668
4732
  response.end(readFileSync(path))
4669
4733
  })
4670
4734
  try {
4671
- await new Promise<void>((settle) => {
4672
- server.listen(0, '127.0.0.1', settle)
4673
- })
4735
+ server.listen(0, '127.0.0.1')
4736
+ await once(server, 'listening')
4674
4737
  const address = server.address()
4675
4738
  if (address === null || typeof address === 'string') {
4676
4739
  throw new Error('The bundle server bound no port')
@@ -4681,8 +4744,7 @@ export async function readDistributionBrowserExports(
4681
4744
  await page.goto(\`http://127.0.0.1:\${String(address.port)}/\`, { waitUntil: 'load' })
4682
4745
  const published: unknown = await page.evaluate('globalThis.subject')
4683
4746
  if (failures.length > 0) throw new Error(\`The bundle raised \${failures.join(' | ')}\`)
4684
- if (!isDistributionNames(published))
4685
- throw new Error('The bundled module published no name list')
4747
+ if (!arrayOf(isString)(published)) throw new Error('The bundled module published no name list')
4686
4748
  return published
4687
4749
  } finally {
4688
4750
  server.close()
@@ -5234,6 +5296,7 @@ var isBlueprint = (0, _orkestrel_contract.recordOf)({
5234
5296
  engines: _orkestrel_contract.isString,
5235
5297
  overrides: (0, _orkestrel_contract.andOf)(isCollection, (0, _orkestrel_contract.arrayOf)(isOverride)),
5236
5298
  bin: _orkestrel_contract.isBoolean,
5299
+ reporter: _orkestrel_contract.isBoolean,
5237
5300
  setup: (0, _orkestrel_contract.andOf)(isCollection, (0, _orkestrel_contract.arrayOf)((0, _orkestrel_contract.literalOf)("node", "browser"))),
5238
5301
  guides: _orkestrel_contract.isBoolean,
5239
5302
  integration: _orkestrel_contract.isBoolean,
@@ -6953,9 +7016,10 @@ function blueprintToSheets(blueprint) {
6953
7016
  return [...blueprint.styles ? ["styles"] : [], ...(0, _orkestrel_contract.sortValues)(blueprint.extensions.flatMap((extension) => extension.surface === "styles" && isSheetName(extension.name) ? [extension.name] : []))];
6954
7017
  }
6955
7018
  /**
6956
- * Projects published environments and sheets into the manifest export map.
7019
+ * Projects published environments, sheets, and the reporter entry into the manifest export map.
6957
7020
  * @param blueprint - The workspace specification.
6958
- * @returns JavaScript conditions and CSS and SCSS subpaths, without an invented JavaScript root.
7021
+ * @returns JavaScript conditions, CSS and SCSS subpaths, and the ES-only `./reporter` subpath,
7022
+ * without an invented JavaScript root.
6959
7023
  * @example
6960
7024
  * ```ts
6961
7025
  * import { blueprintToExports, createBlueprint } from '@orkestrel/scaffold'
@@ -6971,7 +7035,8 @@ function blueprintToExports(blueprint) {
6971
7035
  const face = [`./${extension.name}`, pathToCondition(`./dist/src/${extension.name}/index`, ["es"])];
6972
7036
  return blueprint.src.includes("browser") ? [face, ["./browser", pathToCondition("./dist/src/browser/index", ["es"])]] : [face];
6973
7037
  })),
6974
- ...Object.fromEntries([...blueprintToSheets(blueprint), ...blueprint.themes ? ["styles/themes"] : []].flatMap((name) => [[`./${name}`, `./dist/src/${name}/index.css`], [`./${name}/scss`, `./src/${name}/index.scss`]]))
7038
+ ...Object.fromEntries([...blueprintToSheets(blueprint), ...blueprint.themes ? ["styles/themes"] : []].flatMap((name) => [[`./${name}`, `./dist/src/${name}/index.css`], [`./${name}/scss`, `./src/${name}/index.scss`]])),
7039
+ ...blueprint.reporter ? { "./reporter": pathToCondition(`./${REPORTER_OUTPUT_PATH.replace(/\.js$/u, "")}`, ["es"]) } : {}
6975
7040
  };
6976
7041
  return Object.keys(exported).length > 0 ? {
6977
7042
  ...exported,
@@ -7145,9 +7210,8 @@ function blueprintToDevDependencies(blueprint) {
7145
7210
  ...rendered && !BROWSE_UPSTREAM.includes(own) ? BROWSE_DEV_DEPENDENCIES : {},
7146
7211
  ...blueprint.journey && blueprint.app.includes("browser") && (blueprint.base || blueprintToFaces(blueprint).some((extension) => extension.axes.includes("app"))) && !CAPTURE_UPSTREAM.includes(own) ? CAPTURE_DEV_DEPENDENCIES : {},
7147
7212
  ...sheets ? STYLES_DEV_DEPENDENCIES : {},
7148
- ...blueprint.src.length > 0 || blueprint.bin ? DECLARATION_DEV_DEPENDENCIES : {},
7213
+ ...blueprint.src.length > 0 || blueprint.bin || blueprint.reporter ? DECLARATION_DEV_DEPENDENCIES : {},
7149
7214
  ...blueprint.src.includes("browser") || blueprint.setup.includes("browser") || sheets ? SOURCE_BROWSER_DEV_DEPENDENCIES : {},
7150
- ...blueprint.app.length > 0 ? APP_DEV_DEPENDENCIES : {},
7151
7215
  ...blueprint.app.includes("browser") ? APP_BROWSER_DEV_DEPENDENCIES : {},
7152
7216
  ...blueprint.app.includes("server") ? APP_SERVER_DEV_DEPENDENCIES : {},
7153
7217
  ...Object.fromEntries(blueprintToMachinery(blueprint).frameworks.flatMap((framework) => Object.entries(FRAMEWORK_MATRIX[framework].dependencies))),
@@ -7339,7 +7403,7 @@ function blueprintToScripts(blueprint) {
7339
7403
  const checker = application.includes("vue") ? FRAMEWORK_MATRIX.vue.checker : "tsc";
7340
7404
  const publishes = blueprint.src.length > 0 || targets.length > 0;
7341
7405
  const integrates = blueprint.integration;
7342
- const compiles = publishes || blueprint.bin;
7406
+ const compiles = publishes || blueprint.bin || blueprint.reporter;
7343
7407
  const runtime = blueprint.app.filter((environment) => environment !== "core" && (environment !== "browser" || base));
7344
7408
  const vitest = "vitest run --config vite.config.ts --no-cache --reporter=dot";
7345
7409
  const built = [...runtime, ...application].flatMap((environment) => environment === "server" && matchesBarrel(blueprint) ? [environment, "barrel"] : [environment]);
@@ -7347,7 +7411,8 @@ function blueprintToScripts(blueprint) {
7347
7411
  ...blueprint.src,
7348
7412
  ...source,
7349
7413
  ...sheets,
7350
- ...blueprint.bin ? ["bin"] : []
7414
+ ...blueprint.bin ? ["bin"] : [],
7415
+ ...blueprint.reporter ? ["reporter"] : []
7351
7416
  ].map((name) => `npm run check:src:${name}`);
7352
7417
  const journey = `vitest run --config ${JOURNEY_CONFIG_PATH} --no-cache --reporter=dot`;
7353
7418
  const showcase = `vite --config ${SHOWCASE_CONFIG_PATH}`;
@@ -7369,6 +7434,7 @@ function blueprintToScripts(blueprint) {
7369
7434
  "check:src": checks.join(" && "),
7370
7435
  ...Object.fromEntries(Iterator.from(blueprint.src).map((environment) => [`check:src:${environment}`, `tsc --noEmit -p configs/src/tsconfig.${environment}.json`]).toArray()),
7371
7436
  ...blueprint.bin ? { "check:src:bin": "tsc --noEmit -p configs/src/tsconfig.bin.json" } : {},
7437
+ ...blueprint.reporter ? { "check:src:reporter": "tsc --noEmit -p configs/src/tsconfig.reporter.json" } : {},
7372
7438
  ...Object.fromEntries([...sheets, ...source].map((name) => [`check:src:${name}`, `tsc --noEmit -p configs/src/tsconfig.${name}.json`]))
7373
7439
  } : {},
7374
7440
  ...blueprint.app.length > 0 ? {
@@ -7393,14 +7459,16 @@ function blueprintToScripts(blueprint) {
7393
7459
  ...!publishes && blueprint.service ? ["npm run test:service"] : []
7394
7460
  ].join(" && "),
7395
7461
  ...compiles ? {
7396
- "test:src": [...blueprint.src.length > 0 || blueprint.bin ? [[
7462
+ "test:src": [...blueprint.src.length > 0 || blueprint.bin || blueprint.reporter ? [[
7397
7463
  vitest,
7398
7464
  ...blueprint.src.map((environment) => `--project ${SRC_MATRIX[environment].project}`),
7399
7465
  ...source.map((name) => `--project src:${name}`),
7400
- ...blueprint.bin ? ["--project src:bin"] : []
7466
+ ...blueprint.bin ? ["--project src:bin"] : [],
7467
+ ...blueprint.reporter ? ["--project src:reporter"] : []
7401
7468
  ].join(" ")] : [], ...targets.map((name) => `npm run test:src:${name}`)].join(" && "),
7402
7469
  ...Object.fromEntries(Iterator.from(blueprint.src).map((environment) => [`test:src:${environment}`, `${vitest} --project ${SRC_MATRIX[environment].project}`]).toArray()),
7403
7470
  ...blueprint.bin ? { "test:src:bin": `${vitest} --project src:bin` } : {},
7471
+ ...blueprint.reporter ? { "test:src:reporter": `${vitest} --project src:reporter` } : {},
7404
7472
  ...Object.fromEntries(source.map((name) => [`test:src:${name}`, `${vitest} --project src:${name}`])),
7405
7473
  ...Object.fromEntries(targets.map((name) => [`test:src:${name}`, `npm run build:src:${name} && ${vitest} --project src:${name}`]))
7406
7474
  } : {},
@@ -7447,10 +7515,12 @@ function blueprintToScripts(blueprint) {
7447
7515
  ...blueprint.src.map((environment) => `npm run build:src:${environment}`),
7448
7516
  ...source.map((name) => `npm run build:src:${name}`),
7449
7517
  ...targets.map((name) => `npm run build:src:${name}`),
7450
- ...blueprint.bin ? ["npm run build:src:bin"] : []
7518
+ ...blueprint.bin ? ["npm run build:src:bin"] : [],
7519
+ ...blueprint.reporter ? ["npm run build:src:reporter"] : []
7451
7520
  ].join(" && "),
7452
7521
  ...Object.fromEntries(Iterator.from(blueprint.src).map((environment) => [`build:src:${environment}`, SRC_MATRIX[environment].formats.includes("cjs") ? `vite build --config configs/src/vite.${environment}.config.ts && npm run copy dist/src/${environment}/index.d.ts dist/src/${environment}/index.d.cts` : `vite build --config configs/src/vite.${environment}.config.ts`]).toArray()),
7453
7522
  ...blueprint.bin ? { "build:src:bin": "vite build --config configs/src/vite.bin.config.ts" } : {},
7523
+ ...blueprint.reporter ? { "build:src:reporter": "vite build --config configs/src/vite.reporter.config.ts" } : {},
7454
7524
  ...Object.fromEntries(source.map((name) => [`build:src:${name}`, `vite build --config configs/src/vite.${name}.config.ts`])),
7455
7525
  ...Object.fromEntries(targets.map((name) => [`build:src:${name}`, [`vite build --config configs/src/vite.${name}.config.ts`, ...name === "styles" && blueprint.themes ? ["vite build --config configs/src/vite.themes.config.ts"] : []].join(" && ")]))
7456
7526
  } : {},
@@ -7493,9 +7563,9 @@ function blueprintToScripts(blueprint) {
7493
7563
  * Every direct `test:<project>` script is writable, together with the probe and
7494
7564
  * benchmark workbench scripts. A workspace carrying guides adds `test:guides`,
7495
7565
  * whose package-owned entry runs the guides project and handles explicit parity
7496
- * rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication lifecycle scripts.
7497
- * Sheet and framework faces add their check and build scripts, application frameworks add dev scripts,
7498
- * and selected showcases and journeys add their mode scripts.
7566
+ * rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication
7567
+ * lifecycle scripts. Sheet and framework faces add their check and build scripts, application
7568
+ * frameworks add dev scripts, and selected showcases and journeys add their mode scripts.
7499
7569
  * A base browser application's journey axis also adds `journey` and `capture`, and each
7500
7570
  * app-side browser face adds `journey:<name>` and `capture:<name>`. Their generated
7501
7571
  * commands are writable and have no predecessor forms; customized values remain caller-owned.
@@ -7512,10 +7582,10 @@ function blueprintToScripts(blueprint) {
7512
7582
  * existed. The pack hook accepts the build chain emitted before it
7513
7583
  * delegated to `build`. The publication hook accepts the same gate chain without
7514
7584
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
7515
- * step. `serve:build` accepts the server-only chain it ran before it delegated to
7516
- * `build`. The value being written is always writable, so it is not repeated there. Any other value is a script the workspace author
7517
- * customized, and {@link replaceManifestScripts} retains it while writing the
7518
- * other named scripts independently.
7585
+ * step. `serve:build` accepts the server-only chain it ran before it delegated to `build`.
7586
+ * The value being written is always writable, so it is not repeated there. Any other value is a
7587
+ * script the workspace author customized, and {@link replaceManifestScripts} retains it while
7588
+ * writing the other named scripts independently.
7519
7589
  *
7520
7590
  * @example
7521
7591
  * ```ts
@@ -7601,8 +7671,8 @@ function blueprintToManifest(blueprint) {
7601
7671
  const targets = [...sheets, ...blueprint.themes ? ["styles/themes"] : []];
7602
7672
  const publishes = blueprint.src.length > 0 || targets.length > 0;
7603
7673
  const name = publishes ? `@orkestrel/${blueprint.name}` : blueprint.name;
7604
- const dependencies = Object.fromEntries([...blueprint.dependencies].sort((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name)).map((dependency) => [dependency.name, dependency.range]));
7605
- const peers = [...blueprint.peers].sort((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name));
7674
+ const dependencies = Object.fromEntries(blueprint.dependencies.toSorted((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name)).map((dependency) => [dependency.name, dependency.range]));
7675
+ const peers = blueprint.peers.toSorted((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name));
7606
7676
  const peerDependencies = Object.fromEntries(peers.map((peer) => [peer.name, peer.range]));
7607
7677
  const peerDependenciesMeta = Object.fromEntries(peers.filter((peer) => peer.optional === true).map((peer) => [peer.name, { optional: true }]));
7608
7678
  const entry = srcToEntry(blueprint.src);
@@ -7625,6 +7695,7 @@ function blueprintToManifest(blueprint) {
7625
7695
  files: [
7626
7696
  blueprint.bin || publishes ? "dist/src" : "dist/app",
7627
7697
  ...blueprint.bin ? ["dist/bin"] : [],
7698
+ ...blueprint.reporter ? ["dist/reporter"] : [],
7628
7699
  ...targets.map((face) => `!dist/src/${face}/index.js`),
7629
7700
  ...sheets.map((face) => `src/${face}/**/*.scss`),
7630
7701
  ...blueprint.themes && !blueprint.styles ? ["src/styles/themes/**/*.scss"] : [],
@@ -7681,7 +7752,7 @@ function blueprintToMachinery(blueprint) {
7681
7752
  return {
7682
7753
  browser: blueprint.src.includes("browser") || blueprint.app.includes("browser") || blueprint.setup.includes("browser") || blueprintToSheets(blueprint).length > 0 || blueprint.themes || frameworks.length > 0,
7683
7754
  frameworks,
7684
- output: blueprint.src.length > 0 || blueprint.bin || hosted || blueprintToSheets(blueprint).length > 0 || blueprint.themes,
7755
+ output: blueprint.src.length > 0 || blueprint.bin || blueprint.reporter || hosted || blueprintToSheets(blueprint).length > 0 || blueprint.themes,
7685
7756
  showcase: blueprint.showcase && (blueprint.base && blueprint.app.includes("browser") || blueprintToFaces(blueprint).some((extension) => extension.axes.includes("app")))
7686
7757
  };
7687
7758
  }
@@ -7779,6 +7850,7 @@ function blueprintToProjects(blueprint) {
7779
7850
  ...ENVIRONMENTS.filter((environment) => (axis !== "app" || environment !== "server") && blueprint[axis].includes(environment)).map((environment) => `${axis}:${environment}`),
7780
7851
  ...faces.filter((face) => face.axes.includes(axis)).map((face) => `${axis}:${face.name}`),
7781
7852
  ...axis === "src" && blueprint.bin ? ["src:bin"] : [],
7853
+ ...axis === "src" && blueprint.reporter ? ["src:reporter"] : [],
7782
7854
  ...axis === "app" && blueprint.app.includes("server") ? ["app:server"] : []
7783
7855
  ]),
7784
7856
  "policy",
@@ -7909,6 +7981,7 @@ function blueprintToRootVite(blueprint) {
7909
7981
  })) : [],
7910
7982
  ...planned.has("src:vue") ? [CONFIG_TEMPLATES.factories.src.vue] : [],
7911
7983
  ...planned.has("src:bin") ? [CONFIG_TEMPLATES.factories.src.bin] : [],
7984
+ ...planned.has("src:reporter") ? [CONFIG_TEMPLATES.factories.src.reporter] : [],
7912
7985
  ...planned.has("app:core") ? [CONFIG_TEMPLATES.factories.app.core] : [],
7913
7986
  ...planned.has("app:browser") ? [(0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.app.browser, {
7914
7987
  vuePlugin: machinery.frameworks.includes("vue") ? ", vue()" : "",
@@ -7944,6 +8017,7 @@ function blueprintToRootVite(blueprint) {
7944
8017
  ...planned.has("src:server") ? ["srcServer"] : [],
7945
8018
  ...planned.has("src:vue") ? ["srcVue"] : [],
7946
8019
  ...planned.has("src:bin") ? ["srcBin"] : [],
8020
+ ...planned.has("src:reporter") ? ["srcReporter"] : [],
7947
8021
  ...planned.has("app:core") ? ["appCore"] : [],
7948
8022
  ...planned.has("app:browser") ? ["appBrowser"] : [],
7949
8023
  ...planned.has("app:vue") ? ["appVue"] : [],
@@ -8057,7 +8131,7 @@ function blueprintToConfigArtifacts(blueprint) {
8057
8131
  environment,
8058
8132
  content: path === "configs/src/tsconfig.core.json" ? CONFIG_TEMPLATES.tsconfigs.src.core : path === "configs/src/vite.browser.config.ts" ? CONFIG_TEMPLATES.vites.src.browser : path === "configs/src/tsconfig.browser.json" ? CONFIG_TEMPLATES.tsconfigs.src.browser : path === "configs/src/vite.server.config.ts" ? CONFIG_TEMPLATES.vites.src.server : path === "configs/src/tsconfig.server.json" ? CONFIG_TEMPLATES.tsconfigs.src.server : CONFIG_TEMPLATES.vites.src.core
8059
8133
  }))).toArray();
8060
- const paths = blueprint.bin ? blueprint.src.map((environment) => `\t\t\t\t\t\t'@src/${environment}': '../src/${environment}/index.js',`) : [];
8134
+ const paths = blueprint.bin || blueprint.reporter ? blueprint.src.map((environment) => `\t\t\t\t\t\t'@src/${environment}': '../src/${environment}/index.js',`) : [];
8061
8135
  const renderedPaths = paths.length === 0 ? " paths: {}," : `\t\t\t\t\tpaths: {
8062
8136
  ${paths.join("\n")}
8063
8137
  },`;
@@ -8068,6 +8142,13 @@ ${paths.join("\n")}
8068
8142
  origin: "template",
8069
8143
  content: path === "configs/src/tsconfig.bin.json" ? CONFIG_TEMPLATES.tsconfigs.bin : (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.vites.bin, { paths: renderedPaths })
8070
8144
  })) : [];
8145
+ const reporters = blueprint.reporter ? REPORTER_CONFIGS.map((path) => ({
8146
+ path,
8147
+ group: "configs",
8148
+ ownership: "content",
8149
+ origin: "template",
8150
+ content: path === "configs/src/tsconfig.reporter.json" ? CONFIG_TEMPLATES.tsconfigs.reporter : (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.vites.reporter, { paths: renderedPaths })
8151
+ })) : [];
8071
8152
  const barrels = matchesBarrel(blueprint) ? BARREL_CONFIGS.map((path) => ({
8072
8153
  path,
8073
8154
  group: "configs",
@@ -8180,6 +8261,7 @@ ${paths.join("\n")}
8180
8261
  ...sheets,
8181
8262
  ...sources,
8182
8263
  ...bins,
8264
+ ...reporters,
8183
8265
  ...applications,
8184
8266
  ...barrels,
8185
8267
  ...faces,
@@ -8391,7 +8473,7 @@ function blueprintToTestArtifacts(blueprint) {
8391
8473
  environment: "browser",
8392
8474
  content: blueprint.journey ? ARTIFACT_TEMPLATES.tests.browser : ARTIFACT_TEMPLATES.tests.setup
8393
8475
  }] : [];
8394
- const servers = blueprint.src.includes("server") || blueprint.app.includes("server") || blueprint.bin || blueprint.conformance || blueprint.tree ? [{
8476
+ const servers = blueprint.src.includes("server") || blueprint.app.includes("server") || blueprint.bin || blueprint.reporter || blueprint.conformance || blueprint.tree ? [{
8395
8477
  path: "tests/setupServer.ts",
8396
8478
  group: "tests",
8397
8479
  ownership: "birth",
@@ -8455,6 +8537,13 @@ function blueprintToTestArtifacts(blueprint) {
8455
8537
  origin: "template",
8456
8538
  content: (0, _orkestrel_template.fillTemplate)(ARTIFACT_TEMPLATES.tests.bin, { import: matchesPrintWidth(joinedImport) ? joinedImport : `\t\tconst entry =\n\t\t\tawait import(${binSpecifier})` })
8457
8539
  }] : [];
8540
+ const reporters = blueprint.reporter ? [{
8541
+ path: "tests/src/reporter/main.test.ts",
8542
+ group: "tests",
8543
+ ownership: "birth",
8544
+ origin: "template",
8545
+ content: ARTIFACT_TEMPLATES.tests.reporter
8546
+ }] : [];
8458
8547
  const applications = Iterator.from(blueprint.app).map((environment) => ({
8459
8548
  path: `tests/app/${environment}/index.test.ts`,
8460
8549
  group: "tests",
@@ -8474,6 +8563,7 @@ function blueprintToTestArtifacts(blueprint) {
8474
8563
  origin: "template",
8475
8564
  content: (0, _orkestrel_template.fillTemplate)(distribution.module, {
8476
8565
  types: browser ? distribution.types : "",
8566
+ events: browser ? distribution.events : "",
8477
8567
  transport: browser ? distribution.transport : "",
8478
8568
  launcher: browser ? distribution.launcher : "",
8479
8569
  helpers: browser ? distribution.helpers : ""
@@ -8532,6 +8622,7 @@ function blueprintToTestArtifacts(blueprint) {
8532
8622
  ...journeys,
8533
8623
  ...sources,
8534
8624
  ...bins,
8625
+ ...reporters,
8535
8626
  ...applications,
8536
8627
  ...distributions,
8537
8628
  ...integrations
@@ -8568,6 +8659,10 @@ function blueprintToGuideArtifacts(blueprint) {
8568
8659
  directory: "src/bin",
8569
8660
  test: "tests/src/bin"
8570
8661
  }] : [],
8662
+ ...blueprint.reporter ? [{
8663
+ directory: "src/reporter",
8664
+ test: "tests/src/reporter"
8665
+ }] : [],
8571
8666
  ...[...blueprint.app, ...blueprintToFaces(blueprint).filter((extension) => extension.axes.includes("app")).map((extension) => extension.name)].map((environment) => ({
8572
8667
  directory: `app/${environment}`,
8573
8668
  test: `tests/app/${environment}`
@@ -8962,7 +9057,7 @@ function insertManifestDependencies(manifest, additions) {
8962
9057
  function insertManifestSection(manifest, section, dependencies, present) {
8963
9058
  const tokens = scanManifestTokens(manifest);
8964
9059
  if (tokens === void 0) return void 0;
8965
- const ordered = [...dependencies].sort((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name));
9060
+ const ordered = dependencies.toSorted((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name));
8966
9061
  const lines = ordered.map(({ name, range }) => `${JSON.stringify(name)}: ${JSON.stringify(range)}`);
8967
9062
  const sibling = section === "dependencies" ? "devDependencies" : "dependencies";
8968
9063
  const occurrences = tokens.flatMap((token, at) => {
@@ -9694,6 +9789,7 @@ function createBlueprint(name, input) {
9694
9789
  engines: input?.engines ?? ">=22.18.0",
9695
9790
  overrides: input?.overrides ?? [],
9696
9791
  bin: input?.bin ?? false,
9792
+ reporter: input?.reporter ?? false,
9697
9793
  setup: input?.setup ?? [],
9698
9794
  guides: input?.guides ?? false,
9699
9795
  integration: input?.integration ?? false,
@@ -10012,7 +10108,6 @@ var Compiler = class {
10012
10108
  }
10013
10109
  };
10014
10110
  exports.APP_BROWSER_DEV_DEPENDENCIES = APP_BROWSER_DEV_DEPENDENCIES;
10015
- exports.APP_DEV_DEPENDENCIES = APP_DEV_DEPENDENCIES;
10016
10111
  exports.APP_MATRIX = APP_MATRIX;
10017
10112
  exports.APP_SERVER_DEV_DEPENDENCIES = APP_SERVER_DEV_DEPENDENCIES;
10018
10113
  exports.ARTIFACT_GROUPS = ARTIFACT_GROUPS;
@@ -10081,6 +10176,9 @@ exports.ORKESTREL_RANGE_PATTERN = ORKESTREL_RANGE_PATTERN;
10081
10176
  exports.PRINT_WIDTH = PRINT_WIDTH;
10082
10177
  exports.REFERENCE_PATHS = REFERENCE_PATHS;
10083
10178
  exports.RELEASE_PROOF_COMMAND = RELEASE_PROOF_COMMAND;
10179
+ exports.REPORTER_CONFIGS = REPORTER_CONFIGS;
10180
+ exports.REPORTER_ENTRY_PATH = REPORTER_ENTRY_PATH;
10181
+ exports.REPORTER_OUTPUT_PATH = REPORTER_OUTPUT_PATH;
10084
10182
  exports.RESERVED_SHEET_NAMES = RESERVED_SHEET_NAMES;
10085
10183
  exports.SEED_GUIDE_PATHS = SEED_GUIDE_PATHS;
10086
10184
  exports.SERVICE_SCRIPT_PATH = SERVICE_SCRIPT_PATH;