opencandle 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -28
- package/dist/analysts/contracts.js +0 -1
- package/dist/analysts/orchestrator.d.ts +2 -0
- package/dist/analysts/orchestrator.js +19 -1
- package/dist/cli-main.js +13 -7
- package/dist/cli-options.d.ts +4 -0
- package/dist/cli-options.js +33 -0
- package/dist/cli.js +8 -3
- package/dist/config.js +0 -1
- package/dist/doctor/cli-command.js +2 -1
- package/dist/doctor/render.js +0 -1
- package/dist/doctor/report.js +41 -12
- package/dist/gui/server/ask-user-bridge.d.ts +19 -0
- package/dist/gui/server/ask-user-bridge.js +55 -0
- package/dist/gui/server/automation-heartbeat.d.ts +25 -0
- package/dist/gui/server/automation-heartbeat.js +61 -0
- package/dist/gui/server/background-quotes.d.ts +39 -0
- package/dist/gui/server/background-quotes.js +71 -0
- package/dist/gui/server/chat-event-adapter.d.ts +16 -0
- package/dist/gui/server/chat-event-adapter.js +263 -0
- package/dist/gui/server/gui-session-manager.d.ts +2 -0
- package/dist/gui/server/gui-session-manager.js +4 -0
- package/dist/gui/server/http-routes.d.ts +69 -0
- package/dist/gui/server/http-routes.js +1008 -0
- package/dist/gui/server/invoke-tool.d.ts +47 -0
- package/dist/gui/server/invoke-tool.js +373 -0
- package/dist/gui/server/live-chat-event-adapter.d.ts +19 -0
- package/dist/gui/server/live-chat-event-adapter.js +206 -0
- package/dist/gui/server/local-session-coordinator.d.ts +26 -0
- package/dist/gui/server/local-session-coordinator.js +53 -0
- package/dist/gui/server/market-state-api.d.ts +138 -0
- package/dist/gui/server/market-state-api.js +355 -0
- package/dist/gui/server/model-setup.d.ts +64 -0
- package/dist/gui/server/model-setup.js +150 -0
- package/dist/gui/server/private-api-access.d.ts +6 -0
- package/dist/gui/server/private-api-access.js +53 -0
- package/dist/gui/server/projector.d.ts +49 -0
- package/dist/gui/server/projector.js +296 -0
- package/dist/gui/server/prompt-observation.d.ts +8 -0
- package/dist/gui/server/prompt-observation.js +43 -0
- package/dist/gui/server/quote-snapshot-store.d.ts +14 -0
- package/dist/gui/server/quote-snapshot-store.js +49 -0
- package/dist/gui/server/server.d.ts +1 -0
- package/dist/gui/server/server.js +259 -0
- package/dist/gui/server/session-actions.d.ts +60 -0
- package/dist/gui/server/session-actions.js +218 -0
- package/dist/gui/server/session-entry-wait.d.ts +27 -0
- package/dist/gui/server/session-entry-wait.js +129 -0
- package/dist/gui/server/session-list.d.ts +2 -0
- package/dist/gui/server/session-list.js +11 -0
- package/dist/gui/server/shutdown.d.ts +10 -0
- package/dist/gui/server/shutdown.js +29 -0
- package/dist/gui/server/tool-invoke-ack.d.ts +17 -0
- package/dist/gui/server/tool-invoke-ack.js +26 -0
- package/dist/gui/server/tool-metadata.d.ts +93 -0
- package/dist/gui/server/tool-metadata.js +148 -0
- package/dist/gui/server/websocket.d.ts +9 -0
- package/dist/gui/server/websocket.js +124 -0
- package/dist/gui/server/writer-lock.d.ts +1 -0
- package/dist/gui/server/writer-lock.js +1 -0
- package/dist/gui/server/ws-hub.d.ts +50 -0
- package/dist/gui/server/ws-hub.js +284 -0
- package/dist/gui/shared/chat-events.d.ts +174 -0
- package/dist/gui/shared/chat-events.js +13 -0
- package/dist/gui/shared/event-reducer.d.ts +3 -0
- package/dist/gui/shared/event-reducer.js +187 -0
- package/dist/index.js +0 -1
- package/dist/infra/cache.d.ts +6 -0
- package/dist/infra/cache.js +16 -7
- package/dist/infra/freshness.d.ts +21 -0
- package/dist/infra/freshness.js +118 -0
- package/dist/infra/http-client.js +1 -2
- package/dist/infra/index.js +0 -1
- package/dist/infra/market-calendar.d.ts +14 -0
- package/dist/infra/market-calendar.js +136 -0
- package/dist/infra/native-dependencies.js +0 -1
- package/dist/infra/node-version.js +0 -1
- package/dist/infra/open-url.js +0 -1
- package/dist/infra/opencandle-paths.js +0 -1
- package/dist/infra/rate-limiter.js +1 -1
- package/dist/market-state/alert-conditions.js +0 -1
- package/dist/market-state/alert-runner.d.ts +1 -0
- package/dist/market-state/alert-runner.js +5 -4
- package/dist/market-state/daily-report.js +0 -1
- package/dist/market-state/local-automation-service.js +0 -1
- package/dist/market-state/notification-delivery.js +0 -1
- package/dist/market-state/resolve-for-mutation.js +0 -1
- package/dist/market-state/resolve.js +0 -1
- package/dist/market-state/service.d.ts +26 -21
- package/dist/market-state/service.js +175 -36
- package/dist/market-state/summaries.d.ts +8 -0
- package/dist/market-state/summaries.js +58 -0
- package/dist/memory/index.js +0 -1
- package/dist/memory/manager.js +0 -1
- package/dist/memory/preference-extractor.js +0 -1
- package/dist/memory/retrieval.js +0 -1
- package/dist/memory/sqlite.js +60 -11
- package/dist/memory/storage.js +0 -1
- package/dist/memory/tool-defaults.js +0 -1
- package/dist/memory/types.js +0 -1
- package/dist/monitor.js +0 -1
- package/dist/onboarding/connect.js +0 -1
- package/dist/onboarding/credential-interceptor.js +0 -1
- package/dist/onboarding/degradation-accumulator.js +0 -1
- package/dist/onboarding/prompt-user.d.ts +1 -1
- package/dist/onboarding/prompt-user.js +0 -1
- package/dist/onboarding/provider-status.js +0 -1
- package/dist/onboarding/providers.d.ts +25 -1
- package/dist/onboarding/providers.js +26 -1
- package/dist/onboarding/state.js +0 -1
- package/dist/onboarding/tool-helpers.js +0 -1
- package/dist/onboarding/tool-tags.js +0 -1
- package/dist/onboarding/validate-model-key.d.ts +17 -0
- package/dist/onboarding/validate-model-key.js +54 -0
- package/dist/onboarding/validation.js +0 -1
- package/dist/pi/opencandle-extension.js +46 -7
- package/dist/pi/session-action-dedupe.js +0 -1
- package/dist/pi/session-storage.js +0 -1
- package/dist/pi/session-writer-lock.js +0 -1
- package/dist/pi/session.js +0 -1
- package/dist/pi/setup.d.ts +2 -0
- package/dist/pi/setup.js +10 -3
- package/dist/pi/tool-adapter.js +0 -1
- package/dist/pi/tui-session-coordinator.js +0 -1
- package/dist/prompts/context-builder.js +1 -2
- package/dist/prompts/disclaimer.js +0 -1
- package/dist/prompts/policy-cards.js +0 -1
- package/dist/prompts/sections.js +0 -1
- package/dist/prompts/symbol-preflight.js +0 -1
- package/dist/prompts/workflow-prompts.js +0 -1
- package/dist/providers/alpha-vantage.js +8 -3
- package/dist/providers/coingecko.js +1 -1
- package/dist/providers/errors.js +0 -1
- package/dist/providers/exa-search.js +11 -10
- package/dist/providers/external-tool-command.js +0 -1
- package/dist/providers/external-tool-error.js +0 -1
- package/dist/providers/fear-greed.js +0 -1
- package/dist/providers/finnhub.js +0 -1
- package/dist/providers/fred.js +0 -1
- package/dist/providers/index.js +0 -1
- package/dist/providers/polymarket.d.ts +2 -0
- package/dist/providers/polymarket.js +162 -0
- package/dist/providers/provider-credential-error.js +0 -1
- package/dist/providers/reddit-cli.js +0 -1
- package/dist/providers/reddit.js +0 -1
- package/dist/providers/sec-edgar.js +0 -1
- package/dist/providers/tradingview.js +1 -2
- package/dist/providers/twitter-cli.js +0 -1
- package/dist/providers/twitter.js +0 -1
- package/dist/providers/web-search.js +15 -12
- package/dist/providers/with-fallback.js +0 -1
- package/dist/providers/wrap-provider.js +5 -4
- package/dist/providers/yahoo-finance.d.ts +3 -0
- package/dist/providers/yahoo-finance.js +272 -13
- package/dist/routing/classify-intent.js +0 -1
- package/dist/routing/defaults.js +0 -1
- package/dist/routing/entity-extractor.js +18 -3
- package/dist/routing/fund-symbols.js +0 -1
- package/dist/routing/horizon.js +0 -1
- package/dist/routing/index.js +0 -1
- package/dist/routing/legacy-rule-router.js +0 -1
- package/dist/routing/planning.js +0 -1
- package/dist/routing/route-manifest.js +1 -2
- package/dist/routing/router-llm-client.d.ts +2 -2
- package/dist/routing/router-llm-client.js +18 -4
- package/dist/routing/router-prompt.js +0 -1
- package/dist/routing/router-types.js +0 -1
- package/dist/routing/router.d.ts +1 -1
- package/dist/routing/router.js +274 -6
- package/dist/routing/slot-resolver.d.ts +1 -0
- package/dist/routing/slot-resolver.js +1 -2
- package/dist/routing/symbol-disambiguator.js +0 -1
- package/dist/routing/turn-context.js +0 -1
- package/dist/routing/types.js +0 -1
- package/dist/runtime/answer-contracts.js +0 -1
- package/dist/runtime/artifact-contracts.js +0 -1
- package/dist/runtime/evidence.d.ts +1 -0
- package/dist/runtime/evidence.js +0 -1
- package/dist/runtime/numeric-claims.d.ts +23 -0
- package/dist/runtime/numeric-claims.js +99 -0
- package/dist/runtime/planning-evidence.js +1 -77
- package/dist/runtime/prompt-step.d.ts +10 -1
- package/dist/runtime/prompt-step.js +116 -3
- package/dist/runtime/provider-tracker.js +0 -1
- package/dist/runtime/run-context.js +0 -1
- package/dist/runtime/session-coordinator.d.ts +11 -1
- package/dist/runtime/session-coordinator.js +352 -50
- package/dist/runtime/session-title.js +0 -1
- package/dist/runtime/tool-defaults-wrapper.js +0 -1
- package/dist/runtime/validation.d.ts +3 -1
- package/dist/runtime/validation.js +0 -1
- package/dist/runtime/workflow-events.d.ts +1 -1
- package/dist/runtime/workflow-events.js +0 -1
- package/dist/runtime/workflow-runner.d.ts +1 -0
- package/dist/runtime/workflow-runner.js +8 -3
- package/dist/runtime/workflow-types.d.ts +3 -0
- package/dist/runtime/workflow-types.js +0 -1
- package/dist/sentiment/adapters/finnhub.js +0 -1
- package/dist/sentiment/adapters/reddit.js +0 -1
- package/dist/sentiment/adapters/twitter.js +0 -1
- package/dist/sentiment/adapters/web.js +0 -1
- package/dist/sentiment/index.js +4 -2
- package/dist/sentiment/insights.js +0 -1
- package/dist/sentiment/keywords.js +0 -1
- package/dist/sentiment/pipeline.js +0 -1
- package/dist/sentiment/scorer.js +0 -1
- package/dist/sentiment/store.js +0 -1
- package/dist/sentiment/trends.js +0 -1
- package/dist/sentiment/types.js +0 -1
- package/dist/system-prompt.js +0 -1
- package/dist/tool-kit.js +0 -1
- package/dist/tools/fundamentals/company-overview.d.ts +1 -1
- package/dist/tools/fundamentals/company-overview.js +2 -1
- package/dist/tools/fundamentals/comps.d.ts +1 -0
- package/dist/tools/fundamentals/comps.js +25 -12
- package/dist/tools/fundamentals/dcf.js +183 -113
- package/dist/tools/fundamentals/earnings.d.ts +1 -1
- package/dist/tools/fundamentals/earnings.js +2 -1
- package/dist/tools/fundamentals/financials.js +2 -1
- package/dist/tools/fundamentals/sec-filings.js +0 -1
- package/dist/tools/index.d.ts +117 -2
- package/dist/tools/index.js +3 -1
- package/dist/tools/interaction/ask-user.js +11 -1
- package/dist/tools/macro/event-probabilities.d.ts +8 -0
- package/dist/tools/macro/event-probabilities.js +120 -0
- package/dist/tools/macro/fear-greed.d.ts +1 -1
- package/dist/tools/macro/fear-greed.js +0 -1
- package/dist/tools/macro/fred-data.d.ts +1 -1
- package/dist/tools/macro/fred-data.js +2 -1
- package/dist/tools/market/crypto-history.js +0 -1
- package/dist/tools/market/crypto-price.d.ts +4 -1
- package/dist/tools/market/crypto-price.js +10 -2
- package/dist/tools/market/screen-stocks.js +14 -4
- package/dist/tools/market/search-ticker.js +1 -2
- package/dist/tools/market/stock-history.js +0 -1
- package/dist/tools/market/stock-quote.d.ts +4 -1
- package/dist/tools/market/stock-quote.js +9 -5
- package/dist/tools/options/greeks.js +0 -1
- package/dist/tools/options/option-chain.d.ts +4 -1
- package/dist/tools/options/option-chain.js +12 -2
- package/dist/tools/portfolio/alerts.d.ts +2 -1
- package/dist/tools/portfolio/alerts.js +228 -2
- package/dist/tools/portfolio/correlation.js +23 -5
- package/dist/tools/portfolio/daily-report.js +0 -1
- package/dist/tools/portfolio/holdings-overlap.js +0 -1
- package/dist/tools/portfolio/notifications.js +0 -1
- package/dist/tools/portfolio/risk-analysis.d.ts +1 -1
- package/dist/tools/portfolio/risk-analysis.js +1 -2
- package/dist/tools/portfolio/tracker.d.ts +3 -1
- package/dist/tools/portfolio/tracker.js +57 -10
- package/dist/tools/portfolio/watchlist.d.ts +3 -6
- package/dist/tools/portfolio/watchlist.js +101 -110
- package/dist/tools/sentiment/insight-format.js +0 -1
- package/dist/tools/sentiment/query-match.js +0 -1
- package/dist/tools/sentiment/reddit-sentiment.js +0 -1
- package/dist/tools/sentiment/sentiment-summary.js +8 -4
- package/dist/tools/sentiment/sentiment-trend.d.ts +5 -1
- package/dist/tools/sentiment/sentiment-trend.js +6 -2
- package/dist/tools/sentiment/twitter-sentiment.js +0 -1
- package/dist/tools/sentiment/untrusted-text.js +0 -1
- package/dist/tools/sentiment/web-search.d.ts +1 -1
- package/dist/tools/sentiment/web-search.js +0 -1
- package/dist/tools/sentiment/web-sentiment.js +0 -1
- package/dist/tools/technical/backtest.js +0 -1
- package/dist/tools/technical/indicators.js +1 -2
- package/dist/types/fundamentals.d.ts +1 -0
- package/dist/types/fundamentals.js +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +0 -1
- package/dist/types/macro.js +0 -1
- package/dist/types/market.d.ts +8 -0
- package/dist/types/market.js +0 -1
- package/dist/types/options.d.ts +1 -0
- package/dist/types/options.js +0 -1
- package/dist/types/portfolio.js +0 -1
- package/dist/types/prediction-markets.d.ts +13 -0
- package/dist/types/prediction-markets.js +1 -0
- package/dist/types/sentiment.js +0 -1
- package/dist/workflows/compare-assets.js +0 -1
- package/dist/workflows/index.js +0 -1
- package/dist/workflows/options-screener.js +0 -1
- package/dist/workflows/portfolio-builder.js +0 -1
- package/gui/web/dist/assets/CatalogOverlay-CAc7e3Pf.js +1 -0
- package/gui/web/dist/assets/index-BOEKd9wT.css +2 -0
- package/gui/web/dist/assets/index-C-H05cQ2.js +65 -0
- package/gui/web/dist/index.html +2 -2
- package/package.json +16 -22
- package/dist/analysts/contracts.js.map +0 -1
- package/dist/analysts/orchestrator.js.map +0 -1
- package/dist/cli-main.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/doctor/cli-command.js.map +0 -1
- package/dist/doctor/render.js.map +0 -1
- package/dist/doctor/report.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/infra/cache.js.map +0 -1
- package/dist/infra/http-client.js.map +0 -1
- package/dist/infra/index.js.map +0 -1
- package/dist/infra/native-dependencies.js.map +0 -1
- package/dist/infra/node-version.js.map +0 -1
- package/dist/infra/open-url.js.map +0 -1
- package/dist/infra/opencandle-paths.js.map +0 -1
- package/dist/infra/rate-limiter.js.map +0 -1
- package/dist/market-state/alert-conditions.js.map +0 -1
- package/dist/market-state/alert-runner.js.map +0 -1
- package/dist/market-state/daily-report.js.map +0 -1
- package/dist/market-state/local-automation-service.js.map +0 -1
- package/dist/market-state/notification-delivery.js.map +0 -1
- package/dist/market-state/resolve-for-mutation.js.map +0 -1
- package/dist/market-state/resolve.js.map +0 -1
- package/dist/market-state/service.js.map +0 -1
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/manager.js.map +0 -1
- package/dist/memory/preference-extractor.js.map +0 -1
- package/dist/memory/retrieval.js.map +0 -1
- package/dist/memory/sqlite.js.map +0 -1
- package/dist/memory/storage.js.map +0 -1
- package/dist/memory/tool-defaults.js.map +0 -1
- package/dist/memory/types.js.map +0 -1
- package/dist/monitor.js.map +0 -1
- package/dist/onboarding/connect.js.map +0 -1
- package/dist/onboarding/credential-interceptor.js.map +0 -1
- package/dist/onboarding/degradation-accumulator.js.map +0 -1
- package/dist/onboarding/prompt-user.js.map +0 -1
- package/dist/onboarding/provider-status.js.map +0 -1
- package/dist/onboarding/providers.js.map +0 -1
- package/dist/onboarding/state.js.map +0 -1
- package/dist/onboarding/tool-helpers.js.map +0 -1
- package/dist/onboarding/tool-tags.js.map +0 -1
- package/dist/onboarding/validation.js.map +0 -1
- package/dist/pi/opencandle-extension.js.map +0 -1
- package/dist/pi/session-action-dedupe.js.map +0 -1
- package/dist/pi/session-storage.js.map +0 -1
- package/dist/pi/session-writer-lock.js.map +0 -1
- package/dist/pi/session.js.map +0 -1
- package/dist/pi/setup.js.map +0 -1
- package/dist/pi/tool-adapter.js.map +0 -1
- package/dist/pi/tui-session-coordinator.js.map +0 -1
- package/dist/prompts/context-builder.js.map +0 -1
- package/dist/prompts/disclaimer.js.map +0 -1
- package/dist/prompts/policy-cards.js.map +0 -1
- package/dist/prompts/sections.js.map +0 -1
- package/dist/prompts/symbol-preflight.js.map +0 -1
- package/dist/prompts/workflow-prompts.js.map +0 -1
- package/dist/providers/alpha-vantage.js.map +0 -1
- package/dist/providers/coingecko.js.map +0 -1
- package/dist/providers/errors.js.map +0 -1
- package/dist/providers/exa-search.js.map +0 -1
- package/dist/providers/external-tool-command.js.map +0 -1
- package/dist/providers/external-tool-error.js.map +0 -1
- package/dist/providers/fear-greed.js.map +0 -1
- package/dist/providers/finnhub.js.map +0 -1
- package/dist/providers/fred.js.map +0 -1
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/provider-credential-error.js.map +0 -1
- package/dist/providers/reddit-cli.js.map +0 -1
- package/dist/providers/reddit.js.map +0 -1
- package/dist/providers/sec-edgar.js.map +0 -1
- package/dist/providers/tradingview.js.map +0 -1
- package/dist/providers/twitter-cli.js.map +0 -1
- package/dist/providers/twitter.js.map +0 -1
- package/dist/providers/web-search.js.map +0 -1
- package/dist/providers/with-fallback.js.map +0 -1
- package/dist/providers/wrap-provider.js.map +0 -1
- package/dist/providers/yahoo-finance.js.map +0 -1
- package/dist/routing/classify-intent.js.map +0 -1
- package/dist/routing/defaults.js.map +0 -1
- package/dist/routing/entity-extractor.js.map +0 -1
- package/dist/routing/fund-symbols.js.map +0 -1
- package/dist/routing/horizon.js.map +0 -1
- package/dist/routing/index.js.map +0 -1
- package/dist/routing/legacy-rule-router.js.map +0 -1
- package/dist/routing/planning.js.map +0 -1
- package/dist/routing/route-manifest.js.map +0 -1
- package/dist/routing/router-llm-client.js.map +0 -1
- package/dist/routing/router-prompt.js.map +0 -1
- package/dist/routing/router-types.js.map +0 -1
- package/dist/routing/router.js.map +0 -1
- package/dist/routing/slot-resolver.js.map +0 -1
- package/dist/routing/symbol-disambiguator.js.map +0 -1
- package/dist/routing/turn-context.js.map +0 -1
- package/dist/routing/types.js.map +0 -1
- package/dist/runtime/answer-contracts.js.map +0 -1
- package/dist/runtime/artifact-contracts.js.map +0 -1
- package/dist/runtime/evidence.js.map +0 -1
- package/dist/runtime/planning-evidence.js.map +0 -1
- package/dist/runtime/prompt-step.js.map +0 -1
- package/dist/runtime/provider-tracker.js.map +0 -1
- package/dist/runtime/run-context.js.map +0 -1
- package/dist/runtime/session-coordinator.js.map +0 -1
- package/dist/runtime/session-title.js.map +0 -1
- package/dist/runtime/tool-defaults-wrapper.js.map +0 -1
- package/dist/runtime/validation.js.map +0 -1
- package/dist/runtime/workflow-events.js.map +0 -1
- package/dist/runtime/workflow-runner.js.map +0 -1
- package/dist/runtime/workflow-types.js.map +0 -1
- package/dist/sentiment/adapters/finnhub.js.map +0 -1
- package/dist/sentiment/adapters/reddit.js.map +0 -1
- package/dist/sentiment/adapters/twitter.js.map +0 -1
- package/dist/sentiment/adapters/web.js.map +0 -1
- package/dist/sentiment/index.js.map +0 -1
- package/dist/sentiment/insights.js.map +0 -1
- package/dist/sentiment/keywords.js.map +0 -1
- package/dist/sentiment/pipeline.js.map +0 -1
- package/dist/sentiment/scorer.js.map +0 -1
- package/dist/sentiment/store.js.map +0 -1
- package/dist/sentiment/trends.js.map +0 -1
- package/dist/sentiment/types.js.map +0 -1
- package/dist/system-prompt.js.map +0 -1
- package/dist/tool-kit.js.map +0 -1
- package/dist/tools/fundamentals/company-overview.js.map +0 -1
- package/dist/tools/fundamentals/comps.js.map +0 -1
- package/dist/tools/fundamentals/dcf.js.map +0 -1
- package/dist/tools/fundamentals/earnings.js.map +0 -1
- package/dist/tools/fundamentals/financials.js.map +0 -1
- package/dist/tools/fundamentals/sec-filings.js.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/interaction/ask-user.js.map +0 -1
- package/dist/tools/macro/fear-greed.js.map +0 -1
- package/dist/tools/macro/fred-data.js.map +0 -1
- package/dist/tools/market/crypto-history.js.map +0 -1
- package/dist/tools/market/crypto-price.js.map +0 -1
- package/dist/tools/market/screen-stocks.js.map +0 -1
- package/dist/tools/market/search-ticker.js.map +0 -1
- package/dist/tools/market/stock-history.js.map +0 -1
- package/dist/tools/market/stock-quote.js.map +0 -1
- package/dist/tools/options/greeks.js.map +0 -1
- package/dist/tools/options/option-chain.js.map +0 -1
- package/dist/tools/portfolio/alerts.js.map +0 -1
- package/dist/tools/portfolio/correlation.js.map +0 -1
- package/dist/tools/portfolio/daily-report.js.map +0 -1
- package/dist/tools/portfolio/holdings-overlap.js.map +0 -1
- package/dist/tools/portfolio/notifications.js.map +0 -1
- package/dist/tools/portfolio/risk-analysis.js.map +0 -1
- package/dist/tools/portfolio/tracker.js.map +0 -1
- package/dist/tools/portfolio/watchlist.js.map +0 -1
- package/dist/tools/sentiment/insight-format.js.map +0 -1
- package/dist/tools/sentiment/query-match.js.map +0 -1
- package/dist/tools/sentiment/reddit-sentiment.js.map +0 -1
- package/dist/tools/sentiment/sentiment-summary.js.map +0 -1
- package/dist/tools/sentiment/sentiment-trend.js.map +0 -1
- package/dist/tools/sentiment/twitter-sentiment.js.map +0 -1
- package/dist/tools/sentiment/untrusted-text.js.map +0 -1
- package/dist/tools/sentiment/web-search.js.map +0 -1
- package/dist/tools/sentiment/web-sentiment.js.map +0 -1
- package/dist/tools/technical/backtest.js.map +0 -1
- package/dist/tools/technical/indicators.js.map +0 -1
- package/dist/types/fundamentals.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/macro.js.map +0 -1
- package/dist/types/market.js.map +0 -1
- package/dist/types/options.js.map +0 -1
- package/dist/types/portfolio.js.map +0 -1
- package/dist/types/sentiment.js.map +0 -1
- package/dist/workflows/compare-assets.js.map +0 -1
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/options-screener.js.map +0 -1
- package/dist/workflows/portfolio-builder.js.map +0 -1
- package/gui/server/ask-user-bridge.ts +0 -89
- package/gui/server/automation-heartbeat.ts +0 -97
- package/gui/server/background-quotes.ts +0 -127
- package/gui/server/chat-event-adapter.ts +0 -210
- package/gui/server/chat-run-session.ts +0 -16
- package/gui/server/gui-session-manager.ts +0 -5
- package/gui/server/http-routes.ts +0 -953
- package/gui/server/invoke-tool.ts +0 -489
- package/gui/server/live-chat-event-adapter.ts +0 -208
- package/gui/server/local-session-coordinator.ts +0 -97
- package/gui/server/market-state-api.ts +0 -273
- package/gui/server/model-setup.ts +0 -254
- package/gui/server/package.json +0 -5
- package/gui/server/private-api-access.ts +0 -62
- package/gui/server/projector.ts +0 -263
- package/gui/server/prompt-observation.ts +0 -58
- package/gui/server/quote-snapshot-store.ts +0 -50
- package/gui/server/server.ts +0 -289
- package/gui/server/session-actions.ts +0 -331
- package/gui/server/session-entry-wait.ts +0 -160
- package/gui/server/shutdown.ts +0 -47
- package/gui/server/tool-invoke-ack.ts +0 -49
- package/gui/server/tool-metadata.ts +0 -167
- package/gui/server/websocket.ts +0 -138
- package/gui/server/writer-lock.ts +0 -1
- package/gui/server/ws-hub.ts +0 -391
- package/gui/shared/chat-events.ts +0 -156
- package/gui/shared/event-reducer.ts +0 -219
- package/gui/web/dist/assets/CatalogOverlay-ChRTKNlf.js +0 -1
- package/gui/web/dist/assets/index-BzyqyVnd.css +0 -2
- package/gui/web/dist/assets/index-DvMjkOP9.js +0 -65
- package/src/analysts/contracts.ts +0 -176
- package/src/analysts/orchestrator.ts +0 -224
- package/src/cli-main.ts +0 -510
- package/src/cli.ts +0 -17
- package/src/config.ts +0 -272
- package/src/doctor/cli-command.ts +0 -83
- package/src/doctor/render.ts +0 -37
- package/src/doctor/report.ts +0 -638
- package/src/index.ts +0 -5
- package/src/infra/cache.ts +0 -114
- package/src/infra/http-client.ts +0 -134
- package/src/infra/index.ts +0 -14
- package/src/infra/native-dependencies.ts +0 -84
- package/src/infra/node-version.ts +0 -23
- package/src/infra/open-url.ts +0 -28
- package/src/infra/opencandle-paths.ts +0 -53
- package/src/infra/rate-limiter.ts +0 -76
- package/src/market-state/alert-conditions.ts +0 -82
- package/src/market-state/alert-runner.ts +0 -863
- package/src/market-state/daily-report.ts +0 -237
- package/src/market-state/local-automation-service.ts +0 -162
- package/src/market-state/notification-delivery.ts +0 -158
- package/src/market-state/resolve-for-mutation.ts +0 -24
- package/src/market-state/resolve.ts +0 -112
- package/src/market-state/service.ts +0 -2208
- package/src/memory/index.ts +0 -10
- package/src/memory/manager.ts +0 -190
- package/src/memory/preference-extractor.ts +0 -106
- package/src/memory/retrieval.ts +0 -71
- package/src/memory/sqlite.ts +0 -577
- package/src/memory/storage.ts +0 -195
- package/src/memory/tool-defaults.ts +0 -108
- package/src/memory/types.ts +0 -71
- package/src/monitor.ts +0 -123
- package/src/onboarding/connect.ts +0 -177
- package/src/onboarding/credential-interceptor.ts +0 -122
- package/src/onboarding/degradation-accumulator.ts +0 -77
- package/src/onboarding/prompt-user.ts +0 -85
- package/src/onboarding/provider-status.ts +0 -382
- package/src/onboarding/providers.ts +0 -414
- package/src/onboarding/state.ts +0 -216
- package/src/onboarding/tool-helpers.ts +0 -104
- package/src/onboarding/tool-tags.ts +0 -244
- package/src/onboarding/validation.ts +0 -152
- package/src/pi/opencandle-extension.ts +0 -1244
- package/src/pi/session-action-dedupe.ts +0 -155
- package/src/pi/session-storage.ts +0 -5
- package/src/pi/session-writer-lock.ts +0 -426
- package/src/pi/session.ts +0 -84
- package/src/pi/setup.ts +0 -399
- package/src/pi/tool-adapter.ts +0 -49
- package/src/pi/tui-session-coordinator.ts +0 -351
- package/src/prompts/context-builder.ts +0 -326
- package/src/prompts/disclaimer.ts +0 -9
- package/src/prompts/policy-cards.ts +0 -228
- package/src/prompts/sections.ts +0 -46
- package/src/prompts/symbol-preflight.ts +0 -80
- package/src/prompts/workflow-prompts.ts +0 -504
- package/src/providers/alpha-vantage.ts +0 -334
- package/src/providers/coingecko.ts +0 -93
- package/src/providers/errors.ts +0 -9
- package/src/providers/exa-search.ts +0 -375
- package/src/providers/external-tool-command.ts +0 -164
- package/src/providers/external-tool-error.ts +0 -20
- package/src/providers/fear-greed.ts +0 -45
- package/src/providers/finnhub.ts +0 -125
- package/src/providers/fred.ts +0 -83
- package/src/providers/index.ts +0 -17
- package/src/providers/provider-credential-error.ts +0 -23
- package/src/providers/reddit-cli.ts +0 -286
- package/src/providers/reddit.ts +0 -106
- package/src/providers/sec-edgar.ts +0 -326
- package/src/providers/tradingview.ts +0 -399
- package/src/providers/twitter-cli.ts +0 -202
- package/src/providers/twitter.ts +0 -102
- package/src/providers/web-search.ts +0 -303
- package/src/providers/with-fallback.ts +0 -42
- package/src/providers/wrap-provider.ts +0 -103
- package/src/providers/yahoo-finance.ts +0 -672
- package/src/routing/classify-intent.ts +0 -380
- package/src/routing/defaults.ts +0 -29
- package/src/routing/entity-extractor.ts +0 -540
- package/src/routing/fund-symbols.ts +0 -58
- package/src/routing/horizon.ts +0 -7
- package/src/routing/index.ts +0 -70
- package/src/routing/legacy-rule-router.ts +0 -13
- package/src/routing/planning.ts +0 -829
- package/src/routing/route-manifest.ts +0 -308
- package/src/routing/router-llm-client.ts +0 -52
- package/src/routing/router-prompt.ts +0 -159
- package/src/routing/router-types.ts +0 -84
- package/src/routing/router.ts +0 -997
- package/src/routing/slot-resolver.ts +0 -213
- package/src/routing/symbol-disambiguator.ts +0 -72
- package/src/routing/turn-context.ts +0 -108
- package/src/routing/types.ts +0 -77
- package/src/runtime/answer-contracts.ts +0 -693
- package/src/runtime/artifact-contracts.ts +0 -77
- package/src/runtime/evidence.ts +0 -77
- package/src/runtime/planning-evidence.ts +0 -682
- package/src/runtime/prompt-step.ts +0 -60
- package/src/runtime/provider-tracker.ts +0 -40
- package/src/runtime/run-context.ts +0 -32
- package/src/runtime/session-coordinator.ts +0 -632
- package/src/runtime/session-title.ts +0 -60
- package/src/runtime/tool-defaults-wrapper.ts +0 -43
- package/src/runtime/validation.ts +0 -211
- package/src/runtime/workflow-events.ts +0 -75
- package/src/runtime/workflow-runner.ts +0 -182
- package/src/runtime/workflow-types.ts +0 -102
- package/src/sentiment/adapters/finnhub.ts +0 -49
- package/src/sentiment/adapters/reddit.ts +0 -65
- package/src/sentiment/adapters/twitter.ts +0 -36
- package/src/sentiment/adapters/web.ts +0 -44
- package/src/sentiment/index.ts +0 -49
- package/src/sentiment/insights.ts +0 -269
- package/src/sentiment/keywords.ts +0 -31
- package/src/sentiment/pipeline.ts +0 -91
- package/src/sentiment/scorer.ts +0 -89
- package/src/sentiment/store.ts +0 -260
- package/src/sentiment/trends.ts +0 -96
- package/src/sentiment/types.ts +0 -112
- package/src/system-prompt.ts +0 -115
- package/src/tool-kit.ts +0 -69
- package/src/tools/AGENTS.md +0 -36
- package/src/tools/fundamentals/company-overview.ts +0 -64
- package/src/tools/fundamentals/comps.ts +0 -169
- package/src/tools/fundamentals/dcf.ts +0 -367
- package/src/tools/fundamentals/earnings.ts +0 -57
- package/src/tools/fundamentals/financials.ts +0 -63
- package/src/tools/fundamentals/sec-filings.ts +0 -105
- package/src/tools/index.ts +0 -101
- package/src/tools/interaction/ask-user.ts +0 -93
- package/src/tools/macro/fear-greed.ts +0 -41
- package/src/tools/macro/fred-data.ts +0 -92
- package/src/tools/market/crypto-history.ts +0 -72
- package/src/tools/market/crypto-price.ts +0 -53
- package/src/tools/market/screen-stocks.ts +0 -279
- package/src/tools/market/search-ticker.ts +0 -254
- package/src/tools/market/stock-history.ts +0 -104
- package/src/tools/market/stock-quote.ts +0 -67
- package/src/tools/options/greeks.ts +0 -81
- package/src/tools/options/option-chain.ts +0 -120
- package/src/tools/portfolio/alerts.ts +0 -457
- package/src/tools/portfolio/correlation.ts +0 -189
- package/src/tools/portfolio/daily-report.ts +0 -107
- package/src/tools/portfolio/holdings-overlap.ts +0 -139
- package/src/tools/portfolio/notifications.ts +0 -45
- package/src/tools/portfolio/risk-analysis.ts +0 -173
- package/src/tools/portfolio/tracker.ts +0 -308
- package/src/tools/portfolio/watchlist.ts +0 -288
- package/src/tools/sentiment/insight-format.ts +0 -50
- package/src/tools/sentiment/query-match.ts +0 -117
- package/src/tools/sentiment/reddit-sentiment.ts +0 -403
- package/src/tools/sentiment/sentiment-summary.ts +0 -383
- package/src/tools/sentiment/sentiment-trend.ts +0 -75
- package/src/tools/sentiment/twitter-sentiment.ts +0 -287
- package/src/tools/sentiment/untrusted-text.ts +0 -21
- package/src/tools/sentiment/web-search.ts +0 -186
- package/src/tools/sentiment/web-sentiment.ts +0 -96
- package/src/tools/technical/backtest.ts +0 -336
- package/src/tools/technical/indicators.ts +0 -281
- package/src/types/fundamentals.ts +0 -46
- package/src/types/index.ts +0 -25
- package/src/types/macro.ts +0 -27
- package/src/types/market.ts +0 -44
- package/src/types/options.ts +0 -52
- package/src/types/portfolio.ts +0 -83
- package/src/types/sentiment.ts +0 -129
- package/src/workflows/compare-assets.ts +0 -89
- package/src/workflows/index.ts +0 -3
- package/src/workflows/options-screener.ts +0 -125
- package/src/workflows/portfolio-builder.ts +0 -63
|
@@ -15,6 +15,75 @@ export class MarketStateService {
|
|
|
15
15
|
.get();
|
|
16
16
|
return mapCollection(row);
|
|
17
17
|
}
|
|
18
|
+
listWatchlists() {
|
|
19
|
+
this.getDefaultWatchlist();
|
|
20
|
+
const rows = this.db
|
|
21
|
+
.prepare("SELECT * FROM watchlists ORDER BY is_default DESC, name COLLATE NOCASE")
|
|
22
|
+
.all();
|
|
23
|
+
return rows.map(mapCollection);
|
|
24
|
+
}
|
|
25
|
+
createWatchlist(name) {
|
|
26
|
+
const normalized = normalizeCollectionName(name);
|
|
27
|
+
const now = new Date().toISOString();
|
|
28
|
+
this.db
|
|
29
|
+
.prepare(`INSERT OR IGNORE INTO watchlists (name, is_default, created_at, updated_at)
|
|
30
|
+
VALUES (?, 0, ?, ?)`)
|
|
31
|
+
.run(normalized, now, now);
|
|
32
|
+
const row = this.db
|
|
33
|
+
.prepare("SELECT * FROM watchlists WHERE name = ? LIMIT 1")
|
|
34
|
+
.get(normalized);
|
|
35
|
+
return mapCollection(row);
|
|
36
|
+
}
|
|
37
|
+
getWatchlistByName(name) {
|
|
38
|
+
const normalized = normalizeCollectionName(name);
|
|
39
|
+
const row = this.db
|
|
40
|
+
.prepare("SELECT * FROM watchlists WHERE name = ? LIMIT 1")
|
|
41
|
+
.get(normalized);
|
|
42
|
+
return row == null ? null : mapCollection(row);
|
|
43
|
+
}
|
|
44
|
+
renameWatchlist(currentName, nextName) {
|
|
45
|
+
const current = this.getWatchlistByName(currentName);
|
|
46
|
+
if (current == null)
|
|
47
|
+
throw new Error(`watchlist ${currentName.trim()} not found.`);
|
|
48
|
+
const normalizedNext = normalizeCollectionName(nextName);
|
|
49
|
+
const now = new Date().toISOString();
|
|
50
|
+
this.db
|
|
51
|
+
.prepare("UPDATE watchlists SET name = ?, updated_at = ? WHERE id = ?")
|
|
52
|
+
.run(normalizedNext, now, current.id);
|
|
53
|
+
const row = this.db.prepare("SELECT * FROM watchlists WHERE id = ? LIMIT 1").get(current.id);
|
|
54
|
+
if (row == null)
|
|
55
|
+
throw new Error("renamed watchlist could not be loaded.");
|
|
56
|
+
return mapCollection(row);
|
|
57
|
+
}
|
|
58
|
+
deleteWatchlist(name) {
|
|
59
|
+
const watchlists = this.listWatchlists();
|
|
60
|
+
const current = this.getWatchlistByName(name);
|
|
61
|
+
if (current == null)
|
|
62
|
+
throw new Error(`watchlist ${name.trim()} not found.`);
|
|
63
|
+
if (watchlists.length <= 1)
|
|
64
|
+
throw new Error("cannot delete the last remaining watchlist.");
|
|
65
|
+
const selected = watchlists.find((watchlist) => watchlist.id !== current.id);
|
|
66
|
+
if (selected == null)
|
|
67
|
+
throw new Error("replacement watchlist could not be selected.");
|
|
68
|
+
const selectAndDelete = this.db.transaction(() => {
|
|
69
|
+
if (current.isDefault) {
|
|
70
|
+
this.db.prepare("UPDATE watchlists SET is_default = 0 WHERE id = ?").run(current.id);
|
|
71
|
+
this.db.prepare("UPDATE watchlists SET is_default = 1 WHERE id = ?").run(selected.id);
|
|
72
|
+
}
|
|
73
|
+
this.db.prepare("DELETE FROM watchlists WHERE id = ?").run(current.id);
|
|
74
|
+
});
|
|
75
|
+
selectAndDelete();
|
|
76
|
+
const row = this.db.prepare("SELECT * FROM watchlists WHERE id = ? LIMIT 1").get(selected.id);
|
|
77
|
+
if (row == null)
|
|
78
|
+
throw new Error("replacement watchlist could not be loaded.");
|
|
79
|
+
return mapCollection(row);
|
|
80
|
+
}
|
|
81
|
+
getOrCreateWatchlist(name) {
|
|
82
|
+
const normalized = normalizeNullable(name);
|
|
83
|
+
if (normalized == null)
|
|
84
|
+
return this.getDefaultWatchlist();
|
|
85
|
+
return this.getWatchlistByName(normalized) ?? this.createWatchlist(normalized);
|
|
86
|
+
}
|
|
18
87
|
getDefaultPortfolio() {
|
|
19
88
|
const now = new Date().toISOString();
|
|
20
89
|
this.db
|
|
@@ -30,6 +99,60 @@ export class MarketStateService {
|
|
|
30
99
|
baseCurrency: row.base_currency,
|
|
31
100
|
};
|
|
32
101
|
}
|
|
102
|
+
listPortfolios() {
|
|
103
|
+
this.getDefaultPortfolio();
|
|
104
|
+
const rows = this.db
|
|
105
|
+
.prepare("SELECT * FROM portfolios ORDER BY is_default DESC, name COLLATE NOCASE")
|
|
106
|
+
.all();
|
|
107
|
+
return rows.map((row) => ({ ...mapCollection(row), baseCurrency: row.base_currency }));
|
|
108
|
+
}
|
|
109
|
+
createPortfolio(name, baseCurrency = "USD") {
|
|
110
|
+
const normalized = normalizeCollectionName(name);
|
|
111
|
+
const existing = this.getPortfolioByName(normalized);
|
|
112
|
+
if (existing != null)
|
|
113
|
+
return existing;
|
|
114
|
+
const normalizedCurrency = baseCurrency.trim().toUpperCase() || "USD";
|
|
115
|
+
const now = new Date().toISOString();
|
|
116
|
+
this.db
|
|
117
|
+
.prepare(`INSERT OR IGNORE INTO portfolios (name, base_currency, is_default, created_at, updated_at)
|
|
118
|
+
VALUES (?, ?, 0, ?, ?)`)
|
|
119
|
+
.run(normalized, normalizedCurrency, now, now);
|
|
120
|
+
const row = this.db
|
|
121
|
+
.prepare("SELECT * FROM portfolios WHERE name = ? LIMIT 1")
|
|
122
|
+
.get(normalized);
|
|
123
|
+
return { ...mapCollection(row), baseCurrency: row.base_currency };
|
|
124
|
+
}
|
|
125
|
+
getPortfolioByName(name) {
|
|
126
|
+
const normalized = normalizeCollectionName(name);
|
|
127
|
+
const row = this.db
|
|
128
|
+
.prepare("SELECT * FROM portfolios WHERE name = ? LIMIT 1")
|
|
129
|
+
.get(normalized);
|
|
130
|
+
return row == null ? null : { ...mapCollection(row), baseCurrency: row.base_currency };
|
|
131
|
+
}
|
|
132
|
+
renamePortfolio(currentName, nextName) {
|
|
133
|
+
const current = this.getPortfolioByName(currentName);
|
|
134
|
+
if (current == null)
|
|
135
|
+
throw new Error(`portfolio ${currentName.trim()} not found.`);
|
|
136
|
+
const normalizedNext = normalizeCollectionName(nextName);
|
|
137
|
+
const existing = this.getPortfolioByName(normalizedNext);
|
|
138
|
+
if (existing != null && existing.id !== current.id) {
|
|
139
|
+
throw new Error(`portfolio ${normalizedNext} already exists.`);
|
|
140
|
+
}
|
|
141
|
+
const now = new Date().toISOString();
|
|
142
|
+
this.db
|
|
143
|
+
.prepare("UPDATE portfolios SET name = ?, updated_at = ? WHERE id = ?")
|
|
144
|
+
.run(normalizedNext, now, current.id);
|
|
145
|
+
const row = this.db.prepare("SELECT * FROM portfolios WHERE id = ? LIMIT 1").get(current.id);
|
|
146
|
+
if (row == null)
|
|
147
|
+
throw new Error("renamed portfolio could not be loaded.");
|
|
148
|
+
return { ...mapCollection(row), baseCurrency: row.base_currency };
|
|
149
|
+
}
|
|
150
|
+
getOrCreatePortfolio(name) {
|
|
151
|
+
const normalized = normalizeNullable(name);
|
|
152
|
+
if (normalized == null)
|
|
153
|
+
return this.getDefaultPortfolio();
|
|
154
|
+
return this.getPortfolioByName(normalized) ?? this.createPortfolio(normalized);
|
|
155
|
+
}
|
|
33
156
|
findInstrumentByAlias(lookup) {
|
|
34
157
|
const source = normalizeSource(lookup.source);
|
|
35
158
|
const sourceId = normalizeNullable(lookup.sourceId);
|
|
@@ -66,11 +189,9 @@ export class MarketStateService {
|
|
|
66
189
|
if (existing) {
|
|
67
190
|
this.db
|
|
68
191
|
.prepare(`UPDATE watchlist_items
|
|
69
|
-
SET
|
|
70
|
-
notes = ?, tags_json = ?, source = ?, source_row_id = ?,
|
|
71
|
-
source_metadata_json = ?, updated_at = ?
|
|
192
|
+
SET source = ?, source_row_id = ?, source_metadata_json = ?, updated_at = ?
|
|
72
193
|
WHERE id = ?`)
|
|
73
|
-
.run(params.
|
|
194
|
+
.run(params.source === undefined ? existing.source : normalizeNullable(params.source), params.sourceRowId === undefined
|
|
74
195
|
? existing.source_row_id
|
|
75
196
|
: normalizeNullable(params.sourceRowId), params.sourceMetadata === undefined
|
|
76
197
|
? existing.source_metadata_json
|
|
@@ -81,12 +202,11 @@ export class MarketStateService {
|
|
|
81
202
|
}
|
|
82
203
|
const result = this.db
|
|
83
204
|
.prepare(`INSERT INTO watchlist_items (
|
|
84
|
-
watchlist_id, instrument_id,
|
|
85
|
-
|
|
86
|
-
source_metadata_json, created_at, updated_at
|
|
205
|
+
watchlist_id, instrument_id, source, source_row_id, source_metadata_json,
|
|
206
|
+
created_at, updated_at
|
|
87
207
|
)
|
|
88
|
-
VALUES (?, ?, ?, ?, ?, ?,
|
|
89
|
-
.run(watchlistId, instrument.id,
|
|
208
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)`)
|
|
209
|
+
.run(watchlistId, instrument.id, normalizeNullable(params.source), normalizeNullable(params.sourceRowId), params.sourceMetadata == null ? null : JSON.stringify(params.sourceMetadata), now, now);
|
|
90
210
|
return Number(result.lastInsertRowid);
|
|
91
211
|
});
|
|
92
212
|
return this.getWatchlistItem(tx());
|
|
@@ -109,26 +229,6 @@ export class MarketStateService {
|
|
|
109
229
|
.run(watchlistId, symbol.trim().toUpperCase());
|
|
110
230
|
return result.changes > 0;
|
|
111
231
|
}
|
|
112
|
-
updateWatchlistItemBySymbol(symbol, params) {
|
|
113
|
-
const watchlistId = params.watchlistId ?? this.getDefaultWatchlist().id;
|
|
114
|
-
const existing = this.db
|
|
115
|
-
.prepare(`SELECT wi.*
|
|
116
|
-
FROM watchlist_items wi
|
|
117
|
-
JOIN instruments i ON i.id = wi.instrument_id
|
|
118
|
-
WHERE wi.watchlist_id = ? AND i.symbol = ?
|
|
119
|
-
LIMIT 1`)
|
|
120
|
-
.get(watchlistId, symbol.trim().toUpperCase());
|
|
121
|
-
if (existing == null)
|
|
122
|
-
return null;
|
|
123
|
-
const now = new Date().toISOString();
|
|
124
|
-
this.db
|
|
125
|
-
.prepare(`UPDATE watchlist_items
|
|
126
|
-
SET target_price = ?, stop_price = ?, price_currency = ?, thesis = ?,
|
|
127
|
-
notes = ?, tags_json = ?, updated_at = ?
|
|
128
|
-
WHERE id = ?`)
|
|
129
|
-
.run(params.targetPrice === undefined ? existing.target_price : params.targetPrice, params.stopPrice === undefined ? existing.stop_price : params.stopPrice, params.priceCurrency === undefined ? existing.price_currency : params.priceCurrency, params.thesis === undefined ? existing.thesis : params.thesis, params.notes === undefined ? existing.notes : params.notes, params.tags == null ? existing.tags_json : JSON.stringify(params.tags), now, existing.id);
|
|
130
|
-
return this.getWatchlistItem(existing.id);
|
|
131
|
-
}
|
|
132
232
|
addPortfolioLot(params) {
|
|
133
233
|
assertPositiveFinitePortfolioLotNumber(params.quantity, "quantity");
|
|
134
234
|
assertPositiveFinitePortfolioLotNumber(params.avgCost, "average cost");
|
|
@@ -234,6 +334,46 @@ export class MarketStateService {
|
|
|
234
334
|
return null;
|
|
235
335
|
return this.getAlertRule(id);
|
|
236
336
|
}
|
|
337
|
+
updateAlertRule(id, params) {
|
|
338
|
+
const existing = this.db.prepare("SELECT * FROM alert_rules WHERE id = ?").get(id);
|
|
339
|
+
if (existing == null)
|
|
340
|
+
return null;
|
|
341
|
+
const now = new Date().toISOString();
|
|
342
|
+
this.db
|
|
343
|
+
.prepare(`UPDATE alert_rules
|
|
344
|
+
SET scope_type = ?,
|
|
345
|
+
scope_id = ?,
|
|
346
|
+
instrument_id = ?,
|
|
347
|
+
condition_type = ?,
|
|
348
|
+
condition_version = ?,
|
|
349
|
+
condition_json = ?,
|
|
350
|
+
timeframe = ?,
|
|
351
|
+
enabled = ?,
|
|
352
|
+
check_interval_seconds = ?,
|
|
353
|
+
next_check_at = ?,
|
|
354
|
+
last_checked_at = NULL,
|
|
355
|
+
last_observed_json = NULL,
|
|
356
|
+
status = 'active',
|
|
357
|
+
retrigger_mode = ?,
|
|
358
|
+
last_condition_state = 'unknown',
|
|
359
|
+
rule_revision = rule_revision + 1,
|
|
360
|
+
arm_cycle_id = arm_cycle_id + 1,
|
|
361
|
+
cooldown_seconds = ?,
|
|
362
|
+
last_triggered_at = NULL,
|
|
363
|
+
updated_at = ?
|
|
364
|
+
WHERE id = ?`)
|
|
365
|
+
.run(params.scopeType ?? existing.scope_type, params.scopeId === undefined ? existing.scope_id : params.scopeId, params.instrumentId === undefined ? existing.instrument_id : params.instrumentId, params.conditionType ?? existing.condition_type, params.conditionVersion ?? existing.condition_version, JSON.stringify(params.condition === undefined ? JSON.parse(existing.condition_json) : params.condition), params.timeframe ?? existing.timeframe, params.enabled === undefined ? existing.enabled : params.enabled ? 1 : 0, params.checkIntervalSeconds === undefined
|
|
366
|
+
? existing.check_interval_seconds
|
|
367
|
+
: params.checkIntervalSeconds, params.nextCheckAt === undefined ? existing.next_check_at : params.nextCheckAt, params.retriggerMode ?? existing.retrigger_mode, params.cooldownSeconds === undefined ? existing.cooldown_seconds : params.cooldownSeconds, now, id);
|
|
368
|
+
return this.getAlertRule(id);
|
|
369
|
+
}
|
|
370
|
+
deleteAlertRule(id) {
|
|
371
|
+
const existing = this.db.prepare("SELECT * FROM alert_rules WHERE id = ?").get(id);
|
|
372
|
+
if (existing == null)
|
|
373
|
+
return null;
|
|
374
|
+
this.db.prepare("DELETE FROM alert_rules WHERE id = ?").run(id);
|
|
375
|
+
return mapAlertRule(existing);
|
|
376
|
+
}
|
|
237
377
|
getInstrument(id) {
|
|
238
378
|
const row = this.db.prepare("SELECT * FROM instruments WHERE id = ?").get(id);
|
|
239
379
|
return row == null ? null : mapInstrument(row);
|
|
@@ -811,12 +951,6 @@ function mapWatchlistItem(row) {
|
|
|
811
951
|
assetType: row.asset_type,
|
|
812
952
|
exchange: row.exchange,
|
|
813
953
|
currency: row.currency,
|
|
814
|
-
targetPrice: row.target_price,
|
|
815
|
-
stopPrice: row.stop_price,
|
|
816
|
-
priceCurrency: row.price_currency,
|
|
817
|
-
thesis: row.thesis,
|
|
818
|
-
notes: row.notes,
|
|
819
|
-
tags: row.tags_json == null ? null : JSON.parse(row.tags_json),
|
|
820
954
|
source: row.source,
|
|
821
955
|
sourceRowId: row.source_row_id,
|
|
822
956
|
sourceMetadata: row.source_metadata_json == null ? null : JSON.parse(row.source_metadata_json),
|
|
@@ -824,6 +958,12 @@ function mapWatchlistItem(row) {
|
|
|
824
958
|
updatedAt: row.updated_at,
|
|
825
959
|
};
|
|
826
960
|
}
|
|
961
|
+
function normalizeCollectionName(name) {
|
|
962
|
+
const normalized = name.trim();
|
|
963
|
+
if (!normalized)
|
|
964
|
+
throw new Error("watchlist name is required.");
|
|
965
|
+
return normalized;
|
|
966
|
+
}
|
|
827
967
|
function mapPortfolioLot(row) {
|
|
828
968
|
return {
|
|
829
969
|
id: row.id,
|
|
@@ -1033,4 +1173,3 @@ function normalizeExchange(value) {
|
|
|
1033
1173
|
function normalizeAssetType(value) {
|
|
1034
1174
|
return normalizeNullable(value)?.toLowerCase() ?? null;
|
|
1035
1175
|
}
|
|
1036
|
-
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PortfolioLotRecord, ReportRunRecord, WatchlistItemRecord } from "./service.js";
|
|
2
|
+
export declare function formatPortfolioSummary(lots: PortfolioLotRecord[], limit?: number): string[];
|
|
3
|
+
export declare function formatWatchlistSummary(items: WatchlistItemRecord[], limit?: number): string[];
|
|
4
|
+
export declare function formatLatestReportSummary(report: ReportRunRecord | undefined, options?: {
|
|
5
|
+
includeSummary?: boolean;
|
|
6
|
+
}): string[];
|
|
7
|
+
export declare function formatMoney(value: number, currency: string): string;
|
|
8
|
+
export declare function formatJsonSummary(value: unknown): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export function formatPortfolioSummary(lots, limit = 8) {
|
|
2
|
+
if (lots.length === 0)
|
|
3
|
+
return [];
|
|
4
|
+
const lines = ["Portfolio lots:"];
|
|
5
|
+
for (const lot of lots.slice(0, limit)) {
|
|
6
|
+
const costBasis = formatMoney(lot.quantity * lot.avgCost, lot.currency);
|
|
7
|
+
const name = lot.name ? ` (${lot.name})` : "";
|
|
8
|
+
lines.push(`- ${lot.symbol}: ${lot.quantity} @ ${formatMoney(lot.avgCost, lot.currency)}, cost basis ${costBasis}${name}`);
|
|
9
|
+
}
|
|
10
|
+
return lines;
|
|
11
|
+
}
|
|
12
|
+
export function formatWatchlistSummary(items, limit = 8) {
|
|
13
|
+
if (items.length === 0)
|
|
14
|
+
return [];
|
|
15
|
+
const lines = ["Watchlist:"];
|
|
16
|
+
for (const item of items.slice(0, limit)) {
|
|
17
|
+
lines.push(`- ${item.symbol}${item.name ? ` (${item.name})` : ""}`);
|
|
18
|
+
}
|
|
19
|
+
return lines;
|
|
20
|
+
}
|
|
21
|
+
export function formatLatestReportSummary(report, options = {}) {
|
|
22
|
+
if (!report)
|
|
23
|
+
return [];
|
|
24
|
+
const completed = report.completedAt ?? report.startedAt;
|
|
25
|
+
const summary = options.includeSummary === false ? "" : formatJsonSummary(report.summaryJson);
|
|
26
|
+
const lines = [
|
|
27
|
+
`Latest report run: ${report.status} at ${completed}${summary ? ` — ${summary}` : ""}`,
|
|
28
|
+
];
|
|
29
|
+
const reportText = options.includeSummary === false ? "" : extractReportText(report.summaryJson);
|
|
30
|
+
if (reportText)
|
|
31
|
+
lines.push("Report text:", truncateText(reportText, 8_000));
|
|
32
|
+
return lines;
|
|
33
|
+
}
|
|
34
|
+
export function formatMoney(value, currency) {
|
|
35
|
+
const normalized = currency.toUpperCase();
|
|
36
|
+
if (normalized === "USD")
|
|
37
|
+
return `$${value.toFixed(2)}`;
|
|
38
|
+
return `${normalized} ${value.toFixed(2)}`;
|
|
39
|
+
}
|
|
40
|
+
export function formatJsonSummary(value) {
|
|
41
|
+
if (value == null)
|
|
42
|
+
return "";
|
|
43
|
+
const json = JSON.stringify(value);
|
|
44
|
+
if (json.length <= 90)
|
|
45
|
+
return json;
|
|
46
|
+
return `${json.slice(0, 87)}...`;
|
|
47
|
+
}
|
|
48
|
+
function extractReportText(value) {
|
|
49
|
+
if (!value || typeof value !== "object" || !("text" in value))
|
|
50
|
+
return "";
|
|
51
|
+
const text = value.text;
|
|
52
|
+
return typeof text === "string" ? text.trim() : "";
|
|
53
|
+
}
|
|
54
|
+
function truncateText(value, maxLength) {
|
|
55
|
+
if (value.length <= maxLength)
|
|
56
|
+
return value;
|
|
57
|
+
return `${value.slice(0, maxLength - 3)}...`;
|
|
58
|
+
}
|
package/dist/memory/index.js
CHANGED
|
@@ -5,4 +5,3 @@ export { getSchemaVersion, getTableNames, initDatabase, initDefaultDatabase } fr
|
|
|
5
5
|
export { MemoryStorage } from "./storage.js";
|
|
6
6
|
export { clearDefault, getAllDefaults, getDefaults, setDefault } from "./tool-defaults.js";
|
|
7
7
|
export { isStale, NEVER_TRUST_FROM_MEMORY, STALENESS_THRESHOLDS } from "./types.js";
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/dist/memory/manager.js
CHANGED
package/dist/memory/retrieval.js
CHANGED
package/dist/memory/sqlite.js
CHANGED
|
@@ -2,7 +2,7 @@ import { mkdirSync } from "node:fs";
|
|
|
2
2
|
import { dirname } from "node:path";
|
|
3
3
|
import Database from "better-sqlite3";
|
|
4
4
|
import { ensureOpenCandleHomeDir, getStateDbPath } from "../infra/opencandle-paths.js";
|
|
5
|
-
const CURRENT_SCHEMA_VERSION =
|
|
5
|
+
const CURRENT_SCHEMA_VERSION = 9;
|
|
6
6
|
const CURRENT_SCHEMA = `
|
|
7
7
|
CREATE TABLE IF NOT EXISTS schema_version (
|
|
8
8
|
version INTEGER NOT NULL
|
|
@@ -105,7 +105,8 @@ const CURRENT_SCHEMA = `
|
|
|
105
105
|
name TEXT NOT NULL,
|
|
106
106
|
is_default INTEGER NOT NULL DEFAULT 0,
|
|
107
107
|
created_at TEXT NOT NULL,
|
|
108
|
-
updated_at TEXT NOT NULL
|
|
108
|
+
updated_at TEXT NOT NULL,
|
|
109
|
+
UNIQUE(name)
|
|
109
110
|
);
|
|
110
111
|
|
|
111
112
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_watchlists_one_default
|
|
@@ -116,12 +117,6 @@ const CURRENT_SCHEMA = `
|
|
|
116
117
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
117
118
|
watchlist_id INTEGER NOT NULL,
|
|
118
119
|
instrument_id INTEGER NOT NULL,
|
|
119
|
-
thesis TEXT,
|
|
120
|
-
notes TEXT,
|
|
121
|
-
tags_json TEXT,
|
|
122
|
-
target_price REAL,
|
|
123
|
-
stop_price REAL,
|
|
124
|
-
price_currency TEXT,
|
|
125
120
|
source TEXT,
|
|
126
121
|
source_row_id TEXT,
|
|
127
122
|
source_metadata_json TEXT,
|
|
@@ -355,19 +350,26 @@ function ensureCurrentSchema(db) {
|
|
|
355
350
|
db.exec(CURRENT_SCHEMA);
|
|
356
351
|
return;
|
|
357
352
|
}
|
|
353
|
+
if (currentVersion === 8) {
|
|
354
|
+
migrateV8ToV9(db);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
358
357
|
if (currentVersion === 7) {
|
|
359
358
|
migrateV7ToV8(db);
|
|
359
|
+
migrateV8ToV9(db);
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
362
|
if (currentVersion === 6) {
|
|
363
363
|
migrateV6ToV7(db);
|
|
364
364
|
migrateV7ToV8(db);
|
|
365
|
+
migrateV8ToV9(db);
|
|
365
366
|
return;
|
|
366
367
|
}
|
|
367
368
|
if (currentVersion === 5) {
|
|
368
369
|
migrateV5ToV6(db);
|
|
369
370
|
migrateV6ToV7(db);
|
|
370
371
|
migrateV7ToV8(db);
|
|
372
|
+
migrateV8ToV9(db);
|
|
371
373
|
return;
|
|
372
374
|
}
|
|
373
375
|
if (currentVersion === 4) {
|
|
@@ -375,6 +377,7 @@ function ensureCurrentSchema(db) {
|
|
|
375
377
|
migrateV5ToV6(db);
|
|
376
378
|
migrateV6ToV7(db);
|
|
377
379
|
migrateV7ToV8(db);
|
|
380
|
+
migrateV8ToV9(db);
|
|
378
381
|
return;
|
|
379
382
|
}
|
|
380
383
|
if (currentVersion === 3) {
|
|
@@ -383,10 +386,12 @@ function ensureCurrentSchema(db) {
|
|
|
383
386
|
migrateV5ToV6(db);
|
|
384
387
|
migrateV6ToV7(db);
|
|
385
388
|
migrateV7ToV8(db);
|
|
389
|
+
migrateV8ToV9(db);
|
|
386
390
|
return;
|
|
387
391
|
}
|
|
388
|
-
// Additive v2 → v3 → ...
|
|
389
|
-
// prediction_records
|
|
392
|
+
// Additive v2 → v3 → ... migration without dropping data (v8 drops
|
|
393
|
+
// prediction_records and v9 drops watchlist item annotation columns as
|
|
394
|
+
// explicit feature removals).
|
|
390
395
|
if (currentVersion === 2) {
|
|
391
396
|
migrateV2ToV3(db);
|
|
392
397
|
migrateV3ToV4(db);
|
|
@@ -394,6 +399,7 @@ function ensureCurrentSchema(db) {
|
|
|
394
399
|
migrateV5ToV6(db);
|
|
395
400
|
migrateV6ToV7(db);
|
|
396
401
|
migrateV7ToV8(db);
|
|
402
|
+
migrateV8ToV9(db);
|
|
397
403
|
return;
|
|
398
404
|
}
|
|
399
405
|
// Any other mismatch (null first-run, or a foreign schema): reset.
|
|
@@ -456,6 +462,50 @@ function migrateV7ToV8(db) {
|
|
|
456
462
|
// Predictions feature removal: dropping prediction_records is the explicit,
|
|
457
463
|
// documented destructive step for this table; all other rows are preserved.
|
|
458
464
|
db.exec("DROP TABLE IF EXISTS prediction_records");
|
|
465
|
+
db.exec(CURRENT_SCHEMA);
|
|
466
|
+
db.prepare("DELETE FROM schema_version").run();
|
|
467
|
+
db.prepare("INSERT INTO schema_version (version) VALUES (?)").run(8);
|
|
468
|
+
}
|
|
469
|
+
function migrateV8ToV9(db) {
|
|
470
|
+
db.exec(`
|
|
471
|
+
CREATE TABLE IF NOT EXISTS watchlists_v9 (
|
|
472
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
473
|
+
name TEXT NOT NULL,
|
|
474
|
+
is_default INTEGER NOT NULL DEFAULT 0,
|
|
475
|
+
created_at TEXT NOT NULL,
|
|
476
|
+
updated_at TEXT NOT NULL,
|
|
477
|
+
UNIQUE(name)
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
INSERT OR IGNORE INTO watchlists_v9 (id, name, is_default, created_at, updated_at)
|
|
481
|
+
SELECT id, name, is_default, created_at, updated_at FROM watchlists;
|
|
482
|
+
|
|
483
|
+
DROP TABLE IF EXISTS watchlist_items_v9;
|
|
484
|
+
CREATE TABLE watchlist_items_v9 (
|
|
485
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
486
|
+
watchlist_id INTEGER NOT NULL,
|
|
487
|
+
instrument_id INTEGER NOT NULL,
|
|
488
|
+
source TEXT,
|
|
489
|
+
source_row_id TEXT,
|
|
490
|
+
source_metadata_json TEXT,
|
|
491
|
+
created_at TEXT NOT NULL,
|
|
492
|
+
updated_at TEXT NOT NULL,
|
|
493
|
+
UNIQUE(watchlist_id, instrument_id),
|
|
494
|
+
FOREIGN KEY (watchlist_id) REFERENCES watchlists_v9(id) ON DELETE CASCADE,
|
|
495
|
+
FOREIGN KEY (instrument_id) REFERENCES instruments(id) ON DELETE RESTRICT
|
|
496
|
+
);
|
|
497
|
+
|
|
498
|
+
INSERT OR IGNORE INTO watchlist_items_v9 (
|
|
499
|
+
id, watchlist_id, instrument_id, source, source_row_id, source_metadata_json, created_at, updated_at
|
|
500
|
+
)
|
|
501
|
+
SELECT id, watchlist_id, instrument_id, source, source_row_id, source_metadata_json, created_at, updated_at
|
|
502
|
+
FROM watchlist_items;
|
|
503
|
+
|
|
504
|
+
DROP TABLE watchlist_items;
|
|
505
|
+
DROP TABLE watchlists;
|
|
506
|
+
ALTER TABLE watchlists_v9 RENAME TO watchlists;
|
|
507
|
+
ALTER TABLE watchlist_items_v9 RENAME TO watchlist_items;
|
|
508
|
+
`);
|
|
459
509
|
db.exec(CURRENT_SCHEMA);
|
|
460
510
|
db.prepare("DELETE FROM schema_version").run();
|
|
461
511
|
db.prepare("INSERT INTO schema_version (version) VALUES (?)").run(CURRENT_SCHEMA_VERSION);
|
|
@@ -524,4 +574,3 @@ export function getSchemaVersion(db) {
|
|
|
524
574
|
const row = db.prepare("SELECT version FROM schema_version LIMIT 1").get();
|
|
525
575
|
return row?.version ?? 0;
|
|
526
576
|
}
|
|
527
|
-
//# sourceMappingURL=sqlite.js.map
|
package/dist/memory/storage.js
CHANGED
package/dist/memory/types.js
CHANGED
package/dist/monitor.js
CHANGED
|
@@ -20,4 +20,4 @@ export interface PromptResult {
|
|
|
20
20
|
*
|
|
21
21
|
* When neither a handler nor a UI is available, returns `{answer: null, cancelled: true}`.
|
|
22
22
|
*/
|
|
23
|
-
export declare function promptUser(ctx: ExtensionContext, opts: PromptOptions, handler?: AskUserHandler): Promise<PromptResult>;
|
|
23
|
+
export declare function promptUser(ctx: ExtensionContext | undefined, opts: PromptOptions, handler?: AskUserHandler): Promise<PromptResult>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type ApiKeyProviderId = "alpha_vantage" | "fred" | "finnhub" | "brave" | "exa";
|
|
2
2
|
export type ExternalToolProviderId = "twitter" | "reddit";
|
|
3
|
-
export type PublicHttpProviderId = "yahoo";
|
|
3
|
+
export type PublicHttpProviderId = "polymarket" | "tradingview" | "yahoo";
|
|
4
4
|
export type ProviderId = ApiKeyProviderId | ExternalToolProviderId | PublicHttpProviderId;
|
|
5
5
|
export type ProviderCategory = "fundamentals" | "macro" | "news" | "web_search" | "sentiment" | "market";
|
|
6
6
|
export type ProviderTier = "hard" | "soft";
|
|
@@ -139,6 +139,30 @@ export declare const PROVIDERS: readonly [{
|
|
|
139
139
|
readonly fallbackDescription: null;
|
|
140
140
|
readonly snoozeDurationDays: 7;
|
|
141
141
|
readonly instructionsHint: "No account needed; OpenCandle checks public Yahoo Finance reachability";
|
|
142
|
+
}, {
|
|
143
|
+
readonly id: "polymarket";
|
|
144
|
+
readonly kind: "public-http";
|
|
145
|
+
readonly displayName: "Polymarket";
|
|
146
|
+
readonly category: "macro";
|
|
147
|
+
readonly tier: "hard";
|
|
148
|
+
readonly aliases: readonly ["polymarket", "prediction-markets", "event-probabilities"];
|
|
149
|
+
readonly probeUrl: "https://gamma-api.polymarket.com/public-search?q=fed%20rate%20cut&limit=1";
|
|
150
|
+
readonly unlocks: readonly ["market-implied event probabilities", "prediction-market resolution criteria"];
|
|
151
|
+
readonly fallbackDescription: null;
|
|
152
|
+
readonly snoozeDurationDays: 7;
|
|
153
|
+
readonly instructionsHint: "No account needed; OpenCandle checks public Polymarket Gamma reachability";
|
|
154
|
+
}, {
|
|
155
|
+
readonly id: "tradingview";
|
|
156
|
+
readonly kind: "public-http";
|
|
157
|
+
readonly displayName: "TradingView Scanner";
|
|
158
|
+
readonly category: "market";
|
|
159
|
+
readonly tier: "soft";
|
|
160
|
+
readonly aliases: readonly ["tradingview", "tradingview-scanner", "screener"];
|
|
161
|
+
readonly probeUrl: "https://scanner.tradingview.com/america/scan2?label-product=screener-stock";
|
|
162
|
+
readonly unlocks: readonly ["stock screens", "ticker search fallback", "watchlist quote fallback"];
|
|
163
|
+
readonly fallbackDescription: "Core market quote/history tools continue through Yahoo and Alpha Vantage when TradingView scanner is unavailable";
|
|
164
|
+
readonly snoozeDurationDays: 7;
|
|
165
|
+
readonly instructionsHint: "No account needed; OpenCandle checks the public TradingView scanner endpoint";
|
|
142
166
|
}, {
|
|
143
167
|
readonly id: "twitter";
|
|
144
168
|
readonly kind: "external-tool";
|
|
@@ -125,6 +125,32 @@ export const PROVIDERS = [
|
|
|
125
125
|
snoozeDurationDays: 7,
|
|
126
126
|
instructionsHint: "No account needed; OpenCandle checks public Yahoo Finance reachability",
|
|
127
127
|
},
|
|
128
|
+
{
|
|
129
|
+
id: "polymarket",
|
|
130
|
+
kind: "public-http",
|
|
131
|
+
displayName: "Polymarket",
|
|
132
|
+
category: "macro",
|
|
133
|
+
tier: "hard",
|
|
134
|
+
aliases: ["polymarket", "prediction-markets", "event-probabilities"],
|
|
135
|
+
probeUrl: "https://gamma-api.polymarket.com/public-search?q=fed%20rate%20cut&limit=1",
|
|
136
|
+
unlocks: ["market-implied event probabilities", "prediction-market resolution criteria"],
|
|
137
|
+
fallbackDescription: null,
|
|
138
|
+
snoozeDurationDays: 7,
|
|
139
|
+
instructionsHint: "No account needed; OpenCandle checks public Polymarket Gamma reachability",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "tradingview",
|
|
143
|
+
kind: "public-http",
|
|
144
|
+
displayName: "TradingView Scanner",
|
|
145
|
+
category: "market",
|
|
146
|
+
tier: "soft",
|
|
147
|
+
aliases: ["tradingview", "tradingview-scanner", "screener"],
|
|
148
|
+
probeUrl: "https://scanner.tradingview.com/america/scan2?label-product=screener-stock",
|
|
149
|
+
unlocks: ["stock screens", "ticker search fallback", "watchlist quote fallback"],
|
|
150
|
+
fallbackDescription: "Core market quote/history tools continue through Yahoo and Alpha Vantage when TradingView scanner is unavailable",
|
|
151
|
+
snoozeDurationDays: 7,
|
|
152
|
+
instructionsHint: "No account needed; OpenCandle checks the public TradingView scanner endpoint",
|
|
153
|
+
},
|
|
128
154
|
{
|
|
129
155
|
id: "twitter",
|
|
130
156
|
kind: "external-tool",
|
|
@@ -301,4 +327,3 @@ export function resolveProviderFromArgument(arg) {
|
|
|
301
327
|
}
|
|
302
328
|
return undefined;
|
|
303
329
|
}
|
|
304
|
-
//# sourceMappingURL=providers.js.map
|
package/dist/onboarding/state.js
CHANGED