mnemos-capture 1.1.0 → 1.2.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 +182 -113
- package/dist/cli/__tests__/config.test.js +49 -0
- package/dist/cli/__tests__/hooks.test.js +276 -0
- package/dist/cli/__tests__/kos.test.js +65 -0
- package/dist/cli/config.js +70 -0
- package/dist/cli/hooks.js +144 -5
- package/dist/cli/index.js +57 -7
- package/dist/cli/kos.js +123 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
<img src="https://img.shields.io/badge/MCP-compatible-green" alt="MCP" />
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
|
-
<p align="center"><strong>
|
|
13
|
+
<p align="center"><strong>Capture anything. Your agents apply it.</strong></p>
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
<p align="center">A knowledge pipeline that ingests the outside world and makes it directly actionable by any AI agent — over MCP.</p>
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Your agent only knows what it was trained on. It doesn't know the article you read this morning, the framework you found last week, or the decision you made last sprint. **Your AI agent finally knows what you've been reading.**
|
|
18
|
+
|
|
19
|
+
Mnemos is the pipeline between the two. Capture any insight once — Mnemos extracts it, stores it as plain Markdown in your own GitHub repo, and serves it to your agent over MCP. Then it goes further: at session start it briefs your agent on what matters right now, turns insights into implementation plans, and hands them to whatever assistant you run — Claude Code, Codex, Cursor, Gemini, anything MCP-compatible.
|
|
20
|
+
|
|
21
|
+
It's not a second brain, a vault, or a note-taking app — those store knowledge for *you* to read later. Mnemos makes knowledge your **agent acts on now**.
|
|
18
22
|
|
|
19
23
|
|
|
20
24
|
## Get started
|
|
@@ -26,141 +30,120 @@ Go to **[mnemos-capture.vercel.app](https://mnemos-capture.vercel.app)** → **S
|
|
|
26
30
|
During setup, Mnemos will:
|
|
27
31
|
|
|
28
32
|
- Create a knowledge repo in your GitHub account — plain Markdown files, no proprietary format
|
|
29
|
-
- Ask for your
|
|
33
|
+
- Ask for your API key (your provider, your key — Mnemos never pays for your API calls)
|
|
30
34
|
- Set a PIN so you can unlock the app quickly on mobile
|
|
31
35
|
|
|
32
36
|
No config files. No repos to clone. No CLI setup required.
|
|
33
37
|
|
|
34
|
-
### 2.
|
|
35
|
-
|
|
36
|
-
Open the app on any device — phone, tablet, or desktop. Paste any content and hit **Capture**.
|
|
38
|
+
### 2. Connect to your AI assistant
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
When you finish onboarding, Mnemos generates a personal **MCP API key** — copy it.
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
**Claude Code:**
|
|
43
|
+
```bash
|
|
44
|
+
claude mcp add mnemos -- npx -y mnemos-capture@latest serve-mcp --key <your-mcp-key>
|
|
45
|
+
```
|
|
43
46
|
|
|
47
|
+
**Any MCP-compatible client** (Cursor, Continue, Gemini CLI, etc.) — point it at the stdio proxy:
|
|
44
48
|
```bash
|
|
45
|
-
|
|
49
|
+
npx -y mnemos-capture@latest serve-mcp --key <your-mcp-key>
|
|
46
50
|
```
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
The proxy forwards your agent's MCP tool calls to the hosted Mnemos API. Nothing is stored locally — your knowledge lives in your GitHub repo.
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
### 3. Capture something
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
Open the app on any device — phone, tablet, or desktop. Paste any content and hit **Capture**. Or capture directly from your agent:
|
|
53
57
|
|
|
54
58
|
```
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Your agent sees this before the conversation begins and can proactively surface pending captures instead of waiting for you to ask. The hook is skipped if one already exists, so rotating keys or upgrading modes is always safe — your configuration is never overwritten silently.
|
|
59
|
-
|
|
60
|
-
**Upgrade to a full session briefing (optional).** If you want more than a count — an LLM-composed briefing grounded in your current git branch, recent commits, and `CLAUDE.md` — run:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npx -y mnemos-capture@latest setup-hooks --key <your-api-key> --briefing
|
|
59
|
+
capture "The Mom Test — don't ask if your idea is good, ask about their life."
|
|
64
60
|
```
|
|
65
61
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
**Where the hook runs.** `SessionStart` hooks fire anywhere Claude Code reads your local settings — CLI, VS Code / JetBrains extensions, and the desktop app. For Claude Code on the web or other MCP clients (Cursor, etc.), the MCP tools (`list_inbox`, `briefing`, `recall`, …) still work — you just won't get the proactive nudge automatically. Add a line to that project's `CLAUDE.md` like `"At session start, call list_inbox to surface pending captures"` for a portable alternative.
|
|
69
|
-
|
|
70
|
-
### 4. Connect to any MCP-compatible agent
|
|
71
|
-
|
|
72
|
-
Your knowledge lives in a standard GitHub repo. Any agent that can read Git or speak MCP can access it — no lock-in, no custom integration required.
|
|
62
|
+
That's it. Your knowledge is now indexed and available to every agent session.
|
|
73
63
|
|
|
74
64
|
|
|
75
65
|
## How it works
|
|
76
66
|
|
|
77
67
|
```mermaid
|
|
78
68
|
flowchart TD
|
|
79
|
-
A["Article / research /\ntranscript / idea"] -->|paste| B["Mnemos\n(web / mobile /
|
|
80
|
-
B -->|extracts
|
|
81
|
-
C -->|
|
|
82
|
-
D -->|
|
|
83
|
-
E -->|
|
|
84
|
-
F -->|
|
|
85
|
-
F -->|no| H["Stays in\nknowledge base"]
|
|
69
|
+
A["Article / research /\ntranscript / idea"] -->|paste| B["Mnemos\n(web / mobile / agent)"]
|
|
70
|
+
B -->|extracts insight| C["Structured Markdown\ncommitted to your repo"]
|
|
71
|
+
C -->|session start| D["Briefing\nranked suggestions + plan"]
|
|
72
|
+
D -->|generate_plan| E["Implementation plan\nsaved to plans/"]
|
|
73
|
+
E -->|mnemos kos| F["Your AI assistant\nexecutes in isolated worktree"]
|
|
74
|
+
F -->|verify| G["Branch ready\nto review & merge"]
|
|
86
75
|
|
|
87
76
|
style A fill:#1a1a2e,stroke:#444,color:#fff
|
|
88
77
|
style B fill:#2A62C6,stroke:#1a4a9e,color:#fff
|
|
89
|
-
style C fill:#
|
|
90
|
-
style D fill:#
|
|
91
|
-
style E fill:#
|
|
92
|
-
style F fill:#
|
|
78
|
+
style C fill:#2d8a4e,stroke:#1e6b3a,color:#fff
|
|
79
|
+
style D fill:#d4a843,stroke:#b8912e,color:#fff
|
|
80
|
+
style E fill:#2A62C6,stroke:#1a4a9e,color:#fff
|
|
81
|
+
style F fill:#1a1a2e,stroke:#444,color:#fff
|
|
93
82
|
style G fill:#2d8a4e,stroke:#1e6b3a,color:#fff
|
|
94
|
-
style H fill:#1a1a2e,stroke:#444,color:#fff
|
|
95
83
|
```
|
|
96
84
|
|
|
97
|
-
1. **
|
|
98
|
-
2. **
|
|
99
|
-
3. **
|
|
100
|
-
4. **
|
|
85
|
+
1. **Capture** — paste anything text-based. Mnemos extracts the core idea, key takeaways, where to apply it, and auto-detects whether it's a URL, short note, or long paste. Committed to your GitHub repo as structured Markdown.
|
|
86
|
+
2. **Brief** — at session start, the `--briefing` flag sends your project context (branch, recent commits, CLAUDE.md) to Mnemos. It returns ranked suggestions — *why* each insight matters now, *what* applying it achieves, *where* in your codebase.
|
|
87
|
+
3. **Plan** — `generate_plan` reads your selected captures and produces a structured Markdown plan: Codebase Mapping table, per-file steps with effort tiers (`simple` / `complex` / `architectural`), and a Verification Checklist.
|
|
88
|
+
4. **Execute** — `mnemos kos` (coming) creates an isolated git worktree, launches your configured AI assistant with the plan as its contract, and runs the verification checklist when it's done.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## What you can feed it
|
|
101
92
|
|
|
102
|
-
|
|
93
|
+
If it's text, Mnemos can extract insight from it. No manual tagging required.
|
|
103
94
|
|
|
104
|
-
|
|
95
|
+
- **Research papers and preprints** — new models, architectures, evaluation methods
|
|
96
|
+
- **Framework and library docs** — patterns, APIs, integration approaches worth keeping
|
|
97
|
+
- **Technical threads and writeups** — the argument or finding, not the noise
|
|
98
|
+
- **Optimization techniques** — prompt engineering, caching strategies, latency improvements
|
|
99
|
+
- **Your own ideas** — architecture decisions, workflow changes, things you want your agents to act on later
|
|
100
|
+
- **Transcripts and talks** — signal extracted, ready to apply
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## Example capture
|
|
104
|
+
|
|
105
|
+
Paste a research post about error observability. This is what lands in your repo:
|
|
105
106
|
|
|
106
107
|
```markdown
|
|
107
108
|
---
|
|
108
|
-
date: 2026-
|
|
109
|
-
source:
|
|
110
|
-
url: https://example.com/
|
|
109
|
+
date: 2026-06-05
|
|
110
|
+
source: Error Context First — Observability for AI Systems
|
|
111
|
+
url: https://example.com/error-context
|
|
111
112
|
type: post
|
|
112
|
-
|
|
113
|
+
source_type: url
|
|
114
|
+
tags: observability, error-handling, ai-agents, debugging
|
|
113
115
|
status: inbox
|
|
116
|
+
lowConfidence: false
|
|
114
117
|
---
|
|
115
118
|
|
|
116
|
-
#
|
|
119
|
+
# Error Context First — Observability for AI Systems
|
|
117
120
|
|
|
118
121
|
## Core idea
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
Opaque error messages make every fix a guess. Adding source context to every
|
|
123
|
+
error — which handler, which step, which input — turns debugging from archaeology
|
|
124
|
+
into a directed search.
|
|
122
125
|
|
|
123
126
|
## Key takeaways
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
collapse the entire workflow
|
|
128
|
-
|
|
129
|
-
## Quotes
|
|
130
|
-
> "The bottleneck in complex agentic tasks is not model capability — it's
|
|
131
|
-
> error propagation across sequential steps."
|
|
127
|
+
- Every catch block should prefix messages with where it came from
|
|
128
|
+
- "The string did not match the expected pattern" is useless; "[github-write] ..." is actionable
|
|
129
|
+
- Instrument before you fix — opaque errors cause repeated misdiagnoses
|
|
132
130
|
|
|
133
131
|
## Applied to
|
|
134
|
-
|
|
135
|
-
into parallel subagent calls — prioritize anything with 3+ sequential steps.
|
|
132
|
+
Add handler-name prefixes to every catch block in your agent's tool pipeline.
|
|
136
133
|
```
|
|
137
134
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
## What you can feed it
|
|
142
|
-
|
|
143
|
-
If it's text, Mnemos can extract insight from it. You don't need to categorize or tag anything yourself — that happens automatically.
|
|
144
|
-
|
|
145
|
-
- **Research papers and preprints** — new models, architectures, evaluation methods
|
|
146
|
-
- **Framework and library docs** — patterns, APIs, integration approaches worth keeping
|
|
147
|
-
- **Optimization techniques** — prompt engineering, caching strategies, latency improvements
|
|
148
|
-
- **Technical threads and writeups** — the argument or finding, not the noise
|
|
149
|
-
- **Your own ideas** — workflow improvements, architecture decisions, things you want your agents to act on later
|
|
150
|
-
- **Transcripts and talks** — the signal extracted, ready to apply
|
|
135
|
+
`source_type` is auto-detected (`url` / `note` / `paste`). `lowConfidence` flags short or ambiguous input for review before acting on it.
|
|
151
136
|
|
|
152
137
|
|
|
153
138
|
## Knowledge lifecycle
|
|
154
139
|
|
|
155
|
-
Knowledge that sits unreviewed rots. Mnemos forces a decision: apply it, save it for later, or discard it.
|
|
156
|
-
|
|
157
140
|
```
|
|
158
141
|
┌─────────┐
|
|
159
142
|
│ Capture │
|
|
160
143
|
└────┬─────┘
|
|
161
144
|
▼
|
|
162
145
|
┌─────────┐ ┌──────────┐
|
|
163
|
-
│ Inbox │────▶│ Applied │
|
|
146
|
+
│ Inbox │────▶│ Applied │ Insight used — plan executed, rule added, code changed
|
|
164
147
|
└────┬─────┘ └──────────┘
|
|
165
148
|
│
|
|
166
149
|
├──────────▶┌──────────┐
|
|
@@ -172,67 +155,152 @@ Knowledge that sits unreviewed rots. Mnemos forces a decision: apply it, save it
|
|
|
172
155
|
└──────────┘
|
|
173
156
|
```
|
|
174
157
|
|
|
175
|
-
|
|
158
|
+
All captures are tracked in `INDEX.md` — a master table your agents search across your entire knowledge base. Generated plans land in `plans/`.
|
|
159
|
+
|
|
176
160
|
|
|
177
|
-
|
|
178
|
-
2. **Review** — use `list_inbox` to see what's in your inbox (with summaries), and `read_capture` to read the full content of any capture.
|
|
179
|
-
3. **Apply** — when you've used an insight (added it to a project file, changed a workflow, created a rule), use `apply_capture` to move it to `applied/`. This closes the loop — the knowledge is now part of your system.
|
|
180
|
-
4. **Archive** — reviewed it but it's not actionable right now? Use `archive_capture` to move it to `archived/`. It stays searchable but out of your inbox.
|
|
181
|
-
5. **Delete** — not useful? Use `delete_capture` to permanently remove it.
|
|
161
|
+
## Session hooks
|
|
182
162
|
|
|
183
|
-
|
|
163
|
+
`serve-mcp` writes a `SessionStart` hook to `~/.claude/settings.json` on first run. Every session opens with your inbox count:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
Mnemos: 4 captures in inbox — run list_inbox to review
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Briefing mode
|
|
170
|
+
|
|
171
|
+
Opt in for a structured briefing instead of a count:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npx -y mnemos-capture@latest setup-hooks --key YOUR_KEY --briefing
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
At session start, Mnemos collects your project context — branch, recent commits, CLAUDE.md excerpt — and returns:
|
|
178
|
+
|
|
179
|
+
1. Ranked suggestions with `why`, `benefit`, `where`, and whether to apply now
|
|
180
|
+
2. Relevant synthesized rules
|
|
181
|
+
3. A `generate_plan` prompt pre-loaded with the captures to apply
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
3 insights to apply now:
|
|
185
|
+
|
|
186
|
+
1. error-context-first → src/app/api/capture/route.ts
|
|
187
|
+
Why: Your current branch rewrites the capture pipeline and all catch blocks are opaque
|
|
188
|
+
Benefit: Every error will identify its source in < 1 line
|
|
189
|
+
|
|
190
|
+
Run generate_plan with selected_captures: ["inbox/2026-06-05-error-context-first.md"]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Vault mode (PreToolCall hook)
|
|
194
|
+
|
|
195
|
+
Surfaces relevant captures *before* you edit a file — not just at session start:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
npx -y mnemos-capture@latest setup-hooks --key YOUR_KEY --vault
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Before every `Edit`, `Write`, or `MultiEdit` tool call, Mnemos scans your vault for captures scoring ≥ 0.7 relevance to the file you're about to touch. Each capture is surfaced at most once per session.
|
|
202
|
+
|
|
203
|
+
Opt-in only — not installed by default because it fires on every file edit.
|
|
204
|
+
|
|
205
|
+
### Compatibility
|
|
206
|
+
|
|
207
|
+
| Surface | Hook fires |
|
|
208
|
+
|---|---|
|
|
209
|
+
| Claude Code CLI, VS Code / JetBrains extensions, desktop app | Yes |
|
|
210
|
+
| Claude Code on the web | No — `~/.claude/settings.json` is local only |
|
|
211
|
+
| Cursor / other MCP clients | No — distinct hook systems |
|
|
212
|
+
|
|
213
|
+
MCP tools work everywhere. For unsupported surfaces, add to `CLAUDE.md`:
|
|
214
|
+
|
|
215
|
+
> At session start, call `list_inbox` to surface pending captures.
|
|
184
216
|
|
|
185
217
|
|
|
186
218
|
## MCP tools
|
|
187
219
|
|
|
188
|
-
Mnemos exposes
|
|
220
|
+
Mnemos exposes 15 tools via MCP:
|
|
189
221
|
|
|
190
222
|
### Capture
|
|
191
223
|
|
|
192
224
|
| Tool | What it does |
|
|
193
225
|
|------|-------------|
|
|
194
|
-
| `capture` | Extracts insight from any pasted content
|
|
226
|
+
| `capture` | Extracts insight from any pasted content. Auto-detects source type, flags low-confidence input, auto-links to related captures. |
|
|
195
227
|
|
|
196
228
|
### Discover
|
|
197
229
|
|
|
198
230
|
| Tool | What it does |
|
|
199
231
|
|------|-------------|
|
|
200
|
-
| `list_inbox` |
|
|
201
|
-
| `search_captures` |
|
|
202
|
-
| `read_capture` |
|
|
232
|
+
| `list_inbox` | Unprocessed captures with summaries — title, type, tags, core idea. |
|
|
233
|
+
| `search_captures` | Keyword + tag search across inbox, applied, and archived. |
|
|
234
|
+
| `read_capture` | Full Markdown of any capture. |
|
|
235
|
+
| `recall` | Semantic search — describe your task, get the most relevant captures back. More powerful than keyword search. |
|
|
236
|
+
|
|
237
|
+
### Apply
|
|
238
|
+
|
|
239
|
+
| Tool | What it does |
|
|
240
|
+
|------|-------------|
|
|
241
|
+
| `apply_capture` | Moves inbox → applied. Records how and where knowledge was used, which plan drove it, and what changed. Triggers rule re-synthesis. |
|
|
242
|
+
| `archive_capture` | Moves inbox → archived. Reviewed but not actionable now. |
|
|
243
|
+
| `delete_capture` | Permanently removes a capture and its index entry. |
|
|
244
|
+
| `apply_to_context` | Paste task + stack + code snippet → get concrete, file-level suggestions for applying your captured knowledge. |
|
|
245
|
+
|
|
246
|
+
### Plan
|
|
247
|
+
|
|
248
|
+
| Tool | What it does |
|
|
249
|
+
|------|-------------|
|
|
250
|
+
| `briefing` | Session-start briefing: ranked suggestions with `applyNow` flags, relevant rules, and a `generate_plan` prompt. Requires `project_context`. |
|
|
251
|
+
| `generate_plan` | Reads selected captures + optional codebase files → structured Markdown plan with Codebase Mapping table, effort tiers per step, and Verification Checklist. Saved to `plans/`. |
|
|
252
|
+
| `list_plans` | Lists saved plans, or reads a specific plan in full. |
|
|
253
|
+
|
|
254
|
+
### Synthesize
|
|
255
|
+
|
|
256
|
+
| Tool | What it does |
|
|
257
|
+
|------|-------------|
|
|
258
|
+
| `synthesize` | Distills captures on a tag into actionable rules. Updates `RULES.md`. |
|
|
259
|
+
| `get_rules` | Returns synthesized rules — filtered by tag or all. Use to populate `CLAUDE.md` or a system prompt. |
|
|
203
260
|
|
|
204
|
-
###
|
|
261
|
+
### Curate
|
|
205
262
|
|
|
206
263
|
| Tool | What it does |
|
|
207
264
|
|------|-------------|
|
|
208
|
-
| `
|
|
209
|
-
| `
|
|
210
|
-
|
|
265
|
+
| `curate` | Validates inbox captures: HEAD-checks URLs (404/410 → stale), flags low-confidence extractions. Optional `auto_archive`. Batch cap: 20 files. |
|
|
266
|
+
| `vault_scan` | Scans the full vault for captures relevant to your current activity (score ≥ 0.7). Used by the vault hook. |
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
## CLI
|
|
211
270
|
|
|
212
|
-
|
|
271
|
+
```
|
|
272
|
+
mnemos-capture Open hosted app
|
|
273
|
+
mnemos-capture serve-mcp --key KEY Run local MCP proxy (auto-installs hook)
|
|
274
|
+
mnemos-capture setup-hooks --key KEY [--briefing] [--vault] Install session hooks
|
|
275
|
+
mnemos-capture inbox-check --key KEY [--briefing] Debug what the hook runs
|
|
276
|
+
mnemos-capture vault-check --key KEY Debug what the vault hook runs
|
|
277
|
+
mnemos-capture help Show help
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
All commands run via `npx -y mnemos-capture@latest <subcommand>`. `@latest` forces npm to resolve against the registry on every invocation.
|
|
213
281
|
|
|
214
282
|
|
|
215
283
|
## Mobile
|
|
216
284
|
|
|
217
|
-
Open Mnemos in your phone's browser
|
|
285
|
+
Open Mnemos in your phone's browser → **Share → Add to Home Screen**. Runs full-screen like a native app. Capture while reading — your agents have it by the time you sit down to work.
|
|
218
286
|
|
|
219
|
-
Capture on the go — reading an article on your phone at lunch? Capture it. Your agents have it by the time you sit down to work.
|
|
220
287
|
|
|
221
288
|
## Your data, your storage
|
|
222
289
|
|
|
223
290
|
Your knowledge lives in a GitHub repo you own. Plain Markdown files, version-controlled, portable.
|
|
224
291
|
|
|
225
|
-
- **No lock-in** — clone it,
|
|
292
|
+
- **No lock-in** — clone it, move it, delete Mnemos and your repo stays exactly where it is
|
|
226
293
|
- **No proprietary format** — every capture is a readable `.md` file
|
|
227
|
-
- **No training on your data** — Mnemos never reads your captures for any purpose other than serving them back to you
|
|
294
|
+
- **No training on your data** — Mnemos never reads your captures for any purpose other than serving them back to you
|
|
228
295
|
- **Any tool can access it** — anything that reads Git or speaks MCP works with your knowledge base
|
|
296
|
+
- **BYOK** — your provider, your key, your cost
|
|
229
297
|
|
|
230
298
|
|
|
231
299
|
## Cost
|
|
232
300
|
|
|
233
|
-
Mnemos
|
|
301
|
+
Mnemos is BYOK — you bring your own API key, Mnemos never charges you for inference.
|
|
234
302
|
|
|
235
|
-
Extraction runs on
|
|
303
|
+
Extraction runs on a fast, low-cost model (Claude Haiku 4.5 by default) with prompt caching and input truncation:
|
|
236
304
|
|
|
237
305
|
| Usage | Estimated monthly cost |
|
|
238
306
|
|-------|----------------------|
|
|
@@ -240,28 +308,29 @@ Extraction runs on **Claude Haiku 4.5** with prompt caching and input truncation
|
|
|
240
308
|
| 100 captures/month | ~$0.30 |
|
|
241
309
|
| 200 captures/month | ~$0.60 |
|
|
242
310
|
|
|
243
|
-
|
|
311
|
+
Briefing and plan generation use your configured model and only run when you explicitly invoke them.
|
|
244
312
|
|
|
245
313
|
|
|
246
314
|
## Tech stack
|
|
247
315
|
|
|
248
|
-
Next.js · TypeScript ·
|
|
316
|
+
Next.js · TypeScript · Vercel Postgres · GitHub OAuth · GitHub Content API · MCP protocol · Anthropic SDK · Tailwind CSS · Vitest
|
|
317
|
+
|
|
249
318
|
|
|
250
319
|
## Roadmap
|
|
251
320
|
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
321
|
+
- **`mnemos kos`** — CLI orchestrator: creates isolated git worktree, launches your configured AI assistant with the plan as its contract, runs the Verification Checklist, reports the branch
|
|
322
|
+
- **Provider abstraction** — bring your OpenAI, Google, or any OpenAI-compatible key; Mnemos routes accordingly
|
|
323
|
+
- **Chrome extension** — one-click capture from anywhere in the browser
|
|
255
324
|
- Voice memo capture
|
|
256
325
|
|
|
257
326
|
|
|
258
327
|
## Built by
|
|
259
328
|
|
|
260
|
-
[Sofía Padrón Valdez](https://github.com/Soph20) — builder, AI systems architect.
|
|
329
|
+
[Sofía Padrón Valdez](https://github.com/Soph20) — builder, AI systems architect.
|
|
330
|
+
|
|
261
331
|
|
|
262
332
|
## Citation
|
|
263
333
|
|
|
264
|
-
If you use this repository in your agentic workflows, please consider citing as follows:
|
|
265
334
|
```
|
|
266
335
|
@misc{2026mnemos,
|
|
267
336
|
title = {Mnemos: A Knowledge Pipeline for AI Agents},
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
|
2
|
+
import { mkdtempSync, rmSync, readFileSync, existsSync } from "fs";
|
|
3
|
+
import { tmpdir } from "os";
|
|
4
|
+
import { join } from "path";
|
|
5
|
+
describe("config", () => {
|
|
6
|
+
let tmpDir;
|
|
7
|
+
let configPath;
|
|
8
|
+
let origHome;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
tmpDir = mkdtempSync(join(tmpdir(), "mnemos-config-test-"));
|
|
11
|
+
configPath = join(tmpDir, ".mnemos", "config.json");
|
|
12
|
+
origHome = process.env["HOME"];
|
|
13
|
+
process.env["HOME"] = tmpDir;
|
|
14
|
+
// Module-level CONFIG_DIR is computed from homedir() at import — reset cache
|
|
15
|
+
vi.resetModules();
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
rmSync(tmpDir, { recursive: true, force: true });
|
|
19
|
+
process.env["HOME"] = origHome;
|
|
20
|
+
});
|
|
21
|
+
it("returns an empty object when no config exists", async () => {
|
|
22
|
+
const { readConfig } = await import("../config.js");
|
|
23
|
+
expect(readConfig()).toEqual({});
|
|
24
|
+
});
|
|
25
|
+
it("writes and reads back the agent field", async () => {
|
|
26
|
+
const { setConfigField, readConfig } = await import("../config.js");
|
|
27
|
+
setConfigField("agent", "claude -p");
|
|
28
|
+
expect(readConfig().agent).toBe("claude -p");
|
|
29
|
+
expect(existsSync(configPath)).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
it("persists the agent command verbatim, including flags", async () => {
|
|
32
|
+
const { setConfigField } = await import("../config.js");
|
|
33
|
+
setConfigField("agent", "aider --yes --message");
|
|
34
|
+
const saved = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
35
|
+
expect(saved.agent).toBe("aider --yes --message");
|
|
36
|
+
});
|
|
37
|
+
it("preserves other fields when updating one", async () => {
|
|
38
|
+
const { setConfigField, readConfig } = await import("../config.js");
|
|
39
|
+
setConfigField("key", "mnemos_abc123");
|
|
40
|
+
setConfigField("agent", "codex exec");
|
|
41
|
+
const cfg = readConfig();
|
|
42
|
+
expect(cfg.key).toBe("mnemos_abc123");
|
|
43
|
+
expect(cfg.agent).toBe("codex exec");
|
|
44
|
+
});
|
|
45
|
+
it("throws on an unknown config field", async () => {
|
|
46
|
+
const { setConfigField } = await import("../config.js");
|
|
47
|
+
expect(() => setConfigField("provider", "openai")).toThrow(/Unknown config field/);
|
|
48
|
+
});
|
|
49
|
+
});
|