@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.
@@ -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 know a caller's
1752
- * template-override intent.
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 declared = (0, _src_core.manifestToDependencies)(readManifest(target));
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 current = readGuideReferences(target, deps);
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(deps, current, allowance), await this.#versions(deps, allowance));
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
  }