@superagnt/heyreach-outreach 2.0.2 → 2.0.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/README.md CHANGED
@@ -8,21 +8,20 @@ Connect your HeyReach workspace to superagnt to automate LinkedIn outreach campa
8
8
  openclaw plugins install @superagnt/heyreach-outreach
9
9
  ```
10
10
 
11
- This package is the official **OpenClaw** plugin for the **HeyReach** integration via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com) and your superagnt API key.
11
+ This package is the official **OpenClaw** plugin for the **HeyReach** integration via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com/docs) and your superagnt API key.
12
12
 
13
- ## Live MCP mode (recommended)
13
+ ## Want the live MCP surface instead?
14
14
 
15
- Set a workspace MCP token and the plugin upgrades itself at load: it fetches
16
- the live tool list from the scoped MCP endpoint and proxies calls through it —
17
- the tool surface then grows with `agnt_tools_enable`, no plugin update needed.
15
+ This plugin ships a fixed, baked-in toolset that only needs your
16
+ `SUPERAGNT_API_KEY`. For the live workspace tool surface — the full value
17
+ layer (data sources plus workspace Postgres, schedules, canvases,
18
+ enrichment), growing server-side with no plugin update — install the
19
+ primary superagnt plugin instead:
18
20
 
19
21
  ```bash
20
- export SUPERAGNT_MCP_TOKEN=... # from the MCP server card in the dashboard
22
+ openclaw plugins install @superagnt/superagnt
21
23
  ```
22
24
 
23
- Without the token the plugin uses its built-in toolset with your
24
- `SUPERAGNT_API_KEY` — no behavior change from previous versions.
25
-
26
25
  ## Overview
27
26
 
28
27
  OpenClaw plugin for HeyReach LinkedIn outreach — manage campaigns, leads, lead lists, conversations, and analytics with your superagnt API key.
@@ -67,8 +66,8 @@ Set `SUPERAGNT_API_KEY` in your environment, or complete browser login when the
67
66
 
68
67
  ## Documentation
69
68
 
70
- - [Documentation](https://superagnt.com) — getting started and concepts
71
- - [Connection guide (HeyReach)](https://superagnt.com/connections/heyreach) — setup and endpoints
69
+ - [Documentation](https://superagnt.com/docs) — getting started and concepts
70
+ - [Connection guide (HeyReach)](https://superagnt.com/docs) — setup and endpoints
72
71
  - [Dashboard](https://app.superagnt.com/dashboard) — API keys and usage
73
72
 
74
73
  ## Related
package/index.js CHANGED
@@ -28,194 +28,6 @@ function readAgntConfig() {
28
28
 
29
29
  // ── End Auth Module ──────────────────────────────────────────────────────────
30
30
 
31
-
32
- // ── CLI Module (inlined) ─────────────────────────────────────────────────────
33
-
34
- function maskApiKey(key) {
35
- if (!key || typeof key !== 'string') return '(none)'
36
- const k = key.trim()
37
- if (k.length <= 8) return k.slice(0, 2) + '…'
38
- return k.slice(0, 6) + '…' + k.slice(-4)
39
- }
40
-
41
- function registerAgntCli(api) {
42
- api.registerCli(
43
- ({ program }) => {
44
- const cmd = program
45
- .command('superagnt')
46
- .description('superagnt social data API (status, doctor)')
47
-
48
- cmd
49
- .command('status')
50
- .description('Show whether an API key is configured (masked)')
51
- .action(async () => {
52
- const cfg = readAgntConfig()
53
- const key = cfg?.apiKey
54
-
55
- console.log('\nsuperagnt status\n')
56
- if (!key) {
57
- console.log(' API key: not configured')
58
- console.log(' Workspace: —')
59
- console.log('\n Get your API key at: https://app.superagnt.com/dashboard\n')
60
- return
61
- }
62
- console.log(' API key: ' + maskApiKey(key) + ' (from ~/.superagnt/config.json)')
63
- console.log(' Workspace: ' + (cfg?.workspaceId ?? '—'))
64
- console.log('')
65
- })
66
-
67
- cmd
68
- .command('doctor')
69
- .description('Check connectivity and validate API key against api.superagnt.dev')
70
- .action(async () => {
71
- console.log('\nsuperagnt doctor\n')
72
-
73
- try {
74
- const publicRes = await fetch('https://api.superagnt.com/v1/platforms')
75
- console.log(' Public API: ' + (publicRes.ok ? 'OK (' + publicRes.status + ')' : 'HTTP ' + publicRes.status))
76
- } catch (err) {
77
- const msg = err instanceof Error ? err.message : String(err)
78
- console.log(' Public API: failed — ' + msg)
79
- }
80
-
81
- const cfg = readAgntConfig()
82
- const key = cfg?.apiKey
83
-
84
- if (!key) {
85
- console.log('\n Authenticated: skipped (no API key)')
86
- console.log(' Get your API key at: https://app.superagnt.com/dashboard\n')
87
- return
88
- }
89
-
90
- try {
91
- const res = await fetch('https://api.superagnt.com/v1/platforms', {
92
- headers: { Authorization: 'Bearer ' + key },
93
- })
94
- const text = await res.text()
95
- let summary = 'HTTP ' + res.status
96
- if (res.ok) {
97
- try {
98
- const json = JSON.parse(text)
99
- const n = Array.isArray(json?.data) ? json.data.length : (json?.data ? Object.keys(json.data).length : 'ok')
100
- summary = 'OK — platforms payload received (' + (typeof n === 'number' ? n + ' entries' : String(n)) + ')'
101
- } catch {
102
- summary = 'OK (' + res.status + ')'
103
- }
104
- }
105
- console.log(' Authenticated: ' + summary)
106
- if (!res.ok) {
107
- console.log(' If 401, get a new key at: https://app.superagnt.com/dashboard')
108
- }
109
- } catch (err) {
110
- const msg = err instanceof Error ? err.message : String(err)
111
- console.log(' Authenticated: failed — ' + msg)
112
- }
113
- console.log('')
114
- })
115
- },
116
- { commands: ['superagnt'] },
117
- )
118
- }
119
-
120
- // ── End CLI Module ───────────────────────────────────────────────────────────
121
-
122
-
123
- // ── System prompt (inlined) ─────────────────────────────────────────────────
124
-
125
- function getSystemPrompt(state) {
126
- const scope = "Only the HeyReach integration (heyreach)."
127
- if (state.ready && state.toolCount > 0) {
128
- return (
129
- '<superagnt>\n' +
130
- 'Ignore pretrained knowledge about superagnt tool names — use only tools that exist in this session.\n' +
131
- '\n' +
132
- '## What superagnt is\n' +
133
- 'superagnt exposes **structured social-data HTTP APIs** behind OpenClaw tools. Scope for this plugin: **' + scope + '**.\n' +
134
- '\n' +
135
- '## When to use superagnt tools\n' +
136
- '- Use superagnt when the user needs **live social/network data** (profiles, posts, companies, comments, etc.) from supported platforms.\n' +
137
- '- Prefer **discovery** when unsure which endpoint fits: call public discovery (GET /v1/platforms and GET /v1/platforms/{slug}) or read tool descriptions; do not invent endpoints or parameters.\n' +
138
- '\n' +
139
- '## Platform selection (high level)\n' +
140
- '- **linkedin** — B2B enrichment, org/person research, hiring/sales workflows\n' +
141
- '- **youtube** / **tiktok** — video/creator/channel metadata and content signals\n' +
142
- '- **x** / **reddit** — short-form social and community threads\n' +
143
- '- **instagram** — visual/creator discovery where Instagram is the source of truth\n' +
144
- '- **facebook** — pages/groups/marketplace/adjacent Facebook surface areas exposed by the API\n' +
145
- '\n' +
146
- '## Rules\n' +
147
- '- Do **not** fabricate tool names — pick from the registered superagnt_* tools only.\n' +
148
- '- If authentication fails (401), tell the user to get a new key at https://app.superagnt.com/dashboard\n' +
149
- '</superagnt>'
150
- )
151
- }
152
-
153
- if (state.ready && state.toolCount === 0) {
154
- return (
155
- '<superagnt>\n' +
156
- 'The superagnt plugin loaded but registered **zero** API tools. Check your OpenClaw plugin packaging and regenerate the plugin from @superagnt/clawhub.\n' +
157
- '</superagnt>'
158
- )
159
- }
160
-
161
- if (state.error) {
162
- return (
163
- '<superagnt>\n' +
164
- 'superagnt plugin diagnostic: ' + state.error + '\n' +
165
- 'Do not pretend superagnt tools exist. Ask the user to fix configuration and restart the gateway.\n' +
166
- '</superagnt>'
167
- )
168
- }
169
-
170
- return (
171
- '<superagnt>\n' +
172
- 'superagnt tools are still loading. If the user asks for social data right now, ask them to wait a moment and retry.\n' +
173
- '</superagnt>'
174
- )
175
- }
176
-
177
- // ── End System prompt ────────────────────────────────────────────────────────
178
-
179
- const MCP_URL = 'https://mcp.superagnt.com/mcp'
180
-
181
- async function mcpRpc(token, method, params) {
182
- const res = await fetch(MCP_URL, {
183
- method: 'POST',
184
- headers: {
185
- Authorization: `Bearer ${token}`,
186
- 'Content-Type': 'application/json',
187
- Accept: 'application/json, text/event-stream',
188
- },
189
- body: JSON.stringify({ jsonrpc: '2.0', id: Date.now(), method, params }),
190
- })
191
- if (!res.ok) throw new Error(`MCP ${method} failed: HTTP ${res.status}`)
192
- const data = await res.json()
193
- if (data.error) throw new Error(`MCP ${method} error: ${data.error.message}`)
194
- return data.result
195
- }
196
-
197
- async function registerLiveMcpTools(api, token) {
198
- const result = await mcpRpc(token, 'tools/list', {})
199
- const tools = Array.isArray(result?.tools) ? result.tools : []
200
- if (tools.length === 0) throw new Error('MCP tools/list returned no tools')
201
- for (const t of tools) {
202
- api.registerTool({
203
- name: t.name,
204
- description: t.description,
205
- inputSchema: t.inputSchema,
206
- execute: async (input) => {
207
- const args = parseToolInput(input)
208
- const r = await mcpRpc(token, 'tools/call', { name: t.name, arguments: args })
209
- if (r && r.structuredContent !== undefined) return r.structuredContent
210
- const text = Array.isArray(r?.content) ? r.content.find((c) => c.type === 'text')?.text : undefined
211
- if (text === undefined) return r
212
- try { return JSON.parse(text) } catch { return text }
213
- },
214
- })
215
- }
216
- return tools.length
217
- }
218
-
219
31
  function parseToolInput(input) {
220
32
  if (input == null) return {}
221
33
  if (typeof input === 'object' && !Array.isArray(input)) return input
@@ -267,9 +79,8 @@ async function callSuperagnt(apiKey, method, path, query, body) {
267
79
  return res.json()
268
80
  }
269
81
 
270
- export default async function register(api) {
82
+ export default function register(api) {
271
83
  const apiKey = api.pluginConfig.apiKey || process.env.SUPERAGNT_API_KEY || readAgntConfig()?.apiKey
272
- const mcpToken = api.pluginConfig.mcpToken || process.env.SUPERAGNT_MCP_TOKEN
273
84
 
274
85
  function ensureApiKey() {
275
86
  if (apiKey) return apiKey
@@ -281,26 +92,6 @@ export default async function register(api) {
281
92
  )
282
93
  }
283
94
 
284
- registerAgntCli(api)
285
-
286
- const promptState = { toolCount: 0, error: '', ready: false }
287
- api.on('before_prompt_build', () => ({
288
- prependSystemContext: getSystemPrompt(promptState),
289
- }))
290
-
291
- // Live MCP mode: a workspace MCP token upgrades this plugin to the server's
292
- // own tool surface, fetched fresh at load — it grows with agnt_tools_enable
293
- // and never goes stale. Any failure falls back to the baked toolset below.
294
- if (mcpToken) {
295
- try {
296
- promptState.toolCount = await registerLiveMcpTools(api, mcpToken)
297
- promptState.ready = true
298
- return
299
- } catch (err) {
300
- promptState.error = 'Live MCP connect failed (' + (err && err.message ? err.message : err) + '); using the built-in toolset.'
301
- }
302
- }
303
-
304
95
  api.registerTool({
305
96
  name: 'superagnt_connection_heyreach_auth_check_api_key',
306
97
  description: "Check API Key",
@@ -309,7 +100,7 @@ export default async function register(api) {
309
100
  "properties": {}
310
101
  },
311
102
  execute: async (input) => {
312
- const key = await ensureApiKey()
103
+ const key = ensureApiKey()
313
104
  const params = parseToolInput(input)
314
105
  return callSuperagnt(key, 'GET', '/auth/CheckApiKey', params)
315
106
  },
@@ -344,7 +135,7 @@ export default async function register(api) {
344
135
  }
345
136
  },
346
137
  execute: async (input) => {
347
- const key = await ensureApiKey()
138
+ const key = ensureApiKey()
348
139
  const params = parseToolInput(input)
349
140
  return callSuperagnt(key, 'POST', '/campaign/GetAll', undefined, params)
350
141
  },
@@ -366,7 +157,7 @@ export default async function register(api) {
366
157
  ]
367
158
  },
368
159
  execute: async (input) => {
369
- const key = await ensureApiKey()
160
+ const key = ensureApiKey()
370
161
  const params = parseToolInput(input)
371
162
  return callSuperagnt(key, 'GET', '/campaign/GetById', params)
372
163
  },
@@ -388,7 +179,7 @@ export default async function register(api) {
388
179
  ]
389
180
  },
390
181
  execute: async (input) => {
391
- const key = await ensureApiKey()
182
+ const key = ensureApiKey()
392
183
  const params = parseToolInput(input)
393
184
  return callSuperagnt(key, 'POST', '/campaign/Pause', undefined, params)
394
185
  },
@@ -410,7 +201,7 @@ export default async function register(api) {
410
201
  ]
411
202
  },
412
203
  execute: async (input) => {
413
- const key = await ensureApiKey()
204
+ const key = ensureApiKey()
414
205
  const params = parseToolInput(input)
415
206
  return callSuperagnt(key, 'POST', '/campaign/Resume', undefined, params)
416
207
  },
@@ -432,7 +223,7 @@ export default async function register(api) {
432
223
  ]
433
224
  },
434
225
  execute: async (input) => {
435
- const key = await ensureApiKey()
226
+ const key = ensureApiKey()
436
227
  const params = parseToolInput(input)
437
228
  return callSuperagnt(key, 'POST', '/campaign/StartCampaign', undefined, params)
438
229
  },
@@ -473,7 +264,7 @@ export default async function register(api) {
473
264
  ]
474
265
  },
475
266
  execute: async (input) => {
476
- const key = await ensureApiKey()
267
+ const key = ensureApiKey()
477
268
  const params = parseToolInput(input)
478
269
  return callSuperagnt(key, 'POST', '/campaign/Create', undefined, params)
479
270
  },
@@ -525,7 +316,7 @@ export default async function register(api) {
525
316
  ]
526
317
  },
527
318
  execute: async (input) => {
528
- const key = await ensureApiKey()
319
+ const key = ensureApiKey()
529
320
  const params = parseToolInput(input)
530
321
  return callSuperagnt(key, 'POST', '/campaign/CreateCampaignFromTemplate', undefined, params)
531
322
  },
@@ -571,7 +362,7 @@ export default async function register(api) {
571
362
  ]
572
363
  },
573
364
  execute: async (input) => {
574
- const key = await ensureApiKey()
365
+ const key = ensureApiKey()
575
366
  const params = parseToolInput(input)
576
367
  return callSuperagnt(key, 'POST', '/campaign/UpdateSettings', undefined, params)
577
368
  },
@@ -598,7 +389,7 @@ export default async function register(api) {
598
389
  ]
599
390
  },
600
391
  execute: async (input) => {
601
- const key = await ensureApiKey()
392
+ const key = ensureApiKey()
602
393
  const params = parseToolInput(input)
603
394
  return callSuperagnt(key, 'POST', '/campaign/UpdateSchedule', undefined, params)
604
395
  },
@@ -625,7 +416,7 @@ export default async function register(api) {
625
416
  ]
626
417
  },
627
418
  execute: async (input) => {
628
- const key = await ensureApiKey()
419
+ const key = ensureApiKey()
629
420
  const params = parseToolInput(input)
630
421
  return callSuperagnt(key, 'POST', '/campaign/UpdateAccounts', undefined, params)
631
422
  },
@@ -652,7 +443,7 @@ export default async function register(api) {
652
443
  ]
653
444
  },
654
445
  execute: async (input) => {
655
- const key = await ensureApiKey()
446
+ const key = ensureApiKey()
656
447
  const params = parseToolInput(input)
657
448
  return callSuperagnt(key, 'POST', '/campaign/UpdateSequence', undefined, params)
658
449
  },
@@ -674,7 +465,7 @@ export default async function register(api) {
674
465
  ]
675
466
  },
676
467
  execute: async (input) => {
677
- const key = await ensureApiKey()
468
+ const key = ensureApiKey()
678
469
  const params = parseToolInput(input)
679
470
  return callSuperagnt(key, 'GET', '/campaign/GetCampaignSequence', params)
680
471
  },
@@ -701,7 +492,7 @@ export default async function register(api) {
701
492
  ]
702
493
  },
703
494
  execute: async (input) => {
704
- const key = await ensureApiKey()
495
+ const key = ensureApiKey()
705
496
  const params = parseToolInput(input)
706
497
  return callSuperagnt(key, 'POST', '/campaign/AddLeadsToCampaignV2', undefined, params)
707
498
  },
@@ -736,7 +527,7 @@ export default async function register(api) {
736
527
  ]
737
528
  },
738
529
  execute: async (input) => {
739
- const key = await ensureApiKey()
530
+ const key = ensureApiKey()
740
531
  const params = parseToolInput(input)
741
532
  return callSuperagnt(key, 'POST', '/campaign/AddLeadsToCampaign', undefined, params)
742
533
  },
@@ -766,7 +557,7 @@ export default async function register(api) {
766
557
  ]
767
558
  },
768
559
  execute: async (input) => {
769
- const key = await ensureApiKey()
560
+ const key = ensureApiKey()
770
561
  const params = parseToolInput(input)
771
562
  return callSuperagnt(key, 'POST', '/campaign/StopLeadInCampaign', undefined, params)
772
563
  },
@@ -808,7 +599,7 @@ export default async function register(api) {
808
599
  ]
809
600
  },
810
601
  execute: async (input) => {
811
- const key = await ensureApiKey()
602
+ const key = ensureApiKey()
812
603
  const params = parseToolInput(input)
813
604
  return callSuperagnt(key, 'POST', '/campaign/GetLeadsFromCampaign', undefined, params)
814
605
  },
@@ -843,7 +634,7 @@ export default async function register(api) {
843
634
  }
844
635
  },
845
636
  execute: async (input) => {
846
- const key = await ensureApiKey()
637
+ const key = ensureApiKey()
847
638
  const params = parseToolInput(input)
848
639
  return callSuperagnt(key, 'POST', '/campaign/GetCampaignsForLead', undefined, params)
849
640
  },
@@ -870,7 +661,7 @@ export default async function register(api) {
870
661
  }
871
662
  },
872
663
  execute: async (input) => {
873
- const key = await ensureApiKey()
664
+ const key = ensureApiKey()
874
665
  const params = parseToolInput(input)
875
666
  return callSuperagnt(key, 'POST', '/inbox/GetConversationsV2', undefined, params)
876
667
  },
@@ -897,7 +688,7 @@ export default async function register(api) {
897
688
  ]
898
689
  },
899
690
  execute: async (input) => {
900
- const key = await ensureApiKey()
691
+ const key = ensureApiKey()
901
692
  const params = parseToolInput(input)
902
693
  return callSuperagnt(key, 'GET', '/inbox/GetChatroom/{accountId}/{conversationId}', params)
903
694
  },
@@ -933,7 +724,7 @@ export default async function register(api) {
933
724
  ]
934
725
  },
935
726
  execute: async (input) => {
936
- const key = await ensureApiKey()
727
+ const key = ensureApiKey()
937
728
  const params = parseToolInput(input)
938
729
  return callSuperagnt(key, 'POST', '/inbox/SendMessage', undefined, params)
939
730
  },
@@ -965,7 +756,7 @@ export default async function register(api) {
965
756
  ]
966
757
  },
967
758
  execute: async (input) => {
968
- const key = await ensureApiKey()
759
+ const key = ensureApiKey()
969
760
  const params = parseToolInput(input)
970
761
  return callSuperagnt(key, 'POST', '/inbox/SetSeenStatus', undefined, params)
971
762
  },
@@ -992,7 +783,7 @@ export default async function register(api) {
992
783
  }
993
784
  },
994
785
  execute: async (input) => {
995
- const key = await ensureApiKey()
786
+ const key = ensureApiKey()
996
787
  const params = parseToolInput(input)
997
788
  return callSuperagnt(key, 'POST', '/li_account/GetAll', undefined, params)
998
789
  },
@@ -1014,7 +805,7 @@ export default async function register(api) {
1014
805
  ]
1015
806
  },
1016
807
  execute: async (input) => {
1017
- const key = await ensureApiKey()
808
+ const key = ensureApiKey()
1018
809
  const params = parseToolInput(input)
1019
810
  return callSuperagnt(key, 'GET', '/li_account/GetById', params)
1020
811
  },
@@ -1045,7 +836,7 @@ export default async function register(api) {
1045
836
  }
1046
837
  },
1047
838
  execute: async (input) => {
1048
- const key = await ensureApiKey()
839
+ const key = ensureApiKey()
1049
840
  const params = parseToolInput(input)
1050
841
  return callSuperagnt(key, 'POST', '/list/GetAll', undefined, params)
1051
842
  },
@@ -1067,7 +858,7 @@ export default async function register(api) {
1067
858
  ]
1068
859
  },
1069
860
  execute: async (input) => {
1070
- const key = await ensureApiKey()
861
+ const key = ensureApiKey()
1071
862
  const params = parseToolInput(input)
1072
863
  return callSuperagnt(key, 'GET', '/list/GetById', params)
1073
864
  },
@@ -1094,7 +885,7 @@ export default async function register(api) {
1094
885
  ]
1095
886
  },
1096
887
  execute: async (input) => {
1097
- const key = await ensureApiKey()
888
+ const key = ensureApiKey()
1098
889
  const params = parseToolInput(input)
1099
890
  return callSuperagnt(key, 'POST', '/list/CreateEmptyList', undefined, params)
1100
891
  },
@@ -1144,7 +935,7 @@ export default async function register(api) {
1144
935
  ]
1145
936
  },
1146
937
  execute: async (input) => {
1147
- const key = await ensureApiKey()
938
+ const key = ensureApiKey()
1148
939
  const params = parseToolInput(input)
1149
940
  return callSuperagnt(key, 'POST', '/list/GetLeadsFromList', undefined, params)
1150
941
  },
@@ -1178,7 +969,7 @@ export default async function register(api) {
1178
969
  ]
1179
970
  },
1180
971
  execute: async (input) => {
1181
- const key = await ensureApiKey()
972
+ const key = ensureApiKey()
1182
973
  const params = parseToolInput(input)
1183
974
  return callSuperagnt(key, 'POST', '/list/GetCompaniesFromList', undefined, params)
1184
975
  },
@@ -1205,7 +996,7 @@ export default async function register(api) {
1205
996
  ]
1206
997
  },
1207
998
  execute: async (input) => {
1208
- const key = await ensureApiKey()
999
+ const key = ensureApiKey()
1209
1000
  const params = parseToolInput(input)
1210
1001
  return callSuperagnt(key, 'POST', '/list/AddLeadsToListV2', undefined, params)
1211
1002
  },
@@ -1232,7 +1023,7 @@ export default async function register(api) {
1232
1023
  ]
1233
1024
  },
1234
1025
  execute: async (input) => {
1235
- const key = await ensureApiKey()
1026
+ const key = ensureApiKey()
1236
1027
  const params = parseToolInput(input)
1237
1028
  return callSuperagnt(key, 'POST', '/list/AddLeadsToList', undefined, params)
1238
1029
  },
@@ -1259,7 +1050,7 @@ export default async function register(api) {
1259
1050
  ]
1260
1051
  },
1261
1052
  execute: async (input) => {
1262
- const key = await ensureApiKey()
1053
+ const key = ensureApiKey()
1263
1054
  const params = parseToolInput(input)
1264
1055
  return callSuperagnt(key, 'DELETE', '/list/DeleteLeadsFromList', undefined, params)
1265
1056
  },
@@ -1286,7 +1077,7 @@ export default async function register(api) {
1286
1077
  ]
1287
1078
  },
1288
1079
  execute: async (input) => {
1289
- const key = await ensureApiKey()
1080
+ const key = ensureApiKey()
1290
1081
  const params = parseToolInput(input)
1291
1082
  return callSuperagnt(key, 'DELETE', '/list/DeleteLeadsFromListByProfileUrl', undefined, params)
1292
1083
  },
@@ -1321,7 +1112,7 @@ export default async function register(api) {
1321
1112
  }
1322
1113
  },
1323
1114
  execute: async (input) => {
1324
- const key = await ensureApiKey()
1115
+ const key = ensureApiKey()
1325
1116
  const params = parseToolInput(input)
1326
1117
  return callSuperagnt(key, 'POST', '/list/GetListsForLead', undefined, params)
1327
1118
  },
@@ -1343,7 +1134,7 @@ export default async function register(api) {
1343
1134
  ]
1344
1135
  },
1345
1136
  execute: async (input) => {
1346
- const key = await ensureApiKey()
1137
+ const key = ensureApiKey()
1347
1138
  const params = parseToolInput(input)
1348
1139
  return callSuperagnt(key, 'POST', '/lead/GetLead', undefined, params)
1349
1140
  },
@@ -1377,7 +1168,7 @@ export default async function register(api) {
1377
1168
  ]
1378
1169
  },
1379
1170
  execute: async (input) => {
1380
- const key = await ensureApiKey()
1171
+ const key = ensureApiKey()
1381
1172
  const params = parseToolInput(input)
1382
1173
  return callSuperagnt(key, 'POST', '/lead/AddTags', undefined, params)
1383
1174
  },
@@ -1411,7 +1202,7 @@ export default async function register(api) {
1411
1202
  ]
1412
1203
  },
1413
1204
  execute: async (input) => {
1414
- const key = await ensureApiKey()
1205
+ const key = ensureApiKey()
1415
1206
  const params = parseToolInput(input)
1416
1207
  return callSuperagnt(key, 'POST', '/lead/ReplaceTags', undefined, params)
1417
1208
  },
@@ -1433,7 +1224,7 @@ export default async function register(api) {
1433
1224
  ]
1434
1225
  },
1435
1226
  execute: async (input) => {
1436
- const key = await ensureApiKey()
1227
+ const key = ensureApiKey()
1437
1228
  const params = parseToolInput(input)
1438
1229
  return callSuperagnt(key, 'POST', '/lead/GetTags', undefined, params)
1439
1230
  },
@@ -1455,7 +1246,7 @@ export default async function register(api) {
1455
1246
  ]
1456
1247
  },
1457
1248
  execute: async (input) => {
1458
- const key = await ensureApiKey()
1249
+ const key = ensureApiKey()
1459
1250
  const params = parseToolInput(input)
1460
1251
  return callSuperagnt(key, 'POST', '/lead_tags/CreateTags', undefined, params)
1461
1252
  },
@@ -1486,7 +1277,7 @@ export default async function register(api) {
1486
1277
  }
1487
1278
  },
1488
1279
  execute: async (input) => {
1489
- const key = await ensureApiKey()
1280
+ const key = ensureApiKey()
1490
1281
  const params = parseToolInput(input)
1491
1282
  return callSuperagnt(key, 'POST', '/stats/GetOverallStats', undefined, params)
1492
1283
  },
@@ -1517,7 +1308,7 @@ export default async function register(api) {
1517
1308
  }
1518
1309
  },
1519
1310
  execute: async (input) => {
1520
- const key = await ensureApiKey()
1311
+ const key = ensureApiKey()
1521
1312
  const params = parseToolInput(input)
1522
1313
  return callSuperagnt(key, 'POST', '/stats/GetOverallStatsByCampaign', undefined, params)
1523
1314
  },
@@ -1551,7 +1342,7 @@ export default async function register(api) {
1551
1342
  ]
1552
1343
  },
1553
1344
  execute: async (input) => {
1554
- const key = await ensureApiKey()
1345
+ const key = ensureApiKey()
1555
1346
  const params = parseToolInput(input)
1556
1347
  return callSuperagnt(key, 'POST', '/MyNetwork/GetMyNetworkForSender', undefined, params)
1557
1348
  },
@@ -1581,7 +1372,7 @@ export default async function register(api) {
1581
1372
  ]
1582
1373
  },
1583
1374
  execute: async (input) => {
1584
- const key = await ensureApiKey()
1375
+ const key = ensureApiKey()
1585
1376
  const params = parseToolInput(input)
1586
1377
  return callSuperagnt(key, 'POST', '/MyNetwork/IsConnection', undefined, params)
1587
1378
  },
@@ -1621,7 +1412,7 @@ export default async function register(api) {
1621
1412
  ]
1622
1413
  },
1623
1414
  execute: async (input) => {
1624
- const key = await ensureApiKey()
1415
+ const key = ensureApiKey()
1625
1416
  const params = parseToolInput(input)
1626
1417
  return callSuperagnt(key, 'POST', '/webhooks/CreateWebhook', undefined, params)
1627
1418
  },
@@ -1647,7 +1438,7 @@ export default async function register(api) {
1647
1438
  ]
1648
1439
  },
1649
1440
  execute: async (input) => {
1650
- const key = await ensureApiKey()
1441
+ const key = ensureApiKey()
1651
1442
  const params = parseToolInput(input)
1652
1443
  return callSuperagnt(key, 'GET', '/webhooks/GetWebhookById', params)
1653
1444
  },
@@ -1674,7 +1465,7 @@ export default async function register(api) {
1674
1465
  }
1675
1466
  },
1676
1467
  execute: async (input) => {
1677
- const key = await ensureApiKey()
1468
+ const key = ensureApiKey()
1678
1469
  const params = parseToolInput(input)
1679
1470
  return callSuperagnt(key, 'POST', '/webhooks/GetAllWebhooks', undefined, params)
1680
1471
  },
@@ -1720,7 +1511,7 @@ export default async function register(api) {
1720
1511
  ]
1721
1512
  },
1722
1513
  execute: async (input) => {
1723
- const key = await ensureApiKey()
1514
+ const key = ensureApiKey()
1724
1515
  const params = parseToolInput(input)
1725
1516
  return callSuperagnt(key, 'PATCH', '/webhooks/UpdateWebhook', undefined, params)
1726
1517
  },
@@ -1742,7 +1533,7 @@ export default async function register(api) {
1742
1533
  ]
1743
1534
  },
1744
1535
  execute: async (input) => {
1745
- const key = await ensureApiKey()
1536
+ const key = ensureApiKey()
1746
1537
  const params = parseToolInput(input)
1747
1538
  return callSuperagnt(key, 'DELETE', '/webhooks/DeleteWebhook', undefined, params)
1748
1539
  },
@@ -1765,7 +1556,7 @@ export default async function register(api) {
1765
1556
  }
1766
1557
  },
1767
1558
  execute: async (input) => {
1768
- const key = await ensureApiKey()
1559
+ const key = ensureApiKey()
1769
1560
  const params = parseToolInput(input)
1770
1561
  return callSuperagnt(key, 'GET', '/management/organizations/workspaces', params)
1771
1562
  },
@@ -1791,7 +1582,7 @@ export default async function register(api) {
1791
1582
  ]
1792
1583
  },
1793
1584
  execute: async (input) => {
1794
- const key = await ensureApiKey()
1585
+ const key = ensureApiKey()
1795
1586
  const params = parseToolInput(input)
1796
1587
  return callSuperagnt(key, 'POST', '/management/organizations/workspaces', undefined, params)
1797
1588
  },
@@ -1821,7 +1612,7 @@ export default async function register(api) {
1821
1612
  ]
1822
1613
  },
1823
1614
  execute: async (input) => {
1824
- const key = await ensureApiKey()
1615
+ const key = ensureApiKey()
1825
1616
  const params = parseToolInput(input)
1826
1617
  return callSuperagnt(key, 'PATCH', '/management/organizations/workspaces/{workspaceId}', undefined, params)
1827
1618
  },
@@ -1843,7 +1634,7 @@ export default async function register(api) {
1843
1634
  ]
1844
1635
  },
1845
1636
  execute: async (input) => {
1846
- const key = await ensureApiKey()
1637
+ const key = ensureApiKey()
1847
1638
  const params = parseToolInput(input)
1848
1639
  return callSuperagnt(key, 'GET', '/management/organizations/api-keys/workspaces/{workspaceId}', params)
1849
1640
  },
@@ -1870,7 +1661,7 @@ export default async function register(api) {
1870
1661
  ]
1871
1662
  },
1872
1663
  execute: async (input) => {
1873
- const key = await ensureApiKey()
1664
+ const key = ensureApiKey()
1874
1665
  const params = parseToolInput(input)
1875
1666
  return callSuperagnt(key, 'POST', '/management/organizations/api-keys/workspaces/{workspaceId}', undefined, params)
1876
1667
  },
@@ -1901,7 +1692,7 @@ export default async function register(api) {
1901
1692
  }
1902
1693
  },
1903
1694
  execute: async (input) => {
1904
- const key = await ensureApiKey()
1695
+ const key = ensureApiKey()
1905
1696
  const params = parseToolInput(input)
1906
1697
  return callSuperagnt(key, 'POST', '/management/organizations/users', undefined, params)
1907
1698
  },
@@ -1923,7 +1714,7 @@ export default async function register(api) {
1923
1714
  ]
1924
1715
  },
1925
1716
  execute: async (input) => {
1926
- const key = await ensureApiKey()
1717
+ const key = ensureApiKey()
1927
1718
  const params = parseToolInput(input)
1928
1719
  return callSuperagnt(key, 'GET', '/management/organizations/users/{userId}', params)
1929
1720
  },
@@ -1961,7 +1752,7 @@ export default async function register(api) {
1961
1752
  ]
1962
1753
  },
1963
1754
  execute: async (input) => {
1964
- const key = await ensureApiKey()
1755
+ const key = ensureApiKey()
1965
1756
  const params = parseToolInput(input)
1966
1757
  return callSuperagnt(key, 'POST', '/management/organizations/users/workspaces/{workspaceId}', undefined, params)
1967
1758
  },
@@ -1988,7 +1779,7 @@ export default async function register(api) {
1988
1779
  ]
1989
1780
  },
1990
1781
  execute: async (input) => {
1991
- const key = await ensureApiKey()
1782
+ const key = ensureApiKey()
1992
1783
  const params = parseToolInput(input)
1993
1784
  return callSuperagnt(key, 'POST', '/management/organizations/users/invite/admins', undefined, params)
1994
1785
  },
@@ -2020,7 +1811,7 @@ export default async function register(api) {
2020
1811
  ]
2021
1812
  },
2022
1813
  execute: async (input) => {
2023
- const key = await ensureApiKey()
1814
+ const key = ensureApiKey()
2024
1815
  const params = parseToolInput(input)
2025
1816
  return callSuperagnt(key, 'POST', '/management/organizations/users/invite/managers', undefined, params)
2026
1817
  },
@@ -2057,12 +1848,9 @@ export default async function register(api) {
2057
1848
  ]
2058
1849
  },
2059
1850
  execute: async (input) => {
2060
- const key = await ensureApiKey()
1851
+ const key = ensureApiKey()
2061
1852
  const params = parseToolInput(input)
2062
1853
  return callSuperagnt(key, 'POST', '/management/organizations/users/invite/members', undefined, params)
2063
1854
  },
2064
1855
  })
2065
-
2066
- promptState.toolCount = 59
2067
- promptState.ready = true
2068
1856
  }
@@ -2,7 +2,70 @@
2
2
  "id": "heyreach-outreach",
3
3
  "name": "HeyReach Integration",
4
4
  "description": "OpenClaw plugin for HeyReach LinkedIn outreach — manage campaigns, leads, lead lists, conversations, and analytics with your superagnt API key.",
5
- "version": "2.0.2",
5
+ "version": "2.0.3",
6
+ "contracts": {
7
+ "tools": [
8
+ "superagnt_connection_heyreach_auth_check_api_key",
9
+ "superagnt_connection_heyreach_campaign_get_all",
10
+ "superagnt_connection_heyreach_campaign_get_by_id",
11
+ "superagnt_connection_heyreach_campaign_pause",
12
+ "superagnt_connection_heyreach_campaign_resume",
13
+ "superagnt_connection_heyreach_campaign_start",
14
+ "superagnt_connection_heyreach_campaign_create",
15
+ "superagnt_connection_heyreach_campaign_create_from_template",
16
+ "superagnt_connection_heyreach_campaign_update_settings",
17
+ "superagnt_connection_heyreach_campaign_update_schedule",
18
+ "superagnt_connection_heyreach_campaign_update_accounts",
19
+ "superagnt_connection_heyreach_campaign_update_sequence",
20
+ "superagnt_connection_heyreach_campaign_get_sequence",
21
+ "superagnt_connection_heyreach_campaign_add_leads_v2",
22
+ "superagnt_connection_heyreach_campaign_add_leads",
23
+ "superagnt_connection_heyreach_campaign_stop_lead",
24
+ "superagnt_connection_heyreach_campaign_get_leads",
25
+ "superagnt_connection_heyreach_campaign_get_for_lead",
26
+ "superagnt_connection_heyreach_inbox_get_conversations_v2",
27
+ "superagnt_connection_heyreach_inbox_get_chatroom",
28
+ "superagnt_connection_heyreach_inbox_send_message",
29
+ "superagnt_connection_heyreach_inbox_set_seen_status",
30
+ "superagnt_connection_heyreach_li_account_get_all",
31
+ "superagnt_connection_heyreach_li_account_get_by_id",
32
+ "superagnt_connection_heyreach_list_get_all",
33
+ "superagnt_connection_heyreach_list_get_by_id",
34
+ "superagnt_connection_heyreach_list_create_empty",
35
+ "superagnt_connection_heyreach_list_get_leads",
36
+ "superagnt_connection_heyreach_list_get_companies",
37
+ "superagnt_connection_heyreach_list_add_leads_v2",
38
+ "superagnt_connection_heyreach_list_add_leads",
39
+ "superagnt_connection_heyreach_list_delete_leads",
40
+ "superagnt_connection_heyreach_list_delete_leads_by_url",
41
+ "superagnt_connection_heyreach_list_get_for_lead",
42
+ "superagnt_connection_heyreach_lead_get_by_profile_url",
43
+ "superagnt_connection_heyreach_lead_add_tags",
44
+ "superagnt_connection_heyreach_lead_replace_tags",
45
+ "superagnt_connection_heyreach_lead_get_tags",
46
+ "superagnt_connection_heyreach_lead_tags_create",
47
+ "superagnt_connection_heyreach_stats_get_overall",
48
+ "superagnt_connection_heyreach_stats_get_by_campaign",
49
+ "superagnt_connection_heyreach_network_get_for_sender",
50
+ "superagnt_connection_heyreach_network_is_connection",
51
+ "superagnt_connection_heyreach_webhook_create",
52
+ "superagnt_connection_heyreach_webhook_get_by_id",
53
+ "superagnt_connection_heyreach_webhook_get_all",
54
+ "superagnt_connection_heyreach_webhook_update",
55
+ "superagnt_connection_heyreach_webhook_delete",
56
+ "superagnt_connection_heyreach_org_workspaces_get_all",
57
+ "superagnt_connection_heyreach_org_workspaces_create",
58
+ "superagnt_connection_heyreach_org_workspaces_update",
59
+ "superagnt_connection_heyreach_org_workspace_api_keys_get",
60
+ "superagnt_connection_heyreach_org_workspace_api_keys_create",
61
+ "superagnt_connection_heyreach_org_users_get_all",
62
+ "superagnt_connection_heyreach_org_user_get_by_id",
63
+ "superagnt_connection_heyreach_org_workspace_users_get_all",
64
+ "superagnt_connection_heyreach_org_invite_admins",
65
+ "superagnt_connection_heyreach_org_invite_managers",
66
+ "superagnt_connection_heyreach_org_invite_members"
67
+ ]
68
+ },
6
69
  "configSchema": {
7
70
  "type": "object",
8
71
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superagnt/heyreach-outreach",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for HeyReach LinkedIn outreach — manage campaigns, leads, lead lists, conversations, and analytics with your superagnt API key.",
6
6
  "main": "index.js",