Skip to content

Self-hosted MCP server + dashboard giving Claude Code, Cursor & Hermes agents shared long-term memory over a git-backed markdown vault. Agent-native, Obsidian-compatible second brain — markdown RAG, no vector DB.

feat(chat): surface the manifest; refresh deploy docs

Ronalds Palacis8c53d29ee47c
diff --git a/.env.example b/.env.example
index 8976123..c9cb7db 100644
--- a/.env.example
+++ b/.env.example
@@ -39,10 +39,14 @@ ENGRAM_DATA_DIR="/data"
# GIT_AUTHOR_EMAIL="[email protected]"
# GITHUB_CLIENT_ID="" # "Connect GitHub" repo flow (URL+token path needs no OAuth app)
# GITHUB_CLIENT_SECRET="" # OAuth app "Authorization callback URL": <APP_URL>/api/github/callback
-# HARNESS_ENABLED="false" # brain_capture auto-filing (costs Anthropic tokens)
-# ANTHROPIC_API_KEY=""
+# Curator (Engram-runs-a-model): choose off / chat / full in Settings. These env vars are only a
+# default before the operator picks a mode in the UI; HARNESS_ENABLED is the legacy boolean and
+# still seeds "full" for existing deploys.
+# HARNESS_ENABLED="false" # legacy: true => Curator defaults to "full" (brain_capture on)
+# ANTHROPIC_API_KEY="" # required for any Curator mode; your notes are sent to Anthropic on it
# CAPTURE_MODEL="claude-haiku-4-5" # brain_capture model; pick in Settings (default). Must be a supported id.
-# MCP_TOKEN="" # one shared MCP key; or create per-teammate tokens on the Connect page
+# MCP_TOKEN="" # one shared MCP key (full access); or create per-teammate tokens (read/write) on Connect
+# ARCHIVE_FOLDERS="archive,archives,_archive,trash" # folders whose notes are demoted in search + excluded by default
# ENGRAM_STATE_DIR="/data/.engram" # override where token hashes persist (defaults to ENGRAM_DATA_DIR)
# VAULT_DIR="/data" # fallback local vault (workspaces are normally connected in the UI)
# AUTH_DISABLED="false" # single-user local mode: no Google auth, MCP open. NEVER true in production.
diff --git a/DEPLOY.md b/DEPLOY.md
index 3949333..51cca1b 100644
--- a/DEPLOY.md
+++ b/DEPLOY.md
@@ -31,10 +31,16 @@ itself (or say where state lives), so they can't live behind the login and must
**Configure in the dashboard → Settings (or the toggles on the home) instead of env** (all
optional; env value, if set, is just the default): **Git sync** (ON by default — commit +
-push the connected vault; author + advanced in Settings) · **Curator** (chat + `brain_capture`
-auto-filing toggle + Anthropic key + capture model) · **App name** · **GitHub** repo-connect
-OAuth (client id/secret). Git sync and Curator have inline on/off toggles on the home hub.
-Secrets entered in Settings are stored encrypted at rest (keyed off `AUTH_SECRET`).
+push the connected vault; author + advanced in Settings) · **Curator** — a three-state control:
+`off` (no model calls, the default), `chat` (grounded read-only chat over the vault), `full`
+(chat can edit, and `brain_capture` files rough dumps). `chat` and `full` need an Anthropic key,
+**and send note content to Anthropic** — worth knowing before you enable them. · **App name** ·
+**GitHub** repo-connect OAuth (client id/secret). Secrets entered in Settings are stored encrypted
+at rest (keyed off `AUTH_SECRET`).
+
+Note `ARCHIVE_FOLDERS` (default `archive,archives,_archive,trash`): notes in these folders are
+demoted in search and excluded from agent results by default — how you retire a note without
+deleting it.
## 4. Connect a vault repo (in the dashboard → Workspaces)
Two ways — pick one:
@@ -45,7 +51,9 @@ Two ways — pick one:
and pick a repo from a list.
Add repos, switch the active one, remove — all in the UI. MCP tokens (per teammate/agent) are
-created on the **Connect** page.
+created on the **Connect** page, each **`read` or `write`** scope. A read-only token cannot see or
+call the write tools — give one to an agent you don't want mutating the vault. Every write is
+recorded in the git log with which token or human caused it.
## 5. (Optional) GitHub OAuth app — for the "Connect GitHub" flow
Each deployment uses **its own** GitHub OAuth app (secrets can't be shared, and the callback is
diff --git a/components/curator-chat.tsx b/components/curator-chat.tsx
index 7ccbbd4..76a31de 100644
--- a/components/curator-chat.tsx
+++ b/components/curator-chat.tsx
@@ -12,9 +12,30 @@ import { RecentNotes } from "@/components/recent-notes";
import { Button } from "@/components/ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
+interface Manifest {
+ created: string[];
+ updated: string[];
+ appended: string[];
+ moved: string[];
+}
+
interface Msg {
role: "user" | "assistant";
content: string;
+ /** In Full mode, what the Curator changed this turn — so a write is visible, not silent. */
+ changed?: Manifest;
+}
+
+/** Compact "created 1 · updated 2" summary, or null when nothing was written. */
+function changeSummary(m?: Manifest): { label: string; paths: string[] } | null {
+ if (!m) return null;
+ const parts: string[] = [];
+ if (m.created.length) parts.push(`created ${m.created.length}`);
+ if (m.updated.length) parts.push(`updated ${m.updated.length}`);
+ if (m.appended.length) parts.push(`appended ${m.appended.length}`);
+ if (m.moved.length) parts.push(`moved ${m.moved.length}`);
+ if (!parts.length) return null;
+ return { label: parts.join(" · "), paths: [...m.created, ...m.updated, ...m.appended, ...m.moved] };
}
export function CuratorChat() {
@@ -48,6 +69,7 @@ export function CuratorChat() {
const ctrl = new AbortController();
abortRef.current = ctrl;
let acc = "";
+ let changed: Manifest | undefined;
try {
const res = await fetch("/api/curator/chat", {
method: "POST",
@@ -76,8 +98,21 @@ export function CuratorChat() {
} else if (ev.type === "thinking") {
setActivity("thinking…");
} else if (ev.type === "tool") {
- const verb = ev.name === "brain_search" ? "searching the vault…" : ev.name === "brain_read" ? "reading a note…" : "checking the vault…";
+ const verb =
+ ev.name === "brain_search"
+ ? "searching the vault…"
+ : ev.name === "brain_read"
+ ? "reading a note…"
+ : ev.name === "brain_write" || ev.name === "brain_edit"
+ ? "writing a note…"
+ : ev.name === "brain_append"
+ ? "adding to a note…"
+ : ev.name === "brain_move"
+ ? "archiving a note…"
+ : "checking the vault…";
setActivity(verb);
+ } else if (ev.type === "manifest") {
+ changed = ev.manifest;
} else if (ev.type === "error") {
setError(ev.message || "error");
}
@@ -86,7 +121,8 @@ export function CuratorChat() {
} catch (e) {
if ((e as Error).name !== "AbortError") setError(e instanceof Error ? e.message : "stream failed");
} finally {
- if (acc.trim()) setMessages((m) => [...m, { role: "assistant", content: acc }]);
+ if (acc.trim() || changeSummary(changed))
+ setMessages((m) => [...m, { role: "assistant", content: acc, changed }]);
setStreamText("");
setActivity("");
setStreaming(false);
@@ -228,6 +264,22 @@ export function CuratorChat() {
) : (
<div key={i} className="text-sm">
<Markdown content={m.content} resolve={(s) => `/n/${s}`} />
+ {(() => {
+ const c = changeSummary(m.changed);
+ if (!c) return null;
+ return (
+ <div className="mt-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground">
+ <span className="text-foreground">Changed the vault</span> · {c.label}
+ <div className="mt-1 flex flex-wrap gap-x-2 gap-y-0.5">
+ {c.paths.map((p) => (
+ <a key={p} href={`/n/${p.replace(/\.md$/, "")}`} className="font-mono hover:text-foreground hover:underline">
+ {p}
+ </a>
+ ))}
+ </div>
+ </div>
+ );
+ })()}
</div>
),
)}