Context
Today the memory loop compiles only Codex and Claude Code sessions into Daily Wiki pages. SCHEMA.md treats these as the supported raw session sources, and scripts/capture-ai-chats.mjs hard-codes two source scanners. Conversations with other local agents (OpenCode, Cursor, DeepSeek Harness) are not captured, so the vault misses a meaningful slice of engineering work.
Goal
Add three additional session sources so a user's conversations with OpenCode, Cursor, and DeepSeek Harness are automatically organized into the local Daily Wiki:
- OpenCode —
~/.local/share/opencode/opencode.db (SQLite: session / message / part), with a fallback to the legacy storage/ JSON tree.
- Cursor —
~/Library/Application Support/Cursor/User workspaceStorage + globalStorage state.vscdb (SQLite ItemTable / cursorDiskKV). This store is version-fragile (2.x composerData vs 3.0 bubbleId:*); treat as best-effort and degrade to a warning instead of crashing.
- DeepSeek Harness (dsh) —
~/.dsh/storages/ event-sourced JSONL session logs, based on the official deepseek-harness persistence format (best-effort, no real sessions yet to validate against).
Requirements
- New source flags:
opencodeSourcesEnabled, cursorSourcesEnabled, dshSourcesEnabled — all default off; a source is only consulted when === true (keeps existing sourcesConfirmed gating intact).
capture-ai-chats.mjs reads these flags, resolves each adapter to normalized {role, text, timestamp} records, and reuses the existing buildSessionFromRecords evidence pipeline — no duplicated normalization.
- SQLite is read with built-in
node:sqlite (Node ≥22.13) so no new dependency is added. If node:sqlite is unavailable or a DB is missing/incompatible, skip that source with a warning rather than failing the whole capture.
- Evidence IDs and
agent names: opencode-* / OpenCode, cursor-* / Cursor, dsh-* / DeepSeek Harness.
- Config UI: add the three source checkboxes to the source modal; update
readForm/writeForm/source-gate detail and the zh/en strings.
SCHEMA.md generalizes the agent: value list; wiki/templates/Daily AI Chat Summary Template.md and the ingest/setup skill wording are updated.
README.md + README.en.md supported-source table updated.
Constraint
Skill sync to an agent stays Codex-only (as today) — the engineering-memory-loader continues to be exposed only to ~/.codex/skills. The new options are extraction sources only, not skill-sync targets.
Notes / Caveats
- Cursor is the fragile source: its on-disk schema moved across Cursor versions and on the author's machine the workspace
composerData composer list only partially overlaps the global bubbleId:* store. Confirmed working for the global-bubble path with lastUpdatedAt-based dates; missing_model is expected (Cursor records no model). Validate on real data before relying on it.
- dsh default persistence is Zstandard-frame JSONL; the adapter reads raw-line JSONL and skips Zstd frames (no
zstd binary dependency).
Verify
node --test scripts/*.test.mjs (53 tests incl. new opencode + dsh fixtures) passes.
node scripts/wiki-lint.mjs reports 0 errors / 0 warnings.
- Capture on the author's machine discovers OpenCode sessions for
2026-08-30 and Cursor sessions for 2025-05-06 without crashing.
Context
Today the memory loop compiles only Codex and Claude Code sessions into Daily Wiki pages.
SCHEMA.mdtreats these as the supported raw session sources, andscripts/capture-ai-chats.mjshard-codes two source scanners. Conversations with other local agents (OpenCode, Cursor, DeepSeek Harness) are not captured, so the vault misses a meaningful slice of engineering work.Goal
Add three additional session sources so a user's conversations with OpenCode, Cursor, and DeepSeek Harness are automatically organized into the local Daily Wiki:
~/.local/share/opencode/opencode.db(SQLite:session/message/part), with a fallback to the legacystorage/JSON tree.~/Library/Application Support/Cursor/UserworkspaceStorage+globalStoragestate.vscdb(SQLiteItemTable/cursorDiskKV). This store is version-fragile (2.xcomposerDatavs 3.0bubbleId:*); treat as best-effort and degrade to a warning instead of crashing.~/.dsh/storages/event-sourced JSONL session logs, based on the officialdeepseek-harnesspersistence format (best-effort, no real sessions yet to validate against).Requirements
opencodeSourcesEnabled,cursorSourcesEnabled,dshSourcesEnabled— all default off; a source is only consulted when=== true(keeps existingsourcesConfirmedgating intact).capture-ai-chats.mjsreads these flags, resolves each adapter to normalized{role, text, timestamp}records, and reuses the existingbuildSessionFromRecordsevidence pipeline — no duplicated normalization.node:sqlite(Node ≥22.13) so no new dependency is added. Ifnode:sqliteis unavailable or a DB is missing/incompatible, skip that source with a warning rather than failing the whole capture.agentnames:opencode-*/OpenCode,cursor-*/Cursor,dsh-*/DeepSeek Harness.readForm/writeForm/source-gate detail and the zh/en strings.SCHEMA.mdgeneralizes theagent:value list;wiki/templates/Daily AI Chat Summary Template.mdand the ingest/setup skill wording are updated.README.md+README.en.mdsupported-source table updated.Constraint
Skill sync to an agent stays Codex-only (as today) — the
engineering-memory-loadercontinues to be exposed only to~/.codex/skills. The new options are extraction sources only, not skill-sync targets.Notes / Caveats
composerDatacomposer list only partially overlaps the globalbubbleId:*store. Confirmed working for the global-bubble path withlastUpdatedAt-based dates;missing_modelis expected (Cursor records no model). Validate on real data before relying on it.zstdbinary dependency).Verify
node --test scripts/*.test.mjs(53 tests incl. new opencode + dsh fixtures) passes.node scripts/wiki-lint.mjsreports 0 errors / 0 warnings.2026-08-30and Cursor sessions for2025-05-06without crashing.