|
| 1 | +import { mysqlChannels } from './config/mysql'; |
| 2 | +import { lruMemoizerChannels } from './config/lru-memoizer'; |
| 3 | +import { ioredisChannels } from './config/ioredis'; |
| 4 | +import { pgChannels } from './config/pg'; |
| 5 | +import { openaiChannels } from './config/openai'; |
| 6 | +import { anthropicAiChannels } from './config/anthropic-ai'; |
| 7 | +import { vercelAiChannels } from './config/vercel-ai'; |
| 8 | + |
1 | 9 | /** |
2 | 10 | * Fully-qualified `diagnostics_channel` names that orchestrion publishes to. |
3 | 11 | * |
|
12 | 20 | * they don't drift apart and silently stop firing. |
13 | 21 | */ |
14 | 22 | export const CHANNELS = { |
15 | | - MYSQL_QUERY: 'orchestrion:mysql:query', |
16 | | - LRU_MEMOIZER_LOAD: 'orchestrion:lru-memoizer:load', |
17 | | - IOREDIS_COMMAND: 'orchestrion:ioredis:command', |
18 | | - IOREDIS_CONNECT: 'orchestrion:ioredis:connect', |
19 | | - PG_QUERY: 'orchestrion:pg:query', |
20 | | - PG_CONNECT: 'orchestrion:pg:connect', |
21 | | - PGPOOL_CONNECT: 'orchestrion:pg-pool:connect', |
22 | | - OPENAI_CHAT: 'orchestrion:openai:chat', |
23 | | - OPENAI_RESPONSES: 'orchestrion:openai:responses', |
24 | | - OPENAI_EMBEDDINGS: 'orchestrion:openai:embeddings', |
25 | | - OPENAI_CONVERSATIONS: 'orchestrion:openai:conversations', |
26 | | - ANTHROPIC_CHAT: 'orchestrion:@anthropic-ai/sdk:chat', |
27 | | - ANTHROPIC_MODELS: 'orchestrion:@anthropic-ai/sdk:models', |
28 | | - ANTHROPIC_MESSAGES_STREAM: 'orchestrion:@anthropic-ai/sdk:messages-stream', |
29 | | - // Vercel AI (`ai`) v6: orchestrion injects these so the same channel-based |
30 | | - // integration that consumes `ai`'s native `ai:telemetry` channel (v7) can |
31 | | - // also instrument v6. Each maps to a top-level function in `ai`'s bundle. |
32 | | - VERCEL_AI_GENERATE_TEXT: 'orchestrion:ai:generateText', |
33 | | - VERCEL_AI_STREAM_TEXT: 'orchestrion:ai:streamText', |
34 | | - VERCEL_AI_EMBED: 'orchestrion:ai:embed', |
35 | | - VERCEL_AI_EMBED_MANY: 'orchestrion:ai:embedMany', |
36 | | - VERCEL_AI_EXECUTE_TOOL_CALL: 'orchestrion:ai:executeToolCall', |
37 | | - // `resolveLanguageModel` is the single chokepoint every model call flows |
38 | | - // through; we wrap it to monkey-patch `doGenerate`/`doStream` on the returned |
39 | | - // model (the model-call site itself is an inline call with no injectable |
40 | | - // definition). |
41 | | - VERCEL_AI_RESOLVE_LANGUAGE_MODEL: 'orchestrion:ai:resolveLanguageModel', |
| 23 | + ...mysqlChannels, |
| 24 | + ...lruMemoizerChannels, |
| 25 | + ...ioredisChannels, |
| 26 | + ...pgChannels, |
| 27 | + ...openaiChannels, |
| 28 | + ...anthropicAiChannels, |
| 29 | + ...vercelAiChannels, |
42 | 30 | } as const; |
43 | 31 |
|
44 | 32 | export type ChannelName = (typeof CHANNELS)[keyof typeof CHANNELS]; |
0 commit comments