@bamdra/bamdra-user-bind 0.1.0 → 0.1.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # bamdra-user-bind
2
2
 
3
- `bamdra-user-bind` is the identity and profile binding plugin for the Bamdra OpenClaw memory suite.
3
+ `bamdra-user-bind` is the identity and profile binding plugin for the Bamdra OpenClaw suite.
4
4
 
5
5
  It resolves channel-facing sender identifiers into a stable user boundary, stores user profile data locally, supports Feishu-oriented identity resolution, and exposes admin-safe tooling for querying and editing profile records.
6
6
 
@@ -44,8 +44,10 @@ The runtime only queries the SQLite store. Export files exist for backup and man
44
44
 
45
45
  ## Relationship To Other Repositories
46
46
 
47
- - required by:
48
- `bamdra-openclaw-memory`
47
+ - standalone:
48
+ can run independently as a user identity plugin
49
+ - auto companion:
50
+ `bamdra-openclaw-memory` can auto-provision it during npm-based install bootstrap
49
51
  - optional companion:
50
52
  `bamdra-memory-vector`
51
53
 
@@ -0,0 +1,56 @@
1
+ # bamdra-user-bind
2
+
3
+ `bamdra-user-bind` 是 Bamdra OpenClaw 套件中的身份与画像绑定插件,但它本身也可以独立运行。
4
+
5
+ ## 它做什么
6
+
7
+ - 把 `channel + sender.id` 解析成稳定的 `userId`
8
+ - 在本地 SQLite 中保存绑定关系和用户画像
9
+ - 导出可读备份文件,方便排查和恢复
10
+ - 把身份解析结果注入运行时上下文,供下游记忆插件使用
11
+ - 普通 agent 无法读取其他用户的私有资料
12
+ - 管理员工具支持自然语言查询、编辑、合并、巡检与重同步
13
+
14
+ ## 开源内容说明
15
+
16
+ 当前开源版的实际源码已经包含在这个仓库里。
17
+
18
+ - 源码入口:
19
+ [src/index.ts](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-user-bind/src/index.ts)
20
+ - 插件清单:
21
+ [openclaw.plugin.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-user-bind/openclaw.plugin.json)
22
+ - 包元数据:
23
+ [package.json](/Users/wood/workspace/macmini-openclaw/openclaw-enhanced/bamdra-user-bind/package.json)
24
+
25
+ 文件数量目前比较少,是因为首个公开版本采用了紧凑单入口插件的形式,而不是多包拆分结构。
26
+
27
+ ## 当前存储模型
28
+
29
+ - 运行时主存储:
30
+ `~/.openclaw/data/bamdra-user-bind/profiles.sqlite`
31
+ - 导出目录:
32
+ `~/.openclaw/data/bamdra-user-bind/exports/`
33
+
34
+ 运行时只查询 SQLite 主库,导出文件用于备份和人工查看。
35
+
36
+ ## 安全边界
37
+
38
+ - 普通 agent 只能读取当前用户
39
+ - 跨用户访问由实现层直接拒绝,不依赖 prompt 约束
40
+ - 管理员动作通过专用工具执行
41
+ - 管理员查询、编辑、合并、同步与拒绝访问都会留下审计记录
42
+
43
+ ## 与其他仓库的关系
44
+
45
+ - 独立运行:
46
+ 本身就可以作为身份插件使用
47
+ - 自动配套:
48
+ 通过 npm 安装 `bamdra-openclaw-memory` 时,主插件可以在 bootstrap 过程中自动补齐它
49
+ - 可选配套:
50
+ `bamdra-memory-vector`
51
+
52
+ ## 构建
53
+
54
+ ```bash
55
+ pnpm run bundle
56
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamdra/bamdra-user-bind",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Identity resolution, user profile binding, and admin-safe profile tools for OpenClaw channels.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.bamdra.com",
@@ -31,10 +31,6 @@
31
31
  "engines": {
32
32
  "node": ">=22"
33
33
  },
34
- "scripts": {
35
- "bundle": "node ../bamdra-openclaw-memory/scripts/run-local-bin.mjs tsup && node -e \"const fs=require('node:fs');const path='./dist/index.js';const text=fs.readFileSync(path,'utf8').replace(/require\\\\(\\\"sqlite\\\"\\\\)/g,'require(\\\"node:sqlite\\\")');fs.writeFileSync(path,text);\"",
36
- "prepublishOnly": "pnpm run bundle"
37
- },
38
34
  "openclaw": {
39
35
  "id": "bamdra-user-bind",
40
36
  "type": "tool",
@@ -55,5 +51,8 @@
55
51
  "dependencies": {},
56
52
  "devDependencies": {
57
53
  "@types/node": "^24.5.2"
54
+ },
55
+ "scripts": {
56
+ "bundle": "node ../bamdra-openclaw-memory/scripts/run-local-bin.mjs tsup && node -e \"const fs=require('node:fs');const path='./dist/index.js';const text=fs.readFileSync(path,'utf8').replace(/require\\\\(\\\"sqlite\\\"\\\\)/g,'require(\\\"node:sqlite\\\")');fs.writeFileSync(path,text);\""
58
57
  }
59
- }
58
+ }