@danielmarbach/mnemonic-mcp 0.25.0 → 0.25.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 +7 -0
- package/build/index.js +16 -4
- package/build/index.js.map +1 -1
- package/build/markdown.d.ts +4 -0
- package/build/markdown.d.ts.map +1 -1
- package/build/markdown.js +12 -4
- package/build/markdown.js.map +1 -1
- package/build/semantic-patch.d.ts +4 -1
- package/build/semantic-patch.d.ts.map +1 -1
- package/build/semantic-patch.js +3 -2
- package/build/semantic-patch.js.map +1 -1
- package/build/structured-content.d.ts +2 -0
- package/build/structured-content.d.ts.map +1 -1
- package/build/structured-content.js +1 -0
- package/build/structured-content.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ The format is loosely based on Keep a Changelog and uses semver-style version he
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.25.1] - 2026-04-24
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- `semanticPatch` no longer rejects content with markdown lint issues — the patch succeeds and warnings are surfaced in the response instead, so the LLM can continue without retrying from scratch. Previously any lint issue forced a hard failure.
|
|
14
|
+
- Structural errors (bad selector, invalid operation) and content lint errors are now distinguished from patch lint warnings with separate guidance, so the LLM gets the right fix direction for each failure mode.
|
|
15
|
+
|
|
9
16
|
## [0.25.0] - 2026-04-24
|
|
10
17
|
|
|
11
18
|
### Added
|
package/build/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { suggestAutoRelationships } from "./auto-relate.js";
|
|
|
17
17
|
import { computeRecallMetadataBoost, computeHybridScore, selectRecallResults, selectWorkflowResults, applyLexicalReranking, applyCanonicalExplanationPromotion, } from "./recall.js";
|
|
18
18
|
import { shouldTriggerLexicalRescue, rankDocumentsByTfIdf, LEXICAL_RESCUE_CANDIDATE_LIMIT, LEXICAL_RESCUE_THRESHOLD, LEXICAL_RESCUE_RESULT_LIMIT, } from "./lexical.js";
|
|
19
19
|
import { getRelationshipPreview } from "./relationships.js";
|
|
20
|
-
import { cleanMarkdown } from "./markdown.js";
|
|
20
|
+
import { MarkdownLintError, cleanMarkdown } from "./markdown.js";
|
|
21
21
|
import { applySemanticPatches } from "./semantic-patch.js";
|
|
22
22
|
import { MnemonicConfigStore, readVaultSchemaVersion } from "./config.js";
|
|
23
23
|
import { CONSOLIDATION_MODES, PROTECTED_BRANCH_BEHAVIORS, PROJECT_POLICY_SCOPES, WRITE_SCOPES, isProtectedBranch, resolveProtectedBranchBehavior, resolveProtectedBranchPatterns, resolveConsolidationMode, resolveWriteScope, } from "./project-memory-policy.js";
|
|
@@ -2159,7 +2159,8 @@ server.registerTool("update", {
|
|
|
2159
2159
|
}))
|
|
2160
2160
|
.optional()
|
|
2161
2161
|
.describe("Use for targeted edits when you know the structure. More token-efficient than passing full content. " +
|
|
2162
|
-
"Mutually exclusive with content."
|
|
2162
|
+
"Mutually exclusive with content. " +
|
|
2163
|
+
"If this fails, fix the issue in your patch values and retry — do NOT fall back to full content rewrite."),
|
|
2163
2164
|
content: z.string().optional().describe("Full note body replacement. Use only for complete rewrites or when the note is small. Mutually exclusive with semanticPatch."),
|
|
2164
2165
|
title: z.string().optional().describe("Specific, retrieval-friendly title. Prefer the concrete topic or decision, not a vague label."),
|
|
2165
2166
|
tags: z.array(z.string()).optional().describe("Optional tags for later filtering. Use a small number of stable, meaningful tags."),
|
|
@@ -2222,11 +2223,18 @@ server.registerTool("update", {
|
|
|
2222
2223
|
}
|
|
2223
2224
|
const now = new Date().toISOString();
|
|
2224
2225
|
let patchedContent;
|
|
2226
|
+
let lintWarnings;
|
|
2225
2227
|
if (semanticPatch && semanticPatch.length > 0) {
|
|
2226
2228
|
try {
|
|
2227
|
-
|
|
2229
|
+
const result = await applySemanticPatches(note.content, semanticPatch);
|
|
2230
|
+
patchedContent = result.content;
|
|
2231
|
+
lintWarnings = result.lintWarnings;
|
|
2228
2232
|
}
|
|
2229
2233
|
catch (err) {
|
|
2234
|
+
if (err instanceof MarkdownLintError) {
|
|
2235
|
+
const message = `Semantic patch produced content with markdown lint issues. Fix the lint issues in your patch values and retry — do NOT fall back to full content rewrite.\n\n${err.message}`;
|
|
2236
|
+
return { content: [{ type: "text", text: message }], isError: true };
|
|
2237
|
+
}
|
|
2230
2238
|
const message = err instanceof Error ? err.message : String(err);
|
|
2231
2239
|
return { content: [{ type: "text", text: `Semantic patch failed: ${message}` }], isError: true };
|
|
2232
2240
|
}
|
|
@@ -2333,11 +2341,15 @@ server.registerTool("update", {
|
|
|
2333
2341
|
project: noteProjectRef(updated),
|
|
2334
2342
|
lifecycle: updated.lifecycle,
|
|
2335
2343
|
role: updated.role,
|
|
2344
|
+
lintWarnings: lintWarnings && lintWarnings.length > 0 ? lintWarnings : undefined,
|
|
2336
2345
|
persistence,
|
|
2337
2346
|
};
|
|
2338
2347
|
invalidateActiveProjectCache();
|
|
2339
2348
|
const fieldText = changes.length > 0 ? `\nfields modified: ${changes.join(", ")}` : "";
|
|
2340
|
-
|
|
2349
|
+
const warningsText = lintWarnings && lintWarnings.length > 0
|
|
2350
|
+
? `\nmarkdown lint warnings (not auto-fixable):\n- ${lintWarnings.join("\n- ")}`
|
|
2351
|
+
: "";
|
|
2352
|
+
return { content: [{ type: "text", text: `Updated memory '${id}'${fieldText}${warningsText}\n${formatPersistenceSummary(persistence)}` }], structuredContent };
|
|
2341
2353
|
});
|
|
2342
2354
|
// ── forget ────────────────────────────────────────────────────────────────────
|
|
2343
2355
|
server.registerTool("forget", {
|