@orkestrel/scaffold 0.0.143 → 0.0.145
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/agents/skills/orkestrel-publish/scripts/swap.js +111 -5
- package/dist/agents/templates/brief.md +1 -0
- package/dist/bin/main.js +87 -30
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/platforms/windows.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +133 -6
- package/dist/host/agents/templates/brief.md +1 -0
- package/dist/host/claude/agents/orkestrel.md +52 -52
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/quality.md +1 -0
- package/dist/host/claude/rules/tests.md +1 -0
- package/dist/host/claude/rules/workspace.md +14 -13
- package/dist/host/dotfiles/oxlintrc.json +1 -1
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/codec.md +29 -12
- package/dist/host/guides/contract.md +58 -57
- package/dist/host/guides/scaffold.md +63 -43
- package/dist/host/guides/server.md +1 -1
- package/dist/host/manifest.json +18 -18
- package/dist/host/scripts/browsers.sh +0 -0
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/npm.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +5 -0
- package/dist/host/tests/setupPolicy.ts +1 -0
- package/dist/src/core/index.cjs +64 -24
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +17 -2
- package/dist/src/core/index.d.ts +17 -2
- package/dist/src/core/index.js +64 -25
- package/dist/src/core/index.js.map +1 -1
- package/package.json +13 -13
|
@@ -23,6 +23,7 @@ The commands an agent runs on a Windows host, and their quirks. `.claude/rules/p
|
|
|
23
23
|
## Git Bash
|
|
24
24
|
|
|
25
25
|
- Write `C:/` in every path Windows Node reads from inside a string, such as `node -e`: Git Bash translates a path argument and leaves a string alone, so `/c/Users/...` reads as `C:\c\Users\...`.
|
|
26
|
+
- Write each entry of an `export PATH=` line as `/c/...`: the drive colon in `C:/...` splits the entry, and the shell resolves the next `node` on `PATH` instead (read 2026-11-19: three probe runs read Node 24.22.3 where Node 22 was meant). A chain plan that sets `PATH` in Windows form, with `;` between entries, reads correctly.
|
|
26
27
|
- Chain a command that gates the next with `&&`, because the command after `;` runs on a failure.
|
|
27
28
|
|
|
28
29
|
## PowerShell 5.1
|
|
@@ -21,6 +21,7 @@ When a consumer needs a dependency's unpublished source, to meet a defect that l
|
|
|
21
21
|
- Delete the consumer's `node_modules/.vite` directory after every tarball install the script does not run, or install into a fresh worktree; Vite keys its pre-bundle on the installed version, and the script deletes it after its own installs.
|
|
22
22
|
- Run one unit per checkout, at that checkout's catalog layer.
|
|
23
23
|
- Restore with `scripts/swap.ts --restore --consumer <consumer>` before any `scaffold` verb, before any gate that must see a registry range or prove the published artifact, and before publishing anything. The restore puts back each recorded range, keeps an `overrides` block that existed before the pin and removes one the pin created, removes the lock entry and installed copy of each restored package and dropped override so the install resolves them again from the registry, and proves the registry source in the lockfile. The restore refuses with exit 64, before it writes anything, a ledger whose package or override keys are not package names or whose removal would leave `node_modules`. [wave.md](wave.md) § Visit a repository orders a verb run around the pins.
|
|
24
|
+
- When the registry serves no release of a pinned package, `--restore` writes its recorded range into the manifest and leaves the lock entry, the installed tarball, and the install untouched, and its receipt lists the package under `kept`. The restore refuses, before it writes anything, a kept package whose locked tarball version falls outside its recorded range, because the install would fetch that package from the registry. Run the `scaffold` verb right away: `repair`, `overwrite`, and `catalog` keep that range, re-pin every other declaration, and exit `1` naming it. Then re-pin with the receipt's `repin` arguments before any install or gate. Never run `npm ci` or `npm install` between the restore and the re-pin, because the manifest names a release the registry cannot serve. A fleet package published minutes earlier can still answer `404`, so rerun the verb after `window.ts --confirm` reports the version served.
|
|
24
25
|
- Re-pin after the verb or gate with the arguments the restore receipt's `repin` member lists, then run `--status`. The release still follows layer order: the dependency publishes first, then the consumer takes the registry range and re-runs its gates.
|
|
25
26
|
- Keep pins uncommitted: commit neither a pinned `package.json` nor its `package-lock.json`. Keep tarballs, the ledger, and receipts under `tmp/`; sweep them at acceptance; never commit them.
|
|
26
27
|
|
|
@@ -28,7 +28,15 @@
|
|
|
28
28
|
// installed copy of each package it restores from the registry or whose override it drops so the
|
|
29
29
|
// install resolves them again, installs, and proves each package is installed at what its range
|
|
30
30
|
// names. Before it writes anything, --restore refuses with 64 a ledger whose package or override
|
|
31
|
-
// keys are not package names, and a removal whose install path resolves outside node_modules.
|
|
31
|
+
// keys are not package names, and a removal whose install path resolves outside node_modules. It
|
|
32
|
+
// also asks the registry (`npm view <name> name --json` in the consumer) about each package it
|
|
33
|
+
// returns to a registry range, and exits 1 with "the registry did not answer for <name>" without
|
|
34
|
+
// writing when an answer is neither served nor a 404. A package the registry answers 404 for is
|
|
35
|
+
// kept: --restore writes its recorded range into the manifest and the ledger only, removes no lock
|
|
36
|
+
// entry or install, runs no install for it, proves the manifest holds the range and the lockfile
|
|
37
|
+
// `resolved` still names the ledger tarball, and lists it under `kept` in the receipt. A kept package
|
|
38
|
+
// whose locked version its recorded range does not admit refuses with exit 1 before any write. No install
|
|
39
|
+
// runs when every restored package is kept and no override is dropped.
|
|
32
40
|
// --status writes nothing and reports each drift between the ledger, the manifest, the tarballs, the
|
|
33
41
|
// installed bytes, and the source commits; a manifest spec holds its tarball only when it names the
|
|
34
42
|
// ledger archive's full location.
|
|
@@ -1681,6 +1689,84 @@ export function proveRestored(consumer: string, name: string, range: string): re
|
|
|
1681
1689
|
]
|
|
1682
1690
|
}
|
|
1683
1691
|
|
|
1692
|
+
/**
|
|
1693
|
+
* Reads whether the registry serves a package.
|
|
1694
|
+
*
|
|
1695
|
+
* @remarks
|
|
1696
|
+
* Runs `npm view <name> name --json` in the consumer through the npm entry the install uses, with an
|
|
1697
|
+
* argument array and no shell.
|
|
1698
|
+
*
|
|
1699
|
+
* @param consumer - The consumer directory, whose npm configuration names the registry.
|
|
1700
|
+
* @param name - The package name.
|
|
1701
|
+
* @returns `served` when npm exits 0, `absent` when its JSON error code is `E404`, and undefined for
|
|
1702
|
+
* any other answer.
|
|
1703
|
+
*/
|
|
1704
|
+
export function classifyRegistry(consumer: string, name: string): 'served' | 'absent' | undefined {
|
|
1705
|
+
const result = runNpm(['view', name, 'name', '--json'], consumer)
|
|
1706
|
+
if (result.error !== undefined) return undefined
|
|
1707
|
+
if (result.status === 0) return 'served'
|
|
1708
|
+
const error = parseJsonRecord(result.stdout.trim())?.error
|
|
1709
|
+
return isRecord(error) && error.code === 'E404' ? 'absent' : undefined
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* Lists the problem with a locked version that a recorded range does not admit.
|
|
1714
|
+
*
|
|
1715
|
+
* @remarks
|
|
1716
|
+
* An install that finds the lock entry outside the manifest range resolves the package from the
|
|
1717
|
+
* registry again, which a kept package cannot survive. A range outside the subset
|
|
1718
|
+
* {@link supportsRange} reads is not judged.
|
|
1719
|
+
*
|
|
1720
|
+
* @param consumer - The consumer directory.
|
|
1721
|
+
* @param name - The package name.
|
|
1722
|
+
* @param range - The recorded range.
|
|
1723
|
+
* @returns One message naming the package, its locked version, and the range when the lock entry's
|
|
1724
|
+
* version is absent or outside the range, and none otherwise.
|
|
1725
|
+
*/
|
|
1726
|
+
export function scanLocked(consumer: string, name: string, range: string): readonly string[] {
|
|
1727
|
+
if (!supportsRange(range)) return []
|
|
1728
|
+
const packages = loadJSONRecord(join(consumer, 'package-lock.json'))?.packages
|
|
1729
|
+
const entry = isRecord(packages) ? packages[`node_modules/${name}`] : undefined
|
|
1730
|
+
const version = readString(isRecord(entry) ? entry : undefined, 'version')
|
|
1731
|
+
return version !== undefined && matchesRange(version, range)
|
|
1732
|
+
? []
|
|
1733
|
+
: [
|
|
1734
|
+
`${name} is locked at ${version ?? '(no version)'} but its recorded range ${range} does not admit it`,
|
|
1735
|
+
]
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* Lists the problems with one kept package.
|
|
1740
|
+
*
|
|
1741
|
+
* @remarks
|
|
1742
|
+
* A kept package returns to its recorded range in the manifest alone, so its lock entry and installed
|
|
1743
|
+
* tarball must still stand.
|
|
1744
|
+
*
|
|
1745
|
+
* @param consumer - The consumer directory.
|
|
1746
|
+
* @param name - The package name.
|
|
1747
|
+
* @param range - The recorded range the manifest must hold.
|
|
1748
|
+
* @param archive - The ledger archive's file name.
|
|
1749
|
+
* @returns One message per problem, empty when the manifest holds the range and the lockfile
|
|
1750
|
+
* `resolved` still names the archive.
|
|
1751
|
+
*/
|
|
1752
|
+
export function proveKept(
|
|
1753
|
+
consumer: string,
|
|
1754
|
+
name: string,
|
|
1755
|
+
range: string,
|
|
1756
|
+
archive: string,
|
|
1757
|
+
): readonly string[] {
|
|
1758
|
+
const manifest = loadJSONRecord(join(consumer, 'package.json'))
|
|
1759
|
+
const held = manifest === undefined ? undefined : findDeclaration(manifest, name)?.spec
|
|
1760
|
+
const resolved = loadResolved(consumer, name)
|
|
1761
|
+
return [
|
|
1762
|
+
...(held === range ? [] : [`${name} is ${held ?? '(absent)'} in the manifest, not ${range}`]),
|
|
1763
|
+
...(resolved !== undefined && normalizeSlashes(resolved).endsWith(archive)
|
|
1764
|
+
? []
|
|
1765
|
+
: [`the lockfile no longer names ${archive} for ${name}`]),
|
|
1766
|
+
...scanLocked(consumer, name, range),
|
|
1767
|
+
]
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1684
1770
|
/**
|
|
1685
1771
|
* Locates a consumer's ledger file.
|
|
1686
1772
|
*
|
|
@@ -2216,7 +2302,8 @@ export function scanRemovals(consumer: string, names: readonly string[]): readon
|
|
|
2216
2302
|
*
|
|
2217
2303
|
* @param command - The parsed command.
|
|
2218
2304
|
* @returns 0 when the restore installed and proved, 1 when a proof failed, 64 on a usage refusal.
|
|
2219
|
-
* @throws Thrown when the ledger is malformed or
|
|
2305
|
+
* @throws Thrown when the ledger is malformed, the registry gave no served or 404 answer for a package,
|
|
2306
|
+
* or the install fails.
|
|
2220
2307
|
*/
|
|
2221
2308
|
export function executeRestore(command: Command): number {
|
|
2222
2309
|
const manifestPath = join(command.consumer, 'package.json')
|
|
@@ -2238,12 +2325,42 @@ export function executeRestore(command: Command): number {
|
|
|
2238
2325
|
const removals = listRemovals(plan)
|
|
2239
2326
|
const refusals = scanRemovals(command.consumer, removals)
|
|
2240
2327
|
if (refusals.length > 0) return reportUsage(refusals.join('\n'))
|
|
2328
|
+
const registry = plan.rows
|
|
2329
|
+
.filter((row) => removals.includes(row.name))
|
|
2330
|
+
.map((row) => ({ name: row.name, answer: classifyRegistry(command.consumer, row.name) }))
|
|
2331
|
+
const silent = registry.filter((row) => row.answer === undefined).map((row) => row.name)
|
|
2332
|
+
if (silent.length > 0) throw new Error(`the registry did not answer for ${silent.join(', ')}`)
|
|
2333
|
+
const absent = new Set(registry.filter((row) => row.answer === 'absent').map((row) => row.name))
|
|
2334
|
+
const outside = plan.rows.flatMap((row) =>
|
|
2335
|
+
absent.has(row.name) && row.entry.replaced !== undefined
|
|
2336
|
+
? scanLocked(command.consumer, row.name, row.entry.replaced)
|
|
2337
|
+
: [],
|
|
2338
|
+
)
|
|
2339
|
+
if (outside.length > 0) throw new Error(outside.join('; '))
|
|
2241
2340
|
replaceFile(manifestPath, serializeJSON(plan.manifest))
|
|
2242
2341
|
replaceFile(locateLedger(command.consumer), serializeJSON(plan.ledger))
|
|
2243
|
-
removePinnedInstalls(
|
|
2244
|
-
|
|
2342
|
+
removePinnedInstalls(
|
|
2343
|
+
command.consumer,
|
|
2344
|
+
removals.filter((name) => !absent.has(name)),
|
|
2345
|
+
)
|
|
2346
|
+
if (plan.rows.some((row) => !absent.has(row.name)) || plan.dropped.length > 0) {
|
|
2347
|
+
installConsumer(command.consumer)
|
|
2348
|
+
}
|
|
2349
|
+
const kept = plan.rows.flatMap((row) =>
|
|
2350
|
+
absent.has(row.name) && row.entry.replaced !== undefined
|
|
2351
|
+
? [
|
|
2352
|
+
{
|
|
2353
|
+
name: row.name,
|
|
2354
|
+
range: row.entry.replaced,
|
|
2355
|
+
registry: 'absent',
|
|
2356
|
+
resolved: loadResolved(command.consumer, row.name),
|
|
2357
|
+
problems: proveKept(command.consumer, row.name, row.entry.replaced, row.entry.tarball),
|
|
2358
|
+
},
|
|
2359
|
+
]
|
|
2360
|
+
: [],
|
|
2361
|
+
)
|
|
2245
2362
|
const proved = plan.rows.flatMap((row) =>
|
|
2246
|
-
row.entry.field === undefined || row.entry.replaced === undefined
|
|
2363
|
+
row.entry.field === undefined || row.entry.replaced === undefined || absent.has(row.name)
|
|
2247
2364
|
? []
|
|
2248
2365
|
: [
|
|
2249
2366
|
{
|
|
@@ -2253,7 +2370,7 @@ export function executeRestore(command: Command): number {
|
|
|
2253
2370
|
},
|
|
2254
2371
|
],
|
|
2255
2372
|
)
|
|
2256
|
-
const failures = proved.flatMap((proof) => proof.problems)
|
|
2373
|
+
const failures = [...proved, ...kept].flatMap((proof) => proof.problems)
|
|
2257
2374
|
const receipt = {
|
|
2258
2375
|
mode: 'restore',
|
|
2259
2376
|
consumer: normalizeSlashes(command.consumer),
|
|
@@ -2268,6 +2385,12 @@ export function executeRestore(command: Command): number {
|
|
|
2268
2385
|
),
|
|
2269
2386
|
resolved: loadResolved(command.consumer, proof.name),
|
|
2270
2387
|
})),
|
|
2388
|
+
kept: kept.map(({ name, range, registry: answer, resolved }) => ({
|
|
2389
|
+
name,
|
|
2390
|
+
range,
|
|
2391
|
+
registry: answer,
|
|
2392
|
+
resolved,
|
|
2393
|
+
})),
|
|
2271
2394
|
dropped: plan.dropped,
|
|
2272
2395
|
changes: plan.changes,
|
|
2273
2396
|
repin: buildRepin(command.consumer, plan),
|
|
@@ -2279,6 +2402,10 @@ export function executeRestore(command: Command): number {
|
|
|
2279
2402
|
command.json,
|
|
2280
2403
|
[
|
|
2281
2404
|
...proved.map((proof) => `swap: restored ${proof.name} to ${proof.range}`),
|
|
2405
|
+
...kept.map(
|
|
2406
|
+
(proof) =>
|
|
2407
|
+
`swap: restored ${proof.name} to ${proof.range} in the manifest only: the registry serves no release; the install still holds the tarball`,
|
|
2408
|
+
),
|
|
2282
2409
|
...plan.dropped.map((name) => `swap: dropped overrides.${name}`),
|
|
2283
2410
|
...failures.map((failure) => `swap: problem: ${failure}`),
|
|
2284
2411
|
`swap: re-pin with ${receipt.repin.join(' ')}`,
|
|
@@ -49,6 +49,7 @@ Stop and report (expected, found, evidence, done or not done, one hypothesis) on
|
|
|
49
49
|
1. CHEAP_CHECKS (regeneration, then the format check, lint, and type check over the owned files)
|
|
50
50
|
2. SCOPED_TEST
|
|
51
51
|
3. ARTIFACT_CRITERION
|
|
52
|
+
4. When the unit adds an exported name, a `tests/setup*.ts` export included: `scaffold surface` reports no collision the unit added, per `.claude/rules/names.md` § Fleet name ownership.
|
|
52
53
|
|
|
53
54
|
**Observations, not criteria.** TIMING_SENSITIVE_OR_TREE_WIDE_GATES the unit reports and the Orchestrator re-runs.
|
|
54
55
|
|
|
@@ -43,58 +43,58 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
|
|
|
43
43
|
|
|
44
44
|
| Package | Version | Layer | Runtime dependencies | Peer dependencies |
|
|
45
45
|
| ----------------------- | --------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
46
|
-
| `@orkestrel/abort` | `0.0.
|
|
47
|
-
| `@orkestrel/agent` | `0.0.
|
|
48
|
-
| `@orkestrel/brief` | `0.0.
|
|
49
|
-
| `@orkestrel/browser` | `0.0.
|
|
50
|
-
| `@orkestrel/budget` | `0.0.
|
|
51
|
-
| `@orkestrel/capture` | `0.0.
|
|
52
|
-
| `@orkestrel/codec` | `0.0.
|
|
53
|
-
| `@orkestrel/console` | `0.0.
|
|
54
|
-
| `@orkestrel/contract` | `0.0.
|
|
55
|
-
| `@orkestrel/csv` | `0.0.
|
|
56
|
-
| `@orkestrel/database` | `0.0.
|
|
57
|
-
| `@orkestrel/emitter` | `0.0.
|
|
58
|
-
| `@orkestrel/form` | `0.0.
|
|
59
|
-
| `@orkestrel/guide` | `0.0.
|
|
60
|
-
| `@orkestrel/html` | `0.0.
|
|
61
|
-
| `@orkestrel/indexeddb` | `0.0.
|
|
62
|
-
| `@orkestrel/interpret` | `0.0.
|
|
63
|
-
| `@orkestrel/jsonrpc` | `0.0.
|
|
64
|
-
| `@orkestrel/lsp` | `0.0.
|
|
65
|
-
| `@orkestrel/markdown` | `0.0.
|
|
66
|
-
| `@orkestrel/mcp` | `0.0.
|
|
67
|
-
| `@orkestrel/middleware` | `0.0.
|
|
68
|
-
| `@orkestrel/msg` | `0.0.
|
|
69
|
-
| `@orkestrel/ndjson` | `0.0.
|
|
70
|
-
| `@orkestrel/ollama` | `0.0.
|
|
71
|
-
| `@orkestrel/pool` | `0.0.
|
|
72
|
-
| `@orkestrel/probe` | `0.0.
|
|
73
|
-
| `@orkestrel/process` | `0.0.
|
|
74
|
-
| `@orkestrel/program` | `0.0.
|
|
75
|
-
| `@orkestrel/qualifier` | `0.0.
|
|
76
|
-
| `@orkestrel/queue` | `0.0.
|
|
77
|
-
| `@orkestrel/rater` | `0.0.
|
|
78
|
-
| `@orkestrel/reason` | `0.0.
|
|
79
|
-
| `@orkestrel/relation` | `0.0.
|
|
80
|
-
| `@orkestrel/router` | `0.0.
|
|
81
|
-
| `@orkestrel/scaffold` | `0.0.
|
|
82
|
-
| `@orkestrel/sea` | `0.0.
|
|
83
|
-
| `@orkestrel/server` | `0.0.
|
|
84
|
-
| `@orkestrel/sqlite` | `0.0.
|
|
85
|
-
| `@orkestrel/sse` | `0.0.
|
|
86
|
-
| `@orkestrel/study` | `0.0.
|
|
87
|
-
| `@orkestrel/table` | `0.0.
|
|
88
|
-
| `@orkestrel/template` | `0.0.
|
|
89
|
-
| `@orkestrel/terminal` | `0.0.
|
|
90
|
-
| `@orkestrel/test` | `0.0.
|
|
91
|
-
| `@orkestrel/timeout` | `0.0.
|
|
92
|
-
| `@orkestrel/tool` | `0.0.
|
|
93
|
-
| `@orkestrel/toolbox` | `0.0.
|
|
94
|
-
| `@orkestrel/websocket` | `0.0.
|
|
95
|
-
| `@orkestrel/worker` | `0.0.
|
|
96
|
-
| `@orkestrel/workflow` | `0.0.
|
|
97
|
-
| `@orkestrel/workspace` | `0.0.
|
|
46
|
+
| `@orkestrel/abort` | `0.0.20` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
47
|
+
| `@orkestrel/agent` | `0.0.48` | L5 | `@orkestrel/tool` `^0.0.26`, `@orkestrel/abort` `^0.0.20`, `@orkestrel/queue` `^0.0.26`, `@orkestrel/budget` `^0.0.21`, `@orkestrel/ndjson` `^0.0.20`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29`, `@orkestrel/workflow` `^0.0.32`, `@orkestrel/workspace` `^0.0.22` | |
|
|
48
|
+
| `@orkestrel/brief` | `0.0.21` | L4 | `@orkestrel/reason` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/interpret` `^0.0.26` | |
|
|
49
|
+
| `@orkestrel/browser` | `0.0.36` | L5 | `@orkestrel/mcp` `^0.0.46`, `@orkestrel/html` `^0.0.19`, `@orkestrel/pool` `^0.0.24`, `@orkestrel/tool` `^0.0.26`, `@orkestrel/codec` `^0.0.13`, `@orkestrel/router` `^0.0.25`, `@orkestrel/server` `^0.0.31`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/process` `^0.0.23`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/markdown` `^0.0.24`, `@orkestrel/websocket` `^0.0.22` | |
|
|
50
|
+
| `@orkestrel/budget` | `0.0.21` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
51
|
+
| `@orkestrel/capture` | `0.0.12` | L3 | `@orkestrel/process` `^0.0.23`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27` | `vite` `^8.3.8`, `vitest` `^5.1.0`, `playwright` `^1.65.0`, `@orkestrel/test` `~0.0.41`, `@vitest/browser-playwright` `^5.0.5` |
|
|
52
|
+
| `@orkestrel/codec` | `0.0.13` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
53
|
+
| `@orkestrel/console` | `0.0.23` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
54
|
+
| `@orkestrel/contract` | `0.0.27` | L0 | | |
|
|
55
|
+
| `@orkestrel/csv` | `0.0.17` | L2 | `@orkestrel/codec` `^0.0.13`, `@orkestrel/contract` `^0.0.27` | |
|
|
56
|
+
| `@orkestrel/database` | `0.0.29` | L2 | `@orkestrel/sqlite` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/indexeddb` `^0.0.21` | |
|
|
57
|
+
| `@orkestrel/emitter` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
58
|
+
| `@orkestrel/form` | `0.0.21` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
59
|
+
| `@orkestrel/guide` | `0.0.34` | L3 | `@orkestrel/contract` `^0.0.27`, `@orkestrel/markdown` `^0.0.24` | |
|
|
60
|
+
| `@orkestrel/html` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
61
|
+
| `@orkestrel/indexeddb` | `0.0.21` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
62
|
+
| `@orkestrel/interpret` | `0.0.26` | L3 | `@orkestrel/reason` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/template` `^0.0.17` | |
|
|
63
|
+
| `@orkestrel/jsonrpc` | `0.0.6` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
64
|
+
| `@orkestrel/lsp` | `0.0.18` | L3 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/jsonrpc` `^0.0.6`, `@orkestrel/process` `^0.0.23`, `@orkestrel/contract` `^0.0.27` | |
|
|
65
|
+
| `@orkestrel/markdown` | `0.0.24` | L2 | `@orkestrel/html` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
66
|
+
| `@orkestrel/mcp` | `0.0.46` | L4 | `@orkestrel/sse` `^0.0.17`, `@orkestrel/tool` `^0.0.26`, `@orkestrel/codec` `^0.0.13`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/jsonrpc` `^0.0.6`, `@orkestrel/process` `^0.0.23`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/websocket` `^0.0.22` | `@orkestrel/router` `^0.0.25`, `@orkestrel/server` `^0.0.31` |
|
|
67
|
+
| `@orkestrel/middleware` | `0.0.37` | L4 | `@orkestrel/budget` `^0.0.21`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27` | `@orkestrel/router` `^0.0.25`, `@orkestrel/server` `^0.0.31`, `@orkestrel/database` `^0.0.29` |
|
|
68
|
+
| `@orkestrel/msg` | `0.0.20` | L2 | `@orkestrel/codec` `^0.0.13`, `@orkestrel/contract` `^0.0.27` | |
|
|
69
|
+
| `@orkestrel/ndjson` | `0.0.20` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
70
|
+
| `@orkestrel/ollama` | `0.0.45` | L6 | `@orkestrel/tool` `^0.0.26`, `@orkestrel/agent` `^0.0.48`, `@orkestrel/budget` `^0.0.21`, `@orkestrel/ndjson` `^0.0.20`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/process` `^0.0.23`, `@orkestrel/contract` `^0.0.27` | |
|
|
71
|
+
| `@orkestrel/pool` | `0.0.24` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
72
|
+
| `@orkestrel/probe` | `0.0.33` | L5 | `@orkestrel/lsp` `^0.0.18`, `@orkestrel/mcp` `^0.0.46`, `@orkestrel/pool` `^0.0.24`, `@orkestrel/tool` `^0.0.26`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/process` `^0.0.23`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27` | `vitest` `^4.1.12 \|\| ^5.1.0`, `typescript` `^6.0.3 \|\| ^7.0.2` |
|
|
73
|
+
| `@orkestrel/process` | `0.0.23` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
74
|
+
| `@orkestrel/program` | `0.0.24` | L4 | `@orkestrel/rater` `^0.0.25`, `@orkestrel/reason` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/qualifier` `^0.0.25` | |
|
|
75
|
+
| `@orkestrel/qualifier` | `0.0.25` | L3 | `@orkestrel/reason` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
76
|
+
| `@orkestrel/queue` | `0.0.26` | L3 | `@orkestrel/abort` `^0.0.20`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29` | |
|
|
77
|
+
| `@orkestrel/rater` | `0.0.25` | L3 | `@orkestrel/reason` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
78
|
+
| `@orkestrel/reason` | `0.0.21` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
79
|
+
| `@orkestrel/relation` | `0.0.27` | L3 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29` | |
|
|
80
|
+
| `@orkestrel/router` | `0.0.25` | L2 | `@orkestrel/abort` `^0.0.20`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
81
|
+
| `@orkestrel/scaffold` | `0.0.144` | L3 | `@orkestrel/console` `^0.0.22`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/process` `^0.0.22`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/markdown` `^0.0.23`, `@orkestrel/template` `^0.0.16` | |
|
|
82
|
+
| `@orkestrel/sea` | `0.0.26` | L3 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/process` `^0.0.23`, `@orkestrel/contract` `^0.0.27` | |
|
|
83
|
+
| `@orkestrel/server` | `0.0.31` | L3 | `@orkestrel/abort` `^0.0.20`, `@orkestrel/codec` `^0.0.13`, `@orkestrel/router` `^0.0.25`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27` | |
|
|
84
|
+
| `@orkestrel/sqlite` | `0.0.21` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
85
|
+
| `@orkestrel/sse` | `0.0.17` | L2 | `@orkestrel/codec` `^0.0.13`, `@orkestrel/contract` `^0.0.27` | |
|
|
86
|
+
| `@orkestrel/study` | `0.0.29` | L7 | `@orkestrel/tool` `^0.0.26`, `@orkestrel/abort` `^0.0.20`, `@orkestrel/agent` `^0.0.48`, `@orkestrel/budget` `^0.0.21`, `@orkestrel/ollama` `^0.0.45`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27` | |
|
|
87
|
+
| `@orkestrel/table` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
88
|
+
| `@orkestrel/template` | `0.0.17` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
89
|
+
| `@orkestrel/terminal` | `0.0.29` | L3 | `@orkestrel/sse` `^0.0.17`, `@orkestrel/form` `^0.0.21`, `@orkestrel/console` `^0.0.23`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29` | |
|
|
90
|
+
| `@orkestrel/test` | `0.0.45` | L1 | `@orkestrel/contract` `^0.0.27` | `vitest` `^5.1.0`, `playwright` `^1.65.0` |
|
|
91
|
+
| `@orkestrel/timeout` | `0.0.20` | L1 | `@orkestrel/contract` `^0.0.27` | |
|
|
92
|
+
| `@orkestrel/tool` | `0.0.26` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
93
|
+
| `@orkestrel/toolbox` | `0.0.36` | L6 | `@orkestrel/form` `^0.0.21`, `@orkestrel/tool` `^0.0.26`, `@orkestrel/agent` `^0.0.48`, `@orkestrel/server` `^0.0.31`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29`, `@orkestrel/relation` `^0.0.27`, `@orkestrel/terminal` `^0.0.29`, `@orkestrel/workflow` `^0.0.32`, `@orkestrel/workspace` `^0.0.22` | |
|
|
94
|
+
| `@orkestrel/websocket` | `0.0.22` | L2 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27` | |
|
|
95
|
+
| `@orkestrel/worker` | `0.0.26` | L4 | `@orkestrel/pool` `^0.0.24`, `@orkestrel/queue` `^0.0.26`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29` | |
|
|
96
|
+
| `@orkestrel/workflow` | `0.0.32` | L4 | `@orkestrel/abort` `^0.0.20`, `@orkestrel/queue` `^0.0.26`, `@orkestrel/budget` `^0.0.21`, `@orkestrel/emitter` `^0.0.19`, `@orkestrel/timeout` `^0.0.20`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29` | |
|
|
97
|
+
| `@orkestrel/workspace` | `0.0.22` | L3 | `@orkestrel/emitter` `^0.0.19`, `@orkestrel/contract` `^0.0.27`, `@orkestrel/database` `^0.0.29` | |
|
|
98
98
|
|
|
99
99
|
<!-- /orkestrel:catalog -->
|
|
100
100
|
|
|
@@ -61,6 +61,7 @@ For behavioral interfaces/classes:
|
|
|
61
61
|
- The table's methods exactly match the interface's call-signature members.
|
|
62
62
|
- Readonly data properties remain in the interface's `## Surface` row.
|
|
63
63
|
- Each implementing class exposes exactly its interface methods—no missing or extra public behavior.
|
|
64
|
+
- Name the interface a class implements `{Class}Interface` when one method table serves both: parity pairs a class with the interface named for it alone. A class with members that implements an interface of another name, such as `MemorySource` implementing `ByteSourceInterface`, carries its own `## Methods` table, and each method in it carries its own doc block, because parity reads that table's summaries from the class and never from the interface.
|
|
64
65
|
|
|
65
66
|
Parity scope:
|
|
66
67
|
|
|
@@ -44,6 +44,7 @@ These rules govern how a claim is established: the evidence read before a change
|
|
|
44
44
|
- When the workspace builds no showcase page for the surface, or the question needs what one HTML file does not carry (a second route, a separately requested asset, or a source edit shown without a rebuild), start the `dev` script, or the `dev:<framework>` script for a framework face, and navigate to the address the script prints.
|
|
45
45
|
- When the surface calls an API, start every server it calls before navigating, each on a port apart from the page's server: a third-party backend by its own start command, and the project's `src/server` or `app/server` surface by the script that starts it, which is the `serve:build` script for `app/server`.
|
|
46
46
|
- Read a receipt as evidence about its claim, never as a gate result.
|
|
47
|
+
- When a question needs a CPU profile of code a Vitest `threads` project runs, such as the `probe` project, run Node with `--cpu-prof --cpu-prof-dir=<dir>` in the joined form and read the profile whose thread id, the segment before the sequence number in its file name, is not 0. Node writes one profile per thread and the main thread's holds none of the test code; Vitest passes `process.execArgv` to its workers, where a split `--cpu-prof-dir <dir>` fails the worker's start (read 2026-11-19 on Node 22.23.5 and Vitest 5.1.0).
|
|
47
48
|
- State the instrument's coverage beside its result. Match the instrument to the question: a text search reports on text; a claim about declarations or call sites needs the compiler or a parser.
|
|
48
49
|
- Report a question unanswered rather than answering it with a weaker instrument.
|
|
49
50
|
- When a verdict reads rows or numbers, refuse the verdict on an empty result or on a missing or non-finite number; never read either as zero or as a pass.
|
|
@@ -249,6 +249,7 @@ refuses a helper placed under `fixtures/` outside the permitted raw-runtime supp
|
|
|
249
249
|
- `tests/setupService.ts`: the `service` project's readiness setup, per § Live-service tests.
|
|
250
250
|
- `tests/setupGlobal.ts`: the `globalSetup` module `.claude/rules/workspace.md` § Test project
|
|
251
251
|
matrix assigns to `src:browser`, `setup:browser`, and `integration`.
|
|
252
|
+
- `tests/setupIsolation.ts`: the isolation guard `src:browser` and `app:browser` load when it exists, per `.claude/rules/workspace.md` § Test project matrix; it exports nothing and owes no proof.
|
|
252
253
|
- `tests/setupStudy.ts`: the harness module the study tests import and, in a study-engine package,
|
|
253
254
|
its source tests too. Name it in no project's `setupFiles`; tests import it, as the policy proof
|
|
254
255
|
imports `tests/setupPolicy.ts`.
|
|
@@ -162,19 +162,19 @@ Environment rules:
|
|
|
162
162
|
`vite.config.ts` defines Vitest projects on an environment axis and a workspace-proof axis. The
|
|
163
163
|
environment axis is one project per src/app axis × environment, plus one per extension face:
|
|
164
164
|
|
|
165
|
-
| Project | Files | Environment | Setup
|
|
166
|
-
| ------------- | ---------------------- | ------------------------------------- |
|
|
167
|
-
| `src:core` | `tests/src/core/**` | Node | `setup.ts`
|
|
168
|
-
| `src:browser` | `tests/src/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts`
|
|
169
|
-
| `src:vue` | `tests/src/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts`
|
|
170
|
-
| `src:server` | `tests/src/server/**` | Node | `setup.ts`, `setupServer.ts`
|
|
171
|
-
| `src:styles` | `tests/src/styles/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` when present
|
|
172
|
-
| `src:<name>` | `tests/src/<name>/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` when present
|
|
173
|
-
| `src:bin` | `tests/src/bin/**` | Node | `setup.ts`, `setupServer.ts`
|
|
174
|
-
| `app:core` | `tests/app/core/**` | Node | `setup.ts`
|
|
175
|
-
| `app:browser` | `tests/app/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts`
|
|
176
|
-
| `app:vue` | `tests/app/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts`
|
|
177
|
-
| `app:server` | `tests/app/server/**` | Node | `setup.ts`, `setupServer.ts`
|
|
165
|
+
| Project | Files | Environment | Setup |
|
|
166
|
+
| ------------- | ---------------------- | ------------------------------------- | --------------------------------------------------------------- |
|
|
167
|
+
| `src:core` | `tests/src/core/**` | Node | `setup.ts` |
|
|
168
|
+
| `src:browser` | `tests/src/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts`, `setupIsolation.ts` when present |
|
|
169
|
+
| `src:vue` | `tests/src/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
170
|
+
| `src:server` | `tests/src/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
171
|
+
| `src:styles` | `tests/src/styles/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` when present |
|
|
172
|
+
| `src:<name>` | `tests/src/<name>/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` when present |
|
|
173
|
+
| `src:bin` | `tests/src/bin/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
174
|
+
| `app:core` | `tests/app/core/**` | Node | `setup.ts` |
|
|
175
|
+
| `app:browser` | `tests/app/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts`, `setupIsolation.ts` when present |
|
|
176
|
+
| `app:vue` | `tests/app/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
177
|
+
| `app:server` | `tests/app/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
178
178
|
|
|
179
179
|
- Compose every sheet-face project (`src:styles` and each `src:<name>`) in its own wrapper through
|
|
180
180
|
the one root `sheetProject` factory, and run it through its `test:src:<face>` script, which builds
|
|
@@ -224,6 +224,7 @@ one environment, so each is its own project:
|
|
|
224
224
|
`tests/setupStudy.ts`, and the root `studies/` directory is no test-project input.
|
|
225
225
|
- When `tests/setupGlobal.ts` exists, give `src:browser`, `setup:browser`, and `integration` that
|
|
226
226
|
module as their `globalSetup` option, and give no other project a global setup.
|
|
227
|
+
- When `tests/setupIsolation.ts` exists, give `src:browser` and `app:browser` the `server.headers` `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp`, and append that module to their `setupFiles`; `app:vue`, each `journey:<variant>`, and the showcase keep both through the spread of `appBrowser`, so an application that opts in serves its development and showcase pages isolated as well, and a cross-origin load there fails without a `Cross-Origin-Resource-Policy` or CORS response header. Give no other project the headers.
|
|
227
228
|
- When a browser application selects the journey axis, register `journey:<variant>` projects
|
|
228
229
|
through the birth-owned `configs/app/vite.journey.config.ts` wrapper. Keep the adopter's variant
|
|
229
230
|
list there, build the wrapper with one `buildCaptureWrapper` call from
|
|
@@ -273,7 +273,7 @@ The core supplies the entities a browser session and an agent use. Its host-spec
|
|
|
273
273
|
| `BROWSER_DEFAULT_VIEWPORT_HEIGHT` | const | `720` | Sets the default viewport height, `720` pixels. |
|
|
274
274
|
| `BROWSER_DEFAULT_VIEWPORT_WIDTH` | const | `1280` | Sets the default viewport width, `1280` pixels. |
|
|
275
275
|
| `BROWSER_FRAME_WORLD_NAME` | const | `"__orkestrelBrowserFrame"` | Names the isolated world used for iframe evaluation, `'__orkestrelBrowserFrame'`. |
|
|
276
|
-
| `BROWSER_HAR_CREATOR` | const | `Readonly<{ name: "@orkestrel/browser"; version: "0.0.
|
|
276
|
+
| `BROWSER_HAR_CREATOR` | const | `Readonly<{ name: "@orkestrel/browser"; version: "0.0.36"; }>` | Names the tool identity embedded in HAR 1.2 documents. |
|
|
277
277
|
| `BROWSER_KEY_MODIFIERS` | const | `Readonly<Record<string, number>>` | Maps a canonical modifier name to its CDP Input modifier bit value. |
|
|
278
278
|
| `BROWSER_MOUSE_BUTTON_MASKS` | const | `Readonly<Record<BrowserMouseButton, number>>` | Maps each public mouse button to its CDP Input pressed-button bit value. |
|
|
279
279
|
| `BROWSER_NAVIGATION_REASONS` | const | `readonly BrowserNavigationReason[]` | Lists every CDP `Page.ClientNavigationReason` value a page accepts as a navigation's reason, as of Chromium 141; a page reads any other reason as undefined. |
|