@superagnt/x-twitter-data 2.0.4 → 2.0.5

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/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/data/x'
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/data/x'
11
12
 
12
13
 
13
14
  // ── Auth Module (inlined) ────────────────────────────────────────────────────
@@ -116,7 +117,7 @@ export default function register(api) {
116
117
  "user_id"
117
118
  ]
118
119
  },
119
- execute: async (input) => {
120
+ execute: async (_toolCallId, input) => {
120
121
  const key = ensureApiKey()
121
122
  const params = parseToolInput(input)
122
123
  return callSuperagnt(key, 'GET', '/user/medias/continuation', params)
@@ -143,7 +144,7 @@ export default function register(api) {
143
144
  }
144
145
  }
145
146
  },
146
- execute: async (input) => {
147
+ execute: async (_toolCallId, input) => {
147
148
  const key = ensureApiKey()
148
149
  const params = parseToolInput(input)
149
150
  return callSuperagnt(key, 'POST', '/user/medias/continuation', undefined, params)
@@ -169,7 +170,7 @@ export default function register(api) {
169
170
  "user_id"
170
171
  ]
171
172
  },
172
- execute: async (input) => {
173
+ execute: async (_toolCallId, input) => {
173
174
  const key = ensureApiKey()
174
175
  const params = parseToolInput(input)
175
176
  return callSuperagnt(key, 'GET', '/user/medias', params)
@@ -192,7 +193,7 @@ export default function register(api) {
192
193
  }
193
194
  }
194
195
  },
195
- execute: async (input) => {
196
+ execute: async (_toolCallId, input) => {
196
197
  const key = ensureApiKey()
197
198
  const params = parseToolInput(input)
198
199
  return callSuperagnt(key, 'POST', '/user/medias', undefined, params)
@@ -223,7 +224,7 @@ export default function register(api) {
223
224
  "user_id"
224
225
  ]
225
226
  },
226
- execute: async (input) => {
227
+ execute: async (_toolCallId, input) => {
227
228
  const key = ensureApiKey()
228
229
  const params = parseToolInput(input)
229
230
  return callSuperagnt(key, 'GET', '/user/likes/continuation', params)
@@ -250,7 +251,7 @@ export default function register(api) {
250
251
  }
251
252
  }
252
253
  },
253
- execute: async (input) => {
254
+ execute: async (_toolCallId, input) => {
254
255
  const key = ensureApiKey()
255
256
  const params = parseToolInput(input)
256
257
  return callSuperagnt(key, 'POST', '/user/likes/continuation', undefined, params)
@@ -276,7 +277,7 @@ export default function register(api) {
276
277
  "user_id"
277
278
  ]
278
279
  },
279
- execute: async (input) => {
280
+ execute: async (_toolCallId, input) => {
280
281
  const key = ensureApiKey()
281
282
  const params = parseToolInput(input)
282
283
  return callSuperagnt(key, 'GET', '/user/likes', params)
@@ -299,7 +300,7 @@ export default function register(api) {
299
300
  }
300
301
  }
301
302
  },
302
- execute: async (input) => {
303
+ execute: async (_toolCallId, input) => {
303
304
  const key = ensureApiKey()
304
305
  const params = parseToolInput(input)
305
306
  return callSuperagnt(key, 'POST', '/user/likes', undefined, params)
@@ -330,7 +331,7 @@ export default function register(api) {
330
331
  "continuation_token"
331
332
  ]
332
333
  },
333
- execute: async (input) => {
334
+ execute: async (_toolCallId, input) => {
334
335
  const key = ensureApiKey()
335
336
  const params = parseToolInput(input)
336
337
  return callSuperagnt(key, 'GET', '/user/followers/continuation', params)
@@ -357,7 +358,7 @@ export default function register(api) {
357
358
  }
358
359
  }
359
360
  },
360
- execute: async (input) => {
361
+ execute: async (_toolCallId, input) => {
361
362
  const key = ensureApiKey()
362
363
  const params = parseToolInput(input)
363
364
  return callSuperagnt(key, 'POST', '/user/followers/continuation', undefined, params)
@@ -383,7 +384,7 @@ export default function register(api) {
383
384
  "user_id"
384
385
  ]
385
386
  },
386
- execute: async (input) => {
387
+ execute: async (_toolCallId, input) => {
387
388
  const key = ensureApiKey()
388
389
  const params = parseToolInput(input)
389
390
  return callSuperagnt(key, 'GET', '/user/followers', params)
@@ -406,7 +407,7 @@ export default function register(api) {
406
407
  }
407
408
  }
408
409
  },
409
- execute: async (input) => {
410
+ execute: async (_toolCallId, input) => {
410
411
  const key = ensureApiKey()
411
412
  const params = parseToolInput(input)
412
413
  return callSuperagnt(key, 'POST', '/user/followers', undefined, params)
@@ -437,7 +438,7 @@ export default function register(api) {
437
438
  "user_id"
438
439
  ]
439
440
  },
440
- execute: async (input) => {
441
+ execute: async (_toolCallId, input) => {
441
442
  const key = ensureApiKey()
442
443
  const params = parseToolInput(input)
443
444
  return callSuperagnt(key, 'GET', '/user/following/continuation', params)
@@ -460,7 +461,7 @@ export default function register(api) {
460
461
  }
461
462
  }
462
463
  },
463
- execute: async (input) => {
464
+ execute: async (_toolCallId, input) => {
464
465
  const key = ensureApiKey()
465
466
  const params = parseToolInput(input)
466
467
  return callSuperagnt(key, 'POST', '/user/following/continuation', undefined, params)
@@ -495,7 +496,7 @@ export default function register(api) {
495
496
  }
496
497
  }
497
498
  },
498
- execute: async (input) => {
499
+ execute: async (_toolCallId, input) => {
499
500
  const key = ensureApiKey()
500
501
  const params = parseToolInput(input)
501
502
  return callSuperagnt(key, 'GET', '/user/tweets', params)
@@ -526,7 +527,7 @@ export default function register(api) {
526
527
  }
527
528
  }
528
529
  },
529
- execute: async (input) => {
530
+ execute: async (_toolCallId, input) => {
530
531
  const key = ensureApiKey()
531
532
  const params = parseToolInput(input)
532
533
  return callSuperagnt(key, 'POST', '/user/tweets', undefined, params)
@@ -564,7 +565,7 @@ export default function register(api) {
564
565
  "continuation_token"
565
566
  ]
566
567
  },
567
- execute: async (input) => {
568
+ execute: async (_toolCallId, input) => {
568
569
  const key = ensureApiKey()
569
570
  const params = parseToolInput(input)
570
571
  return callSuperagnt(key, 'GET', '/user/tweets/continuation', params)
@@ -599,7 +600,7 @@ export default function register(api) {
599
600
  }
600
601
  }
601
602
  },
602
- execute: async (input) => {
603
+ execute: async (_toolCallId, input) => {
603
604
  const key = ensureApiKey()
604
605
  const params = parseToolInput(input)
605
606
  return callSuperagnt(key, 'POST', '/user/tweets/continuation', undefined, params)
@@ -622,7 +623,7 @@ export default function register(api) {
622
623
  }
623
624
  }
624
625
  },
625
- execute: async (input) => {
626
+ execute: async (_toolCallId, input) => {
626
627
  const key = ensureApiKey()
627
628
  const params = parseToolInput(input)
628
629
  return callSuperagnt(key, 'GET', '/user/details', params)
@@ -641,7 +642,7 @@ export default function register(api) {
641
642
  }
642
643
  }
643
644
  },
644
- execute: async (input) => {
645
+ execute: async (_toolCallId, input) => {
645
646
  const key = ensureApiKey()
646
647
  const params = parseToolInput(input)
647
648
  return callSuperagnt(key, 'POST', '/user/details', undefined, params)
@@ -663,7 +664,7 @@ export default function register(api) {
663
664
  "username"
664
665
  ]
665
666
  },
666
- execute: async (input) => {
667
+ execute: async (_toolCallId, input) => {
667
668
  const key = ensureApiKey()
668
669
  const params = parseToolInput(input)
669
670
  return callSuperagnt(key, 'GET', '/user/about', params)
@@ -690,7 +691,7 @@ export default function register(api) {
690
691
  "tweet_id"
691
692
  ]
692
693
  },
693
- execute: async (input) => {
694
+ execute: async (_toolCallId, input) => {
694
695
  const key = ensureApiKey()
695
696
  const params = parseToolInput(input)
696
697
  return callSuperagnt(key, 'GET', '/tweet/replies/continuation', params)
@@ -713,7 +714,7 @@ export default function register(api) {
713
714
  }
714
715
  }
715
716
  },
716
- execute: async (input) => {
717
+ execute: async (_toolCallId, input) => {
717
718
  const key = ensureApiKey()
718
719
  const params = parseToolInput(input)
719
720
  return callSuperagnt(key, 'POST', '/tweet/replies/continuation', undefined, params)
@@ -740,7 +741,7 @@ export default function register(api) {
740
741
  "tweet_id"
741
742
  ]
742
743
  },
743
- execute: async (input) => {
744
+ execute: async (_toolCallId, input) => {
744
745
  const key = ensureApiKey()
745
746
  const params = parseToolInput(input)
746
747
  return callSuperagnt(key, 'GET', '/tweet/favoriters/continuation', params)
@@ -771,7 +772,7 @@ export default function register(api) {
771
772
  "tweet_id"
772
773
  ]
773
774
  },
774
- execute: async (input) => {
775
+ execute: async (_toolCallId, input) => {
775
776
  const key = ensureApiKey()
776
777
  const params = parseToolInput(input)
777
778
  return callSuperagnt(key, 'GET', '/tweet/retweets/continuation', params)
@@ -793,7 +794,7 @@ export default function register(api) {
793
794
  "tweet_id"
794
795
  ]
795
796
  },
796
- execute: async (input) => {
797
+ execute: async (_toolCallId, input) => {
797
798
  const key = ensureApiKey()
798
799
  const params = parseToolInput(input)
799
800
  return callSuperagnt(key, 'GET', '/tweet/details', params)
@@ -812,7 +813,7 @@ export default function register(api) {
812
813
  }
813
814
  }
814
815
  },
815
- execute: async (input) => {
816
+ execute: async (_toolCallId, input) => {
816
817
  const key = ensureApiKey()
817
818
  const params = parseToolInput(input)
818
819
  return callSuperagnt(key, 'POST', '/tweet/details', undefined, params)
@@ -834,7 +835,7 @@ export default function register(api) {
834
835
  "tweet_id"
835
836
  ]
836
837
  },
837
- execute: async (input) => {
838
+ execute: async (_toolCallId, input) => {
838
839
  const key = ensureApiKey()
839
840
  const params = parseToolInput(input)
840
841
  return callSuperagnt(key, 'GET', '/tweet/favoriters', params)
@@ -860,7 +861,7 @@ export default function register(api) {
860
861
  "tweet_id"
861
862
  ]
862
863
  },
863
- execute: async (input) => {
864
+ execute: async (_toolCallId, input) => {
864
865
  const key = ensureApiKey()
865
866
  const params = parseToolInput(input)
866
867
  return callSuperagnt(key, 'GET', '/tweet/retweets', params)
@@ -882,7 +883,7 @@ export default function register(api) {
882
883
  "tweet_id"
883
884
  ]
884
885
  },
885
- execute: async (input) => {
886
+ execute: async (_toolCallId, input) => {
886
887
  const key = ensureApiKey()
887
888
  const params = parseToolInput(input)
888
889
  return callSuperagnt(key, 'GET', '/tweet/replies', params)
@@ -901,7 +902,7 @@ export default function register(api) {
901
902
  }
902
903
  }
903
904
  },
904
- execute: async (input) => {
905
+ execute: async (_toolCallId, input) => {
905
906
  const key = ensureApiKey()
906
907
  const params = parseToolInput(input)
907
908
  return callSuperagnt(key, 'POST', '/tweet/replies', undefined, params)
@@ -927,7 +928,7 @@ export default function register(api) {
927
928
  "user_id"
928
929
  ]
929
930
  },
930
- execute: async (input) => {
931
+ execute: async (_toolCallId, input) => {
931
932
  const key = ensureApiKey()
932
933
  const params = parseToolInput(input)
933
934
  return callSuperagnt(key, 'GET', '/user/following', params)
@@ -950,7 +951,7 @@ export default function register(api) {
950
951
  }
951
952
  }
952
953
  },
953
- execute: async (input) => {
954
+ execute: async (_toolCallId, input) => {
954
955
  const key = ensureApiKey()
955
956
  const params = parseToolInput(input)
956
957
  return callSuperagnt(key, 'POST', '/user/following', undefined, params)
@@ -981,7 +982,7 @@ export default function register(api) {
981
982
  "continuation_token"
982
983
  ]
983
984
  },
984
- execute: async (input) => {
985
+ execute: async (_toolCallId, input) => {
985
986
  const key = ensureApiKey()
986
987
  const params = parseToolInput(input)
987
988
  return callSuperagnt(key, 'GET', '/lists/tweets/continuation', params)
@@ -1040,7 +1041,7 @@ export default function register(api) {
1040
1041
  "query"
1041
1042
  ]
1042
1043
  },
1043
- execute: async (input) => {
1044
+ execute: async (_toolCallId, input) => {
1044
1045
  const key = ensureApiKey()
1045
1046
  const params = parseToolInput(input)
1046
1047
  return callSuperagnt(key, 'GET', '/search/search/continuation', params)
@@ -1087,7 +1088,7 @@ export default function register(api) {
1087
1088
  }
1088
1089
  }
1089
1090
  },
1090
- execute: async (input) => {
1091
+ execute: async (_toolCallId, input) => {
1091
1092
  const key = ensureApiKey()
1092
1093
  const params = parseToolInput(input)
1093
1094
  return callSuperagnt(key, 'POST', '/search/search/continuation', undefined, params)
@@ -1109,7 +1110,7 @@ export default function register(api) {
1109
1110
  "text"
1110
1111
  ]
1111
1112
  },
1112
- execute: async (input) => {
1113
+ execute: async (_toolCallId, input) => {
1113
1114
  const key = ensureApiKey()
1114
1115
  const params = parseToolInput(input)
1115
1116
  return callSuperagnt(key, 'GET', '/ai/topic-classification', params)
@@ -1128,7 +1129,7 @@ export default function register(api) {
1128
1129
  }
1129
1130
  }
1130
1131
  },
1131
- execute: async (input) => {
1132
+ execute: async (_toolCallId, input) => {
1132
1133
  const key = ensureApiKey()
1133
1134
  const params = parseToolInput(input)
1134
1135
  return callSuperagnt(key, 'POST', '/translate/detect', undefined, params)
@@ -1150,7 +1151,7 @@ export default function register(api) {
1150
1151
  "text"
1151
1152
  ]
1152
1153
  },
1153
- execute: async (input) => {
1154
+ execute: async (_toolCallId, input) => {
1154
1155
  const key = ensureApiKey()
1155
1156
  const params = parseToolInput(input)
1156
1157
  return callSuperagnt(key, 'GET', '/ai/named-entity-recognition', params)
@@ -1172,7 +1173,7 @@ export default function register(api) {
1172
1173
  "text"
1173
1174
  ]
1174
1175
  },
1175
- execute: async (input) => {
1176
+ execute: async (_toolCallId, input) => {
1176
1177
  const key = ensureApiKey()
1177
1178
  const params = parseToolInput(input)
1178
1179
  return callSuperagnt(key, 'GET', '/ai/sentiment-analysis', params)
@@ -1195,7 +1196,7 @@ export default function register(api) {
1195
1196
  }
1196
1197
  }
1197
1198
  },
1198
- execute: async (input) => {
1199
+ execute: async (_toolCallId, input) => {
1199
1200
  const key = ensureApiKey()
1200
1201
  const params = parseToolInput(input)
1201
1202
  return callSuperagnt(key, 'POST', '/translate', undefined, params)
@@ -1209,7 +1210,7 @@ export default function register(api) {
1209
1210
  "type": "object",
1210
1211
  "properties": {}
1211
1212
  },
1212
- execute: async (input) => {
1213
+ execute: async (_toolCallId, input) => {
1213
1214
  const key = ensureApiKey()
1214
1215
  const params = parseToolInput(input)
1215
1216
  return callSuperagnt(key, 'GET', '/trends/available', params)
@@ -1231,7 +1232,7 @@ export default function register(api) {
1231
1232
  "woeid"
1232
1233
  ]
1233
1234
  },
1234
- execute: async (input) => {
1235
+ execute: async (_toolCallId, input) => {
1235
1236
  const key = ensureApiKey()
1236
1237
  const params = parseToolInput(input)
1237
1238
  return callSuperagnt(key, 'GET', '/trends/', params)
@@ -1277,7 +1278,7 @@ export default function register(api) {
1277
1278
  "query"
1278
1279
  ]
1279
1280
  },
1280
- execute: async (input) => {
1281
+ execute: async (_toolCallId, input) => {
1281
1282
  const key = ensureApiKey()
1282
1283
  const params = parseToolInput(input)
1283
1284
  return callSuperagnt(key, 'GET', '/search/geo', params)
@@ -1303,7 +1304,7 @@ export default function register(api) {
1303
1304
  "list_id"
1304
1305
  ]
1305
1306
  },
1306
- execute: async (input) => {
1307
+ execute: async (_toolCallId, input) => {
1307
1308
  const key = ensureApiKey()
1308
1309
  const params = parseToolInput(input)
1309
1310
  return callSuperagnt(key, 'GET', '/lists/tweets', params)
@@ -1325,7 +1326,7 @@ export default function register(api) {
1325
1326
  "list_id"
1326
1327
  ]
1327
1328
  },
1328
- execute: async (input) => {
1329
+ execute: async (_toolCallId, input) => {
1329
1330
  const key = ensureApiKey()
1330
1331
  const params = parseToolInput(input)
1331
1332
  return callSuperagnt(key, 'GET', '/lists/details', params)
@@ -1379,7 +1380,7 @@ export default function register(api) {
1379
1380
  "query"
1380
1381
  ]
1381
1382
  },
1382
- execute: async (input) => {
1383
+ execute: async (_toolCallId, input) => {
1383
1384
  const key = ensureApiKey()
1384
1385
  const params = parseToolInput(input)
1385
1386
  return callSuperagnt(key, 'GET', '/search/search', params)
@@ -1422,7 +1423,7 @@ export default function register(api) {
1422
1423
  }
1423
1424
  }
1424
1425
  },
1425
- execute: async (input) => {
1426
+ execute: async (_toolCallId, input) => {
1426
1427
  const key = ensureApiKey()
1427
1428
  const params = parseToolInput(input)
1428
1429
  return callSuperagnt(key, 'POST', '/search/search', undefined, params)
@@ -1452,7 +1453,7 @@ export default function register(api) {
1452
1453
  "hashtag"
1453
1454
  ]
1454
1455
  },
1455
- execute: async (input) => {
1456
+ execute: async (_toolCallId, input) => {
1456
1457
  const key = ensureApiKey()
1457
1458
  const params = parseToolInput(input)
1458
1459
  return callSuperagnt(key, 'GET', '/hashtag/hashtag', params)
@@ -1483,7 +1484,7 @@ export default function register(api) {
1483
1484
  }
1484
1485
  }
1485
1486
  },
1486
- execute: async (input) => {
1487
+ execute: async (_toolCallId, input) => {
1487
1488
  const key = ensureApiKey()
1488
1489
  const params = parseToolInput(input)
1489
1490
  return callSuperagnt(key, 'POST', '/hashtag/hashtag', undefined, params)
@@ -1518,7 +1519,7 @@ export default function register(api) {
1518
1519
  "hashtag"
1519
1520
  ]
1520
1521
  },
1521
- execute: async (input) => {
1522
+ execute: async (_toolCallId, input) => {
1522
1523
  const key = ensureApiKey()
1523
1524
  const params = parseToolInput(input)
1524
1525
  return callSuperagnt(key, 'GET', '/hashtag/hashtag/continuation', params)
@@ -1553,7 +1554,7 @@ export default function register(api) {
1553
1554
  }
1554
1555
  }
1555
1556
  },
1556
- execute: async (input) => {
1557
+ execute: async (_toolCallId, input) => {
1557
1558
  const key = ensureApiKey()
1558
1559
  const params = parseToolInput(input)
1559
1560
  return callSuperagnt(key, 'POST', '/hashtag/hashtag/continuation', undefined, params)
@@ -2,7 +2,7 @@
2
2
  "id": "x-twitter-data",
3
3
  "name": "X (Twitter) Data",
4
4
  "description": "Unified access to tweets, user profiles, followers, search, and hashtag streams. Built for LLMs and automation — not one-off scraping.",
5
- "version": "2.0.4",
5
+ "version": "2.0.5",
6
6
  "contracts": {
7
7
  "tools": [
8
8
  "superagnt_x_user_medias_continuation_get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superagnt/x-twitter-data",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "type": "module",
5
5
  "description": "Unified access to tweets, user profiles, followers, search, and hashtag streams. Built for LLMs and automation — not one-off scraping.",
6
6
  "main": "index.js",