@superagnt/dub-links 2.0.4 → 2.0.6

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
@@ -10,17 +10,11 @@ openclaw plugins install @superagnt/dub-links
10
10
 
11
11
  This package is the official **OpenClaw** plugin for the **Dub** integration via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com/docs) and your superagnt API key.
12
12
 
13
- ## Want the live MCP surface instead?
13
+ ## What this plugin contains
14
14
 
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:
15
+ A fixed, baked-in toolset for the **Dub** endpoints below — nothing else. Calls run on the Dub account the user connected in their dashboard; the plugin does not change after install and adds no other platform surface. Where Dub supports destructive or outbound operations (deletes, updates, sending as the user), always confirm with the user before performing them.
20
16
 
21
- ```bash
22
- openclaw plugins install @superagnt/superagnt
23
- ```
17
+ Prefer MCP? The `@superagnt/superagnt` plugin connects the workspace MCP server instead, whose tool surface is managed by the user in the dashboard.
24
18
 
25
19
  ## Overview
26
20
 
@@ -47,8 +41,8 @@ OpenClaw plugin for Dub — manage short links, conversion events, customers, ta
47
41
 
48
42
  ## Prerequisites
49
43
 
50
- 1. An **superagnt API key** — create and manage keys in the [superagnt dashboard](https://app.superagnt.com/dashboard).
51
- 2. A connected **Dub** account — configure in the [integrations dashboard](https://app.superagnt.com/dashboard/connections).
44
+ 1. A **superagnt API key** — create and manage keys in the [superagnt dashboard](https://app.superagnt.com/dashboard).
45
+ 2. A connected **Dub** account — configure in the [connections dashboard](https://app.superagnt.com/dashboard/connections).
52
46
 
53
47
  ## Authentication
54
48
 
@@ -71,7 +65,7 @@ Set `SUPERAGNT_API_KEY` in your environment, or complete browser login when the
71
65
 
72
66
  ## Related
73
67
 
74
- - **Skill (curl-oriented):** `clawhub install dub-links` on [ClawHub](https://clawhub.ai/superagnt/skills/dub-links)
68
+ - **Skill (curl-oriented):** `clawhub install superagnt/dub-links` on [ClawHub](https://clawhub.ai/superagnt/skills/dub-links)
75
69
 
76
70
  ## License
77
71
 
package/index.js CHANGED
@@ -7,7 +7,8 @@ import { homedir as _homedir } from 'node:os'
7
7
  import { join as _join } from 'node:path'
8
8
  import { existsSync as _existsSync, readFileSync as _readFileSync } from 'node:fs'
9
9
 
10
- const BASE_URL = 'https://api.superagnt.com/v1/connections/dub'
10
+ // SUPERAGNT_API_URL overrides the API origin (QA/staging); customers never set it.
11
+ const BASE_URL = (process.env.SUPERAGNT_API_URL || 'https://api.superagnt.com') + '/v1/connections/dub'
11
12
 
12
13
 
13
14
  // ── Auth Module (inlined) ────────────────────────────────────────────────────
@@ -156,7 +157,7 @@ export default function register(api) {
156
157
  }
157
158
  }
158
159
  },
159
- execute: async (input) => {
160
+ execute: async (_toolCallId, input) => {
160
161
  const key = ensureApiKey()
161
162
  const params = parseToolInput(input)
162
163
  return callSuperagnt(key, 'GET', '/links', params)
@@ -170,7 +171,7 @@ export default function register(api) {
170
171
  "type": "object",
171
172
  "properties": {}
172
173
  },
173
- execute: async (input) => {
174
+ execute: async (_toolCallId, input) => {
174
175
  const key = ensureApiKey()
175
176
  const params = parseToolInput(input)
176
177
  return callSuperagnt(key, 'POST', '/links', undefined, params)
@@ -184,7 +185,7 @@ export default function register(api) {
184
185
  "type": "object",
185
186
  "properties": {}
186
187
  },
187
- execute: async (input) => {
188
+ execute: async (_toolCallId, input) => {
188
189
  const key = ensureApiKey()
189
190
  const params = parseToolInput(input)
190
191
  return callSuperagnt(key, 'PUT', '/links', undefined, params)
@@ -215,7 +216,7 @@ export default function register(api) {
215
216
  }
216
217
  }
217
218
  },
218
- execute: async (input) => {
219
+ execute: async (_toolCallId, input) => {
219
220
  const key = ensureApiKey()
220
221
  const params = parseToolInput(input)
221
222
  return callSuperagnt(key, 'GET', '/links/info', params)
@@ -262,7 +263,7 @@ export default function register(api) {
262
263
  }
263
264
  }
264
265
  },
265
- execute: async (input) => {
266
+ execute: async (_toolCallId, input) => {
266
267
  const key = ensureApiKey()
267
268
  const params = parseToolInput(input)
268
269
  return callSuperagnt(key, 'GET', '/links/count', params)
@@ -284,7 +285,7 @@ export default function register(api) {
284
285
  "linkId"
285
286
  ]
286
287
  },
287
- execute: async (input) => {
288
+ execute: async (_toolCallId, input) => {
288
289
  const key = ensureApiKey()
289
290
  const params = parseToolInput(input)
290
291
  return callSuperagnt(key, 'PATCH', '/links/{linkId}', undefined, params)
@@ -306,7 +307,7 @@ export default function register(api) {
306
307
  "linkId"
307
308
  ]
308
309
  },
309
- execute: async (input) => {
310
+ execute: async (_toolCallId, input) => {
310
311
  const key = ensureApiKey()
311
312
  const params = parseToolInput(input)
312
313
  return callSuperagnt(key, 'DELETE', '/links/{linkId}', undefined, params)
@@ -320,7 +321,7 @@ export default function register(api) {
320
321
  "type": "object",
321
322
  "properties": {}
322
323
  },
323
- execute: async (input) => {
324
+ execute: async (_toolCallId, input) => {
324
325
  const key = ensureApiKey()
325
326
  const params = parseToolInput(input)
326
327
  return callSuperagnt(key, 'POST', '/links/bulk', undefined, params)
@@ -350,7 +351,7 @@ export default function register(api) {
350
351
  "data"
351
352
  ]
352
353
  },
353
- execute: async (input) => {
354
+ execute: async (_toolCallId, input) => {
354
355
  const key = ensureApiKey()
355
356
  const params = parseToolInput(input)
356
357
  return callSuperagnt(key, 'PATCH', '/links/bulk', undefined, params)
@@ -372,7 +373,7 @@ export default function register(api) {
372
373
  "linkIds"
373
374
  ]
374
375
  },
375
- execute: async (input) => {
376
+ execute: async (_toolCallId, input) => {
376
377
  const key = ensureApiKey()
377
378
  const params = parseToolInput(input)
378
379
  return callSuperagnt(key, 'DELETE', '/links/bulk', undefined, params)
@@ -527,7 +528,7 @@ export default function register(api) {
527
528
  }
528
529
  }
529
530
  },
530
- execute: async (input) => {
531
+ execute: async (_toolCallId, input) => {
531
532
  const key = ensureApiKey()
532
533
  const params = parseToolInput(input)
533
534
  return callSuperagnt(key, 'GET', '/analytics', params)
@@ -682,7 +683,7 @@ export default function register(api) {
682
683
  }
683
684
  }
684
685
  },
685
- execute: async (input) => {
686
+ execute: async (_toolCallId, input) => {
686
687
  const key = ensureApiKey()
687
688
  const params = parseToolInput(input)
688
689
  return callSuperagnt(key, 'GET', '/events', params)
@@ -721,7 +722,7 @@ export default function register(api) {
721
722
  }
722
723
  }
723
724
  },
724
- execute: async (input) => {
725
+ execute: async (_toolCallId, input) => {
725
726
  const key = ensureApiKey()
726
727
  const params = parseToolInput(input)
727
728
  return callSuperagnt(key, 'GET', '/tags', params)
@@ -744,7 +745,7 @@ export default function register(api) {
744
745
  }
745
746
  }
746
747
  },
747
- execute: async (input) => {
748
+ execute: async (_toolCallId, input) => {
748
749
  const key = ensureApiKey()
749
750
  const params = parseToolInput(input)
750
751
  return callSuperagnt(key, 'POST', '/tags', undefined, params)
@@ -774,7 +775,7 @@ export default function register(api) {
774
775
  "id"
775
776
  ]
776
777
  },
777
- execute: async (input) => {
778
+ execute: async (_toolCallId, input) => {
778
779
  const key = ensureApiKey()
779
780
  const params = parseToolInput(input)
780
781
  return callSuperagnt(key, 'PATCH', '/tags/{id}', undefined, params)
@@ -801,7 +802,7 @@ export default function register(api) {
801
802
  }
802
803
  }
803
804
  },
804
- execute: async (input) => {
805
+ execute: async (_toolCallId, input) => {
805
806
  const key = ensureApiKey()
806
807
  const params = parseToolInput(input)
807
808
  return callSuperagnt(key, 'GET', '/folders', params)
@@ -827,7 +828,7 @@ export default function register(api) {
827
828
  "name"
828
829
  ]
829
830
  },
830
- execute: async (input) => {
831
+ execute: async (_toolCallId, input) => {
831
832
  const key = ensureApiKey()
832
833
  const params = parseToolInput(input)
833
834
  return callSuperagnt(key, 'POST', '/folders', undefined, params)
@@ -857,7 +858,7 @@ export default function register(api) {
857
858
  "id"
858
859
  ]
859
860
  },
860
- execute: async (input) => {
861
+ execute: async (_toolCallId, input) => {
861
862
  const key = ensureApiKey()
862
863
  const params = parseToolInput(input)
863
864
  return callSuperagnt(key, 'PATCH', '/folders/{id}', undefined, params)
@@ -879,7 +880,7 @@ export default function register(api) {
879
880
  "id"
880
881
  ]
881
882
  },
882
- execute: async (input) => {
883
+ execute: async (_toolCallId, input) => {
883
884
  const key = ensureApiKey()
884
885
  const params = parseToolInput(input)
885
886
  return callSuperagnt(key, 'DELETE', '/folders/{id}', undefined, params)
@@ -930,7 +931,7 @@ export default function register(api) {
930
931
  }
931
932
  }
932
933
  },
933
- execute: async (input) => {
934
+ execute: async (_toolCallId, input) => {
934
935
  const key = ensureApiKey()
935
936
  const params = parseToolInput(input)
936
937
  return callSuperagnt(key, 'GET', '/customers', params)
@@ -956,7 +957,7 @@ export default function register(api) {
956
957
  "id"
957
958
  ]
958
959
  },
959
- execute: async (input) => {
960
+ execute: async (_toolCallId, input) => {
960
961
  const key = ensureApiKey()
961
962
  const params = parseToolInput(input)
962
963
  return callSuperagnt(key, 'GET', '/customers/{id}', params)
@@ -994,7 +995,7 @@ export default function register(api) {
994
995
  "id"
995
996
  ]
996
997
  },
997
- execute: async (input) => {
998
+ execute: async (_toolCallId, input) => {
998
999
  const key = ensureApiKey()
999
1000
  const params = parseToolInput(input)
1000
1001
  return callSuperagnt(key, 'PATCH', '/customers/{id}', undefined, params)
@@ -1016,7 +1017,7 @@ export default function register(api) {
1016
1017
  "id"
1017
1018
  ]
1018
1019
  },
1019
- execute: async (input) => {
1020
+ execute: async (_toolCallId, input) => {
1020
1021
  const key = ensureApiKey()
1021
1022
  const params = parseToolInput(input)
1022
1023
  return callSuperagnt(key, 'DELETE', '/customers/{id}', undefined, params)
@@ -1054,7 +1055,7 @@ export default function register(api) {
1054
1055
  "slug"
1055
1056
  ]
1056
1057
  },
1057
- execute: async (input) => {
1058
+ execute: async (_toolCallId, input) => {
1058
1059
  const key = ensureApiKey()
1059
1060
  const params = parseToolInput(input)
1060
1061
  return callSuperagnt(key, 'POST', '/domains', undefined, params)
@@ -1092,7 +1093,7 @@ export default function register(api) {
1092
1093
  "slug"
1093
1094
  ]
1094
1095
  },
1095
- execute: async (input) => {
1096
+ execute: async (_toolCallId, input) => {
1096
1097
  const key = ensureApiKey()
1097
1098
  const params = parseToolInput(input)
1098
1099
  return callSuperagnt(key, 'PATCH', '/domains/{slug}', undefined, params)
@@ -1114,7 +1115,7 @@ export default function register(api) {
1114
1115
  "slug"
1115
1116
  ]
1116
1117
  },
1117
- execute: async (input) => {
1118
+ execute: async (_toolCallId, input) => {
1118
1119
  const key = ensureApiKey()
1119
1120
  const params = parseToolInput(input)
1120
1121
  return callSuperagnt(key, 'DELETE', '/domains/{slug}', undefined, params)
@@ -1170,7 +1171,7 @@ export default function register(api) {
1170
1171
  "customerExternalId"
1171
1172
  ]
1172
1173
  },
1173
- execute: async (input) => {
1174
+ execute: async (_toolCallId, input) => {
1174
1175
  const key = ensureApiKey()
1175
1176
  const params = parseToolInput(input)
1176
1177
  return callSuperagnt(key, 'POST', '/track/lead', undefined, params)
@@ -1237,7 +1238,7 @@ export default function register(api) {
1237
1238
  "amount"
1238
1239
  ]
1239
1240
  },
1240
- execute: async (input) => {
1241
+ execute: async (_toolCallId, input) => {
1241
1242
  const key = ensureApiKey()
1242
1243
  const params = parseToolInput(input)
1243
1244
  return callSuperagnt(key, 'POST', '/track/sale', undefined, params)
@@ -1292,7 +1293,7 @@ export default function register(api) {
1292
1293
  }
1293
1294
  }
1294
1295
  },
1295
- execute: async (input) => {
1296
+ execute: async (_toolCallId, input) => {
1296
1297
  const key = ensureApiKey()
1297
1298
  const params = parseToolInput(input)
1298
1299
  return callSuperagnt(key, 'GET', '/partners', params)
@@ -1346,7 +1347,7 @@ export default function register(api) {
1346
1347
  "email"
1347
1348
  ]
1348
1349
  },
1349
- execute: async (input) => {
1350
+ execute: async (_toolCallId, input) => {
1350
1351
  const key = ensureApiKey()
1351
1352
  const params = parseToolInput(input)
1352
1353
  return callSuperagnt(key, 'POST', '/partners', undefined, params)
@@ -1369,7 +1370,7 @@ export default function register(api) {
1369
1370
  }
1370
1371
  }
1371
1372
  },
1372
- execute: async (input) => {
1373
+ execute: async (_toolCallId, input) => {
1373
1374
  const key = ensureApiKey()
1374
1375
  const params = parseToolInput(input)
1375
1376
  return callSuperagnt(key, 'GET', '/partners/links', params)
@@ -1383,7 +1384,7 @@ export default function register(api) {
1383
1384
  "type": "object",
1384
1385
  "properties": {}
1385
1386
  },
1386
- execute: async (input) => {
1387
+ execute: async (_toolCallId, input) => {
1387
1388
  const key = ensureApiKey()
1388
1389
  const params = parseToolInput(input)
1389
1390
  return callSuperagnt(key, 'POST', '/partners/links', undefined, params)
@@ -1397,7 +1398,7 @@ export default function register(api) {
1397
1398
  "type": "object",
1398
1399
  "properties": {}
1399
1400
  },
1400
- execute: async (input) => {
1401
+ execute: async (_toolCallId, input) => {
1401
1402
  const key = ensureApiKey()
1402
1403
  const params = parseToolInput(input)
1403
1404
  return callSuperagnt(key, 'PUT', '/partners/links/upsert', undefined, params)
@@ -1427,7 +1428,7 @@ export default function register(api) {
1427
1428
  "reason"
1428
1429
  ]
1429
1430
  },
1430
- execute: async (input) => {
1431
+ execute: async (_toolCallId, input) => {
1431
1432
  const key = ensureApiKey()
1432
1433
  const params = parseToolInput(input)
1433
1434
  return callSuperagnt(key, 'POST', '/partners/ban', undefined, params)
@@ -1450,7 +1451,7 @@ export default function register(api) {
1450
1451
  }
1451
1452
  }
1452
1453
  },
1453
- execute: async (input) => {
1454
+ execute: async (_toolCallId, input) => {
1454
1455
  const key = ensureApiKey()
1455
1456
  const params = parseToolInput(input)
1456
1457
  return callSuperagnt(key, 'POST', '/partners/deactivate', undefined, params)
@@ -1500,7 +1501,7 @@ export default function register(api) {
1500
1501
  "bountyId"
1501
1502
  ]
1502
1503
  },
1503
- execute: async (input) => {
1504
+ execute: async (_toolCallId, input) => {
1504
1505
  const key = ensureApiKey()
1505
1506
  const params = parseToolInput(input)
1506
1507
  return callSuperagnt(key, 'GET', '/bounties/{bountyId}/submissions', params)
@@ -1531,7 +1532,7 @@ export default function register(api) {
1531
1532
  "submissionId"
1532
1533
  ]
1533
1534
  },
1534
- execute: async (input) => {
1535
+ execute: async (_toolCallId, input) => {
1535
1536
  const key = ensureApiKey()
1536
1537
  const params = parseToolInput(input)
1537
1538
  return callSuperagnt(key, 'POST', '/bounties/{bountyId}/submissions/{submissionId}/approve', undefined, params)
@@ -1566,7 +1567,7 @@ export default function register(api) {
1566
1567
  "submissionId"
1567
1568
  ]
1568
1569
  },
1569
- execute: async (input) => {
1570
+ execute: async (_toolCallId, input) => {
1570
1571
  const key = ensureApiKey()
1571
1572
  const params = parseToolInput(input)
1572
1573
  return callSuperagnt(key, 'POST', '/bounties/{bountyId}/submissions/{submissionId}/reject', undefined, params)
@@ -1653,7 +1654,7 @@ export default function register(api) {
1653
1654
  }
1654
1655
  }
1655
1656
  },
1656
- execute: async (input) => {
1657
+ execute: async (_toolCallId, input) => {
1657
1658
  const key = ensureApiKey()
1658
1659
  const params = parseToolInput(input)
1659
1660
  return callSuperagnt(key, 'GET', '/commissions', params)
@@ -1703,7 +1704,7 @@ export default function register(api) {
1703
1704
  "id"
1704
1705
  ]
1705
1706
  },
1706
- execute: async (input) => {
1707
+ execute: async (_toolCallId, input) => {
1707
1708
  const key = ensureApiKey()
1708
1709
  const params = parseToolInput(input)
1709
1710
  return callSuperagnt(key, 'PATCH', '/commissions/{id}', undefined, params)
@@ -1750,7 +1751,7 @@ export default function register(api) {
1750
1751
  }
1751
1752
  }
1752
1753
  },
1753
- execute: async (input) => {
1754
+ execute: async (_toolCallId, input) => {
1754
1755
  const key = ensureApiKey()
1755
1756
  const params = parseToolInput(input)
1756
1757
  return callSuperagnt(key, 'GET', '/payouts', params)
@@ -2,7 +2,7 @@
2
2
  "id": "dub-links",
3
3
  "name": "Dub Integration",
4
4
  "description": "OpenClaw plugin for Dub — manage short links, conversion events, customers, tags, folders, and domains with your superagnt API key.",
5
- "version": "2.0.4",
5
+ "version": "2.0.6",
6
6
  "contracts": {
7
7
  "tools": [
8
8
  "superagnt_connection_dub_getLinks",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superagnt/dub-links",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Dub — manage short links, conversion events, customers, tags, folders, and domains with your superagnt API key.",
6
6
  "main": "index.js",