sparda-mcp 0.66.1 → 0.66.2
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/package.json +11 -11
- package/src/commands/evolve.js +1 -1
- package/src/commands/heal.js +1 -1
- package/src/commands/seed.js +1 -1
- package/src/flight/heal.js +1 -1
- package/src/generator/express.js +1 -1
- package/src/generator/manifest.js +1 -1
- package/src/parser/fastapi.js +1 -0
- package/src/ubg/fastapi.js +1 -0
- package/src/ubg/genome.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sparda-mcp",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.2",
|
|
4
4
|
"mcpName": "io.github.zyx77550/sparda-mcp",
|
|
5
5
|
"description": "AI writes. SPARDA proves. A deterministic, offline gate that catches when an AI edit removes a guard, exposes a route, or breaks an invariant — no API key, right in the agent edit loop.",
|
|
6
6
|
"type": "module",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
"author": "Residual Labs (residual-labs.fr)",
|
|
62
62
|
"license": "BUSL-1.1",
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@babel/parser": "7.26.5",
|
|
65
|
-
"@babel/traverse": "7.26.5",
|
|
66
|
-
"@clack/prompts": "0.9.1",
|
|
67
64
|
"@modelcontextprotocol/sdk": "1.29.0"
|
|
68
65
|
},
|
|
69
66
|
"devDependencies": {
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"eslint
|
|
74
|
-
"
|
|
75
|
-
"
|
|
67
|
+
"@babel/parser": "^8.0.4",
|
|
68
|
+
"@babel/traverse": "^8.0.4",
|
|
69
|
+
"@clack/prompts": "^1.7.0",
|
|
70
|
+
"@eslint/js": "^10.0.1",
|
|
71
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
72
|
+
"eslint": "^10.7.0",
|
|
73
|
+
"eslint-config-prettier": "^10.1.8",
|
|
74
|
+
"express": "^5.2.1",
|
|
75
|
+
"globals": "^17.7.0",
|
|
76
76
|
"prettier": "^3.8.4",
|
|
77
|
-
"vitest": "^
|
|
77
|
+
"vitest": "^4.1.10"
|
|
78
78
|
}
|
|
79
79
|
}
|
package/src/commands/evolve.js
CHANGED
package/src/commands/heal.js
CHANGED
|
@@ -100,7 +100,7 @@ async function gate(opts, id, flight, healDir) {
|
|
|
100
100
|
// 3. apocalypse: no new critical/high, nothing protected got removed
|
|
101
101
|
const fixedGraph = canonicalizeGraph(compileUBG(opts.cwd, { write: false }).graph);
|
|
102
102
|
const staticFindings = checkGraph(fixedGraph).findings;
|
|
103
|
-
let regressions
|
|
103
|
+
let regressions;
|
|
104
104
|
const baselinePath = path.join(healDir, 'baseline.json');
|
|
105
105
|
if (fs.existsSync(baselinePath)) {
|
|
106
106
|
const baseline = JSON.parse(fs.readFileSync(baselinePath, 'utf8'));
|
package/src/commands/seed.js
CHANGED
|
@@ -277,7 +277,7 @@ export async function runSeed(opts, args) {
|
|
|
277
277
|
if (opts.germinate) {
|
|
278
278
|
const { buildGrammar } = await import('./grammar.js');
|
|
279
279
|
const { twinFilePath } = await import('./twin.js');
|
|
280
|
-
let exemplars
|
|
280
|
+
let exemplars;
|
|
281
281
|
try {
|
|
282
282
|
exemplars =
|
|
283
283
|
JSON.parse(fs.readFileSync(twinFilePath(opts.cwd), 'utf8')).exemplars ?? null;
|
package/src/flight/heal.js
CHANGED
|
@@ -27,7 +27,7 @@ export function evaluateHealing(flight, replay, expectation = null) {
|
|
|
27
27
|
reasons.push('response is byte-identical to the recorded bug — nothing changed');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
let expectationMet
|
|
30
|
+
let expectationMet;
|
|
31
31
|
if (expectation) {
|
|
32
32
|
expectationMet = true;
|
|
33
33
|
if (expectation.status !== undefined && replay.actual.status !== expectation.status) {
|
package/src/generator/express.js
CHANGED
|
@@ -42,7 +42,7 @@ export function ensureSpardaKey(cwd, prevManifest = null) {
|
|
|
42
42
|
// state (opt-in flags + observed circuits), and the `sparding` security
|
|
43
43
|
// memory survive as long as the tool's method+path are unchanged.
|
|
44
44
|
export function carryOverManifest(cwd, tools) {
|
|
45
|
-
let prev
|
|
45
|
+
let prev;
|
|
46
46
|
try {
|
|
47
47
|
prev = JSON.parse(fs.readFileSync(path.join(cwd, 'sparda.json'), 'utf8'));
|
|
48
48
|
} catch {
|
package/src/parser/fastapi.js
CHANGED
package/src/ubg/fastapi.js
CHANGED
|
@@ -38,6 +38,7 @@ export function extractFastAPI(cwd, entryFile, pythonCmd = 'python') {
|
|
|
38
38
|
} catch (err) {
|
|
39
39
|
throw new Error(
|
|
40
40
|
`FastAPI UBG extractor returned invalid JSON: ${err.message}. Raw: ${res.stdout.slice(0, 200)}`,
|
|
41
|
+
{ cause: err },
|
|
41
42
|
);
|
|
42
43
|
}
|
|
43
44
|
if (payload.error) throw new Error(payload.error);
|
package/src/ubg/genome.js
CHANGED
|
@@ -134,7 +134,7 @@ export function verifyAntibody(ab) {
|
|
|
134
134
|
const id = `${ANTIBODY_VERSION}_${sha256(body).slice(0, 32)}`;
|
|
135
135
|
if (id !== ab.id) return { ok: false, reason: 'content-address' };
|
|
136
136
|
// signature: Ed25519 over the same claim bytes the id commits to.
|
|
137
|
-
let sigOk
|
|
137
|
+
let sigOk;
|
|
138
138
|
try {
|
|
139
139
|
sigOk = crypto.verify(
|
|
140
140
|
null,
|