Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .obsidian/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions .obsidian/appearance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
33 changes: 33 additions & 0 deletions .obsidian/core-plugins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"footnotes": false,
"properties": true,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": true,
"bases": true,
"webviewer": false
}
22 changes: 22 additions & 0 deletions .obsidian/graph.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 0.06067161915923469,
"close": false
}
202 changes: 202 additions & 0 deletions .obsidian/workspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"main": {
"id": "ab229761d00622cd",
"type": "split",
"children": [
{
"id": "3140dad4c75a8af9",
"type": "tabs",
"children": [
{
"id": "700f3c38cb9b6f67",
"type": "leaf",
"state": {
"type": "graph",
"state": {},
"icon": "lucide-git-fork",
"title": "Graph view"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "b3232107275126ee",
"type": "split",
"children": [
{
"id": "afa33d381c530d15",
"type": "tabs",
"children": [
{
"id": "e8cf6a39fb075cbf",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "bd0c7a5721b946e1",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "4de6063ca7fb2b84",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "0539e2920b4c4f43",
"type": "split",
"children": [
{
"id": "a3831b9ad47e7c46",
"type": "tabs",
"children": [
{
"id": "ab7a49ea443d969a",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks"
}
},
{
"id": "2cf9b8e8c7cf4246",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links"
}
},
{
"id": "669f4478bd5da643",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "75137af2d6348be6",
"type": "leaf",
"state": {
"type": "all-properties",
"state": {
"sortOrder": "frequency",
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-archive",
"title": "All properties"
}
},
{
"id": "c35a874123160ed5",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "Outline"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false,
"bases:Create new base": false
}
},
"active": "700f3c38cb9b6f67",
"lastOpenFiles": [
"dist/inject-DYUrDqQO.d.ts",
"dist/index.d.ts",
"dist/context-BUGaWpyL.d.ts",
"dist/ledger-B7g7jhqG.d.ts",
"dist/commands/inject.d.ts",
"dist/thread-B9LhXNU0.d.ts",
"dist/store-CA-6sKCJ.d.ts",
"dist/registry-BR4326o0.d.ts",
"dist/types-BbWJoC1c.d.ts",
"dist/commands/context.d.ts",
"dist/workgraph/store.d.ts",
"PLUGIN_UPGRADE_TASK.md",
"AGENTS.md",
"docs/openclaw-plugin-usage.md",
"eval/results/EVAL-HISTORY.md",
"Untitled Kanban.md",
"Untitled Kanban 1.md",
"2026-02-19.md",
"trading/grok-brain.md",
"cognition/current-focus.md"
]
}
Empty file added 2026-02-19.md
Empty file.
65 changes: 65 additions & 0 deletions PLUGIN_UPGRADE_TASK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# ClawVault Plugin Upgrade — Surpass memory-lancedb-pro

## Context
Our OpenClaw memory plugin source is in `src/plugin/`. Bundled output goes to `packages/plugin/dist/index.js`.
Competitor reference: github.com/win4r/memory-lancedb-pro — feature-rich LanceDB-based memory plugin.

## Our Advantages (keep these)
- Markdown-native vault (human-readable, git-friendly files)
- Template-driven typed primitives (person, decision, task, project, lesson, memory_event)
- Auto-linker (wiki-links between entries)
- Write-time fact extraction
- Observer/session parser for auto-capture
- qmd integration for local BM25 search
- Proven 67.6% LongMemEval score

## What to Add (in-process TypeScript, not shell-outs)

### 1. In-Process Hybrid Retrieval (PRIORITY)
Currently we shell out to qmd for BM25 and run separate semantic-rerank.mjs. Port retrieval into the plugin as proper TypeScript:
- BM25 in-process (reuse from src/lib/hybrid-search.ts)
- Semantic search via @huggingface/transformers (already in src/lib/hybrid-search.ts)
- RRF fusion (already implemented)
- Fall back to qmd only if in-process fails

### 2. Cross-Encoder Rerank (optional, API-based)
- Support Jina/SiliconFlow/Voyage/Pinecone reranker APIs
- Config: retrieval.rerankApiKey, rerankModel, rerankEndpoint, rerankProvider
- Graceful degradation: skip if no key or API fails
- 60% reranker + 40% fused score

### 3. Recency Boost + Time Decay
- Recency: additive bonus, configurable half-life (14d default), weight (0.10)
- Time decay: multiplicative penalty. score *= 0.5 + 0.5 * exp(-ageDays / halfLife). Default 60d.
- Both disableable (set 0)

### 4. Noise Filtering
- Filter refusals, meta-questions, greetings, low-quality on both write and read
- src/plugin/noise-filter.ts

### 5. Adaptive Retrieval
- Skip memory retrieval for greetings, slash commands, confirmations, emoji-only
- src/plugin/adaptive-retrieval.ts

### 6. Length Normalization
- score *= 1 / (1 + log2(charLen / anchor)), anchor = 500

### 7. MMR Diversity
- Maximal Marginal Relevance post-scoring to diversify results

### 8. Management CLI
- clawvault memory stats/export/import/reembed

### 9. openclaw.plugin.json
- Full JSON Schema config for all retrieval, noise, adaptive, recency/decay settings

### 10. Multi-Scope
- Scopes: global, agent:<id>, project:<name>, user:<id>
- Tag at write, filter at search. Default: global.

## Constraints
- Work with existing markdown vault structure
- Local-first (reranker is optional)
- Tests for all new modules (vitest)
- TypeScript strict mode
- Study existing code in src/plugin/ and src/lib/ before writing
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

*An elephant never forgets. Neither should your AI.*

[Documentation](https://clawvault.dev) · [npm Package](https://www.npmjs.com/package/clawvault) · [Obsidian Plugin](https://clawvault.dev/obsidian) · [GitHub](https://github.com/Versatly/clawvault)
[Documentation](https://clawvault.dev) · [npm Package](https://www.npmjs.com/package/clawvault) · [Obsidian Plugin](https://clawvault.dev/obsidian) · [Community](https://github.com/Versatly/clawvault/discussions) · [GitHub](https://github.com/Versatly/clawvault)

</div>

Expand Down Expand Up @@ -484,7 +484,7 @@ See our [contribution guidelines](https://github.com/Versatly/clawvault/blob/mai

---

**$CLAW**: [`5Fjr82MTB8mvxkzi9FYtvrUsPiDGE2M29w3dYcZpump`](https://pump.fun/coin/5Fjr82MTB8mvxkzi9FYtvrUsPiDGE2M29w3dYcZpump)
**$CLAWVAULT**: [`5Fjr82MTB8mvxkzi9FYtvrUsPiDGE2M29w3dYcZpump`](https://pump.fun/coin/5Fjr82MTB8mvxkzi9FYtvrUsPiDGE2M29w3dYcZpump)

## License

Expand Down
6 changes: 6 additions & 0 deletions Untitled Kanban 1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

kanban-plugin: board

---

6 changes: 6 additions & 0 deletions Untitled Kanban.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

kanban-plugin: board

---

18 changes: 18 additions & 0 deletions docs/openclaw-plugin-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,21 @@ If MEMORY.md and vault conflict, instruct the agent to trust `clawvault wake` ou
- [README: OpenClaw Integration](../README.md#openclaw-integration)
- [HOOK.md: Hook Configuration](../hooks/clawvault/HOOK.md)
- [SKILL.md: Skill Documentation](../SKILL.md)

## Per-Request Memory Control

You can disable memory injection or capture on a per-request basis by including tokens in your message:

| Token | Effect |
|-------|--------|
| `#clawvault:no-recall` | Skip memory injection for this request |
| `#clawvault:no-capture` | Skip auto-capture for this message |
| `#clawvault:no-memory` | Disable both recall and capture |

This is useful for sub-agents or workflows where you want clean, uncontaminated context:

```
#clawvault:no-memory Analyze this code without any prior context influencing your response.
```

The tokens are checked as substrings — they can appear anywhere in the message.
Binary file added eval/__pycache__/run_v34_full.cpython-314.pyc
Binary file not shown.
Binary file added eval/__pycache__/run_v35_full.cpython-314.pyc
Binary file not shown.
Binary file added eval/__pycache__/run_v39_full.cpython-314.pyc
Binary file not shown.
Binary file added eval/__pycache__/run_v42_full.cpython-314.pyc
Binary file not shown.
Binary file added eval/__pycache__/run_v44_temporal.cpython-314.pyc
Binary file not shown.
Empty file added eval/adapters/__init__.py
Empty file.
Loading