@bamdra/bamdra-memory-vector 0.1.8 → 0.1.10
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 +48 -54
- package/README.zh-CN.md +48 -52
- package/dist/index.js +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/bamdra-memory-vector-operator/SKILL.md +5 -0
package/README.md
CHANGED
|
@@ -1,89 +1,83 @@
|
|
|
1
1
|
# bamdra-memory-vector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The local knowledge and semantic recall layer for the Bamdra suite.
|
|
4
4
|
|
|
5
|
-
It
|
|
5
|
+
It can run independently, and it becomes most powerful when paired with `bamdra-openclaw-memory`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[中文文档](./README.zh-CN.md)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- builds a lightweight local semantic index
|
|
11
|
-
- supports scoped retrieval for the current user
|
|
12
|
-
- returns top-k semantic matches for recall-heavy prompts
|
|
13
|
-
- keeps private user memory and shared knowledge separated
|
|
9
|
+
## What it does
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
`bamdra-memory-vector` turns local Markdown into a maintainable knowledge base.
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
It indexes:
|
|
18
14
|
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
- package metadata:
|
|
24
|
-
[package.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/package.json)
|
|
15
|
+
- `knowledge/`
|
|
16
|
+
- `docs/`
|
|
17
|
+
- `notes/`
|
|
18
|
+
- `ideas/`
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
and helps OpenClaw search that local knowledge before falling back to the web.
|
|
27
21
|
|
|
28
|
-
##
|
|
22
|
+
## Why it matters
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
`~/.openclaw/memory/vector/markdown/private/`
|
|
32
|
-
- shared Markdown root:
|
|
33
|
-
`~/.openclaw/memory/vector/markdown/shared/`
|
|
34
|
-
- local index:
|
|
35
|
-
`~/.openclaw/memory/vector/index.json`
|
|
24
|
+
The weakest part of many memory systems is the knowledge layer:
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
- knowledge becomes opaque
|
|
27
|
+
- humans stop editing it
|
|
28
|
+
- web search gets used too often
|
|
29
|
+
- latency and token cost go up
|
|
38
30
|
|
|
39
|
-
|
|
31
|
+
This plugin closes that gap by keeping the knowledge base local, readable, and editable.
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
## Best-practice layout
|
|
42
34
|
|
|
43
|
-
|
|
35
|
+
```text
|
|
36
|
+
private/
|
|
37
|
+
knowledge/
|
|
38
|
+
docs/
|
|
39
|
+
notes/
|
|
40
|
+
ideas/
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
shared/
|
|
43
|
+
knowledge/
|
|
44
|
+
docs/
|
|
45
|
+
notes/
|
|
46
|
+
ideas/
|
|
47
|
+
```
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
## Best-practice storage
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Keep the index local, but point Markdown roots at a synced editor-friendly folder.
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
55
|
"enabled": true,
|
|
56
56
|
"privateMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/private",
|
|
57
57
|
"sharedMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/shared",
|
|
58
|
-
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
59
|
-
"dimensions": 64
|
|
58
|
+
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
60
59
|
}
|
|
61
60
|
```
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
That works especially well with:
|
|
64
63
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
64
|
+
- Obsidian
|
|
65
|
+
- iCloud Drive
|
|
66
|
+
- Git-synced repositories
|
|
67
|
+
- Syncthing workspaces
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
## What it unlocks
|
|
71
70
|
|
|
72
|
-
|
|
71
|
+
With `bamdra-openclaw-memory`:
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
- old work can be found through fuzzy recall
|
|
74
|
+
- local docs can enter the answer path without prompt bloat
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
- `bamdra-memory-vector` is recall enhancement
|
|
76
|
+
With `bamdra-user-bind`:
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
- private knowledge stays aligned with the correct user boundary
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
- Markdown-readable memory artifacts
|
|
83
|
-
- lightweight semantic recall without extra infrastructure
|
|
80
|
+
## Repository
|
|
84
81
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
pnpm run bundle
|
|
89
|
-
```
|
|
82
|
+
- [GitHub organization](https://github.com/bamdra)
|
|
83
|
+
- [Repository](https://github.com/bamdra/bamdra-memory-vector)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,87 +1,83 @@
|
|
|
1
1
|
# bamdra-memory-vector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Bamdra 套件中的本地知识库与语义召回层。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- 把记忆内容以 Markdown 可读形式写入本地
|
|
8
|
-
- 建立轻量的本地语义索引
|
|
9
|
-
- 按当前用户边界限制检索范围
|
|
10
|
-
- 为长程记忆回捞提供 Top-K 语义召回
|
|
11
|
-
- 保持私有记忆与共享知识分离
|
|
5
|
+
它可以独立运行,和 `bamdra-openclaw-memory` 配合时效果最好。
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
[English README](./README.md)
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
## 它做什么
|
|
16
10
|
|
|
17
|
-
-
|
|
18
|
-
[src/index.ts](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/src/index.ts)
|
|
19
|
-
- 插件清单:
|
|
20
|
-
[openclaw.plugin.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/openclaw.plugin.json)
|
|
21
|
-
- 包元数据:
|
|
22
|
-
[package.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/package.json)
|
|
11
|
+
`bamdra-memory-vector` 会把本地 Markdown 变成真正可维护的知识库。
|
|
23
12
|
|
|
24
|
-
|
|
13
|
+
它会索引:
|
|
25
14
|
|
|
26
|
-
|
|
15
|
+
- `knowledge/`
|
|
16
|
+
- `docs/`
|
|
17
|
+
- `notes/`
|
|
18
|
+
- `ideas/`
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
`~/.openclaw/memory/vector/markdown/private/`
|
|
30
|
-
- 共享 Markdown 根目录:
|
|
31
|
-
`~/.openclaw/memory/vector/markdown/shared/`
|
|
32
|
-
- 本地索引:
|
|
33
|
-
`~/.openclaw/memory/vector/index.json`
|
|
20
|
+
并尽量让 OpenClaw 在上网之前先查本地知识。
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
## 为什么重要
|
|
36
23
|
|
|
37
|
-
|
|
24
|
+
很多记忆系统最弱的一层,其实就是知识库层:
|
|
38
25
|
|
|
39
|
-
|
|
26
|
+
- 知识越来越黑盒
|
|
27
|
+
- 人不再愿意维护
|
|
28
|
+
- web search 被过度使用
|
|
29
|
+
- 延迟和 token 成本不断上升
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
这个插件补上的,正是这块短板。它让知识继续保持本地、可读、可改。
|
|
42
32
|
|
|
43
|
-
|
|
33
|
+
## 最佳实践目录
|
|
44
34
|
|
|
45
|
-
|
|
35
|
+
```text
|
|
36
|
+
private/
|
|
37
|
+
knowledge/
|
|
38
|
+
docs/
|
|
39
|
+
notes/
|
|
40
|
+
ideas/
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
shared/
|
|
43
|
+
knowledge/
|
|
44
|
+
docs/
|
|
45
|
+
notes/
|
|
46
|
+
ideas/
|
|
47
|
+
```
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
## 最佳实践存储方式
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
索引留在本地,Markdown 根目录指向一个会同步、会编辑的目录。
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
55
|
"enabled": true,
|
|
56
56
|
"privateMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/private",
|
|
57
57
|
"sharedMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/shared",
|
|
58
|
-
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
59
|
-
"dimensions": 64
|
|
58
|
+
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
60
59
|
}
|
|
61
60
|
```
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
这尤其适合:
|
|
64
63
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
64
|
+
- Obsidian
|
|
65
|
+
- iCloud Drive
|
|
66
|
+
- Git 同步仓库
|
|
67
|
+
- Syncthing 工作区
|
|
69
68
|
|
|
70
|
-
##
|
|
69
|
+
## 它能解锁什么
|
|
71
70
|
|
|
72
|
-
|
|
71
|
+
与 `bamdra-openclaw-memory` 组合时:
|
|
73
72
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
73
|
+
- 旧工作可以通过模糊召回被重新找回
|
|
74
|
+
- 本地文档能进入答案链路,而不是靠 prompt 硬塞
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
与 `bamdra-user-bind` 组合时:
|
|
78
77
|
|
|
79
|
-
-
|
|
80
|
-
- Markdown 可读、可维护的记忆载体
|
|
81
|
-
- 不依赖重型基础设施的轻量语义召回
|
|
78
|
+
- 私有知识会继续对齐到正确用户边界
|
|
82
79
|
|
|
83
|
-
##
|
|
80
|
+
## 仓库地址
|
|
84
81
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```
|
|
82
|
+
- [GitHub 首页](https://github.com/bamdra)
|
|
83
|
+
- [仓库地址](https://github.com/bamdra/bamdra-memory-vector)
|
package/dist/index.js
CHANGED
|
@@ -164,7 +164,7 @@ function register(api) {
|
|
|
164
164
|
exposeVectorApi(runtime);
|
|
165
165
|
api.registerTool?.({
|
|
166
166
|
name: SEARCH_TOOL_NAME,
|
|
167
|
-
description: "Search the current user's vector
|
|
167
|
+
description: "Search the current user's local vector-backed knowledge and memory index before falling back to web lookup",
|
|
168
168
|
parameters: {
|
|
169
169
|
type: "object",
|
|
170
170
|
additionalProperties: false,
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -24,12 +24,16 @@ It complements topic memory. Use it when the user remembers something fuzzily, w
|
|
|
24
24
|
- keep cross-user boundaries intact
|
|
25
25
|
- do not flood the prompt with low-signal chunks
|
|
26
26
|
- prefer a few strong recalls over many weak ones
|
|
27
|
+
- when the question plausibly targets local docs, notes, ideas, or knowledge files, check local vector-backed knowledge before using web search
|
|
28
|
+
- for repository docs, changelogs, READMEs, SOPs, or user-maintained Markdown libraries, local recall should be the default first step, not a fallback
|
|
27
29
|
|
|
28
30
|
## Markdown Knowledge Model
|
|
29
31
|
|
|
30
32
|
- private Markdown is for one user's durable notes and memory fragments
|
|
31
33
|
- shared Markdown is for team or reusable knowledge
|
|
32
34
|
- both are editable by humans outside the runtime
|
|
35
|
+
- common human-managed directories include `knowledge/`, `docs/`, `notes/`, and `ideas/`
|
|
36
|
+
- `_runtime/` is system-managed and should not be treated as the main editing area
|
|
33
37
|
|
|
34
38
|
## Shared vs Private
|
|
35
39
|
|
|
@@ -54,3 +58,4 @@ Shared examples:
|
|
|
54
58
|
- never treat another user's private Markdown as searchable context
|
|
55
59
|
- do not reveal storage paths unless the user asks
|
|
56
60
|
- if retrieval confidence is weak, answer cautiously instead of pretending certainty
|
|
61
|
+
- if local recall returns relevant results, answer from it first and only suggest web search when the user explicitly asks for public latest information beyond the local library
|