@troykelly/openclaw-projects 0.0.1 → 0.0.5

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.
Files changed (106) hide show
  1. package/README.md +383 -249
  2. package/dist/api-client.d.ts.map +1 -1
  3. package/dist/api-client.js +9 -8
  4. package/dist/api-client.js.map +1 -1
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/config.d.ts +18 -66
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/config.js +52 -27
  10. package/dist/config.js.map +1 -1
  11. package/dist/context.d.ts.map +1 -1
  12. package/dist/context.js +1 -5
  13. package/dist/context.js.map +1 -1
  14. package/dist/gateway/oauth-rpc-methods.d.ts +119 -0
  15. package/dist/gateway/oauth-rpc-methods.d.ts.map +1 -0
  16. package/dist/gateway/oauth-rpc-methods.js +266 -0
  17. package/dist/gateway/oauth-rpc-methods.js.map +1 -0
  18. package/dist/gateway/rpc-methods.d.ts +2 -3
  19. package/dist/gateway/rpc-methods.d.ts.map +1 -1
  20. package/dist/gateway/rpc-methods.js +1 -7
  21. package/dist/gateway/rpc-methods.js.map +1 -1
  22. package/dist/hooks.d.ts.map +1 -1
  23. package/dist/hooks.js +11 -14
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.d.ts +9 -22
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +11 -31
  28. package/dist/index.js.map +1 -1
  29. package/dist/logger.d.ts.map +1 -1
  30. package/dist/logger.js.map +1 -1
  31. package/dist/register-openclaw.d.ts +7 -0
  32. package/dist/register-openclaw.d.ts.map +1 -1
  33. package/dist/register-openclaw.js +498 -46
  34. package/dist/register-openclaw.js.map +1 -1
  35. package/dist/secrets.d.ts +12 -0
  36. package/dist/secrets.d.ts.map +1 -1
  37. package/dist/secrets.js +59 -12
  38. package/dist/secrets.js.map +1 -1
  39. package/dist/services/notification-service.d.ts.map +1 -1
  40. package/dist/services/notification-service.js +4 -1
  41. package/dist/services/notification-service.js.map +1 -1
  42. package/dist/tools/contacts.d.ts.map +1 -1
  43. package/dist/tools/contacts.js +9 -34
  44. package/dist/tools/contacts.js.map +1 -1
  45. package/dist/tools/email-send.d.ts.map +1 -1
  46. package/dist/tools/email-send.js +5 -15
  47. package/dist/tools/email-send.js.map +1 -1
  48. package/dist/tools/file-share.d.ts.map +1 -1
  49. package/dist/tools/file-share.js +3 -10
  50. package/dist/tools/file-share.js.map +1 -1
  51. package/dist/tools/index.d.ts +2 -2
  52. package/dist/tools/index.d.ts.map +1 -1
  53. package/dist/tools/index.js +2 -0
  54. package/dist/tools/index.js.map +1 -1
  55. package/dist/tools/memory-forget.d.ts.map +1 -1
  56. package/dist/tools/memory-forget.js +14 -24
  57. package/dist/tools/memory-forget.js.map +1 -1
  58. package/dist/tools/memory-recall.d.ts.map +1 -1
  59. package/dist/tools/memory-recall.js +5 -33
  60. package/dist/tools/memory-recall.js.map +1 -1
  61. package/dist/tools/memory-store.d.ts +3 -3
  62. package/dist/tools/memory-store.d.ts.map +1 -1
  63. package/dist/tools/memory-store.js +12 -56
  64. package/dist/tools/memory-store.js.map +1 -1
  65. package/dist/tools/message-search.d.ts.map +1 -1
  66. package/dist/tools/message-search.js +7 -14
  67. package/dist/tools/message-search.js.map +1 -1
  68. package/dist/tools/notebooks.d.ts +4 -4
  69. package/dist/tools/notebooks.d.ts.map +1 -1
  70. package/dist/tools/notebooks.js +10 -42
  71. package/dist/tools/notebooks.js.map +1 -1
  72. package/dist/tools/notes.d.ts +4 -4
  73. package/dist/tools/notes.d.ts.map +1 -1
  74. package/dist/tools/notes.js +15 -65
  75. package/dist/tools/notes.js.map +1 -1
  76. package/dist/tools/projects.d.ts.map +1 -1
  77. package/dist/tools/projects.js +7 -34
  78. package/dist/tools/projects.js.map +1 -1
  79. package/dist/tools/relationships.d.ts.map +1 -1
  80. package/dist/tools/relationships.js +9 -53
  81. package/dist/tools/relationships.js.map +1 -1
  82. package/dist/tools/skill-store.d.ts +277 -0
  83. package/dist/tools/skill-store.d.ts.map +1 -0
  84. package/dist/tools/skill-store.js +813 -0
  85. package/dist/tools/skill-store.js.map +1 -0
  86. package/dist/tools/sms-send.d.ts.map +1 -1
  87. package/dist/tools/sms-send.js +3 -10
  88. package/dist/tools/sms-send.js.map +1 -1
  89. package/dist/tools/threads.d.ts.map +1 -1
  90. package/dist/tools/threads.js +12 -18
  91. package/dist/tools/threads.js.map +1 -1
  92. package/dist/tools/todos.d.ts.map +1 -1
  93. package/dist/tools/todos.js +6 -30
  94. package/dist/tools/todos.js.map +1 -1
  95. package/dist/types/openclaw-api.d.ts +29 -5
  96. package/dist/types/openclaw-api.d.ts.map +1 -1
  97. package/dist/types/openclaw-api.js +11 -0
  98. package/dist/types/openclaw-api.js.map +1 -1
  99. package/dist/utils/sanitize.d.ts +17 -0
  100. package/dist/utils/sanitize.d.ts.map +1 -0
  101. package/dist/utils/sanitize.js +36 -0
  102. package/dist/utils/sanitize.js.map +1 -0
  103. package/dist/utils/zod-to-json-schema.d.ts.map +1 -1
  104. package/dist/utils/zod-to-json-schema.js.map +1 -1
  105. package/openclaw.plugin.json +81 -17
  106. package/package.json +11 -3
package/README.md CHANGED
@@ -1,375 +1,508 @@
1
1
  # @troykelly/openclaw-projects
2
2
 
3
- An [OpenClaw](https://docs.openclaw.ai/) plugin that connects agents to the openclaw-projects backend for project management, memory, todos, and contacts.
3
+ An [OpenClaw](https://docs.openclaw.ai/) plugin that connects agents to the openclaw-projects backend for project management, memory, todos, contacts, and communications.
4
4
 
5
5
  > **Note:** This is a third-party plugin — not part of OpenClaw itself. It provides OpenClaw agents with tools to interact with the [openclaw-projects](https://github.com/troykelly/openclaw-projects) backend service.
6
6
 
7
+ ## Quickstart
8
+
9
+ Get from zero to a working plugin in under 5 minutes.
10
+
11
+ ### 1. Deploy the backend
12
+
13
+ Clone the repository and run the setup wizard:
14
+
15
+ ```bash
16
+ git clone https://github.com/troykelly/openclaw-projects.git
17
+ cd openclaw-projects
18
+ ./scripts/setup.sh
19
+ ```
20
+
21
+ The setup script generates a `.env` file with random secrets and sensible defaults. For CI or unattended setup, use `./scripts/setup.sh --non-interactive`.
22
+
23
+ ### 2. Start services
24
+
25
+ ```bash
26
+ docker compose -f docker-compose.quickstart.yml up -d
27
+ ```
28
+
29
+ Wait for all services to become healthy (this may take 30-60 seconds on first run):
30
+
31
+ ```bash
32
+ docker compose -f docker-compose.quickstart.yml ps
33
+ ```
34
+
35
+ Expected output:
36
+
37
+ ```
38
+ NAME STATUS
39
+ openclaw-qs-db running (healthy)
40
+ openclaw-qs-seaweedfs running (healthy)
41
+ openclaw-qs-migrate exited (0)
42
+ openclaw-qs-api running (healthy)
43
+ ```
44
+
45
+ ### 3. Verify the API is running
46
+
47
+ ```bash
48
+ curl http://localhost:3000/health
49
+ ```
50
+
51
+ Expected output:
52
+
53
+ ```json
54
+ {"status":"ok"}
55
+ ```
56
+
57
+ ### 4. Install the plugin
58
+
59
+ ```bash
60
+ openclaw plugins install @troykelly/openclaw-projects
61
+ ```
62
+
63
+ ### 5. Configure the plugin
64
+
65
+ Add to your OpenClaw config (`~/.openclaw/config.yaml`):
66
+
67
+ ```yaml
68
+ plugins:
69
+ entries:
70
+ openclaw-projects:
71
+ enabled: true
72
+ config:
73
+ apiUrl: http://localhost:3000
74
+ ```
75
+
76
+ The quickstart compose disables authentication by default, so no `apiKey` is needed. When you later switch to a production compose file with auth enabled, add `apiKey` with the `OPENCLAW_PROJECTS_AUTH_SECRET` value from your `.env` file. See [Configuration](#configuration) for details.
77
+
78
+ ### 6. Verify the connection
79
+
80
+ ```bash
81
+ openclaw openclaw-projects status
82
+ ```
83
+
84
+ Expected output when healthy:
85
+
86
+ ```
87
+ openclaw-projects status:
88
+ API URL: http://localhost:3000
89
+ Status: healthy
90
+ Auth: valid
91
+ Latency: 12ms
92
+ ```
93
+
94
+ If the status shows unhealthy, see [Troubleshooting](#troubleshooting) below.
95
+
96
+ ### Next steps
97
+
98
+ - See [Configuration](#configuration) for optional settings (embedding providers, SMS, email)
99
+ - See [Tools](#tools) for the 27 available agent tools
100
+ - See [Which compose file?](#which-compose-file) to choose the right deployment for your needs
101
+ - For the detailed installation guide, see [docs/installation.md](docs/installation.md)
102
+
103
+ ### Which compose file?
104
+
105
+ | File | Auth | Use case |
106
+ |------|------|----------|
107
+ | `docker-compose.quickstart.yml` | Disabled | Local development and testing (recommended for getting started) |
108
+ | `docker-compose.yml` | Enabled | Basic production deployment without TLS |
109
+ | `docker-compose.traefik.yml` | Enabled | Production with automatic TLS, HTTP/3, and WAF |
110
+ | `docker-compose.full.yml` | Enabled | All services including frontend and optional integrations |
111
+ | `docker-compose.test.yml` | Disabled | CI and automated testing |
112
+
113
+ Start with `docker-compose.quickstart.yml`. When you are ready for production, switch to `docker-compose.yml` or `docker-compose.traefik.yml` and configure your `apiKey` in the plugin config.
114
+
115
+ ### Moving to Production
116
+
117
+ When you're ready to move from the quickstart to a production setup:
118
+
119
+ 1. Stop the quickstart services: `docker compose -f docker-compose.quickstart.yml down`
120
+ 2. Open your `.env` file and find the `OPENCLAW_PROJECTS_AUTH_SECRET` value
121
+ 3. Set `OPENCLAW_PROJECTS_AUTH_DISABLED=false` in your `.env`
122
+ 4. Add the API key to your OpenClaw plugin config:
123
+ ```yaml
124
+ plugins:
125
+ entries:
126
+ openclaw-projects:
127
+ config:
128
+ apiUrl: https://your-domain.example.com
129
+ apiKey: your-OPENCLAW_PROJECTS_AUTH_SECRET-value
130
+ ```
131
+ 5. Switch to a production compose file: `docker compose -f docker-compose.yml up -d`
132
+
7
133
  ## Features
8
134
 
9
- - **Memory Management**: Store, recall, and forget memories with semantic search
135
+ - **Memory Management**: Store, recall, and forget memories with semantic search (pgvector)
10
136
  - **Project Management**: List, get, and create projects
11
137
  - **Todo Management**: Manage todos with completion tracking
12
- - **Contact Management**: Search, get, and create contacts
138
+ - **Contact Management**: Search, get, and create contacts with relationship mapping
139
+ - **Communications**: Send SMS (Twilio) and email (Postmark) directly from agents
140
+ - **Message History**: Search and browse message threads across channels
141
+ - **Skill Store**: Persist and query structured data for agent skills
13
142
  - **Auto-Recall**: Automatically inject relevant context into conversations
14
143
  - **Auto-Capture**: Capture important information from completed conversations
15
- - **CLI Commands**: Debug and manage the plugin from the command line
16
- - **Multi-User Support**: Flexible user scoping (agent, session, identity)
144
+ - **Bundled Skills**: 4 ready-to-use skills for common workflows
17
145
 
18
146
  ## Installation
19
147
 
148
+ ### Via OpenClaw CLI (recommended)
149
+
20
150
  ```bash
21
- pnpm add @troykelly/openclaw-projects
151
+ openclaw plugins install @troykelly/openclaw-projects
22
152
  ```
23
153
 
24
- ## Quick Start
154
+ Then configure the plugin in your OpenClaw config file (`~/.openclaw/config.yaml` or equivalent):
25
155
 
26
- ```typescript
27
- import { register } from '@troykelly/openclaw-projects'
156
+ ```yaml
157
+ plugins:
158
+ entries:
159
+ openclaw-projects:
160
+ enabled: true
161
+ config:
162
+ apiUrl: https://your-backend.example.com
163
+ apiKey: your-api-key
164
+ ```
28
165
 
29
- const plugin = register({
30
- config: {
31
- apiUrl: 'https://your-backend.example.com',
32
- apiKey: process.env.OPENCLAW_API_KEY,
33
- },
34
- })
166
+ ### Via npm (for programmatic use)
35
167
 
36
- // Use tools
37
- const result = await plugin.tools.memoryRecall.execute({
38
- query: 'user preferences',
39
- })
168
+ ```bash
169
+ pnpm add @troykelly/openclaw-projects
40
170
  ```
41
171
 
42
- ## Configuration
172
+ This method is for integrating the plugin programmatically outside of the OpenClaw runtime. Most users should use the OpenClaw CLI method above.
43
173
 
44
- | Option | Type | Default | Description |
45
- |--------|------|---------|-------------|
46
- | `apiUrl` | string | **required** | Backend API URL |
47
- | `apiKey` | string | **required** | API authentication key |
48
- | `autoRecall` | boolean | `true` | Enable auto-recall hook |
49
- | `autoCapture` | boolean | `true` | Enable auto-capture hook |
50
- | `userScoping` | string | `'agent'` | User scoping mode |
51
- | `maxRecallMemories` | number | `5` | Max memories to return |
52
- | `minRecallScore` | number | `0.7` | Minimum similarity score |
53
- | `timeout` | number | `30000` | API timeout (ms) |
54
- | `maxRetries` | number | `3` | Max retry attempts |
55
- | `debug` | boolean | `false` | Enable debug logging |
174
+ ## Verification
56
175
 
57
- ### User Scoping Modes
176
+ After installation, verify the plugin is loaded:
58
177
 
59
- | Mode | Description | Use Case |
60
- |------|-------------|----------|
61
- | `agent` | Scope by agent ID | Single user per agent |
62
- | `session` | Scope by session key | Maximum isolation |
63
- | `identity` | Scope by canonical identity | Shared identity across agents |
178
+ ```bash
179
+ openclaw plugins info openclaw-projects
180
+ ```
64
181
 
65
- ### Environment Variables
182
+ ### Health Check (status command)
183
+
184
+ The plugin includes a built-in health check that verifies API connectivity, authentication, and reports latency:
66
185
 
67
186
  ```bash
68
- OPENCLAW_API_URL=https://your-backend.example.com
69
- OPENCLAW_API_KEY=your-api-key
187
+ openclaw openclaw-projects status
70
188
  ```
71
189
 
72
- ## Tools
190
+ **Healthy output:**
73
191
 
74
- ### Memory Tools
192
+ ```
193
+ openclaw-projects status:
194
+ API URL: http://localhost:3000
195
+ Status: healthy
196
+ Auth: valid
197
+ Latency: 12ms
198
+ ```
75
199
 
76
- #### `memory_recall`
77
- Search memories semantically.
200
+ **Unhealthy output (backend unreachable):**
78
201
 
79
- ```typescript
80
- const result = await plugin.tools.memoryRecall.execute({
81
- query: 'user preferences for notifications',
82
- limit: 10, // optional, default: 5
83
- category: 'preference', // optional filter
84
- })
202
+ ```
203
+ openclaw-projects status:
204
+ API URL: http://localhost:3000
205
+ Status: unhealthy
206
+ Error: Connection refused (ECONNREFUSED)
85
207
  ```
86
208
 
87
- #### `memory_store`
88
- Save information to long-term memory.
209
+ **Unhealthy output (authentication failure):**
89
210
 
90
- ```typescript
91
- const result = await plugin.tools.memoryStore.execute({
92
- text: 'User prefers dark mode',
93
- category: 'preference', // preference, fact, decision, context, other
94
- importance: 0.8, // optional, 0-1
95
- })
211
+ ```
212
+ openclaw-projects status:
213
+ API URL: http://localhost:3000
214
+ Status: unhealthy
215
+ Auth: invalid (401 Unauthorized)
216
+ Latency: 8ms
96
217
  ```
97
218
 
98
- #### `memory_forget`
99
- Delete memories (GDPR data portability).
219
+ The status command checks:
220
+ - **API connectivity** -- can the plugin reach the backend URL?
221
+ - **Authentication** -- is the API key valid and accepted?
222
+ - **Response time** -- how long does the health check take (latency in ms)?
100
223
 
101
- ```typescript
102
- // By ID
103
- const result = await plugin.tools.memoryForget.execute({
104
- memoryId: '123e4567-e89b-12d3-a456-426614174000',
105
- })
224
+ Use this command as the first diagnostic step when tools fail or behave unexpectedly.
106
225
 
107
- // By query (bulk delete)
108
- const result = await plugin.tools.memoryForget.execute({
109
- query: 'outdated preferences',
110
- confirm: true, // required for bulk delete
111
- })
226
+ You can also use the general plugin doctor command:
227
+
228
+ ```bash
229
+ openclaw plugins doctor
112
230
  ```
113
231
 
114
- ### Project Tools
232
+ ## Configuration
115
233
 
116
- #### `project_list`
117
- List projects with optional filtering.
234
+ Configure the plugin in your OpenClaw config file or pass config programmatically.
118
235
 
119
- ```typescript
120
- const result = await plugin.tools.projectList.execute({
121
- status: 'active', // optional: active, completed, archived, on_hold
122
- limit: 20, // optional
123
- })
124
- ```
236
+ ### Required Settings
125
237
 
126
- #### `project_get`
127
- Get a specific project by ID.
238
+ | Option | Type | Description |
239
+ |--------|------|-------------|
240
+ | `apiUrl` | string | Backend API URL (must be HTTPS in production) |
128
241
 
129
- ```typescript
130
- const result = await plugin.tools.projectGet.execute({
131
- id: '123e4567-e89b-12d3-a456-426614174000',
132
- })
133
- ```
242
+ ### Authentication (Optional)
243
+
244
+ When your backend has authentication enabled, provide the API key via one of three methods. If your backend has auth disabled (e.g., the quickstart compose), no API key is needed.
245
+
246
+ | Method | Config Key | Description |
247
+ |--------|-----------|-------------|
248
+ | Direct value | `apiKey` | Plaintext key (for development only) |
249
+ | File reference | `apiKeyFile` | Path to file containing key (e.g., `~/.secrets/api_key`) |
250
+ | Command | `apiKeyCommand` | Shell command to retrieve key (e.g., `op read op://Personal/openclaw/api_key`) |
134
251
 
135
- #### `project_create`
136
- Create a new project.
252
+ ### Optional Settings
137
253
 
138
- ```typescript
139
- const result = await plugin.tools.projectCreate.execute({
140
- name: 'Home Renovation',
141
- description: 'Kitchen remodel project', // optional
142
- status: 'active', // optional
143
- })
254
+ | Option | Type | Default | Description |
255
+ |--------|------|---------|-------------|
256
+ | `autoRecall` | boolean | `true` | Inject relevant memories at conversation start |
257
+ | `autoCapture` | boolean | `true` | Capture important info from completed conversations |
258
+ | `userScoping` | string | `'agent'` | User scoping mode (`agent`, `session`, `identity`) |
259
+ | `maxRecallMemories` | number | `5` | Max memories to inject in auto-recall |
260
+ | `minRecallScore` | number | `0.7` | Minimum similarity score for auto-recall (0-1) |
261
+ | `timeout` | number | `30000` | API request timeout (ms) |
262
+ | `maxRetries` | number | `3` | Max retry attempts for failed requests |
263
+ | `debug` | boolean | `false` | Enable debug logging (never logs secrets) |
264
+
265
+ ### Secret Management
266
+
267
+ All secret fields (API key, Twilio credentials, Postmark token) support three resolution methods. The plugin resolves secrets in priority order: command > file > direct value.
268
+
269
+ ```yaml
270
+ plugins:
271
+ entries:
272
+ openclaw-projects:
273
+ enabled: true
274
+ config:
275
+ apiUrl: https://your-backend.example.com
276
+ # Option 1: Direct value (development only)
277
+ apiKey: sk-dev-key-here
278
+ # Option 2: File reference
279
+ # apiKeyFile: ~/.secrets/openclaw-api-key
280
+ # Option 3: Command (e.g., 1Password CLI)
281
+ # apiKeyCommand: op read op://Personal/openclaw/api_key
144
282
  ```
145
283
 
146
- ### Todo Tools
284
+ ### Twilio SMS (optional)
147
285
 
148
- #### `todo_list`
149
- List todos with optional filtering.
286
+ To enable SMS sending, add Twilio credentials using the same direct/file/command pattern:
150
287
 
151
- ```typescript
152
- const result = await plugin.tools.todoList.execute({
153
- projectId: '123e4567-e89b-12d3-a456-426614174000', // optional
154
- completed: false, // optional
155
- limit: 50, // optional
156
- })
288
+ ```yaml
289
+ twilioAccountSid: AC...
290
+ twilioAuthToken: your-auth-token
291
+ twilioPhoneNumber: "+15551234567"
157
292
  ```
158
293
 
159
- #### `todo_create`
160
- Create a new todo.
294
+ ### Postmark Email (optional)
295
+
296
+ To enable email sending, add Postmark credentials:
161
297
 
162
- ```typescript
163
- const result = await plugin.tools.todoCreate.execute({
164
- title: 'Buy groceries',
165
- projectId: '123e4567-e89b-12d3-a456-426614174000', // optional
166
- dueDate: '2024-01-15', // optional, ISO 8601
167
- })
298
+ ```yaml
299
+ postmarkToken: your-postmark-token
300
+ postmarkFromEmail: noreply@example.com
168
301
  ```
169
302
 
170
- #### `todo_complete`
171
- Mark a todo as complete.
303
+ ### User Scoping Modes
172
304
 
173
- ```typescript
174
- const result = await plugin.tools.todoComplete.execute({
175
- id: '123e4567-e89b-12d3-a456-426614174000',
176
- })
177
- ```
305
+ | Mode | Description | Use Case |
306
+ |------|-------------|----------|
307
+ | `agent` | Scope by agent ID; single user per agent | Personal assistant (default) |
308
+ | `session` | Scope by session key; maximum isolation | Sensitive operations |
309
+ | `identity` | Scope by canonical user identity across agents and sessions | Multi-agent setups, shared identity |
310
+
311
+ ## Tools
312
+
313
+ The plugin registers 27 tools that agents can use. Tools are automatically available to any agent with the plugin enabled.
314
+
315
+ ### Memory Tools
316
+
317
+ | Tool | Description |
318
+ |------|-------------|
319
+ | `memory_recall` | Search memories semantically by query |
320
+ | `memory_store` | Store a new memory (preference, fact, decision, context) |
321
+ | `memory_forget` | Delete memories by ID or search query |
322
+
323
+ ### Project Tools
324
+
325
+ | Tool | Description |
326
+ |------|-------------|
327
+ | `project_list` | List projects with optional status filter |
328
+ | `project_get` | Get full details of a specific project |
329
+ | `project_create` | Create a new project |
330
+
331
+ ### Todo Tools
332
+
333
+ | Tool | Description |
334
+ |------|-------------|
335
+ | `todo_list` | List todos, optionally filtered by project or status |
336
+ | `todo_create` | Create a new todo item |
337
+ | `todo_complete` | Mark a todo as complete |
178
338
 
179
339
  ### Contact Tools
180
340
 
181
- #### `contact_search`
182
- Search contacts.
341
+ | Tool | Description |
342
+ |------|-------------|
343
+ | `contact_search` | Search contacts by name, email, or other fields |
344
+ | `contact_get` | Get full details of a specific contact |
345
+ | `contact_create` | Create a new contact |
183
346
 
184
- ```typescript
185
- const result = await plugin.tools.contactSearch.execute({
186
- query: 'Alice',
187
- limit: 10, // optional
188
- })
189
- ```
347
+ ### Communication Tools
190
348
 
191
- #### `contact_get`
192
- Get a specific contact by ID.
349
+ | Tool | Description |
350
+ |------|-------------|
351
+ | `sms_send` | Send an SMS message (requires Twilio config) |
352
+ | `email_send` | Send an email message (requires Postmark config) |
353
+ | `message_search` | Search message history semantically |
354
+ | `thread_list` | List message threads (conversations) |
355
+ | `thread_get` | Get a thread with full message history |
193
356
 
194
- ```typescript
195
- const result = await plugin.tools.contactGet.execute({
196
- id: '123e4567-e89b-12d3-a456-426614174000',
197
- })
198
- ```
357
+ ### Relationship Tools
199
358
 
200
- #### `contact_create`
201
- Create a new contact.
359
+ | Tool | Description |
360
+ |------|-------------|
361
+ | `relationship_set` | Record a relationship between contacts |
362
+ | `relationship_query` | Query a contact's relationships |
202
363
 
203
- ```typescript
204
- const result = await plugin.tools.contactCreate.execute({
205
- name: 'Alice Smith',
206
- email: 'alice@example.com', // optional
207
- phone: '+1-555-123-4567', // optional
208
- })
209
- ```
364
+ ### Skill Store Tools
210
365
 
211
- ## Lifecycle Hooks
366
+ | Tool | Description |
367
+ |------|-------------|
368
+ | `skill_store_put` | Store or update data in the skill store |
369
+ | `skill_store_get` | Retrieve an item by ID or composite key |
370
+ | `skill_store_list` | List items with filtering and pagination |
371
+ | `skill_store_delete` | Delete an item (soft delete) |
372
+ | `skill_store_search` | Search items by text or semantic similarity |
373
+ | `skill_store_collections` | List all collections with item counts |
374
+ | `skill_store_aggregate` | Run aggregations on skill store items |
212
375
 
213
- ### `beforeAgentStart` (Auto-Recall)
376
+ ### Other Tools
214
377
 
215
- Automatically fetches relevant context before the agent processes a prompt.
378
+ | Tool | Description |
379
+ |------|-------------|
380
+ | `file_share` | Generate a time-limited shareable download link |
216
381
 
217
- ```typescript
218
- const context = await plugin.hooks.beforeAgentStart({
219
- prompt: 'What are my notification preferences?',
220
- })
382
+ ## Skills
221
383
 
222
- if (context) {
223
- // Prepend context.prependContext to the conversation
224
- }
225
- ```
384
+ The plugin includes 4 bundled skills that agents can invoke as high-level workflows. Skills combine multiple tools to accomplish common tasks.
226
385
 
227
- ### `agentEnd` (Auto-Capture)
386
+ ### `contact-lookup`
228
387
 
229
- Automatically captures important information after a conversation ends.
388
+ Look up contact information and recent communications.
230
389
 
231
- ```typescript
232
- await plugin.hooks.agentEnd({
233
- messages: [
234
- { role: 'user', content: 'Remember I prefer email notifications' },
235
- { role: 'assistant', content: 'Noted! I will remember your preference.' },
236
- ],
237
- })
390
+ ```
391
+ /contact-lookup name="Alice Smith"
238
392
  ```
239
393
 
240
- ## CLI Commands
394
+ Searches contacts, retrieves details, shows recent messages, related projects/tasks, and stored memories about the person.
241
395
 
242
- The plugin provides CLI command handlers that can be registered with OpenClaw:
396
+ ### `daily-summary`
243
397
 
244
- ### `status`
245
- Check API connectivity.
398
+ Get a summary of today's tasks, messages, and activities.
246
399
 
247
- ```typescript
248
- const result = await plugin.cli.status()
249
- // { success: true, message: 'API is healthy (latency: 50ms)', data: { ... } }
400
+ ```
401
+ /daily-summary
250
402
  ```
251
403
 
252
- ### `users`
253
- Show user scoping configuration.
404
+ Shows tasks due today, recent messages, upcoming deadlines, and items requiring attention.
254
405
 
255
- ```typescript
256
- const result = await plugin.cli.users()
257
- // { success: true, data: { scopingMode: 'agent', description: '...', currentUserId: '...' } }
258
- ```
406
+ ### `project-status`
259
407
 
260
- ### `recall`
261
- Search memories from CLI.
408
+ Get a status overview of a specific project.
262
409
 
263
- ```typescript
264
- const result = await plugin.cli.recall({ query: 'preferences', limit: 10 })
265
- // { success: true, data: { memories: [...], query: '...', limit: 10 } }
410
+ ```
411
+ /project-status project="Home Renovation"
266
412
  ```
267
413
 
268
- ### `stats`
269
- Show memory statistics.
414
+ Shows project overview, task breakdown with completion percentage, recent activity, blockers, and recommended next steps.
270
415
 
271
- ```typescript
272
- const result = await plugin.cli.stats()
273
- // { success: true, data: { totalMemories: 42, byCategory: { ... } } }
274
- ```
416
+ ### `send-reminder`
275
417
 
276
- ### `export`
277
- Export all memories (GDPR data portability).
418
+ Send a reminder message to a contact via SMS or email.
278
419
 
279
- ```typescript
280
- const result = await plugin.cli.export({ output: '/path/to/export.json' })
281
- // { success: true, data: { memories: [...], exportedAt: '...', userId: '...' } }
420
+ ```
421
+ /send-reminder contact="Alice" message="Don't forget the meeting tomorrow" channel="sms"
282
422
  ```
283
423
 
284
- ## Health Check
424
+ Looks up the contact, verifies their endpoint, sends the message, and confirms delivery.
285
425
 
286
- ```typescript
287
- const health = await plugin.healthCheck()
288
- if (!health.healthy) {
289
- console.error('Plugin unhealthy:', health.error)
290
- }
291
- ```
426
+ ## Lifecycle Hooks
427
+
428
+ ### `before_agent_start` (Auto-Recall)
429
+
430
+ When `autoRecall` is enabled (default), the plugin automatically searches for relevant memories before each conversation. It uses the user's prompt for semantic search and injects matching memories as context via `prependContext`.
431
+
432
+ ### `agent_end` (Auto-Capture)
433
+
434
+ When `autoCapture` is enabled (default), the plugin automatically analyzes completed conversations and stores important information (preferences, facts, decisions) as memories for future recall.
292
435
 
293
436
  ## Security
294
437
 
295
- ### API Key Management
438
+ ### Secret Management
296
439
 
297
- - Store API keys in environment variables, never in code
298
- - Use secrets management in production (Vault, AWS Secrets Manager, etc.)
299
- - Rotate keys regularly
440
+ - Use file references or command execution for secrets in production
441
+ - Direct values are for development only
442
+ - The plugin supports 1Password CLI, Vault, AWS Secrets Manager, or any command-line tool
443
+ - Secret files are checked for world-readable permissions (warns if `chmod 644`)
300
444
 
301
445
  ### Data Isolation
302
446
 
303
447
  - All data is scoped to the configured user scope
304
448
  - Cross-user access is prevented at the API level
305
- - Audit logs track all data access
449
+
450
+ ### HTTPS
451
+
452
+ - HTTPS is required in production (`NODE_ENV=production`)
453
+ - HTTP is permitted for local development only
306
454
 
307
455
  ### Sensitive Content
308
456
 
309
- - The plugin filters sensitive content (API keys, passwords, credit cards)
310
- - PII is not logged at info level
457
+ - Secrets are never logged (config is redacted in logs)
311
458
  - Error messages are sanitized to prevent information leakage
312
459
 
313
- ### HTTPS
460
+ ## Troubleshooting
314
461
 
315
- - Use HTTPS in production
316
- - HTTP is only recommended for local development
462
+ > **First step for any issue:** Run `openclaw openclaw-projects status` to check connectivity, authentication, and latency. See [Health Check](#health-check-status-command) above for expected output.
317
463
 
318
- ## Error Handling
464
+ ### Plugin not loading
319
465
 
320
- All tool executions return a result object:
466
+ Verify the plugin is installed and the manifest is detected:
321
467
 
322
- ```typescript
323
- interface ToolResult {
324
- success: boolean
325
- content?: string // Human-readable response
326
- data?: unknown // Structured data
327
- error?: string // Error message if success is false
328
- }
468
+ ```bash
469
+ openclaw plugins info openclaw-projects
329
470
  ```
330
471
 
331
- ## Troubleshooting
332
-
333
- ### Connection Issues
472
+ ### Connection issues
334
473
 
335
- ```typescript
336
- // Check health
337
- const health = await plugin.healthCheck()
338
- console.log('Healthy:', health.healthy, 'Error:', health.error)
474
+ Run the status command to diagnose:
339
475
 
340
- // Check status via CLI
341
- const status = await plugin.cli.status()
342
- console.log('Status:', status.message, 'Latency:', status.data?.latencyMs)
476
+ ```bash
477
+ openclaw openclaw-projects status
343
478
  ```
344
479
 
345
- ### No Memories Found
480
+ If the status shows unhealthy, check:
481
+ - Is the backend running? `curl http://localhost:3000/health`
482
+ - Is the `apiUrl` in your config correct?
483
+ - Are there firewall rules blocking the connection?
484
+
485
+ For detailed troubleshooting, see [docs/troubleshooting.md](docs/troubleshooting.md).
486
+
487
+ ### Authentication failures
488
+
489
+ If the status command reports `Auth: invalid`:
490
+ - Verify your `apiKey` matches the `OPENCLAW_PROJECTS_AUTH_SECRET` in the backend `.env`
491
+ - Check the secret retrieval method (file, command) is working
492
+ - If using the quickstart compose, auth is disabled by default (`OPENCLAW_PROJECTS_AUTH_DISABLED=true`). If you have overridden this to `false` (enabling auth), ensure your `apiKey` is correctly configured
493
+
494
+ ### No memories found
346
495
 
347
496
  - Verify the user scoping mode matches your setup
348
497
  - Check that memories were stored for the same user scope
349
498
  - Try broadening your search query
350
499
 
351
- ### API Errors
500
+ ### API errors
352
501
 
353
- - Verify API URL is correct and accessible
354
- - Check API key is valid
502
+ - Run `openclaw openclaw-projects status` to verify connectivity
503
+ - Check that the API key is valid
355
504
  - Review network connectivity
356
-
357
- ## API Reference
358
-
359
- Full TypeScript types are exported:
360
-
361
- ```typescript
362
- import type {
363
- PluginConfig,
364
- PluginInstance,
365
- MemoryRecallParams,
366
- MemoryStoreParams,
367
- ProjectListParams,
368
- TodoCreateParams,
369
- ContactSearchParams,
370
- // ... and more
371
- } from '@troykelly/openclaw-projects'
372
- ```
505
+ - Enable debug logging (`debug: true` in config) for detailed request/response info
373
506
 
374
507
  ## Contributing
375
508
 
@@ -385,5 +518,6 @@ MIT
385
518
  ## Links
386
519
 
387
520
  - [OpenClaw Documentation](https://docs.openclaw.ai/)
521
+ - [OpenClaw Plugin Guide](https://docs.openclaw.ai/plugins)
388
522
  - [openclaw-projects Backend](https://github.com/troykelly/openclaw-projects)
389
523
  - [Report Issues](https://github.com/troykelly/openclaw-projects/issues)