MCPcopy Create free account

hub / github.com/Thysrael/Horizon / functions

Functions669 in github.com/Thysrael/Horizon

↓ 110 callersMethodrun
Execute the complete workflow. Args: force_hours: Optional override for time window in hours
src/orchestrator.py:65
↓ 99 callersMethodprint
(self, *args, **kwargs)
src/services/email.py:39
↓ 37 callersFunction_run_async
Helper to run async coroutine in tests.
tests/test_webhook.py:418
↓ 31 callersMethodfetch
Fetch RSS feed items. Args: since: Only fetch items published after this time Returns: List[ContentItem]: Fe
src/scrapers/rss.py:32
↓ 29 callersMethodnotify
Send a webhook notification with template variable substitution. If request_body is empty, sends a GET request. If request_body is pr
src/services/webhook.py:546
↓ 21 callersFunction_render
Replace #{key} and #{key?params} placeholders in a template. Supports strings, dicts, and lists. For dicts/lists, walks all string values re
src/services/webhook.py:56
↓ 19 callersFunctionmake_item
(item_id: str, score: float, category: str | None)
tests/test_balanced_digest.py:21
↓ 17 callersFunction_make_config
(**overrides)
tests/test_minimax_client.py:15
↓ 17 callersMethodprint
(self, *args, **kwargs)
src/services/webhook.py:231
↓ 15 callersFunction_make_scraper
(config: OpenBBConfig, obb: object)
tests/test_openbb_scraper.py:44
↓ 14 callersFunction_expand_env_vars
Recursively expand ``${VAR}`` references inside any string leaves. Containers (dicts, lists, tuples) are walked; non-string leaves are return
src/storage/manager.py:20
↓ 14 callersFunction_make_config
(provider: AIProvider, model: str = "m", api_key_env: str = "K")
tests/test_chained_client.py:42
↓ 13 callersMethod_generate_id
Generate unique content item ID. Args: source_type: Source type (github, hackernews, etc.) subtype: Content subtype (
src/scrapers/base.py:36
↓ 13 callersFunction_make_config
(**kwargs)
tests/test_twitter.py:12
↓ 13 callersFunction_make_item
Create a minimal ContentItem for webhook tests.
tests/test_webhook.py:803
↓ 13 callersMethodcreate_run
(self, run_id: str | None = None)
src/mcp/run_store.py:33
↓ 12 callersFunction_record_metrics
(tool: str, ok: bool, duration_ms: float, error_code: str | None = None)
src/mcp/server.py:72
↓ 11 callersFunction_cfg
(**overrides)
tests/test_openbb_scraper.py:28
↓ 10 callersMethod_fetch_with_progress
Fetch from a scraper with progress indication. Args: name: Source name for display scraper: Scraper instance
src/orchestrator.py:328
↓ 10 callersFunction_item
( title: str, link: str, pub: str = "Sat, 27 Jun 2026 12:00:00 GMT", source: str | None = "Pub
tests/test_google_news.py:26
↓ 10 callersFunction_news_row
( *, title: str = "NVDA earnings beat", url: str = "https://example.com/nvda-earnings", date:
tests/test_openbb_scraper.py:54
↓ 10 callersFunction_now
()
tests/test_google_news.py:13
↓ 10 callersMethodfetch
Fetch articles from the GDELT DOC API. Args: since: Only fetch items published after this time (used to derive th
src/scrapers/gdelt.py:52
↓ 10 callersMethodfetch
Fetch articles from the Google News RSS search endpoint. Args: since: Only fetch items published after this time (used to derive
src/scrapers/google_news.py:62
↓ 10 callersMethodrun_dir
(self, run_id: str)
src/mcp/run_store.py:44
↓ 10 callersMethodsend_daily_summary
Send daily summary webhook notification. Handles language filtering, delivery mode (summary vs summary_and_items), and variable const
src/services/webhook.py:712
↓ 9 callersFunction_feed
(items_xml: str)
tests/test_google_news.py:17
↓ 9 callersFunction_mock_client
(text: str)
tests/test_google_news.py:45
↓ 9 callersMethod_should_fallback
Determine if an error warrants fallback to the next provider.
src/ai/client.py:595
↓ 8 callersMethod_cleanup
(self)
tests/test_webhook.py:1313
↓ 8 callersMethod_make_notifier
(self)
tests/test_webhook.py:1307
↓ 8 callersFunction_mock_client
(payload: dict | None = None)
tests/test_gdelt.py:16
↓ 8 callersFunction_run_resp
(run_id="run1", dataset_id="ds1")
tests/test_twitter.py:66
↓ 8 callersFunction_run_tool
(tool: str, runner: Callable[[], Awaitable[dict[str, Any]]])
src/mcp/server.py:94
↓ 8 callersFunction_status_resp
(status="SUCCEEDED")
tests/test_twitter.py:70
↓ 8 callersFunction_truncate
Truncate a string to at most *limit* characters by splitting on *split*. Segments are accumulated in order until adding the next one would ex
src/services/webhook.py:27
↓ 8 callersMethodcomplete
Generate completion using OpenAI-compatible API. Args: system: System prompt user: User prompt temperatur
src/ai/client.py:240
↓ 8 callersFunctioncreate_ai_client
Factory function to create appropriate AI client. Args: config: AI configuration Returns: AIClient: Initialized AI client
src/ai/client.py:639
↓ 8 callersMethodload_config
(self)
src/storage/manager.py:64
↓ 8 callersMethodupdate_meta
(self, run_id: str, updates: dict[str, Any])
src/mcp/run_store.py:71
↓ 7 callersFunction_err
(tool: str, error: Exception, duration_ms: float | None = None)
src/mcp/server.py:45
↓ 7 callersFunction_extract_headers
Parse custom headers from a multi-line "Key: Value" string. Args: headers_str: Multi-line string, each line "Key: Value" Returns:
src/services/webhook.py:172
↓ 7 callersFunction_isjson
Return True if the string starts with a JSON open brace.
src/services/webhook.py:131
↓ 7 callersFunction_make_item
(idx: int)
tests/test_summarizer.py:14
↓ 7 callersFunction_make_item
(item_id: str)
tests/test_analyzer.py:10
↓ 7 callersFunction_tweet
( tweet_id: str = "123456", screen_name: str = "karpathy", text: str = "Hello world", created_
tests/test_twitter.py:24
↓ 7 callersMethodanalyze_batch
(self, items: List[ContentItem])
src/ai/analyzer.py:44
↓ 7 callersMethodcomplete
Generate completion from AI model. Args: system: System prompt user: User prompt temperature: Optional sa
src/ai/client.py:93
↓ 7 callersMethodcomplete
( self, system: str, user: str, temperature: Optional[float] = None, m
src/ai/client.py:568
↓ 7 callersMethodload_subscribers
Loads the list of email subscribers.
src/storage/manager.py:120
↓ 7 callersMethodsend_daily_summary
Sends the daily summary to all subscribers.
src/services/email.py:154
↓ 6 callersFunction_articles_payload
()
tests/test_gdelt.py:25
↓ 6 callersMethod_build_context
( self, horizon_path: str | None, config_path: str | None, sources: list[str]
src/mcp/service.py:561
↓ 6 callersFunction_email_config
(**overrides)
tests/test_email.py:37
↓ 6 callersFunction_format_markdown_for_webhook
Flatten HTML constructs that chat/webhook Markdown often cannot render.
src/services/webhook.py:114
↓ 6 callersFunction_make_config
(**overrides)
tests/test_azure_client.py:15
↓ 6 callersFunction_make_ollama_config
(**overrides)
tests/test_minimax_client.py:27
↓ 6 callersFunction_ok
(tool: str, data: dict[str, Any], duration_ms: float | None = None)
src/mcp/server.py:31
↓ 6 callersFunction_pangu
Insert a space between CJK and ASCII letters/digits (Pangu spacing).
src/ai/summarizer.py:13
↓ 6 callersFunction_resource_result
(resource: str, loader: Callable[[], Any])
src/mcp/server.py:109
↓ 6 callersMethodfetch
(self, since: datetime)
src/scrapers/reddit.py:54
↓ 6 callersMethodgenerate_summary
Generate daily summary in Markdown format. Items are rendered in score-descending order (already sorted by orchestrator). Args:
src/ai/summarizer.py:70
↓ 6 callersMethodgenerate_webhook_item
Generate one item message for multi-message webhook delivery.
src/ai/summarizer.py:151
↓ 6 callersMethodload_items
(self, run_id: str, stage: str)
src/mcp/run_store.py:56
↓ 6 callersFunctionmake_item
(item_id: str, score: float | None = None)
tests/test_mcp_service_smoke.py:13
↓ 6 callersMethodsave_items
(self, run_id: str, stage: str, items: list[dict[str, Any]])
src/mcp/run_store.py:53
↓ 5 callersFunction_make_config
(fetch_comments: int = 1)
tests/test_reddit.py:10
↓ 5 callersMethodapply_balanced_digest
(self, items, log=True)
tests/test_mcp_service_smoke.py:171
↓ 5 callersFunctionmake_orchestrator
(filtering: FilteringConfig)
tests/test_balanced_digest.py:34
↓ 4 callersMethod_cleanup
(self)
tests/test_webhook.py:1517
↓ 4 callersMethod_coerce_datetime
Normalize whatever OpenBB returns for `date` into aware UTC.
src/scrapers/openbb.py:192
↓ 4 callersMethod_coerce_url
(value: Any)
src/scrapers/openbb.py:210
↓ 4 callersFunction_escape_markdown_text
Escape user-controlled text before embedding it in generated Markdown.
src/ai/markdown_utils.py:32
↓ 4 callersMethod_int
Best-effort conversion to int, defaulting to 0.
src/scrapers/ossinsight.py:137
↓ 4 callersMethod_load_stage_items
( self, run_id: str, stage: str, horizon_path: str | None, config_path
src/mcp/service.py:584
↓ 4 callersMethod_make_notifier
(self)
tests/test_webhook.py:1511
↓ 4 callersMethod_make_response
(text: str = "{}")
tests/test_minimax_client.py:215
↓ 4 callersFunction_reply_row
( tweet_id: str = "999", handle: str = "someone", text: str = "Great point!", likes: int = 5,
tests/test_twitter.py:48
↓ 4 callersFunction_resolve_api_key
(config: AIConfig, *, fallback: Optional[str] = None)
src/ai/client.py:39
↓ 4 callersFunction_strip_html_tags
Remove simple HTML tags and decode HTML entities.
src/ai/markdown_utils.py:27
↓ 4 callersMethodfilter_items
( self, run_id: str, threshold: float | None = None, source_stage: str = "scor
src/mcp/service.py:315
↓ 4 callersFunctionitems_to_dicts
Serialize Horizon ContentItem models.
src/mcp/horizon_adapter.py:243
↓ 4 callersFunctionmake_storage
Build Horizon storage manager bound to config's data directory.
src/mcp/horizon_adapter.py:171
↓ 4 callersFunctionparse_json_response
Try multiple strategies to extract a JSON object from an AI response. Returns the parsed dict, or None if all strategies fail.
src/ai/utils.py:8
↓ 4 callersMethodread_json
(self, run_id: str, filename: str)
src/mcp/run_store.py:118
↓ 4 callersFunctionrecord_usage
Accumulate token usage for a given provider. Args: provider: Provider identifier, e.g. "openai", "anthropic". input_tokens: Promp
src/ai/tokens.py:37
↓ 3 callersFunction_create_chained_client
Build a ChainedAIClient from a comma-separated provider chain.
src/ai/client.py:609
↓ 3 callersMethod_ensure_utc
(moment: datetime)
src/scrapers/gdelt.py:181
↓ 3 callersFunction_old_listing_html
()
tests/test_reddit.py:77
↓ 3 callersMethod_parse_int
(value: Any, default: int = 0)
src/scrapers/reddit.py:262
↓ 3 callersMethod_parse_json_response
Try multiple strategies to extract a JSON object from an AI response. Returns the parsed dict, or None if all strategies fail.
src/ai/enricher.py:95
↓ 3 callersFunction_prepare_variables_for_body
Apply webhook-safe variable formatting before body rendering.
src/services/webhook.py:119
↓ 3 callersMethod_process_posts
( self, posts: list, since: datetime, subtype: str, source_name: str,
src/scrapers/reddit.py:306
↓ 3 callersMethod_reddit_get
(self, url: str, params: dict)
src/scrapers/reddit.py:499
↓ 3 callersMethod_stage_file
(stage: str)
src/mcp/run_store.py:125
↓ 3 callersMethodappend_discussion_content
Append reply lines under Top Comments marker.
src/scrapers/twitter.py:206
↓ 3 callersMethodbuild_daily_summary_messages
Build the variables for all webhook messages for one language.
src/services/webhook.py:440
↓ 3 callersMethodbuild_preview
Build the fully rendered request for dry-run preview.
src/services/webhook.py:431
↓ 3 callersMethodfetch_items
( self, hours: int = 24, run_id: str | None = None, horizon_path: str | None =
src/mcp/service.py:222
↓ 3 callersMethodfetch_replies_for_item
Fetch reply texts for one tweet using scweet search mode.
src/scrapers/twitter.py:120
next →1–100 of 669, ranked by callers