@langchain/langgraph-sdk 1.12.1 → 1.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/client/assistants/index.cjs +10 -9
  2. package/dist/client/assistants/index.cjs.map +1 -1
  3. package/dist/client/assistants/index.d.cts.map +1 -1
  4. package/dist/client/assistants/index.d.ts.map +1 -1
  5. package/dist/client/assistants/index.js +11 -10
  6. package/dist/client/assistants/index.js.map +1 -1
  7. package/dist/client/base.cjs +11 -1
  8. package/dist/client/base.cjs.map +1 -1
  9. package/dist/client/base.d.cts.map +1 -1
  10. package/dist/client/base.d.ts.map +1 -1
  11. package/dist/client/base.js +11 -2
  12. package/dist/client/base.js.map +1 -1
  13. package/dist/client/crons/index.cjs +3 -3
  14. package/dist/client/crons/index.cjs.map +1 -1
  15. package/dist/client/crons/index.js +4 -4
  16. package/dist/client/crons/index.js.map +1 -1
  17. package/dist/client/runs/index.cjs +9 -9
  18. package/dist/client/runs/index.cjs.map +1 -1
  19. package/dist/client/runs/index.d.cts.map +1 -1
  20. package/dist/client/runs/index.d.ts.map +1 -1
  21. package/dist/client/runs/index.js +10 -10
  22. package/dist/client/runs/index.js.map +1 -1
  23. package/dist/client/stream/transport/http.cjs +4 -3
  24. package/dist/client/stream/transport/http.cjs.map +1 -1
  25. package/dist/client/stream/transport/http.d.cts.map +1 -1
  26. package/dist/client/stream/transport/http.d.ts.map +1 -1
  27. package/dist/client/stream/transport/http.js +4 -3
  28. package/dist/client/stream/transport/http.js.map +1 -1
  29. package/dist/client/stream/transport/utils.cjs +2 -2
  30. package/dist/client/stream/transport/utils.cjs.map +1 -1
  31. package/dist/client/stream/transport/utils.js +2 -2
  32. package/dist/client/stream/transport/utils.js.map +1 -1
  33. package/dist/client/stream/transport/websocket.cjs +2 -1
  34. package/dist/client/stream/transport/websocket.cjs.map +1 -1
  35. package/dist/client/stream/transport/websocket.d.cts.map +1 -1
  36. package/dist/client/stream/transport/websocket.d.ts.map +1 -1
  37. package/dist/client/stream/transport/websocket.js +2 -1
  38. package/dist/client/stream/transport/websocket.js.map +1 -1
  39. package/dist/client/threads/index.cjs +11 -11
  40. package/dist/client/threads/index.cjs.map +1 -1
  41. package/dist/client/threads/index.d.cts.map +1 -1
  42. package/dist/client/threads/index.d.ts.map +1 -1
  43. package/dist/client/threads/index.js +12 -12
  44. package/dist/client/threads/index.js.map +1 -1
  45. package/dist/client/ui-internal/index.cjs +1 -1
  46. package/dist/client/ui-internal/index.cjs.map +1 -1
  47. package/dist/client/ui-internal/index.js +2 -2
  48. package/dist/client/ui-internal/index.js.map +1 -1
  49. package/dist/index.d.cts +2 -2
  50. package/dist/index.d.ts +2 -2
  51. package/dist/types.d.cts +10 -1
  52. package/dist/types.d.cts.map +1 -1
  53. package/dist/types.d.ts +10 -1
  54. package/dist/types.d.ts.map +1 -1
  55. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/client/ui-internal/index.ts"],"sourcesContent":["import { BaseClient } from \"../base.js\";\n\nexport class UiClient extends BaseClient {\n private static promiseCache: Record<string, Promise<unknown> | undefined> =\n {};\n\n private static getOrCached<T>(key: string, fn: () => Promise<T>): Promise<T> {\n if (UiClient.promiseCache[key] != null) {\n return UiClient.promiseCache[key] as Promise<T>;\n }\n\n const promise = fn();\n UiClient.promiseCache[key] = promise;\n return promise;\n }\n\n async getComponent(assistantId: string, agentName: string): Promise<string> {\n return UiClient.getOrCached(\n `${this.apiUrl}-${assistantId}-${agentName}`,\n async () => {\n // oxlint-disable-next-line prefer-const -- init is reassigned by onRequest hook\n let [url, init] = this.prepareFetchOptions(`/ui/${assistantId}`, {\n headers: {\n Accept: \"text/html\",\n \"Content-Type\": \"application/json\",\n },\n method: \"POST\",\n json: { name: agentName },\n });\n if (this.onRequest != null) init = await this.onRequest(url, init);\n\n const response = await this.asyncCaller.fetch(url.toString(), init);\n return response.text();\n }\n );\n }\n}\n"],"mappings":";;AAEA,IAAa,WAAb,MAAa,iBAAiB,WAAW;CACvC,OAAe,eACb,EAAE;CAEJ,OAAe,YAAe,KAAa,IAAkC;AAC3E,MAAI,SAAS,aAAa,QAAQ,KAChC,QAAO,SAAS,aAAa;EAG/B,MAAM,UAAU,IAAI;AACpB,WAAS,aAAa,OAAO;AAC7B,SAAO;;CAGT,MAAM,aAAa,aAAqB,WAAoC;AAC1E,SAAO,SAAS,YACd,GAAG,KAAK,OAAO,GAAG,YAAY,GAAG,aACjC,YAAY;GAEV,IAAI,CAAC,KAAK,QAAQ,KAAK,oBAAoB,OAAO,eAAe;IAC/D,SAAS;KACP,QAAQ;KACR,gBAAgB;KACjB;IACD,QAAQ;IACR,MAAM,EAAE,MAAM,WAAW;IAC1B,CAAC;AACF,OAAI,KAAK,aAAa,KAAM,QAAO,MAAM,KAAK,UAAU,KAAK,KAAK;AAGlE,WADiB,MAAM,KAAK,YAAY,MAAM,IAAI,UAAU,EAAE,KAAK,EACnD,MAAM;IAEzB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/client/ui-internal/index.ts"],"sourcesContent":["import { BaseClient, encodePathSegment } from \"../base.js\";\n\nexport class UiClient extends BaseClient {\n private static promiseCache: Record<string, Promise<unknown> | undefined> =\n {};\n\n private static getOrCached<T>(key: string, fn: () => Promise<T>): Promise<T> {\n if (UiClient.promiseCache[key] != null) {\n return UiClient.promiseCache[key] as Promise<T>;\n }\n\n const promise = fn();\n UiClient.promiseCache[key] = promise;\n return promise;\n }\n\n async getComponent(assistantId: string, agentName: string): Promise<string> {\n return UiClient.getOrCached(\n `${this.apiUrl}-${assistantId}-${agentName}`,\n async () => {\n // oxlint-disable-next-line prefer-const -- init is reassigned by onRequest hook\n let [url, init] = this.prepareFetchOptions(\n `/ui/${encodePathSegment(assistantId)}`,\n {\n headers: {\n Accept: \"text/html\",\n \"Content-Type\": \"application/json\",\n },\n method: \"POST\",\n json: { name: agentName },\n }\n );\n if (this.onRequest != null) init = await this.onRequest(url, init);\n\n const response = await this.asyncCaller.fetch(url.toString(), init);\n return response.text();\n }\n );\n }\n}\n"],"mappings":";;AAEA,IAAa,WAAb,MAAa,iBAAiB,WAAW;CACvC,OAAe,eACb,EAAE;CAEJ,OAAe,YAAe,KAAa,IAAkC;AAC3E,MAAI,SAAS,aAAa,QAAQ,KAChC,QAAO,SAAS,aAAa;EAG/B,MAAM,UAAU,IAAI;AACpB,WAAS,aAAa,OAAO;AAC7B,SAAO;;CAGT,MAAM,aAAa,aAAqB,WAAoC;AAC1E,SAAO,SAAS,YACd,GAAG,KAAK,OAAO,GAAG,YAAY,GAAG,aACjC,YAAY;GAEV,IAAI,CAAC,KAAK,QAAQ,KAAK,oBACrB,OAAO,kBAAkB,YAAY,IACrC;IACE,SAAS;KACP,QAAQ;KACR,gBAAgB;KACjB;IACD,QAAQ;IACR,MAAM,EAAE,MAAM,WAAW;IAC1B,CACF;AACD,OAAI,KAAK,aAAa,KAAM,QAAO,MAAM,KAAK,UAAU,KAAK,KAAK;AAGlE,WADiB,MAAM,KAAK,YAAY,MAAM,IAAI,UAAU,EAAE,KAAK,EACnD,MAAM;IAEzB"}
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Assistant, AssistantBase, AssistantGraph, AssistantVersion, AssistantsSearchResponse, Checkpoint, Config, Cron, CronCreateForThreadResponse, CronCreateResponse, DefaultValues, GraphSchema, Interrupt, Item, ListNamespaceResponse, Metadata, Run, SearchItem, SearchItemsResponse, Thread, ThreadState, ThreadStatus, ThreadTask } from "./schema.cjs";
2
2
  import { AIMessage, DefaultToolCall, FunctionMessage, HumanMessage, InferToolOutput, Message, RemoveMessage, SystemMessage, ToolCallFromTool, ToolCallState, ToolCallWithResult, ToolCallsFromTools, ToolMessage } from "./types.messages.cjs";
3
3
  import { CustomStreamEvent, DebugStreamEvent, ErrorStreamEvent, EventsStreamEvent, FeedbackStreamEvent, MessagesStreamEvent, MessagesTupleStreamEvent, MetadataStreamEvent, StreamMode, ToolProgress, ToolsStreamEvent, UpdatesStreamEvent, ValuesStreamEvent } from "./types.stream.cjs";
4
- import { Command, OnConflictBehavior, RunsInvokePayload, StreamEvent } from "./types.cjs";
4
+ import { Command, OnConflictBehavior, RunsInvokePayload, ServerRuntime, StreamEvent } from "./types.cjs";
5
5
  import { ClientConfig, RequestHook, getApiKey } from "./client/base.cjs";
6
6
  import { AssembledMessage, MessageAssembler } from "./client/stream/messages.cjs";
7
7
  import { AnyMediaHandle, AudioMedia, FileMedia, ImageMedia, MediaAssembler, MediaAssemblerCallbacks, MediaAssemblerOptions, MediaAssemblyError, MediaAssemblyErrorKind, MediaBase, MediaBlockType, VideoMedia } from "./client/stream/media.cjs";
@@ -23,4 +23,4 @@ import { UseDeepAgentStream, UseDeepAgentStreamOptions } from "./ui/stream/deep-
23
23
  import { InferBag, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentStates, InferToolCalls, ResolveStreamInterface, ResolveStreamOptions } from "./ui/stream/index.cjs";
24
24
  import { DEFAULT_MESSAGES_KEY, NAMESPACE_SEPARATOR } from "./stream/constants.cjs";
25
25
  import { StreamError } from "./ui/errors.cjs";
26
- export { type AIMessage, type AgentServerAdapter, type AnyHeadlessToolImplementation, type AnyMediaHandle, type AssembledMessage, type Assistant, type AssistantBase, type AssistantGraph, type AssistantVersion, type AssistantsSearchResponse, type AudioMedia, type BagTemplate, BaseStream, type Checkpoint, Client, type ClientConfig, type Command, type Config, type Cron, type CronCreateForThreadResponse, type CronCreateResponse, type CustomStreamEvent, DEFAULT_MESSAGES_KEY, type DebugStreamEvent, type DefaultToolCall, type DefaultValues, type ErrorStreamEvent, type EventSubscription, type EventsStreamEvent, type FeedbackStreamEvent, type FileMedia, type FlushPendingHeadlessToolInterruptsOptions, type FunctionMessage, type GraphSchema, type HeadlessToolImplementation, type HeadlessToolInterrupt, type HeadlessToolResumeCommand, type HeadlessToolResumeController, HttpAgentServerAdapter, type HttpAgentServerAdapterOptions, type HumanMessage, type ImageMedia, InferBag, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentStates, InferToolCalls, type InferToolOutput, type Interrupt, type Item, type ListNamespaceResponse, MediaAssembler, type MediaAssemblerCallbacks, type MediaAssemblerOptions, MediaAssemblyError, type MediaAssemblyErrorKind, type MediaBase, type MediaBlockType, type Message, MessageAssembler, type MessageSubscription, type MessagesStreamEvent, type MessagesTupleStreamEvent, type Metadata, type MetadataStreamEvent, NAMESPACE_SEPARATOR, type OnConflictBehavior, type OnToolCallback, ProtocolError, type ProtocolRequestHook, ProtocolSseTransportAdapter, type ProtocolSseTransportOptions, type ProtocolTransportPaths, ProtocolWebSocketTransportAdapter, type ProtocolWebSocketTransportOptions, type RemoveMessage, type RequestHook, ResolveStreamInterface, ResolveStreamOptions, type Run, type RunsInvokePayload, type SearchItem, type SearchItemsResponse, type SessionOrderingState, StateRecord, StreamError, type StreamEvent, type StreamMode, SubscriptionHandle, type SystemMessage, type Thread, type ThreadExtension, type ThreadExtensions, type ThreadState, type ThreadStatus, ThreadStream, type ThreadStreamOptions, type ThreadTask, type ToolCallFromTool, type ToolCallState, type ToolCallWithResult, type ToolCallsFromTools, type ToolEvent, type ToolMessage, type ToolProgress, type ToolsStreamEvent, type TransportAdapter, type UnwrapExtension, type UpdatesStreamEvent, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, type ValuesStreamEvent, type VideoMedia, applyHeadlessToolResumeCommand, executeHeadlessTool, filterOutHeadlessToolInterrupts, findHeadlessTool, flushPendingHeadlessToolInterrupts, getApiKey, handleHeadlessToolInterrupt, headlessToolResumeCommand, isHeadlessToolInterrupt, overrideFetchImplementation, parseHeadlessToolInterruptPayload, scheduleCoalescedHeadlessToolFlush };
26
+ export { type AIMessage, type AgentServerAdapter, type AnyHeadlessToolImplementation, type AnyMediaHandle, type AssembledMessage, type Assistant, type AssistantBase, type AssistantGraph, type AssistantVersion, type AssistantsSearchResponse, type AudioMedia, type BagTemplate, BaseStream, type Checkpoint, Client, type ClientConfig, type Command, type Config, type Cron, type CronCreateForThreadResponse, type CronCreateResponse, type CustomStreamEvent, DEFAULT_MESSAGES_KEY, type DebugStreamEvent, type DefaultToolCall, type DefaultValues, type ErrorStreamEvent, type EventSubscription, type EventsStreamEvent, type FeedbackStreamEvent, type FileMedia, type FlushPendingHeadlessToolInterruptsOptions, type FunctionMessage, type GraphSchema, type HeadlessToolImplementation, type HeadlessToolInterrupt, type HeadlessToolResumeCommand, type HeadlessToolResumeController, HttpAgentServerAdapter, type HttpAgentServerAdapterOptions, type HumanMessage, type ImageMedia, InferBag, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentStates, InferToolCalls, type InferToolOutput, type Interrupt, type Item, type ListNamespaceResponse, MediaAssembler, type MediaAssemblerCallbacks, type MediaAssemblerOptions, MediaAssemblyError, type MediaAssemblyErrorKind, type MediaBase, type MediaBlockType, type Message, MessageAssembler, type MessageSubscription, type MessagesStreamEvent, type MessagesTupleStreamEvent, type Metadata, type MetadataStreamEvent, NAMESPACE_SEPARATOR, type OnConflictBehavior, type OnToolCallback, ProtocolError, type ProtocolRequestHook, ProtocolSseTransportAdapter, type ProtocolSseTransportOptions, type ProtocolTransportPaths, ProtocolWebSocketTransportAdapter, type ProtocolWebSocketTransportOptions, type RemoveMessage, type RequestHook, ResolveStreamInterface, ResolveStreamOptions, type Run, type RunsInvokePayload, type SearchItem, type SearchItemsResponse, type ServerRuntime, type SessionOrderingState, StateRecord, StreamError, type StreamEvent, type StreamMode, SubscriptionHandle, type SystemMessage, type Thread, type ThreadExtension, type ThreadExtensions, type ThreadState, type ThreadStatus, ThreadStream, type ThreadStreamOptions, type ThreadTask, type ToolCallFromTool, type ToolCallState, type ToolCallWithResult, type ToolCallsFromTools, type ToolEvent, type ToolMessage, type ToolProgress, type ToolsStreamEvent, type TransportAdapter, type UnwrapExtension, type UpdatesStreamEvent, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, type ValuesStreamEvent, type VideoMedia, applyHeadlessToolResumeCommand, executeHeadlessTool, filterOutHeadlessToolInterrupts, findHeadlessTool, flushPendingHeadlessToolInterrupts, getApiKey, handleHeadlessToolInterrupt, headlessToolResumeCommand, isHeadlessToolInterrupt, overrideFetchImplementation, parseHeadlessToolInterruptPayload, scheduleCoalescedHeadlessToolFlush };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Assistant, AssistantBase, AssistantGraph, AssistantVersion, AssistantsSearchResponse, Checkpoint, Config, Cron, CronCreateForThreadResponse, CronCreateResponse, DefaultValues, GraphSchema, Interrupt, Item, ListNamespaceResponse, Metadata, Run, SearchItem, SearchItemsResponse, Thread, ThreadState, ThreadStatus, ThreadTask } from "./schema.js";
2
2
  import { AIMessage, DefaultToolCall, FunctionMessage, HumanMessage, InferToolOutput, Message, RemoveMessage, SystemMessage, ToolCallFromTool, ToolCallState, ToolCallWithResult, ToolCallsFromTools, ToolMessage } from "./types.messages.js";
3
3
  import { CustomStreamEvent, DebugStreamEvent, ErrorStreamEvent, EventsStreamEvent, FeedbackStreamEvent, MessagesStreamEvent, MessagesTupleStreamEvent, MetadataStreamEvent, StreamMode, ToolProgress, ToolsStreamEvent, UpdatesStreamEvent, ValuesStreamEvent } from "./types.stream.js";
4
- import { Command, OnConflictBehavior, RunsInvokePayload, StreamEvent } from "./types.js";
4
+ import { Command, OnConflictBehavior, RunsInvokePayload, ServerRuntime, StreamEvent } from "./types.js";
5
5
  import { ClientConfig, RequestHook, getApiKey } from "./client/base.js";
6
6
  import { AssembledMessage, MessageAssembler } from "./client/stream/messages.js";
7
7
  import { AnyMediaHandle, AudioMedia, FileMedia, ImageMedia, MediaAssembler, MediaAssemblerCallbacks, MediaAssemblerOptions, MediaAssemblyError, MediaAssemblyErrorKind, MediaBase, MediaBlockType, VideoMedia } from "./client/stream/media.js";
@@ -23,4 +23,4 @@ import { UseDeepAgentStream, UseDeepAgentStreamOptions } from "./ui/stream/deep-
23
23
  import { InferBag, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentStates, InferToolCalls, ResolveStreamInterface, ResolveStreamOptions } from "./ui/stream/index.js";
24
24
  import { DEFAULT_MESSAGES_KEY, NAMESPACE_SEPARATOR } from "./stream/constants.js";
25
25
  import { StreamError } from "./ui/errors.js";
26
- export { type AIMessage, type AgentServerAdapter, type AnyHeadlessToolImplementation, type AnyMediaHandle, type AssembledMessage, type Assistant, type AssistantBase, type AssistantGraph, type AssistantVersion, type AssistantsSearchResponse, type AudioMedia, type BagTemplate, BaseStream, type Checkpoint, Client, type ClientConfig, type Command, type Config, type Cron, type CronCreateForThreadResponse, type CronCreateResponse, type CustomStreamEvent, DEFAULT_MESSAGES_KEY, type DebugStreamEvent, type DefaultToolCall, type DefaultValues, type ErrorStreamEvent, type EventSubscription, type EventsStreamEvent, type FeedbackStreamEvent, type FileMedia, type FlushPendingHeadlessToolInterruptsOptions, type FunctionMessage, type GraphSchema, type HeadlessToolImplementation, type HeadlessToolInterrupt, type HeadlessToolResumeCommand, type HeadlessToolResumeController, HttpAgentServerAdapter, type HttpAgentServerAdapterOptions, type HumanMessage, type ImageMedia, InferBag, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentStates, InferToolCalls, type InferToolOutput, type Interrupt, type Item, type ListNamespaceResponse, MediaAssembler, type MediaAssemblerCallbacks, type MediaAssemblerOptions, MediaAssemblyError, type MediaAssemblyErrorKind, type MediaBase, type MediaBlockType, type Message, MessageAssembler, type MessageSubscription, type MessagesStreamEvent, type MessagesTupleStreamEvent, type Metadata, type MetadataStreamEvent, NAMESPACE_SEPARATOR, type OnConflictBehavior, type OnToolCallback, ProtocolError, type ProtocolRequestHook, ProtocolSseTransportAdapter, type ProtocolSseTransportOptions, type ProtocolTransportPaths, ProtocolWebSocketTransportAdapter, type ProtocolWebSocketTransportOptions, type RemoveMessage, type RequestHook, ResolveStreamInterface, ResolveStreamOptions, type Run, type RunsInvokePayload, type SearchItem, type SearchItemsResponse, type SessionOrderingState, StateRecord, StreamError, type StreamEvent, type StreamMode, SubscriptionHandle, type SystemMessage, type Thread, type ThreadExtension, type ThreadExtensions, type ThreadState, type ThreadStatus, ThreadStream, type ThreadStreamOptions, type ThreadTask, type ToolCallFromTool, type ToolCallState, type ToolCallWithResult, type ToolCallsFromTools, type ToolEvent, type ToolMessage, type ToolProgress, type ToolsStreamEvent, type TransportAdapter, type UnwrapExtension, type UpdatesStreamEvent, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, type ValuesStreamEvent, type VideoMedia, applyHeadlessToolResumeCommand, executeHeadlessTool, filterOutHeadlessToolInterrupts, findHeadlessTool, flushPendingHeadlessToolInterrupts, getApiKey, handleHeadlessToolInterrupt, headlessToolResumeCommand, isHeadlessToolInterrupt, overrideFetchImplementation, parseHeadlessToolInterruptPayload, scheduleCoalescedHeadlessToolFlush };
26
+ export { type AIMessage, type AgentServerAdapter, type AnyHeadlessToolImplementation, type AnyMediaHandle, type AssembledMessage, type Assistant, type AssistantBase, type AssistantGraph, type AssistantVersion, type AssistantsSearchResponse, type AudioMedia, type BagTemplate, BaseStream, type Checkpoint, Client, type ClientConfig, type Command, type Config, type Cron, type CronCreateForThreadResponse, type CronCreateResponse, type CustomStreamEvent, DEFAULT_MESSAGES_KEY, type DebugStreamEvent, type DefaultToolCall, type DefaultValues, type ErrorStreamEvent, type EventSubscription, type EventsStreamEvent, type FeedbackStreamEvent, type FileMedia, type FlushPendingHeadlessToolInterruptsOptions, type FunctionMessage, type GraphSchema, type HeadlessToolImplementation, type HeadlessToolInterrupt, type HeadlessToolResumeCommand, type HeadlessToolResumeController, HttpAgentServerAdapter, type HttpAgentServerAdapterOptions, type HumanMessage, type ImageMedia, InferBag, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentStates, InferToolCalls, type InferToolOutput, type Interrupt, type Item, type ListNamespaceResponse, MediaAssembler, type MediaAssemblerCallbacks, type MediaAssemblerOptions, MediaAssemblyError, type MediaAssemblyErrorKind, type MediaBase, type MediaBlockType, type Message, MessageAssembler, type MessageSubscription, type MessagesStreamEvent, type MessagesTupleStreamEvent, type Metadata, type MetadataStreamEvent, NAMESPACE_SEPARATOR, type OnConflictBehavior, type OnToolCallback, ProtocolError, type ProtocolRequestHook, ProtocolSseTransportAdapter, type ProtocolSseTransportOptions, type ProtocolTransportPaths, ProtocolWebSocketTransportAdapter, type ProtocolWebSocketTransportOptions, type RemoveMessage, type RequestHook, ResolveStreamInterface, ResolveStreamOptions, type Run, type RunsInvokePayload, type SearchItem, type SearchItemsResponse, type ServerRuntime, type SessionOrderingState, StateRecord, StreamError, type StreamEvent, type StreamMode, SubscriptionHandle, type SystemMessage, type Thread, type ThreadExtension, type ThreadExtensions, type ThreadState, type ThreadStatus, ThreadStream, type ThreadStreamOptions, type ThreadTask, type ToolCallFromTool, type ToolCallState, type ToolCallWithResult, type ToolCallsFromTools, type ToolEvent, type ToolMessage, type ToolProgress, type ToolsStreamEvent, type TransportAdapter, type UnwrapExtension, type UpdatesStreamEvent, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, type ValuesStreamEvent, type VideoMedia, applyHeadlessToolResumeCommand, executeHeadlessTool, filterOutHeadlessToolInterrupts, findHeadlessTool, flushPendingHeadlessToolInterrupts, getApiKey, handleHeadlessToolInterrupt, headlessToolResumeCommand, isHeadlessToolInterrupt, overrideFetchImplementation, parseHeadlessToolInterruptPayload, scheduleCoalescedHeadlessToolFlush };
package/dist/types.d.cts CHANGED
@@ -4,6 +4,15 @@ import { StreamMode } from "./types.stream.cjs";
4
4
  import { LangChainTracer } from "@langchain/core/tracers/tracer_langchain";
5
5
 
6
6
  //#region src/types.d.ts
7
+ type ServerRuntime<Context = unknown> = {
8
+ accessContext: "threads.create_run";
9
+ executionRuntime: {
10
+ context: Context | undefined;
11
+ };
12
+ } | {
13
+ accessContext: "assistants.read" | "threads.read" | "threads.update";
14
+ executionRuntime: null;
15
+ };
7
16
  type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
8
17
  type OnConflictBehavior = "raise" | "do_nothing";
9
18
  type OnCompletionBehavior = "complete" | "continue";
@@ -262,5 +271,5 @@ interface RunsWaitPayload extends RunsStreamPayload {
262
271
  raiseError?: boolean;
263
272
  }
264
273
  //#endregion
265
- export { Command, CronsCreatePayload, CronsUpdatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent, StreamProtocol };
274
+ export { Command, CronsCreatePayload, CronsUpdatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, ServerRuntime, StreamEvent, StreamProtocol };
266
275
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;KAKY,iBAAA;AAAA,KACA,kBAAA;AAAA,KACA,oBAAA;AAAA,KACA,cAAA;AAAA,KACA,UAAA;AAAA,KACA,cAAA;AAAA,KACA,WAAA;AAAA,UAYK,IAAA;EACf,IAAA;EACA,KAAA;AAAA;AAAA,UAGe,OAAA;EArBL;;;EAyBV,MAAA,GAAS,MAAA;EAzBqB;AAChC;;EA6BE,MAAA;EA7BwB;;AAC1B;;;EAmCE,IAAA,GAAO,IAAA,GAAO,IAAA;AAAA;AAAA,UAGC,iBAAA;EArCS;;;EAyCxB,KAAA,GAAQ,MAAA;EAxCE;;;EA6CV,QAAA,GAAW,QAAA;EA7CU;AAYvB;;EAsCE,MAAA,GAAS,MAAA;EArCT;;AAIF;;EAuCE,OAAA;EAnCS;;;EAwCT,YAAA;EA5BkB;;;EAiClB,UAAA,GAAa,IAAA,CAAK,UAAA;EAjClB;;;;EAuCA,gBAAA;EApCe;;;;;;;EA6Cf,UAAA,GAAa,UAAA;EAAA;;;EAKb,e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ALA,UAAA,GAAa,WAAA;EA+BS;;;EA1BtB,eAAA,GAAkB,UAAA;EAmCH;;;;EA7Bf,eAAA;EAiC0B;;;;;;;;;;;;;;AAoB5B;;;;EAjCE,mBAAA,GAAsB,iBAAA;EAsCtB;;;;EAhCA,YAAA;AAAA;AAAA,UAGe,iBAAA,SAA0B,iBAAA;EAwD1B;;;EApDf,UAAA,GAAa,UAAA,GAAa,KAAA,CAAM,UAAA;EAoEA;;;EA/DhC,eAAA;EA+C2D;;;;EAzC3D,eAAA;EAyDA;;;;EAnDA,YAAA;AAAA;AAAA,UAGe,kBAAA,SAA2B,iBAAA;EAmE1C;;;AAGF;EAjEE,QAAA;;;;;EAMA,QAAA;;;;;;;EAQA,cAAA;;;;EAKA,OAAA;;;;EAKA,OAAA;AAAA;AAAA,UAGe,kBAAA,SAA2B,iBAAA;EAC1C,QAAA;;;;;EAKA,OAAA;;;;EAKA,QAAA;;;;EAKA,UAAA,GAAa,UAAA,GAAa,KAAA,CAAM,UAAA;;;;EAKhC,eAAA;;;;EAKA,eAAA;;;;;;;EAQA,cAAA;EACA,OAAA;AAAA;AAAA,UAGe,eAAA,SAAwB,iBAAA;;;;EAIvC,UAAA;AAAA"}
package/dist/types.d.ts CHANGED
@@ -4,6 +4,15 @@ import { StreamMode } from "./types.stream.js";
4
4
  import { LangChainTracer } from "@langchain/core/tracers/tracer_langchain";
5
5
 
6
6
  //#region src/types.d.ts
7
+ type ServerRuntime<Context = unknown> = {
8
+ accessContext: "threads.create_run";
9
+ executionRuntime: {
10
+ context: Context | undefined;
11
+ };
12
+ } | {
13
+ accessContext: "assistants.read" | "threads.read" | "threads.update";
14
+ executionRuntime: null;
15
+ };
7
16
  type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
8
17
  type OnConflictBehavior = "raise" | "do_nothing";
9
18
  type OnCompletionBehavior = "complete" | "continue";
@@ -262,5 +271,5 @@ interface RunsWaitPayload extends RunsStreamPayload {
262
271
  raiseError?: boolean;
263
272
  }
264
273
  //#endregion
265
- export { Command, CronsCreatePayload, CronsUpdatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent, StreamProtocol };
274
+ export { Command, CronsCreatePayload, CronsUpdatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, ServerRuntime, StreamEvent, StreamProtocol };
266
275
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;KAKY,iBAAA;AAAA,KACA,kBAAA;AAAA,KACA,oBAAA;AAAA,KACA,cAAA;AAAA,KACA,UAAA;AAAA,KACA,cAAA;AAAA,KACA,WAAA;AAAA,UAYK,IAAA;EACf,IAAA;EACA,KAAA;AAAA;AAAA,UAGe,OAAA;EArBL;;;EAyBV,MAAA,GAAS,MAAA;EAzBqB;AAChC;;EA6BE,MAAA;EA7BwB;;AAC1B;;;EAmCE,IAAA,GAAO,IAAA,GAAO,IAAA;AAAA;AAAA,UAGC,iBAAA;EArCS;;;EAyCxB,KAAA,GAAQ,MAAA;EAxCE;;;EA6CV,QAAA,GAAW,QAAA;EA7CU;AAYvB;;EAsCE,MAAA,GAAS,MAAA;EArCT;;AAIF;;EAuCE,OAAA;EAnCS;;;EAwCT,YAAA;EA5BkB;;;EAiClB,UAAA,GAAa,IAAA,CAAK,UAAA;EAjClB;;;;EAuCA,gBAAA;EApCe;;;;;;;EA6Cf,UAAA,GAAa,UAAA;EAAA;;;EAKb,eAAA;EA2Ce;;;EAtCf,cAAA;EAiEkC;;;;;;;;;;EArDlC,iBAAA,GAAoB,iBAAA;EArCF;;;EA0ClB,MAAA,GAAS,eAAA;EAtBT;;;;;;EA8BA,YAAA,GAAe,oBAAA;EAAA;;;EAKf,OAAA;EAcA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AA;AAAA,UAGe,iBAAA,SAA0B,iBAAA;EAwD1B;;;EApDf,UAAA,GAAa,UAAA,GAAa,KAAA,CAAM,UAAA;EAoEA;;;EA/DhC,eAAA;EA+C2D;;;;EAzC3D,eAAA;EAyDA;;;;EAnDA,YAAA;AAAA;AAAA,UAGe,kBAAA,SAA2B,iBAAA;EAmE1C;;;AAGF;EAjEE,QAAA;;;;;EAMA,QAAA;;;;;;;EAQA,cAAA;;;;EAKA,OAAA;;;;EAKA,OAAA;AAAA;AAAA,UAGe,kBAAA,SAA2B,iBAAA;EAC1C,QAAA;;;;;EAKA,OAAA;;;;EAKA,QAAA;;;;EAKA,UAAA,GAAa,UAAA,GAAa,KAAA,CAAM,UAAA;;;;EAKhC,eAAA;;;;EAKA,eAAA;;;;;;;EAQA,cAAA;EACA,OAAA;AAAA;AAAA,UAGe,eAAA,SAAwB,iBAAA;;;;EAIvC,UAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "repository": {