@orkestrel/scaffold 0.0.122 → 0.0.124

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.
Files changed (72) hide show
  1. package/dist/agents/skills/orkestrel-harden/scripts/interleave.js +539 -0
  2. package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1163 -0
  3. package/dist/bin/main.js +21 -19
  4. package/dist/bin/main.js.map +1 -1
  5. package/dist/host/agents/orchestration.md +13 -7
  6. package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -3
  7. package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +1 -1
  8. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +4 -2
  9. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +2 -2
  10. package/dist/host/agents/skills/orkestrel-harden/SKILL.md +16 -3
  11. package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +18 -12
  12. package/dist/host/agents/skills/orkestrel-harden/references/document.md +1 -0
  13. package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +2 -1
  14. package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +1 -1
  15. package/dist/host/agents/skills/orkestrel-harden/references/methods.md +642 -0
  16. package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +665 -0
  17. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +14 -13
  18. package/dist/host/agents/skills/orkestrel-parallel/references/claude-code.md +13 -13
  19. package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +1 -0
  20. package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1433 -0
  21. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +2 -1
  22. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +18 -1
  23. package/dist/host/claude/AGENTS.md +1 -1
  24. package/dist/host/claude/agents/analyst.md +1 -1
  25. package/dist/host/claude/agents/builder.md +1 -1
  26. package/dist/host/claude/agents/distiller.md +2 -1
  27. package/dist/host/claude/agents/grok.md +2 -2
  28. package/dist/host/claude/agents/opus.md +2 -2
  29. package/dist/host/claude/agents/orkestrel.md +30 -30
  30. package/dist/host/claude/agents/reviewer.md +2 -2
  31. package/dist/host/claude/agents/scout.md +2 -1
  32. package/dist/host/claude/agents/verifier.md +1 -1
  33. package/dist/host/claude/rules/campaign.md +12 -11
  34. package/dist/host/claude/rules/documentation.md +1 -0
  35. package/dist/host/claude/rules/patterns.md +14 -0
  36. package/dist/host/claude/rules/quality.md +4 -1
  37. package/dist/host/claude/rules/tests.md +4 -0
  38. package/dist/host/claude/rules/writing.md +1 -1
  39. package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
  40. package/dist/host/codex/agents/analyst.toml +4 -1
  41. package/dist/host/codex/agents/astra.toml +1 -1
  42. package/dist/host/codex/agents/builder.toml +1 -1
  43. package/dist/host/codex/agents/distiller.toml +4 -2
  44. package/dist/host/codex/agents/grok.toml +5 -2
  45. package/dist/host/codex/agents/opus.toml +3 -3
  46. package/dist/host/codex/agents/reviewer.toml +6 -2
  47. package/dist/host/codex/agents/scout.toml +5 -1
  48. package/dist/host/codex/agents/verifier.toml +6 -1
  49. package/dist/host/guides/agent.md +1119 -457
  50. package/dist/host/guides/contract.md +226 -104
  51. package/dist/host/guides/database.md +12 -12
  52. package/dist/host/guides/ndjson.md +94 -21
  53. package/dist/host/guides/ollama.md +22 -18
  54. package/dist/host/guides/probe.md +29 -27
  55. package/dist/host/guides/reason.md +377 -114
  56. package/dist/host/guides/scaffold.md +43 -21
  57. package/dist/host/guides/study.md +538 -450
  58. package/dist/host/guides/tool.md +163 -58
  59. package/dist/host/manifest.json +70 -52
  60. package/dist/src/core/index.cjs +21 -20
  61. package/dist/src/core/index.cjs.map +1 -1
  62. package/dist/src/core/index.d.cts +1 -4
  63. package/dist/src/core/index.d.ts +1 -4
  64. package/dist/src/core/index.js +21 -20
  65. package/dist/src/core/index.js.map +1 -1
  66. package/dist/src/server/index.cjs +87 -8
  67. package/dist/src/server/index.cjs.map +1 -1
  68. package/dist/src/server/index.d.cts +50 -6
  69. package/dist/src/server/index.d.ts +50 -6
  70. package/dist/src/server/index.js +87 -10
  71. package/dist/src/server/index.js.map +1 -1
  72. package/package.json +15 -15
@@ -952,6 +952,34 @@ export declare function listDirectories(root: string): readonly string[];
952
952
  */
953
953
  export declare function listFiles(root: string): readonly string[];
954
954
 
955
+ /**
956
+ * Lists the configuration wrappers a target holds, filtered to a plan's groups.
957
+ *
958
+ * @param target - The directory to read.
959
+ * @param groups - The artifact groups the plan selects.
960
+ * @returns Every exact-case wrapper file the target holds, in compile order, and `[]`
961
+ * when the target holds none, cannot be resolved, or the plan selects no wrapper's group.
962
+ *
963
+ * @remarks
964
+ * The population sits under `configs/src` and `configs/app`, and the widest blueprint
965
+ * compiles it: every environment on both axes, `bin`, `styles`, `themes`, `showcase`,
966
+ * `journey`, and each framework on both axes. A wrapper the plan claims pairs with its
967
+ * artifact, and the rest report `foreign`, which lets the deletion verb take the wrappers
968
+ * an environment left behind.
969
+ *
970
+ * Every other file under those directories belongs to its author and stays unread,
971
+ * and so does a named styles extension's wrapper, because those names form an open
972
+ * set. The exact-case read keeps a case-variant name out on a case-folding host.
973
+ *
974
+ * @example
975
+ * ```ts
976
+ * import { listWrapperPaths } from '@orkestrel/scaffold/server'
977
+ *
978
+ * listWrapperPaths('vacant', ['configs']) // []
979
+ * ```
980
+ */
981
+ export declare function listWrapperPaths(target: string, groups: readonly ArtifactGroup[]): readonly string[];
982
+
955
983
  /**
956
984
  * Reserves the metadata name a staged vendored host writes at its own root.
957
985
  *
@@ -1251,10 +1279,10 @@ export declare class Materializer implements MaterializerInterface {
1251
1279
  * @remarks
1252
1280
  * Host directories expand before the target is read, so this method and
1253
1281
  * {@link repair} compare the same paths with the same ownership. Foreign
1254
- * candidates are files beneath those expanded roots and files the target holds at
1255
- * a `CANON_PATHS` member. A
1256
- * file outside these populations never becomes a deletion candidate merely
1257
- * because its group is selected.
1282
+ * candidates are files beneath those expanded roots, files the target holds at
1283
+ * a `CANON_PATHS` member, and the configuration wrappers `listWrapperPaths`
1284
+ * names. A file outside these populations never becomes a deletion candidate
1285
+ * merely because its group is selected.
1258
1286
  *
1259
1287
  * The canon is staged for reading rather than for a target, so a copy of one of
1260
1288
  * its paths sitting in a target is a superseded artifact and reports foreign. A
@@ -1396,8 +1424,8 @@ export declare class Materializer implements MaterializerInterface {
1396
1424
  * A tree carrying uncommitted work is refused whole for the same reason.
1397
1425
  *
1398
1426
  * The candidate list carries every foreign population {@link audit} reports. A
1399
- * superseded instruction copy inside the canon and a stray beneath an owned root
1400
- * therefore follow the same transaction rules.
1427
+ * superseded instruction copy inside the canon, a stray beneath an owned root, and
1428
+ * a wrapper an environment left behind therefore follow the same transaction rules.
1401
1429
  * Membership decides it, never byte identity. An untracked leftover stays in
1402
1430
  * place and remains a finding, which is the seam a maintainer uses to keep a
1403
1431
  * git-ignored file.
@@ -2274,6 +2302,22 @@ export declare class Materializer implements MaterializerInterface {
2274
2302
  */
2275
2303
  export declare function resolveRealPath(path: string): string | undefined;
2276
2304
 
2305
+ /**
2306
+ * Resolves the guide loader one surface run passes to every reader.
2307
+ *
2308
+ * @param roots - The candidate checkouts the run names.
2309
+ * @returns Node resolution from the one candidate whose manifest names `@orkestrel/guide`, so
2310
+ * that checkout's own exports serve the module; otherwise Node resolution from this module.
2311
+ * @throws Thrown with TARGET when two candidates name `@orkestrel/guide`, or when that
2312
+ * candidate's own exports do not resolve because its build output is absent.
2313
+ * @example
2314
+ * ```ts
2315
+ * import { readSurfaceModule, resolveSurfaceLoader } from '@orkestrel/scaffold/server'
2316
+ * readSurfaceModule(resolveSurfaceLoader([])).createGuide('# Sample').surface() // []
2317
+ * ```
2318
+ */
2319
+ export declare function resolveSurfaceLoader(roots: readonly string[]): SurfaceLoader;
2320
+
2277
2321
  /**
2278
2322
  * Names the repository this package's own vendored files are served from.
2279
2323
  *
@@ -952,6 +952,34 @@ export declare function listDirectories(root: string): readonly string[];
952
952
  */
953
953
  export declare function listFiles(root: string): readonly string[];
954
954
 
955
+ /**
956
+ * Lists the configuration wrappers a target holds, filtered to a plan's groups.
957
+ *
958
+ * @param target - The directory to read.
959
+ * @param groups - The artifact groups the plan selects.
960
+ * @returns Every exact-case wrapper file the target holds, in compile order, and `[]`
961
+ * when the target holds none, cannot be resolved, or the plan selects no wrapper's group.
962
+ *
963
+ * @remarks
964
+ * The population sits under `configs/src` and `configs/app`, and the widest blueprint
965
+ * compiles it: every environment on both axes, `bin`, `styles`, `themes`, `showcase`,
966
+ * `journey`, and each framework on both axes. A wrapper the plan claims pairs with its
967
+ * artifact, and the rest report `foreign`, which lets the deletion verb take the wrappers
968
+ * an environment left behind.
969
+ *
970
+ * Every other file under those directories belongs to its author and stays unread,
971
+ * and so does a named styles extension's wrapper, because those names form an open
972
+ * set. The exact-case read keeps a case-variant name out on a case-folding host.
973
+ *
974
+ * @example
975
+ * ```ts
976
+ * import { listWrapperPaths } from '@orkestrel/scaffold/server'
977
+ *
978
+ * listWrapperPaths('vacant', ['configs']) // []
979
+ * ```
980
+ */
981
+ export declare function listWrapperPaths(target: string, groups: readonly ArtifactGroup[]): readonly string[];
982
+
955
983
  /**
956
984
  * Reserves the metadata name a staged vendored host writes at its own root.
957
985
  *
@@ -1251,10 +1279,10 @@ export declare class Materializer implements MaterializerInterface {
1251
1279
  * @remarks
1252
1280
  * Host directories expand before the target is read, so this method and
1253
1281
  * {@link repair} compare the same paths with the same ownership. Foreign
1254
- * candidates are files beneath those expanded roots and files the target holds at
1255
- * a `CANON_PATHS` member. A
1256
- * file outside these populations never becomes a deletion candidate merely
1257
- * because its group is selected.
1282
+ * candidates are files beneath those expanded roots, files the target holds at
1283
+ * a `CANON_PATHS` member, and the configuration wrappers `listWrapperPaths`
1284
+ * names. A file outside these populations never becomes a deletion candidate
1285
+ * merely because its group is selected.
1258
1286
  *
1259
1287
  * The canon is staged for reading rather than for a target, so a copy of one of
1260
1288
  * its paths sitting in a target is a superseded artifact and reports foreign. A
@@ -1396,8 +1424,8 @@ export declare class Materializer implements MaterializerInterface {
1396
1424
  * A tree carrying uncommitted work is refused whole for the same reason.
1397
1425
  *
1398
1426
  * The candidate list carries every foreign population {@link audit} reports. A
1399
- * superseded instruction copy inside the canon and a stray beneath an owned root
1400
- * therefore follow the same transaction rules.
1427
+ * superseded instruction copy inside the canon, a stray beneath an owned root, and
1428
+ * a wrapper an environment left behind therefore follow the same transaction rules.
1401
1429
  * Membership decides it, never byte identity. An untracked leftover stays in
1402
1430
  * place and remains a finding, which is the seam a maintainer uses to keep a
1403
1431
  * git-ignored file.
@@ -2274,6 +2302,22 @@ export declare class Materializer implements MaterializerInterface {
2274
2302
  */
2275
2303
  export declare function resolveRealPath(path: string): string | undefined;
2276
2304
 
2305
+ /**
2306
+ * Resolves the guide loader one surface run passes to every reader.
2307
+ *
2308
+ * @param roots - The candidate checkouts the run names.
2309
+ * @returns Node resolution from the one candidate whose manifest names `@orkestrel/guide`, so
2310
+ * that checkout's own exports serve the module; otherwise Node resolution from this module.
2311
+ * @throws Thrown with TARGET when two candidates name `@orkestrel/guide`, or when that
2312
+ * candidate's own exports do not resolve because its build output is absent.
2313
+ * @example
2314
+ * ```ts
2315
+ * import { readSurfaceModule, resolveSurfaceLoader } from '@orkestrel/scaffold/server'
2316
+ * readSurfaceModule(resolveSurfaceLoader([])).createGuide('# Sample').surface() // []
2317
+ * ```
2318
+ */
2319
+ export declare function resolveSurfaceLoader(roots: readonly string[]): SurfaceLoader;
2320
+
2277
2321
  /**
2278
2322
  * Names the repository this package's own vendored files are served from.
2279
2323
  *
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from "node:module";
2
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";
3
- import { CANON_PATHS, CATALOG_AGENT_PATH, CATALOG_END_MARKER, CATALOG_START_MARKER, CONTROL_CHARACTER_PATTERN, DEPENDENCY_NAME_PATTERN, EXECUTABLE_PATHS, 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, bytesToHex, catalogToLayers, collectSurfaceCollisions, collectSurfaceConflicts, compareSurfaceCollisions, compareVersions, computeBytes, computeTotal, contentToHex, extractRangeMajor, extractVersion, inferArtifactGroup, insertManifestDependencies, 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";
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, 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";
6
6
  import { tmpdir } from "node:os";
@@ -1011,6 +1011,52 @@ function listCanonPaths(target, groups) {
1011
1011
  }).filter((path) => groups.includes(inferArtifactGroup(path)));
1012
1012
  }
1013
1013
  /**
1014
+ * Lists the configuration wrappers a target holds, filtered to a plan's groups.
1015
+ *
1016
+ * @param target - The directory to read.
1017
+ * @param groups - The artifact groups the plan selects.
1018
+ * @returns Every exact-case wrapper file the target holds, in compile order, and `[]`
1019
+ * when the target holds none, cannot be resolved, or the plan selects no wrapper's group.
1020
+ *
1021
+ * @remarks
1022
+ * The population sits under `configs/src` and `configs/app`, and the widest blueprint
1023
+ * compiles it: every environment on both axes, `bin`, `styles`, `themes`, `showcase`,
1024
+ * `journey`, and each framework on both axes. A wrapper the plan claims pairs with its
1025
+ * artifact, and the rest report `foreign`, which lets the deletion verb take the wrappers
1026
+ * an environment left behind.
1027
+ *
1028
+ * Every other file under those directories belongs to its author and stays unread,
1029
+ * and so does a named styles extension's wrapper, because those names form an open
1030
+ * set. The exact-case read keeps a case-variant name out on a case-folding host.
1031
+ *
1032
+ * @example
1033
+ * ```ts
1034
+ * import { listWrapperPaths } from '@orkestrel/scaffold/server'
1035
+ *
1036
+ * listWrapperPaths('vacant', ['configs']) // []
1037
+ * ```
1038
+ */
1039
+ function listWrapperPaths(target, groups) {
1040
+ const widest = createBlueprint("wrapper", {
1041
+ src: ENVIRONMENTS,
1042
+ app: ENVIRONMENTS,
1043
+ extensions: FRAMEWORKS.map((name) => ({
1044
+ surface: "browser",
1045
+ name,
1046
+ axes: AXES
1047
+ })),
1048
+ bin: true,
1049
+ styles: true,
1050
+ themes: true,
1051
+ showcase: true,
1052
+ journey: true
1053
+ });
1054
+ return blueprintToConfigArtifacts(widest).filter(({ path, group }) => groups.includes(group) && (path.startsWith("configs/src/") || path.startsWith("configs/app/"))).map(({ path }) => path).filter((path) => {
1055
+ const full = resolveContainedPath(target, path);
1056
+ return full !== void 0 && isExactCaseFile(full);
1057
+ });
1058
+ }
1059
+ /**
1014
1060
  * Removes every directory one set of deletions emptied.
1015
1061
  *
1016
1062
  * @param target - The directory the deleted paths are relative to.
@@ -1781,10 +1827,40 @@ function resolveHostRoot() {
1781
1827
  */
1782
1828
  function readSurfaceModule(loader = createRequire(import.meta.url)) {
1783
1829
  const loaded = attempt(() => loader("@orkestrel/guide"));
1784
- if (!loaded.success || !isSurfaceModule(loaded.value)) throw new ScaffoldError("TARGET", "Surface reflection requires @orkestrel/guide with createGuide, createSource, extractSourceLines, and isGuideError. Supply that module in scaffold's resolution path.", { ...!loaded.success ? { error: loaded.error } : {} });
1830
+ if (!loaded.success || !isSurfaceModule(loaded.value)) throw new ScaffoldError("TARGET", "Surface reflection requires @orkestrel/guide with createGuide, createSource, extractSourceLines, and isGuideError. Install that module where scaffold resolves it, or name a built @orkestrel/guide checkout as a surface candidate.", { ...!loaded.success ? { error: loaded.error } : {} });
1785
1831
  return loaded.value;
1786
1832
  }
1787
1833
  /**
1834
+ * Resolves the guide loader one surface run passes to every reader.
1835
+ *
1836
+ * @param roots - The candidate checkouts the run names.
1837
+ * @returns Node resolution from the one candidate whose manifest names `@orkestrel/guide`, so
1838
+ * that checkout's own exports serve the module; otherwise Node resolution from this module.
1839
+ * @throws Thrown with TARGET when two candidates name `@orkestrel/guide`, or when that
1840
+ * candidate's own exports do not resolve because its build output is absent.
1841
+ * @example
1842
+ * ```ts
1843
+ * import { readSurfaceModule, resolveSurfaceLoader } from '@orkestrel/scaffold/server'
1844
+ * readSurfaceModule(resolveSurfaceLoader([])).createGuide('# Sample').surface() // []
1845
+ * ```
1846
+ */
1847
+ function resolveSurfaceLoader(roots) {
1848
+ const guides = roots.filter((root) => {
1849
+ const manifest = readFileText(root, "package.json", MAX_MANIFEST_BYTES);
1850
+ return manifest !== void 0 && manifestToName(manifest) === "@orkestrel/guide";
1851
+ });
1852
+ if (guides.length > 1) throw new ScaffoldError("TARGET", `Surface candidates ${JSON.stringify(guides.map((root) => root.slice(0, 512)))} each name @orkestrel/guide, and one run loads one guide module. Name one @orkestrel/guide checkout.`, { roots: guides });
1853
+ const root = guides[0];
1854
+ if (root === void 0) return createRequire(import.meta.url);
1855
+ const loader = createRequire(join(root, "package.json"));
1856
+ const resolved = attempt(() => loader.resolve("@orkestrel/guide"));
1857
+ if (!resolved.success) throw new ScaffoldError("TARGET", `Surface candidate ${JSON.stringify(root.slice(0, 512))} is @orkestrel/guide, and its own exports do not resolve. Run npm run build in that checkout before checking its claims.`, {
1858
+ root,
1859
+ error: resolved.error
1860
+ });
1861
+ return loader;
1862
+ }
1863
+ /**
1788
1864
  * Reads one guide's claims and reports parser refusals with its owner and source.
1789
1865
  *
1790
1866
  * @param source - The source label or path to name in a refusal.
@@ -3243,10 +3319,10 @@ var Materializer = class {
3243
3319
  * @remarks
3244
3320
  * Host directories expand before the target is read, so this method and
3245
3321
  * {@link repair} compare the same paths with the same ownership. Foreign
3246
- * candidates are files beneath those expanded roots and files the target holds at
3247
- * a `CANON_PATHS` member. A
3248
- * file outside these populations never becomes a deletion candidate merely
3249
- * because its group is selected.
3322
+ * candidates are files beneath those expanded roots, files the target holds at
3323
+ * a `CANON_PATHS` member, and the configuration wrappers `listWrapperPaths`
3324
+ * names. A file outside these populations never becomes a deletion candidate
3325
+ * merely because its group is selected.
3250
3326
  *
3251
3327
  * The canon is staged for reading rather than for a target, so a copy of one of
3252
3328
  * its paths sitting in a target is a superseded artifact and reports foreign. A
@@ -3469,8 +3545,8 @@ var Materializer = class {
3469
3545
  * A tree carrying uncommitted work is refused whole for the same reason.
3470
3546
  *
3471
3547
  * The candidate list carries every foreign population {@link audit} reports. A
3472
- * superseded instruction copy inside the canon and a stray beneath an owned root
3473
- * therefore follow the same transaction rules.
3548
+ * superseded instruction copy inside the canon, a stray beneath an owned root, and
3549
+ * a wrapper an environment left behind therefore follow the same transaction rules.
3474
3550
  * Membership decides it, never byte identity. An untracked leftover stays in
3475
3551
  * place and remains a finding, which is the seam a maintainer uses to keep a
3476
3552
  * git-ignored file.
@@ -3591,7 +3667,8 @@ var Materializer = class {
3591
3667
  });
3592
3668
  return listFiles(directory).map((name) => `${root}/${name}`);
3593
3669
  }),
3594
- ...listCanonPaths(target, plan.groups)
3670
+ ...listCanonPaths(target, plan.groups),
3671
+ ...listWrapperPaths(target, plan.groups)
3595
3672
  ]);
3596
3673
  const questions = [];
3597
3674
  if (plan.groups.includes("guides")) {
@@ -4847,6 +4924,6 @@ var Upstream = class {
4847
4924
  return error;
4848
4925
  }
4849
4926
  };
4850
- export { BRANCH_PATTERN, DEFAULT_BRANCH, DEFAULT_REGISTRY_BASE, DEFAULT_REPOSITORY_BASE, DEFAULT_UPSTREAM_CONCURRENCY, DEFAULT_UPSTREAM_RETRIES, DEFAULT_UPSTREAM_TIMEOUT, DIGEST_PATTERN, DRIVE_PATTERN, INVALID_SEGMENT_CHARACTER_PATTERN, MANIFEST_NAME, MAX_BRANCH_LENGTH, MAX_ENDPOINT_LENGTH, MAX_INVENTORY_PATHS, MAX_PATH_DEPTH, MAX_PATH_SEGMENT_BYTES, MAX_UPSTREAM_CONCURRENCY, MAX_UPSTREAM_RETRIES, MAX_UPSTREAM_TIMEOUT, Materializer, ORKESTREL_SCOPE, PACKUMENT_MEDIA_TYPE, RESERVED_SEGMENT_PATTERN, ReadAllowance, SCAFFOLD_REPOSITORY, UNREADABLE_VERSION_NOTE, Upstream, WriteTransaction, climbRealPath, collectIndexed, computeDigest, computeFileDigest, computeManifestDigest, decodeHexText, filesToHost, hexToDigest, isBranch, isCatalogEntries, isDependencies, isDependencyNames, isDigest, isEndpoint, isExactCaseFile, isFilesystemPath, isHost, isHostManifest, isHostManifestEntry, isInventory, isManifestRegionSet, isMaterializerHooks, isMaterializerOptions, isMirrors, isPaths, isPhysicalDirectory, isPhysicalFile, isSurfaceModule, isTimeout, isUpstreamHooks, isUpstreamOptions, isVacant, isWorktree, listAncestors, listCanonPaths, listDirectories, listFiles, matchesAnchor, matchesExecutablePath, matchesExpectation, matchesGitPath, matchesMissingPath, matchesPrecondition, matchesProtectedPath, matchesSensitivePath, pathToStorage, pruneEmptiedDirectories, readAnchor, readExpectation, readFileHex, readFileText, readHostFloor, readHostManifest, readHostManifestEntry, readSnapshot, readSurfaceBaseline, readSurfaceCandidate, readSurfaceClaims, readSurfaceCollisions, readSurfaceFile, readSurfaceGuide, readSurfaceModule, readSurfaceRecord, resolveContainedPath, resolveHostRoot, resolveRealPath, stageBytes, stageHost, stageInventory };
4927
+ export { BRANCH_PATTERN, DEFAULT_BRANCH, DEFAULT_REGISTRY_BASE, DEFAULT_REPOSITORY_BASE, DEFAULT_UPSTREAM_CONCURRENCY, DEFAULT_UPSTREAM_RETRIES, DEFAULT_UPSTREAM_TIMEOUT, DIGEST_PATTERN, DRIVE_PATTERN, INVALID_SEGMENT_CHARACTER_PATTERN, MANIFEST_NAME, MAX_BRANCH_LENGTH, MAX_ENDPOINT_LENGTH, MAX_INVENTORY_PATHS, MAX_PATH_DEPTH, MAX_PATH_SEGMENT_BYTES, MAX_UPSTREAM_CONCURRENCY, MAX_UPSTREAM_RETRIES, MAX_UPSTREAM_TIMEOUT, Materializer, ORKESTREL_SCOPE, PACKUMENT_MEDIA_TYPE, RESERVED_SEGMENT_PATTERN, ReadAllowance, SCAFFOLD_REPOSITORY, UNREADABLE_VERSION_NOTE, Upstream, WriteTransaction, climbRealPath, collectIndexed, computeDigest, computeFileDigest, computeManifestDigest, decodeHexText, filesToHost, hexToDigest, isBranch, isCatalogEntries, isDependencies, isDependencyNames, isDigest, isEndpoint, isExactCaseFile, isFilesystemPath, isHost, isHostManifest, isHostManifestEntry, isInventory, isManifestRegionSet, isMaterializerHooks, isMaterializerOptions, isMirrors, isPaths, isPhysicalDirectory, isPhysicalFile, isSurfaceModule, isTimeout, isUpstreamHooks, isUpstreamOptions, isVacant, isWorktree, listAncestors, listCanonPaths, listDirectories, listFiles, listWrapperPaths, matchesAnchor, matchesExecutablePath, matchesExpectation, matchesGitPath, matchesMissingPath, matchesPrecondition, matchesProtectedPath, matchesSensitivePath, pathToStorage, pruneEmptiedDirectories, readAnchor, readExpectation, readFileHex, readFileText, readHostFloor, readHostManifest, readHostManifestEntry, readSnapshot, readSurfaceBaseline, readSurfaceCandidate, readSurfaceClaims, readSurfaceCollisions, readSurfaceFile, readSurfaceGuide, readSurfaceModule, readSurfaceRecord, resolveContainedPath, resolveHostRoot, resolveRealPath, resolveSurfaceLoader, stageBytes, stageHost, stageInventory };
4851
4928
 
4852
4929
  //# sourceMappingURL=index.js.map