From 259c842259e1bb58afe12e3f65f55b993001c9b7 Mon Sep 17 00:00:00 2001
From: Marcus Schiesser <mail@marcusschiesser.de>
Date: Mon, 18 Mar 2024 15:13:27 +0700
Subject: [PATCH] Support NextJS edge runtime (#618)

---
 .changeset/config.json                        |   2 +-
 .changeset/yellow-chicken-study.md            |   5 +
 .github/workflows/test.yml                    |  18 +
 .../src/custom-simple-directory-reader.ts     |   2 +-
 packages/core/package.json                    |   6 +-
 packages/core/src/agent/react/worker.ts       |   3 +-
 packages/core/src/agent/runner/base.ts        |   3 +-
 packages/core/src/embeddings/utils.ts         |   8 +-
 packages/core/src/index.edge.ts               |  31 ++
 packages/core/src/index.ts                    |  32 +-
 packages/core/src/indices/keyword/index.ts    |   5 +-
 packages/core/src/indices/summary/index.ts    |   6 +-
 .../core/src/indices/vectorStore/index.ts     |   6 +-
 .../strategies/UpsertsAndDeleteStrategy.ts    |   3 +-
 packages/core/src/readers/LlamaParseReader.ts |   8 +-
 .../src/readers/SimpleDirectoryReader.edge.ts | 126 ++++++
 .../core/src/readers/SimpleDirectoryReader.ts | 126 +-----
 packages/core/src/readers/TextFileReader.ts   |  18 +
 packages/core/src/readers/index.ts            |   1 +
 packages/edge/.gitignore                      |   3 +
 .../edge/e2e/test-edge-runtime/.gitignore     |  36 ++
 .../e2e/test-edge-runtime/next.config.mjs     |   4 +
 .../edge/e2e/test-edge-runtime/package.json   |  23 +
 .../e2e/test-edge-runtime/public/next.svg     |   1 +
 .../e2e/test-edge-runtime/public/vercel.svg   |   1 +
 .../e2e/test-edge-runtime/src/app/favicon.ico | Bin 0 -> 25931 bytes
 .../e2e/test-edge-runtime/src/app/globals.css | 107 +++++
 .../e2e/test-edge-runtime/src/app/layout.tsx  |  24 +
 .../test-edge-runtime/src/app/page.module.css | 232 ++++++++++
 .../e2e/test-edge-runtime/src/app/page.tsx    |  98 +++++
 .../e2e/test-edge-runtime/src/utils/llm.ts    |   8 +
 .../edge/e2e/test-edge-runtime/tsconfig.json  |  27 ++
 packages/edge/package.json                    |  84 ++++
 packages/edge/scripts/compare-deps.js         |  36 ++
 pnpm-lock.yaml                                | 416 +++++++++++++++---
 pnpm-workspace.yaml                           |   1 +
 tsconfig.json                                 |   3 +
 37 files changed, 1277 insertions(+), 236 deletions(-)
 create mode 100644 .changeset/yellow-chicken-study.md
 create mode 100644 packages/core/src/index.edge.ts
 create mode 100644 packages/core/src/readers/SimpleDirectoryReader.edge.ts
 create mode 100644 packages/core/src/readers/TextFileReader.ts
 create mode 100644 packages/edge/.gitignore
 create mode 100644 packages/edge/e2e/test-edge-runtime/.gitignore
 create mode 100644 packages/edge/e2e/test-edge-runtime/next.config.mjs
 create mode 100644 packages/edge/e2e/test-edge-runtime/package.json
 create mode 100644 packages/edge/e2e/test-edge-runtime/public/next.svg
 create mode 100644 packages/edge/e2e/test-edge-runtime/public/vercel.svg
 create mode 100644 packages/edge/e2e/test-edge-runtime/src/app/favicon.ico
 create mode 100644 packages/edge/e2e/test-edge-runtime/src/app/globals.css
 create mode 100644 packages/edge/e2e/test-edge-runtime/src/app/layout.tsx
 create mode 100644 packages/edge/e2e/test-edge-runtime/src/app/page.module.css
 create mode 100644 packages/edge/e2e/test-edge-runtime/src/app/page.tsx
 create mode 100644 packages/edge/e2e/test-edge-runtime/src/utils/llm.ts
 create mode 100644 packages/edge/e2e/test-edge-runtime/tsconfig.json
 create mode 100644 packages/edge/package.json
 create mode 100644 packages/edge/scripts/compare-deps.js

diff --git a/.changeset/config.json b/.changeset/config.json
index 118ffd7dd..5af1259d5 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -2,7 +2,7 @@
   "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
   "changelog": "@changesets/cli/changelog",
   "commit": true,
-  "fixed": [],
+  "fixed": [["llamaindex"], ["@llamaindex/edge"]],
   "linked": [],
   "access": "public",
   "baseBranch": "main",
diff --git a/.changeset/yellow-chicken-study.md b/.changeset/yellow-chicken-study.md
new file mode 100644
index 000000000..db920d013
--- /dev/null
+++ b/.changeset/yellow-chicken-study.md
@@ -0,0 +1,5 @@
+---
+"llamaindex": patch
+---
+
+Add support for edge runtime by using @llamaindex/edge
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index bfef176f5..a0ca17353 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -44,6 +44,24 @@ jobs:
           name: typecheck-build-dist
           path: ./packages/core/dist
           if-no-files-found: error
+  core-edge-runtime:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v4
+      - uses: pnpm/action-setup@v2
+      - name: Setup Node.js
+        uses: actions/setup-node@v4
+        with:
+          node-version-file: ".nvmrc"
+          cache: "pnpm"
+      - name: Install dependencies
+        run: pnpm install
+      - name: Build
+        run: pnpm run build --filter @llamaindex/edge
+      - name: Build Edge Runtime
+        run: pnpm run build
+        working-directory: ./packages/edge/e2e/test-edge-runtime
   typecheck-examples:
     runs-on: ubuntu-latest
 
diff --git a/examples/readers/src/custom-simple-directory-reader.ts b/examples/readers/src/custom-simple-directory-reader.ts
index f8f987099..ff5bb726a 100644
--- a/examples/readers/src/custom-simple-directory-reader.ts
+++ b/examples/readers/src/custom-simple-directory-reader.ts
@@ -2,8 +2,8 @@ import type { BaseReader, Document, Metadata } from "llamaindex";
 import {
   FILE_EXT_TO_READER,
   SimpleDirectoryReader,
-  TextFileReader,
 } from "llamaindex/readers/SimpleDirectoryReader";
+import { TextFileReader } from "llamaindex/readers/TextFileReader";
 
 class ZipReader implements BaseReader {
   loadData(...args: any[]): Promise<Document<Metadata>[]> {
diff --git a/packages/core/package.json b/packages/core/package.json
index 23b3e9575..4a3513bcb 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -24,9 +24,9 @@
     "assemblyai": "^4.2.2",
     "chromadb": "~1.7.3",
     "cohere-ai": "^7.7.5",
-    "file-type": "^18.7.0",
     "js-tiktoken": "^1.0.10",
     "lodash": "^4.17.21",
+    "magic-bytes.js": "^1.10.0",
     "mammoth": "^1.6.0",
     "md-utils-ts": "^2.0.0",
     "mongodb": "^6.3.0",
@@ -62,10 +62,6 @@
         "types": "./dist/type/index.d.ts",
         "default": "./dist/index.js"
       },
-      "edge-light": {
-        "types": "./dist/type/index.d.ts",
-        "default": "./dist/index.edge-light.js"
-      },
       "require": {
         "types": "./dist/type/index.d.ts",
         "default": "./dist/cjs/index.js"
diff --git a/packages/core/src/agent/react/worker.ts b/packages/core/src/agent/react/worker.ts
index 108bfe136..28c49edcc 100644
--- a/packages/core/src/agent/react/worker.ts
+++ b/packages/core/src/agent/react/worker.ts
@@ -1,4 +1,4 @@
-import { randomUUID } from "crypto";
+import { randomUUID } from "@llamaindex/env";
 import { CallbackManager } from "../../callbacks/CallbackManager.js";
 import { AgentChatResponse } from "../../engines/chat/index.js";
 import type { ChatResponse, LLM } from "../../llm/index.js";
@@ -17,7 +17,6 @@ import {
   ObservationReasoningStep,
   ResponseReasoningStep,
 } from "./types.js";
-
 type ReActAgentWorkerParams = {
   tools: BaseTool[];
   llm?: LLM;
diff --git a/packages/core/src/agent/runner/base.ts b/packages/core/src/agent/runner/base.ts
index cce07b892..e448d3e0d 100644
--- a/packages/core/src/agent/runner/base.ts
+++ b/packages/core/src/agent/runner/base.ts
@@ -1,4 +1,4 @@
-import { randomUUID } from "crypto";
+import { randomUUID } from "@llamaindex/env";
 import { CallbackManager } from "../../callbacks/CallbackManager.js";
 import type { ChatEngineAgentParams } from "../../engines/chat/index.js";
 import {
@@ -12,7 +12,6 @@ import type { BaseMemory } from "../../memory/types.js";
 import type { AgentWorker, TaskStepOutput } from "../types.js";
 import { Task, TaskStep } from "../types.js";
 import { AgentState, BaseAgentRunner, TaskState } from "./types.js";
-
 const validateStepFromArgs = (
   taskId: string,
   input?: string | null,
diff --git a/packages/core/src/embeddings/utils.ts b/packages/core/src/embeddings/utils.ts
index 5c42b83c8..29ab2fa3d 100644
--- a/packages/core/src/embeddings/utils.ts
+++ b/packages/core/src/embeddings/utils.ts
@@ -1,5 +1,6 @@
 import { defaultFS } from "@llamaindex/env";
 import _ from "lodash";
+import { filetypemime } from "magic-bytes.js";
 import type { ImageType } from "../Node.js";
 import { DEFAULT_SIMILARITY_TOP_K } from "../constants.js";
 import { VectorStoreQueryMode } from "../storage/vectorStore/types.js";
@@ -199,13 +200,12 @@ export function getTopKMMREmbeddings(
 }
 
 async function blobToDataUrl(input: Blob) {
-  const { fileTypeFromBuffer } = await import("file-type");
   const buffer = Buffer.from(await input.arrayBuffer());
-  const type = await fileTypeFromBuffer(buffer);
-  if (!type) {
+  const mimes = filetypemime(buffer);
+  if (mimes.length < 1) {
     throw new Error("Unsupported image type");
   }
-  return "data:" + type.mime + ";base64," + buffer.toString("base64");
+  return "data:" + mimes[0] + ";base64," + buffer.toString("base64");
 }
 
 export async function readImage(input: ImageType) {
diff --git a/packages/core/src/index.edge.ts b/packages/core/src/index.edge.ts
new file mode 100644
index 000000000..bbfed3743
--- /dev/null
+++ b/packages/core/src/index.edge.ts
@@ -0,0 +1,31 @@
+export * from "./ChatHistory.js";
+export * from "./GlobalsHelper.js";
+export * from "./Node.js";
+export * from "./OutputParser.js";
+export * from "./Prompt.js";
+export * from "./PromptHelper.js";
+export * from "./QuestionGenerator.js";
+export * from "./Response.js";
+export * from "./Retriever.js";
+export * from "./ServiceContext.js";
+export * from "./TextSplitter.js";
+export * from "./agent/index.js";
+export * from "./callbacks/CallbackManager.js";
+export * from "./cloud/index.js";
+export * from "./constants.js";
+export * from "./embeddings/index.js";
+export * from "./engines/chat/index.js";
+export * from "./engines/query/index.js";
+export * from "./evaluation/index.js";
+export * from "./extractors/index.js";
+export * from "./indices/index.js";
+export * from "./ingestion/index.js";
+export * from "./llm/index.js";
+export * from "./nodeParsers/index.js";
+export * from "./objects/index.js";
+export * from "./postprocessors/index.js";
+export * from "./prompts/index.js";
+export * from "./selectors/index.js";
+export * from "./synthesizers/index.js";
+export * from "./tools/index.js";
+export * from "./types.js";
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index a4c0c8f10..99167ee4b 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -1,33 +1,3 @@
-export * from "./ChatHistory.js";
-export * from "./GlobalsHelper.js";
-export * from "./Node.js";
-export * from "./OutputParser.js";
-export * from "./Prompt.js";
-export * from "./PromptHelper.js";
-export * from "./QuestionGenerator.js";
-export * from "./Response.js";
-export * from "./Retriever.js";
-export * from "./ServiceContext.js";
-export * from "./TextSplitter.js";
-export * from "./agent/index.js";
-export * from "./callbacks/CallbackManager.js";
-export * from "./cloud/index.js";
-export * from "./constants.js";
-export * from "./embeddings/index.js";
-export * from "./engines/chat/index.js";
-export * from "./engines/query/index.js";
-export * from "./evaluation/index.js";
-export * from "./extractors/index.js";
-export * from "./indices/index.js";
-export * from "./ingestion/index.js";
-export * from "./llm/index.js";
-export * from "./nodeParsers/index.js";
-export * from "./objects/index.js";
-export * from "./postprocessors/index.js";
-export * from "./prompts/index.js";
+export * from "./index.edge.js";
 export * from "./readers/index.js";
-export * from "./selectors/index.js";
 export * from "./storage/index.js";
-export * from "./synthesizers/index.js";
-export * from "./tools/index.js";
-export * from "./types.js";
diff --git a/packages/core/src/indices/keyword/index.ts b/packages/core/src/indices/keyword/index.ts
index 9e5050ead..61067f55f 100644
--- a/packages/core/src/indices/keyword/index.ts
+++ b/packages/core/src/indices/keyword/index.ts
@@ -13,8 +13,9 @@ import type { ServiceContext } from "../../ServiceContext.js";
 import { serviceContextFromDefaults } from "../../ServiceContext.js";
 import { RetrieverQueryEngine } from "../../engines/query/index.js";
 import type { BaseNodePostprocessor } from "../../postprocessors/index.js";
-import type { BaseDocumentStore, StorageContext } from "../../storage/index.js";
-import { storageContextFromDefaults } from "../../storage/index.js";
+import type { StorageContext } from "../../storage/StorageContext.js";
+import { storageContextFromDefaults } from "../../storage/StorageContext.js";
+import type { BaseDocumentStore } from "../../storage/docStore/types.js";
 import type { BaseSynthesizer } from "../../synthesizers/index.js";
 import type { BaseQueryEngine } from "../../types.js";
 import type { BaseIndexInit } from "../BaseIndex.js";
diff --git a/packages/core/src/indices/summary/index.ts b/packages/core/src/indices/summary/index.ts
index f45119c83..8a6fd2104 100644
--- a/packages/core/src/indices/summary/index.ts
+++ b/packages/core/src/indices/summary/index.ts
@@ -8,12 +8,12 @@ import type { ServiceContext } from "../../ServiceContext.js";
 import { serviceContextFromDefaults } from "../../ServiceContext.js";
 import { RetrieverQueryEngine } from "../../engines/query/index.js";
 import type { BaseNodePostprocessor } from "../../postprocessors/index.js";
+import type { StorageContext } from "../../storage/StorageContext.js";
+import { storageContextFromDefaults } from "../../storage/StorageContext.js";
 import type {
   BaseDocumentStore,
   RefDocInfo,
-  StorageContext,
-} from "../../storage/index.js";
-import { storageContextFromDefaults } from "../../storage/index.js";
+} from "../../storage/docStore/types.js";
 import type { BaseSynthesizer } from "../../synthesizers/index.js";
 import {
   CompactAndRefine,
diff --git a/packages/core/src/indices/vectorStore/index.ts b/packages/core/src/indices/vectorStore/index.ts
index 6e43beee8..5584eb9fc 100644
--- a/packages/core/src/indices/vectorStore/index.ts
+++ b/packages/core/src/indices/vectorStore/index.ts
@@ -24,15 +24,15 @@ import { ClipEmbedding } from "../../embeddings/index.js";
 import { RetrieverQueryEngine } from "../../engines/query/RetrieverQueryEngine.js";
 import { runTransformations } from "../../ingestion/index.js";
 import type { BaseNodePostprocessor } from "../../postprocessors/types.js";
+import type { StorageContext } from "../../storage/StorageContext.js";
 import { storageContextFromDefaults } from "../../storage/StorageContext.js";
+import type { BaseIndexStore } from "../../storage/indexStore/types.js";
 import type {
-  BaseIndexStore,
   MetadataFilters,
-  StorageContext,
   VectorStore,
   VectorStoreQuery,
   VectorStoreQueryResult,
-} from "../../storage/index.js";
+} from "../../storage/vectorStore/types.js";
 import { VectorStoreQueryMode } from "../../storage/vectorStore/types.js";
 import type { BaseSynthesizer } from "../../synthesizers/types.js";
 import type { BaseQueryEngine } from "../../types.js";
diff --git a/packages/core/src/ingestion/strategies/UpsertsAndDeleteStrategy.ts b/packages/core/src/ingestion/strategies/UpsertsAndDeleteStrategy.ts
index 2b615a35e..ac9ceeb4e 100644
--- a/packages/core/src/ingestion/strategies/UpsertsAndDeleteStrategy.ts
+++ b/packages/core/src/ingestion/strategies/UpsertsAndDeleteStrategy.ts
@@ -1,5 +1,6 @@
 import type { BaseNode } from "../../Node.js";
-import type { BaseDocumentStore, VectorStore } from "../../storage/index.js";
+import type { BaseDocumentStore } from "../../storage/docStore/types.js";
+import type { VectorStore } from "../../storage/vectorStore/types.js";
 import { classify } from "./classify.js";
 
 /**
diff --git a/packages/core/src/readers/LlamaParseReader.ts b/packages/core/src/readers/LlamaParseReader.ts
index 066f88bee..fdf456aae 100644
--- a/packages/core/src/readers/LlamaParseReader.ts
+++ b/packages/core/src/readers/LlamaParseReader.ts
@@ -1,4 +1,5 @@
 import { defaultFS, getEnv, type GenericFileSystem } from "@llamaindex/env";
+import { filetypemime } from "magic-bytes.js";
 import { Document } from "../Node.js";
 import type { FileReader } from "./type.js";
 
@@ -109,11 +110,10 @@ export class LlamaParseReader implements FileReader {
   }
 
   private async getMimeType(data: Buffer): Promise<string> {
-    const { fileTypeFromBuffer } = await import("file-type");
-    const type = await fileTypeFromBuffer(data);
-    if (type?.mime !== "application/pdf") {
+    const mimes = filetypemime(data);
+    if (!mimes.includes("application/pdf")) {
       throw new Error("Currently, only PDF files are supported.");
     }
-    return type.mime;
+    return "application/pdf";
   }
 }
diff --git a/packages/core/src/readers/SimpleDirectoryReader.edge.ts b/packages/core/src/readers/SimpleDirectoryReader.edge.ts
new file mode 100644
index 000000000..face1fdd3
--- /dev/null
+++ b/packages/core/src/readers/SimpleDirectoryReader.edge.ts
@@ -0,0 +1,126 @@
+import type { CompleteFileSystem } from "@llamaindex/env";
+import { defaultFS, path } from "@llamaindex/env";
+import { Document } from "../Node.js";
+import { walk } from "../storage/FileSystem.js";
+import { TextFileReader } from "./TextFileReader.js";
+import type { BaseReader } from "./type.js";
+
+type ReaderCallback = (
+  category: "file" | "directory",
+  name: string,
+  status: ReaderStatus,
+  message?: string,
+) => boolean;
+enum ReaderStatus {
+  STARTED = 0,
+  COMPLETE,
+  ERROR,
+}
+
+export type SimpleDirectoryReaderLoadDataParams = {
+  directoryPath: string;
+  fs?: CompleteFileSystem;
+  defaultReader?: BaseReader | null;
+  fileExtToReader?: Record<string, BaseReader>;
+};
+
+/**
+ * Read all the documents in a directory.
+ * By default, supports the list of file types
+ * in the FILE_EXT_TO_READER map.
+ */
+export class SimpleDirectoryReader implements BaseReader {
+  constructor(private observer?: ReaderCallback) {}
+
+  async loadData(
+    params: SimpleDirectoryReaderLoadDataParams,
+  ): Promise<Document[]>;
+  async loadData(directoryPath: string): Promise<Document[]>;
+  async loadData(
+    params: SimpleDirectoryReaderLoadDataParams | string,
+  ): Promise<Document[]> {
+    if (typeof params === "string") {
+      params = { directoryPath: params };
+    }
+
+    const {
+      directoryPath,
+      fs = defaultFS,
+      defaultReader = new TextFileReader(),
+      fileExtToReader,
+    } = params;
+
+    // Observer can decide to skip the directory
+    if (
+      !this.doObserverCheck("directory", directoryPath, ReaderStatus.STARTED)
+    ) {
+      return [];
+    }
+
+    const docs: Document[] = [];
+    for await (const filePath of walk(fs, directoryPath)) {
+      try {
+        const fileExt = path.extname(filePath).slice(1).toLowerCase();
+
+        // Observer can decide to skip each file
+        if (!this.doObserverCheck("file", filePath, ReaderStatus.STARTED)) {
+          // Skip this file
+          continue;
+        }
+
+        let reader: BaseReader;
+
+        if (fileExtToReader && fileExt in fileExtToReader) {
+          reader = fileExtToReader[fileExt];
+        } else if (defaultReader != null) {
+          reader = defaultReader;
+        } else {
+          const msg = `No reader for file extension of ${filePath}`;
+          console.warn(msg);
+
+          // In an error condition, observer's false cancels the whole process.
+          if (
+            !this.doObserverCheck("file", filePath, ReaderStatus.ERROR, msg)
+          ) {
+            return [];
+          }
+
+          continue;
+        }
+
+        const fileDocs = await reader.loadData(filePath, fs);
+
+        // Observer can still cancel addition of the resulting docs from this file
+        if (this.doObserverCheck("file", filePath, ReaderStatus.COMPLETE)) {
+          docs.push(...fileDocs);
+        }
+      } catch (e) {
+        const msg = `Error reading file ${filePath}: ${e}`;
+        console.error(msg);
+
+        // In an error condition, observer's false cancels the whole process.
+        if (!this.doObserverCheck("file", filePath, ReaderStatus.ERROR, msg)) {
+          return [];
+        }
+      }
+    }
+
+    // After successful import of all files, directory completion
+    // is only a notification for observer, cannot be cancelled.
+    this.doObserverCheck("directory", directoryPath, ReaderStatus.COMPLETE);
+
+    return docs;
+  }
+
+  private doObserverCheck(
+    category: "file" | "directory",
+    name: string,
+    status: ReaderStatus,
+    message?: string,
+  ): boolean {
+    if (this.observer) {
+      return this.observer(category, name, status, message);
+    }
+    return true;
+  }
+}
diff --git a/packages/core/src/readers/SimpleDirectoryReader.ts b/packages/core/src/readers/SimpleDirectoryReader.ts
index 77979f4fb..70d49ef3b 100644
--- a/packages/core/src/readers/SimpleDirectoryReader.ts
+++ b/packages/core/src/readers/SimpleDirectoryReader.ts
@@ -1,40 +1,17 @@
-import type { CompleteFileSystem } from "@llamaindex/env";
-import { defaultFS, path } from "@llamaindex/env";
 import { Document } from "../Node.js";
-import { walk } from "../storage/FileSystem.js";
 import { PapaCSVReader } from "./CSVReader.js";
 import { DocxReader } from "./DocxReader.js";
 import { HTMLReader } from "./HTMLReader.js";
 import { ImageReader } from "./ImageReader.js";
 import { MarkdownReader } from "./MarkdownReader.js";
 import { PDFReader } from "./PDFReader.js";
+import {
+  SimpleDirectoryReader as EdgeSimpleDirectoryReader,
+  type SimpleDirectoryReaderLoadDataParams,
+} from "./SimpleDirectoryReader.edge.js";
+import { TextFileReader } from "./TextFileReader.js";
 import type { BaseReader } from "./type.js";
 
-type ReaderCallback = (
-  category: "file" | "directory",
-  name: string,
-  status: ReaderStatus,
-  message?: string,
-) => boolean;
-enum ReaderStatus {
-  STARTED = 0,
-  COMPLETE,
-  ERROR,
-}
-
-/**
- * Read a .txt file
- */
-export class TextFileReader implements BaseReader {
-  async loadData(
-    file: string,
-    fs: CompleteFileSystem = defaultFS,
-  ): Promise<Document[]> {
-    const dataBuffer = await fs.readFile(file);
-    return [new Document({ text: dataBuffer, id_: file })];
-  }
-}
-
 export const FILE_EXT_TO_READER: Record<string, BaseReader> = {
   txt: new TextFileReader(),
   pdf: new PDFReader(),
@@ -49,21 +26,12 @@ export const FILE_EXT_TO_READER: Record<string, BaseReader> = {
   gif: new ImageReader(),
 };
 
-export type SimpleDirectoryReaderLoadDataParams = {
-  directoryPath: string;
-  fs?: CompleteFileSystem;
-  defaultReader?: BaseReader | null;
-  fileExtToReader?: Record<string, BaseReader>;
-};
-
 /**
  * Read all the documents in a directory.
  * By default, supports the list of file types
  * in the FILE_EXT_TO_READER map.
  */
-export class SimpleDirectoryReader implements BaseReader {
-  constructor(private observer?: ReaderCallback) {}
-
+export class SimpleDirectoryReader extends EdgeSimpleDirectoryReader {
   async loadData(
     params: SimpleDirectoryReaderLoadDataParams,
   ): Promise<Document[]>;
@@ -74,85 +42,7 @@ export class SimpleDirectoryReader implements BaseReader {
     if (typeof params === "string") {
       params = { directoryPath: params };
     }
-
-    const {
-      directoryPath,
-      fs = defaultFS,
-      defaultReader = new TextFileReader(),
-      fileExtToReader = FILE_EXT_TO_READER,
-    } = params;
-
-    // Observer can decide to skip the directory
-    if (
-      !this.doObserverCheck("directory", directoryPath, ReaderStatus.STARTED)
-    ) {
-      return [];
-    }
-
-    const docs: Document[] = [];
-    for await (const filePath of walk(fs, directoryPath)) {
-      try {
-        const fileExt = path.extname(filePath).slice(1).toLowerCase();
-
-        // Observer can decide to skip each file
-        if (!this.doObserverCheck("file", filePath, ReaderStatus.STARTED)) {
-          // Skip this file
-          continue;
-        }
-
-        let reader: BaseReader;
-
-        if (fileExt in fileExtToReader) {
-          reader = fileExtToReader[fileExt];
-        } else if (defaultReader != null) {
-          reader = defaultReader;
-        } else {
-          const msg = `No reader for file extension of ${filePath}`;
-          console.warn(msg);
-
-          // In an error condition, observer's false cancels the whole process.
-          if (
-            !this.doObserverCheck("file", filePath, ReaderStatus.ERROR, msg)
-          ) {
-            return [];
-          }
-
-          continue;
-        }
-
-        const fileDocs = await reader.loadData(filePath, fs);
-
-        // Observer can still cancel addition of the resulting docs from this file
-        if (this.doObserverCheck("file", filePath, ReaderStatus.COMPLETE)) {
-          docs.push(...fileDocs);
-        }
-      } catch (e) {
-        const msg = `Error reading file ${filePath}: ${e}`;
-        console.error(msg);
-
-        // In an error condition, observer's false cancels the whole process.
-        if (!this.doObserverCheck("file", filePath, ReaderStatus.ERROR, msg)) {
-          return [];
-        }
-      }
-    }
-
-    // After successful import of all files, directory completion
-    // is only a notification for observer, cannot be cancelled.
-    this.doObserverCheck("directory", directoryPath, ReaderStatus.COMPLETE);
-
-    return docs;
-  }
-
-  private doObserverCheck(
-    category: "file" | "directory",
-    name: string,
-    status: ReaderStatus,
-    message?: string,
-  ): boolean {
-    if (this.observer) {
-      return this.observer(category, name, status, message);
-    }
-    return true;
+    params.fileExtToReader = params.fileExtToReader ?? FILE_EXT_TO_READER;
+    return super.loadData(params);
   }
 }
diff --git a/packages/core/src/readers/TextFileReader.ts b/packages/core/src/readers/TextFileReader.ts
new file mode 100644
index 000000000..9a3b6b8ef
--- /dev/null
+++ b/packages/core/src/readers/TextFileReader.ts
@@ -0,0 +1,18 @@
+import type { CompleteFileSystem } from "@llamaindex/env";
+import { defaultFS } from "@llamaindex/env";
+import { Document } from "../Node.js";
+import type { BaseReader } from "./type.js";
+
+/**
+ * Read a .txt file
+ */
+
+export class TextFileReader implements BaseReader {
+  async loadData(
+    file: string,
+    fs: CompleteFileSystem = defaultFS,
+  ): Promise<Document[]> {
+    const dataBuffer = await fs.readFile(file);
+    return [new Document({ text: dataBuffer, id_: file })];
+  }
+}
diff --git a/packages/core/src/readers/index.ts b/packages/core/src/readers/index.ts
index db782d897..c10bb0fbb 100644
--- a/packages/core/src/readers/index.ts
+++ b/packages/core/src/readers/index.ts
@@ -9,4 +9,5 @@ export * from "./NotionReader.js";
 export * from "./PDFReader.js";
 export * from "./SimpleDirectoryReader.js";
 export * from "./SimpleMongoReader.js";
+export * from "./TextFileReader.js";
 export * from "./type.js";
diff --git a/packages/edge/.gitignore b/packages/edge/.gitignore
new file mode 100644
index 000000000..56027e246
--- /dev/null
+++ b/packages/edge/.gitignore
@@ -0,0 +1,3 @@
+.turbo
+README.md
+LICENSE
diff --git a/packages/edge/e2e/test-edge-runtime/.gitignore b/packages/edge/e2e/test-edge-runtime/.gitignore
new file mode 100644
index 000000000..fd3dbb571
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/.gitignore
@@ -0,0 +1,36 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+.yarn/install-state.gz
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+
+# misc
+.DS_Store
+*.pem
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# local env files
+.env*.local
+
+# vercel
+.vercel
+
+# typescript
+*.tsbuildinfo
+next-env.d.ts
diff --git a/packages/edge/e2e/test-edge-runtime/next.config.mjs b/packages/edge/e2e/test-edge-runtime/next.config.mjs
new file mode 100644
index 000000000..4678774e6
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/next.config.mjs
@@ -0,0 +1,4 @@
+/** @type {import('next').NextConfig} */
+const nextConfig = {};
+
+export default nextConfig;
diff --git a/packages/edge/e2e/test-edge-runtime/package.json b/packages/edge/e2e/test-edge-runtime/package.json
new file mode 100644
index 000000000..c301745f1
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/package.json
@@ -0,0 +1,23 @@
+{
+  "name": "test-edge-runtime",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "dev": "next dev",
+    "build": "next build",
+    "start": "next start",
+    "lint": "next lint"
+  },
+  "dependencies": {
+    "@llamaindex/edge": "workspace:*",
+    "next": "14.1.3",
+    "react": "^18",
+    "react-dom": "^18"
+  },
+  "devDependencies": {
+    "@types/node": "^20",
+    "@types/react": "^18",
+    "@types/react-dom": "^18",
+    "typescript": "^5"
+  }
+}
diff --git a/packages/edge/e2e/test-edge-runtime/public/next.svg b/packages/edge/e2e/test-edge-runtime/public/next.svg
new file mode 100644
index 000000000..5174b28c5
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/public/next.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
\ No newline at end of file
diff --git a/packages/edge/e2e/test-edge-runtime/public/vercel.svg b/packages/edge/e2e/test-edge-runtime/public/vercel.svg
new file mode 100644
index 000000000..d2f842227
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/public/vercel.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
\ No newline at end of file
diff --git a/packages/edge/e2e/test-edge-runtime/src/app/favicon.ico b/packages/edge/e2e/test-edge-runtime/src/app/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c
GIT binary patch
literal 25931
zcmZQzU}Run5D);-3Je;o3=D1z3=9eiP`(HQLmn#wgMk5*ugkzNO_Bi&7#S28dgT}x
z_PH@IXfQA^2!Ql4K-7U1u!2cq2o(kfhFAs$hFwq$VuQp8=~ZB0U|7Jw!0?HIf#E+I
z28n^>Kx(j=W5K|{@BmE@x)~roNDW9WvKjIW3=EHm&<oNJ!XULEJuovClAsr)AA~`A
zK>C##7#P05^!xk!|6jLm-T&3ASEJyyYuElyPfrKwgJF;!klsj`UJxxWFaQ7T+qeJG
z!Qa1s|C^ec!t}yuklx)OeaJXFI~!g5|GvIHm>y&rq!)yd#r|`0a{fPi_AK0tCr_UI
zmynP^Q3JIPq!;7{3^^|^um2!7gA4(=2dW-j9Y`-I3_xLlBFD(c_<!5BZU3)cy$W^@
z7X2VSAibbC0L2B0evo=YL&N_rE-o12AUOsG29O?*UJwSQ1yGv6r50Trq!y$Hq!)%k
zX%dt+(bb~!L25v1Vfv71P~HIL5l~)1*9Q^<$$``$>%qnb<yBCgB{lzIGiz9jfyzlx
zfI1+TlOhy*nT>&gL5G2XA(VlEp^<@s;RO_f*dQ^G97qkt7NHrS#lXPO%D}*IiGhLP
zCp4X-ry~#_BnMIhQVY_9W(>((83qQ1X$%YupYhlUvKJc$=>h2lnL)C}3=9l`3=9kp
z$*>pQEg&;MW|88CA_fMA-&C+0<`$4yATx<^14tcAAGK+a+4$VxPi23jyB`z|AUm+R
zL7IVq;RzMP9Nlgh|1kpt1IR9PH%zC4-7q(R>_WC5R9t<fqy3;dRvpO!ZMf{Vu(0^w
z-QE4aqoac)+}YXrKR!Ml=3i_y$WD+G*cliYuHdp?PE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_hbrraV@oRU*7p_9XP9%?Vd*la
wdX7Ep0SmV?<}=qE3jUeNlEI)NX8hs5!~LCnS#P>PizgX8UHx3vIVCg!02|oaVE_OC

literal 0
HcmV?d00001

diff --git a/packages/edge/e2e/test-edge-runtime/src/app/globals.css b/packages/edge/e2e/test-edge-runtime/src/app/globals.css
new file mode 100644
index 000000000..f4bd77c0c
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/src/app/globals.css
@@ -0,0 +1,107 @@
+:root {
+  --max-width: 1100px;
+  --border-radius: 12px;
+  --font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
+    "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
+    "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
+
+  --foreground-rgb: 0, 0, 0;
+  --background-start-rgb: 214, 219, 220;
+  --background-end-rgb: 255, 255, 255;
+
+  --primary-glow: conic-gradient(
+    from 180deg at 50% 50%,
+    #16abff33 0deg,
+    #0885ff33 55deg,
+    #54d6ff33 120deg,
+    #0071ff33 160deg,
+    transparent 360deg
+  );
+  --secondary-glow: radial-gradient(
+    rgba(255, 255, 255, 1),
+    rgba(255, 255, 255, 0)
+  );
+
+  --tile-start-rgb: 239, 245, 249;
+  --tile-end-rgb: 228, 232, 233;
+  --tile-border: conic-gradient(
+    #00000080,
+    #00000040,
+    #00000030,
+    #00000020,
+    #00000010,
+    #00000010,
+    #00000080
+  );
+
+  --callout-rgb: 238, 240, 241;
+  --callout-border-rgb: 172, 175, 176;
+  --card-rgb: 180, 185, 188;
+  --card-border-rgb: 131, 134, 135;
+}
+
+@media (prefers-color-scheme: dark) {
+  :root {
+    --foreground-rgb: 255, 255, 255;
+    --background-start-rgb: 0, 0, 0;
+    --background-end-rgb: 0, 0, 0;
+
+    --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
+    --secondary-glow: linear-gradient(
+      to bottom right,
+      rgba(1, 65, 255, 0),
+      rgba(1, 65, 255, 0),
+      rgba(1, 65, 255, 0.3)
+    );
+
+    --tile-start-rgb: 2, 13, 46;
+    --tile-end-rgb: 2, 5, 19;
+    --tile-border: conic-gradient(
+      #ffffff80,
+      #ffffff40,
+      #ffffff30,
+      #ffffff20,
+      #ffffff10,
+      #ffffff10,
+      #ffffff80
+    );
+
+    --callout-rgb: 20, 20, 20;
+    --callout-border-rgb: 108, 108, 108;
+    --card-rgb: 100, 100, 100;
+    --card-border-rgb: 200, 200, 200;
+  }
+}
+
+* {
+  box-sizing: border-box;
+  padding: 0;
+  margin: 0;
+}
+
+html,
+body {
+  max-width: 100vw;
+  overflow-x: hidden;
+}
+
+body {
+  color: rgb(var(--foreground-rgb));
+  background: linear-gradient(
+      to bottom,
+      transparent,
+      rgb(var(--background-end-rgb))
+    )
+    rgb(var(--background-start-rgb));
+}
+
+a {
+  color: inherit;
+  text-decoration: none;
+}
+
+@media (prefers-color-scheme: dark) {
+  html {
+    color-scheme: dark;
+  }
+}
diff --git a/packages/edge/e2e/test-edge-runtime/src/app/layout.tsx b/packages/edge/e2e/test-edge-runtime/src/app/layout.tsx
new file mode 100644
index 000000000..8f8b7cfcc
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/src/app/layout.tsx
@@ -0,0 +1,24 @@
+import type { Metadata } from "next";
+import { Inter } from "next/font/google";
+import "./globals.css";
+
+const inter = Inter({ subsets: ["latin"] });
+
+export const metadata: Metadata = {
+  title: "Create Next App",
+  description: "Generated by create next app",
+};
+
+export const runtime = "edge";
+
+export default function RootLayout({
+  children,
+}: Readonly<{
+  children: React.ReactNode;
+}>) {
+  return (
+    <html lang="en">
+      <body className={inter.className}>{children}</body>
+    </html>
+  );
+}
diff --git a/packages/edge/e2e/test-edge-runtime/src/app/page.module.css b/packages/edge/e2e/test-edge-runtime/src/app/page.module.css
new file mode 100644
index 000000000..d979f776c
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/src/app/page.module.css
@@ -0,0 +1,232 @@
+.main {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  align-items: center;
+  padding: 6rem;
+  min-height: 100vh;
+}
+
+.description {
+  display: inherit;
+  justify-content: inherit;
+  align-items: inherit;
+  font-size: 0.85rem;
+  max-width: var(--max-width);
+  width: 100%;
+  z-index: 2;
+  font-family: var(--font-mono);
+}
+
+.description a {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  gap: 0.5rem;
+}
+
+.description p {
+  position: relative;
+  margin: 0;
+  padding: 1rem;
+  background-color: rgba(var(--callout-rgb), 0.5);
+  border: 1px solid rgba(var(--callout-border-rgb), 0.3);
+  border-radius: var(--border-radius);
+}
+
+.code {
+  font-weight: 700;
+  font-family: var(--font-mono);
+}
+
+.grid {
+  display: grid;
+  grid-template-columns: repeat(4, minmax(25%, auto));
+  max-width: 100%;
+  width: var(--max-width);
+}
+
+.card {
+  padding: 1rem 1.2rem;
+  border-radius: var(--border-radius);
+  background: rgba(var(--card-rgb), 0);
+  border: 1px solid rgba(var(--card-border-rgb), 0);
+  transition:
+    background 200ms,
+    border 200ms;
+}
+
+.card span {
+  display: inline-block;
+  transition: transform 200ms;
+}
+
+.card h2 {
+  font-weight: 600;
+  margin-bottom: 0.7rem;
+}
+
+.card p {
+  margin: 0;
+  opacity: 0.6;
+  font-size: 0.9rem;
+  line-height: 1.5;
+  max-width: 30ch;
+  text-wrap: balance;
+}
+
+.center {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: relative;
+  padding: 4rem 0;
+}
+
+.center::before {
+  background: var(--secondary-glow);
+  border-radius: 50%;
+  width: 480px;
+  height: 360px;
+  margin-left: -400px;
+}
+
+.center::after {
+  background: var(--primary-glow);
+  width: 240px;
+  height: 180px;
+  z-index: -1;
+}
+
+.center::before,
+.center::after {
+  content: "";
+  left: 50%;
+  position: absolute;
+  filter: blur(45px);
+  transform: translateZ(0);
+}
+
+.logo {
+  position: relative;
+}
+/* Enable hover only on non-touch devices */
+@media (hover: hover) and (pointer: fine) {
+  .card:hover {
+    background: rgba(var(--card-rgb), 0.1);
+    border: 1px solid rgba(var(--card-border-rgb), 0.15);
+  }
+
+  .card:hover span {
+    transform: translateX(4px);
+  }
+}
+
+@media (prefers-reduced-motion) {
+  .card:hover span {
+    transform: none;
+  }
+}
+
+/* Mobile */
+@media (max-width: 700px) {
+  .content {
+    padding: 4rem;
+  }
+
+  .grid {
+    grid-template-columns: 1fr;
+    margin-bottom: 120px;
+    max-width: 320px;
+    text-align: center;
+  }
+
+  .card {
+    padding: 1rem 2.5rem;
+  }
+
+  .card h2 {
+    margin-bottom: 0.5rem;
+  }
+
+  .center {
+    padding: 8rem 0 6rem;
+  }
+
+  .center::before {
+    transform: none;
+    height: 300px;
+  }
+
+  .description {
+    font-size: 0.8rem;
+  }
+
+  .description a {
+    padding: 1rem;
+  }
+
+  .description p,
+  .description div {
+    display: flex;
+    justify-content: center;
+    position: fixed;
+    width: 100%;
+  }
+
+  .description p {
+    align-items: center;
+    inset: 0 0 auto;
+    padding: 2rem 1rem 1.4rem;
+    border-radius: 0;
+    border: none;
+    border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
+    background: linear-gradient(
+      to bottom,
+      rgba(var(--background-start-rgb), 1),
+      rgba(var(--callout-rgb), 0.5)
+    );
+    background-clip: padding-box;
+    backdrop-filter: blur(24px);
+  }
+
+  .description div {
+    align-items: flex-end;
+    pointer-events: none;
+    inset: auto 0 0;
+    padding: 2rem;
+    height: 200px;
+    background: linear-gradient(
+      to bottom,
+      transparent 0%,
+      rgb(var(--background-end-rgb)) 40%
+    );
+    z-index: 1;
+  }
+}
+
+/* Tablet and Smaller Desktop */
+@media (min-width: 701px) and (max-width: 1120px) {
+  .grid {
+    grid-template-columns: repeat(2, 50%);
+  }
+}
+
+@media (prefers-color-scheme: dark) {
+  .vercelLogo {
+    filter: invert(1);
+  }
+
+  .logo {
+    filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
+  }
+}
+
+@keyframes rotate {
+  from {
+    transform: rotate(360deg);
+  }
+  to {
+    transform: rotate(0deg);
+  }
+}
diff --git a/packages/edge/e2e/test-edge-runtime/src/app/page.tsx b/packages/edge/e2e/test-edge-runtime/src/app/page.tsx
new file mode 100644
index 000000000..264289621
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/src/app/page.tsx
@@ -0,0 +1,98 @@
+import Image from "next/image";
+import "../utils/llm";
+import styles from "./page.module.css";
+
+export const runtime = "edge";
+
+export default function Home() {
+  return (
+    <main className={styles.main}>
+      <div className={styles.description}>
+        <p>
+          Get started by editing&nbsp;
+          <code className={styles.code}>src/app/page.tsx</code>
+        </p>
+        <div>
+          <a
+            href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
+            target="_blank"
+            rel="noopener noreferrer"
+          >
+            By{" "}
+            <Image
+              src="/vercel.svg"
+              alt="Vercel Logo"
+              className={styles.vercelLogo}
+              width={100}
+              height={24}
+              priority
+            />
+          </a>
+        </div>
+      </div>
+
+      <div className={styles.center}>
+        <Image
+          className={styles.logo}
+          src="/next.svg"
+          alt="Next.js Logo"
+          width={180}
+          height={37}
+          priority
+        />
+      </div>
+
+      <div className={styles.grid}>
+        <a
+          href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
+          className={styles.card}
+          target="_blank"
+          rel="noopener noreferrer"
+        >
+          <h2>
+            Docs <span>-&gt;</span>
+          </h2>
+          <p>Find in-depth information about Next.js features and API.</p>
+        </a>
+
+        <a
+          href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
+          className={styles.card}
+          target="_blank"
+          rel="noopener noreferrer"
+        >
+          <h2>
+            Learn <span>-&gt;</span>
+          </h2>
+          <p>Learn about Next.js in an interactive course with&nbsp;quizzes!</p>
+        </a>
+
+        <a
+          href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
+          className={styles.card}
+          target="_blank"
+          rel="noopener noreferrer"
+        >
+          <h2>
+            Templates <span>-&gt;</span>
+          </h2>
+          <p>Explore starter templates for Next.js.</p>
+        </a>
+
+        <a
+          href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
+          className={styles.card}
+          target="_blank"
+          rel="noopener noreferrer"
+        >
+          <h2>
+            Deploy <span>-&gt;</span>
+          </h2>
+          <p>
+            Instantly deploy your Next.js site to a shareable URL with Vercel.
+          </p>
+        </a>
+      </div>
+    </main>
+  );
+}
diff --git a/packages/edge/e2e/test-edge-runtime/src/utils/llm.ts b/packages/edge/e2e/test-edge-runtime/src/utils/llm.ts
new file mode 100644
index 000000000..40c55297c
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/src/utils/llm.ts
@@ -0,0 +1,8 @@
+"use server";
+// test runtime
+import "@llamaindex/edge";
+
+// @ts-expect-error
+if (typeof EdgeRuntime !== "string") {
+  throw new Error("Expected run in EdgeRuntime");
+}
diff --git a/packages/edge/e2e/test-edge-runtime/tsconfig.json b/packages/edge/e2e/test-edge-runtime/tsconfig.json
new file mode 100644
index 000000000..b5e6c4d43
--- /dev/null
+++ b/packages/edge/e2e/test-edge-runtime/tsconfig.json
@@ -0,0 +1,27 @@
+{
+  "compilerOptions": {
+    "lib": ["dom", "dom.iterable", "esnext"],
+    "outDir": "./dist",
+    "allowJs": true,
+    "skipLibCheck": true,
+    "strict": true,
+    "noEmit": true,
+    "esModuleInterop": true,
+    "module": "esnext",
+    "moduleResolution": "bundler",
+    "resolveJsonModule": true,
+    "isolatedModules": true,
+    "jsx": "preserve",
+    "incremental": true,
+    "plugins": [
+      {
+        "name": "next"
+      }
+    ],
+    "paths": {
+      "@/*": ["./src/*"]
+    }
+  },
+  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+  "exclude": ["node_modules"]
+}
diff --git a/packages/edge/package.json b/packages/edge/package.json
new file mode 100644
index 000000000..606831aa4
--- /dev/null
+++ b/packages/edge/package.json
@@ -0,0 +1,84 @@
+{
+  "name": "@llamaindex/edge",
+  "version": "0.1.21",
+  "license": "MIT",
+  "type": "module",
+  "dependencies": {
+    "@anthropic-ai/sdk": "^0.18.0",
+    "@aws-crypto/sha256-js": "^5.2.0",
+    "@datastax/astra-db-ts": "^0.1.4",
+    "@grpc/grpc-js": "^1.10.2",
+    "@llamaindex/cloud": "0.0.4",
+    "@llamaindex/env": "workspace:*",
+    "@mistralai/mistralai": "^0.0.10",
+    "@notionhq/client": "^2.2.14",
+    "@pinecone-database/pinecone": "^2.0.1",
+    "@qdrant/js-client-rest": "^1.7.0",
+    "@types/lodash": "^4.14.202",
+    "@types/node": "^18.19.14",
+    "@types/papaparse": "^5.3.14",
+    "@types/pg": "^8.11.0",
+    "@xenova/transformers": "^2.15.0",
+    "@zilliz/milvus2-sdk-node": "^2.3.5",
+    "assemblyai": "^4.2.2",
+    "chromadb": "~1.7.3",
+    "cohere-ai": "^7.7.5",
+    "js-tiktoken": "^1.0.10",
+    "lodash": "^4.17.21",
+    "magic-bytes.js": "^1.10.0",
+    "mammoth": "^1.6.0",
+    "md-utils-ts": "^2.0.0",
+    "mongodb": "^6.3.0",
+    "notion-md-crawler": "^0.0.2",
+    "openai": "^4.26.1",
+    "papaparse": "^5.4.1",
+    "pathe": "^1.1.2",
+    "pdf2json": "^3.0.5",
+    "pg": "^8.11.3",
+    "pgvector": "^0.1.7",
+    "portkey-ai": "^0.1.16",
+    "rake-modified": "^1.0.8",
+    "replicate": "^0.25.2",
+    "string-strip-html": "^13.4.6",
+    "wink-nlp": "^1.14.3"
+  },
+  "engines": {
+    "node": ">=18.0.0"
+  },
+  "types": "./dist/type/index.edge.d.ts",
+  "main": "./dist/index.edge.js",
+  "exports": {
+    "./readers/SimpleDirectoryReader": {
+      "import": {
+        "types": "./dist/type/readers/SimpleDirectoryReader.edge.d.ts",
+        "default": "./dist/readers/SimpleDirectoryReader.edge.js"
+      }
+    },
+    ".": {
+      "import": {
+        "types": "./dist/type/index.edge.d.ts",
+        "default": "./dist/index.edge.js"
+      }
+    },
+    "./*": {
+      "import": {
+        "types": "./dist/type/*.d.ts",
+        "default": "./dist/*.js"
+      }
+    }
+  },
+  "files": [
+    "dist"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/run-llama/LlamaIndexTS.git",
+    "directory": "packages/edge"
+  },
+  "scripts": {
+    "copy": "cp -r ../../README.md ../../LICENSE .",
+    "compare": "node scripts/compare-deps.js",
+    "build:core": "pnpm --filter llamaindex build && cp -r ../core/dist . && rm -fr dist/cjs",
+    "build": "pnpm run compare && pnpm run build:core && pnpm copy"
+  }
+}
diff --git a/packages/edge/scripts/compare-deps.js b/packages/edge/scripts/compare-deps.js
new file mode 100644
index 000000000..738058c8c
--- /dev/null
+++ b/packages/edge/scripts/compare-deps.js
@@ -0,0 +1,36 @@
+import fs from "node:fs";
+import path from "node:path";
+
+const corePackage = readJson(
+  path.join(process.cwd(), "..", "core", "package.json"),
+);
+const edgePackage = readJson(path.join(process.cwd(), "package.json"));
+
+if (!equalObjs(corePackage.dependencies, edgePackage.dependencies)) {
+  console.log(
+    "Dependencies of '@llamaindex/edge' and 'core' package are not the same. Sync dependencies and run build again",
+  );
+  process.exit(1);
+}
+
+function readJson(filePath) {
+  const content = fs.readFileSync(filePath, "utf8");
+  return JSON.parse(content);
+}
+
+function equalObjs(deps1, deps2) {
+  const keys1 = Object.keys(deps1);
+  const keys2 = Object.keys(deps2);
+
+  if (keys1.length !== keys2.length) {
+    return false;
+  }
+
+  for (const key of keys1) {
+    if (deps1[key] !== deps2[key]) {
+      return false;
+    }
+  }
+
+  return true;
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 121aedc50..430efc9eb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,7 +53,7 @@ importers:
         version: link:../../packages/env
       '@mdx-js/react':
         specifier: ^3.0.0
-        version: 3.0.0(@types/react@18.2.65)(react@18.2.0)
+        version: 3.0.0(@types/react@18.2.66)(react@18.2.0)
       clsx:
         specifier: ^2.1.0
         version: 2.1.0
@@ -78,10 +78,10 @@ importers:
         version: 3.1.0(react-dom@18.2.0)(react@18.2.0)
       '@docusaurus/preset-classic':
         specifier: ^3.1.1
-        version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
+        version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
       '@docusaurus/theme-classic':
         specifier: ^3.1.1
-        version: 3.1.1(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
+        version: 3.1.1(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
       '@docusaurus/types':
         specifier: ^3.1.1
         version: 3.1.1(react-dom@18.2.0)(react@18.2.0)
@@ -225,15 +225,15 @@ importers:
       cohere-ai:
         specifier: ^7.7.5
         version: 7.7.5
-      file-type:
-        specifier: ^18.7.0
-        version: 18.7.0
       js-tiktoken:
         specifier: ^1.0.10
         version: 1.0.10
       lodash:
         specifier: ^4.17.21
         version: 4.17.21
+      magic-bytes.js:
+        specifier: ^1.10.0
+        version: 1.10.0
       mammoth:
         specifier: ^1.6.0
         version: 1.6.0
@@ -308,6 +308,148 @@ importers:
         specifier: ^1.3.1
         version: 1.3.1
 
+  packages/edge:
+    dependencies:
+      '@anthropic-ai/sdk':
+        specifier: ^0.18.0
+        version: 0.18.0
+      '@aws-crypto/sha256-js':
+        specifier: ^5.2.0
+        version: 5.2.0
+      '@datastax/astra-db-ts':
+        specifier: ^0.1.4
+        version: 0.1.4
+      '@grpc/grpc-js':
+        specifier: ^1.10.2
+        version: 1.10.3
+      '@llamaindex/cloud':
+        specifier: 0.0.4
+        version: 0.0.4
+      '@llamaindex/env':
+        specifier: workspace:*
+        version: link:../env
+      '@mistralai/mistralai':
+        specifier: ^0.0.10
+        version: 0.0.10
+      '@notionhq/client':
+        specifier: ^2.2.14
+        version: 2.2.14
+      '@pinecone-database/pinecone':
+        specifier: ^2.0.1
+        version: 2.0.1
+      '@qdrant/js-client-rest':
+        specifier: ^1.7.0
+        version: 1.7.0(typescript@5.4.2)
+      '@types/lodash':
+        specifier: ^4.14.202
+        version: 4.14.202
+      '@types/node':
+        specifier: ^18.19.14
+        version: 18.19.14
+      '@types/papaparse':
+        specifier: ^5.3.14
+        version: 5.3.14
+      '@types/pg':
+        specifier: ^8.11.0
+        version: 8.11.0
+      '@xenova/transformers':
+        specifier: ^2.15.0
+        version: 2.15.0
+      '@zilliz/milvus2-sdk-node':
+        specifier: ^2.3.5
+        version: 2.3.5
+      assemblyai:
+        specifier: ^4.2.2
+        version: 4.2.2
+      chromadb:
+        specifier: ~1.7.3
+        version: 1.7.3(cohere-ai@7.7.5)(openai@4.26.1)
+      cohere-ai:
+        specifier: ^7.7.5
+        version: 7.7.5
+      js-tiktoken:
+        specifier: ^1.0.10
+        version: 1.0.10
+      lodash:
+        specifier: ^4.17.21
+        version: 4.17.21
+      magic-bytes.js:
+        specifier: ^1.10.0
+        version: 1.10.0
+      mammoth:
+        specifier: ^1.6.0
+        version: 1.6.0
+      md-utils-ts:
+        specifier: ^2.0.0
+        version: 2.0.0
+      mongodb:
+        specifier: ^6.3.0
+        version: 6.3.0
+      notion-md-crawler:
+        specifier: ^0.0.2
+        version: 0.0.2
+      openai:
+        specifier: ^4.26.1
+        version: 4.26.1
+      papaparse:
+        specifier: ^5.4.1
+        version: 5.4.1
+      pathe:
+        specifier: ^1.1.2
+        version: 1.1.2
+      pdf2json:
+        specifier: ^3.0.5
+        version: 3.0.5
+      pg:
+        specifier: ^8.11.3
+        version: 8.11.3
+      pgvector:
+        specifier: ^0.1.7
+        version: 0.1.7
+      portkey-ai:
+        specifier: ^0.1.16
+        version: 0.1.16
+      rake-modified:
+        specifier: ^1.0.8
+        version: 1.0.8
+      replicate:
+        specifier: ^0.25.2
+        version: 0.25.2
+      string-strip-html:
+        specifier: ^13.4.6
+        version: 13.4.6
+      wink-nlp:
+        specifier: ^1.14.3
+        version: 1.14.3
+
+  packages/edge/e2e/test-edge-runtime:
+    dependencies:
+      '@llamaindex/edge':
+        specifier: workspace:*
+        version: link:../..
+      next:
+        specifier: 14.1.3
+        version: 14.1.3(react-dom@18.2.0)(react@18.2.0)
+      react:
+        specifier: ^18
+        version: 18.2.0
+      react-dom:
+        specifier: ^18
+        version: 18.2.0(react@18.2.0)
+    devDependencies:
+      '@types/node':
+        specifier: ^20
+        version: 20.11.20
+      '@types/react':
+        specifier: ^18
+        version: 18.2.65
+      '@types/react-dom':
+        specifier: ^18
+        version: 18.2.22
+      typescript:
+        specifier: ^5
+        version: 5.4.2
+
   packages/env:
     dependencies:
       '@types/lodash':
@@ -2052,7 +2194,7 @@ packages:
     resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==}
     dev: true
 
-  /@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.65)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0):
+  /@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.66)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0):
     resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==}
     peerDependencies:
       '@types/react': '>= 16.8.0 < 19.0.0'
@@ -2072,7 +2214,7 @@ packages:
       '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0)
       '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)
       '@docsearch/css': 3.5.2
-      '@types/react': 18.2.65
+      '@types/react': 18.2.66
       algoliasearch: 4.22.1
       react: 18.2.0
       react-dom: 18.2.0(react@18.2.0)
@@ -2271,7 +2413,7 @@ packages:
       '@docusaurus/react-loadable': 5.5.2(react@18.2.0)
       '@docusaurus/types': 3.1.1(react-dom@18.2.0)(react@18.2.0)
       '@types/history': 4.7.11
-      '@types/react': 18.2.48
+      '@types/react': 18.2.65
       '@types/react-router-config': 5.0.11
       '@types/react-router-dom': 5.3.3
       react: 18.2.0
@@ -2578,7 +2720,7 @@ packages:
       - webpack-cli
     dev: true
 
-  /@docusaurus/preset-classic@3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
+  /@docusaurus/preset-classic@3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
     resolution: {integrity: sha512-jG4ys/hWYf69iaN/xOmF+3kjs4Nnz1Ay3CjFLDtYa8KdxbmUhArA9HmP26ru5N0wbVWhY+6kmpYhTJpez5wTyg==}
     engines: {node: '>=18.0'}
     peerDependencies:
@@ -2594,9 +2736,9 @@ packages:
       '@docusaurus/plugin-google-gtag': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
       '@docusaurus/plugin-google-tag-manager': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
       '@docusaurus/plugin-sitemap': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
-      '@docusaurus/theme-classic': 3.1.1(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
+      '@docusaurus/theme-classic': 3.1.1(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
       '@docusaurus/theme-common': 3.1.1(@docusaurus/types@3.1.1)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
-      '@docusaurus/theme-search-algolia': 3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
+      '@docusaurus/theme-search-algolia': 3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
       '@docusaurus/types': 3.1.1(react-dom@18.2.0)(react@18.2.0)
       react: 18.2.0
       react-dom: 18.2.0(react@18.2.0)
@@ -2627,7 +2769,7 @@ packages:
     peerDependencies:
       react: '*'
     dependencies:
-      '@types/react': 18.2.65
+      '@types/react': 18.2.66
       prop-types: 15.8.1
       react: 18.2.0
 
@@ -2644,7 +2786,7 @@ packages:
       - supports-color
     dev: false
 
-  /@docusaurus/theme-classic@3.1.1(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3):
+  /@docusaurus/theme-classic@3.1.1(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3):
     resolution: {integrity: sha512-GiPE/jbWM8Qv1A14lk6s9fhc0LhPEQ00eIczRO4QL2nAQJZXkjPG6zaVx+1cZxPFWbAsqSjKe2lqkwF3fGkQ7Q==}
     engines: {node: '>=18.0'}
     peerDependencies:
@@ -2663,7 +2805,7 @@ packages:
       '@docusaurus/utils': 3.1.1(@docusaurus/types@3.1.1)
       '@docusaurus/utils-common': 3.1.1(@docusaurus/types@3.1.1)
       '@docusaurus/utils-validation': 3.1.1(@docusaurus/types@3.1.1)
-      '@mdx-js/react': 3.0.0(@types/react@18.2.65)(react@18.2.0)
+      '@mdx-js/react': 3.0.0(@types/react@18.2.66)(react@18.2.0)
       clsx: 2.1.0
       copy-text-to-clipboard: 3.2.0
       infima: 0.2.0-alpha.43
@@ -2713,7 +2855,7 @@ packages:
       '@docusaurus/utils': 3.1.1(@docusaurus/types@3.1.1)
       '@docusaurus/utils-common': 3.1.1(@docusaurus/types@3.1.1)
       '@types/history': 4.7.11
-      '@types/react': 18.2.48
+      '@types/react': 18.2.65
       '@types/react-router-config': 5.0.11
       clsx: 2.1.0
       parse-numeric-range: 1.3.0
@@ -2742,14 +2884,14 @@ packages:
       - webpack-cli
     dev: true
 
-  /@docusaurus/theme-search-algolia@3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.65)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
+  /@docusaurus/theme-search-algolia@3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
     resolution: {integrity: sha512-tBH9VY5EpRctVdaAhT+b1BY8y5dyHVZGFXyCHgTrvcXQy5CV4q7serEX7U3SveNT9zksmchPyct6i1sFDC4Z5g==}
     engines: {node: '>=18.0'}
     peerDependencies:
       react: ^18.0.0
       react-dom: ^18.0.0
     dependencies:
-      '@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.65)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)
+      '@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.66)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)
       '@docusaurus/core': 3.1.1(@docusaurus/types@3.1.1)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
       '@docusaurus/logger': 3.1.1
       '@docusaurus/plugin-content-docs': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
@@ -2806,7 +2948,7 @@ packages:
     dependencies:
       '@mdx-js/mdx': 3.0.0
       '@types/history': 4.7.11
-      '@types/react': 18.2.48
+      '@types/react': 18.2.65
       commander: 5.1.0
       joi: 17.12.0
       react: 18.2.0
@@ -3178,12 +3320,20 @@ packages:
       '@js-sdsl/ordered-map': 4.4.2
     dev: false
 
+  /@grpc/grpc-js@1.10.3:
+    resolution: {integrity: sha512-qiO9MNgYnwbvZ8MK0YLWbnGrNX3zTcj6/Ef7UHu5ZofER3e2nF3Y35GaPo9qNJJ/UJQKa4KL+z/F4Q8Q+uCdUQ==}
+    engines: {node: '>=12.10.0'}
+    dependencies:
+      '@grpc/proto-loader': 0.7.10
+      '@js-sdsl/ordered-map': 4.4.2
+    dev: false
+
   /@grpc/grpc-js@1.8.17:
     resolution: {integrity: sha512-DGuSbtMFbaRsyffMf+VEkVu8HkSXEUfO3UyGJNtqxW9ABdtTIA+2UXAJpwbJS+xfQxuwqLUeELmL6FuZkOqPxw==}
     engines: {node: ^8.13.0 || >=10.10.0}
     dependencies:
       '@grpc/proto-loader': 0.7.7
-      '@types/node': 20.11.20
+      '@types/node': 18.19.14
     dev: false
 
   /@grpc/proto-loader@0.7.10:
@@ -3376,14 +3526,14 @@ packages:
     transitivePeerDependencies:
       - supports-color
 
-  /@mdx-js/react@3.0.0(@types/react@18.2.65)(react@18.2.0):
+  /@mdx-js/react@3.0.0(@types/react@18.2.66)(react@18.2.0):
     resolution: {integrity: sha512-nDctevR9KyYFyV+m+/+S4cpzCWHqj+iHDHq3QrsWezcC+B17uZdIWgCguESUkwFhM3n/56KxWVE3V6EokrmONQ==}
     peerDependencies:
       '@types/react': '>=16'
       react: '>=16'
     dependencies:
       '@types/mdx': 2.0.10
-      '@types/react': 18.2.65
+      '@types/react': 18.2.66
       react: 18.2.0
 
   /@mistralai/mistralai@0.0.10:
@@ -3418,6 +3568,10 @@ packages:
     resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==}
     dev: true
 
+  /@next/env@14.1.3:
+    resolution: {integrity: sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ==}
+    dev: false
+
   /@next/eslint-plugin-next@13.5.6:
     resolution: {integrity: sha512-ng7pU/DDsxPgT6ZPvuprxrkeew3XaRf4LAT4FabaEO/hAbvVx4P7wqnqdbTdDn1kgTvsI4tpIgT4Awn/m0bGbg==}
     dependencies:
@@ -3433,6 +3587,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-darwin-arm64@14.1.3:
+    resolution: {integrity: sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==}
+    engines: {node: '>= 10'}
+    cpu: [arm64]
+    os: [darwin]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-darwin-x64@13.5.6:
     resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==}
     engines: {node: '>= 10'}
@@ -3442,6 +3605,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-darwin-x64@14.1.3:
+    resolution: {integrity: sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==}
+    engines: {node: '>= 10'}
+    cpu: [x64]
+    os: [darwin]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-linux-arm64-gnu@13.5.6:
     resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==}
     engines: {node: '>= 10'}
@@ -3451,6 +3623,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-linux-arm64-gnu@14.1.3:
+    resolution: {integrity: sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==}
+    engines: {node: '>= 10'}
+    cpu: [arm64]
+    os: [linux]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-linux-arm64-musl@13.5.6:
     resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==}
     engines: {node: '>= 10'}
@@ -3460,6 +3641,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-linux-arm64-musl@14.1.3:
+    resolution: {integrity: sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==}
+    engines: {node: '>= 10'}
+    cpu: [arm64]
+    os: [linux]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-linux-x64-gnu@13.5.6:
     resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==}
     engines: {node: '>= 10'}
@@ -3469,6 +3659,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-linux-x64-gnu@14.1.3:
+    resolution: {integrity: sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==}
+    engines: {node: '>= 10'}
+    cpu: [x64]
+    os: [linux]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-linux-x64-musl@13.5.6:
     resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==}
     engines: {node: '>= 10'}
@@ -3478,6 +3677,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-linux-x64-musl@14.1.3:
+    resolution: {integrity: sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==}
+    engines: {node: '>= 10'}
+    cpu: [x64]
+    os: [linux]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-win32-arm64-msvc@13.5.6:
     resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==}
     engines: {node: '>= 10'}
@@ -3487,6 +3695,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-win32-arm64-msvc@14.1.3:
+    resolution: {integrity: sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==}
+    engines: {node: '>= 10'}
+    cpu: [arm64]
+    os: [win32]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-win32-ia32-msvc@13.5.6:
     resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==}
     engines: {node: '>= 10'}
@@ -3496,6 +3713,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-win32-ia32-msvc@14.1.3:
+    resolution: {integrity: sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==}
+    engines: {node: '>= 10'}
+    cpu: [ia32]
+    os: [win32]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@next/swc-win32-x64-msvc@13.5.6:
     resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==}
     engines: {node: '>= 10'}
@@ -3505,6 +3731,15 @@ packages:
     dev: true
     optional: true
 
+  /@next/swc-win32-x64-msvc@14.1.3:
+    resolution: {integrity: sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==}
+    engines: {node: '>= 10'}
+    cpu: [x64]
+    os: [win32]
+    requiresBuild: true
+    dev: false
+    optional: true
+
   /@nodelib/fs.scandir@2.1.5:
     resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
     engines: {node: '>= 8'}
@@ -3636,6 +3871,18 @@ packages:
       undici: 5.28.2
     dev: false
 
+  /@qdrant/js-client-rest@1.7.0(typescript@5.4.2):
+    resolution: {integrity: sha512-16O0EQfrrybcPVipodxykr6dMUlBzKW7a63cSDUFVgc5a1AWESwERykwjuvW5KqvKdkPcxZ2NssrvgUO1W3MgA==}
+    engines: {node: '>=18.0.0', pnpm: '>=8'}
+    peerDependencies:
+      typescript: '>=4.1'
+    dependencies:
+      '@qdrant/openapi-typescript-fetch': 1.2.1
+      '@sevinf/maybe': 0.5.0
+      typescript: 5.4.2
+      undici: 5.28.2
+    dev: false
+
   /@qdrant/openapi-typescript-fetch@1.2.1:
     resolution: {integrity: sha512-oiBJRN1ME7orFZocgE25jrM3knIF/OKJfMsZPBbtMMKfgNVYfps0MokGvSJkBmecj6bf8QoLXWIGlIoaTM4Zmw==}
     engines: {node: '>=12.0.0', pnpm: '>=8'}
@@ -4105,7 +4352,6 @@ packages:
     resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==}
     dependencies:
       tslib: 2.6.2
-    dev: true
 
   /@swc/types@0.1.5:
     resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==}
@@ -4126,6 +4372,7 @@ packages:
 
   /@tokenizer/token@0.3.0:
     resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==}
+    dev: true
 
   /@trysound/sax@0.2.0:
     resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
@@ -4160,12 +4407,12 @@ packages:
     resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
     dependencies:
       '@types/connect': 3.4.38
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/bonjour@3.5.13:
     resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/cacheable-request@6.0.3:
     resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==}
@@ -4180,7 +4427,7 @@ packages:
     resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==}
     dependencies:
       '@types/express-serve-static-core': 4.17.42
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/connect@3.4.38:
     resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
@@ -4215,7 +4462,7 @@ packages:
   /@types/express-serve-static-core@4.17.42:
     resolution: {integrity: sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
       '@types/qs': 6.9.12
       '@types/range-parser': 1.2.7
       '@types/send': 0.17.4
@@ -4252,7 +4499,7 @@ packages:
   /@types/http-proxy@1.17.14:
     resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/istanbul-lib-coverage@2.0.6:
     resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==}
@@ -4324,7 +4571,7 @@ packages:
   /@types/node-fetch@2.6.11:
     resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
     dependencies:
-      '@types/node': 18.19.14
+      '@types/node': 20.11.20
       form-data: 4.0.0
     dev: false
 
@@ -4338,7 +4585,7 @@ packages:
   /@types/node-forge@1.3.11:
     resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/node@12.20.55:
     resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
@@ -4405,6 +4652,12 @@ packages:
   /@types/range-parser@1.2.7:
     resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==}
 
+  /@types/react-dom@18.2.22:
+    resolution: {integrity: sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==}
+    dependencies:
+      '@types/react': 18.2.65
+    dev: true
+
   /@types/react-router-config@5.0.11:
     resolution: {integrity: sha512-WmSAg7WgqW7m4x8Mt4N6ZyKz0BubSj/2tVUMsAHp+Yd2AMwcSbeFq9WympT19p5heCFmF97R9eD5uUR/t4HEqw==}
     dependencies:
@@ -4417,7 +4670,7 @@ packages:
     resolution: {integrity: sha512-zBzYZsr05V9xRG96oQ/xBXHy5+fDCX5wL7bboM0FFoOYQp9Gxmz8uvuKSkLesNWHlICl+W1l64F7fmp/KsOkuw==}
     dependencies:
       '@types/history': 4.7.11
-      '@types/react': 18.2.48
+      '@types/react': 18.2.65
       '@types/react-router': 5.1.20
     dev: true
 
@@ -4425,7 +4678,7 @@ packages:
     resolution: {integrity: sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==}
     dependencies:
       '@types/history': 4.7.11
-      '@types/react': 18.2.48
+      '@types/react': 18.2.65
       '@types/react-router': 5.1.20
     dev: true
 
@@ -4449,6 +4702,14 @@ packages:
       '@types/prop-types': 15.7.11
       '@types/scheduler': 0.16.8
       csstype: 3.1.3
+    dev: true
+
+  /@types/react@18.2.66:
+    resolution: {integrity: sha512-OYTmMI4UigXeFMF/j4uv0lBBEbongSgptPrHBxqME44h9+yNov+oL6Z3ocJKo0WyXR84sQUNeyIp9MRfckvZpg==}
+    dependencies:
+      '@types/prop-types': 15.7.11
+      '@types/scheduler': 0.16.8
+      csstype: 3.1.3
 
   /@types/responselike@1.0.3:
     resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
@@ -4462,7 +4723,7 @@ packages:
   /@types/sax@1.2.7:
     resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
     dev: true
 
   /@types/scheduler@0.16.4:
@@ -4491,12 +4752,12 @@ packages:
     dependencies:
       '@types/http-errors': 2.0.4
       '@types/mime': 3.0.4
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/sockjs@0.3.36:
     resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/triple-beam@1.3.5:
     resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==}
@@ -4521,7 +4782,7 @@ packages:
   /@types/ws@8.5.10:
     resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
 
   /@types/yargs-parser@21.0.3:
     resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
@@ -5539,8 +5800,8 @@ packages:
     engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
     hasBin: true
     dependencies:
-      caniuse-lite: 1.0.30001597
-      electron-to-chromium: 1.4.703
+      caniuse-lite: 1.0.30001599
+      electron-to-chromium: 1.4.708
       node-releases: 2.0.14
       update-browserslist-db: 1.0.13(browserslist@4.23.0)
     dev: false
@@ -5578,7 +5839,6 @@ packages:
     engines: {node: '>=10.16.0'}
     dependencies:
       streamsearch: 1.1.0
-    dev: true
 
   /bytes@3.0.0:
     resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==}
@@ -5670,7 +5930,7 @@ packages:
     resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
     dependencies:
       browserslist: 4.22.3
-      caniuse-lite: 1.0.30001580
+      caniuse-lite: 1.0.30001597
       lodash.memoize: 4.1.2
       lodash.uniq: 4.5.0
 
@@ -5679,6 +5939,9 @@ packages:
 
   /caniuse-lite@1.0.30001597:
     resolution: {integrity: sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==}
+
+  /caniuse-lite@1.0.30001599:
+    resolution: {integrity: sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==}
     dev: false
 
   /ccount@2.0.1:
@@ -5891,7 +6154,6 @@ packages:
 
   /client-only@0.0.1:
     resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
-    dev: true
 
   /cliui@6.0.0:
     resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==}
@@ -6972,8 +7234,8 @@ packages:
   /electron-to-chromium@1.4.648:
     resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==}
 
-  /electron-to-chromium@1.4.703:
-    resolution: {integrity: sha512-094ZZC4nHXPKl/OwPinSMtLN9+hoFkdfQGKnvXbY+3WEAYtVDpz9UhJIViiY6Zb8agvqxiaJzNG9M+pRZWvSZw==}
+  /electron-to-chromium@1.4.708:
+    resolution: {integrity: sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==}
     dev: false
 
   /emoji-regex@10.3.0:
@@ -7737,6 +7999,7 @@ packages:
   /events@3.3.0:
     resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
     engines: {node: '>=0.8.x'}
+    requiresBuild: true
 
   /execa@0.7.0:
     resolution: {integrity: sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==}
@@ -7957,15 +8220,6 @@ packages:
       token-types: 5.0.1
     dev: true
 
-  /file-type@18.7.0:
-    resolution: {integrity: sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==}
-    engines: {node: '>=14.16'}
-    dependencies:
-      readable-web-to-node-stream: 3.0.2
-      strtok3: 7.0.0
-      token-types: 5.0.1
-    dev: false
-
   /filename-reserved-regex@3.0.0:
     resolution: {integrity: sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==}
     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -9438,7 +9692,7 @@ packages:
     engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
     dependencies:
       '@jest/types': 29.6.3
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
       chalk: 4.1.2
       ci-info: 3.9.0
       graceful-fs: 4.2.11
@@ -9448,7 +9702,7 @@ packages:
     resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
     engines: {node: '>= 10.13.0'}
     dependencies:
-      '@types/node': 18.19.10
+      '@types/node': 20.11.20
       merge-stream: 2.0.0
       supports-color: 8.1.1
 
@@ -9945,6 +10199,10 @@ packages:
       - supports-color
     dev: true
 
+  /magic-bytes.js@1.10.0:
+    resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==}
+    dev: false
+
   /magic-string@0.30.7:
     resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==}
     engines: {node: '>=12'}
@@ -10871,6 +11129,45 @@ packages:
       - babel-plugin-macros
     dev: true
 
+  /next@14.1.3(react-dom@18.2.0)(react@18.2.0):
+    resolution: {integrity: sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==}
+    engines: {node: '>=18.17.0'}
+    hasBin: true
+    peerDependencies:
+      '@opentelemetry/api': ^1.1.0
+      react: ^18.2.0
+      react-dom: ^18.2.0
+      sass: ^1.3.0
+    peerDependenciesMeta:
+      '@opentelemetry/api':
+        optional: true
+      sass:
+        optional: true
+    dependencies:
+      '@next/env': 14.1.3
+      '@swc/helpers': 0.5.2
+      busboy: 1.6.0
+      caniuse-lite: 1.0.30001597
+      graceful-fs: 4.2.11
+      postcss: 8.4.31
+      react: 18.2.0
+      react-dom: 18.2.0(react@18.2.0)
+      styled-jsx: 5.1.1(react@18.2.0)
+    optionalDependencies:
+      '@next/swc-darwin-arm64': 14.1.3
+      '@next/swc-darwin-x64': 14.1.3
+      '@next/swc-linux-arm64-gnu': 14.1.3
+      '@next/swc-linux-arm64-musl': 14.1.3
+      '@next/swc-linux-x64-gnu': 14.1.3
+      '@next/swc-linux-x64-musl': 14.1.3
+      '@next/swc-win32-arm64-msvc': 14.1.3
+      '@next/swc-win32-ia32-msvc': 14.1.3
+      '@next/swc-win32-x64-msvc': 14.1.3
+    transitivePeerDependencies:
+      - '@babel/core'
+      - babel-plugin-macros
+    dev: false
+
   /nice-napi@1.0.2:
     resolution: {integrity: sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==}
     os: ['!win32']
@@ -11545,6 +11842,7 @@ packages:
   /peek-readable@5.0.0:
     resolution: {integrity: sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==}
     engines: {node: '>=14.16'}
+    dev: true
 
   /periscopic@3.1.0:
     resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==}
@@ -12101,7 +12399,6 @@ packages:
       nanoid: 3.3.7
       picocolors: 1.0.0
       source-map-js: 1.0.2
-    dev: true
 
   /postcss@8.4.33:
     resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==}
@@ -12383,7 +12680,7 @@ packages:
       '@protobufjs/path': 1.1.2
       '@protobufjs/pool': 1.1.0
       '@protobufjs/utf8': 1.1.0
-      '@types/node': 20.11.20
+      '@types/node': 18.19.14
       long: 5.2.3
     dev: false
 
@@ -12761,6 +13058,7 @@ packages:
     engines: {node: '>=8'}
     dependencies:
       readable-stream: 3.6.2
+    dev: true
 
   /readdirp@3.6.0:
     resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
@@ -13593,6 +13891,7 @@ packages:
   /source-map@0.6.1:
     resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
     engines: {node: '>=0.10.0'}
+    requiresBuild: true
 
   /source-map@0.7.4:
     resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==}
@@ -13721,7 +14020,6 @@ packages:
   /streamsearch@1.1.0:
     resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
     engines: {node: '>=10.0.0'}
-    dev: true
 
   /streamx@2.15.6:
     resolution: {integrity: sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==}
@@ -13955,6 +14253,7 @@ packages:
     dependencies:
       '@tokenizer/token': 0.3.0
       peek-readable: 5.0.0
+    dev: true
 
   /style-to-object@0.4.4:
     resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==}
@@ -13981,7 +14280,6 @@ packages:
     dependencies:
       client-only: 0.0.1
       react: 18.2.0
-    dev: true
 
   /stylehacks@5.1.1(postcss@8.4.33):
     resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==}
@@ -14218,6 +14516,7 @@ packages:
     dependencies:
       '@tokenizer/token': 0.3.0
       ieee754: 1.2.1
+    dev: true
 
   /totalist@3.0.1:
     resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
@@ -14603,7 +14902,6 @@ packages:
     resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==}
     engines: {node: '>=14.17'}
     hasBin: true
-    dev: false
 
   /ufo@1.4.0:
     resolution: {integrity: sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 7d4e0da24..c06441a5c 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -2,5 +2,6 @@ packages:
   - "apps/*"
   - "packages/*"
   - "packages/core/tests"
+  - "packages/edge/e2e/*"
   - "examples/"
   - "examples/*"
diff --git a/tsconfig.json b/tsconfig.json
index 029b13bda..84821fc77 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -29,6 +29,9 @@
     {
       "path": "./packages/core/tsconfig.json"
     },
+    {
+      "path": "./packages/edge/e2e/test-edge-runtime/tsconfig.json"
+    },
     {
       "path": "./packages/core/tests/tsconfig.json"
     },
-- 
GitLab