investing 0.1.308 → 0.1.310

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 (286) hide show
  1. package/README.md +167 -123
  2. package/THIRD_PARTY_NOTICES.md +144 -0
  3. package/dist/{archiver-web.es-B69gABHP.js → archiver-web.es-C5dgnXMM.js} +1 -1
  4. package/dist/{archiver-web.es-fg4bLLZa.cjs → archiver-web.es-DLoy_R54.cjs} +1 -1
  5. package/dist/db/index.d.ts +189 -0
  6. package/dist/db/index.d.ts.map +1 -1
  7. package/dist/db/schema.d.ts +200 -0
  8. package/dist/db/schema.d.ts.map +1 -1
  9. package/dist/index-6F5HGB0V.js +15 -0
  10. package/dist/index-kfghRBr2.cjs +13 -0
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -1
  14. package/dist/index.mjs +1 -1
  15. package/dist/leaders/zulu.d.ts +35 -5
  16. package/dist/leaders/zulu.d.ts.map +1 -1
  17. package/dist/live-data/dukascopy-client.d.ts +19 -2
  18. package/dist/live-data/dukascopy-client.d.ts.map +1 -1
  19. package/dist/llm/debate-generator.d.ts +7 -0
  20. package/dist/llm/debate-generator.d.ts.map +1 -1
  21. package/dist/prediction/analysis/polymarket-wallet-trust.d.ts +60 -0
  22. package/dist/prediction/analysis/polymarket-wallet-trust.d.ts.map +1 -0
  23. package/dist/prediction/analysis/position-reconstruction.d.ts +130 -0
  24. package/dist/prediction/analysis/position-reconstruction.d.ts.map +1 -0
  25. package/dist/prediction/analysis/position-settlement.d.ts +99 -0
  26. package/dist/prediction/analysis/position-settlement.d.ts.map +1 -0
  27. package/dist/prediction/analysis/r-multiple.d.ts +159 -0
  28. package/dist/prediction/analysis/r-multiple.d.ts.map +1 -0
  29. package/dist/prediction/analysis/trust-score.d.ts +158 -0
  30. package/dist/prediction/analysis/trust-score.d.ts.map +1 -0
  31. package/dist/prediction/api/analytics.d.ts.map +1 -1
  32. package/dist/prediction/api/leaderboard.d.ts +29 -11
  33. package/dist/prediction/api/leaderboard.d.ts.map +1 -1
  34. package/dist/prediction/api/markets.d.ts.map +1 -1
  35. package/dist/prediction/api/prices.d.ts.map +1 -1
  36. package/dist/prediction/db/markets.d.ts +13 -0
  37. package/dist/prediction/db/markets.d.ts.map +1 -1
  38. package/dist/prediction/db/trade-history.d.ts +35 -0
  39. package/dist/prediction/db/trade-history.d.ts.map +1 -1
  40. package/dist/prediction/index.d.ts +7 -0
  41. package/dist/prediction/index.d.ts.map +1 -1
  42. package/dist/prediction/sync/incremental-markets.d.ts.map +1 -1
  43. package/dist/prediction/sync/leaderboard.d.ts +1 -1
  44. package/dist/prediction/sync/leaderboard.d.ts.map +1 -1
  45. package/dist/prediction/sync/markets.d.ts +2 -2
  46. package/dist/prediction/sync/markets.d.ts.map +1 -1
  47. package/dist/prediction/sync/orchestration.d.ts +1 -1
  48. package/dist/prediction/sync/refill-limits.d.ts +9 -0
  49. package/dist/prediction/sync/refill-limits.d.ts.map +1 -0
  50. package/dist/prediction/sync/refill.d.ts +34 -0
  51. package/dist/prediction/sync/refill.d.ts.map +1 -0
  52. package/dist/prediction/sync/trade-history.d.ts.map +1 -1
  53. package/dist/prediction/utils/token-ids.d.ts +17 -0
  54. package/dist/prediction/utils/token-ids.d.ts.map +1 -0
  55. package/dist/prediction-markets/adapters/trading-agents.d.ts +21 -0
  56. package/dist/prediction-markets/adapters/trading-agents.d.ts.map +1 -0
  57. package/dist/prediction-markets/agents/bookmaker-agent.d.ts.map +1 -0
  58. package/dist/prediction-markets/agents/event-analysis-agent.d.ts.map +1 -0
  59. package/dist/{predictos → prediction-markets}/agents/index.d.ts +5 -1
  60. package/dist/prediction-markets/agents/index.d.ts.map +1 -0
  61. package/dist/prediction-markets/agents/kalshi-momentum-agent.d.ts +7 -0
  62. package/dist/prediction-markets/agents/kalshi-momentum-agent.d.ts.map +1 -0
  63. package/dist/prediction-markets/agents/mapper-agent.d.ts.map +1 -0
  64. package/dist/{predictos → prediction-markets}/agents/polyfactual-research.d.ts +1 -1
  65. package/dist/prediction-markets/agents/polyfactual-research.d.ts.map +1 -0
  66. package/dist/prediction-markets/agents/polymarket-position-tracker.d.ts.map +1 -0
  67. package/dist/{predictos → prediction-markets}/agents/polymarket-put-order.d.ts +1 -1
  68. package/dist/prediction-markets/agents/polymarket-put-order.d.ts.map +1 -0
  69. package/dist/prediction-markets/agents/polymarket-updown-15-limit-order-bot.d.ts.map +1 -0
  70. package/dist/prediction-markets/agents/x402-seller.d.ts.map +1 -0
  71. package/dist/prediction-markets/ai/callBlockRun.d.ts.map +1 -0
  72. package/dist/prediction-markets/ai/callGrok.d.ts.map +1 -0
  73. package/dist/prediction-markets/ai/callOpenAI.d.ts.map +1 -0
  74. package/dist/prediction-markets/ai/http.d.ts.map +1 -0
  75. package/dist/{predictos → prediction-markets}/ai/index.d.ts +1 -1
  76. package/dist/prediction-markets/ai/index.d.ts.map +1 -0
  77. package/dist/prediction-markets/ai/prompts/analyzeEventMarkets.d.ts.map +1 -0
  78. package/dist/prediction-markets/ai/prompts/arbitrageAnalysis.d.ts.map +1 -0
  79. package/dist/prediction-markets/ai/prompts/bookmakerAnalysis.d.ts.map +1 -0
  80. package/dist/prediction-markets/ai/prompts/searchQueryGenerator.d.ts.map +1 -0
  81. package/dist/prediction-markets/ai/types.d.ts.map +1 -0
  82. package/dist/prediction-markets/arbitrage.d.ts.map +1 -0
  83. package/dist/{predictos → prediction-markets}/clients/polyfactual.d.ts +1 -1
  84. package/dist/prediction-markets/clients/polyfactual.d.ts.map +1 -0
  85. package/dist/{predictos → prediction-markets}/clients/polymarket.d.ts +1 -1
  86. package/dist/prediction-markets/clients/polymarket.d.ts.map +1 -0
  87. package/dist/{predictos → prediction-markets}/clients/x402.d.ts +1 -1
  88. package/dist/prediction-markets/clients/x402.d.ts.map +1 -0
  89. package/dist/{predictos → prediction-markets}/data/kalshi.d.ts +1 -1
  90. package/dist/prediction-markets/data/kalshi.d.ts.map +1 -0
  91. package/dist/{predictos → prediction-markets}/data/polymarket.d.ts +1 -1
  92. package/dist/prediction-markets/data/polymarket.d.ts.map +1 -0
  93. package/dist/prediction-markets/events.d.ts.map +1 -0
  94. package/dist/prediction-markets/execution/paper.d.ts +19 -0
  95. package/dist/prediction-markets/execution/paper.d.ts.map +1 -0
  96. package/dist/prediction-markets/index.cjs +1 -0
  97. package/dist/{predictos → prediction-markets}/index.d.ts +8 -5
  98. package/dist/prediction-markets/index.d.ts.map +1 -0
  99. package/dist/prediction-markets/index.mjs +1 -0
  100. package/dist/prediction-markets/kalshi-momentum.LICENSE +21 -0
  101. package/dist/prediction-markets/strategies/btc15m-fusion.d.ts +27 -0
  102. package/dist/prediction-markets/strategies/btc15m-fusion.d.ts.map +1 -0
  103. package/dist/prediction-markets/strategies/copy-trade-sizing.d.ts +27 -0
  104. package/dist/prediction-markets/strategies/copy-trade-sizing.d.ts.map +1 -0
  105. package/dist/prediction-markets/strategies/gabagool.d.ts +26 -0
  106. package/dist/prediction-markets/strategies/gabagool.d.ts.map +1 -0
  107. package/dist/prediction-markets/strategies/kalshi-momentum.d.ts +13 -0
  108. package/dist/prediction-markets/strategies/kalshi-momentum.d.ts.map +1 -0
  109. package/dist/{predictos → prediction-markets}/types.d.ts +121 -6
  110. package/dist/prediction-markets/types.d.ts.map +1 -0
  111. package/dist/prediction-markets/validation.d.ts +5 -0
  112. package/dist/prediction-markets/validation.d.ts.map +1 -0
  113. package/dist/scripted-llm-B-UTs08L.js +1 -0
  114. package/dist/scripted-llm-CmDVkhyH.cjs +1 -0
  115. package/dist/stocks/index.d.ts +2 -1
  116. package/dist/stocks/index.d.ts.map +1 -1
  117. package/dist/stocks/quote-cache-service.d.ts +11 -2
  118. package/dist/stocks/quote-cache-service.d.ts.map +1 -1
  119. package/dist/stocks/strategies/bb-rsi-breakout.d.ts +63 -0
  120. package/dist/stocks/strategies/bb-rsi-breakout.d.ts.map +1 -0
  121. package/dist/stocks/strategies/ema-crossover.d.ts +51 -0
  122. package/dist/stocks/strategies/ema-crossover.d.ts.map +1 -0
  123. package/dist/stocks/unified-quote-service.d.ts +15 -6
  124. package/dist/stocks/unified-quote-service.d.ts.map +1 -1
  125. package/dist/stocks/yahoo-finance-wrapper.d.ts +75 -6
  126. package/dist/stocks/yahoo-finance-wrapper.d.ts.map +1 -1
  127. package/dist/strategy-signals/data/fixture-data-provider.d.ts +8 -0
  128. package/dist/strategy-signals/data/fixture-data-provider.d.ts.map +1 -0
  129. package/dist/strategy-signals/data/openbb-mapping.d.ts +7 -0
  130. package/dist/strategy-signals/data/openbb-mapping.d.ts.map +1 -0
  131. package/dist/strategy-signals/demo.d.ts +446 -0
  132. package/dist/strategy-signals/demo.d.ts.map +1 -0
  133. package/dist/strategy-signals/execution.d.ts +18 -0
  134. package/dist/strategy-signals/execution.d.ts.map +1 -0
  135. package/dist/strategy-signals/fixtures/openbb-data/bars.d.ts +10 -0
  136. package/dist/strategy-signals/fixtures/openbb-data/bars.d.ts.map +1 -0
  137. package/dist/strategy-signals/index.d.ts +36 -0
  138. package/dist/strategy-signals/index.d.ts.map +1 -0
  139. package/dist/strategy-signals/indicators/spread-aware-momentum.d.ts +31 -0
  140. package/dist/strategy-signals/indicators/spread-aware-momentum.d.ts.map +1 -0
  141. package/dist/strategy-signals/proposal.d.ts +10 -0
  142. package/dist/strategy-signals/proposal.d.ts.map +1 -0
  143. package/dist/strategy-signals/report.d.ts +6 -0
  144. package/dist/strategy-signals/report.d.ts.map +1 -0
  145. package/dist/strategy-signals/risk-gate.d.ts +3 -0
  146. package/dist/strategy-signals/risk-gate.d.ts.map +1 -0
  147. package/dist/strategy-signals/sources/btc15m-fusion.d.ts +16 -0
  148. package/dist/strategy-signals/sources/btc15m-fusion.d.ts.map +1 -0
  149. package/dist/strategy-signals/sources/copy-trade-sizing.d.ts +15 -0
  150. package/dist/strategy-signals/sources/copy-trade-sizing.d.ts.map +1 -0
  151. package/dist/strategy-signals/sources/gabagool.d.ts +12 -0
  152. package/dist/strategy-signals/sources/gabagool.d.ts.map +1 -0
  153. package/dist/strategy-signals/sources/hedge-fund-technicals.d.ts +42 -0
  154. package/dist/strategy-signals/sources/hedge-fund-technicals.d.ts.map +1 -0
  155. package/dist/strategy-signals/sources/kalshi-momentum.d.ts +10 -0
  156. package/dist/strategy-signals/sources/kalshi-momentum.d.ts.map +1 -0
  157. package/dist/strategy-signals/sources/kalshi-vibe-guards.d.ts +15 -0
  158. package/dist/strategy-signals/sources/kalshi-vibe-guards.d.ts.map +1 -0
  159. package/dist/strategy-signals/sources/kalshi-vibe.d.ts +11 -0
  160. package/dist/strategy-signals/sources/kalshi-vibe.d.ts.map +1 -0
  161. package/dist/strategy-signals/sources/red-flags.d.ts +13 -0
  162. package/dist/strategy-signals/sources/red-flags.d.ts.map +1 -0
  163. package/dist/strategy-signals/sources/spread-aware-momentum.d.ts +11 -0
  164. package/dist/strategy-signals/sources/spread-aware-momentum.d.ts.map +1 -0
  165. package/dist/strategy-signals/survival-posture.d.ts +13 -0
  166. package/dist/strategy-signals/survival-posture.d.ts.map +1 -0
  167. package/dist/strategy-signals/types.d.ts +138 -0
  168. package/dist/strategy-signals/types.d.ts.map +1 -0
  169. package/dist/strategy-signals/validate.d.ts +15 -0
  170. package/dist/strategy-signals/validate.d.ts.map +1 -0
  171. package/dist/strategy-signals/venues/kalshi-venue-mapping.d.ts +3 -0
  172. package/dist/strategy-signals/venues/kalshi-venue-mapping.d.ts.map +1 -0
  173. package/dist/strategy-signals/venues/mock-equity-broker.d.ts +16 -0
  174. package/dist/strategy-signals/venues/mock-equity-broker.d.ts.map +1 -0
  175. package/dist/strategy-signals/venues/mock-venue.d.ts +14 -0
  176. package/dist/strategy-signals/venues/mock-venue.d.ts.map +1 -0
  177. package/dist/strategy-signals/venues/pmxt-venue-mapping.d.ts +7 -0
  178. package/dist/strategy-signals/venues/pmxt-venue-mapping.d.ts.map +1 -0
  179. package/dist/trading-agents/agents/debate-facilitator.d.ts +3 -3
  180. package/dist/trading-agents/agents/debate-facilitator.d.ts.map +1 -1
  181. package/dist/trading-agents/agents/fund-manager.d.ts +4 -2
  182. package/dist/trading-agents/agents/fund-manager.d.ts.map +1 -1
  183. package/dist/trading-agents/agents/improved-researchers.d.ts +3 -3
  184. package/dist/trading-agents/agents/improved-researchers.d.ts.map +1 -1
  185. package/dist/trading-agents/agents/market-analyst.d.ts +2 -2
  186. package/dist/trading-agents/agents/market-analyst.d.ts.map +1 -1
  187. package/dist/trading-agents/agents/news-analyst.d.ts +2 -2
  188. package/dist/trading-agents/agents/news-analyst.d.ts.map +1 -1
  189. package/dist/trading-agents/agents/researchers.d.ts +4 -4
  190. package/dist/trading-agents/agents/researchers.d.ts.map +1 -1
  191. package/dist/trading-agents/agents/risk-judge.d.ts +13 -0
  192. package/dist/trading-agents/agents/risk-judge.d.ts.map +1 -0
  193. package/dist/trading-agents/agents/risk-team.d.ts +4 -4
  194. package/dist/trading-agents/agents/risk-team.d.ts.map +1 -1
  195. package/dist/trading-agents/agents/trader.d.ts +2 -2
  196. package/dist/trading-agents/agents/trader.d.ts.map +1 -1
  197. package/dist/trading-agents/graph/trading-graph.d.ts +28 -2
  198. package/dist/trading-agents/graph/trading-graph.d.ts.map +1 -1
  199. package/dist/trading-agents/index.cjs +1 -0
  200. package/dist/trading-agents/index.d.ts +4 -0
  201. package/dist/trading-agents/index.d.ts.map +1 -1
  202. package/dist/trading-agents/index.mjs +1 -0
  203. package/dist/trading-agents/types/index.d.ts +27 -4
  204. package/dist/trading-agents/types/index.d.ts.map +1 -1
  205. package/dist/trading-agents/utils/llm-client.d.ts +4 -1
  206. package/dist/trading-agents/utils/llm-client.d.ts.map +1 -1
  207. package/dist/trading-agents/utils/parse-final-line.d.ts +7 -0
  208. package/dist/trading-agents/utils/parse-final-line.d.ts.map +1 -0
  209. package/dist/trading-agents/utils/scripted-llm.d.ts +17 -0
  210. package/dist/trading-agents/utils/scripted-llm.d.ts.map +1 -0
  211. package/dist/trading-agents/utils/strategy-prompt.d.ts +6 -0
  212. package/dist/trading-agents/utils/strategy-prompt.d.ts.map +1 -0
  213. package/dist/trading-agents-Bh9OORHe.js +1 -0
  214. package/dist/trading-agents-C8M7tbB0.cjs +1 -0
  215. package/dist/validate-C1MS8RhG.js +1 -0
  216. package/dist/validate-DBxPUXqH.cjs +1 -0
  217. package/package.json +21 -50
  218. package/dist/bookmakerAnalysis-Bfo1zUVm.js +0 -1
  219. package/dist/bookmakerAnalysis-CHn1W8uX.cjs +0 -1
  220. package/dist/callGrok-D0D7zBHK.js +0 -1
  221. package/dist/callGrok-DWO719mN.cjs +0 -1
  222. package/dist/events-BJOyGWeU.cjs +0 -1
  223. package/dist/events-OvBb8rgy.js +0 -1
  224. package/dist/index-D7fsk2gy.js +0 -15
  225. package/dist/index-_V1Ql5Es.cjs +0 -13
  226. package/dist/polymarket-updown-15-limit-order-bot-DCC8HE9Z.cjs +0 -1
  227. package/dist/polymarket-updown-15-limit-order-bot-Dv5oGAF4.js +0 -1
  228. package/dist/predictos/agents/bookmaker-agent.d.ts.map +0 -1
  229. package/dist/predictos/agents/event-analysis-agent.d.ts.map +0 -1
  230. package/dist/predictos/agents/index.d.ts.map +0 -1
  231. package/dist/predictos/agents/index.js +0 -1
  232. package/dist/predictos/agents/index.mjs +0 -1
  233. package/dist/predictos/agents/mapper-agent.d.ts.map +0 -1
  234. package/dist/predictos/agents/polyfactual-research.d.ts.map +0 -1
  235. package/dist/predictos/agents/polymarket-position-tracker.d.ts.map +0 -1
  236. package/dist/predictos/agents/polymarket-put-order.d.ts.map +0 -1
  237. package/dist/predictos/agents/polymarket-updown-15-limit-order-bot.d.ts.map +0 -1
  238. package/dist/predictos/agents/x402-seller.d.ts.map +0 -1
  239. package/dist/predictos/ai/callBlockRun.d.ts.map +0 -1
  240. package/dist/predictos/ai/callGrok.d.ts.map +0 -1
  241. package/dist/predictos/ai/callOpenAI.d.ts.map +0 -1
  242. package/dist/predictos/ai/http.d.ts.map +0 -1
  243. package/dist/predictos/ai/index.d.ts.map +0 -1
  244. package/dist/predictos/ai/index.js +0 -1
  245. package/dist/predictos/ai/index.mjs +0 -1
  246. package/dist/predictos/ai/prompts/analyzeEventMarkets.d.ts.map +0 -1
  247. package/dist/predictos/ai/prompts/arbitrageAnalysis.d.ts.map +0 -1
  248. package/dist/predictos/ai/prompts/bookmakerAnalysis.d.ts.map +0 -1
  249. package/dist/predictos/ai/prompts/searchQueryGenerator.d.ts.map +0 -1
  250. package/dist/predictos/ai/types.d.ts.map +0 -1
  251. package/dist/predictos/arbitrage.d.ts.map +0 -1
  252. package/dist/predictos/arbitrage.js +0 -1
  253. package/dist/predictos/arbitrage.mjs +0 -1
  254. package/dist/predictos/clients/polyfactual.d.ts.map +0 -1
  255. package/dist/predictos/clients/polymarket.d.ts.map +0 -1
  256. package/dist/predictos/clients/x402.d.ts.map +0 -1
  257. package/dist/predictos/data/kalshi.d.ts.map +0 -1
  258. package/dist/predictos/data/kalshi.js +0 -1
  259. package/dist/predictos/data/kalshi.mjs +0 -1
  260. package/dist/predictos/data/polymarket.d.ts.map +0 -1
  261. package/dist/predictos/data/polymarket.js +0 -1
  262. package/dist/predictos/data/polymarket.mjs +0 -1
  263. package/dist/predictos/events.d.ts.map +0 -1
  264. package/dist/predictos/index.d.ts.map +0 -1
  265. package/dist/predictos/index.js +0 -1
  266. package/dist/predictos/index.mjs +0 -1
  267. package/dist/predictos/types.d.ts.map +0 -1
  268. package/dist/searchQueryGenerator-DIIs9xw5.js +0 -1
  269. package/dist/searchQueryGenerator-rCVblXJS.cjs +0 -1
  270. /package/dist/{predictos → prediction-markets}/agents/bookmaker-agent.d.ts +0 -0
  271. /package/dist/{predictos → prediction-markets}/agents/event-analysis-agent.d.ts +0 -0
  272. /package/dist/{predictos → prediction-markets}/agents/mapper-agent.d.ts +0 -0
  273. /package/dist/{predictos → prediction-markets}/agents/polymarket-position-tracker.d.ts +0 -0
  274. /package/dist/{predictos → prediction-markets}/agents/polymarket-updown-15-limit-order-bot.d.ts +0 -0
  275. /package/dist/{predictos → prediction-markets}/agents/x402-seller.d.ts +0 -0
  276. /package/dist/{predictos → prediction-markets}/ai/callBlockRun.d.ts +0 -0
  277. /package/dist/{predictos → prediction-markets}/ai/callGrok.d.ts +0 -0
  278. /package/dist/{predictos → prediction-markets}/ai/callOpenAI.d.ts +0 -0
  279. /package/dist/{predictos → prediction-markets}/ai/http.d.ts +0 -0
  280. /package/dist/{predictos → prediction-markets}/ai/prompts/analyzeEventMarkets.d.ts +0 -0
  281. /package/dist/{predictos → prediction-markets}/ai/prompts/arbitrageAnalysis.d.ts +0 -0
  282. /package/dist/{predictos → prediction-markets}/ai/prompts/bookmakerAnalysis.d.ts +0 -0
  283. /package/dist/{predictos → prediction-markets}/ai/prompts/searchQueryGenerator.d.ts +0 -0
  284. /package/dist/{predictos → prediction-markets}/ai/types.d.ts +0 -0
  285. /package/dist/{predictos → prediction-markets}/arbitrage.d.ts +0 -0
  286. /package/dist/{predictos → prediction-markets}/events.d.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export * from './trading-agents';
15
15
  export * from './alpaca/client';
16
16
  export * from './stocks';
17
17
  export * from './prediction';
18
- export * from './predictos';
18
+ export * from './prediction-markets';
19
19
  export * from './algo-stategies/tv-scraper';
20
20
  export * from './leaders/nvsty-leaders';
21
21
  export * from './leaders/zulu';
@@ -23,4 +23,5 @@ export * from './llm/debate-generator';
23
23
  export * from './alpaca/alpaca-mcp-client';
24
24
  export * from './debate-research/stock-agents-api';
25
25
  export * from './trending-topics/wiki-page-views';
26
+ export * from './strategy-signals';
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,MAAM,CAAC;AAGrB,cAAc,gCAAgC,CAAC;AAG/C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,UAAU,CAAC;AAGzB,cAAc,cAAc,CAAC;AAI7B,cAAc,aAAa,CAAC;AAG5B,cAAc,6BAA6B,CAAC;AAG5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AAGvC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,oCAAoC,CAAC;AAGnD,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,MAAM,CAAC;AAGrB,cAAc,gCAAgC,CAAC;AAG/C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,UAAU,CAAC;AAGzB,cAAc,cAAc,CAAC;AAG7B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,6BAA6B,CAAC;AAG5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AAGvC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,oCAAoC,CAAC;AAGnD,cAAc,mCAAmC,CAAC;AAElD,cAAc,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-_V1Ql5Es.cjs"),r=require("./callGrok-DWO719mN.cjs"),t=require("./bookmakerAnalysis-CHn1W8uX.cjs"),s=require("./searchQueryGenerator-rCVblXJS.cjs"),a=require("./predictos/data/kalshi.js"),o=require("./predictos/data/polymarket.js"),p=require("./polymarket-updown-15-limit-order-bot-DCC8HE9Z.cjs"),c=require("./predictos/arbitrage.js"),i=require("./events-BJOyGWeU.cjs");exports.AlpacaMCPClient=e.AlpacaMCPClient,exports.BearResearcher=e.BearResearcher,exports.BullResearcher=e.BullResearcher,exports.CompanyAndAccessionNumberClass=e.CompanyAndAccessionNumberClass,exports.DEFAULT_D1_DATABASE_ID=e.DEFAULT_D1_DATABASE_ID,exports.Downloader=e.Downloader,exports.FinancialSituationMemory=e.FinancialSituationMemory,exports.FinnhubWrapper=e.FinnhubWrapper,exports.InvestmentJudge=e.InvestmentJudge,exports.MarketAnalyst=e.MarketAnalyst,exports.POLYMARKET_CATEGORIES=e.POLYMARKET_CATEGORIES,exports.RequestedFilingsClass=e.RequestedFilingsClass,exports.StockAgentsAPI=e.StockAgentsAPI,exports.TOP_STOCKS=e.TOP_STOCKS,exports.Trader=e.Trader,exports.TradingAgentsGraph=e.TradingAgentsGraph,exports.UnifiedLLMClient=e.UnifiedLLMClient,exports.UnifiedQuoteService=e.UnifiedQuoteService,exports.WikiPageviews=e.WikiPageviews,exports.YahooFinanceWrapper=e.YahooFinanceWrapper,exports.alpacaMCPClient=e.alpacaMCPClient,exports.analyzeCategories=e.analyzeCategories,exports.analyzeStock=e.analyzeStock,exports.analyzeTopStocks=e.analyzeTopStocks,exports.backtestStock=e.backtestStock,exports.calculateGreeks=e.calculateGreeks,exports.calculatePriceChanges=e.calculatePriceChanges,exports.calculateR2=e.calculateR2,exports.calculateRMSE=e.calculateRMSE,exports.calculateRollingStats=e.calculateRollingStats,exports.chatWithAI=e.chatWithAI,exports.checkGammaHealth=e.checkGammaHealth,exports.checkMarket=e.checkMarket,exports.cleanCompanyName=e.cleanCompanyName,exports.createAlpacaBrokerClient=e.createAlpacaBrokerClient,exports.createAlpacaClient=e.createAlpacaClient,exports.createLLM=e.createLLM,exports.db=e.db,exports.detectMovements=e.detectMovements,exports.fetchActiveMarketsWithPrices=e.fetchActiveMarketsWithPrices,exports.fetchAllMarkets=e.fetchAllMarkets,exports.fetchAllTraderActivity=e.fetchAllTraderActivity,exports.fetchAndStoreTopTraders=e.fetchAndStoreTopTraders,exports.fetchLeaderboard=e.fetchLeaderboard,exports.fetchMarket=e.fetchMarket,exports.fetchMarketDetails=e.fetchMarketDetails,exports.fetchMarketHolders=e.fetchMarketHolders,exports.fetchMarketOrderBook=e.fetchMarketOrderBook,exports.fetchMarketSummary=e.fetchMarketSummary,exports.fetchMarkets=e.fetchMarkets,exports.fetchMarketsDashboard=e.fetchMarketsDashboard,exports.fetchPriceHistory=e.fetchPriceHistory,exports.fetchTopTraders=e.fetchTopTraders,exports.fetchTraderActivity=e.fetchTraderActivity,exports.fetchTraderPositions=e.fetchTraderPositions,exports.fetchTraderProfiles=e.fetchTraderProfiles,exports.fetchZuluTraderDetail=e.fetchZuluTraderDetail,exports.fetchZuluTraders=e.fetchZuluTraders,exports.finnhub=e.finnhub,exports.formatTriggerType=e.formatTriggerType,exports.generateDebateAnalysis=e.generateDebateAnalysis,exports.generateDebateAnalysisWithOpenAI=e.generateDebateAnalysisWithOpenAI,exports.getAccount=e.getAccount,exports.getAlpacaMCPClient=e.getAlpacaMCPClient,exports.getCachedMarkets=e.getCachedMarkets,exports.getCategories=e.getCategories,exports.getD1HttpCredentials=e.getD1HttpCredentials,exports.getFundamentals=e.getFundamentals,exports.getHistoricalQuotes=e.getHistoricalQuotes,exports.getIndicators=e.getIndicators,exports.getLatestTradeTimestamp=e.getLatestTradeTimestamp,exports.getLeaders=e.getLeaders,exports.getMarketById=e.getMarketById,exports.getMarketDebate=e.getMarketDebate,exports.getMarketHolders=e.getMarketHolders,exports.getMarketPositions=e.getMarketPositions,exports.getMarkets=e.getMarkets,exports.getMarketsByCategory=e.getMarketsByCategory,exports.getNews=e.getNews,exports.getPriceHistory=e.getPriceHistory,exports.getQuoteFromSource=e.getQuoteFromSource,exports.getQuotes=e.getQuotes,exports.getServiceHealth=e.getServiceHealth,exports.getStockData=e.getStockData,exports.getSyncStatusStats=e.getSyncStatusStats,exports.getTradeHistorySyncProgress=e.getTradeHistorySyncProgress,exports.getTradeSyncStatus=e.getTradeSyncStatus,exports.getTraderPositions=e.getTraderPositions,exports.getTraderTradeHistory=e.getTraderTradeHistory,exports.getTraderTradeStats=e.getTraderTradeStats,exports.getTradersNeedingSync=e.getTradersNeedingSync,exports.getZuluTopByRank=e.getZuluTopByRank,exports.getZuluTraderById=e.getZuluTraderById,exports.getZuluTraders=e.getZuluTraders,exports.greeksEnricher=e.greeksEnricher,exports.isMarketBlocked=e.isMarketBlocked,exports.loadModel=e.loadModel,exports.myLeadersAPI=e.myLeadersAPI,exports.normalizeChartQuotes=e.normalizeChartQuotes,exports.pageviews=e.pageviews,exports.placeOrder=e.placeOrder,exports.predictFuture=e.predictFuture,exports.queryKeys=e.queryKeys,exports.resumeTradeHistorySync=e.resumeTradeHistorySync,exports.saveCategories=e.saveCategories,exports.saveDebate=e.saveDebate,exports.saveHolders=e.saveHolders,exports.saveLeaderboardData=e.saveLeaderboardData,exports.saveLeaders=e.saveLeaders,exports.saveMarketPositions=e.saveMarketPositions,exports.saveMarkets=e.saveMarkets,exports.saveModel=e.saveModel,exports.savePositions=e.savePositions,exports.savePriceHistory=e.savePriceHistory,exports.saveTradeHistory=e.saveTradeHistory,exports.saveZuluCurrencyStats=e.saveZuluCurrencyStats,exports.saveZuluTraders=e.saveZuluTraders,exports.searchMarkets=e.searchMarkets,exports.searchMarketsInDB=e.searchMarketsInDB,exports.searchPublic=e.searchPublic,exports.searchZuluTraders=e.searchZuluTraders,exports.splitTrainTest=e.splitTrainTest,exports.stockAgentsAPI=e.stockAgentsAPI,exports.stockNames=e.stockNames,exports.syncAll=e.syncAll,exports.syncAllMarkets=e.syncAllMarkets,exports.syncCopyTradingLeadersOrders=e.syncCopyTradingLeadersOrders,exports.syncLeaderboard=e.syncLeaderboard,exports.syncLeadersAndCategories=e.syncLeadersAndCategories,exports.syncMarketHolders=e.syncMarketHolders,exports.syncMarkets=e.syncMarkets,exports.syncMarketsIncremental=e.syncMarketsIncremental,exports.syncPriceHistory=e.syncPriceHistory,exports.syncTopTradersTradeHistory=e.syncTopTradersTradeHistory,exports.syncTraderTradeHistory=e.syncTraderTradeHistory,exports.syncZuluTraderDetails=e.syncZuluTraderDetails,exports.syncZuluTraders=e.syncZuluTraders,exports.trainModels=e.trainModels,exports.unifiedQuoteService=e.unifiedQuoteService,exports.updateTradeSyncStatus=e.updateTradeSyncStatus,exports.yahooFinance=e.yahooFinance,exports.yahooFinanceWrapper=e.yahooFinanceWrapper,exports.yfinance=e.yfinance,exports.callGrokResponses=r.callGrokResponses,exports.callOpenAIResponses=r.callOpenAIResponses,exports.fetchWithTimeout=r.fetchWithTimeout,exports.isRetryableError=r.isRetryableError,exports.sleep=r.sleep,exports.BLOCKRUN_MODELS=t.BLOCKRUN_MODELS,exports.analyzeEventMarketsPrompt=t.analyzeEventMarketsPrompt,exports.bookmakerAnalysisPrompt=t.bookmakerAnalysisPrompt,exports.callBlockRunResponses=t.callBlockRunResponses,exports.isBlockRunModel=t.isBlockRunModel,exports.listBlockRunModels=t.listBlockRunModels,exports.arbitrageAnalysisPrompt=s.arbitrageAnalysisPrompt,exports.searchQueryGeneratorPrompt=s.searchQueryGeneratorPrompt,exports.buildKalshiMarketUrl=a.buildKalshiMarketUrl,exports.dflowRequest=a.dflowRequest,exports.getKalshiMarketsByEvent=a.getKalshiMarketsByEvent,exports.buildDomeKalshiMarketUrl=o.buildKalshiMarketUrl,exports.buildPolymarketUrl=o.buildPolymarketUrl,exports.domeRequest=o.domeRequest,exports.getDomeKalshiMarketsByEvent=o.getKalshiMarketsByEvent,exports.getPolymarketMarkets=o.getPolymarketMarkets,exports.NoTradeError=p.NoTradeError,exports.polyfactual=p.polyfactual,exports.polymarketClob=p.polymarket,exports.runBookmakerAgent=p.runBookmakerAgent,exports.runEventAnalysisAgent=p.runEventAnalysisAgent,exports.runMapperAgent=p.runMapperAgent,exports.runPolyfactualResearch=p.runPolyfactualResearch,exports.runPolymarketPositionTracker=p.runPolymarketPositionTracker,exports.runPolymarketPutOrder=p.runPolymarketPutOrder,exports.runPolymarketUpDown15LimitOrderBot=p.runPolymarketUpDown15LimitOrderBot,exports.runX402Seller=p.runX402Seller,exports.x402=p.x402,exports.findArbitrage=c.findArbitrage,exports.getEvents=i.getEvents;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-kfghRBr2.cjs"),t=require("./scripted-llm-CmDVkhyH.cjs"),r=require("./trading-agents-C8M7tbB0.cjs"),s=require("./validate-DBxPUXqH.cjs");exports.AlpacaMCPClient=e.AlpacaMCPClient,exports.CompanyAndAccessionNumberClass=e.CompanyAndAccessionNumberClass,exports.DEFAULT_BB_RSI_BREAKOUT_CONFIG=e.DEFAULT_BB_RSI_BREAKOUT_CONFIG,exports.DEFAULT_D1_DATABASE_ID=e.DEFAULT_D1_DATABASE_ID,exports.DEFAULT_EMA_CROSSOVER_CONFIG=e.DEFAULT_EMA_CROSSOVER_CONFIG,exports.DEFAULT_MIN_SAMPLE_SIZE=e.DEFAULT_MIN_SAMPLE_SIZE,exports.DEFAULT_SHARES_EPSILON=e.DEFAULT_SHARES_EPSILON,exports.DEFAULT_SPREAD_MOMENTUM_CONFIG=e.DEFAULT_SPREAD_MOMENTUM_CONFIG,exports.Downloader=e.Downloader,exports.FinnhubWrapper=e.FinnhubWrapper,exports.FixtureDataProvider=e.FixtureDataProvider,exports.LEADERBOARD_MAX_OFFSET=e.LEADERBOARD_MAX_OFFSET,exports.LEADERBOARD_PAGE_LIMIT=e.LEADERBOARD_PAGE_LIMIT,exports.MAX_REFILL_MARKETS=e.MAX_REFILL_MARKETS,exports.MAX_ZULU_SYNC=e.MAX_ZULU_SYNC,exports.MockEquityBroker=e.MockEquityBroker,exports.MockVenue=e.MockVenue,exports.PM_MARKET_LISTING_KIND=e.PM_MARKET_LISTING_KIND,exports.POLYMARKET_CATEGORIES=e.POLYMARKET_CATEGORIES,exports.R_MULTIPLE_EXCLUSION_REASONS=e.R_MULTIPLE_EXCLUSION_REASONS,exports.RequestedFilingsClass=e.RequestedFilingsClass,exports.StockAgentsAPI=e.StockAgentsAPI,exports.TOP_STOCKS=e.TOP_STOCKS,exports.UnifiedQuoteService=e.UnifiedQuoteService,exports.VIBE_LIMITS=e.VIBE_LIMITS,exports.WikiPageviews=e.WikiPageviews,exports.alpacaMCPClient=e.alpacaMCPClient,exports.analyzeCategories=e.analyzeCategories,exports.analyzeStock=e.analyzeStock,exports.analyzeTechnicals=e.analyzeTechnicals,exports.analyzeTopStocks=e.analyzeTopStocks,exports.backtestStock=e.backtestStock,exports.btc15mFusionSource=e.btc15mFusionSource,exports.btc15mGuard=e.btc15mGuard,exports.buildLeaderboardUrl=e.buildLeaderboardUrl,exports.buildPolymarketWalletTrustInputs=e.buildPolymarketWalletTrustInputs,exports.calculateGreeks=e.calculateGreeks,exports.calculatePriceChanges=e.calculatePriceChanges,exports.calculateR2=e.calculateR2,exports.calculateRMSE=e.calculateRMSE,exports.calculateRollingStats=e.calculateRollingStats,exports.chatWithAI=e.chatWithAI,exports.checkGammaHealth=e.checkGammaHealth,exports.checkMarket=e.checkMarket,exports.clampRefillSize=e.clampRefillSize,exports.cleanCompanyName=e.cleanCompanyName,exports.combineTechnicalSignals=e.combineTechnicalSignals,exports.computeForecasterTrustScore=e.computeForecasterTrustScore,exports.copyTradeSizingSource=e.copyTradeSizingSource,exports.createAlpacaBrokerClient=e.createAlpacaBrokerClient,exports.createAlpacaClient=e.createAlpacaClient,exports.createSpreadAwareMomentumSource=e.createSpreadAwareMomentumSource,exports.db=e.db,exports.deactivateExpiredMarkets=e.deactivateExpiredMarkets,exports.detectMovements=e.detectMovements,exports.evaluateBbRsiBreakout=e.evaluateBbRsiBreakout,exports.evaluateEmaCrossover=e.evaluateEmaCrossover,exports.fetchActiveMarketsWithPrices=e.fetchActiveMarketsWithPrices,exports.fetchAllMarkets=e.fetchAllMarkets,exports.fetchAllTraderActivity=e.fetchAllTraderActivity,exports.fetchAndStoreTopTraders=e.fetchAndStoreTopTraders,exports.fetchLeaderboard=e.fetchLeaderboard,exports.fetchLeaderboardPages=e.fetchLeaderboardPages,exports.fetchMarket=e.fetchMarket,exports.fetchMarketDetails=e.fetchMarketDetails,exports.fetchMarketHolders=e.fetchMarketHolders,exports.fetchMarketOrderBook=e.fetchMarketOrderBook,exports.fetchMarketSummary=e.fetchMarketSummary,exports.fetchMarkets=e.fetchMarkets,exports.fetchMarketsDashboard=e.fetchMarketsDashboard,exports.fetchPriceHistory=e.fetchPriceHistory,exports.fetchTopTraders=e.fetchTopTraders,exports.fetchTraderActivity=e.fetchTraderActivity,exports.fetchTraderPositions=e.fetchTraderPositions,exports.fetchTraderProfiles=e.fetchTraderProfiles,exports.fetchZuluTraderDetail=e.fetchZuluTraderDetail,exports.fetchZuluTraders=e.fetchZuluTraders,exports.finnhub=e.finnhub,exports.firstClobTokenId=e.firstClobTokenId,exports.formatTriggerType=e.formatTriggerType,exports.fromKalshiMarket=e.fromKalshiMarket,exports.fromOpenBBBars=e.fromOpenBBBars,exports.fromPmxtMarket=e.fromPmxtMarket,exports.gabagoolSource=e.gabagoolSource,exports.generateDebateAnalysis=e.generateDebateAnalysis,exports.generateDebateAnalysisWithOpenAI=e.generateDebateAnalysisWithOpenAI,exports.getAccount=e.getAccount,exports.getAlpacaMCPClient=e.getAlpacaMCPClient,exports.getCachedMarkets=e.getCachedMarkets,exports.getCategories=e.getCategories,exports.getD1HttpCredentials=e.getD1HttpCredentials,exports.getHistoricalQuotes=e.getHistoricalQuotes,exports.getLatestTradeTimestamp=e.getLatestTradeTimestamp,exports.getLeaders=e.getLeaders,exports.getMarketById=e.getMarketById,exports.getMarketDebate=e.getMarketDebate,exports.getMarketHolders=e.getMarketHolders,exports.getMarketPositions=e.getMarketPositions,exports.getMarkets=e.getMarkets,exports.getMarketsByCategory=e.getMarketsByCategory,exports.getPriceHistory=e.getPriceHistory,exports.getQuoteFromSource=e.getQuoteFromSource,exports.getQuotes=e.getQuotes,exports.getServiceHealth=e.getServiceHealth,exports.getSyncStatusStats=e.getSyncStatusStats,exports.getTradeHistorySyncProgress=e.getTradeHistorySyncProgress,exports.getTradeSyncStatus=e.getTradeSyncStatus,exports.getTraderPositions=e.getTraderPositions,exports.getTraderTradeHistory=e.getTraderTradeHistory,exports.getTraderTradeStats=e.getTraderTradeStats,exports.getTraderTradesThroughCutoff=e.getTraderTradesThroughCutoff,exports.getTradersNeedingSync=e.getTradersNeedingSync,exports.getZuluTopByRank=e.getZuluTopByRank,exports.getZuluTraderById=e.getZuluTraderById,exports.getZuluTraders=e.getZuluTraders,exports.greeksEnricher=e.greeksEnricher,exports.hedgeFundTechnicalsSource=e.hedgeFundTechnicalsSource,exports.initialSurvivalState=e.initialSurvivalState,exports.isMarketBlocked=e.isMarketBlocked,exports.isValidTokenId=e.isValidTokenId,exports.kalshiVibeGuard=e.kalshiVibeGuard,exports.kalshiVibeSource=e.kalshiVibeSource,exports.loadModel=e.loadModel,exports.loadPolymarketWalletTrustInputs=e.loadPolymarketWalletTrustInputs,exports.myLeadersAPI=e.myLeadersAPI,exports.normalizeBbRsiBreakoutConfig=e.normalizeBbRsiBreakoutConfig,exports.normalizeEmaCrossoverConfig=e.normalizeEmaCrossoverConfig,exports.normalizeZuluTrader=e.normalizeZuluTrader,exports.pageviews=e.pageviews,exports.parseClobTokenIds=e.parseClobTokenIds,exports.placeOrder=e.placeOrder,exports.predictFuture=e.predictFuture,exports.publishedMarketCondition=e.publishedMarketCondition,exports.queryKeys=e.queryKeys,exports.rMultiplesFromResolvedPositions=e.rMultiplesFromResolvedPositions,exports.readSpreadMomentum=e.readSpreadMomentum,exports.reconstructResolvedPositions=e.reconstructResolvedPositions,exports.redFlagsSource=e.redFlagsSource,exports.refillMarkets=e.refillMarkets,exports.resumeTradeHistorySync=e.resumeTradeHistorySync,exports.saveCategories=e.saveCategories,exports.saveDebate=e.saveDebate,exports.saveHolders=e.saveHolders,exports.saveLeaderboardData=e.saveLeaderboardData,exports.saveLeaders=e.saveLeaders,exports.saveMarketPositions=e.saveMarketPositions,exports.saveMarkets=e.saveMarkets,exports.saveModel=e.saveModel,exports.savePositions=e.savePositions,exports.savePriceHistory=e.savePriceHistory,exports.saveTradeHistory=e.saveTradeHistory,exports.saveZuluCurrencyStats=e.saveZuluCurrencyStats,exports.saveZuluTraders=e.saveZuluTraders,exports.searchMarkets=e.searchMarkets,exports.searchMarketsInDB=e.searchMarketsInDB,exports.searchPublic=e.searchPublic,exports.searchZuluTraders=e.searchZuluTraders,exports.settleResolvedPositions=e.settleResolvedPositions,exports.splitTrainTest=e.splitTrainTest,exports.stockAgentsAPI=e.stockAgentsAPI,exports.stockNames=e.stockNames,exports.syncAll=e.syncAll,exports.syncAllMarkets=e.syncAllMarkets,exports.syncCopyTradingLeadersOrders=e.syncCopyTradingLeadersOrders,exports.syncLeaderboard=e.syncLeaderboard,exports.syncLeadersAndCategories=e.syncLeadersAndCategories,exports.syncMarketHolders=e.syncMarketHolders,exports.syncMarkets=e.syncMarkets,exports.syncMarketsIncremental=e.syncMarketsIncremental,exports.syncPriceHistory=e.syncPriceHistory,exports.syncTopTradersTradeHistory=e.syncTopTradersTradeHistory,exports.syncTraderTradeHistory=e.syncTraderTradeHistory,exports.syncZuluTraderDetails=e.syncZuluTraderDetails,exports.syncZuluTraders=e.syncZuluTraders,exports.technicalAdx=e.technicalAdx,exports.technicalAtr=e.technicalAtr,exports.technicalBollinger=e.technicalBollinger,exports.technicalEma=e.technicalEma,exports.technicalHurst=e.technicalHurst,exports.technicalRsi=e.technicalRsi,exports.toSurvivalPosture=e.toSurvivalPosture,exports.toTradeSignal=e.toTradeSignal,exports.trainModels=e.trainModels,exports.trustScoreFromMoments=e.trustScoreFromMoments,exports.unifiedQuoteService=e.unifiedQuoteService,exports.updateSurvivalState=e.updateSurvivalState,exports.updateTradeSyncStatus=e.updateTradeSyncStatus,exports.validateDebateAnalysis=e.validateDebateAnalysis,exports.vibeBuyFailure=e.vibeBuyFailure,exports.vibeKellyQuantity=e.vibeKellyQuantity,exports.yfinance=e.yfinance,exports.BearResearcher=t.BearResearcher,exports.BullResearcher=t.BullResearcher,exports.FinancialSituationMemory=t.FinancialSituationMemory,exports.FundManager=t.FundManager,exports.InvestmentJudge=t.InvestmentJudge,exports.MarketAnalyst=t.MarketAnalyst,exports.NeutralAnalyst=t.NeutralAnalyst,exports.RiskJudge=t.RiskJudge,exports.RiskyAnalyst=t.RiskyAnalyst,exports.SafeAnalyst=t.SafeAnalyst,exports.ScriptedLLMClient=t.ScriptedLLMClient,exports.Trader=t.Trader,exports.TradingAgentsGraph=t.TradingAgentsGraph,exports.UnifiedLLMClient=t.UnifiedLLMClient,exports.WORKER_SAFE_YAHOO_FINANCE_OPTIONS=t.WORKER_SAFE_YAHOO_FINANCE_OPTIONS,exports.YahooFinanceWrapper=t.YahooFinanceWrapper,exports.applyRiskGate=t.applyRiskGate,exports.createLLM=t.createLLM,exports.createYahooFinance=t.createYahooFinance,exports.formatStructuredReport=t.formatStructuredReport,exports.getFundamentals=t.getFundamentals,exports.getIndicators=t.getIndicators,exports.getNews=t.getNews,exports.getStockData=t.getStockData,exports.normalizeChartQuotes=t.normalizeChartQuotes,exports.parseFundManagerApproval=t.parseFundManagerApproval,exports.parseJudgeDecision=t.parseJudgeDecision,exports.proposalId=t.proposalId,exports.renderStrategySignalsReport=t.renderStrategySignalsReport,exports.selectProposal=t.selectProposal,exports.toStructuredReport=t.toStructuredReport,exports.yahooFinance=t.yahooFinance,exports.yahooFinanceWrapper=t.yahooFinanceWrapper,exports.BLOCKRUN_MODELS=r.BLOCKRUN_MODELS,exports.DEFAULT_KALSHI_MOMENTUM_CONFIG=r.DEFAULT_KALSHI_MOMENTUM_CONFIG,exports.InMemoryPaperExecutor=r.InMemoryPaperExecutor,exports.NoTradeError=r.NoTradeError,exports.analyzeEventMarketsPrompt=r.analyzeEventMarketsPrompt,exports.applyMomentumExecution=r.applyMomentumExecution,exports.arbitrageAnalysisPrompt=r.arbitrageAnalysisPrompt,exports.bookmakerAnalysisPrompt=r.bookmakerAnalysisPrompt,exports.buildDomeKalshiMarketUrl=r.buildKalshiMarketUrl,exports.buildKalshiMarketUrl=r.buildKalshiMarketUrl$1,exports.buildPolymarketUrl=r.buildPolymarketUrl,exports.callBlockRunResponses=r.callBlockRunResponses,exports.callGrokResponses=r.callGrokResponses,exports.callOpenAIResponses=r.callOpenAIResponses,exports.createKalshiMomentumState=r.createKalshiMomentumState,exports.dflowRequest=r.dflowRequest,exports.domeRequest=r.domeRequest,exports.evaluateKalshiMomentumTick=r.evaluateKalshiMomentumTick,exports.fetchWithTimeout=r.fetchWithTimeout,exports.findArbitrage=r.findArbitrage,exports.getDomeKalshiMarketsByEvent=r.getKalshiMarketsByEvent,exports.getEvents=r.getEvents,exports.getKalshiMarketsByEvent=r.getKalshiMarketsByEvent$1,exports.getPolymarketMarkets=r.getPolymarketMarkets,exports.isBlockRunModel=r.isBlockRunModel,exports.isRetryableError=r.isRetryableError,exports.kalshiMomentumSource=r.kalshiMomentumSource,exports.listBlockRunModels=r.listBlockRunModels,exports.normalizeKalshiMomentumConfig=r.normalizeKalshiMomentumConfig,exports.polyfactual=r.polyfactual,exports.polymarketClob=r.polymarket,exports.predictionMarketResearch=r.predictionMarketResearch,exports.reviewPredictionMarketIntent=r.reviewPredictionMarketIntent,exports.runBookmakerAgent=r.runBookmakerAgent,exports.runEventAnalysisAgent=r.runEventAnalysisAgent,exports.runKalshiMomentumPaperAgent=r.runKalshiMomentumPaperAgent,exports.runKalshiMomentumPaperAgentWithResearch=r.runKalshiMomentumPaperAgentWithResearch,exports.runMapperAgent=r.runMapperAgent,exports.runPolyfactualResearch=r.runPolyfactualResearch,exports.runPolymarketPositionTracker=r.runPolymarketPositionTracker,exports.runPolymarketPutOrder=r.runPolymarketPutOrder,exports.runPolymarketUpDown15LimitOrderBot=r.runPolymarketUpDown15LimitOrderBot,exports.runX402Seller=r.runX402Seller,exports.searchQueryGeneratorPrompt=r.searchQueryGeneratorPrompt,exports.sleep=r.sleep,exports.toEquityOrder=r.toEquityOrder,exports.toExecutableCents=r.toExecutableCents,exports.toPredictionMarketIntent=r.toPredictionMarketIntent,exports.x402=r.x402,exports.partitionValidSignals=s.partitionValidSignals,exports.validateAccount=s.validateAccount,exports.validateLimits=s.validateLimits,exports.validatePosture=s.validatePosture,exports.validateSignal=s.validateSignal;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{A as a,B as s,a as e,C as r,D as t,b as o,F as i,d as c,I as n,M as l,P as d,R as u,S as y,T as k,e as g,f as m,U as p,h,W as T,Y as M,i as A,j as f,k as P,l as S,m as v,n as C,o as b,p as D,q as B,r as H,s as L,t as R,u as E,v as I,w as O,x as F,y as Z,z as j,E as G,G as K,H as N,J as Q,K as W,L as U,N as w,O as _,Q as z,V as x,X as q,Z as Y,_ as J,$ as X,a0 as V,a1 as $,a2 as aa,a3 as sa,a4 as ea,a5 as ra,a6 as ta,a7 as oa,a8 as ia,a9 as ca,aa as na,ab as la,ac as da,ad as ua,ae as ya,af as ka,ag as ga,ah as ma,ai as pa,aj as ha,ak as Ta,al as Ma,am as Aa,an as fa,ao as Pa,ap as Sa,aq as va,ar as Ca,as as ba,at as Da,au as Ba,av as Ha,aw as La,ax as Ra,ay as Ea,az as Ia,aA as Oa,aB as Fa,aC as Za,aD as ja,aE as Ga,aF as Ka,aG as Na,aH as Qa,aI as Wa,aJ as Ua,aK as wa,aL as _a,aM as za,aN as xa,aO as qa,aP as Ya,aQ as Ja,aR as Xa,aS as Va,aT as $a,aU as as,aV as ss,aW as es,aX as rs,aY as ts,aZ as os,a_ as is,a$ as cs,b0 as ns,b1 as ls,b2 as ds,b3 as us,b4 as ys,b5 as ks,b6 as gs,b7 as ms,b8 as ps,b9 as hs,ba as Ts,bb as Ms,bc as As,bd as fs,be as Ps,bf as Ss,bg as vs,bh as Cs,bi as bs,bj as Ds,bk as Bs,bl as Hs,bm as Ls,bn as Rs,bo as Es,bp as Is,bq as Os}from"./index-D7fsk2gy.js";import{c as Fs,a as Zs,f as js,i as Gs,s as Ks}from"./callGrok-D0D7zBHK.js";import{B as Ns,a as Qs,b as Ws,c as Us,i as ws,l as _s}from"./bookmakerAnalysis-Bfo1zUVm.js";import{a as zs,s as xs}from"./searchQueryGenerator-DIIs9xw5.js";import{buildKalshiMarketUrl as qs,dflowRequest as Ys,getKalshiMarketsByEvent as Js}from"./predictos/data/kalshi.mjs";import{buildKalshiMarketUrl as Xs,buildPolymarketUrl as Vs,domeRequest as $s,getKalshiMarketsByEvent as ae,getPolymarketMarkets as se}from"./predictos/data/polymarket.mjs";import{N as ee,p as re,h as te,r as oe,a as ie,b as ce,c as ne,d as le,e as de,f as ue,g as ye,x as ke}from"./polymarket-updown-15-limit-order-bot-Dv5oGAF4.js";import{findArbitrage as ge}from"./predictos/arbitrage.mjs";import{g as me}from"./events-OvBb8rgy.js";export{a as AlpacaMCPClient,Ns as BLOCKRUN_MODELS,s as BearResearcher,e as BullResearcher,r as CompanyAndAccessionNumberClass,t as DEFAULT_D1_DATABASE_ID,o as Downloader,i as FinancialSituationMemory,c as FinnhubWrapper,n as InvestmentJudge,l as MarketAnalyst,ee as NoTradeError,d as POLYMARKET_CATEGORIES,u as RequestedFilingsClass,y as StockAgentsAPI,k as TOP_STOCKS,g as Trader,m as TradingAgentsGraph,p as UnifiedLLMClient,h as UnifiedQuoteService,T as WikiPageviews,M as YahooFinanceWrapper,A as alpacaMCPClient,f as analyzeCategories,Qs as analyzeEventMarketsPrompt,P as analyzeStock,S as analyzeTopStocks,zs as arbitrageAnalysisPrompt,v as backtestStock,Ws as bookmakerAnalysisPrompt,Xs as buildDomeKalshiMarketUrl,qs as buildKalshiMarketUrl,Vs as buildPolymarketUrl,C as calculateGreeks,b as calculatePriceChanges,D as calculateR2,B as calculateRMSE,H as calculateRollingStats,Us as callBlockRunResponses,Fs as callGrokResponses,Zs as callOpenAIResponses,L as chatWithAI,R as checkGammaHealth,E as checkMarket,I as cleanCompanyName,O as createAlpacaBrokerClient,F as createAlpacaClient,Z as createLLM,j as db,G as detectMovements,Ys as dflowRequest,$s as domeRequest,K as fetchActiveMarketsWithPrices,N as fetchAllMarkets,Q as fetchAllTraderActivity,W as fetchAndStoreTopTraders,U as fetchLeaderboard,w as fetchMarket,_ as fetchMarketDetails,z as fetchMarketHolders,x as fetchMarketOrderBook,q as fetchMarketSummary,Y as fetchMarkets,J as fetchMarketsDashboard,X as fetchPriceHistory,V as fetchTopTraders,$ as fetchTraderActivity,aa as fetchTraderPositions,sa as fetchTraderProfiles,js as fetchWithTimeout,ea as fetchZuluTraderDetail,ra as fetchZuluTraders,ge as findArbitrage,ta as finnhub,oa as formatTriggerType,ia as generateDebateAnalysis,ca as generateDebateAnalysisWithOpenAI,na as getAccount,la as getAlpacaMCPClient,da as getCachedMarkets,ua as getCategories,ya as getD1HttpCredentials,ae as getDomeKalshiMarketsByEvent,me as getEvents,ka as getFundamentals,ga as getHistoricalQuotes,ma as getIndicators,Js as getKalshiMarketsByEvent,pa as getLatestTradeTimestamp,ha as getLeaders,Ta as getMarketById,Ma as getMarketDebate,Aa as getMarketHolders,fa as getMarketPositions,Pa as getMarkets,Sa as getMarketsByCategory,va as getNews,se as getPolymarketMarkets,Ca as getPriceHistory,ba as getQuoteFromSource,Da as getQuotes,Ba as getServiceHealth,Ha as getStockData,La as getSyncStatusStats,Ra as getTradeHistorySyncProgress,Ea as getTradeSyncStatus,Ia as getTraderPositions,Oa as getTraderTradeHistory,Fa as getTraderTradeStats,Za as getTradersNeedingSync,ja as getZuluTopByRank,Ga as getZuluTraderById,Ka as getZuluTraders,Na as greeksEnricher,ws as isBlockRunModel,Qa as isMarketBlocked,Gs as isRetryableError,_s as listBlockRunModels,Wa as loadModel,Ua as myLeadersAPI,wa as normalizeChartQuotes,_a as pageviews,za as placeOrder,re as polyfactual,te as polymarketClob,xa as predictFuture,qa as queryKeys,Ya as resumeTradeHistorySync,oe as runBookmakerAgent,ie as runEventAnalysisAgent,ce as runMapperAgent,ne as runPolyfactualResearch,le as runPolymarketPositionTracker,de as runPolymarketPutOrder,ue as runPolymarketUpDown15LimitOrderBot,ye as runX402Seller,Ja as saveCategories,Xa as saveDebate,Va as saveHolders,$a as saveLeaderboardData,as as saveLeaders,ss as saveMarketPositions,es as saveMarkets,rs as saveModel,ts as savePositions,os as savePriceHistory,is as saveTradeHistory,cs as saveZuluCurrencyStats,ns as saveZuluTraders,ls as searchMarkets,ds as searchMarketsInDB,us as searchPublic,xs as searchQueryGeneratorPrompt,ys as searchZuluTraders,Ks as sleep,ks as splitTrainTest,gs as stockAgentsAPI,ms as stockNames,ps as syncAll,hs as syncAllMarkets,Ts as syncCopyTradingLeadersOrders,Ms as syncLeaderboard,As as syncLeadersAndCategories,fs as syncMarketHolders,Ps as syncMarkets,Ss as syncMarketsIncremental,vs as syncPriceHistory,Cs as syncTopTradersTradeHistory,bs as syncTraderTradeHistory,Ds as syncZuluTraderDetails,Bs as syncZuluTraders,Hs as trainModels,Ls as unifiedQuoteService,Rs as updateTradeSyncStatus,ke as x402,Es as yahooFinance,Is as yahooFinanceWrapper,Os as yfinance};
1
+ import{A as a,C as s,D as e,a as t,b as r,d as o,e as i,f as l,h as n,F as c,i as d,L as u,j as M,M as k,k as g,l as m,m as y,P as T,n as p,R as S,o as h,S as A,T as P,U as E,V as v,W as R,p as f,q as C,r as I,s as b,t as L,u as _,v as F,w as B,x as D,y as O,z as N,B as U,E as H,G as K,H as G,I as W,J as z,K as Z,N as x,O as w,Q,X as q,Y as V,Z as j,_ as X,$ as Y,a0 as J,a1 as $,a2 as aa,a3 as sa,a4 as ea,a5 as ta,a6 as ra,a7 as oa,a8 as ia,a9 as la,aa as na,ab as ca,ac as da,ad as ua,ae as Ma,af as ka,ag as ga,ah as ma,ai as ya,aj as Ta,ak as pa,al as Sa,am as ha,an as Aa,ao as Pa,ap as Ea,aq as va,ar as Ra,as as fa,at as Ca,au as Ia,av as ba,aw as La,ax as _a,ay as Fa,az as Ba,aA as Da,aB as Oa,aC as Na,aD as Ua,aE as Ha,aF as Ka,aG as Ga,aH as Wa,aI as za,aJ as Za,aK as xa,aL as wa,aM as Qa,aN as qa,aO as Va,aP as ja,aQ as Xa,aR as Ya,aS as Ja,aT as $a,aU as as,aV as ss,aW as es,aX as ts,aY as rs,aZ as os,a_ as is,a$ as ls,b0 as ns,b1 as cs,b2 as ds,b3 as us,b4 as Ms,b5 as ks,b6 as gs,b7 as ms,b8 as ys,b9 as Ts,ba as ps,bb as Ss,bc as hs,bd as As,be as Ps,bf as Es,bg as vs,bh as Rs,bi as fs,bj as Cs,bk as Is,bl as bs,bm as Ls,bn as _s,bo as Fs,bp as Bs,bq as Ds,br as Os,bs as Ns,bt as Us,bu as Hs,bv as Ks,bw as Gs,bx as Ws,by as zs,bz as Zs,bA as xs,bB as ws,bC as Qs,bD as qs,bE as Vs,bF as js,bG as Xs,bH as Ys,bI as Js,bJ as $s,bK as ae,bL as se,bM as ee,bN as te,bO as re,bP as oe,bQ as ie,bR as le,bS as ne,bT as ce,bU as de,bV as ue,bW as Me,bX as ke,bY as ge,bZ as me,b_ as ye,b$ as Te,c0 as pe,c1 as Se,c2 as he,c3 as Ae,c4 as Pe,c5 as Ee,c6 as ve,c7 as Re,c8 as fe,c9 as Ce,ca as Ie}from"./index-6F5HGB0V.js";import{B as be,a as Le,F as _e,b as Fe,I as Be,M as De,N as Oe,R as Ne,c as Ue,S as He,d as Ke,T as Ge,e as We,U as ze,W as Ze,Y as xe,m as we,f as Qe,n as qe,o as Ve,g as je,h as Xe,i as Ye,j as Je,q as $e,p as at,k as st,r as et,s as tt,t as rt,u as ot,y as it,l as lt}from"./scripted-llm-B-UTs08L.js";import{B as nt,D as ct,I as dt,N as ut,a as Mt,b as kt,c as gt,d as mt,e as yt,f as Tt,g as pt,h as St,i as ht,j as At,k as Pt,l as Et,m as vt,n as Rt,o as ft,p as Ct,q as It,r as bt,s as Lt,t as _t,u as Ft,v as Bt,W as Dt,w as Ot,x as Nt,y as Ut,z as Ht,A as Kt,C as Gt,E as Wt,F as zt,G as Zt,H as xt,J as wt,K as Qt,L as qt,M as Vt,O as jt,P as Xt,Q as Yt,R as Jt,X as $t,U as ar,T as sr,S as er}from"./trading-agents-Bh9OORHe.js";import{p as tr,a as rr,b as or,c as ir,v as lr}from"./validate-C1MS8RhG.js";export{a as AlpacaMCPClient,nt as BLOCKRUN_MODELS,be as BearResearcher,Le as BullResearcher,s as CompanyAndAccessionNumberClass,e as DEFAULT_BB_RSI_BREAKOUT_CONFIG,t as DEFAULT_D1_DATABASE_ID,r as DEFAULT_EMA_CROSSOVER_CONFIG,ct as DEFAULT_KALSHI_MOMENTUM_CONFIG,o as DEFAULT_MIN_SAMPLE_SIZE,i as DEFAULT_SHARES_EPSILON,l as DEFAULT_SPREAD_MOMENTUM_CONFIG,n as Downloader,_e as FinancialSituationMemory,c as FinnhubWrapper,d as FixtureDataProvider,Fe as FundManager,dt as InMemoryPaperExecutor,Be as InvestmentJudge,u as LEADERBOARD_MAX_OFFSET,M as LEADERBOARD_PAGE_LIMIT,k as MAX_REFILL_MARKETS,g as MAX_ZULU_SYNC,De as MarketAnalyst,m as MockEquityBroker,y as MockVenue,Oe as NeutralAnalyst,ut as NoTradeError,T as PM_MARKET_LISTING_KIND,p as POLYMARKET_CATEGORIES,S as R_MULTIPLE_EXCLUSION_REASONS,h as RequestedFilingsClass,Ne as RiskJudge,Ue as RiskyAnalyst,He as SafeAnalyst,Ke as ScriptedLLMClient,A as StockAgentsAPI,P as TOP_STOCKS,Ge as Trader,We as TradingAgentsGraph,ze as UnifiedLLMClient,E as UnifiedQuoteService,v as VIBE_LIMITS,Ze as WORKER_SAFE_YAHOO_FINANCE_OPTIONS,R as WikiPageviews,xe as YahooFinanceWrapper,f as alpacaMCPClient,C as analyzeCategories,Mt as analyzeEventMarketsPrompt,I as analyzeStock,b as analyzeTechnicals,L as analyzeTopStocks,kt as applyMomentumExecution,we as applyRiskGate,gt as arbitrageAnalysisPrompt,_ as backtestStock,mt as bookmakerAnalysisPrompt,F as btc15mFusionSource,B as btc15mGuard,yt as buildDomeKalshiMarketUrl,Tt as buildKalshiMarketUrl,D as buildLeaderboardUrl,pt as buildPolymarketUrl,O as buildPolymarketWalletTrustInputs,N as calculateGreeks,U as calculatePriceChanges,H as calculateR2,K as calculateRMSE,G as calculateRollingStats,St as callBlockRunResponses,ht as callGrokResponses,At as callOpenAIResponses,W as chatWithAI,z as checkGammaHealth,Z as checkMarket,x as clampRefillSize,w as cleanCompanyName,Q as combineTechnicalSignals,q as computeForecasterTrustScore,V as copyTradeSizingSource,j as createAlpacaBrokerClient,X as createAlpacaClient,Pt as createKalshiMomentumState,Qe as createLLM,Y as createSpreadAwareMomentumSource,qe as createYahooFinance,J as db,$ as deactivateExpiredMarkets,aa as detectMovements,Et as dflowRequest,vt as domeRequest,sa as evaluateBbRsiBreakout,ea as evaluateEmaCrossover,Rt as evaluateKalshiMomentumTick,ta as fetchActiveMarketsWithPrices,ra as fetchAllMarkets,oa as fetchAllTraderActivity,ia as fetchAndStoreTopTraders,la as fetchLeaderboard,na as fetchLeaderboardPages,ca as fetchMarket,da as fetchMarketDetails,ua as fetchMarketHolders,Ma as fetchMarketOrderBook,ka as fetchMarketSummary,ga as fetchMarkets,ma as fetchMarketsDashboard,ya as fetchPriceHistory,Ta as fetchTopTraders,pa as fetchTraderActivity,Sa as fetchTraderPositions,ha as fetchTraderProfiles,ft as fetchWithTimeout,Aa as fetchZuluTraderDetail,Pa as fetchZuluTraders,Ct as findArbitrage,Ea as finnhub,va as firstClobTokenId,Ve as formatStructuredReport,Ra as formatTriggerType,fa as fromKalshiMarket,Ca as fromOpenBBBars,Ia as fromPmxtMarket,ba as gabagoolSource,La as generateDebateAnalysis,_a as generateDebateAnalysisWithOpenAI,Fa as getAccount,Ba as getAlpacaMCPClient,Da as getCachedMarkets,Oa as getCategories,Na as getD1HttpCredentials,It as getDomeKalshiMarketsByEvent,bt as getEvents,je as getFundamentals,Ua as getHistoricalQuotes,Xe as getIndicators,Lt as getKalshiMarketsByEvent,Ha as getLatestTradeTimestamp,Ka as getLeaders,Ga as getMarketById,Wa as getMarketDebate,za as getMarketHolders,Za as getMarketPositions,xa as getMarkets,wa as getMarketsByCategory,Ye as getNews,_t as getPolymarketMarkets,Qa as getPriceHistory,qa as getQuoteFromSource,Va as getQuotes,ja as getServiceHealth,Je as getStockData,Xa as getSyncStatusStats,Ya as getTradeHistorySyncProgress,Ja as getTradeSyncStatus,$a as getTraderPositions,as as getTraderTradeHistory,ss as getTraderTradeStats,es as getTraderTradesThroughCutoff,ts as getTradersNeedingSync,rs as getZuluTopByRank,os as getZuluTraderById,is as getZuluTraders,ls as greeksEnricher,ns as hedgeFundTechnicalsSource,cs as initialSurvivalState,Ft as isBlockRunModel,ds as isMarketBlocked,Bt as isRetryableError,us as isValidTokenId,Dt as kalshiMomentumSource,Ms as kalshiVibeGuard,ks as kalshiVibeSource,Ot as listBlockRunModels,gs as loadModel,ms as loadPolymarketWalletTrustInputs,ys as myLeadersAPI,Ts as normalizeBbRsiBreakoutConfig,$e as normalizeChartQuotes,ps as normalizeEmaCrossoverConfig,Nt as normalizeKalshiMomentumConfig,Ss as normalizeZuluTrader,hs as pageviews,As as parseClobTokenIds,at as parseFundManagerApproval,st as parseJudgeDecision,tr as partitionValidSignals,Ps as placeOrder,Ut as polyfactual,Ht as polymarketClob,Es as predictFuture,Kt as predictionMarketResearch,et as proposalId,vs as publishedMarketCondition,Rs as queryKeys,fs as rMultiplesFromResolvedPositions,Cs as readSpreadMomentum,Is as reconstructResolvedPositions,bs as redFlagsSource,Ls as refillMarkets,tt as renderStrategySignalsReport,_s as resumeTradeHistorySync,Gt as reviewPredictionMarketIntent,Wt as runBookmakerAgent,zt as runEventAnalysisAgent,Zt as runKalshiMomentumPaperAgent,xt as runKalshiMomentumPaperAgentWithResearch,wt as runMapperAgent,Qt as runPolyfactualResearch,qt as runPolymarketPositionTracker,Vt as runPolymarketPutOrder,jt as runPolymarketUpDown15LimitOrderBot,Xt as runX402Seller,Fs as saveCategories,Bs as saveDebate,Ds as saveHolders,Os as saveLeaderboardData,Ns as saveLeaders,Us as saveMarketPositions,Hs as saveMarkets,Ks as saveModel,Gs as savePositions,Ws as savePriceHistory,zs as saveTradeHistory,Zs as saveZuluCurrencyStats,xs as saveZuluTraders,ws as searchMarkets,Qs as searchMarketsInDB,qs as searchPublic,Yt as searchQueryGeneratorPrompt,Vs as searchZuluTraders,rt as selectProposal,js as settleResolvedPositions,Jt as sleep,Xs as splitTrainTest,Ys as stockAgentsAPI,Js as stockNames,$s as syncAll,ae as syncAllMarkets,se as syncCopyTradingLeadersOrders,ee as syncLeaderboard,te as syncLeadersAndCategories,re as syncMarketHolders,oe as syncMarkets,ie as syncMarketsIncremental,le as syncPriceHistory,ne as syncTopTradersTradeHistory,ce as syncTraderTradeHistory,de as syncZuluTraderDetails,ue as syncZuluTraders,Me as technicalAdx,ke as technicalAtr,ge as technicalBollinger,me as technicalEma,ye as technicalHurst,Te as technicalRsi,$t as toEquityOrder,ar as toExecutableCents,sr as toPredictionMarketIntent,ot as toStructuredReport,pe as toSurvivalPosture,Se as toTradeSignal,he as trainModels,Ae as trustScoreFromMoments,Pe as unifiedQuoteService,Ee as updateSurvivalState,ve as updateTradeSyncStatus,rr as validateAccount,Re as validateDebateAnalysis,or as validateLimits,ir as validatePosture,lr as validateSignal,fe as vibeBuyFailure,Ce as vibeKellyQuantity,er as x402,it as yahooFinance,lt as yahooFinanceWrapper,Ie as yfinance};
@@ -1,6 +1,33 @@
1
- export declare function fetchZuluTraders(): Promise<any>;
2
- export declare function fetchZuluTraderDetail(providerId: number): Promise<unknown>;
3
- export declare function saveZuluTraders(traders: any[]): Promise<void>;
1
+ import { zuluTraders } from '../db/schema';
2
+ /** Most traders one list sync saves (one D1 upsert each). */
3
+ export declare const MAX_ZULU_SYNC = 200;
4
+ export declare function fetchZuluTraders(): Promise<any[]>;
5
+ export declare function fetchZuluTraderDetail(providerId: number): Promise<any>;
6
+ export interface NormalizedZuluTrader {
7
+ row: typeof zuluTraders.$inferInsert & {
8
+ providerId: number;
9
+ };
10
+ currencyStats: any[];
11
+ }
12
+ /**
13
+ * Maps one ZuluTrade trader into a `zulu_traders` row. Accepts both shapes
14
+ * the gateway serves: a top-traders list element (`{ trader: {...} }`, with
15
+ * `timeframeStats` and `currencyStats` nested in `overallStats`) and a detail
16
+ * `trader.stats` object (with them as siblings of `overallStats`). Returns
17
+ * null for an element without a provider id or profile instead of throwing,
18
+ * so one malformed entry can't abort the whole sync.
19
+ */
20
+ export declare function normalizeZuluTrader(raw: any, now?: Date): NormalizedZuluTrader | null;
21
+ /**
22
+ * Upserts traders into `zulu_traders`, skipping malformed entries. Currency
23
+ * stats cost one query per instrument, so the bulk list sync turns them off
24
+ * to stay inside D1's per-invocation query limit.
25
+ *
26
+ * @returns how many traders were saved
27
+ */
28
+ export declare function saveZuluTraders(traders: any[], options?: {
29
+ currencyStats?: boolean;
30
+ }): Promise<number>;
4
31
  export declare function saveZuluCurrencyStats(providerId: number, stats: any[]): Promise<void>;
5
32
  export declare function getZuluTraders(limit?: number): Promise<{
6
33
  providerId: number;
@@ -158,8 +185,11 @@ export declare function searchZuluTraders(filters: any): Promise<{
158
185
  lastOpenTradeDate: Date | null;
159
186
  updatedAt: Date | null;
160
187
  }[]>;
161
- export declare function syncZuluTraders(): Promise<{
162
- traders: any;
188
+ export declare function syncZuluTraders(options?: {
189
+ limit?: number;
190
+ }): Promise<{
191
+ traders: number;
192
+ fetched: number;
163
193
  }>;
164
194
  export declare function syncZuluTraderDetails(providerIds: number[]): Promise<{
165
195
  details: number;
@@ -1 +1 @@
1
- {"version":3,"file":"zulu.d.ts","sourceRoot":"","sources":["../../src/leaders/zulu.ts"],"names":[],"mappings":"AAQA,wBAAsB,gBAAgB,iBAiBrC;AAED,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,oBAkB7D;AAMD,wBAAsB,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,iBAoGnD;AAED,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,iBAgC3E;AAMD,wBAAsB,cAAc,CAAC,KAAK,SAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM9C;AAED,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM;;;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;;;;;;;;;KAM9C;AAED,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkBzD;AAED,wBAAsB,gBAAgB,CAAC,KAAK,SAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOhD;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyBnD;AAMD,wBAAsB,eAAe,CAAC,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO;;;GAarE;AAED,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE;;GAkBhE"}
@@ -41,13 +41,29 @@ export interface JsonItemTick {
41
41
  askVolume?: number;
42
42
  bidVolume?: number;
43
43
  }
44
+ interface FetchRatesInput {
45
+ instrument: string;
46
+ from: Date;
47
+ to: Date;
48
+ timeframe: TimeframeType;
49
+ priceType: PriceType;
50
+ volumes: boolean;
51
+ format: FormatType;
52
+ }
53
+ /**
54
+ * Validate a request by hand instead of through dukascopy-node's
55
+ * `getHistoricalRates`, whose config check (fastest-validator) compiles its
56
+ * schema with `new Function`. Cloudflare Workers forbid code generation from
57
+ * strings, so that call throws in production before any data is fetched.
58
+ */
59
+ export declare function validateRatesInput(input: FetchRatesInput): void;
44
60
  /**
45
61
  * Fetch historical market data from Dukascopy
46
62
  * Supports forex, stocks, crypto, ETFs, indices, commodities, and bonds
47
63
  */
48
64
  export declare function getHistoricalData(config: DukascopyConfig): Promise<{
49
65
  success: boolean;
50
- data: import('dukascopy-node').Output;
66
+ data: any;
51
67
  error?: undefined;
52
68
  } | {
53
69
  success: boolean;
@@ -60,7 +76,7 @@ export declare function getHistoricalData(config: DukascopyConfig): Promise<{
60
76
  */
61
77
  export declare function getRealTimeData(config: RealTimeConfig): Promise<{
62
78
  success: boolean;
63
- data: import('dukascopy-node').ArrayItem[] & import('dukascopy-node').ArrayTickItem[] & import('dukascopy-node').JsonItem[] & import('dukascopy-node').JsonItemTick[] & string;
79
+ data: any;
64
80
  error?: undefined;
65
81
  } | {
66
82
  success: boolean;
@@ -99,4 +115,5 @@ export declare function searchInstruments(query: string): Instrument[];
99
115
  */
100
116
  export declare const getForexHistoricalData: typeof getHistoricalData;
101
117
  export declare const getForexRealTimeData: typeof getRealTimeData;
118
+ export {};
102
119
  //# sourceMappingURL=dukascopy-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dukascopy-client.d.ts","sourceRoot":"","sources":["../../src/live-data/dukascopy-client.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAGpC,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,UAAU,GACV,KAAK,GACL,aAAa,GACb,aAAa,GACb,OAAO,CAAC;AAEZ,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,CAAC;AACV,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,GAAG,CAAC;IAChB,KAAK,EAAE;QACL,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;QAC7B,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;KAC7B,CAAC;IACF,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,cAAc,CAAC;I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AC;AACxD,eAAO,MAAM,oBAAoB,wBAAkB,CAAC"}
@@ -26,6 +26,13 @@ interface DebateAnalysis {
26
26
  modelNoProbability: number;
27
27
  commentaryOnDiscrepancy: string;
28
28
  }
29
+ /**
30
+ * Checks the parsed model output. Required fields must be present. The model's own
31
+ * probabilities are optional, but when they are given they must be numbers in 0..1 and
32
+ * yes + no must add up to about 1, so a bad value is rejected instead of shown as the
33
+ * model's view.
34
+ */
35
+ export declare function validateDebateAnalysis(parsed: any): DebateAnalysis;
29
36
  export declare function generateDebateAnalysis(marketData: MarketData, apiKey?: string): Promise<DebateAnalysis>;
30
37
  export declare function generateDebateAnalysisWithOpenAI(marketData: MarketData, apiKey?: string): Promise<DebateAnalysis>;
31
38
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"debate-generator.d.ts","sourceRoot":"","sources":["../../src/llm/debate-generator.ts"],"names":[],"mappings":"AAGA,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,UAAU,cAAc;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AA2DD,UAAU,cAAc;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CA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,CAAC;IAC3B,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAyED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,GAAG,GAAG,cAAc,CAoBlE;AAqED,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC,CAmBzB;AAED,wBAAsB,gCAAgC,CACpD,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,cAAc,CAAC,CAIzB"}
@@ -0,0 +1,60 @@
1
+ import { ExcludedPosition, RMultipleExclusionReason } from './r-multiple';
2
+ import { SettledPosition } from './position-settlement';
3
+ import { ReconstructionSkip } from './position-reconstruction';
4
+ import { ForecasterTrustScore, ForecasterTrustScoreOptions } from './trust-score';
5
+ /** The database-shaped fields required by the pure wallet-history adapter. */
6
+ export interface StoredWalletTradeRow {
7
+ id: string;
8
+ traderId: string;
9
+ conditionId: string;
10
+ type: string;
11
+ side: string | null;
12
+ outcomeIndex: number | null;
13
+ size: number;
14
+ usdcSize: number;
15
+ /** Drizzle `integer(..., { mode: "timestamp" })` returns a Date. */
16
+ timestamp: Date;
17
+ }
18
+ export interface PolymarketWalletTrustOptions extends ForecasterTrustScoreOptions {
19
+ /** Passed to the existing R-multiple converter. Defaults to zero. */
20
+ minInitialRisk?: number;
21
+ }
22
+ export interface PolymarketWalletTrustInputs {
23
+ wallet: {
24
+ kind: "polymarket-proxy-wallet";
25
+ id: string;
26
+ };
27
+ /** Inclusive historical cutoff, in epoch seconds. */
28
+ cutoff: number;
29
+ /** Explicitly prevents this partial record from being presented as complete. */
30
+ coverage: {
31
+ basis: "sell-closed-only";
32
+ historyCompleteness: "unknown";
33
+ resolutionEvidence: "none";
34
+ };
35
+ /** SELL-closed and unresolved residual episodes produced by settlement. */
36
+ positions: SettledPosition[];
37
+ /** Rows/groups rejected by conservative reconstruction validation. */
38
+ reconstructionSkips: ReconstructionSkip[];
39
+ /** Finite R-multiples from SELL-closed positions only. */
40
+ rMultiples: number[];
41
+ includedPositions: number;
42
+ rMultipleExclusions: ExcludedPosition[];
43
+ rMultipleExclusionCounts: Record<RMultipleExclusionReason, number>;
44
+ trust: ForecasterTrustScore;
45
+ }
46
+ /**
47
+ * Purely converts stored wallet rows into R-multiples and a TRUST result.
48
+ *
49
+ * Raw rows are cutoff-filtered before settlement. A valid future row therefore
50
+ * cannot close, oversell, or poison an episode as it existed at the cutoff.
51
+ * Invalid numeric fields are passed through unchanged and are conservatively
52
+ * reported by settlement; this adapter never coerces them to zero.
53
+ */
54
+ export declare function buildPolymarketWalletTrustInputs(walletId: string, cutoff: number, rows: readonly StoredWalletTradeRow[], options?: PolymarketWalletTrustOptions): PolymarketWalletTrustInputs;
55
+ /**
56
+ * Loads all locally stored TRADE rows for a wallet through `cutoff`, then runs
57
+ * the pure SELL-closed-only adapter. Local-table completeness remains unknown.
58
+ */
59
+ export declare function loadPolymarketWalletTrustInputs(walletId: string, cutoff: number, options?: PolymarketWalletTrustOptions): Promise<PolymarketWalletTrustInputs>;
60
+ //# sourceMappingURL=polymarket-wallet-trust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polymarket-wallet-trust.d.ts","sourceRoot":"","sources":["../../../src/prediction/analysis/polymarket-wallet-trust.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EACjC,MAAM,eAAe,CAAC;AAEvB,8EAA8E;AAC9E,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,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EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,2BAA2B,CAAC,CAQtC"}
@@ -0,0 +1,130 @@
1
+ import { ResolvedPosition } from './r-multiple';
2
+ /**
3
+ * The subset of a `polymarket_trade_history` row this reconstruction needs.
4
+ * Mirrors the persisted columns (see `db/schema.ts` `polymarketTradeHistory`).
5
+ */
6
+ export interface StoredTrade {
7
+ /** Trader wallet address (`trader_id`). */
8
+ traderId: string;
9
+ /** Market condition id (`condition_id`). */
10
+ conditionId: string;
11
+ /** Activity type; only `"TRADE"` rows are reconstructed. */
12
+ type: string;
13
+ /** `"BUY"` or `"SELL"` for a TRADE; other values are treated as missing. */
14
+ side: string | null;
15
+ /** Outcome leg (0 or 1). */
16
+ outcomeIndex: number | null;
17
+ /** Number of shares/tokens in the fill (must be finite and > 0). */
18
+ size: number;
19
+ /** USDC cash moved by the fill (must be finite and >= 0). */
20
+ usdcSize: number;
21
+ /** Trade execution time, epoch seconds (must be finite). */
22
+ timestamp: number;
23
+ /**
24
+ * Optional stable row id (the `transaction_hash-outcomeIndex` primary key).
25
+ * Not used for ordering; carried only to make skip reports traceable.
26
+ */
27
+ id?: string;
28
+ }
29
+ /** Why a row or group could not be reconstructed into a resolved position. */
30
+ export type ReconstructionSkipReason =
31
+ /** Row `type` is not `"TRADE"` (e.g. REDEEM/SPLIT/MERGE); not a bet fill. */
32
+ "non-trade-type"
33
+ /**
34
+ * A required field was missing or non-finite.
35
+ *
36
+ * For a row whose grouping key is itself usable, the WHOLE group is skipped —
37
+ * including any episodes in that group that had already cleanly opened and
38
+ * closed. This is deliberately more aggressive than the oversell policy, and
39
+ * the reason is that a malformed row is dropped BEFORE its timeline position
40
+ * is recorded, so its true place among the group's fills is unknown. An
41
+ * episode that looks "earlier" among the remaining valid fills might actually
42
+ * have had the malformed fill interleaved inside it, so no episode in the
43
+ * group can be proven to precede the bad row. Discarding the whole group never
44
+ * emits a misleading value; it only drops data we cannot place with certainty.
45
+ * (Contrast `oversold`, whose offending SELL has a known timestamp, so
46
+ * independently completed earlier episodes are retained.)
47
+ *
48
+ * For a row whose grouping key is unusable the single row is skipped (and may
49
+ * silently under-count its group — undetectable here).
50
+ */
51
+ | "missing-fields"
52
+ /**
53
+ * A SELL arrived in an episode that had no recorded BUY inventory. Detected at
54
+ * a known point in the ordered fills, so any independently completed earlier
55
+ * episodes in the same group are retained.
56
+ */
57
+ | "no-buys"
58
+ /**
59
+ * A SELL exceeded the inventory tracked so far (missing earlier BUYs).
60
+ * Detected at a known point in the ordered fills, so any independently
61
+ * completed earlier episodes in the same group are retained; only this
62
+ * episode onward is abandoned.
63
+ */
64
+ | "oversold";
65
+ /** One skipped row or group, with the reason and a traceable key. */
66
+ export interface ReconstructionSkip {
67
+ /**
68
+ * Group key `traderId:conditionId:outcomeIndex` for group-level skips, or a
69
+ * row locator (`row <id>` / `row #<index>`) for row-level skips.
70
+ */
71
+ key: string;
72
+ reason: ReconstructionSkipReason;
73
+ }
74
+ /** Result of {@link reconstructResolvedPositions}. */
75
+ export interface ReconstructionResult {
76
+ /**
77
+ * Reconstructed positions in deterministic order (grouped, then by episode).
78
+ * Fully SELL-closed episodes have `resolved: true`; a group's trailing
79
+ * residual inventory is emitted once with `resolved: false`. Ready to pass to
80
+ * `rMultiplesFromResolvedPositions`.
81
+ */
82
+ positions: ResolvedPosition[];
83
+ /** Every skipped row/group, in the order encountered. */
84
+ skipped: ReconstructionSkip[];
85
+ }
86
+ /** Options for {@link reconstructResolvedPositions}. */
87
+ export interface ReconstructionOptions {
88
+ /**
89
+ * Absolute tolerance, in shares, for treating residual inventory as flat.
90
+ * Used ONLY to absorb floating-point dust from summing `size`:
91
+ * - `|inventory| <= sharesEpsilon` -> treated as exactly flat (episode closes),
92
+ * - `inventory < -sharesEpsilon` -> oversell,
93
+ * - `inventory > sharesEpsilon` -> material open inventory (stays unresolved).
94
+ * It never rounds away a material mismatch: anything above the epsilon is
95
+ * real inventory, not dust. Defaults to `1e-9`. Must be finite and >= 0.
96
+ *
97
+ * CAUTION: this is a dust tolerance, not a rounding knob. It is validated only
98
+ * as finite and non-negative — there is no universal upper bound, because the
99
+ * meaningful share scale varies by market. A caller that passes an excessively
100
+ * large value (e.g. tens or hundreds of shares) WILL cause genuinely material
101
+ * residual inventory to be classified as flat, emitting a bogus `resolved`
102
+ * position (and masking a real oversell). Keep it at or near the default;
103
+ * raise it only by an amount provably within float-summation error.
104
+ */
105
+ sharesEpsilon?: number;
106
+ }
107
+ /** Default dust tolerance for the flat/oversell inventory test. */
108
+ export declare const DEFAULT_SHARES_EPSILON = 1e-9;
109
+ /**
110
+ * Reconstructs completed Polymarket positions from stored TRADE rows.
111
+ *
112
+ * Fills are grouped by `(traderId, conditionId, outcomeIndex)` and, within a
113
+ * group, sorted by `timestamp` ascending. TIE-BREAK: fills sharing a timestamp
114
+ * keep their original input order (a stable sort). Because Polymarket
115
+ * timestamps are second-granularity, several fills in the same second have an
116
+ * ambiguous true execution order; this function does not attempt to recover it,
117
+ * so for same-second fills the episode split (and any oversell classification)
118
+ * depends on the order the caller supplied. Pass rows in a consistent order
119
+ * (e.g. the DB's `ORDER BY timestamp, id`) for reproducible results; the
120
+ * function is otherwise fully deterministic and does not read the clock.
121
+ *
122
+ * @param trades - Stored trade rows (a superset of TRADE rows is fine; non-TRADE
123
+ * rows are reported as `non-trade-type` skips and ignored).
124
+ * @param options - See {@link ReconstructionOptions}.
125
+ * @returns A {@link ReconstructionResult}.
126
+ * @throws {TypeError} If `trades` is not an array.
127
+ * @throws {RangeError} If `sharesEpsilon` is supplied and is not finite / is negative.
128
+ */
129
+ export declare function reconstructResolvedPositions(trades: readonly StoredTrade[], options?: ReconstructionOptions): ReconstructionResult;
130
+ //# sourceMappingURL=position-reconstruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-reconstruction.d.ts","sourceRoot":"","sources":["../../../src/prediction/analysis/position-reconstruction.ts"],"names":[],"mappings":"AAAA;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;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAkKtB"}
@@ -0,0 +1,99 @@
1
+ import { ResolvedPosition } from './r-multiple';
2
+ import { ReconstructionSkip, StoredTrade } from './position-reconstruction';
3
+ /**
4
+ * An explicit, point-in-time market resolution label for one condition. Supplied
5
+ * by the (impure) caller; this module never derives it from market state.
6
+ */
7
+ export interface MarketResolution {
8
+ /**
9
+ * Index of the outcome leg that resolved true. This is a BINARY-market
10
+ * converter, so only `0` or `1` is accepted; any other value (a sentinel,
11
+ * a multi-outcome index, a garbage label) is rejected and the affected
12
+ * position is left unresolved rather than settled or marked a false loss.
13
+ */
14
+ winningOutcomeIndex: number;
15
+ /**
16
+ * Epoch seconds at which the market resolved (the settlement instant). Must be
17
+ * at or after every fill of the settled episode — a market cannot resolve
18
+ * before its last contributing trade. A `resolvedAt` earlier than that leaves
19
+ * the position unresolved (never settled with an impossible, look-ahead time).
20
+ */
21
+ resolvedAt: number;
22
+ }
23
+ /** How a {@link SettledPosition} reached its final state. */
24
+ export type PositionClosure = "sell-close" | "settlement" | "open";
25
+ /**
26
+ * A reconstructed position, tagged with how it closed. Adds fields to
27
+ * {@link ResolvedPosition} (so it remains assignable to it and usable directly
28
+ * with `rMultiplesFromResolvedPositions`) without changing that contract.
29
+ */
30
+ export interface SettledPosition extends ResolvedPosition {
31
+ /** Whether this was SELL-closed, settled at resolution, or still open. */
32
+ closure: PositionClosure;
33
+ /**
34
+ * Residual shares at resolution — present for `"settlement"` and `"open"`
35
+ * positions, `undefined` for `"sell-close"` (which returned to flat).
36
+ */
37
+ residualShares?: number;
38
+ }
39
+ /** Result of {@link settleResolvedPositions}. */
40
+ export interface SettlementResult {
41
+ /**
42
+ * Positions in deterministic order (grouped, then by episode). Pass directly
43
+ * to `rMultiplesFromResolvedPositions`; `"open"` entries are excluded there
44
+ * as `unresolved`.
45
+ */
46
+ positions: SettledPosition[];
47
+ /** Skipped rows/groups, mirroring reconstruction's reasons. */
48
+ skipped: ReconstructionSkip[];
49
+ }
50
+ /** A resolution lookup keyed by `conditionId`. */
51
+ export type ResolutionMap = ReadonlyMap<string, MarketResolution>;
52
+ /** Options for {@link settleResolvedPositions}. */
53
+ export interface SettlementOptions {
54
+ /**
55
+ * Dust tolerance in shares for the flat/oversell inventory test. Identical in
56
+ * meaning to reconstruction's option: see its docs for the caution that an
57
+ * excessively large value misclassifies material inventory. Defaults to
58
+ * {@link DEFAULT_SHARES_EPSILON}. Must be finite and >= 0.
59
+ */
60
+ sharesEpsilon?: number;
61
+ }
62
+ /**
63
+ * Reconstructs Polymarket positions from stored TRADE fills and settles residual
64
+ * inventory against explicit resolution labels.
65
+ *
66
+ * Fills are grouped by `(traderId, conditionId, outcomeIndex)` and sorted by
67
+ * `timestamp` (stable; equal timestamps keep input order — see
68
+ * {@link reconstructResolvedPositions} for the same tie-break caveat). SELL-
69
+ * closed episodes are emitted as `"sell-close"`. A group's trailing residual
70
+ * inventory is settled as `"settlement"` only when `resolutions` has a label for
71
+ * its `conditionId` that is both (a) a valid BINARY label — `winningOutcomeIndex`
72
+ * exactly 0 or 1, finite `resolvedAt` — and (b) temporally consistent —
73
+ * `resolvedAt` at or after the latest fill of that episode. Otherwise the
74
+ * residual is left `"open"` (unresolved); an unsupported index or an impossible
75
+ * early `resolvedAt` never produces a resolved position or a fabricated $0 loss.
76
+ * A fill whose `outcomeIndex` is not 0 or 1 is rejected as an invalid row
77
+ * (`missing-fields`), not silently grouped. A position is ever only one of these
78
+ * — a closed episode or the trailing residual — so it is never both SELL-closed
79
+ * and settlement-resolved.
80
+ *
81
+ * DE-DUPLICATION: fills are de-duplicated by the verified trade identity — the
82
+ * `id` field, which is the `polymarket_trade_history` primary key
83
+ * `transaction_hash-outcomeIndex`. Two rows sharing a non-empty `id` denote the
84
+ * SAME on-chain fill (the DB enforces uniqueness on it), so only the first is
85
+ * counted and later copies are dropped. Rows WITHOUT an `id` cannot be
86
+ * identified as duplicates and are each counted; de-duplicating those is a
87
+ * caller precondition.
88
+ *
89
+ * @param trades - Stored trade rows (non-TRADE rows are reported as
90
+ * `non-trade-type` skips and ignored).
91
+ * @param resolutions - Resolution labels keyed by `conditionId`. An empty map
92
+ * (or a missing/invalid entry) leaves the affected residual positions open.
93
+ * @param options - See {@link SettlementOptions}.
94
+ * @returns A {@link SettlementResult}.
95
+ * @throws {TypeError} If `trades` is not an array or `resolutions` is not a Map.
96
+ * @throws {RangeError} If `sharesEpsilon` is supplied and is not finite / is negative.
97
+ */
98
+ export declare function settleResolvedPositions(trades: readonly StoredTrade[], resolutions: ResolutionMap, options?: SettlementOptions): SettlementResult;
99
+ //# sourceMappingURL=position-settlement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-settlement.d.ts","sourceRoot":"","sources":["../../../src/prediction/analysis/position-settlement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,6DAA6D;AAC7D,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,0EAA0E;IAC1E,OAAO,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,+DAA+D;IAC/D,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,kDAAkD;AAClD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAElE,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAkDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,WAAW,EAAE,aAAa,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,gBAAgB,CA0LlB"}