bereach-openclaw 1.5.0 → 1.5.1-beta.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/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/skills/bereach/SKILL.md +13 -1
- package/src/commands/index.ts +16 -0
- package/src/hooks/context.ts +15 -1
- package/src/index.ts +1 -7
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.1-beta.2",
|
|
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": "1.5.0"
|
|
50
|
+
"bereach": "^1.5.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
+
"@playwright/test": "^1.52.0",
|
|
53
54
|
"@types/node": "^25.5.0",
|
|
54
55
|
"@upstash/box": "^0.1.30",
|
|
55
56
|
"tsx": "^4.21.0",
|
|
56
57
|
"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/skills/bereach/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bereach
|
|
3
3
|
description: "Automate LinkedIn outreach via BeReach (bereach.ai). Use when: prospecting, engaging posts, scraping engagement, searching LinkedIn, managing inbox, running campaigns, managing invitations, analytics, company pages, Sales Navigator, content engagement, feed monitoring. Requires BEREACH_API_KEY."
|
|
4
|
-
lastUpdatedAt:
|
|
4
|
+
lastUpdatedAt: 1775561761
|
|
5
5
|
metadata: { "openclaw": { "requires": { "env": ["BEREACH_API_KEY"] }, "primaryEnv": "BEREACH_API_KEY" } }
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -41,6 +41,18 @@ At install or upgrade, set up the workspace with these templates:
|
|
|
41
41
|
|
|
42
42
|
**Step 0 (mandatory at install/upgrade):** Check if SOUL.md contains `<!-- bereach-workspace-v`. If missing: fetch soul-template.md from the URL above (or via `GET /api/onboarding/soul`), write it into the user's SOUL.md between the markers. This step cannot be skipped.
|
|
43
43
|
|
|
44
|
+
## API Key Setup
|
|
45
|
+
|
|
46
|
+
When the user provides their BeReach API key (`brc_...`):
|
|
47
|
+
|
|
48
|
+
1. Tell them to paste this command in chat: `/bereach-set-key brc_THEIR_KEY` (replacing with their actual key)
|
|
49
|
+
2. Tell them to restart the gateway: `openclaw gateway restart`
|
|
50
|
+
3. After restart, start a new chat with `/new`
|
|
51
|
+
|
|
52
|
+
If the user doesn't have a key, direct them to https://bereach.ai/token
|
|
53
|
+
|
|
54
|
+
**Never** try to set the key via environment variables, auth profiles, or manual config edits. Always use `/bereach-set-key`.
|
|
55
|
+
|
|
44
56
|
## Two Modes of Operation
|
|
45
57
|
|
|
46
58
|
### Interactive Mode
|
package/src/commands/index.ts
CHANGED
|
@@ -5,6 +5,22 @@ export function registerCommands(api: any, state?: SessionState, apiKey?: string
|
|
|
5
5
|
if (typeof api?.registerCommand !== "function") return;
|
|
6
6
|
const resolvedKey = apiKey ?? "";
|
|
7
7
|
|
|
8
|
+
api.registerCommand({
|
|
9
|
+
name: "bereach-set-key",
|
|
10
|
+
description: "Save your BeReach API key (brc_...) to plugin config",
|
|
11
|
+
handler: async (_args: string) => {
|
|
12
|
+
const key = _args?.trim();
|
|
13
|
+
if (!key || !key.startsWith("brc_")) {
|
|
14
|
+
return { text: "Invalid key. Your BeReach API key must start with `brc_`. Get it at https://bereach.ai/token" };
|
|
15
|
+
}
|
|
16
|
+
if (typeof api?.config?.set !== "function") {
|
|
17
|
+
return { text: "Cannot save key: config API not available. Set BEREACH_API_KEY as an environment variable instead." };
|
|
18
|
+
}
|
|
19
|
+
api.config.set("plugins.entries.bereach-openclaw.config.BEREACH_API_KEY", key);
|
|
20
|
+
return { text: `API key saved (…${key.slice(-6)}). Restart the gateway to apply:\n\`openclaw gateway restart\`` };
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
8
24
|
api.registerCommand({
|
|
9
25
|
name: "bereach-credits",
|
|
10
26
|
description: "Show current BeReach credit balance",
|
package/src/hooks/context.ts
CHANGED
|
@@ -1011,7 +1011,21 @@ export function registerContextHook(api: any, apiKey: string | undefined, state:
|
|
|
1011
1011
|
const resolvedKey = api?.pluginConfig?.BEREACH_API_KEY ?? api?.pluginConfig?.apiKey ?? apiKey;
|
|
1012
1012
|
const key = typeof resolvedKey === "string" && resolvedKey.trim() ? resolvedKey.trim() : undefined;
|
|
1013
1013
|
if (!key) {
|
|
1014
|
-
return { appendSystemContext:
|
|
1014
|
+
return { appendSystemContext: [
|
|
1015
|
+
"IMPORTANT: BeReach plugin is installed but no API key is configured.",
|
|
1016
|
+
"",
|
|
1017
|
+
"If the user provides their BeReach API key (a string starting with brc_):",
|
|
1018
|
+
"- Tell them to paste this command in chat: /bereach-set-key brc_THEIR_KEY",
|
|
1019
|
+
"- Then restart the gateway: openclaw gateway restart",
|
|
1020
|
+
"- Then start a new chat: /new",
|
|
1021
|
+
"",
|
|
1022
|
+
"If the user has NOT provided a key yet:",
|
|
1023
|
+
"- Ask them for their BeReach API key",
|
|
1024
|
+
"- They can get one at https://bereach.ai/token",
|
|
1025
|
+
"",
|
|
1026
|
+
"The /bereach-set-key command saves the key securely in the plugin config.",
|
|
1027
|
+
"Do NOT suggest environment variables, config.patch, or any other method.",
|
|
1028
|
+
].join("\n") };
|
|
1015
1029
|
}
|
|
1016
1030
|
|
|
1017
1031
|
// Detect task mode
|
package/src/index.ts
CHANGED
|
@@ -53,13 +53,7 @@ export default function register(api: any) {
|
|
|
53
53
|
|
|
54
54
|
const apiKey = resolveApiKey(api);
|
|
55
55
|
if (!apiKey) {
|
|
56
|
-
log("WARNING: BEREACH_API_KEY is not configured.
|
|
57
|
-
if (typeof api?.injectContext === "function") {
|
|
58
|
-
api.injectContext({
|
|
59
|
-
key: "bereach-warning",
|
|
60
|
-
content: "BeReach plugin is installed but BEREACH_API_KEY is not configured. Set it via plugin settings to enable LinkedIn automation.",
|
|
61
|
-
});
|
|
62
|
-
}
|
|
56
|
+
log("WARNING: BEREACH_API_KEY is not configured. Setup instructions injected via before_prompt_build hook.");
|
|
63
57
|
}
|
|
64
58
|
|
|
65
59
|
const config: Partial<PluginConfig> = {
|