@sentry/server-utils 11.4.0 → 11.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/THIRD-PARTY-LICENSES.txt +32 -32
- package/build/cjs/ai/anthropic-ai/index.js +8 -7
- package/build/cjs/ai/anthropic-ai/index.js.map +1 -1
- package/build/cjs/ai/anthropic-ai/streaming.js +3 -1
- package/build/cjs/ai/anthropic-ai/streaming.js.map +1 -1
- package/build/cjs/ai/core/utils.js +40 -23
- package/build/cjs/ai/core/utils.js.map +1 -1
- package/build/cjs/ai/flue/index.js +3 -10
- package/build/cjs/ai/flue/index.js.map +1 -1
- package/build/cjs/ai/flue/utils.js +32 -34
- package/build/cjs/ai/flue/utils.js.map +1 -1
- package/build/cjs/ai/google-genai/index.js +24 -26
- package/build/cjs/ai/google-genai/index.js.map +1 -1
- package/build/cjs/ai/google-genai/streaming.js +6 -1
- package/build/cjs/ai/google-genai/streaming.js.map +1 -1
- package/build/cjs/ai/langchain/embeddings.js +1 -1
- package/build/cjs/ai/langchain/embeddings.js.map +1 -1
- package/build/cjs/ai/langchain/index.js +20 -6
- package/build/cjs/ai/langchain/index.js.map +1 -1
- package/build/cjs/ai/langchain/typesafe-classifier.js +62 -0
- package/build/cjs/ai/langchain/typesafe-classifier.js.map +1 -0
- package/build/cjs/ai/langchain/utils.js +100 -18
- package/build/cjs/ai/langchain/utils.js.map +1 -1
- package/build/cjs/ai/langgraph/index.js +21 -17
- package/build/cjs/ai/langgraph/index.js.map +1 -1
- package/build/cjs/ai/langgraph/utils.js +30 -34
- package/build/cjs/ai/langgraph/utils.js.map +1 -1
- package/build/cjs/ai/mastra/classifier-evaluation.js +30 -0
- package/build/cjs/ai/mastra/classifier-evaluation.js.map +1 -0
- package/build/cjs/ai/mastra/constants.js +2 -1
- package/build/cjs/ai/mastra/constants.js.map +1 -1
- package/build/cjs/ai/mastra/index.js +35 -16
- package/build/cjs/ai/mastra/index.js.map +1 -1
- package/build/cjs/ai/mastra/utils.js +19 -1
- package/build/cjs/ai/mastra/utils.js.map +1 -1
- package/build/cjs/ai/mistral/index.js +1 -1
- package/build/cjs/ai/mistral/index.js.map +1 -1
- package/build/cjs/ai/openai/index.js +1 -1
- package/build/cjs/ai/openai/index.js.map +1 -1
- package/build/cjs/ai/openai/streaming.js +6 -0
- package/build/cjs/ai/openai/streaming.js.map +1 -1
- package/build/cjs/ai/openai/utils.js +10 -0
- package/build/cjs/ai/openai/utils.js.map +1 -1
- package/build/cjs/ai/pi-ai/messages.js +135 -0
- package/build/cjs/ai/pi-ai/messages.js.map +1 -0
- package/build/cjs/ai/pi-ai/providers.js +22 -0
- package/build/cjs/ai/pi-ai/providers.js.map +1 -0
- package/build/cjs/ai/pi-ai/usage.js +34 -0
- package/build/cjs/ai/pi-ai/usage.js.map +1 -0
- package/build/cjs/ai/pi-durable/constants.js +20 -0
- package/build/cjs/ai/pi-durable/constants.js.map +1 -0
- package/build/cjs/ai/pi-durable/index.js +166 -0
- package/build/cjs/ai/pi-durable/index.js.map +1 -0
- package/build/cjs/ai/pi-durable/models.js +140 -0
- package/build/cjs/ai/pi-durable/models.js.map +1 -0
- package/build/cjs/ai/pi-durable/runs.js +146 -0
- package/build/cjs/ai/pi-durable/runs.js.map +1 -0
- package/build/cjs/ai/pi-durable/tools.js +178 -0
- package/build/cjs/ai/pi-durable/tools.js.map +1 -0
- package/build/cjs/ai/pi-durable/utils.js +9 -0
- package/build/cjs/ai/pi-durable/utils.js.map +1 -0
- package/build/cjs/ai/typesafe/index.js +8 -10
- package/build/cjs/ai/typesafe/index.js.map +1 -1
- package/build/cjs/ai/vercel-ai/index.js +0 -1
- package/build/cjs/ai/vercel-ai/index.js.map +1 -1
- package/build/cjs/ai/workers-ai/index.js +1 -1
- package/build/cjs/ai/workers-ai/index.js.map +1 -1
- package/build/cjs/ai/workers-ai/streaming.js +0 -1
- package/build/cjs/ai/workers-ai/streaming.js.map +1 -1
- package/build/cjs/ai/workers-ai/utils.js +9 -8
- package/build/cjs/ai/workers-ai/utils.js.map +1 -1
- package/build/cjs/index.js +2 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/amqplib.js +2 -2
- package/build/cjs/integrations/amqplib.js.map +1 -1
- package/build/cjs/integrations/anthropic.js +1 -1
- package/build/cjs/integrations/anthropic.js.map +1 -1
- package/build/cjs/integrations/aws-sdk/index.js +1 -1
- package/build/cjs/integrations/aws-sdk/index.js.map +1 -1
- package/build/cjs/integrations/dataloader.js +1 -1
- package/build/cjs/integrations/dataloader.js.map +1 -1
- package/build/cjs/integrations/express/instrumentation.js +1 -1
- package/build/cjs/integrations/express/instrumentation.js.map +1 -1
- package/build/cjs/integrations/fastify/instrumentation.js +2 -2
- package/build/cjs/integrations/fastify/instrumentation.js.map +1 -1
- package/build/cjs/integrations/firebase/firestore.js +1 -1
- package/build/cjs/integrations/firebase/firestore.js.map +1 -1
- package/build/cjs/integrations/firebase/functions.js +1 -1
- package/build/cjs/integrations/firebase/functions.js.map +1 -1
- package/build/cjs/integrations/generic-pool.js +1 -1
- package/build/cjs/integrations/generic-pool.js.map +1 -1
- package/build/cjs/integrations/google-genai.js +1 -1
- package/build/cjs/integrations/google-genai.js.map +1 -1
- package/build/cjs/integrations/graphql/graphql-dc-subscriber.js +8 -8
- package/build/cjs/integrations/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/graphql/resolvers.js +5 -4
- package/build/cjs/integrations/graphql/resolvers.js.map +1 -1
- package/build/cjs/integrations/graphql/spans.js +2 -2
- package/build/cjs/integrations/graphql/spans.js.map +1 -1
- package/build/cjs/integrations/hapi/hapi-utils.js +1 -1
- package/build/cjs/integrations/hapi/hapi-utils.js.map +1 -1
- package/build/cjs/integrations/hono/defaultShouldHandleError.js +3 -1
- package/build/cjs/integrations/hono/defaultShouldHandleError.js.map +1 -1
- package/build/cjs/integrations/hono/honoIntegration.js +1 -1
- package/build/cjs/integrations/hono/honoIntegration.js.map +1 -1
- package/build/cjs/integrations/hono/patchAppRequest.js +1 -1
- package/build/cjs/integrations/hono/patchAppRequest.js.map +1 -1
- package/build/cjs/integrations/hono/wrapMiddlewareSpan.js +1 -1
- package/build/cjs/integrations/hono/wrapMiddlewareSpan.js.map +1 -1
- package/build/cjs/integrations/index.js +2 -0
- package/build/cjs/integrations/index.js.map +1 -1
- package/build/cjs/integrations/kafkajs/spans.js +3 -3
- package/build/cjs/integrations/kafkajs/spans.js.map +1 -1
- package/build/cjs/integrations/knex.js +1 -1
- package/build/cjs/integrations/knex.js.map +1 -1
- package/build/cjs/integrations/koa/index.js +1 -1
- package/build/cjs/integrations/koa/index.js.map +1 -1
- package/build/cjs/integrations/langchain.js +18 -3
- package/build/cjs/integrations/langchain.js.map +1 -1
- package/build/cjs/integrations/langgraph.js +1 -1
- package/build/cjs/integrations/langgraph.js.map +1 -1
- package/build/cjs/integrations/mastra-classifier.js +59 -0
- package/build/cjs/integrations/mastra-classifier.js.map +1 -0
- package/build/cjs/integrations/mastra.js +3 -1
- package/build/cjs/integrations/mastra.js.map +1 -1
- package/build/cjs/integrations/mistral.js +5 -4
- package/build/cjs/integrations/mistral.js.map +1 -1
- package/build/cjs/integrations/mongodb/mongodb-span.js +1 -1
- package/build/cjs/integrations/mongodb/mongodb-span.js.map +1 -1
- package/build/cjs/integrations/mongoose/mongoose-dc-subscriber.js +1 -1
- package/build/cjs/integrations/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/mongoose/mongoose-legacy-span.js +1 -1
- package/build/cjs/integrations/mongoose/mongoose-legacy-span.js.map +1 -1
- package/build/cjs/integrations/mysql.js +1 -1
- package/build/cjs/integrations/mysql.js.map +1 -1
- package/build/cjs/integrations/mysql2/index.js +1 -1
- package/build/cjs/integrations/mysql2/index.js.map +1 -1
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js +2 -2
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/openai-compatible.js +1 -1
- package/build/cjs/integrations/openai-compatible.js.map +1 -1
- package/build/cjs/integrations/openai.js +4 -3
- package/build/cjs/integrations/openai.js.map +1 -1
- package/build/cjs/integrations/pi-durable.js +50 -0
- package/build/cjs/integrations/pi-durable.js.map +1 -0
- package/build/cjs/integrations/postgres-js.js +1 -1
- package/build/cjs/integrations/postgres-js.js.map +1 -1
- package/build/cjs/integrations/postgres.js +1 -1
- package/build/cjs/integrations/postgres.js.map +1 -1
- package/build/cjs/integrations/prisma/orchestrion.js +1 -1
- package/build/cjs/integrations/prisma/orchestrion.js.map +1 -1
- package/build/cjs/integrations/prisma/tracing-helper.js +1 -1
- package/build/cjs/integrations/prisma/tracing-helper.js.map +1 -1
- package/build/cjs/integrations/redis/index.js +2 -2
- package/build/cjs/integrations/redis/index.js.map +1 -1
- package/build/cjs/integrations/redis/ioredis-channel-subscriber.js +1 -1
- package/build/cjs/integrations/redis/ioredis-channel-subscriber.js.map +1 -1
- package/build/cjs/integrations/redis/redis-cache.js +2 -2
- package/build/cjs/integrations/redis/redis-cache.js.map +1 -1
- package/build/cjs/integrations/redis/redis-dc-subscriber.js +3 -3
- package/build/cjs/integrations/redis/redis-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/tedious.js +1 -1
- package/build/cjs/integrations/tedious.js.map +1 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js +42 -12
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +9 -0
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/cjs/orchestrion/channels.js +2 -0
- package/build/cjs/orchestrion/channels.js.map +1 -1
- package/build/cjs/orchestrion/config/channel-integration-definitions.js +3 -1
- package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/cjs/orchestrion/config/index.js +2 -0
- package/build/cjs/orchestrion/config/index.js.map +1 -1
- package/build/cjs/orchestrion/config/langchain.js +12 -2
- package/build/cjs/orchestrion/config/langchain.js.map +1 -1
- package/build/cjs/orchestrion/config/mastra.js +18 -2
- package/build/cjs/orchestrion/config/mastra.js.map +1 -1
- package/build/cjs/orchestrion/config/pi-durable.js +34 -0
- package/build/cjs/orchestrion/config/pi-durable.js.map +1 -0
- package/build/cjs/utils/withCleanScopes.js +17 -0
- package/build/cjs/utils/withCleanScopes.js.map +1 -0
- package/build/esm/ai/anthropic-ai/index.js +11 -10
- package/build/esm/ai/anthropic-ai/index.js.map +1 -1
- package/build/esm/ai/anthropic-ai/streaming.js +3 -1
- package/build/esm/ai/anthropic-ai/streaming.js.map +1 -1
- package/build/esm/ai/core/utils.js +39 -24
- package/build/esm/ai/core/utils.js.map +1 -1
- package/build/esm/ai/flue/index.js +5 -12
- package/build/esm/ai/flue/index.js.map +1 -1
- package/build/esm/ai/flue/utils.js +35 -36
- package/build/esm/ai/flue/utils.js.map +1 -1
- package/build/esm/ai/google-genai/index.js +16 -18
- package/build/esm/ai/google-genai/index.js.map +1 -1
- package/build/esm/ai/google-genai/streaming.js +6 -1
- package/build/esm/ai/google-genai/streaming.js.map +1 -1
- package/build/esm/ai/langchain/embeddings.js +3 -3
- package/build/esm/ai/langchain/embeddings.js.map +1 -1
- package/build/esm/ai/langchain/index.js +23 -9
- package/build/esm/ai/langchain/index.js.map +1 -1
- package/build/esm/ai/langchain/typesafe-classifier.js +57 -0
- package/build/esm/ai/langchain/typesafe-classifier.js.map +1 -0
- package/build/esm/ai/langchain/utils.js +100 -22
- package/build/esm/ai/langchain/utils.js.map +1 -1
- package/build/esm/ai/langgraph/index.js +24 -20
- package/build/esm/ai/langgraph/index.js.map +1 -1
- package/build/esm/ai/langgraph/utils.js +33 -37
- package/build/esm/ai/langgraph/utils.js.map +1 -1
- package/build/esm/ai/mastra/classifier-evaluation.js +26 -0
- package/build/esm/ai/mastra/classifier-evaluation.js.map +1 -0
- package/build/esm/ai/mastra/constants.js +3 -2
- package/build/esm/ai/mastra/constants.js.map +1 -1
- package/build/esm/ai/mastra/index.js +38 -19
- package/build/esm/ai/mastra/index.js.map +1 -1
- package/build/esm/ai/mastra/utils.js +21 -3
- package/build/esm/ai/mastra/utils.js.map +1 -1
- package/build/esm/ai/mistral/index.js +3 -3
- package/build/esm/ai/mistral/index.js.map +1 -1
- package/build/esm/ai/openai/index.js +3 -3
- package/build/esm/ai/openai/index.js.map +1 -1
- package/build/esm/ai/openai/streaming.js +6 -0
- package/build/esm/ai/openai/streaming.js.map +1 -1
- package/build/esm/ai/openai/utils.js +11 -1
- package/build/esm/ai/openai/utils.js.map +1 -1
- package/build/esm/ai/pi-ai/messages.js +128 -0
- package/build/esm/ai/pi-ai/messages.js.map +1 -0
- package/build/esm/ai/pi-ai/providers.js +20 -0
- package/build/esm/ai/pi-ai/providers.js.map +1 -0
- package/build/esm/ai/pi-ai/usage.js +32 -0
- package/build/esm/ai/pi-ai/usage.js.map +1 -0
- package/build/esm/ai/pi-durable/constants.js +13 -0
- package/build/esm/ai/pi-durable/constants.js.map +1 -0
- package/build/esm/ai/pi-durable/index.js +163 -0
- package/build/esm/ai/pi-durable/index.js.map +1 -0
- package/build/esm/ai/pi-durable/models.js +138 -0
- package/build/esm/ai/pi-durable/models.js.map +1 -0
- package/build/esm/ai/pi-durable/runs.js +140 -0
- package/build/esm/ai/pi-durable/runs.js.map +1 -0
- package/build/esm/ai/pi-durable/tools.js +174 -0
- package/build/esm/ai/pi-durable/tools.js.map +1 -0
- package/build/esm/ai/pi-durable/utils.js +7 -0
- package/build/esm/ai/pi-durable/utils.js.map +1 -0
- package/build/esm/ai/typesafe/index.js +11 -12
- package/build/esm/ai/typesafe/index.js.map +1 -1
- package/build/esm/ai/vercel-ai/index.js +1 -2
- package/build/esm/ai/vercel-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/index.js +2 -2
- package/build/esm/ai/workers-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/streaming.js +0 -1
- package/build/esm/ai/workers-ai/streaming.js.map +1 -1
- package/build/esm/ai/workers-ai/utils.js +13 -12
- package/build/esm/ai/workers-ai/utils.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/amqplib.js +4 -4
- package/build/esm/integrations/amqplib.js.map +1 -1
- package/build/esm/integrations/anthropic.js +3 -3
- package/build/esm/integrations/anthropic.js.map +1 -1
- package/build/esm/integrations/aws-sdk/index.js +3 -3
- package/build/esm/integrations/aws-sdk/index.js.map +1 -1
- package/build/esm/integrations/dataloader.js +3 -3
- package/build/esm/integrations/dataloader.js.map +1 -1
- package/build/esm/integrations/express/instrumentation.js +3 -3
- package/build/esm/integrations/express/instrumentation.js.map +1 -1
- package/build/esm/integrations/fastify/instrumentation.js +4 -4
- package/build/esm/integrations/fastify/instrumentation.js.map +1 -1
- package/build/esm/integrations/firebase/firestore.js +3 -3
- package/build/esm/integrations/firebase/firestore.js.map +1 -1
- package/build/esm/integrations/firebase/functions.js +3 -3
- package/build/esm/integrations/firebase/functions.js.map +1 -1
- package/build/esm/integrations/generic-pool.js +3 -3
- package/build/esm/integrations/generic-pool.js.map +1 -1
- package/build/esm/integrations/google-genai.js +2 -2
- package/build/esm/integrations/google-genai.js.map +1 -1
- package/build/esm/integrations/graphql/graphql-dc-subscriber.js +10 -10
- package/build/esm/integrations/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/graphql/resolvers.js +4 -3
- package/build/esm/integrations/graphql/resolvers.js.map +1 -1
- package/build/esm/integrations/graphql/spans.js +4 -4
- package/build/esm/integrations/graphql/spans.js.map +1 -1
- package/build/esm/integrations/hapi/hapi-utils.js +3 -3
- package/build/esm/integrations/hapi/hapi-utils.js.map +1 -1
- package/build/esm/integrations/hono/defaultShouldHandleError.js +3 -1
- package/build/esm/integrations/hono/defaultShouldHandleError.js.map +1 -1
- package/build/esm/integrations/hono/honoIntegration.js +3 -3
- package/build/esm/integrations/hono/honoIntegration.js.map +1 -1
- package/build/esm/integrations/hono/patchAppRequest.js +3 -3
- package/build/esm/integrations/hono/patchAppRequest.js.map +1 -1
- package/build/esm/integrations/hono/wrapMiddlewareSpan.js +3 -3
- package/build/esm/integrations/hono/wrapMiddlewareSpan.js.map +1 -1
- package/build/esm/integrations/index.js +2 -0
- package/build/esm/integrations/index.js.map +1 -1
- package/build/esm/integrations/kafkajs/spans.js +5 -5
- package/build/esm/integrations/kafkajs/spans.js.map +1 -1
- package/build/esm/integrations/knex.js +3 -3
- package/build/esm/integrations/knex.js.map +1 -1
- package/build/esm/integrations/koa/index.js +3 -3
- package/build/esm/integrations/koa/index.js.map +1 -1
- package/build/esm/integrations/langchain.js +20 -5
- package/build/esm/integrations/langchain.js.map +1 -1
- package/build/esm/integrations/langgraph.js +2 -2
- package/build/esm/integrations/langgraph.js.map +1 -1
- package/build/esm/integrations/mastra-classifier.js +57 -0
- package/build/esm/integrations/mastra-classifier.js.map +1 -0
- package/build/esm/integrations/mastra.js +3 -1
- package/build/esm/integrations/mastra.js.map +1 -1
- package/build/esm/integrations/mistral.js +3 -2
- package/build/esm/integrations/mistral.js.map +1 -1
- package/build/esm/integrations/mongodb/mongodb-span.js +3 -3
- package/build/esm/integrations/mongodb/mongodb-span.js.map +1 -1
- package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js +3 -3
- package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/mongoose/mongoose-legacy-span.js +3 -3
- package/build/esm/integrations/mongoose/mongoose-legacy-span.js.map +1 -1
- package/build/esm/integrations/mysql.js +3 -3
- package/build/esm/integrations/mysql.js.map +1 -1
- package/build/esm/integrations/mysql2/index.js +3 -3
- package/build/esm/integrations/mysql2/index.js.map +1 -1
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js +4 -4
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/openai-compatible.js +3 -3
- package/build/esm/integrations/openai-compatible.js.map +1 -1
- package/build/esm/integrations/openai.js +3 -2
- package/build/esm/integrations/openai.js.map +1 -1
- package/build/esm/integrations/pi-durable.js +48 -0
- package/build/esm/integrations/pi-durable.js.map +1 -0
- package/build/esm/integrations/postgres-js.js +3 -3
- package/build/esm/integrations/postgres-js.js.map +1 -1
- package/build/esm/integrations/postgres.js +3 -3
- package/build/esm/integrations/postgres.js.map +1 -1
- package/build/esm/integrations/prisma/orchestrion.js +3 -3
- package/build/esm/integrations/prisma/orchestrion.js.map +1 -1
- package/build/esm/integrations/prisma/tracing-helper.js +3 -3
- package/build/esm/integrations/prisma/tracing-helper.js.map +1 -1
- package/build/esm/integrations/redis/index.js +4 -4
- package/build/esm/integrations/redis/index.js.map +1 -1
- package/build/esm/integrations/redis/ioredis-channel-subscriber.js +3 -3
- package/build/esm/integrations/redis/ioredis-channel-subscriber.js.map +1 -1
- package/build/esm/integrations/redis/redis-cache.js +4 -4
- package/build/esm/integrations/redis/redis-cache.js.map +1 -1
- package/build/esm/integrations/redis/redis-dc-subscriber.js +5 -5
- package/build/esm/integrations/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/tedious.js +3 -3
- package/build/esm/integrations/tedious.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js +44 -14
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +9 -0
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/esm/orchestrion/channels.js +2 -0
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/channel-integration-definitions.js +3 -1
- package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/esm/orchestrion/config/index.js +2 -0
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/langchain.js +12 -2
- package/build/esm/orchestrion/config/langchain.js.map +1 -1
- package/build/esm/orchestrion/config/mastra.js +18 -2
- package/build/esm/orchestrion/config/mastra.js.map +1 -1
- package/build/esm/orchestrion/config/pi-durable.js +30 -0
- package/build/esm/orchestrion/config/pi-durable.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/utils/withCleanScopes.js +15 -0
- package/build/esm/utils/withCleanScopes.js.map +1 -0
- package/build/types/ai/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/ai/anthropic-ai/streaming.d.ts.map +1 -1
- package/build/types/ai/anthropic-ai/types.d.ts +2 -2
- package/build/types/ai/anthropic-ai/types.d.ts.map +1 -1
- package/build/types/ai/core/utils.d.ts +7 -7
- package/build/types/ai/core/utils.d.ts.map +1 -1
- package/build/types/ai/flue/index.d.ts.map +1 -1
- package/build/types/ai/flue/types.d.ts +5 -16
- package/build/types/ai/flue/types.d.ts.map +1 -1
- package/build/types/ai/flue/utils.d.ts +1 -6
- package/build/types/ai/flue/utils.d.ts.map +1 -1
- package/build/types/ai/google-genai/index.d.ts.map +1 -1
- package/build/types/ai/google-genai/streaming.d.ts.map +1 -1
- package/build/types/ai/langchain/embeddings.d.ts.map +1 -1
- package/build/types/ai/langchain/index.d.ts.map +1 -1
- package/build/types/ai/langchain/types.d.ts +15 -0
- package/build/types/ai/langchain/types.d.ts.map +1 -1
- package/build/types/ai/langchain/typesafe-classifier.d.ts +9 -0
- package/build/types/ai/langchain/typesafe-classifier.d.ts.map +1 -0
- package/build/types/ai/langchain/utils.d.ts +13 -0
- package/build/types/ai/langchain/utils.d.ts.map +1 -1
- package/build/types/ai/langgraph/index.d.ts.map +1 -1
- package/build/types/ai/langgraph/utils.d.ts +2 -0
- package/build/types/ai/langgraph/utils.d.ts.map +1 -1
- package/build/types/ai/mastra/classifier-evaluation.d.ts +35 -0
- package/build/types/ai/mastra/classifier-evaluation.d.ts.map +1 -0
- package/build/types/ai/mastra/constants.d.ts.map +1 -1
- package/build/types/ai/mastra/index.d.ts +4 -2
- package/build/types/ai/mastra/index.d.ts.map +1 -1
- package/build/types/ai/mastra/types.d.ts +14 -1
- package/build/types/ai/mastra/types.d.ts.map +1 -1
- package/build/types/ai/mastra/utils.d.ts.map +1 -1
- package/build/types/ai/mistral/index.d.ts.map +1 -1
- package/build/types/ai/openai/index.d.ts.map +1 -1
- package/build/types/ai/openai/streaming.d.ts.map +1 -1
- package/build/types/ai/openai/types.d.ts +2 -0
- package/build/types/ai/openai/types.d.ts.map +1 -1
- package/build/types/ai/openai/utils.d.ts.map +1 -1
- package/build/types/ai/pi-ai/messages.d.ts +30 -0
- package/build/types/ai/pi-ai/messages.d.ts.map +1 -0
- package/build/types/ai/pi-ai/providers.d.ts +9 -0
- package/build/types/ai/pi-ai/providers.d.ts.map +1 -0
- package/build/types/ai/pi-ai/usage.d.ts +30 -0
- package/build/types/ai/pi-ai/usage.d.ts.map +1 -0
- package/build/types/ai/pi-durable/constants.d.ts +19 -0
- package/build/types/ai/pi-durable/constants.d.ts.map +1 -0
- package/build/types/ai/pi-durable/index.d.ts +28 -0
- package/build/types/ai/pi-durable/index.d.ts.map +1 -0
- package/build/types/ai/pi-durable/models.d.ts +10 -0
- package/build/types/ai/pi-durable/models.d.ts.map +1 -0
- package/build/types/ai/pi-durable/runs.d.ts +81 -0
- package/build/types/ai/pi-durable/runs.d.ts.map +1 -0
- package/build/types/ai/pi-durable/tools.d.ts +17 -0
- package/build/types/ai/pi-durable/tools.d.ts.map +1 -0
- package/build/types/ai/pi-durable/types.d.ts +122 -0
- package/build/types/ai/pi-durable/types.d.ts.map +1 -0
- package/build/types/ai/pi-durable/utils.d.ts +3 -0
- package/build/types/ai/pi-durable/utils.d.ts.map +1 -0
- package/build/types/ai/types.d.ts +10 -0
- package/build/types/ai/types.d.ts.map +1 -0
- package/build/types/ai/typesafe/index.d.ts +2 -4
- package/build/types/ai/typesafe/index.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/index.d.ts +2 -2
- package/build/types/ai/vercel-ai/index.d.ts.map +1 -1
- package/build/types/ai/workers-ai/utils.d.ts +5 -5
- package/build/types/ai/workers-ai/utils.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/anthropic.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/index.d.ts.map +1 -1
- package/build/types/integrations/express/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/firebase/firestore.d.ts.map +1 -1
- package/build/types/integrations/google-genai.d.ts.map +1 -1
- package/build/types/integrations/graphql/graphql-dc-subscriber.d.ts.map +1 -1
- package/build/types/integrations/graphql/resolvers.d.ts.map +1 -1
- package/build/types/integrations/graphql/spans.d.ts.map +1 -1
- package/build/types/integrations/hapi/hapi-utils.d.ts.map +1 -1
- package/build/types/integrations/hono/defaultShouldHandleError.d.ts.map +1 -1
- package/build/types/integrations/hono/patchAppRequest.d.ts.map +1 -1
- package/build/types/integrations/hono/wrapMiddlewareSpan.d.ts.map +1 -1
- package/build/types/integrations/index.d.ts.map +1 -1
- package/build/types/integrations/kafkajs/spans.d.ts.map +1 -1
- package/build/types/integrations/koa/index.d.ts.map +1 -1
- package/build/types/integrations/langchain.d.ts.map +1 -1
- package/build/types/integrations/mastra-classifier.d.ts +6 -0
- package/build/types/integrations/mastra-classifier.d.ts.map +1 -0
- package/build/types/integrations/mastra.d.ts.map +1 -1
- package/build/types/integrations/mistral.d.ts.map +1 -1
- package/build/types/integrations/mongodb/mongodb-span.d.ts.map +1 -1
- package/build/types/integrations/mongoose/mongoose-dc-subscriber.d.ts.map +1 -1
- package/build/types/integrations/mongoose/mongoose-legacy-span.d.ts.map +1 -1
- package/build/types/integrations/mysql2/mysql2-dc-subscriber.d.ts.map +1 -1
- package/build/types/integrations/openai-compatible.d.ts.map +1 -1
- package/build/types/integrations/pi-durable.d.ts +15 -0
- package/build/types/integrations/pi-durable.d.ts.map +1 -0
- package/build/types/integrations/postgres-js.d.ts.map +1 -1
- package/build/types/integrations/prisma/orchestrion.d.ts.map +1 -1
- package/build/types/integrations/prisma/tracing-helper.d.ts.map +1 -1
- package/build/types/integrations/redis/ioredis-channel-subscriber.d.ts.map +1 -1
- package/build/types/integrations/redis/redis-cache.d.ts.map +1 -1
- package/build/types/integrations/redis/redis-dc-subscriber.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts.map +1 -1
- package/build/types/orchestrion/channels.d.ts +4 -0
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts +4 -1
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -1
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/langchain.d.ts +1 -0
- package/build/types/orchestrion/config/langchain.d.ts.map +1 -1
- package/build/types/orchestrion/config/mastra.d.ts +1 -0
- package/build/types/orchestrion/config/mastra.d.ts.map +1 -1
- package/build/types/orchestrion/config/mongodb.d.ts +2 -2
- package/build/types/orchestrion/config/pg.d.ts +1 -1
- package/build/types/orchestrion/config/pi-durable.d.ts +29 -0
- package/build/types/orchestrion/config/pi-durable.d.ts.map +1 -0
- package/build/types/utils/withCleanScopes.d.ts +10 -0
- package/build/types/utils/withCleanScopes.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LRUMap, Span } from '@sentry/core';
|
|
2
|
-
import type { FlueModelRequestInfo, FlueObservation
|
|
2
|
+
import type { FlueModelRequestInfo, FlueObservation } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Flue persists the incoming W3C `traceparent` at admission and replays it on the agent operation.
|
|
5
5
|
* Sentry's own propagation uses `sentry-trace`, so the carrier has to be converted before it can
|
|
@@ -13,11 +13,6 @@ export declare function sentryTraceFromTraceparent(traceparent: string): string
|
|
|
13
13
|
export type SpanTracker = LRUMap<string, Span>;
|
|
14
14
|
export declare function startTurnSpan(observation: FlueObservation, turnSpans: SpanTracker): void;
|
|
15
15
|
export declare function endTurnSpan(observation: FlueObservation, turnSpans: SpanTracker, recordOutputs: boolean): void;
|
|
16
|
-
/**
|
|
17
|
-
* Flue reports token counts and its own computed costs on the same `usage` object, so both are set
|
|
18
|
-
* here. The cost figures have no equivalent in the provider SDKs' own instrumentation.
|
|
19
|
-
*/
|
|
20
|
-
export declare function setUsageAttributes(span: Span, usage: FlueUsage | undefined, isError?: boolean): void;
|
|
21
16
|
/**
|
|
22
17
|
* Tool spans hang off the agent invocation rather than the turn, matching how Flue's own
|
|
23
18
|
* OpenTelemetry adapter projects them: siblings of `chat`, correlated to model output by tool call
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/flue/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/flue/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAwCjD,OAAO,KAAK,EAAiB,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEpF;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOlF;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAkD/C,wBAAgB,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI,CAsBxF;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAqD9G;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,GAAG,IAAI,CAuB/G;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAoB9G;AAqBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI,CAkB/F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,GAAG,SAAS,GAAG,IAAI,CAmBhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAyB7D,OAAO,KAAK,EAA0B,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAS/F;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAqBvF;AA8BD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,CAAC,EAAE,OAAO,EACjB,YAAY,UAAO,GAClB,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CA4BpC;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CA6CpH;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA2D9G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC3C,OAAO,EAAE,OAAO,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAYrC;AA2ID;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,CAAC,CAExG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAgHnD;;;;GAIG;AACH,wBAAuB,gBAAgB,CACrC,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,OAAO,GACrB,cAAc,CAAC,mBAAmB,EAAE,IAAI,EAAE,OAAO,CAAC,CAmBpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/embeddings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/embeddings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAgBvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA0ChD;;;;;GAKG;AACH,wBAAgB,2CAA2C,CACzD,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,gBAAqB,GAC7B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;CAAE,CAkBlE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EACxD,OAAO,GAAE,gBAAqB,GAC7B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAU1C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,CAAC,CAkB1G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,wBAAwB,EAGxB,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAWjB;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,gBAAqB,GAAG,wBAAwB,CAkWvG;AAED,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -37,11 +37,26 @@ export interface LangChainMessage {
|
|
|
37
37
|
};
|
|
38
38
|
role?: string;
|
|
39
39
|
additional_kwargs?: Record<string, unknown>;
|
|
40
|
+
usage_metadata?: {
|
|
41
|
+
input_tokens?: number;
|
|
42
|
+
output_tokens?: number;
|
|
43
|
+
total_tokens?: number;
|
|
44
|
+
input_token_details?: {
|
|
45
|
+
cache_read?: number;
|
|
46
|
+
cache_creation?: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
40
49
|
lc?: number;
|
|
41
50
|
id?: string[] | string;
|
|
42
51
|
response_metadata?: {
|
|
52
|
+
[key: string]: unknown;
|
|
43
53
|
model_name?: string;
|
|
44
54
|
finish_reason?: string;
|
|
55
|
+
tokenUsage?: {
|
|
56
|
+
promptTokens?: number;
|
|
57
|
+
completionTokens?: number;
|
|
58
|
+
totalTokens?: number;
|
|
59
|
+
};
|
|
45
60
|
};
|
|
46
61
|
kwargs?: {
|
|
47
62
|
[key: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MA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,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAGrH,IAAI,IAAI,OAAO,CAAC;IAChB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,oBAAoB,IAAI,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
/** Record the `state` a `TypeSafeClassifier` sends for `input`, using the classifier's own serializer. */
|
|
3
|
+
export declare function recordTypeSafeClassifierState(classifier: unknown, input: unknown): void;
|
|
4
|
+
export declare function isTypeSafeClassifier(chain: unknown): boolean;
|
|
5
|
+
/** Start an `evaluate` span for a `TypeSafeClassifier` run, from its serialized constructor arguments. */
|
|
6
|
+
export declare function startTypeSafeClassifierSpan(chain: unknown, inputs: Record<string, unknown>, metadata: Record<string, unknown> | undefined, recordInputs: boolean): Span;
|
|
7
|
+
/** The classifier result reports usage in camelCase, the TypeSafe helpers read the API's snake_case. */
|
|
8
|
+
export declare function addTypeSafeClassifierResponseAttributes(span: Span, outputs: unknown, recordOutputs: boolean): void;
|
|
9
|
+
//# sourceMappingURL=typesafe-classifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typesafe-classifier.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/typesafe-classifier.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAmBzC,0GAA0G;AAC1G,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAcvF;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE5D;AAED,0GAA0G;AAC1G,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC7C,YAAY,EAAE,OAAO,GACpB,IAAI,CASN;AAED,wGAAwG;AACxG,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAelH"}
|
|
@@ -47,6 +47,7 @@ export declare function extractLLMRequestAttributes(llm: LangChainSerialized, pr
|
|
|
47
47
|
* - Provider system value falls back to `serialized.id?.[2]`.
|
|
48
48
|
*/
|
|
49
49
|
export declare function extractChatModelRequestAttributes(llm: LangChainSerialized, langChainMessages: LangChainMessage[][], recordInputs: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue | undefined>;
|
|
50
|
+
export declare function extractMessageTokenUsageAttributes(message: LangChainMessage): Record<string, number>;
|
|
50
51
|
/**
|
|
51
52
|
* Extracts response-related attributes based on a `LangChainLLMResult`.
|
|
52
53
|
*
|
|
@@ -58,7 +59,19 @@ export declare function extractChatModelRequestAttributes(llm: LangChainSerializ
|
|
|
58
59
|
*/
|
|
59
60
|
export declare function extractLlmResponseAttributes(llmResult: LangChainLLMResult, recordOutputs: boolean): Record<string, SpanAttributeValue> | undefined;
|
|
60
61
|
export declare function getAgentNameFromMetadata(metadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
|
|
62
|
+
/**
|
|
63
|
+
* Derive `gen_ai.conversation.id` from run metadata, which child runs inherit from their parent.
|
|
64
|
+
* An id from `Sentry.setConversationId()` still wins, since `conversationIdIntegration` applies it on `spanStart`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getConversationIdFromMetadata(metadata?: Record<string, unknown>): Record<string, SpanAttributeValue>;
|
|
67
|
+
/**
|
|
68
|
+
* The conversation id entry from `config.configurable`, to spread under the run metadata.
|
|
69
|
+
* `@langchain/core` >= 1.1.40 only copies `configurable` into metadata for LangSmith tracers, not for our handler.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getConversationIdMetadataFromConfig(config: Record<string, unknown>): Record<string, unknown>;
|
|
61
72
|
export declare function extractToolDefinitions(extraParams?: Record<string, unknown>): string | undefined;
|
|
73
|
+
/** The callbacks LangChain gives a run started without config: the ones of the parent run, if any. */
|
|
74
|
+
export declare function getInheritedLangChainCallbacks(): unknown;
|
|
62
75
|
/**
|
|
63
76
|
* Merge `sentryHandler` into a given set of LangChain callbacks or callback manager.
|
|
64
77
|
* @internal Exported for cross-package instrumentation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/langchain/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AA0BvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAkDzF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAGlH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,gBAAgB,EAAE,GAC3B,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC,CA2DtD;AAiED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,OAAO,EACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAA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OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAchG;AAOD,sGAAsG;AACtG,wBAAgB,8BAA8B,IAAI,OAAO,CAQxD;AAuBD;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAqB1G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/langgraph/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/langgraph/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAkB/D;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,EACtD,UAAU,EAAE,gBAAgB,GAC3B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,CAuCvC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EACxD,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,OAAO,EAAE,gBAAgB,EACzB,GAAG,CAAC,EAAE,aAAa,GAAG,IAAI,EAC1B,qBAAqB,CAAC,EAAE,OAAO,GAC9B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAqG1C;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,wBAAwB,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,EAC/D,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,CAoDvC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CAAE,EACjF,UAAU,EAAE,CAAC,EACb,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,CAIH"}
|
|
@@ -27,6 +27,8 @@ export declare function extractTokenUsageFromMessage(message: LangChainMessage):
|
|
|
27
27
|
inputTokens: number;
|
|
28
28
|
outputTokens: number;
|
|
29
29
|
totalTokens: number;
|
|
30
|
+
cacheCreationInputTokens?: number;
|
|
31
|
+
cacheReadInputTokens?: number;
|
|
30
32
|
};
|
|
31
33
|
/**
|
|
32
34
|
* Extract model and finish reason from a message's response_metadata
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/langgraph/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/langgraph/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAuBzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAO1E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;AAE9E;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,aAAa,GAAG,IAAI,CAU1E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,IAAI,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAiG7G;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,EAAE,GAAG,IAAI,CAiBlG;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,GAAG;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CASA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAchF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,EAAE,GAAG,IAAI,CAiB5F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CA6EjH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Span, SpanTimeInput } from '@sentry/core';
|
|
2
|
+
import type { MastraExportedSpan, MastraSpanOutputProcessor } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Links a `Classifier.evaluate()` call to the Sentry span the exporter opens for its
|
|
5
|
+
* `classifier_evaluation` span. Mastra's span carries no input or output, so the integration adds
|
|
6
|
+
* them from the call. Mastra ends its span before `evaluate()` returns the answers, so the exporter
|
|
7
|
+
* leaves the Sentry span open and the integration ends it once the call settles.
|
|
8
|
+
*/
|
|
9
|
+
export interface ClassifierEvaluationCall {
|
|
10
|
+
span?: Span;
|
|
11
|
+
/** Mastra's span and the processors of its observability instance, to filter the call's data. */
|
|
12
|
+
mastraSpan?: MastraExportedSpan;
|
|
13
|
+
spanOutputProcessors?: MastraSpanOutputProcessor[];
|
|
14
|
+
/** The recording options of the exporter that opened the span, so the call's data follows them. */
|
|
15
|
+
recordInputs?: boolean;
|
|
16
|
+
recordOutputs?: boolean;
|
|
17
|
+
/** Mastra's end time, set when Mastra ended its span before the call settled. */
|
|
18
|
+
endTime?: SpanTimeInput;
|
|
19
|
+
settled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function setStartingClassifierEvaluation(call: ClassifierEvaluationCall | undefined): void;
|
|
22
|
+
export declare function takeStartingClassifierEvaluation(): ClassifierEvaluationCall | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Run the call's data through Mastra's span output processors (for example its default
|
|
25
|
+
* `SensitiveDataFilter`), as Mastra does for the input and output of its own spans. Returns `undefined`
|
|
26
|
+
* when a processor drops the span or throws, so unfiltered data is never recorded.
|
|
27
|
+
*/
|
|
28
|
+
export declare function processClassifierEvaluationData(call: ClassifierEvaluationCall, data: {
|
|
29
|
+
input?: unknown;
|
|
30
|
+
output?: unknown;
|
|
31
|
+
}): {
|
|
32
|
+
input?: unknown;
|
|
33
|
+
output?: unknown;
|
|
34
|
+
} | undefined;
|
|
35
|
+
//# sourceMappingURL=classifier-evaluation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifier-evaluation.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/classifier-evaluation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iGAAiG;IACjG,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,oBAAoB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACnD,mGAAmG;IACnG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iFAAiF;IACjF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,wBAAwB,GAAG,SAAS,GAAG,IAAI,CAEhG;AAED,wBAAgB,gCAAgC,IAAI,wBAAwB,GAAG,SAAS,CAIvF;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,wBAAwB,EAC9B,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1C;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAanD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/constants.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,uBAAuB,EAAG,QAAiB,CAAC;AAEzD,4GAA4G;AAC5G,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAE9C,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD,2DAA2D;AAC3D,eAAO,MAAM,qCAAqC,WAAW,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAuC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAUzF,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAK9C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAiD,CAAC;AAEnG,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAA0D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GenAiOptions } from '../core/utils';
|
|
2
2
|
import { MASTRA_EXPORTER_BRAND } from './constants';
|
|
3
|
-
import type { MastraObservabilityExporter, MastraTracingEvent } from './types';
|
|
3
|
+
import type { MastraExporterInitOptions, MastraObservabilityExporter, MastraTracingEvent } from './types';
|
|
4
4
|
export type MastraExporterOptions = GenAiOptions;
|
|
5
5
|
/**
|
|
6
6
|
* Mastra `ObservabilityExporter` that turns tracing events into Sentry spans.
|
|
@@ -19,7 +19,10 @@ export declare class SentryMastraExporter implements MastraObservabilityExporter
|
|
|
19
19
|
*/
|
|
20
20
|
private readonly _skipped;
|
|
21
21
|
private readonly _options;
|
|
22
|
+
private _spanOutputProcessors;
|
|
22
23
|
constructor(options?: MastraExporterOptions);
|
|
24
|
+
/** Called by Mastra with the config of the observability instance this exporter belongs to. */
|
|
25
|
+
init(options: MastraExporterInitOptions): void;
|
|
23
26
|
/** Mastra's interface is async; the work is synchronous. */
|
|
24
27
|
exportTracingEvent(event: MastraTracingEvent): Promise<void>;
|
|
25
28
|
/** Flush without closing the client — the app still owns it. */
|
|
@@ -38,6 +41,5 @@ export declare class SentryMastraExporter implements MastraObservabilityExporter
|
|
|
38
41
|
private _rollUpToParentAgent;
|
|
39
42
|
/** Nearest exported ancestor of a dropped span. */
|
|
40
43
|
private _resolveParentId;
|
|
41
|
-
private _attributesFor;
|
|
42
44
|
}
|
|
43
45
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAYlD,OAAO,EAEL,qBAAqB,EAKtB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAEV,yBAAyB,EACzB,2BAA2B,EAG3B,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAcjD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,2BAA2B;IAC/D,IAAI,SAAwB;IAEnC,SAAgB,CAAC,qBAAqB,CAAC,QAAQ;IAE/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6D;IACpF;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwD;IACjF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,qBAAqB,CAAmC;IAEhE,YAAmB,OAAO,GAAE,qBAA0B,EAErD;IAED,+FAA+F;IACxF,IAAI,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAEpD;IAED,4DAA4D;IAC/C,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAUxE;IAED,gEAAgE;IACnD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAElC;IAED,oEAAoE;IACvD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAUrC;IAED,OAAO,CAAC,YAAY;IAgCpB,OAAO,CAAC,cAAc;IA+BtB,oGAAoG;IACpG,OAAO,CAAC,UAAU;IAiBlB,uEAAuE;IACvE,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,YAAY;IA8BpB,iFAAiF;IACjF,OAAO,CAAC,oBAAoB;IAiB5B,mDAAmD;IACnD,OAAO,CAAC,gBAAgB;CAgBzB"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Span types this exporter maps onto a `gen_ai` op. Everything else — present or future — arrives
|
|
6
6
|
* as the open `string` arm and is dropped.
|
|
7
7
|
*/
|
|
8
|
-
export type MastraSpanType = 'agent_run' | 'workflow_run' | 'model_generation' | 'tool_call' | 'mcp_tool_call' | 'provider_tool_call' | 'client_tool_call' | 'rag_embedding' | (string & {});
|
|
8
|
+
export type MastraSpanType = 'agent_run' | 'workflow_run' | 'model_generation' | 'tool_call' | 'mcp_tool_call' | 'provider_tool_call' | 'client_tool_call' | 'rag_embedding' | 'classifier_evaluation' | (string & {});
|
|
9
9
|
export type MastraTracingEventType = 'span_started' | 'span_updated' | 'span_ended';
|
|
10
10
|
export interface MastraUsageStats {
|
|
11
11
|
inputTokens?: number;
|
|
@@ -43,6 +43,7 @@ export interface MastraSpanAttributes {
|
|
|
43
43
|
stopSequences?: string[];
|
|
44
44
|
seed?: number;
|
|
45
45
|
};
|
|
46
|
+
modelId?: string;
|
|
46
47
|
toolDescription?: string;
|
|
47
48
|
instructions?: string;
|
|
48
49
|
prompt?: string;
|
|
@@ -51,6 +52,7 @@ export interface MastraSpanAttributes {
|
|
|
51
52
|
}
|
|
52
53
|
export interface MastraExportedSpan {
|
|
53
54
|
id: string;
|
|
55
|
+
traceId?: string;
|
|
54
56
|
parentSpanId?: string;
|
|
55
57
|
/** Mastra's own name; unused for Sentry span names. */
|
|
56
58
|
name: string;
|
|
@@ -74,6 +76,17 @@ export interface MastraTracingEvent {
|
|
|
74
76
|
type: MastraTracingEventType;
|
|
75
77
|
exportedSpan: MastraExportedSpan;
|
|
76
78
|
}
|
|
79
|
+
/** Mastra's `SpanOutputProcessor`, such as its default `SensitiveDataFilter`. */
|
|
80
|
+
export interface MastraSpanOutputProcessor {
|
|
81
|
+
name: string;
|
|
82
|
+
process(span: MastraExportedSpan): MastraExportedSpan | undefined;
|
|
83
|
+
}
|
|
84
|
+
/** Subset of what Mastra passes to `ObservabilityExporter.init()`. */
|
|
85
|
+
export interface MastraExporterInitOptions {
|
|
86
|
+
config?: {
|
|
87
|
+
spanOutputProcessors?: MastraSpanOutputProcessor[];
|
|
88
|
+
};
|
|
89
|
+
}
|
|
77
90
|
/** Subset of Mastra's `ObservabilityExporter`. The rest of that interface is optional. */
|
|
78
91
|
export interface MastraObservabilityExporter {
|
|
79
92
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,cAAc,GACd,kBAAkB,GAClB,WAAW,GACX,eAAe,GACf,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,GACf,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,cAAc,GAAG,YAAY,CAAC;AAEpF,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,aAAa,CAAC,EAAE;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,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gB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAK5D;AAuBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,GAAG,cAAc,CAqBtF;AAuBD,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,GAAG,cAAc,CASvG;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,yBAAyB,GAAG,cAAc,CA6B9G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAsB7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAa9C;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,OAAO,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwBzB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAoB7G;AAsGD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,CAAC,CAElG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAqB7D,OAAO,KAAK,EAAuB,aAAa,EAAwC,MAAM,SAAS,CAAC;AA0BxG;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,OAAO,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBzB;AAGD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAyC7G;AAuHD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,CAAC,CAE9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAwMzC;;;;;;;;;GASG;AACH,wBAAuB,gBAAgB,CAAC,CAAC,EACvC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,OAAO,GACrB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CA6BlC"}
|
|
@@ -47,6 +47,7 @@ export interface OpenAIResponseObject {
|
|
|
47
47
|
input_tokens: number;
|
|
48
48
|
input_tokens_details?: {
|
|
49
49
|
cached_tokens?: number;
|
|
50
|
+
cache_write_tokens?: number;
|
|
50
51
|
};
|
|
51
52
|
output_tokens: number;
|
|
52
53
|
output_tokens_details?: {
|
|
@@ -204,6 +205,7 @@ export interface ChatCompletionChunk {
|
|
|
204
205
|
prompt_tokens_details: {
|
|
205
206
|
audio_tokens: number;
|
|
206
207
|
cached_tokens: number;
|
|
208
|
+
cache_write_tokens?: number;
|
|
207
209
|
};
|
|
208
210
|
};
|
|
209
211
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,0CAA0C;AAC1C,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC7D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kBAAkB,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,SAAS,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;QAC7B,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;QAC3B,OAAO,EAAE,KAAK,CAAC;YACb,IAAI,EAAE,aAAa,CAAC;YACpB,IAAI,EAAE,MAAM,CAAC;YACb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CAAC,EAAE,MAAM,CAAC;SAC7B,CAAC;KACH,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IACvD,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;CAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAwB7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAE3E;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,sBAAsB,CAQzF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAOlF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA4GhG;AAmBD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoBjG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { GenAiMessage } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Map pi-ai messages (`@earendil-works/pi-ai`, which Flue and pi-durable send) to the gen_ai
|
|
4
|
+
* conventions. Sentry renders neither pi-ai's `toolResult` role nor its `toolCall` parts.
|
|
5
|
+
*
|
|
6
|
+
* System messages are left out: their prompt belongs in `gen_ai.system_instructions`. Messages with
|
|
7
|
+
* a role the conventions do not have are left out too.
|
|
8
|
+
*/
|
|
9
|
+
export declare function piAiMessagesToGenAiMessages(messages: unknown): GenAiMessage[];
|
|
10
|
+
/** The `gen_ai.output.messages` entry of a pi-ai assistant message, or `undefined` when it has no content. */
|
|
11
|
+
export declare function piAiAssistantMessageToGenAiMessage(message: unknown, finishReason?: string): GenAiMessage | undefined;
|
|
12
|
+
/** pi-ai names a tool-calling stop `toolUse`; the conventions call it `tool_call`. */
|
|
13
|
+
export declare function piAiFinishReason(stopReason: unknown): string | undefined;
|
|
14
|
+
/** The request fields of a pi-ai `Context` that carry the system prompt and the tools. */
|
|
15
|
+
export interface PiAiContext {
|
|
16
|
+
systemPrompt?: string;
|
|
17
|
+
messages?: unknown;
|
|
18
|
+
tools?: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The system prompt a pi-ai request sends. pi-durable sends it as positional system messages with
|
|
22
|
+
* `sections` instead of `systemPrompt`, so the messages are replayed like pi-ai's own
|
|
23
|
+
* `getCurrentSystemPrompt` does: `content` is appended, `sections` are patched by name.
|
|
24
|
+
*/
|
|
25
|
+
export declare function piAiSystemInstructions(context: PiAiContext): string | undefined;
|
|
26
|
+
/** The tools a pi-ai request offers, with `toolsAdded` and `toolsRemoved` replayed like pi-ai's `getCurrentTools`. */
|
|
27
|
+
export declare function piAiToolDefinitions(context: PiAiContext): unknown[];
|
|
28
|
+
/** Text-only content as its text, joined the way pi-ai joins it; anything else as its mapped parts. */
|
|
29
|
+
export declare function piAiContentToString(content: unknown): string | undefined;
|
|
30
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/ai/pi-ai/messages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,UAAU,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,EAAE,CAmC7E;AAED,8GAA8G;AAC9G,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAMpH;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKxE;AAED,0FAA0F;AAC1F,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAmB/E;AAED,sHAAsH;AACtH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,EAAE,CAenE;AAyBD,uGAAuG;AACvG,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAGxE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stop the provider SDK integrations from reporting the requests pi-ai sends. The skip is
|
|
3
|
+
* process-wide: the provider SDKs do not know which of their calls pi-ai made.
|
|
4
|
+
*
|
|
5
|
+
* The registry is reset per client, so callers apply this on the first request instead of once at
|
|
6
|
+
* setup, or the next `init()` would undo it.
|
|
7
|
+
*/
|
|
8
|
+
export declare function skipPiAiProviderIntegrations(): void;
|
|
9
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../../src/ai/pi-ai/providers.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAInD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Token counts and costs of a pi-ai response. `input` and `cost.input` leave the cache tokens out;
|
|
4
|
+
* `reasoning` is part of `output`.
|
|
5
|
+
*/
|
|
6
|
+
export interface PiAiUsage {
|
|
7
|
+
input?: number;
|
|
8
|
+
output?: number;
|
|
9
|
+
cacheRead?: number;
|
|
10
|
+
cacheWrite?: number;
|
|
11
|
+
reasoning?: number;
|
|
12
|
+
totalTokens?: number;
|
|
13
|
+
cost?: {
|
|
14
|
+
input?: number;
|
|
15
|
+
output?: number;
|
|
16
|
+
cacheRead?: number;
|
|
17
|
+
cacheWrite?: number;
|
|
18
|
+
total?: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Set the token and cost attributes of a pi-ai response. The conventions count cached tokens in
|
|
23
|
+
* `gen_ai.usage.input_tokens` and their cost in `gen_ai.cost.input_tokens`, so both are summed here.
|
|
24
|
+
*
|
|
25
|
+
* `unbilled` is true for a response the provider may not have billed: a failed request, or one the
|
|
26
|
+
* provider parked to answer later. Its counters are all 0, which would read as a real zero-cost
|
|
27
|
+
* call, so nothing is set for it unless it reports tokens.
|
|
28
|
+
*/
|
|
29
|
+
export declare function setPiAiUsageAttributes(span: Span, usage: PiAiUsage | undefined, unbilled?: boolean): void;
|
|
30
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../../src/ai/pi-ai/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAezC;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CA0BzG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const PI_DURABLE_INTEGRATION_NAME: 'PiDurable';
|
|
2
|
+
export declare const PI_DURABLE_ORIGIN = "auto.ai.pi_durable";
|
|
3
|
+
/** Task kinds of the pi-durable built-in tasks. */
|
|
4
|
+
export declare const PI_TASK: {
|
|
5
|
+
readonly GENERATION: 'pi.generation';
|
|
6
|
+
readonly TOOL: 'pi.tool';
|
|
7
|
+
readonly COMPACTION: 'pi.compaction';
|
|
8
|
+
};
|
|
9
|
+
/** Kind of the built-in document that holds a conversation's run control. */
|
|
10
|
+
export declare const PI_LIVE_DOC_KIND = "pi.live";
|
|
11
|
+
/** Kind of the transcript entry that holds the tool result the model receives. */
|
|
12
|
+
export declare const PI_TOOL_RESULT_ENTRY_KIND = "pi.tool-result";
|
|
13
|
+
/**
|
|
14
|
+
* Cap on open run spans. A run span is removed when the run settles, but a run the process never
|
|
15
|
+
* sees settle (a crash, or a settlement the scheduler writes outside a task phase) would otherwise
|
|
16
|
+
* stay in the map for the lifetime of the process.
|
|
17
|
+
*/
|
|
18
|
+
export declare const MAX_TRACKED_PI_RUNS = 1000;
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/pi-durable/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,EAAG,WAAoB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,mDAAmD;AACnD,eAAO,MAAM,OAAO;aAClB,UAAU,EAAE,eAAe;aAC3B,IAAI,EAAE,SAAS;aACf,UAAU,EAAE,eAAe;CACnB,CAAC;AAEX,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,mBAAmB,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { GenAiOptions } from '../core/utils';
|
|
2
|
+
import type { PiHarnessOptions } from './types';
|
|
3
|
+
export type PiDurableOptions = GenAiOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Return pi-durable `HarnessOptions` whose model requests, task phases and tool calls are traced.
|
|
6
|
+
* The caller's `models` and `registry` objects are wrapped, never modified. The result has the
|
|
7
|
+
* caller's options as prototype: pi-durable reads `settings`, `env` and `conversationCreated` at
|
|
8
|
+
* every use, so they stay live, getters included.
|
|
9
|
+
*
|
|
10
|
+
* Spans:
|
|
11
|
+
* - `gen_ai.invoke_agent` for each run, a new trace per run, or a child of the tool call that
|
|
12
|
+
* created the conversation for a subagent;
|
|
13
|
+
* - `gen_ai.chat` for each model request, under its run;
|
|
14
|
+
* - `gen_ai.execute_tool` for each tool call, under its run.
|
|
15
|
+
*
|
|
16
|
+
* The scheduler starts task phases from whichever async context last woke it, often an unrelated
|
|
17
|
+
* request. Every phase therefore runs in its run's own scopes and trace, never in the ones it
|
|
18
|
+
* inherits.
|
|
19
|
+
*/
|
|
20
|
+
export declare function instrumentPiDurableHarnessOptions<T extends PiHarnessOptions>(harnessOptions: T, options?: PiDurableOptions): T;
|
|
21
|
+
/**
|
|
22
|
+
* End the open runs and tool calls of `harness` when it closes. Closing stops the scheduler without
|
|
23
|
+
* settling the inputs in flight, so nothing else would end their spans, and the maps that track
|
|
24
|
+
* them would keep the spans for the lifetime of the process. A run whose ending commit is still in
|
|
25
|
+
* flight ends with that commit's status.
|
|
26
|
+
*/
|
|
27
|
+
export declare function endRunsOnClose(harnessOptions: PiHarnessOptions, harness: unknown): void;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/pi-durable/index.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,KAAK,EAEV,gBAAgB,EAOjB,MAAM,SAAS,CAAC;AAIjB,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAK5C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iCAAiC,CAAC,CAAC,SAAS,gBAAgB,EAC1E,cAAc,EAAE,CAAC,EACjB,OAAO,GAAE,gBAAqB,GAC7B,CAAC,CAsBH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBvF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GenAiOptions } from '../core/utils';
|
|
2
|
+
import type { PiModels } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Wrap a pi-ai `Models` so every model request it sends gets a `gen_ai.chat` span.
|
|
5
|
+
*
|
|
6
|
+
* The proxy hands every other member through bound to the original, so a `Models` instance whose
|
|
7
|
+
* methods read `this` keeps working, and the caller's own object is never modified.
|
|
8
|
+
*/
|
|
9
|
+
export declare function instrumentPiModels<T extends PiModels>(models: T, options: GenAiOptions, onRequest: () => void): T;
|
|
10
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/ai/pi-durable/models.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAYlD,OAAO,KAAK,EAA8C,QAAQ,EAAmB,MAAM,SAAS,CAAC;AASrG;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,IAAI,GAAG,CAAC,CAsCjH"}
|