@bamdra/bamdra-memory-vector 0.1.9 → 0.1.11
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 +68 -52
- package/README.zh-CN.md +69 -51
- package/dist/index.js +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/skills/bamdra-memory-vector-operator/SKILL.md +2 -0
package/README.md
CHANGED
|
@@ -1,89 +1,105 @@
|
|
|
1
1
|
# bamdra-memory-vector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The local knowledge and semantic recall layer for the Bamdra suite.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
It can run independently, and it becomes most powerful when paired with `bamdra-openclaw-memory`.
|
|
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
|
+
Install directly:
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
```bash
|
|
12
|
+
openclaw plugins install @bamdra/bamdra-memory-vector
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Release package:
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- GitHub Releases: https://github.com/bamdra/bamdra-memory-vector/releases
|
|
18
|
+
- You can also build a local release bundle with `pnpm package:release`
|
|
18
19
|
|
|
19
|
-
-
|
|
20
|
-
[src/index.ts](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/src/index.ts)
|
|
21
|
-
- plugin manifest:
|
|
22
|
-
[openclaw.plugin.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/openclaw.plugin.json)
|
|
23
|
-
- package metadata:
|
|
24
|
-
[package.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-memory-vector/package.json)
|
|
20
|
+
[中文文档](./README.zh-CN.md)
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
## What it does
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
`bamdra-memory-vector` turns local Markdown into a maintainable knowledge base.
|
|
29
25
|
|
|
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`
|
|
26
|
+
It indexes:
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
- `knowledge/`
|
|
29
|
+
- `docs/`
|
|
30
|
+
- `notes/`
|
|
31
|
+
- `ideas/`
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
`ideas/` is a generic example name. If your vault uses a different folder such as `06_Interest/`, point the Markdown root at that structure or keep both names as valid knowledge buckets.
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
and helps OpenClaw search that local knowledge before falling back to the web.
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
## Why it matters
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
The weakest part of many memory systems is the knowledge layer:
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
- knowledge becomes opaque
|
|
42
|
+
- humans stop editing it
|
|
43
|
+
- web search gets used too often
|
|
44
|
+
- latency and token cost go up
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
This plugin closes that gap by keeping the knowledge base local, readable, and editable.
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
## Best-practice layout
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
private/
|
|
52
|
+
knowledge/
|
|
53
|
+
docs/
|
|
54
|
+
notes/
|
|
55
|
+
ideas/
|
|
56
|
+
06_Interest/
|
|
57
|
+
|
|
58
|
+
shared/
|
|
59
|
+
knowledge/
|
|
60
|
+
docs/
|
|
61
|
+
notes/
|
|
62
|
+
ideas/
|
|
63
|
+
06_Interest/
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Best-practice storage
|
|
67
|
+
|
|
68
|
+
Keep the index local, but point Markdown roots at a synced editor-friendly folder.
|
|
52
69
|
|
|
53
70
|
```json
|
|
54
71
|
{
|
|
55
72
|
"enabled": true,
|
|
56
73
|
"privateMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/private",
|
|
57
74
|
"sharedMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/shared",
|
|
58
|
-
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
59
|
-
"dimensions": 64
|
|
75
|
+
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
60
76
|
}
|
|
61
77
|
```
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
That works especially well with:
|
|
64
80
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
81
|
+
- Obsidian
|
|
82
|
+
- iCloud Drive
|
|
83
|
+
- Git-synced repositories
|
|
84
|
+
- Syncthing workspaces
|
|
69
85
|
|
|
70
|
-
|
|
86
|
+
## Architecture
|
|
71
87
|
|
|
72
|
-
|
|
88
|
+

|
|
73
89
|
|
|
74
|
-
|
|
90
|
+
## What it unlocks
|
|
75
91
|
|
|
76
|
-
|
|
77
|
-
- `bamdra-memory-vector` is recall enhancement
|
|
92
|
+
With `bamdra-openclaw-memory`:
|
|
78
93
|
|
|
79
|
-
|
|
94
|
+
- old work can be found through fuzzy recall
|
|
95
|
+
- local docs can enter the answer path without prompt bloat
|
|
80
96
|
|
|
81
|
-
-
|
|
82
|
-
- Markdown-readable memory artifacts
|
|
83
|
-
- lightweight semantic recall without extra infrastructure
|
|
97
|
+
With `bamdra-user-bind`:
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
- private knowledge stays aligned with the correct user boundary
|
|
86
100
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
101
|
+
## Repository
|
|
102
|
+
|
|
103
|
+
- [GitHub organization](https://github.com/bamdra)
|
|
104
|
+
- [Repository](https://github.com/bamdra/bamdra-memory-vector)
|
|
105
|
+
- [Releases](https://github.com/bamdra/bamdra-memory-vector/releases)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,87 +1,105 @@
|
|
|
1
1
|
# bamdra-memory-vector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Bamdra 套件中的本地知识库与语义召回层。
|
|
6
|
+
|
|
7
|
+
它可以独立运行,和 `bamdra-openclaw-memory` 配合时效果最好。
|
|
8
|
+
|
|
9
|
+
单独安装:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
openclaw plugins install @bamdra/bamdra-memory-vector
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
发布包下载:
|
|
6
16
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- 按当前用户边界限制检索范围
|
|
10
|
-
- 为长程记忆回捞提供 Top-K 语义召回
|
|
11
|
-
- 保持私有记忆与共享知识分离
|
|
17
|
+
- GitHub Releases: https://github.com/bamdra/bamdra-memory-vector/releases
|
|
18
|
+
- 本地也可以执行 `pnpm package:release` 生成独立发布包
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
[English README](./README.md)
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
## 它做什么
|
|
23
|
+
|
|
24
|
+
`bamdra-memory-vector` 会把本地 Markdown 变成真正可维护的知识库。
|
|
16
25
|
|
|
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)
|
|
26
|
+
它会索引:
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
- `knowledge/`
|
|
29
|
+
- `docs/`
|
|
30
|
+
- `notes/`
|
|
31
|
+
- `ideas/`
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
其中 `ideas/` 只是通用示例名。如果你的 Obsidian 实际目录叫 `06_Interest/`,也完全可以按那个结构来放,插件同样可以把它当成灵感知识桶。
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
`~/.openclaw/memory/vector/markdown/private/`
|
|
30
|
-
- 共享 Markdown 根目录:
|
|
31
|
-
`~/.openclaw/memory/vector/markdown/shared/`
|
|
32
|
-
- 本地索引:
|
|
33
|
-
`~/.openclaw/memory/vector/index.json`
|
|
35
|
+
并尽量让 OpenClaw 在上网之前先查本地知识。
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
## 为什么重要
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
很多记忆系统最弱的一层,其实就是知识库层:
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
- 知识越来越黑盒
|
|
42
|
+
- 人不再愿意维护
|
|
43
|
+
- web search 被过度使用
|
|
44
|
+
- 延迟和 token 成本不断上升
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
这个插件补上的,正是这块短板。它让知识继续保持本地、可读、可改。
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
## 最佳实践目录
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
```text
|
|
51
|
+
private/
|
|
52
|
+
knowledge/
|
|
53
|
+
docs/
|
|
54
|
+
notes/
|
|
55
|
+
ideas/
|
|
56
|
+
06_Interest/
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
shared/
|
|
59
|
+
knowledge/
|
|
60
|
+
docs/
|
|
61
|
+
notes/
|
|
62
|
+
ideas/
|
|
63
|
+
06_Interest/
|
|
64
|
+
```
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
## 最佳实践存储方式
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
索引留在本地,Markdown 根目录指向一个会同步、会编辑的目录。
|
|
52
69
|
|
|
53
70
|
```json
|
|
54
71
|
{
|
|
55
72
|
"enabled": true,
|
|
56
73
|
"privateMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/private",
|
|
57
74
|
"sharedMarkdownRoot": "~/Documents/Obsidian/MyVault/openclaw/shared",
|
|
58
|
-
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
59
|
-
"dimensions": 64
|
|
75
|
+
"indexPath": "~/.openclaw/memory/vector/index.json"
|
|
60
76
|
}
|
|
61
77
|
```
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
这尤其适合:
|
|
64
80
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
81
|
+
- Obsidian
|
|
82
|
+
- iCloud Drive
|
|
83
|
+
- Git 同步仓库
|
|
84
|
+
- Syncthing 工作区
|
|
69
85
|
|
|
70
|
-
##
|
|
86
|
+
## 架构图
|
|
71
87
|
|
|
72
|
-
|
|
88
|
+

|
|
73
89
|
|
|
74
|
-
|
|
75
|
-
- `bamdra-memory-vector` 更强调召回增强
|
|
90
|
+
## 它能解锁什么
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
与 `bamdra-openclaw-memory` 组合时:
|
|
78
93
|
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
- 不依赖重型基础设施的轻量语义召回
|
|
94
|
+
- 旧工作可以通过模糊召回被重新找回
|
|
95
|
+
- 本地文档能进入答案链路,而不是靠 prompt 硬塞
|
|
82
96
|
|
|
83
|
-
|
|
97
|
+
与 `bamdra-user-bind` 组合时:
|
|
84
98
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
- 私有知识会继续对齐到正确用户边界
|
|
100
|
+
|
|
101
|
+
## 仓库地址
|
|
102
|
+
|
|
103
|
+
- [GitHub 首页](https://github.com/bamdra)
|
|
104
|
+
- [仓库地址](https://github.com/bamdra/bamdra-memory-vector)
|
|
105
|
+
- [Releases](https://github.com/bamdra/bamdra-memory-vector/releases)
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var PLUGIN_ID = "bamdra-memory-vector";
|
|
|
41
41
|
var SKILL_ID = "bamdra-memory-vector-operator";
|
|
42
42
|
var SEARCH_TOOL_NAME = "bamdra_memory_vector_search";
|
|
43
43
|
var REINDEX_TOOL_NAME = "bamdra_memory_vector_reindex";
|
|
44
|
-
var DEFAULT_LIBRARY_DIRS = ["knowledge", "docs", "notes", "ideas"];
|
|
44
|
+
var DEFAULT_LIBRARY_DIRS = ["knowledge", "docs", "notes", "ideas", "06_Interest"];
|
|
45
45
|
var RUNTIME_DIR = "_runtime";
|
|
46
46
|
var SUPPORTED_TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
47
47
|
".md",
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamdra/bamdra-memory-vector",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Lightweight local semantic retrieval enhancement for the Bamdra OpenClaw memory suite.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.bamdra.com",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"bundle": "node ../bamdra-openclaw-memory/scripts/run-local-bin.mjs tsup",
|
|
37
|
-
"prepublishOnly": "pnpm run bundle"
|
|
37
|
+
"prepublishOnly": "pnpm run bundle",
|
|
38
|
+
"package:release": "node ./scripts/package-release.mjs"
|
|
38
39
|
},
|
|
39
40
|
"openclaw": {
|
|
40
41
|
"id": "bamdra-memory-vector",
|
|
@@ -25,6 +25,7 @@ It complements topic memory. Use it when the user remembers something fuzzily, w
|
|
|
25
25
|
- do not flood the prompt with low-signal chunks
|
|
26
26
|
- prefer a few strong recalls over many weak ones
|
|
27
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
|
|
28
29
|
|
|
29
30
|
## Markdown Knowledge Model
|
|
30
31
|
|
|
@@ -57,3 +58,4 @@ Shared examples:
|
|
|
57
58
|
- never treat another user's private Markdown as searchable context
|
|
58
59
|
- do not reveal storage paths unless the user asks
|
|
59
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
|