mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-15 06:52:45 -04:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ae63081fc | |||
| 3b3c0a052a | |||
| cf62bc0d4c | |||
| ec8f673dae | |||
| 85039a5360 | |||
| d7305edb53 | |||
| 096bf2bda1 | |||
| c5846bd7dc |
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@llamaindex/supabase": patch
|
||||
---
|
||||
|
||||
feat: support filter to supabase vector search
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/doc
|
||||
|
||||
## 0.2.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c5846bd]
|
||||
- @llamaindex/readers@3.1.10
|
||||
|
||||
## 0.2.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ Key build process:
|
||||
**Content Sources:**
|
||||
|
||||
- Local MDX files in `src/content/docs/`
|
||||
- External docs from `@llama-flow/docs` package
|
||||
- External docs from `@llamaindex/workflow-docs` package
|
||||
- Generated API docs from TypeScript source
|
||||
|
||||
### Development Notes
|
||||
|
||||
@@ -23,8 +23,8 @@ const config = {
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: "/docs/llamaflow/:path*.mdx",
|
||||
destination: "/docs/llamaflow/:path*",
|
||||
source: "/docs/workflows/:path*.mdx",
|
||||
destination: "/docs/workflows/:path*",
|
||||
permanent: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/doc",
|
||||
"version": "0.2.28",
|
||||
"version": "0.2.29",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "fumadocs-mdx",
|
||||
@@ -15,7 +15,7 @@
|
||||
"dependencies": {
|
||||
"@huggingface/transformers": "^3.5.0",
|
||||
"@icons-pack/react-simple-icons": "^10.1.0",
|
||||
"@llama-flow/docs": "0.0.8",
|
||||
"@llamaindex/workflow-docs": "0.1.1",
|
||||
"@llamaindex/chat-ui-docs": "^0.0.5",
|
||||
"@llamaindex/cloud": "workspace:*",
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -13,7 +13,7 @@ const INTERNAL_LINK_REGEX = /(?:(?:\]\(|\bhref=["'])\/docs\/([^")]+))/g;
|
||||
// This captures relative links like [text](./path) or 
|
||||
const RELATIVE_LINK_REGEX = /(?:\]\()(?:\s*)(?:\.\.?)\//g;
|
||||
|
||||
const ALLOWED_LINKS = ["/docs/llamaflow", "/docs/chat-ui"];
|
||||
const ALLOWED_LINKS = ["/docs/workflows", "/docs/chat-ui"];
|
||||
|
||||
interface LinkValidationResult {
|
||||
file: string;
|
||||
|
||||
@@ -11,9 +11,9 @@ import remarkMath from "remark-math";
|
||||
export const docs = defineDocs({
|
||||
dir: [
|
||||
"./src/content/docs",
|
||||
"./node_modules/@llama-flow/docs",
|
||||
"./node_modules/@llamaindex/workflow-docs",
|
||||
"./node_modules/@llamaindex/chat-ui-docs",
|
||||
// NOTE: When adding external docs (like chat-ui or llama-flow above),
|
||||
// NOTE: When adding external docs (like chat-ui or workflow-docs above),
|
||||
// make sure to also update:
|
||||
// 1. scripts/validate-links.mts - add to ALLOWED_LINKS array
|
||||
// 2. next.config.mjs - add redirect for .mdx files
|
||||
|
||||
@@ -74,12 +74,21 @@ const server = mcp({
|
||||
args: ["-y", "@modelcontextprotocol/server-filesystem", "."],
|
||||
verbose: true,
|
||||
});
|
||||
// or by SSE
|
||||
// or by StreamableHTTP transport
|
||||
const server = mcp({
|
||||
url: "http://localhost:8000/mcp",
|
||||
verbose: true,
|
||||
});
|
||||
|
||||
// if your MCP server is not using StreamableHTTP transport, you can also use SSE transport
|
||||
// by setting useSSETransport to true.
|
||||
// See: https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse-deprecated
|
||||
const server = mcp({
|
||||
url: "http://localhost:8000/mcp",
|
||||
useSSETransport: true,
|
||||
verbose: true,
|
||||
});
|
||||
|
||||
// 3. Get tools from MCP server
|
||||
const tools = await server.tools();
|
||||
|
||||
|
||||
@@ -9,10 +9,13 @@ Workflows are designed to be flexible and can be used to build agents, RAG flows
|
||||
To use workflows install this package:
|
||||
|
||||
```package-install
|
||||
npm i @llamaindex/workflow
|
||||
npm i @llamaindex/workflow-core
|
||||
```
|
||||
|
||||
This package is a stable, production-ready version of our [llama-flow](/docs/llamaflow) project.
|
||||
This contains the core functionality for the workflow system. You can read more about the core concepts in the [workflow-core](/docs/workflows) section.
|
||||
|
||||
While you can still reference the llama-flow documentation for detailed information about the underlying concepts, we recommend using the `@llamaindex/workflow` package for all new projects to ensure stability and long-term availability.
|
||||
In contrast, the `@llamaindex/workflow` package contains more utiltities, such as prebuilt agents.
|
||||
|
||||
```package-install
|
||||
npm i @llamaindex/workflow
|
||||
```
|
||||
|
||||
+31
-2
@@ -28,11 +28,12 @@ embedding vector(1536)
|
||||
);
|
||||
```
|
||||
|
||||
-- Create a function for similarity search
|
||||
-- Create a function for similarity search with filtering support
|
||||
```sql
|
||||
create function match_documents (
|
||||
query_embedding vector(1536),
|
||||
match_count int
|
||||
match_count int,
|
||||
filter jsonb DEFAULT '{}'
|
||||
) returns table (
|
||||
id uuid,
|
||||
content text,
|
||||
@@ -52,6 +53,7 @@ metadata,
|
||||
embedding,
|
||||
1 - (embedding <=> query_embedding) as similarity
|
||||
from documents
|
||||
where metadata @> filter
|
||||
order by embedding <=> query_embedding
|
||||
limit match_count;
|
||||
end;
|
||||
@@ -96,6 +98,7 @@ const index = await VectorStoreIndex.fromDocuments(documents, {
|
||||
```ts
|
||||
const queryEngine = index.asQueryEngine();
|
||||
|
||||
// Basic query without filters
|
||||
const response = await queryEngine.query({
|
||||
query: "What is in the document?",
|
||||
});
|
||||
@@ -104,6 +107,32 @@ const response = await queryEngine.query({
|
||||
console.log(response.toString());
|
||||
```
|
||||
|
||||
## Query with filters
|
||||
|
||||
You can filter documents based on metadata when querying:
|
||||
|
||||
```ts
|
||||
import { FilterOperator, MetadataFilters } from "llamaindex";
|
||||
|
||||
// Create a filter for documents with author = "Jane Smith"
|
||||
const filters: MetadataFilters = {
|
||||
filters: [
|
||||
{
|
||||
key: "author",
|
||||
value: "Jane Smith",
|
||||
operator: FilterOperator.EQ,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// Query with filters
|
||||
const filteredResponse = await vectorStore.query({
|
||||
queryEmbedding: embedModel.getQueryEmbedding("What is vector search?"),
|
||||
similarityTopK: 5,
|
||||
filters,
|
||||
});
|
||||
```
|
||||
|
||||
## Full code
|
||||
|
||||
```ts
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"pages": ["llamaindex", "api", "llamaflow", "chat-ui"]
|
||||
"pages": ["llamaindex", "api", "workflows", "chat-ui"]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"tasks": {
|
||||
"build": {
|
||||
"inputs": [
|
||||
"node_modules/@llama-flow/docs/**",
|
||||
"node_modules/@llamaindex/workflow-docs/**",
|
||||
"node_modules/@llamaindex/chat-ui-docs/**",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/next-node-runtime
|
||||
|
||||
## 0.1.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c5846bd]
|
||||
- @llamaindex/readers@3.1.10
|
||||
|
||||
## 0.1.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/next-node-runtime-test",
|
||||
"version": "0.1.37",
|
||||
"version": "0.1.38",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# examples
|
||||
|
||||
## 0.3.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [096bf2b]
|
||||
- Updated dependencies [c5846bd]
|
||||
- @llamaindex/tools@0.1.0
|
||||
- @llamaindex/readers@3.1.10
|
||||
|
||||
## 0.3.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -6,15 +6,24 @@ async function main() {
|
||||
// Create an MCP server for filesystem tools
|
||||
const server = mcp({
|
||||
command: "npx",
|
||||
args: ["-y", "@modelcontextprotocol/server-filesystem", "."],
|
||||
args: ["-y", "@modelcontextprotocol/server-filesystem@latest", "."],
|
||||
verbose: true,
|
||||
});
|
||||
// You can also connect to the MCP server using SSE
|
||||
// See: https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse
|
||||
//
|
||||
// You can also connect to a remote MCP server using:
|
||||
// 1. StreamableHTTP transport (recommended)
|
||||
// See: https://modelcontextprotocol.io/docs/concepts/transports#streamable-http
|
||||
// const server = mcp({
|
||||
// url: "http://localhost:8000/mcp",
|
||||
// verbose: true,
|
||||
// });
|
||||
// 2.Or using SSE transport (will be deprecated soon)
|
||||
// See: https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse-deprecated
|
||||
// const server = mcp({
|
||||
// url: "http://localhost:8000/mcp",
|
||||
// useSSETransport: true,
|
||||
// verbose: true,
|
||||
// });
|
||||
|
||||
try {
|
||||
// Create an agent that uses the MCP tools
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<company name="MidSizeCorp" founded="2008">
|
||||
<division name="Engineering" head="Dana White">
|
||||
<department name="Frontend" lead="Alex Kim">
|
||||
<team name="Web">
|
||||
<employee id="E01">
|
||||
<name>Jordan Lee</name>
|
||||
<role>Lead Developer</role>
|
||||
<projects>
|
||||
<project code="PRJ101" status="active">
|
||||
<title>User Portal</title>
|
||||
<deadline>2025-08-01</deadline>
|
||||
<tasks>
|
||||
<task id="T1011">
|
||||
<description>Implement login page</description>
|
||||
<due>2025-05-10</due>
|
||||
</task>
|
||||
<task id="T1012">
|
||||
<description>Design dashboard</description>
|
||||
<due>2025-05-20</due>
|
||||
</task>
|
||||
</tasks>
|
||||
</project>
|
||||
</projects>
|
||||
</employee>
|
||||
<employee id="E02">
|
||||
<name>Riley Chen</name>
|
||||
<role>UI Designer</role>
|
||||
</employee>
|
||||
</team>
|
||||
<team name="Mobile">
|
||||
<employee id="E03">
|
||||
<name>Sam Patel</name>
|
||||
<role>iOS Developer</role>
|
||||
</employee>
|
||||
</team>
|
||||
</department>
|
||||
<department name="Backend" lead="Morgan Reed">
|
||||
<team name="API">
|
||||
<employee id="E04">
|
||||
<name>Taylor Jones</name>
|
||||
<role>API Engineer</role>
|
||||
</employee>
|
||||
</team>
|
||||
<team name="Database">
|
||||
<employee id="E05">
|
||||
<name>Casey Nguyen</name>
|
||||
<role>DB Administrator</role>
|
||||
</employee>
|
||||
</team>
|
||||
</department>
|
||||
</division>
|
||||
|
||||
<division name="Marketing" head="Pat Morgan">
|
||||
<department name="Digital" lead="Alex Rivera">
|
||||
<team name="Content">
|
||||
<employee id="M01">
|
||||
<name>Charlie Brooks</name>
|
||||
<role>Content Strategist</role>
|
||||
</employee>
|
||||
</team>
|
||||
</department>
|
||||
</division>
|
||||
|
||||
<headquarters location="Chicago, USA">
|
||||
<address>
|
||||
<street>789 Lake Shore Drive</street>
|
||||
<city>Chicago</city>
|
||||
<zip>60601</zip>
|
||||
</address>
|
||||
</headquarters>
|
||||
</company>
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/examples",
|
||||
"version": "0.3.23",
|
||||
"version": "0.3.24",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
@@ -44,11 +44,11 @@
|
||||
"@llamaindex/portkey-ai": "^0.0.53",
|
||||
"@llamaindex/postgres": "^0.0.54",
|
||||
"@llamaindex/qdrant": "^0.1.21",
|
||||
"@llamaindex/readers": "^3.1.9",
|
||||
"@llamaindex/readers": "^3.1.10",
|
||||
"@llamaindex/replicate": "^0.0.53",
|
||||
"@llamaindex/supabase": "^0.1.10",
|
||||
"@llamaindex/together": "^0.0.21",
|
||||
"@llamaindex/tools": "^0.0.17",
|
||||
"@llamaindex/tools": "^0.1.0",
|
||||
"@llamaindex/upstash": "^0.0.25",
|
||||
"@llamaindex/vercel": "^0.1.11",
|
||||
"@llamaindex/vllm": "^0.0.47",
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
"start:llamaparse-json": "node --import tsx ./src/llamaparse-json.ts",
|
||||
"start:discord": "node --import tsx ./src/discord.ts",
|
||||
"start:json": "node --import tsx ./src/json.ts",
|
||||
"start:obsidian": "node --import tsx ./src/obsidian.ts"
|
||||
"start:obsidian": "node --import tsx ./src/obsidian.ts",
|
||||
"start:xml": "node --import tsx ./src/xml.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/cloud": "workspace:* || ^2.0.24",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { XMLReader } from "@llamaindex/readers/xml";
|
||||
|
||||
async function main() {
|
||||
// Load PDF
|
||||
const reader = new XMLReader({
|
||||
splitLevel: 2,
|
||||
});
|
||||
const documents = await reader.loadData("../data/company.xml");
|
||||
|
||||
for (const doc of documents) {
|
||||
console.log(doc.text);
|
||||
console.log("----");
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
BaseVectorStore,
|
||||
metadataDictToNode,
|
||||
nodeToMetadata,
|
||||
type MetadataFilters,
|
||||
type VectorStoreBaseParams,
|
||||
type VectorStoreQuery,
|
||||
type VectorStoreQueryResult,
|
||||
@@ -18,6 +19,9 @@ export interface SupabaseVectorStoreInit extends VectorStoreBaseParams {
|
||||
table: string;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type SupabaseFilter = Record<string, any>;
|
||||
|
||||
interface SearchEmbeddingsResponse {
|
||||
id: string;
|
||||
content: string;
|
||||
@@ -137,6 +141,7 @@ export class SupabaseVectorStore extends BaseVectorStore {
|
||||
const { data, error } = await this.supabaseClient.rpc("match_documents", {
|
||||
query_embedding: query.queryEmbedding,
|
||||
match_count: query.similarityTopK,
|
||||
filter: this.toSupabaseFilter(query.filters),
|
||||
});
|
||||
|
||||
if (error) {
|
||||
@@ -176,4 +181,20 @@ export class SupabaseVectorStore extends BaseVectorStore {
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts metadata filters to supabase query filter format
|
||||
* @param queryFilters - Metadata filters to convert
|
||||
* @returns supabase query filter object
|
||||
* @private
|
||||
*/
|
||||
private toSupabaseFilter(queryFilters: MetadataFilters | undefined) {
|
||||
if (queryFilters?.filters && queryFilters.filters.length > 0) {
|
||||
return queryFilters.filters.reduce<SupabaseFilter>((acc, curr) => {
|
||||
acc[curr.key] = curr.value;
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,23 @@
|
||||
import { Settings } from "@llamaindex/core/global";
|
||||
import { Document } from "@llamaindex/core/schema";
|
||||
import {
|
||||
FilterOperator,
|
||||
MetadataFilters,
|
||||
VectorStoreQueryMode,
|
||||
} from "@llamaindex/core/vector-store";
|
||||
import { OpenAIEmbedding } from "@llamaindex/openai";
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
import {
|
||||
afterEach,
|
||||
beforeAll,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
vi,
|
||||
} from "vitest";
|
||||
import { SupabaseVectorStore } from "../src";
|
||||
|
||||
async function isSupabaseAvailable(): Promise<boolean> {
|
||||
if (!process.env.SUPABASE_URL || !process.env.SUPABASE_KEY) {
|
||||
return false;
|
||||
@@ -45,4 +60,88 @@ describe("SupabaseVectorStore", async () => {
|
||||
expect(vectorStore).toBeDefined();
|
||||
expect(vectorStore).toBeInstanceOf(SupabaseVectorStore);
|
||||
});
|
||||
|
||||
describe("query", () => {
|
||||
let supabase: ReturnType<typeof createClient>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let rpcSpy: any;
|
||||
let vectorStore: SupabaseVectorStore;
|
||||
let mockEmbedding: number[];
|
||||
|
||||
beforeEach(() => {
|
||||
supabase = createClient(
|
||||
process.env.SUPABASE_URL!,
|
||||
process.env.SUPABASE_KEY!,
|
||||
);
|
||||
|
||||
rpcSpy = vi.spyOn(supabase, "rpc").mockImplementation(() => {
|
||||
return {
|
||||
data: [],
|
||||
error: null,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any;
|
||||
});
|
||||
|
||||
vectorStore = new SupabaseVectorStore({
|
||||
client: supabase,
|
||||
table: "test",
|
||||
});
|
||||
|
||||
mockEmbedding = new Array(1536).fill(0.1);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
rpcSpy.mockRestore();
|
||||
});
|
||||
|
||||
it("should query without filters", async () => {
|
||||
const doc = new Document({
|
||||
text: "Test document",
|
||||
});
|
||||
doc.embedding = mockEmbedding;
|
||||
|
||||
await vectorStore.query({
|
||||
queryEmbedding: doc.embedding!,
|
||||
similarityTopK: 5,
|
||||
mode: VectorStoreQueryMode.DEFAULT,
|
||||
});
|
||||
|
||||
expect(rpcSpy).toHaveBeenCalledWith("match_documents", {
|
||||
query_embedding: doc.embedding,
|
||||
match_count: 5,
|
||||
filter: {},
|
||||
});
|
||||
});
|
||||
|
||||
it("should pass filters to the match_documents RPC call", async () => {
|
||||
const doc = new Document({
|
||||
text: "Test document",
|
||||
metadata: { category: "test" },
|
||||
});
|
||||
doc.embedding = mockEmbedding;
|
||||
|
||||
const filters: MetadataFilters = {
|
||||
filters: [
|
||||
{
|
||||
key: "category",
|
||||
value: "test",
|
||||
operator: FilterOperator.EQ,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
await vectorStore.query({
|
||||
queryEmbedding: doc.embedding!,
|
||||
similarityTopK: 5,
|
||||
filters,
|
||||
mode: VectorStoreQueryMode.DEFAULT,
|
||||
});
|
||||
|
||||
expect(rpcSpy).toHaveBeenCalledWith("match_documents", {
|
||||
query_embedding: doc.embedding,
|
||||
match_count: 5,
|
||||
filter: { category: "test" },
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/readers
|
||||
|
||||
## 3.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c5846bd: feat(readers): add XMLReader for parsing XML files (#1846)
|
||||
|
||||
## 3.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/readers",
|
||||
"description": "LlamaIndex Readers",
|
||||
"version": "3.1.9",
|
||||
"version": "3.1.10",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./node/hook": "./node/dist/hook.js",
|
||||
@@ -129,6 +129,16 @@
|
||||
"types": "./text/dist/index.d.ts",
|
||||
"default": "./text/dist/index.js"
|
||||
}
|
||||
},
|
||||
"./xml": {
|
||||
"require": {
|
||||
"types": "./xml/dist/index.d.cts",
|
||||
"default": "./xml/dist/index.cjs"
|
||||
},
|
||||
"import": {
|
||||
"types": "./xml/dist/index.d.ts",
|
||||
"default": "./xml/dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
@@ -142,7 +152,8 @@
|
||||
"obsidian",
|
||||
"pdf",
|
||||
"text",
|
||||
"node"
|
||||
"node",
|
||||
"xml"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -166,6 +177,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@discoveryjs/json-ext": "^0.6.1",
|
||||
"@xmldom/xmldom": "^0.9.8",
|
||||
"csv-parse": "^5.5.6",
|
||||
"mammoth": "^1.7.2",
|
||||
"unpdf": "^0.12.1"
|
||||
|
||||
@@ -7,6 +7,8 @@ import { ImageReader } from "../image";
|
||||
import { MarkdownReader } from "../markdown";
|
||||
import { PDFReader } from "../pdf";
|
||||
import { TextFileReader } from "../text";
|
||||
import { XMLReader } from "../xml";
|
||||
|
||||
import {
|
||||
AbstractSimpleDirectoryReader,
|
||||
type SimpleDirectoryReaderLoadDataParams,
|
||||
@@ -24,6 +26,7 @@ export const FILE_EXT_TO_READER: Record<string, FileReader> = {
|
||||
jpeg: new ImageReader(),
|
||||
png: new ImageReader(),
|
||||
gif: new ImageReader(),
|
||||
xml: new XMLReader(),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
import { Document, FileReader } from "@llamaindex/core/schema";
|
||||
import {
|
||||
DOMParser,
|
||||
XMLSerializer,
|
||||
Document as XmlDocument,
|
||||
Element as XmlElement,
|
||||
} from "@xmldom/xmldom";
|
||||
|
||||
export class XMLReader extends FileReader<Document> {
|
||||
private splitLevel: number;
|
||||
|
||||
/**
|
||||
* @param splitLevel how deep to split the XML tree
|
||||
*/
|
||||
|
||||
constructor({ splitLevel }: { splitLevel?: number } = {}) {
|
||||
super();
|
||||
this.splitLevel = splitLevel ?? 0;
|
||||
}
|
||||
|
||||
/** XMLParser */
|
||||
async loadDataAsContent(fileContent: Uint8Array): Promise<Document[]> {
|
||||
const xmlStr = new TextDecoder().decode(fileContent);
|
||||
const doc: XmlDocument = new DOMParser().parseFromString(
|
||||
xmlStr,
|
||||
"application/xml",
|
||||
);
|
||||
|
||||
if (!doc || !doc.documentElement) {
|
||||
throw new Error("Invalid XML: unable to parse document");
|
||||
}
|
||||
|
||||
const root: XmlElement = doc.documentElement!;
|
||||
|
||||
return this._parseElementToDocuments(root);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal: split tree into leaf or level-matched nodes
|
||||
*/
|
||||
private _getLeafNodesUpToLevel(
|
||||
root: XmlElement,
|
||||
level: number,
|
||||
): XmlElement[] {
|
||||
const result: XmlElement[] = [];
|
||||
const traverse = (node: XmlElement, currLevel: number) => {
|
||||
const children = Array.from(node.childNodes).filter(
|
||||
(n) => n.nodeType === n.ELEMENT_NODE,
|
||||
) as XmlElement[];
|
||||
if (children.length === 0 || currLevel === level) {
|
||||
result.push(node);
|
||||
} else {
|
||||
for (const child of children) {
|
||||
traverse(child, currLevel + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
traverse(root, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
private _parseElementToDocuments(root: XmlElement): Document[] {
|
||||
const nodes = this._getLeafNodesUpToLevel(root, this.splitLevel);
|
||||
const serializer = new XMLSerializer();
|
||||
return nodes.map(
|
||||
(node) =>
|
||||
new Document({ text: serializer.serializeToString(node).trim() }),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"edge-light": "./dist/index.edge-light.js",
|
||||
"workerd": "./dist/index.workerd.js",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/tools
|
||||
|
||||
## 0.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 096bf2b: Add support for StreamableHTTP mcp client
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/tools",
|
||||
"description": "LlamaIndex Tools",
|
||||
"version": "0.0.17",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
@@ -47,7 +47,7 @@
|
||||
"dependencies": {
|
||||
"@apidevtools/swagger-parser": "^10.1.0",
|
||||
"@e2b/code-interpreter": "^1.0.4",
|
||||
"@modelcontextprotocol/sdk": "^1.8.0",
|
||||
"@modelcontextprotocol/sdk": "^1.13.0",
|
||||
"duck-duck-scrape": "^2.2.5",
|
||||
"formdata-node": "^6.0.3",
|
||||
"got": "^14.4.1",
|
||||
|
||||
@@ -10,6 +10,10 @@ import {
|
||||
StdioClientTransport,
|
||||
type StdioServerParameters,
|
||||
} from "@modelcontextprotocol/sdk/client/stdio.js";
|
||||
import {
|
||||
StreamableHTTPClientTransport,
|
||||
type StreamableHTTPClientTransportOptions,
|
||||
} from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
||||
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
||||
import type { JSONSchemaType } from "ajv";
|
||||
|
||||
@@ -36,17 +40,37 @@ type MCPCommonOptions = {
|
||||
verbose?: boolean;
|
||||
};
|
||||
|
||||
type StdioMCPClientOptions = StdioServerParameters & MCPCommonOptions;
|
||||
type SSEMCPClientOptions = SSEClientTransportOptions &
|
||||
MCPCommonOptions & {
|
||||
url: string;
|
||||
};
|
||||
type URLMCPOptions = MCPCommonOptions & {
|
||||
url: string;
|
||||
/**
|
||||
* Default is false which means StreamableHTTP transport will be used.
|
||||
* Set to true to use SSE transport instead.
|
||||
* @default false
|
||||
* @deprecated SSE transport will be soon deprecated. Please use StreamableHTTP transport instead.
|
||||
*/
|
||||
useSSETransport?: boolean;
|
||||
};
|
||||
|
||||
type MCPClientOptions = StdioMCPClientOptions | SSEMCPClientOptions;
|
||||
type StdioMCPClientOptions = StdioServerParameters & MCPCommonOptions;
|
||||
/**
|
||||
* @deprecated SSE transport will be soon deprecated. Please use StreamableHTTPMCPClientOptions instead.
|
||||
*/
|
||||
type SSEMCPClientOptions = SSEClientTransportOptions & URLMCPOptions;
|
||||
type StreamableHTTPMCPClientOptions = StreamableHTTPClientTransportOptions &
|
||||
URLMCPOptions;
|
||||
|
||||
type MCPClientOptions =
|
||||
| StdioMCPClientOptions
|
||||
| SSEMCPClientOptions
|
||||
| StreamableHTTPMCPClientOptions;
|
||||
|
||||
class MCPClient {
|
||||
private mcp: Client;
|
||||
private transport: StdioClientTransport | SSEClientTransport | null = null;
|
||||
private transport:
|
||||
| StreamableHTTPClientTransport
|
||||
| SSEClientTransport
|
||||
| StdioClientTransport
|
||||
| null = null;
|
||||
private verbose: boolean;
|
||||
private toolNamePrefix?: string | undefined;
|
||||
private connected: boolean = false;
|
||||
@@ -60,10 +84,23 @@ class MCPClient {
|
||||
this.verbose = options.verbose ?? false;
|
||||
this.toolNamePrefix = options.toolNamePrefix;
|
||||
if ("url" in options) {
|
||||
this.transport = new SSEClientTransport(
|
||||
new URL(options.url),
|
||||
options as SSEClientTransportOptions,
|
||||
);
|
||||
const useSSETransport = options.useSSETransport ?? false;
|
||||
if (useSSETransport) {
|
||||
// Show deprecation warning
|
||||
console.warn(
|
||||
"SSE transport will be soon deprecated. " +
|
||||
"Please use StreamableHTTPClientTransport instead",
|
||||
);
|
||||
this.transport = new SSEClientTransport(
|
||||
new URL(options.url),
|
||||
options as SSEClientTransportOptions,
|
||||
);
|
||||
} else {
|
||||
this.transport = new StreamableHTTPClientTransport(
|
||||
new URL(options.url),
|
||||
options as StreamableHTTPClientTransportOptions,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.transport = new StdioClientTransport(
|
||||
options as StdioServerParameters,
|
||||
@@ -79,6 +116,8 @@ class MCPClient {
|
||||
if (!this.transport) {
|
||||
throw new Error("Initialized with invalid options");
|
||||
}
|
||||
// @ts-expect-error - to mitigate exactOptionalPropertyTypes error
|
||||
// that we have sessionId: string | undefined from the transport
|
||||
await this.mcp.connect(this.transport);
|
||||
this.connected = true;
|
||||
}
|
||||
|
||||
Generated
+53
-43
@@ -77,9 +77,6 @@ importers:
|
||||
'@icons-pack/react-simple-icons':
|
||||
specifier: ^10.1.0
|
||||
version: 10.2.0(react@19.1.0)
|
||||
'@llama-flow/docs':
|
||||
specifier: 0.0.8
|
||||
version: 0.0.8
|
||||
'@llamaindex/chat-ui-docs':
|
||||
specifier: ^0.0.5
|
||||
version: 0.0.5
|
||||
@@ -101,6 +98,9 @@ importers:
|
||||
'@llamaindex/workflow':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/workflow
|
||||
'@llamaindex/workflow-docs':
|
||||
specifier: 0.1.1
|
||||
version: 0.1.1
|
||||
'@mdx-js/mdx':
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(acorn@8.14.1)
|
||||
@@ -708,7 +708,7 @@ importers:
|
||||
specifier: ^0.1.21
|
||||
version: link:../packages/providers/storage/qdrant
|
||||
'@llamaindex/readers':
|
||||
specifier: ^3.1.9
|
||||
specifier: ^3.1.10
|
||||
version: link:../packages/readers
|
||||
'@llamaindex/replicate':
|
||||
specifier: ^0.0.53
|
||||
@@ -720,7 +720,7 @@ importers:
|
||||
specifier: ^0.0.21
|
||||
version: link:../packages/providers/together
|
||||
'@llamaindex/tools':
|
||||
specifier: ^0.0.17
|
||||
specifier: ^0.1.0
|
||||
version: link:../packages/tools
|
||||
'@llamaindex/upstash':
|
||||
specifier: ^0.0.25
|
||||
@@ -948,7 +948,7 @@ importers:
|
||||
version: 0.67.5(typescript@5.8.3)
|
||||
'@llama-flow/core':
|
||||
specifier: ^0.4.1
|
||||
version: 0.4.1(@modelcontextprotocol/sdk@1.9.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.25.7)
|
||||
version: 0.4.1(@modelcontextprotocol/sdk@1.13.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.25.7)
|
||||
'@llamaindex/core':
|
||||
specifier: workspace:*
|
||||
version: link:../core
|
||||
@@ -1745,6 +1745,9 @@ importers:
|
||||
'@discoveryjs/json-ext':
|
||||
specifier: ^0.6.1
|
||||
version: 0.6.3
|
||||
'@xmldom/xmldom':
|
||||
specifier: ^0.9.8
|
||||
version: 0.9.8
|
||||
csv-parse:
|
||||
specifier: ^5.5.6
|
||||
version: 5.6.0
|
||||
@@ -1780,8 +1783,8 @@ importers:
|
||||
specifier: ^1.0.4
|
||||
version: 1.1.1
|
||||
'@modelcontextprotocol/sdk':
|
||||
specifier: ^1.8.0
|
||||
version: 1.9.0
|
||||
specifier: ^1.13.0
|
||||
version: 1.13.0
|
||||
duck-duck-scrape:
|
||||
specifier: ^2.2.5
|
||||
version: 2.2.7
|
||||
@@ -1852,7 +1855,7 @@ importers:
|
||||
dependencies:
|
||||
'@llama-flow/core':
|
||||
specifier: ^0.4.4
|
||||
version: 0.4.4(@modelcontextprotocol/sdk@1.9.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.24.2)
|
||||
version: 0.4.4(@modelcontextprotocol/sdk@1.13.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.24.2)
|
||||
zod:
|
||||
specifier: ^3.23.8
|
||||
version: 3.24.2
|
||||
@@ -4049,12 +4052,12 @@ packages:
|
||||
zod:
|
||||
optional: true
|
||||
|
||||
'@llama-flow/docs@0.0.8':
|
||||
resolution: {integrity: sha512-Z6zwuonoH+xACzQTtxvkEBZBGONqmkZJq2/B9PClAp3MTY7mSVVni1uEpRTECU8aBqRJWrF3XjGnpVcRo7jHdQ==}
|
||||
|
||||
'@llamaindex/chat-ui-docs@0.0.5':
|
||||
resolution: {integrity: sha512-kG8QjnCxsvFXC8I+Xes64Bb7H6DEkoUAAsIzLsD28Ppfalgb7brPnR6jCoJsJkajKiFmnJUwrsNz/s39HZ8SrQ==}
|
||||
|
||||
'@llamaindex/workflow-docs@0.1.1':
|
||||
resolution: {integrity: sha512-RBU/Vs+1HP62TFkHsRVidWE2BpN2tB+O9/LaqypKEVF0UABTXhP3/Jb0GftaaZnHeJTy2fJHbLMlgl7CrFWAJw==}
|
||||
|
||||
'@manypkg/find-root@1.1.0':
|
||||
resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==}
|
||||
|
||||
@@ -4083,8 +4086,8 @@ packages:
|
||||
'@modelcontextprotocol/sdk@0.5.0':
|
||||
resolution: {integrity: sha512-RXgulUX6ewvxjAG0kOpLMEdXXWkzWgaoCGaA2CwNW7cQCIphjpJhjpHSiaPdVCnisjRF/0Cm9KWHUuIoeiAblQ==}
|
||||
|
||||
'@modelcontextprotocol/sdk@1.9.0':
|
||||
resolution: {integrity: sha512-Jq2EUCQpe0iyO5FGpzVYDNFR6oR53AIrwph9yWl7uSc7IWUMsrmpmSaTGra5hQNunXpM+9oit85p924jWuHzUA==}
|
||||
'@modelcontextprotocol/sdk@1.13.0':
|
||||
resolution: {integrity: sha512-P5FZsXU0kY881F6Hbk9GhsYx02/KgWK1DYf7/tyE/1lcFKhDYPQR9iYjhQXJn+Sg6hQleMo3DB7h7+p4wgp2Lw==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@modelcontextprotocol/server-filesystem@2025.3.28':
|
||||
@@ -6903,6 +6906,10 @@ packages:
|
||||
resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
||||
'@xmldom/xmldom@0.9.8':
|
||||
resolution: {integrity: sha512-p96FSY54r+WJ50FIOsCOjyj/wavs8921hG5+kVMmZgKcvIKxMXHTrjNJvRgWa/zuX3B6t2lijLNFaOyuxUH+2A==}
|
||||
engines: {node: '>=14.6'}
|
||||
|
||||
'@xtuc/ieee754@1.2.0':
|
||||
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
|
||||
|
||||
@@ -16741,26 +16748,26 @@ snapshots:
|
||||
'@lezer/highlight': 1.2.1
|
||||
'@lezer/lr': 1.4.2
|
||||
|
||||
'@llama-flow/core@0.4.1(@modelcontextprotocol/sdk@1.9.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.25.7)':
|
||||
'@llama-flow/core@0.4.1(@modelcontextprotocol/sdk@1.13.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.25.7)':
|
||||
optionalDependencies:
|
||||
'@modelcontextprotocol/sdk': 1.9.0
|
||||
'@modelcontextprotocol/sdk': 1.13.0
|
||||
hono: 4.7.7
|
||||
next: 15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
p-retry: 6.2.1
|
||||
zod: 3.25.7
|
||||
|
||||
'@llama-flow/core@0.4.4(@modelcontextprotocol/sdk@1.9.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.24.2)':
|
||||
'@llama-flow/core@0.4.4(@modelcontextprotocol/sdk@1.13.0)(hono@4.7.7)(next@15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(p-retry@6.2.1)(zod@3.24.2)':
|
||||
optionalDependencies:
|
||||
'@modelcontextprotocol/sdk': 1.9.0
|
||||
'@modelcontextprotocol/sdk': 1.13.0
|
||||
hono: 4.7.7
|
||||
next: 15.3.2(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
p-retry: 6.2.1
|
||||
zod: 3.24.2
|
||||
|
||||
'@llama-flow/docs@0.0.8': {}
|
||||
|
||||
'@llamaindex/chat-ui-docs@0.0.5': {}
|
||||
|
||||
'@llamaindex/workflow-docs@0.1.1': {}
|
||||
|
||||
'@manypkg/find-root@1.1.0':
|
||||
dependencies:
|
||||
'@babel/runtime': 7.26.9
|
||||
@@ -16847,8 +16854,9 @@ snapshots:
|
||||
raw-body: 3.0.0
|
||||
zod: 3.24.4
|
||||
|
||||
'@modelcontextprotocol/sdk@1.9.0':
|
||||
'@modelcontextprotocol/sdk@1.13.0':
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
content-type: 1.0.5
|
||||
cors: 2.8.5
|
||||
cross-spawn: 7.0.6
|
||||
@@ -16857,8 +16865,8 @@ snapshots:
|
||||
express-rate-limit: 7.5.0(express@5.1.0)
|
||||
pkce-challenge: 5.0.0
|
||||
raw-body: 3.0.0
|
||||
zod: 3.24.4
|
||||
zod-to-json-schema: 3.24.5(zod@3.24.4)
|
||||
zod: 3.25.49
|
||||
zod-to-json-schema: 3.24.5(zod@3.25.49)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -20281,6 +20289,8 @@ snapshots:
|
||||
|
||||
'@xmldom/xmldom@0.8.10': {}
|
||||
|
||||
'@xmldom/xmldom@0.9.8': {}
|
||||
|
||||
'@xtuc/ieee754@1.2.0': {}
|
||||
|
||||
'@xtuc/long@4.2.2': {}
|
||||
@@ -21855,7 +21865,7 @@ snapshots:
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3)
|
||||
eslint: 9.22.0(jiti@2.4.2)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.22.0(jiti@2.4.2))
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@2.4.2))
|
||||
eslint-plugin-jsx-a11y: 6.10.2(eslint@9.22.0(jiti@2.4.2))
|
||||
eslint-plugin-react: 7.37.2(eslint@9.22.0(jiti@2.4.2))
|
||||
@@ -21885,22 +21895,6 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
'@nolyfill/is-core-module': 1.0.39
|
||||
debug: 4.4.0
|
||||
enhanced-resolve: 5.18.1
|
||||
eslint: 9.22.0(jiti@2.4.2)
|
||||
fast-glob: 3.3.3
|
||||
get-tsconfig: 4.10.0
|
||||
is-bun-module: 1.3.0
|
||||
is-glob: 4.0.3
|
||||
stable-hash: 0.0.4
|
||||
optionalDependencies:
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@2.4.2))
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@9.16.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
'@nolyfill/is-core-module': 1.0.39
|
||||
@@ -21917,14 +21911,30 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2)):
|
||||
eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@9.22.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
'@nolyfill/is-core-module': 1.0.39
|
||||
debug: 4.4.0
|
||||
enhanced-resolve: 5.18.1
|
||||
eslint: 9.22.0(jiti@2.4.2)
|
||||
fast-glob: 3.3.3
|
||||
get-tsconfig: 4.10.0
|
||||
is-bun-module: 1.3.0
|
||||
is-glob: 4.0.3
|
||||
stable-hash: 0.0.4
|
||||
optionalDependencies:
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@2.4.2))
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@2.4.2)):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3)
|
||||
eslint: 9.22.0(jiti@2.4.2)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.22.0(jiti@2.4.2))
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -21950,7 +21960,7 @@ snapshots:
|
||||
doctrine: 2.1.0
|
||||
eslint: 9.22.0(jiti@2.4.2)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))
|
||||
eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.22.0(jiti@2.4.2))
|
||||
hasown: 2.0.2
|
||||
is-core-module: 2.16.1
|
||||
is-glob: 4.0.3
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/unit-test
|
||||
|
||||
## 0.1.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c5846bd]
|
||||
- @llamaindex/readers@3.1.10
|
||||
|
||||
## 0.1.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/unit-test",
|
||||
"private": true,
|
||||
"version": "0.1.37",
|
||||
"version": "0.1.38",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "vitest run"
|
||||
|
||||
Reference in New Issue
Block a user