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
Method
_save_twitter_csv
Save Twitter Profile as CSV format (compliant with Wonderwall official requirements) Wonderwall Twitter required CSV fields:
backend/app/services/wonderwall_profile_generator.py:1289
↓ 2 callers
Method
_scan_jsonl_raw
Yield raw dicts from all platform JSONL files without creating AgentAction objects. Skips event/bookkeeping lines. Each yiel
backend/app/services/simulation_runner.py:1086
↓ 2 callers
Method
_send_batch_activities
Send batched activities to the graph by merging them as text and using add_text to trigger NER. Batch-level metadata: - ki
backend/app/services/graph_memory_updater.py:304
↓ 2 callers
Function
_serve_feed
Shared body for the Atom + RSS endpoints. ``fmt`` is ``"atom"`` or ``"rss"``; the renderer handles the per- format differences and the MIME t
backend/app/api/feed.py:51
↓ 2 callers
Function
_serve_thread
Shared body for the thread.txt / thread.json routes. Both endpoints share the same publish gate, the same data assembly (``thread_formatter.b
backend/app/api/simulation.py:6747
↓ 2 callers
Function
_serve_trajectory
Shared body for the trajectory.csv / trajectory.jsonl routes. Both endpoints share the same publish gate, the same row assembly (``trajectory
backend/app/api/simulation.py:5349
↓ 2 callers
Function
_serve_transcript
Shared body for the transcript.md / transcript.json routes. Both endpoints share the same publish gate, the same data assembly (``transcript.
backend/app/api/simulation.py:5254
↓ 2 callers
Function
_share_tokens_dir
Return the absolute path of the share-tokens subdirectory. Pure path join — never touches the filesystem. The caller decides whether to ``os.
backend/app/services/share_link_service.py:122
↓ 2 callers
Function
_signature
(headers: dict)
backend/tests/test_unit_webhook_signature.py:290
↓ 2 callers
Function
_split_lines_for_nbformat
Split a multi-line string into the per-line list nbformat wants. nbformat 4's ``source`` field accepts either a plain string or a list of str
backend/app/services/notebook_export.py:109
↓ 2 callers
Function
_split_to_positions
(b: float, n: float, _be: float)
backend/tests/test_unit_batch_status.py:115
↓ 2 callers
Function
_start_dispatch_thread
Launch the daemon thread that POSTs ``payload`` and records a log entry on the way out. Shared between the automatic ``fire_webhook_for_simul
backend/app/services/webhook_service.py:1026
↓ 2 callers
Function
_status_verb
(status: str)
backend/app/services/email_notify.py:300
↓ 2 callers
Function
_subject_uri
(simulation_id: str)
backend/app/services/dkg_publisher.py:122
↓ 2 callers
Function
_swagger_ui_html
Render the Swagger UI HTML page that points at ``spec_url``. The page is fully static — Swagger UI fetches the spec on the client.
backend/app/api/docs.py:120
↓ 2 callers
Method
_terminate_process
Cross-platform termination of process and its child processes Args: process: Process to terminate si
backend/app/services/simulation_runner.py:806
↓ 2 callers
Function
_today_context
Current-date preamble so time-sensitive LLM output anchors on today rather than the model's training cutoff.
backend/app/api/simulation.py:360
↓ 2 callers
Function
_total_actions
(timeline)
backend/app/api/simulation.py:9298
↓ 2 callers
Function
_trending_text
Return the trimmed text of an XML element, or '' if missing/empty.
backend/app/api/simulation.py:948
↓ 2 callers
Function
_truncate
Trim ``text`` so the result is at most ``max_chars`` characters, preferring a word boundary within the last 30 characters of the cap and endin
backend/app/services/thread_formatter.py:215
↓ 2 callers
Function
_truncate
(value: str, limit: int)
backend/app/services/discord_notify.py:144
↓ 2 callers
Function
_truncate
(text: str, limit: int)
backend/app/services/feed.py:63
↓ 2 callers
Function
_truncate
(value: str, limit: int)
backend/app/services/slack_notify.py:120
↓ 2 callers
Function
_truncate_scenario
Truncate ``text`` with a trailing ellipsis when it exceeds ``limit``.
backend/app/services/lineage_service.py:98
↓ 2 callers
Function
_try_import_duckdb
()
backend/app/services/demographic_sampler.py:38
↓ 2 callers
Function
_ttl_datetime
Render an ISO-8601 datetime as ``"…"^^xsd:dateTime``. Returns ``None`` for missing / unparseable input so the caller can omit the predicate r
backend/app/services/dkg_publisher.py:312
↓ 2 callers
Function
_wrap_text
Word-wrap ``text`` to fit ``max_width`` pixels, capping at ``max_lines``. Long final lines get an ellipsis. Long single words that overflow on
backend/app/services/share_card.py:106
↓ 2 callers
Function
_wrap_text
Word-wrap to ``max_width``, capped at ``max_lines``. Long final lines get an ellipsis. Single words longer than the line are character-chopped
backend/app/services/replay_gif.py:111
↓ 2 callers
Function
_write_config
(sim_dir: Path, scenario: str)
backend/tests/test_unit_agent_export.py:68
↓ 2 callers
Method
action_count
(self)
backend/scripts/round_memory.py:159
↓ 2 callers
Function
add_event
Queue an event for injection at the next round boundary. Args: simulation_dir: Path to the simulation data directory. event_
backend/scripts/director_events.py:43
↓ 2 callers
Method
add_text_batches
Add text chunks to graph in parallel, return uuid list of all episodes. Uses a single thread pool across all chunks (no artificial batch
backend/app/services/graph_builder.py:53
↓ 2 callers
Function
all_countries
(refresh: bool = False)
backend/app/services/country_registry.py:49
↓ 2 callers
Method
analyze_round
Analyze one round's actions and update agent beliefs. Args: db_path: Path to the platform's SQLite database. belief_s
backend/wonderwall/social_agent/round_analyzer.py:173
↓ 2 callers
Method
build_communities
Leiden-cluster the entity graph, summarize each cluster with an LLM, and replace any existing :Community nodes for this graph.
backend/app/storage/neo4j_storage.py:674
↓ 2 callers
Function
build_discord_embed
Assemble the Discord embed object for ``payload``. ``payload`` is the same dict :func:`webhook_service.build_payload` produces. The embed sur
backend/app/services/discord_notify.py:177
↓ 2 callers
Function
build_email_message
Assemble the full ``multipart/alternative`` MIME envelope.
backend/app/services/email_notify.py:528
↓ 2 callers
Function
build_slack_message
Assemble the Block Kit ``{blocks: [...]}`` body for ``payload``.
backend/app/services/slack_notify.py:150
↓ 2 callers
Function
build_telegram_message
Assemble the Telegram ``sendMessage`` body for ``payload``. Returns the kwargs dict ready to JSON-serialize as the POST body; ``chat_id`` is
backend/app/services/telegram_notify.py:223
↓ 2 callers
Method
call_tool
(self, name: str, arguments: Optional[Dict[str, Any]] = None)
backend/app/services/oracle_seed.py:94
↓ 2 callers
Function
citation_path
(sim_dir: str)
backend/app/services/dkg_publisher.py:429
↓ 2 callers
Function
create_db
r"""Create the database and execute schema SQL files. Args: db_path: Path to the SQLite database file. If ``None``, uses the
backend/wonderwall/social_platform/database.py:93
↓ 2 callers
Method
create_graph
Create graph
backend/app/services/graph_builder.py:42
↓ 2 callers
Method
create_reasoning_recorder
Return a fresh ReasoningTraceRecorder bound to this storage's driver. The recorder buffers per-section steps in memory and flushes on
backend/app/storage/neo4j_storage.py:701
↓ 2 callers
Method
detect
Find existing edges that are contradicted (and thus superseded) by the batch of new relations. Returns a list of edge UUIDs to invali
backend/app/storage/contradiction_detector.py:67
↓ 2 callers
Method
embed_batch
Generate embeddings for multiple texts in batches. batch_size defaults to Config.EMBEDDING_BATCH_SIZE (128). Most providers
backend/app/storage/embedding_service.py:98
↓ 2 callers
Method
emit
Enqueue an event (non-blocking).
backend/app/utils/event_logger.py:153
↓ 2 callers
Function
extract_topics_from_requirement
Extract key debate topics from a simulation requirement. Tries LLM extraction first (precise, deduplicated), falls back to simple keyword ext
backend/wonderwall/social_agent/belief_state.py:407
↓ 2 callers
Method
follow
r"""Follow a user. This method allows agent to follow another user (followee). It checks if the agent initiating the follow request h
backend/wonderwall/social_agent/agent_action.py:400
↓ 2 callers
Method
fork_simulation
Fork an existing simulation into a new child simulation. Copies all prepared files (profiles, config) from the parent so the
backend/app/services/simulation_manager.py:675
↓ 2 callers
Function
format_results_block
Format normalized results as a numbered sources block for prompts. [1] Title — https://example.com Snippet text… (published: 2026-01-01)
backend/app/utils/searxng_client.py:175
↓ 2 callers
Method
from_dict
Create from dictionary
backend/app/models/project.py:93
↓ 2 callers
Method
from_profile
Create initial beliefs from an agent's simulation config. Args: agent_config: Dict with optional keys ``stance``, ``sentiment_bia
backend/wonderwall/social_agent/belief_state.py:39
↓ 2 callers
Method
full_text
Full-detail rendering of all actions this round.
backend/scripts/round_memory.py:147
↓ 2 callers
Method
generate
Generate ontology definition Args: document_texts: List of document texts simulation_requirement: Simulation
backend/app/services/ontology_generator.py:21
↓ 2 callers
Method
generate_agent_feedback
Generate per-agent feedback text for the next round's prompt. Returns empty string if there's nothing meaningful to report.
backend/wonderwall/social_agent/round_analyzer.py:281
↓ 2 callers
Function
generate_post_vector
(model: AutoModel, tokenizer: AutoTokenizer, texts, batch_size)
backend/wonderwall/social_platform/process_recsys_posts.py:36
↓ 2 callers
Method
generate_profile_from_entity
Generate Wonderwall Agent Profile from knowledge graph entity Args: entity: Knowledge graph entity node user
backend/app/services/wonderwall_profile_generator.py:306
↓ 2 callers
Method
generate_profiles_from_entities
Batch generate Agent Profiles from entities (supports parallel generation) Args: entities: List of entities
backend/app/services/wonderwall_profile_generator.py:1029
↓ 2 callers
Method
generate_report
Generate complete report (real-time section-by-section output) Each section is saved to the folder immediately after generation, no
backend/app/services/report_agent.py:2541
↓ 2 callers
Function
generate_run_summary
Generate a run summary from events.jsonl files. Reads both the global events.jsonl (LLMClient calls from Flask process) and the per-simu
backend/app/utils/run_summary.py:155
↓ 2 callers
Method
get_agent_log
Get Agent log content Args: report_id: Report ID from_line: Starting line number (for incremental retrieval,
backend/app/services/report_agent.py:3121
↓ 2 callers
Method
get_agent_stats
Get statistics for each Agent. Scans JSONL directly — no intermediate AgentAction objects.
backend/app/services/simulation_runner.py:1195
↓ 2 callers
Method
get_all
Return all context fields as a dict.
backend/app/utils/trace_context.py:42
↓ 2 callers
Method
get_console_log
Get console log content This is the console output log (INFO, WARNING, etc.) during report generation, different from the st
backend/app/services/report_agent.py:3060
↓ 2 callers
Method
get_degree_centrality
Top entities by total relationship count (degree centrality).
backend/app/storage/neo4j_storage.py:945
↓ 2 callers
Method
get_entities_by_type
Get all entities of a specified type. Args: graph_id: Graph ID entity_type: Entity type (e.g., "Student", "P
backend/app/services/entity_reader.py:355
↓ 2 callers
Function
get_event_history
Return all injected events (history) for this simulation.
backend/scripts/director_events.py:182
↓ 2 callers
Method
get_ontology
(self, graph_id: str)
backend/app/storage/neo4j_storage.py:184
↓ 2 callers
Method
get_polymarket_logger
Get the Polymarket platform action logger
backend/scripts/action_logger.py:182
↓ 2 callers
Function
get_prices
Get current prices for outcome A and B. Returns: (price_a, price_b) where both are in [0, 1] and sum to 1.
backend/wonderwall/simulations/polymarket/amm.py:41
↓ 2 callers
Function
get_recsys_model
(recsys_type: str = None)
backend/wonderwall/social_platform/recsys.py:100
↓ 2 callers
Method
get_sentiment_prompt
Called by Polymarket loop to get social media sentiment for trader injection.
backend/scripts/market_media_bridge.py:281
↓ 2 callers
Function
get_trace_contents
Get the contents of posts that a user has interacted with. Args: user_id (str): ID of the user. action (str): Type of action
backend/wonderwall/social_platform/recsys.py:647
↓ 2 callers
Function
get_twhin_model
(device)
backend/wonderwall/social_platform/recsys.py:74
↓ 2 callers
Function
get_twhin_tokenizer
()
backend/wonderwall/social_platform/recsys.py:64
↓ 2 callers
Function
inject_sentiment_context
Inject social media sentiment into a Polymarket agent's system message.
backend/scripts/market_media_bridge.py:309
↓ 2 callers
Function
isValidHttpUrl
(raw)
frontend/src/utils/urlParams.js:53
↓ 2 callers
Function
is_valid_project_id
Return ``True`` iff ``project_id`` is a non-empty string matching :data:`PROJECT_ID_PATTERN`. Used at the API boundary to reject obviously ma
backend/app/services/project_stats.py:250
↓ 2 callers
Function
load_config
Load configuration file
backend/scripts/run_parallel_simulation.py:700
↓ 2 callers
Function
load_model
(model_name)
backend/wonderwall/social_platform/recsys.py:83
↓ 2 callers
Function
load_registry
Parse the manifest into a name → MCPServerSpec map. Returns an empty dict when the feature is off, the file is missing, ``pyyaml`` isn't inst
backend/app/services/agent_mcp_tools.py:66
↓ 2 callers
Function
main
()
scripts/scan_i18n.py:293
↓ 2 callers
Function
optimize_interview_prompt
Optimize interview prompt by adding prefix to prevent Agent from calling tools Args: prompt: Original question Returns:
backend/app/api/simulation.py:227
↓ 2 callers
Method
perform_action_by_data
(self, func_name, *args, **kwargs)
backend/wonderwall/social_agent/agent.py:575
↓ 2 callers
Function
phrase_in_any_group
Return the group containing `phrase` as a whole, or None. Used for multi-word phrases like 'in progress' that must match as units.
scripts/scan_i18n.py:226
↓ 2 callers
Function
post_json
POST ``body`` as JSON. Returns ``(ok, message)`` — never raises. ``label`` names the channel in the serialize-error message (e.g. "Slack").
backend/app/services/_notify_base.py:48
↓ 2 callers
Function
process_agent
(i)
backend/wonderwall/social_agent/agents_generator.py:453
↓ 2 callers
Method
read_from_send_queue
(self, message_id)
backend/wonderwall/social_platform/channel.py:62
↓ 2 callers
Method
read_new_events
Return parsed events from new lines.
backend/app/utils/event_logger.py:339
↓ 2 callers
Function
read_webhook_log
Public read API for ``GET /webhook-log``. Returns the most recent ``limit`` entries newest-first plus the total attempt count. ``max_retained
backend/app/services/webhook_service.py:396
↓ 2 callers
Method
receive_from
(self)
backend/wonderwall/social_platform/channel.py:48
↓ 2 callers
Function
record_path
(sim_dir: str)
backend/app/services/waybackclaw_publisher.py:272
↓ 2 callers
Function
render_jsonl
Render the row list as JSON-lines (newline-delimited JSON). One JSON object per line — the format ``pandas.read_json(lines=True)``, DuckDB ``
backend/app/services/trajectory_export.py:246
↓ 2 callers
Function
render_platform_badge_svg_bytes
Convenience wrapper returning the platform badge as UTF-8 bytes with an XML declaration prefix — mirrors ``render_badge_svg_bytes``.
backend/app/services/badge_service.py:388
↓ 2 callers
Function
render_watch_html
Render the full ``text/html`` body for ``/watch/<simulation_id>``. ``summary`` is the same dict shape as ``_build_embed_summary_payload`` ret
backend/app/services/watch_renderer.py:688
↓ 2 callers
Function
reset_active_locale
Reset the active locale to the value it had before ``set_active_locale``.
backend/app/utils/i18n.py:95
↓ 2 callers
Function
resolveOrigin
(origin)
frontend/src/utils/urlParams.js:89
↓ 2 callers
Method
run
Run Twitter simulation Args: max_rounds: Maximum simulation rounds (optional, used to truncate long simulations)
backend/scripts/run_twitter_simulation.py:548
↓ 2 callers
Function
run_polymarket_simulation
Run Polymarket prediction market simulation. Uses Wonderwall's SimulationConfig-based path. Agents are LLM-driven traders that browse markets
backend/scripts/run_parallel_simulation.py:2043
← previous
next →
601–700 of 3,647, ranked by callers