@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 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. Login to Lunkr
32
+ ### 1. Create a Bot Discussion (Optional)
52
33
 
53
- First, authenticate with your Lunkr account:
34
+ Create a dedicated Bot discussion where all messages automatically trigger the AI:
54
35
 
55
36
  ```bash
56
- openclaw lunkr login --email your-email@example.com
37
+ openclaw lunkr bot-create "My Bot"
57
38
  ```
58
39
 
59
- You will be prompted for your password. The session will be stored securely in `~/.lunkr-mcp/config.json`.
40
+ ### 2. Start Chatting
60
41
 
61
- ### 2. Enable the Channel
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
- Add Lunkr to your OpenClaw configuration:
45
+ ## Bot Discussions
64
46
 
65
- ```yaml
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
- ### 3. Restart the Gateway
49
+ ### Create a Bot Discussion
74
50
 
75
51
  ```bash
76
- openclaw gateway restart
77
- ```
78
-
79
- ### 4. Start Chatting
52
+ # Basic creation
53
+ openclaw lunkr bot-create "Help Desk"
80
54
 
81
- - **In Bot Discussions**: All messages automatically trigger the AI
82
- - **In normal groups/DMs**: Use `/bot <message>` to trigger the AI
55
+ # Associate with a specific agent (multi-agent routing)
56
+ openclaw lunkr bot-create "Sales Bot" --agent-id sales-agent
83
57
 
84
- ## Configuration
58
+ # Force create a new discussion (don't reuse existing)
59
+ openclaw lunkr bot-create "My Bot" --force
60
+ ```
85
61
 
86
- ### Basic Configuration
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
- ```yaml
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
- ### Configuration Options
99
-
100
- | Option | Type | Default | Description |
101
- |--------|------|---------|-------------|
102
- | `enabled` | boolean | `true` | Enable/disable the channel |
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
- ### Multi-Agent Routing
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
- ## Security
77
+ ```bash
78
+ openclaw lunkr bot-list
147
79
 
148
- ### DM Policies
80
+ # Output as JSON
81
+ openclaw lunkr bot-list --json
82
+ ```
149
83
 
150
- - **`allow`** (default): Accept DMs from all users
151
- - **`deny`**: Reject all DMs
152
- - **`whitelist`**: Only accept DMs from users in `allowFrom`
84
+ ### Delete a Bot Discussion
153
85
 
154
- ### Group Policies
86
+ ```bash
87
+ # Delete by name
88
+ openclaw lunkr bot-delete "Help Desk"
155
89
 
156
- - **`allow`** (default): Respond in all groups when mentioned
157
- - **`deny`**: Never respond in groups
158
- - **`whitelist`**: Only respond in groups listed in `groups`
90
+ # Delete by GID
91
+ openclaw lunkr bot-delete --gid discussion-id-123
92
+ ```
159
93
 
160
- ### Pairing
94
+ > **Note:** Deleting removes the discussion from both Lunkr server and OpenClaw configuration.
161
95
 
162
- Users can pair with the bot to be added to the whitelist:
96
+ ## CLI Commands
163
97
 
164
- ```bash
165
- # User sends a pairing code
166
- openclaw pairing approve lunkr <code>
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 logout
190
- openclaw lunkr login --email your-email@example.com
127
+ openclaw lunkr login
128
+ openclaw gateway restart
191
129
  ```
192
130
 
193
131
  ### Connection Issues