@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/dist/package.json
CHANGED
package/openclaw.plugin.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "tool",
|
|
4
4
|
"name": "Bamdra User Bind",
|
|
5
5
|
"description": "Identity resolution, user profile binding, and admin profile tools for OpenClaw channels.",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.13",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"skills": ["./skills"],
|
|
9
9
|
"configSchema": {
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ Its purpose is operational: inspect user bindings, repair incorrect profile fiel
|
|
|
12
12
|
## Allowed Jobs
|
|
13
13
|
|
|
14
14
|
- query a specific user profile or binding by `userId`
|
|
15
|
-
- correct nickname, role, timezone, preferences, personality
|
|
15
|
+
- correct name, nickname, gender, birthday, age, role, timezone, preferences, personality, interests, or other profile fields
|
|
16
16
|
- merge duplicate user records
|
|
17
17
|
- inspect sync failures and identity resolution issues
|
|
18
18
|
- request a resync for a known user
|
|
@@ -30,8 +30,9 @@ Use the admin tools in natural language:
|
|
|
30
30
|
## Good Requests
|
|
31
31
|
|
|
32
32
|
- “查询 user:u_123 的画像和绑定关系”
|
|
33
|
-
- “把 user:u_123
|
|
34
|
-
- “把 user:u_123
|
|
33
|
+
- “把 user:u_123 的姓名改成李明,时区改成 Asia/Tokyo”
|
|
34
|
+
- “把 user:u_123 的兴趣改成摄影和骑行”
|
|
35
|
+
- “把 user:u_123 的默认称呼改成小李”
|
|
35
36
|
- “合并 user:u_old 到 user:u_new”
|
|
36
37
|
- “列出最近的绑定失败问题”
|
|
37
38
|
|
|
@@ -42,3 +43,5 @@ Use the admin tools in natural language:
|
|
|
42
43
|
- if a request is ambiguous, narrow it before making changes
|
|
43
44
|
- remember that every admin action is auditable
|
|
44
45
|
- do not expose unrelated users when answering a narrow admin query
|
|
46
|
+
- do not use admin tools as a shortcut for answering the current user's own profile or address preference
|
|
47
|
+
- if the issue is that the current session cannot resolve the user, repair the binding first, then let the normal self-profile flow continue
|
|
@@ -28,6 +28,7 @@ Keep per-user address preferences in the bound profile instead of `USER.md`. `US
|
|
|
28
28
|
|
|
29
29
|
## Behavior Rules
|
|
30
30
|
|
|
31
|
+
- before replying, quietly fetch the current bound profile and use it as a soft personalization hint rather than announcing the lookup
|
|
31
32
|
- personalize naturally when the stored profile clearly helps
|
|
32
33
|
- use the stored nickname if the user has not asked for a different form of address in the current turn
|
|
33
34
|
- respect the stored timezone for scheduling, reminders, dates, and time-sensitive explanations
|
|
@@ -35,6 +36,111 @@ Keep per-user address preferences in the bound profile instead of `USER.md`. `US
|
|
|
35
36
|
- if the profile contains a preferred address, treat it as the default greeting and do not duplicate it in workspace-level `USER.md`
|
|
36
37
|
- if the current turn conflicts with the stored profile, follow the current turn
|
|
37
38
|
- do not invent profile traits that are not present
|
|
39
|
+
- if the current open id fails to match a bound user, first try the identity refresh and channel resolution path to recover the real uid before treating the profile as missing
|
|
40
|
+
- remember that one real user may correspond to multiple open ids across apps or accounts; prefer repairing the binding over creating parallel personas
|
|
41
|
+
- if the identity is recovered but the profile is sparse, create only a lightweight default profile and continue naturally
|
|
42
|
+
- when a lightweight default profile is in use, ask at most one or two brief, human questions such as how to address the user or what communication style they prefer
|
|
43
|
+
- phrase onboarding naturally, for example as a first-time acquaintance check, not as a database form or a profile interrogation
|
|
44
|
+
- once the user gives a stable preference like preferred address or collaboration style, update their bound profile immediately instead of leaving it in `USER.md`
|
|
45
|
+
|
|
46
|
+
## Tool Actions
|
|
47
|
+
|
|
48
|
+
Use the profile tools as an action loop, not as a passive reference.
|
|
49
|
+
|
|
50
|
+
1. Before replying, call `bamdra_user_bind_get_my_profile`.
|
|
51
|
+
2. If current identity looks missing or stale, call `bamdra_user_bind_refresh_my_binding` first, then read the profile again.
|
|
52
|
+
3. If the user clearly reveals stable profile information in the current turn, first do a semantic interpretation of what belongs in the user's profile, then call `bamdra_user_bind_update_my_profile` in the same turn.
|
|
53
|
+
4. After a successful update, reply naturally as if you have already absorbed the preference. Do not say that you "might" remember it later.
|
|
54
|
+
|
|
55
|
+
When the user reveals stable profile information, do not stop at "我记住了" in prose. Actually write it back through the tool.
|
|
56
|
+
|
|
57
|
+
If you just asked a profile-collection question and the user replies briefly, that short answer still counts as profile information. Examples: "叫我小李就行", "直接点", "先给结论". Do not wait for a longer sentence before calling `bamdra_user_bind_update_my_profile`.
|
|
58
|
+
|
|
59
|
+
Do not surface internal profile-write failures in the user-facing reply unless the user explicitly asks about the profile system itself. Avoid lines like "系统画像更新遇到了一点技术问题". If the write path needs repair in the background, keep the reply natural and continue serving the user.
|
|
60
|
+
|
|
61
|
+
## Semantic Extraction Rule
|
|
62
|
+
|
|
63
|
+
Do not rely on phrase matching or a tiny list of trigger sentences.
|
|
64
|
+
|
|
65
|
+
Use model judgment to read the user's natural language and decide whether the message contains stable profile traits that should persist beyond the current turn.
|
|
66
|
+
|
|
67
|
+
Think in terms of profile slots, not keywords:
|
|
68
|
+
|
|
69
|
+
- the user's name or self-identification
|
|
70
|
+
- how the user prefers to be addressed
|
|
71
|
+
- gender when the user explicitly provides it
|
|
72
|
+
- birthday, birth date, birth year, age, or other durable demographic facts when explicitly provided
|
|
73
|
+
- how the user prefers answers to be structured
|
|
74
|
+
- tone and communication style
|
|
75
|
+
- long-lived interests, hobbies, or personal background that help future collaboration
|
|
76
|
+
- role, responsibility, or identity in the collaboration
|
|
77
|
+
- timezone or durable location context
|
|
78
|
+
- durable dislikes, boundaries, or collaboration constraints
|
|
79
|
+
- long-lived private notes that help future cooperation
|
|
80
|
+
|
|
81
|
+
The same user intent may appear in many surface forms. Treat all of these as equivalent if they carry the same stable meaning:
|
|
82
|
+
|
|
83
|
+
- direct statements
|
|
84
|
+
- soft suggestions
|
|
85
|
+
- casual side remarks
|
|
86
|
+
- corrections to how you addressed them
|
|
87
|
+
- "by the way" comments
|
|
88
|
+
- complaints about prior reply style
|
|
89
|
+
- self-descriptions embedded inside a larger request
|
|
90
|
+
|
|
91
|
+
Extract semantically. Do not wait for the user to say exactly "remember this" or "update my profile".
|
|
92
|
+
|
|
93
|
+
If a message contains both a task request and profile information, do both:
|
|
94
|
+
|
|
95
|
+
- first update the profile with the stable traits you inferred
|
|
96
|
+
- then continue handling the user's actual task
|
|
97
|
+
|
|
98
|
+
Field mapping for `bamdra_user_bind_update_my_profile`:
|
|
99
|
+
|
|
100
|
+
- explicit self-identification -> `name`
|
|
101
|
+
- preferred form of address -> `nickname`
|
|
102
|
+
- explicit gender statement -> `gender`
|
|
103
|
+
- birthday or birth date -> `birthDate`
|
|
104
|
+
- birth year or birth month/year -> `birthYear`
|
|
105
|
+
- explicit age -> `age`
|
|
106
|
+
- communication style or formatting preference -> `preferences`
|
|
107
|
+
- personality or tone preference -> `personality`
|
|
108
|
+
- durable interests, hobbies, or recurring passions -> `interests`
|
|
109
|
+
- role or identity in collaboration -> `role`
|
|
110
|
+
- timezone -> `timezone`
|
|
111
|
+
- durable private notes worth remembering -> `notes`
|
|
112
|
+
|
|
113
|
+
When mapping, summarize the stable meaning instead of copying noisy raw text when helpful.
|
|
114
|
+
|
|
115
|
+
Examples of semantic normalization:
|
|
116
|
+
|
|
117
|
+
- "以后别整那么官腔" -> `personality` or `preferences`, not raw transcript dumping
|
|
118
|
+
- "我比较喜欢你先说判断,再展开原因" -> `preferences`
|
|
119
|
+
- "我叫李明" -> `name`
|
|
120
|
+
- "我生日是 1994-08-12" -> `birthDate`
|
|
121
|
+
- "我今年 31 岁" -> `age`
|
|
122
|
+
- "我平时喜欢骑行和摄影" -> `interests`
|
|
123
|
+
- "我是这个项目最后拍板的人" -> `role`
|
|
124
|
+
- "别老叫我老师,直接叫我名字就行" -> `nickname` or `notes`, depending on what is clearest
|
|
125
|
+
- "我不喜欢太长铺垫" -> `preferences` or `notes`
|
|
126
|
+
|
|
127
|
+
Examples:
|
|
128
|
+
|
|
129
|
+
- "我叫李明" -> call `bamdra_user_bind_update_my_profile` with `name: "李明"`
|
|
130
|
+
- "以后叫我小李" -> call `bamdra_user_bind_update_my_profile` with `nickname: "小李"`
|
|
131
|
+
- "我是女性" -> call `bamdra_user_bind_update_my_profile` with `gender: "女性"`
|
|
132
|
+
- "我生日是 1994-08-12" -> call `bamdra_user_bind_update_my_profile` with `birthDate: "1994-08-12"`
|
|
133
|
+
- "我今年 31 岁" -> call `bamdra_user_bind_update_my_profile` with `age: "31"`
|
|
134
|
+
- "你先给结论,再展开" -> call `bamdra_user_bind_update_my_profile` with `preferences: "偏好先给结论,再展开"`
|
|
135
|
+
- "说话直接一点,但别太冲" -> call `bamdra_user_bind_update_my_profile` with `personality: "偏好直接、克制、不生硬"`
|
|
136
|
+
- "我喜欢骑行和摄影" -> call `bamdra_user_bind_update_my_profile` with `interests: "骑行;摄影"`
|
|
137
|
+
- "我常驻东京" -> call `bamdra_user_bind_update_my_profile` with `timezone: "Asia/Tokyo"`
|
|
138
|
+
- "我是这个项目的负责人" -> call `bamdra_user_bind_update_my_profile` with `role: "项目负责人"`
|
|
139
|
+
|
|
140
|
+
If one user message contains both service intent and stable profile facts, do both in the same turn:
|
|
141
|
+
|
|
142
|
+
- first update the profile
|
|
143
|
+
- then continue handling the actual request
|
|
38
144
|
|
|
39
145
|
## Privacy Rules
|
|
40
146
|
|
|
@@ -42,6 +148,7 @@ Keep per-user address preferences in the bound profile instead of `USER.md`. `US
|
|
|
42
148
|
- do not describe the private profile store unless the user asks
|
|
43
149
|
- do not treat profile storage as a global contact directory
|
|
44
150
|
- do not ask for profile data that already exists in the bound profile unless it is stale or clearly insufficient
|
|
151
|
+
- do not force explicit profile talk when the information can stay implicit in the response style
|
|
45
152
|
|
|
46
153
|
## Updating Profile Information
|
|
47
154
|
|
|
@@ -49,22 +156,36 @@ When the user clearly provides a stable preference or asks to remember how to wo
|
|
|
49
156
|
|
|
50
157
|
Good examples:
|
|
51
158
|
|
|
52
|
-
-
|
|
53
|
-
- “我在 Asia/
|
|
159
|
+
- “以后叫我小李”
|
|
160
|
+
- “我在 Asia/Tokyo 时区”
|
|
54
161
|
- “我偏好幽默一点,但别太浮夸”
|
|
55
162
|
- “我更喜欢先给结论,再展开”
|
|
163
|
+
- “应该叫我名字,不用太正式”
|
|
164
|
+
- “第一次配合的话,你可以先简短一点”
|
|
165
|
+
- “别太像客服,直接一点”
|
|
166
|
+
- “我是这个项目的负责人”
|
|
167
|
+
- “我不喜欢很长的铺垫”
|
|
56
168
|
|
|
57
169
|
Do not update the profile for transient moods, one-off formatting requests, or unstable short-term details.
|
|
58
170
|
|
|
171
|
+
Use this stability test:
|
|
172
|
+
|
|
173
|
+
- if it is likely to still help in later conversations, it probably belongs in the profile
|
|
174
|
+
- if it only matters for this single reply, it probably does not
|
|
175
|
+
|
|
59
176
|
## Storage Boundary
|
|
60
177
|
|
|
61
178
|
Treat profile-style facts as private-by-default.
|
|
62
179
|
|
|
63
180
|
These should stay in the current user's profile or user-scoped memory, not `shared` memory:
|
|
64
181
|
|
|
182
|
+
- 姓名
|
|
183
|
+
- 性别
|
|
184
|
+
- 生日 / 出生年月 / 年龄
|
|
65
185
|
- 称呼方式
|
|
66
186
|
- 时区
|
|
67
187
|
- 对话风格偏好
|
|
188
|
+
- 兴趣爱好
|
|
68
189
|
- 角色和职责
|
|
69
190
|
- 宠物、家庭、个人背景
|
|
70
191
|
- 当前主要工作和长期个人目标
|