@bamdra/bamdra-user-bind 0.1.12 → 0.1.14
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 +34 -0
- package/README.zh-CN.md +34 -0
- package/dist/index.js +2410 -413
- package/dist/openclaw.plugin.json +1 -1
- package/dist/package.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/bamdra-user-bind-admin/SKILL.md +6 -3
- package/skills/bamdra-user-bind-profile/SKILL.md +123 -2
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ The identity and living profile layer for the Bamdra suite.
|
|
|
6
6
|
|
|
7
7
|
It can run independently, and it is also auto-provisioned by `bamdra-openclaw-memory`.
|
|
8
8
|
|
|
9
|
+
Tested with OpenClaw `v2026.3.23`.
|
|
10
|
+
|
|
9
11
|
Install directly:
|
|
10
12
|
|
|
11
13
|
```bash
|
|
@@ -31,6 +33,14 @@ It also becomes the user's evolving profile layer, including:
|
|
|
31
33
|
- role
|
|
32
34
|
- long-lived user notes
|
|
33
35
|
|
|
36
|
+
Recent behavior improvements:
|
|
37
|
+
|
|
38
|
+
- channel-scoped user IDs now make profile ownership explicit across Feishu, Telegram, WhatsApp, Discord, Google Chat, Slack, Mattermost, Signal, iMessage, and Microsoft Teams
|
|
39
|
+
- when a stable binding is temporarily unavailable, the runtime can persist a provisional profile first and merge it into the stable profile later
|
|
40
|
+
- profile updates now support semantic `replace`, `append`, and `remove` instead of only blind overwrite
|
|
41
|
+
- the Markdown mirror now keeps frontmatter as the machine-readable source and renders a synchronized `Confirmed Profile` section for humans
|
|
42
|
+
- npm installs on OpenClaw `v2026.3.23` now auto-register the plugin's `plugins.installs` metadata and resolve `~/.openclaw/...` paths against the current user home
|
|
43
|
+
|
|
34
44
|
## Profile Policy
|
|
35
45
|
|
|
36
46
|
- `userId` is the primary key for personalization
|
|
@@ -66,6 +76,30 @@ The SQLite store is the controlled source of truth.
|
|
|
66
76
|
|
|
67
77
|
The Markdown mirror is for humans, so profiles stay editable like a living per-user guide instead of becoming a hidden black box.
|
|
68
78
|
|
|
79
|
+
## Profile update semantics
|
|
80
|
+
|
|
81
|
+
Not every durable user preference should overwrite the entire old field.
|
|
82
|
+
|
|
83
|
+
`bamdra-user-bind` now distinguishes between:
|
|
84
|
+
|
|
85
|
+
- `replace`: the user is correcting or changing an earlier durable preference
|
|
86
|
+
- `append`: the user is adding another durable preference without revoking the old one
|
|
87
|
+
- `remove`: the user explicitly wants one older durable trait removed
|
|
88
|
+
|
|
89
|
+
This is especially useful for fields like `preferences`, `personality`, and `notes`, where the right behavior is often incremental.
|
|
90
|
+
|
|
91
|
+
## Provisional identity and later merge
|
|
92
|
+
|
|
93
|
+
Some channels or app states can temporarily fail to resolve a stable bound identity on the first turn.
|
|
94
|
+
|
|
95
|
+
In those cases, the runtime can:
|
|
96
|
+
|
|
97
|
+
- persist a provisional profile immediately so the user's newly stated preferences are not lost
|
|
98
|
+
- keep trying to repair the binding in the background
|
|
99
|
+
- merge the provisional profile into the stable user profile once the real binding is available
|
|
100
|
+
|
|
101
|
+
This keeps the user experience responsive without turning missing identity resolution into data loss.
|
|
102
|
+
|
|
69
103
|
## Best practice
|
|
70
104
|
|
|
71
105
|
- keep SQLite local
|
package/README.zh-CN.md
CHANGED
|
@@ -6,6 +6,8 @@ Bamdra 套件中的身份与“活画像”层。
|
|
|
6
6
|
|
|
7
7
|
它可以独立运行,也会被 `bamdra-openclaw-memory` 自动补齐。
|
|
8
8
|
|
|
9
|
+
已验证适配 OpenClaw `v2026.3.23`。
|
|
10
|
+
|
|
9
11
|
单独安装:
|
|
10
12
|
|
|
11
13
|
```bash
|
|
@@ -31,6 +33,14 @@ openclaw plugins install @bamdra/bamdra-user-bind
|
|
|
31
33
|
- 角色
|
|
32
34
|
- 长期用户备注
|
|
33
35
|
|
|
36
|
+
这轮又补了几件关键的事:
|
|
37
|
+
|
|
38
|
+
- 用户画像主键现在带 channel 作用域,像 Feishu、Telegram、WhatsApp、Discord、Google Chat、Slack、Mattermost、Signal、iMessage、Microsoft Teams 这些渠道的归属会更清楚
|
|
39
|
+
- 当稳定绑定暂时拿不到时,运行时可以先落一份 provisional 画像,后续补到真实绑定后再自动归并
|
|
40
|
+
- 画像更新现在支持语义上的 `replace / append / remove`,不再只有整段覆盖
|
|
41
|
+
- Markdown 镜像继续保留 frontmatter 作为机器主源,并把正文里的“已确认画像”变成同步的人类可读镜像
|
|
42
|
+
- 在 OpenClaw `v2026.3.23` 下通过 npm 安装时,现在会自动补齐 `plugins.installs` 元数据,并把 `~/.openclaw/...` 正确解析到当前用户目录
|
|
43
|
+
|
|
34
44
|
## 画像策略
|
|
35
45
|
|
|
36
46
|
- `userId` 是画像的主键
|
|
@@ -66,6 +76,30 @@ SQLite 是受控主源。
|
|
|
66
76
|
|
|
67
77
|
Markdown 镜像则是给人编辑的,让用户画像更像一份活的 per-user 指南,而不是一个无法触达的黑盒。
|
|
68
78
|
|
|
79
|
+
## 画像更新语义
|
|
80
|
+
|
|
81
|
+
不是所有长期偏好变化都应该直接覆盖旧字段。
|
|
82
|
+
|
|
83
|
+
`bamdra-user-bind` 现在会区分:
|
|
84
|
+
|
|
85
|
+
- `replace`:用户是在纠正或替换旧偏好
|
|
86
|
+
- `append`:用户是在追加一个新的长期偏好,并没有撤销旧偏好
|
|
87
|
+
- `remove`:用户明确希望移除某一个旧特征
|
|
88
|
+
|
|
89
|
+
这对 `preferences`、`personality`、`notes` 这类字段尤其重要,因为它们很多时候更适合增量维护。
|
|
90
|
+
|
|
91
|
+
## 临时身份与后续归并
|
|
92
|
+
|
|
93
|
+
某些渠道或某些 App 状态下,第一轮对话不一定立刻能解析出稳定绑定。
|
|
94
|
+
|
|
95
|
+
这时运行时会:
|
|
96
|
+
|
|
97
|
+
- 先把用户刚表达出来的稳定偏好写进 provisional 画像,避免信息丢失
|
|
98
|
+
- 在后台继续主动补绑定
|
|
99
|
+
- 一旦补到真实绑定,就把 provisional 画像自动归并到正式画像
|
|
100
|
+
|
|
101
|
+
这样即使当前身份链路暂时不完整,也不会让用户刚说的偏好白白丢掉。
|
|
102
|
+
|
|
69
103
|
## 最佳实践
|
|
70
104
|
|
|
71
105
|
- SQLite 留在本地
|