@orkestrel/scaffold 0.0.126 → 0.0.128

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.
@@ -4,7 +4,7 @@
4
4
  "storage": "AGENTS.md",
5
5
  "destination": "AGENTS.md",
6
6
  "executable": false,
7
- "digest": "3d183e5cae674592a63f5ec38deb421fab480d408d2874a3040bacf2e4d20680"
7
+ "digest": "b00de3b210c6a1afc13b870d687d9892e47de877cef27f27eda34e6e68bb524b"
8
8
  },
9
9
  {
10
10
  "storage": "LICENSE",
@@ -16,7 +16,7 @@
16
16
  "storage": "agents/orchestration.md",
17
17
  "destination": ".agents/orchestration.md",
18
18
  "executable": false,
19
- "digest": "8145f2f9f3f50c4a3b9ce82c9725ec275edc45fb579bb63968827bcf4372d08f"
19
+ "digest": "24c84e5e89148d6da9873e1b49b415e6c86a226fefab0752b6ac0329d8814017"
20
20
  },
21
21
  {
22
22
  "storage": "agents/platforms/posix.md",
@@ -580,7 +580,7 @@
580
580
  "storage": "claude/AGENTS.md",
581
581
  "destination": ".claude/AGENTS.md",
582
582
  "executable": false,
583
- "digest": "50ec7a68e73e34faa43ee12b6be72525b2556291753c7211766d3ea0d46687df"
583
+ "digest": "5571dce7ab4cb46693a23a3265ce14b5985a0f0fc9771cd72db83a18474392a7"
584
584
  },
585
585
  {
586
586
  "storage": "claude/agents/analyst.md",
@@ -628,13 +628,13 @@
628
628
  "storage": "claude/agents/orkestrel.md",
629
629
  "destination": ".claude/agents/orkestrel.md",
630
630
  "executable": false,
631
- "digest": "5500ab7df2a61f862ddf9e3cf24c7256f5d2aaf86ee4d9e9afcbe663ba17f235"
631
+ "digest": "a8c9dc23ba68618e2b09eb77c684a7e184ca9f31afe81588a9355b3c4f0e9091"
632
632
  },
633
633
  {
634
634
  "storage": "claude/agents/planner.md",
635
635
  "destination": ".claude/agents/planner.md",
636
636
  "executable": false,
637
- "digest": "4ff794553c157a4fa325edd3822fd9a94764bac9b579f5e66f4a1d1db6a218a1"
637
+ "digest": "948ce228b81f0ebc0b11dcc034cac9d40a89299ba735cd7467bb1b1554b5e777"
638
638
  },
639
639
  {
640
640
  "storage": "claude/agents/researcher.md",
@@ -736,7 +736,7 @@
736
736
  "storage": "claude/rules/workspace.md",
737
737
  "destination": ".claude/rules/workspace.md",
738
738
  "executable": false,
739
- "digest": "8374fb51dade68150f1d1affb0c066682bc1363eb9186322f19f1ac3fc967431"
739
+ "digest": "43d46cd789af54b04b3adc53250c38ea38d1757bae23ff34f321d0b70893e525"
740
740
  },
741
741
  {
742
742
  "storage": "claude/rules/writing.md",
@@ -874,7 +874,7 @@
874
874
  "storage": "codex/agents/planner.toml",
875
875
  "destination": ".codex/agents/planner.toml",
876
876
  "executable": false,
877
- "digest": "a0fa6655aa1a762bc089225b8b72a34e46f4b4be04a59803dd56e7b0bdb1e9fb"
877
+ "digest": "f9e405b6a893514988ff9cbcc3c4addaf606b3f5f6a0e8d53b2bcd4402304bd8"
878
878
  },
879
879
  {
880
880
  "storage": "codex/agents/researcher.toml",
@@ -1018,7 +1018,7 @@
1018
1018
  "storage": "guides/capture.md",
1019
1019
  "destination": "guides/capture.md",
1020
1020
  "executable": false,
1021
- "digest": "3687c8cf8601ec1564f5ad6ae39e519c44eb32f2e5ef01ec40348d4a11ee6f38"
1021
+ "digest": "f19b7ea5ea06958756a20422518ace1078fe87bea4eeb89345b12401a0110d58"
1022
1022
  },
1023
1023
  {
1024
1024
  "storage": "guides/codec.md",
@@ -1048,7 +1048,7 @@
1048
1048
  "storage": "guides/database.md",
1049
1049
  "destination": "guides/database.md",
1050
1050
  "executable": false,
1051
- "digest": "0158058d9cf571e75c26550478666a6f80b994064241b508b56a7980eb3bdbde"
1051
+ "digest": "f7cb2796e7c1d4fe78ab54ebe04b80feb411a07891c04c7168fc1f48cfa0af61"
1052
1052
  },
1053
1053
  {
1054
1054
  "storage": "guides/emitter.md",
@@ -1186,7 +1186,7 @@
1186
1186
  "storage": "guides/relation.md",
1187
1187
  "destination": "guides/relation.md",
1188
1188
  "executable": false,
1189
- "digest": "03f97521e4d6057529bec4ca140ca707cdfe4cd1239dce54d4dbb8da01b63538"
1189
+ "digest": "47380b35b42129f9a0f132744c1e0ad06bf51bfe58aa95e93e7733a8eedeb37a"
1190
1190
  },
1191
1191
  {
1192
1192
  "storage": "guides/router.md",
@@ -1198,7 +1198,7 @@
1198
1198
  "storage": "guides/scaffold.md",
1199
1199
  "destination": "guides/scaffold.md",
1200
1200
  "executable": false,
1201
- "digest": "14085ac48ce713036f7e68f1bce5c684a758e519e7fbb3c467305d5f8a883c9a"
1201
+ "digest": "e594eddd6e2bc9c7138d4a83010d421edad1fb5c602175e5939bab3b7f461729"
1202
1202
  },
1203
1203
  {
1204
1204
  "storage": "guides/sea.md",
@@ -1270,7 +1270,7 @@
1270
1270
  "storage": "guides/toolbox.md",
1271
1271
  "destination": "guides/toolbox.md",
1272
1272
  "executable": false,
1273
- "digest": "07e306b640592d88848e638d1dd6060712ff22ea686a70a503286543368cb256"
1273
+ "digest": "d052fea933416ea959d259db6eba39fdecc37b07e127e2adb3f1f9c648fbcc8e"
1274
1274
  },
1275
1275
  {
1276
1276
  "storage": "guides/websocket.md",
@@ -1336,7 +1336,7 @@
1336
1336
  "storage": "tests/config.test.ts",
1337
1337
  "destination": "tests/config.test.ts",
1338
1338
  "executable": false,
1339
- "digest": "7aed0759a718640fc4fa2f33543b858035bc05273569e2c23839cf7c372fc7f0"
1339
+ "digest": "bf15132fd375ab310ff11a010481d86796b8348fd03b9e4a2585415492707eec"
1340
1340
  },
1341
1341
  {
1342
1342
  "storage": "tests/policy.test.ts",
@@ -1417,5 +1417,5 @@
1417
1417
  "scripts"
1418
1418
  ],
1419
1419
  "surface": [],
1420
- "digest": "c324fe88780960514ba83afdbe775c5d09755d6c2c0dd9bf987023d78f64162d"
1420
+ "digest": "8648e6666d97093faa375c67f4e668bd6f62a0b67aee232852500ff511af7fae"
1421
1421
  }
@@ -379,12 +379,16 @@ describe('selected faces', () => {
379
379
  })
380
380
 
381
381
  it('resolves showcase and journey modes for every occupied application', async () => {
382
- const applications = [
383
- 'browser',
384
- ...collectFrameworks(POLICY_ROOT)
385
- .filter((face) => face.startsWith('app/'))
386
- .map((face) => face.slice(4)),
387
- ]
382
+ const faces = collectFrameworks(POLICY_ROOT)
383
+ .filter((face) => face.startsWith('app/'))
384
+ .map((face) => face.slice(4))
385
+ // The base application is declared by its exact-case entry alone.
386
+ const candidates = ['browser', ...faces]
387
+ const applications = candidates.filter(
388
+ (application) =>
389
+ existsSync(resolve(POLICY_ROOT, 'app', application)) &&
390
+ readdirSync(resolve(POLICY_ROOT, 'app', application)).includes('main.ts'),
391
+ )
388
392
  const manifest = readConfigRecord(
389
393
  JSON.parse(readFileSync(resolve(POLICY_ROOT, 'package.json'), 'utf8')),
390
394
  )
@@ -545,6 +549,20 @@ describe('selected faces', () => {
545
549
  'absent',
546
550
  ]),
547
551
  ).toThrow('not declared')
552
+ // The record names an application exactly when its exact-case entry exists.
553
+ const variant = { name: 'desktop', width: 1280, height: 800 }
554
+ for (const application of applications) {
555
+ expect(
556
+ readConfigRecord(
557
+ readConfigRecord(Reflect.apply(factory, undefined, [variant, [], application])).test,
558
+ ).include,
559
+ ).toStrictEqual([`tests/app/${application}/integration.test.ts`])
560
+ }
561
+ for (const application of candidates.filter((name) => !applications.includes(name))) {
562
+ expect(() => Reflect.apply(factory, undefined, [variant, [], application])).toThrow(
563
+ 'not declared',
564
+ )
565
+ }
548
566
  })
549
567
 
550
568
  it('collects both browser setup proofs and optimizes every selected browser factory', async () => {
@@ -1153,7 +1171,19 @@ describe('root configuration', () => {
1153
1171
  })] },
1154
1172
  }\n`,
1155
1173
  )
1156
- const journeys: object[][] = []
1174
+ const journeys: Array<{ readonly application: string; readonly tests: readonly object[] }> = []
1175
+ // A face-only workspace declares no base application, so each declared application loads the
1176
+ // journey wrapper under its own Vite mode, and the default mode stands for the base entry.
1177
+ const occupied = [
1178
+ 'browser',
1179
+ ...collectFrameworks(POLICY_ROOT)
1180
+ .filter((face) => face.startsWith('app/'))
1181
+ .map((face) => face.slice(4)),
1182
+ ].filter(
1183
+ (application) =>
1184
+ existsSync(resolve(POLICY_ROOT, 'app', application)) &&
1185
+ readdirSync(resolve(POLICY_ROOT, 'app', application)).includes('main.ts'),
1186
+ )
1157
1187
  const targets = [
1158
1188
  ...required.map((wrapper) => ({ wrapper, directory: POLICY_ROOT })),
1159
1189
  { wrapper: journey, directory: planted.path },
@@ -1176,45 +1206,66 @@ describe('root configuration', () => {
1176
1206
  if (axis === undefined || environment === undefined) {
1177
1207
  throw new Error(`${wrapper} carries no target`)
1178
1208
  }
1179
- const loaded = await loadConfigFromFile(
1180
- { command: 'build', mode: 'test', isSsrBuild: false, isPreview: false },
1181
- resolve(directory, wrapper),
1182
- directory,
1183
- 'silent',
1184
- )
1185
- if (loaded === null) throw new Error(`${wrapper} did not load`)
1186
1209
  if (environment === 'journey') {
1187
- const projects = loaded.config.test?.projects
1188
- if (!Array.isArray(projects) || projects.length === 0) {
1189
- throw new Error(`${wrapper} carries no journey projects`)
1190
- }
1191
- const tests: object[] = []
1192
- for (const factory of projects) {
1193
- if (typeof factory !== 'function')
1194
- throw new Error(`${wrapper} carries no project factory`)
1195
- const project: unknown = await Reflect.apply(factory, undefined, [
1196
- { command: 'serve', mode: 'test' },
1197
- ])
1198
- if (typeof project !== 'object' || project === null)
1199
- throw new Error('A journey project is not a configuration')
1200
- const test: unknown = Object.getOwnPropertyDescriptor(project, 'test')?.value
1201
- if (typeof test !== 'object' || test === null)
1202
- throw new Error('A journey project carries no test block')
1203
- tests.push(test)
1210
+ const applications = directory === planted.path ? ['browser'] : occupied
1211
+ if (applications.length === 0)
1212
+ throw new Error(`${wrapper} has no declared application to load`)
1213
+ for (const application of applications) {
1214
+ const mode = application === 'browser' ? 'test' : application
1215
+ const loaded = await loadConfigFromFile(
1216
+ { command: 'build', mode, isSsrBuild: false, isPreview: false },
1217
+ resolve(directory, wrapper),
1218
+ directory,
1219
+ 'silent',
1220
+ )
1221
+ if (loaded === null) throw new Error(`${wrapper} did not load`)
1222
+ const projects = loaded.config.test?.projects
1223
+ if (!Array.isArray(projects) || projects.length === 0) {
1224
+ throw new Error(`${wrapper} carries no journey projects`)
1225
+ }
1226
+ const tests: object[] = []
1227
+ for (const factory of projects) {
1228
+ if (typeof factory !== 'function')
1229
+ throw new Error(`${wrapper} carries no project factory`)
1230
+ const project: unknown = await Reflect.apply(factory, undefined, [
1231
+ { command: 'serve', mode },
1232
+ ])
1233
+ if (typeof project !== 'object' || project === null)
1234
+ throw new Error('A journey project is not a configuration')
1235
+ const test: unknown = Object.getOwnPropertyDescriptor(project, 'test')?.value
1236
+ if (typeof test !== 'object' || test === null)
1237
+ throw new Error('A journey project carries no test block')
1238
+ tests.push(test)
1239
+ }
1240
+ journeys.push({ application, tests })
1204
1241
  }
1205
- journeys.push(tests)
1206
1242
  continue
1207
1243
  }
1208
- const output = loaded.config.build?.outDir
1209
- if (output === undefined) throw new Error(`${wrapper} carries no output`)
1210
- const expected =
1211
- environment === 'bin'
1212
- ? 'dist/bin'
1213
- : environment === 'showcase'
1214
- ? 'showcase'
1215
- : `dist/${axis}/${environment}`
1216
- if (resolve(POLICY_ROOT, output) !== resolve(POLICY_ROOT, expected)) {
1217
- throw new Error(`${wrapper} resolves to the wrong output`)
1244
+ // The showcase selects its application by Vite mode as the journey does.
1245
+ const modes =
1246
+ environment === 'showcase'
1247
+ ? occupied.map((application) => (application === 'browser' ? 'test' : application))
1248
+ : ['test']
1249
+ if (modes.length === 0) throw new Error(`${wrapper} has no declared application to load`)
1250
+ for (const mode of modes) {
1251
+ const loaded = await loadConfigFromFile(
1252
+ { command: 'build', mode, isSsrBuild: false, isPreview: false },
1253
+ resolve(directory, wrapper),
1254
+ directory,
1255
+ 'silent',
1256
+ )
1257
+ if (loaded === null) throw new Error(`${wrapper} did not load`)
1258
+ const output = loaded.config.build?.outDir
1259
+ if (output === undefined) throw new Error(`${wrapper} carries no output`)
1260
+ const expected =
1261
+ environment === 'bin'
1262
+ ? 'dist/bin'
1263
+ : environment === 'showcase'
1264
+ ? 'showcase'
1265
+ : `dist/${axis}/${environment}`
1266
+ if (resolve(POLICY_ROOT, output) !== resolve(POLICY_ROOT, expected)) {
1267
+ throw new Error(`${wrapper} resolves to the wrong output`)
1268
+ }
1218
1269
  }
1219
1270
  continue
1220
1271
  }
@@ -1261,10 +1312,10 @@ describe('root configuration', () => {
1261
1312
  expect(() => expect(control).toStrictEqual(expectedTypes)).toThrow('expected')
1262
1313
  }
1263
1314
  }
1264
- for (const tests of journeys) {
1315
+ for (const { application, tests } of journeys) {
1265
1316
  const names = tests.map((test) => {
1266
1317
  expect(Object.getOwnPropertyDescriptor(test, 'include')?.value).toStrictEqual([
1267
- 'tests/app/browser/integration.test.ts',
1318
+ `tests/app/${application}/integration.test.ts`,
1268
1319
  ])
1269
1320
  expect(Object.getOwnPropertyDescriptor(test, 'exclude')?.value).toStrictEqual([])
1270
1321
  expect(Object.getOwnPropertyDescriptor(test, 'setupFiles')?.value).toStrictEqual([