@orkestrel/scaffold 0.0.132 → 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 (86) 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 +30 -6
  25. package/dist/bin/main.js.map +1 -1
  26. package/dist/host/agents/orchestration.md +1 -0
  27. package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +81 -97
  28. package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +64 -72
  29. package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +41 -63
  30. package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +56 -79
  31. package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +61 -74
  32. package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +59 -89
  33. package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +87 -106
  34. package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +57 -76
  35. package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +73 -88
  36. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +2 -2
  37. package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +167 -119
  38. package/dist/host/agents/skills/orkestrel-harden/references/methods.md +1 -1
  39. package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +58 -75
  40. package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +55 -99
  41. package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +59 -90
  42. package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +60 -80
  43. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +4 -4
  44. package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +71 -108
  45. package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1288 -239
  46. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +10 -6
  47. package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +58 -79
  48. package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +66 -87
  49. package/dist/host/agents/skills/orkestrel-publish/scripts/steps.ts +84 -102
  50. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +92 -99
  51. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +130 -126
  52. package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +82 -120
  53. package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
  54. package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +85 -112
  55. package/dist/host/claude/agents/orkestrel.md +54 -54
  56. package/dist/host/claude/rules/documentation.md +1 -1
  57. package/dist/host/claude/rules/patterns.md +5 -4
  58. package/dist/host/claude/rules/styles.md +1 -1
  59. package/dist/host/claude/rules/tests.md +8 -3
  60. package/dist/host/claude/rules/workspace.md +47 -35
  61. package/dist/host/configs/helpers.ts +40 -15
  62. package/dist/host/dotfiles/oxlintrc.json +62 -0
  63. package/dist/host/guides/browser.md +1 -1
  64. package/dist/host/guides/form.md +79 -4
  65. package/dist/host/guides/queue.md +3 -1
  66. package/dist/host/guides/scaffold.md +95 -67
  67. package/dist/host/guides/table.md +20 -6
  68. package/dist/host/guides/test.md +342 -202
  69. package/dist/host/guides/workflow.md +4 -2
  70. package/dist/host/manifest.json +48 -48
  71. package/dist/host/tests/config.test.ts +201 -11
  72. package/dist/host/tests/policy.test.ts +15 -22
  73. package/dist/host/tests/setupPolicy.ts +43 -36
  74. package/dist/src/core/index.cjs +194 -97
  75. package/dist/src/core/index.cjs.map +1 -1
  76. package/dist/src/core/index.d.cts +27 -13
  77. package/dist/src/core/index.d.ts +27 -13
  78. package/dist/src/core/index.js +192 -97
  79. package/dist/src/core/index.js.map +1 -1
  80. package/dist/src/server/index.cjs +8 -9
  81. package/dist/src/server/index.cjs.map +1 -1
  82. package/dist/src/server/index.d.cts +1 -1
  83. package/dist/src/server/index.d.ts +1 -1
  84. package/dist/src/server/index.js +8 -9
  85. package/dist/src/server/index.js.map +1 -1
  86. package/package.json +5 -5
@@ -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.132",
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",
@@ -105,11 +105,11 @@ var package_default = {
105
105
  },
106
106
  devDependencies: {
107
107
  "@microsoft/api-extractor": "^7.60.1",
108
- "@orkestrel/browser": "^0.0.32",
109
- "@orkestrel/guide": "^0.0.30",
108
+ "@orkestrel/browser": "^0.0.33",
109
+ "@orkestrel/guide": "^0.0.31",
110
110
  "@orkestrel/html": "^0.0.16",
111
- "@orkestrel/probe": "^0.0.29",
112
- "@orkestrel/test": "^0.0.34",
111
+ "@orkestrel/probe": "^0.0.30",
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({
@@ -1703,7 +1749,6 @@ export function studies(override?: UserConfig): UserConfig {
1703
1749
  browser: { enabled: false },
1704
1750
  testTimeout: 120_000,
1705
1751
  hookTimeout: 120_000,
1706
- fileParallelism: false,
1707
1752
  sequence: { groupOrder: 1 },
1708
1753
  },
1709
1754
  }
@@ -1938,6 +1983,25 @@ export function probe(override?: UserConfig): UserConfig {
1938
1983
  "../../src/bin/**/*.tsx"
1939
1984
  ]
1940
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
+ }
1941
2005
  `,
1942
2006
  skills: `{
1943
2007
  "extends": "../../tsconfig.json",
@@ -2103,6 +2167,29 @@ export default defineConfig(
2103
2167
  },
2104
2168
  }),
2105
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
+ )
2106
2193
  `,
2107
2194
  app: Object.freeze({
2108
2195
  vue: `import { defineConfig } from 'vite'
@@ -2703,12 +2790,22 @@ describe('bin entry', () => {
2703
2790
  expect(Object.keys(entry)).toStrictEqual([])
2704
2791
  })
2705
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
+ })
2706
2802
  `,
2707
2803
  distribution: Object.freeze({
2708
2804
  module: `{{types}}import type { SpawnSyncReturns } from 'node:child_process'
2709
2805
  import type { TestContext } from 'vitest'
2806
+ import { arrayOf, isArray, isRecord, isString } from '@orkestrel/contract'
2710
2807
  import { spawnSync } from 'node:child_process'
2711
- import {
2808
+ {{events}}import {
2712
2809
  existsSync,
2713
2810
  mkdirSync,
2714
2811
  mkdtempSync,
@@ -2955,39 +3052,6 @@ export interface DistributionStage {
2955
3052
  readonly targets: readonly string[]
2956
3053
  }
2957
3054
 
2958
- /**
2959
- * Checks whether a value is a non-null object other than an array.
2960
- *
2961
- * @param value - The value to inspect.
2962
- * @returns True if the value is a record; false otherwise.
2963
- */
2964
- export function isDistributionRecord(value: unknown): value is Readonly<Record<string, unknown>> {
2965
- return typeof value === 'object' && value !== null && !Array.isArray(value)
2966
- }
2967
-
2968
- /**
2969
- * Checks whether a value is an array of strings.
2970
- *
2971
- * @param value - The value to inspect.
2972
- * @returns True if every array member is a string; false otherwise.
2973
- */
2974
- export function isDistributionNames(value: unknown): value is readonly string[] {
2975
- return Array.isArray(value) && value.every((name) => typeof name === 'string')
2976
- }
2977
-
2978
- // A fallback list, which is what Node reads an array in an exports entry as. The
2979
- // narrowing is what the following walkers need: \`Array.isArray\` widens an \`unknown\`
2980
- // member to \`any\`, and an entry read that way is not read at all.
2981
- /**
2982
- * Checks whether a value is a fallback array.
2983
- *
2984
- * @param value - The value to inspect.
2985
- * @returns True if the value is an array; false otherwise.
2986
- */
2987
- export function isDistributionList(value: unknown): value is readonly unknown[] {
2988
- return Array.isArray(value)
2989
- }
2990
-
2991
3055
  // Whether a string is a valid package target. Node rejects a target outside the
2992
3056
  // package and a target containing a dot, parent, or node_modules segment during
2993
3057
  // package-target resolution. A later module-resolution failure is not the same
@@ -3032,7 +3096,7 @@ export function readDistributionJSON(path: string): unknown {
3032
3096
  */
3033
3097
  export function readDistributionManifestName(path: string): string {
3034
3098
  const manifest = readDistributionJSON(path)
3035
- if (!isDistributionRecord(manifest) || typeof manifest.name !== 'string') {
3099
+ if (!isRecord(manifest) || typeof manifest.name !== 'string') {
3036
3100
  throw new Error(\`The manifest at \${path} declares no package name\`)
3037
3101
  }
3038
3102
  return manifest.name
@@ -3049,19 +3113,17 @@ export function readDistributionManifestName(path: string): string {
3049
3113
  */
3050
3114
  export function readDistributionPeers(path: string): Readonly<Record<string, string>> {
3051
3115
  const manifest = readDistributionJSON(path)
3052
- if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.peerDependencies)) {
3116
+ if (!isRecord(manifest) || !isRecord(manifest.peerDependencies)) {
3053
3117
  return {}
3054
3118
  }
3055
- const meta = isDistributionRecord(manifest.peerDependenciesMeta)
3056
- ? manifest.peerDependenciesMeta
3057
- : undefined
3119
+ const meta = isRecord(manifest.peerDependenciesMeta) ? manifest.peerDependenciesMeta : undefined
3058
3120
  const peers = Object.entries(manifest.peerDependencies).filter(
3059
3121
  (entry): entry is [string, string] => typeof entry[1] === 'string',
3060
3122
  )
3061
3123
  return Object.fromEntries(
3062
3124
  peers.filter(([name]) => {
3063
3125
  const entry = meta?.[name]
3064
- return !isDistributionRecord(entry) || entry.optional !== true
3126
+ return !isRecord(entry) || entry.optional !== true
3065
3127
  }),
3066
3128
  )
3067
3129
  }
@@ -3076,7 +3138,7 @@ export function createDistributionConsumerManifest(
3076
3138
  peers: Readonly<Record<string, string>>,
3077
3139
  ): string {
3078
3140
  const manifest: unknown = JSON.parse(DISTRIBUTION_CONSUMER_MANIFEST)
3079
- if (Object.keys(peers).length === 0 || !isDistributionRecord(manifest)) {
3141
+ if (Object.keys(peers).length === 0 || !isRecord(manifest)) {
3080
3142
  return DISTRIBUTION_CONSUMER_MANIFEST
3081
3143
  }
3082
3144
  return \`\${JSON.stringify({ ...manifest, dependencies: peers })}\\n\`
@@ -3197,7 +3259,7 @@ export function resolveDistributionPackageTarget(
3197
3259
  conditions: readonly string[],
3198
3260
  ): DistributionTargetResult | undefined {
3199
3261
  if (typeof entry === 'string') return { target: entry }
3200
- if (isDistributionList(entry)) {
3262
+ if (isArray(entry)) {
3201
3263
  for (const member of entry) {
3202
3264
  const resolved = resolveDistributionPackageTarget(member, conditions)
3203
3265
  if (resolved !== undefined && matchesDistributionPackageTarget(resolved.target))
@@ -3205,7 +3267,7 @@ export function resolveDistributionPackageTarget(
3205
3267
  }
3206
3268
  return undefined
3207
3269
  }
3208
- if (!isDistributionRecord(entry)) return undefined
3270
+ if (!isRecord(entry)) return undefined
3209
3271
  for (const [condition, nested] of Object.entries(entry)) {
3210
3272
  if (condition !== 'default' && !conditions.includes(condition)) continue
3211
3273
  const resolved = resolveDistributionPackageTarget(nested, conditions)
@@ -3290,14 +3352,14 @@ export function resolveDistributionDeclaration(
3290
3352
  installed: string,
3291
3353
  ): string | undefined {
3292
3354
  if (typeof entry === 'string') return targetToDistributionDeclaration(entry, installed)
3293
- if (isDistributionList(entry)) {
3355
+ if (isArray(entry)) {
3294
3356
  for (const member of entry) {
3295
3357
  const resolved = resolveDistributionDeclaration(member, conditions, installed)
3296
3358
  if (resolved !== undefined) return resolved
3297
3359
  }
3298
3360
  return undefined
3299
3361
  }
3300
- if (!isDistributionRecord(entry)) return undefined
3362
+ if (!isRecord(entry)) return undefined
3301
3363
  for (const [condition, nested] of Object.entries(entry)) {
3302
3364
  if (condition !== 'default' && !conditions.includes(condition)) continue
3303
3365
  const resolved = resolveDistributionDeclaration(nested, conditions, installed)
@@ -3330,7 +3392,7 @@ export function readDistributionPackageType(installed: string, target: string):
3330
3392
  if (scope === undefined) return undefined
3331
3393
  try {
3332
3394
  const manifest = readDistributionJSON(join(scope, 'package.json'))
3333
- return isDistributionRecord(manifest) ? manifest.type : undefined
3395
+ return isRecord(manifest) ? manifest.type : undefined
3334
3396
  } catch {
3335
3397
  return undefined
3336
3398
  }
@@ -3407,9 +3469,9 @@ export function declaresDistributionCommonJS(entry: unknown, installed: string):
3407
3469
  */
3408
3470
  export function collectDistributionTargets(entry: unknown): readonly string[] {
3409
3471
  if (typeof entry === 'string') return [entry]
3410
- if (isDistributionList(entry))
3472
+ if (isArray(entry))
3411
3473
  return entry.flatMap(collectDistributionTargets).filter(matchesDistributionPackageTarget)
3412
- if (!isDistributionRecord(entry)) return []
3474
+ if (!isRecord(entry)) return []
3413
3475
  return Object.values(entry).flatMap((nested) => collectDistributionTargets(nested))
3414
3476
  }
3415
3477
 
@@ -3540,7 +3602,7 @@ export function filterDistributionUntypable(
3540
3602
  return entries.filter(
3541
3603
  (entry) =>
3542
3604
  entry.requirable &&
3543
- isDistributionRecord(entry.mapping) &&
3605
+ isRecord(entry.mapping) &&
3544
3606
  Object.hasOwn(entry.mapping, 'require') &&
3545
3607
  !declaresDistributionCommonJS(entry.mapping, installed),
3546
3608
  )
@@ -3730,7 +3792,7 @@ export function driveDistributionRuntime(
3730
3792
  )
3731
3793
  }
3732
3794
  const published: unknown = JSON.parse(result.stdout)
3733
- if (!isDistributionNames(published))
3795
+ if (!arrayOf(isString)(published))
3734
3796
  throw new Error(\`The driver printed no name list for \${specifier}\`)
3735
3797
  return published
3736
3798
  }
@@ -3776,7 +3838,7 @@ export function buildDistributionStage(scratch: string): DistributionStage {
3776
3838
  const name = readDistributionManifestName(join(DISTRIBUTION_ROOT, 'package.json'))
3777
3839
  const installed = join(consumer, 'node_modules', ...name.split('/'))
3778
3840
  const manifest = readDistributionJSON(join(installed, 'package.json'))
3779
- if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.exports)) {
3841
+ if (!isRecord(manifest) || !isRecord(manifest.exports)) {
3780
3842
  throw new Error('The installed manifest publishes no exports map')
3781
3843
  }
3782
3844
  return { consumer, installed, archives, ...classifyDistributionStage(manifest, installed, name) }
@@ -3871,7 +3933,7 @@ export function classifyDistributionStage(
3871
3933
  installed: string,
3872
3934
  name: string,
3873
3935
  ): DistributionClassification {
3874
- if (!isDistributionRecord(manifest.exports))
3936
+ if (!isRecord(manifest.exports))
3875
3937
  throw new Error('The installed manifest publishes no exports map')
3876
3938
  const readings = Object.entries(manifest.exports).map(([subpath, mapping]) => {
3877
3939
  const files = collectDistributionTargets(mapping)
@@ -3961,8 +4023,8 @@ export function readDistributionFace(installed: string, path: string): string |
3961
4023
  return output === 'dist'
3962
4024
  ? axis === 'src'
3963
4025
  ? face
3964
- : axis === 'bin'
3965
- ? 'bin'
4026
+ : axis === 'bin' || axis === 'reporter'
4027
+ ? axis
3966
4028
  : undefined
3967
4029
  : undefined
3968
4030
  }
@@ -4050,8 +4112,8 @@ export function scanDistributionSourceMaps(installed: string): readonly string[]
4050
4112
  : Buffer.from(payload[2], 'base64').toString('utf8'),
4051
4113
  )
4052
4114
  if (
4053
- !isDistributionRecord(map) ||
4054
- !isDistributionNames(map.sources) ||
4115
+ !isRecord(map) ||
4116
+ !arrayOf(isString)(map.sources) ||
4055
4117
  (map.sourceRoot !== undefined && typeof map.sourceRoot !== 'string')
4056
4118
  ) {
4057
4119
  throw new Error('Unreadable source map')
@@ -4217,8 +4279,7 @@ export function checkDistributionManifest(installed: string, scratch: string): r
4217
4279
  if (result.status !== 0)
4218
4280
  throw new Error(\`npm pkg fix failed: \${readDistributionOutput(result)}\`)
4219
4281
  const after = readDistributionJSON(path)
4220
- if (!isDistributionRecord(before) || !isDistributionRecord(after))
4221
- throw new Error('Unreadable manifest')
4282
+ if (!isRecord(before) || !isRecord(after)) throw new Error('Unreadable manifest')
4222
4283
  return [...new Set([...Object.keys(before), ...Object.keys(after)])]
4223
4284
  .filter((key) => !isDeepStrictEqual(before[key], after[key]))
4224
4285
  .sort()
@@ -4270,7 +4331,7 @@ export function buildDistributionCases(
4270
4331
  writeDistributionFile(join(root, 'module/package.json'), '{ "type": "module" }\\n')
4271
4332
  writeDistributionFile(join(root, 'commonjs/package.json'), '{ "type": "commonjs" }\\n')
4272
4333
  const manifest = readDistributionJSON(join(root, 'package.json'))
4273
- if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.exports)) {
4334
+ if (!isRecord(manifest) || !isRecord(manifest.exports)) {
4274
4335
  throw new Error('The classifier fixture declares no exports map')
4275
4336
  }
4276
4337
  const mappings = manifest.exports
@@ -4395,7 +4456,7 @@ export function buildDistributionCases(
4395
4456
  },
4396
4457
  expected: {
4397
4458
  undeclared: [],
4398
- partitioned: [...stage.subpaths].sort(),
4459
+ partitioned: stage.subpaths.toSorted(),
4399
4460
  unreachable: [],
4400
4461
  untypable: [],
4401
4462
  },
@@ -4541,6 +4602,8 @@ describe('installed package consumer', () => {
4541
4602
  })
4542
4603
  }
4543
4604
  {{guard}}{{drive}}})
4605
+ `,
4606
+ events: `import { once } from 'node:events'
4544
4607
  `,
4545
4608
  transport: `import { createServer } from 'node:http'
4546
4609
  `,
@@ -4669,9 +4732,8 @@ export async function readDistributionBrowserExports(
4669
4732
  response.end(readFileSync(path))
4670
4733
  })
4671
4734
  try {
4672
- await new Promise<void>((settle) => {
4673
- server.listen(0, '127.0.0.1', settle)
4674
- })
4735
+ server.listen(0, '127.0.0.1')
4736
+ await once(server, 'listening')
4675
4737
  const address = server.address()
4676
4738
  if (address === null || typeof address === 'string') {
4677
4739
  throw new Error('The bundle server bound no port')
@@ -4682,8 +4744,7 @@ export async function readDistributionBrowserExports(
4682
4744
  await page.goto(\`http://127.0.0.1:\${String(address.port)}/\`, { waitUntil: 'load' })
4683
4745
  const published: unknown = await page.evaluate('globalThis.subject')
4684
4746
  if (failures.length > 0) throw new Error(\`The bundle raised \${failures.join(' | ')}\`)
4685
- if (!isDistributionNames(published))
4686
- 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')
4687
4748
  return published
4688
4749
  } finally {
4689
4750
  server.close()
@@ -5235,6 +5296,7 @@ var isBlueprint = (0, _orkestrel_contract.recordOf)({
5235
5296
  engines: _orkestrel_contract.isString,
5236
5297
  overrides: (0, _orkestrel_contract.andOf)(isCollection, (0, _orkestrel_contract.arrayOf)(isOverride)),
5237
5298
  bin: _orkestrel_contract.isBoolean,
5299
+ reporter: _orkestrel_contract.isBoolean,
5238
5300
  setup: (0, _orkestrel_contract.andOf)(isCollection, (0, _orkestrel_contract.arrayOf)((0, _orkestrel_contract.literalOf)("node", "browser"))),
5239
5301
  guides: _orkestrel_contract.isBoolean,
5240
5302
  integration: _orkestrel_contract.isBoolean,
@@ -6954,9 +7016,10 @@ function blueprintToSheets(blueprint) {
6954
7016
  return [...blueprint.styles ? ["styles"] : [], ...(0, _orkestrel_contract.sortValues)(blueprint.extensions.flatMap((extension) => extension.surface === "styles" && isSheetName(extension.name) ? [extension.name] : []))];
6955
7017
  }
6956
7018
  /**
6957
- * Projects published environments and sheets into the manifest export map.
7019
+ * Projects published environments, sheets, and the reporter entry into the manifest export map.
6958
7020
  * @param blueprint - The workspace specification.
6959
- * @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.
6960
7023
  * @example
6961
7024
  * ```ts
6962
7025
  * import { blueprintToExports, createBlueprint } from '@orkestrel/scaffold'
@@ -6972,7 +7035,8 @@ function blueprintToExports(blueprint) {
6972
7035
  const face = [`./${extension.name}`, pathToCondition(`./dist/src/${extension.name}/index`, ["es"])];
6973
7036
  return blueprint.src.includes("browser") ? [face, ["./browser", pathToCondition("./dist/src/browser/index", ["es"])]] : [face];
6974
7037
  })),
6975
- ...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"]) } : {}
6976
7040
  };
6977
7041
  return Object.keys(exported).length > 0 ? {
6978
7042
  ...exported,
@@ -7146,9 +7210,8 @@ function blueprintToDevDependencies(blueprint) {
7146
7210
  ...rendered && !BROWSE_UPSTREAM.includes(own) ? BROWSE_DEV_DEPENDENCIES : {},
7147
7211
  ...blueprint.journey && blueprint.app.includes("browser") && (blueprint.base || blueprintToFaces(blueprint).some((extension) => extension.axes.includes("app"))) && !CAPTURE_UPSTREAM.includes(own) ? CAPTURE_DEV_DEPENDENCIES : {},
7148
7212
  ...sheets ? STYLES_DEV_DEPENDENCIES : {},
7149
- ...blueprint.src.length > 0 || blueprint.bin ? DECLARATION_DEV_DEPENDENCIES : {},
7213
+ ...blueprint.src.length > 0 || blueprint.bin || blueprint.reporter ? DECLARATION_DEV_DEPENDENCIES : {},
7150
7214
  ...blueprint.src.includes("browser") || blueprint.setup.includes("browser") || sheets ? SOURCE_BROWSER_DEV_DEPENDENCIES : {},
7151
- ...blueprint.app.length > 0 ? APP_DEV_DEPENDENCIES : {},
7152
7215
  ...blueprint.app.includes("browser") ? APP_BROWSER_DEV_DEPENDENCIES : {},
7153
7216
  ...blueprint.app.includes("server") ? APP_SERVER_DEV_DEPENDENCIES : {},
7154
7217
  ...Object.fromEntries(blueprintToMachinery(blueprint).frameworks.flatMap((framework) => Object.entries(FRAMEWORK_MATRIX[framework].dependencies))),
@@ -7340,7 +7403,7 @@ function blueprintToScripts(blueprint) {
7340
7403
  const checker = application.includes("vue") ? FRAMEWORK_MATRIX.vue.checker : "tsc";
7341
7404
  const publishes = blueprint.src.length > 0 || targets.length > 0;
7342
7405
  const integrates = blueprint.integration;
7343
- const compiles = publishes || blueprint.bin;
7406
+ const compiles = publishes || blueprint.bin || blueprint.reporter;
7344
7407
  const runtime = blueprint.app.filter((environment) => environment !== "core" && (environment !== "browser" || base));
7345
7408
  const vitest = "vitest run --config vite.config.ts --no-cache --reporter=dot";
7346
7409
  const built = [...runtime, ...application].flatMap((environment) => environment === "server" && matchesBarrel(blueprint) ? [environment, "barrel"] : [environment]);
@@ -7348,7 +7411,8 @@ function blueprintToScripts(blueprint) {
7348
7411
  ...blueprint.src,
7349
7412
  ...source,
7350
7413
  ...sheets,
7351
- ...blueprint.bin ? ["bin"] : []
7414
+ ...blueprint.bin ? ["bin"] : [],
7415
+ ...blueprint.reporter ? ["reporter"] : []
7352
7416
  ].map((name) => `npm run check:src:${name}`);
7353
7417
  const journey = `vitest run --config ${JOURNEY_CONFIG_PATH} --no-cache --reporter=dot`;
7354
7418
  const showcase = `vite --config ${SHOWCASE_CONFIG_PATH}`;
@@ -7370,6 +7434,7 @@ function blueprintToScripts(blueprint) {
7370
7434
  "check:src": checks.join(" && "),
7371
7435
  ...Object.fromEntries(Iterator.from(blueprint.src).map((environment) => [`check:src:${environment}`, `tsc --noEmit -p configs/src/tsconfig.${environment}.json`]).toArray()),
7372
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" } : {},
7373
7438
  ...Object.fromEntries([...sheets, ...source].map((name) => [`check:src:${name}`, `tsc --noEmit -p configs/src/tsconfig.${name}.json`]))
7374
7439
  } : {},
7375
7440
  ...blueprint.app.length > 0 ? {
@@ -7394,14 +7459,16 @@ function blueprintToScripts(blueprint) {
7394
7459
  ...!publishes && blueprint.service ? ["npm run test:service"] : []
7395
7460
  ].join(" && "),
7396
7461
  ...compiles ? {
7397
- "test:src": [...blueprint.src.length > 0 || blueprint.bin ? [[
7462
+ "test:src": [...blueprint.src.length > 0 || blueprint.bin || blueprint.reporter ? [[
7398
7463
  vitest,
7399
7464
  ...blueprint.src.map((environment) => `--project ${SRC_MATRIX[environment].project}`),
7400
7465
  ...source.map((name) => `--project src:${name}`),
7401
- ...blueprint.bin ? ["--project src:bin"] : []
7466
+ ...blueprint.bin ? ["--project src:bin"] : [],
7467
+ ...blueprint.reporter ? ["--project src:reporter"] : []
7402
7468
  ].join(" ")] : [], ...targets.map((name) => `npm run test:src:${name}`)].join(" && "),
7403
7469
  ...Object.fromEntries(Iterator.from(blueprint.src).map((environment) => [`test:src:${environment}`, `${vitest} --project ${SRC_MATRIX[environment].project}`]).toArray()),
7404
7470
  ...blueprint.bin ? { "test:src:bin": `${vitest} --project src:bin` } : {},
7471
+ ...blueprint.reporter ? { "test:src:reporter": `${vitest} --project src:reporter` } : {},
7405
7472
  ...Object.fromEntries(source.map((name) => [`test:src:${name}`, `${vitest} --project src:${name}`])),
7406
7473
  ...Object.fromEntries(targets.map((name) => [`test:src:${name}`, `npm run build:src:${name} && ${vitest} --project src:${name}`]))
7407
7474
  } : {},
@@ -7448,10 +7515,12 @@ function blueprintToScripts(blueprint) {
7448
7515
  ...blueprint.src.map((environment) => `npm run build:src:${environment}`),
7449
7516
  ...source.map((name) => `npm run build:src:${name}`),
7450
7517
  ...targets.map((name) => `npm run build:src:${name}`),
7451
- ...blueprint.bin ? ["npm run build:src:bin"] : []
7518
+ ...blueprint.bin ? ["npm run build:src:bin"] : [],
7519
+ ...blueprint.reporter ? ["npm run build:src:reporter"] : []
7452
7520
  ].join(" && "),
7453
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()),
7454
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" } : {},
7455
7524
  ...Object.fromEntries(source.map((name) => [`build:src:${name}`, `vite build --config configs/src/vite.${name}.config.ts`])),
7456
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(" && ")]))
7457
7526
  } : {},
@@ -7494,9 +7563,9 @@ function blueprintToScripts(blueprint) {
7494
7563
  * Every direct `test:<project>` script is writable, together with the probe and
7495
7564
  * benchmark workbench scripts. A workspace carrying guides adds `test:guides`,
7496
7565
  * whose package-owned entry runs the guides project and handles explicit parity
7497
- * rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication lifecycle scripts.
7498
- * Sheet and framework faces add their check and build scripts, application frameworks add dev scripts,
7499
- * 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.
7500
7569
  * A base browser application's journey axis also adds `journey` and `capture`, and each
7501
7570
  * app-side browser face adds `journey:<name>` and `capture:<name>`. Their generated
7502
7571
  * commands are writable and have no predecessor forms; customized values remain caller-owned.
@@ -7513,10 +7582,10 @@ function blueprintToScripts(blueprint) {
7513
7582
  * existed. The pack hook accepts the build chain emitted before it
7514
7583
  * delegated to `build`. The publication hook accepts the same gate chain without
7515
7584
  * {@link RELEASE_PROOF_COMMAND}. No accepted publication chain carries a study
7516
- * step. `serve:build` accepts the server-only chain it ran before it delegated to
7517
- * `build`. The value being written is always writable, so it is not repeated there. Any other value is a script the workspace author
7518
- * customized, and {@link replaceManifestScripts} retains it while writing the
7519
- * 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.
7520
7589
  *
7521
7590
  * @example
7522
7591
  * ```ts
@@ -7602,8 +7671,8 @@ function blueprintToManifest(blueprint) {
7602
7671
  const targets = [...sheets, ...blueprint.themes ? ["styles/themes"] : []];
7603
7672
  const publishes = blueprint.src.length > 0 || targets.length > 0;
7604
7673
  const name = publishes ? `@orkestrel/${blueprint.name}` : blueprint.name;
7605
- const dependencies = Object.fromEntries([...blueprint.dependencies].sort((left, right) => (0, _orkestrel_contract.comparePrimitives)(left.name, right.name)).map((dependency) => [dependency.name, dependency.range]));
7606
- 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));
7607
7676
  const peerDependencies = Object.fromEntries(peers.map((peer) => [peer.name, peer.range]));
7608
7677
  const peerDependenciesMeta = Object.fromEntries(peers.filter((peer) => peer.optional === true).map((peer) => [peer.name, { optional: true }]));
7609
7678
  const entry = srcToEntry(blueprint.src);
@@ -7626,6 +7695,7 @@ function blueprintToManifest(blueprint) {
7626
7695
  files: [
7627
7696
  blueprint.bin || publishes ? "dist/src" : "dist/app",
7628
7697
  ...blueprint.bin ? ["dist/bin"] : [],
7698
+ ...blueprint.reporter ? ["dist/reporter"] : [],
7629
7699
  ...targets.map((face) => `!dist/src/${face}/index.js`),
7630
7700
  ...sheets.map((face) => `src/${face}/**/*.scss`),
7631
7701
  ...blueprint.themes && !blueprint.styles ? ["src/styles/themes/**/*.scss"] : [],
@@ -7682,7 +7752,7 @@ function blueprintToMachinery(blueprint) {
7682
7752
  return {
7683
7753
  browser: blueprint.src.includes("browser") || blueprint.app.includes("browser") || blueprint.setup.includes("browser") || blueprintToSheets(blueprint).length > 0 || blueprint.themes || frameworks.length > 0,
7684
7754
  frameworks,
7685
- 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,
7686
7756
  showcase: blueprint.showcase && (blueprint.base && blueprint.app.includes("browser") || blueprintToFaces(blueprint).some((extension) => extension.axes.includes("app")))
7687
7757
  };
7688
7758
  }
@@ -7780,6 +7850,7 @@ function blueprintToProjects(blueprint) {
7780
7850
  ...ENVIRONMENTS.filter((environment) => (axis !== "app" || environment !== "server") && blueprint[axis].includes(environment)).map((environment) => `${axis}:${environment}`),
7781
7851
  ...faces.filter((face) => face.axes.includes(axis)).map((face) => `${axis}:${face.name}`),
7782
7852
  ...axis === "src" && blueprint.bin ? ["src:bin"] : [],
7853
+ ...axis === "src" && blueprint.reporter ? ["src:reporter"] : [],
7783
7854
  ...axis === "app" && blueprint.app.includes("server") ? ["app:server"] : []
7784
7855
  ]),
7785
7856
  "policy",
@@ -7910,6 +7981,7 @@ function blueprintToRootVite(blueprint) {
7910
7981
  })) : [],
7911
7982
  ...planned.has("src:vue") ? [CONFIG_TEMPLATES.factories.src.vue] : [],
7912
7983
  ...planned.has("src:bin") ? [CONFIG_TEMPLATES.factories.src.bin] : [],
7984
+ ...planned.has("src:reporter") ? [CONFIG_TEMPLATES.factories.src.reporter] : [],
7913
7985
  ...planned.has("app:core") ? [CONFIG_TEMPLATES.factories.app.core] : [],
7914
7986
  ...planned.has("app:browser") ? [(0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.factories.app.browser, {
7915
7987
  vuePlugin: machinery.frameworks.includes("vue") ? ", vue()" : "",
@@ -7945,6 +8017,7 @@ function blueprintToRootVite(blueprint) {
7945
8017
  ...planned.has("src:server") ? ["srcServer"] : [],
7946
8018
  ...planned.has("src:vue") ? ["srcVue"] : [],
7947
8019
  ...planned.has("src:bin") ? ["srcBin"] : [],
8020
+ ...planned.has("src:reporter") ? ["srcReporter"] : [],
7948
8021
  ...planned.has("app:core") ? ["appCore"] : [],
7949
8022
  ...planned.has("app:browser") ? ["appBrowser"] : [],
7950
8023
  ...planned.has("app:vue") ? ["appVue"] : [],
@@ -8058,7 +8131,7 @@ function blueprintToConfigArtifacts(blueprint) {
8058
8131
  environment,
8059
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
8060
8133
  }))).toArray();
8061
- 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',`) : [];
8062
8135
  const renderedPaths = paths.length === 0 ? " paths: {}," : `\t\t\t\t\tpaths: {
8063
8136
  ${paths.join("\n")}
8064
8137
  },`;
@@ -8069,6 +8142,13 @@ ${paths.join("\n")}
8069
8142
  origin: "template",
8070
8143
  content: path === "configs/src/tsconfig.bin.json" ? CONFIG_TEMPLATES.tsconfigs.bin : (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.vites.bin, { paths: renderedPaths })
8071
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
+ })) : [];
8072
8152
  const barrels = matchesBarrel(blueprint) ? BARREL_CONFIGS.map((path) => ({
8073
8153
  path,
8074
8154
  group: "configs",
@@ -8181,6 +8261,7 @@ ${paths.join("\n")}
8181
8261
  ...sheets,
8182
8262
  ...sources,
8183
8263
  ...bins,
8264
+ ...reporters,
8184
8265
  ...applications,
8185
8266
  ...barrels,
8186
8267
  ...faces,
@@ -8392,7 +8473,7 @@ function blueprintToTestArtifacts(blueprint) {
8392
8473
  environment: "browser",
8393
8474
  content: blueprint.journey ? ARTIFACT_TEMPLATES.tests.browser : ARTIFACT_TEMPLATES.tests.setup
8394
8475
  }] : [];
8395
- 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 ? [{
8396
8477
  path: "tests/setupServer.ts",
8397
8478
  group: "tests",
8398
8479
  ownership: "birth",
@@ -8456,6 +8537,13 @@ function blueprintToTestArtifacts(blueprint) {
8456
8537
  origin: "template",
8457
8538
  content: (0, _orkestrel_template.fillTemplate)(ARTIFACT_TEMPLATES.tests.bin, { import: matchesPrintWidth(joinedImport) ? joinedImport : `\t\tconst entry =\n\t\t\tawait import(${binSpecifier})` })
8458
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
+ }] : [];
8459
8547
  const applications = Iterator.from(blueprint.app).map((environment) => ({
8460
8548
  path: `tests/app/${environment}/index.test.ts`,
8461
8549
  group: "tests",
@@ -8475,6 +8563,7 @@ function blueprintToTestArtifacts(blueprint) {
8475
8563
  origin: "template",
8476
8564
  content: (0, _orkestrel_template.fillTemplate)(distribution.module, {
8477
8565
  types: browser ? distribution.types : "",
8566
+ events: browser ? distribution.events : "",
8478
8567
  transport: browser ? distribution.transport : "",
8479
8568
  launcher: browser ? distribution.launcher : "",
8480
8569
  helpers: browser ? distribution.helpers : ""
@@ -8533,6 +8622,7 @@ function blueprintToTestArtifacts(blueprint) {
8533
8622
  ...journeys,
8534
8623
  ...sources,
8535
8624
  ...bins,
8625
+ ...reporters,
8536
8626
  ...applications,
8537
8627
  ...distributions,
8538
8628
  ...integrations
@@ -8569,6 +8659,10 @@ function blueprintToGuideArtifacts(blueprint) {
8569
8659
  directory: "src/bin",
8570
8660
  test: "tests/src/bin"
8571
8661
  }] : [],
8662
+ ...blueprint.reporter ? [{
8663
+ directory: "src/reporter",
8664
+ test: "tests/src/reporter"
8665
+ }] : [],
8572
8666
  ...[...blueprint.app, ...blueprintToFaces(blueprint).filter((extension) => extension.axes.includes("app")).map((extension) => extension.name)].map((environment) => ({
8573
8667
  directory: `app/${environment}`,
8574
8668
  test: `tests/app/${environment}`
@@ -8963,7 +9057,7 @@ function insertManifestDependencies(manifest, additions) {
8963
9057
  function insertManifestSection(manifest, section, dependencies, present) {
8964
9058
  const tokens = scanManifestTokens(manifest);
8965
9059
  if (tokens === void 0) return void 0;
8966
- 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));
8967
9061
  const lines = ordered.map(({ name, range }) => `${JSON.stringify(name)}: ${JSON.stringify(range)}`);
8968
9062
  const sibling = section === "dependencies" ? "devDependencies" : "dependencies";
8969
9063
  const occurrences = tokens.flatMap((token, at) => {
@@ -9695,6 +9789,7 @@ function createBlueprint(name, input) {
9695
9789
  engines: input?.engines ?? ">=22.18.0",
9696
9790
  overrides: input?.overrides ?? [],
9697
9791
  bin: input?.bin ?? false,
9792
+ reporter: input?.reporter ?? false,
9698
9793
  setup: input?.setup ?? [],
9699
9794
  guides: input?.guides ?? false,
9700
9795
  integration: input?.integration ?? false,
@@ -10013,7 +10108,6 @@ var Compiler = class {
10013
10108
  }
10014
10109
  };
10015
10110
  exports.APP_BROWSER_DEV_DEPENDENCIES = APP_BROWSER_DEV_DEPENDENCIES;
10016
- exports.APP_DEV_DEPENDENCIES = APP_DEV_DEPENDENCIES;
10017
10111
  exports.APP_MATRIX = APP_MATRIX;
10018
10112
  exports.APP_SERVER_DEV_DEPENDENCIES = APP_SERVER_DEV_DEPENDENCIES;
10019
10113
  exports.ARTIFACT_GROUPS = ARTIFACT_GROUPS;
@@ -10082,6 +10176,9 @@ exports.ORKESTREL_RANGE_PATTERN = ORKESTREL_RANGE_PATTERN;
10082
10176
  exports.PRINT_WIDTH = PRINT_WIDTH;
10083
10177
  exports.REFERENCE_PATHS = REFERENCE_PATHS;
10084
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;
10085
10182
  exports.RESERVED_SHEET_NAMES = RESERVED_SHEET_NAMES;
10086
10183
  exports.SEED_GUIDE_PATHS = SEED_GUIDE_PATHS;
10087
10184
  exports.SERVICE_SCRIPT_PATH = SERVICE_SCRIPT_PATH;