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
↓ 3 callers
Function
_round_series
(series)
backend/app/services/replay_gif.py:507
↓ 3 callers
Method
_rpc
(self, method: str, params: Dict[str, Any], timeout: float)
backend/scripts/mcp_agent_bridge.py:154
↓ 3 callers
Function
_safe_bool
Coerce ``value`` to a bool with an explicit default.
backend/app/services/clone_service.py:102
↓ 3 callers
Function
_safe_env_step
Run env.step(actions) with timeout + exception isolation. Returns True on success, False on timeout or exception. A False return means the ro
backend/scripts/run_parallel_simulation.py:184
↓ 3 callers
Function
_safe_str
Coerce ``value`` to a stripped string; ``None`` ⇒ empty. Mirrors the same helper ``lineage_service`` keeps so the two renderers share a postu
backend/app/services/sitemap.py:91
↓ 3 callers
Method
_search_web
Search SearXNG for the entity. Returns [] when unconfigured or failed.
backend/app/services/web_enrichment.py:158
↓ 3 callers
Function
_sliding_window_rate_limited
Sliding-window per-IP rate limit. Mutates ``hits`` in place. Returns True when ``client_ip`` has already exceeded ``max_calls`` within the la
backend/app/api/simulation.py:261
↓ 3 callers
Function
_spec_as_dict
Parse the YAML spec into a dict for the JSON endpoint. Imports pyyaml lazily because it's listed in ``backend/uv.lock`` and in the unit-test
backend/app/api/docs.py:67
↓ 3 callers
Function
_sql_ident
(name: str)
backend/app/services/demographic_sampler.py:58
↓ 3 callers
Function
_strip_i18n
Drop ``i18n`` keys recursively without applying overrides.
backend/app/utils/i18n.py:209
↓ 3 callers
Function
_strip_markered_block
Remove a block delimited by marker at start and "\\n\\n# " next.
backend/scripts/mcp_agent_injection.py:38
↓ 3 callers
Function
_to_rfc822
RFC822 date — RSS 2.0 ``<pubDate>`` requires it.
backend/app/services/feed.py:99
↓ 3 callers
Function
_token_path
Return the on-disk path of a single token record. The token has already been validated to URL-safe characters by the caller (either ``secrets
backend/app/services/share_link_service.py:132
↓ 3 callers
Function
_truncate
Coerce to str, strip, and truncate with a trailing ellipsis.
backend/app/services/agent_export.py:151
↓ 3 callers
Function
_truncate
(value: str, limit: int)
backend/app/services/telegram_notify.py:137
↓ 3 callers
Function
_truncate_to_tweet
Trim ``text`` to ``MAX_TWEET_CHARS`` with the ellipsis convention above. Public seam used by the composer + tested directly so drift on the ca
backend/app/services/thread_formatter.py:230
↓ 3 callers
Function
_ttl_bool
(value: bool)
backend/app/services/dkg_publisher.py:308
↓ 3 callers
Function
_ttl_decimal
Render a decimal as Turtle ``"NN.N"^^xsd:decimal``.
backend/app/services/dkg_publisher.py:298
↓ 3 callers
Function
_ttl_int
Render an integer as a Turtle integer literal (xsd:integer implied).
backend/app/services/dkg_publisher.py:303
↓ 3 callers
Function
_write_config
Drop a minimal simulation_config.json with the given scenario.
backend/tests/test_unit_lineage.py:116
↓ 3 callers
Function
_write_counterfactual
Drop a counterfactual_injection.json file.
backend/tests/test_unit_lineage.py:124
↓ 3 callers
Function
_write_events
(path: Path, events)
backend/tests/test_unit_cost_service.py:69
↓ 3 callers
Function
_write_trajectory
(sim_dir: Path, snapshots: list[dict])
backend/tests/test_unit_peak_round.py:39
↓ 3 callers
Method
add_edge
(self, agent_id_0: int, agent_id_1: int)
backend/wonderwall/social_agent/agent_graph.py:206
↓ 3 callers
Method
add_snapshot
(self, snapshot: RoundSnapshot)
backend/wonderwall/social_agent/round_analyzer.py:66
↓ 3 callers
Method
add_text
Process text: NER/RE → batch embed → create nodes/edges → return episode_id. Args: valid_at: ISO-8601 timestamp of when
backend/app/storage/neo4j_storage.py:199
↓ 3 callers
Function
banner
(title)
backend/scripts/test_pipeline_phase5_6.py:53
↓ 3 callers
Function
belief_bar
Render a horizontal block-bar for ``pct`` (a value in [0, 100]).
backend/app/services/telegram_notify.py:145
↓ 3 callers
Function
belief_bar
Render a horizontal block-bar for ``pct`` (a value in [0, 100]). Width is the number of glyphs, not characters of label. The trailing label a
backend/app/services/slack_notify.py:94
↓ 3 callers
Method
complete_task
Mark task as completed
backend/app/models/task.py:145
↓ 3 callers
Function
consume_pending_events
Read and clear all pending events. Called by the simulation loop at the start of each round. Counterfactual injections (from /branch-cou
backend/scripts/director_events.py:126
↓ 3 callers
Method
extract_text
Extract text from a file Args: file_path: File path Returns: Extracted text content
backend/app/utils/file_parser.py:66
↓ 3 callers
Function
fetch_table_from_db
(cursor: sqlite3.Cursor, table_name: str)
backend/wonderwall/social_platform/database.py:181
↓ 3 callers
Method
finalize_section
Write the conclusion step and flush everything to Neo4j.
backend/app/storage/reasoning_trace.py:110
↓ 3 callers
Function
find_inflection_points
Return the rounds where the dominant stance changed. An inflection is a round whose ``dominant`` label differs from the most recent *non-None
backend/app/services/thread_formatter.py:147
↓ 3 callers
Method
get_all_edges
Get all edges in the graph (with temporal information)
backend/app/services/graph_tools.py:685
↓ 3 callers
Method
get_extracted_text
Get extracted text
backend/app/models/project.py:297
↓ 3 callers
Method
get_graph_data
Get complete graph data (including details)
backend/app/services/graph_builder.py:135
↓ 3 callers
Method
get_graph_statistics
Get statistics for the graph
backend/app/services/graph_tools.py:822
↓ 3 callers
Method
get_market_prompt
Called by Twitter/Reddit loops to get current market prices for agent injection.
backend/scripts/market_media_bridge.py:206
↓ 3 callers
Method
get_node
(self, uuid: str)
backend/app/storage/neo4j_storage.py:523
↓ 3 callers
Method
get_task
Get task
backend/app/models/task.py:101
↓ 3 callers
Function
inject_round_memory
Inject round memory context into an agent's system message. Follows the same marker-replace pattern used by inject_belief_context and inject_
backend/scripts/round_memory.py:447
↓ 3 callers
Method
interview_agents_batch
Batch interview multiple Agents Args: simulation_id: Simulation ID interviews: Interview list, each element
backend/app/services/simulation_runner.py:1633
↓ 3 callers
Function
list_keys
Return all ``module.name`` keys available in the given locale. Used by coverage tests. Iterates every module file under the locale folder (no
backend/app/prompts/registry.py:120
↓ 3 callers
Method
log_section_content
Record section content generation complete (only records content, does not mean the entire section is complete)
backend/app/services/report_agent.py:260
↓ 3 callers
Function
missing_keys
Return keys present in English but missing in ``locale``. Used by tests to flag untranslated prompts. Returns an empty list when ``locale`` i
backend/app/prompts/registry.py:140
↓ 3 callers
Function
poll_task
Poll an async task until completed/failed. Returns task result.
backend/scripts/test_e2e_api.py:120
↓ 3 callers
Method
preprocess_text
Preprocess text — strips token-wasting artifacts before LLM ingestion. Filters (in order): 1. Base64 data URIs (embedded ima
backend/app/services/text_processor.py:37
↓ 3 callers
Method
put
(self, key, value)
backend/wonderwall/social_platform/channel.py:24
↓ 3 callers
Function
render_bibtex_bytes
UTF-8-encoded form of :func:`build_bibtex` for the route handler. Same posture as ``repro_export.render_json_bytes`` / ``badge_service.render
backend/app/services/bibtex_service.py:330
↓ 3 callers
Function
render_csv
Render the row list as RFC 4180 CSV with the locked header. Uses ``csv.DictWriter`` with ``QUOTE_MINIMAL`` so numeric columns stay unquoted (
backend/app/services/trajectory_export.py:224
↓ 3 callers
Method
save_profiles
Save profiles to file (choose correct format based on platform) Wonderwall platform format requirements: - Twitter: CSV form
backend/app/services/wonderwall_profile_generator.py:1264
↓ 3 callers
Method
search_communities
Semantic search over community summaries for this graph.
backend/app/storage/neo4j_storage.py:683
↓ 3 callers
Method
send_command
Send a command and wait for a response Args: command_type: Command type args: Command arguments
backend/app/services/simulation_ipc.py:112
↓ 3 callers
Function
setup_logger
Set up a logger Args: name: Logger name level: Log level Returns: Configured logger
backend/app/utils/logger.py:31
↓ 3 callers
Method
start_simulation
Start simulation Args: simulation_id: Simulation ID platform: Run platform (twitter/reddit/parallel)
backend/app/services/simulation_runner.py:204
↓ 3 callers
Method
stop
Stop background worker thread
backend/app/services/graph_memory_updater.py:235
↓ 3 callers
Method
update_status
Update environment status
backend/scripts/run_twitter_simulation.py:170
↓ 3 callers
Method
update_status
Update environment status
backend/scripts/run_reddit_simulation.py:180
↓ 3 callers
Function
webhook_log_path
Absolute path to the per-sim webhook delivery log.
backend/app/services/webhook_service.py:277
↓ 2 callers
Method
_aget_model_response
Filter empty-content messages that Gemini rejects with INVALID_ARGUMENT, and emit llm_call observability events for Wonderwall subprocess visi
backend/wonderwall/social_agent/agent.py:174
↓ 2 callers
Function
_aggregate
Aggregate LLM call events into summary stats.
backend/app/utils/run_summary.py:213
↓ 2 callers
Function
_append_url_block
Append one ``<url>`` block to the sitemap document. Element order — ``<loc>``, ``<lastmod>``, ``<changefreq>``, ``<priority>`` — matches the
backend/app/services/sitemap.py:213
↓ 2 callers
Function
_approx_text_width
Return an approximate pixel width for ``text`` at 11px DejaVu Sans. Pure stdlib — no font-metrics library available. The actual Shields.io re
backend/app/services/badge_service.py:116
↓ 2 callers
Function
_atomic_write_json
Write ``payload`` to ``path`` atomically. Uses the same staging-tempfile + ``os.replace`` posture ``surface_stats._atomic_write`` and the web
backend/app/services/share_link_service.py:196
↓ 2 callers
Function
_avg_by_agent
(snap)
backend/app/api/simulation.py:10990
↓ 2 callers
Function
_base_url
()
backend/cli.py:33
↓ 2 callers
Method
_belief_states_path
(self)
backend/scripts/belief_integration.py:145
↓ 2 callers
Function
_belief_summary
Pull the most recent (bullish, neutral, bearish) percentages from an ``_build_embed_summary_payload`` ``belief`` block. Returns ``(0.0, 0.0,
backend/app/services/watch_renderer.py:72
↓ 2 callers
Function
_breakdown_rows
Reshape a ``run_summary`` group dict (by_model / by_phase) into a list of stable, JSON-friendly rows, dropping the internal latency_ms accumul
backend/app/services/cost_service.py:58
↓ 2 callers
Function
_build_badge_document
Assemble the shared flat-badge SVG document. Both the per-sim belief badge and the platform-stats badge render the identical Shields.io flat
backend/app/services/badge_service.py:188
↓ 2 callers
Function
_build_counterfactual_marker
Compact counterfactual sub-object travelling with a child entry. ``trigger_round`` + ``label`` are the headline values; the badge renders "🔀
backend/app/services/lineage_service.py:184
↓ 2 callers
Function
_build_description_block
Assemble the persona description block from user_info.
backend/wonderwall/simulations/social_media/prompts.py:25
↓ 2 callers
Function
_build_event
Assemble one structured event dict (fresh id + UTC millisecond timestamp). Single source of truth for the on-disk event shape — both the stan
backend/app/utils/event_logger.py:42
↓ 2 callers
Function
_build_polymarket_agent_graph
Build an AgentGraph for Polymarket from profile dicts. Each profile has: user_id, name, description, risk_tolerance, user_profile. Agent
backend/scripts/run_parallel_simulation.py:1949
↓ 2 callers
Function
_build_round_series
Project the on-disk trajectory into a per-round series. Each entry has ``round``, ``split`` (the bullish / neutral / bearish %), and ``domina
backend/app/services/thread_formatter.py:114
↓ 2 callers
Function
_cache_header
``Cache-Control`` value for the activity feed. 30 seconds matches the cadence external polling loops (Aeon's push-recap skill, integrator sta
backend/app/api/activity.py:53
↓ 2 callers
Method
_cache_put
Add to cache, evicting oldest entries if full.
backend/app/storage/embedding_service.py:238
↓ 2 callers
Method
_candidate_pool_size
How many candidates to fetch from each retrieval strategy before reranking.
backend/app/storage/search_service.py:143
↓ 2 callers
Function
_capture_request_via_urlopen
Return a ``urlopen`` replacement that records the outgoing Request.
backend/tests/test_unit_webhook_signature.py:50
↓ 2 callers
Method
_check_self_comment_rating
(self, comment_id, user_id)
backend/wonderwall/social_platform/platform_utils.py:230
↓ 2 callers
Method
_check_self_post_rating
(self, post_id, user_id)
backend/wonderwall/social_platform/platform_utils.py:219
↓ 2 callers
Function
_clean_text
Strip HTML tags/entities some engines leave in titles and snippets.
backend/app/utils/searxng_client.py:31
↓ 2 callers
Function
_client_returning
An LLMClient whose .chat() yields ``text`` without any network I/O.
backend/tests/test_unit_json_repair.py:109
↓ 2 callers
Function
_coerce
(d: Dict[Any, Any])
backend/scripts/belief_integration.py:94
↓ 2 callers
Function
_collect_llm_events
Read ``llm_call`` events from the global + per-sim events.jsonl pair. Reads the global ``events_path`` and (when ``output_dir`` is given and
backend/app/utils/run_summary.py:81
↓ 2 callers
Method
_compute_trajectories
Per-topic belief trajectory across all rounds.
backend/wonderwall/social_agent/round_analyzer.py:83
↓ 2 callers
Function
_confidence_tier
Map a continuous ``confidence_pct`` into the four-bucket tier scale. Upper bounds are exclusive: ``25.0`` is ``"moderate"`` (not ``"speculati
backend/app/services/polymarket_service.py:87
↓ 2 callers
Function
_consensus_direction
Return ``"Bullish"`` / ``"Neutral"`` / ``"Bearish"`` / ``"Failed"``. Used for the subject-line prefix and the email body header — same bucket
backend/app/services/email_notify.py:211
↓ 2 callers
Function
_current_snapshot
Build a summary of every slot the Settings UI cares about.
backend/app/api/settings.py:83
↓ 2 callers
Function
_deep_copy_envelope
Return a copy of the envelope — mutation-safe. The payload is a small fixed-shape dict; manual copying is cheaper than ``copy.deepcopy`` and
backend/app/services/outcome_distribution.py:388
↓ 2 callers
Function
_deep_copy_stats
Return a copy of the stats payload — mutation-safe.
backend/app/services/project_stats.py:370
↓ 2 callers
Function
_deep_copy_stats
Return a copy of the stats payload — mutation-safe. The payload is a small fixed-shape dict; manual copying is cheaper than ``copy.deepcopy``
backend/app/services/platform_stats.py:303
↓ 2 callers
Method
_delete_existing
Remove all Community nodes + MEMBER_OF edges for this graph.
backend/app/storage/community_builder.py:335
↓ 2 callers
Function
_delta
(a, b)
backend/app/api/simulation.py:4149
↓ 2 callers
Function
_demo_load_profiles
Load agent profiles from reddit_profiles.json (primary) or twitter_profiles.csv. Returns a list of dicts with normalized demographic fields.
backend/app/api/simulation.py:10945
↓ 2 callers
Function
_distribution_cache_header
Cache-Control value for the distribution endpoint. 300 seconds matches the cache TTL on ``outcome_distribution.build_distribution``. Press-ki
backend/app/api/stats.py:118
↓ 2 callers
Method
_do_request
HTTP POST with retry logic.
backend/app/storage/embedding_service.py:163
↓ 2 callers
Function
_dominant
(b, n, be)
backend/app/api/simulation.py:3925
← previous
next →
401–500 of 3,647, ranked by callers