@seekdaseek/plugin-agentfeed 0.3.0 → 0.4.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.
package/dist/index.d.ts CHANGED
@@ -54,7 +54,7 @@ interface EndpointDef {
54
54
  /** Natural-language examples that should trigger this action. */
55
55
  triggers: string[];
56
56
  /** Which param the path needs, if any. */
57
- param?: 'mint' | 'wallet';
57
+ param?: 'mint' | 'wallet' | 'symbol';
58
58
  }
59
59
  declare const ENDPOINTS: EndpointDef[];
60
60
 
package/dist/index.js CHANGED
@@ -539,8 +539,35 @@ var ENDPOINTS = [
539
539
  similes: ["DEX_QUOTE", "GET_DEX_QUOTE"],
540
540
  description: "Live Jupiter swap quote for any SPL pair: output amount, price impact, route. The real executable price on Solana, not an index price.",
541
541
  triggers: ["jupiter quote for <mint>", "swap price on solana"]
542
+ },
543
+ {
544
+ path: "/api/peg-universe",
545
+ usd: 0.05,
546
+ action: "AGENTFEED_GET_PEG_UNIVERSE",
547
+ similes: ["PEG_UNIVERSE", "TOKENIZED_STOCK_PEGS", "RWA_PEG_RANKING", "WHICH_XSTOCKS_DEPEG"],
548
+ description: "Rank every tokenized US equity we track by off-hours peg risk ($0.05): p95 and max deviation in bps, market-open deviation as a control, and median pool liquidity. Sampled every 5 minutes by our own collector since 19 July 2026 \u2014 this tape exists nowhere else. Deviation is measured against the underlying last real trade; outside US market hours that is the last print before the close, not a live quote. Dead pools are excluded rather than reported as perfect pegs. Use when the agent needs to know which tokenized stocks are unreliable while the market is shut.",
549
+ triggers: ["which tokenized stocks depeg", "rank xstocks by peg risk", "rwa peg overview"]
550
+ },
551
+ {
552
+ path: "/api/peg-deviation?symbol=:symbol",
553
+ usd: 0.02,
554
+ action: "AGENTFEED_GET_PEG_DEVIATION",
555
+ similes: ["PEG_DEVIATION", "TOKENIZED_STOCK_PEG", "XSTOCK_PEG"],
556
+ description: "Current peg deviation for one tokenized US equity on Solana ($0.02): on-chain DEX price vs the underlying last real trade in bps, direction, pool liquidity, plus window stats split into market-open and off-hours. Deviation is measured against the last real trade \u2014 off-hours that is the last print before the close, not a live quote.",
557
+ triggers: ["peg deviation for <symbol>", "is <symbol> tracking its underlying", "how far off is <symbol>"],
558
+ param: "symbol"
559
+ },
560
+ {
561
+ path: "/api/peg-sessions?symbol=:symbol",
562
+ usd: 0.03,
563
+ action: "AGENTFEED_GET_PEG_SESSIONS",
564
+ similes: ["PEG_SESSIONS", "PEG_BY_SESSION", "WHEN_DOES_IT_DEPEG"],
565
+ description: "Peg deviation for one tokenized equity broken out by trading session ($0.03) \u2014 open, premarket, afterhours, overnight, weekend \u2014 with mean, p95, max bps and median liquidity per session, and the worst off-hours window flagged. The open session acts as a control: tight deviation there means the off-hours numbers are signal rather than measurement noise.",
566
+ triggers: ["when does <symbol> depeg", "peg by session for <symbol>", "weekend peg for <symbol>"],
567
+ param: "symbol"
542
568
  }
543
569
  ];
570
+ var SYMBOL_RE = /\b[A-Z]{1,6}x\b/;
544
571
  var BASE58_RE = /\b[1-9A-HJ-NP-Za-km-z]{32,44}\b/;
545
572
 
546
573
  // src/actions.ts
@@ -548,7 +575,7 @@ function buildExamples(def) {
548
575
  return def.triggers.slice(0, 2).map((t) => [
549
576
  {
550
577
  name: "{{user1}}",
551
- content: { text: t.replace("<mint>", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v").replace("<address>", "4a8o45skRPcyjAdyR8yES215Swvh8uTpZD6KLarhxCJ7") }
578
+ content: { text: t.replace("<mint>", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v").replace("<address>", "4a8o45skRPcyjAdyR8yES215Swvh8uTpZD6KLarhxCJ7").replace("<symbol>", "CRCLx") }
552
579
  },
553
580
  {
554
581
  name: "{{agent}}",
@@ -566,6 +593,7 @@ function makeAction(def) {
566
593
  description: def.description,
567
594
  validate: async (_runtime, message) => {
568
595
  const text = message?.content?.text ?? "";
596
+ if (def.param === "symbol") return SYMBOL_RE.test(text);
569
597
  if (def.param) return BASE58_RE.test(text);
570
598
  return true;
571
599
  },
@@ -579,10 +607,11 @@ function makeAction(def) {
579
607
  }
580
608
  let path = def.path;
581
609
  if (def.param) {
582
- const m = (message?.content?.text ?? "").match(BASE58_RE);
610
+ const re = def.param === "symbol" ? SYMBOL_RE : BASE58_RE;
611
+ const m = (message?.content?.text ?? "").match(re);
583
612
  if (!m) {
584
613
  await callback?.({
585
- text: `I need a Solana ${def.param} address in the message to run this lookup.`
614
+ text: def.param === "symbol" ? "I need a tokenized equity symbol like CRCLx or MSTRx in the message to run this lookup." : `I need a Solana ${def.param} address in the message to run this lookup.`
586
615
  });
587
616
  return false;
588
617
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seekdaseek/plugin-agentfeed",
3
- "version": "0.3.0",
4
- "description": "elizaOS plugin for AgentFeed paid crypto liquidation data over x402 micropayments on Solana. Full-universe cascade detection across ~600 USDT perps on Bybit, OKX and Binance, plus positioning, funding, prices and token risk. $0.001–$0.05 per call in USDC, no API keys, no subscriptions.",
3
+ "version": "0.4.0",
4
+ "description": "elizaOS plugin for AgentFeed \u2014 paid crypto liquidation data over x402 micropayments on Solana. Full-universe cascade detection across ~600 USDT perps on Bybit, OKX and Binance, plus positioning, funding, prices and token risk. $0.001\u2013$0.05 per call in USDC, no API keys, no subscriptions.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",