From a9b630a65f7ce0f1cae284e4fa9c2156d2288e09 Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Wed, 17 Sep 2025 01:49:15 +0800 Subject: [PATCH 1/2] feat(schema): document --- cspell.config.yaml | 1 + drizzle/0015_huge_layla_miller.sql | 21 + drizzle/meta/0015_snapshot.json | 1052 ++++++++++++++++++++++++ drizzle/meta/_journal.json | 9 +- packages/core/package.json | 1 + packages/core/src/models/documents.ts | 102 +++ packages/core/src/schemas/documents.ts | 30 + pnpm-lock.yaml | 847 +++---------------- 8 files changed, 1341 insertions(+), 722 deletions(-) create mode 100644 drizzle/0015_huge_layla_miller.sql create mode 100644 drizzle/meta/0015_snapshot.json create mode 100644 packages/core/src/models/documents.ts create mode 100644 packages/core/src/schemas/documents.ts diff --git a/cspell.config.yaml b/cspell.config.yaml index 8e31950af..d5104e1d6 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -15,6 +15,7 @@ words: - elysiajs - eslintcache - Eventa + - Firecrawl - formkit - gramsearch - guiiai diff --git a/drizzle/0015_huge_layla_miller.sql b/drizzle/0015_huge_layla_miller.sql new file mode 100644 index 000000000..671e4767e --- /dev/null +++ b/drizzle/0015_huge_layla_miller.sql @@ -0,0 +1,21 @@ +CREATE TABLE "documents" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "chat_messages_id" uuid NOT NULL, + "tags" jsonb DEFAULT '[]'::jsonb NOT NULL, + "raw_content" text DEFAULT '' NOT NULL, + "processed_content" text DEFAULT '' NOT NULL, + "processed_content_jieba_tokens" jsonb DEFAULT '[]'::jsonb NOT NULL, + "summary" text DEFAULT '' NOT NULL, + "summary_vector_1536" vector(1536), + "summary_vector_1024" vector(1024), + "summary_vector_768" vector(768), + "created_at" bigint DEFAULT 0 NOT NULL, + "updated_at" bigint DEFAULT 0 NOT NULL, + "deleted_at" bigint DEFAULT 0 NOT NULL +); +--> statement-breakpoint +ALTER TABLE "documents" ADD CONSTRAINT "documents_chat_messages_id_chat_messages_id_fk" FOREIGN KEY ("chat_messages_id") REFERENCES "public"."chat_messages"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "documents_summary_vector_1536_index" ON "documents" USING hnsw ("summary_vector_1536" vector_cosine_ops);--> statement-breakpoint +CREATE INDEX "documents_summary_vector_1024_index" ON "documents" USING hnsw ("summary_vector_1024" vector_cosine_ops);--> statement-breakpoint +CREATE INDEX "documents_summary_vector_768_index" ON "documents" USING hnsw ("summary_vector_768" vector_cosine_ops);--> statement-breakpoint +CREATE INDEX "documents_processed_content_jieba_tokens_index" ON "documents" USING gin ("processed_content_jieba_tokens" jsonb_path_ops); \ No newline at end of file diff --git a/drizzle/meta/0015_snapshot.json b/drizzle/meta/0015_snapshot.json new file mode 100644 index 000000000..be4d5f8cf --- /dev/null +++ b/drizzle/meta/0015_snapshot.json @@ -0,0 +1,1052 @@ +{ + "id": "66673ece-7690-4a99-a43b-891bd4d879ac", + "prevId": "b7d8327f-a2ee-4840-980c-4f70b39b7461", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.chat_messages": { + "name": "chat_messages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "platform_message_id": { + "name": "platform_message_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "from_id": { + "name": "from_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "from_name": { + "name": "from_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "in_chat_id": { + "name": "in_chat_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_reply": { + "name": "is_reply", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "reply_to_name": { + "name": "reply_to_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "reply_to_id": { + "name": "reply_to_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "platform_timestamp": { + "name": "platform_timestamp", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "deleted_at": { + "name": "deleted_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "content_vector_1536": { + "name": "content_vector_1536", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "content_vector_1024": { + "name": "content_vector_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "content_vector_768": { + "name": "content_vector_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + }, + "jieba_tokens": { + "name": "jieba_tokens", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "chat_messages_platform_platform_message_id_in_chat_id_unique_index": { + "name": "chat_messages_platform_platform_message_id_in_chat_id_unique_index", + "columns": [ + { + "expression": "platform", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "platform_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "in_chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_messages_content_vector_1536_index": { + "name": "chat_messages_content_vector_1536_index", + "columns": [ + { + "expression": "content_vector_1536", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "chat_messages_content_vector_1024_index": { + "name": "chat_messages_content_vector_1024_index", + "columns": [ + { + "expression": "content_vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "chat_messages_content_vector_768_index": { + "name": "chat_messages_content_vector_768_index", + "columns": [ + { + "expression": "content_vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "jieba_tokens_index": { + "name": "jieba_tokens_index", + "columns": [ + { + "expression": "jieba_tokens", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "jsonb_path_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chat_messages_id": { + "name": "chat_messages_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tags": { + "name": "tags", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "raw_content": { + "name": "raw_content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "processed_content": { + "name": "processed_content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "processed_content_jieba_tokens": { + "name": "processed_content_jieba_tokens", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "summary_vector_1536": { + "name": "summary_vector_1536", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "summary_vector_1024": { + "name": "summary_vector_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "summary_vector_768": { + "name": "summary_vector_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "deleted_at": { + "name": "deleted_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "documents_summary_vector_1536_index": { + "name": "documents_summary_vector_1536_index", + "columns": [ + { + "expression": "summary_vector_1536", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "documents_summary_vector_1024_index": { + "name": "documents_summary_vector_1024_index", + "columns": [ + { + "expression": "summary_vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "documents_summary_vector_768_index": { + "name": "documents_summary_vector_768_index", + "columns": [ + { + "expression": "summary_vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "documents_processed_content_jieba_tokens_index": { + "name": "documents_processed_content_jieba_tokens_index", + "columns": [ + { + "expression": "processed_content_jieba_tokens", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "jsonb_path_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "documents_chat_messages_id_chat_messages_id_fk": { + "name": "documents_chat_messages_id_chat_messages_id_fk", + "tableFrom": "documents", + "tableTo": "chat_messages", + "columnsFrom": [ + "chat_messages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.joined_chats": { + "name": "joined_chats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "chat_id": { + "name": "chat_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "chat_name": { + "name": "chat_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "chat_type": { + "name": "chat_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "joined_chats_chat_id_unique": { + "name": "joined_chats_chat_id_unique", + "nullsNotDistinct": false, + "columns": [ + "chat_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.photos": { + "name": "photos", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "message_id": { + "name": "message_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "image_bytes": { + "name": "image_bytes", + "type": "bytea", + "primaryKey": false, + "notNull": false + }, + "image_path": { + "name": "image_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "caption": { + "name": "caption", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description_vector_1536": { + "name": "description_vector_1536", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "description_vector_1024": { + "name": "description_vector_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "description_vector_768": { + "name": "description_vector_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "photos_platform_file_id_unique_index": { + "name": "photos_platform_file_id_unique_index", + "columns": [ + { + "expression": "platform", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "photos_description_vector_1536_index": { + "name": "photos_description_vector_1536_index", + "columns": [ + { + "expression": "description_vector_1536", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "photos_description_vector_1024_index": { + "name": "photos_description_vector_1024_index", + "columns": [ + { + "expression": "description_vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "photos_description_vector_768_index": { + "name": "photos_description_vector_768_index", + "columns": [ + { + "expression": "description_vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "photos_message_id_index": { + "name": "photos_message_id_index", + "columns": [ + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.recent_sent_stickers": { + "name": "recent_sent_stickers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sticker_id": { + "name": "sticker_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": { + "recent_sent_stickers_sticker_id_stickers_id_fk": { + "name": "recent_sent_stickers_sticker_id_stickers_id_fk", + "tableFrom": "recent_sent_stickers", + "tableTo": "stickers", + "columnsFrom": [ + "sticker_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sticker_packs": { + "name": "sticker_packs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "platform_id": { + "name": "platform_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "sticker_packs_platform_platform_id_unique_index": { + "name": "sticker_packs_platform_platform_id_unique_index", + "columns": [ + { + "expression": "platform", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "platform_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.stickers": { + "name": "stickers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "emoji": { + "name": "emoji", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sticker_bytes": { + "name": "sticker_bytes", + "type": "bytea", + "primaryKey": false, + "notNull": false + }, + "sticker_path": { + "name": "sticker_path", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "created_at": { + "name": "created_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description_vector_1536": { + "name": "description_vector_1536", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "description_vector_1024": { + "name": "description_vector_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "description_vector_768": { + "name": "description_vector_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "stickers_platform_file_id_unique": { + "name": "stickers_platform_file_id_unique", + "columns": [ + { + "expression": "platform", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "stickers_description_vector_1536_index": { + "name": "stickers_description_vector_1536_index", + "columns": [ + { + "expression": "description_vector_1536", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "stickers_description_vector_1024_index": { + "name": "stickers_description_vector_1024_index", + "columns": [ + { + "expression": "description_vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + }, + "stickers_description_vector_768_index": { + "name": "stickers_description_vector_768_index", + "columns": [ + { + "expression": "description_vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": { + "public.chat_message_stats": { + "columns": { + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_name": { + "name": "chat_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "message_count": { + "name": "message_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "first_message_id": { + "name": "first_message_id", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "first_message_at": { + "name": "first_message_at", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "latest_message_id": { + "name": "latest_message_id", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "latest_message_at": { + "name": "latest_message_at", + "type": "bigint", + "primaryKey": false, + "notNull": false + } + }, + "definition": "\n SELECT \n jc.platform, \n jc.chat_id, \n jc.chat_name, \n COUNT(cm.id)::int AS message_count,\n MIN(cm.platform_message_id) AS first_message_id,\n MIN(cm.created_at) AS first_message_at,\n MAX(cm.platform_message_id) AS latest_message_id,\n MAX(cm.created_at) AS latest_message_at\n FROM joined_chats jc\n LEFT JOIN chat_messages cm ON jc.chat_id = cm.in_chat_id\n GROUP BY jc.platform, jc.chat_id, jc.chat_name\n ", + "name": "chat_message_stats", + "schema": "public", + "isExisting": false, + "materialized": false + } + }, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index e9c2db104..3cf487809 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -106,6 +106,13 @@ "when": 1752255430771, "tag": "0014_free_vin_gonzales", "breakpoints": true + }, + { + "idx": 15, + "version": "7", + "when": 1758040646001, + "tag": "0015_huge_layla_miller", + "breakpoints": true } ] -} +} \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index b746f82b9..c7c959a18 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@electric-sql/pglite": "^0.3.8", + "@mendable/firecrawl-js": "^4.3.5", "@moeru/std": "0.1.0-beta.10", "@node-rs/jieba": "^2.0.1", "@proj-airi/drizzle-orm-browser-migrator": "^0.1.3", diff --git a/packages/core/src/models/documents.ts b/packages/core/src/models/documents.ts new file mode 100644 index 000000000..6a22b0322 --- /dev/null +++ b/packages/core/src/models/documents.ts @@ -0,0 +1,102 @@ +import type { CorePagination } from '@tg-search/common' + +import { useLogger } from '@unbird/logg' +import { Ok } from '@unbird/result' +import { desc, eq, sql } from 'drizzle-orm' + +import { withDb } from '../db' +import { documentsTable } from '../schemas/documents' + +export async function recordDocuments(documents: { + chatMessagesId: string + rawContent: string + processedContent: string + processedContentJiebaTokens: string[] + summary: string + summaryVector1536?: number[] + summaryVector1024?: number[] + summaryVector768?: number[] + tags?: string[] +}[]) { + if (documents.length === 0) { + return Ok(undefined) + } + + return withDb(async db => db + .insert(documentsTable) + .values(documents.map(doc => ({ + chat_messages_id: doc.chatMessagesId, + raw_content: doc.rawContent, + processed_content: doc.processedContent, + processed_content_jieba_tokens: doc.processedContentJiebaTokens, + summary: doc.summary, + summary_vector_1536: doc.summaryVector1536, + summary_vector_1024: doc.summaryVector1024, + summary_vector_768: doc.summaryVector768, + tags: doc.tags || [], + }))) + .onConflictDoUpdate({ + target: [documentsTable.chat_messages_id], + set: { + raw_content: sql`excluded.raw_content`, + processed_content: sql`excluded.processed_content`, + processed_content_jieba_tokens: sql`excluded.processed_content_jieba_tokens`, + summary: sql`excluded.summary`, + summary_vector_1536: sql`COALESCE(excluded.summary_vector_1536, ${documentsTable.summary_vector_1536})`, + summary_vector_1024: sql`COALESCE(excluded.summary_vector_1024, ${documentsTable.summary_vector_1024})`, + summary_vector_768: sql`COALESCE(excluded.summary_vector_768, ${documentsTable.summary_vector_768})`, + tags: sql`excluded.tags`, + updated_at: Date.now(), + }, + }) + .returning(), + ) +} + +export async function fetchDocuments(chatMessagesId: string, pagination: CorePagination) { + return withDb(async db => db + .select() + .from(documentsTable) + .where(eq(documentsTable.chat_messages_id, chatMessagesId)) + .orderBy(desc(documentsTable.created_at)) + .limit(pagination.limit) + .offset(pagination.offset), + ) +} + +export async function retrieveDocuments( + content: { + text?: string + embedding?: number[] + }, + pagination?: CorePagination, +) { + const logger = useLogger('models:documents:retrieveDocuments') + const documents = [] + + if (content.text) { + const relevantDocs = (await withDb(async db => db + .select() + .from(documentsTable) + .where(sql`${documentsTable.processed_content_jieba_tokens} @> ${content.text}`) + .limit(pagination?.limit || 10) + .offset(pagination?.offset || 0), + )).unwrap() + logger.withFields({ relevantDocs: relevantDocs.length }).verbose('Retrieved jieba documents') + documents.push(...relevantDocs) + } + + if (content.embedding && content.embedding.length > 0) { + const relevantDocs = (await withDb(async db => db + .select() + .from(documentsTable) + .where(sql`${documentsTable.summary_vector_1536} <=> ${content.embedding}`) + .limit(pagination?.limit || 10) + .offset(pagination?.offset || 0), + )).unwrap() + logger.withFields({ relevantDocs: relevantDocs.length }).verbose('Retrieved vector documents') + documents.push(...relevantDocs) + } + + return Ok(documents) +} diff --git a/packages/core/src/schemas/documents.ts b/packages/core/src/schemas/documents.ts new file mode 100644 index 000000000..b6b06c085 --- /dev/null +++ b/packages/core/src/schemas/documents.ts @@ -0,0 +1,30 @@ +// https://github.com/moeru-ai/airi/blob/main/services/telegram-bot/src/db/schema.ts + +import { bigint, index, jsonb, pgTable, text, uuid, vector } from 'drizzle-orm/pg-core' + +import { chatMessagesTable } from './chat_messages' + +export const documentsTable = pgTable('documents', { + id: uuid().primaryKey().defaultRandom(), + chat_messages_id: uuid().notNull().references(() => chatMessagesTable.id), + + tags: jsonb().notNull().default([]), + raw_content: text().notNull().default(''), + processed_content: text().notNull().default(''), + + processed_content_jieba_tokens: jsonb().notNull().default([]), + + summary: text().notNull().default(''), + summary_vector_1536: vector({ dimensions: 1536 }), + summary_vector_1024: vector({ dimensions: 1024 }), + summary_vector_768: vector({ dimensions: 768 }), + + created_at: bigint({ mode: 'number' }).notNull().default(0).$defaultFn(() => Date.now()), + updated_at: bigint({ mode: 'number' }).notNull().default(0).$defaultFn(() => Date.now()), + deleted_at: bigint({ mode: 'number' }).notNull().default(0), +}, table => [ + index('documents_summary_vector_1536_index').using('hnsw', table.summary_vector_1536.op('vector_cosine_ops')), + index('documents_summary_vector_1024_index').using('hnsw', table.summary_vector_1024.op('vector_cosine_ops')), + index('documents_summary_vector_768_index').using('hnsw', table.summary_vector_768.op('vector_cosine_ops')), + index('documents_processed_content_jieba_tokens_index').using('gin', table.processed_content_jieba_tokens.op('jsonb_path_ops')), +]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0688fa9ff..ef0e56c21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,11 +136,11 @@ importers: version: 4.5.1(vue@3.5.21(typescript@5.9.2)) vue-sonner: specifier: 'catalog:' - version: 2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) + version: 2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) devDependencies: '@proj-airi/unplugin-drizzle-orm-migrations': specifier: ^0.1.3 - version: 0.1.3(magicast@0.3.5)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) + version: 0.1.3(magicast@0.3.5)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) '@unocss/eslint-config': specifier: ^66.5.1 version: 66.5.1(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) @@ -152,28 +152,28 @@ importers: version: 66.5.1 '@vitejs/plugin-vue': specifier: ^6.0.1 - version: 6.0.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) + version: 6.0.1(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) '@vue-macros/volar': specifier: ^3.0.0-beta.23 version: 3.0.0-beta.23(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2)) unocss: specifier: ^66.5.1 - version: 66.5.1(postcss@8.5.6)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) + version: 66.5.1(postcss@8.5.6)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) unplugin-vue-macros: specifier: ^2.14.5 - version: 2.14.5(@vueuse/core@13.9.0(vue@3.5.21(typescript@5.9.2)))(esbuild@0.25.9)(rollup@4.43.0)(typescript@5.9.2)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(webpack@5.101.3(esbuild@0.25.9)) + version: 2.14.5(@vueuse/core@13.9.0(vue@3.5.21(typescript@5.9.2)))(esbuild@0.25.9)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rollup@4.43.0)(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(webpack@5.101.3(esbuild@0.25.9)) unplugin-vue-router: specifier: ^0.15.0 version: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vite-plugin-inspect: specifier: ^11.3.3 - version: 11.3.3(@nuxt/kit@3.18.1(magicast@0.3.5))(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) + version: 11.3.3(@nuxt/kit@4.0.3(magicast@0.3.5))(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) vite-plugin-vue-devtools: specifier: ^8.0.2 - version: 8.0.2(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) + version: 8.0.2(@nuxt/kit@4.0.3(magicast@0.3.5))(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) vite-plugin-vue-layouts: specifier: ^0.11.0 - version: 0.11.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) + version: 0.11.0(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) vue-tsc: specifier: ^3.0.7 version: 3.0.7(typescript@5.9.2) @@ -246,11 +246,11 @@ importers: version: 3.5.21(typescript@5.9.2) vue-sonner: specifier: 'catalog:' - version: 2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(yaml@2.8.1) + version: 2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) devDependencies: '@proj-airi/unplugin-drizzle-orm-migrations': specifier: ^0.1.3 - version: 0.1.3(magicast@0.3.5)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) + version: 0.1.3(magicast@0.3.5)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) '@types/culori': specifier: ^4.0.1 version: 4.0.1 @@ -287,6 +287,9 @@ importers: '@electric-sql/pglite': specifier: ^0.3.8 version: 0.3.8 + '@mendable/firecrawl-js': + specifier: ^4.3.5 + version: 4.3.5 '@moeru/std': specifier: 0.1.0-beta.10 version: 0.1.0-beta.10 @@ -419,7 +422,7 @@ importers: version: 4.5.1(vue@3.5.21(typescript@5.9.2)) vue-sonner: specifier: 'catalog:' - version: 2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) + version: 2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) devDependencies: '@unocss/eslint-config': specifier: ^66.5.1 @@ -1371,6 +1374,10 @@ packages: engines: {node: '>=18'} hasBin: true + '@mendable/firecrawl-js@4.3.5': + resolution: {integrity: sha512-6Vd0bEVD0hOS4SXlmrBnOkm86WWqEITHSTXwdnjm6SkTz6ZF6o85gGHUvOYoky4w7AoLctAv8yqrm6aZsy4lfQ==} + engines: {node: '>=22.0.0'} + '@moeru/std@0.1.0-beta.10': resolution: {integrity: sha512-dFTptg/pB4AVmNiPvZQh/NKNIbEw37uY8qEGUPlmsVchkyDZJvBkmWBBJy9bFMLDYblZT5DIspCq7EOIRA0NpA==} @@ -3361,6 +3368,9 @@ packages: async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + autoprefixer@10.4.21: resolution: {integrity: sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==} engines: {node: ^10 || ^12 || >=14} @@ -3368,6 +3378,9 @@ packages: peerDependencies: postcss: ^8.1.0 + axios@1.12.2: + resolution: {integrity: sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==} + b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} @@ -3574,6 +3587,10 @@ packages: colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} @@ -3812,6 +3829,10 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + denque@2.1.0: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} @@ -4107,6 +4128,10 @@ packages: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + es-toolkit@1.39.10: resolution: {integrity: sha512-E0iGnTtbDhkeczB0T+mxmoVlT4YNweEKBLq7oaU4p11mecdsZpNWOglI4895Vh4usbQ+LsJiuLuI2L0Vdmfm2w==} @@ -4515,10 +4540,23 @@ packages: fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + follow-redirects@1.15.11: + resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + foreground-child@3.3.1: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} + form-data@4.0.4: + resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} + engines: {node: '>= 6'} + format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} @@ -4673,6 +4711,10 @@ packages: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -6044,6 +6086,9 @@ packages: protocols@2.0.2: resolution: {integrity: sha512-hHVTzba3wboROl0/aWRRG9dMytgH6ow//STBZh43l/wQgmMhYhOFi0EHWAPtoCz9IAUymsyP0TSBHkhgMEGNnQ==} + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + pump@3.0.3: resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} @@ -6754,6 +6799,9 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} + typescript-event-target@1.1.1: + resolution: {integrity: sha512-dFSOFBKV6uwaloBCCUhxlD3Pr/P1a/tJdcmPrTXCHlEFD3faj0mztjcGn6VBAhQ0/Bdy8K3VWrrqwbt/ffsYsg==} + typescript@5.9.2: resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==} engines: {node: '>=14.17'} @@ -7420,6 +7468,11 @@ packages: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} + zod-to-json-schema@3.24.6: + resolution: {integrity: sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==} + peerDependencies: + zod: ^3.24.1 + zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} @@ -8246,6 +8299,15 @@ snapshots: - encoding - supports-color + '@mendable/firecrawl-js@4.3.5': + dependencies: + axios: 1.12.2 + typescript-event-target: 1.1.1 + zod: 3.25.76 + zod-to-json-schema: 3.24.6(zod@3.25.76) + transitivePeerDependencies: + - debug + '@moeru/std@0.1.0-beta.10': {} '@napi-rs/wasm-runtime@0.2.12': @@ -8462,14 +8524,6 @@ snapshots: transitivePeerDependencies: - magicast - '@nuxt/devtools-kit@2.6.3(magicast@0.3.5)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))': - dependencies: - '@nuxt/kit': 3.18.1(magicast@0.3.5) - execa: 8.0.1 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - transitivePeerDependencies: - - magicast - '@nuxt/devtools-wizard@2.6.3': dependencies: consola: 3.4.2 @@ -8522,47 +8576,6 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@2.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2))': - dependencies: - '@nuxt/devtools-kit': 2.6.3(magicast@0.3.5)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - '@nuxt/devtools-wizard': 2.6.3 - '@nuxt/kit': 3.18.1(magicast@0.3.5) - '@vue/devtools-core': 7.7.7(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - '@vue/devtools-kit': 7.7.7 - birpc: 2.5.0 - consola: 3.4.2 - destr: 2.0.5 - error-stack-parser-es: 1.0.5 - execa: 8.0.1 - fast-npm-meta: 0.4.6 - get-port-please: 3.2.0 - hookable: 5.5.3 - image-meta: 0.2.1 - is-installed-globally: 1.0.0 - launch-editor: 2.11.1 - local-pkg: 1.1.2 - magicast: 0.3.5 - nypm: 0.6.1 - ohash: 2.0.11 - pathe: 2.0.3 - perfect-debounce: 1.0.0 - pkg-types: 2.3.0 - semver: 7.7.2 - simple-git: 3.28.0 - sirv: 3.0.1 - structured-clone-es: 1.0.0 - tinyglobby: 0.2.15 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-plugin-inspect: 11.3.3(@nuxt/kit@3.18.1(magicast@0.3.5))(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - vite-plugin-vue-tracer: 1.0.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - which: 5.0.0 - ws: 8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - vue - '@nuxt/kit@3.18.1(magicast@0.3.5)': dependencies: c12: 3.2.0(magicast@0.3.5) @@ -8642,64 +8655,7 @@ snapshots: transitivePeerDependencies: - magicast - '@nuxt/vite-builder@4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1)': - dependencies: - '@nuxt/kit': 4.0.3(magicast@0.3.5) - '@rollup/plugin-replace': 6.0.2(rollup@4.43.0) - '@vitejs/plugin-vue': 6.0.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - '@vitejs/plugin-vue-jsx': 5.0.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - autoprefixer: 10.4.21(postcss@8.5.6) - consola: 3.4.2 - cssnano: 7.1.1(postcss@8.5.6) - defu: 6.1.4 - esbuild: 0.25.9 - escape-string-regexp: 5.0.0 - exsolve: 1.0.7 - get-port-please: 3.2.0 - h3: 1.15.4 - jiti: 2.5.1 - knitwork: 1.2.0 - magic-string: 0.30.17 - mlly: 1.7.4 - mocked-exports: 0.1.1 - pathe: 2.0.3 - pkg-types: 2.3.0 - postcss: 8.5.6 - rollup-plugin-visualizer: 6.0.3(rolldown@1.0.0-beta.38)(rollup@4.43.0) - std-env: 3.9.0 - ufo: 1.6.1 - unenv: 2.0.0-rc.19 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-plugin-checker: 0.10.2(eslint@9.35.0(jiti@2.5.1))(optionator@0.9.4)(typescript@5.9.2)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2)) - vue: 3.5.21(typescript@5.9.2) - vue-bundle-renderer: 2.1.2 - transitivePeerDependencies: - - '@biomejs/biome' - - '@types/node' - - eslint - - less - - lightningcss - - magicast - - meow - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - stylelint - - stylus - - sugarss - - supports-color - - terser - - tsx - - typescript - - vls - - vti - - vue-tsc - - yaml - - '@nuxt/vite-builder@4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1)': + '@nuxt/vite-builder@4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1)': dependencies: '@nuxt/kit': 4.0.3(magicast@0.3.5) '@rollup/plugin-replace': 6.0.2(rollup@4.43.0) @@ -9041,16 +8997,6 @@ snapshots: transitivePeerDependencies: - magicast - '@proj-airi/unplugin-drizzle-orm-migrations@0.1.3(magicast@0.3.5)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))': - dependencies: - c12: 3.2.0(magicast@0.3.5) - uncrypto: 0.1.3 - unplugin: 2.3.10 - optionalDependencies: - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - transitivePeerDependencies: - - magicast - '@quansync/fs@0.1.5': dependencies: quansync: 0.2.11 @@ -9610,14 +9556,6 @@ snapshots: optionalDependencies: vite: rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - '@unocss/astro@66.5.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))': - dependencies: - '@unocss/core': 66.5.1 - '@unocss/reset': 66.5.1 - '@unocss/vite': 66.5.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - optionalDependencies: - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - '@unocss/cli@66.5.1': dependencies: '@jridgewell/remapping': 2.3.5 @@ -9780,19 +9718,6 @@ snapshots: unplugin-utils: 0.3.0 vite: rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - '@unocss/vite@66.5.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))': - dependencies: - '@jridgewell/remapping': 2.3.5 - '@unocss/config': 66.5.1 - '@unocss/core': 66.5.1 - '@unocss/inspector': 66.5.1 - chokidar: 3.6.0 - magic-string: 0.30.19 - pathe: 2.0.3 - tinyglobby: 0.2.15 - unplugin-utils: 0.3.0 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - '@vercel/nft@0.29.4(encoding@0.1.13)(rollup@4.43.0)': dependencies: '@mapbox/node-pre-gyp': 2.0.0(encoding@0.1.13) @@ -10047,15 +9972,6 @@ snapshots: transitivePeerDependencies: - typescript - '@vue-macros/devtools@0.4.1(typescript@5.9.2)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))': - dependencies: - sirv: 3.0.1 - vue: 3.5.21(typescript@5.9.2) - optionalDependencies: - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - transitivePeerDependencies: - - typescript - '@vue-macros/export-expose@0.3.5(vue@3.5.21(typescript@5.9.2))': dependencies: '@vue-macros/common': 1.16.1(vue@3.5.21(typescript@5.9.2)) @@ -10317,18 +10233,6 @@ snapshots: transitivePeerDependencies: - vite - '@vue/devtools-core@7.7.7(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2))': - dependencies: - '@vue/devtools-kit': 7.7.7 - '@vue/devtools-shared': 7.7.7 - mitt: 3.0.1 - nanoid: 5.1.5 - pathe: 2.0.3 - vite-hot-client: 2.1.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - vue: 3.5.21(typescript@5.9.2) - transitivePeerDependencies: - - vite - '@vue/devtools-core@8.0.2(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2))': dependencies: '@vue/devtools-kit': 8.0.2 @@ -10341,18 +10245,6 @@ snapshots: transitivePeerDependencies: - vite - '@vue/devtools-core@8.0.2(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2))': - dependencies: - '@vue/devtools-kit': 8.0.2 - '@vue/devtools-shared': 8.0.2 - mitt: 3.0.1 - nanoid: 5.1.5 - pathe: 2.0.3 - vite-hot-client: 2.1.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - vue: 3.5.21(typescript@5.9.2) - transitivePeerDependencies: - - vite - '@vue/devtools-kit@7.7.7': dependencies: '@vue/devtools-shared': 7.7.7 @@ -10772,6 +10664,8 @@ snapshots: async@3.2.6: {} + asynckit@0.4.0: {} + autoprefixer@10.4.21(postcss@8.5.6): dependencies: browserslist: 4.25.1 @@ -10782,6 +10676,14 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 + axios@1.12.2: + dependencies: + follow-redirects: 1.15.11 + form-data: 4.0.4 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + b4a@1.6.7: {} balanced-match@1.0.2: {} @@ -11007,6 +10909,10 @@ snapshots: color: 3.2.1 text-hex: 1.0.0 + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + commander@10.0.1: {} commander@11.1.0: {} @@ -11212,6 +11118,8 @@ snapshots: defu@6.1.4: {} + delayed-stream@1.0.0: {} + denque@2.1.0: {} depd@2.0.0: {} @@ -11410,6 +11318,13 @@ snapshots: dependencies: es-errors: 1.3.0 + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + es-toolkit@1.39.10: {} es5-ext@0.10.64: @@ -11985,11 +11900,21 @@ snapshots: fn.name@1.1.0: {} + follow-redirects@1.15.11: {} + foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 + form-data@4.0.4: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.2 + mime-types: 2.1.35 + format@0.2.2: {} formdata-polyfill@4.0.10: @@ -12148,6 +12073,10 @@ snapshots: has-symbols@1.1.0: {} + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -12928,15 +12857,13 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 - mime-db@1.52.0: - optional: true + mime-db@1.52.0: {} mime-db@1.54.0: {} mime-types@2.1.35: dependencies: mime-db: 1.52.0 - optional: true mime-types@3.0.1: dependencies: @@ -13188,7 +13115,7 @@ snapshots: dependencies: boolbase: 1.0.0 - nuxt@4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1): + nuxt@4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1): dependencies: '@nuxt/cli': 3.28.0(magicast@0.3.5) '@nuxt/devalue': 2.0.2 @@ -13196,7 +13123,7 @@ snapshots: '@nuxt/kit': 4.0.3(magicast@0.3.5) '@nuxt/schema': 4.0.3 '@nuxt/telemetry': 2.6.6(magicast@0.3.5) - '@nuxt/vite-builder': 4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1) + '@nuxt/vite-builder': 4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1) '@unhead/vue': 2.0.14(vue@3.5.21(typescript@5.9.2)) '@vue/shared': 3.5.21 c12: 3.2.0(magicast@0.3.5) @@ -13312,257 +13239,9 @@ snapshots: - xml2js - yaml - nuxt@4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(yaml@2.8.1): + nypm@0.6.1: dependencies: - '@nuxt/cli': 3.28.0(magicast@0.3.5) - '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 2.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - '@nuxt/kit': 4.0.3(magicast@0.3.5) - '@nuxt/schema': 4.0.3 - '@nuxt/telemetry': 2.6.6(magicast@0.3.5) - '@nuxt/vite-builder': 4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1) - '@unhead/vue': 2.0.14(vue@3.5.21(typescript@5.9.2)) - '@vue/shared': 3.5.21 - c12: 3.2.0(magicast@0.3.5) - chokidar: 4.0.3 - compatx: 0.2.0 - consola: 3.4.2 - cookie-es: 2.0.0 - defu: 6.1.4 - destr: 2.0.5 - devalue: 5.1.1 - errx: 0.1.0 - esbuild: 0.25.9 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - exsolve: 1.0.7 - h3: 1.15.4 - hookable: 5.5.3 - ignore: 7.0.5 - impound: 1.0.0 - jiti: 2.5.1 - klona: 2.0.6 - knitwork: 1.2.0 - magic-string: 0.30.17 - mlly: 1.7.4 - mocked-exports: 0.1.1 - nanotar: 0.2.0 - nitropack: 2.12.4(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(rolldown@1.0.0-beta.38) - nypm: 0.6.1 - ofetch: 1.4.1 - ohash: 2.0.11 - on-change: 5.0.1 - oxc-minify: 0.80.0 - oxc-parser: 0.80.0 - oxc-transform: 0.80.0 - oxc-walker: 0.4.0(oxc-parser@0.80.0) - pathe: 2.0.3 - perfect-debounce: 1.0.0 - pkg-types: 2.3.0 - radix3: 1.1.2 - scule: 1.3.0 - semver: 7.7.2 - std-env: 3.9.0 - strip-literal: 3.0.0 - tinyglobby: 0.2.14 - ufo: 1.6.1 - ultrahtml: 1.6.0 - uncrypto: 0.1.3 - unctx: 2.4.1 - unimport: 5.2.0 - unplugin: 2.3.8 - unplugin-vue-router: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) - unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(ioredis@5.7.0) - untyped: 2.0.0 - vue: 3.5.21(typescript@5.9.2) - vue-bundle-renderer: 2.1.2 - vue-devtools-stub: 0.1.0 - vue-router: 4.5.1(vue@3.5.21(typescript@5.9.2)) - optionalDependencies: - '@parcel/watcher': 2.5.1 - '@types/node': 24.5.0 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@biomejs/biome' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - '@vue/compiler-sfc' - - aws4fetch - - better-sqlite3 - - bufferutil - - db0 - - drizzle-orm - - encoding - - eslint - - idb-keyval - - ioredis - - less - - lightningcss - - magicast - - meow - - mysql2 - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - sqlite3 - - stylelint - - stylus - - sugarss - - supports-color - - terser - - tsx - - typescript - - uploadthing - - utf-8-validate - - vite - - vls - - vti - - vue-tsc - - xml2js - - yaml - - nuxt@4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1): - dependencies: - '@nuxt/cli': 3.28.0(magicast@0.3.5) - '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 2.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - '@nuxt/kit': 4.0.3(magicast@0.3.5) - '@nuxt/schema': 4.0.3 - '@nuxt/telemetry': 2.6.6(magicast@0.3.5) - '@nuxt/vite-builder': 4.0.3(@types/node@24.5.0)(eslint@9.35.0(jiti@2.5.1))(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(yaml@2.8.1) - '@unhead/vue': 2.0.14(vue@3.5.21(typescript@5.9.2)) - '@vue/shared': 3.5.21 - c12: 3.2.0(magicast@0.3.5) - chokidar: 4.0.3 - compatx: 0.2.0 - consola: 3.4.2 - cookie-es: 2.0.0 - defu: 6.1.4 - destr: 2.0.5 - devalue: 5.1.1 - errx: 0.1.0 - esbuild: 0.25.9 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - exsolve: 1.0.7 - h3: 1.15.4 - hookable: 5.5.3 - ignore: 7.0.5 - impound: 1.0.0 - jiti: 2.5.1 - klona: 2.0.6 - knitwork: 1.2.0 - magic-string: 0.30.17 - mlly: 1.7.4 - mocked-exports: 0.1.1 - nanotar: 0.2.0 - nitropack: 2.12.4(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(rolldown@1.0.0-beta.38) - nypm: 0.6.1 - ofetch: 1.4.1 - ohash: 2.0.11 - on-change: 5.0.1 - oxc-minify: 0.80.0 - oxc-parser: 0.80.0 - oxc-transform: 0.80.0 - oxc-walker: 0.4.0(oxc-parser@0.80.0) - pathe: 2.0.3 - perfect-debounce: 1.0.0 - pkg-types: 2.3.0 - radix3: 1.1.2 - scule: 1.3.0 - semver: 7.7.2 - std-env: 3.9.0 - strip-literal: 3.0.0 - tinyglobby: 0.2.14 - ufo: 1.6.1 - ultrahtml: 1.6.0 - uncrypto: 0.1.3 - unctx: 2.4.1 - unimport: 5.2.0 - unplugin: 2.3.8 - unplugin-vue-router: 0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) - unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(ioredis@5.7.0) - untyped: 2.0.0 - vue: 3.5.21(typescript@5.9.2) - vue-bundle-renderer: 2.1.2 - vue-devtools-stub: 0.1.0 - vue-router: 4.5.1(vue@3.5.21(typescript@5.9.2)) - optionalDependencies: - '@parcel/watcher': 2.5.1 - '@types/node': 24.5.0 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@biomejs/biome' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - '@vue/compiler-sfc' - - aws4fetch - - better-sqlite3 - - bufferutil - - db0 - - drizzle-orm - - encoding - - eslint - - idb-keyval - - ioredis - - less - - lightningcss - - magicast - - meow - - mysql2 - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - sqlite3 - - stylelint - - stylus - - sugarss - - supports-color - - terser - - tsx - - typescript - - uploadthing - - utf-8-validate - - vite - - vls - - vti - - vue-tsc - - xml2js - - yaml - - nypm@0.6.1: - dependencies: - citty: 0.1.6 + citty: 0.1.6 consola: 3.4.2 pathe: 2.0.3 pkg-types: 2.3.0 @@ -14091,6 +13770,8 @@ snapshots: protocols@2.0.2: {} + proxy-from-env@1.1.0: {} + pump@3.0.3: dependencies: end-of-stream: 1.4.5 @@ -14899,6 +14580,8 @@ snapshots: dependencies: is-typedarray: 1.0.0 + typescript-event-target@1.1.1: {} + typescript@5.9.2: {} ufo@1.6.1: {} @@ -15019,33 +14702,6 @@ snapshots: - postcss - supports-color - unocss@66.5.1(postcss@8.5.6)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): - dependencies: - '@unocss/astro': 66.5.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - '@unocss/cli': 66.5.1 - '@unocss/core': 66.5.1 - '@unocss/postcss': 66.5.1(postcss@8.5.6) - '@unocss/preset-attributify': 66.5.1 - '@unocss/preset-icons': 66.5.1 - '@unocss/preset-mini': 66.5.1 - '@unocss/preset-tagify': 66.5.1 - '@unocss/preset-typography': 66.5.1 - '@unocss/preset-uno': 66.5.1 - '@unocss/preset-web-fonts': 66.5.1 - '@unocss/preset-wind': 66.5.1 - '@unocss/preset-wind3': 66.5.1 - '@unocss/preset-wind4': 66.5.1 - '@unocss/transformer-attributify-jsx': 66.5.1 - '@unocss/transformer-compile-class': 66.5.1 - '@unocss/transformer-directives': 66.5.1 - '@unocss/transformer-variant-group': 66.5.1 - '@unocss/vite': 66.5.1(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - optionalDependencies: - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - transitivePeerDependencies: - - postcss - - supports-color - unplugin-combine@1.2.1(esbuild@0.25.9)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rollup@4.43.0)(unplugin@1.16.1)(webpack@5.101.3(esbuild@0.25.9)): optionalDependencies: esbuild: 0.25.9 @@ -15054,14 +14710,6 @@ snapshots: vite: rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) webpack: 5.101.3(esbuild@0.25.9) - unplugin-combine@1.2.1(esbuild@0.25.9)(rollup@4.43.0)(unplugin@1.16.1)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(webpack@5.101.3(esbuild@0.25.9)): - optionalDependencies: - esbuild: 0.25.9 - rollup: 4.43.0 - unplugin: 1.16.1 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - webpack: 5.101.3(esbuild@0.25.9) - unplugin-unused@0.5.3: dependencies: js-tokens: 9.0.1 @@ -15150,52 +14798,6 @@ snapshots: - vue-tsc - webpack - unplugin-vue-macros@2.14.5(@vueuse/core@13.9.0(vue@3.5.21(typescript@5.9.2)))(esbuild@0.25.9)(rollup@4.43.0)(typescript@5.9.2)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2))(webpack@5.101.3(esbuild@0.25.9)): - dependencies: - '@vue-macros/better-define': 1.11.4(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/boolean-prop': 0.5.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/chain-call': 0.4.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/common': 1.16.1(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/config': 0.6.1(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-emit': 0.5.4(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-models': 1.3.5(@vueuse/core@13.9.0(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-prop': 0.6.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-props': 4.0.6(@vue-macros/reactivity-transform@1.1.6(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-props-refs': 1.3.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-render': 1.6.6(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-slots': 1.2.6(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/define-stylex': 0.2.3(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/devtools': 0.4.1(typescript@5.9.2)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - '@vue-macros/export-expose': 0.3.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/export-props': 0.6.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/export-render': 0.3.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/hoist-static': 1.7.0(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/jsx-directive': 0.10.6(typescript@5.9.2) - '@vue-macros/named-template': 0.5.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/reactivity-transform': 1.1.6(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/script-lang': 0.2.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/setup-block': 0.4.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/setup-component': 0.18.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/setup-sfc': 0.18.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/short-bind': 1.1.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/short-emits': 1.6.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/short-vmodel': 1.5.5(vue@3.5.21(typescript@5.9.2)) - '@vue-macros/volar': 0.30.15(typescript@5.9.2)(vue-tsc@3.0.7(typescript@5.9.2))(vue@3.5.21(typescript@5.9.2)) - unplugin: 1.16.1 - unplugin-combine: 1.2.1(esbuild@0.25.9)(rollup@4.43.0)(unplugin@1.16.1)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(webpack@5.101.3(esbuild@0.25.9)) - unplugin-vue-define-options: 1.5.5(vue@3.5.21(typescript@5.9.2)) - vue: 3.5.21(typescript@5.9.2) - transitivePeerDependencies: - - '@rspack/core' - - '@vueuse/core' - - esbuild - - rolldown - - rollup - - typescript - - vite - - vue-tsc - - webpack - unplugin-vue-router@0.15.0(@vue/compiler-sfc@3.5.21)(typescript@5.9.2)(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: '@vue-macros/common': 3.0.0-beta.16(vue@3.5.21(typescript@5.9.2)) @@ -15319,20 +14921,10 @@ snapshots: vite: rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) vite-hot-client: 2.1.0(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - vite-dev-rpc@1.1.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): - dependencies: - birpc: 2.5.0 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-hot-client: 2.1.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - vite-hot-client@2.1.0(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): dependencies: vite: rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-hot-client@2.1.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): - dependencies: - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-node@3.2.4(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1): dependencies: cac: 6.7.14 @@ -15389,23 +14981,6 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-inspect@11.3.3(@nuxt/kit@3.18.1(magicast@0.3.5))(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): - dependencies: - ansis: 4.1.0 - debug: 4.4.1 - error-stack-parser-es: 1.0.5 - ohash: 2.0.11 - open: 10.2.0 - perfect-debounce: 2.0.0 - sirv: 3.0.1 - unplugin-utils: 0.3.0 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-dev-rpc: 1.1.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - optionalDependencies: - '@nuxt/kit': 3.18.1(magicast@0.3.5) - transitivePeerDependencies: - - supports-color - vite-plugin-inspect@11.3.3(@nuxt/kit@4.0.3(magicast@0.3.5))(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): dependencies: ansis: 4.1.0 @@ -15438,21 +15013,6 @@ snapshots: - supports-color - vue - vite-plugin-vue-devtools@8.0.2(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)): - dependencies: - '@vue/devtools-core': 8.0.2(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)) - '@vue/devtools-kit': 8.0.2 - '@vue/devtools-shared': 8.0.2 - execa: 9.6.0 - sirv: 3.0.2 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vite-plugin-inspect: 11.3.3(@nuxt/kit@3.18.1(magicast@0.3.5))(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)) - transitivePeerDependencies: - - '@nuxt/kit' - - supports-color - - vue - vite-plugin-vue-inspector@5.3.2(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): dependencies: '@babel/core': 7.28.0 @@ -15468,21 +15028,6 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1)): - dependencies: - '@babel/core': 7.28.0 - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.0) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.0) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.0) - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.0) - '@vue/babel-plugin-jsx': 1.4.0(@babel/core@7.28.0) - '@vue/compiler-dom': 3.5.19 - kolorist: 1.8.0 - magic-string: 0.30.17 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - vite-plugin-vue-layouts@0.11.0(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): dependencies: debug: 4.4.1 @@ -15493,16 +15038,6 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue-layouts@0.11.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-router@4.5.1(vue@3.5.21(typescript@5.9.2)))(vue@3.5.21(typescript@5.9.2)): - dependencies: - debug: 4.4.1 - fast-glob: 3.3.3 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vue: 3.5.21(typescript@5.9.2) - vue-router: 4.5.1(vue@3.5.21(typescript@5.9.2)) - transitivePeerDependencies: - - supports-color - vite-plugin-vue-tracer@1.0.0(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)): dependencies: estree-walker: 3.0.3 @@ -15513,16 +15048,6 @@ snapshots: vite: rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) vue: 3.5.21(typescript@5.9.2) - vite-plugin-vue-tracer@1.0.0(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2)): - dependencies: - estree-walker: 3.0.3 - exsolve: 1.0.7 - magic-string: 0.30.17 - pathe: 2.0.3 - source-map-js: 1.2.1 - vite: 7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1) - vue: 3.5.21(typescript@5.9.2) - vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1): dependencies: esbuild: 0.25.9 @@ -15620,135 +15145,11 @@ snapshots: '@vue/devtools-api': 6.6.4 vue: 3.5.21(typescript@5.9.2) - vue-sonner@2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1): - dependencies: - '@nuxt/kit': 4.0.3(magicast@0.3.5) - '@nuxt/schema': 4.0.3 - nuxt: 4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@biomejs/biome' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@parcel/watcher' - - '@planetscale/database' - - '@types/node' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - '@vue/compiler-sfc' - - aws4fetch - - better-sqlite3 - - bufferutil - - db0 - - drizzle-orm - - encoding - - eslint - - idb-keyval - - ioredis - - less - - lightningcss - - magicast - - meow - - mysql2 - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - sqlite3 - - stylelint - - stylus - - sugarss - - supports-color - - terser - - tsx - - typescript - - uploadthing - - utf-8-validate - - vite - - vls - - vti - - vue-tsc - - xml2js - - yaml - - vue-sonner@2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(yaml@2.8.1): - dependencies: - '@nuxt/kit': 4.0.3(magicast@0.3.5) - '@nuxt/schema': 4.0.3 - nuxt: 4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(yaml@2.8.1) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@biomejs/biome' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@parcel/watcher' - - '@planetscale/database' - - '@types/node' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - '@vue/compiler-sfc' - - aws4fetch - - better-sqlite3 - - bufferutil - - db0 - - drizzle-orm - - encoding - - eslint - - idb-keyval - - ioredis - - less - - lightningcss - - magicast - - meow - - mysql2 - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - sqlite3 - - stylelint - - stylus - - sugarss - - supports-color - - terser - - tsx - - typescript - - uploadthing - - utf-8-validate - - vite - - vls - - vti - - vue-tsc - - xml2js - - yaml - - vue-sonner@2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1): + vue-sonner@2.0.8(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1): dependencies: '@nuxt/kit': 4.0.3(magicast@0.3.5) '@nuxt/schema': 4.0.3 - nuxt: 4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vite@7.1.5(@types/node@24.5.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) + nuxt: 4.0.3(@electric-sql/pglite@0.3.8)(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.5.0)(@vue/compiler-sfc@3.5.21)(bufferutil@4.0.9)(db0@0.3.2(@electric-sql/pglite@0.3.8)(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7)))(drizzle-orm@0.44.5(@electric-sql/pglite@0.3.8)(@types/pg@8.15.5)(pg@8.16.3)(postgres@3.4.7))(encoding@0.1.13)(eslint@9.35.0(jiti@2.5.1))(ioredis@5.7.0)(lightningcss@1.30.1)(magicast@0.3.5)(optionator@0.9.4)(rolldown-vite@7.1.5(@types/node@24.5.0)(esbuild@0.25.9)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.1))(rolldown@1.0.0-beta.38)(rollup@4.43.0)(terser@5.43.1)(tsx@4.20.5)(typescript@5.9.2)(utf-8-validate@5.0.10)(vue-tsc@3.0.7(typescript@5.9.2))(yaml@2.8.1) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -16026,6 +15427,10 @@ snapshots: compress-commons: 6.0.2 readable-stream: 4.7.0 + zod-to-json-schema@3.24.6(zod@3.25.76): + dependencies: + zod: 3.25.76 + zod@3.25.76: {} zwitch@2.0.4: {} From 19e598c896730b070656c1680d18df168bd5f807 Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Wed, 17 Sep 2025 01:49:37 +0800 Subject: [PATCH 2/2] feat: jina link resolver --- .../src/message-resolvers/link-resolver.ts | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/packages/core/src/message-resolvers/link-resolver.ts b/packages/core/src/message-resolvers/link-resolver.ts index 31c555e32..91a79a914 100644 --- a/packages/core/src/message-resolvers/link-resolver.ts +++ b/packages/core/src/message-resolvers/link-resolver.ts @@ -1,17 +1,55 @@ import type { MessageResolver, MessageResolverOpts } from '.' -import type { CoreMessage } from '../utils/message' import { useLogger } from '@unbird/logg' import { Ok } from '@unbird/result' +import { recordDocuments } from '../models/documents' + export function createLinkResolver(): MessageResolver { const logger = useLogger('core:resolver:link') return { - run: async (_opts: MessageResolverOpts) => { + run: async (opts: MessageResolverOpts) => { logger.verbose('Executing link resolver') - return Ok([] as CoreMessage[]) + for (const message of opts.messages) { + if (message.content) { + const links = message.content.match(/https?:\/\/\S+/g) + if (links && links.length > 0) { + for (const link of links) { + try { + const response = await fetch(`https://r.jina.ai/${link}`, { + headers: { + // Authorization: `Bearer ${JINA_API_KEY}`, + }, + }) + + if (!response.ok) { + logger.error(`Failed to scrape link: ${link}`) + continue + } + + const doc = await response.text() + + logger.debug('Scraped document') + + await recordDocuments([{ + chatMessagesId: message.uuid, + rawContent: doc, + processedContent: doc, + processedContentJiebaTokens: [], + summary: doc, + }]) + } + catch (err) { + logger.withError(err).error(`Error scraping link: ${link}`) + } + } + } + } + } + + return Ok(opts.messages) }, } }