@orkestrel/scaffold 0.0.5 → 0.0.6
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/scaffold.js +57 -22
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/CLAUDE.md +18 -4
- package/dist/host/claude/rules/workspace.md +8 -8
- package/dist/host/guides/src/scaffold.md +105 -37
- package/dist/host/scripts/codex.sh +5 -0
- package/dist/host/tests/setupPolicy.ts +178 -4
- package/dist/src/core/index.cjs +120 -37
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +52 -13
- package/dist/src/core/index.d.ts +52 -13
- package/dist/src/core/index.js +119 -38
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +11 -5
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +4 -2
- package/dist/src/server/index.d.ts +4 -2
- package/dist/src/server/index.js +12 -6
- package/dist/src/server/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1748,8 +1748,8 @@ function selectOrkestrelEntries(value) {
|
|
|
1748
1748
|
* dev-installed for local testing) is likewise excluded from `extras` — it
|
|
1749
1749
|
* already appears as a `peer`/`dependency` above, and double-counting it as
|
|
1750
1750
|
* an `extra` would land it in `peers ∩ extras`, a blocking `validateBlueprint`
|
|
1751
|
-
* gate. `overrides` is always `[]` — derivation cannot
|
|
1752
|
-
*
|
|
1751
|
+
* gate. `overrides` is always `[]` — derivation cannot recover a caller's
|
|
1752
|
+
* artifact-override intent from repository state.
|
|
1753
1753
|
* @returns The reconstructed `Blueprint`.
|
|
1754
1754
|
* @throws `ScaffoldError('TARGET', …)` when `target`'s manifest is unreadable
|
|
1755
1755
|
* (via `readManifest`), is not valid JSON, its name is unsafe for its
|
|
@@ -2861,6 +2861,8 @@ function consumeCatalogAllowance(allowance, root) {
|
|
|
2861
2861
|
* `@orkestrel/`. A child with an unreadable or unparsable `package.json`,
|
|
2862
2862
|
* or a non-`@orkestrel` name, is skipped silently — it simply is not a
|
|
2863
2863
|
* fleet member.
|
|
2864
|
+
* @throws `ScaffoldError('TARGET', …)` when a child directory name contains
|
|
2865
|
+
* terminal controls and therefore cannot be safely inspected or reported.
|
|
2864
2866
|
*
|
|
2865
2867
|
* @example
|
|
2866
2868
|
* ```ts
|
|
@@ -2888,6 +2890,7 @@ function discoverPackages(root, allowance = new Float64Array([MAX_HOST_ENTRIES])
|
|
|
2888
2890
|
if (entry === null) break;
|
|
2889
2891
|
consumeCatalogAllowance(allowance, root);
|
|
2890
2892
|
if (!entry.isDirectory()) continue;
|
|
2893
|
+
if (!isTerminalText(entry.name)) throw new _src_core.ScaffoldError("TARGET", "Fleet discovery found a non-portable directory");
|
|
2891
2894
|
const directory = (0, node_path.join)(root, entry.name);
|
|
2892
2895
|
const text = (0, _orkestrel_contract.attempt)(() => readFileText(directory, "package.json", "TARGET", "package", _src_core.MAX_MANIFEST_BYTES));
|
|
2893
2896
|
if (!text.success) continue;
|
|
@@ -3602,12 +3605,15 @@ var Sync = class Sync {
|
|
|
3602
3605
|
}
|
|
3603
3606
|
async pull(target, dependencies) {
|
|
3604
3607
|
this.#ensureAlive();
|
|
3605
|
-
const
|
|
3608
|
+
const manifest = readManifest(target);
|
|
3609
|
+
const declared = (0, _src_core.manifestToDependencies)(manifest);
|
|
3606
3610
|
const deps = dependencies === void 0 ? declared : parseSyncDependencies(dependencies, false);
|
|
3607
3611
|
if (dependencies !== void 0 && deps.some((dependency) => !declared.some((candidate) => candidate.name === dependency.name && candidate.range === dependency.range))) throw new _src_core.ScaffoldError("INVALID", "Sync pull selection is not declared by the target");
|
|
3608
|
-
const
|
|
3612
|
+
const name = (0, _src_core.manifestToName)(manifest);
|
|
3613
|
+
const guideDependencies = name === void 0 ? deps : deps.filter((dependency) => dependency.name !== name);
|
|
3614
|
+
const current = readGuideReferences(target, guideDependencies);
|
|
3609
3615
|
const allowance = Float64Array.of(this.#budget);
|
|
3610
|
-
const report = syncReportOf(target, await this.#guides(
|
|
3616
|
+
const report = syncReportOf(target, await this.#guides(guideDependencies, current, allowance), await this.#versions(deps, allowance));
|
|
3611
3617
|
this.#emitter.emit("done", report);
|
|
3612
3618
|
return report;
|
|
3613
3619
|
}
|