@brucewaynedecoy/make-docs 2.0.6 → 2.0.7

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 (41) hide show
  1. package/dist/{backup-P5NUPAJL.js → backup-M5RBOM6F.js} +4 -4
  2. package/dist/{chunk-XFFESINU.js → chunk-3ZFX5456.js} +2 -2
  3. package/dist/{chunk-KFYUB4AX.js → chunk-5WR4D6HH.js} +2 -2
  4. package/dist/{chunk-TDB6UW4M.js → chunk-65TAUWTC.js} +3 -3
  5. package/dist/{chunk-PI7W5QDB.js → chunk-7AVGITZK.js} +2 -2
  6. package/dist/{chunk-B7QF7XZT.js → chunk-B6HJRHWL.js} +179 -103
  7. package/dist/chunk-B6HJRHWL.js.map +1 -0
  8. package/dist/{chunk-SFKYGFUV.js → chunk-C67WJWVP.js} +23 -12
  9. package/dist/chunk-C67WJWVP.js.map +1 -0
  10. package/dist/{chunk-DNPFQB24.js → chunk-O27AYYF3.js} +3 -3
  11. package/dist/{chunk-EF47XIIR.js → chunk-OSS4NT6N.js} +8 -7
  12. package/dist/{chunk-EF47XIIR.js.map → chunk-OSS4NT6N.js.map} +1 -1
  13. package/dist/{chunk-LK6BLVZA.js → chunk-YJLVHT4J.js} +3 -3
  14. package/dist/{chunk-2WC74W66.js → chunk-Z4KZ4JTE.js} +2 -2
  15. package/dist/index.js +200 -37
  16. package/dist/index.js.map +1 -1
  17. package/dist/{registry-44WLX4F5.js → registry-7L26WFZP.js} +7 -7
  18. package/dist/{self-WRWI5XNE.js → self-4HOKEXBV.js} +7 -7
  19. package/dist/{server-FYRDPOBR.js → server-VXVGDWRY.js} +9 -9
  20. package/dist/{setup-system-XX6NSVXZ.js → setup-system-CJESBAQ5.js} +7 -7
  21. package/dist/{skills-command-YAQP24JM.js → skills-command-YXPOHXI2.js} +6 -6
  22. package/dist/{uninstall-3YJKZ6UF.js → uninstall-R2QK7XPK.js} +7 -7
  23. package/dist/{virtual_make-docs-first-party-skills-5TYTCD5U.js → virtual_make-docs-first-party-skills-POWW3OI3.js} +2 -2
  24. package/dist/{virtual_make-docs-first-party-skills-5TYTCD5U.js.map → virtual_make-docs-first-party-skills-POWW3OI3.js.map} +1 -1
  25. package/package.json +1 -1
  26. package/dist/chunk-B7QF7XZT.js.map +0 -1
  27. package/dist/chunk-SFKYGFUV.js.map +0 -1
  28. /package/dist/{backup-P5NUPAJL.js.map → backup-M5RBOM6F.js.map} +0 -0
  29. /package/dist/{chunk-XFFESINU.js.map → chunk-3ZFX5456.js.map} +0 -0
  30. /package/dist/{chunk-KFYUB4AX.js.map → chunk-5WR4D6HH.js.map} +0 -0
  31. /package/dist/{chunk-TDB6UW4M.js.map → chunk-65TAUWTC.js.map} +0 -0
  32. /package/dist/{chunk-PI7W5QDB.js.map → chunk-7AVGITZK.js.map} +0 -0
  33. /package/dist/{chunk-DNPFQB24.js.map → chunk-O27AYYF3.js.map} +0 -0
  34. /package/dist/{chunk-LK6BLVZA.js.map → chunk-YJLVHT4J.js.map} +0 -0
  35. /package/dist/{chunk-2WC74W66.js.map → chunk-Z4KZ4JTE.js.map} +0 -0
  36. /package/dist/{registry-44WLX4F5.js.map → registry-7L26WFZP.js.map} +0 -0
  37. /package/dist/{self-WRWI5XNE.js.map → self-4HOKEXBV.js.map} +0 -0
  38. /package/dist/{server-FYRDPOBR.js.map → server-VXVGDWRY.js.map} +0 -0
  39. /package/dist/{setup-system-XX6NSVXZ.js.map → setup-system-CJESBAQ5.js.map} +0 -0
  40. /package/dist/{skills-command-YAQP24JM.js.map → skills-command-YXPOHXI2.js.map} +0 -0
  41. /package/dist/{uninstall-3YJKZ6UF.js.map → uninstall-R2QK7XPK.js.map} +0 -0
@@ -9587,13 +9587,13 @@ function validateAdoptionReceipt(value, label, ownershipClass) {
9587
9587
  return null;
9588
9588
  }
9589
9589
  assertPlainObject(value, label);
9590
- if (value.priorOwnershipClass !== "managed-snapshot") {
9591
- throw new Error(`${label}.priorOwnershipClass must be managed-snapshot`);
9590
+ if (value.priorOwnershipClass !== "managed-snapshot" && value.priorOwnershipClass !== "unregistered") {
9591
+ throw new Error(`${label}.priorOwnershipClass must be managed-snapshot or unregistered`);
9592
9592
  }
9593
9593
  return {
9594
9594
  receiptId: validateString(value.receiptId, `${label}.receiptId`),
9595
9595
  adoptedAt: validateIsoTimestamp(value.adoptedAt, `${label}.adoptedAt`),
9596
- priorOwnershipClass: "managed-snapshot",
9596
+ priorOwnershipClass: value.priorOwnershipClass,
9597
9597
  evidenceRefs: validateNonEmptyStringArray(value.evidenceRefs, `${label}.evidenceRefs`)
9598
9598
  };
9599
9599
  }
@@ -9727,7 +9727,7 @@ function validateRouterOwnershipManifestState(value, files, selections, packageM
9727
9727
  ownershipClass: rawEntry.ownershipClass,
9728
9728
  expectedMaterializationMode: "managed-block"
9729
9729
  });
9730
- if (proof.expectedSourceHash !== files[relativePath]?.hash || proof.installedHash !== files[relativePath]?.hash) {
9730
+ if (rawEntry.ownershipClass === "managed-snapshot" && proof.expectedSourceHash !== files[relativePath]?.hash || proof.installedHash !== files[relativePath]?.hash) {
9731
9731
  throw new Error(
9732
9732
  `manifest.routerOwnership.routers.${relativePath} hashes must match manifest.files`
9733
9733
  );
@@ -11403,12 +11403,20 @@ function previewInstallationCheckoutMove(projectRoot, sourceCheckoutId, storeRoo
11403
11403
  return { ...base, status: "blocked", candidates: [], nextAction: "The Store must use the current schema before checkout move." };
11404
11404
  return withInstallationDatabase(root, (db) => previewInstallationCheckoutMoveInDatabase(db, root, id, sourceCheckoutId), { storeRoot: store, readOnly: true });
11405
11405
  }
11406
+ function hasCompletedRemoval(db, checkoutId) {
11407
+ const latest = db.prepare("SELECT operation FROM installation_operations WHERE checkout_id=? AND status='completed' ORDER BY finished_at DESC, operation_id DESC LIMIT 1").get(checkoutId);
11408
+ return latest?.operation === "setup.remove";
11409
+ }
11406
11410
  function previewInstallationCheckoutMoveInDatabase(db, root, id, sourceCheckoutId) {
11407
11411
  const base = { schemaVersion: 1, projectId: id, targetRoot: root };
11408
11412
  const bound = checkout(db, root);
11409
11413
  if (bound && bound.project_id === id) {
11410
11414
  assertCheckoutIdentity(bound, root);
11411
- return { ...base, status: "bound", candidates: [], nextAction: "This checkout is already bound. Continue setup." };
11415
+ const pending = db.prepare("SELECT operation_id FROM installation_operations WHERE checkout_id=? AND status='pending' LIMIT 1").get(bound.checkout_id);
11416
+ if (pending) return { ...base, status: "recovery-required", candidates: [], nextAction: `Run make-docs project state status --target-root ${JSON.stringify(root)} before recovery.` };
11417
+ const ledger = db.prepare("SELECT 1 FROM installation_ledgers WHERE checkout_id=?").get(bound.checkout_id);
11418
+ const removed = !ledger && hasCompletedRemoval(db, bound.checkout_id);
11419
+ return ledger ? { ...base, status: "bound", candidates: [], nextAction: "This checkout is already bound. Continue setup." } : removed ? { ...base, status: "bound", candidates: [], nextAction: "Review the completed removal before setup." } : { ...base, status: "portable-unregistered", candidates: [], nextAction: "Run make-docs setup --adopt to complete this checkout." };
11412
11420
  }
11413
11421
  const rows = db.prepare("SELECT * FROM installation_checkouts WHERE project_id=? ORDER BY checkout_id").all(id);
11414
11422
  const targetKey = platform.comparisonKey(root);
@@ -11470,10 +11478,10 @@ function previewInstallationCheckoutMoveInDatabase(db, root, id, sourceCheckoutI
11470
11478
  const selected = sourceCheckoutId ? candidates.find((candidate) => candidate.checkoutId === sourceCheckoutId) : candidates.length === 1 ? candidates[0] : null;
11471
11479
  return {
11472
11480
  ...base,
11473
- status: selected?.available ? "ready" : "blocked",
11481
+ status: !candidates.length && !claimed ? "portable-unregistered" : selected?.available ? "ready" : "blocked",
11474
11482
  candidates,
11475
11483
  separateReviewDigest,
11476
- nextAction: !candidates.length ? "No saved checkout has this project ID. Review setup as a new registration." : candidates.length > 1 && !sourceCheckoutId ? "Select one source checkout ID before move. Register separately or cancel if the source is not the same checkout." : selected?.available ? "Review the exact source, target, and digest. Apply checkout move only with explicit approval." : "Resolve the listed blockers. Register a separate checkout or cancel."
11484
+ nextAction: !candidates.length && !claimed ? "Run make-docs setup --adopt to register this checkout." : !candidates.length ? "Another project claims this path. Resolve that claim before setup." : candidates.length > 1 && !sourceCheckoutId ? "Select one source checkout ID before move. Register separately or cancel if the source is not the same checkout." : selected?.available ? "Review the exact source, target, and digest. Apply checkout move only with explicit approval." : "Resolve the listed blockers. Register a separate checkout or cancel."
11477
11485
  };
11478
11486
  }
11479
11487
  function registerSeparateInstallationCheckout(projectRoot, reviewDigest, storeRoot) {
@@ -12083,15 +12091,18 @@ function readInstallationStatus(projectRoot, storeRoot) {
12083
12091
  if (toolOperations.length)
12084
12092
  return { ...base, projectId: id, storeAvailable: true, status: "recovery-required", toolOperations, nextAction: "A tool operation is pending. Review its package manager result before managed changes." };
12085
12093
  const row = checkout(db, root);
12086
- if (!row)
12087
- return { ...base, status: id ? "ownership-unverified" : "unregistered", projectId: id, storeAvailable: true, nextAction: "Run make-docs setup and review this checkout." };
12094
+ if (!row) {
12095
+ const prior = id ? db.prepare("SELECT 1 FROM installation_checkouts WHERE project_id=? LIMIT 1").get(id) : null;
12096
+ return { ...base, status: prior ? "ownership-unverified" : id ? "portable-unregistered" : "unregistered", projectId: id, storeAvailable: true, nextAction: prior ? "Review checkout move or separate checkout registration before setup." : id ? "Run make-docs setup --adopt to register this checkout." : "Run make-docs setup and review this checkout." };
12097
+ }
12088
12098
  assertCheckoutIdentity(row, root);
12089
12099
  const lock = db.prepare("SELECT pid,hostname FROM installation_locks WHERE root_path=?").get(root);
12090
12100
  const pending = db.prepare("SELECT * FROM installation_operations WHERE checkout_id=? AND status='pending'").get(row.checkout_id);
12091
12101
  const prepared = pending ? detachedSnapshot(db, pending) : null;
12092
12102
  const manifest = db.prepare("SELECT manifest_json FROM installation_ledgers WHERE checkout_id=?").get(row.checkout_id)?.manifest_json;
12093
12103
  const pendingAction = pending ? prepared ? detachedHooks.get(pending.operation).nextAction(root, pending.operation_id, prepared.mode) : pending.plan_complete ? `make-docs project state recover ${pending.operation_id} --resume --dry-run --target-root ${JSON.stringify(root)}` : `make-docs project state recover ${pending.operation_id} --rollback --dry-run --target-root ${JSON.stringify(root)}` : null;
12094
- return { ...base, projectId: row.project_id, checkoutId: row.checkout_id, storeAvailable: true, installationVersion: manifest ? JSON.parse(manifest).packageVersion : null, pendingOperation: pending ? { operation_id: pending.operation_id, operation: pending.operation, planComplete: Boolean(pending.plan_complete), ...prepared ? { mode: prepared.mode, reviewDigest: prepared.reviewDigest } : {} } : null, status: lock && !isDead(lock.pid, lock.hostname) ? "writer-active" : pending ? "recovery-required" : manifest ? "ready" : "unregistered", nextAction: pendingAction ?? (lock ? "Wait for the active writer." : manifest ? "No recovery is required." : "Review setup before installing.") };
12104
+ const removed = !manifest && hasCompletedRemoval(db, row.checkout_id);
12105
+ return { ...base, projectId: row.project_id, checkoutId: row.checkout_id, storeAvailable: true, installationVersion: manifest ? JSON.parse(manifest).packageVersion : null, pendingOperation: pending ? { operation_id: pending.operation_id, operation: pending.operation, planComplete: Boolean(pending.plan_complete), ...prepared ? { mode: prepared.mode, reviewDigest: prepared.reviewDigest } : {} } : null, status: lock && !isDead(lock.pid, lock.hostname) ? "writer-active" : pending ? "recovery-required" : manifest ? "ready" : removed ? "unregistered" : "portable-unregistered", nextAction: pendingAction ?? (lock ? "Wait for the active writer." : manifest ? "No recovery is required." : removed ? "Review the completed removal before setup." : "Run make-docs setup --adopt to complete this checkout.") };
12095
12106
  }, { storeRoot: store, readOnly: true });
12096
12107
  } catch (e) {
12097
12108
  return { ...base, status: e instanceof InstallationStateError ? e.code : "store-unavailable", storeAvailable: false, nextAction: e instanceof Error ? e.message : String(e) };
@@ -13170,7 +13181,7 @@ function validateEmbeddedSkillBundle(candidate) {
13170
13181
  }
13171
13182
  async function loadEmbeddedSkillBundle() {
13172
13183
  try {
13173
- const { bundle, sourceTestAdapter } = await import("./virtual_make-docs-first-party-skills-5TYTCD5U.js");
13184
+ const { bundle, sourceTestAdapter } = await import("./virtual_make-docs-first-party-skills-POWW3OI3.js");
13174
13185
  validateEmbeddedSkillBundle(bundle);
13175
13186
  const [registryBytes, packageBytes] = await Promise.all([
13176
13187
  readFile(path11.join(PACKAGE_ROOT, "skill-registry.json")),
@@ -14190,4 +14201,4 @@ export {
14190
14201
  getRecommendedSkillChoices,
14191
14202
  applySkillRegistrySelectionMetadata
14192
14203
  };
14193
- //# sourceMappingURL=chunk-SFKYGFUV.js.map
14204
+ //# sourceMappingURL=chunk-C67WJWVP.js.map