diff --git a/README.md b/README.md index 33c36fe..3d76419 100644 --- a/README.md +++ b/README.md @@ -13,43 +13,320 @@ It contains an example graph exported from `src/agent.ts` that implements a rese The enrichment agent: -1. Takes a research topic as input +1. Takes a research **topic** and requested **templateSchema** as input 2. Searches the web for relevant information 3. Reads and extracts key details from websites -4. Organizes the findings into a structured format +4. Organizes the findings into the requested structured format 5. Validates the gathered information for completeness and accuracy -By default, it's set up to gather information based on the user-provided schema passed through the `schema` key in the state. +By default, it's set up to gather information based on the user-provided schema passed through the `templateSchema` key in the state. ## Getting Started -This template was designed for [LangGraph Studio](https://github.com/langchain-ai/langgraph-studio). To use, clone this repo locally and open the folder in LangGraph Studio. +You will need the latest versions of `@langchain/langgraph` and `@langchain/core`. See these instructions for help upgrading an [existing project](https://langchain-ai.github.io/langgraphjs/how-tos/manage-ecosystem-dependencies/). -Note that the `Deploy` button is currently not supported, but will be soon! +Assuming you have already [installed LangGraph Studio](https://github.com/langchain-ai/langgraph-studio?tab=readme-ov-file#download), to set up: -You will need the latest versions of `@langchain/langgraph` and `@langchain/core`. See these instructions for help upgrading an [existing project](https://langchain-ai.github.io/langgraphjs/how-tos/manage-ecosystem-dependencies/). +1. Create a `.env` file. + +```bash +cp .env.example .env +``` + +2. Define required API keys in your `.env` file. + +The primary [search tool](./src/enrichment_agent/tools.ts) [^1] used is [Tavily](https://tavily.com/). Create an API key [here](https://app.tavily.com/sign-in). + + + +
+Setup for `modelName` +The `llm` configuration defaults are shown below: + +```yaml +modelName: anthropic/claude-3-5-sonnet-20240620 +``` + +Follow the instructions below to get set up, or pick one of the additional options. + +### Anthropic Chat Models + +To use Anthropic's chat models: + +1. Sign up for an [Anthropic API key](https://console.anthropic.com/) if you haven't already. +2. Once you have your API key, add it to your `.env` file: + +``` +ANTHROPIC_API_KEY=your-api-key +``` -You can also [click here](https://www.loom.com/share/81cafa32d57f4933bd5d9b08c70f460c?sid=4ebcb366-f27a-4c49-854d-169106b4f6fe) to see a (rough) video tour of Studio. +### Fireworks Chat Models -To set up: +To use Fireworks AI's chat models: + +1. Sign up for a [Fireworks AI account](https://app.fireworks.ai/signup) and obtain an API key. +2. Add your Fireworks AI API key to your `.env` file: + +``` +FIREWORKS_API_KEY=your-api-key +``` + +#### OpenAI Chat Models + +To use OpenAI's chat models: + +1. Sign up for an [OpenAI API key](https://platform.openai.com/signup). +2. Once you have your API key, add it to your `.env` file: + +``` +OPENAI_API_KEY=your-api-key +``` + +
+ + -1. Set up your API keys for the LLM (Claude) and search tool (Tavily) in the `.env` file. -2. Install the required dependencies (`yarn`) 3. Customize whatever you'd like in the code. -4. Run the script with your research topic as input. +4. Open the folder LangGraph Studio! + +## How to customize + +1. **Customize research targets**: Provide a custom `templateSchema` when calling the graph to gather different types of information. +2. **Select a different model**: We default to anthropic (sonnet-35). You can select a compatible chat model using `provider/model-name` via configuration. Example: `openai/gpt-4o-mini`. +3. **Customize the prompt**: We provide a default prompt in [prompts.ts](./src/enrichment_agent/prompts.ts). You can easily update this via configuration in the studio. + +You can also quickly extend this template by: + +- Adding new tools and API connections in [tools.ts](./src/enrichment_agent/tools.ts). These are just any TypeScript functions. +- Adding additional steps in [graph.ts](./src/enrichment_agent/graph.ts). Concerned about hallucination ## Development -While iterating on your graph, you can edit past state and rerun your app from past states to debug specific nodes. Local changes will be automatically applied via hot reload. Try adding an interrupt before the agent calls tools, updating the default system message in `src/utils/state.ts` to take on a persona, or adding additional nodes and edges! +While iterating on your graph, you can edit past state and rerun your app from past states to debug specific nodes. Local changes will be automatically applied via hot reload. Try adding an interrupt before the agent calls tools, updating the default system message in `src/enrichment_agent/utils.ts` to take on a persona, or adding additional nodes and edges! Follow up requests will be appended to the same thread. You can create an entirely new thread, clearing previous history, using the `+` button in the top right. -You can find the latest (under construction) docs on [LangGraph.js](https://langchain-ai.github.io/langgraphjs/) here, including examples and other references. Using those guides can help you pick the right patterns to adapt here for your use case. +You can find the latest (under construction) docs on [LangGraph](https://langchain-ai.github.io/langgraphjs/) here, including examples and other references. Using those guides can help you pick the right patterns to adapt here for your use case. LangGraph Studio also integrates with [LangSmith](https://smith.langchain.com/) for more in-depth tracing and collaboration with teammates. -## How to extend it +[^1]: https://js.langchain.com/docs/concepts#tools -1. **Customize research targets**: Modify the `InfoSchema` to gather different types of information. -2. **Enhance data sources and validation**: Add new tools, APIs, or implement more rigorous fact-checking. -3. **Improve output and interactivity**: Develop custom formatting and user feedback mechanisms. + diff --git a/langgraph.json b/langgraph.json index 8de5509..75c23ae 100644 --- a/langgraph.json +++ b/langgraph.json @@ -3,7 +3,7 @@ "dockerfile_lines": [], "dependencies": ["."], "graphs": { - "agent": "./src/agent.ts:graph" + "agent": "./src/enrichment_agent/graph.ts:graph" }, "env": ".env" } diff --git a/package.json b/package.json index a6c2aca..e135f34 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "company-researcher-js", + "name": "data-enrichment", "version": "0.0.1", - "description": "An agent that researches a given company", - "main": "agent.ts", + "description": "A LangGraphJS template that populates ", + "main": "src/data_enrichment/graph.ts", "author": "William Fu-Hinthorn", "license": "MIT", "private": true, @@ -20,12 +20,13 @@ "test:all": "yarn test && yarn test:int && yarn lint:langgraph" }, "dependencies": { - "@langchain/anthropic": "^0.2.15", - "@langchain/community": "^0.2.31", - "@langchain/core": "^0.2.31", - "@langchain/langgraph": "^0.1.8", - "langchain": "^0.2.17", - "langsmith": "^0.1.48", + "@langchain/anthropic": "^0.3.0", + "@langchain/community": "^0.3.0", + "@langchain/core": "^0.3.1", + "@langchain/langgraph": "^0.2.3", + "langchain": "^0.3.2", + "langsmith": "^0.1.55", + "ts-node": "^10.9.2", "zod": "^3.23.8" }, "devDependencies": { diff --git a/src/agent.ts b/src/agent.ts deleted file mode 100644 index 97dca60..0000000 --- a/src/agent.ts +++ /dev/null @@ -1,370 +0,0 @@ -import { TavilySearchResults } from "@langchain/community/tools/tavily_search"; -import { - AIMessage, - BaseMessage, - HumanMessage, - isBaseMessage, - ToolMessage, -} from "@langchain/core/messages"; -import { StructuredTool, tool } from "@langchain/core/tools"; -import { StateGraph, START, END } from "@langchain/langgraph"; -import { z } from "zod"; -import { State, StateAnnotation } from "./utils/state.js"; -import { curry, getTextContent } from "./utils/utils.js"; -import { initChatModel } from "langchain/chat_models/universal"; - -/** - * Web Research Workflow - * - * This script implements a workflow for conducting web research on a given topic. - * It uses AI-powered tools to search the web, scrape websites, and compile information - * into a structured format. - */ - -// Default configuration -const DEFAULT_CONFIG = { - /** The name of the AI model to use */ - MODEL_NAME: "claude-3-5-sonnet-20240620", - /** Maximum number of search results to return */ - MAX_SEARCH_RESULTS: 10, - /** Maximum number of times the Info tool can be called before "END"ing the workflow */ - MAX_INFO_TOOL_CALLS: 3, -}; - -const rawModel = await initChatModel(DEFAULT_CONFIG.MODEL_NAME); - -/** - * Main prompt template for the AI agent. - * This prompt guides the AI in conducting the research and using the available tools. - */ -const main_prompt = `You are doing web research on behalf of a user. You are trying to figure out this information: - - -{info} - - -You have access to the following tools: - -- \`Search\`: call a search tool and get back some results -- \`ScrapeWebsite\`: scrape a website and get relevant notes about the given request. This will update the notes above. -- \`Info\`: call this when you are done and have gathered all the relevant info - -Here is the information you have about the topic you are researching: - -Topic: {topic}`; - -const info_prompt = `You are doing web research on behalf of a user. You are trying to find out this information: - - -{info} - - -You just scraped the following website: {url} - -Based on the website content below, jot down some notes about the website. - -{content}`; - -// Define the tools -const searchTool = new TavilySearchResults({ - maxResults: DEFAULT_CONFIG.MAX_SEARCH_RESULTS, -}); - -function createWebScraper(prompt: string) { - /** - * Tool for scraping a specific webpage. - * This tool is used to gain more detailed information from a specific - * URL that the agent has found compared to the general search results. - */ - - const scrapeWebsite = async ({ - url, - __state, - }: { - url: string; - __state?: Partial; - }): Promise => { - const state = __state as State; - // Note: WebBaseLoader is not directly available in TypeScript. - // You might need to use a different method to fetch and parse web content. - const response = await fetch(url); - const content = await response.text(); - const p = prompt - .replace("{info}", JSON.stringify(state?.schema?.shape, null, 2)) - .replace("{url}", url) - .replace("{content}", content); - const result = await rawModel.withRetry().invoke(p); - return getTextContent(result.content); - }; - - return scrapeWebsite; -} -const narrowFn = curry(createWebScraper(info_prompt), { __state: {} }); -const scrapeWebsiteTool = tool(narrowFn, { - name: "ScrapeWebsite", - description: "Used to scrape a website", - schema: z.object({ - url: z.string().describe("URL to scrape"), - }), -}); - -// Create the full tool -const scrapeWebsiteToolFull = tool(createWebScraper(info_prompt), { - name: "ScrapeWebsite", - description: "Used to scrape a website THE FULL WAY", - schema: z.object({ - url: z.string().describe("URL to scrape"), - __state: z.any(), - }), -}); - -/** - * Schema for structuring and validating the AI's judgment on the current results. - * This schema ensures that the AI provides reasoning and a clear decision - * on whether the gathered information is satisfactory. - */ -const infoIsSatisfactory = z - .object({ - reason: z - .array(z.string()) - .describe( - "First, provide reasoning for why this is either good or bad as a final result. Must include at least 3 reasons.", - ), - isSatisfactory: z - .boolean() - .describe( - "After providing your reasoning, provide a value indicating whether the result is satisfactory. If not, you will continue researching.", - ), - }) - .describe("Submit a judgment of whether the result is satisfactory or not"); - -// Define Nodes: - -/** - * Main agent node: Decides next action based on current state. - * This function processes the current state and generates the next action for the AI. - * - * @param state - The current state of the research workflow - * @returns An object containing the next set of messages to be processed - */ -const callModel = async ( - state: State, -): Promise<{ - messages: BaseMessage[]; - info?: z.infer; -}> => { - const infoTool = tool(async (_args: z.infer) => {}, { - name: "Info", - description: "Call this when you have gathered all the relevant info", - schema: state.schema, - }); - - const p = main_prompt - .replace("{info}", JSON.stringify(state.schema.shape, null, 2)) - .replace("{topic}", state.topic); - const messages = [new HumanMessage(p), ...state.messages]; - const model = rawModel.bindTools([scrapeWebsiteTool, searchTool, infoTool], { - tool_choice: "any", - }); - const response = await model.invoke(messages); - const info = - response.tool_calls - ?.filter((tc) => tc.name == "Info") - .map((tc) => state.schema.parse(tc?.args))?.[0] ?? undefined; - return { messages: [response], info }; -}; - -/** - * Checker node: Validates the gathered information. - * This function assesses whether the collected information is satisfactory or if more research is needed. - * - * @param state - The current state of the research workflow - * @returns Either a set of messages to continue research or the final info object if satisfactory - */ -const callChecker = async ( - state: State, -): Promise< - { messages: BaseMessage[] } | { info: z.infer } -> => { - const p = main_prompt - .replace("{info}", JSON.stringify(state.schema.shape, null, 2)) - .replace("{topic}", state.topic); - const messages = [new HumanMessage(p), ...state.messages.slice(0, -1)]; - const presumedInfo = state.info; - const checker_prompt = `I am thinking of calling the info tool with the info below. \ -Is this good? Give your reasoning as well. \ -You can encourage the Assistant to look at specific URLs if that seems relevant, or do more searches. -If you don't think it is good, you should be very specific about what could be improved. - -{presumed_info}`; - const p1 = checker_prompt.replace( - "{presumed_info}", - JSON.stringify(presumedInfo ?? {}, null, 2), - ); - messages.push(new HumanMessage(p1)); - - const response = await rawModel - .withStructuredOutput(infoIsSatisfactory) - .invoke(messages); - - if (response.isSatisfactory) { - try { - return { info: presumedInfo }; - } catch (e) { - return { - messages: [ - new ToolMessage({ - tool_call_id: - (state.messages[state.messages.length - 1] as AIMessage) - .tool_calls?.[0]?.id || "", - content: `Invalid response: ${e}`, - name: "Info", - }), - ], - }; - } - } else { - return { - messages: [ - new ToolMessage({ - tool_call_id: - (state.messages[state.messages.length - 1] as AIMessage) - .tool_calls?.[0]?.id || "", - content: JSON.stringify(response), - name: "Info", - artifact: response, - }), - ], - }; - } -}; - -/** - * Bad agent node: Handles cases where the agent makes invalid tool calls. - * This function generates error messages when the agent doesn't follow the expected behavior. - * - * @param state - The current state of the research workflow - * @returns An object containing error messages - */ -const badAgent = (state: State): { messages: BaseMessage[] } => { - const lastMessage = state.messages[state.messages.length - 1] as AIMessage; - if ((lastMessage?.tool_calls?.length || 0) > 0) { - return { - messages: - lastMessage.tool_calls?.map((call) => { - return new ToolMessage({ - tool_call_id: call.id || "", - content: "You must call one, and only one, tool!", - name: call.name, - }); - }) || [], - }; - } - return { - messages: [ - new HumanMessage( - "You must call one, and only one, tool! You can call the `Info` tool to finish the task.", - ), - ], - }; -}; - -/** - * Routing function: Determines the next node after the agent's action. - * This function decides whether to proceed with tool execution, check results, or handle errors. - * - * @param state - The current state of the research workflow - * @returns The name of the next node to execute - */ -const route_after_agent = ( - state: State, -): "badAgent" | "callChecker" | "toolNode" | typeof END => { - const lastMessage = state.messages[state.messages.length - 1] as AIMessage; - const numRounds = state.messages.filter( - (m) => ((m._getType() as string) === "tool" && m.name === "Info") || false, - ).length; - - if (!lastMessage.tool_calls || lastMessage.tool_calls.length !== 1) { - return "badAgent"; - } else if (lastMessage.tool_calls[0].name === "Info") { - if (numRounds > 2) { - return END; - } - return "callChecker"; - } else { - return "toolNode"; - } -}; - -/** - * Routing function: Determines whether to continue research or "END" the workflow. - * This function decides if the gathered information is satisfactory or if more research is needed. - * - * @param state - The current state of the research workflow - * @returns Either "callModel" to continue research or "END" to finish the workflow - */ -const route_after_checker = (state: State): typeof END | "callModel" => { - if (state.info) { - return END; - } - return "callModel"; -}; - -const createToolNode = (tools: StructuredTool[]) => { - const toolNode = async (state: State) => { - const message = state.messages[state.messages.length - 1]; - const outputs = await Promise.all( - (message as AIMessage).tool_calls?.map(async (call) => { - const tool = tools.find((tool) => tool.name === call.name); - try { - if (tool === undefined) { - throw new Error(`Tool "${call.name}" not found.`); - } - const newCall = { - ...call, - args: { - __state: state, - ...call.args, - }, - }; - const output = await tool.invoke({ ...newCall, type: "tool_call" }); - if (isBaseMessage(output) && output._getType() === "tool") { - return output; - } else { - return new ToolMessage({ - name: tool.name, - content: - typeof output === "string" ? output : JSON.stringify(output), - tool_call_id: call.id ?? "", - }); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - } catch (e: any) { - return new ToolMessage({ - content: `Error: ${e.message}\n Please fix your mistakes.`, - name: call.name, - tool_call_id: call.id ?? "", - }); - } - }) ?? [], - ); - - return { messages: outputs }; - }; - return toolNode; -}; - -// Create the graph -const workflow = new StateGraph(StateAnnotation) - .addNode("callModel", callModel) - .addNode("callChecker", callChecker) - .addNode("badAgent", badAgent) - .addNode("toolNode", createToolNode([searchTool, scrapeWebsiteToolFull])) - .addEdge(START, "callModel") - .addConditionalEdges("callModel", route_after_agent) - .addEdge("toolNode", "callModel") - .addConditionalEdges("callChecker", route_after_checker) - .addEdge("badAgent", "callModel"); - -export const graph = workflow.compile(); -graph.name = "ResearchTopic"; diff --git a/src/enrichment_agent/configuration.ts b/src/enrichment_agent/configuration.ts new file mode 100644 index 0000000..8baae69 --- /dev/null +++ b/src/enrichment_agent/configuration.ts @@ -0,0 +1,51 @@ +/** + * Define the configurable parameters for the agent. + */ + +import { RunnableConfig } from "@langchain/core/runnables"; +import { MAIN_PROMPT } from "./prompts.js"; + +export interface Configuration { + /** + * The name of the language model to use for the agent. + * + * Should be in the form: provider/model-name. + */ + modelName: string; + + /** + * The main prompt template to use for the agent's interactions. + * + * Expects two template literals: ${info} and ${topic}. + */ + prompt: string; + + /** + * The maximum number of search results to return for each search query. + */ + maxSearchResults: number; + + /** + * The maximum number of times the Info tool can be called during a single interaction. + */ + maxInfoToolCalls: number; + + /** + * The maximum number of interaction loops allowed before the agent terminates. + */ + maxLoops: number; +} + +export function ensureConfiguration(config?: RunnableConfig): Configuration { + /** + * Ensure the defaults are populated. + */ + const configurable = (config?.configurable as Record) ?? {}; + return { + modelName: configurable.modelName ?? "anthropic/claude-3-5-sonnet-20240620", + prompt: configurable.prompt ?? MAIN_PROMPT, + maxSearchResults: configurable.maxSearchResults ?? 10, + maxInfoToolCalls: configurable.maxInfoToolCalls ?? 3, + maxLoops: configurable.maxLoops ?? 6, + }; +} diff --git a/src/enrichment_agent/graph.ts b/src/enrichment_agent/graph.ts new file mode 100644 index 0000000..e6b39a5 --- /dev/null +++ b/src/enrichment_agent/graph.ts @@ -0,0 +1,226 @@ +/** + * Define a data enrichment agent. + * + * Works with a chat model with tool calling support. + */ + +import { + AIMessage, + BaseMessage, + HumanMessage, + ToolMessage, +} from "@langchain/core/messages"; +import { tool } from "@langchain/core/tools"; +import { StateGraph } from "@langchain/langgraph"; +import { z } from "zod"; +import { State, StateAnnotation } from "./state.js"; +import { loadChatModel } from "./utils.js"; +import { ensureConfiguration } from "./configuration.js"; +import { MAIN_PROMPT } from "./prompts.js"; +import { toolNode, TOOLS } from "./tools.js"; +import { RunnableConfig } from "@langchain/core/runnables"; + +// Define the nodes + +async function callAgentModel( + state: State, + config?: RunnableConfig, +): Promise<{ + messages: BaseMessage[]; + info?: z.infer; + loopStep: number; +}> { + const configuration = ensureConfiguration(config); + const infoTool = tool(async (_args: z.infer) => {}, { + name: "Info", + description: "Call this when you have gathered all the relevant info", + schema: state.schema, + }); + + const p = MAIN_PROMPT.replace( + "{info}", + JSON.stringify(state.schema.shape, null, 2), + ).replace("{topic}", state.topic); + const messages = [new HumanMessage(p), ...state.messages]; + const rawModel = await loadChatModel(configuration.modelName); + if (!rawModel.bindTools) { + throw new Error("Chat model does not support tool binding"); + } + const model = rawModel.bindTools([...TOOLS, infoTool]); + const response = await model.invoke(messages); + + let info; + if ( + ((response as AIMessage)?.tool_calls && + (response as AIMessage).tool_calls?.length) || + 0 + ) { + for (const tool_call of (response as AIMessage).tool_calls || []) { + if (tool_call.name === "Info") { + info = tool_call.args; + break; + } + } + } + + return { + messages: [response], + info, + loopStep: 1, + }; +} + +const InfoIsSatisfactory = z.object({ + reason: z + .array(z.string()) + .describe( + "First, provide reasoning for why this is either good or bad as a final result. Must include at least 3 reasons.", + ), + is_satisfactory: z + .boolean() + .describe( + "After providing your reasoning, provide a value indicating whether the result is satisfactory. If not, you will continue researching.", + ), +}); + +async function callChecker( + state: State, + config?: RunnableConfig, +): Promise< + { messages: BaseMessage[] } | { info: z.infer } +> { + const configuration = ensureConfiguration(config); + const p = MAIN_PROMPT.replace( + "{info}", + JSON.stringify(state.schema.shape, null, 2), + ).replace("{topic}", state.topic); + const messages = [new HumanMessage(p), ...state.messages.slice(0, -1)]; + const presumedInfo = state.info; + const checker_prompt = `I am thinking of calling the info tool with the info below. \ +Is this good? Give your reasoning as well. \ +You can encourage the Assistant to look at specific URLs if that seems relevant, or do more searches. +If you don't think it is good, you should be very specific about what could be improved. + +{presumed_info}`; + const p1 = checker_prompt.replace( + "{presumed_info}", + JSON.stringify(presumedInfo ?? {}, null, 2), + ); + messages.push(new HumanMessage(p1)); + + const rawModel = await loadChatModel(configuration.modelName); + const boundModel = rawModel.withStructuredOutput(InfoIsSatisfactory); + const response = await boundModel.invoke(messages); + + const lastMessage = state.messages[state.messages.length - 1]; + if (!(lastMessage instanceof AIMessage)) { + throw new Error( + `${callChecker.name} expects the last message in the state to be an AI message with tool calls. Got: ${typeof lastMessage}`, + ); + } + + if (response.is_satisfactory) { + try { + return { info: presumedInfo }; + } catch (e) { + return { + messages: [ + new ToolMessage({ + tool_call_id: lastMessage.tool_calls?.[0]?.id || "", + content: `Invalid response: ${e}`, + name: "Info", + }), + ], + }; + } + } else { + return { + messages: [ + new ToolMessage({ + tool_call_id: lastMessage.tool_calls?.[0]?.id || "", + content: JSON.stringify(response), + name: "Info", + additional_kwargs: { artifact: response }, + }), + ], + }; + } +} + +function createCorrectionResponse(state: State): { messages: BaseMessage[] } { + const lastMessage = state.messages[state.messages.length - 1]; + if (lastMessage instanceof AIMessage && lastMessage.tool_calls) { + return { + messages: lastMessage.tool_calls.map( + (call) => + new ToolMessage({ + tool_call_id: call.id || "", + content: "You must call one, and only one, tool!", + name: call.name, + }), + ), + }; + } + return { + messages: [ + new HumanMessage( + "You must call one, and only one, tool! You can call the `Info` tool to finish the task.", + ), + ], + }; +} + +function routeAfterAgent( + state: State, +): "createCorrectionResponse" | "callChecker" | "tools" | "__end__" { + const lastMessage = state.messages[state.messages.length - 1]; + + if ( + !(lastMessage instanceof AIMessage) || + !lastMessage.tool_calls || + (lastMessage.tool_calls.length !== 1 && + lastMessage.tool_calls.some((tc) => tc.name === "Info")) + ) { + return "createCorrectionResponse"; + } else if (lastMessage.tool_calls[0].name === "Info") { + return "callChecker"; + } else { + return "tools"; + } +} + +function routeAfterChecker( + state: State, + config?: RunnableConfig, +): "__end__" | "callAgentModel" { + const configuration = ensureConfiguration(config); + if (state.loopStep < configuration.maxInfoToolCalls) { + if (!state.info) { + return "callAgentModel"; + } + const lastMessage = state.messages[state.messages.length - 1]; + if (lastMessage instanceof ToolMessage && lastMessage.status === "error") { + // Research deemed unsatisfactory + return "callAgentModel"; + } + // It's great! + return "__end__"; + } else { + return "__end__"; + } +} + +// Create the graph +const workflow = new StateGraph(StateAnnotation) + .addNode("callAgentModel", callAgentModel) + .addNode("callChecker", callChecker) + .addNode("createCorrectionResponse", createCorrectionResponse) + .addNode("tools", toolNode) + .addEdge("__start__", "callAgentModel") + .addConditionalEdges("callAgentModel", routeAfterAgent) + .addEdge("tools", "callAgentModel") + .addConditionalEdges("callChecker", routeAfterChecker) + .addEdge("createCorrectionResponse", "callAgentModel"); + +export const graph = workflow.compile(); +graph.name = "ResearchTopic"; diff --git a/src/enrichment_agent/prompts.ts b/src/enrichment_agent/prompts.ts new file mode 100644 index 0000000..7ef79fb --- /dev/null +++ b/src/enrichment_agent/prompts.ts @@ -0,0 +1,31 @@ +/** + * Main prompt template for the AI agent. + * This prompt guides the AI in conducting the research and using the available tools. + */ +export const MAIN_PROMPT = `You are doing web research on behalf of a user. You are trying to figure out this information: + + +{info} + + +You have access to the following tools: + +- \`Search\`: call a search tool and get back some results +- \`ScrapeWebsite\`: scrape a website and get relevant notes about the given request. This will update the notes above. +- \`Info\`: call this when you are done and have gathered all the relevant info + +Here is the information you have about the topic you are researching: + +Topic: {topic}`; + +export const INFO_PROMPT = `You are doing web research on behalf of a user. You are trying to find out this information: + + +{info} + + +You just scraped the following website: {url} + +Based on the website content below, jot down some notes about the website. + +{content}`; diff --git a/src/utils/state.ts b/src/enrichment_agent/state.ts similarity index 88% rename from src/utils/state.ts rename to src/enrichment_agent/state.ts index 0794331..88e0724 100644 --- a/src/utils/state.ts +++ b/src/enrichment_agent/state.ts @@ -54,6 +54,15 @@ export const StateAnnotation = Annotation.Root({ schema: Annotation>, // Feel free to add additional attributes to your state as needed. // Common examples include retrieved documents, extracted entities, API connections, etc. + + /** + * Tracks the number of iterations the agent has gone through in the current session. + * This can be used to limit the number of iterations or to track progress. + */ + loopStep: Annotation({ + reducer: (left: number, right: number) => left + right, + default: () => 0, + }), }); export type State = typeof StateAnnotation.State; diff --git a/src/enrichment_agent/tools.ts b/src/enrichment_agent/tools.ts new file mode 100644 index 0000000..8f57c80 --- /dev/null +++ b/src/enrichment_agent/tools.ts @@ -0,0 +1,155 @@ +/** + * Tools for data enrichment. + * + * This module contains functions that are directly exposed to the LLM as tools. + * These tools can be used for tasks such as web searching and scraping. + * Users can edit and extend these tools as needed. + */ +import { TavilySearchResults } from "@langchain/community/tools/tavily_search"; +import { RunnableConfig } from "@langchain/core/runnables"; + +import { ensureConfiguration } from "./configuration.js"; +import { State } from "./state.js"; +import { StructuredTool, tool } from "@langchain/core/tools"; +import { curry, loadChatModel } from "./utils.js"; +import { + AIMessage, + isBaseMessage, + ToolMessage, +} from "@langchain/core/messages"; +import { z } from "zod"; + +async function search( + { query }: { query: string }, + config: RunnableConfig, +): Promise> | null> { + /** + * Search for general results. + * + * This function performs a search using the Tavily search engine, which is designed + * to provide comprehensive, accurate, and trusted results. It's particularly useful + * for answering questions about current events. + */ + const configuration = ensureConfiguration(config); + const wrapped = new TavilySearchResults({ + maxResults: configuration.maxSearchResults, + }); + const result = await wrapped.invoke({ query }); + return result as Array> | null; +} + +const INFO_PROMPT = `You are doing web research on behalf of a user. You are trying to find out this information: + + +{info} + + +You just scraped the following website: {url} + +Based on the website content below, jot down some notes about the website. + + +{content} +`; + +async function scrapeWebsite( + { + url, + __state, + }: { + url: string; + __state?: State; + }, + config: RunnableConfig, +): Promise { + /** + * Scrape and summarize content from a given URL. + */ + const response = await fetch(url); + const content = await response.text(); + const configuration = ensureConfiguration(config); + + const p = INFO_PROMPT.replace( + "{info}", + JSON.stringify(__state?.schema.shape, null, 2), + ) + .replace("{url}", url) + .replace("{content}", content); + + const rawModel = await loadChatModel(configuration.modelName); + const result = await rawModel.invoke(p); + return result.content as string; +} + +export const createToolNode = (tools: StructuredTool[]) => { + const toolNode = async (state: State) => { + const message = state.messages[state.messages.length - 1]; + const outputs = await Promise.all( + (message as AIMessage).tool_calls?.map(async (call) => { + const tool = tools.find((tool) => tool.name === call.name); + try { + if (tool === undefined) { + throw new Error(`Tool "${call.name}" not found.`); + } + const newCall = { + ...call, + args: { + __state: state, + ...call.args, + }, + }; + const output = await tool.invoke({ ...newCall, type: "tool_call" }); + if (isBaseMessage(output) && output._getType() === "tool") { + return output; + } else { + return new ToolMessage({ + name: tool.name, + content: + typeof output === "string" ? output : JSON.stringify(output), + tool_call_id: call.id ?? "", + }); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e: any) { + return new ToolMessage({ + content: `Error: ${e.message}\n Please fix your mistakes.`, + name: call.name, + tool_call_id: call.id ?? "", + status: "error", + }); + } + }) ?? [], + ); + + return { messages: outputs }; + }; + return toolNode; +}; + +const searchTool = tool(search, { + name: "search", + description: "Search the internet for information on a given topic", + schema: z.object({ + query: z.string().describe("The search query to look up"), + }), +}); + +// Exposed to the +export const TOOLS = [ + searchTool, + tool(curry(scrapeWebsite, { __state: undefined }), { + name: "scrapeWebsite", + description: "Scrape content from a given website URL", + schema: z.object({ + url: z.string().url().describe("The URL of the website to scrape"), + }), + }), +]; + +export const toolNode = createToolNode([ + searchTool, + tool(scrapeWebsite, { + name: "scrapeWebsite", + description: "Scrape content from a given website URL", + }), +]); diff --git a/src/utils/utils.ts b/src/enrichment_agent/utils.ts similarity index 63% rename from src/utils/utils.ts rename to src/enrichment_agent/utils.ts index fb4ac28..39f341e 100644 --- a/src/utils/utils.ts +++ b/src/enrichment_agent/utils.ts @@ -1,7 +1,9 @@ +import { BaseChatModel } from "@langchain/core/language_models/chat_models"; import { MessageContent, MessageContentComplex, } from "@langchain/core/messages"; +import { initChatModel } from "langchain/chat_models/universal"; export function curry< // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -47,3 +49,22 @@ export function getTextContent(content: MessageContent): string { } return ""; } + +/** + * Load a chat model from a fully specified name. + * @param fullySpecifiedName - String in the format 'provider/model' or 'provider/account/provider/model'. + * @returns A Promise that resolves to a BaseChatModel instance. + */ +export async function loadChatModel( + fullySpecifiedName: string, +): Promise { + const index = fullySpecifiedName.indexOf("/"); + if (index === -1) { + // If there's no "/", assume it's just the model + return await initChatModel(fullySpecifiedName); + } else { + const provider = fullySpecifiedName.slice(0, index); + const model = fullySpecifiedName.slice(index + 1); + return await initChatModel(model, { modelProvider: provider }); + } +} diff --git a/tests/agent.int.test.ts b/tests/agent.int.test.ts index bda298d..b074b5d 100644 --- a/tests/agent.int.test.ts +++ b/tests/agent.int.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from "@jest/globals"; -import { graph } from "../src/agent.js"; +import { graph } from "../src/enrichment_agent/graph.js"; import { z } from "zod"; describe("Researcher", () => { it("should initialize and compile the graph", () => { diff --git a/tests/agent.test.ts b/tests/agent.test.ts index 233bb4a..af0eec4 100644 --- a/tests/agent.test.ts +++ b/tests/agent.test.ts @@ -1,8 +1,11 @@ import { describe, it, expect } from "@jest/globals"; +import { graph } from "../src/enrichment_agent/graph.js"; describe("Web Research Agent", () => { - it("todo", async () => { - expect(true).toBe(true); + it("should initialize and compile the graph", () => { + expect(graph).toBeDefined(); + expect(graph.name).toBe("ResearchTopic"); }); + // TODO: Add more test cases for individual nodes, routing logic, tool integration, and output validation }); diff --git a/tests/configuration.test.ts b/tests/configuration.test.ts new file mode 100644 index 0000000..1688265 --- /dev/null +++ b/tests/configuration.test.ts @@ -0,0 +1,11 @@ +import { describe, it, expect } from "@jest/globals"; +import { ensureConfiguration } from "../src/enrichment_agent/configuration.js"; + +describe("Configuration", () => { + it("should initialize configuration from an empty object", () => { + const emptyConfig = {}; + const result = ensureConfiguration(emptyConfig); + expect(result).toBeDefined(); + expect(typeof result).toBe("object"); + }); +}); diff --git a/yarn.lock b/yarn.lock index a275b99..31d89db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -57,12 +57,12 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.0", "@babel/generator@^7.25.4", "@babel/generator@^7.7.2": - version "7.25.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" - integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.6", "@babel/generator@^7.7.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== dependencies: - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -125,12 +125,12 @@ integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== "@babel/helpers@^7.25.0": - version "7.25.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" - integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== dependencies: "@babel/template" "^7.25.0" - "@babel/types" "^7.25.0" + "@babel/types" "^7.25.6" "@babel/highlight@^7.24.7": version "7.24.7" @@ -142,12 +142,12 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" - integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== dependencies: - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -178,11 +178,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" - integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz#6d4c78f042db0e82fd6436cd65fec5dc78ad2bde" + integrity sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.8" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -278,22 +278,22 @@ "@babel/types" "^7.25.0" "@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" - integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== dependencies: "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.25.4" - "@babel/parser" "^7.25.4" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" "@babel/template" "^7.25.0" - "@babel/types" "^7.25.4" + "@babel/types" "^7.25.6" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4", "@babel/types@^7.3.3": - version "7.25.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" - integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.3.3": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== dependencies: "@babel/helper-string-parser" "^7.24.8" "@babel/helper-validator-identifier" "^7.24.7" @@ -304,6 +304,13 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -312,9 +319,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -346,22 +353,22 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== "@eslint/js@^9.9.1": - version "9.9.1" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.1.tgz#4a97e85e982099d6c7ee8410aacb55adaa576f06" - integrity sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ== + version "9.10.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.10.0.tgz#eaa3cb0baec497970bb29e43a153d0d5650143c6" + integrity sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" + "@humanwhocodes/object-schema" "^2.0.3" debug "^4.3.1" minimatch "^3.0.5" @@ -370,7 +377,7 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": +"@humanwhocodes/object-schema@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== @@ -592,7 +599,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== @@ -607,6 +614,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" @@ -615,44 +630,42 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@langchain/anthropic@^0.2.15": - version "0.2.15" - resolved "https://registry.yarnpkg.com/@langchain/anthropic/-/anthropic-0.2.15.tgz#e1ac28914adff4fd576c14c2444df9a08ea1fac2" - integrity sha512-b9zVryoqqzyKelCJoc/8R8EziGfUyaX9w13BNXGoZ+RwMU88XaM05xeqxcJFOezVTi0aH4yoEZ6Kw/CtsukI0A== +"@langchain/anthropic@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@langchain/anthropic/-/anthropic-0.3.0.tgz#bc8ad0d98a6c1354c51cdd72f29132573946cd71" + integrity sha512-vEi2BGadET2nMa+0NaEFm2bcdGjmDhedQvTcX/x6/mYQI2XVi1yJM5Kxq5Os7Wo7EazEngEtC4uoaa3jlQM8hw== dependencies: "@anthropic-ai/sdk" "^0.25.2" - "@langchain/core" ">=0.2.21 <0.3.0" fast-xml-parser "^4.4.1" zod "^3.22.4" zod-to-json-schema "^3.22.4" -"@langchain/community@^0.2.31": - version "0.2.31" - resolved "https://registry.yarnpkg.com/@langchain/community/-/community-0.2.31.tgz#4b5ae3ea1e1f694d3c5323f2bf32c1a141b09e57" - integrity sha512-UayfsFyxHBLGnc9nODLupC46lvTMssYkfmFalMKqWAWQLWPEKOcDriy8Dg8+0MBME/y7SzqlCniEeEvml16hog== +"@langchain/community@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@langchain/community/-/community-0.3.0.tgz#03a14ca57ec43b3536ab093d9992224b48f4b542" + integrity sha512-JUmXn4wt/STMJVN0ZiQGjOF2MMrhv9sJ78KG+7hwSKlxTl1QfhPFO1jr5psls4Ok4TDKaLw/ULziNGEN5cCR/Q== dependencies: - "@langchain/core" ">=0.2.21 <0.3.0" - "@langchain/openai" ">=0.2.0 <0.3.0" + "@langchain/openai" ">=0.2.0 <0.4.0" binary-extensions "^2.2.0" expr-eval "^2.0.2" flat "^5.0.2" js-yaml "^4.1.0" - langchain "~0.2.3" + langchain ">=0.2.3 <0.4.0" langsmith "~0.1.30" uuid "^10.0.0" zod "^3.22.3" zod-to-json-schema "^3.22.5" -"@langchain/core@>0.2.0 <0.3.0", "@langchain/core@>=0.2.21 <0.3.0", "@langchain/core@>=0.2.26 <0.3.0", "@langchain/core@>=0.2.31 <0.3.0", "@langchain/core@^0.2.31": - version "0.2.31" - resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.2.31.tgz#31e717fb511ed57b65095aba8b2b3845cff92588" - integrity sha512-qGfeaACST7dvovgHItzuag9fEBGK7IjCE9vRuTu/y8/WYGJi28WPD/AwWxnu7YdW1vZSuIXO6ZA76t2G9B/oKg== +"@langchain/core@>=0.2.26 <0.3.0": + version "0.2.33" + resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.2.33.tgz#57cdd6b81dc1173a5ed2a2e38d7563057aa09ea2" + integrity sha512-8WMied0Y5c4YDUjvoQqr/M63jAuZ3e+YqCAaszeGeBJbsHFoCdj8Ppr/yP6moAvsLImntxUXC6BxqAIDYkpGkg== dependencies: ansi-styles "^5.0.0" camelcase "6" decamelize "1.2.0" js-tiktoken "^1.0.12" - langsmith "^0.1.43" + langsmith "^0.1.56-rc.1" mustache "^4.2.0" p-queue "^6.6.2" p-retry "4" @@ -660,49 +673,66 @@ zod "^3.22.4" zod-to-json-schema "^3.22.3" -"@langchain/langgraph-checkpoint-sqlite@~0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@langchain/langgraph-checkpoint-sqlite/-/langgraph-checkpoint-sqlite-0.0.1.tgz#6eb46934f6767a6509d2dc812cf8940dc076b684" - integrity sha512-GaZo/rMS9WCO11FdYgO/omCmYnk50zjKdsxPiEKMkorXkPDLuMIgIEfUs5VKc0PMclvFfSNzX8gmvp8Kwk5MpA== +"@langchain/core@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@langchain/core/-/core-0.3.1.tgz#f06206809575b2a95eaef609b3273842223c0786" + integrity sha512-xYdTAgS9hYPt+h0/OwpyRcMB5HKR40LXutbSr2jw3hMVIOwD1DnvhnUEnWgBK4lumulVW2jrosNPyBKMhRZAZg== dependencies: - "@langchain/langgraph-checkpoint" "~0.0.1" + ansi-styles "^5.0.0" + camelcase "6" + decamelize "1.2.0" + js-tiktoken "^1.0.12" + langsmith "^0.1.56-rc.1" + mustache "^4.2.0" + p-queue "^6.6.2" + p-retry "4" + uuid "^10.0.0" + zod "^3.22.4" + zod-to-json-schema "^3.22.3" -"@langchain/langgraph-checkpoint@~0.0.1", "@langchain/langgraph-checkpoint@~0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.0.4.tgz#75fb8a1590d30eee22dc25f3fc43ea6cb57e047c" - integrity sha512-oihZW6l2gr+BZ+BAkz3CrB3Pmyz/PGboDqvbR43jzNk/SvWWcsY0brm89K4oS1DDmxP/2aos/+E+Ynk5Z2XL6Q== +"@langchain/langgraph-checkpoint@~0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-0.0.6.tgz#69f0c5c9aeefd48dcf0fa1ffa0744d8139a9f27d" + integrity sha512-hQsznlUMFKyOCaN9VtqNSSemfKATujNy5ePM6NX7lruk/Mmi2t7R9SsBnf9G2Yts+IaIwv3vJJaAFYEHfqbc5g== dependencies: uuid "^10.0.0" -"@langchain/langgraph@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@langchain/langgraph/-/langgraph-0.1.8.tgz#1a3bd8a398c8cdebe0a7a74102603cd026b6da8a" - integrity sha512-hGXkU4vPvgmrrSlyoqZbInjVDn3ytXHOa93qk/Uox16RvO+xD+lwvhwTvLQ/HYKuoSjcYlH3DnrCz9kMTgJVww== +"@langchain/langgraph@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@langchain/langgraph/-/langgraph-0.2.3.tgz#34072f68536706a42c7fb978f1ab5373c058e2f5" + integrity sha512-agBa79dgKk08B3gNE9+SSLYLmlhBwMaCPsME5BlIFJjs2j2lDnSgKtUfQ9nE4e3Q51L9AA4DjIxmxJiQtS3GOw== dependencies: - "@langchain/core" ">=0.2.31 <0.3.0" - "@langchain/langgraph-checkpoint" "~0.0.4" - "@langchain/langgraph-checkpoint-sqlite" "~0.0.1" + "@langchain/langgraph-checkpoint" "~0.0.6" double-ended-queue "^2.1.0-0" uuid "^10.0.0" zod "^3.23.8" -"@langchain/openai@>=0.1.0 <0.3.0", "@langchain/openai@>=0.2.0 <0.3.0", "@langchain/openai@^0.2.7": - version "0.2.8" - resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.2.8.tgz#f4d1246684d06e5a8df2369325282fb4d9c296c0" - integrity sha512-p5fxEAKuR8UV9jWIxkZ6AY/vAPSYxJI0Pf/UM4T3FKk/dn99G/mAEDLhfI4pBf7B8o8TudSVyBW2hRjZqlQu7g== +"@langchain/openai@>=0.1.0 <0.4.0", "@langchain/openai@>=0.2.0 <0.4.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.3.0.tgz#89329ab9350187269a471dac2c2f4fca5f1fc5a3" + integrity sha512-yXrz5Qn3t9nq3NQAH2l4zZOI4ev2CFdLC5kvmi5SdW4bggRuM40SXTUAY3VRld4I5eocYfk82VbrlA+6dvN5EA== + dependencies: + js-tiktoken "^1.0.12" + openai "^4.57.3" + zod "^3.22.4" + zod-to-json-schema "^3.22.3" + +"@langchain/openai@^0.2.7": + version "0.2.11" + resolved "https://registry.yarnpkg.com/@langchain/openai/-/openai-0.2.11.tgz#b1a0403eb5db8133bb4ff41fe0680e727b78ddfc" + integrity sha512-Pu8+WfJojCgSf0bAsXb4AjqvcDyAWyoEB1AoCRNACgEnBWZuitz3hLwCo9I+6hAbeg3QJ37g82yKcmvKAg1feg== dependencies: "@langchain/core" ">=0.2.26 <0.3.0" js-tiktoken "^1.0.12" - openai "^4.55.0" + openai "^4.57.3" zod "^3.22.4" zod-to-json-schema "^3.22.3" -"@langchain/textsplitters@~0.0.0": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@langchain/textsplitters/-/textsplitters-0.0.3.tgz#1a3cc93dd2ab330edb225400ded190a22fea14e3" - integrity sha512-cXWgKE3sdWLSqAa8ykbCcUsUF1Kyr5J3HOWYGuobhPEycXW4WI++d5DhzdpL238mzoEXTi90VqfSCra37l5YqA== +"@langchain/textsplitters@>=0.0.0 <0.2.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@langchain/textsplitters/-/textsplitters-0.1.0.tgz#f37620992192df09ecda3dfbd545b36a6bcbae46" + integrity sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw== dependencies: - "@langchain/core" ">0.2.0 <0.3.0" js-tiktoken "^1.0.12" "@nodelib/fs.scandir@2.1.5": @@ -726,6 +756,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -745,6 +780,26 @@ dependencies: "@sinonjs/commons" "^3.0.0" +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@tsconfig/recommended@^1.0.7": version "1.0.7" resolved "https://registry.yarnpkg.com/@tsconfig/recommended/-/recommended-1.0.7.tgz#fdd95fc2c8d643c8b4a8ca45fd68eea248512407" @@ -810,9 +865,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.5.0": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== + version "29.5.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" + integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -836,19 +891,24 @@ form-data "^4.0.0" "@types/node@*": - version "22.5.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.1.tgz#de01dce265f6b99ed32b295962045d10b5b99560" - integrity sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw== + version "22.5.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" + integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== dependencies: undici-types "~6.19.2" "@types/node@^18.11.18": - version "18.19.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.47.tgz#18076201ad7dd3445046df6ce9ead5fe5abd9387" - integrity sha512-1f7dB3BL/bpd9tnDJrrHb66Y+cVrhxSOTGorRNdHwYTUlTay3HuTDPKo9a/4vX9pMQkhYBcAbL4jQdNlhCFP9A== + version "18.19.50" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.50.tgz#8652b34ee7c0e7e2004b3f08192281808d41bf5a" + integrity sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg== dependencies: undici-types "~5.26.4" +"@types/qs@^6.9.15": + version "6.9.16" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.16.tgz#52bba125a07c0482d26747d5d4947a64daf8f794" + integrity sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A== + "@types/retry@0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" @@ -982,7 +1042,14 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.12.0, acorn@^8.9.0: +acorn-walk@^8.1.1: + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.12.0, acorn@^8.4.1, acorn@^8.9.0: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== @@ -1043,6 +1110,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1063,7 +1135,7 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" -array-includes@^3.1.7: +array-includes@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== @@ -1080,7 +1152,7 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.findlastindex@^1.2.3: +array.prototype.findlastindex@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== @@ -1299,9 +1371,9 @@ camelcase@^5.3.1: integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== caniuse-lite@^1.0.30001646: - version "1.0.30001653" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" - integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== + version "1.0.30001660" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz#31218de3463fabb44d0b7607b652e56edf2e2355" + integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg== chalk@^2.4.2: version "2.4.2" @@ -1331,9 +1403,9 @@ ci-info@^3.2.0: integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.0.tgz#677de7ed7efff67cc40c9bf1897fea79d41b5215" - integrity sha512-N1NGmowPlGBLsOZLPvm48StN04V4YvQRL0i6b7ctrVY3epjP/ct7hFLOItz6pDIvRjwpfPxi52a2UWV2ziir8g== + version "1.4.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" + integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== cliui@^8.0.1: version "8.0.1" @@ -1413,6 +1485,11 @@ create-jest@^29.7.0: jest-util "^29.7.0" prompts "^2.0.1" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -1457,11 +1534,11 @@ debug@^3.2.7: ms "^2.1.1" debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" decamelize@1.2.0: version "1.2.0" @@ -1516,6 +1593,11 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -1550,9 +1632,9 @@ ejs@^3.1.10: jake "^10.8.5" electron-to-chromium@^1.5.4: - version "1.5.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" - integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + version "1.5.23" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.23.tgz#6dabd8f7fec5cbf618b732ff4c42950dcc7a3be5" + integrity sha512-mBhODedOXg4v5QWwl21DjM5amzjmI1zw9EPrPK/5Wx7C8jt33bpZNrC7OhHUG3pxRtbLpr3W2dXT+Ph1SsfRZA== emittery@^0.13.1: version "0.13.1" @@ -1668,9 +1750,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -1701,33 +1783,34 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-module-utils@^2.8.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.2.tgz#2ecad69d71e1fa81f17f7f24d5d3e46b168de663" - integrity sha512-3XnC5fDyc8M4J2E8pt8pmSVRX2M+5yWMCfI/kDZwauQeFgzQOuhcRBFKjTeJagqgk4sFKxe1mvNVnaWwImx/Tg== +eslint-module-utils@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" + integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== dependencies: debug "^3.2.7" eslint-plugin-import@^2.27.5: - version "2.29.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" - integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== + version "2.30.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz#21ceea0fc462657195989dd780e50c92fe95f449" + integrity sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw== dependencies: - array-includes "^3.1.7" - array.prototype.findlastindex "^1.2.3" + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" array.prototype.flat "^1.3.2" array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.8.0" - hasown "^2.0.0" - is-core-module "^2.13.1" + eslint-module-utils "^2.9.0" + hasown "^2.0.2" + is-core-module "^2.15.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.fromentries "^2.0.7" - object.groupby "^1.0.1" - object.values "^1.1.7" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" semver "^6.3.1" tsconfig-paths "^3.15.0" @@ -1770,15 +1853,15 @@ eslint-visitor-keys@^4.0.0: integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== eslint@^8.41.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -1943,9 +2026,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fast-xml-parser@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz#86dbf3f18edf8739326447bcaac31b4ae7f6514f" - integrity sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw== + version "4.5.0" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz#2882b7d01a6825dfdf909638f2de0256351def37" + integrity sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg== dependencies: strnum "^1.0.5" @@ -2342,7 +2425,7 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.13.0, is-core-module@^2.13.1: +is-core-module@^2.13.0, is-core-module@^2.15.1: version "2.15.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== @@ -2967,19 +3050,17 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -langchain@^0.2.17, langchain@~0.2.3: - version "0.2.17" - resolved "https://registry.yarnpkg.com/langchain/-/langchain-0.2.17.tgz#c408d5f70e817f335511f79ad53db2addfadb278" - integrity sha512-wFn7wo+XGzqYrv3KJLmMZ1M6BHx12C3YUSASOa03rcDsBzRL5onxhKAC/g4xAIqlAHrJYgU6Jb/T/S6uJ6UdkQ== +"langchain@>=0.2.3 <0.4.0", langchain@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/langchain/-/langchain-0.3.2.tgz#aec3e679d3d6c36f469448380affa475c92fbd86" + integrity sha512-kd2kz1cS/PIVrLEDFlrZsAasQfPLbY1UqCZbRKa3/QcpB33/n6xPDvXSMfBuKhvNj0bjW6MXDR9HZTduXjJBgg== dependencies: - "@langchain/core" ">=0.2.21 <0.3.0" - "@langchain/openai" ">=0.1.0 <0.3.0" - "@langchain/textsplitters" "~0.0.0" - binary-extensions "^2.2.0" + "@langchain/openai" ">=0.1.0 <0.4.0" + "@langchain/textsplitters" ">=0.0.0 <0.2.0" js-tiktoken "^1.0.12" js-yaml "^4.1.0" jsonpointer "^5.0.1" - langsmith "~0.1.40" + langsmith "^0.1.56-rc.1" openapi-types "^12.1.3" p-retry "4" uuid "^10.0.0" @@ -2987,10 +3068,22 @@ langchain@^0.2.17, langchain@~0.2.3: zod "^3.22.4" zod-to-json-schema "^3.22.3" -langsmith@^0.1.43, langsmith@^0.1.48, langsmith@~0.1.30, langsmith@~0.1.40: - version "0.1.48" - resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.48.tgz#be6ca209bab3436b45dfe71aca7bacc88b61b2bc" - integrity sha512-lh98dZeShVPG1VzENpbjFWiburyYpChsO7nehGwxuqQ5/E1BBFKpsDCxLTcgXYpgWFPJxRvMqq7bLeq/txjakw== +langsmith@^0.1.55, langsmith@~0.1.30: + version "0.1.55" + resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.55.tgz#bdbb8015a28093f4a248c0ee9b8937731c5baa93" + integrity sha512-6NVtI04UUnIY59I/imOX02FG/QMGfqStu8tiJtyyreKMv2GAN0EE9Z5Ap1wzOe6v8ukEcV3NwEO2LYOPwup1PQ== + dependencies: + "@types/uuid" "^10.0.0" + commander "^10.0.1" + p-queue "^6.6.2" + p-retry "4" + semver "^7.6.3" + uuid "^10.0.0" + +langsmith@^0.1.56-rc.1: + version "0.1.56-rc.1" + resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.1.56-rc.1.tgz#20900ff0dee51baea359c6f16a4acc260f07fbb7" + integrity sha512-XsOxlhBAlTCGR9hNEL2VSREmiz8v6czNuX3CIwec9fH9T0WbNPle8Q/7Jy/h9UCbS9vuzTjfgc4qO5Dc9cu5Ig== dependencies: "@types/uuid" "^10.0.0" commander "^10.0.1" @@ -3055,7 +3148,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@^1.3.6: +make-error@^1.1.1, make-error@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -3121,12 +3214,7 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.0.0, ms@^2.1.1: +ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -3200,7 +3288,7 @@ object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" -object.fromentries@^2.0.7: +object.fromentries@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== @@ -3210,7 +3298,7 @@ object.fromentries@^2.0.7: es-abstract "^1.23.2" es-object-atoms "^1.0.0" -object.groupby@^1.0.1: +object.groupby@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== @@ -3219,7 +3307,7 @@ object.groupby@^1.0.1: define-properties "^1.2.1" es-abstract "^1.23.2" -object.values@^1.1.7: +object.values@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== @@ -3242,18 +3330,20 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -openai@^4.55.0: - version "4.56.1" - resolved "https://registry.yarnpkg.com/openai/-/openai-4.56.1.tgz#fc2160964d4c88a45b8f14dd6003ab7b09398eb3" - integrity sha512-XMsxdjrWBYgbP6EsDIwbhkQEgeyL2C41te/QrJm8kdfho22exhTUJ/cFJSmCTToam/RSOC1BlOylHvD6i/bmsA== +openai@^4.57.3: + version "4.61.1" + resolved "https://registry.yarnpkg.com/openai/-/openai-4.61.1.tgz#1fe2fa231b6de54fad32785528d7628dbbf68ab4" + integrity sha512-jZ2WRn+f4QWZkYnrUS+xzEUIBllsGN75dUCaXmMIHcv2W9yn7O8amaReTbGHCNEYkL43vuDOcxPUWfNPUmoD3Q== dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" + "@types/qs" "^6.9.15" abort-controller "^3.0.0" agentkeepalive "^4.2.1" form-data-encoder "1.7.2" formdata-node "^4.3.2" node-fetch "^2.6.7" + qs "^6.10.3" openapi-types@^12.1.3: version "12.1.3" @@ -3376,9 +3466,9 @@ path-type@^4.0.0: integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -3446,6 +3536,13 @@ pure-rand@^6.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== +qs@^6.10.3: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -3589,7 +3686,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -side-channel@^1.0.4: +side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== @@ -3793,6 +3890,25 @@ ts-jest@^29.1.0: semver "^7.6.3" yargs-parser "^21.1.1" +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + tsconfig-paths@^3.15.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" @@ -3882,9 +3998,9 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript@^5.3.3: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== unbox-primitive@^1.0.2: version "1.0.2" @@ -3926,6 +4042,11 @@ uuid@^10.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-to-istanbul@^9.0.1: version "9.3.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" @@ -4027,9 +4148,9 @@ yallist@^3.0.2: integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yaml@^2.2.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" - integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== + version "2.5.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.1.tgz#c9772aacf62cb7494a95b0c4f1fb065b563db130" + integrity sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q== yargs-parser@^21.1.1: version "21.1.1" @@ -4049,15 +4170,20 @@ yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zod-to-json-schema@^3.22.3, zod-to-json-schema@^3.22.4, zod-to-json-schema@^3.22.5: - version "3.23.2" - resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.2.tgz#bc7e379c8050462538383e382964c03d8fe008f9" - integrity sha512-uSt90Gzc/tUfyNqxnjlfBs8W6WSGpNBv0rVsNxP/BVSMHMKGdthPYff4xtCHYloJGM0CFxFsb3NbC0eqPhfImw== + version "3.23.3" + resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.23.3.tgz#56cf4e0bd5c4096ab46e63159e20998ec7b19c39" + integrity sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog== zod@^3.22.3, zod@^3.22.4, zod@^3.23.8: version "3.23.8"