@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.
- package/dist/bin/main.js +5 -2
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +1 -1
- package/dist/host/agents/orchestration.md +3 -3
- package/dist/host/claude/AGENTS.md +2 -2
- package/dist/host/claude/agents/orkestrel.md +14 -14
- package/dist/host/claude/agents/planner.md +2 -2
- package/dist/host/claude/rules/workspace.md +7 -6
- package/dist/host/codex/agents/planner.toml +2 -2
- package/dist/host/guides/capture.md +123 -123
- package/dist/host/guides/database.md +18 -7
- package/dist/host/guides/relation.md +71 -31
- package/dist/host/guides/scaffold.md +67 -49
- package/dist/host/guides/toolbox.md +8 -1
- package/dist/host/manifest.json +14 -14
- package/dist/host/tests/config.test.ts +95 -44
- package/dist/src/core/index.cjs +128 -75
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +27 -6
- package/dist/src/core/index.d.ts +27 -6
- package/dist/src/core/index.js +128 -76
- package/dist/src/core/index.js.map +1 -1
- package/package.json +2 -2
package/dist/host/manifest.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"storage": "AGENTS.md",
|
|
5
5
|
"destination": "AGENTS.md",
|
|
6
6
|
"executable": false,
|
|
7
|
-
"digest": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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
|
|
383
|
-
'
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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
|
|
1188
|
-
if (
|
|
1189
|
-
throw new Error(`${wrapper}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
if (
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
tests
|
|
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
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
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
|
-
|
|
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([
|