2A perspective-diversity for ~free: the planner call now returns 2-4 query
facets (real axes of the question) alongside terms. Facets steer 0-token recon
routing, give each shard a focus axis in its prompt, and seed synthesis themes
— diversity without extra agents.
2B opt-in verify (MNEMAZINE_SEARCH_VERIFY=1): one agent per top-K finding judges
3 lenses at once (grounded/relevant/actionable) against the note's own text and
drops ungrounded findings. Bounded (K calls), default off to keep tokens tight.
Eval harness (tests/search-eval.mjs, §5): Tier A deterministic recall/anti-noise
over an inline synthetic vault (0 tokens, wired into release-check); Tier B
opt-in LLM judge scoring the deep report for groundedness/relevance/coverage
(generator != evaluator). New `npm run search:eval`.
install.sh: bilingual (RU/EN) greeting from the author on first install —
thanks, GitHub star ask, invite to suggest improvements.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hard-limit the number of LLM agents a deep search spawns via
MNEMAZINE_SEARCH_MAX_SHARDS / --max-shards (default 12). Local mode stays
uncapped (0-token). Dropped shards are logged to stderr AND surfaced in the
report header — no silent truncation. Closes the missing circuit-breaker
called out by the agent-systems playbook.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The `root@` private marker matched the literal placeholder used in the VPS
config example and the poller/sync scripts, so the gate failed on a clean
tree. Require a real host char (lowercase/digit) after `root@`; the uppercase
`root@YOUR_VPS_HOST` placeholder no longer trips it, while a genuine
`root@host` leak still does.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add `npm run search` (mnemazine-kb-search.mjs): a recon → fan-out → fan-in
swarm over the live vault that writes a Russian "Справка" Markdown report.
Recon keyword-scores notes (0 tokens); --deep/MNEMAZINE_DEEP engages a
bounded-pool LLM swarm (one agent per shard, untrusted notes fenced), then
the orchestrator dedups + synthesizes. Local fallback keeps it 0-token by
default, mirroring the rest of the deep pipeline. Self-test included.
Wire it into the Telegram Mini App: the vault is Mac-only and the server is
on the VPS, so the button only enqueues. Server gains POST /api/search
(queue), GET /api/searches (list reports), GET /api/search?name= (read, with
path-escape guard). Mini App gets a search card + report list + text viewer
(rendered as text — no markdown XSS sink). The Mac poller drains the queue,
runs the swarm locally, and rsyncs reports back to the VPS.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
E3: llm bridge now uses async spawn (non-blocking) instead of spawnSync, so agent calls run concurrently. Deep synthesize processes clusters through a bounded pool (MNEMAZINE_CONCURRENCY, default 4) — cheap and fast. Each task is isolated (inner + outer try/catch): one cluster failing never blocks the swarm. Docs cover recognition fallback, swarm, concurrency.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
E1: each file's extraction is isolated — a recognition failure logs extract_error, leaves the file in inbox, and never breaks the rest of the batch (failed count surfaced). E2: local-first recognition stays 0 tokens (Apple Vision OCR / markitdown / whisper); only when local yields nothing usable AND --deep is on does a vision-capable LLM (llmText, Read tool) transcribe the file. New llmText() in the provider bridge (Claude primary, Codex parity).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve claude independently of install method: explicit env -> login-shell PATH (respects however the user installed it: Desktop, npm global, standalone) -> common absolute locations -> newest VSCode extension binary. No longer tied to the VSCode path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mnemazine-digest.mjs writes a humanizer-style RU Справка (Что это/О чём/Почему важно мне/Связи) into each note with real connections from the Graphify graph, plus one session summary note mapping all atoms. Idempotent. Wired into run.mjs --deep after the graph pass; npm run digest. Owner context kept out of the public repo (MNEMAZINE_OWNER_CONTEXT / gitignored .mnemazine/owner-context.txt). Stub-tested injection + summary.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Web-capable LLM agent researches and EXPANDS captured material (kb-enrich philosophy: recon, primary sources, practitioner experience, anti-hallucination fact->URL) before atomization, so atoms are built from grown knowledge not just the raw capture. On within --deep; disable via --no-enrich / MNEMAZINE_ENRICH=0. Reports enriched count; degrades to raw atomize on failure. Stub-tested enrich->atom chain.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New mnemazine-llm.mjs: llmJson(prompt,schema,{provider,tools}). MNEMAZINE_LLM=claude(default)|codex. Claude via headless 'claude -p --output-format json' (JSON instructed in-prompt, no --dangerously-skip-permissions; tools opt-in). Codex backend unchanged at parity. codex.mjs is now a back-compat shim. synthesize/verify route through llm; verify selftest exercises codex stub via the shared contract.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Captured screenshots/PDFs can carry credentials that flow into notes. Token-only, dir-scoped, skipped on clean checkout. Positive-tested with planted AWS key.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CRITICAL: untrusted extracted text fenced (inert-data delimiter + sentinel neutralize) before codex calls that run with headless bypass. HIGH: codexJson + listRecords JSON.parse guarded; fingerprint/atomFingerprint scoped by cluster id (no silent skip on shared/empty source refs); headOk uses a fresh timeout per request; synthesize reports degraded when --deep falls back. Codex scratch in one private 0700 mkdtemp. verifyDeep now covered by a stub-codex selftest.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
KGB adversarial proved two same-basename notes in different sections clobbered on move. Now keyed by full vault-relative path (slashes->__). State dir defaults to ~/Desktop/Mnemazine/.mnemazine/state (README:224). ENOENT->missing, no crash. Selftest covers collision + collision-content survival.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
C2 status:draft/verified:false. U2/U3 content-fingerprint naming + skip-existing. G4: --deep atomizes one cluster into focused atoms via shared codex bridge (default off -> local template). G5: verification_status verified/assumed/unknown — local structural gate by default, --deep adds HEAD+codex web cross-check.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>