bereach-openclaw 1.5.1-beta.2 → 1.5.3
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/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/src/tools/index.ts +4 -1
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bereach-openclaw",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "BeReach LinkedIn automation plugin for OpenClaw",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"exports": {
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@bereach/tools": "*",
|
|
50
|
-
"bereach": "
|
|
50
|
+
"bereach": "1.5.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@playwright/test": "^1.52.0",
|
|
54
53
|
"@types/node": "^25.5.0",
|
|
55
54
|
"@upstash/box": "^0.1.30",
|
|
56
55
|
"tsx": "^4.21.0",
|
|
57
56
|
"typescript": "^6.0.2",
|
|
57
|
+
"@playwright/test": "^1.52.0",
|
|
58
58
|
"vitest": "^4.1.2",
|
|
59
59
|
"zod": "^4.3.6"
|
|
60
60
|
}
|
package/src/tools/index.ts
CHANGED
|
@@ -65,6 +65,9 @@ async function executeApiCall(def: ToolDefinition, params: Record<string, unknow
|
|
|
65
65
|
|
|
66
66
|
if (!resp.ok) {
|
|
67
67
|
const errorBody = await resp.text();
|
|
68
|
+
if (resp.status === 401) {
|
|
69
|
+
throw new Error(`BeReach API key is invalid or expired (401 Unauthorized). The user should get a valid key at https://bereach.ai/token and set it with: /bereach-set-key brc_NEW_KEY`);
|
|
70
|
+
}
|
|
68
71
|
throw new Error(`API ${method} ${path} failed (${resp.status}): ${errorBody}`);
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -148,7 +151,7 @@ export function registerAllTools(api: any, taskType?: string) {
|
|
|
148
151
|
const apiKey = resolveApiKey(api);
|
|
149
152
|
if (!apiKey) {
|
|
150
153
|
return {
|
|
151
|
-
content: [{ type: "text" as const, text: JSON.stringify({ success: false, error: "BEREACH_API_KEY not configured.
|
|
154
|
+
content: [{ type: "text" as const, text: JSON.stringify({ success: false, error: "BEREACH_API_KEY not configured. The user should get their key at https://bereach.ai/token and set it with: /bereach-set-key brc_THEIR_KEY" }) }],
|
|
152
155
|
};
|
|
153
156
|
}
|
|
154
157
|
|