mason-context 0.18.0 → 0.19.0
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 +9 -0
- package/README.md +2 -0
- package/dist/mason-audit.js +20 -1
- package/dist/mason-audit.js.map +1 -1
- package/dist/mason-auto.js +111 -36
- package/dist/mason-auto.js.map +1 -1
- package/dist/mason-drift.js +1 -0
- package/dist/mason-drift.js.map +1 -1
- package/dist/mason-hook.js +1 -0
- package/dist/mason-hook.js.map +1 -1
- package/dist/mason-mcp.js +765 -125
- package/dist/mason-mcp.js.map +1 -1
- package/dist/mason-review.js +1 -0
- package/dist/mason-review.js.map +1 -1
- package/dist/mason-runtime.js +337 -0
- package/dist/mason-runtime.js.map +1 -0
- package/dist/mason.js +910 -229
- package/dist/mason.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.0 — 2026-09-17
|
|
4
|
+
|
|
5
|
+
- Add automatic updates for new public standalone installations, with existing installations opting in through `mason updates enable`. Check at most daily for stable releases at least 24 hours old; leave npm, pinned versions, company mirrors, and CI under explicit control.
|
|
6
|
+
- Verify automatic downloads against Sigstore-signed release metadata from the exact tagged publishing workflow, stage and health-check each bundle, and activate at a future MCP launch only after other Mason MCP servers exit. Keep update work and diagnostics out of hook and MCP protocol streams.
|
|
7
|
+
- Add `mason updates` status, enable/disable and pin/unpin controls, `MASON_NO_AUTO_UPDATE=1`, persisted company mirror selection, and an offline `mason rollback` that restores and pins the previous installation. Retain `mason upgrade` for explicit immediate updates.
|
|
8
|
+
- Track standalone processes before startup and reclaim unused update bundles while preserving current, rollback, staged, and running versions. Retain legacy or uncertain bundles conservatively.
|
|
9
|
+
- Let linked Git worktrees inherit host activation from the primary checkout, with local setup and teardown taking precedence; keep audit evidence and observations local to each worktree.
|
|
10
|
+
- Limit dependency-change advisories to documents containing dependency guidance, preserve committed evidence through local edits, and distinguish current findings from historical advisories awaiting review.
|
|
11
|
+
|
|
3
12
|
## 0.18.0 — 2026-09-16
|
|
4
13
|
|
|
5
14
|
- Fix overlapping snapshot writes restoring old descriptions and deleted flows. Snapshot saves, verdicts, and partial writes share a per-checkout cross-process lock; reads, replacement, and consolidation cleanup stay within the protected operation.
|
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ irm https://github.com/adrianczuczka/mason/releases/latest/download/install.ps1
|
|
|
34
34
|
|
|
35
35
|
No Node or npm required. Git is required. The installer configures PATH for Bash, Zsh, and Windows. [Platform details](docs/distribution.md) · [npm installation](docs/setup.md#unified-project-setup)
|
|
36
36
|
|
|
37
|
+
New standard standalone installs update automatically in the background. Updates activate on a future MCP launch after existing Mason MCP servers exit. Run `mason updates` to inspect or change this preference. Existing installations require one manual upgrade and `mason updates enable`. [Update controls](docs/distribution.md#automatic-updates)
|
|
38
|
+
|
|
37
39
|
Run this in your Git repository (open a new terminal if the installer asks):
|
|
38
40
|
|
|
39
41
|
```bash
|
package/dist/mason-audit.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
if (!import.meta.url.endsWith("/mason-runtime.js")) await import("./mason-runtime.js").then(m => m.registerRuntime());
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __esm = (fn, res) => function __init() {
|
|
@@ -1789,6 +1790,10 @@ var init_release_metadata = __esm({
|
|
|
1789
1790
|
});
|
|
1790
1791
|
|
|
1791
1792
|
// src/audit/checks/deps-changed.ts
|
|
1793
|
+
function hasDependencyContent(content) {
|
|
1794
|
+
const text2 = content.replace(/<!-- mason:start -->[\s\S]*?<!-- mason:end -->/g, "").replace(/<!--[\s\S]*?-->/g, "");
|
|
1795
|
+
return /\b(?:dependenc(?:y|ies)|librar(?:y|ies)|frameworks?|tech(?:nology)? stack|prerequisites|requirements)\b/i.test(text2) || /\b(?:package\.json|build\.gradle(?:\.kts)?|settings\.gradle(?:\.kts)?|libs\.versions\.toml|Cargo\.toml|go\.mod|pyproject\.toml|requirements\.txt|Gemfile|composer\.json)\b/i.test(text2) || /\b(?:node(?:\.js)?|npm|pnpm|yarn|bun|deno|python|ruby|rust|go|java|jdk|kotlin|gradle|swift|php|react|vue|angular|compose|ktor|room)\s*(?:version\s*)?[`*:=>~^v\s-]*\d+(?:\.\d+)*\b/i.test(text2) || /\b(?:npm|pnpm|yarn|pip3?|cargo|gem|composer)\s+(?:install|add|require)\b/i.test(text2);
|
|
1796
|
+
}
|
|
1792
1797
|
function manifestPathspecs(doc) {
|
|
1793
1798
|
const scope = documentScope(doc);
|
|
1794
1799
|
if (scope === ".") return MANIFEST_PATHSPECS;
|
|
@@ -1815,6 +1820,19 @@ async function checkDepsChanged(ctx) {
|
|
|
1815
1820
|
reason: `${doc.path} has uncommitted edits \u2013 suppressed while in flight`
|
|
1816
1821
|
});
|
|
1817
1822
|
}
|
|
1823
|
+
let content = doc.content;
|
|
1824
|
+
if (doc.dirty) {
|
|
1825
|
+
try {
|
|
1826
|
+
content = (await inspectionGit(
|
|
1827
|
+
["show", `${doc.lastCommit.hash}:${doc.path}`],
|
|
1828
|
+
{ cwd: ctx.root, maxBuffer: 10 * 1024 * 1024, timeout: 1e4 }
|
|
1829
|
+
)).stdout;
|
|
1830
|
+
} catch {
|
|
1831
|
+
result.skipped.push({ check: "deps-changed", doc: doc.path, reason: `${doc.path}: committed dependency content is unavailable` });
|
|
1832
|
+
continue;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
if (!hasDependencyContent(content)) continue;
|
|
1818
1836
|
const range = await commitsTouchingSince(
|
|
1819
1837
|
ctx.root,
|
|
1820
1838
|
doc.lastCommit.hash,
|
|
@@ -1860,6 +1878,7 @@ var init_deps_changed = __esm({
|
|
|
1860
1878
|
init_docs();
|
|
1861
1879
|
init_release_metadata();
|
|
1862
1880
|
init_git();
|
|
1881
|
+
init_inspection();
|
|
1863
1882
|
init_checks();
|
|
1864
1883
|
MANIFEST_COMMITS_CAP = 10;
|
|
1865
1884
|
MANIFEST_PATHSPECS = [
|
|
@@ -2522,7 +2541,7 @@ async function verifyOriginal(rootDir, baselinePath, options, session) {
|
|
|
2522
2541
|
return {
|
|
2523
2542
|
...base,
|
|
2524
2543
|
status: "review-required",
|
|
2525
|
-
reason: "An audit cannot establish that this advisory was reviewed. Retain its original evidence and report a separate assessment; editing or committing the doc is not approval."
|
|
2544
|
+
reason: (now ? "The current check still reports this advisory. " : finding.type === "deps-changed" ? "The current check no longer reports this condition; the historical advisory remains awaiting assessment. " : "The current check no longer reports the original finding; retained evidence still requires assessment. ") + "An audit cannot establish that this advisory was reviewed. Retain its original evidence and report a separate assessment; editing or committing the doc is not approval."
|
|
2526
2545
|
};
|
|
2527
2546
|
}
|
|
2528
2547
|
return { ...base, status: "resolved", reason: "The original check ran and no longer reports this claim. Inspect the edit for semantic correctness." };
|