@orkestrel/scaffold 0.0.118 → 0.0.119
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 +1 -1
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/platforms/windows.md +2 -1
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +2 -1
- package/dist/host/claude/rules/names.md +3 -2
- package/dist/host/claude/rules/tests.md +2 -0
- package/dist/host/claude/rules/workspace.md +2 -1
- package/dist/host/guides/scaffold.md +11 -1
- package/dist/host/manifest.json +106 -9
- package/dist/host/tests/setupPolicy.ts +18 -6
- package/dist/src/core/index.cjs +65 -1
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +23 -0
- package/dist/src/core/index.d.ts +23 -0
- package/dist/src/core/index.js +65 -2
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +37 -14
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +9 -4
- package/dist/src/server/index.d.ts +9 -4
- package/dist/src/server/index.js +38 -15
- package/dist/src/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1492,8 +1492,9 @@ function stageBytes(host, root, destinations) {
|
|
|
1492
1492
|
* host root is not vacant, the checkout does not carry every vendored path, two
|
|
1493
1493
|
* vendored files claim one storage name, a vendored file is not a plain file
|
|
1494
1494
|
* within the artifact ceiling, published guides are unreadable, a staged
|
|
1495
|
-
* collision's owner set is not a subset of its published owner set,
|
|
1496
|
-
* `
|
|
1495
|
+
* collision's owner set is not a subset of its published owner set, a
|
|
1496
|
+
* `SURFACE_TRANSFERS` entry is spent because its keeper alone claims the name, the
|
|
1497
|
+
* inventory is absent without `establish: true`, or the staged manifest does not read back.
|
|
1497
1498
|
* @throws `ScaffoldError('WRITE', …)` when a staged file or the manifest cannot
|
|
1498
1499
|
* be written.
|
|
1499
1500
|
*
|
|
@@ -1529,7 +1530,10 @@ function stageBytes(host, root, destinations) {
|
|
|
1529
1530
|
* the canon and reference files for reading. Every catalog package must have a
|
|
1530
1531
|
* guide in the discovered membership before the host is written.
|
|
1531
1532
|
* Copied guides must carry no collision whose name and exact owner set the
|
|
1532
|
-
* committed inventory lacks.
|
|
1533
|
+
* committed inventory lacks. A `SURFACE_TRANSFERS` entry that another guide claims
|
|
1534
|
+
* admits its keeper beside the recorded owners, or beside the one owner of a name
|
|
1535
|
+
* the inventory lacks, and the staged surface records that keeper whether or not
|
|
1536
|
+
* its guide is mirrored. An absent inventory requires `establish: true`;
|
|
1533
1537
|
* an inventory without a valid recorded Surface is refused.
|
|
1534
1538
|
* Everything downstream — the missing-path refusal, the
|
|
1535
1539
|
* storage collision guard, the sort, the digests, and the root inventory — reads
|
|
@@ -1670,29 +1674,48 @@ function stageHost(checkout, host, options) {
|
|
|
1670
1674
|
digest
|
|
1671
1675
|
};
|
|
1672
1676
|
});
|
|
1673
|
-
const
|
|
1674
|
-
const
|
|
1677
|
+
const claims = readSurfaceClaims((0, node_path.join)(root, "guides"));
|
|
1678
|
+
const claimants = Map.groupBy(claims.flatMap(({ owner, names }) => names.map((name) => ({
|
|
1675
1679
|
name,
|
|
1676
|
-
|
|
1677
|
-
})),
|
|
1680
|
+
owner
|
|
1681
|
+
}))), ({ name }) => name);
|
|
1682
|
+
const transfers = _src_core.SURFACE_TRANSFERS.map((transfer) => {
|
|
1683
|
+
const owners = new Set(claimants.get(transfer.name)?.map(({ owner }) => owner));
|
|
1684
|
+
return {
|
|
1685
|
+
...transfer,
|
|
1686
|
+
claimed: owners.has(transfer.keeper),
|
|
1687
|
+
givers: [...owners].filter((owner) => owner !== transfer.keeper).sort()
|
|
1688
|
+
};
|
|
1689
|
+
});
|
|
1690
|
+
const spent = transfers.filter(({ claimed, givers }) => claimed && givers.length === 0).map(({ name, keeper, item }) => `${name} to ${keeper} under item ${item}`);
|
|
1691
|
+
if (spent.length > 0) throw new _src_core.ScaffoldError("TARGET", `Surface transfers are spent, so remove them from SURFACE_TRANSFERS: ${spent.join("; ")}`, {
|
|
1692
|
+
checkout: source,
|
|
1693
|
+
host: root,
|
|
1694
|
+
transfers: spent
|
|
1695
|
+
});
|
|
1696
|
+
const active = transfers.filter(({ givers }) => givers.length > 0);
|
|
1697
|
+
const collisions = (0, _src_core.collectSurfaceCollisions)([...claims, ...active.map(({ name, keeper }) => ({
|
|
1698
|
+
owner: keeper,
|
|
1699
|
+
names: [name]
|
|
1700
|
+
}))]);
|
|
1701
|
+
const growth = published === void 0 ? [] : (0, _src_core.compareSurfaceCollisions)(collisions, [...new Map([...published, ...active.map(({ name, keeper, givers }) => [name, [...published.get(name) ?? (givers.length === 1 ? givers : []), keeper]])])].map(([name, owners]) => ({
|
|
1678
1702
|
name,
|
|
1679
1703
|
owners
|
|
1680
|
-
}))).filter(({ standing }) => standing === "error").map(({ name, owners }) =>
|
|
1704
|
+
}))).filter(({ standing }) => standing === "error").map(({ name, owners }) => {
|
|
1705
|
+
const keeper = active.find((transfer) => transfer.name === name)?.keeper;
|
|
1706
|
+
return `${name} staged (${owners.join(", ")}), recorded (${published.get(name)?.join(", ") ?? "absent"})${keeper === void 0 ? "" : `, transferred to ${keeper}`}`;
|
|
1707
|
+
});
|
|
1681
1708
|
if (growth.length > 0) throw new _src_core.ScaffoldError("TARGET", `Staged Surface collisions differ from the inventory: ${growth.join("; ")}`, {
|
|
1682
1709
|
checkout: source,
|
|
1683
1710
|
host: root,
|
|
1684
1711
|
baseline,
|
|
1685
1712
|
collisions: growth
|
|
1686
1713
|
});
|
|
1687
|
-
const surface = [...collisions].map(([name, owners]) => ({
|
|
1688
|
-
name,
|
|
1689
|
-
owners
|
|
1690
|
-
}));
|
|
1691
1714
|
const manifest = {
|
|
1692
1715
|
entries,
|
|
1693
1716
|
roots,
|
|
1694
|
-
surface,
|
|
1695
|
-
digest: computeManifestDigest(entries, roots,
|
|
1717
|
+
surface: collisions,
|
|
1718
|
+
digest: computeManifestDigest(entries, roots, collisions)
|
|
1696
1719
|
};
|
|
1697
1720
|
const metadata = resolveContainedPath(root, MANIFEST_NAME);
|
|
1698
1721
|
if (metadata === void 0) throw new _src_core.ScaffoldError("INVALID", `Host manifest leaves its root at ${root}`, { host: root });
|