@coremail/lunkr-openclaw 1.0.0 → 1.0.2
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 +51 -113
- package/{dist/bin → bin}/lunkr-cli.js +6 -4
- package/i18n/locales/en-US.json +215 -0
- package/i18n/locales/zh-CN.json +217 -0
- package/{dist/index.js → index.js} +22 -19
- package/openclaw.plugin.json +3 -2
- package/package.json +10 -48
- package/docs/AUTHENTICATION.md +0 -254
- package/docs/CHEATSHEET.md +0 -112
- package/docs/DEVELOPMENT.md +0 -239
- package/docs/USAGE.md +0 -337
package/README.md
CHANGED
|
@@ -27,144 +27,82 @@ This plugin enables OpenClaw AI agents to interact with Lunkr through:
|
|
|
27
27
|
npm install @coremail/lunkr
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
### Local Development
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
cd extensions/lunkr
|
|
34
|
-
npm install
|
|
35
|
-
npm run build
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Quick Reference
|
|
39
|
-
|
|
40
|
-
| Command | Description |
|
|
41
|
-
|---------|-------------|
|
|
42
|
-
| `npm test` | Run tests |
|
|
43
|
-
| `npm run build` | Compile TypeScript |
|
|
44
|
-
| `npm run deploy:local` | Deploy to local OpenClaw |
|
|
45
|
-
| `npm run pack` | Create release package |
|
|
46
|
-
|
|
47
|
-
> See [DEVELOPMENT.md](./docs/DEVELOPMENT.md) for complete development guide.
|
|
48
|
-
|
|
49
30
|
## Quick Start
|
|
50
31
|
|
|
51
|
-
### 1.
|
|
32
|
+
### 1. Create a Bot Discussion (Optional)
|
|
52
33
|
|
|
53
|
-
|
|
34
|
+
Create a dedicated Bot discussion where all messages automatically trigger the AI:
|
|
54
35
|
|
|
55
36
|
```bash
|
|
56
|
-
openclaw lunkr
|
|
37
|
+
openclaw lunkr bot-create "My Bot"
|
|
57
38
|
```
|
|
58
39
|
|
|
59
|
-
|
|
40
|
+
### 2. Start Chatting
|
|
60
41
|
|
|
61
|
-
|
|
42
|
+
- **In Bot Discussions**: All messages automatically trigger the AI
|
|
43
|
+
- **In normal groups/DMs**: Use `/bot <message>` to trigger the AI
|
|
62
44
|
|
|
63
|
-
|
|
45
|
+
## Bot Discussions
|
|
64
46
|
|
|
65
|
-
|
|
66
|
-
channels:
|
|
67
|
-
lunkr:
|
|
68
|
-
enabled: true
|
|
69
|
-
botName: "AI Assistant"
|
|
70
|
-
commandPrefix: "/bot"
|
|
71
|
-
```
|
|
47
|
+
Bot Discussions are dedicated groups where all messages automatically trigger the AI agent without needing a command prefix.
|
|
72
48
|
|
|
73
|
-
###
|
|
49
|
+
### Create a Bot Discussion
|
|
74
50
|
|
|
75
51
|
```bash
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
### 4. Start Chatting
|
|
52
|
+
# Basic creation
|
|
53
|
+
openclaw lunkr bot-create "Help Desk"
|
|
80
54
|
|
|
81
|
-
|
|
82
|
-
|
|
55
|
+
# Associate with a specific agent (multi-agent routing)
|
|
56
|
+
openclaw lunkr bot-create "Sales Bot" --agent-id sales-agent
|
|
83
57
|
|
|
84
|
-
|
|
58
|
+
# Force create a new discussion (don't reuse existing)
|
|
59
|
+
openclaw lunkr bot-create "My Bot" --force
|
|
60
|
+
```
|
|
85
61
|
|
|
86
|
-
|
|
62
|
+
**Notes:**
|
|
63
|
+
- Discussion name is automatically formatted as `[Bot-<name>]`, e.g., `Help Desk` → `[Bot-Help Desk]`
|
|
64
|
+
- If a discussion with the same name already exists, it will be reused automatically
|
|
65
|
+
- Use `--force` to create a new discussion instead of reusing
|
|
87
66
|
|
|
88
|
-
|
|
89
|
-
channels:
|
|
90
|
-
lunkr:
|
|
91
|
-
enabled: true
|
|
92
|
-
botName: "Bot"
|
|
93
|
-
commandPrefix: "/bot"
|
|
94
|
-
dmPolicy: "allow"
|
|
95
|
-
groupPolicy: "allow"
|
|
96
|
-
```
|
|
67
|
+
**Options:**
|
|
97
68
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
|
101
|
-
|
|
102
|
-
| `
|
|
103
|
-
| `botName` | string | `"Bot"` | Display name for bot replies |
|
|
104
|
-
| `commandPrefix` | string | `"/bot"` | Prefix to trigger bot in normal chats |
|
|
105
|
-
| `dmPolicy` | string | `"allow"` | DM access policy: `allow`, `deny`, `whitelist` |
|
|
106
|
-
| `allowFrom` | string[] | `[]` | Whitelisted user IDs for DM (when `dmPolicy: whitelist`) |
|
|
107
|
-
| `groupPolicy` | string | `"allow"` | Group access policy: `allow`, `deny`, `whitelist` |
|
|
108
|
-
| `groups` | string[] | `[]` | Whitelisted group IDs (when `groupPolicy: whitelist`) |
|
|
109
|
-
| `botDiscussions` | object | `{}` | Bot discussion configurations |
|
|
110
|
-
|
|
111
|
-
### Bot Discussions
|
|
112
|
-
|
|
113
|
-
Bot Discussions are dedicated groups where all messages trigger the AI agent without needing a prefix:
|
|
114
|
-
|
|
115
|
-
```yaml
|
|
116
|
-
channels:
|
|
117
|
-
lunkr:
|
|
118
|
-
botDiscussions:
|
|
119
|
-
"discussion-id-123":
|
|
120
|
-
name: "AI Help Desk"
|
|
121
|
-
agentId: "support-agent"
|
|
122
|
-
creatorUid: "user-456"
|
|
123
|
-
createdAt: "2024-01-15T10:30:00Z"
|
|
124
|
-
```
|
|
69
|
+
| Option | Description |
|
|
70
|
+
|--------|-------------|
|
|
71
|
+
| `-a, --agent-id <id>` | Agent ID to associate (for multi-agent routing) |
|
|
72
|
+
| `-f, --force` | Force create new discussion, don't reuse existing |
|
|
73
|
+
| `--no-welcome` | Skip sending welcome message |
|
|
125
74
|
|
|
126
|
-
###
|
|
127
|
-
|
|
128
|
-
You can route different Bot Discussions to different AI agents:
|
|
129
|
-
|
|
130
|
-
```yaml
|
|
131
|
-
channels:
|
|
132
|
-
lunkr:
|
|
133
|
-
botDiscussions:
|
|
134
|
-
"sales-discussion":
|
|
135
|
-
name: "Sales Bot"
|
|
136
|
-
agentId: "sales-agent"
|
|
137
|
-
creatorUid: "admin"
|
|
138
|
-
createdAt: "2024-01-01T00:00:00Z"
|
|
139
|
-
"support-discussion":
|
|
140
|
-
name: "Support Bot"
|
|
141
|
-
agentId: "support-agent"
|
|
142
|
-
creatorUid: "admin"
|
|
143
|
-
createdAt: "2024-01-01T00:00:00Z"
|
|
144
|
-
```
|
|
75
|
+
### List Bot Discussions
|
|
145
76
|
|
|
146
|
-
|
|
77
|
+
```bash
|
|
78
|
+
openclaw lunkr bot-list
|
|
147
79
|
|
|
148
|
-
|
|
80
|
+
# Output as JSON
|
|
81
|
+
openclaw lunkr bot-list --json
|
|
82
|
+
```
|
|
149
83
|
|
|
150
|
-
|
|
151
|
-
- **`deny`**: Reject all DMs
|
|
152
|
-
- **`whitelist`**: Only accept DMs from users in `allowFrom`
|
|
84
|
+
### Delete a Bot Discussion
|
|
153
85
|
|
|
154
|
-
|
|
86
|
+
```bash
|
|
87
|
+
# Delete by name
|
|
88
|
+
openclaw lunkr bot-delete "Help Desk"
|
|
155
89
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
90
|
+
# Delete by GID
|
|
91
|
+
openclaw lunkr bot-delete --gid discussion-id-123
|
|
92
|
+
```
|
|
159
93
|
|
|
160
|
-
|
|
94
|
+
> **Note:** Deleting removes the discussion from both Lunkr server and OpenClaw configuration.
|
|
161
95
|
|
|
162
|
-
|
|
96
|
+
## CLI Commands
|
|
163
97
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
openclaw
|
|
167
|
-
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `openclaw lunkr login` | Login via QR code (when session expires) |
|
|
101
|
+
| `openclaw lunkr login-bypwd` | Login via email/password (OTP supported) |
|
|
102
|
+
| `openclaw lunkr skill-install [name]` | Enable skill (default: lunkr) |
|
|
103
|
+
| `openclaw lunkr skill-uninstall [name]` | Disable skill |
|
|
104
|
+
| `openclaw lunkr tool-install [name]` | Add tool to tools.alsoAllow |
|
|
105
|
+
| `openclaw lunkr tool-uninstall [name]` | Remove tool from tools.alsoAllow |
|
|
168
106
|
|
|
169
107
|
## Troubleshooting
|
|
170
108
|
|
|
@@ -186,8 +124,8 @@ openclaw pairing approve lunkr <code>
|
|
|
186
124
|
If you see authentication errors:
|
|
187
125
|
|
|
188
126
|
```bash
|
|
189
|
-
openclaw lunkr
|
|
190
|
-
openclaw
|
|
127
|
+
openclaw lunkr login
|
|
128
|
+
openclaw gateway restart
|
|
191
129
|
```
|
|
192
130
|
|
|
193
131
|
### Connection Issues
|