Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

perf: writes to clickhouse (#2631)

Hassieb Pakzad111240c2d606
diff --git a/.env.dev.example b/.env.dev.example
index 80d67b046f..555b8955ba 100644
--- a/.env.dev.example
+++ b/.env.dev.example
@@ -6,6 +6,12 @@
DIRECT_URL="postgresql://postgres:postgres@localhost:5432/postgres"
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
+# Clickhouse
+CLICKHOUSE_MIGRATION_URL="clickhouse://localhost:9000"
+CLICKHOUSE_URL="http://localhost:8123"
+CLICKHOUSE_USER="clickhouse"
+CLICKHOUSE_PASSWORD="clickhouse"
+
# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
@@ -44,4 +50,5 @@ REDIS_AUTH="myredissecret"
LANGFUSE_WORKER_PASSWORD=mybasicauthsecret
# openssl rand -hex 32 used only here
-ENCRYPTION_KEY=6c16874e5c0f0cc74ddec00425fa99fbe9ffbe412b7d5d906a4b00005df91403
\ No newline at end of file
+ENCRYPTION_KEY=6c16874e5c0f0cc74ddec00425fa99fbe9ffbe412b7d5d906a4b00005df91403
+
diff --git a/.env.prod.example b/.env.prod.example
index 03aa07a8ae..a8ab9b3abc 100644
--- a/.env.prod.example
+++ b/.env.prod.example
@@ -162,3 +162,24 @@ LANGFUSE_CSP_ENFORCE_HTTPS="true"
# LANGFUSE_CACHE_PROMPT_TTL_SECONDS=
### END Langfuse Cloud Config
+
+
+## START Langfuse V3 Ingestion
+
+# Clickhouse
+# CLICKHOUSE_MIGRATION_URL=
+# CLICKHOUSE_URL=
+# CLICKHOUSE_USER=
+# CLICKHOUSE_PASSWORD=
+
+# Ingestion
+# LANGFUSE_INGESTION_BUFFER_TTL_SECONDS=
+# LANGFUSE_INGESTION_FLUSH_DELAY_MS=
+# LANGFUSE_INGESTION_FLUSH_ATTEMPTS=
+# LANGFUSE_INGESTION_FLUSH_PROCESSING_CONCURRENCY=
+# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_BATCH_SIZE=
+# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS=
+# LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS=
+# LANGFUSE_LOG_LEVEL=
+
+## END Langfuse V3 Ingestion
\ No newline at end of file
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index adc35cf350..82456d2782 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -147,10 +147,17 @@ jobs:
run: |
pnpm install
+ - name: Install golang-migrate for Clickhouse migrations
+ run: |
+ curl -L https://github.com/golang-migrate/migrate/releases/download/v4.16.2/migrate.linux-amd64.tar.gz | tar xvz
+ sudo mv migrate /usr/bin/migrate
+ which migrate
+
- name: Load default env
run: |
cp .env.dev.example .env
cp .env.dev.example web/.env
+ cp .env.dev.example worker/.env
- name: Run + migrate
run: |
@@ -160,6 +167,7 @@ jobs:
- name: Seed DB
run: |
+ pnpm run --filter=shared ch:up
pnpm run db:migrate
pnpm run db:seed
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index c2e2942049..47b276408b 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -1,4 +1,23 @@
services:
+ clickhouse:
+ image: clickhouse/clickhouse-server
+ user: "101:101"
+ container_name: clickhouse
+ hostname: clickhouse
+ environment:
+ CLICKHOUSE_DB: default
+ CLICKHOUSE_USER: clickhouse
+ CLICKHOUSE_PASSWORD: clickhouse
+ volumes:
+ - ${PWD}/fs/volumes/clickhouse/etc/clickhouse-server/config.d/config.xml:/etc/clickhouse-server/config.d/config.xml
+ - ${PWD}/fs/volumes/clickhouse/etc/clickhouse-server/users.d/users.xml:/etc/clickhouse-server/users.d/users.xml
+ - ${PWD}/fs/volumes/clickhouse/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
+ ports:
+ - "8123:8123"
+ - "9000:9000"
+ depends_on:
+ - db
+
redis:
image: redis:7.2.4
restart: always
diff --git a/package.json b/package.json
index 70db8c51a2..46658db40c 100644
--- a/package.json
+++ b/package.json
@@ -16,8 +16,8 @@
"db:seed": "turbo run db:seed",
"db:seed:examples": "turbo run db:seed:examples",
"nuke": "bash ./scripts/nuke.sh",
- "dx": "pnpm i && pnpm run infra:dev:up && pnpm --filter=shared run db:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
- "dx-f": "pnpm i && pnpm run infra:dev:up && pnpm --filter=shared run db:reset -f && pnpm --filter=shared run db:seed:examples && pnpm run dev",
+ "dx": "pnpm i && pnpm run infra:dev:up && pnpm --filter=shared run db:reset && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
+ "dx-f": "pnpm i && pnpm run infra:dev:up && pnpm --filter=shared run db:reset -f && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"build": "turbo run build",
"start": "turbo run start",
"dev": "turbo run dev",
diff --git a/packages/shared/clickhouse/migrations/0001_traces.down.sql b/packages/shared/clickhouse/migrations/0001_traces.down.sql
new file mode 100644
index 0000000000..95a0b29e4b
--- /dev/null
+++ b/packages/shared/clickhouse/migrations/0001_traces.down.sql
@@ -0,0 +1 @@
+DROP TABLE traces;
\ No newline at end of file
diff --git a/packages/shared/clickhouse/migrations/0001_traces.up.sql b/packages/shared/clickhouse/migrations/0001_traces.up.sql
new file mode 100644
index 0000000000..31864a6a37
--- /dev/null
+++ b/packages/shared/clickhouse/migrations/0001_traces.up.sql
@@ -0,0 +1,26 @@
+CREATE TABLE traces (
+ `id` String,
+ `timestamp` DateTime64(3),
+ `name` String,
+ `user_id` Nullable(String),
+ `metadata` Map(String, String) CODEC(ZSTD(1)),
+ `release` Nullable(String),
+ `version` Nullable(String),
+ `project_id` String,
+ `public` Bool,
+ `bookmarked` Bool,
+ `tags` Array(String),
+ `input` Nullable(String) CODEC(ZSTD(1)),
+ `output` Nullable(String) CODEC(ZSTD(1)),
+ `session_id` Nullable(String),
+ `created_at` DateTime64(3) DEFAULT now(),
+ `updated_at` DateTime64(3) DEFAULT now(),
+ INDEX idx_id id TYPE bloom_filter(0.001) GRANULARITY 1,
+ INDEX idx_res_metadata_key mapKeys(metadata) TYPE bloom_filter(0.01) GRANULARITY 1,
+ INDEX idx_res_metadata_value mapValues(metadata) TYPE bloom_filter(0.01) GRANULARITY 1
+) ENGINE = ReplacingMergeTree Partition by toYYYYMM(timestamp)
+ORDER BY (
+ project_id,
+ toUnixTimestamp(timestamp),
+ id
+ );
\ No newline at end of file
diff --git a/packages/shared/clickhouse/migrations/0002_observations.down.sql b/packages/shared/clickhouse/migrations/0002_observations.down.sql
new file mode 100644
index 0000000000..656776f502
--- /dev/null
+++ b/packages/shared/clickhouse/migrations/0002_observations.down.sql
@@ -0,0 +1 @@
+DROP TABLE observations;
\ No newline at end of file
diff --git a/packages/shared/clickhouse/migrations/0002_observations.up.sql b/packages/shared/clickhouse/migrations/0002_observations.up.sql
new file mode 100644
index 0000000000..159957a41f
--- /dev/null
+++ b/packages/shared/clickhouse/migrations/0002_observations.up.sql
@@ -0,0 +1,50 @@
+CREATE TABLE observations (
+ `id` String,
+ `trace_id` String,
+ `project_id` String,
+ `type` LowCardinality(String),
+ `parent_observation_id` Nullable(String),
+ `start_time` DateTime64(3),
+ `end_time` Nullable(DateTime64(3)),
+ `name` String,
+ `metadata` Map(LowCardinality(String), String) CODEC(ZSTD(1)),
+ `level` LowCardinality(String),
+ `status_message` Nullable(String),
+ `version` Nullable(String),
+ `input` Nullable(String) CODEC(ZSTD(3)),
+ `output` Nullable(String) CODEC(ZSTD(3)),
+ `provided_model_name` Nullable(String),
+ `internal_model_id` Nullable(String),
+ `model_parameters` Nullable(String),
+ `provided_input_usage_units` Nullable(Decimal64(12)),
+ `provided_output_usage_units` Nullable(Decimal64(12)),
+ `provided_total_usage_units` Nullable(Decimal64(12)),
+ `input_usage_units` Nullable(Decimal64(12)),
+ `output_usage_units` Nullable(Decimal64(12)),
+ `total_usage_units` Nullable(Decimal64(12)),
+ `unit` Nullable(String),
+ `provided_input_cost` Nullable(Decimal64(12)),
+ `provided_output_cost` Nullable(Decimal64(12)),
+ `provided_total_cost` Nullable(Decimal64(12)),
+ `input_cost` Nullable(Decimal64(12)),
+ `output_cost` Nullable(Decimal64(12)),
+ `total_cost` Nullable(Decimal64(12)),
+ `completion_start_time` Nullable(DateTime64(3)),
+ `prompt_id` Nullable(String),
+ `prompt_name` Nullable(String),
+ `prompt_version` Nullable(UInt16),
+ `created_at` DateTime64(3) DEFAULT now(),
+ `updated_at` DateTime64(3) DEFAULT now(),
+ INDEX idx_id id TYPE bloom_filter() GRANULARITY 1,
+ INDEX idx_trace_id trace_id TYPE bloom_filter() GRANULARITY 1,
+ INDEX idx_project_id project_id TYPE bloom_filter() GRANULARITY 1,
+ INDEX idx_res_metadata_key mapKeys(metadata) TYPE bloom_filter() GRANULARITY 1,
+ INDEX idx_res_metadata_value mapValues(metadata) TYPE bloom_filter() GRANULARITY 1
+) ENGINE = ReplacingMergeTree Partition by toYYYYMM(start_time)
+ORDER BY (
+ project_id,
+ `type`,
+ trace_id,
+ toUnixTimestamp(start_time),
+ id
+ );
\ No newline at end of file
diff --git a/packages/shared/clickhouse/migrations/0003_scores.down.sql b/packages/shared/clickhouse/migrations/0003_scores.down.sql
new file mode 100644
index 0000000000..c5ea562063
--- /dev/null
+++ b/packages/shared/clickhouse/migrations/0003_scores.down.sql
@@ -0,0 +1 @@
+DROP TABLE scores;
\ No newline at end of file
diff --git a/packages/shared/clickhouse/migrations/0003_scores.up.sql b/packages/shared/clickhouse/migrations/0003_scores.up.sql
new file mode 100644
index 0000000000..8de0cf8812
--- /dev/null
+++ b/packages/shared/clickhouse/migrations/0003_scores.up.sql
@@ -0,0 +1,25 @@
+CREATE TABLE scores (
+ `id` String,
+ `timestamp` DateTime64(3),
+ `project_id` String,
+ `trace_id` String,
+ `observation_id` Nullable(String),
+ `name` String,
+ `value` Float64,
+ `source` String,
+ `comment` Nullable(String) CODEC(ZSTD(1)),
+ `author_user_id` Nullable(String),
+ `config_id` Nullable(String),
+ `data_type` String,
+ `string_value` Nullable(String),
+ `created_at` DateTime64(3) DEFAULT now(),
+ `updated_at` DateTime64(3) DEFAULT now(),
+ INDEX idx_id id TYPE bloom_filter(0.001) GRANULARITY 1,
+ INDEX idx_project_id trace_id TYPE bloom_filter(0.001) GRANULARITY 1
+) ENGINE = ReplacingMergeTree Partition by toYYYYMM(timestamp)
+ORDER BY (
+ project_id,
+ trace_id,
+ toUnixTimestamp(timestamp),
+ id
+ );
\ No newline at end of file
diff --git a/packages/shared/clickhouse/scripts/down.sh b/packages/shared/clickhouse/scripts/down.sh
new file mode 100644
index 0000000000..73955f4310
--- /dev/null
+++ b/packages/shared/clickhouse/scripts/down.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Load environment variables
+source ../../.env
+
+# Check if golang-migrate is installed
+if ! command -v migrate &> /dev/null
+then
+ echo "Error: golang-migrate is not installed or not in PATH."
+ echo "Please install golang-migrate via 'brew install golang-migrate' to run this script."
+ echo "Visit https://github.com/golang-migrate/migrate for more installation instructions."
+ exit 1
+fi
+
+# Construct the database URL
+if [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then
+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"
+else
+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"
+fi
+# Execute the down command
+migrate -source file://clickhouse/migrations -database "$DATABASE_URL" down
diff --git a/packages/shared/clickhouse/scripts/drop.sh b/packages/shared/clickhouse/scripts/drop.sh
new file mode 100644
index 0000000000..cde9165bfe
--- /dev/null
+++ b/packages/shared/clickhouse/scripts/drop.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Load environment variables
+source ../../.env
+
+# Check if golang-migrate is installed
+if ! command -v migrate &> /dev/null
+then
+ echo "Error: golang-migrate is not installed or not in PATH."
+ echo "Please install golang-migrate via 'brew install golang-migrate' to run this script."
+ echo "Visit https://github.com/golang-migrate/migrate for more installation instructions."
+ exit 1
+fi
+
+# Construct the database URL
+if [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then
+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"
+else
+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"
+fi
+# Execute the drop command
+migrate -source file://clickhouse/migrations -database "$DATABASE_URL" drop
diff --git a/packages/shared/clickhouse/scripts/up.sh b/packages/shared/clickhouse/scripts/up.sh
new file mode 100644
index 0000000000..0dc9e5a260
--- /dev/null
+++ b/packages/shared/clickhouse/scripts/up.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Load environment variables
+source ../../.env
+
+# Check if golang-migrate is installed
+if ! command -v migrate &> /dev/null
+then
+ echo "Error: golang-migrate is not installed or not in PATH."
+ echo "Please install golang-migrate via 'brew install golang-migrate' to run this script."
+ echo "Visit https://github.com/golang-migrate/migrate for more installation instructions."
+ exit 1
+fi
+
+# Construct the database URL
+if [ "$CLICKHOUSE_MIGRATION_SSL" = true ] ; then
+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&secure=true&skip_verify=true&x-migrations-table-engine=MergeTree"
+else
+ DATABASE_URL="${CLICKHOUSE_MIGRATION_URL}?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=default&x-multi-statement=true&x-migrations-table-engine=MergeTree"
+fi
+# Execute the up command
+migrate -source file://clickhouse/migrations -database "$DATABASE_URL" up
diff --git a/packages/shared/package.json b/packages/shared/package.json
index 4dbda56cbc..10d5631eb9 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -38,12 +38,18 @@
"db:seed": "dotenv -e ../../.env -- npx prisma db seed",
"db:generate": "dotenv -e ../../.env -- npx prisma generate",
"db:seed:examples": "dotenv -e ../../.env -- npx prisma db seed -- --environment examples",
- "db:seed:load": "dotenv -e ../../.env -- npx prisma db seed -- --environment load"
+ "db:seed:load": "dotenv -e ../../.env -- npx prisma db seed -- --environment load",
+ "ch:status": "dotenv -e ../../.env -- goose -dir './clickhouse/migrations/' status",
+ "ch:up": "bash clickhouse/scripts/up.sh",
+ "ch:down": "bash clickhouse/scripts/down.sh",
+ "ch:drop": "bash clickhouse/scripts/drop.sh",
+ "ch:reset": "pnpm run ch:down && pnpm run ch:up"
},
"prisma": {
"seed": "ts-node -r tsconfig-paths/register -r dotenv/config --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
},
"dependencies": {
+ "@anthropic-ai/tokenizer": "^0.0.4",
"@aws-sdk/client-s3": "^3.550.0",
"@aws-sdk/lib-storage": "^3.568.0",
"@aws-sdk/s3-request-presigner": "^3.554.0",
@@ -58,12 +64,14 @@
"bcryptjs": "^2.4.3",
"bullmq": "^5.4.2",
"ioredis": "^5.4.1",
+ "js-tiktoken": "^1.0.12",
"kysely": "^0.27.3",
"langchain": "^0.2.6",
"lodash": "^4.17.21",
"next-auth": "^4.24.7",
"nodemailer": "^6.9.13",
"prisma-extension-kysely": "^2.1.0",
+ "uuid": "^9.0.1",
"zod": "^3.23.8",
"zod-to-json-schema": "^3.22.5"
},
diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts
index b2a7c5e5a3..1bfb04e839 100644
--- a/packages/shared/src/index.ts
+++ b/packages/shared/src/index.ts
@@ -10,7 +10,6 @@ export * from "./orderByToPrisma";
export * from "./tracesTable";
export * from "./server/auth";
export * from "./observationsTable";
-export * from "./features/ingestion/types";
export * from "./utils/zod";
export * from "./utils/json";
export * from "./utils/objects";
diff --git a/packages/shared/src/queues.ts b/packages/shared/src/queues.ts
index 4662809111..56171db195 100644
--- a/packages/shared/src/queues.ts
+++ b/packages/shared/src/queues.ts
@@ -44,6 +44,7 @@ export enum QueueName {
EvaluationExecution = "evaluation-execution-queue", // Worker executes Evals
BatchExport = "batch-export-queue",
RepeatQueue = "repeat-queue",
+ IngestionFlushQueue = "ingestion-flush-queue",
}
export enum QueueJobs {
@@ -51,6 +52,7 @@ export enum QueueJobs {
EvaluationExecution = "evaluation-execution-job",
BatchExportJob = "batch-export-job",
EnqueueBatchExportJobs = "enqueue-batch-export-jobs",
+ FlushIngestionEntity = "flush-ingestion-entity",
}
export type TQueueJobTypes = {
diff --git a/packages/shared/src/server/definitions.ts b/packages/shared/src/server/definitions.ts
new file mode 100644
index 0000000000..bfb273d375
--- /dev/null
+++ b/packages/shared/src/server/definitions.ts
@@ -0,0 +1,167 @@
+import z from "zod";
+
+export const clickhouseStringDateSchema = z
+ .string()
+ // clickhouse stores UTC like '2024-05-23 18:33:41.602000'
+ // we need to convert it to '2024-05-23T18:33:41.602000Z'
+ .transform((str) => str.replace(" ", "T") + "Z")
+ .pipe(z.string().datetime());
+
+export const observationRecordBaseSchema = z.object({
+ id: z.string(),
+ trace_id: z.string().nullish(),
+ project_id: z.string(),
+ type: z.string(),
+ parent_observation_id: z.string().nullish(),
+ name: z.string().nullish(),
+ metadata: z.record(z.string()),
+ level: z.string().nullish(),
+ status_message: z.string().nullish(),
+ version: z.string().nullish(),
+ input: z.string().nullish(),
+ output: z.string().nullish(),
+ provided_model_name: z.string().nullish(),
+ internal_model_id: z.string().nullish(),
+ model_parameters: z.string().nullish(),
+ unit: z.string().nullish(),
+ input_usage_units: z.number().nullish(),
+ output_usage_units: z.number().nullish(),
+ total_usage_units: z.number().nullish(),
+ input_cost: z.number().nullish(),
+ output_cost: z.number().nullish(),
+ total_cost: z.number().nullish(),
+ provided_input_usage_units: z.number().nullish(),
+ provided_output_usage_units: z.number().nullish(),
+ provided_total_usage_units: z.number().nullish(),
+ provided_input_cost: z.number().nullish(),
+ provided_output_cost: z.number().nullish(),
+ provided_total_cost: z.number().nullish(),
+ prompt_id: z.string().nullish(),
+ prompt_name: z.string().nullish(),
+ prompt_version: z.number().nullish(),
+});
+export type ObservationRecordBaseType = z.infer<
+ typeof observationRecordBaseSchema
+>;
+
+export const observationRecordReadSchema = observationRecordBaseSchema.extend({
+ created_at: clickhouseStringDateSchema,
+ updated_at: clickhouseStringDateSchema,
+ start_time: clickhouseStringDateSchema,
+ end_time: clickhouseStringDateSchema.nullish(),
+ completion_start_time: clickhouseStringDateSchema.nullish(),
+});
+export type ObservationRecordReadType = z.infer<
+ typeof observationRecordReadSchema
+>;
+
+export const observationRecordInsertSchema = observationRecordBaseSchema.extend(
+ {
+ created_at: z.number(),
+ updated_at: z.number(),
+ start_time: z.number(),
+ end_time: z.number().nullish(),
+ completion_start_time: z.number().nullish(),
+ }
+);
+export type ObservationRecordInsertType = z.infer<
+ typeof observationRecordInsertSchema
+>;
+
+export const traceRecordBaseSchema = z.object({
+ id: z.string(),
+ name: z.string().nullish(),
+ user_id: z.string().nullish(),
+ metadata: z.record(z.string()),
+ release: z.string().nullish(),
+ version: z.string().nullish(),
+ project_id: z.string(),
+ public: z.boolean(),
+ bookmarked: z.boolean(),
+ tags: z.array(z.string()),
+ input: z.string().nullish(),
+ output: z.string().nullish(),
+ session_id: z.string().nullish(),
+});
+export type TraceRecordBaseType = z.infer<typeof traceRecordBaseSchema>;
+
+export const traceRecordReadSchema = traceRecordBaseSchema.extend({
+ timestamp: clickhouseStringDateSchema,
+ created_at: clickhouseStringDateSchema,
+ updated_at: clickhouseStringDateSchema,
+});
+export type TraceRecordReadType = z.infer<typeof traceRecordReadSchema>;
+
+export const traceRecordInsertSchema = traceRecordBaseSchema.extend({
+ timestamp: z.number(),
+ created_at: z.number(),
+ updated_at: z.number(),
+});
+export type TraceRecordInsertType = z.infer<typeof traceRecordInsertSchema>;
+
+export const scoreRecordBaseSchema = z.object({
+ id: z.string(),
+ project_id: z.string(),
+ trace_id: z.string(),
+ observation_id: z.string().nullish(),
+ name: z.string().nullish(),
+ value: z.union([z.number(), z.string()]).nullish(),
+ source: z.string(),
+ comment: z.string().nullish(),
+ author_user_id: z.string().nullish(),
+ config_id: z.string().nullish(),
+ data_type: z.enum(["NUMERIC", "CATEGORICAL", "BOOLEAN"]).nullish(),
+ string_value: z.string().nullish(),
+});
+export type ScoreRecordBaseType = z.infer<typeof scoreRecordBaseSchema>;
+
+export const scoreRecordReadSchema = scoreRecordBaseSchema.extend({
+ created_at: clickhouseStringDateSchema,
+ updated_at: clickhouseStringDateSchema,
+ timestamp: clickhouseStringDateSchema,
+});
+export type ScoreRecordReadType = z.infer<typeof scoreRecordReadSchema>;
+
+export const scoreRecordInsertSchema = scoreRecordBaseSchema.extend({
+ created_at: z.number(),
+ updated_at: z.number(),
+ timestamp: z.number(),
+});
+export type ScoreRecordInsertType = z.infer<typeof scoreRecordInsertSchema>;
+
+export const convertTraceReadToInsert = (
+ record: TraceRecordReadType
+): TraceRecordInsertType => {
+ return {
+ ...record,
+ created_at: new Date(record.created_at).getTime(),
+ updated_at: new Date(record.created_at).getTime(),
+ timestamp: new Date(record.timestamp).getTime(),
+ };
+};
+
+export const convertObservationReadToInsert = (
+ record: ObservationRecordReadType
+): ObservationRecordInsertType => {
+ return {
+ ...record,
+ created_at: new Date(record.created_at).getTime(),
+ updated_at: new Date(record.created_at).getTime(),
+ start_time: new Date(record.start_time).getTime(),
+ end_time: record.end_time ? new Date(record.end_time).getTime() : undefined,
+ completion_start_time: record.completion_start_time
+ ? new Date(record.completion_start_time).getTime()
+ : undefined,
+ };
+};
+
+export const convertScoreReadToInsert = (
+ record: ScoreRecordReadType
+): ScoreRecordInsertType => {
+ return {
+ ...record,
+ created_at: new Date(record.created_at).getTime(),
+ updated_at: new Date(record.updated_at).getTime(),
+ timestamp: new Date(record.timestamp).getTime(),
+ };
+};
diff --git a/packages/shared/src/server/index.ts b/packages/shared/src/server/index.ts
index 5194e238de..75d0897f49 100644
--- a/packages/shared/src/server/index.ts
+++ b/packages/shared/src/server/index.ts
@@ -8,6 +8,11 @@ export * from "./llm/fetchLLMCompletion";
export * from "./llm/types";
export * from "./utils/DatabaseReadStream";
export * from "./utils/transforms";
+export * from "./clickhouse";
+export * from "../server/definitions";
+export * from "../server/ingestion/types";
+export * from "../server/ingestion/model-match";
+export * from "../server/ingestion/types";
export * from "./redis/redis";
export * from "./redis/trace-upsert";
export * from "./clickhouse";
diff --git a/packages/shared/src/server/ingestion/model-match.ts b/packages/shared/src/server/ingestion/model-match.ts
new file mode 100644
index 0000000000..66d4cfa92f
--- /dev/null
+++ b/packages/shared/src/server/ingestion/model-match.ts
@@ -0,0 +1,63 @@
+import { Model, Observation, Prisma } from "@prisma/client";
+import { prisma } from "../../db";
+
+export async function findModel(p: {
+ event: {
+ projectId: string;
+ model?: string;
+ unit?: string;
+ startTime?: Date;
+ };
+ existingDbObservation?: Observation;
+}): Promise<Model | null> {
+ const { event, existingDbObservation } = p;
+ // either get the model from the existing observation
+ // or match pattern on the user provided model name
+ const modelCondition = event.model
+ ? Prisma.sql`AND ${event.model} ~ match_pattern`
+ : existingDbObservation?.internalModel
+ ? Prisma.sql`AND model_name = ${existingDbObservation.internalModel}`
+ : undefined;
+ if (!modelCondition) return null;
+
+ // unit based on the current event or the existing observation, both can be undefined
+ const mergedUnit = event.unit ?? existingDbObservation?.unit;
+
+ const unitCondition = mergedUnit
+ ? Prisma.sql`AND unit = ${mergedUnit}`
+ : Prisma.empty;
+
+ const sql = Prisma.sql`
+ SELECT
+ id,
+ created_at AS "createdAt",
+ updated_at AS "updatedAt",
+ project_id AS "projectId",
+ model_name AS "modelName",
+ match_pattern AS "matchPattern",
+ start_date AS "startDate",
+ input_price AS "inputPrice",
+ output_price AS "outputPrice",
+ total_price AS "totalPrice",
+ unit,
+ tokenizer_id AS "tokenizerId",
+ tokenizer_config AS "tokenizerConfig"
+ FROM
+ models
+ WHERE (project_id = ${event.projectId}
+ OR project_id IS NULL)
+ ${modelCondition}
+ ${unitCondition}
+ AND (start_date IS NULL OR start_date <= ${
+ event.startTime ? new Date(event.startTime) : new Date()
+ }::timestamp with time zone at time zone 'UTC')
+ ORDER BY
+ project_id ASC,
+ start_date DESC NULLS LAST
+ LIMIT 1
+ `;
+
+ const foundModels = await prisma.$queryRaw<Array<Model>>(sql);
+
+ return foundModels[0] ?? null;
+}
diff --git a/packages/shared/src/features/ingestion/types.ts b/packages/shared/src/server/ingestion/types.ts
similarity index 90%
rename from packages/shared/src/features/ingestion/types.ts
rename to packages/shared/src/server/ingestion/types.ts
index 568845f164..35d4f11707 100644
--- a/packages/shared/src/features/ingestion/types.ts
+++ b/packages/shared/src/server/ingestion/types.ts
@@ -310,6 +310,16 @@ export const SdkLogEvent = z.object({
// definitions for the ingestion API
+export const observationTypes = [
+ "observation-create",
+ "observation-update",
+ "generation-create",
+ "generation-update",
+ "span-create",
+ "span-update",
+ "event-create",
+];
+
export const eventTypes = {
TRACE_CREATE: "trace-create",
SCORE_CREATE: "score-create",
@@ -319,7 +329,6 @@ export const eventTypes = {
GENERATION_CREATE: "generation-create",
GENERATION_UPDATE: "generation-update",
SDK_LOG: "sdk-log",
-
// LEGACY, only required for backwards compatibility
OBSERVATION_CREATE: "observation-create",
OBSERVATION_UPDATE: "observation-update",
@@ -334,6 +343,7 @@ export const traceEvent = base.extend({
type: z.literal(eventTypes.TRACE_CREATE),
body: TraceBody,
});
+export type TraceEventType = z.infer<typeof traceEvent>;
export const eventCreateEvent = base.extend({
type: z.literal(eventTypes.EVENT_CREATE),
@@ -359,6 +369,7 @@ export const scoreEvent = base.extend({
type: z.literal(eventTypes.SCORE_CREATE),
body: ScoreBody,
});
+export type ScoreEventType = z.infer<typeof scoreEvent>;
export const sdkLogEvent = base.extend({
type: z.literal(eventTypes.SDK_LOG),
body: SdkLogEvent,
@@ -385,10 +396,35 @@ export const ingestionEvent = z.discriminatedUnion("type", [
legacyObservationCreateEvent,
legacyObservationUpdateEvent,
]);
+export type IngestionEventType = z.infer<typeof ingestionEvent>;
export const ingestionBatchEvent = z.array(ingestionEvent);
+export type IngestionBatchEventType = z.infer<typeof ingestionBatchEvent>;
+
+export const ingestionEventWithProjectId = ingestionEvent.and(
+ z.object({ projectId: z.string() })
+);
+export type IngestionEventWithProjectIdType = z.infer<
+ typeof ingestionEventWithProjectId
+>;
export const ingestionApiSchema = z.object({
batch: ingestionBatchEvent,
metadata: jsonSchema.nullish(),
});
+
+export const ingestionApiSchemaWithProjectId = ingestionApiSchema.extend({
+ projectId: z.string(),
+});
+export type IngestionApiSchemaWithProjectId = z.infer<
+ typeof ingestionApiSchemaWithProjectId
+>;
+
+export type ObservationEvent =
+ | z.infer<typeof legacyObservationCreateEvent>
+ | z.infer<typeof legacyObservationUpdateEvent>
+ | z.infer<typeof eventCreateEvent>
+ | z.infer<typeof spanCreateEvent>
+ | z.infer<typeof spanUpdateEvent>
+ | z.infer<typeof generationCreateEvent>
+ | z.infer<typeof generationUpdateEvent>;
diff --git a/packages/shared/src/utils/json.ts b/packages/shared/src/utils/json.ts
index bb7844d11a..e42e079c32 100644
--- a/packages/shared/src/utils/json.ts
+++ b/packages/shared/src/utils/json.ts
@@ -1,6 +1,6 @@
-import { type z } from "zod";
+import { z } from "zod";
import lodash from "lodash";
-import { jsonSchema } from "./zod";
+import { JsonNested, jsonSchema, jsonSchemaNullable } from "./zod";
export const parseJson = (input: string) => {
try {
@@ -57,3 +57,46 @@ export const mergeJson = (
}
return lodash.merge(json1, json2);
};
+
+export const parseJsonPrioritised = (
+ json: string
+): z.infer<typeof jsonSchema> | string | undefined => {
+ try {
+ const parsedJson = JSON.parse(json);
+ if (Object.keys(parsedJson).length === 0) {
+ return undefined;
+ }
+ const arr = z.array(jsonSchemaNullable).safeParse(parsedJson);
+ if (arr.success) {
+ return arr.data;
+ }
+ const obj = z.record(jsonSchemaNullable).safeParse(parsedJson);
+ if (obj.success) {
+ return obj.data;
+ }
+
+ return jsonSchema.parse(parsedJson);
+ } catch (error) {
+ return jsonSchema.parse(json);
+ }
+};
+export const convertRecordToJsonSchema = (
+ record: Record<string, string>
+): JsonNested | undefined => {
+ const jsonSchema: JsonNested = {};
+
+ // if record is empty, return undefined
+ if (Object.keys(record).length === 0) {
+ return undefined;
+ }
+
+ for (const key in record) {
+ try {
+ jsonSchema[key] = JSON.parse(record[key]);
+ } catch (e) {
+ jsonSchema[key] = record[key];
+ }
+ }
+
+ return jsonSchema;
+};
diff --git a/packages/shared/src/utils/zod.ts b/packages/shared/src/utils/zod.ts
index 23a5949d50..9a31e36f23 100644
--- a/packages/shared/src/utils/zod.ts
+++ b/packages/shared/src/utils/zod.ts
@@ -17,11 +17,11 @@ const nestedLiteralSchema = z.union([
type Root = z.infer<typeof rootLiteralSchema>;
type Literal = z.infer<typeof nestedLiteralSchema>;
-type JsonNested = Literal | { [key: string]: JsonNested } | JsonNested[];
+export type JsonNested = Literal | { [key: string]: JsonNested } | JsonNested[];
type Json = Root | { [key: string]: JsonNested } | JsonNested[];
// Here, you define the schema recursively
-const jsonSchemaNullable: z.ZodType<JsonNested> = z.lazy(() =>
+export const jsonSchemaNullable: z.ZodType<JsonNested> = z.lazy(() =>
z.union([
nestedLiteralSchema,
z.array(jsonSchemaNullable),
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e3bea2d2e2..77e7abc623 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -68,7 +68,7 @@ importers:
eslint-plugin-prettier:
specifier: ^5.1.3
prettier:
specifier: ^3.2.5
version: 3.2.5
@@ -113,27 +113,30 @@ importers:
packages/shared:
dependencies:
+ '@anthropic-ai/tokenizer':
+ specifier: ^0.0.4
+ version: 0.0.4
'@aws-sdk/client-s3':
specifier: ^3.550.0
- version: 3.550.0
+ version: 3.614.0
'@aws-sdk/lib-storage':
specifier: ^3.568.0
- version: 3.568.0(@aws-sdk/[email protected])
+ version: 3.614.0(@aws-sdk/[email protected])
'@aws-sdk/s3-request-presigner':
specifier: ^3.554.0
- version: 3.554.0
+ version: 3.614.0
'@clickhouse/client':
specifier: ^1.4.0
version: 1.4.0
'@langchain/anthropic':
specifier: ^0.1.21
- version: 0.1.21
'@langchain/core':
specifier: ^0.1.61
- version: 0.1.61
'@langchain/openai':
specifier: ^0.0.33
- version: 0.0.33
'@prisma/client':
specifier: ^5.13.0
version: 5.13.0([email protected])
@@ -158,18 +161,21 @@ importers:
ioredis:
specifier: ^5.4.1
version: 5.4.1
+ js-tiktoken:
+ specifier: ^1.0.12
+ version: 1.0.12
kysely:
specifier: ^0.27.3
version: 0.27.3
langchain:
specifier: ^0.2.6
lodash:
specifier: ^4.17.21
version: 4.17.21
next-auth:
specifier: ^4.24.7
nodemailer:
specifier: ^6.9.13
version: 6.9.13
@@ -179,6 +185,9 @@ importers:
react:
specifier: ^18.0.0
version: 18.2.0
+ uuid:
+ specifier: ^9.0.1
+ version: 9.0.1
zod:
specifier: ^3.23.8
version: 3.23.8
@@ -221,7 +230,7 @@ importers:
eslint-plugin-prettier:
specifier: ^5.1.3
kysely-codegen:
specifier: ^0.11.0
@@ -278,13 +287,13 @@ importers:
'@langchain/anthropic':
specifier: ^0.1.21
- version: 0.1.21
'@langchain/core':
specifier: ^0.1.61
- version: 0.1.61
'@langchain/openai':
specifier: ^0.0.33
- version: 0.0.33
'@langfuse/ee':
specifier: workspace:*
version: link:../ee
@@ -296,7 +305,7 @@ importers:
'@mui/x-tree-view':
specifier: ^7.6.2
'@next-auth/prisma-adapter':
specifier: ^1.0.7
@@ -373,16 +382,13 @@ importers:
specifier: workspace:*
version: link:../packages/config-typescript
'@sentry/nextjs':
- specifier: ^8.13.0
+ specifier: 8.13.0
'@sentry/node':
- specifier: ^8.13.0
+ specifier: 8.13.0
version: 8.13.0
'@sentry/profiling-node':
- specifier: ^8.13.0
- version: 8.13.0
- '@sentry/types':
- specifier: ^8.13.0
+ specifier: 8.13.0
version: 8.13.0
'@t3-oss/env-nextjs':
specifier: ^0.10.1
@@ -413,16 +419,16 @@ importers:
version: 10.45.2
'@uiw/codemirror-theme-github':
specifier: ^4.21.25
- version: 4.21.25(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
+ version: 4.21.25(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
'@uiw/codemirror-theme-tokyo-night':
specifier: ^4.22.2
- version: 4.22.2(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
+ version: 4.22.2(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
'@uiw/react-codemirror':
specifier: ^4.21.25
ai:
specifier: ^3.0.23
bcryptjs:
specifier: ^2.4.3
version: 2.4.3
@@ -473,7 +479,7 @@ importers:
version: 0.27.3
langchain:
specifier: ^0.2.6
lodash:
specifier: ^4.17.21
version: 4.17.21
@@ -681,10 +687,10 @@ importers:
specifier: workspace:*
version: link:../packages/shared
'@sentry/node':
- specifier: ^8.13.0
+ specifier: 8.13.0
version: 8.13.0
'@sentry/profiling-node':
- specifier: ^8.13.0
+ specifier: 8.13.0
version: 8.13.0
backoff:
specifier: ^2.5.0
@@ -774,6 +780,9 @@ importers:
'@types/pg':
specifier: ^8.11.6
version: 8.11.6
+ '@types/uuid':
+ specifier: ^9.0.8
+ version: 9.0.8
'@typescript-eslint/parser':
specifier: ^7.12.0
@@ -788,7 +797,7 @@ importers:
eslint-plugin-prettier:
specifier: ^5.1.3
kysely-codegen:
specifier: ^0.11.0
@@ -857,194 +866,186 @@ packages:
'@anthropic-ai/[email protected]':
resolution: {integrity: sha512-EHRKbxlxlc8W4KCBEseByJ7YwyYCmgu9OyN59H9+IYIGPoKv8tXyQXinkeGDI+cI8Tiuz9wk2jZb/kK7AyvL7g==}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==}
-
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==}
+ engines: {node: '>=16.0.0'}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==}
+ engines: {node: '>=16.0.0'}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==}
- '@aws-crypto/[email protected]':
- resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==}
+ '@aws-crypto/[email protected]':
+ resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-45jjDQI0Q37PIteWhywhlExxYaiUeOsTsbE62b+U/FOjYV8tirC8uBY9eHeHaP4IPVGHeQWvEYrFJHNU+qsQLQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-9BlhfeBegvyjOqHtcr9kvrT80wiy7EVUiqYyTFiiDv/hJIcG88XHQCZdLU7658XBkQ7aFrr5b8rF2HRD1oroxw==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-FbB4A78ILAb8sM4TfBd+3CrQcfZIhe0gtVZNbaxpq5cJZh1K7oZ8vPfKw4do9JWkDUXPLsD9Bwz12f8/JpAb6Q==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-BI1NWcpppbHg/28zbUg54dZeckork8BItZIcjls12vxasy+p3iEzrJVG60jcbUTTsk3Qc1tyxNfrdcVqx0y7Ww==}
+ engines: {node: '>=16.0.0'}
peerDependencies:
- '@aws-sdk/credential-provider-node': ^3.549.0
-
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-lz+yflOAj5Q263FlCsKpNqttaCb2NPh8jC76gVCqCt7TPxRDBYVaqg0OZYluDaETIDNJi4DwN2Azcck7ilwuPw==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/client-sts': ^3.614.0
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-63IreJ598Dzvpb+6sy81KfIX5iQxnrWSEtlyeCdC2GO6gmSQVwJzc9kr5pAC83lHmlZcm/Q3KZr3XBhRQqP0og==}
- engines: {node: '>=14.0.0'}
- peerDependencies:
- '@aws-sdk/credential-provider-node': ^3.549.0
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-p5pyYaxRzBttjBkqfc8i3K7DzBdTg3ECdVgBo6INIUxfvDy0J8QUE8vNtCgvFIkq+uPw/8M+Eo4zzln7anuO0Q==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-jC61OxJn72r/BbuDRCcluiw05Xw9eVLG0CwxQpF3RocxfxyZqlrGYaGecZ8Wy+7g/3sqGRC/Ar5eUhU1YcLx7w==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-i6QmaVA1KHHYNnI2VYQy/sc31rLm4+jSp8b/YbQpFnD0w3aXsrEEHHlxek45uSkHb4Nrj1omFBVy/xp1WVYx2Q==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-XppwO8c0GCGSAvdzyJOhbtktSEaShg14VJKg8mpMa1XcgqzmcqqHQjtDWbx5rZheY1VdpXZhpEzJkB6LpQejpA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-BUuS5/1YkgmKc4J0bg83XEtMyDHVyqG2QDzfmhYe8gbOIZabUl1FlrFVwhCAthtrrI6MPGTQcERB4BtJKUSplw==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-kdj1wCmOMZ29jSlUskRqN04S6fJ4dvt0Nq9Z32SA6wO7UG8ht6Ot9h/au/eTWJM3E1somZ7D771oK7dQt9b8yw==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-v69ZCWcec2iuV9vLVJMa6fAb5xwkzN4jYIT8yjo2c4Ia/j976Q+TPf35Pnz5My48Xr94EFcaBazrWedF+kwfuQ==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-k6IIrluZjQpzui5Din8fW3bFFhHaJ64XrsfYx0Ks1mb7xan84dJxmYP3tdDDmLzUeJv5h95ag88taHfjY9rakA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-YIEjlNUKb3Vo/iTnGAPdsiDC3FUUnNoex2OwU8LmR7AkYZiWdB8nx99DfgkkY+OFMUpw7nKD2PCOtuFONelfGA==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-f3YgalsMuywEAVX4AUm9tojqrBdfpAac0+D320ePzas0Ntbp7ItYu9ceKIhgfzXO3No7P3QK0rCrOxL+ABTn8Q==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-KfLuLFGwlvFSZ2MuzYwWGPb1y5TeiwX5okIDe0aQ1h10oD3924FXbN+mabOnUHQ8EFcGAtCaWbrC86mI7ktC6A==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ '@aws-sdk/client-sts': ^3.614.0
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-9O1OaprGCnlb/kYl8RwmH7Mlg8JREZctB8r9sa1KhSsWFq/SWO0AuJTyowxD7zL5PkeS4eTvzFFHWCa3OO5epA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-4J6gPEuFZP0mkWq5E//oMS1vrmMM88iNNcv7TEljYnsc6JTAlKejCyFwx6CN+nkIhmIZsl06SXIhBemzBdBPfg==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-BGopRKHs7W8zkoH8qmSHrjudj263kXbhVkAUPxVUz0I28+CZNBgJC/RfVCbOpzmysIQEpwSqvOv1y0k+DQzIJQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-Q0SI0sTRwi8iNODLs5+bbv8vgz8Qy2QdxbCHnPk/6Cx6LMf7i3dqmWquFbspqFRd8QiqxStrblwxrUYZi09tkA==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-QzclVXPxuwSI7515l34sdvliVq5leroO8P7RQFKRgfyQKO45o1psghierwG3PgV6jlMiv78FIAGJBr/n4qZ7YA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-55+gp0JY4451cWI1qXmVMFM0GQaBKiQpXv2P0xmd9P3qLDyeFUSEW8XPh0d2lb1ICr6x4s47ynXVdGCIv2mXMg==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-WW1vN3oGULwi1gLotMyQtg3+UT7PI+pU+jOT+Tv7L1U17epH63CiVtj5htkw/xbQ/Tc4YgII1K8y2TcgNrODFQ==}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-U+PG8NhlYYF45zbr1km3ROtBMYqyyj/oK8NRp++UHHeuavgrP+4wJ4wQnlEaKvJBjevfo3+dlIBcaeQ7NYejWg==}
engines: {node: '>=16.0.0'}
peerDependencies:
- '@aws-sdk/client-s3': ^3.568.0
-
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-7sijlfQsc4UO9Fsl11mU26Y5f9E7g6UoNg/iJUBpC5pgvvmdBRO5UEhbB/gnqvOEPsBXyhmfzbstebq23Qdz7A==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/client-sts': ^3.609.0
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-hFKyqUBky0NWCVku8iZ9+PACehx0p6vuMw5YnZf8FVgHP0fode0b/NwQY6UY7oor/GftvRsAlRUAWGNFEGUpwA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-Bzni+r7pS+nRiqcmWPpB/OiQEM4GszGRp1DXpL3rKnwaeu+Qgf2w12DULxWUacIvOc4IzLsv6tpEidQ/P1zKQg==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ '@aws-sdk/client-s3': ^3.614.0
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-rBIzldY9jjRATxICDX7t77aW6ctqmVDgnuAOgbVT5xgHftt4o7PGWKoMvl/45hYqoQgxVFnCBof9bxkqSBebVA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-TqEY8KcZeZ0LIxXaqG9RSSNnDHvD8RAFP4Xenwsxqnyad0Yn7LgCoFwRByelJ0t54ROYL1/ETJleWE4U4TOXdg==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-0h6TWjBWtDaYwHMQJI9ulafeS4lLaw1vIxRjbpH0svFRt6Eve+Sy8NlVhECfTU2hNz/fLubvrUxsXoThaLBIew==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-+zeg//mSer4JZRxOB/4mUOMUJyuYPwATnIC5moBB8P8Xe+mJaVRFy8qlCtzYNj2TycnlsBPzTK0j7P1yvDh97w==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-SxfS9wfidUZZ+WnlKRTCRn3h+XTsymXRXPJj8VV6hNRNeOwzNweoG3YhQbTowuuNfXf89m9v6meYkBBtkdacKw==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-ZLpxVXMboDeMT7p2Kdp5m1uLVKOktkZoMgLvvbe3zbrU4Ji5IU5xVE0aa4X7H28BtuODCs6SLESnPs19bhMKlA==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-huNHpONOrEDrdRTvSQr1cJiRMNf0S52NDXtaPzdxiubTkP+vni2MohmZANMOai/qT0olmEVX01LhZ0ZAOgmg6A==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-iTKfo158lc4jLDfYeZmYMIBHsn8m6zX+XB6birCSNZ/rrlzAkPbGE43CNdKfvjyWdqgLMRXF+B+OcZRvqhMXPQ==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-am2qgGs+gwqmR4wHLWpzlZ8PWhm4ktj5bYSgDrsOfjhdBlWNxvPoID9/pDAz5RWL48+oH7I6SQzMqxXsFDikrw==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-xzsdoTkszGVqGVPjUmgoP7TORiByLueMHieI1fhQL888WPdqctwAx3ES6d/bA9Q/i8jnc6hs+Fjhy8UvBTkE9A==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-/dLG/E3af6ohxkQ5GBHT8tZfuPIg6eItKxCXuulvYj0Tqgf3Mb+xTsvSkxQsJF06RS4sH7Qsg/PnB8ZfrJrXpg==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-9KzOqsbwJJuQcpmrpkkIftjPahB1bsrcWalYzcVqKCgHCylhkSHW2tX+uGHRnvAl9iobQD5D7LUrS+cv0NeQ/Q==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-6sewsYB7/o/nbUfA99Aa/LokM+a/u4Wpm/X2o0RxOsDtSB795ObebLJe2BxY5UssbGaWkn7LswyfvrdZNXNj1w==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-Rb4sfus1Gc5paRl9JJgymJGsb/i3gJKK/rTuFZICdd1PBBE5osIOHP5CpzWYBtc5LlyZE1a2QoxPMCyG+QUGPw==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-9fJTaiuuOfFV4FqmUEhPYzrtv7JOfYpB7q65oG3uayVH4ngWHIJkjnnX79zRhNZKdPGta+XIsnZzjEghg82ngA==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-2QWMrbwd5eBy5KCYn9a15JEWBgrK2qFEKQN2lqb/6z0bhtevIOxIRfC99tzvRuPt6nixFQ+ynKuBjcfT4ZFrdQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-2w3dBLjQVKIajYzokO4hduq8/0hSMUYHHmIo1Kdl+MSY8uwRBt12bLL6pyreobTcRMxizvn2ph/CQ9I1ST/WGQ==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-8Rd6wPeXDnOYzWj1XCmOKcx/Q87L0K1/EHqOBocGjLVbN3gmRxBvpmR1pRTjf7IsWfnnzN5btqtcAkfDPYQUMQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-GZSD1s7+JswWOTamVap79QiDaIV7byJFssBW68GYjyRS5EBjNfwA/8s+6uE6g39R3ojyTbYOmvcANoZEhSULXg==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-IXOznDiaItBjsQy4Fil0kzX/J3HxIOknEphqHbOfUf+LpA5ugcsxuQQONrbEQusCBnfJyymrldBvBhFmtlU9Wg==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-xUxh0UPQiMTG6E31Yvu6zVYlikrIcFDKljM11CaatInzvZubGTGiX0DjpqRlfGzUNsuPc/zNrKwRP2+wypgqIw==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-499skN4HpUNXasxmCnuiAuBvx3SzYLKK0WnfXk8cnEZq13981c8lDZRjSwOBCxGl5M3bCht2wiJ2fmjz/HtYWQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-tqCsEsEj8icW0SAh3NvyhRUq54Gz2pu4NM2tOSrFp7SO55heUUaRLSzYteNZCTOupH//AAaZvbN/UUTO/DrOog==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-KCXFfnkW8QVtigvStA3zvIHBp/FmwwCBcMgp3WjJNNPVKit3RM70veAWJBZUghHmHtd9fTijO2uwzHtusjkyHw==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-cC11/5ahp+LaBCq7cR+51AM2ftf6m9diRd2oWkbEpjSiEKQzZRAltUPZAJM6NXGypmDODQDJphLGt45tvS+8kg==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-6mW3ONW4oLzxrePznYhz7sNT9ji9Am9ufLeV722tbOVS5lArBOZ6E1oPz0uYBhisUPznWKhcLRMggt7vIJWMng==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-rJyeXkXknLukRFGuMQOgKnPBa+kLODJtOqEBf929SpQ96f1I6ytdndmWbB5B/OQN5Fu5DOOQUQqJypDQVl5ibQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ '@aws-sdk/client-sso-oidc': ^3.614.0
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-aY4MYfduNj+sRR37U7XxYR8wemfbKP6lx00ze2M2uubn7mZotuVrWYAafbMSXrdEMSToE5JDhr28vArSOoLcSg==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-smVo29nUPAOprp8Z5Y3GHuhiOtw6c8/EtLCm5AVMtRsTPw4V414ZXL2H66tzmb5kEeSzQlbfBSBEdIFZoxO9kg==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-XUKJWWo+KOB7fbnPP0+g/o5Ulku/X53t7i/h+sPHr5xxYTJJ9CYnbToo95mzxe7xWvkLrsNtJ8L+MnNn9INs2w==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-1kMyQFAWx6f8alaI6UT65/5YW/7pDWAKAdNwL6vuJLea03KrZRX3PMoONOSJpAS5m3Ot7HlWZvf3wZDNTLELZw==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-wK2cdrXHH4oz4IomV/yrGkftU9A+ITB6nFL+rxxyO78is2ifHJpFdV4aqk4LSkXYPi6CXWNru/Dqc7yiKXgJPw==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-ElbNkm0bddu53CuW44Iuux1ZbTV50fydbSh/4ypW3LrmUvHx193ogj0HXQ7X26kmmo9rXcsrLdM92yIeTjidVg==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-fuk29BI/oLQlJ7pfm6iJ4gkEpHdavffAALZwXh9eaY1vQ0ip0aKfRTiNudPoJjyyahnz5yJ1HkmlcDitlzsOrQ==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-PHJ3SL6d2jpcgbqdgiPxkXpu7Drc2PYViwxSIqvvMKhDwzSB1W3mMvtpzwKM4IE7zLFodZo0GKjJ9AsoXndXhA==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig==}
+ engines: {node: '>=16.0.0'}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-RWMcF/xV5n+nhaA/Ff5P3yNP3Kur/I+VNZngog4TEs92oB/nwOdAg/2JL8bVAhUbMrjTjpwm7PItziYFQoqyig==}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==}
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-dRek0zUuIT25wOWJlsRm97nTkUlh1NDcLsQZIN2Y8KxhwoXXWtJs5vaDPT+qAg+OpcNj80i1zLR/CirqlFg/TQ==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==}
+ engines: {node: '>=16.0.0'}
peerDependencies:
aws-crt: '>=1.0.0'
peerDependenciesMeta:
aws-crt:
optional: true
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==}
-
- '@aws-sdk/[email protected]':
- resolution: {integrity: sha512-VXAq/Jz8KIrU84+HqsOJhIKZqG0PNTdi6n6PFQ4xJf44ZQHD/5C7ouH4qCFX5XgZXcgbRIcMVVYGC6Jye0dRng==}
- engines: {node: '>=14.0.0'}
+ '@aws-sdk/[email protected]':
+ resolution: {integrity: sha512-l9XxNcA4HX98rwCC2/KoiWcmEiRfZe4G+mYwDbCFT87JIMj6GBhLDkAzr/W8KAaA2IDr8Vc6J8fZPgVulxxfMA==}
+ engines: {node: '>=16.0.0'}
resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==}
@@ -1054,6 +1055,10 @@ packages:
resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==}
engines: {node: '>=6.9.0'}
@@ -1089,18 +1094,34 @@ packages:
resolution: {integrity: sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==}
engines: {node: '>=6.9.0'}
@@ -1121,14 +1142,26 @@ packages:
resolution: {integrity: sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==}
engines: {node: '>=6.9.0'}
@@ -1141,6 +1174,10 @@ packages:
resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==}
engines: {node: '>=6.9.0'}
@@ -1153,6 +1190,10 @@ packages:
resolution: {integrity: sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==}
engines: {node: '>=6.9.0'}
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==}
+ engines: {node: '>=6.9.0'}
+
resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==}
engines: {node: '>=6.9.0'}
@@ -1348,8 +1389,8 @@ packages:
'@codemirror/[email protected]':
resolution: {integrity: sha512-gmqxkPALZjkgSxIeeweY/wGQXBfwTUaLs8h7OKtSwfbj9Ct3L11lD+u1sS7XHppxFQoMDiMDp07P9f3I2jWOHw==}
- '@codemirror/[email protected]':
- resolution: {integrity: sha512-QScv95fiviSQ/CaVGflxAvvvDy/9wi0RFyDl4LkHHWiMr/UPebyuTspmYSeN5Nx6eujcPYwsQzA6ZIZucKZVHQ==}
+ '@codemirror/[email protected]':
+ resolution: {integrity: sha512-fo7CelaUDKWIyemw4b+J57cWuRkOu4SWCCPfNDkPvfWkGjM9D5racHQXr4EQeYCD6zEBIBxGCeaKkQo+ysl0gA==}
'@cspotcode/[email protected]':
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
@@ -1789,7 +1830,6 @@ packages:
'@humanwhocodes/[email protected]':
resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
engines: {node: '>=10.10.0'}
- deprecated: Use @eslint/config-array instead
'@humanwhocodes/[email protected]':
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
@@ -1797,7 +1837,6 @@ packages:
'@humanwhocodes/[email protected]':
resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==}
- deprecated: Use @eslint/object-schema instead
resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==}
@@ -1933,12 +1972,12 @@ packages:
resolution: {integrity: sha512-7L5UDhO93UYfBwdaGxIqc5ZGSQ4wgMyYdENflLYhA9Aeho+BSHd0Krqh6zEHNGy4p+OrCElyDy58G8yiDEpxvw==}
engines: {node: '>=18'}
- '@langchain/[email protected]':
- resolution: {integrity: sha512-C8OkAly+ugvXsL8TACCmFv9WTTcT4gvQaG6NbrXCOzibBCywfxxcTqEMOyg3zIKpxHEmR0DHqh0OiJRHocnsCg==}
+ '@langchain/[email protected]':
+ resolution: {integrity: sha512-+fjyYi8wy6x1P+Ee1RWfIIEyxd9Ee9jksEwvrggPwwI/p45kIDTdYTblXsM13y4mNWTiACyLSdbwnPaxxdoz+w==}
engines: {node: '>=18'}
- '@langchain/[email protected]':
- resolution: {integrity: sha512-pJshopBZqMNF020q0OrrO+vfApWTZUlZecRYMM7TWA5M8/zvEyU/mgA9DlzeRjjDmG6pwF6dIKVjpl6fIGVXlQ==}
+ '@langchain/[email protected]':
+ resolution: {integrity: sha512-L096itIBQ5XNsy5BCCPqIQEk/x4rzI+U4BhYT+fDBYtljESshIi/WzXdmiGfY/6MpVjB76jNuaRgMDmo1m9NeQ==}
engines: {node: '>=18'}
'@langchain/[email protected]':
@@ -2042,11 +2081,11 @@ packages:
'@types/react':
optional: true
- resolution: {integrity: sha512-8SLffXYPRVpcZx5QzxNE8fytTqzp+IuU3deZbQWg/vSaTlDpR5YVrQ4qQtXTi5cRdhOufV5INylmwlKK+//nPw==}
+ resolution: {integrity: sha512-tCHSi/Tomez9ERynFhZRvFO6n9ATyrPs+2N80DMDzp6xDVirbBjEwhPcE+x7Lj+nwYw0SqFkOxyvMP0irnm55w==}
- resolution: {integrity: sha512-DbR1NckTLpjt9Zut9EGQ70th86HfN0BYQgyYro6aXQrNfjzSwe3BJS1AyBQ5mJ7TdL6YVRqohfukxj9JlqZZUg==}
+ resolution: {integrity: sha512-lp5xQBbcRuxNtjpWU0BWZgIrv2XLUz4RJ0RqFXBdESIsKoGCQZ6P3wwU5ZPuj5TjssNiKv9AlM+vHopRxZhvVQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
'@emotion/react': ^11.5.0
@@ -2072,16 +2111,6 @@ packages:
'@types/react':
optional: true
- resolution: {integrity: sha512-sYpubkO1MZOnxNyVOClrPNOTs0MfuRVVnAvCeMaOaXt6GimgQbnUcshYv2pSr6PFj+Mqzdff/FYOBceK8u5QgA==}
- engines: {node: '>=12.0.0'}
- peerDependencies:
- '@types/react': ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- '@types/react':
- optional: true
-
resolution: {integrity: sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==}
engines: {node: '>=12.0.0'}
@@ -2111,22 +2140,6 @@ packages:
'@types/react':
optional: true
- resolution: {integrity: sha512-9YbkC2m3+pNumAvubYv+ijLtog6puJ0fJ6rYfzfLCM47pWrw3m+30nXNM8zMgDaKL6vpfWJcCXm+LPaWBpy7sw==}
- engines: {node: '>=12.0.0'}
- peerDependencies:
- '@emotion/react': ^11.5.0
- '@emotion/styled': ^11.3.0
- '@types/react': ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- '@emotion/react':
- optional: true
- '@emotion/styled':
- optional: true
- '@types/react':
- optional: true
-
resolution: {integrity: sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==}
peerDependencies:
@@ -2145,16 +2158,6 @@ packages:
'@types/react':
optional: true
- resolution: {integrity: sha512-kLLi5J1xY+mwtUlMb8Ubdxf4qFAA1+U7WPBvjM/qQ4CIwLCohNb0sHo1oYPufjSIH/Z9+dhVxD7dJlfGjd1AVA==}
- engines: {node: '>=12.0.0'}
- peerDependencies:
- '@types/react': ^17.0.0 || ^18.0.0
- react: ^17.0.0 || ^18.0.0
- peerDependenciesMeta:
- '@types/react':
- optional: true
-
resolution: {integrity: sha512-0LBoKUQvMzNzJN7UmGqGV4A3NpRxB8liPrjQMfkbI6LrXBbDlqyEdJWRseK1RzxYxTfH71HqW9Z3E2wS62P1Sg==}
engines: {node: '>=14.0.0'}
@@ -2174,9 +2177,6 @@ packages:
resolution: {integrity: sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==}
- resolution: {integrity: sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==}
-
resolution: {integrity: sha512-L3oDricIIjgj1AVnRdRor21gI7mShlSwU/1ZGHmqM3LzHhXXhdkrfeNY5zif25Bi5Dd7fiJHsbhoZCHfXYvlAw==}
@@ -2186,108 +2186,54 @@ packages:
cpu: [arm64]
os: [darwin]
- resolution: {integrity: sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [darwin]
-
resolution: {integrity: sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
- resolution: {integrity: sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [darwin]
-
resolution: {integrity: sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
- resolution: {integrity: sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [linux]
-
resolution: {integrity: sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
- resolution: {integrity: sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [linux]
-
resolution: {integrity: sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
- resolution: {integrity: sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [linux]
-
resolution: {integrity: sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
- resolution: {integrity: sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [linux]
-
resolution: {integrity: sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
- resolution: {integrity: sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw==}
- engines: {node: '>= 10'}
- cpu: [arm64]
- os: [win32]
-
resolution: {integrity: sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
- resolution: {integrity: sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg==}
- engines: {node: '>= 10'}
- cpu: [ia32]
- os: [win32]
-
resolution: {integrity: sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
- resolution: {integrity: sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g==}
- engines: {node: '>= 10'}
- cpu: [x64]
- os: [win32]
-
'@nicolo-ribaudo/[email protected]':
resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==}
@@ -3544,198 +3490,210 @@ packages:
'@sinonjs/[email protected]':
resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-wRlta7GuLWpTqtFfGo+nZyOO1vEvewdNR1R4rTxpC8XU6vG/NDyrFBhwLZsqg1NUoR1noVaXJPC/7ZK47QCySw==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-VNB5+1oCgX3Fzs072yuRsUoC2N4Zg/LJ11DTxX3+Qu+Paa6AmbIF0E9sc2wthz9Psrk/zcOlTCyuposlIhPjZQ==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-VDkpCYW+peSuM4zJip5WDfqvg2Mo/e8yxOv3VF1m11y7B8KKMKVFtmZWDe36Fvk8rGuWrPZHHXZ7rR7uM5yWyg==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-3GJNvRwXBGdkDZZOGiziVYzDpn4j6zfyULHMDKAGIUo72yHALpE9CbhfQp/XcLNVoc1byfMpn6uW5H2BqPjgaQ==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-sbnURCwjF0gSToGlsBiAmd1lRCmSn72nu9axfJu5lIx6RUEgHu6GwTMbqCdhQSi0Pumcm5vFxsi9XWXb2mTaoA==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-fsiMgd8toyUba6n1WRmr+qACzXltpdDkPTAaDqc8QqPBUzO+/JKwL6bUBseHVi8tu9l+3JOK+tSf7cay+4B3LA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-2fek3I0KZHWJlRLvRTqxTEri+qV0GRHrJIoLFuBMZB4EMg4WgeBGfF0X6abnrNYpq55KJ6R4D6x4f0vLnhzinA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-tBbVIv/ui7/lLTKayYJJvi8JLVL2SwOQTbNFEOrvzSE3ktByvsa1erwBOnAMo8N5Vu30g7lN4lLStrU75oDGuw==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-BWB9mIukO1wjEOo1Ojgl6LrG4avcaC7T/ZP6ptmAaW4xluhSIPZhY+/PI5YKzlk+jsm+4sQZB45Bt1OfMeQa3w==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-NKyH01m97Xa5xf3pB2QOF3lnuE8RIK0hTVNU5zvZAwZU8uspYO4DHQVlK+Y5gwSrujTfHvbfd1D9UFJAc0iYKQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-0mBcu49JWt4MXhrhRAlxASNy0IjDRFU+aWNDRal9OtUJvJNiwDuyKMUONSOjLjSCeGwZaE0wOErdqULer8r7yw==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-UaPf8jKbcP71BGiO0CdeLmlg+RhWnlN8ipsMSdwvqBFigl5nil3rHOI/5GE3tfiuX8LvY5Z9N0meuU7Rab7jWw==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Eo4anLZX6ltGJTZ5yJMc80gZPYYwBn44g0h7oFq6et+TYr5dUsTpIcDbz2evsOKIZhZ7zBoFWHtBXQ4QQeb5xA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-RHhbTw/JW3+r8QQH7PrganjNCiuiEZmpi6fYUAetFfPLfZ6EkiA08uN3EFfcyKubXQxOwTeJRZSQmDDCdUshaA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-NVTYjOuYpGfrN/VbRQgn31x73KDLfCXCsFdad8DiIc3IcdxL+dYA9zEQPyOP7Fy2QL8CPy2WE4WCUD+ZsLNfaQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-mjlG0OzGAYuUpdUpflfb9zyLrBGgmQmrobNT8b42ZTsGv/J03+t24uhhtVEKG/b2jFtPIHF74Bq+VUtbzEKOKg==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Od9dv8zh3PgOD7Vj4T3HSuox16n0VG8jJIM2gvKASL6aCtcS8CfHZDWe1Ik3ZXW6xBouU+45Q5wgoliWDZiJ0A==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-0w0bgUvZmfa0vHN8a+moByhCJT07WN6AHKEhFSOLsDpnszm+5dLVv5utGaqbhOrZ/aF5x3xuPMs/oMCd+4O5xg==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-SGPoVH8mdXBqrkVCJ1Hd1X7vh1zDXojNN1yZyZTZsCno99hVue9+IYzWDjq/EQDDXxmITB0gBmuyPh8oAZSTcg==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-hAbfqN2UbISltakCC2TP0kx4LqXBttEv2MqSPE98gVuDFMf05lU+TpC41QtqGP3Ff5A3GwZMPfKnEy0VmEUpmg==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-zLWaC/5aWpMrHKpoDF6nqpNtBhlAYKF/7+9yMN7GpdR8CzohnWfGtMznPybnwSS8saaXBMxIGwJqR4HmRp6b3g==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-aT+HCATOSRMGpPI7bi7NSsTNVZE/La9IaxLXWoVAYMxHT5hGO3ZOGEMZQg8A6nNL+pdFGtZQtND1eoY084HgHQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-PBgDMeEdDzi6JxKwbfBtwQG9eT9cVwsf0dZzLXoJF4sHKHs5HEo/3lJWpn6jibfJwT34I1EBXpBnZE8AxAft6g==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-nEDASdbKFKPXN2O6lOlTgrEEOO9NHIeO+HVvZnkqc8h5U9g3BIhWsvzFo+UcUbliMHvKNPD/zVxDrkP1Sbgp8Q==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==}
'@smithy/[email protected]':
resolution: {integrity: sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==}
engines: {node: '>=14.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-M26XTtt9IIusVMOWEAhIvFIr9jYj4ISPPGJROqw6vXngO3IYJCnVVSMFn4Tx1rUTG5BiKJNg9u2nxmBiZC5IlQ==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-5bl2LG1Ah/7E5cMSC+q+h3IpVHMeOkG0yLRyQT1p2aMJkSrZG7RlXHPuAgb7EyaFeidKEnnd/fNaLLaKlHGzDQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-O/SAkGVwpWmelpj/8yDtsaVe6sINHLB1q8YE/+ZQbDxIw3SRLbTZuRaI10K12sVoENdnHqzPp5i3/H+BcZ3m3Q==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-1/8kFp6Fl4OsSIVTWHnNjLnTL8IqpIb/D3sTSczrKFnrE9VMNWxnrRKNvpUHOJ6zpGD5f62TPm7+17ilTJpiCQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Dbz2bzexReYIQDWMr+gZhpwBetNXzbhnEMhYKA6urqmojO14CsXjnsoPYO8UL/xxcawn8ZsuVU61ElkLSltIUQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-P2bGufFpFdYcWvqpyqqmalRtwFUNUA8vHjJR5iGqbfR6mp65qKOLcUd6lTr4S9Gn/enynSrSf3p3FVgVAf6bXA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-V4acqqrh5tDxUEGVTOgf2lYMZqPQsoGntCrjrJZEeBzEzDry2d2vcI1QCXhGltXPPY+BMc6eksZMguA9fIY8vA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Mrv9omExU1gA7Y0VEJG2LieGfPYtwwcEiOnVGZ54a37NEMr66TJ0glFslOJFuKWG6izg5DpKIUmDV9rRxjm47Q==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-mVGyPBzkkGQsPoxQUbxlEfRjrj6FPyA3u3u2VXGr9hT8wilsoQdZdvKpMBFMB8Crfhv5dNkKHIW0Yyuc7eABqA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Td3rUNI7qqtoSLTsJBtsyfoG4cF/XMFmJr6Z2dX8QNzIi6tIW6YmuyFml8mJ2cNpyWNqITKbROMOFrvQjmsOvw==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-L1kSeviUWL+emq3CUVSgdogoM/D9QMFaqxL/dd0X7PCNWmPXqt+ExtrBjqT0V7HLN03Vs9SuiLrG3zy3JGnE5A==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-x5jmrCWwQlx+Zv4jAtc33ijJ+vqqYN+c/ZkrnpvEe/uDas7AT7A/4Rc2CdfxgWv4WFGmEqODIrrUToPN6DDkGw==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-uBDTIBBEdAQryvHdc5W8sS5YX7RQzF683XrHePVdFmAgKiMofU15FLSM0/HU03hKTnazdNRFa0YHS7+ArwoUSQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-ui/NlpILU+6HAQBfJX8BBsDXuKSNrjTSuOYArRblcrErwKFutjrCNb/OExfVRyj9+26F9J+ZmfWT+fKWuDrH3Q==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-jrbSQrYCho0yDaaf92qWgd+7nAeap5LtHTI51KXqmpIFCceKU3K9+vIVTUH72bOJngBMqa4kyu1VJhRcSrk/CQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-nZbJZB0XI3YnaFBWGDBr7kjaew6O0oNYNmopyIz6gKZEbxzrtH7rwvU1GcVxcSFoOwWecLJEe79fxEMljHopFQ==}
+ engines: {node: '>=16.0.0'}
+
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-s3+eVwNeJuXUwuMbusncZNViuhv2LjVJ1nMwTqSA0XAC7gjKhqqxRdJPhR8+YrkoZ9IiIbFk/yK6ACe/xlF+hw==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-dtpw9uQP7W+n3vOtx0CfBD5EWd7EPdIdsQnWTDoFf77e3VUf05uA7R7TGipIo8e4WL2kuPdnsr3hMQn9ziYj5w==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-ITWT1Wqjubf2CJthb0BuT9+bpzBfXeMokH/AAa5EJQgbv9aPMVfnM76iFIZVFf50hYXGbtiV71BHAthNWd6+dw==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==}
+ engines: {node: '>=16.0.0'}
'@smithy/[email protected]':
resolution: {integrity: sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==}
engines: {node: '>=14.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-HZkzrRcuFN1k70RLqlNK4FnPXKOpkik1+4JaBoHNJn+RnJGYqaa3c5/+XtLOXhlKzlRgNvyaLieHTW2VwGN0VQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==}
+ engines: {node: '>=16.0.0'}
+
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-2okTdZaCBvOJszAPU/KSvlimMe35zLOKbQpHhamFJmR7t95HSe0K3C92jQPjKY3PmDBD+7iMkOnuW05F5OlF4g==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-WKPcElz92MAQG09miBdb0GxEH/MwD5GfE8g07WokITq5g6J1ROQfYCKC1wNnkqAGfrSywT7L0rdvvqlBplqiyA==}
engines: {node: '>= 10.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-hfKXnNLmsW9cmLb/JXKIvtuO6Cf4SuqN5PN1C2Ru/TBIws+m1wSgb+A53vo0r66xzB6E82inKG2J7qtwdi+Kkw==}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-dQLrUqFxqpf0GvEKEuFdgXcdZwz6oFm752h4d6C7lQz+RLddf761L2r7dSwGWzESMMB3wKj0jL+skRhEGlecjw==}
engines: {node: '>= 10.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-BuDHv8zRjsE5zXd3PxFXFknzBG3owCpjq8G3FcsXW3CykYXuEqM3nTSsmLzw5q+T12ZYuDlVUZKBdpNbhVtlrQ==}
- engines: {node: '>= 14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-q9+pAFPTfftHXRytmZ7GzLFFrEGavqapFc06XxzZFcSIGERXMerXxCitjOG1prVDR9QdjqotF40SWvbqcCpf8g==}
- engines: {node: '>= 14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-w9i//7egejAIvplX821rPWWgaiY1dxsQUw0hXX7qwa/uZ9U3zplqTQ871jWadkcVB9gFDhkPWYVZf4yfFbZ0xA==}
+ engines: {node: '>=16.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-jtmJMyt1xMD/d8OtbVJ2gFZOSKc+ueYJZPW20ULW1GOp/q/YIM0wNh+u8ZFao9UaIGz4WoPW8hC64qlWLIfoDA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==}
+ engines: {node: '>=16.0.0'}
'@smithy/[email protected]':
resolution: {integrity: sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==}
engines: {node: '>=14.0.0'}
- '@smithy/[email protected]':
- resolution: {integrity: sha512-IHk53BVw6MPMi2Gsn+hCng8rFA3ZmR3Rk7GllxDUW9qFJl/hiSvskn7XldkECapQVkIg/1dHpMAxI9xSTaLLSA==}
- engines: {node: '>=14.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==}
+ engines: {node: '>=16.0.0'}
+ '@smithy/[email protected]':
+ resolution: {integrity: sha512-4pP0EV3iTsexDx+8PPGAKCQpd/6hsQBaQhqWzU4hqKPHN5epPsxKbvUTIiYIHTxaKt6/kEaqPBpu/ufvfbrRzw==}
+ engines: {node: '>=16.0.0'}
+
resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
@@ -3981,9 +3939,6 @@ packages:
resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
- '@types/[email protected]':
- resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==}
-
resolution: {integrity: sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==}
@@ -4448,34 +4403,34 @@ packages:
'@vitest/[email protected]':
resolution: {integrity: sha512-rE9DTN1BRhzkzqNQO+kw8ZgfeEBCLXiHJwetk668shmNBpSagQxneT5eSqEBLP+cqSiAeecvQmbpFfdMyLcIQA==}
- resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==}
+ resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==}
- resolution: {integrity: sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==}
+ resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==}
- resolution: {integrity: sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==}
+ resolution: {integrity: sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==}
- resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==}
+ resolution: {integrity: sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==}
- resolution: {integrity: sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==}
+ resolution: {integrity: sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==}
- resolution: {integrity: sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==}
+ resolution: {integrity: sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==}
- resolution: {integrity: sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==}
+ resolution: {integrity: sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==}
- resolution: {integrity: sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==}
+ resolution: {integrity: sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==}
peerDependencies:
- vue: 3.4.31
+ vue: 3.4.27
- resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==}
+ resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==}
'@webassemblyjs/[email protected]':
resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==}
@@ -4574,16 +4529,6 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
- resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==}
- engines: {node: '>=0.4.0'}
- hasBin: true
-
- resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==}
- engines: {node: '>=0.4.0'}
- hasBin: true
-
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
@@ -4891,11 +4836,6 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
- resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==}
- engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
- hasBin: true
-
resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==}
@@ -4975,11 +4915,8 @@ packages:
resolution: {integrity: sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==}
- resolution: {integrity: sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==}
-
- resolution: {integrity: sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==}
+ resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==}
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@@ -5699,9 +5636,6 @@ packages:
resolution: {integrity: sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q==}
- resolution: {integrity: sha512-4h+oPeAiGQOHFyUJOqpoEcPj/xxlicxBzOErVeYVMMmAiXUXsGpsFd0QXBMaUUbnD8hhSfLf9uw+MlsoIA7j5w==}
-
resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}
engines: {node: '>=12'}
@@ -5726,10 +5660,6 @@ packages:
resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==}
engines: {node: '>=10.13.0'}
- resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==}
- engines: {node: '>=10.13.0'}
-
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
@@ -6687,7 +6617,6 @@ packages:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
- deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
@@ -7351,8 +7280,8 @@ packages:
resolution: {integrity: sha512-lG03Ru+XyOJFsjH3OMY6R/9U38IjDPfnOfDgO3ynhbDr+Dz8fak+X6L62vqu3iybQnj+lG84OttBuU9KY3L9kA==}
engines: {node: '>=14.0.0'}
- resolution: {integrity: sha512-vDAJHGu/lA4pn3hkyzSC6RiaZhtj0ozfRyG8L6J2vCnXyJV/lgk9uGMP2x645EBrSozBMHJBng1UYeaUR/1fQQ==}
+ resolution: {integrity: sha512-iZ0l7BDVfoifqZlDl1gy3JP5mIdhYjWiToPlDnlmfHD748cw3okvF0gZo0ruT4nbftnQcaM7JzPUiNC43UPfgg==}
engines: {node: '>=18'}
peerDependencies:
'@aws-sdk/client-s3': ^3.310.0
@@ -7510,9 +7439,6 @@ packages:
resolution: {integrity: sha512-WnKI4g9kU2bHQP136orXr2bcRdgz9iiTBpTN0jWt9IlScUKnJBoD0aa2HOzHURQKeQDnt2JwqVmQ6Depf5uDLQ==}
- resolution: {integrity: sha512-iEzQLLB7/0nRpAwNBAR7B7N64fyByg5UsNjSvLaCCkQ9AS68PSafjB8xQkyI8QXXrGjU1dEqDRoa8m4SUuRdUw==}
-
resolution: {integrity: sha512-EUWHIH6fiOCGRYdzgwGoXwJxCMyUrL+bmUcxoVmkXoXoAGDOVinz8bqJLKbxotsQWqM64NKKsW85OTIutgNaMQ==}
peerDependencies:
@@ -8120,26 +8046,8 @@ packages:
sass:
optional: true
- resolution: {integrity: sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA==}
- engines: {node: '>=18.17.0'}
- hasBin: true
- peerDependencies:
- '@opentelemetry/api': ^1.1.0
- '@playwright/test': ^1.41.2
- react: ^18.2.0
- react-dom: ^18.2.0
- sass: ^1.3.0
- peerDependenciesMeta:
- '@opentelemetry/api':
- optional: true
- '@playwright/test':
- optional: true
- sass:
- optional: true
-
- resolution: {integrity: sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA==}
+ resolution: {integrity: sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==}
engines: {node: '>=10'}
@@ -8751,7 +8659,6 @@ packages:
resolution: {integrity: sha512-+8R2/nLaWyI5Jp2Ly7L52qcgDFU3xryyoNG52DPJ8dlGnagphxIc0mLNGurgyKeeTGycsOsuOIP4dtofv3ZoBA==}
- deprecated: This version of posthog-js is deprecated, please update posthog-js, and do not use this version! Check out our JS docs at https://posthog.com/docs/libraries/js
resolution: {integrity: sha512-JB+ei0LkwE+rKHyW5z79Nd1jUaGxU6TvkfjFqY9vQaHxU5aU8dRl0UUaEmZdZbHwjp3WmXCBQQRNyimwbNQfCw==}
@@ -8973,7 +8880,7 @@ packages:
resolution: {integrity: sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g==}
- deprecated: < 22.6.4 is no longer supported
+ deprecated: < 21.5.0 is no longer supported
resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==}
@@ -9038,8 +8945,8 @@ packages:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
- resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==}
+ resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}
resolution: {integrity: sha512-186Gw/vF1uRkydbsOIkcGXw7aHq0sZOCRFFjGrr7b9+nVZg4UfA4enXCaxm4fUzecU38sWfrNDitGhshuU7rdg==}
@@ -9304,7 +9211,6 @@ packages:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
- deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
@@ -10200,12 +10106,6 @@ packages:
peerDependencies:
browserslist: '>= 4.21.0'
- resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==}
- hasBin: true
- peerDependencies:
- browserslist: '>= 4.21.0'
-
resolution: {integrity: sha512-Hv25Bh+eAbOLlsjJreVPOs4vd51rrtCrmhyOJtbpAojro34jS4KQaEp4/EvlHJX7jSO42VvEFpkastVyXyIsdQ==}
engines: {node: '>=18'}
@@ -10265,6 +10165,10 @@ packages:
resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==}
engines: {node: '>= 0.4.0'}
+ resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==}
+ hasBin: true
+
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true
@@ -10392,8 +10296,8 @@ packages:
jsdom:
optional: true
- resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==}
+ resolution: {integrity: sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
@@ -10439,8 +10343,8 @@ packages:
resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==}
- resolution: {integrity: sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==}
+ resolution: {integrity: sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
@@ -10681,564 +10585,532 @@ snapshots:
'@types/node': 18.19.25
tiktoken: 1.0.15
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.535.0
- tslib: 1.14.1
-
- '@aws-crypto/[email protected]':
- dependencies:
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.535.0
- tslib: 1.14.1
+ '@aws-crypto/util': 5.2.0
+ '@aws-sdk/types': 3.609.0
+ tslib: 2.6.3
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- tslib: 1.14.1
+ '@aws-crypto/util': 5.2.0
+ '@aws-sdk/types': 3.609.0
+ tslib: 2.6.3
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- '@aws-crypto/ie11-detection': 3.0.0
- '@aws-crypto/supports-web-crypto': 3.0.0
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-locate-window': 3.535.0
- '@aws-sdk/util-utf8-browser': 3.259.0
- tslib: 1.14.1
+ '@aws-crypto/supports-web-crypto': 5.2.0
+ '@aws-crypto/util': 5.2.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-locate-window': 3.568.0
+ '@smithy/util-utf8': 2.3.0
+ tslib: 2.6.3
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- '@aws-crypto/ie11-detection': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-crypto/supports-web-crypto': 3.0.0
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-locate-window': 3.535.0
- '@aws-sdk/util-utf8-browser': 3.259.0
- tslib: 1.14.1
+ '@aws-crypto/sha256-js': 5.2.0
+ '@aws-crypto/supports-web-crypto': 5.2.0
+ '@aws-crypto/util': 5.2.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-locate-window': 3.568.0
+ '@smithy/util-utf8': 2.3.0
+ tslib: 2.6.3
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- '@aws-crypto/util': 3.0.0
- '@aws-sdk/types': 3.535.0
- tslib: 1.14.1
+ '@aws-crypto/util': 5.2.0
+ '@aws-sdk/types': 3.609.0
+ tslib: 2.6.3
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- tslib: 1.14.1
+ tslib: 2.6.3
- '@aws-crypto/[email protected]':
+ '@aws-crypto/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-utf8-browser': 3.259.0
- tslib: 1.14.1
-
- '@aws-sdk/[email protected]':
- dependencies:
- '@aws-crypto/sha1-browser': 3.0.0
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sts': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/core': 3.549.0
- '@aws-sdk/credential-provider-node': 3.549.0
- '@aws-sdk/middleware-bucket-endpoint': 3.535.0
- '@aws-sdk/middleware-expect-continue': 3.535.0
- '@aws-sdk/middleware-flexible-checksums': 3.535.0
- '@aws-sdk/middleware-host-header': 3.535.0
- '@aws-sdk/middleware-location-constraint': 3.535.0
- '@aws-sdk/middleware-logger': 3.535.0
- '@aws-sdk/middleware-recursion-detection': 3.535.0
- '@aws-sdk/middleware-sdk-s3': 3.535.0
- '@aws-sdk/middleware-signing': 3.535.0
- '@aws-sdk/middleware-ssec': 3.537.0
- '@aws-sdk/middleware-user-agent': 3.540.0
- '@aws-sdk/region-config-resolver': 3.535.0
- '@aws-sdk/signature-v4-multi-region': 3.535.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-endpoints': 3.540.0
- '@aws-sdk/util-user-agent-browser': 3.535.0
- '@aws-sdk/util-user-agent-node': 3.535.0
- '@aws-sdk/xml-builder': 3.535.0
- '@smithy/config-resolver': 2.2.0
- '@smithy/core': 1.4.2
- '@smithy/eventstream-serde-browser': 2.2.0
- '@smithy/eventstream-serde-config-resolver': 2.2.0
- '@smithy/eventstream-serde-node': 2.2.0
- '@smithy/fetch-http-handler': 2.5.0
- '@smithy/hash-blob-browser': 2.2.0
- '@smithy/hash-node': 2.2.0
- '@smithy/hash-stream-node': 2.2.0
- '@smithy/invalid-dependency': 2.2.0
- '@smithy/md5-js': 2.2.0
- '@smithy/middleware-content-length': 2.2.0
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/middleware-retry': 2.3.1
- '@smithy/middleware-serde': 2.3.0
- '@smithy/middleware-stack': 2.2.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/node-http-handler': 2.5.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/url-parser': 2.2.0
- '@smithy/util-base64': 2.3.0
- '@smithy/util-body-length-browser': 2.2.0
- '@smithy/util-body-length-node': 2.3.0
- '@smithy/util-defaults-mode-browser': 2.2.0
- '@smithy/util-defaults-mode-node': 2.3.0
- '@smithy/util-endpoints': 1.2.0
- '@smithy/util-retry': 2.2.0
- '@smithy/util-stream': 2.2.0
+ '@aws-sdk/types': 3.609.0
'@smithy/util-utf8': 2.3.0
- '@smithy/util-waiter': 2.2.0
+ tslib: 2.6.3
+
+ '@aws-sdk/[email protected]':
+ dependencies:
+ '@aws-crypto/sha1-browser': 5.2.0
+ '@aws-crypto/sha256-browser': 5.2.0
+ '@aws-crypto/sha256-js': 5.2.0
+ '@aws-sdk/client-sso-oidc': 3.614.0(@aws-sdk/[email protected])
+ '@aws-sdk/client-sts': 3.614.0
+ '@aws-sdk/core': 3.614.0
+ '@aws-sdk/credential-provider-node': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
+ '@aws-sdk/middleware-bucket-endpoint': 3.614.0
+ '@aws-sdk/middleware-expect-continue': 3.609.0
+ '@aws-sdk/middleware-flexible-checksums': 3.614.0
+ '@aws-sdk/middleware-host-header': 3.609.0
+ '@aws-sdk/middleware-location-constraint': 3.609.0
+ '@aws-sdk/middleware-logger': 3.609.0
+ '@aws-sdk/middleware-recursion-detection': 3.609.0
+ '@aws-sdk/middleware-sdk-s3': 3.614.0
+ '@aws-sdk/middleware-signing': 3.609.0
+ '@aws-sdk/middleware-ssec': 3.609.0
+ '@aws-sdk/middleware-user-agent': 3.614.0
+ '@aws-sdk/region-config-resolver': 3.614.0
+ '@aws-sdk/signature-v4-multi-region': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-endpoints': 3.614.0
+ '@aws-sdk/util-user-agent-browser': 3.609.0
+ '@aws-sdk/util-user-agent-node': 3.614.0
+ '@aws-sdk/xml-builder': 3.609.0
+ '@smithy/config-resolver': 3.0.5
+ '@smithy/core': 2.2.6
+ '@smithy/eventstream-serde-browser': 3.0.4
+ '@smithy/eventstream-serde-config-resolver': 3.0.3
+ '@smithy/eventstream-serde-node': 3.0.4
+ '@smithy/fetch-http-handler': 3.2.1
+ '@smithy/hash-blob-browser': 3.1.2
+ '@smithy/hash-node': 3.0.3
+ '@smithy/hash-stream-node': 3.1.2
+ '@smithy/invalid-dependency': 3.0.3
+ '@smithy/md5-js': 3.0.3
+ '@smithy/middleware-content-length': 3.0.3
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/middleware-retry': 3.0.9
+ '@smithy/middleware-serde': 3.0.3
+ '@smithy/middleware-stack': 3.0.3
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/node-http-handler': 3.1.2
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/url-parser': 3.0.3
+ '@smithy/util-base64': 3.0.0
+ '@smithy/util-body-length-browser': 3.0.0
+ '@smithy/util-body-length-node': 3.0.0
+ '@smithy/util-defaults-mode-browser': 3.0.9
+ '@smithy/util-defaults-mode-node': 3.0.9
+ '@smithy/util-endpoints': 2.0.5
+ '@smithy/util-retry': 3.0.3
+ '@smithy/util-stream': 3.0.6
+ '@smithy/util-utf8': 3.0.0
+ '@smithy/util-waiter': 3.1.2
tslib: 2.6.3
transitivePeerDependencies:
- aws-crt
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sts': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/core': 3.549.0
- '@aws-sdk/credential-provider-node': 3.549.0
- '@aws-sdk/middleware-host-header': 3.535.0
- '@aws-sdk/middleware-logger': 3.535.0
- '@aws-sdk/middleware-recursion-detection': 3.535.0
- '@aws-sdk/middleware-user-agent': 3.540.0
- '@aws-sdk/region-config-resolver': 3.535.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-endpoints': 3.540.0
- '@aws-sdk/util-user-agent-browser': 3.535.0
- '@aws-sdk/util-user-agent-node': 3.535.0
- '@smithy/config-resolver': 2.2.0
- '@smithy/core': 1.4.2
- '@smithy/fetch-http-handler': 2.5.0
- '@smithy/hash-node': 2.2.0
- '@smithy/invalid-dependency': 2.2.0
- '@smithy/middleware-content-length': 2.2.0
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/middleware-retry': 2.3.1
- '@smithy/middleware-serde': 2.3.0
- '@smithy/middleware-stack': 2.2.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/node-http-handler': 2.5.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/url-parser': 2.2.0
- '@smithy/util-base64': 2.3.0
- '@smithy/util-body-length-browser': 2.2.0
- '@smithy/util-body-length-node': 2.3.0
- '@smithy/util-defaults-mode-browser': 2.2.0
- '@smithy/util-defaults-mode-node': 2.3.0
- '@smithy/util-endpoints': 1.2.0
- '@smithy/util-middleware': 2.2.0
- '@smithy/util-retry': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@aws-sdk/[email protected](@aws-sdk/[email protected])':
+ dependencies:
+ '@aws-crypto/sha256-browser': 5.2.0
+ '@aws-crypto/sha256-js': 5.2.0
+ '@aws-sdk/client-sts': 3.614.0
+ '@aws-sdk/core': 3.614.0
+ '@aws-sdk/credential-provider-node': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
+ '@aws-sdk/middleware-host-header': 3.609.0
+ '@aws-sdk/middleware-logger': 3.609.0
+ '@aws-sdk/middleware-recursion-detection': 3.609.0
+ '@aws-sdk/middleware-user-agent': 3.614.0
+ '@aws-sdk/region-config-resolver': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-endpoints': 3.614.0
+ '@aws-sdk/util-user-agent-browser': 3.609.0
+ '@aws-sdk/util-user-agent-node': 3.614.0
+ '@smithy/config-resolver': 3.0.5
+ '@smithy/core': 2.2.6
+ '@smithy/fetch-http-handler': 3.2.1
+ '@smithy/hash-node': 3.0.3
+ '@smithy/invalid-dependency': 3.0.3
+ '@smithy/middleware-content-length': 3.0.3
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/middleware-retry': 3.0.9
+ '@smithy/middleware-serde': 3.0.3
+ '@smithy/middleware-stack': 3.0.3
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/node-http-handler': 3.1.2
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/url-parser': 3.0.3
+ '@smithy/util-base64': 3.0.0
+ '@smithy/util-body-length-browser': 3.0.0
+ '@smithy/util-body-length-node': 3.0.0
+ '@smithy/util-defaults-mode-browser': 3.0.9
+ '@smithy/util-defaults-mode-node': 3.0.9
+ '@smithy/util-endpoints': 2.0.5
+ '@smithy/util-middleware': 3.0.3
+ '@smithy/util-retry': 3.0.3
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
transitivePeerDependencies:
- aws-crt
- '@aws-sdk/[email protected]':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/core': 3.549.0
- '@aws-sdk/middleware-host-header': 3.535.0
- '@aws-sdk/middleware-logger': 3.535.0
- '@aws-sdk/middleware-recursion-detection': 3.535.0
- '@aws-sdk/middleware-user-agent': 3.540.0
- '@aws-sdk/region-config-resolver': 3.535.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-endpoints': 3.540.0
- '@aws-sdk/util-user-agent-browser': 3.535.0
- '@aws-sdk/util-user-agent-node': 3.535.0
- '@smithy/config-resolver': 2.2.0
- '@smithy/core': 1.4.2
- '@smithy/fetch-http-handler': 2.5.0
- '@smithy/hash-node': 2.2.0
- '@smithy/invalid-dependency': 2.2.0
- '@smithy/middleware-content-length': 2.2.0
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/middleware-retry': 2.3.1
- '@smithy/middleware-serde': 2.3.0
- '@smithy/middleware-stack': 2.2.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/node-http-handler': 2.5.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/url-parser': 2.2.0
- '@smithy/util-base64': 2.3.0
- '@smithy/util-body-length-browser': 2.2.0
- '@smithy/util-body-length-node': 2.3.0
- '@smithy/util-defaults-mode-browser': 2.2.0
- '@smithy/util-defaults-mode-node': 2.3.0
- '@smithy/util-endpoints': 1.2.0
- '@smithy/util-middleware': 2.2.0
- '@smithy/util-retry': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@aws-sdk/[email protected]':
+ dependencies:
+ '@aws-crypto/sha256-browser': 5.2.0
+ '@aws-crypto/sha256-js': 5.2.0
+ '@aws-sdk/core': 3.614.0
+ '@aws-sdk/middleware-host-header': 3.609.0
+ '@aws-sdk/middleware-logger': 3.609.0
+ '@aws-sdk/middleware-recursion-detection': 3.609.0
+ '@aws-sdk/middleware-user-agent': 3.614.0
+ '@aws-sdk/region-config-resolver': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-endpoints': 3.614.0
+ '@aws-sdk/util-user-agent-browser': 3.609.0
+ '@aws-sdk/util-user-agent-node': 3.614.0
+ '@smithy/config-resolver': 3.0.5
+ '@smithy/core': 2.2.6
+ '@smithy/fetch-http-handler': 3.2.1
+ '@smithy/hash-node': 3.0.3
+ '@smithy/invalid-dependency': 3.0.3
+ '@smithy/middleware-content-length': 3.0.3
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/middleware-retry': 3.0.9
+ '@smithy/middleware-serde': 3.0.3
+ '@smithy/middleware-stack': 3.0.3
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/node-http-handler': 3.1.2
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/url-parser': 3.0.3
+ '@smithy/util-base64': 3.0.0
+ '@smithy/util-body-length-browser': 3.0.0
+ '@smithy/util-body-length-node': 3.0.0
+ '@smithy/util-defaults-mode-browser': 3.0.9
+ '@smithy/util-defaults-mode-node': 3.0.9
+ '@smithy/util-endpoints': 2.0.5
+ '@smithy/util-middleware': 3.0.3
+ '@smithy/util-retry': 3.0.3
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
transitivePeerDependencies:
- aws-crt
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
- dependencies:
- '@aws-crypto/sha256-browser': 3.0.0
- '@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/core': 3.549.0
- '@aws-sdk/credential-provider-node': 3.549.0
- '@aws-sdk/middleware-host-header': 3.535.0
- '@aws-sdk/middleware-logger': 3.535.0
- '@aws-sdk/middleware-recursion-detection': 3.535.0
- '@aws-sdk/middleware-user-agent': 3.540.0
- '@aws-sdk/region-config-resolver': 3.535.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-endpoints': 3.540.0
- '@aws-sdk/util-user-agent-browser': 3.535.0
- '@aws-sdk/util-user-agent-node': 3.535.0
- '@smithy/config-resolver': 2.2.0
- '@smithy/core': 1.4.2
- '@smithy/fetch-http-handler': 2.5.0
- '@smithy/hash-node': 2.2.0
- '@smithy/invalid-dependency': 2.2.0
- '@smithy/middleware-content-length': 2.2.0
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/middleware-retry': 2.3.1
- '@smithy/middleware-serde': 2.3.0
- '@smithy/middleware-stack': 2.2.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/node-http-handler': 2.5.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/url-parser': 2.2.0
- '@smithy/util-base64': 2.3.0
- '@smithy/util-body-length-browser': 2.2.0
- '@smithy/util-body-length-node': 2.3.0
- '@smithy/util-defaults-mode-browser': 2.2.0
- '@smithy/util-defaults-mode-node': 2.3.0
- '@smithy/util-endpoints': 1.2.0
- '@smithy/util-middleware': 2.2.0
- '@smithy/util-retry': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@aws-sdk/[email protected]':
+ dependencies:
+ '@aws-crypto/sha256-browser': 5.2.0
+ '@aws-crypto/sha256-js': 5.2.0
+ '@aws-sdk/client-sso-oidc': 3.614.0(@aws-sdk/[email protected])
+ '@aws-sdk/core': 3.614.0
+ '@aws-sdk/credential-provider-node': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
+ '@aws-sdk/middleware-host-header': 3.609.0
+ '@aws-sdk/middleware-logger': 3.609.0
+ '@aws-sdk/middleware-recursion-detection': 3.609.0
+ '@aws-sdk/middleware-user-agent': 3.614.0
+ '@aws-sdk/region-config-resolver': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-endpoints': 3.614.0
+ '@aws-sdk/util-user-agent-browser': 3.609.0
+ '@aws-sdk/util-user-agent-node': 3.614.0
+ '@smithy/config-resolver': 3.0.5
+ '@smithy/core': 2.2.6
+ '@smithy/fetch-http-handler': 3.2.1
+ '@smithy/hash-node': 3.0.3
+ '@smithy/invalid-dependency': 3.0.3
+ '@smithy/middleware-content-length': 3.0.3
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/middleware-retry': 3.0.9
+ '@smithy/middleware-serde': 3.0.3
+ '@smithy/middleware-stack': 3.0.3
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/node-http-handler': 3.1.2
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/url-parser': 3.0.3
+ '@smithy/util-base64': 3.0.0
+ '@smithy/util-body-length-browser': 3.0.0
+ '@smithy/util-body-length-node': 3.0.0
+ '@smithy/util-defaults-mode-browser': 3.0.9
+ '@smithy/util-defaults-mode-node': 3.0.9
+ '@smithy/util-endpoints': 2.0.5
+ '@smithy/util-middleware': 3.0.3
+ '@smithy/util-retry': 3.0.3
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
transitivePeerDependencies:
- aws-crt
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@smithy/core': 1.4.2
- '@smithy/protocol-http': 3.3.0
- '@smithy/signature-v4': 2.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
+ '@smithy/core': 2.2.6
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/signature-v4': 3.1.2
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
fast-xml-parser: 4.2.5
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/property-provider': 2.2.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/fetch-http-handler': 2.5.0
- '@smithy/node-http-handler': 2.5.0
- '@smithy/property-provider': 2.2.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/util-stream': 2.2.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/fetch-http-handler': 3.2.1
+ '@smithy/node-http-handler': 3.1.2
+ '@smithy/property-provider': 3.1.3
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/util-stream': 3.0.6
tslib: 2.6.3
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
- dependencies:
- '@aws-sdk/client-sts': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/credential-provider-env': 3.535.0
- '@aws-sdk/credential-provider-process': 3.535.0
- '@aws-sdk/credential-provider-sso': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/credential-provider-web-identity': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/types': 3.535.0
- '@smithy/credential-provider-imds': 2.3.0
- '@smithy/property-provider': 2.2.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
+ dependencies:
+ '@aws-sdk/client-sts': 3.614.0
+ '@aws-sdk/credential-provider-env': 3.609.0
+ '@aws-sdk/credential-provider-http': 3.614.0
+ '@aws-sdk/credential-provider-process': 3.614.0
+ '@aws-sdk/credential-provider-sso': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))
+ '@aws-sdk/credential-provider-web-identity': 3.609.0(@aws-sdk/[email protected])
+ '@aws-sdk/types': 3.609.0
+ '@smithy/credential-provider-imds': 3.1.4
+ '@smithy/property-provider': 3.1.3
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
transitivePeerDependencies:
- - '@aws-sdk/credential-provider-node'
+ - '@aws-sdk/client-sso-oidc'
- aws-crt
- '@aws-sdk/[email protected]':
- dependencies:
- '@aws-sdk/credential-provider-env': 3.535.0
- '@aws-sdk/credential-provider-http': 3.535.0
- '@aws-sdk/credential-provider-ini': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/credential-provider-process': 3.535.0
- '@aws-sdk/credential-provider-sso': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/credential-provider-web-identity': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/types': 3.535.0
- '@smithy/credential-provider-imds': 2.3.0
- '@smithy/property-provider': 2.2.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
+ dependencies:
+ '@aws-sdk/credential-provider-env': 3.609.0
+ '@aws-sdk/credential-provider-http': 3.614.0
+ '@aws-sdk/credential-provider-ini': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
+ '@aws-sdk/credential-provider-process': 3.614.0
+ '@aws-sdk/credential-provider-sso': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))
+ '@aws-sdk/credential-provider-web-identity': 3.609.0(@aws-sdk/[email protected])
+ '@aws-sdk/types': 3.609.0
+ '@smithy/credential-provider-imds': 3.1.4
+ '@smithy/property-provider': 3.1.3
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
transitivePeerDependencies:
+ - '@aws-sdk/client-sso-oidc'
+ - '@aws-sdk/client-sts'
- aws-crt
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/property-provider': 2.2.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
+ '@aws-sdk/[email protected](@aws-sdk/[email protected](@aws-sdk/[email protected]))':
dependencies:
- '@aws-sdk/client-sso': 3.549.0
- '@aws-sdk/token-providers': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/types': 3.535.0
- '@smithy/property-provider': 2.2.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/client-sso': 3.614.0
+ '@aws-sdk/token-providers': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))
+ '@aws-sdk/types': 3.609.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
transitivePeerDependencies:
- - '@aws-sdk/credential-provider-node'
+ - '@aws-sdk/client-sso-oidc'
- aws-crt
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
+ '@aws-sdk/[email protected](@aws-sdk/[email protected])':
dependencies:
- '@aws-sdk/client-sts': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/types': 3.535.0
- '@smithy/property-provider': 2.2.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/client-sts': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- transitivePeerDependencies:
- - '@aws-sdk/credential-provider-node'
- - aws-crt
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
+ '@aws-sdk/[email protected](@aws-sdk/[email protected])':
dependencies:
- '@aws-sdk/client-s3': 3.550.0
- '@smithy/abort-controller': 2.2.0
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/smithy-client': 2.5.1
+ '@aws-sdk/client-s3': 3.614.0
+ '@smithy/abort-controller': 3.1.1
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/smithy-client': 3.1.7
buffer: 5.6.0
events: 3.3.0
stream-browserify: 3.0.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-arn-parser': 3.535.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
- '@smithy/util-config-provider': 2.3.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-arn-parser': 3.568.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
+ '@smithy/util-config-provider': 3.0.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-crypto/crc32': 3.0.0
- '@aws-crypto/crc32c': 3.0.0
- '@aws-sdk/types': 3.535.0
- '@smithy/is-array-buffer': 2.2.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
- '@smithy/util-utf8': 2.3.0
+ '@aws-crypto/crc32': 5.2.0
+ '@aws-crypto/crc32c': 5.2.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/is-array-buffer': 3.0.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-arn-parser': 3.535.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/signature-v4': 2.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/util-config-provider': 2.3.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-arn-parser': 3.568.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/signature-v4': 3.1.2
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/util-config-provider': 3.0.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-arn-parser': 3.535.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/signature-v4': 2.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/util-config-provider': 2.3.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/signature-v4': 3.1.2
+ '@smithy/types': 3.3.0
+ '@smithy/util-middleware': 3.0.3
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/property-provider': 2.2.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/signature-v4': 2.3.0
- '@smithy/types': 2.12.0
- '@smithy/util-middleware': 2.2.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-endpoints': 3.614.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-endpoints': 3.540.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/types': 3.3.0
+ '@smithy/util-config-provider': 3.0.0
+ '@smithy/util-middleware': 3.0.3
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/types': 2.12.0
- '@smithy/util-config-provider': 2.3.0
- '@smithy/util-middleware': 2.2.0
+ '@aws-sdk/signature-v4-multi-region': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@aws-sdk/util-format-url': 3.609.0
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/signature-v4-multi-region': 3.552.0
- '@aws-sdk/types': 3.535.0
- '@aws-sdk/util-format-url': 3.535.0
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
+ '@aws-sdk/middleware-sdk-s3': 3.614.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/signature-v4': 3.1.2
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected](@aws-sdk/[email protected](@aws-sdk/[email protected]))':
dependencies:
- '@aws-sdk/middleware-sdk-s3': 3.535.0
- '@aws-sdk/types': 3.535.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/signature-v4': 2.3.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/client-sso-oidc': 3.614.0(@aws-sdk/[email protected])
+ '@aws-sdk/types': 3.609.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/middleware-sdk-s3': 3.552.0
- '@aws-sdk/types': 3.535.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/signature-v4': 2.3.0
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected](@aws-sdk/[email protected])':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/client-sso-oidc': 3.549.0(@aws-sdk/[email protected])
- '@aws-sdk/types': 3.535.0
- '@smithy/property-provider': 2.2.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
- tslib: 2.6.3
- transitivePeerDependencies:
- - '@aws-sdk/credential-provider-node'
- - aws-crt
-
- '@aws-sdk/[email protected]':
- dependencies:
- '@smithy/types': 2.12.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
+ '@aws-sdk/types': 3.609.0
+ '@smithy/types': 3.3.0
+ '@smithy/util-endpoints': 2.0.5
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/types': 2.12.0
- '@smithy/util-endpoints': 1.2.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/querystring-builder': 3.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/querystring-builder': 2.2.0
- '@smithy/types': 2.12.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- tslib: 2.6.3
-
- '@aws-sdk/[email protected]':
- dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/types': 3.3.0
bowser: 2.11.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- '@aws-sdk/types': 3.535.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/types': 2.12.0
+ '@aws-sdk/types': 3.609.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@aws-sdk/[email protected]':
+ '@aws-sdk/[email protected]':
dependencies:
- tslib: 2.6.3
-
- '@aws-sdk/[email protected]':
- dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
dependencies:
- '@babel/highlight': 7.24.7
+ '@babel/highlight': 7.24.5
picocolors: 1.0.1
@@ -11246,6 +11118,8 @@ snapshots:
'@babel/highlight': 7.24.7
picocolors: 1.0.1
+ '@babel/[email protected]': {}
+
'@babel/[email protected]': {}
@@ -11298,7 +11172,7 @@ snapshots:
dependencies:
- '@babel/types': 7.24.7
+ '@babel/types': 7.24.0
'@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25
jsesc: 2.5.2
@@ -11312,9 +11186,9 @@ snapshots:
dependencies:
- '@babel/compat-data': 7.24.7
- '@babel/helper-validator-option': 7.24.7
- browserslist: 4.23.1
+ '@babel/compat-data': 7.23.5
+ '@babel/helper-validator-option': 7.23.5
+ browserslist: 4.23.0
lru-cache: 5.1.1
semver: 6.3.1
@@ -11326,19 +11200,34 @@ snapshots:
lru-cache: 5.1.1
semver: 6.3.1
+ '@babel/[email protected]': {}
+
dependencies:
'@babel/types': 7.24.7
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/template': 7.24.0
+ '@babel/types': 7.24.0
+
dependencies:
'@babel/template': 7.24.7
'@babel/types': 7.24.7
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/types': 7.24.0
+
dependencies:
'@babel/types': 7.24.7
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/types': 7.24.0
+
dependencies:
'@babel/traverse': 7.24.7
@@ -11349,13 +11238,11 @@ snapshots:
dependencies:
'@babel/core': 7.24.3
- '@babel/helper-environment-visitor': 7.24.7
- '@babel/helper-module-imports': 7.24.7
- '@babel/helper-simple-access': 7.24.7
- '@babel/helper-split-export-declaration': 7.24.7
- '@babel/helper-validator-identifier': 7.24.7
- transitivePeerDependencies:
- - supports-color
+ '@babel/helper-environment-visitor': 7.22.20
+ '@babel/helper-module-imports': 7.22.15
+ '@babel/helper-simple-access': 7.22.5
+ '@babel/helper-split-export-declaration': 7.22.6
+ '@babel/helper-validator-identifier': 7.24.5
dependencies:
@@ -11370,6 +11257,10 @@ snapshots:
'@babel/[email protected]': {}
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/types': 7.24.0
+
dependencies:
'@babel/traverse': 7.24.7
@@ -11377,23 +11268,31 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/types': 7.24.0
+
dependencies:
'@babel/types': 7.24.7
+ '@babel/[email protected]': {}
+
'@babel/[email protected]': {}
'@babel/[email protected]': {}
'@babel/[email protected]': {}
+ '@babel/[email protected]': {}
+
'@babel/[email protected]': {}
dependencies:
- '@babel/template': 7.24.7
- '@babel/traverse': 7.24.7
- '@babel/types': 7.24.7
+ '@babel/template': 7.24.0
+ '@babel/traverse': 7.24.1
+ '@babel/types': 7.24.0
transitivePeerDependencies:
- supports-color
@@ -11402,6 +11301,13 @@ snapshots:
'@babel/template': 7.24.7
'@babel/types': 7.24.7
+ '@babel/[email protected]':
+ dependencies:
+ '@babel/helper-validator-identifier': 7.24.5
+ chalk: 2.4.2
+ js-tokens: 4.0.0
+ picocolors: 1.0.1
+
dependencies:
'@babel/helper-validator-identifier': 7.24.7
@@ -11411,80 +11317,80 @@ snapshots:
dependencies:
- '@babel/types': 7.24.7
+ '@babel/types': 7.24.0
dependencies:
'@babel/types': 7.24.7
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@babel/helper-plugin-utils': 7.24.0
@@ -11501,9 +11407,9 @@ snapshots:
dependencies:
- '@babel/code-frame': 7.24.7
- '@babel/parser': 7.24.7
- '@babel/types': 7.24.7
+ '@babel/code-frame': 7.24.2
+ '@babel/parser': 7.24.1
+ '@babel/types': 7.24.0
dependencies:
@@ -11513,14 +11419,14 @@ snapshots:
dependencies:
- '@babel/code-frame': 7.24.7
- '@babel/generator': 7.24.7
- '@babel/helper-environment-visitor': 7.24.7
- '@babel/helper-function-name': 7.24.7
- '@babel/helper-hoist-variables': 7.24.7
- '@babel/helper-split-export-declaration': 7.24.7
- '@babel/parser': 7.24.7
- '@babel/types': 7.24.7
+ '@babel/code-frame': 7.24.2
+ '@babel/generator': 7.24.1
+ '@babel/helper-environment-visitor': 7.22.20
+ '@babel/helper-function-name': 7.23.0
+ '@babel/helper-hoist-variables': 7.22.5
+ '@babel/helper-split-export-declaration': 7.22.6
+ '@babel/parser': 7.24.1
+ '@babel/types': 7.24.0
debug: 4.3.5([email protected])
globals: 11.12.0
transitivePeerDependencies:
@@ -11543,8 +11449,8 @@ snapshots:
dependencies:
- '@babel/helper-string-parser': 7.24.7
- '@babel/helper-validator-identifier': 7.24.7
+ '@babel/helper-string-parser': 7.23.4
+ '@babel/helper-validator-identifier': 7.24.5
to-fast-properties: 2.0.0
@@ -11584,11 +11490,11 @@ snapshots:
dependencies:
'@clickhouse/client-common': 1.4.0
- '@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])':
+ '@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])':
dependencies:
'@codemirror/language': 6.10.2
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
'@lezer/common': 1.2.1
'@codemirror/[email protected]':
@@ -11602,7 +11508,7 @@ snapshots:
dependencies:
'@codemirror/language': 6.10.2
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
'@lezer/common': 1.2.1
'@codemirror/[email protected]':
@@ -11622,7 +11528,7 @@ snapshots:
'@codemirror/[email protected]':
dependencies:
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
'@lezer/common': 1.2.1
'@lezer/highlight': 1.2.0
'@lezer/lr': 1.4.1
@@ -11637,13 +11543,13 @@ snapshots:
'@codemirror/[email protected]':
dependencies:
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
crelt: 1.0.6
'@codemirror/[email protected]':
dependencies:
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
crelt: 1.0.6
'@codemirror/[email protected]': {}
@@ -11652,7 +11558,7 @@ snapshots:
dependencies:
'@codemirror/language': 6.10.2
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
'@lezer/highlight': 1.2.0
'@codemirror/[email protected]':
@@ -11667,7 +11573,7 @@ snapshots:
style-mod: 4.1.2
w3c-keyname: 2.2.8
- '@codemirror/[email protected]':
+ '@codemirror/[email protected]':
dependencies:
'@codemirror/state': 6.4.1
style-mod: 4.1.2
@@ -12241,7 +12147,7 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@jest/types': 29.6.3
'@jridgewell/trace-mapping': 0.3.25
babel-plugin-istanbul: 6.1.1
@@ -12297,38 +12203,55 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.4.15
- '@langchain/[email protected]':
dependencies:
'@anthropic-ai/sdk': 0.21.1
- '@langchain/core': 0.1.61
fast-xml-parser: 4.3.6
zod: 3.23.8
zod-to-json-schema: 3.22.5([email protected])
transitivePeerDependencies:
- encoding
+ - langchain
+ - openai
- '@langchain/[email protected]':
+ dependencies:
+ '@anthropic-ai/sdk': 0.21.1
+ fast-xml-parser: 4.3.6
+ zod: 3.23.8
+ zod-to-json-schema: 3.22.5([email protected])
+ transitivePeerDependencies:
+ - encoding
+ - langchain
+ - openai
+
dependencies:
ansi-styles: 5.2.0
camelcase: 6.3.0
decamelize: 1.2.0
js-tiktoken: 1.0.12
- langsmith: 0.1.14
ml-distance: 4.0.1
mustache: 4.2.0
p-queue: 6.6.2
p-retry: 4.6.2
uuid: 9.0.1
zod: 3.23.8
- zod-to-json-schema: 3.22.5([email protected])
+ zod-to-json-schema: 3.23.1([email protected])
+ transitivePeerDependencies:
+ - langchain
+ - openai
dependencies:
ansi-styles: 5.2.0
camelcase: 6.3.0
decamelize: 1.2.0
js-tiktoken: 1.0.12
ml-distance: 4.0.1
mustache: 4.2.0
p-queue: 6.6.2
@@ -12340,19 +12263,103 @@ snapshots:
- langchain
- openai
- '@langchain/[email protected]':
+ dependencies:
+ ansi-styles: 5.2.0
+ camelcase: 6.3.0
+ decamelize: 1.2.0
+ js-tiktoken: 1.0.12
+ ml-distance: 4.0.1
+ mustache: 4.2.0
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 9.0.1
+ zod: 3.23.8
+ zod-to-json-schema: 3.23.1([email protected])
+ transitivePeerDependencies:
+ - langchain
+ - openai
+
dependencies:
- '@langchain/core': 0.1.61
+ ansi-styles: 5.2.0
+ camelcase: 6.3.0
+ decamelize: 1.2.0
+ js-tiktoken: 1.0.12
+ ml-distance: 4.0.1
+ mustache: 4.2.0
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 9.0.1
+ zod: 3.23.8
+ zod-to-json-schema: 3.23.1([email protected])
+ transitivePeerDependencies:
+ - langchain
+ - openai
+
+ dependencies:
+ ansi-styles: 5.2.0
+ camelcase: 6.3.0
+ decamelize: 1.2.0
+ js-tiktoken: 1.0.12
+ ml-distance: 4.0.1
+ mustache: 4.2.0
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 10.0.0
+ zod: 3.23.8
+ zod-to-json-schema: 3.23.1([email protected])
+ transitivePeerDependencies:
+ - langchain
+ - openai
+
+ dependencies:
+ ansi-styles: 5.2.0
+ camelcase: 6.3.0
+ decamelize: 1.2.0
+ js-tiktoken: 1.0.12
+ ml-distance: 4.0.1
+ mustache: 4.2.0
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 10.0.0
+ zod: 3.23.8
+ zod-to-json-schema: 3.23.1([email protected])
+ transitivePeerDependencies:
+ - langchain
+ - openai
+
+ dependencies:
+ js-tiktoken: 1.0.12
+ openai: 4.47.1
+ zod: 3.23.8
+ zod-to-json-schema: 3.22.5([email protected])
+ transitivePeerDependencies:
+ - encoding
+ - langchain
+
+ dependencies:
js-tiktoken: 1.0.12
openai: 4.47.1
zod: 3.23.8
zod-to-json-schema: 3.22.5([email protected])
transitivePeerDependencies:
- encoding
+ - langchain
dependencies:
js-tiktoken: 1.0.12
openai: 4.52.0
zod: 3.23.8
@@ -12361,9 +12368,28 @@ snapshots:
- encoding
- langchain
dependencies:
+ js-tiktoken: 1.0.12
+ openai: 4.52.0
+ zod: 3.23.8
+ zod-to-json-schema: 3.23.1([email protected])
+ transitivePeerDependencies:
+ - encoding
+ - langchain
+
+ dependencies:
+ js-tiktoken: 1.0.12
+ transitivePeerDependencies:
+ - langchain
+ - openai
+
+ dependencies:
js-tiktoken: 1.0.12
transitivePeerDependencies:
- langchain
@@ -12467,23 +12493,23 @@ snapshots:
optionalDependencies:
'@types/react': 18.2.79
- '@mui/[email protected]': {}
+ '@mui/[email protected]': {}
dependencies:
'@babel/runtime': 7.24.7
- '@mui/core-downloads-tracker': 5.16.0
+ '@mui/core-downloads-tracker': 5.15.19
'@mui/types': 7.2.14(@types/[email protected])
- '@mui/utils': 5.16.0(@types/[email protected])([email protected])
+ '@mui/utils': 5.15.20(@types/[email protected])([email protected])
'@types/react-transition-group': 4.4.10
clsx: 2.1.1
csstype: 3.1.3
prop-types: 15.8.1
react: 18.2.0
react-dom: 18.2.0([email protected])
- react-is: 18.3.1
+ react-is: 18.2.0
react-transition-group: 4.4.5([email protected]([email protected]))([email protected])
optionalDependencies:
'@emotion/react': 11.11.4(@types/[email protected])([email protected])
@@ -12499,15 +12525,6 @@ snapshots:
optionalDependencies:
'@types/react': 18.2.79
- dependencies:
- '@babel/runtime': 7.24.7
- '@mui/utils': 5.16.0(@types/[email protected])([email protected])
- prop-types: 15.8.1
- react: 18.2.0
- optionalDependencies:
- '@types/react': 18.2.79
-
dependencies:
'@babel/runtime': 7.24.7
@@ -12535,22 +12552,6 @@ snapshots:
'@emotion/styled': 11.11.5(@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected])
'@types/react': 18.2.79
- dependencies:
- '@babel/runtime': 7.24.7
- '@mui/private-theming': 5.16.0(@types/[email protected])([email protected])
- '@mui/types': 7.2.14(@types/[email protected])
- '@mui/utils': 5.16.0(@types/[email protected])([email protected])
- clsx: 2.1.1
- csstype: 3.1.3
- prop-types: 15.8.1
- react: 18.2.0
- optionalDependencies:
- '@emotion/react': 11.11.4(@types/[email protected])([email protected])
- '@emotion/styled': 11.11.5(@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected])
- '@types/react': 18.2.79
-
optionalDependencies:
'@types/react': 18.2.79
@@ -12561,27 +12562,17 @@ snapshots:
'@types/prop-types': 15.7.12
prop-types: 15.8.1
react: 18.2.0
- react-is: 18.3.1
+ react-is: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
- dependencies:
- '@babel/runtime': 7.24.7
- '@types/prop-types': 15.7.12
- prop-types: 15.8.1
- react: 18.2.0
- react-is: 18.3.1
- optionalDependencies:
- '@types/react': 18.2.79
-
dependencies:
'@babel/runtime': 7.24.7
'@emotion/react': 11.11.4(@types/[email protected])([email protected])
'@emotion/styled': 11.11.5(@emotion/[email protected](@types/[email protected])([email protected]))(@types/[email protected])([email protected])
'@mui/utils': 5.15.20(@types/[email protected])([email protected])
'@types/react-transition-group': 4.4.10
@@ -12600,8 +12591,6 @@ snapshots:
'@next/[email protected]': {}
- '@next/[email protected]': {}
-
dependencies:
glob: 10.3.10
@@ -12609,57 +12598,30 @@ snapshots:
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
optional: true
- optional: true
-
'@nicolo-ribaudo/[email protected]':
dependencies:
eslint-scope: 5.1.1
@@ -13172,11 +13134,11 @@ snapshots:
'@radix-ui/[email protected]':
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/[email protected]':
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
dependencies:
@@ -13270,7 +13232,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])
'@radix-ui/react-context': 1.0.1(@types/[email protected])([email protected])
@@ -13283,14 +13245,14 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
react: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
react: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
@@ -13320,14 +13282,14 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
react: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
dependencies:
- '@babel/runtime': 7.24.5
+ '@babel/runtime': 7.24.7
'@radix-ui/primitive': 1.0.1
'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])
@@ -13357,14 +13319,14 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.5
+ '@babel/runtime': 7.24.7
react: 18.2.0
optionalDependencies:
'@types/react': 18.2.79
dependencies:
- '@babel/runtime': 7.24.5
+ '@babel/runtime': 7.24.7
'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])
@@ -13398,7 +13360,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/react-use-layout-effect': 1.0.1(@types/[email protected])([email protected])
react: 18.2.0
optionalDependencies:
@@ -13416,7 +13378,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/primitive': 1.0.1
'@radix-ui/react-collection': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])
@@ -13486,7 +13448,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.5
+ '@babel/runtime': 7.24.7
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -13507,7 +13469,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -13517,7 +13479,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/primitive': 1.0.1
'@radix-ui/react-collection': 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])
@@ -13710,7 +13672,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])
react: 18.2.0
optionalDependencies:
@@ -13718,7 +13680,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.5
+ '@babel/runtime': 7.24.7
'@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])
react: 18.2.0
optionalDependencies:
@@ -13756,7 +13718,7 @@ snapshots:
dependencies:
- '@babel/runtime': 7.24.0
+ '@babel/runtime': 7.24.7
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -14060,7 +14022,7 @@ snapshots:
'@sentry/types': 8.13.0
'@sentry/utils': 8.13.0
dependencies:
'@opentelemetry/instrumentation-http': 0.52.1(@opentelemetry/[email protected])
'@rollup/plugin-commonjs': 26.0.1([email protected])
@@ -14071,14 +14033,14 @@ snapshots:
'@sentry/types': 8.13.0
'@sentry/utils': 8.13.0
'@sentry/vercel-edge': 8.13.0
- '@sentry/webpack-plugin': 2.20.1([email protected])
+ '@sentry/webpack-plugin': 2.20.1([email protected])
chalk: 3.0.0
resolve: 1.22.8
rollup: 3.29.4
stacktrace-parser: 0.1.10
optionalDependencies:
- webpack: 5.92.1
+ webpack: 5.91.0
transitivePeerDependencies:
- '@opentelemetry/api'
- '@opentelemetry/core'
@@ -14141,7 +14103,7 @@ snapshots:
'@sentry/types': 8.13.0
'@sentry/utils': 8.13.0
detect-libc: 2.0.3
- node-abi: 3.65.0
+ node-abi: 3.62.0
transitivePeerDependencies:
- supports-color
@@ -14166,12 +14128,12 @@ snapshots:
'@sentry/types': 8.13.0
'@sentry/utils': 8.13.0
dependencies:
'@sentry/bundler-plugin-core': 2.20.1
unplugin: 1.0.1
uuid: 9.0.1
- webpack: 5.92.1
+ webpack: 5.91.0
transitivePeerDependencies:
- encoding
- supports-color
@@ -14190,243 +14152,247 @@ snapshots:
dependencies:
'@sinonjs/commons': 3.0.1
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/util-base64': 2.3.0
+ '@smithy/util-base64': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/node-config-provider': 2.3.0
- '@smithy/types': 2.12.0
- '@smithy/util-config-provider': 2.3.0
- '@smithy/util-middleware': 2.2.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/types': 3.3.0
+ '@smithy/util-config-provider': 3.0.0
+ '@smithy/util-middleware': 3.0.3
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/middleware-retry': 2.3.1
- '@smithy/middleware-serde': 2.3.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/util-middleware': 2.2.0
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/middleware-retry': 3.0.9
+ '@smithy/middleware-serde': 3.0.3
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/util-middleware': 3.0.3
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/node-config-provider': 2.3.0
- '@smithy/property-provider': 2.2.0
- '@smithy/types': 2.12.0
- '@smithy/url-parser': 2.2.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/property-provider': 3.1.3
+ '@smithy/types': 3.3.0
+ '@smithy/url-parser': 3.0.3
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@aws-crypto/crc32': 3.0.0
- '@smithy/types': 2.12.0
- '@smithy/util-hex-encoding': 2.2.0
+ '@aws-crypto/crc32': 5.2.0
+ '@smithy/types': 3.3.0
+ '@smithy/util-hex-encoding': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/eventstream-serde-universal': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/eventstream-serde-universal': 3.0.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/eventstream-serde-universal': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/eventstream-serde-universal': 3.0.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/eventstream-codec': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/eventstream-codec': 3.1.2
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/protocol-http': 3.3.0
- '@smithy/querystring-builder': 2.2.0
- '@smithy/types': 2.12.0
- '@smithy/util-base64': 2.3.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/querystring-builder': 3.0.3
+ '@smithy/types': 3.3.0
+ '@smithy/util-base64': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/chunked-blob-reader': 2.2.0
- '@smithy/chunked-blob-reader-native': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/chunked-blob-reader': 3.0.0
+ '@smithy/chunked-blob-reader-native': 3.0.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
- '@smithy/util-buffer-from': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@smithy/types': 3.3.0
+ '@smithy/util-buffer-from': 3.0.0
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
- '@smithy/util-utf8': 2.3.0
+ '@smithy/types': 3.3.0
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
'@smithy/[email protected]':
dependencies:
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
- '@smithy/util-utf8': 2.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
+ dependencies:
+ '@smithy/types': 3.3.0
+ '@smithy/util-utf8': 3.0.0
+ tslib: 2.6.3
+
+ '@smithy/[email protected]':
dependencies:
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/middleware-serde': 2.3.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
- '@smithy/url-parser': 2.2.0
- '@smithy/util-middleware': 2.2.0
+ '@smithy/middleware-serde': 3.0.3
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
+ '@smithy/url-parser': 3.0.3
+ '@smithy/util-middleware': 3.0.3
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/node-config-provider': 2.3.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/service-error-classification': 2.1.5
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
- '@smithy/util-middleware': 2.2.0
- '@smithy/util-retry': 2.2.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/service-error-classification': 3.0.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
+ '@smithy/util-middleware': 3.0.3
+ '@smithy/util-retry': 3.0.3
tslib: 2.6.3
uuid: 9.0.1
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/property-provider': 2.2.0
- '@smithy/shared-ini-file-loader': 2.4.0
- '@smithy/types': 2.12.0
+ '@smithy/property-provider': 3.1.3
+ '@smithy/shared-ini-file-loader': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/abort-controller': 2.2.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/querystring-builder': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/abort-controller': 3.1.1
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/querystring-builder': 3.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
- '@smithy/util-uri-escape': 2.2.0
+ '@smithy/types': 3.3.0
+ '@smithy/util-uri-escape': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/is-array-buffer': 2.2.0
- '@smithy/types': 2.12.0
- '@smithy/util-hex-encoding': 2.2.0
- '@smithy/util-middleware': 2.2.0
- '@smithy/util-uri-escape': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@smithy/is-array-buffer': 3.0.0
+ '@smithy/types': 3.3.0
+ '@smithy/util-hex-encoding': 3.0.0
+ '@smithy/util-middleware': 3.0.3
+ '@smithy/util-uri-escape': 3.0.0
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/middleware-endpoint': 2.5.1
- '@smithy/middleware-stack': 2.2.0
- '@smithy/protocol-http': 3.3.0
- '@smithy/types': 2.12.0
- '@smithy/util-stream': 2.2.0
+ '@smithy/middleware-endpoint': 3.0.5
+ '@smithy/middleware-stack': 3.0.3
+ '@smithy/protocol-http': 4.0.3
+ '@smithy/types': 3.3.0
+ '@smithy/util-stream': 3.0.6
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/querystring-parser': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/querystring-parser': 3.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/util-buffer-from': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@smithy/util-buffer-from': 3.0.0
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
tslib: 2.6.3
@@ -14435,61 +14401,66 @@ snapshots:
'@smithy/is-array-buffer': 2.2.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
+ '@smithy/is-array-buffer': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/property-provider': 2.2.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
+ tslib: 2.6.3
+
+ '@smithy/[email protected]':
+ dependencies:
+ '@smithy/property-provider': 3.1.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
bowser: 2.11.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/config-resolver': 2.2.0
- '@smithy/credential-provider-imds': 2.3.0
- '@smithy/node-config-provider': 2.3.0
- '@smithy/property-provider': 2.2.0
- '@smithy/smithy-client': 2.5.1
- '@smithy/types': 2.12.0
+ '@smithy/config-resolver': 3.0.5
+ '@smithy/credential-provider-imds': 3.1.4
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/property-provider': 3.1.3
+ '@smithy/smithy-client': 3.1.7
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/node-config-provider': 2.3.0
- '@smithy/types': 2.12.0
+ '@smithy/node-config-provider': 3.1.4
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/types': 2.12.0
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/service-error-classification': 2.1.5
- '@smithy/types': 2.12.0
+ '@smithy/service-error-classification': 3.0.3
+ '@smithy/types': 3.3.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
- '@smithy/fetch-http-handler': 2.5.0
- '@smithy/node-http-handler': 2.5.0
- '@smithy/types': 2.12.0
- '@smithy/util-base64': 2.3.0
- '@smithy/util-buffer-from': 2.2.0
- '@smithy/util-hex-encoding': 2.2.0
- '@smithy/util-utf8': 2.3.0
+ '@smithy/fetch-http-handler': 3.2.1
+ '@smithy/node-http-handler': 3.1.2
+ '@smithy/types': 3.3.0
+ '@smithy/util-base64': 3.0.0
+ '@smithy/util-buffer-from': 3.0.0
+ '@smithy/util-hex-encoding': 3.0.0
+ '@smithy/util-utf8': 3.0.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
dependencies:
tslib: 2.6.3
@@ -14498,10 +14469,15 @@ snapshots:
'@smithy/util-buffer-from': 2.2.0
tslib: 2.6.3
- '@smithy/[email protected]':
+ '@smithy/[email protected]':
+ dependencies:
+ '@smithy/util-buffer-from': 3.0.0
+ tslib: 2.6.3
+
+ '@smithy/[email protected]':
dependencies:
- '@smithy/abort-controller': 2.2.0
- '@smithy/types': 2.12.0
+ '@smithy/abort-controller': 3.1.1
+ '@smithy/types': 3.3.0
tslib: 2.6.3
'@swc/[email protected]': {}
@@ -14653,30 +14629,30 @@ snapshots:
dependencies:
- '@types/node': 20.11.29
+ '@types/node': 20.14.8
'@types/[email protected]': {}
dependencies:
- '@babel/parser': 7.24.7
- '@babel/types': 7.24.7
+ '@babel/parser': 7.24.1
+ '@babel/types': 7.24.0
'@types/babel__generator': 7.6.8
'@types/babel__template': 7.4.4
'@types/babel__traverse': 7.20.5
dependencies:
- '@babel/types': 7.24.7
+ '@babel/types': 7.24.0
dependencies:
- '@babel/parser': 7.24.7
- '@babel/types': 7.24.7
+ '@babel/parser': 7.24.1
+ '@babel/types': 7.24.0
dependencies:
- '@babel/types': 7.24.7
+ '@babel/types': 7.24.0
'@types/[email protected]': {}
@@ -14687,7 +14663,7 @@ snapshots:
dependencies:
- '@types/node': 20.10.5
+ '@types/node': 20.14.8
dependencies:
@@ -14702,7 +14678,7 @@ snapshots:
'@types/connect': 3.4.38
'@types/express': 4.17.21
'@types/keygrip': 1.0.6
- '@types/node': 20.11.29
+ '@types/node': 20.14.8
dependencies:
@@ -14748,13 +14724,8 @@ snapshots:
dependencies:
- '@types/eslint': 8.56.10
- '@types/estree': 1.0.5
-
- '@types/[email protected]':
- dependencies:
+ '@types/eslint': 8.56.7
'@types/estree': 1.0.5
- '@types/json-schema': 7.0.15
dependencies:
@@ -14841,7 +14812,7 @@ snapshots:
'@types/http-errors': 2.0.4
'@types/keygrip': 1.0.6
'@types/koa-compose': 3.2.8
- '@types/node': 20.10.5
+ '@types/node': 20.14.8
dependencies:
@@ -14865,7 +14836,7 @@ snapshots:
dependencies:
- '@types/node': 20.10.5
+ '@types/node': 20.14.8
dependencies:
@@ -14906,7 +14877,7 @@ snapshots:
dependencies:
- '@types/pg': 8.6.1
+ '@types/pg': 8.11.6
dependencies:
@@ -14916,7 +14887,7 @@ snapshots:
dependencies:
- '@types/node': 20.11.29
+ '@types/node': 20.14.8
pg-protocol: 1.6.1
pg-types: 2.2.0
@@ -15256,52 +15227,52 @@ snapshots:
'@typescript-eslint/types': 7.3.1
eslint-visitor-keys: 3.4.3
- '@uiw/[email protected](@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected]))(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
+ '@uiw/[email protected](@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected]))(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
dependencies:
- '@codemirror/autocomplete': 6.17.0(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])
+ '@codemirror/autocomplete': 6.17.0(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])
'@codemirror/commands': 6.3.3
'@codemirror/language': 6.10.2
'@codemirror/lint': 6.8.0
'@codemirror/search': 6.5.6
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
- '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
+ '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
dependencies:
- '@uiw/codemirror-themes': 4.21.25(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
+ '@uiw/codemirror-themes': 4.21.25(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
transitivePeerDependencies:
- '@codemirror/language'
- '@codemirror/state'
- '@codemirror/view'
- '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
+ '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
dependencies:
- '@uiw/codemirror-themes': 4.22.2(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
+ '@uiw/codemirror-themes': 4.22.2(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
transitivePeerDependencies:
- '@codemirror/language'
- '@codemirror/state'
- '@codemirror/view'
- '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
+ '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
dependencies:
'@codemirror/language': 6.10.2
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
- '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
+ '@uiw/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])':
dependencies:
'@codemirror/language': 6.10.2
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
dependencies:
'@babel/runtime': 7.24.7
'@codemirror/commands': 6.3.3
'@codemirror/state': 6.4.1
'@codemirror/theme-one-dark': 6.1.2
- '@codemirror/view': 6.28.4
- '@uiw/codemirror-extensions-basic-setup': 4.21.25(@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected]))(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
+ '@codemirror/view': 6.28.0
+ '@uiw/codemirror-extensions-basic-setup': 4.21.25(@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected]))(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])
codemirror: 6.0.1(@lezer/[email protected])
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -15376,59 +15347,58 @@ snapshots:
loupe: 2.3.7
pretty-format: 29.7.0
dependencies:
'@babel/parser': 7.24.7
- '@vue/shared': 3.4.31
+ '@vue/shared': 3.4.27
entities: 4.5.0
estree-walker: 2.0.2
source-map-js: 1.2.0
dependencies:
- '@vue/compiler-core': 3.4.31
- '@vue/shared': 3.4.31
+ '@vue/compiler-core': 3.4.27
+ '@vue/shared': 3.4.27
dependencies:
'@babel/parser': 7.24.7
- '@vue/compiler-core': 3.4.31
- '@vue/compiler-dom': 3.4.31
- '@vue/compiler-ssr': 3.4.31
- '@vue/shared': 3.4.31
+ '@vue/compiler-core': 3.4.27
+ '@vue/compiler-dom': 3.4.27
+ '@vue/compiler-ssr': 3.4.27
+ '@vue/shared': 3.4.27
estree-walker: 2.0.2
magic-string: 0.30.10
postcss: 8.4.39
source-map-js: 1.2.0
dependencies:
- '@vue/compiler-dom': 3.4.31
- '@vue/shared': 3.4.31
+ '@vue/compiler-dom': 3.4.27
+ '@vue/shared': 3.4.27
dependencies:
- '@vue/shared': 3.4.31
+ '@vue/shared': 3.4.27
dependencies:
- '@vue/reactivity': 3.4.31
- '@vue/shared': 3.4.31
+ '@vue/reactivity': 3.4.27
+ '@vue/shared': 3.4.27
dependencies:
- '@vue/reactivity': 3.4.31
- '@vue/runtime-core': 3.4.31
- '@vue/shared': 3.4.31
+ '@vue/runtime-core': 3.4.27
+ '@vue/shared': 3.4.27
csstype: 3.1.3
dependencies:
- '@vue/compiler-ssr': 3.4.31
- '@vue/shared': 3.4.31
- vue: 3.4.31([email protected])
+ '@vue/compiler-ssr': 3.4.27
+ '@vue/shared': 3.4.27
+ vue: 3.4.27([email protected])
- '@vue/[email protected]': {}
+ '@vue/[email protected]': {}
'@webassemblyjs/[email protected]':
dependencies:
@@ -15527,21 +15497,16 @@ snapshots:
dependencies:
- acorn: 8.12.0
+ acorn: 8.11.3
acorn-walk: 8.3.2
- dependencies:
- acorn: 8.12.0
- optional: true
-
dependencies:
- acorn: 8.12.0
+ acorn: 8.11.3
dependencies:
- acorn: 8.12.1
+ acorn: 8.11.3
dependencies:
@@ -15551,10 +15516,6 @@ snapshots:
-
-
dependencies:
debug: 4.3.5([email protected])
@@ -15576,7 +15537,7 @@ snapshots:
clean-stack: 2.2.0
indent-string: 4.0.0
dependencies:
'@ai-sdk/provider': 0.0.0
'@ai-sdk/provider-utils': 0.0.1([email protected])
@@ -15589,13 +15550,13 @@ snapshots:
sswr: 2.0.0([email protected])
swr: 2.2.0([email protected])
swr-store: 0.10.6
zod-to-json-schema: 3.22.5([email protected])
optionalDependencies:
react: 18.2.0
solid-js: 1.8.18
svelte: 4.2.18
- vue: 3.4.31([email protected])
+ vue: 3.4.27([email protected])
zod: 3.23.8
@@ -15828,13 +15789,13 @@ snapshots:
dependencies:
dequal: 2.0.3
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@jest/transform': 29.7.0
'@types/babel__core': 7.20.5
babel-plugin-istanbul: 6.1.1
- babel-preset-jest: 29.6.3(@babel/[email protected])
+ babel-preset-jest: 29.6.3(@babel/[email protected])
chalk: 4.1.2
graceful-fs: 4.2.11
slash: 3.0.0
@@ -15853,8 +15814,8 @@ snapshots:
dependencies:
- '@babel/template': 7.24.7
- '@babel/types': 7.24.7
+ '@babel/template': 7.24.0
+ '@babel/types': 7.24.0
'@types/babel__core': 7.20.5
'@types/babel__traverse': 7.20.5
@@ -15864,27 +15825,27 @@ snapshots:
cosmiconfig: 7.1.0
resolve: 1.22.8
dependencies:
- '@babel/core': 7.24.7
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/[email protected])
- '@babel/plugin-syntax-bigint': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-class-properties': 7.12.13(@babel/[email protected])
- '@babel/plugin-syntax-import-meta': 7.10.4(@babel/[email protected])
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/[email protected])
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/[email protected])
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
- '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/[email protected])
-
+ '@babel/core': 7.24.3
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/[email protected])
+ '@babel/plugin-syntax-bigint': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-class-properties': 7.12.13(@babel/[email protected])
+ '@babel/plugin-syntax-import-meta': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/[email protected])
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
+ '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/[email protected])
+
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
babel-plugin-jest-hoist: 29.6.3
- babel-preset-current-node-syntax: 1.0.1(@babel/[email protected])
+ babel-preset-current-node-syntax: 1.0.1(@babel/[email protected])
dependencies:
@@ -15968,18 +15929,11 @@ snapshots:
dependencies:
- caniuse-lite: 1.0.30001636
+ caniuse-lite: 1.0.30001632
electron-to-chromium: 1.4.798
node-releases: 2.0.14
update-browserslist-db: 1.0.16([email protected])
- dependencies:
- caniuse-lite: 1.0.30001641
- electron-to-chromium: 1.4.823
- node-releases: 2.0.14
- update-browserslist-db: 1.1.0([email protected])
-
dependencies:
node-int64: 0.4.0
@@ -16065,9 +16019,7 @@ snapshots:
-
@@ -16170,7 +16122,8 @@ snapshots:
+ optional: true
dependencies:
@@ -16233,19 +16186,19 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
'@types/estree': 1.0.5
- acorn: 8.12.1
+ acorn: 8.11.3
estree-walker: 3.0.3
periscopic: 3.1.0
dependencies:
- '@codemirror/autocomplete': 6.17.0(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])
+ '@codemirror/autocomplete': 6.17.0(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])
'@codemirror/commands': 6.6.0
'@codemirror/language': 6.10.2
'@codemirror/lint': 6.8.1
'@codemirror/search': 6.5.6
'@codemirror/state': 6.4.1
- '@codemirror/view': 6.28.4
+ '@codemirror/view': 6.28.0
transitivePeerDependencies:
- '@lezer/common'
@@ -16327,7 +16280,7 @@ snapshots:
dependencies:
- browserslist: 4.23.1
+ browserslist: 4.23.0
@@ -16775,8 +16728,6 @@ snapshots:
-
@@ -16796,11 +16747,6 @@ snapshots:
graceful-fs: 4.2.11
tapable: 2.2.1
- dependencies:
- graceful-fs: 4.2.11
- tapable: 2.2.1
-
@@ -17193,14 +17139,14 @@ snapshots:
optionalDependencies:
dependencies:
eslint: 8.57.0
prettier: 3.2.5
prettier-linter-helpers: 1.0.0
synckit: 0.8.8
optionalDependencies:
- '@types/eslint': 8.56.10
+ '@types/eslint': 8.56.7
eslint-config-prettier: 9.1.0([email protected])
@@ -17279,7 +17225,7 @@ snapshots:
eslint: 8.57.0
optionalDependencies:
'@typescript-eslint/eslint-plugin': 7.3.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])
- vitest: 1.5.3
transitivePeerDependencies:
- supports-color
- typescript
@@ -18088,17 +18034,17 @@ snapshots:
dependencies:
- acorn: 8.12.0
- acorn-import-assertions: 1.9.0([email protected])
+ acorn: 8.11.3
+ acorn-import-assertions: 1.9.0([email protected])
cjs-module-lexer: 1.3.1
module-details-from-path: 1.0.3
optional: true
dependencies:
- acorn: 8.12.0
- acorn-import-attributes: 1.9.5([email protected])
- cjs-module-lexer: 1.3.1
+ acorn: 8.11.3
+ acorn-import-attributes: 1.9.5([email protected])
+ cjs-module-lexer: 1.2.3
module-details-from-path: 1.0.3
@@ -18412,8 +18358,8 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
- '@babel/parser': 7.24.7
+ '@babel/core': 7.24.3
+ '@babel/parser': 7.24.1
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.2
semver: 6.3.1
@@ -18422,8 +18368,8 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
- '@babel/parser': 7.24.7
+ '@babel/core': 7.24.3
+ '@babel/parser': 7.24.1
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.2
semver: 7.6.2
@@ -18549,10 +18495,10 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@jest/test-sequencer': 29.7.0
'@jest/types': 29.6.3
- babel-jest: 29.7.0(@babel/[email protected])
+ babel-jest: 29.7.0(@babel/[email protected])
chalk: 4.1.2
ci-info: 3.9.0
deepmerge: 4.3.1
@@ -18580,10 +18526,10 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@jest/test-sequencer': 29.7.0
'@jest/types': 29.6.3
- babel-jest: 29.7.0(@babel/[email protected])
+ babel-jest: 29.7.0(@babel/[email protected])
chalk: 4.1.2
ci-info: 3.9.0
deepmerge: 4.3.1
@@ -18611,10 +18557,10 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
+ '@babel/core': 7.24.3
'@jest/test-sequencer': 29.7.0
'@jest/types': 29.6.3
- babel-jest: 29.7.0(@babel/[email protected])
+ babel-jest: 29.7.0(@babel/[email protected])
chalk: 4.1.2
ci-info: 3.9.0
deepmerge: 4.3.1
@@ -18715,7 +18661,7 @@ snapshots:
dependencies:
- '@babel/code-frame': 7.24.7
+ '@babel/code-frame': 7.24.2
'@jest/types': 29.6.3
'@types/stack-utils': 2.0.3
chalk: 4.1.2
@@ -18811,15 +18757,15 @@ snapshots:
dependencies:
- '@babel/core': 7.24.7
- '@babel/generator': 7.24.7
- '@babel/plugin-syntax-jsx': 7.23.3(@babel/[email protected])
- '@babel/plugin-syntax-typescript': 7.23.3(@babel/[email protected])
- '@babel/types': 7.24.7
+ '@babel/core': 7.24.3
+ '@babel/generator': 7.24.1
+ '@babel/plugin-syntax-jsx': 7.23.3(@babel/[email protected])
+ '@babel/plugin-syntax-typescript': 7.23.3(@babel/[email protected])
+ '@babel/types': 7.24.0
'@jest/expect-utils': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
- babel-preset-current-node-syntax: 1.0.1(@babel/[email protected])
+ babel-preset-current-node-syntax: 1.0.1(@babel/[email protected])
chalk: 4.1.2
expect: 29.7.0
graceful-fs: 4.2.11
@@ -18941,7 +18887,7 @@ snapshots:
dependencies:
abab: 2.0.6
- acorn: 8.12.0
+ acorn: 8.11.3
acorn-globals: 7.0.1
cssom: 0.5.0
cssstyle: 2.3.0
@@ -19043,27 +18989,62 @@ snapshots:
dependencies:
binary-extensions: 2.3.0
js-tiktoken: 1.0.12
js-yaml: 4.1.0
jsonpointer: 5.0.1
langchainhub: 0.0.11
ml-distance: 4.0.1
openapi-types: 12.1.3
p-retry: 4.6.2
- uuid: 9.0.1
+ uuid: 10.0.0
+ yaml: 2.4.5
+ zod: 3.23.8
+ zod-to-json-schema: 3.23.1([email protected])
+ optionalDependencies:
+ '@aws-sdk/client-s3': 3.614.0
+ '@aws-sdk/credential-provider-node': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
+ axios: 1.6.8
+ fast-xml-parser: 4.3.6
+ handlebars: 4.7.8
+ html-to-text: 9.0.5
+ ignore: 5.3.1
+ ioredis: 5.4.1
+ jsdom: 20.0.3
+ playwright: 1.43.1
+ puppeteer: 19.11.1([email protected])
+ ws: 8.16.0
+ transitivePeerDependencies:
+ - encoding
+ - openai
+
+ dependencies:
+ binary-extensions: 2.3.0
+ js-tiktoken: 1.0.12
+ js-yaml: 4.1.0
+ jsonpointer: 5.0.1
+ langchainhub: 0.0.11
+ ml-distance: 4.0.1
+ openapi-types: 12.1.3
+ p-retry: 4.6.2
+ uuid: 10.0.0
yaml: 2.4.5
zod: 3.23.8
zod-to-json-schema: 3.23.1([email protected])
optionalDependencies:
- '@aws-sdk/client-s3': 3.550.0
- '@aws-sdk/credential-provider-node': 3.549.0
+ '@aws-sdk/client-s3': 3.614.0
+ '@aws-sdk/credential-provider-node': 3.614.0(@aws-sdk/[email protected](@aws-sdk/[email protected]))(@aws-sdk/[email protected])
axios: 1.6.8
fast-xml-parser: 4.3.6
handlebars: 4.7.8
@@ -19080,15 +19061,67 @@ snapshots:
+ dependencies:
+ '@types/uuid': 9.0.8
+ commander: 10.0.1
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 9.0.1
+ optionalDependencies:
+ openai: 4.47.1
+
+ dependencies:
+ '@types/uuid': 9.0.8
+ commander: 10.0.1
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 9.0.1
+ optionalDependencies:
+ openai: 4.52.0
+
+ dependencies:
+ '@types/uuid': 9.0.8
+ commander: 10.0.1
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 9.0.1
+ optionalDependencies:
+ openai: 4.47.1
+
+ dependencies:
+ '@types/uuid': 9.0.8
+ commander: 10.0.1
+ p-queue: 6.6.2
+ p-retry: 4.6.2
+ uuid: 9.0.1
+ optionalDependencies:
+ openai: 4.52.0
+
dependencies:
'@types/uuid': 9.0.8
commander: 10.0.1
p-queue: 6.6.2
p-retry: 4.6.2
uuid: 9.0.1
+ optionalDependencies:
+ openai: 4.52.0
dependencies:
'@types/uuid': 9.0.8
commander: 10.0.1
@@ -19096,8 +19129,8 @@ snapshots:
p-retry: 4.6.2
uuid: 9.0.1
optionalDependencies:
openai: 4.52.0
@@ -19237,7 +19270,7 @@ snapshots:
dependencies:
- '@jridgewell/sourcemap-codec': 1.4.15
+ '@jridgewell/sourcemap-codec': 1.5.0
dependencies:
@@ -19736,7 +19769,7 @@ snapshots:
dependencies:
- acorn: 8.12.0
+ acorn: 8.11.3
pathe: 1.1.2
pkg-types: 1.0.3
ufo: 1.5.2
@@ -19839,23 +19872,6 @@ snapshots:
optionalDependencies:
nodemailer: 6.9.13
- dependencies:
- '@babel/runtime': 7.24.5
- '@panva/hkdf': 1.1.1
- cookie: 0.5.0
- jose: 4.15.5
- oauth: 0.9.15
- openid-client: 5.6.5
- preact: 10.19.7
- preact-render-to-string: 5.2.6([email protected])
- react: 18.2.0
- react-dom: 18.2.0([email protected])
- uuid: 8.3.2
- optionalDependencies:
- nodemailer: 6.9.13
-
dependencies:
@@ -19895,34 +19911,7 @@ snapshots:
- '@babel/core'
- babel-plugin-macros
- dependencies:
- '@next/env': 14.2.5
- '@swc/helpers': 0.5.5
- busboy: 1.6.0
- caniuse-lite: 1.0.30001641
- graceful-fs: 4.2.11
- postcss: 8.4.31
- react: 18.2.0
- react-dom: 18.2.0([email protected])
- optionalDependencies:
- '@next/swc-darwin-arm64': 14.2.5
- '@next/swc-darwin-x64': 14.2.5
- '@next/swc-linux-arm64-gnu': 14.2.5
- '@next/swc-linux-arm64-musl': 14.2.5
- '@next/swc-linux-x64-gnu': 14.2.5
- '@next/swc-linux-x64-musl': 14.2.5
- '@next/swc-win32-arm64-msvc': 14.2.5
- '@next/swc-win32-ia32-msvc': 14.2.5
- '@next/swc-win32-x64-msvc': 14.2.5
- '@opentelemetry/api': 1.9.0
- '@playwright/test': 1.43.1
- transitivePeerDependencies:
- - '@babel/core'
- - babel-plugin-macros
-
dependencies:
semver: 7.6.2
@@ -20315,7 +20304,7 @@ snapshots:
dependencies:
- '@babel/code-frame': 7.24.7
+ '@babel/code-frame': 7.24.2
error-ex: 1.3.2
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
@@ -20654,7 +20643,7 @@ snapshots:
dependencies:
'@jest/schemas': 29.6.3
ansi-styles: 5.2.0
- react-is: 18.3.1
+ react-is: 18.2.0
@@ -20886,7 +20875,7 @@ snapshots:
dependencies:
@@ -21748,7 +21737,7 @@ snapshots:
'@jridgewell/sourcemap-codec': 1.5.0
'@jridgewell/trace-mapping': 0.3.25
'@types/estree': 1.0.5
- acorn: 8.12.1
+ acorn: 8.11.3
aria-query: 5.3.0
axobject-query: 4.0.0
code-red: 1.0.4
@@ -21770,9 +21759,9 @@ snapshots:
dependencies:
- vue: 3.4.31([email protected])
+ vue: 3.4.27([email protected])
@@ -21857,19 +21846,19 @@ snapshots:
ansi-escapes: 4.3.2
supports-hyperlinks: 2.3.0
dependencies:
'@jridgewell/trace-mapping': 0.3.25
jest-worker: 27.5.1
schema-utils: 3.3.0
serialize-javascript: 6.0.2
terser: 5.31.2
- webpack: 5.92.1
+ webpack: 5.91.0
dependencies:
'@jridgewell/source-map': 0.3.6
- acorn: 8.12.1
+ acorn: 8.11.3
commander: 2.20.3
source-map-support: 0.5.21
@@ -22206,7 +22195,7 @@ snapshots:
dependencies:
- acorn: 8.12.0
+ acorn: 8.11.3
chokidar: 3.6.0
webpack-sources: 3.2.3
webpack-virtual-modules: 0.5.0
@@ -22223,12 +22212,6 @@ snapshots:
escalade: 3.1.2
picocolors: 1.0.1
- dependencies:
- browserslist: 4.23.2
- escalade: 3.1.2
- picocolors: 1.0.1
-
dependencies:
boxen: 7.1.1
@@ -22284,6 +22267,8 @@ snapshots:
+
@@ -22417,38 +22402,6 @@ snapshots:
fsevents: 2.3.3
terser: 5.31.2
- dependencies:
- '@vitest/expect': 1.5.3
- '@vitest/runner': 1.5.3
- '@vitest/snapshot': 1.5.3
- '@vitest/spy': 1.5.3
- '@vitest/utils': 1.5.3
- acorn-walk: 8.3.2
- chai: 4.4.1
- debug: 4.3.4
- execa: 8.0.1
- local-pkg: 0.5.0
- magic-string: 0.30.10
- pathe: 1.1.2
- picocolors: 1.0.0
- std-env: 3.7.0
- strip-literal: 2.0.0
- tinybench: 2.6.0
- tinypool: 0.8.4
- vite: 5.2.11(@types/[email protected])([email protected])
- vite-node: 1.5.3(@types/[email protected])([email protected])
- why-is-node-running: 2.2.2
- transitivePeerDependencies:
- - less
- - lightningcss
- - sass
- - stylus
- - sugarss
- - supports-color
- - terser
- optional: true
-
dependencies:
'@vitest/expect': 1.5.3
@@ -22518,13 +22471,13 @@ snapshots:
- supports-color
- terser
dependencies:
- '@vue/compiler-dom': 3.4.31
- '@vue/compiler-sfc': 3.4.31
- '@vue/runtime-dom': 3.4.31
- '@vue/server-renderer': 3.4.31([email protected]([email protected]))
- '@vue/shared': 3.4.31
+ '@vue/compiler-dom': 3.4.27
+ '@vue/compiler-sfc': 3.4.27
+ '@vue/runtime-dom': 3.4.27
+ '@vue/server-renderer': 3.4.27([email protected]([email protected]))
+ '@vue/shared': 3.4.27
optionalDependencies:
typescript: 5.4.5
@@ -22559,18 +22512,18 @@ snapshots:
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.5
'@webassemblyjs/ast': 1.12.1
'@webassemblyjs/wasm-edit': 1.12.1
'@webassemblyjs/wasm-parser': 1.12.1
- acorn: 8.12.1
- acorn-import-attributes: 1.9.5([email protected])
- browserslist: 4.23.2
+ acorn: 8.11.3
+ acorn-import-assertions: 1.9.0([email protected])
+ browserslist: 4.23.1
chrome-trace-event: 1.0.4
- enhanced-resolve: 5.17.0
+ enhanced-resolve: 5.16.0
es-module-lexer: 1.5.4
eslint-scope: 5.1.1
events: 3.3.0
@@ -22582,7 +22535,7 @@ snapshots:
neo-async: 2.6.2
schema-utils: 3.3.0
tapable: 2.2.1
- terser-webpack-plugin: 5.3.10([email protected])
+ terser-webpack-plugin: 5.3.10([email protected])
watchpack: 2.4.1
webpack-sources: 3.2.3
transitivePeerDependencies:
diff --git a/web/package.json b/web/package.json
index 2c4122b985..b4baca8d0a 100644
--- a/web/package.json
+++ b/web/package.json
@@ -60,10 +60,9 @@
"@remixicon/react": "^4.2.0",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
- "@sentry/nextjs": "^8.13.0",
- "@sentry/node": "^8.13.0",
- "@sentry/profiling-node": "^8.13.0",
- "@sentry/types": "^8.13.0",
+ "@sentry/nextjs": "8.13.0",
+ "@sentry/node": "8.13.0",
+ "@sentry/profiling-node": "8.13.0",
"@t3-oss/env-nextjs": "^0.10.1",
"@tailwindcss/container-queries": "^0.1.1",
"@tanstack/react-query": "^4.36.1",
diff --git a/web/scripts/model-match.ts b/web/scripts/model-match.ts
index f8a34cb315..e527e4bb4d 100644
--- a/web/scripts/model-match.ts
+++ b/web/scripts/model-match.ts
@@ -5,10 +5,10 @@
import "dotenv/config";
-import { findModel } from "@/src/server/api/services/EventProcessor";
+import { findModel } from "@langfuse/shared/src/server";
import { prisma } from "@langfuse/shared/src/db";
import lodash from "lodash";
-import { tokenCount } from "@/src/features/ingest/lib/usage";
+import { tokenCount } from "@/src/features/ingest/usage";
import { type Prisma } from "@langfuse/shared/src/db";
async function main() {
diff --git a/web/src/__tests__/promptCache.servertest.ts b/web/src/__tests__/promptCache.servertest.ts
index db9e1255e4..1880b608ed 100644
--- a/web/src/__tests__/promptCache.servertest.ts
+++ b/web/src/__tests__/promptCache.servertest.ts
@@ -3,16 +3,6 @@ import { PromptService, type redis } from "@langfuse/shared/src/server"; // Adju
type Redis = NonNullable<typeof redis>;
-// Mocks
-jest.mock("@prisma/client");
-jest.mock("ioredis");
-jest.mock("@langfuse/shared", () => ({
- env: {
- LANGFUSE_CACHE_PROMPT_ENABLED: "true",
- LANGFUSE_CACHE_PROMPT_TTL_SECONDS: 300,
- },
-}));
-
describe("PromptService", () => {
let promptService: PromptService;
let mockPrisma: jest.Mocked<PrismaClient>;
diff --git a/web/src/__tests__/usage.servertest.ts b/web/src/__tests__/usage.servertest.ts
index 74e0978d0c..560d5cdd59 100644
--- a/web/src/__tests__/usage.servertest.ts
+++ b/web/src/__tests__/usage.servertest.ts
@@ -1,5 +1,5 @@
import { ModelUsageUnit } from "@langfuse/shared";
-import { tokenCount } from "@/src/features/ingest/lib/usage";
+import { tokenCount } from "@/src/features/ingest/usage";
describe("Token Count Functions", () => {
const generateModel = (model: string, tokenizer: string) => {
diff --git a/web/src/env.mjs b/web/src/env.mjs
index dc4af9f7e2..9bd52f6e5f 100644
--- a/web/src/env.mjs
+++ b/web/src/env.mjs
@@ -101,6 +101,10 @@ export const env = createEnv({
TURNSTILE_SECRET_KEY: z.string().optional(),
// DB event log
ENABLE_EVENT_LOG: z.enum(["true", "false"]).optional().default("true"),
+ // clickhouse
+ CLICKHOUSE_URL: z.string().optional(),
+ CLICKHOUSE_USER: z.string().optional(),
+ CLICKHOUSE_PASSWORD: z.string().optional(),
// EE License
LANGFUSE_EE_LICENSE_KEY: z.string().optional(),
ADMIN_API_KEY: z.string().optional(),
@@ -240,6 +244,10 @@ export const env = createEnv({
NEXT_PUBLIC_CRISP_WEBSITE_ID: process.env.NEXT_PUBLIC_CRISP_WEBSITE_ID,
// db event log
ENABLE_EVENT_LOG: process.env.ENABLE_EVENT_LOG,
+ // clickhouse
+ CLICKHOUSE_URL: process.env.CLICKHOUSE_URL,
+ CLICKHOUSE_USER: process.env.CLICKHOUSE_USER,
+ CLICKHOUSE_PASSWORD: process.env.CLICKHOUSE_PASSWORD,
// EE License
LANGFUSE_EE_LICENSE_KEY: process.env.LANGFUSE_EE_LICENSE_KEY,
ADMIN_API_KEY: process.env.ADMIN_API_KEY,
diff --git a/web/src/features/ingest/lib/usage.ts b/web/src/features/ingest/usage.ts
similarity index 74%
rename from web/src/features/ingest/lib/usage.ts
rename to web/src/features/ingest/usage.ts
index f7d9932469..0837155d76 100644
--- a/web/src/features/ingest/lib/usage.ts
+++ b/web/src/features/ingest/usage.ts
@@ -1,4 +1,3 @@
-import { isChatModel, isTiktokenModel } from "@/src/utils/types";
import { countTokens } from "@anthropic-ai/tokenizer";
import { type Model } from "@langfuse/shared";
import {
@@ -9,6 +8,87 @@ import {
} from "js-tiktoken";
import { z } from "zod";
+const chatModels = [
+ "gpt-4",
+ "gpt-4-0314",
+ "gpt-4-0613",
+ "gpt-4-32k",
+ "gpt-4-32k-0314",
+ "gpt-4-32k-0613",
+ "gpt-3.5-turbo",
+ "gpt-35-turbo",
+ "gpt-3.5-turbo-0301",
+ "gpt-3.5-turbo-0613",
+ "gpt-3.5-turbo-1106",
+ "gpt-3.5-turbo-16k",
+ "gpt-3.5-turbo-16k-0613",
+ "gpt-4-1106-preview",
+ "gpt-4-vision-preview",
+ "gpt-4o-2024-05-13",
+ "gpt-4o",
+];
+
+export type ChatModel = (typeof chatModels)[number];
+
+export const isChatModel = (model: string): model is ChatModel => {
+ return chatModels.includes(model);
+};
+
+export const isTiktokenModel = (model: string): model is TiktokenModel => {
+ return [
+ "davinci-002",
+ "babbage-002",
+ "text-davinci-003",
+ "text-davinci-002",
+ "text-davinci-001",
+ "text-curie-001",
+ "text-babbage-001",
+ "text-ada-001",
+ "davinci",
+ "curie",
+ "babbage",
+ "ada",
+ "code-davinci-002",
+ "code-davinci-001",
+ "code-cushman-002",
+ "code-cushman-001",
+ "davinci-codex",
+ "cushman-codex",
+ "text-davinci-edit-001",
+ "code-davinci-edit-001",
+ "text-embedding-ada-002",
+ "text-similarity-davinci-001",
+ "text-similarity-curie-001",
+ "text-similarity-babbage-001",
+ "text-similarity-ada-001",
+ "text-search-davinci-doc-001",
+ "text-search-curie-doc-001",
+ "text-search-babbage-doc-001",
+ "text-search-ada-doc-001",
+ "code-search-babbage-code-001",
+ "code-search-ada-code-001",
+ "gpt2",
+ "gpt-4",
+ "gpt-4-0314",
+ "gpt-4-0613",
+ "gpt-4-32k",
+ "gpt-4-32k-0314",
+ "gpt-4-32k-0613",
+ "gpt-3.5-turbo",
+ "gpt-35-turbo",
+ "gpt-3.5-turbo-0301",
+ "gpt-3.5-turbo-0613",
+ "gpt-3.5-turbo-1106",
+ "gpt-3.5-turbo-16k",
+ "gpt-3.5-turbo-16k-0613",
+ "gpt-4-1106-preview",
+ "gpt-4-vision-preview",
+ "gpt-4-turbo-2024-04-09",
+ "gpt-4o-2024-05-13",
+ "gpt-4o",
+ ].includes(model);
+};
+
const OpenAiTokenConfig = z.object({
tokenizerModel: z.string().refine(isTiktokenModel, {
message: "Unknown tiktoken model",
diff --git a/web/src/features/public-api/types/events.ts b/web/src/features/public-api/types/events.ts
index b15c058aef..3b6d6411ae 100644
--- a/web/src/features/public-api/types/events.ts
+++ b/web/src/features/public-api/types/events.ts
@@ -3,7 +3,7 @@ import {
CreateEventEvent,
eventTypes,
type ingestionApiSchema,
-} from "@langfuse/shared";
+} from "@langfuse/shared/src/server";
import { v4 as uuidv4 } from "uuid";
/**
diff --git a/web/src/features/public-api/types/generations.ts b/web/src/features/public-api/types/generations.ts
index b180ba7cd3..e0cce84b69 100644
--- a/web/src/features/public-api/types/generations.ts
+++ b/web/src/features/public-api/types/generations.ts
@@ -6,7 +6,7 @@ import {
LegacyGenerationPatchSchema,
eventTypes,
type ingestionApiSchema,
-} from "@langfuse/shared";
+} from "@langfuse/shared/src/server";
import { v4 as uuidv4 } from "uuid";
/**
diff --git a/web/src/features/public-api/types/metrics.ts b/web/src/features/public-api/types/metrics.ts
index 84e66b4820..f01a9b4a67 100644
--- a/web/src/features/public-api/types/metrics.ts
+++ b/web/src/features/public-api/types/metrics.ts
@@ -1,8 +1,5 @@
-import {
- paginationMetaResponseZod,
- paginationZod,
- stringDateTime,
-} from "@langfuse/shared";
+import { paginationMetaResponseZod, paginationZod } from "@langfuse/shared";
+import { stringDateTime } from "@langfuse/shared/src/server";
import { z } from "zod";
/**
diff --git a/web/src/features/public-api/types/observations.ts b/web/src/features/public-api/types/observations.ts
index e55f76353b..00717d75cb 100644
--- a/web/src/features/public-api/types/observations.ts
+++ b/web/src/features/public-api/types/observations.ts
@@ -2,8 +2,9 @@ import {
type ObservationView,
paginationMetaResponseZod,
paginationZod,
- stringDateTime,
} from "@langfuse/shared";
+
+import { stringDateTime } from "@langfuse/shared/src/server";
import { z } from "zod";
/**
diff --git a/web/src/features/public-api/types/scores.ts b/web/src/features/public-api/types/scores.ts
index 80c020cc1a..8e72029212 100644
--- a/web/src/features/public-api/types/scores.ts
+++ b/web/src/features/public-api/types/scores.ts
@@ -4,8 +4,9 @@ import {
paginationMetaResponseZod,
NonEmptyString,
type Score,
- stringDateTime,
} from "@langfuse/shared";
+import { stringDateTime } from "@langfuse/shared/src/server";
+
import { z } from "zod";
import { isPresent } from "@/src/utils/typeChecks";
import { Category as ConfigCategory } from "./score-configs";
diff --git a/web/src/features/public-api/types/sessions.ts b/web/src/features/public-api/types/sessions.ts
index 102aa87a6b..d98bf1ed9f 100644
--- a/web/src/features/public-api/types/sessions.ts
+++ b/web/src/features/public-api/types/sessions.ts
@@ -1,9 +1,7 @@
import { APITrace } from "@/src/features/public-api/types/traces";
-import {
- paginationMetaResponseZod,
- paginationZod,
- stringDateTime,
-} from "@langfuse/shared";
+import { paginationMetaResponseZod, paginationZod } from "@langfuse/shared";
+import { stringDateTime } from "@langfuse/shared/src/server";
+
import { z } from "zod";
/**
diff --git a/web/src/features/public-api/types/spans.ts b/web/src/features/public-api/types/spans.ts
index d6c9fe9f70..9cef52e7ed 100644
--- a/web/src/features/public-api/types/spans.ts
+++ b/web/src/features/public-api/types/spans.ts
@@ -4,7 +4,7 @@ import {
LegacySpanPostSchema,
eventTypes,
type ingestionApiSchema,
-} from "@langfuse/shared";
+} from "@langfuse/shared/src/server";
import { v4 } from "uuid";
/**
diff --git a/web/src/features/public-api/types/traces.ts b/web/src/features/public-api/types/traces.ts
index ff505bba21..73568a61d3 100644
--- a/web/src/features/public-api/types/traces.ts
+++ b/web/src/features/public-api/types/traces.ts
@@ -3,10 +3,9 @@ import { APIScore } from "@/src/features/public-api/types/scores";
import {
paginationZod,
paginationMetaResponseZod,
- stringDateTime,
orderBy,
- TraceBody,
} from "@langfuse/shared";
+import { stringDateTime, TraceBody } from "@langfuse/shared/src/server";
import { z } from "zod";
/**
diff --git a/web/src/pages/api/public/ingestion.ts b/web/src/pages/api/public/ingestion.ts
index f9e570e66a..65cfbca0b6 100644
--- a/web/src/pages/api/public/ingestion.ts
+++ b/web/src/pages/api/public/ingestion.ts
@@ -7,15 +7,17 @@ import { prisma } from "@langfuse/shared/src/db";
import { type NextApiRequest, type NextApiResponse } from "next";
import { z } from "zod";
import {
- type ingestionApiSchema,
- eventTypes,
- ingestionEvent,
type TraceUpsertEventType,
type EventBodyType,
EventName,
LangfuseNotFoundError,
InternalServerError,
} from "@langfuse/shared";
+import {
+ type ingestionApiSchema,
+ eventTypes,
+ ingestionEvent,
+} from "@langfuse/shared/src/server";
import { type ApiAccessScope } from "@/src/features/public-api/server/types";
import { persistEventMiddleware } from "@/src/server/api/services/event-service";
import { backOff } from "exponential-backoff";
@@ -43,6 +45,7 @@ import {
import { redis } from "@langfuse/shared/src/server";
import { isSigtermReceived } from "@/src/utils/shutdown";
+import { WorkerClient } from "@/src/server/api/services/WorkerClient";
export const config = {
api: {
@@ -241,10 +244,24 @@ export const handleBatch = async (
console.error("Error handling event:", error);
// Decide how to handle the error: rethrow, continue, or push an error object to results
// For example, push an error object:
- errors.push({ error: error, id: singleEvent.id, type: singleEvent.type });
+ errors.push({
+ error: error,
+ id: singleEvent.id,
+ type: singleEvent.type,
+ });
}
}
+ if (env.CLICKHOUSE_URL) {
+ await new WorkerClient()
+ .sendIngestionBatch({
+ batch: events,
+ metadata,
+ projectId: authCheck.scope.projectId,
+ })
+ .catch(); // Ignore errors while testing the ingestion via worker
+ }
+
return { results, errors };
};
diff --git a/web/src/pages/api/public/scores/index.ts b/web/src/pages/api/public/scores/index.ts
index e9eab0db62..44e9265196 100644
--- a/web/src/pages/api/public/scores/index.ts
+++ b/web/src/pages/api/public/scores/index.ts
@@ -1,6 +1,6 @@
import { prisma } from "@langfuse/shared/src/db";
import { Prisma } from "@langfuse/shared/src/db";
-import { eventTypes, ingestionBatchEvent } from "@langfuse/shared";
+import { eventTypes, ingestionBatchEvent } from "@langfuse/shared/src/server";
import { v4 } from "uuid";
import {
handleBatch,
diff --git a/web/src/pages/api/public/traces/index.ts b/web/src/pages/api/public/traces/index.ts
index 09a70949b1..d01582457e 100644
--- a/web/src/pages/api/public/traces/index.ts
+++ b/web/src/pages/api/public/traces/index.ts
@@ -12,7 +12,9 @@ import {
handleBatch,
parseSingleTypedIngestionApiResponse,
} from "@/src/pages/api/public/ingestion";
-import { type Trace, eventTypes } from "@langfuse/shared";
+import { type Trace } from "@langfuse/shared";
+import { eventTypes } from "@langfuse/shared/src/server";
+
import { v4 } from "uuid";
import { telemetry } from "@/src/features/telemetry";
import { tracesTableCols, orderByToPrismaSql } from "@langfuse/shared";
diff --git a/web/src/server/api/repositories/clickhouse.ts b/web/src/server/api/repositories/clickhouse.ts
new file mode 100644
index 0000000000..e96708aee2
--- /dev/null
+++ b/web/src/server/api/repositories/clickhouse.ts
@@ -0,0 +1,183 @@
+import {
+ parseJsonPrioritised,
+ type JsonNested,
+ type ObservationType,
+ type ObservationLevel,
+ type Trace,
+ type ObservationView,
+} from "@langfuse/shared";
+import {
+ clickhouseClient,
+ clickhouseStringDateSchema,
+ observationRecordReadSchema,
+ scoreRecordReadSchema,
+ traceRecordReadSchema,
+} from "@langfuse/shared/src/server";
+import Decimal from "decimal.js";
+import { z } from "zod";
+
+export const getObservation = async (
+ observationId: string,
+ projectId: string,
+) => {
+ const query = `SELECT * FROM observations FINAL WHERE id = '${observationId}' AND project_id = '${projectId}' LIMIT 1`;
+ const records = await queryClickhouse(query);
+
+ return records.length ? convertObservations(records)[0] : undefined;
+};
+
+export const getTraceObservations = async (
+ traceId: string,
+ projectId: string,
+) => {
+ const query = `SELECT * FROM observations FINAL where trace_id = '${traceId}' and project_id = '${projectId}'`;
+ const records = await queryClickhouse(query);
+
+ return convertObservations(records);
+};
+
+export const getTrace = async (traceId: string, projectId: string) => {
+ const query = `SELECT * FROM traces FINAL where id = '${traceId}' and project_id = '${projectId}' LIMIT 1`;
+ const records = await queryClickhouse(query);
+
+ return records.length ? convertTraces(records)[0] : undefined;
+};
+
+export const getScores = async (traceId: string, projectId: string) => {
+ const query = `SELECT * FROM scores FINAL where trace_id = '${traceId}' and project_id = '${projectId}'`;
+ const records = await queryClickhouse(query);
+ const parsedRecords = z.array(scoreRecordReadSchema).parse(records);
+
+ return parsedRecords.map((record) => {
+ return {
+ ...record,
+ projectId: record.project_id,
+ observationId: record.observation_id,
+ traceId: record.trace_id,
+ };
+ });
+};
+
+export const convertRecordToJsonSchema = (
+ record: Record<string, string>,
+): JsonNested | undefined => {
+ const jsonSchema: JsonNested = {};
+
+ // if record is empty, return undefined
+ if (Object.keys(record).length === 0) {
+ return undefined;
+ }
+
+ for (const key in record) {
+ try {
+ jsonSchema[key] = JSON.parse(record[key]);
+ } catch (e) {
+ jsonSchema[key] = record[key];
+ }
+ }
+
+ return jsonSchema;
+};
+
+async function queryClickhouse(query: string) {
+ return (
+ await clickhouseClient.query({ query, format: "JSONEachRow" })
+ ).json();
+}
+
+function convertObservations(jsonRecords: unknown[]): ObservationView[] {
+ const parsedRecord = z.array(observationRecordReadSchema).parse(jsonRecords);
+
+ const parsedObservations = parsedRecord.map((record) => {
+ const convertedRecord: ObservationView = {
+ id: record.id,
+ projectId: record.project_id,
+ traceId: record.trace_id ?? null,
+ parentObservationId: record.parent_observation_id ?? null,
+ type: record.type as ObservationType,
+ name: record.name ?? null,
+
+ level: record.level as ObservationLevel,
+ version: record.version ?? null,
+ model: record.provided_model_name ?? null,
+ input:
+ (record.input ? parseJsonPrioritised(record.input) : undefined) ?? null,
+ output:
+ (record.output ? parseJsonPrioritised(record.output) : undefined) ??
+ null,
+ unit: record.unit ?? null,
+
+ createdAt: new Date(record.created_at),
+ updatedAt: new Date(record.updated_at),
+ startTime: new Date(record.start_time),
+ endTime: record.end_time ? new Date(record.end_time) : null,
+
+ statusMessage: record.status_message ?? null,
+ modelParameters:
+ (record.model_parameters
+ ? parseJsonPrioritised(record.model_parameters)
+ : null) ?? null,
+ metadata: convertRecordToJsonSchema(record.metadata) ?? null,
+
+ completionStartTime: record.completion_start_time
+ ? new Date(
+ clickhouseStringDateSchema.parse(record.completion_start_time),
+ )
+ : null,
+
+ promptTokens: record.provided_input_usage_units ?? 0,
+ completionTokens: record.provided_output_usage_units ?? 0,
+ totalTokens: record.provided_total_usage_units ?? 0,
+
+ calculatedInputCost: new Decimal(record.input_cost ?? 0) || null,
+ calculatedOutputCost: new Decimal(record.output_cost ?? 0) || null,
+ calculatedTotalCost: new Decimal(record.total_cost ?? 0) || null,
+
+ promptId: record.prompt_id ?? null,
+ promptName: record.prompt_name ?? null,
+ promptVersion: record.prompt_version ?? null,
+
+ modelId: record.internal_model_id ?? null,
+ inputPrice: null,
+ outputPrice: null,
+ totalPrice: null,
+ latency: null,
+ timeToFirstToken: null,
+ };
+
+ return convertedRecord;
+ });
+
+ return parsedObservations;
+}
+
+export const convertTraces = (traces: unknown[]): Trace[] => {
+ const parsedRecord = z.array(traceRecordReadSchema).parse(traces);
+
+ return parsedRecord.map((record) => {
+ const convertedTrace: Trace = {
+ id: record.id,
+ timestamp: new Date(record.timestamp),
+ createdAt: new Date(record.created_at),
+ updatedAt: new Date(record.updated_at),
+ name: record.name ?? null,
+ release: record.release ?? null,
+ version: record.version ?? null,
+ bookmarked: record.bookmarked,
+ tags: record.tags,
+ input:
+ (record.input ? parseJsonPrioritised(record.input) : undefined) ?? null,
+ output:
+ (record.output ? parseJsonPrioritised(record.output) : undefined) ??
+ null,
+ projectId: record.project_id,
+ userId: record.user_id ?? null,
+ public: record.public,
+ sessionId: record.session_id ?? null,
+ metadata: convertRecordToJsonSchema(record.metadata) ?? null,
+ externalId: null,
+ };
+
+ return convertedTrace;
+ });
+};
diff --git a/web/src/server/api/services/EventProcessor.ts b/web/src/server/api/services/EventProcessor.ts
index 596dbaa481..4f07841571 100644
--- a/web/src/server/api/services/EventProcessor.ts
+++ b/web/src/server/api/services/EventProcessor.ts
@@ -1,28 +1,23 @@
-import { tokenCount } from "@/src/features/ingest/lib/usage";
+import { tokenCount } from "@/src/features/ingest/usage";
import { type ApiAccessScope } from "@/src/features/public-api/server/types";
+import { LangfuseNotFoundError, InvalidRequestError } from "@langfuse/shared";
import {
type legacyObservationCreateEvent,
eventTypes,
type scoreEvent,
- type eventCreateEvent,
- type spanCreateEvent,
type generationCreateEvent,
- type spanUpdateEvent,
- type generationUpdateEvent,
- type legacyObservationUpdateEvent,
type sdkLogEvent,
type traceEvent,
- LangfuseNotFoundError,
- InvalidRequestError,
-} from "@langfuse/shared";
+} from "@langfuse/shared/src/server";
import { ScoreDataType, prisma } from "@langfuse/shared/src/db";
+import { type ObservationEvent, findModel } from "@langfuse/shared/src/server";
import { ResourceNotFoundError } from "@/src/utils/exceptions";
import { mergeJson } from "@langfuse/shared";
import {
type Trace,
type Observation,
type Score,
- Prisma,
+ type Prisma,
type Model,
} from "@langfuse/shared/src/db";
import { v4 } from "uuid";
@@ -46,76 +41,6 @@ export interface EventProcessor {
): Promise<Trace | Observation | Score> | undefined;
}
-export async function findModel(p: {
- event: {
- projectId: string;
- model?: string;
- unit?: string;
- startTime?: Date;
- };
- existingDbObservation?: Observation;
-}): Promise<Model | null> {
- const { event, existingDbObservation } = p;
- // either get the model from the existing observation
- // or match pattern on the user provided model name
- const modelCondition = event.model
- ? Prisma.sql`AND ${event.model} ~ match_pattern`
- : existingDbObservation?.internalModel
- ? Prisma.sql`AND model_name = ${existingDbObservation.internalModel}`
- : undefined;
- if (!modelCondition) return null;
-
- // unit based on the current event or the existing observation, both can be undefined
- const mergedUnit = event.unit ?? existingDbObservation?.unit;
-
- const unitCondition = mergedUnit
- ? Prisma.sql`AND unit = ${mergedUnit}`
- : Prisma.empty;
-
- const sql = Prisma.sql`
- SELECT
- id,
- created_at AS "createdAt",
- updated_at AS "updatedAt",
- project_id AS "projectId",
- model_name AS "modelName",
- match_pattern AS "matchPattern",
- start_date AS "startDate",
- input_price AS "inputPrice",
- output_price AS "outputPrice",
- total_price AS "totalPrice",
- unit,
- tokenizer_id AS "tokenizerId",
- tokenizer_config AS "tokenizerConfig"
- FROM
- models
- WHERE (project_id = ${event.projectId}
- OR project_id IS NULL)
- ${modelCondition}
- ${unitCondition}
- AND (start_date IS NULL OR start_date <= ${
- event.startTime ? new Date(event.startTime) : new Date()
- }::timestamp with time zone at time zone 'UTC')
- ORDER BY
- project_id ASC,
- start_date DESC NULLS LAST
- LIMIT 1
- `;
-
- const foundModels = await prisma.$queryRaw<Array<Model>>(sql);
-
- return foundModels[0] ?? null;
-}
-
-type ObservationEvent =
- | z.infer<typeof legacyObservationCreateEvent>
- | z.infer<typeof legacyObservationUpdateEvent>
- | z.infer<typeof eventCreateEvent>
- | z.infer<typeof spanCreateEvent>
- | z.infer<typeof spanUpdateEvent>
- | z.infer<typeof generationCreateEvent>
- | z.infer<typeof generationUpdateEvent>;
-
export class ObservationProcessor implements EventProcessor {
event: ObservationEvent;
diff --git a/web/src/server/api/services/WorkerClient.ts b/web/src/server/api/services/WorkerClient.ts
index ae73c5ccd6..a812169fbf 100644
--- a/web/src/server/api/services/WorkerClient.ts
+++ b/web/src/server/api/services/WorkerClient.ts
@@ -1,14 +1,14 @@
import { env } from "@/src/env.mjs";
import { type EventBodyType } from "@langfuse/shared";
+import { type IngestionApiSchemaWithProjectId } from "@langfuse/shared/src/server";
+import { instrumentAsync } from "@/src/utils/instrumentation";
export class WorkerClient {
readonly enabled: boolean;
constructor() {
this.enabled = Boolean(
- env.LANGFUSE_WORKER_HOST &&
- env.LANGFUSE_WORKER_PASSWORD &&
- env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION,
+ env.LANGFUSE_WORKER_HOST && env.LANGFUSE_WORKER_PASSWORD,
);
if (!this.enabled) {
@@ -19,8 +19,36 @@ export class WorkerClient {
async sendEvent(event: EventBodyType): Promise<void> {
if (!this.enabled) return;
- await fetch(`${env.LANGFUSE_WORKER_HOST}/api/events`, {
+ await this.sendWorkerRequest({
method: "POST",
+ route: "/api/events",
+ body: event,
+ }).catch((error) => {
+ console.error("Error sending events to worker", error);
+ });
+ }
+
+ async sendIngestionBatch(params: IngestionApiSchemaWithProjectId) {
+ await instrumentAsync({ name: "insert-clickhouse" }, async () => {
+ await this.sendWorkerRequest({
+ method: "POST",
+ route: "/api/ingestion",
+ body: params,
+ }).catch((error) => {
+ console.error("Error sending events to worker", error);
+ });
+ });
+ }
+
+ private async sendWorkerRequest(params: {
+ route: string;
+ method: "POST";
+ body: any;
+ }) {
+ const { route, method, body } = params;
+
+ return fetch(env.LANGFUSE_WORKER_HOST + route, {
+ method,
headers: {
"Content-Type": "application/json",
Authorization:
@@ -29,9 +57,7 @@ export class WorkerClient {
"base64",
),
},
- body: JSON.stringify(event),
- }).catch((error) => {
- console.error("Error sending events to worker", error);
+ body: JSON.stringify(body),
});
}
}
diff --git a/web/src/utils/instrumentation.ts b/web/src/utils/instrumentation.ts
index 8efa4c9164..b6eb40205b 100644
--- a/web/src/utils/instrumentation.ts
+++ b/web/src/utils/instrumentation.ts
@@ -22,7 +22,9 @@ export async function instrumentAsync<T>(
): Promise<T> {
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
return Sentry.startSpan(ctx, async (span) => {
- return callback(span);
+ const result = await callback(span);
+ span?.end();
+ return result;
});
} else {
return callback();
diff --git a/worker/.eslintrc.js b/worker/.eslintrc.js
index 15ec24a23d..71d1424720 100644
--- a/worker/.eslintrc.js
+++ b/worker/.eslintrc.js
@@ -5,4 +5,5 @@ module.exports = {
parserOptions: {
project: true,
},
+ ignorePatterns: ["**/*test*.*"],
};
diff --git a/worker/package.json b/worker/package.json
index cd47b53997..7bb298be94 100644
--- a/worker/package.json
+++ b/worker/package.json
@@ -8,7 +8,7 @@
"node": "20"
},
"scripts": {
- "test": "dotenv -e ../.env -- vitest run --reporter=basic --pool=forks",
+ "test": "dotenv -e ../.env -- vitest run --reporter=basic --pool=forks --poolOptions.forks.singleFork=true",
"coverage": "vitest run --coverage",
"start": "dotenv -e ../.env -- node dist/index.js",
"build": "tsc",
@@ -21,8 +21,8 @@
"@anthropic-ai/tokenizer": "^0.0.4",
"@clickhouse/client": "^1.4.0",
"@langfuse/shared": "workspace:*",
- "@sentry/node": "^8.13.0",
- "@sentry/profiling-node": "^8.13.0",
+ "@sentry/node": "8.13.0",
+ "@sentry/profiling-node": "8.13.0",
"backoff": "^2.5.0",
"bullmq": "^5.4.2",
"cors": "^2.8.5",
@@ -54,6 +54,7 @@
"@types/lodash": "^4.17.5",
"@types/node": "^20.11.19",
"@types/pg": "^8.11.6",
+ "@types/uuid": "^9.0.8",
"@typescript-eslint/parser": "^7.12.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
diff --git a/worker/src/__tests__/utils.ts b/worker/src/__tests__/utils.ts
index 848f536ab8..a8ba245256 100644
--- a/worker/src/__tests__/utils.ts
+++ b/worker/src/__tests__/utils.ts
@@ -1,7 +1,13 @@
import { prisma } from "@langfuse/shared/src/db";
+
+import { env } from "../env";
import logger from "../logger";
export const pruneDatabase = async () => {
+ if (!env.DATABASE_URL.includes("localhost:5432")) {
+ throw new Error("You cannot prune database unless running on localhost.");
+ }
+
logger.info("Pruning database");
await prisma.score.deleteMany();
await prisma.observation.deleteMany();
diff --git a/worker/src/api/index.ts b/worker/src/api/index.ts
index a5a4dd180b..e80ac544d2 100644
--- a/worker/src/api/index.ts
+++ b/worker/src/api/index.ts
@@ -1,16 +1,24 @@
import express from "express";
import basicAuth from "express-basic-auth";
-import * as Sentry from "@sentry/node";
+
import { EventBodySchema, EventName, QueueJobs } from "@langfuse/shared";
+import { prisma } from "@langfuse/shared/src/db";
import {
+ clickhouseClient,
convertTraceUpsertEventsToRedisEvents,
getTraceUpsertQueue,
+ ingestionApiSchemaWithProjectId,
+ redis,
} from "@langfuse/shared/src/server";
+import * as Sentry from "@sentry/node";
+
import { env } from "../env";
+import { checkContainerHealth } from "../features/health";
import logger from "../logger";
import { batchExportQueue } from "../queues/batchExportQueue";
-import { checkContainerHealth } from "../features/health";
-import { clickhouseClient } from "@langfuse/shared/src/server";
+import { ingestionFlushQueue } from "../queues/ingestionFlushQueue";
+import { ClickhouseWriter } from "../services/ClickhouseWriter";
+import { IngestionService } from "../services/IngestionService";
const router = express.Router();
@@ -111,7 +119,7 @@ router
});
}
- return res.status(400);
+ return res.status(400).send();
} catch (e) {
logger.error(e, "Error processing events");
Sentry.captureException(e);
@@ -121,4 +129,51 @@ router
}
});
+router
+ .use(
+ basicAuth({
+ users: { admin: env.LANGFUSE_WORKER_PASSWORD },
+ })
+ )
+ .post("/ingestion", async (req, res) => {
+ try {
+ if (!redis) {
+ throw new Error("Redis connection not available");
+ }
+
+ const { body } = req;
+ const events = ingestionApiSchemaWithProjectId.safeParse(body);
+
+ if (!events.success) {
+ logger.error(events.error, "Failed to parse ingestion event");
+
+ return res.status(400).json(events.error);
+ }
+
+ const { batch, projectId } = events.data;
+
+ if (!ingestionFlushQueue) {
+ throw Error("Ingestion flush queue not available");
+ }
+
+ await new IngestionService(
+ redis,
+ prisma,
+ ingestionFlushQueue,
+ ClickhouseWriter.getInstance(),
+ clickhouseClient,
+ env.LANGFUSE_INGESTION_BUFFER_TTL_SECONDS // TODO: Make this configurable,
+ ).addBatch(batch, projectId);
+
+ return res.status(200).send();
+ } catch (e) {
+ logger.error(e, "Failed to process ingestion event");
+
+ if (!res.headersSent)
+ return res
+ .status(500)
+ .json({ message: e instanceof Error ? e.message : undefined });
+ }
+ });
+
export default router;
diff --git a/worker/src/app.ts b/worker/src/app.ts
index ab8dd752a5..8fa5c971c5 100644
--- a/worker/src/app.ts
+++ b/worker/src/app.ts
@@ -12,7 +12,11 @@ import logger from "./logger";
import { evalJobCreator, evalJobExecutor } from "./queues/evalQueue";
import { batchExportJobExecutor } from "./queues/batchExportQueue";
+import { flushIngestionQueueExecutor } from "./queues/ingestionFlushQueue";
import { repeatQueueExecutor } from "./queues/repeatQueue";
+import { logQueueWorkerError } from "./utils/logQueueWorkerError";
+import { onShutdown } from "./utils/shutdown";
+
import helmet from "helmet";
const app = express();
@@ -41,30 +45,18 @@ logger.info(
batchExportJobExecutor?.isRunning()
);
logger.info("Repeat Queue Executor started", repeatQueueExecutor?.isRunning());
+logger.info(
+ "Flush Ingestion Queue Executor started",
+ flushIngestionQueueExecutor?.isRunning()
+);
-evalJobCreator?.on("failed", (job, err) => {
- logger.error(err, `Eval Job with id ${job?.id} failed with error ${err}`);
-});
-
-evalJobExecutor?.on("failed", (job, err) => {
- logger.error(
- err,
- `Eval execution Job with id ${job?.id} failed with error ${err}`
- );
-});
-
-batchExportJobExecutor?.on("failed", (job, err) => {
- logger.error(
- err,
- `Batch Export Job with id ${job?.id} failed with error ${err}`
- );
-});
+evalJobCreator?.on("failed", logQueueWorkerError);
+evalJobExecutor?.on("failed", logQueueWorkerError);
+batchExportJobExecutor?.on("failed", logQueueWorkerError);
+repeatQueueExecutor?.on("failed", logQueueWorkerError);
+flushIngestionQueueExecutor?.on("failed", logQueueWorkerError);
-repeatQueueExecutor?.on("failed", (job, err) => {
- logger.error(
- err,
- `Repeat Queue Job with id ${job?.id} failed with error ${err}`
- );
-});
+process.on("SIGINT", () => onShutdown("SIGINT"));
+process.on("SIGTERM", () => onShutdown("SIGTERM"));
export default app;
diff --git a/worker/src/env.ts b/worker/src/env.ts
index cac012c4bc..f86bd2e78a 100644
--- a/worker/src/env.ts
+++ b/worker/src/env.ts
@@ -28,6 +28,34 @@ const EnvSchema = z.object({
EMAIL_FROM_ADDRESS: z.string().optional(),
SMTP_CONNECTION_URL: z.string().optional(),
LANGFUSE_TRACING_SAMPLE_RATE: z.coerce.number().positive().default(0.5),
+ LANGFUSE_INGESTION_BUFFER_TTL_SECONDS: z.coerce
+ .number()
+ .positive()
+ .default(60 * 10),
+ LANGFUSE_INGESTION_FLUSH_DELAY_MS: z.coerce
+ .number()
+ .nonnegative()
+ .default(10000),
+ LANGFUSE_INGESTION_FLUSH_ATTEMPTS: z.coerce.number().positive().default(3),
+ LANGFUSE_INGESTION_FLUSH_PROCESSING_CONCURRENCY: z.coerce
+ .number()
+ .positive()
+ .default(50),
+ LANGFUSE_INGESTION_CLICKHOUSE_WRITE_BATCH_SIZE: z.coerce
+ .number()
+ .positive()
+ .default(1000),
+ LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS: z.coerce
+ .number()
+ .positive()
+ .default(3000),
+ LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS: z.coerce
+ .number()
+ .positive()
+ .default(3),
+ LANGFUSE_LOG_LEVEL: z
+ .enum(["trace", "debug", "info", "warn", "error", "fatal"])
+ .optional(),
REDIS_HOST: z.string().nullish(),
REDIS_PORT: z.coerce
.number({
diff --git a/worker/src/index.ts b/worker/src/index.ts
index 903d38b4c6..aa01d68a79 100644
--- a/worker/src/index.ts
+++ b/worker/src/index.ts
@@ -3,34 +3,6 @@ import app from "./app";
import { env } from "./env";
import logger from "./logger";
-import { evalJobCreator, evalJobExecutor } from "./queues/evalQueue";
-import { batchExportJobExecutor } from "./queues/batchExportQueue";
-import { setSigtermReceived } from "./features/health";
-import { redis } from "@langfuse/shared/src/server";
-
-const server = app.listen(env.PORT, () => {
+export const server = app.listen(env.PORT, () => {
logger.info(`Listening: http://localhost:${env.PORT}`);
});
-
-// Function to handle shutdown logic
-async function onShutdown() {
- logger.info("Shutting down application...");
- setSigtermReceived();
-
- // Stop accepting new connections
- server.close();
- logger.info("Server has been closed.");
- // Perform necessary cleanup tasks here
- // For example, close database connections, stop job executors, etc.
- await Promise.all([
- evalJobCreator?.close(),
- evalJobExecutor?.close(),
- batchExportJobExecutor?.close(),
- ]);
- redis?.disconnect();
- logger.info("Http server and Redis jobs have been closed.");
-}
-
-// Capture shutdown signals
-process.on("SIGTERM", onShutdown);
-process.on("SIGINT", onShutdown);
diff --git a/worker/src/instrumentation.ts b/worker/src/instrumentation.ts
index 144f250139..0f1e7180a8 100644
--- a/worker/src/instrumentation.ts
+++ b/worker/src/instrumentation.ts
@@ -26,6 +26,19 @@ Sentry.init({
profilesSampleRate: 0.1,
});
+type CallbackFn<T> = (span?: Sentry.Span) => T;
+
+export function instrument<T>(
+ ctx: { name: string },
+ callback: CallbackFn<T>
+): T {
+ if (env.SENTRY_DSN) {
+ return Sentry.startSpan(ctx, callback);
+ } else {
+ return callback();
+ }
+}
+
type CallbackAsyncFn<T> = (span?: Sentry.Span) => Promise<T>;
export async function instrumentAsync<T>(
ctx: { name: string },
@@ -33,7 +46,9 @@ export async function instrumentAsync<T>(
): Promise<T> {
if (env.SENTRY_DSN) {
return Sentry.startSpan(ctx, async (span) => {
- return callback(span);
+ const result = await callback(span);
+ span?.end();
+ return result;
});
} else {
return callback();
diff --git a/worker/src/logger.ts b/worker/src/logger.ts
index 552406afa4..83429acfa1 100644
--- a/worker/src/logger.ts
+++ b/worker/src/logger.ts
@@ -12,7 +12,10 @@ const levelToSeverity = {
fatal: "CRITICAL",
};
-export const getLogger = (env: "development" | "production" | "test") => {
+export const getLogger = (
+ env: "development" | "production" | "test",
+ minLevel = "info"
+) => {
if (env === "production") {
return pino({
base: { serviceContext: { service: "langfuse-worker" } },
@@ -47,6 +50,7 @@ export const getLogger = (env: "development" | "production" | "test") => {
});
}
return pino({
+ level: minLevel,
transport: {
target: "pino-pretty",
options: {
@@ -57,6 +61,6 @@ export const getLogger = (env: "development" | "production" | "test") => {
});
};
-const logger = getLogger(env.NODE_ENV);
+const logger = getLogger(env.NODE_ENV, env.LANGFUSE_LOG_LEVEL);
export default logger;
diff --git a/worker/src/queues/ingestionFlushQueue.ts b/worker/src/queues/ingestionFlushQueue.ts
new file mode 100644
index 0000000000..9d0c57bbe7
--- /dev/null
+++ b/worker/src/queues/ingestionFlushQueue.ts
@@ -0,0 +1,92 @@
+import { Queue, Worker } from "bullmq";
+
+import { QueueJobs, QueueName } from "@langfuse/shared";
+import { clickhouseClient, redis } from "@langfuse/shared/src/server";
+import * as Sentry from "@sentry/node";
+
+import { env } from "../env";
+import logger from "../logger";
+import { ClickhouseWriter } from "../services/ClickhouseWriter";
+import { IngestionService } from "../services/IngestionService";
+
+export type IngestionFlushQueue = Queue<null>;
+
+export const ingestionFlushQueue: IngestionFlushQueue | null = redis
+ ? new Queue<null>(QueueName.IngestionFlushQueue, {
+ connection: redis,
+ defaultJobOptions: {
+ removeOnComplete: true, // Important: If not true, new jobs for that ID would be ignored as jobs in the complete set are still considered as part of the queue
+ removeOnFail: true,
+ delay: env.LANGFUSE_INGESTION_FLUSH_DELAY_MS,
+ attempts: env.LANGFUSE_INGESTION_FLUSH_ATTEMPTS,
+ },
+ })
+ : null;
+
+export const flushIngestionQueueExecutor = redis
+ ? new Worker(
+ QueueName.IngestionFlushQueue,
+ async (job) => {
+ if (job.name === QueueJobs.FlushIngestionEntity) {
+ const projectEntityId = job.id;
+ if (!projectEntityId) {
+ throw new Error("ProjectEntity ID not provided");
+ }
+
+ // Log wait time
+ const waitTime = Date.now() - job.timestamp;
+ logger.debug(
+ `Received flush request after ${waitTime} ms for ${projectEntityId}`
+ );
+ Sentry.metrics.distribution("ingestion_flush_wait_time", waitTime, {
+ unit: "milliseconds",
+ });
+
+ // Check dependencies
+ if (!redis) throw new Error("Redis not available");
+ if (!prisma) throw new Error("Prisma not available");
+ if (!ingestionFlushQueue)
+ throw new Error("Ingestion flush queue not available");
+
+ // Flush ingestion buffer
+ const processingStartTime = Date.now();
+
+ await new IngestionService(
+ redis,
+ prisma,
+ ingestionFlushQueue,
+ ClickhouseWriter.getInstance(),
+ clickhouseClient,
+ env.LANGFUSE_INGESTION_BUFFER_TTL_SECONDS
+ ).flush(projectEntityId);
+
+ // Log processing time
+ const processingTime = Date.now() - processingStartTime;
+ logger.debug(
+ `Prepared and scheduled CH-write in ${processingTime} ms for ${projectEntityId}`
+ );
+ Sentry.metrics.distribution(
+ "ingestion_flush_processing_time",
+ processingTime,
+ { unit: "milliseconds" }
+ );
+
+ // Log queue size
+ await ingestionFlushQueue
+ .count()
+ .then((count) => {
+ logger.debug(`Ingestion flush queue length: ${count}`);
+ Sentry.metrics.gauge("ingestion_flush_queue_length", count, {
+ unit: "records",
+ });
+ return count;
+ })
+ .catch();
+ }
+ },
+ {
+ connection: redis,
+ concurrency: env.LANGFUSE_INGESTION_FLUSH_PROCESSING_CONCURRENCY,
+ }
+ )
+ : null;
diff --git a/worker/src/services/ClickhouseWriter/ClickhouseWriter.unit.test.ts b/worker/src/services/ClickhouseWriter/ClickhouseWriter.unit.test.ts
new file mode 100644
index 0000000000..dc77e19274
--- /dev/null
+++ b/worker/src/services/ClickhouseWriter/ClickhouseWriter.unit.test.ts
@@ -0,0 +1,322 @@
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+
+import { clickhouseClient } from "@langfuse/shared/src/server";
+
+import { env } from "../../env";
+import logger from "../../logger";
+import { ClickhouseWriter, TableName } from "../ClickhouseWriter";
+import * as Sentry from "@sentry/node";
+
+// Mock Sentry
+vi.mock("@sentry/node", () => ({
+ metrics: {
+ distribution: vi.fn(),
+ gauge: vi.fn(),
+ },
+}));
+
+vi.mock("../../env", () => ({
+ env: {
+ LANGFUSE_INGESTION_CLICKHOUSE_WRITE_BATCH_SIZE: 100,
+ LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS: 5000,
+ LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS: 3,
+ },
+}));
+vi.mock("../../logger", () => ({
+ default: {
+ info: vi.fn(),
+ debug: vi.fn(),
+ error: vi.fn(),
+ },
+}));
+vi.mock("@langfuse/shared/src/server", () => ({
+ clickhouseClient: {
+ insert: vi.fn(),
+ },
+}));
+
+describe("ClickhouseWriter", () => {
+ let writer: ClickhouseWriter;
+
+ beforeEach(() => {
+ vi.useFakeTimers();
+ writer = ClickhouseWriter.getInstance();
+ });
+
+ afterEach(async () => {
+ vi.restoreAllMocks();
+ vi.useRealTimers();
+
+ // Reset singleton instance
+ await writer.shutdown();
+
+ ClickhouseWriter.instance = null;
+ });
+
+ it("should be a singleton", () => {
+ const instance1 = ClickhouseWriter.getInstance();
+ const instance2 = ClickhouseWriter.getInstance();
+
+ expect(instance1).toBe(instance2);
+ });
+
+ it("should initialize with correct values", () => {
+ expect(writer.batchSize).toBe(
+ env.LANGFUSE_INGESTION_CLICKHOUSE_WRITE_BATCH_SIZE
+ );
+ expect(writer.writeInterval).toBe(
+ env.LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS
+ );
+ expect(writer.maxAttempts).toBe(
+ env.LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS
+ );
+ });
+
+ it("should add items to the queue", () => {
+ const traceData = { id: "1", name: "test" };
+ writer.addToQueue(TableName.Traces, traceData as any);
+
+ expect(writer["queue"][TableName.Traces]).toHaveLength(1);
+ expect(writer["queue"][TableName.Traces][0].data).toEqual(traceData);
+ });
+
+ it("should flush when queue reaches batch size", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+
+ for (let i = 0; i < writer.batchSize; i++) {
+ writer.addToQueue(TableName.Traces, { id: `${i}`, name: "test" } as any);
+ }
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(1);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ });
+
+ it("should flush at regular intervals", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(1);
+ });
+
+ it("should handle errors and retry", async () => {
+ const mockInsert = vi
+ .spyOn(clickhouseClient, "insert")
+ .mockRejectedValueOnce(new Error("DB Error"))
+ .mockResolvedValueOnce();
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(1);
+ expect(logger.error).toHaveBeenCalled();
+ expect(writer["queue"][TableName.Traces]).toHaveLength(1);
+ expect(writer["queue"][TableName.Traces][0].attempts).toBe(2);
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+ expect(mockInsert).toHaveBeenCalledTimes(2);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ });
+
+ it("should drop records after max attempts", async () => {
+ const mockInsert = vi
+ .spyOn(clickhouseClient, "insert")
+ .mockRejectedValue(new Error("DB Error"));
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+
+ for (let i = 0; i < writer.maxAttempts; i++) {
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+ }
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(writer.maxAttempts);
+ expect(logger.error).toHaveBeenCalledWith(
+ expect.stringContaining("Max attempts reached")
+ );
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ });
+
+ it("should shutdown gracefully", async () => {
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+
+ await writer.shutdown();
+
+ expect(mockInsert).toHaveBeenCalledTimes(1);
+ expect(writer["intervalId"]).toBeNull();
+ expect(logger.info).toHaveBeenCalledWith(
+ "ClickhouseWriter shutdown complete."
+ );
+ });
+
+ it("should handle multiple table types", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "trace" });
+ writer.addToQueue(TableName.Scores, { id: "2", name: "score" });
+ writer.addToQueue(TableName.Observations, { id: "3", name: "observation" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(3);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ expect(writer["queue"][TableName.Scores]).toHaveLength(0);
+ expect(writer["queue"][TableName.Observations]).toHaveLength(0);
+ });
+
+ it("should not flush when isIntervalFlushInProgress is true", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+ writer["isIntervalFlushInProgress"] = true;
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).not.toHaveBeenCalled();
+ expect(writer["queue"][TableName.Traces]).toHaveLength(1);
+ });
+
+ it("should set up interval correctly in start method", () => {
+ const setIntervalSpy = vi.spyOn(global, "setInterval");
+ writer["start"]();
+
+ expect(setIntervalSpy).toHaveBeenCalledWith(
+ expect.any(Function),
+ writer.writeInterval
+ );
+ });
+
+ it("should flush all queues when flushAll is called directly", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+ writer.addToQueue(TableName.Traces, { id: "1", name: "trace" });
+ writer.addToQueue(TableName.Scores, { id: "2", name: "score" });
+
+ await writer["flushAll"](true);
+
+ expect(mockInsert).toHaveBeenCalledTimes(2);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ expect(writer["queue"][TableName.Scores]).toHaveLength(0);
+ });
+
+ it("should handle adding items to queue while flush is in progress", async () => {
+ const mockInsert = vi
+ .spyOn(clickhouseClient, "insert")
+ .mockImplementation(() => {
+ writer.addToQueue(TableName.Traces, { id: "2", name: "test2" });
+ return Promise.resolve();
+ });
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test1" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(1);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(1);
+ expect(writer["queue"][TableName.Traces][0].data.id).toBe("2");
+ });
+
+ it("should handle concurrent writes during high load", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+ const concurrentWrites = 1000;
+
+ const writes = Array.from({ length: concurrentWrites }, (_, i) =>
+ writer.addToQueue(TableName.Traces, { id: `${i}`, name: `test${i}` })
+ );
+
+ await Promise.all(writes);
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(
+ Math.ceil(concurrentWrites / writer.batchSize)
+ );
+ expect(writer["queue"][TableName.Traces].length).toBeLessThan(
+ writer.batchSize
+ );
+ });
+
+ it("should report wait time and processing time metrics correctly", async () => {
+ const metricsDistributionSpy = vi.spyOn(Sentry.metrics, "distribution");
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(metricsDistributionSpy).toHaveBeenCalledWith(
+ "ingestion_clickhouse_insert_wait_time",
+ expect.any(Number),
+ { unit: "milliseconds" }
+ );
+
+ expect(metricsDistributionSpy).toHaveBeenCalledWith(
+ "ingestion_clickhouse_insert_processing_time",
+ expect.any(Number),
+ { unit: "milliseconds" }
+ );
+ });
+
+ it("should handle different types of Clickhouse client errors", async () => {
+ const mockInsert = vi
+ .spyOn(clickhouseClient, "insert")
+ .mockRejectedValueOnce(new Error("Network error"))
+ .mockRejectedValueOnce(new Error("Timeout"))
+ .mockResolvedValueOnce();
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test" });
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+ expect(logger.error).toHaveBeenCalledWith(
+ expect.stringContaining("Network error")
+ );
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+ expect(logger.error).toHaveBeenCalledWith(
+ expect.stringContaining("Timeout")
+ );
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ });
+
+ it("should handle partial queue flush correctly", async () => {
+ const mockInsert = vi.spyOn(clickhouseClient, "insert").mockResolvedValue();
+ const partialQueueSize = Math.floor(writer.batchSize / 2);
+
+ for (let i = 0; i < partialQueueSize; i++) {
+ writer.addToQueue(TableName.Traces, { id: `${i}`, name: "test" } as any);
+ }
+
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(1);
+ expect(mockInsert).toHaveBeenCalledWith(
+ expect.objectContaining({
+ values: expect.arrayContaining(
+ new Array(partialQueueSize).fill(expect.any(Object))
+ ),
+ })
+ );
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ });
+
+ it("should continue functioning after encountering an error", async () => {
+ const mockInsert = vi
+ .spyOn(clickhouseClient, "insert")
+ .mockRejectedValueOnce(new Error("DB Error"))
+ .mockResolvedValue();
+
+ writer.addToQueue(TableName.Traces, { id: "1", name: "test1" });
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ writer.addToQueue(TableName.Traces, { id: "2", name: "test2" });
+ await vi.advanceTimersByTimeAsync(writer.writeInterval);
+
+ expect(mockInsert).toHaveBeenCalledTimes(2);
+ expect(writer["queue"][TableName.Traces]).toHaveLength(0);
+ });
+});
diff --git a/worker/src/services/ClickhouseWriter/index.ts b/worker/src/services/ClickhouseWriter/index.ts
new file mode 100644
index 0000000000..424a8e71df
--- /dev/null
+++ b/worker/src/services/ClickhouseWriter/index.ts
@@ -0,0 +1,223 @@
+import {
+ clickhouseClient,
+ ObservationRecordInsertType,
+ ScoreRecordInsertType,
+ TraceRecordInsertType,
+} from "@langfuse/shared/src/server";
+import * as Sentry from "@sentry/node";
+
+import { env } from "../../env";
+import logger from "../../logger";
+
+export class ClickhouseWriter {
+ private static instance: ClickhouseWriter | null = null;
+ batchSize: number;
+ writeInterval: number;
+ maxAttempts: number;
+ queue: ClickhouseQueue;
+
+ isIntervalFlushInProgress: boolean;
+ intervalId: NodeJS.Timeout | null = null;
+
+ private constructor() {
+ this.batchSize = env.LANGFUSE_INGESTION_CLICKHOUSE_WRITE_BATCH_SIZE;
+ this.writeInterval = env.LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS;
+ this.maxAttempts = env.LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS;
+
+ this.isIntervalFlushInProgress = false;
+
+ this.queue = {
+ [TableName.Traces]: [],
+ [TableName.Scores]: [],
+ [TableName.Observations]: [],
+ };
+
+ this.start();
+ }
+
+ public static getInstance() {
+ if (!ClickhouseWriter.instance) {
+ ClickhouseWriter.instance = new ClickhouseWriter();
+ }
+
+ return ClickhouseWriter.instance;
+ }
+
+ private start() {
+ logger.info(
+ `Starting ClickhouseWriter. Max interval: ${this.writeInterval} ms, Max batch size: ${this.batchSize}`
+ );
+
+ this.intervalId = setInterval(() => {
+ if (this.isIntervalFlushInProgress) return;
+
+ this.isIntervalFlushInProgress = true;
+
+ logger.debug("Flush interval elapsed, flushing all queues...");
+
+ this.flushAll().finally(() => {
+ this.isIntervalFlushInProgress = false;
+ });
+ }, this.writeInterval);
+ }
+
+ public async shutdown(): Promise<void> {
+ logger.info("Shutting down ClickhouseWriter...");
+
+ if (this.intervalId) {
+ clearInterval(this.intervalId);
+ this.intervalId = null;
+ }
+
+ await this.flushAll(true);
+
+ logger.info("ClickhouseWriter shutdown complete.");
+ }
+
+ private async flushAll(fullQueue = false) {
+ await Promise.all([
+ this.flush(TableName.Traces, fullQueue),
+ this.flush(TableName.Scores, fullQueue),
+ this.flush(TableName.Observations, fullQueue),
+ ]).catch((err) => {
+ logger.error("ClickhouseWriter.flushAll", err);
+ });
+ }
+
+ private async flush<T extends TableName>(tableName: T, fullQueue = false) {
+ const entityQueue = this.queue[tableName];
+ if (entityQueue.length === 0) return;
+
+ const queueItems = entityQueue.splice(
+ 0,
+ fullQueue ? entityQueue.length : this.batchSize
+ );
+
+ // Log wait time
+ queueItems.forEach((item) => {
+ const waitTime = Date.now() - item.createdAt;
+ Sentry.metrics.distribution(
+ "ingestion_clickhouse_insert_wait_time",
+ waitTime,
+ {
+ unit: "milliseconds",
+ }
+ );
+ });
+
+ try {
+ const processingStartTime = Date.now();
+
+ await this.writeToClickhouse({
+ table: tableName,
+ records: queueItems.map((item) => item.data),
+ });
+
+ // Log processing time
+ Sentry.metrics.distribution(
+ "ingestion_clickhouse_insert_processing_time",
+ Date.now() - processingStartTime,
+ {
+ unit: "milliseconds",
+ }
+ );
+
+ logger.debug(
+ `Flushed ${queueItems.length} records to Clickhouse ${tableName}. New queue length: ${entityQueue.length}`
+ );
+
+ Sentry.metrics.gauge(
+ "ingestion_clickhouse_insert_queue_length",
+ entityQueue.length,
+ {
+ unit: "records",
+ tags: { entityType: tableName },
+ }
+ );
+ } catch (err) {
+ logger.error(`ClickhouseWriter.flush ${tableName}`, err);
+
+ // Re-add the records to the queue with incremented attempts
+ queueItems.forEach((item) => {
+ if (item.attempts < this.maxAttempts) {
+ entityQueue.push({
+ ...item,
+ attempts: item.attempts + 1,
+ });
+ } else {
+ // TODO - Add to a dead letter queue in Redis rather than dropping
+ logger.error(
+ `Max attempts reached for ${tableName} record. Dropping record ${item.data}.`
+ );
+ }
+ });
+ }
+ }
+
+ public addToQueue<T extends TableName>(
+ tableName: T,
+ data: RecordInsertType<T>
+ ) {
+ const entityQueue = this.queue[tableName];
+ entityQueue.push({
+ createdAt: Date.now(),
+ attempts: 1,
+ data,
+ });
+
+ if (entityQueue.length >= this.batchSize) {
+ logger.debug(`Queue is full. Flushing ${tableName}...`);
+
+ this.flush(tableName).catch((err) => {
+ logger.error("ClickhouseWriter.addToQueue flush", err);
+ });
+ }
+ }
+
+ private async writeToClickhouse<T extends TableName>(params: {
+ table: T;
+ records: RecordInsertType<T>[];
+ }): Promise<void> {
+ const startTime = Date.now();
+
+ await clickhouseClient
+ .insert({
+ table: params.table,
+ format: "JSONEachRow",
+ values: params.records,
+ })
+ .catch((err) => {
+ logger.error(`ClickhouseWriter.writeToClickhouse ${err}`);
+
+ throw err;
+ });
+
+ logger.debug(
+ `ClickhouseWriter.writeToClickhouse: ${Date.now() - startTime} ms`
+ );
+ }
+}
+
+export enum TableName {
+ Traces = "traces",
+ Scores = "scores",
+ Observations = "observations",
+}
+
+type RecordInsertType<T extends TableName> = T extends TableName.Scores
+ ? ScoreRecordInsertType
+ : T extends TableName.Observations
+ ? ObservationRecordInsertType
+ : T extends TableName.Traces
+ ? TraceRecordInsertType
+ : never;
+
+type ClickhouseQueue = {
+ [T in TableName]: ClickhouseWriterQueueItem<T>[];
+};
+
+type ClickhouseWriterQueueItem<T extends TableName> = {
+ createdAt: number;
+ attempts: number;
+ data: RecordInsertType<T>;
+};
diff --git a/worker/src/services/IngestionService/index.ts b/worker/src/services/IngestionService/index.ts
new file mode 100644
index 0000000000..c72b585492
--- /dev/null
+++ b/worker/src/services/IngestionService/index.ts
@@ -0,0 +1,845 @@
+import { Redis } from "ioredis";
+import { randomUUID } from "node:crypto";
+import { v4 } from "uuid";
+
+import { Model, PrismaClient, Prompt, QueueJobs } from "@langfuse/shared";
+import {
+ convertObservationReadToInsert,
+ convertScoreReadToInsert,
+ convertTraceReadToInsert,
+ eventTypes,
+ findModel,
+ IngestionBatchEventType,
+ IngestionEventType,
+ ingestionEventWithProjectId,
+ IngestionEventWithProjectIdType,
+ ObservationEvent,
+ observationRecordInsertSchema,
+ ObservationRecordInsertType,
+ observationRecordReadSchema,
+ ScoreEventType,
+ scoreRecordInsertSchema,
+ ScoreRecordInsertType,
+ scoreRecordReadSchema,
+ TraceEventType,
+ traceRecordInsertSchema,
+ TraceRecordInsertType,
+ traceRecordReadSchema,
+ ClickhouseClientType,
+} from "@langfuse/shared/src/server";
+
+import { tokenCount } from "../../features/tokenisation/usage";
+import { instrumentAsync } from "../../instrumentation";
+import logger from "../../logger";
+import { IngestionFlushQueue } from "../../queues/ingestionFlushQueue";
+import { ClickhouseWriter, TableName } from "../ClickhouseWriter";
+import { convertJsonSchemaToRecord, overwriteObject } from "./utils";
+
+enum EntityType {
+ Trace = "trace",
+ Score = "score",
+ Observation = "observation",
+ SDK_LOG = "sdk-log",
+}
+
+type InsertRecord =
+ | TraceRecordInsertType
+ | ScoreRecordInsertType
+ | ObservationRecordInsertType;
+
+const immutableEntityKeys: {
+ [TableName.Traces]: (keyof TraceRecordInsertType)[];
+ [TableName.Scores]: (keyof ScoreRecordInsertType)[];
+ [TableName.Observations]: (keyof ObservationRecordInsertType)[];
+} = {
+ [TableName.Traces]: ["id", "project_id", "timestamp", "created_at"],
+ [TableName.Scores]: [
+ "id",
+ "project_id",
+ "timestamp",
+ "trace_id",
+ "created_at",
+ ],
+ [TableName.Observations]: [
+ "id",
+ "project_id",
+ "trace_id",
+ "start_time",
+ "created_at",
+ ],
+};
+
+const reservedCharsEscapeMap = [
+ { reserved: ":", escape: "|%|" },
+ { reserved: "_", escape: "|#|" },
+];
+
+export class IngestionService {
+ constructor(
+ private redis: Redis,
+ private prisma: PrismaClient,
+ private ingestionFlushQueue: IngestionFlushQueue,
+ private clickHouseWriter: ClickhouseWriter,
+ private clickhouseClient: ClickhouseClientType,
+ private bufferTtlSeconds: number
+ ) {}
+
+ public async addBatch(
+ events: IngestionBatchEventType,
+ projectId: string
+ ): Promise<void> {
+ const ingestedEvents = events.map(async (event) => {
+ if (!("id" in event.body && event.body.id)) {
+ logger.warn(
+ `Received ingestion event without id, ${JSON.stringify(event)}`
+ );
+
+ return null;
+ }
+
+ const projectEntityKey = this.getProjectEntityKey({
+ entityId: event.body.id,
+ eventType: this.getEventType(event),
+ projectId,
+ });
+ const serializedEventData = JSON.stringify({ ...event, projectId });
+
+ await this.redis.lpush(projectEntityKey, serializedEventData);
+ await this.redis.expire(projectEntityKey, this.bufferTtlSeconds);
+ await this.ingestionFlushQueue.add(QueueJobs.FlushIngestionEntity, null, {
+ jobId: projectEntityKey,
+ });
+ });
+
+ await Promise.all(ingestedEvents);
+ }
+
+ public async flush(projectEntityKey: string): Promise<void> {
+ const eventList = (await this.redis.lrange(projectEntityKey, 0, -1))
+ .map((serializedEventData) => {
+ const parsed = ingestionEventWithProjectId.safeParse(
+ JSON.parse(serializedEventData)
+ );
+
+ if (!parsed.success) {
+ logger.error(
+ `Failed to parse event ${serializedEventData} : ${parsed.error}`
+ );
+
+ return null;
+ }
+
+ return parsed.data;
+ })
+ .filter(Boolean) as IngestionEventWithProjectIdType[];
+
+ if (eventList.length === 0) {
+ throw new Error(
+ `No valid events found in buffer for project entity ${projectEntityKey}`
+ );
+ }
+
+ const { projectId, eventType, entityId } =
+ this.parseProjectEntityKey(projectEntityKey);
+
+ switch (eventType) {
+ case EntityType.Trace:
+ return await this.processTraceEventList({
+ projectId,
+ entityId,
+ traceEventList: eventList as TraceEventType[],
+ });
+ case EntityType.Observation:
+ return await this.processObservationEventList({
+ projectId,
+ entityId,
+ observationEventList: eventList as ObservationEvent[],
+ });
+ case EntityType.Score: {
+ return await this.processScoreEventList({
+ projectId,
+ entityId,
+ scoreEventList: eventList as ScoreEventType[],
+ });
+ }
+ }
+ }
+
+ private getEventType(event: IngestionEventType): EntityType {
+ switch (event.type) {
+ case eventTypes.TRACE_CREATE:
+ return EntityType.Trace;
+ case eventTypes.OBSERVATION_CREATE:
+ case eventTypes.OBSERVATION_UPDATE:
+ case eventTypes.EVENT_CREATE:
+ case eventTypes.SPAN_CREATE:
+ case eventTypes.SPAN_UPDATE:
+ case eventTypes.GENERATION_CREATE:
+ case eventTypes.GENERATION_UPDATE:
+ return EntityType.Observation;
+ case eventTypes.SCORE_CREATE:
+ return EntityType.Score;
+ case eventTypes.SDK_LOG:
+ return EntityType.SDK_LOG;
+ }
+ }
+
+ private getProjectEntityKey(params: {
+ projectId: string;
+ eventType: EntityType;
+ entityId: string;
+ }): string {
+ const sanitizedEntityId = IngestionService.escapeReservedChars(
+ params.entityId
+ );
+
+ return `ingestionBuffer_${params.projectId}_${params.eventType}_${sanitizedEntityId}`;
+ }
+
+ private parseProjectEntityKey(projectEntityKey: string) {
+ const split = projectEntityKey.split("_");
+
+ if (split.length !== 4) {
+ throw new Error(
+ `Invalid project entity key format ${projectEntityKey}, expected 4 parts`
+ );
+ }
+
+ const projectId = split[1];
+ const eventType = split[2] as EntityType;
+ const escapedEntityId = split[3];
+
+ const entityId = IngestionService.unescapeReservedChars(escapedEntityId);
+
+ return { projectId, eventType, entityId };
+ }
+
+ private static escapeReservedChars(string: string): string {
+ return reservedCharsEscapeMap.reduce(
+ (acc, { reserved, escape }) => acc.replaceAll(reserved, escape),
+ string
+ );
+ }
+
+ private static unescapeReservedChars(escapedString: string): string {
+ return reservedCharsEscapeMap.reduce(
+ (acc, { reserved, escape }) => acc.replaceAll(escape, reserved),
+ escapedString
+ );
+ }
+
+ private async processScoreEventList(params: {
+ projectId: string;
+ entityId: string;
+ scoreEventList: ScoreEventType[];
+ }) {
+ const { projectId, entityId, scoreEventList } = params;
+ if (scoreEventList.length === 0) return;
+
+ const timeSortedEvents =
+ IngestionService.toTimeSortedEventList(scoreEventList);
+
+ const scoreRecords: ScoreRecordInsertType[] = timeSortedEvents.map(
+ (score) => ({
+ id: entityId,
+ project_id: projectId,
+ timestamp: this.getMillisecondTimestamp(),
+ name: score.body.name,
+ value: score.body.value,
+ source: "API",
+ trace_id: score.body.traceId,
+ data_type: score.body.dataType,
+ observation_id: score.body.observationId ?? null,
+ created_at: Date.now(),
+ updated_at: Date.now(),
+ })
+ );
+
+ const finalScoreRecord: ScoreRecordInsertType =
+ await this.mergeScoreRecords({
+ projectId,
+ entityId,
+ scoreRecords,
+ });
+
+ this.clickHouseWriter.addToQueue(TableName.Scores, finalScoreRecord);
+ }
+
+ private async processTraceEventList(params: {
+ projectId: string;
+ entityId: string;
+ traceEventList: TraceEventType[];
+ }) {
+ const { projectId, entityId, traceEventList } = params;
+ if (traceEventList.length === 0) return;
+
+ const timeSortedEvents =
+ IngestionService.toTimeSortedEventList(traceEventList);
+
+ const traceRecords = this.mapTraceEventsToRecords({
+ projectId,
+ entityId,
+ traceEventList: timeSortedEvents,
+ });
+
+ const finalTraceRecord = await this.mergeTraceRecords({
+ projectId,
+ entityId,
+ traceRecords,
+ });
+
+ this.clickHouseWriter.addToQueue(TableName.Traces, finalTraceRecord);
+ }
+
+ private async processObservationEventList(params: {
+ projectId: string;
+ entityId: string;
+ observationEventList: ObservationEvent[];
+ }) {
+ const { projectId, entityId, observationEventList } = params;
+ if (observationEventList.length === 0) return;
+
+ const prompt = await this.getPrompt(projectId, observationEventList);
+ const timeSortedEvents =
+ IngestionService.toTimeSortedEventList(observationEventList);
+
+ const observationRecords = this.mapObservationEventsToRecords({
+ observationEventList: timeSortedEvents,
+ projectId,
+ entityId,
+ prompt,
+ });
+
+ const finalObservationRecord = await this.mergeObservationRecords({
+ projectId,
+ entityId,
+ observationRecords,
+ });
+
+ // Backward compat: create wrapper trace for SDK < 2.0.0 events that do not have a traceId
+ if (!finalObservationRecord.trace_id) {
+ const traceId = randomUUID();
+ const wrapperTraceRecord: TraceRecordInsertType = {
+ id: traceId,
+ timestamp: finalObservationRecord.start_time,
+ project_id: projectId,
+ created_at: Date.now(),
+ updated_at: Date.now(),
+ metadata: {},
+ tags: [],
+ bookmarked: false,
+ public: false,
+ };
+
+ this.clickHouseWriter.addToQueue(TableName.Traces, wrapperTraceRecord);
+ finalObservationRecord.trace_id = traceId;
+ }
+
+ this.clickHouseWriter.addToQueue(
+ TableName.Observations,
+ finalObservationRecord
+ );
+ }
+
+ private async mergeScoreRecords(params: {
+ projectId: string;
+ entityId: string;
+ scoreRecords: ScoreRecordInsertType[];
+ }): Promise<ScoreRecordInsertType> {
+ const { projectId, entityId, scoreRecords } = params;
+
+ const clickhouseScoreRecord = await this.getClickhouseRecord({
+ projectId,
+ entityId,
+ table: TableName.Scores,
+ });
+
+ const recordsToMerge = clickhouseScoreRecord
+ ? [clickhouseScoreRecord, ...scoreRecords]
+ : scoreRecords;
+
+ const mergedRecord = this.mergeRecords(
+ recordsToMerge,
+ immutableEntityKeys[TableName.Scores]
+ );
+
+ return scoreRecordInsertSchema.parse(mergedRecord);
+ }
+
+ private async mergeTraceRecords(params: {
+ projectId: string;
+ entityId: string;
+ traceRecords: TraceRecordInsertType[];
+ }): Promise<TraceRecordInsertType> {
+ const { projectId, entityId, traceRecords } = params;
+
+ const clickhouseTraceRecord = await this.getClickhouseRecord({
+ projectId,
+ entityId,
+ table: TableName.Traces,
+ });
+
+ const recordsToMerge = clickhouseTraceRecord
+ ? [clickhouseTraceRecord, ...traceRecords]
+ : traceRecords;
+
+ const mergedRecord = this.mergeRecords(
+ recordsToMerge,
+ immutableEntityKeys[TableName.Traces]
+ );
+
+ return traceRecordInsertSchema.parse(mergedRecord);
+ }
+
+ private async mergeObservationRecords(params: {
+ projectId: string;
+ entityId: string;
+ observationRecords: ObservationRecordInsertType[];
+ }): Promise<ObservationRecordInsertType> {
+ const { projectId, entityId, observationRecords } = params;
+
+ const existingObservationRecord = await this.getClickhouseRecord({
+ projectId,
+ entityId,
+ table: TableName.Observations,
+ });
+
+ const recordsToMerge = existingObservationRecord
+ ? [existingObservationRecord, ...observationRecords]
+ : observationRecords;
+
+ const mergedRecord = this.mergeRecords(
+ recordsToMerge,
+ immutableEntityKeys[TableName.Observations]
+ );
+
+ const parsedObservationRecord =
+ observationRecordInsertSchema.parse(mergedRecord);
+
+ const generationUsage = await this.getGenerationUsage({
+ projectId,
+ observationRecord: parsedObservationRecord,
+ });
+
+ return { ...parsedObservationRecord, ...generationUsage };
+ }
+
+ private mergeRecords<T extends InsertRecord>(
+ records: T[],
+ immutableEntityKeys: string[]
+ ): unknown {
+ if (records.length === 0) {
+ throw new Error("No records to merge");
+ }
+
+ let result: {
+ id: string;
+ project_id: string;
+ [key: string]: any;
+ } = { id: records[0].id, project_id: records[0].project_id };
+
+ for (const record of records) {
+ result = overwriteObject(result, record, immutableEntityKeys);
+ }
+
+ return result;
+ }
+
+ private static toTimeSortedEventList<
+ T extends TraceEventType | ScoreEventType | ObservationEvent,
+ >(eventList: T[]): T[] {
+ return eventList.slice().sort((a, b) => {
+ const aTimestamp = new Date(a.timestamp).getTime();
+ const bTimestamp = new Date(b.timestamp).getTime();
+
+ if (aTimestamp === bTimestamp) {
+ return a.type.includes("create") ? -1 : 1; // create events should come first
+ }
+
+ return aTimestamp - bTimestamp;
+ });
+ }
+
+ private async getPrompt(
+ projectId: string,
+ observationEventList: ObservationEvent[]
+ ): Promise<ObservationPrompt | null> {
+ const lastObservationWithPromptInfo = observationEventList
+ .slice()
+ .reverse()
+ .find(this.hasPromptInformation);
+
+ if (!lastObservationWithPromptInfo) return null;
+
+ const dbPrompt = await this.prisma.prompt.findFirst({
+ where: {
+ projectId,
+ name: lastObservationWithPromptInfo.body.promptName,
+ version: lastObservationWithPromptInfo.body.promptVersion,
+ },
+ select: {
+ id: true,
+ name: true,
+ version: true,
+ },
+ });
+
+ return dbPrompt;
+ }
+
+ private hasPromptInformation(
+ event: ObservationEvent
+ ): event is ObservationEvent & {
+ body: { promptName: string; promptVersion: number };
+ } {
+ return (
+ "promptName" in event.body &&
+ typeof event.body.promptName === "string" &&
+ "promptVersion" in event.body &&
+ typeof event.body.promptVersion === "number"
+ );
+ }
+
+ private async getGenerationUsage(params: {
+ projectId: string;
+ observationRecord: ObservationRecordInsertType;
+ }): Promise<
+ | Pick<
+ ObservationRecordInsertType,
+ | "input_usage_units"
+ | "output_usage_units"
+ | "total_usage_units"
+ | "input_cost"
+ | "output_cost"
+ | "total_cost"
+ | "internal_model_id"
+ >
+ | {}
+ > {
+ const { projectId, observationRecord } = params;
+
+ const internalModel = await findModel({
+ event: {
+ projectId,
+ model: observationRecord.provided_model_name ?? undefined,
+ unit: observationRecord.unit ?? undefined,
+ },
+ });
+
+ const tokenCounts = this.getTokenCounts(observationRecord, internalModel);
+ const tokenCosts = IngestionService.calculateTokenCosts(
+ internalModel,
+ observationRecord,
+ tokenCounts
+ );
+
+ return {
+ ...tokenCounts,
+ ...tokenCosts,
+ internal_model_id: internalModel?.id,
+ };
+ }
+
+ private getTokenCounts(
+ observationRecord: ObservationRecordInsertType,
+ model: Model | null | undefined
+ ): Pick<
+ ObservationRecordInsertType,
+ "input_usage_units" | "output_usage_units" | "total_usage_units"
+ > {
+ if (
+ // No user provided usage. Note only two equal signs operator here to check for null and undefined
+ model &&
+ observationRecord.provided_input_usage_units == null &&
+ observationRecord.provided_output_usage_units == null &&
+ observationRecord.provided_total_usage_units == null
+ ) {
+ const newInputCount = tokenCount({
+ text: observationRecord.input,
+ model,
+ });
+ const newOutputCount = tokenCount({
+ text: observationRecord.output,
+ model,
+ });
+
+ const newTotalCount =
+ newInputCount || newOutputCount
+ ? (newInputCount ?? 0) + (newOutputCount ?? 0)
+ : undefined;
+
+ return {
+ input_usage_units: newInputCount,
+ output_usage_units: newOutputCount,
+ total_usage_units: newTotalCount,
+ };
+ }
+
+ return {
+ input_usage_units: observationRecord.provided_input_usage_units,
+ output_usage_units: observationRecord.provided_output_usage_units,
+ total_usage_units: observationRecord.provided_total_usage_units,
+ };
+ }
+
+ static calculateTokenCosts(
+ model: Model | null | undefined,
+ userProvidedCosts: {
+ provided_input_cost?: number | null;
+ provided_output_cost?: number | null;
+ provided_total_cost?: number | null;
+ },
+ tokenCounts: {
+ input_usage_units?: number | null;
+ output_usage_units?: number | null;
+ total_usage_units?: number | null;
+ }
+ ): {
+ input_cost: number | null | undefined;
+ output_cost: number | null | undefined;
+ total_cost: number | null | undefined;
+ } {
+ // If user has provided any cost point, do not calculate anything else
+ if (
+ userProvidedCosts.provided_input_cost != null ||
+ userProvidedCosts.provided_output_cost != null ||
+ userProvidedCosts.provided_total_cost != null
+ ) {
+ return {
+ ...userProvidedCosts,
+ input_cost: userProvidedCosts.provided_input_cost,
+ output_cost: userProvidedCosts.provided_output_cost,
+ total_cost:
+ userProvidedCosts.provided_total_cost ??
+ (userProvidedCosts.provided_input_cost ?? 0) +
+ (userProvidedCosts.provided_output_cost ?? 0),
+ };
+ }
+
+ const finalInputCost =
+ tokenCounts.input_usage_units != null && model?.inputPrice
+ ? model.inputPrice.toNumber() * tokenCounts.input_usage_units
+ : undefined;
+
+ const finalOutputCost =
+ tokenCounts.output_usage_units != null && model?.outputPrice
+ ? model.outputPrice.toNumber() * tokenCounts.output_usage_units
+ : finalInputCost
+ ? 0
+ : undefined;
+
+ const finalTotalCost =
+ tokenCounts.total_usage_units != null && model?.totalPrice
+ ? model.totalPrice.toNumber() * tokenCounts.total_usage_units
+ : finalInputCost ?? finalOutputCost
+ ? (finalInputCost ?? 0) + (finalOutputCost ?? 0)
+ : undefined;
+
+ return {
+ input_cost: finalInputCost,
+ output_cost: finalOutputCost,
+ total_cost: finalTotalCost,
+ };
+ }
+
+ private async getClickhouseRecord(params: {
+ projectId: string;
+ entityId: string;
+ table: TableName.Traces;
+ }): Promise<TraceRecordInsertType | null>;
+ private async getClickhouseRecord(params: {
+ projectId: string;
+ entityId: string;
+ table: TableName.Scores;
+ }): Promise<ScoreRecordInsertType | null>;
+ private async getClickhouseRecord(params: {
+ projectId: string;
+ entityId: string;
+ table: TableName.Observations;
+ }): Promise<ObservationRecordInsertType | null>;
+ private async getClickhouseRecord(params: {
+ projectId: string;
+ entityId: string;
+ table: TableName;
+ }) {
+ const recordParser = {
+ traces: traceRecordReadSchema,
+ scores: scoreRecordReadSchema,
+ observations: observationRecordReadSchema,
+ };
+ const { projectId, entityId, table } = params;
+
+ return await instrumentAsync({ name: `get-${table}` }, async () => {
+ const queryResult = await this.clickhouseClient.query({
+ query: `SELECT * FROM ${table} WHERE project_id = '${projectId}' AND id = '${entityId}' ORDER BY updated_at DESC LIMIT 1`,
+ format: "JSONEachRow",
+ });
+
+ const result = await queryResult.json();
+
+ if (result.length === 0) return null;
+
+ return table === TableName.Traces
+ ? convertTraceReadToInsert(recordParser[table].parse(result[0]))
+ : table === TableName.Scores
+ ? convertScoreReadToInsert(recordParser[table].parse(result[0]))
+ : convertObservationReadToInsert(
+ recordParser[table].parse(result[0])
+ );
+ });
+ }
+
+ private mapTraceEventsToRecords(params: {
+ traceEventList: TraceEventType[];
+ projectId: string;
+ entityId: string;
+ }): TraceRecordInsertType[] {
+ const { traceEventList, projectId, entityId } = params;
+
+ return traceEventList.map((trace) => {
+ const traceRecord: TraceRecordInsertType = {
+ id: entityId,
+ // in the default implementation, we set timestamps server side if not provided.
+ // we need to insert timestamps here and change the SDKs to send timestamps client side.
+ timestamp: this.getMillisecondTimestamp(trace.body.timestamp),
+ name: trace.body.name,
+ user_id: trace.body.userId,
+ metadata: trace.body.metadata
+ ? convertJsonSchemaToRecord(trace.body.metadata)
+ : {},
+ release: trace.body.release,
+ version: trace.body.version,
+ project_id: projectId,
+ public: trace.body.public ?? false,
+ bookmarked: false,
+ tags: trace.body.tags ?? [],
+ input: this.stringify(trace.body.input),
+ output: this.stringify(trace.body.output), // convert even json to string
+ session_id: trace.body.sessionId,
+ created_at: Date.now(),
+ updated_at: Date.now(),
+ };
+
+ return traceRecord;
+ });
+ }
+
+ private mapObservationEventsToRecords(params: {
+ projectId: string;
+ entityId: string;
+ observationEventList: ObservationEvent[];
+ prompt: ObservationPrompt | null;
+ }) {
+ const { projectId, entityId, observationEventList, prompt } = params;
+
+ return observationEventList.map((obs) => {
+ let observationType: "EVENT" | "SPAN" | "GENERATION";
+ switch (obs.type) {
+ case eventTypes.OBSERVATION_CREATE:
+ case eventTypes.OBSERVATION_UPDATE:
+ observationType = obs.body.type;
+ break;
+ case eventTypes.EVENT_CREATE:
+ observationType = "EVENT" as const;
+ break;
+ case eventTypes.SPAN_CREATE:
+ case eventTypes.SPAN_UPDATE:
+ observationType = "SPAN" as const;
+ break;
+ case eventTypes.GENERATION_CREATE:
+ case eventTypes.GENERATION_UPDATE:
+ observationType = "GENERATION" as const;
+ break;
+ }
+
+ // metadata needs to be converted to a record<string, string>.
+ // prefix all keys with "metadata." if they are an array or primitive
+ const convertedMetadata: Record<string, string> = {};
+
+ if (typeof obs.body.metadata === "string") {
+ convertedMetadata["metadata"] = obs.body.metadata;
+ }
+
+ const newInputCount =
+ "usage" in obs.body ? obs.body.usage?.input : undefined;
+
+ const newOutputCount =
+ "usage" in obs.body ? obs.body.usage?.output : undefined;
+
+ const newTotalCount =
+ ("usage" in obs.body ? obs.body.usage?.total : undefined) ||
+ (newInputCount !== undefined &&
+ newOutputCount !== undefined &&
+ newInputCount &&
+ newOutputCount
+ ? newInputCount + newOutputCount
+ : newInputCount ?? newOutputCount);
+
+ const newUnit = "usage" in obs.body ? obs.body.usage?.unit : undefined;
+
+ const observationRecord: ObservationRecordInsertType = {
+ id: entityId,
+ trace_id: obs.body.traceId ?? v4(),
+ type: observationType,
+ name: obs.body.name,
+ start_time: this.getMillisecondTimestamp(obs.body.startTime),
+ end_time:
+ "endTime" in obs.body && obs.body.endTime
+ ? this.getMillisecondTimestamp(obs.body.endTime)
+ : undefined,
+ completion_start_time:
+ "completionStartTime" in obs.body && obs.body.completionStartTime
+ ? this.getMillisecondTimestamp(obs.body.completionStartTime)
+ : undefined,
+ metadata: obs.body.metadata
+ ? convertJsonSchemaToRecord(obs.body.metadata)
+ : {},
+ provided_model_name: "model" in obs.body ? obs.body.model : undefined,
+ model_parameters:
+ "modelParameters" in obs.body
+ ? obs.body.modelParameters
+ ? JSON.stringify(obs.body.modelParameters)
+ : undefined
+ : undefined,
+ input: this.stringify(obs.body.input),
+ output: this.stringify(obs.body.output),
+ provided_input_usage_units: newInputCount,
+ provided_output_usage_units: newOutputCount,
+ provided_total_usage_units: newTotalCount,
+ unit: newUnit,
+ level: obs.body.level ?? "DEFAULT",
+ status_message: obs.body.statusMessage ?? undefined,
+ parent_observation_id: obs.body.parentObservationId ?? undefined,
+ version: obs.body.version ?? undefined,
+ project_id: projectId,
+ provided_input_cost:
+ "usage" in obs.body ? obs.body.usage?.inputCost : undefined,
+ provided_output_cost:
+ "usage" in obs.body ? obs.body.usage?.outputCost : undefined,
+ provided_total_cost:
+ "usage" in obs.body ? obs.body.usage?.totalCost : undefined,
+ prompt_id: prompt?.id,
+ prompt_name: prompt?.name,
+ prompt_version: prompt?.version,
+ created_at: Date.now(),
+ updated_at: Date.now(),
+ };
+
+ return observationRecord;
+ });
+ }
+
+ private stringify(
+ obj: string | object | number | boolean | undefined | null
+ ): string | undefined {
+ if (obj == null) return; // return undefined on undefined or null
+
+ return typeof obj === "string" ? obj : JSON.stringify(obj);
+ }
+
+ private getMillisecondTimestamp(timestamp?: string | null): number {
+ return timestamp ? new Date(timestamp).getTime() : Date.now();
+ }
+}
+
+type ObservationPrompt = Pick<Prompt, "id" | "name" | "version">;
diff --git a/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts b/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts
new file mode 100644
index 0000000000..83c04bed87
--- /dev/null
+++ b/worker/src/services/IngestionService/tests/IngestionService.integration.test.ts
@@ -0,0 +1,1397 @@
+import { randomUUID } from "node:crypto";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+
+import { prisma } from "@langfuse/shared/src/db";
+import {
+ clickhouseClient,
+ ObservationEvent,
+ observationRecordReadSchema,
+ ObservationRecordReadType,
+ redis,
+ ScoreEventType,
+ scoreRecordReadSchema,
+ ScoreRecordReadType,
+ TraceEventType,
+ traceRecordReadSchema,
+ TraceRecordReadType,
+} from "@langfuse/shared/src/server";
+import { pruneDatabase } from "../../../__tests__/utils";
+
+import { ClickhouseWriter, TableName } from "../../ClickhouseWriter";
+import { IngestionService } from "../../IngestionService";
+import { ModelUsageUnit } from "@langfuse/shared";
+
+const projectId = "7a88fb47-b4e2-43b8-a06c-a5ce950dc53a";
+
+describe("Ingestion end-to-end tests", () => {
+ let ingestionService: IngestionService;
+ let clickhouseWriter: ClickhouseWriter;
+
+ const mockIngestionFlushQueue = vi.fn() as any;
+
+ beforeEach(async () => {
+ if (!redis) throw new Error("Redis not initialized");
+ await pruneDatabase();
+
+ clickhouseWriter = ClickhouseWriter.getInstance();
+
+ ingestionService = new IngestionService(
+ redis,
+ prisma,
+ mockIngestionFlushQueue,
+ clickhouseWriter,
+ clickhouseClient,
+ 30
+ );
+ });
+
+ afterEach(async () => {
+ vi.restoreAllMocks();
+ vi.useRealTimers();
+
+ // Reset singleton instance
+ await clickhouseWriter.shutdown();
+
+ ClickhouseWriter.instance = null;
+ });
+
+ it("should correctly ingest a trace", async () => {
+ const traceId = randomUUID();
+ const traceName = "test-trace";
+ const timestamp = new Date().toISOString();
+
+ const eventList: TraceEventType[] = [
+ {
+ type: "trace-create",
+ id: traceId,
+ timestamp,
+ body: {
+ name: traceName,
+ timestamp,
+ },
+ },
+ ];
+
+ await ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList: eventList,
+ });
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ const expected = {
+ id: traceId,
+ name: traceName,
+ user_id: null,
+ metadata: {},
+ release: null,
+ version: null,
+ project_id: projectId,
+ public: false,
+ bookmarked: false,
+ tags: [],
+ input: null,
+ output: null,
+ session_id: null,
+ timestamp,
+ };
+
+ expect(trace).toMatchObject(expected);
+ });
+
+ [
+ {
+ usage: {
+ input: 100,
+ output: 200,
+ total: 100,
+ unit: ModelUsageUnit.Characters,
+ inputCost: 123,
+ outputCost: 456,
+ totalCost: 789,
+ },
+ expectedUnit: ModelUsageUnit.Characters,
+ expectedPromptTokens: 100,
+ expectedCompletionTokens: 200,
+ expectedTotalTokens: 100,
+ },
+ {
+ usage: {
+ total: 100,
+ unit: ModelUsageUnit.Characters,
+ },
+ expectedUnit: ModelUsageUnit.Characters,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ expectedTotalTokens: 100,
+ },
+ {
+ usage: {
+ total: 100,
+ unit: ModelUsageUnit.Milliseconds,
+ },
+ expectedUnit: ModelUsageUnit.Milliseconds,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ expectedTotalTokens: 100,
+ },
+ {
+ usage: {
+ input: 1,
+ output: 2,
+ unit: ModelUsageUnit.Images,
+ },
+ expectedUnit: ModelUsageUnit.Images,
+ expectedPromptTokens: 1,
+ expectedCompletionTokens: 2,
+ expectedTotalTokens: 3,
+ },
+ {
+ usage: {
+ input: 1,
+ output: 2,
+ unit: ModelUsageUnit.Requests,
+ },
+ expectedUnit: ModelUsageUnit.Requests,
+ expectedPromptTokens: 1,
+ expectedCompletionTokens: 2,
+ expectedTotalTokens: 3,
+ },
+ {
+ usage: {
+ input: 30,
+ output: 10,
+ unit: ModelUsageUnit.Seconds,
+ },
+ expectedUnit: ModelUsageUnit.Seconds,
+ expectedPromptTokens: 30,
+ expectedCompletionTokens: 10,
+ expectedTotalTokens: 40,
+ },
+ {
+ usage: {
+ total: 100,
+ },
+ expectedUnit: null,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ expectedTotalTokens: 100,
+ },
+ {
+ usage: undefined,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ expectedTotalTokens: null,
+ expectedUnit: null,
+ },
+ {
+ usage: null,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ expectedTotalTokens: null,
+ expectedUnit: null,
+ },
+ {
+ usage: {},
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ expectedTotalTokens: null,
+ expectedUnit: null,
+ },
+ ].forEach((testConfig) => {
+ it(`should create trace, generation and score without matching models ${JSON.stringify(
+ testConfig,
+ null,
+ 2
+ )}`, async () => {
+ const traceId = randomUUID();
+ const generationId = randomUUID();
+ const spanId = randomUUID();
+ const scoreId = randomUUID();
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ metadata: { key: "value" },
+ release: "1.0.0",
+ version: "2.0.0",
+ tags: ["tag-1", "tag-2"],
+ },
+ },
+ ];
+
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ type: "GENERATION",
+ name: "generation-name",
+ startTime: "2021-01-01T00:00:00.000Z",
+ endTime: "2021-01-01T00:00:00.000Z",
+ modelParameters: { key: "value" },
+ input: { key: "value" },
+ metadata: { key: "value" },
+ version: "2.0.0",
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "observation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ type: "GENERATION",
+ output: { key: "this is a great gpt output" },
+ usage: testConfig.usage,
+ },
+ },
+ ];
+
+ const spanEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: spanId,
+ traceId: traceId,
+ type: "SPAN",
+ name: "span-name",
+ startTime: "2021-01-01T00:00:00.000Z",
+ endTime: "2021-01-01T00:00:00.000Z",
+ input: { input: "value" },
+ metadata: { meta: "value" },
+ version: "2.0.0",
+ },
+ },
+ ];
+
+ const scoreEventList: ScoreEventType[] = [
+ {
+ id: randomUUID(),
+ type: "score-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: scoreId,
+ dataType: "NUMERIC",
+ name: "score-name",
+ value: 100.5,
+ traceId: traceId,
+ },
+ },
+ ];
+
+ await Promise.all([
+ ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: spanId,
+ observationEventList: spanEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ }),
+ ingestionService.processScoreEventList({
+ projectId,
+ entityId: scoreId,
+ scoreEventList,
+ }),
+ ]);
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(trace.name).toBe("trace-name");
+ expect(trace.release).toBe("1.0.0");
+ expect(trace.version).toBe("2.0.0");
+ expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+ expect(trace.tags).toEqual(["tag-1", "tag-2"]);
+
+ const generation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(generation.id).toBe(generationId);
+ expect(generation.trace_id).toBe(traceId);
+ expect(generation.name).toBe("generation-name");
+ expect(generation.start_time).toEqual("2021-01-01T00:00:00.000Z");
+ expect(generation.end_time).toEqual("2021-01-01T00:00:00.000Z");
+ expect(generation.provided_model_name).toBeNull();
+ expect(generation.model_parameters).toEqual(
+ JSON.stringify({
+ key: "value",
+ })
+ );
+ expect(generation.input).toEqual(JSON.stringify({ key: "value" }));
+ expect(parseMetadata(generation.metadata)).toEqual({ key: "value" });
+ expect(generation.version).toBe("2.0.0");
+ expect(generation.internal_model_id).toBeNull();
+ expect(generation.input_usage_units).toEqual(
+ testConfig.expectedPromptTokens
+ );
+ expect(generation.output_usage_units).toEqual(
+ testConfig.expectedCompletionTokens
+ );
+ expect(generation.total_usage_units).toEqual(
+ testConfig.expectedTotalTokens
+ );
+ expect(generation.unit).toEqual(testConfig.expectedUnit);
+ expect(generation.output).toEqual(
+ JSON.stringify({
+ key: "this is a great gpt output",
+ })
+ );
+
+ const span = await getClickhouseRecord(TableName.Observations, spanId);
+
+ expect(span.id).toBe(spanId);
+ expect(span.name).toBe("span-name");
+ expect(span.start_time).toEqual("2021-01-01T00:00:00.000Z");
+ expect(span.end_time).toEqual("2021-01-01T00:00:00.000Z");
+ expect(span.input).toEqual(JSON.stringify({ input: "value" }));
+ expect(parseMetadata(span.metadata)).toEqual({ meta: "value" });
+ expect(span.version).toBe("2.0.0");
+
+ const score = await getClickhouseRecord(TableName.Scores, scoreId);
+
+ expect(score.id).toBe(scoreId);
+ expect(score.trace_id).toBe(traceId);
+ expect(score.name).toBe("score-name");
+ expect(score.value).toBe(100.5);
+ expect(score.observation_id).toBeNull();
+ expect(score.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+ });
+ });
+
+ [
+ {
+ observationExternalModel: "gpt-3.5",
+ observationStartTime: new Date("2021-01-01T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id",
+ expectedPromptTokens: 5,
+ expectedCompletionTokens: 7,
+ models: [
+ {
+ id: "custom-model-id",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "gpt-3.5",
+ observationStartTime: new Date("2021-01-01T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id",
+ expectedPromptTokens: 5,
+ expectedCompletionTokens: 7,
+ models: [
+ {
+ id: "custom-model-id",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: null,
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "GPT-3.5",
+ observationStartTime: new Date("2021-01-01T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id",
+ expectedPromptTokens: 5,
+ expectedCompletionTokens: 7,
+ models: [
+ {
+ id: "custom-model-id",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "GPT-3.5",
+ observationStartTime: new Date("2021-01-01T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id-2",
+ expectedPromptTokens: 5,
+ expectedCompletionTokens: 7,
+ models: [
+ {
+ id: "custom-model-id-1",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ {
+ id: "custom-model-id-2",
+ modelName: "gpt-3.5-turbo-new",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T10:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ tokenizerModel: "gpt-3.5-turbo",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "GPT-3.5",
+ observationStartTime: new Date("2021-01-02T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id-2",
+ expectedPromptTokens: 5,
+ expectedCompletionTokens: 7,
+ models: [
+ {
+ id: "custom-model-id-1",
+ modelName: "gpt-3.5-turbo-new",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ {
+ id: "custom-model-id-2",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T10:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ tokenizerModel: "gpt-3.5-turbo",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "ft:gpt-3.5-turbo-1106:my-org:custom_suffix:id",
+ observationStartTime: new Date("2022-01-01T10:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id-1",
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ models: [
+ {
+ id: "custom-model-id-1",
+ modelName: "ft:gpt-3.5-turbo-1106",
+ matchPattern: "(?i)^(ft:)(gpt-3.5-turbo-1106:)(.+)(:)(.*)(:)(.+)$",
+ startDate: new Date("2022-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "ft:babbage-002:my-org#2:custom_suffix-2:id",
+ observationStartTime: new Date("2022-01-01T10:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: "custom-model-id-1",
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ models: [
+ {
+ id: "custom-model-id-1",
+ modelName: "ft:babbage-002",
+ matchPattern: "(?i)^(ft:)(babbage-002:)(.+)(:)(.*)(:)(.+)$",
+ startDate: new Date("2022-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "GPT-4",
+ observationStartTime: new Date("2021-01-01T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Tokens,
+ expectedInternalModelId: null,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ models: [
+ {
+ id: "custom-model-id-1",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ {
+ observationExternalModel: "GPT-3",
+ observationStartTime: new Date("2021-01-01T00:00:00.000Z"),
+ modelUnit: ModelUsageUnit.Characters,
+ expectedInternalModelId: null,
+ expectedPromptTokens: null,
+ expectedCompletionTokens: null,
+ models: [
+ {
+ id: "custom-model-id-1",
+ modelName: "gpt-3.5-turbo",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ },
+ ],
+ },
+ ].forEach((testConfig) => {
+ it(`should match observations to internal models ${JSON.stringify(
+ testConfig,
+ null,
+ 2
+ )}`, async () => {
+ const traceId = randomUUID();
+ const generationId = randomUUID();
+
+ await Promise.all(
+ testConfig.models.map(async (model) =>
+ prisma.model.create({
+ data: {
+ id: model.id,
+ modelName: model.modelName,
+ matchPattern: model.matchPattern,
+ startDate: model.startDate,
+ unit: model.unit,
+ tokenizerId: model.tokenizerId,
+ tokenizerConfig: {
+ tokensPerMessage: 3,
+ tokensPerName: 1,
+ tokenizerModel:
+ "tokenizerModel" in model
+ ? model.tokenizerModel
+ : model.modelName,
+ },
+ },
+ })
+ )
+ );
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ },
+ },
+ ];
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ type: "GENERATION",
+ name: "generation-name",
+ startTime: testConfig.observationStartTime.toISOString(),
+ model: testConfig.observationExternalModel,
+ usage: {
+ unit: testConfig.modelUnit,
+ },
+ input: "This is a great prompt",
+ output: "This is a great gpt output",
+ },
+ },
+ ];
+
+ await Promise.all([
+ ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ }),
+ ]);
+ await clickhouseWriter.flushAll(true);
+
+ const generation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(generation.id).toBe(generationId);
+ expect(generation.trace_id).toBe(traceId);
+ expect(generation.name).toBe("generation-name");
+ expect(generation.start_time).toEqual(
+ testConfig.observationStartTime.toISOString()
+ );
+ expect(generation.provided_model_name).toBe(
+ testConfig.observationExternalModel
+ );
+ // expect(generation.input_usage_units).toBe(
+ // testConfig.expectedPromptTokens
+ // );
+ expect(generation.output_usage_units).toBe(
+ testConfig.expectedCompletionTokens
+ );
+ expect(generation.internal_model_id).toBe(
+ testConfig.expectedInternalModelId
+ );
+ });
+ });
+
+ it("should create and update all events", async () => {
+ const traceId = randomUUID();
+ const generationId = randomUUID();
+ const spanId = randomUUID();
+ const eventId = randomUUID();
+ const scoreId = randomUUID();
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ },
+ },
+ ];
+
+ const spanEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "span-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: spanId,
+ traceId: traceId,
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "span-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: spanId,
+ traceId: traceId,
+ name: "span-name",
+ },
+ },
+ ];
+
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ parentObservationId: spanId,
+ modelParameters: { someKey: ["user-1", "user-2"] },
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ name: "generation-name",
+ },
+ },
+ ];
+
+ const eventEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "event-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: eventId,
+ traceId: traceId,
+ name: "event-name",
+ parentObservationId: generationId,
+ },
+ },
+ ];
+
+ const scoreEventList: ScoreEventType[] = [
+ {
+ id: randomUUID(),
+ type: "score-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: scoreId,
+ dataType: "NUMERIC",
+ name: "score-name",
+ traceId: traceId,
+ value: 100.5,
+ observationId: generationId,
+ },
+ },
+ ];
+
+ await Promise.all([
+ ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: spanId,
+ observationEventList: spanEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: eventId,
+ observationEventList: eventEventList,
+ }),
+ ingestionService.processScoreEventList({
+ projectId,
+ entityId: scoreId,
+ scoreEventList,
+ }),
+ ]);
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+
+ const span = await getClickhouseRecord(TableName.Observations, spanId);
+
+ expect(span.id).toBe(spanId);
+ expect(span.name).toBe("span-name");
+ expect(span.trace_id).toBe(traceId);
+
+ const generation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(generation?.id).toBe(generationId);
+ expect(generation?.trace_id).toBe(traceId);
+ expect(generation?.name).toBe("generation-name");
+ expect(generation?.parent_observation_id).toBe(spanId);
+ expect(generation?.model_parameters).toEqual(
+ JSON.stringify({
+ someKey: ["user-1", "user-2"],
+ })
+ );
+
+ const event = await getClickhouseRecord(TableName.Observations, eventId);
+
+ expect(event.id).toBe(eventId);
+ expect(event.trace_id).toBe(traceId);
+ expect(event.name).toBe("event-name");
+ expect(event.parent_observation_id).toBe(generationId);
+
+ const score = await getClickhouseRecord(TableName.Scores, scoreId);
+
+ expect(score.id).toBe(scoreId);
+ expect(score.trace_id).toBe(traceId);
+ expect(score.observation_id).toBe(generationId);
+ expect(score.value).toBe(100.5);
+ });
+
+ it("should upsert traces", async () => {
+ const traceId = randomUUID();
+
+ // First flush
+ const traceEventList1: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ metadata: { key: "value" },
+ release: "1.0.0",
+ version: "2.0.0",
+ tags: ["tag-1", "tag-2", "tag-2"],
+ },
+ },
+ ];
+
+ await ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList: traceEventList1,
+ });
+
+ await clickhouseWriter.flushAll(true);
+
+ // Second flush
+ const traceEventList2: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-2",
+ tags: ["tag-1", "tag-4", "tag-3"],
+ },
+ },
+ ];
+
+ await ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList: traceEventList2,
+ });
+
+ await clickhouseWriter.flushAll(true);
+
+ vi.useRealTimers();
+ await new Promise((resolve) => setTimeout(resolve, 1000));
+ vi.useFakeTimers();
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(trace.name).toBe("trace-name");
+ expect(trace.user_id).toBe("user-2");
+ expect(trace.release).toBe("1.0.0");
+ expect(trace.version).toBe("2.0.0");
+ expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+ expect(trace.tags).toEqual(["tag-1", "tag-2", "tag-3", "tag-4"]);
+ expect(trace.tags.length).toBe(4);
+ });
+
+ it("should upsert traces in the right order", async () => {
+ const traceId = randomUUID();
+
+ const latestEvent = new Date();
+ const oldEvent = new Date(latestEvent).setSeconds(
+ latestEvent.getSeconds() - 1
+ );
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: latestEvent.toISOString(),
+ body: {
+ id: traceId,
+ timestamp: latestEvent.toISOString(),
+ name: "trace-name",
+ userId: "user-1",
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date(oldEvent).toISOString(),
+ body: {
+ id: traceId,
+ timestamp: new Date(oldEvent).toISOString(),
+ name: "trace-name",
+ userId: "user-2",
+ },
+ },
+ ];
+
+ await ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ });
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(trace.name).toBe("trace-name");
+ expect(trace.user_id).toBe("user-1");
+ expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+ });
+
+ it("should put observation updates after creates if timestamp is same", async () => {
+ const generationId = randomUUID();
+
+ const timestamp = new Date().toISOString();
+
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-update",
+ timestamp,
+ body: {
+ id: generationId,
+ type: "GENERATION",
+ output: { key: "this is a great gpt output" },
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp,
+ body: {
+ id: generationId,
+ type: "GENERATION",
+ name: "generation-name",
+ input: { key: "value" },
+ output: "should be overwritten",
+ model: "gpt-3.5",
+ },
+ },
+ ];
+
+ await ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ });
+
+ await clickhouseWriter.flushAll(true);
+
+ const generation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(generation.output).toEqual(
+ JSON.stringify({
+ key: "this is a great gpt output",
+ })
+ );
+ expect(generation.input).toEqual(JSON.stringify({ key: "value" }));
+ expect(generation.provided_model_name).toEqual("gpt-3.5");
+ expect(generation.output).toEqual(
+ JSON.stringify({ key: "this is a great gpt output" })
+ );
+ });
+
+ it("should update all token counts if update does not contain model name", async () => {
+ const traceId = randomUUID();
+ const generationId = randomUUID();
+
+ await prisma.model.create({
+ data: {
+ modelName: "gpt-3.5",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ tokenizerConfig: {
+ tokensPerMessage: 3,
+ tokensPerName: 1,
+ tokenizerModel: "gpt-3.5-turbo",
+ },
+ },
+ });
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ },
+ },
+ ];
+
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ type: "GENERATION",
+ name: "generation-name",
+ input: { key: "value" },
+ model: "gpt-3.5",
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "observation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ type: "GENERATION",
+ output: { key: "this is a great gpt output" },
+ },
+ },
+ ];
+
+ await Promise.all([
+ ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ }),
+ ]);
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(trace.name).toBe("trace-name");
+ expect(trace.project_id).toBe("7a88fb47-b4e2-43b8-a06c-a5ce950dc53a");
+ expect(trace.user_id).toBe("user-1");
+
+ const generation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(generation?.output).toEqual(
+ JSON.stringify({
+ key: "this is a great gpt output",
+ })
+ );
+ expect(generation?.input).toEqual(JSON.stringify({ key: "value" }));
+ expect(generation?.provided_model_name).toEqual("gpt-3.5");
+ expect(generation?.output).toEqual(
+ JSON.stringify({ key: "this is a great gpt output" })
+ );
+ expect(generation?.input_usage_units).toEqual(5);
+ expect(generation?.output_usage_units).toEqual(11);
+ });
+
+ it("should update all token counts if update does not contain model name and events come in wrong order", async () => {
+ const traceId = randomUUID();
+ const generationId = randomUUID();
+
+ await prisma.model.create({
+ data: {
+ modelName: "gpt-3.5",
+ matchPattern: "(?i)^(gpt-)(35|3.5)(-turbo)?$",
+ startDate: new Date("2021-01-01T00:00:00.000Z"),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ tokenizerConfig: {
+ tokensPerMessage: 3,
+ tokensPerName: 1,
+ tokenizerModel: "gpt-3.5-turbo",
+ },
+ },
+ });
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ },
+ },
+ ];
+
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ type: "GENERATION",
+ output: { key: "this is a great gpt output" },
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ type: "GENERATION",
+ name: "generation-name",
+ input: { key: "value" },
+ model: "gpt-3.5",
+ },
+ },
+ ];
+
+ await Promise.all([
+ ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ }),
+ ]);
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+ const observation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(observation?.output).toEqual(
+ JSON.stringify({
+ key: "this is a great gpt output",
+ })
+ );
+ expect(observation?.input).toEqual(JSON.stringify({ key: "value" }));
+ expect(observation?.provided_model_name).toEqual("gpt-3.5");
+ expect(observation?.output).toEqual(
+ JSON.stringify({ key: "this is a great gpt output" })
+ );
+ expect(observation?.input_usage_units).toEqual(5);
+ expect(observation?.output_usage_units).toEqual(11);
+ });
+
+ it("null does not override set values", async () => {
+ const traceId = randomUUID();
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ metadata: { key: "value" },
+ release: "1.0.0",
+ version: "2.0.0",
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ metadata: { key: "value" },
+ release: null,
+ version: null,
+ },
+ },
+ ];
+
+ await ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ });
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(trace.release).toBe("1.0.0");
+ expect(trace.version).toBe("2.0.0");
+ });
+
+ [
+ {
+ inputs: [{ a: "a" }, { b: "b" }],
+ output: { a: "a", b: "b" },
+ },
+ {
+ inputs: [[{ a: "a" }], [{ b: "b" }]],
+ output: { metadata: [{ a: "a", b: "b" }] },
+ },
+ {
+ inputs: [
+ {
+ a: {
+ "1": 1,
+ },
+ },
+ {
+ b: "b",
+ a: {
+ "2": 2,
+ },
+ },
+ ],
+ output: { a: { "1": 1, "2": 2 }, b: "b" },
+ },
+ {
+ inputs: [{ a: "a" }, undefined],
+ output: { a: "a" },
+ },
+ {
+ inputs: [undefined, { b: "b" }],
+ output: { b: "b" },
+ },
+ ].forEach(({ inputs, output }) => {
+ it(`merges metadata ${JSON.stringify(inputs)}, ${JSON.stringify(
+ output
+ )}`, async () => {
+ const traceId = randomUUID();
+ const generationId = randomUUID();
+
+ const traceEventList: TraceEventType[] = [
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ userId: "user-1",
+ metadata: inputs[0],
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "trace-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: traceId,
+ name: "trace-name",
+ metadata: inputs[1],
+ },
+ },
+ ];
+
+ const generationEventList: ObservationEvent[] = [
+ {
+ id: randomUUID(),
+ type: "observation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ type: "GENERATION",
+ name: "generation-name",
+ metadata: inputs[0],
+ },
+ },
+ {
+ id: randomUUID(),
+ type: "observation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ traceId: traceId,
+ type: "GENERATION",
+ metadata: inputs[1],
+ },
+ },
+ ];
+
+ await Promise.all([
+ ingestionService.processTraceEventList({
+ projectId,
+ entityId: traceId,
+ traceEventList,
+ }),
+ ingestionService.processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: generationEventList,
+ }),
+ ]);
+
+ await clickhouseWriter.flushAll(true);
+
+ const trace = await getClickhouseRecord(TableName.Traces, traceId);
+
+ expect(parseMetadata(trace.metadata)).toEqual(output);
+
+ const generation = await getClickhouseRecord(
+ TableName.Observations,
+ generationId
+ );
+
+ expect(parseMetadata(generation.metadata)).toEqual(output);
+ });
+ });
+});
+
+async function getClickhouseRecord<T extends TableName>(
+ tableName: T,
+ entityId: string
+): Promise<RecordReadType<T>> {
+ const query = await clickhouseClient.query({
+ query: `SELECT * FROM ${tableName} FINAL WHERE project_id = '${projectId}' AND id = '${entityId}'`,
+ format: "JSONEachRow",
+ });
+
+ const result = (await query.json())[0];
+
+ return tableName === TableName.Traces
+ ? traceRecordReadSchema.parse(result)
+ : tableName === TableName.Observations
+ ? observationRecordReadSchema.parse(result)
+ : (scoreRecordReadSchema.parse(result) as RecordReadType<T>);
+}
+
+type RecordReadType<T extends TableName> = T extends TableName.Scores
+ ? ScoreRecordReadType
+ : T extends TableName.Observations
+ ? ObservationRecordReadType
+ : T extends TableName.Traces
+ ? TraceRecordReadType
+ : never;
+
+function parseMetadata<T extends Record<string, unknown>>(metadata: T): T {
+ for (const [key, value] of Object.entries(metadata)) {
+ try {
+ metadata[key] = JSON.parse(value);
+ } catch (e) {
+ // Do nothing
+ }
+ }
+
+ return metadata;
+}
diff --git a/worker/src/services/IngestionService/tests/IngestionService.unit.test.ts b/worker/src/services/IngestionService/tests/IngestionService.unit.test.ts
new file mode 100644
index 0000000000..6f9c7c6c23
--- /dev/null
+++ b/worker/src/services/IngestionService/tests/IngestionService.unit.test.ts
@@ -0,0 +1,36 @@
+import { expect, describe, it, vi } from "vitest";
+import { IngestionService } from "../../IngestionService";
+
+describe("IngestionService unit tests", () => {
+ it("correctly escapes user provided IDs", async () => {
+ const validUuid = "123e4567-e89b-12d3-a456-426614174000";
+ const userProvidedId = "user_provided_id_with:colon:chars";
+ const expectedEscapedId = "user|#|provided|#|id|#|with|%|colon|%|chars";
+
+ expect((IngestionService as any).escapeReservedChars(userProvidedId)).toBe(
+ expectedEscapedId
+ );
+ expect(
+ (IngestionService as any).unescapeReservedChars(expectedEscapedId)
+ ).toBe(userProvidedId);
+
+ expect((IngestionService as any).escapeReservedChars(validUuid)).toBe(
+ validUuid
+ );
+ });
+
+ it("correctly sorts events in ascending order by timestamp", async () => {
+ const firstTrace = { timestamp: 1, type: "observation-create" };
+ const secondTrace = { timestamp: 1, type: "observation-update" };
+ const thirdTrace = { timestamp: 3, type: "observation-update" };
+
+ const records = [thirdTrace, secondTrace, firstTrace];
+
+ const sortedEventList = (IngestionService as any).toTimeSortedEventList(
+ records
+ );
+
+ expect(sortedEventList).toEqual([firstTrace, secondTrace, thirdTrace]);
+ expect(sortedEventList).not.toBe(records); // Ensure that the original array is not mutated
+ });
+});
diff --git a/worker/src/services/IngestionService/tests/calculateTokenCost.unit.test.ts b/worker/src/services/IngestionService/tests/calculateTokenCost.unit.test.ts
new file mode 100644
index 0000000000..113b1870a9
--- /dev/null
+++ b/worker/src/services/IngestionService/tests/calculateTokenCost.unit.test.ts
@@ -0,0 +1,1406 @@
+import Decimal from "decimal.js";
+import { v4 as uuidv4 } from "uuid";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+
+import { ModelUsageUnit } from "@langfuse/shared";
+import { prisma } from "@langfuse/shared/src/db";
+
+import { pruneDatabase } from "../../../__tests__/utils";
+import { IngestionService } from "../../IngestionService";
+import * as clickhouseWriteExports from "../../ClickhouseWriter";
+
+const mockAddToClickhouseWriter = vi.fn();
+const mockClickhouseClient = {
+ query: async () => ({ json: async () => [] }),
+};
+
+vi.mock("../../ClickhouseWriter", async (importOriginal) => {
+ const original = (await importOriginal()) as {};
+ return {
+ ...original,
+ ClickhouseWriter: {
+ getInstance: () => ({
+ addToQueue: mockAddToClickhouseWriter,
+ }),
+ },
+ };
+});
+
+const mockIngestionService = new IngestionService(
+ null as any,
+ prisma,
+ null as any,
+ clickhouseWriteExports.ClickhouseWriter.getInstance() as any,
+ mockClickhouseClient as any,
+ 10
+);
+
+describe("Token Cost Calculation", () => {
+ const modelName = "gpt-test-" + uuidv4();
+ const matchPattern = `(?i)^(${modelName})$`;
+ const traceId = uuidv4();
+ const generationId = uuidv4();
+ const projectId = "7a88fb47-b4e2-43b8-a06c-a5ce950dc53a";
+
+ const tokenModelData = {
+ id: uuidv4(),
+ modelName,
+ matchPattern,
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ totalPrice: new Decimal(0.03),
+ unit: ModelUsageUnit.Tokens,
+ tokenizerId: "openai",
+ tokenizerConfig: {
+ tokensPerName: 1,
+ tokenizerModel: "gpt-4o",
+ tokensPerMessage: 3,
+ },
+ };
+
+ const imageModelData = {
+ id: uuidv4(),
+ modelName,
+ matchPattern,
+ inputPrice: new Decimal(1),
+ outputPrice: new Decimal(2),
+ totalPrice: new Decimal(3),
+ unit: ModelUsageUnit.Images,
+ tokenizerId: "openai",
+ tokenizerConfig: {
+ tokensPerName: 1,
+ tokenizerModel: "gpt-4o",
+ tokensPerMessage: 3,
+ },
+ };
+
+ beforeEach(async () => {
+ await pruneDatabase();
+ await Promise.all([
+ prisma.model.create({
+ data: tokenModelData,
+ }),
+ prisma.model.create({
+ data: imageModelData,
+ }),
+ prisma.trace.create({
+ data: {
+ id: traceId,
+ projectId,
+ },
+ }),
+ ]);
+ vi.clearAllMocks();
+ });
+
+ it("should correctly calculate token costs with provided model prices", async () => {
+ const model = {
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ totalPrice: new Decimal(0.03),
+ };
+
+ const tokenCounts = {
+ input_usage_units: 100,
+ output_usage_units: 200,
+ total_usage_units: 300,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: null,
+ provided_output_cost: null,
+ provided_total_cost: null,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBe(1.0); // 100 tokens * 0.01
+ expect(costs.output_cost).toBe(4.0); // 200 tokens * 0.02
+ expect(costs.total_cost).toBe(9.0); // 300 tokens * 0.03
+ });
+
+ it("should correctly calculate token costs with user provided costs", async () => {
+ const model = {
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ };
+
+ const tokenCounts = {
+ input_usage_units: 100,
+ output_usage_units: 200,
+ total_usage_units: 300,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: 2.0,
+ provided_output_cost: 3.0,
+ provided_total_cost: 5.0,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBe(2.0); // Overridden by user provided cost
+ expect(costs.output_cost).toBe(3.0); // Overridden by user provided cost
+ expect(costs.total_cost).toBe(5.0); // Overridden by user provided cost
+ });
+
+ it("should correctly calculate token costs when only some user provided costs are given", async () => {
+ const model = {
+ inputPrice: new Decimal(1),
+ outputPrice: new Decimal(1),
+ };
+
+ const data = [
+ // missing total
+ {
+ userProvidedCosts: {
+ provided_input_cost: 1,
+ provided_output_cost: 2,
+ provided_total_cost: undefined,
+ },
+ expectedCost: {
+ input_cost: 1,
+ output_cost: 2,
+ total_cost: 3,
+ },
+ },
+ // only total
+ {
+ userProvidedCosts: {
+ provided_input_cost: undefined,
+ provided_output_cost: undefined,
+ provided_total_cost: 2,
+ },
+ expectedCost: {
+ input_cost: undefined,
+ output_cost: undefined,
+ total_cost: 2,
+ },
+ },
+ // missing input
+ {
+ userProvidedCosts: {
+ provided_input_cost: undefined,
+ provided_output_cost: 2,
+ provided_total_cost: 2,
+ },
+ expectedCost: {
+ input_cost: undefined,
+ output_cost: 2,
+ total_cost: 2,
+ },
+ },
+ // only input
+ {
+ userProvidedCosts: {
+ provided_input_cost: 1,
+ provided_output_cost: undefined,
+ provided_total_cost: undefined,
+ },
+ expectedCost: {
+ input_cost: 1,
+ output_cost: undefined,
+ total_cost: 1,
+ },
+ },
+
+ // missing output
+ {
+ userProvidedCosts: {
+ provided_input_cost: 1,
+ provided_output_cost: undefined,
+ provided_total_cost: 1,
+ },
+ expectedCost: {
+ input_cost: 1,
+ output_cost: undefined,
+ total_cost: 1,
+ },
+ },
+
+ // only output
+ {
+ userProvidedCosts: {
+ provided_input_cost: undefined,
+ provided_output_cost: 2,
+ provided_total_cost: undefined,
+ },
+ expectedCost: {
+ input_cost: undefined,
+ output_cost: 2,
+ total_cost: 2,
+ },
+ },
+ ];
+
+ for (const { userProvidedCosts, expectedCost } of data) {
+ const tokenCounts = {
+ input_usage_units: 0,
+ output_usage_units: 0,
+ total_usage_units: 0,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts as any,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBe(expectedCost.input_cost);
+ expect(costs.output_cost).toBe(expectedCost.output_cost);
+ expect(costs.total_cost).toBe(expectedCost.total_cost);
+ }
+ });
+
+ it("should return empty costs if no model is provided", async () => {
+ const tokenCounts = {
+ input_usage_units: 100,
+ output_usage_units: 200,
+ total_usage_units: 300,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: null,
+ provided_output_cost: null,
+ provided_total_cost: null,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ null,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBeUndefined();
+ expect(costs.output_cost).toBeUndefined();
+ expect(costs.total_cost).toBeUndefined();
+ });
+
+ it("should handle zero token counts correctly", async () => {
+ const model = {
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ totalPrice: new Decimal(0.03),
+ };
+
+ const tokenCounts = {
+ input_usage_units: 0,
+ output_usage_units: 0,
+ total_usage_units: 0,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: null,
+ provided_output_cost: null,
+ provided_total_cost: null,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBe(0); // 0 tokens * 0.01
+ expect(costs.output_cost).toBe(0); // 0 tokens * 0.02
+ expect(costs.total_cost).toBe(0); // 0 tokens * 0.03
+ });
+
+ it("should handle missing token counts correctly", async () => {
+ const model = {
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ totalPrice: new Decimal(0.03),
+ };
+
+ const tokenCounts = {
+ input_usage_units: undefined,
+ output_usage_units: undefined,
+ total_usage_units: undefined,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: null,
+ provided_output_cost: null,
+ provided_total_cost: null,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBeUndefined();
+ expect(costs.output_cost).toBeUndefined();
+ expect(costs.total_cost).toBeUndefined();
+ });
+
+ it("should handle fractional token counts correctly", async () => {
+ const model = {
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ totalPrice: new Decimal(0.03),
+ };
+
+ const tokenCounts = {
+ input_usage_units: 150.5,
+ output_usage_units: 250.25,
+ total_usage_units: 400.75,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: null,
+ provided_output_cost: null,
+ provided_total_cost: null,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBeCloseTo(1.505); // 150.5 tokens * 0.01
+ expect(costs.output_cost).toBeCloseTo(5.005); // 250.25 tokens * 0.02
+ expect(costs.total_cost).toBeCloseTo(12.0225); // 400.75 tokens * 0.03
+ });
+
+ it("should handle large token counts correctly", async () => {
+ const model = {
+ inputPrice: new Decimal(0.01),
+ outputPrice: new Decimal(0.02),
+ totalPrice: new Decimal(0.03),
+ };
+
+ const tokenCounts = {
+ input_usage_units: 1e6,
+ output_usage_units: 2e6,
+ total_usage_units: 3e6,
+ };
+
+ const userProvidedCosts = {
+ provided_input_cost: null,
+ provided_output_cost: null,
+ provided_total_cost: null,
+ };
+
+ const costs = (IngestionService as any).calculateTokenCosts(
+ model as any,
+ userProvidedCosts,
+ tokenCounts
+ );
+
+ expect(costs.input_cost).toBe(10000); // 1e6 tokens * 0.01
+ expect(costs.output_cost).toBe(40000); // 2e6 tokens * 0.02
+ expect(costs.total_cost).toBe(90000); // 3e6 tokens * 0.03
+ });
+
+ it("should correctly match model prices from the database", async () => {
+ const generationUsage = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationId = uuidv4();
+
+ const events = [
+ {
+ id: generationId,
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage.usage.input * tokenModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage.usage.output * tokenModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage.usage.total * tokenModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage.usage.total);
+ });
+
+ it("should overwrite costs for a generation without previous user provided costs", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage2.usage.input * tokenModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage2.usage.output * tokenModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage2.usage.total * tokenModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should correctly handle first manual tokenization and then provided tokens", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ input: "hello world",
+ output: "",
+ usage: null,
+ };
+
+ const generationUsage2 = {
+ output: "whassup",
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage2.usage.input * tokenModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage2.usage.output * tokenModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage2.usage.total * tokenModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should use the matched model of the previous generation call to calculate costs", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: undefined, // No model provided
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage2.usage.input * tokenModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage2.usage.output * tokenModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage2.usage.total * tokenModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should discard model if following event has different unit", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ totalCost: 10,
+ unit: ModelUsageUnit.Characters, // Different unit for which model is not matched
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(ModelUsageUnit.Characters);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBe(10);
+
+ // Calculated cost
+ expect(generation.input_cost).toBeUndefined();
+ expect(generation.output_cost).toBeUndefined();
+ expect(generation.total_cost).toBe(10);
+ });
+
+ it("should overwrite costs if new costs are user provided", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ inputCost: 1234,
+ outputCost: 23523,
+ totalCost: 5354,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // User provided cost
+ expect(generation.provided_input_cost).toBe(
+ generationUsage2.usage.inputCost
+ );
+ expect(generation.provided_output_cost).toBe(
+ generationUsage2.usage.outputCost
+ );
+ expect(generation.provided_total_cost).toBe(
+ generationUsage2.usage.totalCost
+ );
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(generationUsage2.usage.inputCost);
+ expect(generation.output_cost).toBe(generationUsage2.usage.outputCost);
+ expect(generation.total_cost).toBe(generationUsage2.usage.totalCost);
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should overwrite costs if new costs are user provided and zero", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ inputCost: 0,
+ outputCost: 0,
+ totalCost: 0,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // User provided cost
+ expect(generation.provided_input_cost).toBe(
+ generationUsage2.usage.inputCost
+ );
+ expect(generation.provided_output_cost).toBe(
+ generationUsage2.usage.outputCost
+ );
+ expect(generation.provided_total_cost).toBe(
+ generationUsage2.usage.totalCost
+ );
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(generationUsage2.usage.inputCost);
+ expect(generation.output_cost).toBe(generationUsage2.usage.outputCost);
+ expect(generation.total_cost).toBe(generationUsage2.usage.totalCost);
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should overwrite costs if new costs are user provided and only partial", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ outputCost: 1,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // User provided cost
+ expect(generation.provided_input_cost).toBe(undefined);
+ expect(generation.provided_output_cost).toBe(
+ generationUsage2.usage.outputCost
+ );
+ expect(generation.provided_total_cost).toBe(undefined);
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(undefined);
+ expect(generation.output_cost).toBe(generationUsage2.usage.outputCost);
+ expect(generation.total_cost).toBe(1);
+ expect(generation.input_usage_units).toBe(generationUsage1.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage1.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage1.usage.total);
+ });
+
+ it("should not overwrite costs if previous cost were user provided", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ inputCost: 1234,
+ outputCost: 23523,
+ totalCost: 5354,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // User provided cost
+ expect(generation.provided_input_cost).toBe(
+ generationUsage1.usage.inputCost
+ );
+ expect(generation.provided_output_cost).toBe(
+ generationUsage1.usage.outputCost
+ );
+ expect(generation.provided_total_cost).toBe(
+ generationUsage1.usage.totalCost
+ );
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(generationUsage1.usage.inputCost);
+ expect(generation.output_cost).toBe(generationUsage1.usage.outputCost);
+ expect(generation.total_cost).toBe(generationUsage1.usage.totalCost);
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should not calculate anything if no costs are provided and no model is matched", async () => {
+ const generationUsage1 = {
+ model: undefined, // No model provided
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: undefined, // No model provided
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should not be matched
+ expect(generation.internal_model).toBeUndefined();
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBeUndefined();
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // No calculated cost
+ expect(generation.input_cost).toBeUndefined();
+ expect(generation.output_cost).toBeUndefined();
+ expect(generation.total_cost).toBeUndefined();
+
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should handle different model usage units correctly", async () => {
+ const generationUsage1 = {
+ model: modelName,
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Images, // Different unit
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+ expect(generation.unit).toEqual(imageModelData.unit);
+ expect(generation.internal_model_id).toBe(imageModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage2.usage.input * imageModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage2.usage.output * imageModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage2.usage.total * imageModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage2.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage2.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage2.usage.total);
+ });
+
+ it("should take the latest user provided model for matching", async () => {
+ // Create a new model with the same name but different prices
+ const newModelData = {
+ id: uuidv4(),
+ modelName,
+ matchPattern,
+ startDate: new Date().toISOString(),
+ inputPrice: new Decimal(tokenModelData.inputPrice.toNumber() * 2),
+ outputPrice: new Decimal(tokenModelData.outputPrice.toNumber() * 2),
+ totalPrice: new Decimal(tokenModelData.totalPrice.toNumber() * 2),
+ unit: ModelUsageUnit.Tokens,
+ };
+
+ await prisma.model.create({
+ data: newModelData,
+ });
+
+ const generationUsage = {
+ model: modelName,
+ usage: {
+ input: 100,
+ output: 200,
+ total: 300,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+ expect(generation.unit).toEqual(newModelData.unit);
+ expect(generation.internal_model_id).toBe(newModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage.usage.input * newModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage.usage.output * newModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage.usage.total * newModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage.usage.total);
+ });
+
+ it("should use the tokens of the previous call without model if model comes with following call", async () => {
+ const generationUsage1 = {
+ model: undefined, // No model provided
+ usage: {
+ input: 1,
+ output: 2,
+ total: 3,
+ unit: ModelUsageUnit.Tokens,
+ },
+ };
+
+ const generationUsage2 = {
+ model: modelName,
+ };
+
+ const events = [
+ {
+ id: uuidv4(),
+ type: "generation-create",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage1,
+ },
+ },
+ {
+ id: uuidv4(),
+ type: "generation-update",
+ timestamp: new Date().toISOString(),
+ body: {
+ id: generationId,
+ ...generationUsage2,
+ },
+ },
+ ];
+
+ await (mockIngestionService as any).processObservationEventList({
+ projectId,
+ entityId: generationId,
+ observationEventList: events,
+ });
+ expect(mockAddToClickhouseWriter).toHaveBeenCalled();
+ const args = mockAddToClickhouseWriter.mock.calls[0];
+ const tableName = args[0];
+ const generation = args[1];
+
+ expect(tableName).toBe("observations");
+ expect(generation).toBeDefined();
+ expect(generation.type).toBe("GENERATION");
+
+ // Model name should be matched
+
+ expect(generation.unit).toEqual(tokenModelData.unit);
+ expect(generation.internal_model_id).toBe(tokenModelData.id);
+
+ // No user provided cost
+ expect(generation.provided_input_cost).toBeUndefined();
+ expect(generation.provided_output_cost).toBeUndefined();
+ expect(generation.provided_total_cost).toBeUndefined();
+
+ // Calculated cost
+ expect(generation.input_cost).toBe(
+ generationUsage1.usage.input * tokenModelData.inputPrice.toNumber()
+ );
+ expect(generation.output_cost).toBe(
+ generationUsage1.usage.output * tokenModelData.outputPrice.toNumber()
+ );
+ expect(generation.total_cost).toBe(
+ generationUsage1.usage.total * tokenModelData.totalPrice.toNumber()
+ );
+ expect(generation.input_usage_units).toBe(generationUsage1.usage.input);
+ expect(generation.output_usage_units).toBe(generationUsage1.usage.output);
+ expect(generation.total_usage_units).toBe(generationUsage1.usage.total);
+ });
+});
diff --git a/worker/src/services/IngestionService/tests/utils.unit.test.ts b/worker/src/services/IngestionService/tests/utils.unit.test.ts
new file mode 100644
index 0000000000..6bc85f8296
--- /dev/null
+++ b/worker/src/services/IngestionService/tests/utils.unit.test.ts
@@ -0,0 +1,64 @@
+import { overwriteObject } from "../utils";
+import { expect, describe, it } from "vitest";
+
+describe("overwriteObject", () => {
+ const objA = {
+ id: "1",
+ project_id: "101",
+ name: "Object A",
+ value: 10,
+ metadata: { key1: "value1", key2: "value2" },
+ tags: ["tag4", "tag2"],
+ };
+
+ const objB = {
+ id: "1",
+ project_id: "101",
+ name: "Object B",
+ value: 20,
+ metadata: { key2: "newValue2", key3: "value3" },
+ tags: ["tag1", "tag2", "tag3"],
+ };
+
+ it("should overwrite properties of object A with object B", () => {
+ const result = overwriteObject(objA, objB, []);
+ expect(result.name).toBe("Object B");
+ expect(result.value).toBe(20);
+ });
+
+ it("should not overwrite non-overwritable keys", () => {
+ const result = overwriteObject(objA, objB, ["name"]);
+ expect(result.name).toBe("Object A");
+ expect(result.value).toBe(20);
+ });
+
+ it("should merge metadata correctly", () => {
+ const result = overwriteObject(objA, objB, []);
+ expect(result.metadata).toEqual({
+ key1: '"value1"',
+ key2: '"newValue2"',
+ key3: '"value3"',
+ });
+ });
+
+ it("should merge tags correctly", () => {
+ const result = overwriteObject(objA, objB, []);
+ expect(result.tags).toEqual(["tag1", "tag2", "tag3", "tag4"]);
+ });
+
+ it("should handle cases where metadata is missing in one object", () => {
+ const objC = { ...objA, metadata: undefined };
+ const result = overwriteObject(objC, objB, []);
+ expect(result.metadata).toEqual({
+ key2: "newValue2",
+ key3: "value3",
+ });
+ });
+
+ it("should handle cases where metadata is missing in both objects", () => {
+ const objC = { ...objA, metadata: undefined };
+ const objD = { ...objB, metadata: undefined };
+ const result = overwriteObject(objC, objD, []);
+ expect(result.metadata).toEqual({});
+ });
+});
diff --git a/worker/src/services/IngestionService/utils.ts b/worker/src/services/IngestionService/utils.ts
new file mode 100644
index 0000000000..4c4d2ba68b
--- /dev/null
+++ b/worker/src/services/IngestionService/utils.ts
@@ -0,0 +1,105 @@
+import {
+ JsonNested,
+ convertRecordToJsonSchema,
+ mergeJson,
+} from "@langfuse/shared";
+import _ from "lodash";
+
+export const convertJsonSchemaToRecord = (
+ jsonSchema: JsonNested
+): Record<string, string> => {
+ const record: Record<string, string> = {};
+
+ // if it's a literal, return the value with "metadata" prefix
+ if (typeof jsonSchema === "string" || typeof jsonSchema === "number") {
+ record["metadata"] = jsonSchema.toString();
+ return record;
+ }
+
+ // if it's an array, add the stringified array with "metadata" prefix
+ if (Array.isArray(jsonSchema)) {
+ record["metadata"] = JSON.stringify(jsonSchema);
+ return record;
+ }
+
+ // if it's an object, add each key value pair with a stringified value
+ if (typeof jsonSchema === "object") {
+ for (const key in jsonSchema) {
+ record[key] = JSON.stringify(jsonSchema[key]);
+ }
+ }
+ return record;
+};
+
+export const mergeRecords = (
+ record1?: Record<string, string>,
+ record2?: Record<string, string>
+): Record<string, string> | undefined => {
+ const merged = mergeJson(
+ record1 ? convertRecordToJsonSchema(record1) ?? undefined : undefined,
+ record2 ? convertRecordToJsonSchema(record2) ?? undefined : undefined
+ );
+
+ return merged ? convertJsonSchemaToRecord(merged) : undefined;
+};
+
+export function dedupeAndOverwriteObjectById(
+ insert: {
+ id: string;
+ project_id: string;
+ [key: string]: any;
+ }[],
+ nonOverwritableKeys: string[]
+) {
+ return insert.reduce(
+ (acc, curr) => {
+ const existing = acc.find(
+ (o) => o.id === curr.id && o.project_id === curr.project_id
+ );
+ if (existing) {
+ return acc.map((o) =>
+ o.id === curr.id ? overwriteObject(o, curr, nonOverwritableKeys) : o
+ );
+ }
+ return [...acc, curr];
+ },
+ [] as typeof insert
+ );
+}
+
+export function overwriteObject(
+ a: {
+ id: string;
+ project_id: string;
+ [key: string]: any;
+ },
+ b: {
+ id: string;
+ project_id: string;
+ [key: string]: any;
+ },
+ nonOverwritableKeys: string[]
+) {
+ const result = _.mergeWith({}, a, b, (objValue, srcValue, key) => {
+ if (nonOverwritableKeys.includes(key)) {
+ return objValue;
+ } else {
+ return srcValue;
+ }
+ });
+
+ result.metadata =
+ !a.metadata && b.metadata
+ ? b.metadata
+ : !b.metadata && a.metadata
+ ? a.metadata
+ : mergeRecords(a.metadata, b.metadata) ?? {};
+
+ if ("tags" in result) {
+ result.tags = Array.from(
+ new Set([...(a.tags || []), ...(b.tags || [])])
+ ).sort();
+ }
+
+ return result;
+}
diff --git a/worker/src/utils/logQueueWorkerError.ts b/worker/src/utils/logQueueWorkerError.ts
new file mode 100644
index 0000000000..af940fcc99
--- /dev/null
+++ b/worker/src/utils/logQueueWorkerError.ts
@@ -0,0 +1,11 @@
+import { Job } from "bullmq";
+
+import logger from "../logger";
+
+export function logQueueWorkerError(job: Job | undefined, err: Error) {
+ logger.error(
+ err,
+ `Queue Job ${job?.name} with id ${job?.id} failed with error
+ ${err}`
+ );
+}
diff --git a/worker/src/utils/shutdown.ts b/worker/src/utils/shutdown.ts
new file mode 100644
index 0000000000..c2e68ccd06
--- /dev/null
+++ b/worker/src/utils/shutdown.ts
@@ -0,0 +1,39 @@
+import logger from "../logger";
+
+import { evalJobCreator, evalJobExecutor } from "../queues/evalQueue";
+import { batchExportJobExecutor } from "../queues/batchExportQueue";
+import { flushIngestionQueueExecutor } from "../queues/ingestionFlushQueue";
+import { repeatQueueExecutor } from "../queues/repeatQueue";
+import { ClickhouseWriter } from "../services/ClickhouseWriter";
+import { setSigtermReceived } from "../features/health";
+import { server } from "../index";
+
+export const onShutdown: NodeJS.SignalsListener = async (signal) => {
+ logger.info(`Received ${signal}, closing server...`);
+ setSigtermReceived();
+
+ // Stop accepting new connections
+ server.close();
+ logger.info("Server has been closed.");
+
+ // Shutdown workers (https://docs.bullmq.io/guide/going-to-production#gracefully-shut-down-workers)
+ const workers = [
+ evalJobCreator,
+ evalJobExecutor,
+ batchExportJobExecutor,
+ flushIngestionQueueExecutor,
+ repeatQueueExecutor,
+ ];
+
+ await Promise.all(workers.map((worker) => worker?.close()));
+ logger.info("All workers have been closed.");
+
+ // Flush all pending writes to Clickhouse AFTER closing ingestion queue worker that is writing to it
+ await ClickhouseWriter.getInstance().shutdown();
+ logger.info("Clickhouse writer has been shut down.");
+
+ redis?.disconnect();
+ logger.info("Redis connection has been closed.");
+
+ logger.info("Shutdown complete, exiting process...");
+};
diff --git a/worker/tsconfig.json b/worker/tsconfig.json
index af5c6d8509..10d75b5b57 100644
--- a/worker/tsconfig.json
+++ b/worker/tsconfig.json
@@ -6,11 +6,11 @@
"moduleResolution": "Node16",
"declaration": false,
"declarationMap": false,
- "lib": ["ES2015"],
+ "lib": ["ES2021"],
"outDir": "./dist",
"types": ["node"],
"downlevelIteration": true
},
"include": ["."],
- "exclude": ["node_modules", "dist"]
+ "exclude": ["node_modules", "dist", "src/**/*.test.ts"]
}