MCPcopy Create free account

hub / github.com/BabylonSocial/babylon / functions

Functions14,075 in github.com/BabylonSocial/babylon

↓ 2 callersFunctionretireQuestionAndMarket
(questionId: string)
packages/testing/integration/trading-and-questions.integration.test.ts:21
↓ 2 callersFunctionretryWithCondition
( operation: () => Promise<T>, shouldRetry: (error: unknown) => boolean, options: RetryOptions = {} )
packages/shared/src/utils/retry.ts:150
↓ 2 callersFunctionreverseDisputeWithdrawal
( totalWithdrawn: number, restoredEconomicAmount: number )
packages/testing/unit/stripe/points-purchase-logic.test.ts:50
↓ 2 callersFunctionreward_distribution
Show reward distribution.
packages/training/python/scripts/analysis/analyze_trajectories.py:169
↓ 2 callersMethodrowToMarket
(row: Record<string, unknown>)
packages/examples/local-a2a-server/src/handlers/market-handler.ts:485
↓ 2 callersMethodrowToPost
(row: Record<string, unknown>)
packages/examples/local-a2a-server/src/handlers/social-handler.ts:377
↓ 2 callersMethodrun
(self)
packages/training/python/src/training/tinker_rl_orchestrator.py:268
↓ 2 callersMethodrun
(self)
packages/training/python/tests/test_run_pipeline.py:1502
↓ 2 callersMethodrun
* Run the complete matchup benchmark
packages/training/src/benchmark/ArchetypeMatchupBenchmark.ts:677
↓ 2 callersMethodrun
* Run fast evaluation * * Executes efficient batch evaluation of an agent on a benchmark with * parallel runs and progress tracking. Optimize
packages/training/src/benchmark/FastEvalRunner.ts:96
↓ 2 callersFunctionrunBatch
( suite: TestCase[], config: Config )
scripts/coordinator-playground.ts:541
↓ 2 callersFunctionrunFetch
()
apps/web/src/components/admin/SystemHealthTab.tsx:322
↓ 2 callersMethodrunScenario
* Run benchmark on a specific scenario
packages/training/src/benchmark/VLLMBenchmarkRunner.ts:156
↓ 2 callersFunctionrunSingleBenchmark
( agentId: string, snapshot: JsonValue, outputDir: string )
apps/web/src/app/api/agents/[agentId]/benchmark/route.ts:316
↓ 2 callersFunctionrunTestFile
(filePath: string, env: NodeJS.ProcessEnv)
scripts/test-integration-with-server.ts:389
↓ 2 callersFunctionrunTick
(runNum: number)
scripts/run-full-tick.ts:257
↓ 2 callersFunctionrunTick
()
scripts/run-game-tick.ts:21
↓ 2 callersMethodrun_alignment_curriculum
Run a small supervised curriculum to reinforce the benchmark answer format.
packages/training/python/src/training/tinker_trainer.py:1361
↓ 2 callersFunctionrun_benchmark
Run agent through benchmark simulation Args: benchmark_file: Path to benchmark JSON file output_dir: Directory to save r
packages/examples/babylon-langgraph-agent/benchmark_runner.py:163
↓ 2 callersFunctionrun_eval
Run ScamBench evaluation on a trained adapter.
packages/training/python/scripts/run_rlvr_pipeline.py:2364
↓ 2 callersMethodrun_tick
Run one simulation tick for all agents in parallel. This is the core fast path - uses asyncio.gather for true parallel execution.
packages/training/python/src/training/fast_simulator.py:529
↓ 2 callersFunctionsafeExecute
( operation: () => Promise<T>, context: string, service = 'Engine' )
packages/engine/src/utils/error-utils.ts:151
↓ 2 callersFunctionsafeParseInt
* Safely parse an integer from a string, returning a default if invalid.
apps/web/src/app/api/admin/feedback/route.ts:44
↓ 2 callersFunctionsafeRatio
(numerator: number, denominator: number)
packages/core/markets/perps/microstructure.ts:36
↓ 2 callersFunctionsanitizeContext
(text: string)
packages/agents/src/plugins/plugin-experience/src/evaluators/experienceEvaluator.ts:251
↓ 2 callersFunctionsanitizeErrorContext
* Shallow-sanitizes a BabylonError context object before sending to Sentry. * Redacts values whose key matches sensitive patterns; preserves safe pri
packages/api/src/error-handler.ts:75
↓ 2 callersMethodsanitizeForPrompt
* Sanitize user input for prompt injection prevention. * Escapes potential prompt delimiters, limits length, and handles edge cases. * * Hard
packages/agents/src/services/TeamChatResponseService.ts:776
↓ 2 callersFunctionsanitize_jsonish
(value: Any)
packages/training/python/scripts/data-prep/assemble_scam_defense_hf_dataset.py:356
↓ 2 callersFunctionsanitize_jsonish
(value: Any)
packages/training/python/scripts/hf/trajectories_to_hf_dataset.py:1231
↓ 2 callersFunctionsanitize_payload
(value: Any)
packages/training/python/scripts/tools/openai_clean_proxy.py:18
↓ 2 callersFunctionsaveArcPlan
( questionId: string, arc: ArcPlanType )
packages/engine/src/services/narrative-state-service.ts:51
↓ 2 callersMethodsaveExperienceToMemory
* Save experience to memory/knowledge service
packages/agents/src/plugins/plugin-experience/src/service.ts:226
↓ 2 callersMethodsaveSnapshot
()
packages/core/storage/adapters/json/json-storage-provider.ts:118
↓ 2 callersMethodsave_baseline
Save current results as baseline
packages/training/python/src/training/evaluation.py:306
↓ 2 callersMethodsave_checkpoint
Save model checkpoint with optimizer state
packages/training/python/src/training/atropos_trainer.py:915
↓ 2 callersMethodsave_model
(self, output_dir)
packages/training/python/tests/test_train_local_script.py:1677
↓ 2 callersMethodsave_results
Save evaluation history to JSON
packages/training/python/src/training/evaluation.py:540
↓ 2 callersMethodsave_scenarios
Save scenarios to JSON file
packages/training/python/src/training/scenario_pool.py:1040
↓ 2 callersFunctionscaledProb
(base: number, sentiment: number)
packages/engine/src/services/npc-social-engagement-service.ts:703
↓ 2 callersFunctionscanFiles
( rootDir: string, filePaths: string[] )
scripts/env-audit.ts:212
↓ 2 callersMethodscheduleAgentResponse
* Schedule an agent response with delay * * @param params.depth - Current depth in agent-to-agent chain (0 = user-initiated) * @param params.
packages/agents/src/services/TeamChatResponseService.ts:388
↓ 2 callersFunctionscheduleLastUsedUpdate
* Schedule async update for lastUsedAt using write-back cache. * * WHY: Updates go to Redis first (fast), then batched flush to DB (efficient). * T
packages/api/src/utils/api-keys.ts:140
↓ 2 callersFunctionscore
(name: string)
scripts/export-newsletter-users-csv.ts:273
↓ 2 callersMethodscoreByArchetype
* Score trajectories by archetype. * @param archetype - Archetype to use for scoring * @param trajectoryIds - IDs to score * @returns Count o
packages/training/src/scoring/ArchetypeScoringService.ts:357
↓ 2 callersMethodscoreTrajectories
* Score trajectories using RULER (LLM-as-judge with relative comparison) * * Groups trajectories by scenarioId and scores them relative to each
packages/training/src/training/RulerScoringService.ts:89
↓ 2 callersFunctionscore_candidates_single
( *, candidates: Sequence[JudgeCandidate], model: str, api_key: str | None = None, base_ur
packages/training/python/src/training/groq_judge_bundles.py:393
↓ 2 callersFunctionscore_response_batch
Score a batch of responses. Returns list of QualityScore objects.
packages/training/python/src/training/quality_scorer.py:359
↓ 2 callersFunctionscore_response_for_reward
Score response and return values for reward function. Returns: (format_score, reasoning_score, metrics_dict) format_score and r
packages/training/python/src/training/quality_scorer.py:275
↓ 2 callersFunctionscore_scenario
( scenario: dict[str, Any], decisions_by_stage: dict[str, dict[str, Any]], )
packages/training/python/src/training/scambench_scoring.py:482
↓ 2 callersFunctionscore_scenario
Score an entire scenario with weighted stages.
packages/training/python/scripts/eval_scambench.py:287
↓ 2 callersFunctionscore_stage
( scenario: dict[str, Any], stage: dict[str, Any], decision: dict[str, Any], )
packages/training/python/src/training/scambench_scoring.py:472
↓ 2 callersFunctionscore_trading_response
Score a trading model response based on format and content quality. Note: This is distinct from quality_scorer.score_response which provides
packages/training/python/src/training/online_env.py:244
↓ 2 callersFunctionscript_surface_id
(script: dict[str, Any])
packages/training/python/scripts/data-prep/assemble_scam_defense_hf_dataset.py:541
↓ 2 callersMethodsearch_users
Search for users
packages/examples/babylon-langgraph-agent/agent.py:235
↓ 2 callersFunctionseedA2ATestAgents
()
scripts/seed-test-data.ts:306
↓ 2 callersMethodseedActorState
(actor: { id: string; name: string; tier: ActorTier | null; domain: string[]; })
packages/engine/src/services/game-bootstrap-service.ts:262
↓ 2 callersFunctionseedAutonomousAgents
()
scripts/seed-test-data.ts:77
↓ 2 callersFunctionseedBenchmarkAgents
()
scripts/seed-test-data.ts:428
↓ 2 callersFunctionseedModerationTestUsers
()
scripts/seed-test-data.ts:558
↓ 2 callersMethodseedOrganizationState
(org: { id: string; name: string; initialPrice: number | null; })
packages/engine/src/services/game-bootstrap-service.ts:333
↓ 2 callersFunctionseedScamBenchScenario
( options: SeedScamBenchScenarioOptions )
packages/engine/src/services/scambench-scenario-seeding-service.ts:333
↓ 2 callersMethodselectActors
* Select actors with weighted randomness * Prioritizes S/A tier for mains, mixed tiers for supporting, C/D for extras
packages/engine/src/GameGenerator.ts:1075
↓ 2 callersFunctionselectChallengeIds
( pool: ChallengeDef[], pickCount: number, seed: string )
packages/api/src/services/achievement-service.ts:108
↓ 2 callersFunctionselected_identity
(pool: list[tuple[str, str]], rng: random.Random)
packages/training/python/scripts/data-prep/materialize_retained_security_sources.py:804
↓ 2 callersFunctionsendMessageToChat
( chatId: string, senderId: string, content: string )
packages/engine/src/services/dm-service.ts:194
↓ 2 callersFunctionsendNotificationEmail
( input: SendNotificationEmailInput )
packages/api/src/services/notification-email-service.ts:193
↓ 2 callersFunctionserializeKey
(key: MarketKey)
apps/web/src/stores/marketWatchlistStore.ts:20
↓ 2 callersFunctionserializeNotificationForApi
( n: Record<string, unknown> & { actor?: Record<string, unknown> | null; } )
apps/web/src/app/api/notifications/route.ts:227
↓ 2 callersMethodsetActorStates
* Set actor emotional states for current day * * @param states - Map of actorId to emotional state (mood, luck) * * @description * Acto
packages/engine/src/FeedGenerator.ts:416
↓ 2 callersMethodsetBias
* Add or update a bias configuration * * @example * biasEngine.setBias('teslai', 'TeslAI', 'up', 0.8, { durationHours: 24 }) * biasEngine.
packages/engine/src/feedback/bias-engine.ts:55
↓ 2 callersMethodsetCounterpartyContext
* Set counterparty context on the current step. * * Call this BEFORE completeStep() to attach ground-truth metadata about * who the agent is
packages/agents/src/plugins/plugin-trajectory-logger/src/TrajectoryLoggerService.ts:384
↓ 2 callersMethodsetEnvironmentFlags
(flags: Record<string, string | boolean>)
packages/engine/src/dag-trace/tracer.ts:297
↓ 2 callersMethodsetGameTickResult
(result: Record<string, unknown>)
packages/engine/src/dag-trace/tracer.ts:273
↓ 2 callersMethodsetNPCPersonas
* Set NPC personas for consistent behavior * * @param personas - Map of actorId to persona assignment * * @description * NPC personas d
packages/engine/src/FeedGenerator.ts:381
↓ 2 callersMethodsetOrganizations
* Set organizations for this game * * @param organizations - Array of all game organizations * * @description * Organizations include m
packages/engine/src/FeedGenerator.ts:353
↓ 2 callersMethodsetRelationships
* Set relationships between actors * * @param relationships - Array of actor relationships (supports both formats) * * @description * R
packages/engine/src/FeedGenerator.ts:438
↓ 2 callersFunctionsetReputationService
(service: ReputationServiceAdapter)
packages/api/src/services/moderation/points-distribution.ts:44
↓ 2 callersFunctionsetStatusBarStyle
(theme: StatusBarStyle)
apps/mobile/src/lib/status-bar.ts:19
↓ 2 callersMethodset_weights
Update datum weights while preserving the SDK's TensorData shape.
packages/training/python/src/training/tinker_client.py:168
↓ 2 callersMethodsetup
Initialize scenario pool and load scenarios
packages/training/python/src/training/online_env.py:544
↓ 2 callersMethodsetup
Initialize model, tokenizer, optimizer, Kondo gate, and TurboQuant.
packages/training/python/src/training/shared_model_rl.py:442
↓ 2 callersMethodsetup_for_scored_groups
Initialize only the pieces needed to train on pre-scored groups.
packages/training/python/src/training/tinker_trainer.py:920
↓ 2 callersFunctionshape_trading_rewards
Shape rewards for trading episodes. Combines multiple reward signals: - Format quality (think tags, action JSON) - Reasoning quality
packages/training/python/src/training/multi_turn.py:462
↓ 2 callersMethodshouldRebalance
* Determine if rebalancing is needed
packages/engine/src/npc/npc-portfolio-strategy.ts:324
↓ 2 callersFunctionshouldSpawnSubMarket
( eventType: string, category: MarketCategory, parentTimeframe: MarketTimeframe, randomValue?: number
packages/engine/src/services/market-timeframes.ts:641
↓ 2 callersFunctionshouldUpdateWorldFacts
* Check if we should update world facts * Uses the most recent auto-generated world fact's createdAt timestamp * This ensures game tick and cron don
packages/engine/src/game-tick.ts:1931
↓ 2 callersFunctionshuffleArray
* Fisher-Yates shuffle for uniform random sampling. * Shuffles in place and returns the array.
packages/engine/src/services/following-mechanics.ts:40
↓ 2 callersMethodshuffleWithRng
* Shuffle array using provided RNG for reproducibility * * @description * Fisher-Yates shuffle using the provided random number generator.
packages/engine/src/services/question-arc-planner.ts:417
↓ 2 callersFunctionshutdown
(signal: NodeJS.Signals)
tools/chroma/dev-server.ts:94
↓ 2 callersMethodshutdown
Final shutdown - close all persistent resources. Called only when the environment is being destroyed.
packages/training/python/src/training/online_env.py:1001
↓ 2 callersFunctionsign
(value: string, secret: string)
packages/api/src/services/notification-email-service.ts:48
↓ 2 callersFunctionsimulate_perp_outcome
Simulate outcome for a perpetual trade. Uses current price and volatility to simulate outcome. Args: perp: The perpetual market
packages/training/python/src/training/action_executor.py:211
↓ 2 callersFunctionskewness
(values: number[])
scripts/training-data-quality.ts:93
↓ 2 callersFunctionskipUnless
(value: T | null | undefined)
packages/testing/e2e/prediction-market-trading.e2e.test.ts:76
↓ 2 callersFunctionslugify
(value: str)
packages/training/python/scripts/data-prep/verify_prompt_injection_dataset_coverage.py:51
↓ 2 callersFunctionsortRecords
( records: T[], orderBy: OrderByInput<T> | OrderByInput<T>[] | undefined )
packages/db/src/json-storage.ts:239
↓ 2 callersFunctionsourceRank
(source: ContactRow['source'])
scripts/export-newsletter-users-csv.ts:299
↓ 2 callersFunctionsplitSections
Split rendered prompt into sections by common delimiters (=== / ## / ---).
scripts/prompt-diff.ts:86
↓ 2 callersFunctionstable_bucket
(example: export_script.TrainingExample)
packages/training/python/tests/test_scam_defense_local_pipeline.py:510
↓ 2 callersFunctionstable_random
(seed_key: str)
packages/training/python/scripts/scam_defense_exchange.py:149
← previousnext →4,101–4,200 of 14,075, ranked by callers