peak6-x-intelligence-plugin 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # X Intelligence Plugin
2
2
 
3
- X/Twitter intelligence plugin for Paperclip
3
+ X/Twitter intelligence plugin for [Paperclip](https://paperclip.ing). Published as [`peak6-x-intelligence-plugin`](https://www.npmjs.com/package/peak6-x-intelligence-plugin) on npm.
4
4
 
5
5
  ## Development
6
6
 
@@ -11,23 +11,38 @@ pnpm dev:ui # local dev server with hot-reload events
11
11
  pnpm test
12
12
  ```
13
13
 
14
- This scaffold snapshots `@paperclipai/plugin-sdk` and `@paperclipai/shared` from a local Paperclip checkout at:
14
+ Plugin SDK types come from packed tarballs in `.paperclip-sdk/`.
15
15
 
16
- `/Users/zshin/Projects/attention-machine/packages/plugins/sdk`
17
-
18
- The packed tarballs live in `.paperclip-sdk/` for local development. Before publishing this plugin, switch those dependencies to published package versions once they are available on npm.
16
+ ## Publishing
19
17
 
18
+ CI publishes automatically on version tags:
20
19
 
20
+ ```bash
21
+ npm version patch # or minor/major
22
+ git push && git push --tags
23
+ # CI: build → test → npm publish → trigger paperclip-deploy → Cloud Run updated
24
+ ```
21
25
 
22
- ## Install Into Paperclip
26
+ ## Install Into Paperclip (local dev)
23
27
 
24
28
  ```bash
25
29
  curl -X POST http://127.0.0.1:3100/api/plugins/install \
26
30
  -H "Content-Type: application/json" \
27
- -d '{"packageName":"/Users/zshin/Projects/paperclip/x-intelligence-plugin","isLocalPath":true}'
31
+ -d '{"packageName":"/path/to/x-intelligence-plugin","isLocalPath":true}'
28
32
  ```
29
33
 
30
- ## Build Options
34
+ ## Agent Integration
35
+
36
+ Agents access plugin data via bridge endpoints using their `$PAPERCLIP_API_KEY`:
37
+
38
+ ```
39
+ POST /api/plugins/{pluginId}/bridge/data — {"key": "corpus", "params": {"date": "YYYY-MM-DD"}}
40
+ POST /api/plugins/{pluginId}/bridge/data — {"key": "dashboard-summary", "params": {}}
41
+ POST /api/plugins/{pluginId}/bridge/action — {"key": "trigger-discovery", "params": {}}
42
+ ```
43
+
44
+ The `x-discovery-engine` skill (source: [peak6-labs/x-discovery-engine-skill](https://github.com/peak6-labs/x-discovery-engine-skill)) teaches agents the full workflow.
45
+
46
+ ## Deployment
31
47
 
32
- - `pnpm build` uses esbuild presets from `@paperclipai/plugin-sdk/bundlers`.
33
- - `pnpm build:rollup` uses rollup presets from the same SDK.
48
+ Deployed via [peak6-labs/paperclip-deploy](https://github.com/peak6-labs/paperclip-deploy). Deploy CI pulls the latest version from npm at build time.
package/dist/manifest.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/constants.ts
2
2
  var PLUGIN_ID = "peak6-labs.x-intelligence";
3
- var PLUGIN_VERSION = "0.1.0";
3
+ var PLUGIN_VERSION = "0.1.2";
4
4
  var JOB_KEYS = {
5
5
  discoveryRun: "discovery-run",
6
6
  authorityDecay: "authority-decay",
@@ -12,15 +12,21 @@ var TOOL_NAMES = {
12
12
  getToday: "get-today",
13
13
  getAuthorities: "get-authorities",
14
14
  suggestHandles: "suggest-handles",
15
- trackHandle: "track-handle"
15
+ trackHandle: "track-handle",
16
+ analyzeTopic: "analyze-topic",
17
+ getThread: "get-thread",
18
+ promoteHandle: "promote-handle",
19
+ rateTweet: "rate-tweet"
16
20
  };
17
21
  var SLOT_IDS = {
18
22
  dashboardWidget: "x-intelligence-dashboard",
19
- settingsPage: "x-intelligence-settings"
23
+ settingsPage: "x-intelligence-settings",
24
+ corpusBrowser: "x-intelligence-corpus-browser"
20
25
  };
21
26
  var EXPORT_NAMES = {
22
27
  dashboardWidget: "DashboardWidget",
23
- settingsPage: "SettingsPage"
28
+ settingsPage: "SettingsPage",
29
+ corpusBrowser: "CorpusBrowserPage"
24
30
  };
25
31
  var DEFAULT_CONFIG = {
26
32
  company_id: "",
@@ -122,7 +128,12 @@ var DEFAULT_CONFIG = {
122
128
  },
123
129
  tracking_window_days: 14
124
130
  },
125
- corpus_retention_days: 90
131
+ corpus_retention_days: 90,
132
+ engagement_thresholds: {
133
+ noise_floor: 10,
134
+ expert: 50,
135
+ escalation: 100
136
+ }
126
137
  };
127
138
 
128
139
  // src/manifest.ts
@@ -148,7 +159,8 @@ var manifest = {
148
159
  "activity.log.write",
149
160
  "metrics.write",
150
161
  "instance.settings.register",
151
- "ui.dashboardWidget.register"
162
+ "ui.dashboardWidget.register",
163
+ "ui.page.register"
152
164
  ],
153
165
  entrypoints: {
154
166
  worker: "./dist/worker.js",
@@ -247,6 +259,17 @@ var manifest = {
247
259
  type: "number",
248
260
  title: "Corpus Retention (days)",
249
261
  default: DEFAULT_CONFIG.corpus_retention_days
262
+ },
263
+ engagement_thresholds: {
264
+ type: "object",
265
+ title: "Engagement Thresholds",
266
+ description: "Engagement level tiers: noise_floor (filter), expert (highlight), escalation (alert event)",
267
+ properties: {
268
+ noise_floor: { type: "number", default: 10 },
269
+ expert: { type: "number", default: 50 },
270
+ escalation: { type: "number", default: 100 }
271
+ },
272
+ default: DEFAULT_CONFIG.engagement_thresholds
250
273
  }
251
274
  }
252
275
  },
@@ -280,33 +303,30 @@ var manifest = {
280
303
  {
281
304
  name: TOOL_NAMES.searchCorpus,
282
305
  displayName: "Search X Corpus",
283
- description: "Search the scored X intelligence corpus by query text, date range, and content pillar.",
306
+ description: "Search the scored X intelligence corpus by query text, date range, content pillar, score threshold, and engagement level.",
284
307
  parametersSchema: {
285
308
  type: "object",
286
309
  properties: {
287
- query: { type: "string", description: "Search query" },
288
- date: {
289
- type: "string",
290
- description: "Date filter (YYYY-MM-DD)"
291
- },
292
- pillar: {
293
- type: "string",
294
- description: "Content pillar filter"
295
- },
296
- limit: { type: "number", description: "Max results (default 20)" }
297
- },
298
- required: ["query"]
310
+ query: { type: "string", description: "Search query (text match)" },
311
+ date: { type: "string", description: "Date filter (YYYY-MM-DD)" },
312
+ pillar: { type: "string", description: "Content pillar filter" },
313
+ limit: { type: "number", description: "Max results (default 20)" },
314
+ min_score: { type: "number", description: "Minimum score threshold (0-1)" },
315
+ min_engagement: { type: "number", description: "Minimum total engagement (likes+reposts+replies+quotes)" },
316
+ since: { type: "string", description: "Time window: '1h', '3h', '12h', '1d', '7d', or YYYY-MM-DD" }
317
+ }
299
318
  }
300
319
  },
301
320
  {
302
321
  name: TOOL_NAMES.getToday,
303
322
  displayName: "Get Today's Intelligence",
304
- description: "Get today's scored X intelligence corpus, optionally filtered by pillar.",
323
+ description: "Get today's scored X intelligence corpus from entities, optionally filtered by pillar and score threshold.",
305
324
  parametersSchema: {
306
325
  type: "object",
307
326
  properties: {
308
327
  pillar: { type: "string", description: "Content pillar filter" },
309
- limit: { type: "number", description: "Max results (default 20)" }
328
+ limit: { type: "number", description: "Max results (default 20)" },
329
+ min_score: { type: "number", description: "Minimum score threshold (0-1)" }
310
330
  }
311
331
  }
312
332
  },
@@ -341,14 +361,64 @@ var manifest = {
341
361
  type: "object",
342
362
  properties: {
343
363
  handle: { type: "string", description: "X handle (without @)" },
344
- relevance: {
345
- type: "number",
346
- description: "Relevance score (0-1)"
347
- },
364
+ relevance: { type: "number", description: "Relevance score (0-1)" },
348
365
  domain: { type: "string", description: "Domain/topic area" }
349
366
  },
350
367
  required: ["handle", "relevance", "domain"]
351
368
  }
369
+ },
370
+ {
371
+ name: TOOL_NAMES.analyzeTopic,
372
+ displayName: "Analyze Topic",
373
+ description: "On-demand xAI search for any topic with 5-perspective decomposition (core, expert voices, pain points, positive signals, link-based) and corpus cross-reference. Returns a synthesis brief.",
374
+ parametersSchema: {
375
+ type: "object",
376
+ properties: {
377
+ topic: { type: "string", description: "Topic to analyze" },
378
+ include_corpus: { type: "boolean", description: "Cross-reference with stored corpus (default true)" }
379
+ },
380
+ required: ["topic"]
381
+ }
382
+ },
383
+ {
384
+ name: TOOL_NAMES.getThread,
385
+ displayName: "Get Tweet Thread",
386
+ description: "Fetch conversation context for a tweet. Returns the target tweet and other tweets in the same conversation thread.",
387
+ parametersSchema: {
388
+ type: "object",
389
+ properties: {
390
+ tweet_id: { type: "string", description: "Tweet ID to get thread for" }
391
+ },
392
+ required: ["tweet_id"]
393
+ }
394
+ },
395
+ {
396
+ name: TOOL_NAMES.promoteHandle,
397
+ displayName: "Promote Handle",
398
+ description: "Promote a tracked handle to authority status in a specific domain list. Sets entity status to promoted and records the target list.",
399
+ parametersSchema: {
400
+ type: "object",
401
+ properties: {
402
+ handle: { type: "string", description: "X handle (without @)" },
403
+ list_name: { type: "string", description: "Authority list to promote to (e.g. 'market_structure')" },
404
+ note: { type: "string", description: "Optional note about why this handle was promoted" }
405
+ },
406
+ required: ["handle", "list_name"]
407
+ }
408
+ },
409
+ {
410
+ name: TOOL_NAMES.rateTweet,
411
+ displayName: "Rate Tweet",
412
+ description: "Record relevance feedback on a tweet in the corpus. Agents or humans can rate tweets as relevant, irrelevant, or skip.",
413
+ parametersSchema: {
414
+ type: "object",
415
+ properties: {
416
+ tweet_id: { type: "string", description: "Tweet ID to rate" },
417
+ rating: { type: "string", enum: ["relevant", "irrelevant", "skip"], description: "Relevance rating" },
418
+ rated_by: { type: "string", description: "ID of the rater (agent or user)" }
419
+ },
420
+ required: ["tweet_id", "rating"]
421
+ }
352
422
  }
353
423
  ],
354
424
  ui: {
@@ -364,6 +434,13 @@ var manifest = {
364
434
  id: SLOT_IDS.settingsPage,
365
435
  displayName: "X Intelligence Settings",
366
436
  exportName: EXPORT_NAMES.settingsPage
437
+ },
438
+ {
439
+ type: "page",
440
+ id: SLOT_IDS.corpusBrowser,
441
+ displayName: "X Intelligence Corpus",
442
+ exportName: EXPORT_NAMES.corpusBrowser,
443
+ routePath: "x-intelligence"
367
444
  }
368
445
  ]
369
446
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/constants.ts", "../src/manifest.ts"],
4
- "sourcesContent": ["export const PLUGIN_ID = \"peak6-labs.x-intelligence\";\nexport const PLUGIN_VERSION = \"0.1.0\";\n\nexport const JOB_KEYS = {\n discoveryRun: \"discovery-run\",\n authorityDecay: \"authority-decay\",\n complianceCheck: \"compliance-check\",\n corpusRetention: \"corpus-retention\",\n} as const;\n\nexport const TOOL_NAMES = {\n searchCorpus: \"search-corpus\",\n getToday: \"get-today\",\n getAuthorities: \"get-authorities\",\n suggestHandles: \"suggest-handles\",\n trackHandle: \"track-handle\",\n} as const;\n\nexport const SLOT_IDS = {\n dashboardWidget: \"x-intelligence-dashboard\",\n settingsPage: \"x-intelligence-settings\",\n} as const;\n\nexport const EXPORT_NAMES = {\n dashboardWidget: \"DashboardWidget\",\n settingsPage: \"SettingsPage\",\n} as const;\n\nexport const ENTITY_TYPES = {\n tweet: \"tweet\",\n handle: \"handle\",\n} as const;\n\nexport const STATE_KEYS = {\n corpusPrefix: \"corpus:\",\n lastDiscoveryRun: \"last-discovery-run\",\n pipelineStats: \"pipeline-stats\",\n} as const;\n\nexport const EVENT_NAMES = {\n corpusUpdated: \"corpus.updated\",\n handlePromoted: \"handle.promoted\",\n gapIdentified: \"gap.identified\",\n} as const;\n\nexport const DEFAULT_CONFIG = {\n company_id: \"\",\n xai_api_key_ref: \"XAI_API_KEY\",\n x_api_bearer_ref: \"BEARER_TOKEN\",\n semantic_topics: [\n \"institutional investors discussing market structure reform\",\n \"fintech companies disrupting traditional trading\",\n \"SEC regulatory changes affecting options trading\",\n \"algorithmic trading and quantitative strategies\",\n \"venture capital investing in financial infrastructure\",\n \"PEAK6\",\n \"options market making technology\",\n \"Chicago trading community news\",\n ],\n keyword_searches: [\n \"\\\"PEAK6 Investments\\\" OR \\\"PEAK6\\\" trading fintech\",\n \"fintech and trading technology\",\n \"market structure and regulation\",\n \"options trading strategies and platforms\",\n ],\n content_pillars: [\n \"market structure & regulation\",\n \"fintech & trading technology\",\n \"venture capital & investment\",\n \"Chicago business ecosystem\",\n \"company culture & talent\",\n ],\n scoring_weights: {\n relevance: 0.45,\n recency: 0.25,\n engagement: 0.30,\n },\n engagement_sub_weights: {\n likes: 0.55,\n reposts: 0.25,\n replies: 0.15,\n quotes: 0.05,\n },\n max_corpus_size: 200,\n dedup_threshold: 0.70,\n authority_boost: 0.15,\n authority_lists: {\n market_structure: {\n description: \"Market structure, regulation, SEC reform, options trading\",\n handles: [\n \"LizAnnSonders\",\n \"matt_levine\",\n \"unusual_whales\",\n \"CMEGroup\",\n \"CBOE\",\n \"OptionsHawk\",\n \"InvestorDenis\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n fintech: {\n description: \"Fintech, trading technology, AI in finance\",\n handles: [\n \"twifintech\",\n \"IBSIntelligence\",\n \"privy_io\",\n \"i_Know_First\",\n \"fintech_germany\",\n \"venture_radar\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n venture_capital: {\n description: \"Venture capital investing in financial infrastructure\",\n handles: [\n \"a16z\",\n \"FundersVC\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n chicago_trading: {\n description: \"Chicago trading community, prop firms, PEAK6 ecosystem\",\n handles: [\n \"CBOE\",\n \"CMEGroup\",\n \"boogeymantradez\",\n \"adealafia\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n } as Record<string, AuthorityList>,\n global_excluded: [\"elonmusk\", \"openai\", \"google\", \"microsoft\"],\n authority_promotion_policy: {\n auto_promote_threshold: {\n min_appearances: 7,\n min_avg_relevance: 0.8,\n min_mutual_overlap: 3,\n },\n candidate_threshold: {\n min_appearances: 5,\n min_avg_relevance: 0.7,\n min_mutual_overlap: 2,\n },\n tracking_window_days: 14,\n },\n corpus_retention_days: 90,\n} as const;\n\nexport interface AuthorityList {\n description: string;\n handles: string[];\n last_reviewed: string;\n}\n", "import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\nimport {\n DEFAULT_CONFIG,\n EXPORT_NAMES,\n JOB_KEYS,\n PLUGIN_ID,\n PLUGIN_VERSION,\n SLOT_IDS,\n TOOL_NAMES,\n} from \"./constants.js\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: PLUGIN_ID,\n apiVersion: 1,\n version: PLUGIN_VERSION,\n displayName: \"X Intelligence\",\n description:\n \"Automated X/Twitter intelligence pipeline \u2014 discovery, enrichment, scoring, deduplication, authority list management, and corpus storage.\",\n author: \"peak6-labs\",\n categories: [\"connector\", \"automation\"],\n capabilities: [\n \"http.outbound\",\n \"secrets.read-ref\",\n \"jobs.schedule\",\n \"agent.tools.register\",\n \"plugin.state.read\",\n \"plugin.state.write\",\n \"events.subscribe\",\n \"events.emit\",\n \"issues.read\",\n \"issues.create\",\n \"activity.log.write\",\n \"metrics.write\",\n \"instance.settings.register\",\n \"ui.dashboardWidget.register\",\n ],\n entrypoints: {\n worker: \"./dist/worker.js\",\n ui: \"./dist/ui\",\n },\n instanceConfigSchema: {\n type: \"object\",\n properties: {\n company_id: {\n type: \"string\",\n title: \"Company ID\",\n description: \"UUID of the company this plugin serves (required for events and activity logging)\",\n default: DEFAULT_CONFIG.company_id,\n },\n xai_api_key_ref: {\n type: \"string\",\n title: \"xAI API Key Secret Reference\",\n default: DEFAULT_CONFIG.xai_api_key_ref,\n },\n x_api_bearer_ref: {\n type: \"string\",\n title: \"X API Bearer Token Secret Reference\",\n default: DEFAULT_CONFIG.x_api_bearer_ref,\n },\n semantic_topics: {\n type: \"array\",\n title: \"Semantic Discovery Topics\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.semantic_topics,\n },\n keyword_searches: {\n type: \"array\",\n title: \"Keyword Searches\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.keyword_searches,\n },\n content_pillars: {\n type: \"array\",\n title: \"Content Pillars\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.content_pillars,\n },\n scoring_weights: {\n type: \"object\",\n title: \"Scoring Weights\",\n properties: {\n relevance: { type: \"number\", default: 0.45 },\n recency: { type: \"number\", default: 0.25 },\n engagement: { type: \"number\", default: 0.30 },\n },\n default: DEFAULT_CONFIG.scoring_weights,\n },\n engagement_sub_weights: {\n type: \"object\",\n title: \"Engagement Sub-Weights\",\n properties: {\n likes: { type: \"number\", default: 0.55 },\n reposts: { type: \"number\", default: 0.25 },\n replies: { type: \"number\", default: 0.15 },\n quotes: { type: \"number\", default: 0.05 },\n },\n default: DEFAULT_CONFIG.engagement_sub_weights,\n },\n max_corpus_size: {\n type: \"number\",\n title: \"Max Corpus Size Per Day\",\n default: DEFAULT_CONFIG.max_corpus_size,\n },\n dedup_threshold: {\n type: \"number\",\n title: \"Dedup Jaccard Threshold\",\n default: DEFAULT_CONFIG.dedup_threshold,\n },\n authority_boost: {\n type: \"number\",\n title: \"Authority Score Boost\",\n default: DEFAULT_CONFIG.authority_boost,\n },\n authority_lists: {\n type: \"object\",\n title: \"Authority Handle Lists\",\n default: DEFAULT_CONFIG.authority_lists,\n },\n global_excluded: {\n type: \"array\",\n title: \"Globally Excluded Handles\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.global_excluded,\n },\n authority_promotion_policy: {\n type: \"object\",\n title: \"Authority Promotion Policy\",\n default: DEFAULT_CONFIG.authority_promotion_policy,\n },\n corpus_retention_days: {\n type: \"number\",\n title: \"Corpus Retention (days)\",\n default: DEFAULT_CONFIG.corpus_retention_days,\n },\n },\n },\n jobs: [\n {\n jobKey: JOB_KEYS.discoveryRun,\n displayName: \"Discovery Run\",\n description:\n \"Two-stage pipeline: xAI open + focused discovery, X API v2 enrichment, scoring, and corpus storage.\",\n schedule: \"0 6 * * *\",\n },\n {\n jobKey: JOB_KEYS.authorityDecay,\n displayName: \"Authority Decay\",\n description:\n \"Weekly handle decay \u2014 downgrade or remove handles not seen within the tracking window.\",\n schedule: \"0 0 * * 0\",\n },\n {\n jobKey: JOB_KEYS.complianceCheck,\n displayName: \"Compliance Check\",\n description:\n \"Weekly re-check of stored tweets \u2014 remove deleted or suspended content.\",\n schedule: \"0 3 * * 0\",\n },\n {\n jobKey: JOB_KEYS.corpusRetention,\n displayName: \"Corpus Retention\",\n description:\n \"Monthly archive/delete corpus older than the retention window.\",\n schedule: \"0 4 1 * *\",\n },\n ],\n tools: [\n {\n name: TOOL_NAMES.searchCorpus,\n displayName: \"Search X Corpus\",\n description:\n \"Search the scored X intelligence corpus by query text, date range, and content pillar.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n query: { type: \"string\", description: \"Search query\" },\n date: {\n type: \"string\",\n description: \"Date filter (YYYY-MM-DD)\",\n },\n pillar: {\n type: \"string\",\n description: \"Content pillar filter\",\n },\n limit: { type: \"number\", description: \"Max results (default 20)\" },\n },\n required: [\"query\"],\n },\n },\n {\n name: TOOL_NAMES.getToday,\n displayName: \"Get Today's Intelligence\",\n description:\n \"Get today's scored X intelligence corpus, optionally filtered by pillar.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n pillar: { type: \"string\", description: \"Content pillar filter\" },\n limit: { type: \"number\", description: \"Max results (default 20)\" },\n },\n },\n },\n {\n name: TOOL_NAMES.getAuthorities,\n displayName: \"Get Authority Handles\",\n description:\n \"Get the authority handle list for a domain, or all domains if none specified.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n list_name: {\n type: \"string\",\n description: \"Domain name (e.g. 'market_structure')\",\n },\n },\n },\n },\n {\n name: TOOL_NAMES.suggestHandles,\n displayName: \"Suggest Handle Promotions\",\n description:\n \"Get handles that are candidates for authority list promotion based on tracking data.\",\n parametersSchema: {\n type: \"object\",\n properties: {},\n },\n },\n {\n name: TOOL_NAMES.trackHandle,\n displayName: \"Track Handle\",\n description:\n \"Record a handle appearance from agent discovery with relevance score and domain.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n handle: { type: \"string\", description: \"X handle (without @)\" },\n relevance: {\n type: \"number\",\n description: \"Relevance score (0-1)\",\n },\n domain: { type: \"string\", description: \"Domain/topic area\" },\n },\n required: [\"handle\", \"relevance\", \"domain\"],\n },\n },\n ],\n ui: {\n slots: [\n {\n type: \"dashboardWidget\",\n id: SLOT_IDS.dashboardWidget,\n displayName: \"X Intelligence\",\n exportName: EXPORT_NAMES.dashboardWidget,\n },\n {\n type: \"settingsPage\",\n id: SLOT_IDS.settingsPage,\n displayName: \"X Intelligence Settings\",\n exportName: EXPORT_NAMES.settingsPage,\n },\n ],\n },\n};\n\nexport default manifest;\n"],
5
- "mappings": ";AAAO,IAAM,YAAY;AAClB,IAAM,iBAAiB;AAEvB,IAAM,WAAW;AAAA,EACtB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;AAEO,IAAM,aAAa;AAAA,EACxB,cAAc;AAAA,EACd,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,aAAa;AACf;AAEO,IAAM,WAAW;AAAA,EACtB,iBAAiB;AAAA,EACjB,cAAc;AAChB;AAEO,IAAM,eAAe;AAAA,EAC1B,iBAAiB;AAAA,EACjB,cAAc;AAChB;AAmBO,IAAM,iBAAiB;AAAA,EAC5B,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,kBAAkB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,WAAW;AAAA,IACX,SAAS;AAAA,IACT,YAAY;AAAA,EACd;AAAA,EACA,wBAAwB;AAAA,IACtB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,IACf,kBAAkB;AAAA,MAChB,aAAa;AAAA,MACb,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAA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,QAC7D;AAAA,QACA,UAAU,CAAC,UAAU,aAAa,QAAQ;AAAA,MAC5C;AAAA,IACF;AAAA,EACF;AAAA,EACA,IAAI;AAAA,IACF,OAAO;AAAA,MACL;AAAA,QACE,MAAM;AAAA,QACN,IAAI,SAAS;AAAA,QACb,aAAa;AAAA,QACb,YAAY,aAAa;AAAA,MAC3B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,IAAI,SAAS;AAAA,QACb,aAAa;AAAA,QACb,YAAY,aAAa;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,mBAAQ;",
4
+ "sourcesContent": ["export const PLUGIN_ID = \"peak6-labs.x-intelligence\";\nexport const PLUGIN_VERSION = \"0.1.2\";\n\nexport const JOB_KEYS = {\n discoveryRun: \"discovery-run\",\n authorityDecay: \"authority-decay\",\n complianceCheck: \"compliance-check\",\n corpusRetention: \"corpus-retention\",\n} as const;\n\nexport const TOOL_NAMES = {\n searchCorpus: \"search-corpus\",\n getToday: \"get-today\",\n getAuthorities: \"get-authorities\",\n suggestHandles: \"suggest-handles\",\n trackHandle: \"track-handle\",\n analyzeTopic: \"analyze-topic\",\n getThread: \"get-thread\",\n promoteHandle: \"promote-handle\",\n rateTweet: \"rate-tweet\",\n} as const;\n\nexport const SLOT_IDS = {\n dashboardWidget: \"x-intelligence-dashboard\",\n settingsPage: \"x-intelligence-settings\",\n corpusBrowser: \"x-intelligence-corpus-browser\",\n} as const;\n\nexport const EXPORT_NAMES = {\n dashboardWidget: \"DashboardWidget\",\n settingsPage: \"SettingsPage\",\n corpusBrowser: \"CorpusBrowserPage\",\n} as const;\n\nexport const ENTITY_TYPES = {\n tweet: \"tweet\",\n handle: \"handle\",\n} as const;\n\nexport const STATE_KEYS = {\n corpusPrefix: \"corpus:\",\n lastDiscoveryRun: \"last-discovery-run\",\n pipelineStats: \"pipeline-stats\",\n} as const;\n\nexport const EVENT_NAMES = {\n corpusUpdated: \"corpus.updated\",\n handlePromoted: \"handle.promoted\",\n gapIdentified: \"gap.identified\",\n tweetHighEngagement: \"tweet.high-engagement\",\n} as const;\n\nexport const DEFAULT_CONFIG = {\n company_id: \"\",\n xai_api_key_ref: \"XAI_API_KEY\",\n x_api_bearer_ref: \"BEARER_TOKEN\",\n semantic_topics: [\n \"institutional investors discussing market structure reform\",\n \"fintech companies disrupting traditional trading\",\n \"SEC regulatory changes affecting options trading\",\n \"algorithmic trading and quantitative strategies\",\n \"venture capital investing in financial infrastructure\",\n \"PEAK6\",\n \"options market making technology\",\n \"Chicago trading community news\",\n ],\n keyword_searches: [\n \"\\\"PEAK6 Investments\\\" OR \\\"PEAK6\\\" trading fintech\",\n \"fintech and trading technology\",\n \"market structure and regulation\",\n \"options trading strategies and platforms\",\n ],\n content_pillars: [\n \"market structure & regulation\",\n \"fintech & trading technology\",\n \"venture capital & investment\",\n \"Chicago business ecosystem\",\n \"company culture & talent\",\n ],\n scoring_weights: {\n relevance: 0.45,\n recency: 0.25,\n engagement: 0.30,\n },\n engagement_sub_weights: {\n likes: 0.55,\n reposts: 0.25,\n replies: 0.15,\n quotes: 0.05,\n },\n max_corpus_size: 200,\n dedup_threshold: 0.70,\n authority_boost: 0.15,\n authority_lists: {\n market_structure: {\n description: \"Market structure, regulation, SEC reform, options trading\",\n handles: [\n \"LizAnnSonders\",\n \"matt_levine\",\n \"unusual_whales\",\n \"CMEGroup\",\n \"CBOE\",\n \"OptionsHawk\",\n \"InvestorDenis\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n fintech: {\n description: \"Fintech, trading technology, AI in finance\",\n handles: [\n \"twifintech\",\n \"IBSIntelligence\",\n \"privy_io\",\n \"i_Know_First\",\n \"fintech_germany\",\n \"venture_radar\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n venture_capital: {\n description: \"Venture capital investing in financial infrastructure\",\n handles: [\n \"a16z\",\n \"FundersVC\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n chicago_trading: {\n description: \"Chicago trading community, prop firms, PEAK6 ecosystem\",\n handles: [\n \"CBOE\",\n \"CMEGroup\",\n \"boogeymantradez\",\n \"adealafia\",\n ],\n last_reviewed: \"2026-03-29\",\n },\n } as Record<string, AuthorityList>,\n global_excluded: [\"elonmusk\", \"openai\", \"google\", \"microsoft\"],\n authority_promotion_policy: {\n auto_promote_threshold: {\n min_appearances: 7,\n min_avg_relevance: 0.8,\n min_mutual_overlap: 3,\n },\n candidate_threshold: {\n min_appearances: 5,\n min_avg_relevance: 0.7,\n min_mutual_overlap: 2,\n },\n tracking_window_days: 14,\n },\n corpus_retention_days: 90,\n engagement_thresholds: {\n noise_floor: 10,\n expert: 50,\n escalation: 100,\n },\n} as const;\n\nexport interface AuthorityList {\n description: string;\n handles: string[];\n last_reviewed: string;\n}\n", "import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\nimport {\n DEFAULT_CONFIG,\n EXPORT_NAMES,\n JOB_KEYS,\n PLUGIN_ID,\n PLUGIN_VERSION,\n SLOT_IDS,\n TOOL_NAMES,\n} from \"./constants.js\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: PLUGIN_ID,\n apiVersion: 1,\n version: PLUGIN_VERSION,\n displayName: \"X Intelligence\",\n description:\n \"Automated X/Twitter intelligence pipeline \u2014 discovery, enrichment, scoring, deduplication, authority list management, and corpus storage.\",\n author: \"peak6-labs\",\n categories: [\"connector\", \"automation\"],\n capabilities: [\n \"http.outbound\",\n \"secrets.read-ref\",\n \"jobs.schedule\",\n \"agent.tools.register\",\n \"plugin.state.read\",\n \"plugin.state.write\",\n \"events.subscribe\",\n \"events.emit\",\n \"issues.read\",\n \"issues.create\",\n \"activity.log.write\",\n \"metrics.write\",\n \"instance.settings.register\",\n \"ui.dashboardWidget.register\",\n \"ui.page.register\",\n ],\n entrypoints: {\n worker: \"./dist/worker.js\",\n ui: \"./dist/ui\",\n },\n instanceConfigSchema: {\n type: \"object\",\n properties: {\n company_id: {\n type: \"string\",\n title: \"Company ID\",\n description: \"UUID of the company this plugin serves (required for events and activity logging)\",\n default: DEFAULT_CONFIG.company_id,\n },\n xai_api_key_ref: {\n type: \"string\",\n title: \"xAI API Key Secret Reference\",\n default: DEFAULT_CONFIG.xai_api_key_ref,\n },\n x_api_bearer_ref: {\n type: \"string\",\n title: \"X API Bearer Token Secret Reference\",\n default: DEFAULT_CONFIG.x_api_bearer_ref,\n },\n semantic_topics: {\n type: \"array\",\n title: \"Semantic Discovery Topics\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.semantic_topics,\n },\n keyword_searches: {\n type: \"array\",\n title: \"Keyword Searches\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.keyword_searches,\n },\n content_pillars: {\n type: \"array\",\n title: \"Content Pillars\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.content_pillars,\n },\n scoring_weights: {\n type: \"object\",\n title: \"Scoring Weights\",\n properties: {\n relevance: { type: \"number\", default: 0.45 },\n recency: { type: \"number\", default: 0.25 },\n engagement: { type: \"number\", default: 0.30 },\n },\n default: DEFAULT_CONFIG.scoring_weights,\n },\n engagement_sub_weights: {\n type: \"object\",\n title: \"Engagement Sub-Weights\",\n properties: {\n likes: { type: \"number\", default: 0.55 },\n reposts: { type: \"number\", default: 0.25 },\n replies: { type: \"number\", default: 0.15 },\n quotes: { type: \"number\", default: 0.05 },\n },\n default: DEFAULT_CONFIG.engagement_sub_weights,\n },\n max_corpus_size: {\n type: \"number\",\n title: \"Max Corpus Size Per Day\",\n default: DEFAULT_CONFIG.max_corpus_size,\n },\n dedup_threshold: {\n type: \"number\",\n title: \"Dedup Jaccard Threshold\",\n default: DEFAULT_CONFIG.dedup_threshold,\n },\n authority_boost: {\n type: \"number\",\n title: \"Authority Score Boost\",\n default: DEFAULT_CONFIG.authority_boost,\n },\n authority_lists: {\n type: \"object\",\n title: \"Authority Handle Lists\",\n default: DEFAULT_CONFIG.authority_lists,\n },\n global_excluded: {\n type: \"array\",\n title: \"Globally Excluded Handles\",\n items: { type: \"string\" },\n default: DEFAULT_CONFIG.global_excluded,\n },\n authority_promotion_policy: {\n type: \"object\",\n title: \"Authority Promotion Policy\",\n default: DEFAULT_CONFIG.authority_promotion_policy,\n },\n corpus_retention_days: {\n type: \"number\",\n title: \"Corpus Retention (days)\",\n default: DEFAULT_CONFIG.corpus_retention_days,\n },\n engagement_thresholds: {\n type: \"object\",\n title: \"Engagement Thresholds\",\n description: \"Engagement level tiers: noise_floor (filter), expert (highlight), escalation (alert event)\",\n properties: {\n noise_floor: { type: \"number\", default: 10 },\n expert: { type: \"number\", default: 50 },\n escalation: { type: \"number\", default: 100 },\n },\n default: DEFAULT_CONFIG.engagement_thresholds,\n },\n },\n },\n jobs: [\n {\n jobKey: JOB_KEYS.discoveryRun,\n displayName: \"Discovery Run\",\n description:\n \"Two-stage pipeline: xAI open + focused discovery, X API v2 enrichment, scoring, and corpus storage.\",\n schedule: \"0 6 * * *\",\n },\n {\n jobKey: JOB_KEYS.authorityDecay,\n displayName: \"Authority Decay\",\n description:\n \"Weekly handle decay \u2014 downgrade or remove handles not seen within the tracking window.\",\n schedule: \"0 0 * * 0\",\n },\n {\n jobKey: JOB_KEYS.complianceCheck,\n displayName: \"Compliance Check\",\n description:\n \"Weekly re-check of stored tweets \u2014 remove deleted or suspended content.\",\n schedule: \"0 3 * * 0\",\n },\n {\n jobKey: JOB_KEYS.corpusRetention,\n displayName: \"Corpus Retention\",\n description:\n \"Monthly archive/delete corpus older than the retention window.\",\n schedule: \"0 4 1 * *\",\n },\n ],\n tools: [\n {\n name: TOOL_NAMES.searchCorpus,\n displayName: \"Search X Corpus\",\n description:\n \"Search the scored X intelligence corpus by query text, date range, content pillar, score threshold, and engagement level.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n query: { type: \"string\", description: \"Search query (text match)\" },\n date: { type: \"string\", description: \"Date filter (YYYY-MM-DD)\" },\n pillar: { type: \"string\", description: \"Content pillar filter\" },\n limit: { type: \"number\", description: \"Max results (default 20)\" },\n min_score: { type: \"number\", description: \"Minimum score threshold (0-1)\" },\n min_engagement: { type: \"number\", description: \"Minimum total engagement (likes+reposts+replies+quotes)\" },\n since: { type: \"string\", description: \"Time window: '1h', '3h', '12h', '1d', '7d', or YYYY-MM-DD\" },\n },\n },\n },\n {\n name: TOOL_NAMES.getToday,\n displayName: \"Get Today's Intelligence\",\n description:\n \"Get today's scored X intelligence corpus from entities, optionally filtered by pillar and score threshold.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n pillar: { type: \"string\", description: \"Content pillar filter\" },\n limit: { type: \"number\", description: \"Max results (default 20)\" },\n min_score: { type: \"number\", description: \"Minimum score threshold (0-1)\" },\n },\n },\n },\n {\n name: TOOL_NAMES.getAuthorities,\n displayName: \"Get Authority Handles\",\n description:\n \"Get the authority handle list for a domain, or all domains if none specified.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n list_name: {\n type: \"string\",\n description: \"Domain name (e.g. 'market_structure')\",\n },\n },\n },\n },\n {\n name: TOOL_NAMES.suggestHandles,\n displayName: \"Suggest Handle Promotions\",\n description:\n \"Get handles that are candidates for authority list promotion based on tracking data.\",\n parametersSchema: {\n type: \"object\",\n properties: {},\n },\n },\n {\n name: TOOL_NAMES.trackHandle,\n displayName: \"Track Handle\",\n description:\n \"Record a handle appearance from agent discovery with relevance score and domain.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n handle: { type: \"string\", description: \"X handle (without @)\" },\n relevance: { type: \"number\", description: \"Relevance score (0-1)\" },\n domain: { type: \"string\", description: \"Domain/topic area\" },\n },\n required: [\"handle\", \"relevance\", \"domain\"],\n },\n },\n {\n name: TOOL_NAMES.analyzeTopic,\n displayName: \"Analyze Topic\",\n description:\n \"On-demand xAI search for any topic with 5-perspective decomposition (core, expert voices, pain points, positive signals, link-based) and corpus cross-reference. Returns a synthesis brief.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n topic: { type: \"string\", description: \"Topic to analyze\" },\n include_corpus: { type: \"boolean\", description: \"Cross-reference with stored corpus (default true)\" },\n },\n required: [\"topic\"],\n },\n },\n {\n name: TOOL_NAMES.getThread,\n displayName: \"Get Tweet Thread\",\n description:\n \"Fetch conversation context for a tweet. Returns the target tweet and other tweets in the same conversation thread.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n tweet_id: { type: \"string\", description: \"Tweet ID to get thread for\" },\n },\n required: [\"tweet_id\"],\n },\n },\n {\n name: TOOL_NAMES.promoteHandle,\n displayName: \"Promote Handle\",\n description:\n \"Promote a tracked handle to authority status in a specific domain list. Sets entity status to promoted and records the target list.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n handle: { type: \"string\", description: \"X handle (without @)\" },\n list_name: { type: \"string\", description: \"Authority list to promote to (e.g. 'market_structure')\" },\n note: { type: \"string\", description: \"Optional note about why this handle was promoted\" },\n },\n required: [\"handle\", \"list_name\"],\n },\n },\n {\n name: TOOL_NAMES.rateTweet,\n displayName: \"Rate Tweet\",\n description:\n \"Record relevance feedback on a tweet in the corpus. Agents or humans can rate tweets as relevant, irrelevant, or skip.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n tweet_id: { type: \"string\", description: \"Tweet ID to rate\" },\n rating: { type: \"string\", enum: [\"relevant\", \"irrelevant\", \"skip\"], description: \"Relevance rating\" },\n rated_by: { type: \"string\", description: \"ID of the rater (agent or user)\" },\n },\n required: [\"tweet_id\", \"rating\"],\n },\n },\n ],\n ui: {\n slots: [\n {\n type: \"dashboardWidget\",\n id: SLOT_IDS.dashboardWidget,\n displayName: \"X Intelligence\",\n exportName: EXPORT_NAMES.dashboardWidget,\n },\n {\n type: \"settingsPage\",\n id: SLOT_IDS.settingsPage,\n displayName: \"X Intelligence Settings\",\n exportName: EXPORT_NAMES.settingsPage,\n },\n {\n type: \"page\",\n id: SLOT_IDS.corpusBrowser,\n displayName: \"X Intelligence Corpus\",\n exportName: EXPORT_NAMES.corpusBrowser,\n routePath: \"x-intelligence\",\n },\n ],\n },\n};\n\nexport default manifest;\n"],
5
+ "mappings": ";AAAO,IAAM,YAAY;AACl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