diff --git a/CopilotKit/.changeset/large-laws-reply.md b/CopilotKit/.changeset/large-laws-reply.md new file mode 100644 index 0000000000..c16de0a393 --- /dev/null +++ b/CopilotKit/.changeset/large-laws-reply.md @@ -0,0 +1,11 @@ +--- +"@copilotkit/react-core": patch +"@copilotkit/react-ui": patch +"@copilotkit/runtime-client-gql": patch +"@copilotkit/runtime": patch +"@copilotkit/shared": patch +--- + +- feat(interrupt): support LG interrupt with useLangGraphInterrupt hook +- chore(interrupt): add e2e test to interrupt functionality +- feat(interrupt): add support for multiple interrupts and conditions diff --git a/CopilotKit/packages/react-core/src/components/copilot-provider/copilotkit.tsx b/CopilotKit/packages/react-core/src/components/copilot-provider/copilotkit.tsx index 740f9ed27f..2931e10a3d 100644 --- a/CopilotKit/packages/react-core/src/components/copilot-provider/copilotkit.tsx +++ b/CopilotKit/packages/react-core/src/components/copilot-provider/copilotkit.tsx @@ -45,6 +45,10 @@ import { useCopilotRuntimeClient } from "../../hooks/use-copilot-runtime-client" import { shouldShowDevConsole } from "../../utils"; import { CopilotErrorBoundary } from "../error-boundary/error-boundary"; import { Agent, ExtensionsInput } from "@copilotkit/runtime-client-gql"; +import { + LangGraphInterruptAction, + LangGraphInterruptActionSetterArgs, +} from "../../types/interrupt-action"; export function CopilotKit({ children, ...props }: CopilotKitProps) { const showDevConsole = props.showDevConsole === undefined ? "auto" : props.showDevConsole; @@ -337,6 +341,24 @@ export function CopilotKitInternal(cpkProps: CopilotKitProps) { const showDevConsole = props.showDevConsole === undefined ? "auto" : props.showDevConsole; + const [langGraphInterruptAction, _setLangGraphInterruptAction] = + useState(null); + const setLangGraphInterruptAction = useCallback((action: LangGraphInterruptActionSetterArgs) => { + _setLangGraphInterruptAction((prev) => { + if (prev == null) return action as LangGraphInterruptAction; + if (action == null) return null; + let event = prev.event; + if (action.event) { + // @ts-ignore + event = { ...prev.event, ...action.event }; + } + return { ...prev, ...action, event }; + }); + }, []); + const removeLangGraphInterruptAction = useCallback((): void => { + setLangGraphInterruptAction(null); + }, []); + return ( {children} diff --git a/CopilotKit/packages/react-core/src/context/copilot-context.tsx b/CopilotKit/packages/react-core/src/context/copilot-context.tsx index a404cbf304..7e3836ab40 100644 --- a/CopilotKit/packages/react-core/src/context/copilot-context.tsx +++ b/CopilotKit/packages/react-core/src/context/copilot-context.tsx @@ -16,6 +16,10 @@ import { ForwardedParametersInput, } from "@copilotkit/runtime-client-gql"; import { Agent } from "@copilotkit/runtime-client-gql"; +import { + LangGraphInterruptAction, + LangGraphInterruptActionSetter, +} from "../types/interrupt-action"; /** * Interface for the configuration of the Copilot API. @@ -77,9 +81,8 @@ export interface CopilotApiConfig { credentials?: RequestCredentials; } -export type InChatRenderFunction = ( - props: ActionRenderProps | CatchAllActionRenderProps, -) => string | JSX.Element; +export type InChatRenderFunction | CatchAllActionRenderProps> = + (props: TProps) => string | JSX.Element; export type CoagentInChatRenderFunction = ( props: CoAgentStateRenderProps, ) => string | JSX.Element | undefined | null; @@ -200,6 +203,9 @@ export interface CopilotContextParams { extensions: ExtensionsInput; setExtensions: React.Dispatch>; + langGraphInterruptAction: LangGraphInterruptAction | null; + setLangGraphInterruptAction: LangGraphInterruptActionSetter; + removeLangGraphInterruptAction: () => void; } const emptyCopilotContext: CopilotContextParams = { @@ -263,6 +269,9 @@ const emptyCopilotContext: CopilotContextParams = { availableAgents: [], extensions: {}, setExtensions: () => {}, + langGraphInterruptAction: null, + setLangGraphInterruptAction: () => null, + removeLangGraphInterruptAction: () => null, }; export const CopilotContext = React.createContext(emptyCopilotContext); diff --git a/CopilotKit/packages/react-core/src/hooks/index.ts b/CopilotKit/packages/react-core/src/hooks/index.ts index 86d78abc84..901471a4a4 100644 --- a/CopilotKit/packages/react-core/src/hooks/index.ts +++ b/CopilotKit/packages/react-core/src/hooks/index.ts @@ -10,3 +10,5 @@ export { useCopilotReadable } from "./use-copilot-readable"; export { useCoAgent, type HintFunction, runAgent, startAgent, stopAgent } from "./use-coagent"; export { useCopilotRuntimeClient } from "./use-copilot-runtime-client"; export { useCopilotAuthenticatedAction_c } from "./use-copilot-authenticated-action"; +export { useLangGraphInterrupt } from "./use-langgraph-interrupt"; +export { useLangGraphInterruptRender } from "./use-langgraph-interrupt-render"; diff --git a/CopilotKit/packages/react-core/src/hooks/use-chat.ts b/CopilotKit/packages/react-core/src/hooks/use-chat.ts index 773617272b..307fe5d705 100644 --- a/CopilotKit/packages/react-core/src/hooks/use-chat.ts +++ b/CopilotKit/packages/react-core/src/hooks/use-chat.ts @@ -1,4 +1,4 @@ -import { useRef } from "react"; +import React, { useCallback, useRef } from "react"; import { FunctionCallHandler, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, @@ -21,6 +21,7 @@ import { loadMessagesFromJsonRepresentation, ExtensionsInput, CopilotRuntimeClient, + langGraphInterruptEvent, } from "@copilotkit/runtime-client-gql"; import { CopilotApiConfig } from "../context"; @@ -29,6 +30,11 @@ import { CoagentState } from "../types/coagent-state"; import { AgentSession } from "../context/copilot-context"; import { useCopilotRuntimeClient } from "./use-copilot-runtime-client"; import { useAsyncCallback, useErrorToast } from "../components/error-boundary/error-utils"; +import { + LangGraphInterruptAction, + LangGraphInterruptActionSetter, +} from "../types/interrupt-action"; +import { MetaEvent, MetaEventName } from "@copilotkit/runtime-client-gql"; export type UseChatOptions = { /** @@ -138,6 +144,10 @@ export type UseChatOptions = { * The setState-powered method to update the extensions. */ setExtensions: React.Dispatch>; + + langGraphInterruptAction: LangGraphInterruptAction | null; + + setLangGraphInterruptAction: LangGraphInterruptActionSetter; }; export type UseChatHelpers = { @@ -195,6 +205,8 @@ export function useChat(options: UseChatOptions): UseChatHelpers { agentLock, extensions, setExtensions, + langGraphInterruptAction, + setLangGraphInterruptAction, } = options; const runChatCompletionRef = useRef<(previousMessages: Message[]) => Promise>(); const addErrorToast = useErrorToast(); @@ -256,6 +268,7 @@ export function useChat(options: UseChatOptions): UseChatHelpers { threadId: threadId, runId: runIdRef.current, extensions: extensionsRef.current, + metaEvents: composeAndFlushMetaEventsInput([langGraphInterruptAction?.event]), messages: convertMessagesToGqlInput(filterAgentStateMessages(messagesWithContext)), ...(copilotConfig.cloud ? { @@ -344,6 +357,14 @@ export function useChat(options: UseChatOptions): UseChatHelpers { filterAdjacentAgentStateMessages(value.generateCopilotResponse.messages), ); + (value.generateCopilotResponse?.metaEvents ?? []).forEach((ev) => { + if (ev.name === "LangGraphInterruptEvent") { + setLangGraphInterruptAction({ + event: langGraphInterruptEvent(ev), + }); + } + }); + if (messages.length === 0) { continue; } @@ -608,6 +629,36 @@ export function useChat(options: UseChatOptions): UseChatHelpers { [messages], ); + // Go over all events and see that they include data that should be returned to the agent + const composeAndFlushMetaEventsInput = useCallback( + (metaEvents: (MetaEvent | undefined | null)[]) => { + return metaEvents.reduce((acc: MetaEvent[], event) => { + if (!event) return acc; + + switch (event.name) { + case MetaEventName.LangGraphInterruptEvent: + if (event.response) { + // Flush interrupt event from state + setLangGraphInterruptAction(null); + return [ + ...acc, + { + type: event.type, + name: event.name, + value: event.value, + response: event.response, + }, + ]; + } + return acc; + default: + return acc; + } + }, []); + }, + [setLangGraphInterruptAction], + ); + const append = useAsyncCallback( async (message: Message, options?: AppendMessageOptions): Promise => { if (isLoading) { diff --git a/CopilotKit/packages/react-core/src/hooks/use-copilot-chat.ts b/CopilotKit/packages/react-core/src/hooks/use-copilot-chat.ts index 2fc7efddb7..0edffa9597 100644 --- a/CopilotKit/packages/react-core/src/hooks/use-copilot-chat.ts +++ b/CopilotKit/packages/react-core/src/hooks/use-copilot-chat.ts @@ -112,6 +112,8 @@ export function useCopilotChat({ chatAbortControllerRef, extensions, setExtensions, + langGraphInterruptAction, + setLangGraphInterruptAction, } = useCopilotContext(); const { messages, setMessages } = useCopilotMessagesContext(); @@ -179,6 +181,8 @@ export function useCopilotChat({ agentLock, extensions, setExtensions, + langGraphInterruptAction, + setLangGraphInterruptAction, }); // this is a workaround born out of a bug that Athena incessantly ran into. diff --git a/CopilotKit/packages/react-core/src/hooks/use-langgraph-interrupt-render.ts b/CopilotKit/packages/react-core/src/hooks/use-langgraph-interrupt-render.ts new file mode 100644 index 0000000000..59e2c728d6 --- /dev/null +++ b/CopilotKit/packages/react-core/src/hooks/use-langgraph-interrupt-render.ts @@ -0,0 +1,63 @@ +import { useCopilotContext } from "../context"; +import React, { useCallback } from "react"; +import { executeConditions } from "@copilotkit/shared"; + +type InterruptProps = { + event: any; + result: any; + render: (props: { + event: any; + result: any; + resolve: (response: string) => void; + }) => string | React.ReactElement; + resolve: (response: string) => void; +}; + +const InterruptRenderer: React.FC = ({ event, result, render, resolve }) => { + return render({ event, result, resolve }); +}; + +export function useLangGraphInterruptRender(): string | React.ReactElement | null { + const { langGraphInterruptAction, setLangGraphInterruptAction } = useCopilotContext(); + + const responseRef = React.useRef(); + const resolveInterrupt = useCallback( + (response: string) => { + responseRef.current = response; + // Use setTimeout to defer the state update to next tick + setTimeout(() => { + setLangGraphInterruptAction({ event: { response } }); + }, 0); + }, + [setLangGraphInterruptAction], + ); + + if ( + !langGraphInterruptAction || + !langGraphInterruptAction.event || + !langGraphInterruptAction.render + ) + return null; + + const { render, handler, event, conditions } = langGraphInterruptAction; + + const conditionsMet = executeConditions({ conditions, value: event.value }); + if (!conditionsMet) { + return null; + } + + let result = null; + if (handler) { + result = handler({ + event, + resolve: resolveInterrupt, + }); + } + + return React.createElement(InterruptRenderer, { + event, + result, + render, + resolve: resolveInterrupt, + }); +} diff --git a/CopilotKit/packages/react-core/src/hooks/use-langgraph-interrupt.ts b/CopilotKit/packages/react-core/src/hooks/use-langgraph-interrupt.ts new file mode 100644 index 0000000000..1fcb17c10f --- /dev/null +++ b/CopilotKit/packages/react-core/src/hooks/use-langgraph-interrupt.ts @@ -0,0 +1,62 @@ +import { useContext, useEffect, useMemo } from "react"; +import { CopilotContext } from "../context/copilot-context"; +import { LangGraphInterruptRender } from "../types/interrupt-action"; +import { useCopilotChat } from "./use-copilot-chat"; +import { useToast } from "../components/toast/toast-provider"; +import { dataToUUID } from "@copilotkit/shared"; + +export function useLangGraphInterrupt( + action: Omit, + dependencies?: any[], +) { + const { setLangGraphInterruptAction, removeLangGraphInterruptAction, langGraphInterruptAction } = + useContext(CopilotContext); + const { runChatCompletion } = useCopilotChat(); + const { addToast } = useToast(); + + const actionId = dataToUUID(JSON.stringify(action), "lgAction"); + // We only consider action to be defined once the ID is there + const hasAction = useMemo( + () => Boolean(langGraphInterruptAction?.id), + [langGraphInterruptAction], + ); + + const isCurrentAction = useMemo( + () => langGraphInterruptAction?.id && langGraphInterruptAction?.id === actionId, + [langGraphInterruptAction], + ); + + // Run chat completion to submit a response event. Only if it's the current action + useEffect(() => { + if (hasAction && isCurrentAction && langGraphInterruptAction?.event?.response) { + runChatCompletion(); + } + }, [langGraphInterruptAction?.event?.response, runChatCompletion, hasAction, isCurrentAction]); + + useEffect(() => { + if (!action) return; + // console.log(2, { hasAction, isCurrentAction, conditions: action.conditions }) + // An action was already set, with no conditions and it's not the action we're using right now. + // Show a warning, as this action will not be executed + if (hasAction && !isCurrentAction && !action.conditions?.length) { + addToast({ + type: "warning", + message: "An action is already registered for the interrupt event", + }); + return; + } + + if (hasAction && isCurrentAction) { + return; + } + + setLangGraphInterruptAction({ ...action, id: actionId }); + }, [ + action, + hasAction, + isCurrentAction, + setLangGraphInterruptAction, + removeLangGraphInterruptAction, + ...(dependencies || []), + ]); +} diff --git a/CopilotKit/packages/react-core/src/types/interrupt-action.ts b/CopilotKit/packages/react-core/src/types/interrupt-action.ts new file mode 100644 index 0000000000..1160cb0a13 --- /dev/null +++ b/CopilotKit/packages/react-core/src/types/interrupt-action.ts @@ -0,0 +1,35 @@ +import { LangGraphInterruptEvent } from "@copilotkit/runtime-client-gql"; +import { Condition } from "@copilotkit/shared"; + +export interface LangGraphInterruptRender { + id: string; + /** + * The handler function to handle the event. + */ + handler?: (props: { + event: LangGraphInterruptEvent; + resolve: (resolution: string) => void; + }) => unknown | Promise; + /** + * The render function to handle the event. + */ + render?: (props: { + result: unknown; + event: LangGraphInterruptEvent; + resolve: (resolution: string) => void; + }) => string | React.ReactElement; + /** + * Conditions to render based on. + * Useful when using multiple interrupts + */ + conditions?: Condition[]; +} + +export type LangGraphInterruptAction = LangGraphInterruptRender & { + event?: LangGraphInterruptEvent; +}; + +export type LangGraphInterruptActionSetterArgs = + | (Partial & { event?: Partial }) + | null; +export type LangGraphInterruptActionSetter = (action: LangGraphInterruptActionSetterArgs) => void; diff --git a/CopilotKit/packages/react-ui/src/components/chat/Messages.tsx b/CopilotKit/packages/react-ui/src/components/chat/Messages.tsx index 8ca4cc8f53..f042e3a650 100644 --- a/CopilotKit/packages/react-ui/src/components/chat/Messages.tsx +++ b/CopilotKit/packages/react-ui/src/components/chat/Messages.tsx @@ -1,7 +1,8 @@ -import { useEffect, useMemo, useRef } from "react"; +import { useCallback, useEffect, useMemo, useRef } from "react"; import { MessagesProps } from "./props"; import { useChatContext } from "./ChatContext"; import { Message, ResultMessage, TextMessage, Role } from "@copilotkit/runtime-client-gql"; +import { useLangGraphInterruptRender } from "@copilotkit/react-core"; export const Messages = ({ messages, @@ -19,6 +20,7 @@ export const Messages = ({ () => makeInitialMessages(context.labels.initial), [context.labels.initial], ); + messages = [...initialMessages, ...messages]; const actionResults: Record = {}; @@ -38,6 +40,8 @@ export const Messages = ({ const { messagesEndRef, messagesContainerRef } = useScrollToBottom(messages); + const interrupt = useLangGraphInterruptRender(); + return (
{messages.map((message, index) => { @@ -94,6 +98,7 @@ export const Messages = ({ ); } })} + {interrupt}
{children}
); diff --git a/CopilotKit/packages/runtime-client-gql/src/client/conversion.ts b/CopilotKit/packages/runtime-client-gql/src/client/conversion.ts index f3bffec8e5..1061724fa3 100644 --- a/CopilotKit/packages/runtime-client-gql/src/client/conversion.ts +++ b/CopilotKit/packages/runtime-client-gql/src/client/conversion.ts @@ -204,8 +204,11 @@ export function loadMessagesFromJsonRepresentation(json: any[]): Message[] { function getPartialArguments(args: string[]) { try { + if (!args.length) return {}; + return JSON.parse(untruncateJson(args.join(""))); } catch (e) { + console.error(e); return {}; } } diff --git a/CopilotKit/packages/runtime-client-gql/src/client/types.ts b/CopilotKit/packages/runtime-client-gql/src/client/types.ts index d2a9c2becb..06f5814105 100644 --- a/CopilotKit/packages/runtime-client-gql/src/client/types.ts +++ b/CopilotKit/packages/runtime-client-gql/src/client/types.ts @@ -8,6 +8,8 @@ import { BaseMessageOutput, AgentStateMessageInput, MessageStatusCode, + LangGraphInterruptEvent, + MetaEventName, } from "../graphql/@generated/graphql"; type MessageType = "TextMessage" | "ActionExecutionMessage" | "ResultMessage" | "AgentStateMessage"; @@ -125,3 +127,11 @@ export class AgentStateMessage extends Message implements Omit, +): LangGraphInterruptEvent { + return { ...eventProps, name: MetaEventName.LangGraphInterruptEvent, type: "MetaEvent" }; +} + +export type MetaEvent = LangGraphInterruptEvent; diff --git a/CopilotKit/packages/runtime-client-gql/src/graphql/definitions/mutations.ts b/CopilotKit/packages/runtime-client-gql/src/graphql/definitions/mutations.ts index fb83424cf2..503ea57002 100644 --- a/CopilotKit/packages/runtime-client-gql/src/graphql/definitions/mutations.ts +++ b/CopilotKit/packages/runtime-client-gql/src/graphql/definitions/mutations.ts @@ -1,4 +1,5 @@ import { graphql } from "../@generated/gql"; +import { LangGraphInterruptEvent } from "@copilotkit/runtime/src/graphql/types/meta-events.type"; export const generateCopilotResponseMutation = graphql(/** GraphQL **/ ` mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) { @@ -68,6 +69,13 @@ export const generateCopilotResponseMutation = graphql(/** GraphQL **/ ` role } } + metaEvents @stream { + ... on LangGraphInterruptEvent { + type + name + value + } + } } } `); diff --git a/CopilotKit/packages/runtime/package.json b/CopilotKit/packages/runtime/package.json index 52c8a92a30..204d06c957 100644 --- a/CopilotKit/packages/runtime/package.json +++ b/CopilotKit/packages/runtime/package.json @@ -52,7 +52,7 @@ "@langchain/community": "^0.0.53", "@langchain/core": "^0.3.13", "@langchain/google-gauth": "^0.1.0", - "@langchain/langgraph-sdk": "^0.0.16", + "@langchain/langgraph-sdk": "^0.0.36", "@langchain/openai": "^0.0.28", "class-transformer": "^0.5.1", "express": "^4.19.2", diff --git a/CopilotKit/packages/runtime/src/agents/langgraph/event-source.ts b/CopilotKit/packages/runtime/src/agents/langgraph/event-source.ts index 18435871ed..b934865679 100644 --- a/CopilotKit/packages/runtime/src/agents/langgraph/event-source.ts +++ b/CopilotKit/packages/runtime/src/agents/langgraph/event-source.ts @@ -1,6 +1,10 @@ -import { ReplaySubject, scan, mergeMap, catchError } from "rxjs"; +import { catchError, mergeMap, ReplaySubject, scan } from "rxjs"; import { CustomEventNames, LangGraphEvent, LangGraphEventTypes } from "./events"; -import { RuntimeEvent, RuntimeEventTypes } from "../../service-adapters/events"; +import { + RuntimeEvent, + RuntimeEventTypes, + RuntimeMetaEventName, +} from "../../service-adapters/events"; import { randomId } from "@copilotkit/shared"; interface LangGraphEventWithState { @@ -125,6 +129,14 @@ export class RemoteLangGraphEventSource { } } + if (acc.event.event === LangGraphEventTypes.OnInterrupt) { + events.push({ + type: RuntimeEventTypes.MetaEvent, + name: RuntimeMetaEventName.LangGraphInterruptEvent, + value: acc.event.value, + }); + } + const responseMetadata = this.getResponseMetadata(acc.event); // Tool call ended: emit ActionExecutionEnd diff --git a/CopilotKit/packages/runtime/src/agents/langgraph/events.ts b/CopilotKit/packages/runtime/src/agents/langgraph/events.ts index 7121a04d8f..061cc148b9 100644 --- a/CopilotKit/packages/runtime/src/agents/langgraph/events.ts +++ b/CopilotKit/packages/runtime/src/agents/langgraph/events.ts @@ -11,6 +11,11 @@ export enum LangGraphEventTypes { OnCopilotKitEmitMessage = "on_copilotkit_emit_message", OnCopilotKitEmitToolCall = "on_copilotkit_emit_tool_call", OnCustomEvent = "on_custom_event", + OnInterrupt = "on_interrupt", +} + +export enum MetaEventNames { + LangGraphInterruptEvent = "LangGraphInterruptEvent", } export enum CustomEventNames { @@ -325,6 +330,11 @@ type LangGraphOnCustomEvent = { parent_ids: string[]; }; +interface LangGraphInterruptEvent { + event: LangGraphEventTypes.OnInterrupt; + value: string; +} + export type LangGraphEvent = | LangGraphOnChainStartEvent | LangGraphOnChainStreamEvent @@ -335,4 +345,5 @@ export type LangGraphEvent = | LangGraphOnToolStartEvent | LangGraphOnToolEndEvent | LangGraphOnCopilotKitStateSyncEvent - | LangGraphOnCustomEvent; + | LangGraphOnCustomEvent + | LangGraphInterruptEvent; diff --git a/CopilotKit/packages/runtime/src/graphql/inputs/generate-copilot-response.input.ts b/CopilotKit/packages/runtime/src/graphql/inputs/generate-copilot-response.input.ts index 92a783687f..3822b7e1e0 100644 --- a/CopilotKit/packages/runtime/src/graphql/inputs/generate-copilot-response.input.ts +++ b/CopilotKit/packages/runtime/src/graphql/inputs/generate-copilot-response.input.ts @@ -7,6 +7,7 @@ import { ForwardedParametersInput } from "./forwarded-parameters.input"; import { AgentSessionInput } from "./agent-session.input"; import { AgentStateInput } from "./agent-state.input"; import { ExtensionsInput } from "./extensions.input"; +import { MetaEventInput } from "./meta-event.input"; @InputType() export class GenerateCopilotResponseMetadataInput { @@ -48,4 +49,7 @@ export class GenerateCopilotResponseInput { @Field(() => ExtensionsInput, { nullable: true }) extensions?: ExtensionsInput; + + @Field(() => [MetaEventInput], { nullable: true }) + metaEvents?: MetaEventInput[]; } diff --git a/CopilotKit/packages/runtime/src/graphql/inputs/meta-event.input.ts b/CopilotKit/packages/runtime/src/graphql/inputs/meta-event.input.ts new file mode 100644 index 0000000000..11708f73fe --- /dev/null +++ b/CopilotKit/packages/runtime/src/graphql/inputs/meta-event.input.ts @@ -0,0 +1,17 @@ +import { Field, InputType } from "type-graphql"; +import { MetaEventName } from "../types/meta-events.type"; + +@InputType() +export class MetaEventInput { + @Field(() => String) + type: "MetaEvent" = "MetaEvent"; + + @Field(() => MetaEventName) + name: MetaEventName; + + @Field(() => String) + value?: string; + + @Field(() => String, { nullable: true }) + response?: string; +} diff --git a/CopilotKit/packages/runtime/src/graphql/resolvers/copilot.resolver.ts b/CopilotKit/packages/runtime/src/graphql/resolvers/copilot.resolver.ts index a7339914e0..b54b8eede2 100644 --- a/CopilotKit/packages/runtime/src/graphql/resolvers/copilot.resolver.ts +++ b/CopilotKit/packages/runtime/src/graphql/resolvers/copilot.resolver.ts @@ -14,10 +14,15 @@ import { } from "rxjs"; import { GenerateCopilotResponseInput } from "../inputs/generate-copilot-response.input"; import { CopilotResponse } from "../types/copilot-response.type"; +import { LangGraphInterruptEvent } from "../types/meta-events.type"; import { ActionInputAvailability, MessageRole } from "../types/enums"; import { Repeater } from "graphql-yoga"; import type { CopilotRequestContextProperties, GraphQLContext } from "../../lib/integrations"; -import { RuntimeEvent, RuntimeEventTypes } from "../../service-adapters/events"; +import { + RuntimeEvent, + RuntimeEventTypes, + RuntimeMetaEventName, +} from "../../service-adapters/events"; import { FailedMessageStatus, MessageStatusUnion, @@ -210,15 +215,74 @@ export class CopilotResolver { agentStates: data.agentStates, url: data.frontend.url, extensions: data.extensions, + metaEvents: data.metaEvents, }); logger.debug("Event source created, creating response"); + // run and process the event stream + const eventStream = eventSource + .processRuntimeEvents({ + serverSideActions, + guardrailsResult$: data.cloud?.guardrails ? guardrailsResult$ : null, + actionInputsWithoutAgents: actionInputsWithoutAgents.filter( + // TODO-AGENTS: do not exclude ALL server side actions + (action) => + !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name), + ), + threadId, + }) + .pipe( + // shareReplay() ensures that later subscribers will see the whole stream instead of + // just the events that were emitted after the subscriber was added. + shareReplay(), + finalize(() => { + logger.debug("Event stream finalized"); + }), + ); const response = { threadId, runId, status: firstValueFrom(responseStatus$), extensions, + metaEvents: new Repeater(async (push, stop) => { + let eventStreamSubscription: Subscription; + + eventStreamSubscription = eventStream.subscribe({ + next: async (event) => { + if (event.type != RuntimeEventTypes.MetaEvent) { + return; + } + switch (event.name) { + case RuntimeMetaEventName.LangGraphInterruptEvent: + push( + plainToInstance(LangGraphInterruptEvent, { + type: event.type, + name: event.name, + value: event.value, + }), + ); + break; + } + }, + error: (err) => { + logger.error({ err }, "Error in meta events stream"); + responseStatus$.next( + new UnknownErrorResponse({ + description: `An unknown error has occurred in the event stream`, + }), + ); + eventStreamSubscription?.unsubscribe(); + stop(); + }, + complete: async () => { + logger.debug("Meta events stream completed"); + responseStatus$.next(new SuccessResponseStatus()); + eventStreamSubscription?.unsubscribe(); + stop(); + }, + }); + }), messages: new Repeater(async (pushMessage, stopStreamingMessages) => { logger.debug("Messages repeater created"); @@ -275,32 +339,13 @@ export class CopilotResolver { let eventStreamSubscription: Subscription; - // run and process the event stream - const eventStream = eventSource - .processRuntimeEvents({ - serverSideActions, - guardrailsResult$: data.cloud?.guardrails ? guardrailsResult$ : null, - actionInputsWithoutAgents: actionInputsWithoutAgents.filter( - // TODO-AGENTS: do not exclude ALL server side actions - (action) => - !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name), - ), - threadId, - }) - .pipe( - // shareReplay() ensures that later subscribers will see the whole stream instead of - // just the events that were emitted after the subscriber was added. - shareReplay(), - finalize(() => { - logger.debug("Event stream finalized"); - }), - ); - logger.debug("Event stream created, subscribing to event stream"); eventStreamSubscription = eventStream.subscribe({ next: async (event) => { switch (event.type) { + case RuntimeEventTypes.MetaEvent: + break; //////////////////////////////// // TextMessageStart //////////////////////////////// diff --git a/CopilotKit/packages/runtime/src/graphql/types/copilot-response.type.ts b/CopilotKit/packages/runtime/src/graphql/types/copilot-response.type.ts index cc0da2f61d..df60034216 100644 --- a/CopilotKit/packages/runtime/src/graphql/types/copilot-response.type.ts +++ b/CopilotKit/packages/runtime/src/graphql/types/copilot-response.type.ts @@ -3,6 +3,7 @@ import { MessageRole } from "./enums"; import { MessageStatusUnion } from "./message-status.type"; import { ResponseStatusUnion } from "./response-status.type"; import { ExtensionsResponse } from "./extensions-response.type"; +import { BaseMetaEvent, LangGraphInterruptEvent, MetaEventName } from "./meta-events.type"; @InterfaceType({ resolveType(value) { @@ -14,6 +15,8 @@ import { ExtensionsResponse } from "./extensions-response.type"; return ResultMessageOutput; } else if (value.hasOwnProperty("state")) { return AgentStateMessageOutput; + } else if (value.name === MetaEventName.LangGraphInterruptEvent) { + return LangGraphInterruptEvent; } return undefined; }, @@ -114,4 +117,7 @@ export class CopilotResponse { @Field(() => ExtensionsResponse, { nullable: true }) extensions?: ExtensionsResponse; + + @Field(() => [BaseMetaEvent], { nullable: true }) + metaEvents?: (typeof BaseMetaEvent)[]; } diff --git a/CopilotKit/packages/runtime/src/graphql/types/meta-events.type.ts b/CopilotKit/packages/runtime/src/graphql/types/meta-events.type.ts new file mode 100644 index 0000000000..fa769ab004 --- /dev/null +++ b/CopilotKit/packages/runtime/src/graphql/types/meta-events.type.ts @@ -0,0 +1,31 @@ +import { Field, InterfaceType, ObjectType, registerEnumType } from "type-graphql"; + +export enum MetaEventName { + LangGraphInterruptEvent = "LangGraphInterruptEvent", +} + +registerEnumType(MetaEventName, { + name: "MetaEventName", + description: "Meta event types", +}); + +@InterfaceType() +export abstract class BaseMetaEvent { + @Field(() => String) + type: "MetaEvent" = "MetaEvent"; + + @Field(() => MetaEventName) + name: MetaEventName; +} + +@ObjectType({ implements: BaseMetaEvent }) +export class LangGraphInterruptEvent { + @Field(() => MetaEventName) + name: MetaEventName.LangGraphInterruptEvent = MetaEventName.LangGraphInterruptEvent; + + @Field(() => String) + value: string; + + @Field(() => String, { nullable: true }) + response?: string; +} diff --git a/CopilotKit/packages/runtime/src/lib/runtime/copilot-runtime.ts b/CopilotKit/packages/runtime/src/lib/runtime/copilot-runtime.ts index 57a09f754b..260436aebd 100644 --- a/CopilotKit/packages/runtime/src/lib/runtime/copilot-runtime.ts +++ b/CopilotKit/packages/runtime/src/lib/runtime/copilot-runtime.ts @@ -60,6 +60,7 @@ import { ExtensionsResponse } from "../../graphql/types/extensions-response.type import { LoadAgentStateResponse } from "../../graphql/types/load-agent-state-response.type"; import { Client as LangGraphClient } from "@langchain/langgraph-sdk"; import { langchainMessagesToCopilotKit } from "./remote-lg-action"; +import { MetaEventInput } from "../../graphql/inputs/meta-event.input"; interface CopilotRuntimeRequest { serviceAdapter: CopilotServiceAdapter; @@ -75,6 +76,7 @@ interface CopilotRuntimeRequest { forwardedParameters?: ForwardedParametersInput; url?: string; extensions?: ExtensionsInput; + metaEvents?: MetaEventInput[]; } interface CopilotRuntimeResponse { @@ -465,6 +467,7 @@ please use an LLM adapter instead.`, graphqlContext, agentSession, threadId: threadIdFromRequest, + metaEvents, } = request; const { agentName, nodeName } = agentSession; @@ -509,6 +512,7 @@ please use an LLM adapter instead.`, threadId, nodeName, actionInputsWithoutAgents, + metaEvents, }); eventSource.stream(async (eventStream$) => { diff --git a/CopilotKit/packages/runtime/src/lib/runtime/remote-action-constructors.ts b/CopilotKit/packages/runtime/src/lib/runtime/remote-action-constructors.ts index 760ede5ca4..d42136b513 100644 --- a/CopilotKit/packages/runtime/src/lib/runtime/remote-action-constructors.ts +++ b/CopilotKit/packages/runtime/src/lib/runtime/remote-action-constructors.ts @@ -42,6 +42,7 @@ export function constructLGCRemoteAction({ threadId, nodeName, additionalMessages = [], + metaEvents, }: LangGraphAgentHandlerParams): Promise> => { logger.debug({ actionName: agent.name }, "Executing LangGraph Platform agent"); @@ -62,7 +63,7 @@ export function constructLGCRemoteAction({ try { const response = await execute({ - logger, + logger: logger.child({ component: "remote-actions.remote-lg-action.streamEvents" }), deploymentUrl: endpoint.deploymentUrl, langsmithApiKey: endpoint.langsmithApiKey, agent, @@ -76,6 +77,7 @@ export function constructLGCRemoteAction({ description: action.description, parameters: JSON.parse(action.jsonSchema) as string, })), + metaEvents, }); const eventSource = new RemoteLangGraphEventSource(); @@ -174,6 +176,7 @@ export function constructRemoteActions({ threadId, nodeName, additionalMessages = [], + metaEvents, }: LangGraphAgentHandlerParams): Promise> => { logger.debug({ actionName: agent.name }, "Executing remote agent"); @@ -209,6 +212,7 @@ export function constructRemoteActions({ description: action.description, parameters: JSON.parse(action.jsonSchema), })), + metaEvents, }), }); diff --git a/CopilotKit/packages/runtime/src/lib/runtime/remote-actions.ts b/CopilotKit/packages/runtime/src/lib/runtime/remote-actions.ts index 6ccd1311d2..bb114a8fb3 100644 --- a/CopilotKit/packages/runtime/src/lib/runtime/remote-actions.ts +++ b/CopilotKit/packages/runtime/src/lib/runtime/remote-actions.ts @@ -16,6 +16,7 @@ import { ResolvedCopilotKitError, CopilotKitError, } from "@copilotkit/shared"; +import { MetaEventInput } from "../../graphql/inputs/meta-event.input"; export type EndpointDefinition = CopilotKitEndpoint | LangGraphPlatformEndpoint; @@ -59,6 +60,7 @@ export type LangGraphAgentHandlerParams = { threadId?: string; nodeName?: string; additionalMessages?: Message[]; + metaEvents?: MetaEventInput[]; }; export type LangGraphAgentAction = Action & { diff --git a/CopilotKit/packages/runtime/src/lib/runtime/remote-lg-action.ts b/CopilotKit/packages/runtime/src/lib/runtime/remote-lg-action.ts index 4dd05d2111..e28ca35906 100644 --- a/CopilotKit/packages/runtime/src/lib/runtime/remote-lg-action.ts +++ b/CopilotKit/packages/runtime/src/lib/runtime/remote-lg-action.ts @@ -1,6 +1,6 @@ import { Client as LangGraphClient } from "@langchain/langgraph-sdk"; import { createHash } from "node:crypto"; -import { randomUUID, isValidUUID } from "@copilotkit/shared"; +import { isValidUUID, randomUUID } from "@copilotkit/shared"; import { parse as parsePartialJson } from "partial-json"; import { Logger } from "pino"; import { ActionInput } from "../../graphql/inputs/action.input"; @@ -10,6 +10,9 @@ import { ActionExecutionMessage, Message, MessageType } from "../../graphql/type import { MessageRole } from "../../graphql/types/enums"; import { CustomEventNames, LangGraphEventTypes } from "../../agents/langgraph/events"; import telemetry from "../telemetry-client"; +import { MetaEventInput } from "../../graphql/inputs/meta-event.input"; +import { MetaEventName } from "../../graphql/types/meta-events.type"; +import { RunsStreamPayload } from "@langchain/langgraph-sdk/dist/types"; type State = Record; @@ -24,6 +27,7 @@ interface ExecutionArgs extends Omit { properties: CopilotRequestContextProperties; actions: ExecutionAction[]; logger: Logger; + metaEvents?: MetaEventInput[]; } // The following types are our own definition to the messages accepted by LangGraph Platform, enhanced with some of our extra data. @@ -85,6 +89,7 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E actions, logger, properties, + metaEvents, } = args; let nodeName = initialNodeName; @@ -139,7 +144,11 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E } state = langGraphDefaultMergeState(state, formattedMessages, actions, name); - if (mode === "continue") { + const lgInterruptEvent = metaEvents?.find( + (ev) => ev.name === MetaEventName.LangGraphInterruptEvent, + ); + + if (mode === "continue" && !lgInterruptEvent) { await client.threads.updateState(threadId, { values: state, asNode: nodeName }); } @@ -180,10 +189,16 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E let shouldExit = false; let externalRunId = null; - const streamResponse = client.runs.stream(threadId, assistantId, { + const payload: RunsStreamPayload = { input: streamInput, - streamMode: ["events", "values"], - }); + streamMode: ["events", "values", "updates"], + command: undefined, + }; + + if (lgInterruptEvent?.response) { + payload.command = { resume: lgInterruptEvent.response }; + } + const streamResponse = client.runs.stream(threadId, assistantId, payload); const emit = (message: string) => controller.enqueue(new TextEncoder().encode(message)); @@ -198,12 +213,23 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E hashedLgcKey: streamInfo.hashedLgcKey, }); for await (const chunk of streamResponse) { - if (!["events", "values", "error"].includes(chunk.event)) continue; + if (!["events", "values", "error", "updates"].includes(chunk.event)) continue; if (chunk.event === "error") { throw new Error(`Error event thrown: ${chunk.data.message}`); } + if (chunk.event === "updates" && chunk.data.__interrupt__) { + emit( + JSON.stringify({ + event: LangGraphEventTypes.OnInterrupt, + value: chunk.data.__interrupt__[0].value, + }) + "\n", + ); + continue; + } + if (chunk.event === "updates") continue; + if (chunk.event === "values") { latestStateValues = chunk.data; continue; @@ -326,8 +352,9 @@ async function streamEvents(controller: ReadableStreamDefaultController, args: E } state = await client.threads.getState(threadId); - const isEndNode = state.next.length === 0; - nodeName = Object.keys(state.metadata.writes)[0]; + const interrupts = state.tasks?.[0]?.interrupts; + nodeName = interrupts ? nodeName : Object.keys(state.metadata.writes)[0]; + const isEndNode = state.next.length === 0 && !interrupts; telemetry.capture("oss.runtime.agent_execution_stream_ended", streamInfo); diff --git a/CopilotKit/packages/runtime/src/service-adapters/events.ts b/CopilotKit/packages/runtime/src/service-adapters/events.ts index d7300ed5d7..d23a15ec22 100644 --- a/CopilotKit/packages/runtime/src/service-adapters/events.ts +++ b/CopilotKit/packages/runtime/src/service-adapters/events.ts @@ -28,8 +28,26 @@ export enum RuntimeEventTypes { ActionExecutionEnd = "ActionExecutionEnd", ActionExecutionResult = "ActionExecutionResult", AgentStateMessage = "AgentStateMessage", + MetaEvent = "MetaEvent", } +export enum RuntimeMetaEventName { + LangGraphInterruptEvent = "LangGraphInterruptEvent", + LangGraphInterruptResumeEvent = "LangGraphInterruptResumeEvent", +} + +export type RunTimeMetaEvent = + | { + type: RuntimeEventTypes.MetaEvent; + name: RuntimeMetaEventName.LangGraphInterruptEvent; + value: string; + } + | { + type: RuntimeEventTypes.MetaEvent; + name: RuntimeMetaEventName.LangGraphInterruptResumeEvent; + value: string; + }; + export type RuntimeEvent = | { type: RuntimeEventTypes.TextMessageStart; messageId: string; parentMessageId?: string } | { @@ -62,7 +80,8 @@ export type RuntimeEvent = role: string; state: string; running: boolean; - }; + } + | RunTimeMetaEvent; interface RuntimeEventWithState { event: RuntimeEvent | null; diff --git a/CopilotKit/packages/shared/src/types/utility.ts b/CopilotKit/packages/shared/src/types/utility.ts index ce7e0b4127..5ec32a9bee 100644 --- a/CopilotKit/packages/shared/src/types/utility.ts +++ b/CopilotKit/packages/shared/src/types/utility.ts @@ -1 +1,2 @@ export type PartialBy = Omit & Partial>; +export type RequiredBy = T & { [P in K]-?: T[P] }; diff --git a/CopilotKit/packages/shared/src/utils/conditions.ts b/CopilotKit/packages/shared/src/utils/conditions.ts new file mode 100644 index 0000000000..4976541554 --- /dev/null +++ b/CopilotKit/packages/shared/src/utils/conditions.ts @@ -0,0 +1,98 @@ +export type ComparisonRule = + | "EQUALS" + | "NOT_EQUALS" + | "GREATER_THAN" + | "LESS_THAN" + | "CONTAINS" + | "NOT_CONTAINS" + | "MATCHES" + | "STARTS_WITH" + | "ENDS_WITH"; +export type LogicalRule = "AND" | "OR" | "NOT"; +export type ExistenceRule = "EXISTS" | "NOT_EXISTS"; + +export type Rule = ComparisonRule | LogicalRule | ExistenceRule; + +export interface BaseCondition { + rule: Rule; + path?: string; +} + +export interface ComparisonCondition extends BaseCondition { + rule: ComparisonRule; + value: any; +} + +export interface LogicalCondition extends BaseCondition { + rule: LogicalRule; + conditions: Condition[]; +} + +export interface ExistenceCondition extends BaseCondition { + rule: ExistenceRule; +} + +export type Condition = ComparisonCondition | LogicalCondition | ExistenceCondition; + +export function executeConditions({ + conditions, + value, +}: { + conditions?: Condition[]; + value: any; +}): boolean { + // If no conditions, consider it a pass + if (!conditions?.length) return true; + + // Run all conditions (implicit AND) + return conditions.every((condition) => executeCondition(condition, value)); +} + +function executeCondition(condition: Condition, value: any): boolean { + const targetValue = condition.path ? getValueFromPath(value, condition.path) : value; + + switch (condition.rule) { + // Logical + case "AND": + return (condition as LogicalCondition).conditions.every((c) => executeCondition(c, value)); + case "OR": + return (condition as LogicalCondition).conditions.some((c) => executeCondition(c, value)); + case "NOT": + return !(condition as LogicalCondition).conditions.every((c) => executeCondition(c, value)); + + // Comparison + case "EQUALS": + return targetValue === (condition as ComparisonCondition).value; + case "NOT_EQUALS": + return targetValue !== (condition as ComparisonCondition).value; + case "GREATER_THAN": + return targetValue > (condition as ComparisonCondition).value; + case "LESS_THAN": + return targetValue < (condition as ComparisonCondition).value; + case "CONTAINS": + return ( + Array.isArray(targetValue) && targetValue.includes((condition as ComparisonCondition).value) + ); + case "NOT_CONTAINS": + return ( + Array.isArray(targetValue) && + !targetValue.includes((condition as ComparisonCondition).value) + ); + case "MATCHES": + return new RegExp((condition as ComparisonCondition).value).test(String(targetValue)); + case "STARTS_WITH": + return String(targetValue).startsWith((condition as ComparisonCondition).value); + case "ENDS_WITH": + return String(targetValue).endsWith((condition as ComparisonCondition).value); + + // Existence + case "EXISTS": + return targetValue !== undefined && targetValue !== null; + case "NOT_EXISTS": + return targetValue === undefined || targetValue === null; + } +} + +function getValueFromPath(obj: any, path: string): any { + return path.split(".").reduce((acc, part) => acc?.[part], obj); +} diff --git a/CopilotKit/packages/shared/src/utils/index.ts b/CopilotKit/packages/shared/src/utils/index.ts index e6c8fdc473..e49c45a69f 100644 --- a/CopilotKit/packages/shared/src/utils/index.ts +++ b/CopilotKit/packages/shared/src/utils/index.ts @@ -1,3 +1,4 @@ +export * from "./conditions"; export * from "./errors"; export * from "./json-schema"; export * from "./random-id"; diff --git a/CopilotKit/packages/shared/src/utils/random-id.ts b/CopilotKit/packages/shared/src/utils/random-id.ts index 7e9957755d..3a917155ae 100644 --- a/CopilotKit/packages/shared/src/utils/random-id.ts +++ b/CopilotKit/packages/shared/src/utils/random-id.ts @@ -1,4 +1,4 @@ -import { v4 as uuidv4, validate } from "uuid"; +import { v4 as uuidv4, validate, v5 as uuidv5 } from "uuid"; export function randomId() { return "ck-" + uuidv4(); @@ -8,6 +8,13 @@ export function randomUUID() { return uuidv4(); } +export function dataToUUID(input: string, namespace?: string): string { + const BASE_NAMESPACE = "e4b01160-ff74-4c6e-9b27-d53cd930fe8e"; + // Since namespace needs to be a uuid, we are creating a uuid for it. + const boundNamespace = namespace ? uuidv5(namespace, BASE_NAMESPACE) : BASE_NAMESPACE; + return uuidv5(input, boundNamespace); +} + export function isValidUUID(uuid: string) { return validate(uuid); } diff --git a/CopilotKit/pnpm-lock.yaml b/CopilotKit/pnpm-lock.yaml index baf169d8be..72fd6e0de2 100644 --- a/CopilotKit/pnpm-lock.yaml +++ b/CopilotKit/pnpm-lock.yaml @@ -37,7 +37,7 @@ importers: version: 0.1.13(prettier@3.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4) turbo: specifier: ^2.0.6 version: 2.0.9 @@ -149,7 +149,7 @@ importers: version: link:../../utilities/tailwind-config tailwindcss: specifier: ^3.2.4 - version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4)) + version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4)) tsconfig: specifier: workspace:* version: link:../../utilities/tsconfig @@ -240,7 +240,7 @@ importers: version: link:../../utilities/tailwind-config tailwindcss: specifier: ^3.2.4 - version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4)) + version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4)) tsconfig: specifier: workspace:* version: link:../../utilities/tsconfig @@ -354,19 +354,19 @@ importers: version: link:../../utilities/eslint-config-custom jest: specifier: ^29.6.4 - version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) react: specifier: ^18.2.0 version: 18.3.1 ts-jest: specifier: ^29.1.1 - version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) + version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.17.19)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) tsconfig: specifier: workspace:* version: link:../../utilities/tsconfig tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.5.28)(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) + version: 6.7.0(@swc/core@1.5.28(@swc/helpers@0.5.13))(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) typescript: specifier: ^5.2.3 version: 5.5.4 @@ -463,7 +463,7 @@ importers: version: link:../../utilities/eslint-config-custom jest: specifier: ^29.6.4 - version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) postcss: specifier: ^8.4.20 version: 8.4.40 @@ -478,16 +478,16 @@ importers: version: link:../../utilities/tailwind-config tailwindcss: specifier: ^3.3.0 - version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) ts-jest: specifier: ^29.1.1 - version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) + version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) tsconfig: specifier: workspace:* version: link:../../utilities/tsconfig tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.5.28)(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) + version: 6.7.0(@swc/core@1.5.28(@swc/helpers@0.5.13))(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) typescript: specifier: ^5.2.3 version: 5.5.4 @@ -536,7 +536,7 @@ importers: version: link:../../utilities/eslint-config-custom jest: specifier: ^29.6.4 - version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) postcss: specifier: ^8.4.20 version: 8.4.40 @@ -548,16 +548,16 @@ importers: version: link:../../utilities/tailwind-config tailwindcss: specifier: ^3.3.0 - version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) ts-jest: specifier: ^29.1.1 - version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) + version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) tsconfig: specifier: workspace:* version: link:../../utilities/tsconfig tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.5.28)(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) + version: 6.7.0(@swc/core@1.5.28(@swc/helpers@0.5.13))(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) typescript: specifier: ^5.2.3 version: 5.5.4 @@ -583,8 +583,8 @@ importers: specifier: ^0.1.0 version: 0.1.0(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(zod@3.23.8) '@langchain/langgraph-sdk': - specifier: ^0.0.16 - version: 0.0.16 + specifier: ^0.0.36 + version: 0.0.36 '@langchain/openai': specifier: ^0.0.28 version: 0.0.28(encoding@0.1.13)(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(zod@3.23.8))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13))) @@ -739,16 +739,16 @@ importers: version: 16.9.0 jest: specifier: ^29.6.4 - version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) ts-jest: specifier: ^29.1.1 - version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) + version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4) + version: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4) tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.5.28)(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) + version: 6.7.0(@swc/core@1.5.28(@swc/helpers@0.5.13))(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) typescript: specifier: ^5.4.5 version: 5.5.4 @@ -760,19 +760,19 @@ importers: version: link:../shared '@langchain/community': specifier: ^0.0.53 - version: 0.0.53(google-auth-library@8.9.0)(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(lodash@4.17.21)(openai@4.68.2(zod@3.23.8))(ws@8.18.0) + version: 0.0.53(encoding@0.1.13)(google-auth-library@8.9.0(encoding@0.1.13))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(lodash@4.17.21)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))(ws@8.18.0) '@langchain/core': specifier: ^0.3.13 - version: 0.3.13(openai@4.68.2(zod@3.23.8)) + version: 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) '@langchain/langgraph': specifier: ^0.2.22 - version: 0.2.22(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))) + version: 0.2.22(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))) '@langchain/langgraph-sdk': specifier: ^0.0.16 version: 0.0.16 langchain: specifier: ^0.3.3 - version: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)) + version: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) zod: specifier: ^3.23.3 version: 3.23.8 @@ -858,16 +858,16 @@ importers: version: link:../../utilities/eslint-config-custom jest: specifier: ^29.6.4 - version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + version: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) ts-jest: specifier: ^29.1.1 - version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.17.19)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) + version: 29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4) tsconfig: specifier: workspace:* version: link:../../utilities/tsconfig tsup: specifier: ^6.7.0 - version: 6.7.0(@swc/core@1.5.28)(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) + version: 6.7.0(@swc/core@1.5.28(@swc/helpers@0.5.13))(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4) typescript: specifier: ^5.2.3 version: 5.5.4 @@ -891,7 +891,7 @@ importers: devDependencies: tailwindcss: specifier: ^3.2.4 - version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4)) + version: 3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) utilities/tsconfig: {} @@ -2567,8 +2567,8 @@ packages: '@langchain/langgraph-sdk@0.0.16': resolution: {integrity: sha512-qbpImYeuDjRGZRno5HTaSbBQYa42wAI1Eeb3tZ+y5ek1rZxArqnyKCX8FH7Eje8NneSZWsGGZsudnOD6NXVwvA==} - '@langchain/langgraph-sdk@0.0.26': - resolution: {integrity: sha512-zlObXIuYMBpV55ENiUc+gcwf3LVaJEd/GbDvVALVbFGU0nf/wsr21Jowf+RkjFxMGvFLR6QRDZ7C/NJAlcUAUA==} + '@langchain/langgraph-sdk@0.0.36': + resolution: {integrity: sha512-KkAZM0uXBaMcD/dpGTBppOhbvNX6gz+Y1zFAC898OblegFkSvICrkd0oRQ5Ro/GWK/NAoDymnMUDXeZDdUkSuw==} '@langchain/langgraph@0.0.12': resolution: {integrity: sha512-f1N5eV3w7Y59P3rSjgNmjYoqghAPuxRUQTKX922OOhwYT0vmPVlmi99aduRHXK1oJDA3tVQCqrUkDV6D154Pnw==} @@ -8860,7 +8860,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.5(supports-color@5.5.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -9465,7 +9465,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.5 + debug: 4.3.5(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -9612,7 +9612,7 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))': + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -9626,7 +9626,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -9801,10 +9801,10 @@ snapshots: transitivePeerDependencies: - encoding - '@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))': + '@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13)': dependencies: '@anthropic-ai/sdk': 0.27.3(encoding@0.1.13) - '@langchain/core': 0.3.13(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) fast-xml-parser: 4.5.0 zod: 3.23.8 zod-to-json-schema: 3.23.5(zod@3.23.8) @@ -9850,13 +9850,13 @@ snapshots: - langchain - openai - '@langchain/community@0.0.53(google-auth-library@8.9.0)(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(lodash@4.17.21)(openai@4.68.2(zod@3.23.8))(ws@8.18.0)': + '@langchain/community@0.0.53(encoding@0.1.13)(google-auth-library@8.9.0(encoding@0.1.13))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(lodash@4.17.21)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))(ws@8.18.0)': dependencies: - '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)) - '@langchain/openai': 0.0.28(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8))) + '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) + '@langchain/openai': 0.0.28(encoding@0.1.13)(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))) expr-eval: 2.0.2 flat: 5.0.2 - langsmith: 0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)) + langsmith: 0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) uuid: 9.0.1 zod: 3.23.8 zod-to-json-schema: 3.23.5(zod@3.23.8) @@ -9905,13 +9905,13 @@ snapshots: - langchain - openai - '@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0)': + '@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.53.0(encoding@0.1.13))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0) + langsmith: 0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.53.0(encoding@0.1.13)) ml-distance: 4.0.1 mustache: 4.2.0 p-queue: 6.6.2 @@ -9923,13 +9923,13 @@ snapshots: - langchain - openai - '@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8))': + '@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)) + langsmith: 0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) ml-distance: 4.0.1 mustache: 4.2.0 p-queue: 6.6.2 @@ -9957,13 +9957,13 @@ snapshots: transitivePeerDependencies: - openai - '@langchain/core@0.2.36(openai@4.68.2(zod@3.23.8))': + '@langchain/core@0.2.36(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.1.66(openai@4.68.2(zod@3.23.8)) + langsmith: 0.1.66(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -9989,13 +9989,13 @@ snapshots: transitivePeerDependencies: - openai - '@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))': + '@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.15 - langsmith: 0.1.66(openai@4.68.2(zod@3.23.8)) + langsmith: 0.1.66(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -10032,18 +10032,18 @@ snapshots: - zod optional: true - '@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8)': + '@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8)': dependencies: '@google/generative-ai': 0.7.1 - '@langchain/core': 0.3.13(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) zod-to-json-schema: 3.23.5(zod@3.23.8) transitivePeerDependencies: - zod optional: true - '@langchain/langgraph-checkpoint@0.0.12(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))': + '@langchain/langgraph-checkpoint@0.0.12(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))': dependencies: - '@langchain/core': 0.3.13(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) uuid: 10.0.0 '@langchain/langgraph-sdk@0.0.16': @@ -10053,7 +10053,7 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 - '@langchain/langgraph-sdk@0.0.26': + '@langchain/langgraph-sdk@0.0.36': dependencies: '@types/json-schema': 7.0.15 p-queue: 6.6.2 @@ -10074,11 +10074,11 @@ snapshots: - langchain - openai - '@langchain/langgraph@0.2.22(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))': + '@langchain/langgraph@0.2.22(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))': dependencies: - '@langchain/core': 0.3.13(openai@4.68.2(zod@3.23.8)) - '@langchain/langgraph-checkpoint': 0.0.12(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))) - '@langchain/langgraph-sdk': 0.0.26 + '@langchain/core': 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) + '@langchain/langgraph-checkpoint': 0.0.12(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))) + '@langchain/langgraph-sdk': 0.0.36 uuid: 10.0.0 zod: 3.23.8 @@ -10104,9 +10104,9 @@ snapshots: - encoding - langchain - '@langchain/openai@0.0.28(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))': + '@langchain/openai@0.0.28(encoding@0.1.13)(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))': dependencies: - '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0) + '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.53.0(encoding@0.1.13)) js-tiktoken: 1.0.12 openai: 4.53.0(encoding@0.1.13) zod: 3.23.8 @@ -10125,9 +10125,9 @@ snapshots: transitivePeerDependencies: - encoding - '@langchain/openai@0.3.11(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))': + '@langchain/openai@0.3.11(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13)': dependencies: - '@langchain/core': 0.3.13(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) js-tiktoken: 1.0.15 openai: 4.68.2(encoding@0.1.13)(zod@3.23.8) zod: 3.23.8 @@ -10142,9 +10142,9 @@ snapshots: transitivePeerDependencies: - openai - '@langchain/textsplitters@0.0.3(openai@4.68.2(zod@3.23.8))': + '@langchain/textsplitters@0.0.3(openai@4.68.2(encoding@0.1.13)(zod@3.23.8))': dependencies: - '@langchain/core': 0.2.36(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.2.36(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) js-tiktoken: 1.0.12 transitivePeerDependencies: - openai @@ -10780,23 +10780,6 @@ snapshots: '@swc/core-win32-x64-msvc@1.5.28': optional: true - '@swc/core@1.5.28': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.12 - optionalDependencies: - '@swc/core-darwin-arm64': 1.5.28 - '@swc/core-darwin-x64': 1.5.28 - '@swc/core-linux-arm-gnueabihf': 1.5.28 - '@swc/core-linux-arm64-gnu': 1.5.28 - '@swc/core-linux-arm64-musl': 1.5.28 - '@swc/core-linux-x64-gnu': 1.5.28 - '@swc/core-linux-x64-musl': 1.5.28 - '@swc/core-win32-arm64-msvc': 1.5.28 - '@swc/core-win32-ia32-msvc': 1.5.28 - '@swc/core-win32-x64-msvc': 1.5.28 - optional: true - '@swc/core@1.5.28(@swc/helpers@0.5.13)': dependencies: '@swc/counter': 0.1.3 @@ -11852,13 +11835,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + create-jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -11935,10 +11918,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.5: - dependencies: - ms: 2.1.2 - debug@4.3.5(supports-color@5.5.0): dependencies: ms: 2.1.2 @@ -12298,8 +12277,8 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.33.2(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -12345,13 +12324,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 4.3.5(supports-color@5.5.0) enhanced-resolve: 5.17.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.0 @@ -12390,14 +12369,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -12412,7 +12391,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -12422,7 +12401,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -12582,7 +12561,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.5 + debug: 4.3.5(supports-color@5.5.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -13570,16 +13549,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + jest-cli@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + create-jest: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + jest-config: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -13651,7 +13630,7 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + jest-config@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: '@babel/core': 7.24.9 '@jest/test-sequencer': 29.7.0 @@ -13677,7 +13656,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.14.12 - ts-node: 10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -13909,12 +13888,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + jest-cli: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -14125,15 +14104,15 @@ snapshots: - encoding - openai - langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)): + langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)): dependencies: - '@langchain/core': 0.3.13(openai@4.68.2(zod@3.23.8)) - '@langchain/openai': 0.3.11(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))) - '@langchain/textsplitters': 0.0.3(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) + '@langchain/openai': 0.3.11(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13) + '@langchain/textsplitters': 0.0.3(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) js-tiktoken: 1.0.15 js-yaml: 4.1.0 jsonpointer: 5.0.1 - langsmith: 0.1.66(openai@4.68.2(zod@3.23.8)) + langsmith: 0.1.66(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) openapi-types: 12.1.3 p-retry: 4.6.2 uuid: 10.0.0 @@ -14141,8 +14120,8 @@ snapshots: zod: 3.23.8 zod-to-json-schema: 3.23.5(zod@3.23.8) optionalDependencies: - '@langchain/anthropic': 0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))) - '@langchain/google-genai': 0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8) + '@langchain/anthropic': 0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13) + '@langchain/google-genai': 0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8) transitivePeerDependencies: - encoding - openai @@ -14173,7 +14152,7 @@ snapshots: langchain: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.53.0(encoding@0.1.13)))(zod@3.23.8))(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)) openai: 4.53.0(encoding@0.1.13) - langsmith@0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0): + langsmith@0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.53.0(encoding@0.1.13)): dependencies: '@types/uuid': 9.0.8 commander: 10.0.1 @@ -14181,11 +14160,11 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.53.0) - langchain: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) + langchain: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) openai: 4.53.0(encoding@0.1.13) - langsmith@0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)): + langsmith@0.1.39(@langchain/core@0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)): dependencies: '@types/uuid': 9.0.8 commander: 10.0.1 @@ -14193,8 +14172,8 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)))(openai@4.68.2(zod@3.23.8)) - langchain: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8))))(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(zod@3.23.8)))(zod@3.23.8))(openai@4.68.2(zod@3.23.8)) + '@langchain/core': 0.1.63(langchain@0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) + langchain: 0.3.3(@langchain/anthropic@0.3.5(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(encoding@0.1.13))(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(@langchain/google-genai@0.1.0(@langchain/core@0.3.13(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)))(zod@3.23.8))(encoding@0.1.13)(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)) openai: 4.68.2(encoding@0.1.13)(zod@3.23.8) langsmith@0.1.66(openai@4.53.0(encoding@0.1.13)): @@ -14208,7 +14187,7 @@ snapshots: optionalDependencies: openai: 4.53.0(encoding@0.1.13) - langsmith@0.1.66(openai@4.68.2(zod@3.23.8)): + langsmith@0.1.66(openai@4.68.2(encoding@0.1.13)(zod@3.23.8)): dependencies: '@types/uuid': 10.0.0 commander: 10.0.1 @@ -15177,15 +15156,15 @@ snapshots: postcss: 8.4.40 ts-node: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4) - postcss-load-config@3.1.4(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + postcss-load-config@3.1.4(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: lilconfig: 2.1.0 yaml: 1.10.2 optionalDependencies: postcss: 8.4.40 - ts-node: 10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4) - postcss-load-config@4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4)): + postcss-load-config@4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4)): dependencies: lilconfig: 3.1.2 yaml: 2.5.0 @@ -15193,13 +15172,13 @@ snapshots: postcss: 8.4.40 ts-node: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4) - postcss-load-config@4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + postcss-load-config@4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: lilconfig: 3.1.2 yaml: 2.5.0 optionalDependencies: postcss: 8.4.40 - ts-node: 10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4) postcss-nested@6.2.0(postcss@8.4.40): dependencies: @@ -15989,7 +15968,7 @@ snapshots: tailwind-merge@1.14.0: {} - tailwindcss@3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4)): + tailwindcss@3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -16008,7 +15987,7 @@ snapshots: postcss: 8.4.40 postcss-import: 15.1.0(postcss@8.4.40) postcss-js: 4.0.1(postcss@8.4.40) - postcss-load-config: 4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4)) + postcss-load-config: 4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@18.19.42)(typescript@5.5.4)) postcss-nested: 6.2.0(postcss@8.4.40) postcss-selector-parser: 6.1.1 resolve: 1.22.8 @@ -16016,7 +15995,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.4.6(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)): + tailwindcss@3.4.6(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -16035,7 +16014,7 @@ snapshots: postcss: 8.4.40 postcss-import: 15.1.0(postcss@8.4.40) postcss-js: 4.0.1(postcss@8.4.40) - postcss-load-config: 4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + postcss-load-config: 4.0.2(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) postcss-nested: 6.2.0(postcss@8.4.40) postcss-selector-parser: 6.1.1 resolve: 1.22.8 @@ -16111,12 +16090,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.17.19)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4): + ts-jest@29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.17.19)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + jest: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -16131,12 +16110,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.24.9) esbuild: 0.17.19 - ts-jest@29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4): + ts-jest@29.2.3(@babel/core@7.24.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.9))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))(typescript@5.5.4): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + jest: 29.7.0(@types/node@20.14.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -16192,27 +16171,7 @@ snapshots: optionalDependencies: '@swc/core': 1.5.28(@swc/helpers@0.5.13) - ts-node@10.9.2(@swc/core@1.5.28)(@types/node@18.19.42)(typescript@5.5.4): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 18.19.42 - acorn: 8.12.1 - acorn-walk: 8.3.3 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.5.4 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.5.28 - - ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4): + ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -16267,7 +16226,7 @@ snapshots: - supports-color - ts-node - tsup@6.7.0(@swc/core@1.5.28)(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4): + tsup@6.7.0(@swc/core@1.5.28(@swc/helpers@0.5.13))(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))(typescript@5.5.4): dependencies: bundle-require: 4.2.1(esbuild@0.17.19) cac: 6.7.14 @@ -16277,7 +16236,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 3.1.4(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28)(@types/node@20.14.12)(typescript@5.5.4)) + postcss-load-config: 3.1.4(postcss@8.4.40)(ts-node@10.9.2(@swc/core@1.5.28(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)) resolve-from: 5.0.0 rollup: 3.29.4 source-map: 0.8.0-beta.0 diff --git a/examples/coagents-qa-native/agent-js/package.json b/examples/coagents-qa-native/agent-js/package.json index 716b281ee1..d20bebbe25 100644 --- a/examples/coagents-qa-native/agent-js/package.json +++ b/examples/coagents-qa-native/agent-js/package.json @@ -19,7 +19,7 @@ "@langchain/anthropic": "^0.3.8", "@langchain/core": "^0.3.18", "@langchain/google-genai": "^0.1.4", - "@langchain/langgraph": "^0.2.21", + "@langchain/langgraph": "^0.2.44", "@langchain/openai": "^0.3.14", "zod": "^3.23.8" } diff --git a/examples/coagents-qa-native/agent-js/pnpm-lock.yaml b/examples/coagents-qa-native/agent-js/pnpm-lock.yaml index 10a60da39d..1d741abce0 100644 --- a/examples/coagents-qa-native/agent-js/pnpm-lock.yaml +++ b/examples/coagents-qa-native/agent-js/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: ^0.1.4 version: 0.1.4(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))(zod@3.23.8) '@langchain/langgraph': - specifier: ^0.2.21 - version: 0.2.22(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) + specifier: ^0.2.44 + version: 0.2.44(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) '@langchain/openai': specifier: ^0.3.14 version: 0.3.14(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) @@ -357,8 +357,8 @@ packages: peerDependencies: '@langchain/core': '>=0.3.17 <0.4.0' - '@langchain/langgraph-checkpoint@0.0.12': - resolution: {integrity: sha512-XySxUqpt7X3k02UyncpKupZMOHqLbkjOpkGWFdwBTueT1+kVeS2+DTwZK80QT/BaWH6jEUkMk14oU9/D63R0tg==} + '@langchain/langgraph-checkpoint@0.0.15': + resolution: {integrity: sha512-AiJkvsYHqNbCh1Tx823qs2lf2qRqeB4EAMejirOk8gkpPszAGYua5c3niKYkcKR2tU8Snhrmj7Gm9HKZSFOXyw==} engines: {node: '>=18'} peerDependencies: '@langchain/core': '>=0.2.31 <0.4.0' @@ -366,11 +366,11 @@ packages: '@langchain/langgraph-sdk@0.0.16': resolution: {integrity: sha512-qbpImYeuDjRGZRno5HTaSbBQYa42wAI1Eeb3tZ+y5ek1rZxArqnyKCX8FH7Eje8NneSZWsGGZsudnOD6NXVwvA==} - '@langchain/langgraph-sdk@0.0.26': - resolution: {integrity: sha512-zlObXIuYMBpV55ENiUc+gcwf3LVaJEd/GbDvVALVbFGU0nf/wsr21Jowf+RkjFxMGvFLR6QRDZ7C/NJAlcUAUA==} + '@langchain/langgraph-sdk@0.0.36': + resolution: {integrity: sha512-KkAZM0uXBaMcD/dpGTBppOhbvNX6gz+Y1zFAC898OblegFkSvICrkd0oRQ5Ro/GWK/NAoDymnMUDXeZDdUkSuw==} - '@langchain/langgraph@0.2.22': - resolution: {integrity: sha512-iXA8p9xaWfGviBbZ6nOETqvGz2misjZ4xGxrWla98FF2aE8mq1jfMzWuEX37KZIfuQPCqt1iIh/Zit60T4mG3Q==} + '@langchain/langgraph@0.2.44': + resolution: {integrity: sha512-CR9LB7sytdx0Ink56qVUPorDo5gW5m7iOU2ypu1OYA4l5aIrT4xGvHCwrGH9RE80pb/d0FglVUkEgEfuvSDbmw==} engines: {node: '>=18'} peerDependencies: '@langchain/core': '>=0.2.36 <0.3.0 || >=0.3.9 < 0.4.0' @@ -776,7 +776,7 @@ snapshots: '@copilotkit/shared': 1.5.13 '@langchain/community': 0.0.53(openai@4.73.0(zod@3.23.8)) '@langchain/core': 0.3.18(openai@4.73.0(zod@3.23.8)) - '@langchain/langgraph': 0.2.22(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) + '@langchain/langgraph': 0.2.44(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) '@langchain/langgraph-sdk': 0.0.16 langchain: 0.3.6(@langchain/anthropic@0.3.8(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))))(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))(@langchain/google-genai@0.1.4(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))(zod@3.23.8))(openai@4.73.0(zod@3.23.8)) zod: 3.23.8 @@ -966,7 +966,7 @@ snapshots: transitivePeerDependencies: - zod - '@langchain/langgraph-checkpoint@0.0.12(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))': + '@langchain/langgraph-checkpoint@0.0.15(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))': dependencies: '@langchain/core': 0.3.18(openai@4.73.0(zod@3.23.8)) uuid: 10.0.0 @@ -978,18 +978,18 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 - '@langchain/langgraph-sdk@0.0.26': + '@langchain/langgraph-sdk@0.0.36': dependencies: '@types/json-schema': 7.0.15 p-queue: 6.6.2 p-retry: 4.6.2 uuid: 9.0.1 - '@langchain/langgraph@0.2.22(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))': + '@langchain/langgraph@0.2.44(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8)))': dependencies: '@langchain/core': 0.3.18(openai@4.73.0(zod@3.23.8)) - '@langchain/langgraph-checkpoint': 0.0.12(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) - '@langchain/langgraph-sdk': 0.0.26 + '@langchain/langgraph-checkpoint': 0.0.15(@langchain/core@0.3.18(openai@4.73.0(zod@3.23.8))) + '@langchain/langgraph-sdk': 0.0.36 uuid: 10.0.0 zod: 3.23.8 diff --git a/examples/coagents-qa-native/agent-js/src/agent.ts b/examples/coagents-qa-native/agent-js/src/agent.ts index 05259c519d..03dac5278a 100644 --- a/examples/coagents-qa-native/agent-js/src/agent.ts +++ b/examples/coagents-qa-native/agent-js/src/agent.ts @@ -9,7 +9,7 @@ import { } from "@copilotkit/sdk-js/langgraph"; import { AIMessage, HumanMessage, ToolMessage } from "@langchain/core/messages"; import { getModel } from "./model"; -import { END, MemorySaver, StateGraph } from "@langchain/langgraph"; +import { END, MemorySaver, StateGraph, interrupt } from "@langchain/langgraph"; import { AgentState, AgentStateAnnotation } from "./state"; export async function email_node(state: AgentState, config: RunnableConfig) { @@ -17,7 +17,8 @@ export async function email_node(state: AgentState, config: RunnableConfig) { * Write an email. */ - const instructions = "You write emails."; + const sender = state.sender ?? interrupt('Please provide a sender name which will appear in the email'); + const instructions = `You write emails. The email is by the following sender: ${sender}`; const email_model = getModel(state).bindTools!( convertActionsToDynamicStructuredTools(state.copilotkit.actions), @@ -38,6 +39,7 @@ export async function email_node(state: AgentState, config: RunnableConfig) { return { messages: response, email: email, + sender, }; } diff --git a/examples/coagents-qa-native/agent-js/src/state.ts b/examples/coagents-qa-native/agent-js/src/state.ts index 374296e1a3..3cf1e71645 100644 --- a/examples/coagents-qa-native/agent-js/src/state.ts +++ b/examples/coagents-qa-native/agent-js/src/state.ts @@ -5,6 +5,7 @@ import { CopilotKitStateAnnotation } from "@copilotkit/sdk-js/langgraph"; export const AgentStateAnnotation = Annotation.Root({ model: Annotation, email: Annotation, + sender: Annotation, ...CopilotKitStateAnnotation.spec, }); diff --git a/examples/coagents-qa-native/agent/email_agent/agent.py b/examples/coagents-qa-native/agent/email_agent/agent.py index 4601aa35c4..4fe459a6c0 100644 --- a/examples/coagents-qa-native/agent/email_agent/agent.py +++ b/examples/coagents-qa-native/agent/email_agent/agent.py @@ -8,6 +8,7 @@ from langchain_core.messages import HumanMessage, ToolMessage, AIMessage from copilotkit.langgraph import ( copilotkit_customize_config, copilotkit_exit, copilotkit_emit_message ) +from langgraph.types import interrupt from email_agent.model import get_model from email_agent.state import EmailAgentState @@ -17,13 +18,16 @@ async def email_node(state: EmailAgentState, config: RunnableConfig): Write an email. """ + sender = state.get("sender", None) + if sender is None: + sender = interrupt('Please provide a sender name which will appear in the email') config = copilotkit_customize_config( config, emit_tool_calls=True, ) - instructions = "You write emails." + instructions = f"You write emails. The email is by the following sender: {sender}" email_model = get_model(state).bind_tools( state["copilotkit"]["actions"], @@ -44,6 +48,7 @@ async def email_node(state: EmailAgentState, config: RunnableConfig): return { "messages": response, "email": email, + "sender": sender, } async def send_email_node(state: EmailAgentState, config: RunnableConfig): diff --git a/examples/coagents-qa-native/agent/email_agent/state.py b/examples/coagents-qa-native/agent/email_agent/state.py index 5bf9fd7950..dff6472c6f 100644 --- a/examples/coagents-qa-native/agent/email_agent/state.py +++ b/examples/coagents-qa-native/agent/email_agent/state.py @@ -9,3 +9,4 @@ class EmailAgentState(CopilotKitState): """Email Agent State""" email: str model: str + sender: str diff --git a/examples/coagents-qa-native/ui/app/Mailer.tsx b/examples/coagents-qa-native/ui/app/Mailer.tsx index efb3356773..00342a4bc7 100644 --- a/examples/coagents-qa-native/ui/app/Mailer.tsx +++ b/examples/coagents-qa-native/ui/app/Mailer.tsx @@ -5,6 +5,29 @@ import { useCoAgent, useCopilotAction } from "@copilotkit/react-core"; import { CopilotPopup } from "@copilotkit/react-ui"; import { useState } from "react"; import { useCopilotChatSuggestions } from "@copilotkit/react-ui"; +import { useLangGraphInterrupt } from "@copilotkit/react-core"; + +const InterruptForm = ({ event, resolve }: { event: { value: string }, resolve: (value: string) => void }) => { + const [name, setName] = useState(""); + return ( +
+
{event.value}
+ setName(e.target.value)} + /> + +
+ ); +}; export function Mailer() { const { model } = useModelSelectorContext(); @@ -40,6 +63,10 @@ export function Mailer() { }, }); + useLangGraphInterrupt({ + render: ({ event, resolve }) => + }); + return (
{ "write an email to the CEO of OpenAI asking for a meeting" ); + // First interaction will bring up interrupt interface + await page + .getByPlaceholder("Your name") + .fill('CopilotKit Automation'); + await page.locator('button:has-text("Submit")').click(); + const cancelMessage = page.locator( '[data-test-id="email-cancel-message"]' ); diff --git a/sdk-python/copilotkit/agent.py b/sdk-python/copilotkit/agent.py index 42bc00de2c..8bbdde86c5 100644 --- a/sdk-python/copilotkit/agent.py +++ b/sdk-python/copilotkit/agent.py @@ -4,6 +4,7 @@ from typing import Optional, List, TypedDict from abc import ABC, abstractmethod from .types import Message from .action import ActionDict +from .types import MetaEvent class AgentDict(TypedDict): """Agent dictionary""" @@ -30,6 +31,7 @@ class Agent(ABC): thread_id: Optional[str] = None, node_name: Optional[str] = None, actions: Optional[List[ActionDict]] = None, + meta_events: Optional[List[MetaEvent]] = None, ): """Execute the agent""" diff --git a/sdk-python/copilotkit/integrations/fastapi.py b/sdk-python/copilotkit/integrations/fastapi.py index 12c6157504..63898aa5d7 100644 --- a/sdk-python/copilotkit/integrations/fastapi.py +++ b/sdk-python/copilotkit/integrations/fastapi.py @@ -4,11 +4,11 @@ import logging import asyncio # from concurrent.futures import ThreadPoolExecutor -from typing import List, Any, cast +from typing import List, Any, cast, Optional from fastapi import FastAPI, Request, HTTPException from fastapi.responses import JSONResponse, StreamingResponse from ..sdk import CopilotKitRemoteEndpoint, CopilotKitContext -from ..types import Message +from ..types import Message, MetaEvent from ..exc import ( ActionNotFoundException, ActionExecutionException, @@ -98,6 +98,7 @@ async def handler(request: Request, sdk: CopilotKitRemoteEndpoint): state = body_get_or_raise(body, "state") messages = body_get_or_raise(body, "messages") actions = cast(List[ActionDict], body.get("actions", [])) + meta_events = cast(List[MetaEvent], body.get("metaEvents", [])) return handle_execute_agent( sdk=sdk, @@ -108,6 +109,7 @@ async def handler(request: Request, sdk: CopilotKitRemoteEndpoint): state=state, messages=messages, actions=actions, + meta_events=meta_events, ) if method == 'POST' and path == 'agents/state': @@ -164,6 +166,7 @@ def handle_execute_agent( # pylint: disable=too-many-arguments state: dict, messages: List[Message], actions: List[ActionDict], + meta_events: Optional[List[MetaEvent]] = None, ): """Handle continue agent execution request with FastAPI""" try: @@ -175,6 +178,7 @@ def handle_execute_agent( # pylint: disable=too-many-arguments state=state, messages=messages, actions=actions, + meta_events=meta_events, ) return StreamingResponse(events, media_type="application/json") except AgentNotFoundException as exc: diff --git a/sdk-python/copilotkit/langgraph_agent.py b/sdk-python/copilotkit/langgraph_agent.py index 2ad542dd21..068dd4c8cf 100644 --- a/sdk-python/copilotkit/langgraph_agent.py +++ b/sdk-python/copilotkit/langgraph_agent.py @@ -8,10 +8,11 @@ from langgraph.graph.graph import CompiledGraph from langchain.load.dump import dumps as langchain_dumps from langchain.schema import BaseMessage, SystemMessage from langchain_core.runnables import RunnableConfig, ensure_config +from langgraph.types import Command from partialjson.json_parser import JSONParser -from .types import Message +from .types import Message, MetaEvent from .langgraph import copilotkit_messages_to_langchain, langchain_messages_to_copilotkit from .action import ActionDict from .agent import Agent @@ -218,8 +219,8 @@ class LangGraphAgent(Agent): thread_id: Optional[str] = None, node_name: Optional[str] = None, actions: Optional[List[ActionDict]] = None, + meta_events: Optional[List[MetaEvent]] = None ): - config = ensure_config(cast(Any, self.langgraph_config.copy()) if self.langgraph_config else {}) # pylint: disable=line-too-long config["configurable"] = config.get("configurable", {}) config["configurable"]["thread_id"] = thread_id @@ -235,19 +236,26 @@ class LangGraphAgent(Agent): agent_name=self.name ) + # Handle meta events for interrupts + interrupt_event = next((ev for ev in (meta_events or []) if ev.get("name") == "LangGraphInterruptEvent"), None) + input = None + + if interrupt_event and interrupt_event.get("response"): + input = Command(resume=interrupt_event["response"]) mode = "continue" if thread_id and node_name != "__end__" and node_name is not None else "start" thread_id = thread_id or str(uuid.uuid4()) config["configurable"]["thread_id"] = thread_id - if mode == "continue": + if mode == "continue" and not interrupt_event: self.graph.update_state(config, state, as_node=node_name) return self._stream_events( mode=mode, config=config, state=state, - node_name=node_name + node_name=node_name, + input=input ) async def _stream_events( # pylint: disable=too-many-locals @@ -256,7 +264,8 @@ class LangGraphAgent(Agent): mode: str, config: RunnableConfig, state: Any, - node_name: Optional[str] = None + node_name: Optional[str] = None, + input: Optional[Command] = None ): streaming_state_extractor = _StreamingStateExtractor([]) @@ -267,12 +276,23 @@ class LangGraphAgent(Agent): manually_emitted_state = None thread_id = cast(Any, config)["configurable"]["thread_id"] - async for event in self.graph.astream_events(initial_state, config, version="v2"): + # Use provided input or fallback to initial_state + stream_input = input if input else initial_state + + async for event in self.graph.astream_events(stream_input, config, version="v2"): current_node_name = event.get("name") event_type = event.get("event") run_id = event.get("run_id") metadata = event.get("metadata", {}) + interrupt_event = event["data"]["chunk"].get("__interrupt__", None) if isinstance(event.get("data"), dict) and isinstance(event["data"].get("chunk"), dict) else None + if (interrupt_event): + yield langchain_dumps({ + "event": "on_interrupt", + "value": interrupt_event[0].value + }) + "\n" + continue + should_exit = should_exit or ( event_type == "on_custom_event" and event["name"] == "copilotkit_exit" @@ -355,9 +375,10 @@ class LangGraphAgent(Agent): yield langchain_dumps(event) + "\n" state = await self.graph.aget_state(config) - is_end_node = state.next == () - - node_name = list(state.metadata["writes"].keys())[0] + tasks = self.graph.get_state(config).tasks + interrupts = tasks[0].interrupts if tasks and len(tasks) > 0 else None + node_name = node_name if interrupts else list(state.metadata["writes"].keys())[0] + is_end_node = state.next == () and not interrupts yield self._emit_state_sync_event( thread_id=thread_id, diff --git a/sdk-python/copilotkit/sdk.py b/sdk-python/copilotkit/sdk.py index f00dcda65c..713cff74c1 100644 --- a/sdk-python/copilotkit/sdk.py +++ b/sdk-python/copilotkit/sdk.py @@ -8,7 +8,7 @@ from typing import List, Callable, Union, Optional, Any, Coroutine from typing_extensions import TypedDict, Tuple from .agent import Agent, AgentDict from .action import Action, ActionDict, ActionResultDict -from .types import Message +from .types import Message, MetaEvent from .exc import ( ActionNotFoundException, AgentNotFoundException, @@ -266,6 +266,7 @@ class CopilotKitRemoteEndpoint: state: dict, messages: List[Message], actions: List[ActionDict], + meta_events: Optional[List[MetaEvent]] = None, ) -> Any: """ Execute an agent @@ -285,6 +286,7 @@ class CopilotKitRemoteEndpoint: ("State", state), ("Messages", messages), ("Actions", actions), + ("MetaEvents", meta_events), ] ) @@ -295,6 +297,7 @@ class CopilotKitRemoteEndpoint: state=state, messages=messages, actions=actions, + meta_events=meta_events ) except Exception as error: raise AgentExecutionException(name, error) from error diff --git a/sdk-python/copilotkit/types.py b/sdk-python/copilotkit/types.py index f32f3f1654..4d09890a13 100644 --- a/sdk-python/copilotkit/types.py +++ b/sdk-python/copilotkit/types.py @@ -38,3 +38,8 @@ class IntermediateStateConfig(TypedDict): state_key: str tool: str tool_argument: NotRequired[str] + +class MetaEvent(TypedDict): + """Type definition for meta events""" + name: str + response: NotRequired[str] \ No newline at end of file