MCPcopy Create free account

hub / github.com/BillionsBobby/agenttrader-arena / functions

Functions1,026 in github.com/BillionsBobby/agenttrader-arena

↓ 103 callersFunctiongetSqlClient
()
apps/web-new/src/db/postgres.ts:25
↓ 100 callersMethodget
(key: string)
apps/workers/redis-client.ts:23
↓ 74 callersFunctionisDatabaseConfigured
()
apps/web-new/src/db/postgres.ts:21
↓ 66 callersFunctionrunTest
(name: string, fn: () => void | Promise<void>)
apps/web-new/tests/run-tests.ts:6
↓ 65 callersFunctionroundUsd
(value: number)
apps/web-new/src/lib/utils.ts:3
↓ 60 callersMethodset
(key: string, value: string, opts?: { ex?: number })
apps/workers/redis-client.ts:24
↓ 55 callersFunctioniso
(date: Date)
apps/web-new/src/db/seed.ts:29
↓ 34 callersFunctioncn
(...classes: Array<string | false | null | undefined>)
apps/web-new/src/lib/cn.ts:1
↓ 33 callersFunctioncreateId
(prefix: string)
apps/web-new/src/db/id.ts:3
↓ 32 callersFunctionuseSiteLocale
()
apps/web-new/src/components/site-locale-provider.tsx:61
↓ 31 callersFunctionagentSuccess
(data: T, meta?: Record<string, unknown>)
apps/web-new/src/lib/agent-resp.ts:182
↓ 29 callersFunctionminutesAgo
(now: Date, minutes: number)
apps/web-new/src/db/seed.ts:37
↓ 26 callersFunctionhoursAgo
(now: Date, hours: number)
apps/web-new/src/db/seed.ts:33
↓ 24 callersFunctionjsonResponse
(body: unknown, status = 200)
apps/web-new/tests/run-tests.ts:53
↓ 22 callersFunctionrequireDatabaseModeApi
(featureName: string)
apps/web-new/src/lib/database-mode.ts:92
↓ 19 callersFunctionreadStore
()
apps/web-new/src/db/store.ts:291
↓ 18 callersFunctionreadStringField
( value: unknown, key: 'request_id' | 'decision_id' | 'window_id' )
apps/web-new/src/lib/agent-route-handlers.ts:69
↓ 17 callersFunctionupdateStore
( mutator: (store: AgentTraderStore) => T | Promise<T> )
apps/web-new/src/db/store.ts:305
↓ 16 callersFunctionbuildRecentIso
(offsetMs = 0)
apps/web-new/tests/run-live-sql.ts:58
↓ 15 callersFunctionagentUnauthorized
(message = 'Unauthorized')
apps/web-new/src/lib/agent-resp.ts:225
↓ 15 callersFunctionformatRelativeTimestamp
( timestamp: string | null | undefined, locale: string, nowMs = Date.now() )
apps/web-new/src/lib/relative-time.ts:3
↓ 15 callersFunctiongetSessionUser
()
apps/web-new/src/lib/server-session.ts:159
↓ 15 callersFunctionnormalizeOutcomeObjectKey
(value: string)
apps/web-new/src/lib/agent-runtime-service-common.ts:23
↓ 14 callersFunctionagentError
( code: string, message: string, details?: Record<string, unknown>, status = 400 )
apps/web-new/src/lib/agent-resp.ts:192
↓ 14 callersFunctiongetOwnershipUserId
(user: { userId: string; authUserId?: string | null; })
apps/web-new/src/lib/console-auth.ts:6
↓ 14 callersFunctionmakeRejectedResult
(input: { action: DecisionAction; requestedUnits: number | null; topTier: ReturnType<typeof topTierFromR
apps/web-new/src/lib/trade-engine-core.ts:285
↓ 14 callersFunctionparseNumeric
(value: unknown)
apps/web-new/src/lib/market-adapter/polymarket.ts:69
↓ 14 callersFunctionserializeUnknown
(value: unknown)
apps/web-new/src/lib/utils.ts:23
↓ 13 callersFunctiongetLatestQuote
( symbol: string, market?: MarketType, outcomeId?: string | null )
apps/web-new/src/lib/market-adapter/index.ts:1178
↓ 13 callersFunctionnormalizeRequiredString
(value: unknown, field: string)
apps/web-new/src/lib/agent-runtime-service-common.ts:10
↓ 13 callersFunctionquoteKey
(input)
packages/agenttrader-types/index.js:80
↓ 13 callersFunctionreadJson
(response: Response)
apps/web-new/tests/run-tests.ts:79
↓ 12 callersFunctionagentForbidden
(message = 'Forbidden')
apps/web-new/src/lib/agent-resp.ts:229
↓ 12 callersFunctionrequireDatabaseMode
()
apps/web-new/src/lib/agent-runtime-service-common.ts:4
↓ 11 callersFunctionformatCompactUsd
(value: number | null | undefined, localeTag: string)
apps/web-new/src/components/home-dashboard-client.tsx:1880
↓ 11 callersFunctionformatCurrency
(value: number | null | undefined, locale: string)
apps/web-new/src/components/public-agent-page-client.tsx:1181
↓ 11 callersFunctiongetRiskTagForAccount
(cash: number, equity: number)
apps/web-new/src/lib/account-metrics.ts:5
↓ 11 callersFunctionverifyAgentOwnership
(agentId: string, userId: string)
apps/web-new/src/lib/console-auth.ts:32
↓ 10 callersFunctiongetPublicStore
()
apps/web-new/src/lib/public-store-utils.ts:13
↓ 10 callersFunctiongetRequestSiteLocale
()
apps/web-new/src/lib/site-locale-server.ts:5
↓ 10 callersFunctionparseNumberParam
(value: string | null, fallback: number)
apps/web-new/src/lib/utils.ts:43
↓ 10 callersFunctionrequireDatabaseMode
()
apps/web-new/src/lib/owned-agent-service.ts:20
↓ 10 callersFunctionround
(value: number)
apps/web-new/src/db/seed.ts:108
↓ 10 callersFunctiontoIsoValue
(value: string | Date | null | undefined)
apps/web-new/src/lib/owned-agent-service.ts:26
↓ 9 callersFunctionagentNotFound
(resource = 'Resource')
apps/web-new/src/lib/agent-resp.ts:233
↓ 9 callersFunctionendpointKey
(endpoint: Pick<CanonicalEndpoint, 'method' | 'path'>)
apps/web-new/tests/contract-tests.ts:83
↓ 9 callersMethodexec
()
apps/workers/redis-client.ts:18
↓ 9 callersFunctionfetchJson
(url: string)
apps/web-new/src/components/home-dashboard-client.tsx:1829
↓ 9 callersFunctionformatPercent
(value: number | null | undefined, localeTag: string)
apps/web-new/src/components/home-dashboard-client.tsx:1928
↓ 9 callersFunctiongetBriefingWindowMinutes
()
apps/web-new/src/lib/trading-rules.ts:55
↓ 9 callersFunctiongetRedis
()
apps/web-new/src/lib/redis/client.ts:89
↓ 9 callersFunctionhandleAgentDecisionPost
( request: Request, deps: { requireDatabaseModeApi: (featureName: string) => Response | null; requ
apps/web-new/src/lib/agent-route-handlers.ts:104
↓ 9 callersFunctionnormalizeSymbols
(values: string[])
apps/workers/stock-stream.ts:120
↓ 9 callersMethodpipeline
()
apps/workers/redis-client.ts:25
↓ 9 callersFunctionroundQty
(value: number)
apps/web-new/src/lib/trade-engine-core.ts:82
↓ 9 callersFunctionroundToCents
(value: number)
apps/web-new/src/lib/public-store-utils.ts:17
↓ 9 callersFunctiontoIsoString
(value: string | Date | null | undefined)
apps/web-new/src/lib/utils.ts:39
↓ 8 callersFunctionagentBadRequest
( message: string, details?: Record<string, unknown> )
apps/web-new/src/lib/agent-resp.ts:237
↓ 8 callersFunctioncleanupScenario
(sql: Sql, input: { agentId: string; symbols: string[]; })
apps/web-new/tests/run-live-sql.ts:788
↓ 8 callersFunctionhandleAgentDetailRequestPost
( request: Request, deps: { requireDatabaseModeApi: (featureName: string) => Response | null; auth
apps/web-new/src/lib/agent-route-handlers.ts:200
↓ 8 callersFunctionhandleCronJobGet
( request: Request, deps: { verifyCronRequest: (request: Request) => boolean; requireDatabaseModeC
apps/web-new/src/lib/cron-route-handler.ts:1
↓ 8 callersFunctioninterpolate
(value: string)
apps/web-new/src/app/methodology/page.tsx:26
↓ 8 callersFunctionnormalizeLookupKey
(value: string)
apps/web-new/src/lib/agent-detail-request-objects.ts:357
↓ 8 callersFunctionnormalizeOptionalString
(value: unknown)
apps/web-new/src/lib/agent-runtime-service-common.ts:17
↓ 8 callersFunctionnormalizeTimestampToIsoString
( value: string | Date | null | undefined )
apps/web-new/src/lib/timestamp.ts:26
↓ 8 callersFunctiontoNullableFiniteNumber
(value: unknown)
apps/web-new/src/lib/redis/market-cache.ts:95
↓ 8 callersFunctionwriteRejectedSubmission
(input: { agentId: string; decisionId: string; windowId: string; decisionRationale: string; rejectio
apps/web-new/src/lib/agent-decision-service.ts:558
↓ 7 callersFunctionagentUnexpectedError
(error: unknown, fallbackMessage: string)
apps/web-new/src/lib/agent-resp.ts:215
↓ 7 callersFunctionbuildExecutionPath
( quoteSource: string | null | undefined, executionMethod: string | null | undefined )
apps/web-new/src/lib/execution-path.ts:42
↓ 7 callersFunctionclassifyAgentUnexpectedError
( error: unknown, fallbackMessage: string )
apps/web-new/src/lib/agent-resp.ts:110
↓ 7 callersFunctionensureAgentAvatarUrlColumn
()
apps/web-new/src/lib/agent-avatar-schema.ts:3
↓ 7 callersFunctionensureAgentXUrlColumn
()
apps/web-new/src/lib/agent-x.ts:3
↓ 7 callersFunctionensurePlatformCompetitionExists
()
apps/web-new/src/lib/platform-context.ts:16
↓ 7 callersFunctionevaluatePredictionDecisionContext
(input: { latestRequest: StoredDetailRequestRecord | null; windowId: string; actions: PredictionDecision
apps/web-new/src/lib/prediction-detail-contract.ts:339
↓ 7 callersFunctionformatUsMarketDateTime
( value: string | null | undefined, locale: string, style: DateTimeStyle = 'dateTime' )
apps/web-new/src/lib/us-market-time.ts:6
↓ 7 callersFunctiongetBriefingWindowId
(reference: string | Date | null | undefined)
apps/web-new/src/lib/trading-rules.ts:85
↓ 7 callersMethodgetQuote
(symbol: string)
apps/web-new/src/lib/market-adapter/types.ts:78
↓ 7 callersFunctiongetTimestampFreshness
( timestamp: string | null | undefined, thresholds: { freshMs: number; delayedMs: number; }, n
apps/web-new/src/lib/data-freshness.ts:3
↓ 7 callersFunctionisRedisConfigured
()
apps/web-new/src/lib/redis/client.ts:113
↓ 7 callersFunctionnormalizeOptionalString
(value: unknown)
apps/web-new/src/lib/prediction-detail-contract.ts:145
↓ 7 callersFunctionrejectActionDatabase
(actionId: string, reason: string)
apps/web-new/src/lib/trade-engine-database-support.ts:372
↓ 7 callersFunctionroundNumber
(value: number, digits = 2)
apps/web-new/src/lib/agent-briefing.ts:131
↓ 7 callersFunctionwithDatabaseRetry
(task: () => Promise<T>, label: string)
apps/web-new/src/db/store.ts:90
↓ 6 callersFunctionbuildDecisionPersistencePlan
(input: { createId: IdFactory; decisionId: string; agentId: string; competitionId: string; decisionR
apps/web-new/src/lib/agent-persistence-plan.ts:19
↓ 6 callersFunctionbuildPredictionSearchQuery
(value: string)
apps/web-new/src/lib/prediction-search.ts:19
↓ 6 callersFunctionensureMarketDataForSymbols
( marketType: MarketType, symbols: string[], options?: { candlesInterval?: string; candlesLimit?: number
apps/web-new/src/lib/market-adapter/index.ts:1302
↓ 6 callersFunctionformatCompactCurrency
(value: number, locale: string)
apps/web-new/src/components/public-agent-page-client.tsx:1190
↓ 6 callersFunctionformatMarketName
( value: string | null | undefined, t: ReturnType<typeof useSiteLocale>['t'] )
apps/web-new/src/components/public-agent-page-client.tsx:1158
↓ 6 callersFunctionformatPercent
(value: number, locale: string)
apps/web-new/src/components/public-agent-page-client.tsx:1203
↓ 6 callersFunctiongetAuth
()
apps/web-new/src/core/auth/index.ts:10
↓ 6 callersFunctiongetClaimedAgent
(store: AgentTraderStore, agentId: string)
apps/web-new/src/lib/public-store-utils.ts:29
↓ 6 callersFunctiongetClaimedPublicAgentFromDatabase
(agentId: string)
apps/web-new/src/lib/public-agent-db.ts:90
↓ 6 callersFunctiongetSiteMessages
(locale: SiteLocale)
apps/web-new/src/messages/index.ts:17
↓ 6 callersFunctiongetUsStockMarketSession
(date = new Date())
apps/web-new/src/lib/us-stock-market-core.ts:216
↓ 6 callersFunctionisPostgresBackedMode
()
apps/web-new/src/lib/database-mode.ts:88
↓ 6 callersFunctionnormalizePolymarketSlug
(value: string)
apps/web-new/src/lib/market-adapter/polymarket.ts:82
↓ 6 callersFunctionnormalizeWhitespace
(value: string)
apps/web-new/src/lib/utils.ts:35
↓ 6 callersMethodping
()
apps/workers/redis-client.ts:22
↓ 6 callersFunctionreadResponseBody
(response: Response)
apps/web-new/src/lib/agent-route-handlers.ts:81
↓ 6 callersFunctionrefreshDisplayEquity
(agentId: string)
apps/web-new/src/lib/display-equity.ts:170
next →1–100 of 1,026, ranked by callers