mason-context 0.17.0 → 0.17.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.1 — 2026-09-15
4
+
5
+ - Keep MCP available in fresh clones, with actionable setup instructions and inactive automatic hooks until local setup. Preserve corrupt-setup diagnostics and checkout-specific activation.
6
+ - Resolve hook setup and evidence from the host payload's checkout before using a launch/project fallback. Keep ambiguous roots and outside-repository events with multiple worktrees explicitly unverified.
7
+ - Avoid aborting audits on references below regular files. Report `.git/` references as skipped metadata and share the same path observations with automation caches.
8
+ - Ignore unexpected `.mason/` contents by default while allowing shared knowledge. Emit Claude's explicit stdio transport, recognize compatible older hook commands in status, and retain clone teardown support.
9
+ - Exercise fresh-clone MCP, worktree setup, directory changes, original pre-edit evidence, and repeated setup in focused adoption regressions.
10
+
11
+ Run `mason upgrade` for standalone installations, or `npm install -g mason-context@0.17.1` for npm installations, then restart running assistants. Existing PATH-based integrations receive the audit, MCP and hook fixes on their next launch. Rerun `mason setup --host codex` or `--host claude` to refresh the shared Git ignore rules and Claude's explicit stdio entry; review and commit those configuration changes. Fresh clones and linked worktrees still need their own local setup to activate automatic hooks. Decisions and retained repair evidence are preserved.
12
+
3
13
  ## 0.17.0 — 2026-09-11
4
14
 
5
15
  Mason can now retain an authorized advisory assessment through later sessions and commits, then reopen it when relevant evidence changes. Documentation audits cover nested instructions and README files with more precise reference and command scope.
@@ -800,7 +800,7 @@ async function readAuditInput(root, file) {
800
800
  if (value === null) throw new Error(`Unreadable or oversized audit input: ${file}`);
801
801
  return value;
802
802
  } catch (error) {
803
- if (error.code === "ENOENT") return null;
803
+ if (["ENOENT", "ENOTDIR"].includes(error.code ?? "")) return null;
804
804
  throw error;
805
805
  }
806
806
  }
@@ -1066,15 +1066,17 @@ function pathClaimScope(doc, claim) {
1066
1066
  };
1067
1067
  }
1068
1068
  async function pathExists(root, file) {
1069
- const absolute = await auditInputPath(root, file);
1070
1069
  try {
1071
- await fs6.access(absolute);
1070
+ await fs6.access(await auditInputPath(root, file));
1072
1071
  return true;
1073
1072
  } catch (error) {
1074
- if (error.code === "ENOENT") return false;
1073
+ if (["ENOENT", "ENOTDIR"].includes(error.code ?? "")) return false;
1075
1074
  throw error;
1076
1075
  }
1077
1076
  }
1077
+ function gitMetadataPath(file) {
1078
+ return file.split("/").includes(".git");
1079
+ }
1078
1080
  function optionalMasonPath(file) {
1079
1081
  return file.split("/").includes(".mason");
1080
1082
  }
@@ -1104,6 +1106,14 @@ async function checkDeletedReferences(ctx) {
1104
1106
  continue;
1105
1107
  }
1106
1108
  if (scope.candidates.some(optionalMasonPath)) continue;
1109
+ if (scope.candidates.some(gitMetadataPath)) {
1110
+ result.skipped.push({
1111
+ check: "deleted-reference",
1112
+ doc: doc.path,
1113
+ reason: `Reference ${claim.path} names Git metadata, whose layout varies between checkouts; it was not verified as a repository file.`
1114
+ });
1115
+ continue;
1116
+ }
1107
1117
  if ((await Promise.all(scope.candidates.map((file) => pathExists(ctx.root, file)))).some(Boolean)) continue;
1108
1118
  const candidates = await Promise.all(scope.candidates.map(async (file) => ({
1109
1119
  file,