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
↓ 2 callers
Function
_drift_from_positions_by_agent
Compute per-round bullish/neutral/bearish % from trajectory snapshots. If allowed_agent_ids is None, includes every agent. Otherwise only agents
backend/app/api/simulation.py:3981
↓ 2 callers
Method
_emit_decision_event
Emit an agent_decision observability event to events.jsonl (best-effort).
backend/wonderwall/social_agent/agent.py:311
↓ 2 callers
Function
_empty_confidence_counts
()
backend/app/services/outcome_distribution.py:257
↓ 2 callers
Function
_empty_direction_counts
()
backend/app/services/outcome_distribution.py:253
↓ 2 callers
Function
_empty_distribution
()
backend/app/services/project_stats.py:217
↓ 2 callers
Function
_empty_distribution
()
backend/app/services/platform_stats.py:187
↓ 2 callers
Function
_empty_quality_counts
()
backend/app/services/outcome_distribution.py:261
↓ 2 callers
Function
_empty_quality_distribution
()
backend/app/services/project_stats.py:228
↓ 2 callers
Function
_empty_round_counts
()
backend/app/services/outcome_distribution.py:265
↓ 2 callers
Function
_enabled
()
backend/app/services/agent_mcp_tools.py:56
↓ 2 callers
Method
_ensure
(self, name: str)
backend/scripts/mcp_agent_bridge.py:227
↓ 2 callers
Function
_ensure_agent
(name, platform)
backend/app/api/simulation.py:10645
↓ 2 callers
Function
_ensure_env_alive
Check if simulation environment is alive. If not, try to restart it in env-only mode for interviews. Returns True if env is alive.
backend/app/api/simulation.py:178
↓ 2 callers
Method
_ensure_projects_dir
Ensure the projects directory exists
backend/app/models/project.py:125
↓ 2 callers
Method
_ensure_reports_dir
Ensure reports root directory exists
backend/app/services/report_agent.py:3008
↓ 2 callers
Function
_entry_for_sim
Compose a child / parent entry payload from on-disk state. Keys: * ``simulation_id`` — echoed. * ``scenario_preview`` — truncated to ``S
backend/app/services/lineage_service.py:201
↓ 2 callers
Function
_entry_html_summary
Rich HTML summary for ``content type='html'`` — readers that render HTML (Feedly, Inoreader, NetNewsWire) get a clickable preview; text-only r
backend/app/services/feed.py:168
↓ 2 callers
Function
_entry_summary
Plain-text summary line per entry — bullish/neutral/bearish split, quality, agent count. Readers index this for search and show it in list vie
backend/app/services/feed.py:130
↓ 2 callers
Function
_env
(name: str)
backend/app/services/telegram_notify.py:100
↓ 2 callers
Function
_epoch_to_iso
Render a Unix timestamp as an ISO-8601 UTC string (``...Z``). Used purely for the operator-facing UI — the truth-of-record on disk is ``expir
backend/app/services/share_link_service.py:152
↓ 2 callers
Method
_escape_lucene
Escape special Lucene query characters.
backend/app/storage/search_service.py:504
↓ 2 callers
Method
_execute_tool
Execute tool call Args: tool_name: Tool name parameters: Tool parameters report_context: Report
backend/app/services/report_agent.py:1270
↓ 2 callers
Method
_fallback_summary
Quick fallback summary without LLM.
backend/scripts/round_memory.py:348
↓ 2 callers
Function
_fetch_polymarket_actions_from_db
Fetch new Polymarket actions from the trace table. Same pattern as fetch_new_actions_from_db but adapted for Polymarket's action names a
backend/scripts/run_parallel_simulation.py:1988
↓ 2 callers
Method
_flush_section
Write one section's steps to Neo4j in a single transaction.
backend/app/storage/reasoning_trace.py:169
↓ 2 callers
Function
_format_actions_full
Format all meaningful actions from one platform into a block.
backend/scripts/round_memory.py:119
↓ 2 callers
Method
_format_clusters
Render a cluster list for the agent to read.
backend/app/services/graph_tools.py:468
↓ 2 callers
Function
_format_iso_utc
Format an epoch second value as an ISO-8601 UTC string. Produces ``YYYY-MM-DDTHH:MM:SSZ`` (trailing ``Z``) — the shape a Statuspage-style con
backend/app/services/platform_status.py:141
↓ 2 callers
Function
_format_stance_line
One-line ``↑ Bullish X% · → Neutral Y% · ↓ Bearish Z%`` summary. ASCII arrows (no emoji) so the thread copy-pastes cleanly into research writ
backend/app/services/thread_formatter.py:201
↓ 2 callers
Method
_generate_interview_summary
Generate interview summary
backend/app/services/graph_tools.py:1843
↓ 2 callers
Method
_generate_profile_rule_based
Generate basic persona using rules
backend/app/services/wonderwall_profile_generator.py:904
↓ 2 callers
Function
_get_action_cls
()
backend/wonderwall/simulations/social_media/__init__.py:34
↓ 2 callers
Function
_get_environment_cls
()
backend/wonderwall/simulations/social_media/__init__.py:39
↓ 2 callers
Method
_get_interview_result
Get the latest Interview result from the database
backend/scripts/run_twitter_simulation.py:308
↓ 2 callers
Method
_get_interview_result
Get the latest Interview result from the database
backend/scripts/run_reddit_simulation.py:318
↓ 2 callers
Function
_get_or_create_vapid_keys
Load VAPID keys from disk, generating them on first use. Returns a dict with 'private_key' (PEM string) and 'public_key' (URL-safe base64 unc
backend/app/services/push_notification_service.py:30
↓ 2 callers
Function
_get_platform_cls
()
backend/wonderwall/simulations/social_media/__init__.py:29
↓ 2 callers
Method
_get_platform_display_name
(self, platform: str)
backend/app/services/graph_memory_updater.py:218
↓ 2 callers
Method
_get_progress_path
Get progress file path
backend/app/services/report_agent.py:3040
↓ 2 callers
Method
_get_project_meta_path
Get project metadata file path
backend/app/models/project.py:136
↓ 2 callers
Method
_get_project_text_path
Get project extracted text storage path
backend/app/models/project.py:146
↓ 2 callers
Method
_get_report_path
Get report metadata file path
backend/app/services/report_agent.py:3025
↓ 2 callers
Function
_get_storage
Lazy-init the storage so the server starts fast even when Neo4j is warming up.
backend/mcp_server.py:82
↓ 2 callers
Method
_get_tools_description
Generate tool description text
backend/app/services/report_agent.py:2031
↓ 2 callers
Function
_get_user_name
Get username Args: cursor: Database cursor user_id: User ID agent_names: agent_id -> agent_name mapping Returns
backend/scripts/run_parallel_simulation.py:999
↓ 2 callers
Function
_gif_size
Logical screen width/height from bytes 6-10 (little-endian).
backend/tests/test_unit_replay_gif.py:38
↓ 2 callers
Function
_history_path
(simulation_dir: str)
backend/scripts/director_events.py:23
↓ 2 callers
Method
_is_clean_identifier
Check that a type name is ASCII PascalCase or UPPER_SNAKE_CASE.
backend/app/services/ontology_generator.py:112
↓ 2 callers
Function
_is_safe_token
Reject anything outside the URL-safe base64 alphabet. ``secrets.token_urlsafe`` only emits ``[A-Za-z0-9_-]``. A token arriving via the URL th
backend/app/services/share_link_service.py:493
↓ 2 callers
Method
_is_valid_tool_call
Validate whether parsed JSON is a valid tool call
backend/app/services/report_agent.py:2018
↓ 2 callers
Function
_iso_to_epoch
Parse an ISO-8601 string to a UTC epoch float, or ``None``. ``state.json`` writes ``datetime.now().isoformat()`` — a naive local timestamp wi
backend/app/services/platform_status.py:114
↓ 2 callers
Function
_isolate_and_parse
Isolate the outermost JSON container in ``text`` and parse it. Grabs whichever of ``{...}`` / ``[...]`` opens first (so prose or ```json fenc
backend/app/utils/json_repair.py:57
↓ 2 callers
Function
_kind_for
Discriminator: ``original`` / ``fork`` / ``counterfactual``.
backend/app/services/lineage_service.py:176
↓ 2 callers
Function
_load_counterfactual
Load ``<sim_dir>/counterfactual_injection.json`` if present. Returns the parsed dict on success, ``None`` when the file is absent or unparsea
backend/app/services/lineage_service.py:156
↓ 2 callers
Function
_load_market_prices
Extract per-round YES token prices from the Polymarket SQLite database. Reads the AmM reserve table to derive price_yes = re
backend/app/api/simulation.py:9218
↓ 2 callers
Function
_load_polymarket_profiles
Load Polymarket agent profiles from JSON.
backend/scripts/run_parallel_simulation.py:1943
↓ 2 callers
Function
_load_raw
Read the on-disk JSON, coerce to integer counters, drop unknown keys, and silently reset on corrupt input. Returns a dict containing only key
backend/app/services/surface_stats.py:130
↓ 2 callers
Function
_load_state
(sim_id)
backend/app/api/simulation.py:9201
↓ 2 callers
Function
_load_timeline_summary
Load and summarise timeline: per-round total actions, total rounds.
backend/app/api/simulation.py:9205
↓ 2 callers
Function
_locale_to_dirname
Map a BCP-47 locale code to a Python package directory name.
backend/app/prompts/registry.py:23
↓ 2 callers
Function
_lru_get
LRU read: returns the entry (or None) and promotes it to most-recent.
backend/app/api/simulation.py:290
↓ 2 callers
Function
_lru_put
LRU write with bounded size; evicts least-recent entries when full.
backend/app/api/simulation.py:303
↓ 2 callers
Function
_markdown_cell
Build an nbformat 4 markdown cell.
backend/app/services/notebook_export.py:124
↓ 2 callers
Method
_match_actions
Filter actions by query with progressive fallback. Try 1: OR-separated phrases (e.g. "regulatory sudden OR regulatory unexpected") Tr
backend/app/services/report_agent.py:1702
↓ 2 callers
Method
_merge_results
Merge vector, BM25, and graph-traversal results with weighted scoring, then rerank. Flow: 1. Normalize each strategy's sco
backend/app/storage/search_service.py:423
↓ 2 callers
Function
_next_attempt_number
1-based attempt counter — picks ``max(attempt) + 1`` from disk. Returns 1 when the log is missing or empty. Used so the GET endpoint can show
backend/app/services/webhook_service.py:314
↓ 2 callers
Function
_now_year_month
()
backend/app/services/bibtex_service.py:149
↓ 2 callers
Function
_outcome_label
(card: dict)
backend/app/services/gallery_filters.py:231
↓ 2 callers
Function
_parse_body
(raw: bytes)
backend/app/services/waybackclaw_publisher.py:257
↓ 2 callers
Function
_parse_body
(raw: bytes)
backend/app/services/dkg_publisher.py:255
↓ 2 callers
Function
_parse_log_entries
Parse JSONL lines, silently skipping anything malformed.
backend/app/services/webhook_service.py:298
↓ 2 callers
Function
_parse_ts
(ts)
backend/lib/env_compact.py:20
↓ 2 callers
Method
_perform_interview_action
r"""Send the request to the llm model and execute the interview.
backend/wonderwall/environment/env.py:194
↓ 2 callers
Method
_perform_llm_action
r"""Send the request to the llm model and execute the action.
backend/wonderwall/environment/env.py:189
↓ 2 callers
Function
_png_size
Read width/height from the PNG IHDR chunk (bytes 16-24).
backend/tests/test_unit_share_card.py:37
↓ 2 callers
Function
_post_json
Issue the POST. Returns ``(ok, message)`` — never raises.
backend/app/services/webhook_service.py:899
↓ 2 callers
Function
_public_view
Public envelope for an operator-facing list / mint response. Adds the ISO-formatted timestamps the on-disk record stores only as epoch second
backend/app/services/share_link_service.py:270
↓ 2 callers
Function
_read_simulation_api
()
backend/tests/test_unit_surface_stats.py:256
↓ 2 callers
Function
_read_spec_bytes
Return the YAML spec as bytes. Reads from disk every call (cheap — a few hundred KB at most) so an operator editing the spec in-place picks u
backend/app/api/docs.py:45
↓ 2 callers
Function
_read_text_with_fallback
Read a text file, automatically detecting encoding if UTF-8 fails. Uses a multi-level fallback strategy: 1. First try UTF-8 decoding
backend/app/utils/file_parser.py:10
↓ 2 callers
Function
_record_envelope
Build the canonical on-disk record shape. Centralised here so mint / revoke / public-list use the same key names and ordering — drift between
backend/app/services/share_link_service.py:243
↓ 2 callers
Function
_record_is_active
Return True when a record exists, isn't revoked, and isn't expired. Returns False for ``None`` (missing record) and for records with the wron
backend/app/services/share_link_service.py:471
↓ 2 callers
Method
_request_embeddings
Dispatch to the correct provider backend.
backend/app/storage/embedding_service.py:139
↓ 2 callers
Function
_resolve_base_url
Read PUBLIC_BASE_URL — used to build absolute ``share_url`` / ``share_card_url`` fields when no Flask request context is available (the runner
backend/app/services/webhook_service.py:948
↓ 2 callers
Function
_resolve_config
Read WAYBACKCLAW_* env vars at call time via the ``Config`` class. Late-binding mirrors webhook_service / dkg_publisher so an operator pastin
backend/app/services/waybackclaw_publisher.py:126
↓ 2 callers
Function
_resolve_config
Read DKG_* env vars at call time via the ``Config`` class. Late-binding mirrors webhook_service / discord_notify so an operator pasting value
backend/app/services/dkg_publisher.py:148
↓ 2 callers
Function
_resolve_event_filter
Parse ``WEBHOOK_EVENTS`` into a normalised lowercase token set. Late-bound (matches :func:`_resolve_webhook_url` / :func:`_resolve_webhook_se
backend/app/services/webhook_service.py:467
↓ 2 callers
Function
_resolve_from
Default the sender to a deployment-derived noreply when unset.
backend/app/services/email_notify.py:163
↓ 2 callers
Function
_resolve_parquet_glob
Return a usable parquet glob for the country, downloading from HF on first use if no local snapshot exists. Returns None if neither path is availa
backend/app/services/demographic_sampler.py:64
↓ 2 callers
Function
_resolve_port
()
backend/app/services/email_notify.py:142
↓ 2 callers
Function
_resolve_request_base_url
Canonical absolute origin for ``preview_url`` fields. Honours ``X-Forwarded-Proto`` / ``X-Forwarded-Host`` so links work behind a reverse pro
backend/app/api/simulation.py:4914
↓ 2 callers
Function
_resolve_share_url
Prefer an absolute URL so the email body links cleanly.
backend/app/services/email_notify.py:272
↓ 2 callers
Function
_resolve_use_tls
Whether to attempt STARTTLS on a port-587/25 SMTP connection. Defaults to ``True`` because every modern submission-port relay supports it. An
backend/app/services/email_notify.py:174
↓ 2 callers
Function
_resolve_webhook_url
Read the configured webhook URL — late-binding so runtime Settings updates take effect immediately without needing to re-import.
backend/app/services/webhook_service.py:938
↓ 2 callers
Function
_round_usd
(value: Any)
backend/app/services/cost_service.py:54
↓ 2 callers
Method
_rpc
(self, method: str, params: Optional[Dict[str, Any]] = None)
backend/app/services/oracle_seed.py:67
↓ 2 callers
Method
_run_node_keyword_search
Run fulltext search on entity name + summary.
backend/app/storage/search_service.py:340
↓ 2 callers
Method
_run_node_vector_search
Run vector similarity search on entity embedding.
backend/app/storage/search_service.py:321
↓ 2 callers
Function
_safe_iso_date
Coerce a datetime-ish value to ``YYYY-MM-DD`` (W3C date format). The sitemap spec accepts the full W3C datetime profile (any of ``YYYY``, ``Y
backend/app/services/sitemap.py:107
↓ 2 callers
Method
_save_reddit_json
Save Reddit Profile as JSON format Uses the same format as to_reddit_format(), ensuring Wonderwall can read correctly. Must
backend/app/services/wonderwall_profile_generator.py:1360
← previous
next →
501–600 of 3,647, ranked by callers