Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BabylonSocial/babylon
/ functions
Functions
14,075 in github.com/BabylonSocial/babylon
⨍
Functions
14,075
◇
Types & classes
4,309
↳
Endpoints
6
↓ 8 callers
Function
createGroupChat
( name: string, npcOwnerId: string )
packages/testing/integration/group-chat-simulation.integration.test.ts:247
↓ 8 callers
Function
createLike
(userId: string, postId: string)
packages/testing/integration/alpha-group-threshold.integration.test.ts:121
↓ 8 callers
Method
createMany
* Create multiple records
packages/db/src/client.ts:731
↓ 8 callers
Function
createMarket
( overrides: Partial<PerpMarketRecord> = {} )
packages/core/markets/perps/__tests__/microstructure.test.ts:9
↓ 8 callers
Function
createMockActorState
( id: string, lastPostAt: Date | null )
packages/engine/src/__tests__/unit/npc-diversity-guarantee.test.ts:23
↓ 8 callers
Function
createNPCPost
(npcId: string, content: string)
packages/testing/integration/alpha-group-threshold.integration.test.ts:105
↓ 8 callers
Function
createNPCPost
(npcId: string, content: string)
packages/testing/integration/group-chat-simulation.integration.test.ts:108
↓ 8 callers
Function
createPerpPriceImpactPort
()
packages/engine/src/services/perp-price-impact-port.ts:184
↓ 8 callers
Function
createTestGroupChat
(options: { name?: string; npcAdminId: string; })
packages/testing/integration/group-chat-dynamics.integration.test.ts:106
↓ 8 callers
Function
createTickContext
( engineCtx: EngineContext, tickNumber: number, dayNumber?: number )
packages/sim/core/context.ts:88
↓ 8 callers
Method
creditDisputeWon
( userId: string, disputeId: string, amountUSD: number, stripeEventId: string )
packages/api/src/services/trading-balance-funding-service.ts:490
↓ 8 callers
Function
default_local_model_for_backend
(backend: LocalTrainingBackend)
packages/training/python/src/training/local_models.py:21
↓ 8 callers
Function
detectSwaps
( content: string )
packages/testing/integration/engine-generation-output.test.ts:175
↓ 8 callers
Function
error
(msg: string)
scripts/context-inspector.ts:61
↓ 8 callers
Function
executeDirectTrade
( params: DirectTradeParams )
packages/agents/src/autonomous/DirectExecutors.ts:580
↓ 8 callers
Method
expire
* Set expiration on key
packages/agents/src/services/interfaces.ts:198
↓ 8 callers
Method
extractFromRaw
* Parse trajectory from database and extract metrics
packages/training/src/metrics/TrajectoryMetricsExtractor.ts:656
↓ 8 callers
Function
extractXMLFromText
(content: string)
packages/engine/src/llm/xml-parser.ts:29
↓ 8 callers
Function
extract_action_pnl
Extract P&L from a trajectory step if available. Some actions (especially closes) have immediate P&L in the result. Args: step:
packages/training/python/src/training/temporal_credit.py:101
↓ 8 callers
Function
formatPrice
(price: number)
apps/web/src/components/markets/PredictionTradingModal.tsx:340
↓ 8 callers
Method
from_values
( cls, *, backend: LocalTrainingBackend | None = None, model: str | None = Non
packages/training/python/scripts/local_training_recipe.py:63
↓ 8 callers
Method
generateJson
* Generate JSON report
packages/training/src/benchmark/StakeholderReport.ts:673
↓ 8 callers
Method
generateWorldContext
* Generate formatted context string for game generation * This is injected into LLM prompts for events, questions, etc.
packages/engine/src/world-facts-service.ts:308
↓ 8 callers
Method
getActiveTrajectory
* Get an active trajectory by ID. * @param trajectoryId - The trajectory ID * @returns The active trajectory or undefined
packages/training/src/training/TrajectoryRecorder.ts:701
↓ 8 callers
Method
getActorRelationships
* Get relationship context from database for an actor (cached and efficient) * Returns simple text list for direct prompt injection
packages/engine/src/FeedGenerator.ts:448
↓ 8 callers
Function
getAdminToken
()
packages/testing/integration/helpers.ts:73
↓ 8 callers
Function
getAvoidedPatternsContext
(actorId: string)
packages/engine/src/services/npc-anti-repetition-service.ts:498
↓ 8 callers
Method
getConfig
* Get configuration for a specific archetype
packages/training/src/archetypes/ArchetypeConfigService.ts:508
↓ 8 callers
Method
getDecayedConfidence
* Calculate the decayed confidence for an experience
packages/agents/src/plugins/plugin-experience/src/utils/confidenceDecay.ts:25
↓ 8 callers
Function
getDrizzleInstance
()
packages/db/src/db.ts:259
↓ 8 callers
Method
getGlobalAnalytics
* Get global tier analytics * * Optimized to use batch queries instead of N+1 pattern.
packages/engine/src/services/tiered-group-service.ts:1128
↓ 8 callers
Method
getMarketEventSummaries
* Get a summary of event impacts for all active markets * * Scalability considerations: * - Events query limited to 100 most recent * - Qu
packages/engine/src/services/event-market-linker.ts:183
↓ 8 callers
Function
getMaxSubMarketDuration
( parentEndTime: Date, now: number = Date.now() )
packages/testing/unit/cron/markets-tick.test.ts:1236
↓ 8 callers
Function
getPfp
(id: string)
packages/testing/unit/pfp-prompt-quality.test.ts:91
↓ 8 callers
Function
getPredictionMarketPrices
( yesShares: number, noShares: number )
packages/agents/src/autonomous/utils/prediction-pricing.ts:3
↓ 8 callers
Method
getProvider
* Get current provider information
packages/engine/src/llm/openai-client.ts:899
↓ 8 callers
Method
getProvider
* Get the current provider name
packages/examples/babylon-typescript-agent/src/decision.ts:118
↓ 8 callers
Method
getStatus
* Get current autonomy status
packages/agents/src/plugins/plugin-autonomy/src/service.ts:571
↓ 8 callers
Function
getStringSetting
( runtime: IAgentRuntime, key: string )
packages/agents/src/plugins/groq.ts:34
↓ 8 callers
Function
getTable
(tableName: string)
packages/db/src/json-storage.ts:108
↓ 8 callers
Function
getUserChallenges
( userId: string )
packages/api/src/services/achievement-service.ts:1524
↓ 8 callers
Method
get_penalty_from_logprobs
Compute KL penalty from pre-computed logprobs. Returns: (penalty, mean_kl)
packages/training/python/src/training/kl_controller.py:166
↓ 8 callers
Function
get_reserves_from_holdings
(initial_price, net_holdings, base_reserve=INITIAL_BASE_RESERVE)
packages/training/python/tests/test_market_stability.py:69
↓ 8 callers
Function
get_rubric_hash
Get content hash for a specific archetype's rubric.
packages/training/python/src/training/rubric_loader.py:171
↓ 8 callers
Method
get_scenario
Get current scenario for an NPC. Args: npc_id: NPC identifier Returns: Complete scenario with marke
packages/training/python/src/training/simulation_bridge.py:362
↓ 8 callers
Function
hasInsiderLanguage
(content: string)
packages/shared/src/utils/content-analysis.ts:133
↓ 8 callers
Function
heading
(msg: string)
scripts/training-data-quality.ts:60
↓ 8 callers
Function
initializeJsonMode
( basePath: string, options: { autoSave?: boolean } = {} )
packages/db/src/db.ts:528
↓ 8 callers
Method
invalidateUserIdentifierCaches
* Invalidate user identifier caches (id, privyId, username) * * @description Invalidates all identifier-based caches for a user. This includes
packages/api/src/cache/cached-database-service.ts:556
↓ 8 callers
Function
invalidateUserPositions
()
apps/web/src/stores/userPositionsStore.ts:567
↓ 8 callers
Function
isDmChatId
(id: string, userId: string)
apps/web/src/app/api/realtime/token/__tests__/route.test.ts:33
↓ 8 callers
Function
isMintingState
(state: MintFlowState)
packages/testing/unit/nft-mint-flow.test.ts:55
↓ 8 callers
Function
isNotAnActivityError
* Replicate Discord error classification logic from DiscordActivityProvider. * Determines if an SDK error means "not in Discord" vs an actual failure
apps/web/src/components/providers/__tests__/DiscordActivityDetection.test.ts:36
↓ 8 callers
Function
isPromptLoggingEnabled
()
packages/engine/src/utils/prompt-logger.ts:34
↓ 8 callers
Function
isString
(value: unknown)
packages/engine/src/types/guards.ts:94
↓ 8 callers
Function
isWeekend
(gameDay?: number, date: Date = new Date())
packages/engine/src/services/activity-pattern-service.ts:168
↓ 8 callers
Function
load_json
(path: Path)
packages/training/python/scripts/releases/build_scam_defense_release.py:73
↓ 8 callers
Function
logAdminAction
( action: string, context: AdminAuditContext )
packages/api/src/admin-audit.ts:37
↓ 8 callers
Function
makeModule
( overrides: Partial<BabylonSystem> & { id: string; phase: TickPhase } )
packages/sim/tests/hooks.test.ts:22
↓ 8 callers
Function
makeStepWithCounterparty
( team: 'red' | 'blue' | 'gray', intent: 'attack' | 'legitimate' | 'neutral', actionOverrides: Partial<T
packages/training/src/training/__tests__/reward-judgments.test.ts:62
↓ 8 callers
Function
makeTestEngine
()
packages/sim/tests/hooks.test.ts:8
↓ 8 callers
Function
make_market_step
(index: int, market_id: str, action_type: str = "BUY")
packages/training/python/tests/test_hf_dataset_export_script.py:31
↓ 8 callers
Function
make_trajectory
( trajectory_id: str, total_reward: float, final_pnl: float, window_id: str = "window-1",
packages/training/python/tests/test_hf_dataset_export_script.py:96
↓ 8 callers
Function
mapActorToOASFSkills
(actorData: ActorData)
packages/shared/src/utils/oasf-skill-mapper.ts:239
↓ 8 callers
Method
mapToRegistration
* Map database model to AgentRegistration type * * @description Maps Drizzle AgentRegistry model with relations to AgentRegistration * type.
packages/agents/src/services/agent-registry.service.ts:884
↓ 8 callers
Function
mergeChronologically
( posts: FeedPost[], markets: NewMarketEntry[] )
apps/web/src/app/feed/utils/feedAlgorithms.ts:217
↓ 8 callers
Function
normalizeText
(text: string)
scripts/run-core-world-simulation.ts:473
↓ 8 callers
Function
parseAgentPresetProfileIndex
( url: string | null | undefined )
packages/shared/src/utils/assets.ts:114
↓ 8 callers
Function
parseArgs
(args: string[])
apps/cli/src/lib/args.ts:38
↓ 8 callers
Function
parseIdSafe
(id: string)
packages/testing/unit/shared/snowflake.test.ts:16
↓ 8 callers
Function
parse_action_from_response
Parse action JSON from model response. Handles responses with or without think tags. Returns None if parsing fails.
packages/training/python/src/training/online_env.py:181
↓ 8 callers
Function
pct
(n: number)
scripts/market-health.ts:67
↓ 8 callers
Function
post
(timestamp: string)
packages/testing/unit/narrative-feed-algorithms.test.ts:200
↓ 8 callers
Function
publicRequest
(path: string, options: RequestInit = {})
packages/testing/integration/admin-dashboard-rbac.integration.test.ts:66
↓ 8 callers
Function
recordReplyInteraction
( userId: string, npcId: string, qualityScore = 0.8 )
packages/testing/integration/alpha-group-threshold.integration.test.ts:154
↓ 8 callers
Function
relative_scores
Convert absolute rewards to relative scores. Maps rewards to [0, 1] based on their rank within the group. Args: rewards: List o
packages/training/python/src/training/rewards.py:1312
↓ 8 callers
Function
relayCronToStaging
( request: NextRequest | { url: string; headers: Headers }, routeName: string )
packages/api/src/services/cron-relay-service.ts:17
↓ 8 callers
Function
resolvePerpSide
(side: string | undefined)
packages/testing/unit/mcp/tool-handlers.test.ts:365
↓ 8 callers
Function
resolveUserByUsername
( username: string )
packages/agents/src/autonomous/utils/context-gatherers.ts:371
↓ 8 callers
Function
roundTo
(value: number, decimals = 2)
packages/engine/src/utils/math-utils.ts:87
↓ 8 callers
Method
run
Run the full A/B test suite.
packages/training/python/src/training/ab_testing.py:235
↓ 8 callers
Function
runCommand
( command: string[], cwd: string, extraEnv?: Record<string, string> )
scripts/postinstall-agent-frameworks.ts:56
↓ 8 callers
Function
runTest
( name: string, testFn: () => Promise<{ passed: boolean; message: string }> )
packages/training/scripts/e2e-training-test.ts:42
↓ 8 callers
Function
safe_json_dumps
(value: Any)
packages/training/python/scripts/data-prep/assemble_scam_defense_hf_dataset.py:369
↓ 8 callers
Function
sanitizeId
(id: string | undefined | null)
packages/shared/src/utils/format.ts:352
↓ 8 callers
Function
sanitize_string
(value: str)
packages/training/python/scripts/data-prep/assemble_scam_defense_hf_dataset.py:345
↓ 8 callers
Method
sendMessage
* Send message from one agent to another * Automatically routes based on agent types * * @param from - Sender agent ID * @param to - Recip
packages/agents/src/communication/CommunicationHub.ts:102
↓ 8 callers
Method
setContext
(name: string, context: Record<string, unknown>)
apps/cli/src/sentry-bun.d.ts:13
↓ 8 callers
Method
setFactByValue
* Update or create a world fact by value (simple string)
packages/engine/src/world-facts-service.ts:236
↓ 8 callers
Function
shouldFireEvent
( state: EventCooldownState, now: number )
packages/engine/src/utils/entropy.ts:164
↓ 8 callers
Function
shouldGenerateEvent
( arc: ArcState, rand: () => number = secureRandom )
packages/engine/src/services/narrative-event-processor.ts:307
↓ 8 callers
Function
shouldShowGuide
(state: UserState)
packages/testing/unit/game-guide.test.ts:185
↓ 8 callers
Function
shouldSkipKick
* Simulates the kick protection logic from NPCGroupDynamicsService. * Returns true if the kick should be skipped (user protected).
packages/engine/src/__tests__/unit/minimum-group-protection.test.ts:45
↓ 8 callers
Function
skipIfNoDb
()
packages/testing/integration/world-facts/world-facts-service.test.ts:44
↓ 8 callers
Function
skipOrFail
* Skip or fail a test based on strict mode. * In CI/strict mode, fails with a descriptive message. * In local dev, logs info and skips.
packages/testing/e2e/game-feedback-flow.spec.ts:32
↓ 8 callers
Function
spreadNewMarkets
(stories: NarrativeStory[])
apps/web/src/app/api/feed/for-you/scoring.ts:242
↓ 8 callers
Method
subscribe
* Subscribe to a channel with a callback. * Returns an unsubscribe function. * * @param channel - The channel to subscribe to * @param cal
apps/web/src/lib/sse/SSEManager.ts:377
↓ 8 callers
Function
summarizeSeries
(values: number[])
packages/engine/src/services/market-realism-metrics.ts:88
↓ 8 callers
Function
timingSafeEqual
* Timing-safe comparison for API keys to prevent timing attacks. * * Uses SHA-256 hashing to produce fixed-length digests before comparison, * prev
packages/a2a/src/utils/api-key-auth.ts:28
↓ 8 callers
Function
toComparableNumber
( v: JsonValue | Date | undefined )
packages/db/src/json-storage.ts:137
← previous
next →
1,001–1,100 of 14,075, ranked by callers