@orkestrel/scaffold 0.0.139 → 0.0.140

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.
@@ -1271,7 +1271,7 @@ export declare class Materializer implements MaterializerInterface {
1271
1271
  * @param plan - The compiled plan to compare.
1272
1272
  * @param target - The directory to inspect.
1273
1273
  * @returns Findings for hydrated planned paths and selected foreign candidates,
1274
- * plus non-blocking questions for present foreign mirrors differing from hosted guides.
1274
+ * and no questions.
1275
1275
  * @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
1276
1276
  * exact shape, `TARGET` when the host or target cannot be read within its
1277
1277
  * bounds, and `DESTROYED` after teardown.
@@ -1271,7 +1271,7 @@ export declare class Materializer implements MaterializerInterface {
1271
1271
  * @param plan - The compiled plan to compare.
1272
1272
  * @param target - The directory to inspect.
1273
1273
  * @returns Findings for hydrated planned paths and selected foreign candidates,
1274
- * plus non-blocking questions for present foreign mirrors differing from hosted guides.
1274
+ * and no questions.
1275
1275
  * @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
1276
1276
  * exact shape, `TARGET` when the host or target cannot be read within its
1277
1277
  * bounds, and `DESTROYED` after teardown.
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- import { andOf, arrayOf, attempt, boundsOf, comparePrimitives, compileGuard, holds, isArray, isBoolean, isDefined, isError, isFunction, isInteger, isNonNegativeInteger, isNumber, isObject, isRecord, isString, parseJSON, parseJSONAs, parseStringField, recordOf, recordShape, stringOf, stringShape, unionOf, whereOf } from "@orkestrel/contract";
2
+ import { andOf, arrayOf, attempt, boundsOf, comparePrimitives, compileGuard, holds, isArray, isBoolean, isDefined, isError, isFunction, isInteger, isNonNegativeInteger, isObject, isRecord, isSafeInteger, isString, parseJSON, parseJSONAs, parseStringField, recordOf, recordShape, stringOf, stringShape, unionOf, whereOf } from "@orkestrel/contract";
3
3
  import { AXES, CANON_PATHS, CATALOG_AGENT_PATH, CATALOG_END_MARKER, CATALOG_START_MARKER, CONTROL_CHARACTER_PATTERN, DEPENDENCY_NAME_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, FRAMEWORKS, HOST_INVENTORY_PATH, HOST_PATHS, MAX_ARTIFACT_BYTES, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, REFERENCE_PATHS, SURFACE_TRANSFERS, ScaffoldError, blueprintToConfigArtifacts, bytesToHex, catalogToLayers, collectSurfaceCollisions, collectSurfaceConflicts, compareSurfaceCollisions, compareVersions, computeBytes, computeTotal, contentToHex, createBlueprint, extractRangeMajor, extractVersion, inferArtifactGroup, insertManifestDependencies, insertManifestEntries, isAudit, isCatalogEntry, isCollection, isDependency, isDependencyName, isFloorPath, isHexContent, isManifestScript, isMirror, isPath, isPlan, isRetainedPath, isSnapshot, iterateAnswers, manifestToName, matchesArtifactDriftReachability, matchesRange, nameToGuide, parseOwnedJSONValue, planToArtifactFindings, renderSkillPointer, replaceManifestOverrides, replaceManifestRanges, replaceManifestScripts } from "../core/index.js";
4
4
  import { createHash, randomUUID } from "node:crypto";
5
5
  import { chmodSync, closeSync, constants, copyFileSync, fstatSync, linkSync, lstatSync, mkdirSync, mkdtempSync, openSync, opendirSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, writeFileSync } from "node:fs";
@@ -685,7 +685,7 @@ function resolveRealPath(path) {
685
685
  * ```
686
686
  */
687
687
  function climbRealPath(current, pending, depth) {
688
- if (!Number.isSafeInteger(depth) || depth < 0 || depth > 64) return void 0;
688
+ if (!isSafeInteger(depth) || depth < 0 || depth > 64) return void 0;
689
689
  const real = attempt(() => realpathSync(current));
690
690
  if (real.success) return pending.length === 0 ? real.value : join(real.value, ...pending);
691
691
  if (!matchesMissingPath(real.error)) return void 0;
@@ -1121,7 +1121,7 @@ function pruneEmptiedDirectories(target, removed) {
1121
1121
  * ```
1122
1122
  */
1123
1123
  function readFileHex(root, path, limit = MAX_ARTIFACT_BYTES) {
1124
- if (!isNumber(limit) || !Number.isSafeInteger(limit) || limit < 0 || limit > MAX_ARTIFACT_BYTES) throw new ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
1124
+ if (!isSafeInteger(limit) || limit < 0 || limit > MAX_ARTIFACT_BYTES) throw new ScaffoldError("INVALID", `Byte limit is outside the artifact ceiling at ${path}`, {
1125
1125
  root,
1126
1126
  path,
1127
1127
  limit
@@ -3318,7 +3318,7 @@ var Materializer = class {
3318
3318
  * @param plan - The compiled plan to compare.
3319
3319
  * @param target - The directory to inspect.
3320
3320
  * @returns Findings for hydrated planned paths and selected foreign candidates,
3321
- * plus non-blocking questions for present foreign mirrors differing from hosted guides.
3321
+ * and no questions.
3322
3322
  * @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
3323
3323
  * exact shape, `TARGET` when the host or target cannot be read within its
3324
3324
  * bounds, and `DESTROYED` after teardown.
@@ -3678,27 +3678,9 @@ var Materializer = class {
3678
3678
  ...listCanonPaths(target, plan.groups),
3679
3679
  ...listWrapperPaths(target, plan.groups)
3680
3680
  ]);
3681
- const questions = [];
3682
- if (plan.groups.includes("guides")) {
3683
- const directory = resolveContainedPath(target, "guides");
3684
- const spent = [];
3685
- for (const file of directory === void 0 ? [] : listFiles(directory)) {
3686
- const path = `guides/${file}`;
3687
- if (file.includes("/") || file === "README.md" || !file.endsWith(".md") || path === nameToGuide(plan.blueprint.name)) continue;
3688
- const hosted = this.#reference(path, MAX_TOTAL_ARTIFACT_BYTES - computeTotal(spent));
3689
- if (hosted === void 0) continue;
3690
- spent.push(hosted.length / 2);
3691
- const present = readFileHex(target, path);
3692
- if (present !== void 0 && present !== hosted) questions.push({
3693
- field: "guides",
3694
- message: `The mirror at ${path} differs from the hosted guide. Run catalog to refresh it.`,
3695
- blocking: false
3696
- });
3697
- }
3698
- }
3699
3681
  return {
3700
3682
  findings: planToArtifactFindings(hydrated, readSnapshot(target, [...paths])),
3701
- questions
3683
+ questions: []
3702
3684
  };
3703
3685
  }
3704
3686
  #reference(path, budget) {
@@ -4167,7 +4149,7 @@ var ReadAllowance = class {
4167
4149
  * non-negative safe integer.
4168
4150
  */
4169
4151
  constructor(budget) {
4170
- if (!isNonNegativeInteger(budget) || !Number.isSafeInteger(budget)) throw new ScaffoldError("INVALID", "The read budget is not a non-negative safe integer.", { field: "budget" });
4152
+ if (!isNonNegativeInteger(budget) || !isSafeInteger(budget)) throw new ScaffoldError("INVALID", "The read budget is not a non-negative safe integer.", { field: "budget" });
4171
4153
  this.#remaining = budget;
4172
4154
  }
4173
4155
  /** The bytes the call has left; negative after a read overshoots the budget. */
@@ -4192,7 +4174,7 @@ var ReadAllowance = class {
4192
4174
  * ```
4193
4175
  */
4194
4176
  spend(bytes) {
4195
- if (!isNonNegativeInteger(bytes) || !Number.isSafeInteger(bytes)) throw new ScaffoldError("INVALID", "The spent bytes are not a non-negative safe integer.", { field: "bytes" });
4177
+ if (!isNonNegativeInteger(bytes) || !isSafeInteger(bytes)) throw new ScaffoldError("INVALID", "The spent bytes are not a non-negative safe integer.", { field: "bytes" });
4196
4178
  this.#remaining -= bytes;
4197
4179
  }
4198
4180
  };