investing 0.1.310 → 0.1.312
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 +123 -167
- package/dist/{archiver-web.es-C5dgnXMM.js → archiver-web.es-B69gABHP.js} +1 -1
- package/dist/{archiver-web.es-DLoy_R54.cjs → archiver-web.es-fg4bLLZa.cjs} +1 -1
- package/dist/bookmakerAnalysis-Bfo1zUVm.js +1 -0
- package/dist/bookmakerAnalysis-CHn1W8uX.cjs +1 -0
- package/dist/callGrok-D0D7zBHK.js +1 -0
- package/dist/callGrok-DWO719mN.cjs +1 -0
- package/dist/db/index.d.ts +0 -189
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/schema.d.ts +0 -200
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/events-BJOyGWeU.cjs +1 -0
- package/dist/events-OvBb8rgy.js +1 -0
- package/dist/index-D7fsk2gy.js +15 -0
- package/dist/index-_V1Ql5Es.cjs +13 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/leaders/zulu.d.ts +5 -35
- package/dist/leaders/zulu.d.ts.map +1 -1
- package/dist/live-data/dukascopy-client.d.ts +2 -19
- package/dist/live-data/dukascopy-client.d.ts.map +1 -1
- package/dist/llm/debate-generator.d.ts +0 -7
- package/dist/llm/debate-generator.d.ts.map +1 -1
- package/dist/polymarket-updown-15-limit-order-bot-DCC8HE9Z.cjs +1 -0
- package/dist/polymarket-updown-15-limit-order-bot-Dv5oGAF4.js +1 -0
- package/dist/prediction/api/analytics.d.ts.map +1 -1
- package/dist/prediction/api/leaderboard.d.ts +11 -29
- package/dist/prediction/api/leaderboard.d.ts.map +1 -1
- package/dist/prediction/api/markets.d.ts.map +1 -1
- package/dist/prediction/api/prices.d.ts.map +1 -1
- package/dist/prediction/db/markets.d.ts +0 -13
- package/dist/prediction/db/markets.d.ts.map +1 -1
- package/dist/prediction/db/trade-history.d.ts +0 -35
- package/dist/prediction/db/trade-history.d.ts.map +1 -1
- package/dist/prediction/index.d.ts +0 -7
- package/dist/prediction/index.d.ts.map +1 -1
- package/dist/prediction/sync/incremental-markets.d.ts.map +1 -1
- package/dist/prediction/sync/leaderboard.d.ts +1 -1
- package/dist/prediction/sync/leaderboard.d.ts.map +1 -1
- package/dist/prediction/sync/markets.d.ts +2 -2
- package/dist/prediction/sync/markets.d.ts.map +1 -1
- package/dist/prediction/sync/orchestration.d.ts +1 -1
- package/dist/prediction/sync/trade-history.d.ts.map +1 -1
- package/dist/predictos/agents/bookmaker-agent.d.ts.map +1 -0
- package/dist/predictos/agents/event-analysis-agent.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/agents/index.d.ts +1 -5
- package/dist/predictos/agents/index.d.ts.map +1 -0
- package/dist/predictos/agents/index.js +1 -0
- package/dist/predictos/agents/index.mjs +1 -0
- package/dist/predictos/agents/mapper-agent.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/agents/polyfactual-research.d.ts +1 -1
- package/dist/predictos/agents/polyfactual-research.d.ts.map +1 -0
- package/dist/predictos/agents/polymarket-position-tracker.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/agents/polymarket-put-order.d.ts +1 -1
- package/dist/predictos/agents/polymarket-put-order.d.ts.map +1 -0
- package/dist/predictos/agents/polymarket-updown-15-limit-order-bot.d.ts.map +1 -0
- package/dist/predictos/agents/x402-seller.d.ts.map +1 -0
- package/dist/predictos/ai/callBlockRun.d.ts.map +1 -0
- package/dist/predictos/ai/callGrok.d.ts.map +1 -0
- package/dist/predictos/ai/callOpenAI.d.ts.map +1 -0
- package/dist/predictos/ai/http.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/ai/index.d.ts +1 -1
- package/dist/predictos/ai/index.d.ts.map +1 -0
- package/dist/predictos/ai/index.js +1 -0
- package/dist/predictos/ai/index.mjs +1 -0
- package/dist/predictos/ai/prompts/analyzeEventMarkets.d.ts.map +1 -0
- package/dist/predictos/ai/prompts/arbitrageAnalysis.d.ts.map +1 -0
- package/dist/predictos/ai/prompts/bookmakerAnalysis.d.ts.map +1 -0
- package/dist/predictos/ai/prompts/searchQueryGenerator.d.ts.map +1 -0
- package/dist/predictos/ai/types.d.ts.map +1 -0
- package/dist/predictos/arbitrage.d.ts.map +1 -0
- package/dist/predictos/arbitrage.js +1 -0
- package/dist/predictos/arbitrage.mjs +1 -0
- package/dist/{prediction-markets → predictos}/clients/polyfactual.d.ts +1 -1
- package/dist/predictos/clients/polyfactual.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/clients/polymarket.d.ts +1 -1
- package/dist/predictos/clients/polymarket.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/clients/x402.d.ts +1 -1
- package/dist/predictos/clients/x402.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/data/kalshi.d.ts +1 -1
- package/dist/predictos/data/kalshi.d.ts.map +1 -0
- package/dist/predictos/data/kalshi.js +1 -0
- package/dist/predictos/data/kalshi.mjs +1 -0
- package/dist/{prediction-markets → predictos}/data/polymarket.d.ts +1 -1
- package/dist/predictos/data/polymarket.d.ts.map +1 -0
- package/dist/predictos/data/polymarket.js +1 -0
- package/dist/predictos/data/polymarket.mjs +1 -0
- package/dist/predictos/events.d.ts.map +1 -0
- package/dist/{prediction-markets → predictos}/index.d.ts +5 -8
- package/dist/predictos/index.d.ts.map +1 -0
- package/dist/predictos/index.js +1 -0
- package/dist/predictos/index.mjs +1 -0
- package/dist/{prediction-markets → predictos}/types.d.ts +6 -121
- package/dist/predictos/types.d.ts.map +1 -0
- package/dist/searchQueryGenerator-DIIs9xw5.js +1 -0
- package/dist/searchQueryGenerator-rCVblXJS.cjs +1 -0
- package/dist/stocks/index.d.ts +1 -2
- package/dist/stocks/index.d.ts.map +1 -1
- package/dist/stocks/quote-cache-service.d.ts +2 -11
- package/dist/stocks/quote-cache-service.d.ts.map +1 -1
- package/dist/stocks/unified-quote-service.d.ts +6 -15
- package/dist/stocks/unified-quote-service.d.ts.map +1 -1
- package/dist/stocks/yahoo-finance-wrapper.d.ts +6 -75
- package/dist/stocks/yahoo-finance-wrapper.d.ts.map +1 -1
- package/dist/trading-agents/agents/debate-facilitator.d.ts +3 -3
- package/dist/trading-agents/agents/debate-facilitator.d.ts.map +1 -1
- package/dist/trading-agents/agents/fund-manager.d.ts +2 -4
- package/dist/trading-agents/agents/fund-manager.d.ts.map +1 -1
- package/dist/trading-agents/agents/improved-researchers.d.ts +3 -3
- package/dist/trading-agents/agents/improved-researchers.d.ts.map +1 -1
- package/dist/trading-agents/agents/market-analyst.d.ts +2 -2
- package/dist/trading-agents/agents/market-analyst.d.ts.map +1 -1
- package/dist/trading-agents/agents/news-analyst.d.ts +2 -2
- package/dist/trading-agents/agents/news-analyst.d.ts.map +1 -1
- package/dist/trading-agents/agents/researchers.d.ts +4 -4
- package/dist/trading-agents/agents/researchers.d.ts.map +1 -1
- package/dist/trading-agents/agents/risk-team.d.ts +4 -4
- package/dist/trading-agents/agents/risk-team.d.ts.map +1 -1
- package/dist/trading-agents/agents/trader.d.ts +2 -2
- package/dist/trading-agents/agents/trader.d.ts.map +1 -1
- package/dist/trading-agents/graph/trading-graph.d.ts +2 -28
- package/dist/trading-agents/graph/trading-graph.d.ts.map +1 -1
- package/dist/trading-agents/index.d.ts +0 -4
- package/dist/trading-agents/index.d.ts.map +1 -1
- package/dist/trading-agents/types/index.d.ts +4 -27
- package/dist/trading-agents/types/index.d.ts.map +1 -1
- package/dist/trading-agents/utils/llm-client.d.ts +1 -4
- package/dist/trading-agents/utils/llm-client.d.ts.map +1 -1
- package/package.json +50 -21
- package/THIRD_PARTY_NOTICES.md +0 -144
- package/dist/index-6F5HGB0V.js +0 -15
- package/dist/index-kfghRBr2.cjs +0 -13
- package/dist/prediction/analysis/polymarket-wallet-trust.d.ts +0 -60
- package/dist/prediction/analysis/polymarket-wallet-trust.d.ts.map +0 -1
- package/dist/prediction/analysis/position-reconstruction.d.ts +0 -130
- package/dist/prediction/analysis/position-reconstruction.d.ts.map +0 -1
- package/dist/prediction/analysis/position-settlement.d.ts +0 -99
- package/dist/prediction/analysis/position-settlement.d.ts.map +0 -1
- package/dist/prediction/analysis/r-multiple.d.ts +0 -159
- package/dist/prediction/analysis/r-multiple.d.ts.map +0 -1
- package/dist/prediction/analysis/trust-score.d.ts +0 -158
- package/dist/prediction/analysis/trust-score.d.ts.map +0 -1
- package/dist/prediction/sync/refill-limits.d.ts +0 -9
- package/dist/prediction/sync/refill-limits.d.ts.map +0 -1
- package/dist/prediction/sync/refill.d.ts +0 -34
- package/dist/prediction/sync/refill.d.ts.map +0 -1
- package/dist/prediction/utils/token-ids.d.ts +0 -17
- package/dist/prediction/utils/token-ids.d.ts.map +0 -1
- package/dist/prediction-markets/adapters/trading-agents.d.ts +0 -21
- package/dist/prediction-markets/adapters/trading-agents.d.ts.map +0 -1
- package/dist/prediction-markets/agents/bookmaker-agent.d.ts.map +0 -1
- package/dist/prediction-markets/agents/event-analysis-agent.d.ts.map +0 -1
- package/dist/prediction-markets/agents/index.d.ts.map +0 -1
- package/dist/prediction-markets/agents/kalshi-momentum-agent.d.ts +0 -7
- package/dist/prediction-markets/agents/kalshi-momentum-agent.d.ts.map +0 -1
- package/dist/prediction-markets/agents/mapper-agent.d.ts.map +0 -1
- package/dist/prediction-markets/agents/polyfactual-research.d.ts.map +0 -1
- package/dist/prediction-markets/agents/polymarket-position-tracker.d.ts.map +0 -1
- package/dist/prediction-markets/agents/polymarket-put-order.d.ts.map +0 -1
- package/dist/prediction-markets/agents/polymarket-updown-15-limit-order-bot.d.ts.map +0 -1
- package/dist/prediction-markets/agents/x402-seller.d.ts.map +0 -1
- package/dist/prediction-markets/ai/callBlockRun.d.ts.map +0 -1
- package/dist/prediction-markets/ai/callGrok.d.ts.map +0 -1
- package/dist/prediction-markets/ai/callOpenAI.d.ts.map +0 -1
- package/dist/prediction-markets/ai/http.d.ts.map +0 -1
- package/dist/prediction-markets/ai/index.d.ts.map +0 -1
- package/dist/prediction-markets/ai/prompts/analyzeEventMarkets.d.ts.map +0 -1
- package/dist/prediction-markets/ai/prompts/arbitrageAnalysis.d.ts.map +0 -1
- package/dist/prediction-markets/ai/prompts/bookmakerAnalysis.d.ts.map +0 -1
- package/dist/prediction-markets/ai/prompts/searchQueryGenerator.d.ts.map +0 -1
- package/dist/prediction-markets/ai/types.d.ts.map +0 -1
- package/dist/prediction-markets/arbitrage.d.ts.map +0 -1
- package/dist/prediction-markets/clients/polyfactual.d.ts.map +0 -1
- package/dist/prediction-markets/clients/polymarket.d.ts.map +0 -1
- package/dist/prediction-markets/clients/x402.d.ts.map +0 -1
- package/dist/prediction-markets/data/kalshi.d.ts.map +0 -1
- package/dist/prediction-markets/data/polymarket.d.ts.map +0 -1
- package/dist/prediction-markets/events.d.ts.map +0 -1
- package/dist/prediction-markets/execution/paper.d.ts +0 -19
- package/dist/prediction-markets/execution/paper.d.ts.map +0 -1
- package/dist/prediction-markets/index.cjs +0 -1
- package/dist/prediction-markets/index.d.ts.map +0 -1
- package/dist/prediction-markets/index.mjs +0 -1
- package/dist/prediction-markets/kalshi-momentum.LICENSE +0 -21
- package/dist/prediction-markets/strategies/btc15m-fusion.d.ts +0 -27
- package/dist/prediction-markets/strategies/btc15m-fusion.d.ts.map +0 -1
- package/dist/prediction-markets/strategies/copy-trade-sizing.d.ts +0 -27
- package/dist/prediction-markets/strategies/copy-trade-sizing.d.ts.map +0 -1
- package/dist/prediction-markets/strategies/gabagool.d.ts +0 -26
- package/dist/prediction-markets/strategies/gabagool.d.ts.map +0 -1
- package/dist/prediction-markets/strategies/kalshi-momentum.d.ts +0 -13
- package/dist/prediction-markets/strategies/kalshi-momentum.d.ts.map +0 -1
- package/dist/prediction-markets/types.d.ts.map +0 -1
- package/dist/prediction-markets/validation.d.ts +0 -5
- package/dist/prediction-markets/validation.d.ts.map +0 -1
- package/dist/scripted-llm-B-UTs08L.js +0 -1
- package/dist/scripted-llm-CmDVkhyH.cjs +0 -1
- package/dist/stocks/strategies/bb-rsi-breakout.d.ts +0 -63
- package/dist/stocks/strategies/bb-rsi-breakout.d.ts.map +0 -1
- package/dist/stocks/strategies/ema-crossover.d.ts +0 -51
- package/dist/stocks/strategies/ema-crossover.d.ts.map +0 -1
- package/dist/strategy-signals/data/fixture-data-provider.d.ts +0 -8
- package/dist/strategy-signals/data/fixture-data-provider.d.ts.map +0 -1
- package/dist/strategy-signals/data/openbb-mapping.d.ts +0 -7
- package/dist/strategy-signals/data/openbb-mapping.d.ts.map +0 -1
- package/dist/strategy-signals/demo.d.ts +0 -446
- package/dist/strategy-signals/demo.d.ts.map +0 -1
- package/dist/strategy-signals/execution.d.ts +0 -18
- package/dist/strategy-signals/execution.d.ts.map +0 -1
- package/dist/strategy-signals/fixtures/openbb-data/bars.d.ts +0 -10
- package/dist/strategy-signals/fixtures/openbb-data/bars.d.ts.map +0 -1
- package/dist/strategy-signals/index.d.ts +0 -36
- package/dist/strategy-signals/index.d.ts.map +0 -1
- package/dist/strategy-signals/indicators/spread-aware-momentum.d.ts +0 -31
- package/dist/strategy-signals/indicators/spread-aware-momentum.d.ts.map +0 -1
- package/dist/strategy-signals/proposal.d.ts +0 -10
- package/dist/strategy-signals/proposal.d.ts.map +0 -1
- package/dist/strategy-signals/report.d.ts +0 -6
- package/dist/strategy-signals/report.d.ts.map +0 -1
- package/dist/strategy-signals/risk-gate.d.ts +0 -3
- package/dist/strategy-signals/risk-gate.d.ts.map +0 -1
- package/dist/strategy-signals/sources/btc15m-fusion.d.ts +0 -16
- package/dist/strategy-signals/sources/btc15m-fusion.d.ts.map +0 -1
- package/dist/strategy-signals/sources/copy-trade-sizing.d.ts +0 -15
- package/dist/strategy-signals/sources/copy-trade-sizing.d.ts.map +0 -1
- package/dist/strategy-signals/sources/gabagool.d.ts +0 -12
- package/dist/strategy-signals/sources/gabagool.d.ts.map +0 -1
- package/dist/strategy-signals/sources/hedge-fund-technicals.d.ts +0 -42
- package/dist/strategy-signals/sources/hedge-fund-technicals.d.ts.map +0 -1
- package/dist/strategy-signals/sources/kalshi-momentum.d.ts +0 -10
- package/dist/strategy-signals/sources/kalshi-momentum.d.ts.map +0 -1
- package/dist/strategy-signals/sources/kalshi-vibe-guards.d.ts +0 -15
- package/dist/strategy-signals/sources/kalshi-vibe-guards.d.ts.map +0 -1
- package/dist/strategy-signals/sources/kalshi-vibe.d.ts +0 -11
- package/dist/strategy-signals/sources/kalshi-vibe.d.ts.map +0 -1
- package/dist/strategy-signals/sources/red-flags.d.ts +0 -13
- package/dist/strategy-signals/sources/red-flags.d.ts.map +0 -1
- package/dist/strategy-signals/sources/spread-aware-momentum.d.ts +0 -11
- package/dist/strategy-signals/sources/spread-aware-momentum.d.ts.map +0 -1
- package/dist/strategy-signals/survival-posture.d.ts +0 -13
- package/dist/strategy-signals/survival-posture.d.ts.map +0 -1
- package/dist/strategy-signals/types.d.ts +0 -138
- package/dist/strategy-signals/types.d.ts.map +0 -1
- package/dist/strategy-signals/validate.d.ts +0 -15
- package/dist/strategy-signals/validate.d.ts.map +0 -1
- package/dist/strategy-signals/venues/kalshi-venue-mapping.d.ts +0 -3
- package/dist/strategy-signals/venues/kalshi-venue-mapping.d.ts.map +0 -1
- package/dist/strategy-signals/venues/mock-equity-broker.d.ts +0 -16
- package/dist/strategy-signals/venues/mock-equity-broker.d.ts.map +0 -1
- package/dist/strategy-signals/venues/mock-venue.d.ts +0 -14
- package/dist/strategy-signals/venues/mock-venue.d.ts.map +0 -1
- package/dist/strategy-signals/venues/pmxt-venue-mapping.d.ts +0 -7
- package/dist/strategy-signals/venues/pmxt-venue-mapping.d.ts.map +0 -1
- package/dist/trading-agents/agents/risk-judge.d.ts +0 -13
- package/dist/trading-agents/agents/risk-judge.d.ts.map +0 -1
- package/dist/trading-agents/index.cjs +0 -1
- package/dist/trading-agents/index.mjs +0 -1
- package/dist/trading-agents/utils/parse-final-line.d.ts +0 -7
- package/dist/trading-agents/utils/parse-final-line.d.ts.map +0 -1
- package/dist/trading-agents/utils/scripted-llm.d.ts +0 -17
- package/dist/trading-agents/utils/scripted-llm.d.ts.map +0 -1
- package/dist/trading-agents/utils/strategy-prompt.d.ts +0 -6
- package/dist/trading-agents/utils/strategy-prompt.d.ts.map +0 -1
- package/dist/trading-agents-Bh9OORHe.js +0 -1
- package/dist/trading-agents-C8M7tbB0.cjs +0 -1
- package/dist/validate-C1MS8RhG.js +0 -1
- package/dist/validate-DBxPUXqH.cjs +0 -1
- /package/dist/{prediction-markets → predictos}/agents/bookmaker-agent.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/agents/event-analysis-agent.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/agents/mapper-agent.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/agents/polymarket-position-tracker.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/agents/polymarket-updown-15-limit-order-bot.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/agents/x402-seller.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/callBlockRun.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/callGrok.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/callOpenAI.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/http.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/prompts/analyzeEventMarkets.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/prompts/arbitrageAnalysis.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/prompts/bookmakerAnalysis.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/prompts/searchQueryGenerator.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/ai/types.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/arbitrage.d.ts +0 -0
- /package/dist/{prediction-markets → predictos}/events.d.ts +0 -0
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shared domain types for the PredictOS core pipeline.
|
|
3
|
+
*
|
|
4
|
+
* Consolidated from the per-function `types.ts` files of the original
|
|
5
|
+
* PredictOS Supabase edge functions.
|
|
6
|
+
*/
|
|
2
7
|
/**
|
|
3
8
|
* API credentials for the AI providers used by the analysis agents.
|
|
4
9
|
*
|
|
@@ -35,126 +40,6 @@ export type UrlSource = "kalshi" | "polymarket" | "jupiter";
|
|
|
35
40
|
export type DataProvider = "dome" | "dflow" | "gamma";
|
|
36
41
|
/** Tool types available for Grok models. */
|
|
37
42
|
export type GrokTool = "x_search" | "web_search";
|
|
38
|
-
/** A binary prediction-market outcome. */
|
|
39
|
-
export type PredictionMarketOutcome = "YES" | "NO";
|
|
40
|
-
/**
|
|
41
|
-
* A recorded Kalshi market observation.
|
|
42
|
-
*
|
|
43
|
-
* `yesPriceCents` is an integer from 0 through 100 representing the price of
|
|
44
|
-
* one YES contract in cents. The corresponding NO price is
|
|
45
|
-
* `100 - yesPriceCents`.
|
|
46
|
-
*/
|
|
47
|
-
export interface KalshiMarketTick {
|
|
48
|
-
ticker: string;
|
|
49
|
-
timestamp: string;
|
|
50
|
-
yesPriceCents: number;
|
|
51
|
-
}
|
|
52
|
-
/** Configuration for the deterministic Kalshi momentum strategy. */
|
|
53
|
-
export interface KalshiMomentumConfig {
|
|
54
|
-
/** Maximum number of price directions retained. */
|
|
55
|
-
lookback: number;
|
|
56
|
-
/** Consecutive moves required to enter a position. */
|
|
57
|
-
momentumThreshold: number;
|
|
58
|
-
/** Contracts requested for each entry. */
|
|
59
|
-
positionSize: number;
|
|
60
|
-
/** Profit per contract, in cents, that triggers an exit. */
|
|
61
|
-
profitTargetCents: number;
|
|
62
|
-
/** Loss per contract, in cents, that triggers an exit. */
|
|
63
|
-
stopLossCents: number;
|
|
64
|
-
/** Maximum contracts allowed per market, across both outcomes. */
|
|
65
|
-
maxPosition: number;
|
|
66
|
-
}
|
|
67
|
-
/** Open position tracked by the momentum strategy. Prices are cents/contract. */
|
|
68
|
-
export interface KalshiMomentumPosition {
|
|
69
|
-
ticker: string;
|
|
70
|
-
outcome: PredictionMarketOutcome;
|
|
71
|
-
quantity: number;
|
|
72
|
-
entryPriceCents: number;
|
|
73
|
-
}
|
|
74
|
-
/** Serializable state used to replay the strategy deterministically. */
|
|
75
|
-
export interface KalshiMomentumStrategyState {
|
|
76
|
-
/** Recent YES-price directions: 1 = up, -1 = down, 0 = flat. */
|
|
77
|
-
directions: Array<-1 | 0 | 1>;
|
|
78
|
-
/** Most recently observed YES price, in cents/contract. */
|
|
79
|
-
lastYesPriceCents?: number;
|
|
80
|
-
ticker?: string;
|
|
81
|
-
lastTimestamp?: string;
|
|
82
|
-
position?: KalshiMomentumPosition;
|
|
83
|
-
tradesExecuted: number;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Venue-neutral instruction produced by a prediction-market strategy.
|
|
87
|
-
*
|
|
88
|
-
* `action` describes portfolio behavior. `outcome` describes the binary
|
|
89
|
-
* contract. A SELL YES closes YES contracts; it does not mean BUY NO.
|
|
90
|
-
* `priceCents` is cents per contract, from 0 through 100.
|
|
91
|
-
*/
|
|
92
|
-
export interface PredictionMarketTradeIntent {
|
|
93
|
-
action: "BUY" | "SELL" | "HOLD";
|
|
94
|
-
outcome: PredictionMarketOutcome | null;
|
|
95
|
-
ticker: string;
|
|
96
|
-
quantity: number;
|
|
97
|
-
priceCents: number;
|
|
98
|
-
timestamp: string;
|
|
99
|
-
reason: string;
|
|
100
|
-
}
|
|
101
|
-
/** Position held by the in-memory paper executor. */
|
|
102
|
-
export interface PaperPosition {
|
|
103
|
-
ticker: string;
|
|
104
|
-
outcome: PredictionMarketOutcome;
|
|
105
|
-
quantity: number;
|
|
106
|
-
averageEntryPriceCents: number;
|
|
107
|
-
markPriceCents: number;
|
|
108
|
-
unrealizedPnlCents: number;
|
|
109
|
-
}
|
|
110
|
-
/** Complete serializable portfolio snapshot. All money values are cents. */
|
|
111
|
-
export interface PaperPortfolioState {
|
|
112
|
-
initialCashCents: number;
|
|
113
|
-
cashCents: number;
|
|
114
|
-
positions: Record<string, PaperPosition>;
|
|
115
|
-
realizedPnlCents: number;
|
|
116
|
-
unrealizedPnlCents: number;
|
|
117
|
-
equityCents: number;
|
|
118
|
-
}
|
|
119
|
-
/** Result of deterministically applying one intent to the paper portfolio. */
|
|
120
|
-
export interface PaperExecutionResult {
|
|
121
|
-
status: "FILLED" | "REJECTED" | "SKIPPED";
|
|
122
|
-
intent: PredictionMarketTradeIntent;
|
|
123
|
-
fill?: {
|
|
124
|
-
priceCents: number;
|
|
125
|
-
quantity: number;
|
|
126
|
-
cashChangeCents: number;
|
|
127
|
-
realizedPnlCents: number;
|
|
128
|
-
};
|
|
129
|
-
reason?: string;
|
|
130
|
-
portfolio: PaperPortfolioState;
|
|
131
|
-
}
|
|
132
|
-
/** One tick's strategy decision and paper-execution result. */
|
|
133
|
-
export interface KalshiMomentumAgentStep {
|
|
134
|
-
tick: KalshiMarketTick;
|
|
135
|
-
intent: PredictionMarketTradeIntent;
|
|
136
|
-
/** Optional review from the existing investing research/trader workflow. */
|
|
137
|
-
researchSignal?: TradeSignal;
|
|
138
|
-
execution: PaperExecutionResult;
|
|
139
|
-
strategyState: KalshiMomentumStrategyState;
|
|
140
|
-
}
|
|
141
|
-
/** Input for a credential-free recorded-tick momentum replay. */
|
|
142
|
-
export interface KalshiMomentumAgentRequest {
|
|
143
|
-
ticks: KalshiMarketTick[];
|
|
144
|
-
config?: Partial<KalshiMomentumConfig>;
|
|
145
|
-
initialCashCents?: number;
|
|
146
|
-
initialStrategyState?: KalshiMomentumStrategyState;
|
|
147
|
-
initialPortfolio?: PaperPortfolioState;
|
|
148
|
-
}
|
|
149
|
-
/** Structured output from the Kalshi momentum paper agent. */
|
|
150
|
-
export interface KalshiMomentumAgentResult {
|
|
151
|
-
mode: "paper";
|
|
152
|
-
config: KalshiMomentumConfig;
|
|
153
|
-
steps: KalshiMomentumAgentStep[];
|
|
154
|
-
strategyState: KalshiMomentumStrategyState;
|
|
155
|
-
portfolio: PaperPortfolioState;
|
|
156
|
-
report: string;
|
|
157
|
-
}
|
|
158
43
|
/**
|
|
159
44
|
* AI analysis result for an event's markets.
|
|
160
45
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/predictos/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,kCAAkC;AAClC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE7C,4EAA4E;AAC5E,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE5D,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC;AAE5D,qCAAqC;AACrC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,4CAA4C;AAC5C,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAC;AAMjD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,0BAA0B,EAAE,MAAM,CAAC;IACnC,k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AyB;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,iDAAiD;IACjD,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){const{sourceMarket:n,searchResults:t,searchPlatform:r}=e,a="polymarket"===r?"Polymarket":"Kalshi";return{systemPrompt:"You are an expert financial analyst specializing in prediction market arbitrage opportunities.\n\nYour task is to:\n1. Determine if the source market and any of the search results represent the SAME underlying event/question\n2. If they do, calculate whether there's an arbitrage opportunity based on price differences\n3. Provide clear, actionable analysis\n\nYou understand that arbitrage in prediction markets works as follows:\n- If you can buy YES on one market and NO on another market for the same event\n- And the combined cost is less than $1.00 (or 100%), you have guaranteed profit\n- The profit = $1.00 - (YES price + NO price)\n\nImportant considerations:\n- Markets must represent the EXACT same event with the same resolution criteria\n- Even small wording differences can lead to different outcomes\n- Be conservative in matching - when in doubt, say they're NOT the same market\n- Consider timing differences (different end dates = different markets)\n\nYour output must be valid JSON matching the exact schema specified.",userPrompt:`# Arbitrage Analysis Task\n\n## Source Market (from ${"polymarket"===n.source?"Polymarket":"Kalshi"})\n\n**Name:** ${n.name}\n**Identifier:** ${n.identifier}\n**YES Price:** ${n.yesPrice}% \n**NO Price:** ${n.noPrice}%\n**URL:** ${n.url}\n\n${n.rawData?`**Raw Data:**\n\`\`\`json\n${JSON.stringify(n.rawData,null,2)}\n\`\`\``:""}\n\n## Search Results from ${a}\n\n${0===t.length?"No matching markets found on "+a:`Found ${t.length} potential matches:\n\n\`\`\`json\n${JSON.stringify(t,null,2)}\n\`\`\``}\n\n## Your Analysis Task\n\n1. **Market Matching**: Examine each search result and determine if ANY of them represent the SAME event as the source market. Consider:\n - Is the question/title asking about the same thing?\n - Are the resolution criteria likely to be the same?\n - Are the time frames compatible?\n - Could slight wording differences lead to different outcomes?\n\n2. **If Same Market Found**: Calculate the arbitrage opportunity:\n - Compare YES prices across both markets\n - Compare NO prices across both markets\n - The arb exists if: (lowest YES price) + (lowest NO price) < 100\n - Calculate exact profit percentage\n\n3. **Build Response**: Return your analysis in the exact JSON format below.\n\n## Output Format\n\nReturn a JSON object with this exact structure:\n\n{\n "isSameMarket": boolean,\n "sameMarketConfidence": number (0-100),\n "marketComparisonReasoning": "string explaining why you believe the markets are/aren't the same",\n "matchedMarket": {\n "source": "${r}",\n "name": "string - market title/name",\n "identifier": "string - the identifier field from the matched search result",\n "yesPrice": number (0-100),\n "noPrice": number (0-100),\n "volume": number or null,\n "liquidity": number or null,\n "url": "string - market URL (see URL format below)"\n } or null if no match found,\n "arbitrage": {\n "hasArbitrage": boolean,\n "profitPercent": number or null,\n "strategy": {\n "buyYesOn": "${n.source}" or "${r}",\n "buyYesPrice": number,\n "buyNoOn": "${n.source}" or "${r}",\n "buyNoPrice": number,\n "totalCost": number,\n "guaranteedPayout": 100,\n "netProfit": number\n } or null\n },\n "summary": "string - 2-3 sentence summary of findings",\n "risks": ["array of strings - potential risks or caveats"],\n "recommendation": "string - clear actionable recommendation"\n}\n\n## Important Notes\n\n- For Polymarket markets, the URL format is: https://polymarket.com/event/[identifier]\n- For Kalshi markets, the URL format is: https://kalshi.com/events/[identifier]\n- Each search result has an "identifier" field - use it to build the URL\n- ${"polymarket"===r?"Polymarket prices in outcomePrices are decimals (0.45 = 45%)":"Kalshi prices are already in percentage (45 = 45%)"}\n- Only report arbitrage if you're at least 80% confident the markets are the same\n- If no matching market is found, set isSameMarket to false and explain why\n\nNow analyze the markets and provide your assessment.`}}function n(e){const{title:n,sourcePlatform:t,targetPlatform:r}=e;return{systemPrompt:'You are a search query optimizer for prediction markets.\n\nYour task is to extract the 1-2 MOST IMPORTANT keywords from an event title that would best match similar events on another platform.\n\nRules:\n1. Return ONLY 1-2 words, no more\n2. Focus on unique identifiers: names, specific events, dates, numbers\n3. Remove common words like "will", "the", "be", "in", etc.\n4. Prioritize proper nouns (people, companies, places)\n5. If there\'s a person\'s name, that\'s usually the best keyword\n6. For numeric targets (prices, percentages), include the key number\n\nExamples:\n- "Will Bitcoin reach $100,000 by end of 2025?" → "Bitcoin"\n- "Will Elon Musk tweet about Dogecoin this week?" → "Elon Musk"\n- "Jensen Huang mentions at CES 2026" → "Jensen"\n- "Will the Fed cut interest rates in January?" → "Fed rates"\n- "Trump wins 2024 election" → "Trump"\n- "Apple stock above $200" → "Apple"\n\nReturn ONLY the search query, nothing else. No quotes, no explanation.',userPrompt:`Extract the best 1-2 word search query from this ${t} event title to search on ${r}:\n\n"${n}"\n\nSearch query:`}}export{e as a,n as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.arbitrageAnalysisPrompt=function(e){const{sourceMarket:n,searchResults:t,searchPlatform:r}=e,a="polymarket"===r?"Polymarket":"Kalshi";return{systemPrompt:"You are an expert financial analyst specializing in prediction market arbitrage opportunities.\n\nYour task is to:\n1. Determine if the source market and any of the search results represent the SAME underlying event/question\n2. If they do, calculate whether there's an arbitrage opportunity based on price differences\n3. Provide clear, actionable analysis\n\nYou understand that arbitrage in prediction markets works as follows:\n- If you can buy YES on one market and NO on another market for the same event\n- And the combined cost is less than $1.00 (or 100%), you have guaranteed profit\n- The profit = $1.00 - (YES price + NO price)\n\nImportant considerations:\n- Markets must represent the EXACT same event with the same resolution criteria\n- Even small wording differences can lead to different outcomes\n- Be conservative in matching - when in doubt, say they're NOT the same market\n- Consider timing differences (different end dates = different markets)\n\nYour output must be valid JSON matching the exact schema specified.",userPrompt:`# Arbitrage Analysis Task\n\n## Source Market (from ${"polymarket"===n.source?"Polymarket":"Kalshi"})\n\n**Name:** ${n.name}\n**Identifier:** ${n.identifier}\n**YES Price:** ${n.yesPrice}% \n**NO Price:** ${n.noPrice}%\n**URL:** ${n.url}\n\n${n.rawData?`**Raw Data:**\n\`\`\`json\n${JSON.stringify(n.rawData,null,2)}\n\`\`\``:""}\n\n## Search Results from ${a}\n\n${0===t.length?"No matching markets found on "+a:`Found ${t.length} potential matches:\n\n\`\`\`json\n${JSON.stringify(t,null,2)}\n\`\`\``}\n\n## Your Analysis Task\n\n1. **Market Matching**: Examine each search result and determine if ANY of them represent the SAME event as the source market. Consider:\n - Is the question/title asking about the same thing?\n - Are the resolution criteria likely to be the same?\n - Are the time frames compatible?\n - Could slight wording differences lead to different outcomes?\n\n2. **If Same Market Found**: Calculate the arbitrage opportunity:\n - Compare YES prices across both markets\n - Compare NO prices across both markets\n - The arb exists if: (lowest YES price) + (lowest NO price) < 100\n - Calculate exact profit percentage\n\n3. **Build Response**: Return your analysis in the exact JSON format below.\n\n## Output Format\n\nReturn a JSON object with this exact structure:\n\n{\n "isSameMarket": boolean,\n "sameMarketConfidence": number (0-100),\n "marketComparisonReasoning": "string explaining why you believe the markets are/aren't the same",\n "matchedMarket": {\n "source": "${r}",\n "name": "string - market title/name",\n "identifier": "string - the identifier field from the matched search result",\n "yesPrice": number (0-100),\n "noPrice": number (0-100),\n "volume": number or null,\n "liquidity": number or null,\n "url": "string - market URL (see URL format below)"\n } or null if no match found,\n "arbitrage": {\n "hasArbitrage": boolean,\n "profitPercent": number or null,\n "strategy": {\n "buyYesOn": "${n.source}" or "${r}",\n "buyYesPrice": number,\n "buyNoOn": "${n.source}" or "${r}",\n "buyNoPrice": number,\n "totalCost": number,\n "guaranteedPayout": 100,\n "netProfit": number\n } or null\n },\n "summary": "string - 2-3 sentence summary of findings",\n "risks": ["array of strings - potential risks or caveats"],\n "recommendation": "string - clear actionable recommendation"\n}\n\n## Important Notes\n\n- For Polymarket markets, the URL format is: https://polymarket.com/event/[identifier]\n- For Kalshi markets, the URL format is: https://kalshi.com/events/[identifier]\n- Each search result has an "identifier" field - use it to build the URL\n- ${"polymarket"===r?"Polymarket prices in outcomePrices are decimals (0.45 = 45%)":"Kalshi prices are already in percentage (45 = 45%)"}\n- Only report arbitrage if you're at least 80% confident the markets are the same\n- If no matching market is found, set isSameMarket to false and explain why\n\nNow analyze the markets and provide your assessment.`}},exports.searchQueryGeneratorPrompt=function(e){const{title:n,sourcePlatform:t,targetPlatform:r}=e;return{systemPrompt:'You are a search query optimizer for prediction markets.\n\nYour task is to extract the 1-2 MOST IMPORTANT keywords from an event title that would best match similar events on another platform.\n\nRules:\n1. Return ONLY 1-2 words, no more\n2. Focus on unique identifiers: names, specific events, dates, numbers\n3. Remove common words like "will", "the", "be", "in", etc.\n4. Prioritize proper nouns (people, companies, places)\n5. If there\'s a person\'s name, that\'s usually the best keyword\n6. For numeric targets (prices, percentages), include the key number\n\nExamples:\n- "Will Bitcoin reach $100,000 by end of 2025?" → "Bitcoin"\n- "Will Elon Musk tweet about Dogecoin this week?" → "Elon Musk"\n- "Jensen Huang mentions at CES 2026" → "Jensen"\n- "Will the Fed cut interest rates in January?" → "Fed rates"\n- "Trump wins 2024 election" → "Trump"\n- "Apple stock above $200" → "Apple"\n\nReturn ONLY the search query, nothing else. No quotes, no explanation.',userPrompt:`Extract the best 1-2 word search query from this ${t} event title to search on ${r}:\n\n"${n}"\n\nSearch query:`}};
|
package/dist/stocks/index.d.ts
CHANGED
|
@@ -5,9 +5,8 @@ export * from './stock-names';
|
|
|
5
5
|
export * from './yfinance-wrapper';
|
|
6
6
|
export * from './yahoo-finance-wrapper';
|
|
7
7
|
export * from './sec-filing-api';
|
|
8
|
+
export * from './import-stock-names';
|
|
8
9
|
export * from './finnhub-wrapper';
|
|
9
10
|
export * from './types';
|
|
10
11
|
export * from './unified-quote-service';
|
|
11
|
-
export * from './strategies/ema-crossover';
|
|
12
|
-
export * from './strategies/bb-rsi-breakout';
|
|
13
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stocks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stocks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { NormalizedQuote } from './unified-quote-service';
|
|
2
|
-
/** Default freshness window for a cached quote when the caller names none. */
|
|
3
|
-
export declare const QUOTE_CACHE_TTL: number;
|
|
4
2
|
export interface CachedQuote {
|
|
5
3
|
symbol: string;
|
|
6
4
|
price: number;
|
|
@@ -27,16 +25,9 @@ export declare class QuoteCacheService {
|
|
|
27
25
|
*/
|
|
28
26
|
private roundPrice;
|
|
29
27
|
/**
|
|
30
|
-
* Get cached quote if available
|
|
31
|
-
*
|
|
32
|
-
* @param symbol - Ticker to look up; matched case-insensitively.
|
|
33
|
-
* @param cacheTTL - Maximum age in milliseconds. Defaults to
|
|
34
|
-
* {@link QUOTE_CACHE_TTL}. A row older than this — or one with no
|
|
35
|
-
* timestamp, which is how rows written before the column existed read back
|
|
36
|
-
* — is treated as a miss so the caller refetches. Pass `Infinity` to accept
|
|
37
|
-
* a cached quote at any age.
|
|
28
|
+
* Get cached quote if available
|
|
38
29
|
*/
|
|
39
|
-
getCachedQuote(symbol: string
|
|
30
|
+
getCachedQuote(symbol: string): Promise<CachedQuote | null>;
|
|
40
31
|
/**
|
|
41
32
|
* Save quote to cache
|
|
42
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote-cache-service.d.ts","sourceRoot":"","sources":["../../src/stocks/quote-cache-service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"quote-cache-service.d.ts","sourceRoot":"","sources":["../../src/st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AS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,EAAE,CAAC;IAmC7B;;OAEG;IACG,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,IAAI,CAAC;IAsDhB;;OAEG;IACG,qBAAqB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;IA6B1C;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAKzC;AAGD,eAAO,MAAM,iBAAiB,mBAA0B,CAAC;AACzD,eAAe,iBAAiB,CAAC"}
|
|
@@ -55,7 +55,7 @@ export declare class UnifiedQuoteService {
|
|
|
55
55
|
* @param symbol - Stock symbol to fetch
|
|
56
56
|
* @param options - Options object with useCache flag (default: true) and cacheTTL in milliseconds
|
|
57
57
|
*/
|
|
58
|
-
getQuote(
|
|
58
|
+
getQuote(symbol: string, options?: {
|
|
59
59
|
useCache?: boolean;
|
|
60
60
|
cacheTTL?: number;
|
|
61
61
|
}): Promise<QuoteServiceResponse>;
|
|
@@ -97,21 +97,12 @@ export declare class UnifiedQuoteService {
|
|
|
97
97
|
getQuoteFromSource(symbol: string, source: "yfinance" | "finnhub" | "alpaca"): Promise<QuoteServiceResponse>;
|
|
98
98
|
}
|
|
99
99
|
export declare const unifiedQuoteService: UnifiedQuoteService;
|
|
100
|
-
|
|
101
|
-
* Options accepted by the quote helpers.
|
|
102
|
-
*
|
|
103
|
-
* `cacheTTL` belongs in the type: the methods behind these wrappers have always
|
|
104
|
-
* taken it and callers have always passed it, but omitting it here made every
|
|
105
|
-
* such call a type error.
|
|
106
|
-
*/
|
|
107
|
-
export interface GetQuoteOptions {
|
|
108
|
-
/** Read from the quote cache before calling a provider. Defaults to true. */
|
|
100
|
+
export declare function getQuote(symbol: string, options?: {
|
|
109
101
|
useCache?: boolean;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
export declare function getQuotes(symbols: string[], options?: GetQuoteOptions): Promise<QuotesServiceResponse>;
|
|
102
|
+
}): Promise<QuoteServiceResponse>;
|
|
103
|
+
export declare function getQuotes(symbols: string[], options?: {
|
|
104
|
+
useCache?: boolean;
|
|
105
|
+
}): Promise<QuotesServiceResponse>;
|
|
115
106
|
export declare function getQuoteFromSource(symbol: string, source: "yfinance" | "finnhub" | "alpaca"): Promise<QuoteServiceResponse>;
|
|
116
107
|
export declare function getHistoricalQuotes(symbol: string, startDate: string | Date, endDate: string | Date, options?: {
|
|
117
108
|
forceRefreshRecent?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-quote-service.d.ts","sourceRoot":"","sources":["../../src/stocks/unified-quote-service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGhF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1B,IAAI,CAAC,EAAE;YACL,MAAM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AAQ,GACxC,OAAO,CAAC,oBAAoB,CAAC;CA6FjC;AAGD,eAAO,MAAM,mBAAmB,qBAA4B,CAAC;AAG7D,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAElH;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAEvH;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,GACxC,OAAO,CAAC,oBAAoB,CAAC,CAE/B;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7C,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,44 +1,8 @@
|
|
|
1
|
-
import { default as YahooFinance } from 'yahoo-finance2';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* yahoo-finance2 routes every fetch through one module-level queue (default
|
|
7
|
-
* concurrency 4). When the queue is full, a waiting job is started from the
|
|
8
|
-
* `.finally()` of whichever job finished before it - i.e. inside a *different*
|
|
9
|
-
* request's async context. On Workers the Response is then bound to that other
|
|
10
|
-
* request, and reading its body throws "Cannot perform I/O on behalf of a
|
|
11
|
-
* different request (I/O type: ReadableStreamSource)".
|
|
12
|
-
*
|
|
13
|
-
* With unlimited concurrency and no interval the queue never defers a job, so
|
|
14
|
-
* every fetch starts synchronously in the request that asked for it. The queue
|
|
15
|
-
* is shared by every YahooFinance instance in the isolate and each call
|
|
16
|
-
* re-applies its instance's queue options, so every instance must use these.
|
|
2
|
+
* Yahoo Finance 2 Wrapper
|
|
3
|
+
* Full-featured wrapper around yahoo-finance2 library
|
|
4
|
+
* Supports: quote, quoteSummary, chart, historical, search, options, recommendations, and more
|
|
17
5
|
*/
|
|
18
|
-
export declare const WORKER_SAFE_YAHOO_FINANCE_OPTIONS: {
|
|
19
|
-
readonly queue: {
|
|
20
|
-
readonly concurrency: number;
|
|
21
|
-
readonly interval: 0;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
/** Create a YahooFinance client that never runs one request's fetch in another's context. */
|
|
25
|
-
export declare function createYahooFinance(options?: ConstructorParameters<typeof YahooFinance>[0]): import('yahoo-finance2/createYahooFinance').YahooFinance & {
|
|
26
|
-
readonly quoteCombine: typeof import('yahoo-finance2/other').quoteCombine;
|
|
27
|
-
readonly autoc: typeof import('yahoo-finance2/modules').autoc;
|
|
28
|
-
readonly chart: typeof import('yahoo-finance2/modules').chart;
|
|
29
|
-
readonly dailyGainers: typeof import('yahoo-finance2/modules').dailyGainers;
|
|
30
|
-
readonly dailyLosers: typeof import('yahoo-finance2/modules').dailyLosers;
|
|
31
|
-
readonly fundamentalsTimeSeries: typeof import('yahoo-finance2/modules').fundamentalsTimeSeries;
|
|
32
|
-
readonly historical: typeof import('yahoo-finance2/modules').historical;
|
|
33
|
-
readonly insights: typeof import('yahoo-finance2/modules').insights;
|
|
34
|
-
readonly options: typeof import('yahoo-finance2/modules').options;
|
|
35
|
-
readonly quote: typeof import('yahoo-finance2/modules').quote;
|
|
36
|
-
readonly quoteSummary: typeof import('yahoo-finance2/modules').quoteSummary;
|
|
37
|
-
readonly recommendationsBySymbol: typeof import('yahoo-finance2/modules').recommendationsBySymbol;
|
|
38
|
-
readonly screener: typeof import('yahoo-finance2/modules').screener;
|
|
39
|
-
readonly search: typeof import('yahoo-finance2/modules').search;
|
|
40
|
-
readonly trendingSymbols: typeof import('yahoo-finance2/modules').trendingSymbols;
|
|
41
|
-
};
|
|
42
6
|
/**
|
|
43
7
|
* A single row of historical price data, shaped like the rows the deprecated
|
|
44
8
|
* `yahooFinance.historical()` helper used to return.
|
|
@@ -75,7 +39,7 @@ export declare class YahooFinanceWrapper {
|
|
|
75
39
|
*/
|
|
76
40
|
getQuote(symbol: string, options?: any): Promise<{
|
|
77
41
|
success: boolean;
|
|
78
|
-
data:
|
|
42
|
+
data: import('yahoo-finance2/modules/quote').Quote;
|
|
79
43
|
error?: undefined;
|
|
80
44
|
} | {
|
|
81
45
|
success: boolean;
|
|
@@ -88,40 +52,7 @@ export declare class YahooFinanceWrapper {
|
|
|
88
52
|
*/
|
|
89
53
|
getQuotes(symbols: string[]): Promise<{
|
|
90
54
|
success: boolean;
|
|
91
|
-
data:
|
|
92
|
-
error?: undefined;
|
|
93
|
-
} | {
|
|
94
|
-
success: boolean;
|
|
95
|
-
error: any;
|
|
96
|
-
data?: undefined;
|
|
97
|
-
}>;
|
|
98
|
-
/**
|
|
99
|
-
* Build a quote from the chart endpoint.
|
|
100
|
-
*
|
|
101
|
-
* A fallback for when `quote()` fails: the chart endpoint needs no
|
|
102
|
-
* cookie/crumb handshake, which is the part of `quote()` Yahoo most often
|
|
103
|
-
* refuses for datacenter IPs. Returns quote-shaped fields so callers can
|
|
104
|
-
* normalize it the same way as a `quote()` result.
|
|
105
|
-
*/
|
|
106
|
-
getChartQuote(symbol: string): Promise<{
|
|
107
|
-
success: boolean;
|
|
108
|
-
data: {
|
|
109
|
-
symbol: any;
|
|
110
|
-
regularMarketPrice: number;
|
|
111
|
-
regularMarketChange: number | null;
|
|
112
|
-
regularMarketChangePercent: number | null;
|
|
113
|
-
regularMarketOpen: number | null;
|
|
114
|
-
regularMarketDayHigh: number | null;
|
|
115
|
-
regularMarketDayLow: number | null;
|
|
116
|
-
regularMarketPreviousClose: number | null;
|
|
117
|
-
volume: number | null;
|
|
118
|
-
currency: any;
|
|
119
|
-
longName: any;
|
|
120
|
-
shortName: any;
|
|
121
|
-
exchange: any;
|
|
122
|
-
fullExchangeName: any;
|
|
123
|
-
regularMarketTime: any;
|
|
124
|
-
};
|
|
55
|
+
data: import('yahoo-finance2/modules/quote').Quote[];
|
|
125
56
|
error?: undefined;
|
|
126
57
|
} | {
|
|
127
58
|
success: boolean;
|
|
@@ -395,7 +326,7 @@ export declare class YahooFinanceWrapper {
|
|
|
395
326
|
getComprehensiveData(symbol: string): Promise<{
|
|
396
327
|
success: boolean;
|
|
397
328
|
data: {
|
|
398
|
-
quote:
|
|
329
|
+
quote: import('yahoo-finance2/modules/quote').Quote | undefined;
|
|
399
330
|
summary: import('yahoo-finance2/modules/quoteSummary-iface').QuoteSummaryResult | undefined;
|
|
400
331
|
historical: HistoricalRow[] | undefined;
|
|
401
332
|
recommendations: import('yahoo-finance2/modules/recommendationsBySymbol').RecommendationsBySymbolResponse | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yahoo-finance-wrapper.d.ts","sourceRoot":"","sources":["../../src/stocks/yahoo-finance-wrapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"yahoo-finance-wrapper.d.ts","sourceRoot":"","sources":["../../src/stocks/yahoo-finance-wrapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAQD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,GAAG,aAAa,EAAE,CAmC/E;AAED;;;GAGG;AACH,qBAAa,mBA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;IAgBvC;;;OAGG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM;;;;;;;;;IAgBhC;;;;OAIG;IACG,yBAAyB,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;;;;;;;;;IAoBH;;;OAGG;IACG,QAAQ,CAAC,OAAO,EAAE,GAAG;;;;;;;;;IAgB3B;;;OAGG;IACG,iBAAiB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;IAwBtC;;;OAGG;IACG,sBAAsB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;IAmC3C;;;OAGG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;IAqBrC;;;OAGG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;IA4BhC;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;IA8BjC;;;OAGG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM;;;;;;;;;IAkBlC;;;OAGG;IACG,oBAAoB,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;CAgC1C;AAGD,eAAO,MAAM,mBAAmB,qBAA4B,CAAC;AAG7D,eAAO,MAAM,YAAY,qBAAsB,CAAC;AAGhD,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AgentState, InvestDebateState, RiskDebateState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
export declare class InvestmentDebateFacilitator {
|
|
4
4
|
private llm;
|
|
5
5
|
private maxRounds;
|
|
6
|
-
constructor(llm:
|
|
6
|
+
constructor(llm: UnifiedLLMClient, maxRounds?: number);
|
|
7
7
|
/**
|
|
8
8
|
* Determine if the debate should continue or conclude
|
|
9
9
|
*/
|
|
@@ -16,7 +16,7 @@ export declare class InvestmentDebateFacilitator {
|
|
|
16
16
|
export declare class RiskDebateFacilitator {
|
|
17
17
|
private llm;
|
|
18
18
|
private maxRounds;
|
|
19
|
-
constructor(llm:
|
|
19
|
+
constructor(llm: UnifiedLLMClient, maxRounds?: number);
|
|
20
20
|
shouldContinue(debateState: RiskDebateState): boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Synthesize risk debate and adjust trading plan
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debate-facilitator.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/debate-facilitator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"debate-facilitator.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/debate-facilitator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,2BAA2B;IACtC,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,SAAS,CAAQ;gBAEb,GAAG,EAAE,gBAAgB,EAAE,SAAS,GAAE,MAAU;IAKxD;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,iBAAiB,GAAG,OAAO;IAmBvD;;OAEG;IACG,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CA8DpE;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,SAAS,CAAQ;gBAEb,GAAG,EAAE,gBAAgB,EAAE,SAAS,GAAE,MAAU;IAKxD,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO;IAIrD;;OAEG;IACG,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAiDpE"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
3
|
-
import { FundManagerApproval } from '../../strategy-signals/types';
|
|
4
|
-
export declare function parseFundManagerApproval(text: string, proposalId: string): FundManagerApproval;
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
5
3
|
export declare class FundManager {
|
|
6
4
|
private llm;
|
|
7
|
-
constructor(llm:
|
|
5
|
+
constructor(llm: UnifiedLLMClient);
|
|
8
6
|
/**
|
|
9
7
|
* Review all analysis and make final approval decision
|
|
10
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fund-manager.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/fund-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"fund-manager.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/fund-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,qBAAa,WAAW;IACtB,OAAO,CAAC,GAAG,CAAkB;gBAEjB,GAAG,EAAE,gBAAgB;IAIjC;;OAEG;IACG,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAoFpE"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
import { FinancialSituationMemory } from '../utils/memory';
|
|
4
4
|
export declare class ImprovedBullResearcher {
|
|
5
5
|
private llm;
|
|
6
6
|
private memory;
|
|
7
|
-
constructor(llm:
|
|
7
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
8
8
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
9
9
|
}
|
|
10
10
|
export declare class ImprovedBearResearcher {
|
|
11
11
|
private llm;
|
|
12
12
|
private memory;
|
|
13
|
-
constructor(llm:
|
|
13
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
14
14
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=improved-researchers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"improved-researchers.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/improved-researchers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAuC,MAAM,UAAU,CAAA;AAC1E,OAAO,
|
|
1
|
+
{"version":3,"file":"improved-researchers.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/improved-researchers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAuC,MAAM,UAAU,CAAA;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AA0B1D,qBAAa,sBAAsB;IACjC,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAgF/D;AAED,qBAAa,sBAAsB;IACjC,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAgF/D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
export declare class MarketAnalyst {
|
|
4
4
|
private llm;
|
|
5
|
-
constructor(llm:
|
|
5
|
+
constructor(llm: UnifiedLLMClient);
|
|
6
6
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=market-analyst.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-analyst.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/market-analyst.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAA;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"market-analyst.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/market-analyst.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,aAAa;IACxB,OAAO,CAAC,GAAG,CAAkB;gBAEjB,GAAG,EAAE,gBAAgB;IAI3B,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CA8F/D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
export declare class NewsAnalyst {
|
|
4
4
|
private llm;
|
|
5
|
-
constructor(llm:
|
|
5
|
+
constructor(llm: UnifiedLLMClient);
|
|
6
6
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=news-analyst.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"news-analyst.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/news-analyst.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAA;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"news-analyst.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/news-analyst.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,qBAAa,WAAW;IACpB,OAAO,CAAC,GAAG,CAAkB;gBAEjB,GAAG,EAAE,gBAAgB;IAI3B,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAoEjE"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
import { FinancialSituationMemory } from '../utils/memory';
|
|
4
4
|
export declare class BullResearcher {
|
|
5
5
|
private llm;
|
|
6
6
|
private memory;
|
|
7
|
-
constructor(llm:
|
|
7
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
8
8
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
9
9
|
}
|
|
10
10
|
export declare class BearResearcher {
|
|
11
11
|
private llm;
|
|
12
12
|
private memory;
|
|
13
|
-
constructor(llm:
|
|
13
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
14
14
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
15
15
|
}
|
|
16
16
|
export declare class InvestmentJudge {
|
|
17
17
|
private llm;
|
|
18
18
|
private memory;
|
|
19
|
-
constructor(llm:
|
|
19
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
20
20
|
makeDecision(state: AgentState): Promise<Partial<AgentState>>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=researchers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"researchers.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/researchers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAqB,MAAM,UAAU,CAAA;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"researchers.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/researchers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAqB,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,qBAAa,cAAc;IACzB,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAkD/D;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAkD/D;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAkCpE"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
import { FinancialSituationMemory } from '../utils/memory';
|
|
4
4
|
export declare class RiskyAnalyst {
|
|
5
5
|
private llm;
|
|
6
6
|
private memory;
|
|
7
|
-
constructor(llm:
|
|
7
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
8
8
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
9
9
|
}
|
|
10
10
|
export declare class SafeAnalyst {
|
|
11
11
|
private llm;
|
|
12
12
|
private memory;
|
|
13
|
-
constructor(llm:
|
|
13
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
14
14
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
15
15
|
}
|
|
16
16
|
export declare class NeutralAnalyst {
|
|
17
17
|
private llm;
|
|
18
18
|
private memory;
|
|
19
|
-
constructor(llm:
|
|
19
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
20
20
|
analyze(state: AgentState): Promise<Partial<AgentState>>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=risk-team.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"risk-team.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/risk-team.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAA;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"risk-team.d.ts","sourceRoot":"","sources":["../../../src/trading-agents/agents/risk-team.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,qBAAa,YAAY;IACvB,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAkD/D;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAsD/D;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,GAAG,CAAkB;IAC7B,OAAO,CAAC,MAAM,CAA0B;gBAE5B,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,wBAAwB;IAK7D,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;CAyD/D"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AgentState } from '../types';
|
|
2
|
-
import {
|
|
2
|
+
import { UnifiedLLMClient } from '../utils/llm-client';
|
|
3
3
|
import { FinancialSituationMemory } from '../utils/memory';
|
|
4
4
|
export declare class Trader {
|
|
5
5
|
private llm;
|
|
6
6
|
private memory;
|
|
7
|
-
constructor(llm:
|
|
7
|
+
constructor(llm: UnifiedLLMClient, memory: FinancialSituationMemory);
|
|
8
8
|
makeDecision(state: AgentState): Promise<Partial<AgentState>>;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=trader.d.ts.map
|