MCPcopy Create free account

hub / github.com/aaronjmars/MiroShark / functions

Functions3,647 in github.com/aaronjmars/MiroShark

↓ 4 callersFunction_safe_str
Coerce ``value`` to a stripped string; ``None`` ⇒ empty.
backend/app/services/clone_service.py:90
↓ 4 callersFunction_short_sim_id
``sim_abc123def456`` → ``SIM_ABC123``.
backend/app/services/share_card.py:166
↓ 4 callersFunction_stance_dist
(snap)
backend/app/api/simulation.py:9824
↓ 4 callersFunction_wait_for_log_lines
Poll for the dispatcher to land ``expected`` rows in the log.
backend/tests/test_unit_webhook_signature.py:68
↓ 4 callersFunction_wait_for_log_lines
Poll for the log to reach ``expected`` lines (the daemon thread writes on its own schedule). Returns the actual line count.
backend/tests/test_unit_webhook_log.py:32
↓ 4 callersFunction_write_quality
(sim_dir: Path, health: str)
backend/tests/test_unit_batch_status.py:150
↓ 4 callersFunctionbanner
(title)
backend/scripts/test_pipeline_twitter_polymarket.py:34
↓ 4 callersFunctionbanner
(title)
backend/scripts/test_report_generation.py:31
↓ 4 callersMethodcheck_env_alive
Check if simulation environment is alive (can receive Interview commands) Args: simulation_id: Simulation ID Re
backend/app/services/simulation_runner.py:1515
↓ 4 callersMethodcheck_env_alive
Check whether the simulation environment is alive Checks the env_status.json file and verifies the PID is still running.
backend/app/services/simulation_ipc.py:260
↓ 4 callersMethodclose
Close file handler and remove from loggers
backend/app/services/report_agent.py:389
↓ 4 callersFunctioncreate_ner_llm_client
Factory for NER extraction — a mechanical task that works fine on smaller/faster models. Uses NER_* config when set, otherwise falls back to
backend/app/utils/llm_client.py:114
↓ 4 callersMethodembed
Generate embedding for a single text. Returns: Float vector of configured dimensions
backend/app/storage/embedding_service.py:77
↓ 4 callersMethodfail_task
Mark task as failed
backend/app/models/task.py:155
↓ 4 callersFunctionfetch_new_actions_from_db
Fetch new action records from the database with full context information Args: db_path: Database file path last_rowid: Maxim
backend/scripts/run_parallel_simulation.py:753
↓ 4 callersFunctionfirstString
(v)
frontend/src/utils/urlParams.js:66
↓ 4 callersMethodgenerate_config
Intelligently generate complete simulation configuration (step-by-step generation) Args: simulation_id: Simulation ID
backend/app/services/simulation_config_generator.py:265
↓ 4 callersFunctiongenerate_reddit_agent_graph
( profile_path: str, model: Optional[Union[BaseModelBackend, List[BaseModelBackend],
backend/wonderwall/social_agent/agents_generator.py:568
↓ 4 callersFunctiongenerate_twitter_agent_graph
( profile_path: str, model: Optional[Union[BaseModelBackend, List[BaseModelBackend],
backend/wonderwall/social_agent/agents_generator.py:615
↓ 4 callersFunctionget_agent_names_from_config
Get the agent_id -> entity_name mapping from simulation_config This allows displaying real entity names in actions.jsonl instead of codes li
backend/scripts/run_parallel_simulation.py:729
↓ 4 callersFunctionget_db_path
()
backend/wonderwall/social_platform/database.py:62
↓ 4 callersMethodget_openai_function_list
(self)
backend/wonderwall/social_agent/agent_action.py:28
↓ 4 callersMethodget_summary
Return a short summary of belief dynamics.
backend/scripts/belief_integration.py:268
↓ 4 callersMethodget_timeline
Get simulation timeline (summarized by round). Scans JSONL directly — no intermediate AgentAction objects.
backend/app/services/simulation_runner.py:1135
↓ 4 callersFunctioninject_mcp_catalogue
Attach/refresh the MCP tool catalogue block on an agent's system message.
backend/scripts/mcp_agent_injection.py:49
↓ 4 callersFunctioninject_mcp_results
Attach/refresh the tool-results block on an agent's system message.
backend/scripts/mcp_agent_injection.py:63
↓ 4 callersFunctioninject_posting_rules_into_graph
Apply :func:`inject_posting_rules` to every agent in *agent_graph*. Returns the number of agents updated. Best-effort — individual agents tha
backend/scripts/agent_guidelines.py:46
↓ 4 callersFunctionlang_block
Return a locale-specific language directive ready to prepend to an LLM prompt. Non-empty output ends with "\\n\\n". Returns "" for unknown locale
backend/app/utils/i18n.py:139
↓ 4 callersMethodlist_communities
All communities for this graph, largest first.
backend/app/storage/neo4j_storage.py:689
↓ 4 callersMethodlog
Log to the main logger
backend/scripts/action_logger.py:188
↓ 4 callersMethodlog_simulation_end
Log simulation end
backend/scripts/action_logger.py:106
↓ 4 callersMethodmark
Record ``(sim_id, status)``; return ``True`` only on the first call.
backend/app/services/_notify_base.py:31
↓ 4 callersFunctionnormalize_en
Normalize an EN string for comparison: lowercase, strip punctuation, collapse whitespace. Used to detect legitimate case/whitespace variants.
scripts/scan_i18n.py:156
↓ 4 callersFunctionread_string
Read a quoted string starting at s[i] (the quote char itself). Returns (value, end_index_after_closing_quote) or None if not at a quote. Handl
scripts/scan_i18n.py:53
↓ 4 callersFunctionrender_rss
Render the public-gallery cards as an RSS 2.0 XML feed. Mirrors :func:`render_atom` but emits the older format for readers that haven't moved
backend/app/services/feed.py:381
↓ 4 callersMethodrun
Run Reddit simulation Args: max_rounds: Maximum simulation rounds (optional, used to truncate long simulations)
backend/scripts/run_reddit_simulation.py:604
↓ 4 callersMethodsend_to
(self, message)
backend/wonderwall/social_platform/channel.py:52
↓ 4 callersMethodsign_up
r"""Signs up a new user with the provided username, name, and bio. This method prepares a user message comprising the user's details and
backend/wonderwall/social_agent/agent_action.py:69
↓ 4 callersMethodupdate_sentiment
Called by Twitter/Reddit loops after each round to publish sentiment.
backend/scripts/market_media_bridge.py:214
↓ 4 callersFunctionwrite_simulation_event
Append a unified observability event to {sim_dir}/events.jsonl. This is safe to call from the simulation subprocess — no Flask dependency.
backend/scripts/action_logger.py:208
↓ 4 callersMethodwrite_to_receive_queue
(self, action_info)
backend/wonderwall/social_platform/channel.py:57
↓ 3 callersMethod_add_comments_to_posts
(self, posts_results)
backend/wonderwall/social_platform/platform_utils.py:75
↓ 3 callersFunction_agent_with_stance
(stance: float)
backend/tests/test_unit_project_stats.py:81
↓ 3 callersFunction_agent_with_stance
(stance: float)
backend/tests/test_unit_outcome_distribution.py:89
↓ 3 callersFunction_agent_with_stance
(stance: float)
backend/tests/test_unit_platform_stats.py:80
↓ 3 callersFunction_belief_bar
Same renderer as :func:`slack_notify.belief_bar`. Re-implemented here rather than imported so a future change to the Slack bar width / glyphs
backend/app/services/email_notify.py:242
↓ 3 callersFunction_build_initial_state
The bootstrap blob handed to the in-page poller as a JSON literal. Keeps the rendered page meaningful for users with JS disabled (the static
backend/app/services/watch_renderer.py:134
↓ 3 callersMethod_call_llm_with_retry
LLM call with retry, includes JSON fix logic
backend/app/services/simulation_config_generator.py:488
↓ 3 callersMethod_clean_tool_call_response
Clean JSON tool call wrappers in Agent responses and extract actual content
backend/app/services/graph_tools.py:1409
↓ 3 callersFunction_client_ip
Resolve the client IP for rate-limit keying, tolerating proxies.
backend/app/api/simulation.py:252
↓ 3 callersFunction_coerce_pct
Coerce a percentage-shaped value to ``float`` in ``[0, 100]``. Returns ``None`` when the input is missing or non-numeric so the caller can de
backend/app/services/signal_service.py:85
↓ 3 callersFunction_collect_flask_routes
Static scan of every ``app/api/*.py`` and ``share.py`` for route decorators. Returns fully-qualified path templates (with ``<>``).
backend/tests/test_unit_openapi.py:183
↓ 3 callersFunction_date_key
Sort key for ``date`` — empty strings sort last (oldest).
backend/app/services/gallery_filters.py:288
↓ 3 callersMethod_edge_to_dict
Convert Neo4j relationship to the standard edge dict format.
backend/app/storage/neo4j_storage.py:911
↓ 3 callersFunction_emit
(event)
backend/app/api/observability.py:60
↓ 3 callersMethod_emit_event
Emit an llm_call observability event (best-effort).
backend/app/utils/claude_code_client.py:147
↓ 3 callersFunction_escape_bibtex
Escape a string for inclusion inside a BibTeX field value. Handles the seven BibTeX specials plus backslash, brace, caret, and tilde. Collaps
backend/app/services/bibtex_service.py:114
↓ 3 callersFunction_events_path
(simulation_dir: str)
backend/scripts/director_events.py:19
↓ 3 callersFunction_fail
Shape a submission failure into the structured response.
backend/app/services/waybackclaw_publisher.py:579
↓ 3 callersMethod_fallback_interview
Fallback: generate interviews using the LLM directly from agent profiles when the real Wonderwall interview API is unavailable or fai
backend/app/services/graph_tools.py:1498
↓ 3 callersFunction_fan_out_notifications
Fire the outbound webhook + each channel-native notifier for a terminal sim. Each dispatcher is opt-in (no-op when unconfigured), per-channel ded
backend/app/services/simulation_runner.py:38
↓ 3 callersMethod_find_turning_points
Find rounds where significant belief shifts occurred.
backend/wonderwall/social_agent/round_analyzer.py:138
↓ 3 callersFunction_firecrawl_response
(markdown=_MARKDOWN, title="Example Page", success=True)
backend/tests/test_unit_url_fetcher.py:17
↓ 3 callersFunction_flask_to_openapi_path
Convert ``"/api/simulation/<simulation_id>"`` → ``"/api/simulation/{simulation_id}"``. Handles Flask converters like ``<int:round_num>`` and
backend/tests/test_unit_openapi.py:218
↓ 3 callersFunction_format_pct
Match the share card's percentage formatting — integer when the value rounds cleanly, one decimal otherwise. Keeps the thread's numbers aligne
backend/app/services/thread_formatter.py:187
↓ 3 callersFunction_format_pct
Render a percentage field the way the SPA renders it ("62.0%").
backend/app/services/discord_notify.py:169
↓ 3 callersFunction_format_pct
Match the JS ``fmt`` helper so the static SSR markup and the polled JS updates render identical numbers for the same input.
backend/app/services/watch_renderer.py:918
↓ 3 callersMethod_generate_prediction_markets
Generate prediction markets from the simulation requirement. Creates *num_markets* well-formed YES/NO questions that agents can trade
backend/app/services/simulation_config_generator.py:842
↓ 3 callersMethod_generate_username
(self, name: str)
backend/app/services/wonderwall_profile_generator.py:397
↓ 3 callersMethod_get_interview_result
Get the latest Interview result from the database
backend/scripts/run_parallel_simulation.py:613
↓ 3 callersFunction_get_or_create
(name)
backend/app/api/simulation.py:3725
↓ 3 callersFunction_inflection_tweet
One tweet per dominant-stance flip. Format: ``"Round N: stance shifted to <label>\n<stance line>"``. Stays well under 280 characters even wit
backend/app/services/thread_formatter.py:307
↓ 3 callersMethod_interview_single_platform
Execute an Interview on a single platform Returns: Dictionary containing the result, or dictionary containing an error
backend/scripts/run_parallel_simulation.py:391
↓ 3 callersFunction_is_interview_action
Check if an action is an interview, handling both enum and string.
backend/wonderwall/environment/env.py:50
↓ 3 callersMethod_is_ollama
Check if we're talking to an Ollama server.
backend/app/utils/llm_client.py:164
↓ 3 callersFunction_llm_event
Build one ``llm_call`` event line matching the on-disk schema.
backend/tests/test_unit_cost_service.py:37
↓ 3 callersFunction_load_module
Return the ``PROMPTS`` dict from ``locales.<locale>.<module>``. Returns an empty dict if either the module or the dict is missing. Cached aft
backend/app/prompts/registry.py:28
↓ 3 callersFunction_load_record
Read a token file from disk; missing / corrupt → ``None``. Defensive on every branch — a corrupted token file should make ``resolve_token`` s
backend/app/services/share_link_service.py:223
↓ 3 callersFunction_load_state
Load ``<sim_dir>/state.json`` defensively. Missing/corrupt → ``None``.
backend/app/services/lineage_service.py:106
↓ 3 callersFunction_make_state
Lightweight stand-in for SimulationState — only the attributes the gallery helper reads.
backend/tests/test_unit_outcome.py:40
↓ 3 callersFunction_mcp_dispatch_from_actions
After a round, parse CREATE_POST content for <mcp_call> tags. Dispatched results are queued in ``pending_results[agent_id]`` for injection on
backend/scripts/run_parallel_simulation.py:1229
↓ 3 callersFunction_mcp_inject_and_dispatch_pre_round
Inject MCP tool catalogue + prior results into tool-enabled agents. Called once per platform per round. No-ops when bridge is None.
backend/scripts/run_parallel_simulation.py:1203
↓ 3 callersFunction_md_pct_line
(split: dict)
backend/app/services/transcript.py:332
↓ 3 callersFunction_normalise_enum
Lowercase + validate. Returns ``None`` when the value is empty or not in ``allowed`` so a caller passing ``?consensus=`` (empty) gets the same
backend/app/services/gallery_filters.py:93
↓ 3 callersFunction_now_z
()
backend/app/services/feed.py:95
↓ 3 callersMethod_parse_tool_calls
Parse tool calls from LLM response Supported formats (by priority): 1. <tool_call>{"name": "tool_name", "parameters": {...}}
backend/app/services/report_agent.py:1971
↓ 3 callersFunction_pct_width
(val: float)
backend/app/services/watch_renderer.py:758
↓ 3 callersFunction_polymarket_db_path
Resolve the on-disk Polymarket DB. Handles both the current layout (``<sim_dir>/polymarket_simulation.db``) and the older nested layout (``<si
backend/app/api/simulation.py:4568
↓ 3 callersFunction_population_stddev
Population std dev. ``0.0`` for an empty or singleton list. Population (not sample) so a single-delta trajectory reports ``0.0`` rather than
backend/app/services/volatility_service.py:103
↓ 3 callersFunction_post_send_message
Synchronously POST one Bot API ``sendMessage`` call.
backend/app/services/telegram_notify.py:382
↓ 3 callersFunction_read_log_lines
Return the raw, non-empty lines of the log (preserving order). Never raises — a missing or unreadable log is treated as empty so the dispatch
backend/app/services/webhook_service.py:282
↓ 3 callersFunction_read_simulation_api
()
backend/tests/test_unit_peak_round.py:188
↓ 3 callersFunction_read_simulation_api
()
backend/tests/test_unit_clone_service.py:365
↓ 3 callersFunction_read_simulation_api
()
backend/tests/test_unit_volatility.py:241
↓ 3 callersFunction_read_simulation_api
()
backend/tests/test_unit_agent_sparklines.py:197
↓ 3 callersFunction_resolve_bot_token
()
backend/app/services/telegram_notify.py:104
↓ 3 callersFunction_resolve_chat_id
()
backend/app/services/telegram_notify.py:108
↓ 3 callersFunction_resolve_host
()
backend/app/services/email_notify.py:138
↓ 3 callersFunction_resolve_recipients
Parse the comma-separated ``SMTP_TO`` env var into addresses.
backend/app/services/email_notify.py:155
↓ 3 callersFunction_resolve_webhook_url
Read ``DISCORD_WEBHOOK_URL`` at call time. Late binding so a runtime env mutation (or a test ``monkeypatch``) takes effect without re-importi
backend/app/services/discord_notify.py:97
← previousnext →301–400 of 3,647, ranked by callers