MCPcopy Create free account

hub / github.com/castari/castari-proxy / functions

Functions120 in github.com/castari/castari-proxy

↓ 10 callersFunctionsend
(event: string, payload: unknown)
worker/src/stream.ts:27
↓ 9 callersFunctioninvalidRequest
(message: string, details?: Record<string, unknown>)
worker/src/errors.ts:21
↓ 8 callersFunctionmapMessageToUIEvents
(message: SDKMessage)
claude-agent-demo/lib/agent/events.ts:13
↓ 5 callersFunctionbuildPolicy
(mode: ToolMode)
claude-agent-demo/lib/policy/permission.ts:41
↓ 5 callersFunctionbuildUserMessageContent
( text: string, images: ImagePayload[] )
claude-agent-demo/lib/agent/messages.ts:4
↓ 4 callersFunctionbuildOptions
(config: QueryRuntimeConfig = {})
claude-agent-demo/lib/agent/session.ts:20
↓ 4 callersFunctionensureInside
(base: string, candidate: string)
claude-agent-demo/lib/policy/paths.ts:16
↓ 4 callersFunctiongetProcessEnv
()
src/queryCastari.ts:381
↓ 4 callersFunctionisRecord
(value: unknown)
claude-agent-demo/lib/agent/events.ts:340
↓ 4 callersFunctionnormalizeEffort
(value: unknown)
src/queryCastari.ts:292
↓ 4 callersFunctionnormalizeSummary
(value: unknown)
src/queryCastari.ts:299
↓ 3 callersFunctioncreateThinkingEvent
({ blockId, status, text, redacted }: { blockId: string; status: 'start' | 'delta' | 'complete';
claude-agent-demo/lib/agent/events.ts:203
↓ 3 callersFunctionensureDir
(dirPath: string)
claude-agent-demo/lib/policy/paths.ts:12
↓ 3 callersFunctionfetch
(request: Request, env: Env)
worker/src/index.ts:17
↓ 3 callersFunctiongetHeader
(headers: Headers, name: string)
worker/src/utils.ts:4
↓ 3 callersFunctionrandomId
(prefix: string)
worker/src/utils.ts:58
↓ 3 callersFunctionresolveProvider
( headers: CastariHeaders, body: AnthropicRequest, config: WorkerConfig, )
worker/src/provider.ts:45
↓ 2 callersMethodappend
(sessionId: string, entry: TranscriptEntry)
claude-agent-demo/lib/store/transcripts.ts:13
↓ 2 callersFunctioncanonicalize
(p: string)
claude-agent-demo/lib/policy/paths.ts:4
↓ 2 callersFunctioncategorizeServerTools
(tools?: AnthropicToolDefinition[])
worker/src/provider.ts:82
↓ 2 callersFunctionencodeEvent
(event: UIEvent, encoder: TextEncoder)
claude-agent-demo/app/api/chat/route.ts:168
↓ 2 callersFunctionensureInterceptorInstalled
()
src/queryCastari.ts:204
↓ 2 callersFunctionextractTextDelta
(message: SDKPartialAssistantMessage)
claude-agent-demo/lib/agent/events.ts:261
↓ 2 callersFunctionfinalizeToolBlocks
()
worker/src/stream.ts:136
↓ 2 callersFunctionflushTextBlockStop
()
worker/src/stream.ts:48
↓ 2 callersFunctionformatError
(error: unknown)
claude-agent-demo/app/api/chat/route.ts:172
↓ 2 callersFunctionformatStructuredData
(value: unknown)
claude-agent-demo/app/components/Chat.tsx:891
↓ 2 callersFunctionisServerTool
(tool: AnthropicToolDefinition | undefined)
worker/src/provider.ts:103
↓ 2 callersFunctionjsonHeaders
()
worker/src/errors.ts:66
↓ 2 callersFunctionmapStopReason
(reason: string | null)
worker/src/translator.ts:253
↓ 2 callersFunctionnormalizeBaseUrl
(value: string, suffix: '/v1/messages' | '/v1/chat/completions')
worker/src/config.ts:30
↓ 2 callersFunctionregisterBaseOrigins
(options?: { env?: Record<string, string | undefined>; explicit?: string })
src/queryCastari.ts:261
↓ 2 callersFunctionresolveConfig
(env: Env)
worker/src/config.ts:14
↓ 1 callersFunctionaddBaseOrigin
(candidate?: string)
src/queryCastari.ts:271
↓ 1 callersFunctionappendAssistantEvents
(message: SDKAssistantMessage, events: UIEvent[])
claude-agent-demo/lib/agent/events.ts:91
↓ 1 callersFunctionappendStreamEvents
(message: SDKPartialAssistantMessage, events: UIEvent[])
claude-agent-demo/lib/agent/events.ts:150
↓ 1 callersFunctionauthenticationError
(message = 'Authentication failed')
worker/src/errors.ts:25
↓ 1 callersFunctionbuildAnthropicHeaders
(original: Headers, apiKey: string)
worker/src/index.ts:119
↓ 1 callersFunctionbuildMcpServers
()
claude-agent-demo/lib/mcp/servers.ts:6
↓ 1 callersFunctionbuildOpenRouterRequest
( body: AnthropicRequest, options: OpenRouterBuildOptions, )
worker/src/translator.ts:30
↓ 1 callersFunctionbuildPromptStream
( message: APIUserMessage )
claude-agent-demo/app/api/chat/route.ts:190
↓ 1 callersFunctionbuildResolvedMeta
(args: { base?: CastariMeta; env: Record<string, string | undefined>; provider: Provider; originalMode
src/queryCastari.ts:355
↓ 1 callersFunctionconvertContentParts
(parts: AnthropicContent[])
worker/src/translator.ts:125
↓ 1 callersFunctionconvertMessage
(message: AnthropicMessage)
worker/src/translator.ts:76
↓ 1 callersFunctionconvertMessages
(body: AnthropicRequest)
worker/src/translator.ts:60
↓ 1 callersFunctionconvertOpenRouterContent
(content: string | null | OpenRouterMessageContent)
worker/src/translator.ts:234
↓ 1 callersFunctionconvertToolChoice
(choice: AnthropicRequest['tool_choice'])
worker/src/translator.ts:166
↓ 1 callersFunctionconvertTools
(tools?: AnthropicToolDefinition[])
worker/src/translator.ts:148
↓ 1 callersFunctioncreateToolCallEvent
(segment: ToolUseSegment)
claude-agent-demo/lib/agent/events.ts:225
↓ 1 callersFunctioncreateToolResultEvent
(segment: ToolResultSegment)
claude-agent-demo/lib/agent/events.ts:237
↓ 1 callersFunctioncreateTranscriptHooks
()
claude-agent-demo/lib/agent/hooks.ts:17
↓ 1 callersFunctionderiveBlockId
( message: SDKPartialAssistantMessage, payload: Record<string, unknown> )
claude-agent-demo/lib/agent/events.ts:251
↓ 1 callersFunctionderiveToolResultContent
(result: AnthropicContent)
worker/src/translator.ts:176
↓ 1 callersFunctiondetectServerTools
(tools?: AnthropicToolDefinition[])
worker/src/provider.ts:99
↓ 1 callersFunctionensureTextBlock
()
worker/src/stream.ts:55
↓ 1 callersFunctionensureToolBlock
(call: OpenRouterToolCall)
worker/src/stream.ts:67
↓ 1 callersFunctionerrorResponse
(error: unknown)
worker/src/errors.ts:42
↓ 1 callersFunctionextractApiKey
(headers: Headers)
worker/src/index.ts:85
↓ 1 callersFunctionextractStopReason
(message: SDKAssistantMessage)
claude-agent-demo/lib/agent/events.ts:287
↓ 1 callersFunctionextractToolResultText
(segment: ToolResultSegment)
claude-agent-demo/lib/agent/events.ts:295
↓ 1 callersFunctiongetCredentialsForProvider
( provider: Provider, providers: CastariProviders | undefined, env: Record<string, string | undefined>,
src/queryCastari.ts:281
↓ 1 callersFunctiongetToolStatusLabel
(tool: ToolCallState)
claude-agent-demo/app/components/Chat.tsx:882
↓ 1 callersFunctionhandleChunk
(json: any)
worker/src/stream.ts:100
↓ 1 callersFunctionhandleOpenRouter
(ctx: OpenRouterContext)
worker/src/index.ts:138
↓ 1 callersFunctionhandleToolCalls
(toolCalls?: OpenRouterToolCall[])
worker/src/stream.ts:85
↓ 1 callersFunctioninferProviderFromModel
(model: string)
worker/src/provider.ts:59
↓ 1 callersFunctioninjectReasoningIntoPayload
(raw: string, reasoning?: ReasoningConfig)
src/queryCastari.ts:325
↓ 1 callersFunctionisTextDeltaEntry
(entry: unknown)
claude-agent-demo/lib/agent/events.ts:344
↓ 1 callersFunctionisWebSearchTool
(tool: AnthropicToolDefinition | undefined)
worker/src/provider.ts:114
↓ 1 callersFunctionmapOpenRouterResponse
( providerResponse: OpenRouterResponse, originalModel: string, )
worker/src/translator.ts:193
↓ 1 callersFunctionnormalizeCastariHeaders
(headers: Headers)
worker/src/utils.ts:24
↓ 1 callersFunctionnormalizeMcpMode
(value?: string)
worker/src/config.ts:49
↓ 1 callersFunctionnormalizeMetadata
(metadata: AnthropicRequest['metadata'])
worker/src/index.ts:80
↓ 1 callersFunctionnormalizeReasoning
( cfg: ReasoningConfig | undefined, eff: ReasoningEffortPreference | undefined, sum: ReasoningSummaryPre
src/queryCastari.ts:306
↓ 1 callersFunctionnormalizeServerToolsMode
(value?: string)
worker/src/config.ts:36
↓ 1 callersFunctionparseRequest
( req: NextRequest )
claude-agent-demo/app/api/chat/route.ts:150
↓ 1 callersFunctionparseToolArguments
(value?: string)
worker/src/translator.ts:244
↓ 1 callersFunctionprocessEvent
(raw: string)
worker/src/stream.ts:173
↓ 1 callersFunctionproxyAnthropic
( body: AnthropicRequest, request: Request, apiKey: string, upstreamUrl: string, )
worker/src/index.ts:96
↓ 1 callersFunctionqueryCastari
({ prompt, options = {}, }: { prompt: string | AsyncIterable<SDKUserMessage>; options?: CastariOptions
src/queryCastari.ts:97
↓ 1 callersFunctionreadFileAsDataUrl
(file: File)
claude-agent-demo/app/components/Chat.tsx:804
↓ 1 callersFunctionrecordTranscriptEntry
(message: SDKMessage, event: UIEvent)
claude-agent-demo/app/api/chat/route.ts:177
↓ 1 callersFunctionresolveOpenRouterModel
(model: string, defaultVendor: string)
worker/src/provider.ts:66
↓ 1 callersFunctionresolveProvider
(model: string)
src/queryCastari.ts:64
↓ 1 callersFunctionresolveSubagentModel
(params: SubagentResolutionParams)
src/queryCastari.ts:397
↓ 1 callersFunctionresolveWireModel
(model: string, provider: Provider, defaultVendor = 'openai')
src/queryCastari.ts:74
↓ 1 callersFunctionrewriteEditInput
(input: ToolInput)
claude-agent-demo/lib/policy/permission.ts:101
↓ 1 callersFunctionrewriteInputs
(toolName: string, input: ToolInput)
claude-agent-demo/lib/policy/permission.ts:76
↓ 1 callersFunctionrewriteReadInput
(input: ToolInput)
claude-agent-demo/lib/policy/permission.ts:92
↓ 1 callersFunctionrewriteSearchInput
(input: ToolInput)
claude-agent-demo/lib/policy/permission.ts:121
↓ 1 callersFunctionrewriteWriteInput
(input: ToolInput)
claude-agent-demo/lib/policy/permission.ts:110
↓ 1 callersFunctionsafePayload
(payload: unknown)
claude-agent-demo/lib/agent/hooks.ts:39
↓ 1 callersFunctionsafeStringify
(value: unknown)
worker/src/translator.ts:185
↓ 1 callersFunctionsanitizeSessionId
(sessionId: string)
claude-agent-demo/lib/store/transcripts.ts:19
↓ 1 callersFunctionshouldIntercept
(request: Request)
src/queryCastari.ts:249
↓ 1 callersFunctionstartQuery
(prompt: QueryPrompt, config: QueryRuntimeConfig = {})
claude-agent-demo/lib/agent/session.ts:60
↓ 1 callersFunctionstreamOpenRouterToAnthropic
(upstream: Response, options: StreamOptions)
worker/src/stream.ts:17
↓ 1 callersFunctionstringifySystem
(system: string | AnthropicContentText[])
worker/src/translator.ts:71
FunctionChat
()
claude-agent-demo/app/components/Chat.tsx:83
FunctionHome
()
claude-agent-demo/app/page.tsx:3
next →1–100 of 120, ranked by callers