@memtensor/memos-local-openclaw-plugin 0.1.4 → 0.1.6
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 +196 -84
- package/dist/ingest/dedup.d.ts +8 -0
- package/dist/ingest/dedup.d.ts.map +1 -1
- package/dist/ingest/dedup.js +21 -0
- package/dist/ingest/dedup.js.map +1 -1
- package/dist/ingest/providers/anthropic.d.ts +14 -0
- package/dist/ingest/providers/anthropic.d.ts.map +1 -1
- package/dist/ingest/providers/anthropic.js +104 -0
- package/dist/ingest/providers/anthropic.js.map +1 -1
- package/dist/ingest/providers/bedrock.d.ts +14 -0
- package/dist/ingest/providers/bedrock.d.ts.map +1 -1
- package/dist/ingest/providers/bedrock.js +100 -0
- package/dist/ingest/providers/bedrock.js.map +1 -1
- package/dist/ingest/providers/gemini.d.ts +14 -0
- package/dist/ingest/providers/gemini.d.ts.map +1 -1
- package/dist/ingest/providers/gemini.js +96 -0
- package/dist/ingest/providers/gemini.js.map +1 -1
- package/dist/ingest/providers/index.d.ts +22 -0
- package/dist/ingest/providers/index.d.ts.map +1 -1
- package/dist/ingest/providers/index.js +68 -0
- package/dist/ingest/providers/index.js.map +1 -1
- package/dist/ingest/providers/openai.d.ts +22 -0
- package/dist/ingest/providers/openai.d.ts.map +1 -1
- package/dist/ingest/providers/openai.js +143 -0
- package/dist/ingest/providers/openai.js.map +1 -1
- package/dist/ingest/task-processor.d.ts +2 -0
- package/dist/ingest/task-processor.d.ts.map +1 -1
- package/dist/ingest/task-processor.js +15 -0
- package/dist/ingest/task-processor.js.map +1 -1
- package/dist/ingest/worker.d.ts +2 -0
- package/dist/ingest/worker.d.ts.map +1 -1
- package/dist/ingest/worker.js +115 -12
- package/dist/ingest/worker.js.map +1 -1
- package/dist/recall/engine.d.ts.map +1 -1
- package/dist/recall/engine.js +1 -0
- package/dist/recall/engine.js.map +1 -1
- package/dist/skill/bundled-memory-guide.d.ts +6 -0
- package/dist/skill/bundled-memory-guide.d.ts.map +1 -0
- package/dist/skill/bundled-memory-guide.js +95 -0
- package/dist/skill/bundled-memory-guide.js.map +1 -0
- package/dist/skill/evaluator.d.ts +31 -0
- package/dist/skill/evaluator.d.ts.map +1 -0
- package/dist/skill/evaluator.js +194 -0
- package/dist/skill/evaluator.js.map +1 -0
- package/dist/skill/evolver.d.ts +22 -0
- package/dist/skill/evolver.d.ts.map +1 -0
- package/dist/skill/evolver.js +193 -0
- package/dist/skill/evolver.js.map +1 -0
- package/dist/skill/generator.d.ts +25 -0
- package/dist/skill/generator.d.ts.map +1 -0
- package/dist/skill/generator.js +477 -0
- package/dist/skill/generator.js.map +1 -0
- package/dist/skill/installer.d.ts +16 -0
- package/dist/skill/installer.d.ts.map +1 -0
- package/dist/skill/installer.js +89 -0
- package/dist/skill/installer.js.map +1 -0
- package/dist/skill/upgrader.d.ts +19 -0
- package/dist/skill/upgrader.d.ts.map +1 -0
- package/dist/skill/upgrader.js +263 -0
- package/dist/skill/upgrader.js.map +1 -0
- package/dist/skill/validator.d.ts +29 -0
- package/dist/skill/validator.d.ts.map +1 -0
- package/dist/skill/validator.js +227 -0
- package/dist/skill/validator.js.map +1 -0
- package/dist/storage/sqlite.d.ts +75 -1
- package/dist/storage/sqlite.d.ts.map +1 -1
- package/dist/storage/sqlite.js +417 -6
- package/dist/storage/sqlite.js.map +1 -1
- package/dist/types.d.ts +78 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -1
- package/dist/viewer/html.d.ts +1 -1
- package/dist/viewer/html.d.ts.map +1 -1
- package/dist/viewer/html.js +1549 -113
- package/dist/viewer/html.js.map +1 -1
- package/dist/viewer/server.d.ts +13 -0
- package/dist/viewer/server.d.ts.map +1 -1
- package/dist/viewer/server.js +289 -4
- package/dist/viewer/server.js.map +1 -1
- package/index.ts +489 -181
- package/package.json +1 -1
- package/skill/memos-memory-guide/SKILL.md +86 -0
- package/src/ingest/dedup.ts +29 -0
- package/src/ingest/providers/anthropic.ts +130 -0
- package/src/ingest/providers/bedrock.ts +126 -0
- package/src/ingest/providers/gemini.ts +124 -0
- package/src/ingest/providers/index.ts +86 -4
- package/src/ingest/providers/openai.ts +174 -0
- package/src/ingest/task-processor.ts +16 -0
- package/src/ingest/worker.ts +126 -21
- package/src/recall/engine.ts +1 -0
- package/src/skill/bundled-memory-guide.ts +91 -0
- package/src/skill/evaluator.ts +220 -0
- package/src/skill/evolver.ts +169 -0
- package/src/skill/generator.ts +506 -0
- package/src/skill/installer.ts +59 -0
- package/src/skill/upgrader.ts +257 -0
- package/src/skill/validator.ts +227 -0
- package/src/storage/sqlite.ts +508 -6
- package/src/types.ts +77 -0
- package/src/viewer/html.ts +1549 -113
- package/src/viewer/server.ts +285 -4
- package/skill/SKILL.md +0 -59
package/README.md
CHANGED
|
@@ -1,23 +1,62 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 🧠 MemOS Local — OpenClaw Memory Plugin
|
|
2
2
|
|
|
3
|
-
Persistent local conversation memory for [OpenClaw](https://github.com/nicepkg/openclaw) AI Agents. Every conversation is automatically captured, semantically indexed, and instantly recallable
|
|
3
|
+
Persistent local conversation memory for [OpenClaw](https://github.com/nicepkg/openclaw) AI Agents. Every conversation is automatically captured, semantically indexed, and instantly recallable — with **smart task summarization** and **automatic skill evolution**.
|
|
4
4
|
|
|
5
|
-
**Full-write | Hybrid Search
|
|
5
|
+
**Full-write | Hybrid Search | Task Summarization | Skill Evolution | Memory Viewer**
|
|
6
|
+
|
|
7
|
+
## Why MemOS Local
|
|
8
|
+
|
|
9
|
+
| Problem | Solution |
|
|
10
|
+
|---------|----------|
|
|
11
|
+
| Agent forgets everything between sessions | **Persistent memory** — every conversation auto-captured to local SQLite |
|
|
12
|
+
| Fragmented memory chunks lack context | **Smart task summarization** — conversations organized into structured tasks with goals, steps, results |
|
|
13
|
+
| Agent repeats past mistakes on similar tasks | **Skill evolution** — reusable skills auto-generated from real executions, continuously upgraded |
|
|
14
|
+
| No visibility into what the agent remembers | **Memory Viewer** — full visualization of all memories, tasks, and skills |
|
|
15
|
+
| Privacy concerns with cloud storage | **100% local** — zero cloud uploads, zero telemetry, password-protected |
|
|
6
16
|
|
|
7
17
|
## Features
|
|
8
18
|
|
|
9
|
-
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
19
|
+
### Memory Engine
|
|
20
|
+
- **Auto-capture** — Stores user, assistant, and tool messages after each agent turn via `agent_end` event (consecutive assistant messages merged into one)
|
|
21
|
+
- **Smart deduplication** — Exact content-hash skip; then Top-5 similar chunks (threshold 0.75) with LLM judge: DUPLICATE (skip), UPDATE (merge summary + append content), or NEW (create). Evolved chunks track merge history.
|
|
22
|
+
- **Semantic chunking** — Splits by code blocks, function bodies, paragraphs; never cuts mid-function
|
|
13
23
|
- **Hybrid retrieval** — FTS5 keyword + vector semantic dual-channel search with RRF fusion
|
|
14
|
-
- **
|
|
24
|
+
- **MMR diversity** — Maximal Marginal Relevance reranking prevents near-duplicate results
|
|
25
|
+
- **Recency decay** — Configurable time-based decay (half-life: 14 days) biases recent memories
|
|
15
26
|
- **Multi-provider embedding** — OpenAI-compatible, Gemini, Cohere, Voyage, Mistral, or local offline (Xenova/all-MiniLM-L6-v2)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
27
|
+
|
|
28
|
+
### Task Summarization
|
|
29
|
+
- **Auto task boundary detection** — LLM topic judgment + 2-hour idle timeout segments conversations into tasks
|
|
30
|
+
- **Structured summaries** — LLM generates Goal, Key Steps, Result, Key Details for each completed task
|
|
31
|
+
- **Key detail preservation** — Code, commands, URLs, file paths, error messages retained in summaries
|
|
32
|
+
- **Quality filtering** — Tasks with too few chunks, too few turns, or trivial content are auto-skipped
|
|
33
|
+
- **Task status** — `active` (in progress), `completed` (with LLM summary), `skipped` (too brief, excluded from search)
|
|
34
|
+
|
|
35
|
+
### Skill Evolution
|
|
36
|
+
- **Automatic evaluation** — After task completion, rule filter + LLM evaluates if the task is worth distilling into a skill
|
|
37
|
+
- **Skill generation** — Multi-step LLM pipeline creates SKILL.md + scripts + references + evals from real execution records
|
|
38
|
+
- **Skill upgrading** — When similar tasks appear, existing skills are auto-upgraded (refine / extend / fix)
|
|
39
|
+
- **Quality scoring** — 0-10 quality assessment; scores below 6 marked as draft
|
|
40
|
+
- **Version management** — Full version history with changelog, change summary, and upgrade type tracking
|
|
41
|
+
- **Auto-install** — Generated skills can be auto-installed into the workspace for immediate use
|
|
42
|
+
- **Dedicated model** — Optional separate LLM model for skill generation (e.g., Claude 4.6 for higher quality)
|
|
43
|
+
|
|
44
|
+
### Memory Viewer
|
|
45
|
+
- **6 management pages** — Memories, Tasks, Skills, Analytics, **Logs**, Settings
|
|
46
|
+
- **Full CRUD** — Create, edit, delete, search memories; evolution badges and merge history on memory cards
|
|
47
|
+
- **Task browser** — Status filters, chat-bubble chunk view, structured summaries, skill generation status
|
|
48
|
+
- **Skill browser** — Version history, quality scores, one-click download as ZIP
|
|
49
|
+
- **Analytics dashboard** — Daily read/write activity, memory breakdown charts
|
|
50
|
+
- **Logs** — Tool call log (memory_search, auto_recall, memory_add, etc.) with input/output and duration; filter by tool, auto-refresh
|
|
51
|
+
- **Online configuration** — Modify embedding, summarizer, skill evolution settings via web UI
|
|
52
|
+
- **Security** — Password-protected, localhost-only (127.0.0.1), session cookies
|
|
53
|
+
- **i18n** — Chinese / English toggle
|
|
54
|
+
- **Themes** — Light / Dark mode
|
|
55
|
+
|
|
56
|
+
### Privacy & Security
|
|
57
|
+
- **100% on-device** — All data in local SQLite, no cloud uploads, no telemetry
|
|
58
|
+
- **Viewer security** — Binds to 127.0.0.1 only, password-protected with session cookies
|
|
59
|
+
- **Auto-recall + Skill** — Each turn, relevant memories are injected via `before_agent_start` hook (invisible to user). When nothing is recalled (e.g. long or unclear query), the agent is prompted to call `memory_search` with a self-generated short query. The bundled skill `memos-memory-guide` documents all tools and when to use them.
|
|
21
60
|
|
|
22
61
|
## Quick Start
|
|
23
62
|
|
|
@@ -110,6 +149,30 @@ Add the plugin config to `~/.openclaw/openclaw.json`:
|
|
|
110
149
|
|
|
111
150
|
> **No summarizer config?** A rule-based fallback generates summaries from the first sentence + key entities. Good enough to start.
|
|
112
151
|
|
|
152
|
+
#### Skill Evolution Configuration (Optional)
|
|
153
|
+
|
|
154
|
+
You can optionally configure a dedicated model for skill generation (for higher quality skills):
|
|
155
|
+
|
|
156
|
+
```jsonc
|
|
157
|
+
{
|
|
158
|
+
"config": {
|
|
159
|
+
"skillSummarizer": {
|
|
160
|
+
"provider": "anthropic",
|
|
161
|
+
"apiKey": "sk-ant-xxx",
|
|
162
|
+
"model": "claude-sonnet-4-20250514",
|
|
163
|
+
"temperature": 0
|
|
164
|
+
},
|
|
165
|
+
"skillEvolution": {
|
|
166
|
+
"enabled": true,
|
|
167
|
+
"autoEvaluate": true,
|
|
168
|
+
"autoInstall": false
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
If `skillSummarizer` is not configured, the plugin uses the regular `summarizer` model for skill generation.
|
|
175
|
+
|
|
113
176
|
#### Environment Variable Support
|
|
114
177
|
|
|
115
178
|
Use `${ENV_VAR}` placeholders in config to avoid hardcoding keys:
|
|
@@ -161,61 +224,127 @@ You: 你还记得我之前让你帮我处理过什么事情吗?
|
|
|
161
224
|
Agent: (calls memory_search) 是的,我们之前讨论过...
|
|
162
225
|
```
|
|
163
226
|
|
|
164
|
-
##
|
|
227
|
+
## How It Works
|
|
165
228
|
|
|
166
|
-
|
|
229
|
+
### Three Intelligent Pipelines
|
|
167
230
|
|
|
168
|
-
|
|
231
|
+
MemOS Local operates through three interconnected pipelines that form a continuous learning loop:
|
|
169
232
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
233
|
+
```
|
|
234
|
+
Conversation → Memory Write Pipeline → Task Generation Pipeline → Skill Evolution Pipeline
|
|
235
|
+
↓
|
|
236
|
+
Smart Retrieval Pipeline ← ← ← ← ← ← ← ← ←
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Pipeline 1: Memory Write (auto on every agent turn)
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
Conversation → Capture (filter roles, strip system prompts)
|
|
243
|
+
→ Semantic chunking (code blocks, paragraphs, error stacks)
|
|
244
|
+
→ Content hash dedup → LLM summarize each chunk
|
|
245
|
+
→ Vector embedding → Store (SQLite + FTS5 + Vector)
|
|
246
|
+
```
|
|
176
247
|
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
248
|
+
- System messages are skipped; tool results from the plugin's own tools are not re-stored
|
|
249
|
+
- Evidence wrapper blocks (`[STORED_MEMORY]...[/STORED_MEMORY]`) are stripped to prevent feedback loops
|
|
250
|
+
- Content hash (SHA-256, first 16 hex chars) prevents duplicate chunk ingestion within the same session+role
|
|
251
|
+
|
|
252
|
+
### Pipeline 2: Task Generation (auto after memory write)
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
New chunks → Task boundary detection (LLM topic judge / 2h idle / session change)
|
|
256
|
+
→ Boundary crossed? → Finalize previous task
|
|
257
|
+
→ Chunks ≥ 4 & turns ≥ 2? → LLM structured summary → status = "completed"
|
|
258
|
+
→ Otherwise → status = "skipped" (excluded from search)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**Why Tasks matter:**
|
|
262
|
+
- Raw memory chunks are fragmented — a single conversation about "deploying Nginx" might span 20 chunks
|
|
263
|
+
- Task summarization organizes these fragments into a structured record: Goal → Steps → Result → Key Details
|
|
264
|
+
- When the agent searches memory, it can quickly locate the complete experience via `task_summary`, not just fragments
|
|
265
|
+
- Task summaries preserve code, commands, URLs, configs, and error messages
|
|
266
|
+
|
|
267
|
+
### Pipeline 3: Skill Evolution (auto after task completion)
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
Completed task → Rule filter (min chunks, non-trivial content)
|
|
271
|
+
→ Search for related existing skills
|
|
272
|
+
→ Related skill found (confidence ≥ 0.7)?
|
|
273
|
+
→ Evaluate upgrade (refine/extend/fix) → Merge new experience → Version bump
|
|
274
|
+
→ No related skill (or confidence < 0.3)?
|
|
275
|
+
→ Evaluate create → Generate SKILL.md + scripts + evals
|
|
276
|
+
→ Quality score (0-10) → Install if score ≥ 6
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Why Skills matter:**
|
|
280
|
+
- Without skills, agents rediscover solutions every time they encounter similar problems
|
|
281
|
+
- Skills crystallize successful executions into reusable guides with steps, pitfall warnings, and verification checks
|
|
282
|
+
- Skills auto-upgrade when new tasks bring improved approaches — getting faster, more accurate, and more token-efficient
|
|
283
|
+
- The evolution is automatic: task completes → evaluate → create/upgrade → install
|
|
284
|
+
|
|
285
|
+
### Pipeline 4: Smart Retrieval
|
|
286
|
+
|
|
287
|
+
**Auto-recall (every turn):** The plugin hooks `before_agent_start`, runs a memory search with the user's message, then uses an LLM to filter which candidates are relevant and whether they are sufficient to answer. The filtered memories are injected into the agent's system context (invisible to the user). If no memories are found or the query is long/unclear, the agent is prompted to call `memory_search` with a self-generated short query.
|
|
288
|
+
|
|
289
|
+
**On-demand search (`memory_search`):**
|
|
290
|
+
```
|
|
291
|
+
Query → FTS5 + Vector dual recall → RRF Fusion → MMR Rerank
|
|
292
|
+
→ Recency Decay → Score Filter → Top-K (e.g. 20)
|
|
293
|
+
→ LLM relevance filter (minimum information) → Dedup by excerpt overlap
|
|
294
|
+
→ Return excerpts + chunkId / task_id (no summaries)
|
|
295
|
+
→ sufficient=false → suggest task_summary(taskId), skill_get(taskId), memory_timeline(chunkId)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
- **RRF (Reciprocal Rank Fusion):** Merges FTS5 and vector search rankings into a unified score
|
|
299
|
+
- **MMR (Maximal Marginal Relevance):** Re-ranks to balance relevance with diversity
|
|
300
|
+
- **Recency Decay:** Recent memories get a boost (half-life: 14 days by default)
|
|
301
|
+
- **LLM filter:** Only memories that are genuinely useful for the query are returned; sufficiency determines whether follow-up tool tips are appended
|
|
302
|
+
|
|
303
|
+
## Retrieval Strategy
|
|
304
|
+
|
|
305
|
+
1. **Auto-recall (hook)** — On every turn, the plugin runs a memory search using the user's message and injects LLM-filtered relevant memories into the agent's context (via `before_agent_start`). The agent sees this as system context; the user does not.
|
|
306
|
+
2. **When nothing is recalled** — If the user's message is long, vague, or no matches are found, the plugin injects a short hint telling the agent to call **`memory_search`** with a **self-generated short query** (e.g. key topics or a rephrased question).
|
|
307
|
+
3. **Bundled skill** — The plugin installs `memos-memory-guide` into `~/.openclaw/workspace/skills/memos-memory-guide/` and `~/.openclaw/skills/memos-memory-guide/`. This skill documents all memory tools, when to call them, and how to write good search queries. Add `skills.load.extraDirs: ["~/.openclaw/skills"]` in `openclaw.json` if you want the skill to appear in the OpenClaw skills dashboard.
|
|
308
|
+
4. **Search results** — `memory_search` returns **excerpts** (original content snippets) and IDs (`chunkId`, `task_id`), not summaries. The agent uses `task_summary(taskId)`, `memory_timeline(chunkId)`, and `skill_get(skillId|taskId)` to drill down when needed. There is no `memory_get`; full context is obtained via `task_summary` or `memory_timeline`.
|
|
182
309
|
|
|
183
310
|
## Agent Tools
|
|
184
311
|
|
|
185
|
-
The plugin registers
|
|
312
|
+
The plugin registers **6 tools** and auto-installs the **memos-memory-guide** skill:
|
|
186
313
|
|
|
187
314
|
| Tool | Purpose | When to Use |
|
|
188
|
-
|
|
189
|
-
| `memory_search` | Search memories
|
|
190
|
-
| `
|
|
191
|
-
| `
|
|
192
|
-
| `
|
|
193
|
-
| `
|
|
315
|
+
|------|---------|-------------|
|
|
316
|
+
| `memory_search` | Search memories; returns excerpts + `chunkId` / `task_id` | When auto-recall returned nothing or you need a different query; use a short, self-generated query if the user's message was long or unclear |
|
|
317
|
+
| `task_summary` | Full structured summary of a completed task | When a hit has `task_id` and you need the full story (goal, steps, result) |
|
|
318
|
+
| `memory_timeline` | Surrounding conversation around a chunk | When you need the exact dialogue before/after a hit; pass `chunkId` from the hit |
|
|
319
|
+
| `skill_get` | Get skill content by `skillId` or `taskId` | When a hit has a linked task/skill and you want the reusable experience guide |
|
|
320
|
+
| `skill_install` | Install a skill into the agent workspace | When the skill should be permanently available for future turns |
|
|
321
|
+
| `memory_viewer` | Get the URL of the Memory Viewer web UI | When the user asks where to view or manage their memories |
|
|
322
|
+
|
|
323
|
+
There is no `memory_get`; search returns excerpts and IDs; use `task_summary` or `memory_timeline` for deeper context.
|
|
194
324
|
|
|
195
325
|
### Search Parameters
|
|
196
326
|
|
|
197
327
|
| Parameter | Default | Range | Description |
|
|
198
|
-
|
|
199
|
-
| `query` | — | — | Natural language search query |
|
|
200
|
-
| `maxResults` |
|
|
328
|
+
|-----------|---------|-------|-------------|
|
|
329
|
+
| `query` | — | — | Natural language search query (keep it short and focused) |
|
|
330
|
+
| `maxResults` | 20 | 1–20 | Maximum candidates before LLM filter |
|
|
201
331
|
| `minScore` | 0.45 | 0.35–1.0 | Minimum relevance score |
|
|
202
|
-
| `role` | — | `user` / `assistant` / `tool` | Filter by message role |
|
|
332
|
+
| `role` | — | `user` / `assistant` / `tool` | Filter by message role (e.g. `user` to find what the user said) |
|
|
203
333
|
|
|
204
334
|
## Memory Viewer
|
|
205
335
|
|
|
206
336
|
Open `http://127.0.0.1:18799` in your browser after starting the gateway.
|
|
207
337
|
|
|
208
|
-
**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- Pagination (30 per page)
|
|
338
|
+
**Pages:**
|
|
339
|
+
|
|
340
|
+
| Page | Features |
|
|
341
|
+
|------|----------|
|
|
342
|
+
| **Memories** | Timeline view, pagination, session/role/kind/date filters, CRUD, semantic search; evolution badges and merge history on cards |
|
|
343
|
+
| **Tasks** | Task list with status filters (active/completed/skipped), chat-bubble chunk view, structured summaries, skill generation status |
|
|
344
|
+
| **Skills** | Skill list with status badges, version history with changelogs, quality scores, related tasks, one-click ZIP download |
|
|
345
|
+
| **Analytics** | Daily write/read activity charts, memory/task/skill totals, role breakdown |
|
|
346
|
+
| **Logs** | Tool call log (memory_search, auto_recall, memory_add, etc.) with input/output, duration, and tool filter; auto-refresh |
|
|
347
|
+
| **Settings** | Online configuration for embedding model, summarizer model, skill evolution settings, viewer port |
|
|
219
348
|
|
|
220
349
|
**Viewer won't open?**
|
|
221
350
|
|
|
@@ -232,39 +361,6 @@ grep "password reset token:" ~/.openclaw/logs/gateway.log 2>/dev/null | tail -1
|
|
|
232
361
|
|
|
233
362
|
Copy the 32-character hex string after `password reset token:`.
|
|
234
363
|
|
|
235
|
-
## How It Works
|
|
236
|
-
|
|
237
|
-
**Write path** (automatic on every agent turn via `agent_end` event):
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
Conversation → Capture (filter roles, strip system prompts)
|
|
241
|
-
→ Content hash dedup check → Store chunk (SQLite + FTS5 + Embed)
|
|
242
|
-
→ Associate to Task → Task boundary detected?
|
|
243
|
-
→ Yes: Finalize previous task
|
|
244
|
-
→ Chunks ≥ 4 & turns ≥ 2: LLM summarize → status = "completed"
|
|
245
|
-
→ Otherwise: status = "skipped" (excluded from search)
|
|
246
|
-
→ No: Continue accumulating in current task
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
Key details:
|
|
250
|
-
- System messages are skipped; tool results from the plugin's own tools are not re-stored
|
|
251
|
-
- Evidence wrapper blocks (`[STORED_MEMORY]...[/STORED_MEMORY]`) are stripped to prevent feedback loops
|
|
252
|
-
- Content hash (SHA-256, first 16 hex chars) prevents duplicate chunk ingestion within the same session+role
|
|
253
|
-
- Task boundaries are detected by LLM topic judgment or 2-hour idle timeout
|
|
254
|
-
|
|
255
|
-
**Read path** (when agent calls `memory_search`):
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
Query → FTS5 + Vector dual recall → RRF Fusion → MMR Rerank
|
|
259
|
-
→ Recency Decay → Score Filter → Top-K Results
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Key details:
|
|
263
|
-
- **RRF (Reciprocal Rank Fusion):** Merges FTS5 and vector search rankings into a unified score
|
|
264
|
-
- **MMR (Maximal Marginal Relevance):** Re-ranks to balance relevance with diversity, preventing redundant results
|
|
265
|
-
- **Recency Decay:** Recent memories get a boost (half-life: 14 days by default)
|
|
266
|
-
- **Score Filter:** Relative threshold based on the top hit's score, preventing over-filtering with RRF's compressed score range
|
|
267
|
-
|
|
268
364
|
## Advanced Configuration
|
|
269
365
|
|
|
270
366
|
All optional — shown with defaults:
|
|
@@ -282,7 +378,16 @@ All optional — shown with defaults:
|
|
|
282
378
|
"recencyHalfLifeDays": 14 // Time decay half-life
|
|
283
379
|
},
|
|
284
380
|
"dedup": {
|
|
285
|
-
"similarityThreshold": 0.
|
|
381
|
+
"similarityThreshold": 0.75, // Cosine similarity for smart-dedup candidates (Top-5)
|
|
382
|
+
"enableSmartMerge": true, // LLM judge: DUPLICATE / UPDATE / NEW
|
|
383
|
+
"maxCandidates": 5 // Max similar chunks to send to LLM
|
|
384
|
+
},
|
|
385
|
+
"skillEvolution": {
|
|
386
|
+
"enabled": true, // Enable skill evolution
|
|
387
|
+
"autoEvaluate": true, // Auto-evaluate tasks for skill generation
|
|
388
|
+
"minChunksForEval": 6, // Min chunks for a task to be evaluated
|
|
389
|
+
"minConfidence": 0.7, // Min LLM confidence to create/upgrade skill
|
|
390
|
+
"autoInstall": false // Auto-install generated skills
|
|
286
391
|
},
|
|
287
392
|
"viewerPort": 18799 // Memory Viewer port
|
|
288
393
|
}
|
|
@@ -352,6 +457,11 @@ Then restart the gateway.
|
|
|
352
457
|
|
|
353
458
|
6. **记忆和 OpenClaw 内置记忆冲突** — 如果看到 agent 同时调用了内置的 memory 搜索和插件的 `memory_search`,说明 `agents.defaults.memorySearch.enabled` 没有设为 `false`。
|
|
354
459
|
|
|
460
|
+
7. **技能不生成** — 检查:
|
|
461
|
+
- `skillEvolution.enabled` 是否为 `true`
|
|
462
|
+
- 任务是否有足够内容(默认需要 ≥ 6 chunks)
|
|
463
|
+
- 查看日志中 `SkillEvolver` 相关输出
|
|
464
|
+
|
|
355
465
|
## Data Location
|
|
356
466
|
|
|
357
467
|
| File | Path |
|
|
@@ -360,7 +470,9 @@ Then restart the gateway.
|
|
|
360
470
|
| Viewer auth | `~/.openclaw/memos-local/viewer-auth.json` |
|
|
361
471
|
| Gateway log | `~/.openclaw/logs/gateway.log` |
|
|
362
472
|
| Plugin code | `~/.openclaw/extensions/memos-local/` |
|
|
363
|
-
|
|
|
473
|
+
| Memory-guide skill | `~/.openclaw/workspace/skills/memos-memory-guide/SKILL.md` (and `~/.openclaw/skills/memos-memory-guide/`) |
|
|
474
|
+
| Generated skills | `~/.openclaw/memos-local/skills-store/<skill-name>/` |
|
|
475
|
+
| Installed skills | `~/.openclaw/workspace/skills/<skill-name>/` |
|
|
364
476
|
|
|
365
477
|
## Testing
|
|
366
478
|
|
package/dist/ingest/dedup.d.ts
CHANGED
|
@@ -8,4 +8,12 @@ import type { Logger } from "../types";
|
|
|
8
8
|
* PRD §4.4: dedup threshold 0.92–0.95
|
|
9
9
|
*/
|
|
10
10
|
export declare function findDuplicate(store: SqliteStore, newVec: number[], threshold: number, log: Logger): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Find Top-N most similar chunks above a threshold.
|
|
13
|
+
* Used for smart dedup: retrieve candidates, then ask LLM to judge.
|
|
14
|
+
*/
|
|
15
|
+
export declare function findTopSimilar(store: SqliteStore, newVec: number[], threshold: number, topN: number, log: Logger): Array<{
|
|
16
|
+
chunkId: string;
|
|
17
|
+
score: number;
|
|
18
|
+
}>;
|
|
11
19
|
//# sourceMappingURL=dedup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dedup.d.ts","sourceRoot":"","sources":["../../src/ingest/dedup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAoBf"}
|
|
1
|
+
{"version":3,"file":"dedup.d.ts","sourceRoot":"","sources":["../../src/ingest/dedup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAoBf;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAiB3C"}
|
package/dist/ingest/dedup.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findDuplicate = findDuplicate;
|
|
4
|
+
exports.findTopSimilar = findTopSimilar;
|
|
4
5
|
const vector_1 = require("../storage/vector");
|
|
5
6
|
/**
|
|
6
7
|
* Check if a new summary embedding is a near-duplicate of any
|
|
@@ -26,4 +27,24 @@ function findDuplicate(store, newVec, threshold, log) {
|
|
|
26
27
|
}
|
|
27
28
|
return null;
|
|
28
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Find Top-N most similar chunks above a threshold.
|
|
32
|
+
* Used for smart dedup: retrieve candidates, then ask LLM to judge.
|
|
33
|
+
*/
|
|
34
|
+
function findTopSimilar(store, newVec, threshold, topN, log) {
|
|
35
|
+
const all = store.getAllEmbeddings();
|
|
36
|
+
const scored = [];
|
|
37
|
+
for (const { chunkId, vector } of all) {
|
|
38
|
+
const sim = (0, vector_1.cosineSimilarity)(newVec, vector);
|
|
39
|
+
if (sim >= threshold) {
|
|
40
|
+
scored.push({ chunkId, score: sim });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
scored.sort((a, b) => b.score - a.score);
|
|
44
|
+
const result = scored.slice(0, topN);
|
|
45
|
+
if (result.length > 0) {
|
|
46
|
+
log.debug(`findTopSimilar: found ${result.length} candidates above ${threshold} (best=${result[0].score.toFixed(4)})`);
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
29
50
|
//# sourceMappingURL=dedup.js.map
|
package/dist/ingest/dedup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dedup.js","sourceRoot":"","sources":["../../src/ingest/dedup.ts"],"names":[],"mappings":";;AAWA,sCAyBC;
|
|
1
|
+
{"version":3,"file":"dedup.js","sourceRoot":"","sources":["../../src/ingest/dedup.ts"],"names":[],"mappings":";;AAWA,sCAyBC;AAMD,wCAuBC;AAjED,8CAAqD;AAIrD;;;;;;GAMG;AACH,SAAgB,aAAa,CAC3B,KAAkB,EAClB,MAAgB,EAChB,SAAiB,EACjB,GAAW;IAEX,MAAM,GAAG,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAErC,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAK,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,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CAAC,MAAM,qBAAqB,SAAS,UAAU,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACzH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import type { SummarizerConfig, Logger } from "../../types";
|
|
2
2
|
export declare function summarizeTaskAnthropic(text: string, cfg: SummarizerConfig, log: Logger): Promise<string>;
|
|
3
3
|
export declare function judgeNewTopicAnthropic(currentContext: string, newMessage: string, cfg: SummarizerConfig, log: Logger): Promise<boolean>;
|
|
4
|
+
import type { FilterResult } from "./openai";
|
|
5
|
+
export type { FilterResult } from "./openai";
|
|
6
|
+
export declare function filterRelevantAnthropic(query: string, candidates: Array<{
|
|
7
|
+
index: number;
|
|
8
|
+
summary: string;
|
|
9
|
+
role: string;
|
|
10
|
+
}>, cfg: SummarizerConfig, log: Logger): Promise<FilterResult>;
|
|
4
11
|
export declare function summarizeAnthropic(text: string, cfg: SummarizerConfig, log: Logger): Promise<string>;
|
|
12
|
+
import type { DedupResult } from "./openai";
|
|
13
|
+
export type { DedupResult } from "./openai";
|
|
14
|
+
export declare function judgeDedupAnthropic(newSummary: string, candidates: Array<{
|
|
15
|
+
index: number;
|
|
16
|
+
summary: string;
|
|
17
|
+
chunkId: string;
|
|
18
|
+
}>, cfg: SummarizerConfig, log: Logger): Promise<DedupResult>;
|
|
5
19
|
//# sourceMappingURL=anthropic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/ingest/providers/anthropic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAyC5D,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAA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,MAAM,UAAU,CAAC;AAE5C,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,EACtE,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,WAAW,CAAC,CAiCtB"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.summarizeTaskAnthropic = summarizeTaskAnthropic;
|
|
4
4
|
exports.judgeNewTopicAnthropic = judgeNewTopicAnthropic;
|
|
5
|
+
exports.filterRelevantAnthropic = filterRelevantAnthropic;
|
|
5
6
|
exports.summarizeAnthropic = summarizeAnthropic;
|
|
7
|
+
exports.judgeDedupAnthropic = judgeDedupAnthropic;
|
|
6
8
|
const SYSTEM_PROMPT = `Summarize the text in ONE concise sentence (max 120 characters). IMPORTANT: Use the SAME language as the input text — if the input is Chinese, write Chinese; if English, write English. Preserve exact names, commands, error codes. No bullet points, no preamble — output only the sentence.`;
|
|
7
9
|
const TASK_SUMMARY_PROMPT = `You create a DETAILED task summary from a multi-turn conversation. This summary will be the ONLY record of this conversation, so it must preserve ALL important information.
|
|
8
10
|
|
|
@@ -111,6 +113,76 @@ async function judgeNewTopicAnthropic(currentContext, newMessage, cfg, log) {
|
|
|
111
113
|
log.debug(`Topic judge result: "${answer}"`);
|
|
112
114
|
return answer.startsWith("NEW");
|
|
113
115
|
}
|
|
116
|
+
const FILTER_RELEVANT_PROMPT = `You are a memory relevance judge. Given a user's QUERY and a list of CANDIDATE memory summaries, do two things:
|
|
117
|
+
|
|
118
|
+
1. Select ALL candidates that could be useful for answering the query. When in doubt, INCLUDE the candidate.
|
|
119
|
+
- For questions about lists, history, or "what/where/who" across multiple items (e.g. "which companies did I work at"), include ALL matching items — do NOT stop at the first match.
|
|
120
|
+
- For factual lookups (e.g. "what is the SSH port"), a single direct answer is enough.
|
|
121
|
+
2. Judge whether the selected memories are SUFFICIENT to fully answer the query WITHOUT fetching additional context.
|
|
122
|
+
|
|
123
|
+
IMPORTANT for "sufficient" judgment:
|
|
124
|
+
- sufficient=true ONLY when the memories contain a concrete ANSWER, fact, decision, or actionable information that directly addresses the query.
|
|
125
|
+
- sufficient=false when:
|
|
126
|
+
- The memories only repeat the same question the user asked before (echo, not answer).
|
|
127
|
+
- The memories show related topics but lack the specific detail needed.
|
|
128
|
+
- The memories contain partial information that would benefit from full task context, timeline, or related skills.
|
|
129
|
+
|
|
130
|
+
Output a JSON object with exactly two fields:
|
|
131
|
+
{"relevant":[1,3,5],"sufficient":true}
|
|
132
|
+
|
|
133
|
+
- "relevant": array of candidate numbers that are useful. Empty array [] if none are relevant.
|
|
134
|
+
- "sufficient": true ONLY if the memories contain a direct answer; false otherwise.
|
|
135
|
+
|
|
136
|
+
Output ONLY the JSON object, nothing else.`;
|
|
137
|
+
async function filterRelevantAnthropic(query, candidates, cfg, log) {
|
|
138
|
+
const endpoint = cfg.endpoint ?? "https://api.anthropic.com/v1/messages";
|
|
139
|
+
const model = cfg.model ?? "claude-3-haiku-20240307";
|
|
140
|
+
const headers = {
|
|
141
|
+
"Content-Type": "application/json",
|
|
142
|
+
"x-api-key": cfg.apiKey ?? "",
|
|
143
|
+
"anthropic-version": "2023-06-01",
|
|
144
|
+
...cfg.headers,
|
|
145
|
+
};
|
|
146
|
+
const candidateText = candidates
|
|
147
|
+
.map((c) => `${c.index}. [${c.role}] ${c.summary}`)
|
|
148
|
+
.join("\n");
|
|
149
|
+
const resp = await fetch(endpoint, {
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers,
|
|
152
|
+
body: JSON.stringify({
|
|
153
|
+
model,
|
|
154
|
+
max_tokens: 200,
|
|
155
|
+
temperature: 0,
|
|
156
|
+
system: FILTER_RELEVANT_PROMPT,
|
|
157
|
+
messages: [{ role: "user", content: `QUERY: ${query}\n\nCANDIDATES:\n${candidateText}` }],
|
|
158
|
+
}),
|
|
159
|
+
signal: AbortSignal.timeout(cfg.timeoutMs ?? 15_000),
|
|
160
|
+
});
|
|
161
|
+
if (!resp.ok) {
|
|
162
|
+
const body = await resp.text();
|
|
163
|
+
throw new Error(`Anthropic filter-relevant failed (${resp.status}): ${body}`);
|
|
164
|
+
}
|
|
165
|
+
const json = (await resp.json());
|
|
166
|
+
const raw = json.content.find((c) => c.type === "text")?.text?.trim() ?? "{}";
|
|
167
|
+
return parseFilterResult(raw, log);
|
|
168
|
+
}
|
|
169
|
+
function parseFilterResult(raw, log) {
|
|
170
|
+
try {
|
|
171
|
+
const match = raw.match(/\{[\s\S]*\}/);
|
|
172
|
+
if (match) {
|
|
173
|
+
const obj = JSON.parse(match[0]);
|
|
174
|
+
if (obj && Array.isArray(obj.relevant)) {
|
|
175
|
+
return {
|
|
176
|
+
relevant: obj.relevant.filter((n) => typeof n === "number"),
|
|
177
|
+
sufficient: obj.sufficient === true,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
catch { }
|
|
183
|
+
log.warn(`filterRelevant: failed to parse LLM output: "${raw}", fallback to all+insufficient`);
|
|
184
|
+
return { relevant: [], sufficient: false };
|
|
185
|
+
}
|
|
114
186
|
async function summarizeAnthropic(text, cfg, log) {
|
|
115
187
|
const endpoint = cfg.endpoint ?? "https://api.anthropic.com/v1/messages";
|
|
116
188
|
const model = cfg.model ?? "claude-3-haiku-20240307";
|
|
@@ -139,4 +211,36 @@ async function summarizeAnthropic(text, cfg, log) {
|
|
|
139
211
|
const json = (await resp.json());
|
|
140
212
|
return json.content.find((c) => c.type === "text")?.text?.trim() ?? "";
|
|
141
213
|
}
|
|
214
|
+
// ─── Smart Dedup ───
|
|
215
|
+
const openai_1 = require("./openai");
|
|
216
|
+
async function judgeDedupAnthropic(newSummary, candidates, cfg, log) {
|
|
217
|
+
const endpoint = cfg.endpoint ?? "https://api.anthropic.com/v1/messages";
|
|
218
|
+
const model = cfg.model ?? "claude-3-haiku-20240307";
|
|
219
|
+
const headers = {
|
|
220
|
+
"Content-Type": "application/json",
|
|
221
|
+
"x-api-key": cfg.apiKey ?? "",
|
|
222
|
+
"anthropic-version": "2023-06-01",
|
|
223
|
+
...cfg.headers,
|
|
224
|
+
};
|
|
225
|
+
const candidateText = candidates.map((c) => `${c.index}. ${c.summary}`).join("\n");
|
|
226
|
+
const resp = await fetch(endpoint, {
|
|
227
|
+
method: "POST",
|
|
228
|
+
headers,
|
|
229
|
+
body: JSON.stringify({
|
|
230
|
+
model,
|
|
231
|
+
max_tokens: 300,
|
|
232
|
+
temperature: 0,
|
|
233
|
+
system: openai_1.DEDUP_JUDGE_PROMPT,
|
|
234
|
+
messages: [{ role: "user", content: `NEW MEMORY:\n${newSummary}\n\nEXISTING MEMORIES:\n${candidateText}` }],
|
|
235
|
+
}),
|
|
236
|
+
signal: AbortSignal.timeout(cfg.timeoutMs ?? 15_000),
|
|
237
|
+
});
|
|
238
|
+
if (!resp.ok) {
|
|
239
|
+
const body = await resp.text();
|
|
240
|
+
throw new Error(`Anthropic dedup-judge failed (${resp.status}): ${body}`);
|
|
241
|
+
}
|
|
242
|
+
const json = (await resp.json());
|
|
243
|
+
const raw = json.content.find((c) => c.type === "text")?.text?.trim() ?? "{}";
|
|
244
|
+
return (0, openai_1.parseDedupResult)(raw, log);
|
|
245
|
+
}
|
|
142
246
|
//# sourceMappingURL=anthropic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../../src/ingest/providers/anthropic.ts"],"names":[],"mappings":";;AAyCA,wDAkCC;AAeD,wDAuCC;
|
|
1
|
+
{"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../../src/ingest/providers/anthropic.ts"],"names":[],"mappings":";;AAyCA,wDAkCC;AAeD,wDAuCC;AA2BD,0DAwCC;AAmBD,gDAoCC;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ACF,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM,CAAC;KACrD,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAuD,CAAC;IACvF,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;IAC9E,OAAO,IAAA,yBAAgB,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import type { SummarizerConfig, Logger } from "../../types";
|
|
2
2
|
export declare function summarizeTaskBedrock(text: string, cfg: SummarizerConfig, log: Logger): Promise<string>;
|
|
3
3
|
export declare function judgeNewTopicBedrock(currentContext: string, newMessage: string, cfg: SummarizerConfig, log: Logger): Promise<boolean>;
|
|
4
|
+
import type { FilterResult } from "./openai";
|
|
5
|
+
export type { FilterResult } from "./openai";
|
|
6
|
+
export declare function filterRelevantBedrock(query: string, candidates: Array<{
|
|
7
|
+
index: number;
|
|
8
|
+
summary: string;
|
|
9
|
+
role: string;
|
|
10
|
+
}>, cfg: SummarizerConfig, log: Logger): Promise<FilterResult>;
|
|
4
11
|
export declare function summarizeBedrock(text: string, cfg: SummarizerConfig, log: Logger): Promise<string>;
|
|
12
|
+
import type { DedupResult } from "./openai";
|
|
13
|
+
export type { DedupResult } from "./openai";
|
|
14
|
+
export declare function judgeDedupBedrock(newSummary: string, candidates: Array<{
|
|
15
|
+
index: number;
|
|
16
|
+
summary: string;
|
|
17
|
+
chunkId: string;
|
|
18
|
+
}>, cfg: SummarizerConfig, log: Logger): Promise<DedupResult>;
|
|
5
19
|
//# sourceMappingURL=bedrock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bedrock.d.ts","sourceRoot":"","sources":["../../../src/ingest/providers/bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAyC5D,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAeD,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,OAAO,CAAC,CAmClB;
|
|
1
|
+
{"version":3,"file":"bedrock.d.ts","sourceRoot":"","sources":["../../../src/ingest/providers/bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAyC5D,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAeD,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,OAAO,CAAC,CAmClB;AAwBD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAsB,qBAAqB,CACzC,KAAK,EA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