bereach-openclaw 0.2.9 → 0.2.10
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 +76 -1
- package/openclaw.plugin.json +8 -2
- package/package.json +1 -1
- package/src/tools/index.ts +12 -9
package/README.md
CHANGED
|
@@ -8,6 +8,21 @@ LinkedIn outreach automation via [BeReach](https://berea.ch). Registers 33 in-pr
|
|
|
8
8
|
openclaw plugins install bereach-openclaw
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Upgrade
|
|
12
|
+
|
|
13
|
+
`openclaw plugins update bereach` can leave `node_modules` and `extensions/` out of sync (version mismatch → trim/crash errors). **Use uninstall + reinstall** instead:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
openclaw plugins uninstall bereach
|
|
17
|
+
openclaw plugins install bereach-openclaw
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then restart the Gateway. Verify versions match:
|
|
21
|
+
```bash
|
|
22
|
+
cat /data/.openclaw/node_modules/bereach-openclaw/package.json | grep version
|
|
23
|
+
cat /data/.openclaw/extensions/bereach/package.json | grep version
|
|
24
|
+
```
|
|
25
|
+
|
|
11
26
|
## Setup
|
|
12
27
|
|
|
13
28
|
The API key can be set in 3 ways (in order of precedence):
|
|
@@ -26,11 +41,34 @@ The API key can be set in 3 ways (in order of precedence):
|
|
|
26
41
|
}
|
|
27
42
|
}
|
|
28
43
|
}
|
|
44
|
+
},
|
|
45
|
+
"tools": {
|
|
46
|
+
"allow": ["bereach"]
|
|
29
47
|
}
|
|
30
48
|
}
|
|
31
49
|
```
|
|
32
50
|
|
|
33
|
-
> **Note:**
|
|
51
|
+
> **Note:** `plugins.allow` loads the plugin; `tools.allow` enables the tools (they are registered with `optional: true`).
|
|
52
|
+
|
|
53
|
+
**Skills + model (optional)** — `skills.entries` has no `model` field; model is set at the agent level. To use Sonnet for BeReach:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"skills": {
|
|
58
|
+
"entries": {
|
|
59
|
+
"bereach": { "enabled": true }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"agents": {
|
|
63
|
+
"defaults": {
|
|
64
|
+
"model": { "primary": "anthropic/claude-sonnet-4-5" },
|
|
65
|
+
"models": {
|
|
66
|
+
"anthropic/claude-sonnet-4-5": { "alias": "sonnet" }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
34
72
|
|
|
35
73
|
**2. Environment variable** — `BEREACH_API_KEY=brc_xxx` in your shell or `export BEREACH_API_KEY="brc_xxx"` in `~/.bashrc`.
|
|
36
74
|
|
|
@@ -38,6 +76,43 @@ The API key can be set in 3 ways (in order of precedence):
|
|
|
38
76
|
|
|
39
77
|
Restart the Gateway after configuring.
|
|
40
78
|
|
|
79
|
+
## Troubleshooting
|
|
80
|
+
|
|
81
|
+
### "Cannot read properties of undefined (reading 'trim')" or "plugin disabled (not in allowlist)"
|
|
82
|
+
|
|
83
|
+
OpenClaw loads plugins from **two locations**:
|
|
84
|
+
- `node_modules/bereach-openclaw/` — the npm package (source)
|
|
85
|
+
- `extensions/bereach/` — the active copy OpenClaw uses at runtime
|
|
86
|
+
|
|
87
|
+
If `extensions/bereach/` is corrupt or incomplete, you get trim/undefined errors. Fix:
|
|
88
|
+
|
|
89
|
+
**1. Backup and remove the active extension:**
|
|
90
|
+
```bash
|
|
91
|
+
mv /data/.openclaw/extensions/bereach /data/.openclaw/extensions/bereach.bak.$(date +%s)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**2. Reinstall from npm (inside the container):**
|
|
95
|
+
```bash
|
|
96
|
+
cd /data/.openclaw
|
|
97
|
+
npm i bereach-openclaw@latest
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**3. Restart OpenClaw** so it rebuilds `extensions/bereach/` from the package.
|
|
101
|
+
|
|
102
|
+
**4. If `extensions/bereach/` is still incomplete after restart**, force a symlink:
|
|
103
|
+
```bash
|
|
104
|
+
rm -rf /data/.openclaw/extensions/bereach
|
|
105
|
+
ln -s /data/.openclaw/node_modules/bereach-openclaw /data/.openclaw/extensions/bereach
|
|
106
|
+
# then restart the container
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**5. Verify** — compare the two manifests:
|
|
110
|
+
```bash
|
|
111
|
+
wc -l /data/.openclaw/extensions/bereach/openclaw.plugin.json
|
|
112
|
+
wc -l /data/.openclaw/node_modules/bereach-openclaw/openclaw.plugin.json
|
|
113
|
+
```
|
|
114
|
+
They should match. Per [OpenClaw Plugin Manifest](https://docs.openclaw.ai/plugins/manifest), tools are registered at runtime via `api.registerTool()`.
|
|
115
|
+
|
|
41
116
|
## Usage
|
|
42
117
|
|
|
43
118
|
### Tools (33 registered)
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bereach",
|
|
3
3
|
"name": "BeReach",
|
|
4
|
+
"version": "0.2.10",
|
|
4
5
|
"description": "LinkedIn outreach automation — 33 tools, auto-reply commands, campaign monitoring",
|
|
5
6
|
"configSchema": {
|
|
6
7
|
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
+
"required": [
|
|
9
|
+
"BEREACH_API_KEY"
|
|
10
|
+
],
|
|
8
11
|
"additionalProperties": false,
|
|
9
12
|
"properties": {
|
|
10
13
|
"BEREACH_API_KEY": {
|
|
@@ -20,5 +23,8 @@
|
|
|
20
23
|
"sensitive": true,
|
|
21
24
|
"placeholder": "brc_..."
|
|
22
25
|
}
|
|
23
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"skills": [
|
|
28
|
+
"skills/bereach"
|
|
29
|
+
]
|
|
24
30
|
}
|
package/package.json
CHANGED
package/src/tools/index.ts
CHANGED
|
@@ -3,23 +3,26 @@ import { definitions } from "./definitions";
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Registers all 33 BeReach tools with the OpenClaw agent.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Format per https://docs.openclaw.ai/plugins/agent-tools
|
|
7
|
+
* optional: true — tools have side effects (messages, connections) and require BEREACH_API_KEY
|
|
8
8
|
*/
|
|
9
9
|
export function registerAllTools(api: any) {
|
|
10
10
|
for (const def of definitions) {
|
|
11
11
|
api.registerTool(
|
|
12
|
-
def.name,
|
|
13
12
|
{
|
|
13
|
+
name: def.name,
|
|
14
14
|
description: def.description,
|
|
15
15
|
parameters: def.parameters,
|
|
16
|
+
async execute(_id: string, params: Record<string, unknown>) {
|
|
17
|
+
const client = getClient();
|
|
18
|
+
const [resource, method] = def.handler.split(".");
|
|
19
|
+
const result = await (client as any)[resource][method](params);
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
|
|
22
|
+
};
|
|
23
|
+
},
|
|
16
24
|
},
|
|
17
|
-
|
|
18
|
-
const client = getClient();
|
|
19
|
-
const [resource, method] = def.handler.split(".");
|
|
20
|
-
const result = await (client as any)[resource][method](params);
|
|
21
|
-
return result;
|
|
22
|
-
},
|
|
25
|
+
{ optional: true },
|
|
23
26
|
);
|
|
24
27
|
}
|
|
25
28
|
}
|