neuro-vault-mcp 5.2.0 → 5.3.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/README.md +1 -0
- package/dist/cli.js +48 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,6 +55,7 @@ A few more questions Neuro Vault makes one-shot:
|
|
|
55
55
|
> _"Show meeting notes from `Work/` from the last two weeks, newest first."_
|
|
56
56
|
> _"Find notes similar to this one I'm reading."_
|
|
57
57
|
> _"Append today's decision to the daily note."_
|
|
58
|
+
> _"What's on my agenda today — and what did I capture in other notes since this morning?"_
|
|
58
59
|
> _"What did past-me write about retrieval policy before I started building it?"_
|
|
59
60
|
|
|
60
61
|
One question, one answer. Your assistant stops being a file browser and starts being an actual second brain.
|
package/dist/cli.js
CHANGED
|
@@ -16460,7 +16460,7 @@ function buildCreateNoteTool(deps) {
|
|
|
16460
16460
|
return {
|
|
16461
16461
|
name: "create_note",
|
|
16462
16462
|
title: "Create Note",
|
|
16463
|
-
description: "Create a new note. Provide `name` or `path
|
|
16463
|
+
description: "Create a new note. Provide `name` or `path` (exactly one). Optionally provide `content` (raw markdown for the note body and frontmatter) OR `template` (name of a vault template to apply) \u2014 these are mutually exclusive. If a note with this path/name might already exist and the user has not explicitly asked to replace it, ask the user before passing `overwrite: true` \u2014 overwrite is destructive. Default behavior fails when the note exists.",
|
|
16464
16464
|
inputSchema: inputSchema5,
|
|
16465
16465
|
handler: async (input) => {
|
|
16466
16466
|
if (input.name === void 0 && input.path === void 0) {
|
|
@@ -16469,6 +16469,12 @@ function buildCreateNoteTool(deps) {
|
|
|
16469
16469
|
if (input.name !== void 0 && input.path !== void 0) {
|
|
16470
16470
|
throw invalidArgument("Provide exactly one of name or path", "name");
|
|
16471
16471
|
}
|
|
16472
|
+
if (input.content !== void 0 && input.template !== void 0) {
|
|
16473
|
+
throw invalidArgument(
|
|
16474
|
+
"content and template cannot be used together \u2014 call create_note with only one. If you want a note pre-filled from a template, omit content; if you want to write exact markdown, omit template.",
|
|
16475
|
+
"content"
|
|
16476
|
+
);
|
|
16477
|
+
}
|
|
16472
16478
|
const passthrough = {};
|
|
16473
16479
|
if (input.name !== void 0) {
|
|
16474
16480
|
if (input.name.trim() === "") throw invalidArgument("name must not be empty", "name");
|
|
@@ -16631,19 +16637,56 @@ function buildQueryNotesTool(deps) {
|
|
|
16631
16637
|
}
|
|
16632
16638
|
|
|
16633
16639
|
// src/modules/operations/tools/read-daily.ts
|
|
16640
|
+
var NOTES_TODAY_CAP = 200;
|
|
16641
|
+
var DAILY_BASENAME_RE = /(\d{4}-\d{2}-\d{2})\.md$/;
|
|
16634
16642
|
var inputSchema11 = external_exports.object({});
|
|
16635
16643
|
function buildReadDailyTool(deps) {
|
|
16636
|
-
const { provider } = deps;
|
|
16644
|
+
const { provider, reader, graph } = deps;
|
|
16637
16645
|
return {
|
|
16638
16646
|
name: "read_daily",
|
|
16639
16647
|
title: "Read Daily",
|
|
16640
|
-
description:
|
|
16648
|
+
description: 'Read today\'s daily note. Returns `{ path, frontmatter, content, notes_today }` where `frontmatter` is the parsed YAML object (or `null` if absent/malformed), `content` is the body without the YAML block, and `notes_today` lists vault notes created today (matched by `frontmatter.created`) excluding daily notes themselves \u2014 metadata only, sorted by path ascending, capped at 200 entries. Useful for "what\'s on my agenda?" / "what happened today?" questions without a separate `query_notes` call.',
|
|
16641
16649
|
inputSchema: inputSchema11,
|
|
16642
16650
|
handler: async (_input) => {
|
|
16643
|
-
|
|
16651
|
+
const daily = await provider.readDaily();
|
|
16652
|
+
const today = deriveToday(daily.path);
|
|
16653
|
+
const query = await runQueryNotes(
|
|
16654
|
+
{
|
|
16655
|
+
filter: {
|
|
16656
|
+
"frontmatter.created": { $regex: `^${today}` },
|
|
16657
|
+
"frontmatter.type": { $ne: "daily" }
|
|
16658
|
+
},
|
|
16659
|
+
sort: { field: "path", order: "asc" },
|
|
16660
|
+
limit: NOTES_TODAY_CAP
|
|
16661
|
+
},
|
|
16662
|
+
reader,
|
|
16663
|
+
graph
|
|
16664
|
+
);
|
|
16665
|
+
const notesToday = query.results.map((item) => ({
|
|
16666
|
+
path: item.path,
|
|
16667
|
+
frontmatter: item.frontmatter,
|
|
16668
|
+
backlink_count: item.backlink_count
|
|
16669
|
+
}));
|
|
16670
|
+
return {
|
|
16671
|
+
path: daily.path,
|
|
16672
|
+
frontmatter: daily.frontmatter,
|
|
16673
|
+
content: daily.content,
|
|
16674
|
+
notes_today: notesToday
|
|
16675
|
+
};
|
|
16644
16676
|
}
|
|
16645
16677
|
};
|
|
16646
16678
|
}
|
|
16679
|
+
function deriveToday(dailyPath) {
|
|
16680
|
+
const match = DAILY_BASENAME_RE.exec(dailyPath);
|
|
16681
|
+
if (match) return match[1];
|
|
16682
|
+
return formatLocalDate(/* @__PURE__ */ new Date());
|
|
16683
|
+
}
|
|
16684
|
+
function formatLocalDate(d) {
|
|
16685
|
+
const y = d.getFullYear();
|
|
16686
|
+
const m = String(d.getMonth() + 1).padStart(2, "0");
|
|
16687
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
16688
|
+
return `${y}-${m}-${day}`;
|
|
16689
|
+
}
|
|
16647
16690
|
|
|
16648
16691
|
// src/modules/operations/tools/read-notes.ts
|
|
16649
16692
|
var readNotesFieldSchema = external_exports.enum(["frontmatter", "content"]);
|
|
@@ -16894,7 +16937,7 @@ Use \`read_notes\`, \`create_note\`, \`edit_note\`, \`read_daily\` when the user
|
|
|
16894
16937
|
- Read one or more notes by path (\`read_notes\` \u2014 accepts a single vault-relative POSIX path string or an array of 1\u201350 such paths; prefer this over multiple sequential reads)
|
|
16895
16938
|
- Create a new note, task, or idea (\`create_note\`)
|
|
16896
16939
|
- Edit an existing note's body (\`edit_note\` \u2014 pass \`replace\` for exact-string find/replace, or omit it to overwrite the whole body. Frontmatter is never touched. If \`replace\` matches more than once, the call fails with \`AMBIGUOUS_MATCH\` listing the lines \u2014 make \`replace\` more specific or omit it to do a full rewrite). For "add at the end / start" use \`read_notes\` to fetch the body, modify it locally, and call \`edit_note\` without \`replace\`.
|
|
16897
|
-
- Read today's daily note (\`read_daily\` returns path
|
|
16940
|
+
- Read today's daily note (\`read_daily\` returns \`{ path, frontmatter, content, notes_today }\`; \`notes_today\` lists notes created today excluding daily notes themselves, metadata only). To add content to today's daily, follow up with \`edit_note\` (omit \`replace\` for a full-body rewrite); if the daily note doesn't yet exist, use \`create_note\` with the path \`read_daily\` returns.
|
|
16898
16941
|
|
|
16899
16942
|
\`create_note\` with \`overwrite: true\` is destructive. Always ask the user before overwriting an existing note.
|
|
16900
16943
|
|