@bubstack/moe-memory 0.1.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/.mcp.json +18 -0
- package/README.md +47 -0
- package/agents/search-conversations.md +171 -0
- package/dist/LICENSE +25 -0
- package/dist/cli.d.ts +25 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +125 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-hook-trust.d.ts +4 -0
- package/dist/codex-hook-trust.d.ts.map +1 -0
- package/dist/codex-hook-trust.js +114 -0
- package/dist/codex-hook-trust.js.map +1 -0
- package/dist/codex-support.d.ts +6 -0
- package/dist/codex-support.d.ts.map +1 -0
- package/dist/codex-support.js +29 -0
- package/dist/codex-support.js.map +1 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +14 -0
- package/dist/constants.js.map +1 -0
- package/dist/db.d.ts +103 -0
- package/dist/db.d.ts.map +1 -0
- package/dist/db.js +430 -0
- package/dist/db.js.map +1 -0
- package/dist/doctor-cli.d.ts +3 -0
- package/dist/doctor-cli.d.ts.map +1 -0
- package/dist/doctor-cli.js +43 -0
- package/dist/doctor-cli.js.map +1 -0
- package/dist/doctor.d.ts +17 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +98 -0
- package/dist/doctor.js.map +1 -0
- package/dist/embedding-migration.d.ts +73 -0
- package/dist/embedding-migration.d.ts.map +1 -0
- package/dist/embedding-migration.js +120 -0
- package/dist/embedding-migration.js.map +1 -0
- package/dist/embeddings.d.ts +78 -0
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/embeddings.js +180 -0
- package/dist/embeddings.js.map +1 -0
- package/dist/file-lock.d.ts +39 -0
- package/dist/file-lock.d.ts.map +1 -0
- package/dist/file-lock.js +91 -0
- package/dist/file-lock.js.map +1 -0
- package/dist/index-cli.d.ts +10 -0
- package/dist/index-cli.d.ts.map +1 -0
- package/dist/index-cli.js +195 -0
- package/dist/index-cli.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/indexer.d.ts +4 -0
- package/dist/indexer.d.ts.map +1 -0
- package/dist/indexer.js +318 -0
- package/dist/indexer.js.map +1 -0
- package/dist/install-check.d.ts +48 -0
- package/dist/install-check.d.ts.map +1 -0
- package/dist/install-check.js +82 -0
- package/dist/install-check.js.map +1 -0
- package/dist/journal/index.d.ts +5 -0
- package/dist/journal/index.d.ts.map +1 -0
- package/dist/journal/index.js +5 -0
- package/dist/journal/index.js.map +1 -0
- package/dist/journal/legacy-sidecars.d.ts +74 -0
- package/dist/journal/legacy-sidecars.d.ts.map +1 -0
- package/dist/journal/legacy-sidecars.js +151 -0
- package/dist/journal/legacy-sidecars.js.map +1 -0
- package/dist/journal/markdown.d.ts +91 -0
- package/dist/journal/markdown.d.ts.map +1 -0
- package/dist/journal/markdown.js +234 -0
- package/dist/journal/markdown.js.map +1 -0
- package/dist/journal/search.d.ts +91 -0
- package/dist/journal/search.d.ts.map +1 -0
- package/dist/journal/search.js +203 -0
- package/dist/journal/search.js.map +1 -0
- package/dist/journal/store.d.ts +96 -0
- package/dist/journal/store.d.ts.map +1 -0
- package/dist/journal/store.js +270 -0
- package/dist/journal/store.js.map +1 -0
- package/dist/journal-cli.d.ts +19 -0
- package/dist/journal-cli.d.ts.map +1 -0
- package/dist/journal-cli.js +153 -0
- package/dist/journal-cli.js.map +1 -0
- package/dist/logging.d.ts +6 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +20 -0
- package/dist/logging.js.map +1 -0
- package/dist/mcp-server.d.ts +34 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +607 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/parser.d.ts +11 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +445 -0
- package/dist/parser.js.map +1 -0
- package/dist/paths.d.ts +103 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +258 -0
- package/dist/paths.js.map +1 -0
- package/dist/search-cli.d.ts +3 -0
- package/dist/search-cli.d.ts.map +1 -0
- package/dist/search-cli.js +138 -0
- package/dist/search-cli.js.map +1 -0
- package/dist/search.d.ts +36 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +371 -0
- package/dist/search.js.map +1 -0
- package/dist/show-cli.d.ts +3 -0
- package/dist/show-cli.d.ts.map +1 -0
- package/dist/show-cli.js +60 -0
- package/dist/show-cli.js.map +1 -0
- package/dist/show.d.ts +3 -0
- package/dist/show.d.ts.map +1 -0
- package/dist/show.js +984 -0
- package/dist/show.js.map +1 -0
- package/dist/stats-cli.d.ts +3 -0
- package/dist/stats-cli.d.ts.map +1 -0
- package/dist/stats-cli.js +51 -0
- package/dist/stats-cli.js.map +1 -0
- package/dist/stats.d.ts +19 -0
- package/dist/stats.d.ts.map +1 -0
- package/dist/stats.js +116 -0
- package/dist/stats.js.map +1 -0
- package/dist/summarizer.d.ts +83 -0
- package/dist/summarizer.d.ts.map +1 -0
- package/dist/summarizer.js +526 -0
- package/dist/summarizer.js.map +1 -0
- package/dist/summary-sentinel.d.ts +31 -0
- package/dist/summary-sentinel.d.ts.map +1 -0
- package/dist/summary-sentinel.js +80 -0
- package/dist/summary-sentinel.js.map +1 -0
- package/dist/sync-cli.d.ts +15 -0
- package/dist/sync-cli.d.ts.map +1 -0
- package/dist/sync-cli.js +202 -0
- package/dist/sync-cli.js.map +1 -0
- package/dist/sync.d.ts +35 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +204 -0
- package/dist/sync.js.map +1 -0
- package/dist/types.d.ts +125 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/dist/verify.d.ts +30 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +174 -0
- package/dist/verify.js.map +1 -0
- package/dist/version.d.ts +13 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +13 -0
- package/dist/version.js.map +1 -0
- package/hooks/hooks.json +15 -0
- package/package.json +71 -0
- package/prompts/search-agent.md +160 -0
- package/skills/remembering-conversations/MCP-TOOLS.md +147 -0
- package/skills/remembering-conversations/SKILL.md +97 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Moe Memory MCP Tools Reference
|
|
2
|
+
|
|
3
|
+
The moe-memory plugin exposes seven MCP tools over two record types. This file
|
|
4
|
+
documents the two **conversation** tools — harvested Claude Code and Codex
|
|
5
|
+
transcripts.
|
|
6
|
+
|
|
7
|
+
The five **journal** tools cover what you deliberately wrote down:
|
|
8
|
+
`process_thoughts`, `search_journal`, `read_journal_entry`,
|
|
9
|
+
`list_recent_entries` and `read_recent_entries`. They are self-describing at
|
|
10
|
+
`tools/list`; the one thing worth knowing is that `search_journal`'s `sections`
|
|
11
|
+
filter takes the same snake_case names as `process_thoughts`
|
|
12
|
+
(`project_notes`, `technical_insights`, …), and `type` selects the project
|
|
13
|
+
journal, the user journal, or both.
|
|
14
|
+
|
|
15
|
+
## search_conversations
|
|
16
|
+
|
|
17
|
+
Search your Moe Memory of past Claude Code and Codex conversations using semantic or text search.
|
|
18
|
+
|
|
19
|
+
**Tool name:** `mcp__plugin_moe-memory_moe-memory__search_conversations`
|
|
20
|
+
|
|
21
|
+
### Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type | Required | Description |
|
|
24
|
+
|-----------|------|----------|-------------|
|
|
25
|
+
| `query` | `string` or `string[]` | Yes | Search query. String for single-concept search, array of 2-5 strings for multi-concept AND search |
|
|
26
|
+
| `mode` | `"vector"` \| `"text"` \| `"both"` | No | Search mode (default: `"both"`). Only used for single-concept searches |
|
|
27
|
+
| `limit` | `number` | No | Maximum results to return, 1-50 (default: 10) |
|
|
28
|
+
| `after` | `string` | No | Only return conversations after this date (YYYY-MM-DD) |
|
|
29
|
+
| `before` | `string` | No | Only return conversations before this date (YYYY-MM-DD) |
|
|
30
|
+
| `response_format` | `"markdown"` \| `"json"` | No | Output format (default: `"markdown"`) |
|
|
31
|
+
|
|
32
|
+
### Search Modes
|
|
33
|
+
|
|
34
|
+
- **`vector`** - Semantic similarity search using embeddings
|
|
35
|
+
- **`text`** - Exact text matching (case-insensitive)
|
|
36
|
+
- **`both`** - Combined semantic + text search (default, recommended)
|
|
37
|
+
|
|
38
|
+
### Single-Concept Search
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
{
|
|
42
|
+
query: "React Router authentication errors",
|
|
43
|
+
mode: "both",
|
|
44
|
+
limit: 10
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Multi-Concept Search (AND)
|
|
49
|
+
|
|
50
|
+
Search for conversations containing ALL concepts:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
{
|
|
54
|
+
query: ["authentication", "React Router", "error handling"],
|
|
55
|
+
limit: 10
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Note: `mode` is ignored for multi-concept searches (always uses vector similarity).
|
|
60
|
+
|
|
61
|
+
### Date Filtering
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
{
|
|
65
|
+
query: "refactoring patterns",
|
|
66
|
+
after: "2025-09-01",
|
|
67
|
+
before: "2025-10-01"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Response Format
|
|
72
|
+
|
|
73
|
+
#### Markdown (default)
|
|
74
|
+
|
|
75
|
+
Human-readable format with:
|
|
76
|
+
- Project name and date
|
|
77
|
+
- Conversation summary
|
|
78
|
+
- Matched exchange snippet
|
|
79
|
+
- Similarity score
|
|
80
|
+
- File path and line numbers
|
|
81
|
+
|
|
82
|
+
#### JSON
|
|
83
|
+
|
|
84
|
+
Machine-readable format:
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"results": [...],
|
|
88
|
+
"count": 5,
|
|
89
|
+
"mode": "both"
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## read_conversation
|
|
94
|
+
|
|
95
|
+
Display a full conversation from Moe Memory as markdown.
|
|
96
|
+
|
|
97
|
+
**Tool name:** `mcp__plugin_moe-memory_moe-memory__read_conversation`
|
|
98
|
+
|
|
99
|
+
### Parameters
|
|
100
|
+
|
|
101
|
+
| Parameter | Type | Required | Description |
|
|
102
|
+
|-----------|------|----------|-------------|
|
|
103
|
+
| `path` | `string` | Yes | Absolute path to the JSONL conversation file |
|
|
104
|
+
| `startLine` | `number` | No | Starting line number (1-indexed, inclusive) |
|
|
105
|
+
| `endLine` | `number` | No | Ending line number (1-indexed, inclusive) |
|
|
106
|
+
|
|
107
|
+
### Usage
|
|
108
|
+
|
|
109
|
+
**Read entire conversation:**
|
|
110
|
+
```typescript
|
|
111
|
+
{
|
|
112
|
+
path: "/Users/name/.config/moe/memory/conversation-archive/project/uuid.jsonl"
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Read specific range:**
|
|
117
|
+
```typescript
|
|
118
|
+
{
|
|
119
|
+
path: "/Users/name/.config/moe/memory/conversation-archive/project/uuid.jsonl",
|
|
120
|
+
startLine: 100,
|
|
121
|
+
endLine: 200
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Response Format
|
|
126
|
+
|
|
127
|
+
Markdown-formatted conversation with:
|
|
128
|
+
- Message roles (user/assistant)
|
|
129
|
+
- Content (including tool uses and results)
|
|
130
|
+
- Line numbers for reference
|
|
131
|
+
|
|
132
|
+
## Error Handling
|
|
133
|
+
|
|
134
|
+
Both tools return errors as text content with `isError: true`:
|
|
135
|
+
- Invalid parameters (validation errors)
|
|
136
|
+
- File not found
|
|
137
|
+
- Date parsing errors
|
|
138
|
+
- Search failures
|
|
139
|
+
|
|
140
|
+
## Performance Notes
|
|
141
|
+
|
|
142
|
+
- **search_conversations** is fast (< 100ms typically)
|
|
143
|
+
- **read_conversation** can be slow for large conversations
|
|
144
|
+
- Use `startLine`/`endLine` to paginate
|
|
145
|
+
- Conversations can be 1000+ lines
|
|
146
|
+
- Vector search uses sqlite-vec with cached embeddings
|
|
147
|
+
- Text search is a bound-parameter SQL `LIKE`, not FTS5 — the upstream note claiming FTS5 was wrong
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remembering-conversations
|
|
3
|
+
description: You MUST invoke this skill before saying "I don't know," guessing, or treating any topic as new, no matter how trivial the question seems. It supplements other memory systems, which only hold partial records. Searching past conversations is the only way to recover what was actually said.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Remembering Conversations
|
|
7
|
+
|
|
8
|
+
**Core principle:** Search before reinventing. Searching costs nothing; reinventing or repeating mistakes costs everything.
|
|
9
|
+
|
|
10
|
+
## Mandatory: Search Historical Memory
|
|
11
|
+
|
|
12
|
+
**YOU MUST search historical memory for any historical search.**
|
|
13
|
+
|
|
14
|
+
Announce: "Searching past conversations for [topic]."
|
|
15
|
+
|
|
16
|
+
### Claude Code
|
|
17
|
+
|
|
18
|
+
Use the Task tool with `subagent_type: "search-conversations"`:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Task tool:
|
|
22
|
+
description: "Search past conversations for [topic]"
|
|
23
|
+
prompt: "Search for [specific query or topic]. Focus on [what you're looking for - e.g., decisions, patterns, gotchas, code examples]."
|
|
24
|
+
subagent_type: "search-conversations"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Codex
|
|
28
|
+
|
|
29
|
+
If a `search-conversations` agent is available, dispatch it with the same prompt. If not, use the MCP tools directly:
|
|
30
|
+
|
|
31
|
+
1. Search with the `search_conversations` tool
|
|
32
|
+
2. Read the top 2-5 results with the `read_conversation` tool
|
|
33
|
+
3. Synthesize findings in your response
|
|
34
|
+
4. Include source pointers so the user can inspect the original conversations
|
|
35
|
+
|
|
36
|
+
The search workflow will:
|
|
37
|
+
1. Search with the `search_conversations` tool
|
|
38
|
+
2. Read top 2-5 results with the `read_conversation` tool
|
|
39
|
+
3. Synthesize findings (200-1000 words)
|
|
40
|
+
4. Return actionable insights + sources
|
|
41
|
+
|
|
42
|
+
**Saves 50-100x context vs. loading raw conversations.**
|
|
43
|
+
|
|
44
|
+
## When to Use
|
|
45
|
+
|
|
46
|
+
Use this whenever the current task would benefit from information you may have learned before, even if the user did not explicitly ask you to search.
|
|
47
|
+
|
|
48
|
+
**When past experience may help:**
|
|
49
|
+
- You need to recall decisions, rationale, patterns, solutions, pitfalls, or project context from earlier work
|
|
50
|
+
- A task resembles something you've solved, debugged, reviewed, released, or planned before
|
|
51
|
+
- You need to repeat a workflow or process that may have prior gotchas or established steps
|
|
52
|
+
|
|
53
|
+
**When you're stuck:**
|
|
54
|
+
- You've investigated a problem and can't find the solution
|
|
55
|
+
- Facing a complex problem without obvious solution in current code
|
|
56
|
+
- Need to follow an unfamiliar workflow or process
|
|
57
|
+
|
|
58
|
+
**When historical signals are present:**
|
|
59
|
+
- User says "last time", "before", "we discussed", "you implemented"
|
|
60
|
+
- User asks "why did we...", "what was the reason..."
|
|
61
|
+
- User says "do you remember...", "what do we know about..."
|
|
62
|
+
|
|
63
|
+
**Before answering from uncertainty:**
|
|
64
|
+
- Before guessing from memory or saying "I don't know" about something that may have been learned in a past conversation, search memory unless the current conversation already answers it
|
|
65
|
+
|
|
66
|
+
**Don't search first:**
|
|
67
|
+
- For current codebase structure (use Grep/Read to explore first)
|
|
68
|
+
- For info in current conversation
|
|
69
|
+
- Before understanding what you're being asked to do
|
|
70
|
+
|
|
71
|
+
## Direct MCP Tool Access
|
|
72
|
+
|
|
73
|
+
Use these directly when a search agent is unavailable or the current harness does not support agent dispatch:
|
|
74
|
+
- `mcp__plugin_moe-memory_moe-memory__search_conversations`
|
|
75
|
+
- `mcp__plugin_moe-memory_moe-memory__read_conversation`
|
|
76
|
+
|
|
77
|
+
When using MCP tools directly, keep context small: search first, then read only the top 2-5 relevant conversations or line ranges.
|
|
78
|
+
|
|
79
|
+
See MCP-TOOLS.md for complete API reference if needed for advanced usage.
|
|
80
|
+
|
|
81
|
+
## Two Kinds of Memory
|
|
82
|
+
|
|
83
|
+
`search_conversations` searches transcripts that were **harvested** — nobody chose
|
|
84
|
+
to write them down, so they are complete but unfiltered.
|
|
85
|
+
|
|
86
|
+
The same server also exposes a **journal**: things you deliberately wrote down,
|
|
87
|
+
which are shorter, already synthesised, and often the faster answer.
|
|
88
|
+
|
|
89
|
+
- `search_journal` — semantic search over journal entries
|
|
90
|
+
- `read_journal_entry` / `list_recent_entries` / `read_recent_entries`
|
|
91
|
+
- `process_thoughts` — write one
|
|
92
|
+
|
|
93
|
+
Reach for `search_journal` first when the question is about a *conclusion* you
|
|
94
|
+
reached before ("what did I decide about X", "what have I learned about how this
|
|
95
|
+
person works"), and `search_conversations` when you need the *episode*: the
|
|
96
|
+
rationale, the alternatives, the gotchas, the code. They are separately queryable
|
|
97
|
+
on purpose.
|