Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aaronjmars/MiroShark
/ functions
Functions
3,647 in github.com/aaronjmars/MiroShark
⨍
Functions
3,647
◇
Types & classes
172
↳
Endpoints
175
↓ 1 callers
Function
_python_string_literal
Render ``text`` as a Python string literal usable in source code. Uses ``repr()`` so any byte sequence — including arbitrary numbers of conse
backend/app/services/notebook_export.py:208
↓ 1 callers
Function
_quality_colors
(health: str)
backend/app/services/share_card.py:403
↓ 1 callers
Function
_quality_health_bucket
Return the normalised quality bucket for a sim, or ``None`` when the file is missing / unparsable / carries an unrecognised value. Case-insen
backend/app/services/outcome_distribution.py:186
↓ 1 callers
Function
_quality_health_for_sim
Return the normalised ``quality.health`` value for a sim, or ``None`` if the quality file is missing / unparsable / carries an unrecognised va
backend/app/services/project_stats.py:196
↓ 1 callers
Function
_quality_tier
Lowercased first-word of ``quality_health`` so ``"Excellent"`` → ``"excellent"`` and ``"Good with caveats"`` → ``"good"`` for matching. Retur
backend/app/services/gallery_filters.py:208
↓ 1 callers
Function
_read_director_events
Return the director events for the sim, or ``None`` if absent. Director events are stored in a JSONL file the runner writes; we surface them
backend/app/services/repro_export.py:241
↓ 1 callers
Function
_read_jsonl_paginated
Read and filter JSONL events with pagination.
backend/app/api/observability.py:300
↓ 1 callers
Function
_record_delivery
Persist a single delivery attempt to ``webhook-log.jsonl``. ``trigger`` is ``"auto"`` for the runner-fired path and ``"retry"`` for the manua
backend/app/services/webhook_service.py:422
↓ 1 callers
Method
_recv
(self, timeout: float)
backend/scripts/mcp_agent_bridge.py:124
↓ 1 callers
Function
_render_empty_frame
Single-frame poster shown when a simulation has no trajectory yet (e.g. a freshly published READY run). Keeps the endpoint from 500-ing and gi
backend/app/services/replay_gif.py:376
↓ 1 callers
Function
_render_frame
Draw a single 1200×630 frame for the GIF. ``frame`` is one entry from ``extract_frames_from_summary`` plus the round counter. ``total_rounds`
backend/app/services/replay_gif.py:298
↓ 1 callers
Function
_render_markdown
Render summary dict as a readable markdown report.
backend/app/utils/run_summary.py:342
↓ 1 callers
Function
_render_markdown_round
Append a `## Round N` block to ``lines``.
backend/app/services/transcript.py:386
↓ 1 callers
Function
_render_private_preview_html
Build the private-preview HTML returned for a valid share token. Differences from the public landing page in :func:`_render_landing_html`: *
backend/app/api/share.py:434
↓ 1 callers
Function
_request
Issue one WaybackClaw API HTTP call. Returns ``(ok, status_code, payload)``: * ``ok`` — True for 2xx, False otherwise. * ``status_cod
backend/app/services/waybackclaw_publisher.py:191
↓ 1 callers
Method
_request_ollama
Ollama /api/embed endpoint.
backend/app/storage/embedding_service.py:145
↓ 1 callers
Method
_request_openai
OpenAI-compatible /v1/embeddings endpoint.
backend/app/storage/embedding_service.py:153
↓ 1 callers
Method
_rerank_text
Extract the text used for cross-encoder rerank.
backend/app/storage/search_service.py:495
↓ 1 callers
Method
_research
Ask the LLM to research the entity. The prompt is crafted to get factual, structured information that's useful for persona generation
backend/app/services/web_enrichment.py:175
↓ 1 callers
Function
_resolution_colors
(resolution: dict)
backend/app/services/share_card.py:430
↓ 1 callers
Function
_resolution_label
(resolution: dict)
backend/app/services/share_card.py:414
↓ 1 callers
Function
_resolve_color
Map a direction string to the canonical stance colour. Case-insensitive on the trimmed leading token so ``"Bullish "`` and ``"bullish"`` reso
backend/app/services/badge_service.py:134
↓ 1 callers
Function
_resolve_paths
Locate the bundled mcp_server.py and the interpreter that should run it. The user copies these values into their MCP client config, so they must
backend/app/api/mcp.py:103
↓ 1 callers
Function
_resolve_risk_tier
Map a quality-health string to one of the three risk tiers. Case-insensitive match on the leading word so ``"Excellent "`` and ``"excellent"`
backend/app/services/signal_service.py:111
↓ 1 callers
Function
_resolve_share_url
Prefer the absolute ``share_url`` when ``PUBLIC_BASE_URL`` was set. Falls back to the relative ``share_path`` so the embed always carries som
backend/app/services/discord_notify.py:152
↓ 1 callers
Function
_resolve_share_url
Prefer the absolute ``share_url`` — Telegram inline-keyboard buttons require an absolute ``http(s)://`` URL.
backend/app/services/telegram_notify.py:212
↓ 1 callers
Function
_resolve_share_url
Prefer the absolute ``share_url`` — Slack only renders button URLs for absolute ``http(s)://`` values.
backend/app/services/slack_notify.py:128
↓ 1 callers
Function
_resolve_webhook_secret
Read ``WEBHOOK_SECRET`` at call time. Late binding mirrors :func:`_resolve_webhook_url` so a Settings change or an ``os.environ`` mutation ta
backend/app/services/webhook_service.py:457
↓ 1 callers
Function
_round_count_bucket
Map a round count to ``short`` / ``medium`` / ``long``. ``< 10`` → ``short``; ``10..20`` → ``medium``; ``> 20`` → ``long``. The medium band s
backend/app/services/outcome_distribution.py:223
↓ 1 callers
Function
_round_delta
Summed absolute round-over-round belief swing. ``|Δbullish| + |Δneutral| + |Δbearish|`` — the exact swing ``peak_round.compute_peak_rounds``
backend/app/services/volatility_service.py:88
↓ 1 callers
Function
_round_stance_split
Compute the round's bullish/neutral/bearish percent split. Same algorithm the embed-summary endpoint runs over the full trajectory — average
backend/app/services/transcript.py:123
↓ 1 callers
Function
_round_stance_split
Compute a round's bullish / neutral / bearish percent split. Same algorithm the share card and trajectory CSV use, applied to a single snapsh
backend/app/services/thread_formatter.py:62
↓ 1 callers
Function
_row_from_snapshot
Project one trajectory snapshot into one CSV / JSONL row. Returns ``None`` for snapshots that aren't usable as analyst rows (missing round nu
backend/app/services/trajectory_export.py:135
↓ 1 callers
Function
_run_config_retry_impl
()
backend/app/api/simulation.py:2783
↓ 1 callers
Method
_run_edge_graph_traversal
BFS from seed entity UUIDs, returning edges within GRAPH_SEARCH_HOPS.
backend/app/storage/search_service.py:360
↓ 1 callers
Method
_run_edge_keyword_search
Run fulltext (BM25) search on edge fact + name.
backend/app/storage/search_service.py:291
↓ 1 callers
Method
_run_edge_vector_search
Run vector similarity search on edge fact_embedding.
backend/app/storage/search_service.py:262
↓ 1 callers
Method
_run_node_graph_traversal
1-hop neighbors of seed entities — expands the entity candidate pool.
backend/app/storage/search_service.py:394
↓ 1 callers
Function
_run_prepare_impl
()
backend/app/api/simulation.py:1902
↓ 1 callers
Method
_run_round_analysis
Run belief updates and round analysis after each round.
backend/scripts/run_reddit_simulation.py:572
↓ 1 callers
Function
_safe_call
Invoke ``builder()`` and return the bytes — never raise. A best-effort archive must survive a missing artifact, a corrupt artifact, or an ups
backend/app/services/archive_service.py:165
↓ 1 callers
Function
_safe_int
(value: Any, default: int = 0)
backend/app/services/agent_export.py:188
↓ 1 callers
Function
_safe_int
Coerce ``value`` to a non-negative int with a default fallback.
backend/app/services/lineage_service.py:89
↓ 1 callers
Function
_safe_int
Coerce ``value`` to an int with a fallback.
backend/app/services/clone_service.py:119
↓ 1 callers
Function
_safe_load_trajectory
Read ``trajectory.json`` from ``sim_dir``; ``None`` on any failure. Never raises — a missing or corrupt trajectory file must resolve to "no d
backend/app/services/peak_round.py:61
↓ 1 callers
Method
_save_polymarket_json
Save Polymarket profiles as JSON format. Each entry matches the structure expected by Wonderwall's UserInfo: UserInfo(name=.
backend/app/services/wonderwall_profile_generator.py:1409
↓ 1 callers
Function
_scan_distribution
One-shot scan of ``sim_root`` — no cache, no locking.
backend/app/services/outcome_distribution.py:409
↓ 1 callers
Function
_scan_platform_stats
One-shot scan of ``sim_root`` — no cache, no locking.
backend/app/services/platform_stats.py:329
↓ 1 callers
Function
_scan_project_stats
One-shot scan of ``sim_root`` filtered to ``project_id`` — no cache, no locking. An empty ``project_id`` short-circuits to the all-zero envel
backend/app/services/project_stats.py:397
↓ 1 callers
Function
_scenario_cache_get
(key: str)
backend/app/api/simulation.py:382
↓ 1 callers
Function
_scenario_cache_put
(key: str, value: dict)
backend/app/api/simulation.py:386
↓ 1 callers
Function
_scenario_for
Compose the scenario preview from config + state fallbacks.
backend/app/services/lineage_service.py:144
↓ 1 callers
Function
_scenario_rate_limited
Return True if this IP has exceeded the per-window call budget.
backend/app/api/simulation.py:372
↓ 1 callers
Function
_scenario_text
Lowercased scenario for case-insensitive substring matching.
backend/app/services/gallery_filters.py:225
↓ 1 callers
Function
_scenario_title
Pull the scenario text from ``simulation_config.json`` and truncate it for the activity feed. Returns the empty string when the config is mis
backend/app/services/activity_feed.py:196
↓ 1 callers
Method
_search_graph_for_entity
Use GraphStorage hybrid search to obtain rich information related to entity Uses storage.search() (hybrid vector + BM25) for both ed
backend/app/services/wonderwall_profile_generator.py:443
↓ 1 callers
Method
_select_agents_by_name
Select agents by name without an LLM call. Matches against realname and username fields (case-insensitive, substring match).
backend/app/services/graph_tools.py:1683
↓ 1 callers
Method
_select_agents_for_interview
Use LLM to select Agents for interview
backend/app/services/graph_tools.py:1612
↓ 1 callers
Method
_select_device
Pick a torch device for the cross-encoder. Honors an explicit ``RERANKER_DEVICE`` override; otherwise prefers CUDA and falls back to
backend/app/storage/reranker_service.py:46
↓ 1 callers
Function
_select_md_rounds
Pick which rounds to render in the markdown body. Returns ``(rounds_to_render, skipped_count)``. Under the cap we render every round; over th
backend/app/services/transcript.py:370
↓ 1 callers
Method
_send
(self, obj: Dict[str, Any])
backend/scripts/mcp_agent_bridge.py:118
↓ 1 callers
Function
_send_message_url
Telegram Bot API ``sendMessage`` URL for ``token``.
backend/app/services/telegram_notify.py:337
↓ 1 callers
Method
_setup_file_handler
Set up file handler to write logs to file simultaneously
backend/app/services/report_agent.py:358
↓ 1 callers
Method
_setup_main_logger
Set up the main simulation logger
backend/scripts/action_logger.py:142
↓ 1 callers
Function
_sha256_hex
Return the lower-case hex digest of the SHA-256 of ``payload``.
backend/app/services/bibtex_service.py:209
↓ 1 callers
Function
_sha256_hex
(payload_bytes: bytes)
backend/app/services/waybackclaw_publisher.py:331
↓ 1 callers
Function
_sha256_hex
Hex SHA-256 of the given bytes — matches the citation-hash convention used in ``reproduce.json``'s anchored DKG record.
backend/app/services/archive_service.py:143
↓ 1 callers
Function
_sha256_hex
(payload_bytes: bytes)
backend/app/services/dkg_publisher.py:323
↓ 1 callers
Function
_signal_for_sim
Derive the same signal payload ``signal_service.compute_signal`` would emit for this sim, or ``None`` if the trajectory is empty.
backend/app/services/project_stats.py:154
↓ 1 callers
Function
_signal_for_sim
Return ``(signal_payload, total_rounds)`` for one sim. The signal payload is the same dict :mod:`signal_service.compute_signal` emits for the
backend/app/services/batch_status.py:144
↓ 1 callers
Function
_signal_for_sim
Derive the same signal payload ``signal_service.compute_signal`` would emit for this sim, or ``None`` if the trajectory is empty. Reads ``qua
backend/app/services/platform_stats.py:141
↓ 1 callers
Function
_signal_for_sim
Derive the same signal payload ``signal_service.compute_signal`` would emit for this sim, or ``None`` if the trajectory has no parseable belie
backend/app/services/outcome_distribution.py:160
↓ 1 callers
Function
_signal_for_sim
Return ``(signal_payload, total_rounds)`` for one completed sim. Signal payload is the same dict :mod:`signal_service.compute_signal` emits f
backend/app/services/activity_feed.py:167
↓ 1 callers
Function
_social_metrics_for_entity_type
Derive social media metrics from entity type and graph structure. Replaces the previous random.randint() fallbacks with values grounded in th
backend/app/services/wonderwall_profile_generator.py:174
↓ 1 callers
Function
_source_url
Compose the canonical standalone-surface URL for ``filename``. Returns the empty string when ``base_url`` is missing so the manifest carries
backend/app/services/archive_service.py:149
↓ 1 callers
Function
_stance_label
(position: float)
backend/wonderwall/social_agent/belief_state.py:383
↓ 1 callers
Function
_start_dispatch_thread
( *, message: MIMEMultipart, host: str, port: int, from_addr: str, to_addrs: List[str]
backend/app/services/email_notify.py:621
↓ 1 callers
Function
_start_dispatch_thread
Launch the daemon thread that POSTs the embed and logs the result.
backend/app/services/discord_notify.py:292
↓ 1 callers
Function
_start_dispatch_thread
Launch the daemon thread that POSTs the message and logs.
backend/app/services/telegram_notify.py:411
↓ 1 callers
Function
_start_dispatch_thread
(url: str, message: Dict[str, Any], thread_name: str)
backend/app/services/slack_notify.py:284
↓ 1 callers
Function
_status_pill
(summary: dict)
backend/app/services/share_card.py:390
↓ 1 callers
Function
_status_verb
(status: str)
backend/app/services/telegram_notify.py:202
↓ 1 callers
Function
_status_verb
(status: str)
backend/app/services/slack_notify.py:140
↓ 1 callers
Function
_step_polymarket
(active_agents=active)
backend/scripts/run_parallel_simulation.py:2730
↓ 1 callers
Function
_step_reddit
(active_agents=active)
backend/scripts/run_parallel_simulation.py:2685
↓ 1 callers
Function
_step_twitter
(active_agents=active)
backend/scripts/run_parallel_simulation.py:2652
↓ 1 callers
Method
_summarize
One batched LLM call → {title, summary} per cluster.
backend/app/storage/community_builder.py:285
↓ 1 callers
Method
_summarize_entities
Generate entity summary
backend/app/services/simulation_config_generator.py:463
↓ 1 callers
Method
_supports_anthropic_prompt_cache
Return True when the configured model is Claude-family and cache flag is on. OpenRouter passes ``cache_control`` blocks through to Anthropic;
backend/app/utils/llm_client.py:168
↓ 1 callers
Function
_surface_views_for_sim
Sum every recognised key in this sim's ``surface-stats.json``. Ignores unknown keys — same posture as ``platform_stats``. Returns ``0`` when
backend/app/services/project_stats.py:176
↓ 1 callers
Function
_surface_views_for_sim
Sum every recognised key in this sim's ``surface-stats.json``. Ignores ``total`` (it's a synthetic field added by ``surface_stats.read_surfac
backend/app/services/platform_stats.py:166
↓ 1 callers
Function
_to_thread
(fn, *args, **kwargs)
backend/mcp_server.py:226
↓ 1 callers
Function
_tool_names_from_mcp_server
Extract every ``Tool(name="...")`` from mcp_server.py without importing it (importing would pull in the MCP SDK and Neo4j driver).
backend/tests/test_unit_mcp_api.py:40
↓ 1 callers
Function
_top_posts
(platform: str, limit: int = 5)
backend/app/api/simulation.py:9752
↓ 1 callers
Function
_trajectory_snapshots
Return the list of trajectory snapshots, or ``None`` when the trajectory file is missing / unparsable / shaped wrong.
backend/app/services/outcome_distribution.py:135
↓ 1 callers
Function
_trending_extract_link
Pull the first usable URL from an RSS or Atom entry. Atom feeds emit multiple <link> elements per entry: rel="alternate" is the article URL,
backend/app/api/simulation.py:955
↓ 1 callers
Function
_trending_extract_published
Pull the best available timestamp from an RSS or Atom entry.
backend/app/api/simulation.py:992
↓ 1 callers
Function
_trending_extract_source
Pick a human-readable source name from the channel/feed metadata.
backend/app/api/simulation.py:1007
↓ 1 callers
Function
_trending_fetch_all
Fetch every feed in parallel and merge the results, newest first.
backend/app/api/simulation.py:1104
↓ 1 callers
Function
_trending_get_feeds
Resolve the configured feed list from env, falling back to defaults.
backend/app/api/simulation.py:841
← previous
next →
1,001–1,100 of 3,647, ranked by callers