@crowdlisten/harness 1.0.0

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.
Files changed (109) hide show
  1. package/AGENTS.md +167 -0
  2. package/LICENSE +21 -0
  3. package/README.md +153 -0
  4. package/dist/agent-proxy.d.ts +24 -0
  5. package/dist/agent-proxy.js +140 -0
  6. package/dist/agent-tools.d.ts +736 -0
  7. package/dist/agent-tools.js +409 -0
  8. package/dist/context/api.d.ts +5 -0
  9. package/dist/context/api.js +164 -0
  10. package/dist/context/cli.d.ts +19 -0
  11. package/dist/context/cli.js +108 -0
  12. package/dist/context/extractor.d.ts +12 -0
  13. package/dist/context/extractor.js +43 -0
  14. package/dist/context/index.d.ts +12 -0
  15. package/dist/context/index.js +11 -0
  16. package/dist/context/matcher.d.ts +39 -0
  17. package/dist/context/matcher.js +246 -0
  18. package/dist/context/parser.d.ts +28 -0
  19. package/dist/context/parser.js +157 -0
  20. package/dist/context/pipeline.d.ts +26 -0
  21. package/dist/context/pipeline.js +56 -0
  22. package/dist/context/prompts.d.ts +6 -0
  23. package/dist/context/prompts.js +60 -0
  24. package/dist/context/providers.d.ts +6 -0
  25. package/dist/context/providers.js +106 -0
  26. package/dist/context/redactor.d.ts +10 -0
  27. package/dist/context/redactor.js +68 -0
  28. package/dist/context/server.d.ts +5 -0
  29. package/dist/context/server.js +134 -0
  30. package/dist/context/store.d.ts +12 -0
  31. package/dist/context/store.js +82 -0
  32. package/dist/context/types.d.ts +79 -0
  33. package/dist/context/types.js +4 -0
  34. package/dist/context/user-state.d.ts +40 -0
  35. package/dist/context/user-state.js +144 -0
  36. package/dist/index.d.ts +14 -0
  37. package/dist/index.js +385 -0
  38. package/dist/insights/browser/BrowserPool.d.ts +87 -0
  39. package/dist/insights/browser/BrowserPool.js +266 -0
  40. package/dist/insights/browser/RequestInterceptor.d.ts +46 -0
  41. package/dist/insights/browser/RequestInterceptor.js +115 -0
  42. package/dist/insights/cli.d.ts +8 -0
  43. package/dist/insights/cli.js +206 -0
  44. package/dist/insights/core/base/BaseAdapter.d.ts +37 -0
  45. package/dist/insights/core/base/BaseAdapter.js +123 -0
  46. package/dist/insights/core/health/HealthMonitor.d.ts +75 -0
  47. package/dist/insights/core/health/HealthMonitor.js +171 -0
  48. package/dist/insights/core/interfaces/SocialMediaPlatform.d.ts +125 -0
  49. package/dist/insights/core/interfaces/SocialMediaPlatform.js +42 -0
  50. package/dist/insights/core/utils/DataNormalizer.d.ts +53 -0
  51. package/dist/insights/core/utils/DataNormalizer.js +349 -0
  52. package/dist/insights/core/utils/InstagramUrlUtils.d.ts +11 -0
  53. package/dist/insights/core/utils/InstagramUrlUtils.js +60 -0
  54. package/dist/insights/core/utils/TikTokUrlUtils.d.ts +10 -0
  55. package/dist/insights/core/utils/TikTokUrlUtils.js +57 -0
  56. package/dist/insights/handlers.d.ts +157 -0
  57. package/dist/insights/handlers.js +246 -0
  58. package/dist/insights/index.d.ts +437 -0
  59. package/dist/insights/index.js +426 -0
  60. package/dist/insights/platforms/instagram/InstagramAdapter.d.ts +34 -0
  61. package/dist/insights/platforms/instagram/InstagramAdapter.js +342 -0
  62. package/dist/insights/platforms/moltbook/MoltbookAdapter.d.ts +31 -0
  63. package/dist/insights/platforms/moltbook/MoltbookAdapter.js +227 -0
  64. package/dist/insights/platforms/reddit/RedditAdapter.d.ts +21 -0
  65. package/dist/insights/platforms/reddit/RedditAdapter.js +212 -0
  66. package/dist/insights/platforms/tiktok/TikTokAdapter.d.ts +34 -0
  67. package/dist/insights/platforms/tiktok/TikTokAdapter.js +269 -0
  68. package/dist/insights/platforms/twitter/TwitterAdapter.d.ts +23 -0
  69. package/dist/insights/platforms/twitter/TwitterAdapter.js +211 -0
  70. package/dist/insights/platforms/xiaohongshu/XiaohongshuAdapter.d.ts +35 -0
  71. package/dist/insights/platforms/xiaohongshu/XiaohongshuAdapter.js +258 -0
  72. package/dist/insights/platforms/youtube/YouTubeAdapter.d.ts +22 -0
  73. package/dist/insights/platforms/youtube/YouTubeAdapter.js +254 -0
  74. package/dist/insights/service-config.d.ts +7 -0
  75. package/dist/insights/service-config.js +60 -0
  76. package/dist/insights/services/UnifiedSocialMediaService.d.ts +94 -0
  77. package/dist/insights/services/UnifiedSocialMediaService.js +259 -0
  78. package/dist/insights/vision/VisionExtractor.d.ts +46 -0
  79. package/dist/insights/vision/VisionExtractor.js +236 -0
  80. package/dist/learnings.d.ts +50 -0
  81. package/dist/learnings.js +130 -0
  82. package/dist/openapi.d.ts +29 -0
  83. package/dist/openapi.js +169 -0
  84. package/dist/server-factory.d.ts +20 -0
  85. package/dist/server-factory.js +41 -0
  86. package/dist/suggestions.d.ts +16 -0
  87. package/dist/suggestions.js +72 -0
  88. package/dist/telemetry.d.ts +44 -0
  89. package/dist/telemetry.js +93 -0
  90. package/dist/tools/registry.d.ts +65 -0
  91. package/dist/tools/registry.js +256 -0
  92. package/dist/tools.d.ts +2433 -0
  93. package/dist/tools.js +2294 -0
  94. package/dist/transport/http.d.ts +15 -0
  95. package/dist/transport/http.js +154 -0
  96. package/package.json +76 -0
  97. package/skills/catalog.json +272 -0
  98. package/skills/community-catalog.json +4202 -0
  99. package/skills/competitive-analysis/SKILL.md +174 -0
  100. package/skills/content-creator/SKILL.md +256 -0
  101. package/skills/content-strategy/SKILL.md +222 -0
  102. package/skills/data-storytelling/SKILL.md +248 -0
  103. package/skills/heuristic-evaluation/SKILL.md +201 -0
  104. package/skills/market-research-reports/SKILL.md +184 -0
  105. package/skills/user-stories/SKILL.md +178 -0
  106. package/skills/ux-researcher/SKILL.md +239 -0
  107. package/web-dist/assets/index-B1b25lNd.css +1 -0
  108. package/web-dist/assets/index-CDWHwHbl.js +64 -0
  109. package/web-dist/index.html +16 -0
@@ -0,0 +1,426 @@
1
+ /**
2
+ * CrowdListen Insights — Social Platform Tools
3
+ *
4
+ * Tool definitions and handler dispatcher for social listening capabilities.
5
+ * Merged from crowdlisten_sources into the unified MCP server.
6
+ *
7
+ * Free tools (no key): search, comments, trending, user content, platform status, health, vision
8
+ * Paid tools (CROWDLISTEN_API_KEY): analyze, cluster, enrich, deep_analyze, insights, research
9
+ */
10
+ import { createService } from './service-config.js';
11
+ import { HealthMonitor } from './core/health/HealthMonitor.js';
12
+ import { getTrendingContent, getUserContent, searchContent, getContentComments, analyzeContent, getPlatformStatus, healthCheck, clusterOpinions, enrichContent, deepAnalyze, extractInsights, researchSynthesis, extractWithVision, } from './handlers.js';
13
+ // Re-export types for consumers
14
+ export { HealthMonitor } from './core/health/HealthMonitor.js';
15
+ // ─── Tool Definitions ──────────────────────────────────────────────────────
16
+ export const INSIGHTS_TOOLS = [
17
+ // ── Free tools — no API key needed ──────────────────────────────────────
18
+ {
19
+ name: 'search_content',
20
+ description: 'Search for posts and discussions across social platforms. Use this first to find content, then use get_content_comments on specific results. Free, no API key needed.',
21
+ inputSchema: {
22
+ type: 'object',
23
+ properties: {
24
+ platform: {
25
+ type: 'string',
26
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook', 'all'],
27
+ description: 'Platform to search on, or "all" for all platforms',
28
+ },
29
+ query: {
30
+ type: 'string',
31
+ description: 'Search query (keywords, hashtags, etc.)',
32
+ },
33
+ limit: {
34
+ type: 'number',
35
+ minimum: 1,
36
+ maximum: 50,
37
+ default: 10,
38
+ description: 'Maximum number of posts to retrieve',
39
+ },
40
+ useVision: {
41
+ type: 'boolean',
42
+ default: false,
43
+ description: 'Force vision extraction mode (screenshot + LLM analysis). Treats query as a URL.',
44
+ },
45
+ },
46
+ required: ['platform', 'query'],
47
+ },
48
+ },
49
+ {
50
+ name: 'get_content_comments',
51
+ description: 'Get comments/replies for a specific post. Use after search_content to drill into a discussion. Returns raw comment text, authors, timestamps, and engagement metrics. Free, no API key needed.',
52
+ inputSchema: {
53
+ type: 'object',
54
+ properties: {
55
+ platform: {
56
+ type: 'string',
57
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
58
+ description: 'Platform where the content is located',
59
+ },
60
+ contentId: {
61
+ type: 'string',
62
+ description: 'ID of the content to get comments for',
63
+ },
64
+ limit: {
65
+ type: 'number',
66
+ minimum: 1,
67
+ maximum: 100,
68
+ default: 20,
69
+ description: 'Maximum number of comments to retrieve',
70
+ },
71
+ useVision: {
72
+ type: 'boolean',
73
+ default: false,
74
+ description: 'Force vision extraction mode (screenshot + LLM analysis). Treats contentId as a URL.',
75
+ },
76
+ },
77
+ required: ['platform', 'contentId'],
78
+ },
79
+ },
80
+ {
81
+ name: 'get_trending_content',
82
+ description: 'Get currently trending posts from a platform. Useful for discovering what audiences are talking about right now. Free, no API key needed.',
83
+ inputSchema: {
84
+ type: 'object',
85
+ properties: {
86
+ platform: {
87
+ type: 'string',
88
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook', 'all'],
89
+ description: 'Platform to get trending content from, or "all" for all platforms',
90
+ },
91
+ limit: {
92
+ type: 'number',
93
+ minimum: 1,
94
+ maximum: 50,
95
+ default: 10,
96
+ description: 'Maximum number of posts to retrieve',
97
+ },
98
+ },
99
+ required: ['platform'],
100
+ },
101
+ },
102
+ {
103
+ name: 'get_user_content',
104
+ description: 'Get recent posts from a specific user/creator. Useful for tracking influencers, competitors, or key voices. Free, no API key needed.',
105
+ inputSchema: {
106
+ type: 'object',
107
+ properties: {
108
+ platform: {
109
+ type: 'string',
110
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
111
+ description: 'Platform to get user content from',
112
+ },
113
+ userId: {
114
+ type: 'string',
115
+ description: 'User ID or username to get content from',
116
+ },
117
+ limit: {
118
+ type: 'number',
119
+ minimum: 1,
120
+ maximum: 50,
121
+ default: 10,
122
+ description: 'Maximum number of posts to retrieve',
123
+ },
124
+ },
125
+ required: ['platform', 'userId'],
126
+ },
127
+ },
128
+ {
129
+ name: 'get_platform_status',
130
+ description: 'List which platforms are available and their capabilities. Call this to check what platforms are configured before searching.',
131
+ inputSchema: {
132
+ type: 'object',
133
+ properties: {},
134
+ },
135
+ },
136
+ {
137
+ name: 'health_check',
138
+ description: 'Check connectivity and health of all configured platforms. Call this to diagnose issues if search or comments return errors.',
139
+ inputSchema: {
140
+ type: 'object',
141
+ properties: {},
142
+ },
143
+ },
144
+ // ── Vision extraction — screenshot + LLM analysis, no API key ────────────
145
+ {
146
+ name: 'extract_url',
147
+ description: 'Extract content from any URL using vision (screenshot + LLM analysis). Works with any website — social media, forums, news sites, etc. Requires at least one LLM API key (ANTHROPIC_API_KEY, GEMINI_API_KEY, or OPENAI_API_KEY). Free, no CROWDLISTEN_API_KEY needed.',
148
+ inputSchema: {
149
+ type: 'object',
150
+ properties: {
151
+ url: {
152
+ type: 'string',
153
+ description: 'URL to extract content from',
154
+ },
155
+ mode: {
156
+ type: 'string',
157
+ enum: ['posts', 'comments', 'raw'],
158
+ default: 'posts',
159
+ description: 'Extraction mode: posts (structured posts), comments (structured comments), raw (unstructured text)',
160
+ },
161
+ limit: {
162
+ type: 'number',
163
+ minimum: 1,
164
+ maximum: 50,
165
+ default: 10,
166
+ description: 'Maximum items to extract',
167
+ },
168
+ },
169
+ required: ['url'],
170
+ },
171
+ },
172
+ // ── Paid tools — require CROWDLISTEN_API_KEY ─────────────────────────────
173
+ {
174
+ name: 'analyze_content',
175
+ description: 'Analyze a post and its comments via the CrowdListen analysis API — sentiment, themes, tension synthesis. Requires CROWDLISTEN_API_KEY. Get one at crowdlisten.com/api.',
176
+ inputSchema: {
177
+ type: 'object',
178
+ properties: {
179
+ platform: {
180
+ type: 'string',
181
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
182
+ description: 'Platform where the content is located',
183
+ },
184
+ contentId: {
185
+ type: 'string',
186
+ description: 'ID of the content to analyze',
187
+ },
188
+ analysisDepth: {
189
+ type: 'string',
190
+ enum: ['surface', 'standard', 'deep', 'comprehensive'],
191
+ default: 'standard',
192
+ description: 'Depth of analysis',
193
+ },
194
+ },
195
+ required: ['platform', 'contentId'],
196
+ },
197
+ },
198
+ {
199
+ name: 'cluster_opinions',
200
+ description: 'Group comments into engagement-weighted semantic opinion clusters. Identifies recurring themes, consensus, and minority viewpoints. Requires CROWDLISTEN_API_KEY.',
201
+ inputSchema: {
202
+ type: 'object',
203
+ properties: {
204
+ platform: {
205
+ type: 'string',
206
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
207
+ description: 'Platform where the content is located',
208
+ },
209
+ contentId: {
210
+ type: 'string',
211
+ description: 'ID of the content to analyze comments from',
212
+ },
213
+ clusterCount: {
214
+ type: 'number',
215
+ default: 5,
216
+ minimum: 2,
217
+ maximum: 15,
218
+ description: 'Number of opinion clusters to generate',
219
+ },
220
+ includeExamples: {
221
+ type: 'boolean',
222
+ default: true,
223
+ description: 'Include example comments for each cluster',
224
+ },
225
+ weightByEngagement: {
226
+ type: 'boolean',
227
+ default: true,
228
+ description: 'Weight clusters by comment engagement (likes, replies)',
229
+ },
230
+ },
231
+ required: ['platform', 'contentId'],
232
+ },
233
+ },
234
+ {
235
+ name: 'enrich_content',
236
+ description: 'Enrich comments with intent detection, stance analysis, engagement scoring, and timestamp hints. Requires CROWDLISTEN_API_KEY.',
237
+ inputSchema: {
238
+ type: 'object',
239
+ properties: {
240
+ platform: {
241
+ type: 'string',
242
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
243
+ description: 'Platform where the content is located',
244
+ },
245
+ contentId: {
246
+ type: 'string',
247
+ description: 'ID of the content to enrich comments for',
248
+ },
249
+ question: {
250
+ type: 'string',
251
+ description: 'Optional analysis context/question',
252
+ },
253
+ },
254
+ required: ['platform', 'contentId'],
255
+ },
256
+ },
257
+ {
258
+ name: 'deep_analyze',
259
+ description: 'AI-powered deep analysis of content via the CrowdListen analysis API. Returns structured insights including audience segments, pain points, feature requests, and competitive signals. Requires CROWDLISTEN_API_KEY.',
260
+ inputSchema: {
261
+ type: 'object',
262
+ properties: {
263
+ platform: {
264
+ type: 'string',
265
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
266
+ description: 'Platform where the content is located',
267
+ },
268
+ contentId: {
269
+ type: 'string',
270
+ description: 'ID of the content to analyze',
271
+ },
272
+ analysisDepth: {
273
+ type: 'string',
274
+ enum: ['deep', 'comprehensive'],
275
+ default: 'deep',
276
+ description: 'deep = structured analysis; comprehensive = full audience intelligence report',
277
+ },
278
+ },
279
+ required: ['platform', 'contentId'],
280
+ },
281
+ },
282
+ {
283
+ name: 'extract_insights',
284
+ description: 'Extract categorized insights (pain points, feature requests, praise, complaints, suggestions) from content via the CrowdListen analysis API. Requires CROWDLISTEN_API_KEY.',
285
+ inputSchema: {
286
+ type: 'object',
287
+ properties: {
288
+ platform: {
289
+ type: 'string',
290
+ enum: ['tiktok', 'twitter', 'reddit', 'instagram', 'youtube', 'moltbook'],
291
+ description: 'Platform where the content is located',
292
+ },
293
+ contentId: {
294
+ type: 'string',
295
+ description: 'ID of the content to extract insights from',
296
+ },
297
+ categories: {
298
+ type: 'array',
299
+ items: { type: 'string' },
300
+ description: 'Optional: filter to specific insight categories (e.g. ["pain_points", "feature_requests"])',
301
+ },
302
+ },
303
+ required: ['platform', 'contentId'],
304
+ },
305
+ },
306
+ {
307
+ name: 'research_synthesis',
308
+ description: 'Cross-platform research synthesis — searches multiple platforms, analyzes results, and produces a unified research report. Requires CROWDLISTEN_API_KEY.',
309
+ inputSchema: {
310
+ type: 'object',
311
+ properties: {
312
+ query: {
313
+ type: 'string',
314
+ description: 'Research query or topic to synthesize across platforms',
315
+ },
316
+ platforms: {
317
+ type: 'array',
318
+ items: { type: 'string' },
319
+ description: 'Platforms to include (default: reddit, twitter, youtube)',
320
+ },
321
+ depth: {
322
+ type: 'string',
323
+ enum: ['quick', 'standard', 'deep'],
324
+ default: 'standard',
325
+ description: 'Research depth — quick (~10 sources), standard (~25), deep (~50+)',
326
+ },
327
+ },
328
+ required: ['query'],
329
+ },
330
+ },
331
+ ];
332
+ // ─── Insights Runtime ──────────────────────────────────────────────────────
333
+ let insightsService = null;
334
+ let insightsMonitor = null;
335
+ let initPromise = null;
336
+ async function ensureInitialized() {
337
+ if (insightsService)
338
+ return;
339
+ if (initPromise) {
340
+ await initPromise;
341
+ return;
342
+ }
343
+ initPromise = (async () => {
344
+ insightsService = createService();
345
+ const initResults = await insightsService.initialize();
346
+ const successfulPlatforms = Object.entries(initResults)
347
+ .filter(([, success]) => success)
348
+ .map(([platform]) => platform);
349
+ if (successfulPlatforms.length === 0) {
350
+ console.error('[Insights] No platforms initialized');
351
+ return;
352
+ }
353
+ console.error(`[Insights] Initialized: ${successfulPlatforms.join(', ')}`);
354
+ // Start background health monitoring
355
+ const monitoredPlatforms = insightsService.getInitializedPlatforms();
356
+ const healthCheckFn = async (platform) => {
357
+ try {
358
+ const results = await insightsService.searchContent(platform, 'test', 1);
359
+ return { success: true, resultCount: results.length };
360
+ }
361
+ catch {
362
+ return { success: false, resultCount: 0 };
363
+ }
364
+ };
365
+ insightsMonitor = new HealthMonitor(healthCheckFn, monitoredPlatforms);
366
+ insightsMonitor.start();
367
+ })();
368
+ await initPromise;
369
+ }
370
+ /**
371
+ * Handle an insights tool call. Returns a JSON string result.
372
+ * Lazily initializes the social media service on first call.
373
+ */
374
+ export async function handleInsightsTool(name, args) {
375
+ await ensureInitialized();
376
+ if (!insightsService) {
377
+ throw new Error('Insights service failed to initialize. Check platform credentials.');
378
+ }
379
+ switch (name) {
380
+ // ── Free tools ──────────────────────────────────────────────────
381
+ case 'search_content':
382
+ return JSON.stringify(await searchContent(insightsService, args), null, 2);
383
+ case 'get_content_comments':
384
+ return JSON.stringify(await getContentComments(insightsService, args), null, 2);
385
+ case 'get_trending_content':
386
+ return JSON.stringify(await getTrendingContent(insightsService, args), null, 2);
387
+ case 'get_user_content':
388
+ return JSON.stringify(await getUserContent(insightsService, args), null, 2);
389
+ case 'get_platform_status':
390
+ return JSON.stringify(getPlatformStatus(insightsService), null, 2);
391
+ case 'health_check':
392
+ return JSON.stringify(await healthCheck(insightsService, insightsMonitor ?? undefined), null, 2);
393
+ // ── Vision extraction ─────────────────────────────────────────
394
+ case 'extract_url':
395
+ return JSON.stringify(await extractWithVision(args), null, 2);
396
+ // ── Paid tools (all delegate to agent API) ──────────────────────
397
+ case 'analyze_content':
398
+ return JSON.stringify(await analyzeContent(insightsService, args), null, 2);
399
+ case 'cluster_opinions':
400
+ return JSON.stringify(await clusterOpinions(insightsService, args), null, 2);
401
+ case 'enrich_content':
402
+ return JSON.stringify(await enrichContent(insightsService, args), null, 2);
403
+ case 'deep_analyze':
404
+ return JSON.stringify(await deepAnalyze(args), null, 2);
405
+ case 'extract_insights':
406
+ return JSON.stringify(await extractInsights(args), null, 2);
407
+ case 'research_synthesis':
408
+ return JSON.stringify(await researchSynthesis(args), null, 2);
409
+ default:
410
+ throw new Error(`Unknown insights tool: ${name}`);
411
+ }
412
+ }
413
+ /** Tool name set for quick lookup */
414
+ export const INSIGHTS_TOOL_NAMES = new Set(INSIGHTS_TOOLS.map(t => t.name));
415
+ /** Clean up resources on shutdown */
416
+ export async function cleanupInsights() {
417
+ if (insightsMonitor) {
418
+ insightsMonitor.stop();
419
+ insightsMonitor = null;
420
+ }
421
+ if (insightsService) {
422
+ await insightsService.cleanup();
423
+ insightsService = null;
424
+ }
425
+ initPromise = null;
426
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Instagram Platform Adapter — flat browser adapter using API interception.
3
+ *
4
+ * Uses BrowserPool + RequestInterceptor to capture Instagram's internal API
5
+ * responses (GraphQL + v1 API). No tiers, no fallback chains.
6
+ *
7
+ * API targets:
8
+ * - /graphql/query/ — posts, user content
9
+ * - /api/v1/tags/ — hashtag search
10
+ * - /api/v1/feed/ — explore/user feed
11
+ * - /api/v1/media/ — media endpoints
12
+ */
13
+ import { BaseAdapter } from '../../core/base/BaseAdapter.js';
14
+ import { Post, Comment, PlatformCapabilities, PlatformType, PlatformConfig } from '../../core/interfaces/SocialMediaPlatform.js';
15
+ export declare class InstagramAdapter extends BaseAdapter {
16
+ constructor(config: PlatformConfig);
17
+ initialize(): Promise<boolean>;
18
+ searchContent(query: string, limit?: number): Promise<Post[]>;
19
+ getTrendingContent(limit?: number): Promise<Post[]>;
20
+ getUserContent(userId: string, limit?: number): Promise<Post[]>;
21
+ getContentComments(contentId: string, limit?: number): Promise<Comment[]>;
22
+ private interceptPosts;
23
+ private waitAndScroll;
24
+ private structurePosts;
25
+ private structureComments;
26
+ private extractMediaEdges;
27
+ private normalizeMediaNode;
28
+ private normalizeV1Item;
29
+ private normalizeCommentNode;
30
+ private normalizeV1Comment;
31
+ private extractHashtags;
32
+ getPlatformName(): PlatformType;
33
+ getSupportedFeatures(): PlatformCapabilities;
34
+ }