MCPcopy Create free account

hub / github.com/BabylonSocial/babylon / functions

Functions14,075 in github.com/BabylonSocial/babylon

↓ 15 callersFunctioncreateMockActor
( overrides: Partial<PostingActor> = {} )
packages/engine/src/__tests__/posting-probability-service.test.ts:66
↓ 15 callersFunctioncreateMockContext
( overrides: Partial<PostingContext> = {} )
packages/engine/src/__tests__/posting-probability-service.test.ts:54
↓ 15 callersFunctioncreateNPCPost
(npcId: string, content: string)
packages/testing/integration/group-chat-engagement-flow.integration.test.ts:99
↓ 15 callersFunctioncreateTestNPC
( name: string )
packages/testing/integration/alpha-group-threshold.integration.test.ts:77
↓ 15 callersFunctioncreateTestNPC
( name: string )
packages/testing/integration/group-chat-simulation.integration.test.ts:78
↓ 15 callersFunctionderiveTopicFromText
( text: string, date = new Date() )
packages/engine/src/services/daily-topic-service.ts:272
↓ 15 callersFunctiondetectPlatform
* Pure function replicating usePlatform's detection logic. * This mirrors the hook implementation exactly.
apps/web/src/hooks/__tests__/usePlatform.test.ts:28
↓ 15 callersMethodendTick
* End collection for the current tick and return statistics * @returns Complete tick statistics or null if no tick was in progress
packages/engine/src/services/token-stats-service.ts:243
↓ 15 callersFunctionexecuteDirectSendMoney
( params: DirectSendMoneyParams )
packages/agents/src/autonomous/DirectExecutors.ts:2659
↓ 15 callersFunctionexpectAuthRequired
(response: Response)
packages/testing/integration/nft-gated-chats.integration.test.ts:144
↓ 15 callersFunctiongetAllVerifiedEmails
( user: PrivyUserWithEmails | null | undefined )
packages/shared/src/auth/privy-email-utils.ts:105
↓ 15 callersFunctiongetAuthToken
* Get authentication token for test user * * NOTE: Integration tests require proper authentication setup. * For full integration testing: * 1. Run
packages/testing/integration/nft-gated-chats.integration.test.ts:85
↓ 15 callersMethodgetFeed
(limit?: number)
packages/examples/harness/src/types.ts:96
↓ 15 callersFunctiongetPhaseForDay
(day: number)
packages/engine/src/utils/shared-utils.ts:665
↓ 15 callersFunctiongetRawDrizzle
()
packages/db/src/db.ts:1079
↓ 15 callersMethodgetTeamChatAgents
* Get all agents in the user's team chat * * @param userId - The human user ID * @param groupId - Optional group ID if already known (avoids
packages/agents/src/services/TeamChatService.ts:407
↓ 15 callersFunctionget_available_archetypes
Get list of all available archetypes.
packages/training/python/src/training/rubric_loader.py:156
↓ 15 callersMethodhook
(name: T, fn: RuntimeHooks[T])
packages/sim/core/types.ts:160
↓ 15 callersFunctionimportApiUrl
( baseUrl: string | undefined )
packages/testing/unit/mobile/api-url.test.ts:13
↓ 15 callersFunctioninvalidateAfterPredictionTrade
( marketId: string )
packages/engine/src/services/trade-cache-invalidation.ts:127
↓ 15 callersFunctioninvalidateCachePattern
( pattern: string, options: CacheOptions = {} )
packages/api/src/cache/cache-service.ts:430
↓ 15 callersFunctionisAbsoluteUrl
(url: string)
packages/shared/src/utils/assets.ts:15
↓ 15 callersFunctionisMatchingOptimistic
( pending: ChatMessage, incoming: ChatMessage )
packages/testing/unit/chat-message-helpers.test.ts:55
↓ 15 callersFunctionisRedisAvailable
()
packages/api/src/redis/client.ts:212
↓ 15 callersMethodlist
* List tasks with filtering and pagination
packages/a2a/src/extended-task-store.ts:72
↓ 15 callersFunctionmakeAlert
(overrides: Record<string, unknown> = {})
packages/testing/unit/manage-price-alerts.test.ts:91
↓ 15 callersFunctionnormalizeTopicDate
(date: Date)
packages/engine/src/services/daily-topic-service.ts:210
↓ 15 callersMethodnotifyConnectionState
( state: ConnectionState, error: string | null )
apps/web/src/lib/sse/SSEManager.ts:354
↓ 15 callersFunctionprice_from_holdings
(initial_price, net_holdings, base_reserve=INITIAL_BASE_RESERVE)
packages/training/python/tests/test_market_stability.py:76
↓ 15 callersMethodregister
(ctx: EngineContext)
packages/sim/core/types.ts:207
↓ 15 callersFunctionrequireNftChatAccess
( user: { userId: string; dbUserId?: string; isAgent?: boolean }, chatId: string )
packages/api/src/services/nft-chat-gating-service.ts:101
↓ 15 callersMethodreset
()
packages/shared/src/types/common.ts:190
↓ 15 callersFunctionresolvePerpTicker
( identifier?: string | null )
packages/agents/src/autonomous/utils/resolvePerpTicker.ts:20
↓ 15 callersFunctionresolveReplyTo
* Resolves the replyToMessage for a given message. * Replica of resolveReplyTo() in MessageList.tsx.
packages/testing/unit/chat-reply-to-message.test.ts:77
↓ 15 callersMethodreversePurchaseFunding
( userId: string, paymentIntentId: string, reason: 'refund' | 'dispute', amountUSD: number,
packages/api/src/services/trading-balance-funding-service.ts:369
↓ 15 callersFunctionsanitizeOnboardingUsername
(username: string)
packages/shared/src/utils/username.ts:7
↓ 15 callersMethodstart
Start vLLM serving the model.
packages/training/python/src/training/shared_model_rl.py:1831
↓ 15 callersFunctiontoSafeDayNumber
(dayNumber: number)
packages/engine/src/utils/date-utils.ts:104
↓ 15 callersFunctiontrim_output
(value: str, *, limit: int = 1200)
packages/training/python/scripts/test_pipeline.py:66
↓ 15 callersMethodview
* Load and view a benchmark file
packages/training/src/benchmark/BenchmarkDataViewer.ts:82
↓ 14 callersFunctionapiFetch
( input: RequestInfo, init: ApiFetchOptions = {} )
apps/web/src/utils/api-fetch.ts:102
↓ 14 callersFunctionattribute_temporal_credit
Assign credit to trading decisions based on eventual outcomes. This is the main entry point for temporal credit assignment. It: 1. Ident
packages/training/python/src/training/temporal_credit.py:154
↓ 14 callersMethodbuy
* Execute a buy order with concentrated liquidity
packages/engine/src/prediction-concentrated-liquidity.ts:325
↓ 14 callersFunctioncalculateFundingPayment
( positionSize: number, fundingRate: number )
packages/shared/src/perps-types.ts:174
↓ 14 callersFunctioncallAgentLLM
(params: AgentLLMParams)
packages/agents/src/llm/agent-llm.ts:409
↓ 14 callersFunctioncanRunTests
()
packages/testing/integration/settings-page.integration.test.ts:94
↓ 14 callersFunctioncleanupTestData
()
packages/engine/src/__tests__/integration/agent-group-chat-invite.integration.test.ts:351
↓ 14 callersFunctioncreateMockAgentTrade
( overrides: Partial<MockAgentTrade> = {} )
apps/web/src/app/api/agents/activity/route.test.ts:69
↓ 14 callersFunctioncreateParticipant
( overrides: Partial<ChatParticipant> = {} )
packages/testing/unit/chat-reply-to-message.test.ts:189
↓ 14 callersFunctioncreateTestUser
(options: { isAgent?: boolean; displayName?: string; })
packages/testing/integration/group-chat-engagement-flow.integration.test.ts:46
↓ 14 callersFunctioncreate_test_scenario
Create a test scenario with markets and perpetuals
packages/training/python/tests/test_action_executor.py:36
↓ 14 callersFunctionderive_metrics_from_labels
Derive aggregate trust metrics from ground-truth interaction labels. Each label has: counterpartyTeam, amountTransferred, wasScam, wasLegiti
packages/training/python/src/training/rewards.py:320
↓ 14 callersFunctionextractDayFromTimestamp
(timestamp: string)
packages/engine/src/utils/date-utils.ts:12
↓ 14 callersMethodgetActiveTrajectory
* Get active trajectory
packages/agents/src/plugins/plugin-trajectory-logger/src/TrajectoryLoggerService.ts:682
↓ 14 callersMethodgetEventCoverage
* Get the current coverage count for an event * * @param eventKeywords - Keywords that identify this specific event * @returns Coverage info
packages/engine/src/services/topic-diversity-service.ts:470
↓ 14 callersFunctiongetRubric
(archetype: string)
packages/training/src/rubrics/index.ts:160
↓ 14 callersFunctiongetSimulationPrice
( ticker: string, overrides?: Map<string, number> )
packages/engine/src/config/simulation.ts:206
↓ 14 callersFunctiongetTierForEngagementScore
(score: number)
packages/engine/src/services/tier-config.ts:98
↓ 14 callersMethodinitializeMarket
* Initialize a market with configurable starting probability and liquidity.
packages/core/markets/prediction/pricing.ts:66
↓ 14 callersFunctionisLocalHost
(host: string | undefined | null)
packages/a2a/src/utils/api-key-auth.ts:93
↓ 14 callersFunctionisObject
(value: unknown)
packages/engine/src/types/guards.ts:85
↓ 14 callersFunctionisTransientError
(error: unknown)
packages/engine/src/utils/error-utils.ts:116
↓ 14 callersFunctionisValidScenarioId
(id: string)
packages/training/src/benchmark/ScenarioLoader.ts:532
↓ 14 callersFunctionlogAdminModify
( context: AdminAuditContext )
packages/api/src/admin-audit.ts:105
↓ 14 callersFunctionmakeStory
( key: string, postCount: number, opts: Partial<NarrativeStory> = {} )
packages/testing/unit/narrative-feed-algorithms.test.ts:56
↓ 14 callersFunctionmakeTestEngine
()
packages/sim/tests/engine.test.ts:23
↓ 14 callersFunctionmake_analysis
Create a minimal valid analysis for testing.
packages/training/python/tests/test_synthesis_prompts_comprehensive.py:120
↓ 14 callersFunctionmockRequest
(apiKey: string | null, host?: string)
packages/testing/unit/a2a/api-key-auth.test.ts:56
↓ 14 callersFunctionparseMarketCategory
( value: string | null | undefined, _context?: string )
packages/testing/unit/cron/markets-tick.test.ts:1397
↓ 14 callersMethodparsePositiveInt
( value: unknown, fallback: number, max: number )
packages/a2a/src/executors/babylon-executor.ts:2403
↓ 14 callersFunctionrecordCronExecution
( jobName: string, startTime: Date, result: { success: boolean; skipped?: boolean; reason?:
packages/api/src/monitoring/cron-metrics.ts:349
↓ 14 callersMethodrecordLLMCall
* Record an LLM call. Uses explicit nodeId if provided, falls back to currentNodeId.
packages/engine/src/dag-trace/tracer.ts:170
↓ 14 callersFunctionrefresh
()
apps/web/src/hooks/useAuth.ts:344
↓ 14 callersFunctionsetNpcTradeRateLimitProvider
( next: NpcTradeRateLimitProvider )
packages/engine/src/services/npc-trade-rate-limiter.ts:272
↓ 14 callersFunctionshouldUpdateWorldFactsLogic
* Pure function that mirrors the shouldUpdateWorldFacts logic * This allows us to test the time comparison logic in isolation
packages/engine/src/__tests__/world-facts-shouldUpdate.test.ts:19
↓ 14 callersMethodstartTick
* Start collecting token usage for a new tick * @param tickId Optional tick identifier (auto-generated if not provided)
packages/engine/src/services/token-stats-service.ts:207
↓ 14 callersFunctiont
(offsetMinutes: number)
packages/testing/unit/narrative-feed-algorithms.test.ts:197
↓ 14 callersFunctiontoNumber
( value: string | number | bigint | null | undefined )
apps/web/src/components/profile/TradingProfile.test.ts:13
↓ 14 callersFunctiontoSafeString
(value: unknown)
apps/web/src/app/api/notifications/route.ts:233
↓ 14 callersFunctiontokenize_for_trainer
Tokenize chat messages with proper masking for GRPO training. Creates masks where: - mask=-100 for prompt tokens (ignored in loss calcul
packages/training/python/src/training/tokenization_utils.py:78
↓ 14 callersMethodupdate
Update tracker and return advantage (reward - baseline).
packages/training/python/src/training/continuous_rl.py:126
↓ 14 callersFunctionverifiable_scam_resistance_reward
Reward for scam resistance. Returns None if agent never encountered scams. +1.0 if agent detected and resisted all scam attempts -1.0 if ag
packages/training/python/src/training/rewards.py:556
↓ 13 callersFunction_make_decision
(action="refuse", leaked=False, explanation="", response_text="", **kwargs)
packages/training/python/tests/test_scam_defense_local_pipeline.py:1105
↓ 13 callersFunction_make_stage
(stage_id="s1", expected_safe=None, risk_weight=1, **kwargs)
packages/training/python/tests/test_scam_defense_local_pipeline.py:1095
↓ 13 callersFunctionaction_catalog_for_key
( seed_key: str, *, chosen_action: str | None = None, distractor_count: int = 8, )
packages/training/python/scripts/scam_defense_exchange.py:687
↓ 13 callersMethodadd_turn
Add turn to current episode
packages/training/python/src/training/multi_turn.py:598
↓ 13 callersFunctionbuildReplyLookup
* Builds a lookup map for resolving replyToMessage from local messages. * Replica of the logic in MessageList.tsx.
packages/testing/unit/chat-reply-to-message.test.ts:56
↓ 13 callersMethodcall
Call Babylon method via official A2A protocol This method converts Babylon's custom methods (a2a.*) to official A2A
packages/examples/babylon-langgraph-agent/babylon_a2a_client.py:229
↓ 13 callersFunctioncallGroqDirect
(params: { prompt: string; system?: string; modelSize?: 'small' | 'large'; temperature?: number; max
packages/agents/src/llm/direct-groq.ts:81
↓ 13 callersFunctioncreateTestGroup
(options: { name?: string; type: 'npc' | 'user' | 'agent'; ownerId: string; })
packages/testing/integration/group-invite-accept.integration.test.ts:116
↓ 13 callersMethodexecuteAutonomousTick
( agentUserId: string, agentRuntime: IAgentRuntime, recordTrajectories?: boolean )
packages/training/src/dependencies.ts:346
↓ 13 callersFunctionextract_regime_from_trajectory
Extract market regime from trajectory metadata if available. Trajectories generated with enhanced metadata will include price context. T
packages/training/python/src/training/market_regime.py:312
↓ 13 callersFunctionfindEmailByDomain
( emails: string[], adminDomain: string | null | undefined )
packages/shared/src/auth/privy-email-utils.ts:160
↓ 13 callersMethodformat
(id: string, label: string)
packages/engine/src/services/real-price-service.ts:189
↓ 13 callersFunctionformatActorFinanceGuardrails
( actor: TradingGuardrailsActor )
packages/engine/src/utils/shared-utils.ts:272
↓ 13 callersFunctionformatActorVoiceContext
(actor: { name?: string; realName?: string; postStyle?: string; postExample?: string[]; voice?: stri
packages/engine/src/utils/shared-utils.ts:17
↓ 13 callersFunctionformatTimeRemaining
(ms: number)
packages/testing/unit/daily-login-service.test.ts:120
↓ 13 callersMethodgenerateArticleForQuestion
* Generate a single article for a question at specific stage * * @param question - Prediction market question * @param organization - News or
packages/engine/src/ArticleGenerator.ts:142
↓ 13 callersMethodgeneratePriceAdjustments
* Generate price adjustments for events that occurred this tick * * @param currentPrices - Map of ticker -> current price * @param events - W
packages/engine/src/services/market-mover-agent.ts:134
↓ 13 callersMethodgenerate_data
Load curated trajectories for the local SFT stage. This stage does not generate fresh rollouts. It selects existing trajecto
packages/training/python/scripts/run_full_pipeline.py:295
← previousnext →501–600 of 14,075, ranked by callers