@langchain/langgraph-sdk 0.1.10 → 1.0.1
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.
- package/CHANGELOG.md +13 -0
- package/README.md +11 -0
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/auth/error.cjs +76 -86
- package/dist/auth/error.cjs.map +1 -0
- package/dist/auth/error.d.cts +13 -0
- package/dist/auth/error.d.cts.map +1 -0
- package/dist/auth/error.d.ts +12 -8
- package/dist/auth/error.d.ts.map +1 -0
- package/dist/auth/error.js +76 -83
- package/dist/auth/error.js.map +1 -0
- package/dist/auth/index.cjs +36 -44
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +31 -0
- package/dist/auth/index.d.cts.map +1 -0
- package/dist/auth/index.d.ts +20 -15
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +35 -39
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/types.d.cts +294 -0
- package/dist/auth/types.d.cts.map +1 -0
- package/dist/auth/types.d.ts +162 -165
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/client.cjs +1110 -1294
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +697 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.ts +656 -639
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1101 -1281
- package/dist/client.js.map +1 -0
- package/dist/index.cjs +6 -8
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +4 -2
- package/dist/logging/index.cjs +30 -31
- package/dist/logging/index.cjs.map +1 -0
- package/dist/logging/index.d.cts +47 -0
- package/dist/logging/index.d.cts.map +1 -0
- package/dist/logging/index.d.ts +20 -16
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +31 -29
- package/dist/logging/index.js.map +1 -0
- package/dist/react/index.cjs +5 -7
- package/dist/react/index.d.cts +4 -0
- package/dist/react/index.d.ts +4 -3
- package/dist/react/index.js +4 -2
- package/dist/react/stream.cjs +14 -15
- package/dist/react/stream.cjs.map +1 -0
- package/dist/react/stream.custom.cjs +126 -145
- package/dist/react/stream.custom.cjs.map +1 -0
- package/dist/react/stream.custom.d.cts +39 -0
- package/dist/react/stream.custom.d.cts.map +1 -0
- package/dist/react/stream.custom.d.ts +35 -37
- package/dist/react/stream.custom.d.ts.map +1 -0
- package/dist/react/stream.custom.js +122 -137
- package/dist/react/stream.custom.js.map +1 -0
- package/dist/react/stream.d.cts +73 -0
- package/dist/react/stream.d.cts.map +1 -0
- package/dist/react/stream.d.ts +21 -15
- package/dist/react/stream.d.ts.map +1 -0
- package/dist/react/stream.js +12 -11
- package/dist/react/stream.js.map +1 -0
- package/dist/react/stream.lgp.cjs +438 -498
- package/dist/react/stream.lgp.cjs.map +1 -0
- package/dist/react/stream.lgp.js +433 -490
- package/dist/react/stream.lgp.js.map +1 -0
- package/dist/react/thread.cjs +18 -15
- package/dist/react/thread.cjs.map +1 -0
- package/dist/react/thread.js +19 -13
- package/dist/react/thread.js.map +1 -0
- package/dist/react/types.d.cts +356 -0
- package/dist/react/types.d.cts.map +1 -0
- package/dist/react/types.d.ts +334 -329
- package/dist/react/types.d.ts.map +1 -0
- package/dist/react-ui/client.cjs +123 -184
- package/dist/react-ui/client.cjs.map +1 -0
- package/dist/react-ui/client.d.cts +90 -0
- package/dist/react-ui/client.d.cts.map +1 -0
- package/dist/react-ui/client.d.ts +67 -51
- package/dist/react-ui/client.d.ts.map +1 -0
- package/dist/react-ui/client.js +118 -143
- package/dist/react-ui/client.js.map +1 -0
- package/dist/react-ui/index.cjs +14 -13
- package/dist/react-ui/index.cjs.map +1 -0
- package/dist/react-ui/index.d.cts +3 -0
- package/dist/react-ui/index.d.ts +3 -2
- package/dist/react-ui/index.js +8 -3
- package/dist/react-ui/index.js.map +1 -0
- package/dist/react-ui/server/index.cjs +5 -7
- package/dist/react-ui/server/index.d.cts +3 -0
- package/dist/react-ui/server/index.d.ts +3 -2
- package/dist/react-ui/server/index.js +4 -2
- package/dist/react-ui/server/server.cjs +53 -44
- package/dist/react-ui/server/server.cjs.map +1 -0
- package/dist/react-ui/server/server.d.cts +55 -0
- package/dist/react-ui/server/server.d.cts.map +1 -0
- package/dist/react-ui/server/server.d.ts +43 -39
- package/dist/react-ui/server/server.d.ts.map +1 -0
- package/dist/react-ui/server/server.js +54 -42
- package/dist/react-ui/server/server.js.map +1 -0
- package/dist/react-ui/types.cjs +32 -36
- package/dist/react-ui/types.cjs.map +1 -0
- package/dist/react-ui/types.d.cts +25 -0
- package/dist/react-ui/types.d.cts.map +1 -0
- package/dist/react-ui/types.d.ts +23 -19
- package/dist/react-ui/types.d.ts.map +1 -0
- package/dist/react-ui/types.js +32 -34
- package/dist/react-ui/types.js.map +1 -0
- package/dist/schema.d.cts +278 -0
- package/dist/schema.d.cts.map +1 -0
- package/dist/schema.d.ts +250 -242
- package/dist/schema.d.ts.map +1 -0
- package/dist/singletons/fetch.cjs +16 -20
- package/dist/singletons/fetch.cjs.map +1 -0
- package/dist/singletons/fetch.d.cts +14 -0
- package/dist/singletons/fetch.d.cts.map +1 -0
- package/dist/singletons/fetch.d.ts +5 -2
- package/dist/singletons/fetch.d.ts.map +1 -0
- package/dist/singletons/fetch.js +16 -17
- package/dist/singletons/fetch.js.map +1 -0
- package/dist/types.d.cts +187 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +178 -173
- package/dist/types.d.ts.map +1 -0
- package/dist/types.messages.d.cts +91 -0
- package/dist/types.messages.d.cts.map +1 -0
- package/dist/types.messages.d.ts +71 -66
- package/dist/types.messages.d.ts.map +1 -0
- package/dist/types.stream.d.cts +235 -0
- package/dist/types.stream.d.cts.map +1 -0
- package/dist/types.stream.d.ts +149 -142
- package/dist/types.stream.d.ts.map +1 -0
- package/dist/ui/branching.cjs +145 -141
- package/dist/ui/branching.cjs.map +1 -0
- package/dist/ui/branching.d.cts +22 -0
- package/dist/ui/branching.d.cts.map +1 -0
- package/dist/ui/branching.d.ts +17 -30
- package/dist/ui/branching.d.ts.map +1 -0
- package/dist/ui/branching.js +147 -139
- package/dist/ui/branching.js.map +1 -0
- package/dist/ui/errors.cjs +14 -12
- package/dist/ui/errors.cjs.map +1 -0
- package/dist/ui/errors.js +14 -9
- package/dist/ui/errors.js.map +1 -0
- package/dist/ui/manager.cjs +156 -232
- package/dist/ui/manager.cjs.map +1 -0
- package/dist/ui/manager.js +156 -228
- package/dist/ui/manager.js.map +1 -0
- package/dist/ui/messages.cjs +55 -69
- package/dist/ui/messages.cjs.map +1 -0
- package/dist/ui/messages.js +55 -66
- package/dist/ui/messages.js.map +1 -0
- package/dist/ui/utils.cjs +10 -10
- package/dist/ui/utils.cjs.map +1 -0
- package/dist/ui/utils.js +10 -8
- package/dist/ui/utils.js.map +1 -0
- package/dist/utils/async_caller.cjs +103 -185
- package/dist/utils/async_caller.cjs.map +1 -0
- package/dist/utils/async_caller.d.cts +53 -0
- package/dist/utils/async_caller.d.cts.map +1 -0
- package/dist/utils/async_caller.d.ts +36 -31
- package/dist/utils/async_caller.d.ts.map +1 -0
- package/dist/utils/async_caller.js +101 -177
- package/dist/utils/async_caller.js.map +1 -0
- package/dist/utils/env.cjs +11 -13
- package/dist/utils/env.cjs.map +1 -0
- package/dist/utils/env.js +11 -11
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/signals.cjs +18 -19
- package/dist/utils/signals.cjs.map +1 -0
- package/dist/utils/signals.js +18 -17
- package/dist/utils/signals.js.map +1 -0
- package/dist/utils/sse.cjs +110 -140
- package/dist/utils/sse.cjs.map +1 -0
- package/dist/utils/sse.js +110 -138
- package/dist/utils/sse.js.map +1 -0
- package/dist/utils/stream.cjs +90 -114
- package/dist/utils/stream.cjs.map +1 -0
- package/dist/utils/stream.js +90 -111
- package/dist/utils/stream.js.map +1 -0
- package/package.json +73 -81
- package/auth.cjs +0 -1
- package/auth.d.cts +0 -1
- package/auth.d.ts +0 -1
- package/auth.js +0 -1
- package/client.cjs +0 -1
- package/client.d.cts +0 -1
- package/client.d.ts +0 -1
- package/client.js +0 -1
- package/dist/auth/types.cjs +0 -2
- package/dist/auth/types.js +0 -1
- package/dist/react/stream.lgp.d.ts +0 -7
- package/dist/react/thread.d.ts +0 -4
- package/dist/react/types.cjs +0 -2
- package/dist/react/types.js +0 -1
- package/dist/schema.cjs +0 -2
- package/dist/schema.js +0 -1
- package/dist/types.cjs +0 -2
- package/dist/types.js +0 -1
- package/dist/types.messages.cjs +0 -2
- package/dist/types.messages.js +0 -1
- package/dist/types.stream.cjs +0 -2
- package/dist/types.stream.js +0 -1
- package/dist/ui/branching.test.cjs +0 -370
- package/dist/ui/branching.test.d.ts +0 -1
- package/dist/ui/branching.test.js +0 -368
- package/dist/ui/errors.d.ts +0 -12
- package/dist/ui/manager.d.ts +0 -87
- package/dist/ui/messages.d.ts +0 -18
- package/dist/ui/utils.d.ts +0 -2
- package/dist/utils/env.d.ts +0 -1
- package/dist/utils/signals.d.ts +0 -1
- package/dist/utils/sse.d.ts +0 -8
- package/dist/utils/stream.d.ts +0 -13
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/logging.cjs +0 -1
- package/logging.d.cts +0 -1
- package/logging.d.ts +0 -1
- package/logging.js +0 -1
- package/react-ui/server.cjs +0 -1
- package/react-ui/server.d.cts +0 -1
- package/react-ui/server.d.ts +0 -1
- package/react-ui/server.js +0 -1
- package/react-ui.cjs +0 -1
- package/react-ui.d.cts +0 -1
- package/react-ui.d.ts +0 -1
- package/react-ui.js +0 -1
- package/react.cjs +0 -1
- package/react.d.cts +0 -1
- package/react.d.ts +0 -1
- package/react.js +0 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
//#region src/singletons/fetch.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Overrides the fetch implementation used for LangSmith calls.
|
|
3
4
|
* You should use this if you need to use an implementation of fetch
|
|
4
5
|
* other than the default global (e.g. for dealing with proxies).
|
|
5
6
|
* @param fetch The new fetch function to use.
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
declare const overrideFetchImplementation: (fetch: (...args: any[]) => any) => void;
|
|
8
9
|
/**
|
|
9
10
|
* @internal
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
//#endregion
|
|
13
|
+
export { overrideFetchImplementation };
|
|
14
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","names":["overrideFetchImplementation","_getFetchImplementation"],"sources":["../../src/singletons/fetch.d.ts"],"sourcesContent":["/**\n * Overrides the fetch implementation used for LangSmith calls.\n * You should use this if you need to use an implementation of fetch\n * other than the default global (e.g. for dealing with proxies).\n * @param fetch The new fetch function to use.\n */\nexport declare const overrideFetchImplementation: (fetch: (...args: any[]) => any) => void;\n/**\n * @internal\n */\nexport declare const _getFetchImplementation: () => (...args: any[]) => any;\n"],"mappings":";;AAMA;;;;;cAAqBA"}
|
package/dist/singletons/fetch.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
// Wrap the default fetch call due to issues with illegal invocations
|
|
3
|
-
// in some environments:
|
|
4
|
-
// https://stackoverflow.com/questions/69876859/why-does-bind-fix-failed-to-execute-fetch-on-window-illegal-invocation-err
|
|
5
|
-
// @ts-expect-error Broad typing to support a range of fetch implementations
|
|
1
|
+
//#region src/singletons/fetch.ts
|
|
6
2
|
const DEFAULT_FETCH_IMPLEMENTATION = (...args) => fetch(...args);
|
|
7
3
|
const LANGSMITH_FETCH_IMPLEMENTATION_KEY = Symbol.for("lg:fetch_implementation");
|
|
8
4
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
* Overrides the fetch implementation used for LangSmith calls.
|
|
6
|
+
* You should use this if you need to use an implementation of fetch
|
|
7
|
+
* other than the default global (e.g. for dealing with proxies).
|
|
8
|
+
* @param fetch The new fetch function to use.
|
|
9
|
+
*/
|
|
10
|
+
const overrideFetchImplementation = (fetch$1) => {
|
|
11
|
+
globalThis[LANGSMITH_FETCH_IMPLEMENTATION_KEY] = fetch$1;
|
|
16
12
|
};
|
|
17
13
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
DEFAULT_FETCH_IMPLEMENTATION);
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
const _getFetchImplementation = () => {
|
|
17
|
+
return globalThis[LANGSMITH_FETCH_IMPLEMENTATION_KEY] ?? DEFAULT_FETCH_IMPLEMENTATION;
|
|
23
18
|
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { _getFetchImplementation, overrideFetchImplementation };
|
|
22
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.js","names":["fetch","_getFetchImplementation: () => (...args: any[]) => any"],"sources":["../../src/singletons/fetch.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n// Wrap the default fetch call due to issues with illegal invocations\n// in some environments:\n// https://stackoverflow.com/questions/69876859/why-does-bind-fix-failed-to-execute-fetch-on-window-illegal-invocation-err\n// @ts-expect-error Broad typing to support a range of fetch implementations\nconst DEFAULT_FETCH_IMPLEMENTATION = (...args: any[]) => fetch(...args);\n\nconst LANGSMITH_FETCH_IMPLEMENTATION_KEY = Symbol.for(\n \"lg:fetch_implementation\"\n);\n\n/**\n * Overrides the fetch implementation used for LangSmith calls.\n * You should use this if you need to use an implementation of fetch\n * other than the default global (e.g. for dealing with proxies).\n * @param fetch The new fetch function to use.\n */\nexport const overrideFetchImplementation = (fetch: (...args: any[]) => any) => {\n (globalThis as any)[LANGSMITH_FETCH_IMPLEMENTATION_KEY] = fetch;\n};\n\n/**\n * @internal\n */\nexport const _getFetchImplementation: () => (...args: any[]) => any = () => {\n return (\n (globalThis as any)[LANGSMITH_FETCH_IMPLEMENTATION_KEY] ??\n DEFAULT_FETCH_IMPLEMENTATION\n );\n};\n"],"mappings":";AAKA,MAAM,gCAAgC,GAAG,SAAgB,MAAM,GAAG;AAElE,MAAM,qCAAqC,OAAO,IAChD;;;;;;;AASF,MAAa,+BAA+B,YAAmC;AAC7E,CAAC,WAAmB,sCAAsCA;;;;;AAM5D,MAAaC,gCAA+D;AAC1E,QACG,WAAmB,uCACpB"}
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Checkpoint, Config, Metadata } from "./schema.cjs";
|
|
2
|
+
import { StreamMode } from "./types.stream.cjs";
|
|
3
|
+
import { LangChainTracer } from "@langchain/core/tracers/tracer_langchain";
|
|
4
|
+
|
|
5
|
+
//#region src/types.d.ts
|
|
6
|
+
type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
|
|
7
|
+
type OnConflictBehavior = "raise" | "do_nothing";
|
|
8
|
+
type OnCompletionBehavior = "complete" | "continue";
|
|
9
|
+
type DisconnectMode = "cancel" | "continue";
|
|
10
|
+
type Durability = "exit" | "async" | "sync";
|
|
11
|
+
type StreamEvent = "events" | "metadata" | "debug" | "updates" | "values" | "messages/partial" | "messages/metadata" | "messages/complete" | "messages" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
|
|
12
|
+
interface Send {
|
|
13
|
+
node: string;
|
|
14
|
+
input: unknown | null;
|
|
15
|
+
}
|
|
16
|
+
interface Command {
|
|
17
|
+
/**
|
|
18
|
+
* An object to update the thread state with.
|
|
19
|
+
*/
|
|
20
|
+
update?: Record<string, unknown> | [string, unknown][] | null;
|
|
21
|
+
/**
|
|
22
|
+
* The value to return from an `interrupt` function call.
|
|
23
|
+
*/
|
|
24
|
+
resume?: unknown;
|
|
25
|
+
/**
|
|
26
|
+
* Determine the next node to navigate to. Can be one of the following:
|
|
27
|
+
* - Name(s) of the node names to navigate to next.
|
|
28
|
+
* - `Send` command(s) to execute node(s) with provided input.
|
|
29
|
+
*/
|
|
30
|
+
goto?: Send | Send[] | string | string[];
|
|
31
|
+
}
|
|
32
|
+
interface RunsInvokePayload {
|
|
33
|
+
/**
|
|
34
|
+
* Input to the run. Pass `null` to resume from the current state of the thread.
|
|
35
|
+
*/
|
|
36
|
+
input?: Record<string, unknown> | null;
|
|
37
|
+
/**
|
|
38
|
+
* Metadata for the run.
|
|
39
|
+
*/
|
|
40
|
+
metadata?: Metadata;
|
|
41
|
+
/**
|
|
42
|
+
* Additional configuration for the run.
|
|
43
|
+
*/
|
|
44
|
+
config?: Config;
|
|
45
|
+
/**
|
|
46
|
+
* Static context to add to the assistant.
|
|
47
|
+
* @remarks Added in LangGraph.js 0.4
|
|
48
|
+
*/
|
|
49
|
+
context?: unknown;
|
|
50
|
+
/**
|
|
51
|
+
* Checkpoint ID for when creating a new run.
|
|
52
|
+
*/
|
|
53
|
+
checkpointId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Checkpoint for when creating a new run.
|
|
56
|
+
*/
|
|
57
|
+
checkpoint?: Omit<Checkpoint, "thread_id">;
|
|
58
|
+
/**
|
|
59
|
+
* Whether to checkpoint during the run (or only at the end/interruption).
|
|
60
|
+
* @deprecated Use `durability` instead.
|
|
61
|
+
*/
|
|
62
|
+
checkpointDuring?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to checkpoint during the run (or only at the end/interruption).
|
|
65
|
+
* - `"async"`: Save checkpoint asynchronously while the next step executes (default).
|
|
66
|
+
* - `"sync"`: Save checkpoint synchronously before the next step starts.
|
|
67
|
+
* - `"exit"`: Save checkpoint only when the graph exits.
|
|
68
|
+
* @default "async"
|
|
69
|
+
*/
|
|
70
|
+
durability?: Durability;
|
|
71
|
+
/**
|
|
72
|
+
* Interrupt execution before entering these nodes.
|
|
73
|
+
*/
|
|
74
|
+
interruptBefore?: "*" | string[];
|
|
75
|
+
/**
|
|
76
|
+
* Interrupt execution after leaving these nodes.
|
|
77
|
+
*/
|
|
78
|
+
interruptAfter?: "*" | string[];
|
|
79
|
+
/**
|
|
80
|
+
* Strategy to handle concurrent runs on the same thread. Only relevant if
|
|
81
|
+
* there is a pending/inflight run on the same thread. One of:
|
|
82
|
+
* - "reject": Reject the new run.
|
|
83
|
+
* - "interrupt": Interrupt the current run, keeping steps completed until now,
|
|
84
|
+
and start a new one.
|
|
85
|
+
* - "rollback": Cancel and delete the existing run, rolling back the thread to
|
|
86
|
+
the state before it had started, then start the new run.
|
|
87
|
+
* - "enqueue": Queue up the new run to start after the current run finishes.
|
|
88
|
+
*/
|
|
89
|
+
multitaskStrategy?: MultitaskStrategy;
|
|
90
|
+
/**
|
|
91
|
+
* Abort controller signal to cancel the run.
|
|
92
|
+
*/
|
|
93
|
+
signal?: AbortController["signal"];
|
|
94
|
+
/**
|
|
95
|
+
* Behavior to handle run completion. Only relevant if
|
|
96
|
+
* there is a pending/inflight run on the same thread. One of:
|
|
97
|
+
* - "complete": Complete the run.
|
|
98
|
+
* - "continue": Continue the run.
|
|
99
|
+
*/
|
|
100
|
+
onCompletion?: OnCompletionBehavior;
|
|
101
|
+
/**
|
|
102
|
+
* Webhook to call when the run is complete.
|
|
103
|
+
*/
|
|
104
|
+
webhook?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Behavior to handle disconnection. Only relevant if
|
|
107
|
+
* there is a pending/inflight run on the same thread. One of:
|
|
108
|
+
* - "cancel": Cancel the run.
|
|
109
|
+
* - "continue": Continue the run.
|
|
110
|
+
*/
|
|
111
|
+
onDisconnect?: DisconnectMode;
|
|
112
|
+
/**
|
|
113
|
+
* The number of seconds to wait before starting the run.
|
|
114
|
+
* Use to schedule future runs.
|
|
115
|
+
*/
|
|
116
|
+
afterSeconds?: number;
|
|
117
|
+
/**
|
|
118
|
+
* Behavior if the specified run doesn't exist. Defaults to "reject".
|
|
119
|
+
*/
|
|
120
|
+
ifNotExists?: "create" | "reject";
|
|
121
|
+
/**
|
|
122
|
+
* One or more commands to invoke the graph with.
|
|
123
|
+
*/
|
|
124
|
+
command?: Command;
|
|
125
|
+
/**
|
|
126
|
+
* Callback when a run is created.
|
|
127
|
+
*/
|
|
128
|
+
onRunCreated?: (params: {
|
|
129
|
+
run_id: string;
|
|
130
|
+
thread_id?: string;
|
|
131
|
+
}) => void;
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* For LangSmith tracing purposes only. Not part of the public API.
|
|
135
|
+
*/
|
|
136
|
+
_langsmithTracer?: LangChainTracer;
|
|
137
|
+
}
|
|
138
|
+
interface RunsStreamPayload<TStreamMode extends StreamMode | StreamMode[] = [], TSubgraphs extends boolean = false> extends RunsInvokePayload {
|
|
139
|
+
/**
|
|
140
|
+
* One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
|
|
141
|
+
*/
|
|
142
|
+
streamMode?: TStreamMode;
|
|
143
|
+
/**
|
|
144
|
+
* Stream output from subgraphs. By default, streams only the top graph.
|
|
145
|
+
*/
|
|
146
|
+
streamSubgraphs?: TSubgraphs;
|
|
147
|
+
/**
|
|
148
|
+
* Whether the stream is considered resumable.
|
|
149
|
+
* If true, the stream can be resumed and replayed in its entirety even after disconnection.
|
|
150
|
+
*/
|
|
151
|
+
streamResumable?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Pass one or more feedbackKeys if you want to request short-lived signed URLs
|
|
154
|
+
* for submitting feedback to LangSmith with this key for this run.
|
|
155
|
+
*/
|
|
156
|
+
feedbackKeys?: string[];
|
|
157
|
+
}
|
|
158
|
+
interface RunsCreatePayload extends RunsInvokePayload {
|
|
159
|
+
/**
|
|
160
|
+
* One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
|
|
161
|
+
*/
|
|
162
|
+
streamMode?: StreamMode | Array<StreamMode>;
|
|
163
|
+
/**
|
|
164
|
+
* Stream output from subgraphs. By default, streams only the top graph.
|
|
165
|
+
*/
|
|
166
|
+
streamSubgraphs?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Whether the stream is considered resumable.
|
|
169
|
+
* If true, the stream can be resumed and replayed in its entirety even after disconnection.
|
|
170
|
+
*/
|
|
171
|
+
streamResumable?: boolean;
|
|
172
|
+
}
|
|
173
|
+
interface CronsCreatePayload extends RunsCreatePayload {
|
|
174
|
+
/**
|
|
175
|
+
* Schedule for running the Cron Job
|
|
176
|
+
*/
|
|
177
|
+
schedule: string;
|
|
178
|
+
}
|
|
179
|
+
interface RunsWaitPayload extends RunsStreamPayload {
|
|
180
|
+
/**
|
|
181
|
+
* Raise errors returned by the run. Default is `true`.
|
|
182
|
+
*/
|
|
183
|
+
raiseError?: boolean;
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
export { Command, CronsCreatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent };
|
|
187
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":["LangChainTracer","Checkpoint","Config","Metadata","StreamMode","MultitaskStrategy","OnConflictBehavior","OnCompletionBehavior","DisconnectMode","Durability","StreamEvent","Send","Command","Record","RunsInvokePayload","Omit","AbortController","RunsStreamPayload","TStreamMode","TSubgraphs","RunsCreatePayload","Array","CronsCreatePayload","RunsWaitPayload"],"sources":["../src/types.d.ts"],"sourcesContent":["import { LangChainTracer } from \"@langchain/core/tracers/tracer_langchain\";\nimport { Checkpoint, Config, Metadata } from \"./schema.js\";\nimport { StreamMode } from \"./types.stream.js\";\nexport type MultitaskStrategy = \"reject\" | \"interrupt\" | \"rollback\" | \"enqueue\";\nexport type OnConflictBehavior = \"raise\" | \"do_nothing\";\nexport type OnCompletionBehavior = \"complete\" | \"continue\";\nexport type DisconnectMode = \"cancel\" | \"continue\";\nexport type Durability = \"exit\" | \"async\" | \"sync\";\nexport type StreamEvent = \"events\" | \"metadata\" | \"debug\" | \"updates\" | \"values\" | \"messages/partial\" | \"messages/metadata\" | \"messages/complete\" | \"messages\" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types\nexport interface Send {\n node: string;\n input: unknown | null;\n}\nexport interface Command {\n /**\n * An object to update the thread state with.\n */\n update?: Record<string, unknown> | [string, unknown][] | null;\n /**\n * The value to return from an `interrupt` function call.\n */\n resume?: unknown;\n /**\n * Determine the next node to navigate to. Can be one of the following:\n * - Name(s) of the node names to navigate to next.\n * - `Send` command(s) to execute node(s) with provided input.\n */\n goto?: Send | Send[] | string | string[];\n}\nexport interface RunsInvokePayload {\n /**\n * Input to the run. Pass `null` to resume from the current state of the thread.\n */\n input?: Record<string, unknown> | null;\n /**\n * Metadata for the run.\n */\n metadata?: Metadata;\n /**\n * Additional configuration for the run.\n */\n config?: Config;\n /**\n * Static context to add to the assistant.\n * @remarks Added in LangGraph.js 0.4\n */\n context?: unknown;\n /**\n * Checkpoint ID for when creating a new run.\n */\n checkpointId?: string;\n /**\n * Checkpoint for when creating a new run.\n */\n checkpoint?: Omit<Checkpoint, \"thread_id\">;\n /**\n * Whether to checkpoint during the run (or only at the end/interruption).\n * @deprecated Use `durability` instead.\n */\n checkpointDuring?: boolean;\n /**\n * Whether to checkpoint during the run (or only at the end/interruption).\n * - `\"async\"`: Save checkpoint asynchronously while the next step executes (default).\n * - `\"sync\"`: Save checkpoint synchronously before the next step starts.\n * - `\"exit\"`: Save checkpoint only when the graph exits.\n * @default \"async\"\n */\n durability?: Durability;\n /**\n * Interrupt execution before entering these nodes.\n */\n interruptBefore?: \"*\" | string[];\n /**\n * Interrupt execution after leaving these nodes.\n */\n interruptAfter?: \"*\" | string[];\n /**\n * Strategy to handle concurrent runs on the same thread. Only relevant if\n * there is a pending/inflight run on the same thread. One of:\n * - \"reject\": Reject the new run.\n * - \"interrupt\": Interrupt the current run, keeping steps completed until now,\n and start a new one.\n * - \"rollback\": Cancel and delete the existing run, rolling back the thread to\n the state before it had started, then start the new run.\n * - \"enqueue\": Queue up the new run to start after the current run finishes.\n */\n multitaskStrategy?: MultitaskStrategy;\n /**\n * Abort controller signal to cancel the run.\n */\n signal?: AbortController[\"signal\"];\n /**\n * Behavior to handle run completion. Only relevant if\n * there is a pending/inflight run on the same thread. One of:\n * - \"complete\": Complete the run.\n * - \"continue\": Continue the run.\n */\n onCompletion?: OnCompletionBehavior;\n /**\n * Webhook to call when the run is complete.\n */\n webhook?: string;\n /**\n * Behavior to handle disconnection. Only relevant if\n * there is a pending/inflight run on the same thread. One of:\n * - \"cancel\": Cancel the run.\n * - \"continue\": Continue the run.\n */\n onDisconnect?: DisconnectMode;\n /**\n * The number of seconds to wait before starting the run.\n * Use to schedule future runs.\n */\n afterSeconds?: number;\n /**\n * Behavior if the specified run doesn't exist. Defaults to \"reject\".\n */\n ifNotExists?: \"create\" | \"reject\";\n /**\n * One or more commands to invoke the graph with.\n */\n command?: Command;\n /**\n * Callback when a run is created.\n */\n onRunCreated?: (params: {\n run_id: string;\n thread_id?: string;\n }) => void;\n /**\n * @internal\n * For LangSmith tracing purposes only. Not part of the public API.\n */\n _langsmithTracer?: LangChainTracer;\n}\nexport interface RunsStreamPayload<TStreamMode extends StreamMode | StreamMode[] = [], TSubgraphs extends boolean = false> extends RunsInvokePayload {\n /**\n * One of `\"values\"`, `\"messages\"`, `\"messages-tuple\"`, `\"updates\"`, `\"events\"`, `\"debug\"`, `\"custom\"`.\n */\n streamMode?: TStreamMode;\n /**\n * Stream output from subgraphs. By default, streams only the top graph.\n */\n streamSubgraphs?: TSubgraphs;\n /**\n * Whether the stream is considered resumable.\n * If true, the stream can be resumed and replayed in its entirety even after disconnection.\n */\n streamResumable?: boolean;\n /**\n * Pass one or more feedbackKeys if you want to request short-lived signed URLs\n * for submitting feedback to LangSmith with this key for this run.\n */\n feedbackKeys?: string[];\n}\nexport interface RunsCreatePayload extends RunsInvokePayload {\n /**\n * One of `\"values\"`, `\"messages\"`, `\"messages-tuple\"`, `\"updates\"`, `\"events\"`, `\"debug\"`, `\"custom\"`.\n */\n streamMode?: StreamMode | Array<StreamMode>;\n /**\n * Stream output from subgraphs. By default, streams only the top graph.\n */\n streamSubgraphs?: boolean;\n /**\n * Whether the stream is considered resumable.\n * If true, the stream can be resumed and replayed in its entirety even after disconnection.\n */\n streamResumable?: boolean;\n}\nexport interface CronsCreatePayload extends RunsCreatePayload {\n /**\n * Schedule for running the Cron Job\n */\n schedule: string;\n}\nexport interface RunsWaitPayload extends RunsStreamPayload {\n /**\n * Raise errors returned by the run. Default is `true`.\n */\n raiseError?: boolean;\n}\n"],"mappings":";;;;;KAGYK,iBAAAA;KACAC,kBAAAA;AADAD,KAEAE,oBAAAA,GAFiB,UAAA,GAAA,UAAA;AACjBD,KAEAE,cAAAA,GAFkB,QAAA,GAAA,UAAA;AAClBD,KAEAE,UAAAA,GAFAF,MAAoB,GAAA,OAAA,GAAA,MAAA;AACpBC,KAEAE,WAAAA,GAFc,QAAA,GAAA,UAAA,GAAA,OAAA,GAAA,SAAA,GAAA,QAAA,GAAA,kBAAA,GAAA,mBAAA,GAAA,mBAAA,GAAA,UAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACdD,UAEKE,IAAAA,CAFK;EACVD,IAAAA,EAAAA,MAAAA;EACKC,KAAAA,EAAI,OAAA,GAAA,IAAA;AAIrB;AAAwB,UAAPC,OAAAA,CAAO;;;;WAIXC;EAYIC;;;QAQFX,CAAAA,EAAAA,OAAAA;;;;;;MAqDFa,CAAAA,EA/DFL,IA+DEK,GA/DKL,IA+DLK,EAAAA,GAAAA,MAAAA,GAAAA,MAAAA,EAAAA;;AAkBMR,UA/EFM,iBAAAA,CA+EEN;;;;EA2BFS,KAAAA,CAAAA,EAtGLJ,MAsGKI,CAAAA,MAAiB,EAAA,OAAA,CAAA,GAAA,IAAA;EAAA;;;UAIjBC,CAAAA,EAtGFf,QAsGEe;;;;EAgBAE,MAAAA,CAAAA,EAlHJlB,MAkHIkB;EAAiB;;;;SAASN,CAAAA,EAAAA,OAAAA;;AAe3C;AAMA;;;;;eA1HiBC,KAAKd;;;;;;;;;;;;;eAaLQ;;;;;;;;;;;;;;;;;;;sBAmBOJ;;;;WAIXW;;;;;;;iBAOMT;;;;;;;;;;;iBAWAC;;;;;;;;;;;;;YAaLI;;;;;;;;;;;;qBAYSZ;;UAENiB,sCAAsCb,aAAaA,+DAA+DU;;;;eAIlHI;;;;oBAIKC;;;;;;;;;;;;UAYLC,iBAAAA,SAA0BN;;;;eAI1BV,aAAaiB,MAAMjB;;;;;;;;;;;UAWnBkB,kBAAAA,SAA2BF;;;;;;UAM3BG,eAAAA,SAAwBN"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,182 +1,187 @@
|
|
|
1
|
-
import { LangChainTracer } from "@langchain/core/tracers/tracer_langchain";
|
|
2
1
|
import { Checkpoint, Config, Metadata } from "./schema.js";
|
|
3
2
|
import { StreamMode } from "./types.stream.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { LangChainTracer } from "@langchain/core/tracers/tracer_langchain";
|
|
4
|
+
|
|
5
|
+
//#region src/types.d.ts
|
|
6
|
+
type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
|
|
7
|
+
type OnConflictBehavior = "raise" | "do_nothing";
|
|
8
|
+
type OnCompletionBehavior = "complete" | "continue";
|
|
9
|
+
type DisconnectMode = "cancel" | "continue";
|
|
10
|
+
type Durability = "exit" | "async" | "sync";
|
|
11
|
+
type StreamEvent = "events" | "metadata" | "debug" | "updates" | "values" | "messages/partial" | "messages/metadata" | "messages/complete" | "messages" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
|
|
12
|
+
interface Send {
|
|
13
|
+
node: string;
|
|
14
|
+
input: unknown | null;
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
interface Command {
|
|
17
|
+
/**
|
|
18
|
+
* An object to update the thread state with.
|
|
19
|
+
*/
|
|
20
|
+
update?: Record<string, unknown> | [string, unknown][] | null;
|
|
21
|
+
/**
|
|
22
|
+
* The value to return from an `interrupt` function call.
|
|
23
|
+
*/
|
|
24
|
+
resume?: unknown;
|
|
25
|
+
/**
|
|
26
|
+
* Determine the next node to navigate to. Can be one of the following:
|
|
27
|
+
* - Name(s) of the node names to navigate to next.
|
|
28
|
+
* - `Send` command(s) to execute node(s) with provided input.
|
|
29
|
+
*/
|
|
30
|
+
goto?: Send | Send[] | string | string[];
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
32
|
+
interface RunsInvokePayload {
|
|
33
|
+
/**
|
|
34
|
+
* Input to the run. Pass `null` to resume from the current state of the thread.
|
|
35
|
+
*/
|
|
36
|
+
input?: Record<string, unknown> | null;
|
|
37
|
+
/**
|
|
38
|
+
* Metadata for the run.
|
|
39
|
+
*/
|
|
40
|
+
metadata?: Metadata;
|
|
41
|
+
/**
|
|
42
|
+
* Additional configuration for the run.
|
|
43
|
+
*/
|
|
44
|
+
config?: Config;
|
|
45
|
+
/**
|
|
46
|
+
* Static context to add to the assistant.
|
|
47
|
+
* @remarks Added in LangGraph.js 0.4
|
|
48
|
+
*/
|
|
49
|
+
context?: unknown;
|
|
50
|
+
/**
|
|
51
|
+
* Checkpoint ID for when creating a new run.
|
|
52
|
+
*/
|
|
53
|
+
checkpointId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Checkpoint for when creating a new run.
|
|
56
|
+
*/
|
|
57
|
+
checkpoint?: Omit<Checkpoint, "thread_id">;
|
|
58
|
+
/**
|
|
59
|
+
* Whether to checkpoint during the run (or only at the end/interruption).
|
|
60
|
+
* @deprecated Use `durability` instead.
|
|
61
|
+
*/
|
|
62
|
+
checkpointDuring?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to checkpoint during the run (or only at the end/interruption).
|
|
65
|
+
* - `"async"`: Save checkpoint asynchronously while the next step executes (default).
|
|
66
|
+
* - `"sync"`: Save checkpoint synchronously before the next step starts.
|
|
67
|
+
* - `"exit"`: Save checkpoint only when the graph exits.
|
|
68
|
+
* @default "async"
|
|
69
|
+
*/
|
|
70
|
+
durability?: Durability;
|
|
71
|
+
/**
|
|
72
|
+
* Interrupt execution before entering these nodes.
|
|
73
|
+
*/
|
|
74
|
+
interruptBefore?: "*" | string[];
|
|
75
|
+
/**
|
|
76
|
+
* Interrupt execution after leaving these nodes.
|
|
77
|
+
*/
|
|
78
|
+
interruptAfter?: "*" | string[];
|
|
79
|
+
/**
|
|
80
|
+
* Strategy to handle concurrent runs on the same thread. Only relevant if
|
|
81
|
+
* there is a pending/inflight run on the same thread. One of:
|
|
82
|
+
* - "reject": Reject the new run.
|
|
83
|
+
* - "interrupt": Interrupt the current run, keeping steps completed until now,
|
|
84
|
+
and start a new one.
|
|
85
|
+
* - "rollback": Cancel and delete the existing run, rolling back the thread to
|
|
86
|
+
the state before it had started, then start the new run.
|
|
87
|
+
* - "enqueue": Queue up the new run to start after the current run finishes.
|
|
88
|
+
*/
|
|
89
|
+
multitaskStrategy?: MultitaskStrategy;
|
|
90
|
+
/**
|
|
91
|
+
* Abort controller signal to cancel the run.
|
|
92
|
+
*/
|
|
93
|
+
signal?: AbortController["signal"];
|
|
94
|
+
/**
|
|
95
|
+
* Behavior to handle run completion. Only relevant if
|
|
96
|
+
* there is a pending/inflight run on the same thread. One of:
|
|
97
|
+
* - "complete": Complete the run.
|
|
98
|
+
* - "continue": Continue the run.
|
|
99
|
+
*/
|
|
100
|
+
onCompletion?: OnCompletionBehavior;
|
|
101
|
+
/**
|
|
102
|
+
* Webhook to call when the run is complete.
|
|
103
|
+
*/
|
|
104
|
+
webhook?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Behavior to handle disconnection. Only relevant if
|
|
107
|
+
* there is a pending/inflight run on the same thread. One of:
|
|
108
|
+
* - "cancel": Cancel the run.
|
|
109
|
+
* - "continue": Continue the run.
|
|
110
|
+
*/
|
|
111
|
+
onDisconnect?: DisconnectMode;
|
|
112
|
+
/**
|
|
113
|
+
* The number of seconds to wait before starting the run.
|
|
114
|
+
* Use to schedule future runs.
|
|
115
|
+
*/
|
|
116
|
+
afterSeconds?: number;
|
|
117
|
+
/**
|
|
118
|
+
* Behavior if the specified run doesn't exist. Defaults to "reject".
|
|
119
|
+
*/
|
|
120
|
+
ifNotExists?: "create" | "reject";
|
|
121
|
+
/**
|
|
122
|
+
* One or more commands to invoke the graph with.
|
|
123
|
+
*/
|
|
124
|
+
command?: Command;
|
|
125
|
+
/**
|
|
126
|
+
* Callback when a run is created.
|
|
127
|
+
*/
|
|
128
|
+
onRunCreated?: (params: {
|
|
129
|
+
run_id: string;
|
|
130
|
+
thread_id?: string;
|
|
131
|
+
}) => void;
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* For LangSmith tracing purposes only. Not part of the public API.
|
|
135
|
+
*/
|
|
136
|
+
_langsmithTracer?: LangChainTracer;
|
|
135
137
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
138
|
+
interface RunsStreamPayload<TStreamMode extends StreamMode | StreamMode[] = [], TSubgraphs extends boolean = false> extends RunsInvokePayload {
|
|
139
|
+
/**
|
|
140
|
+
* One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
|
|
141
|
+
*/
|
|
142
|
+
streamMode?: TStreamMode;
|
|
143
|
+
/**
|
|
144
|
+
* Stream output from subgraphs. By default, streams only the top graph.
|
|
145
|
+
*/
|
|
146
|
+
streamSubgraphs?: TSubgraphs;
|
|
147
|
+
/**
|
|
148
|
+
* Whether the stream is considered resumable.
|
|
149
|
+
* If true, the stream can be resumed and replayed in its entirety even after disconnection.
|
|
150
|
+
*/
|
|
151
|
+
streamResumable?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Pass one or more feedbackKeys if you want to request short-lived signed URLs
|
|
154
|
+
* for submitting feedback to LangSmith with this key for this run.
|
|
155
|
+
*/
|
|
156
|
+
feedbackKeys?: string[];
|
|
155
157
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
158
|
+
interface RunsCreatePayload extends RunsInvokePayload {
|
|
159
|
+
/**
|
|
160
|
+
* One of `"values"`, `"messages"`, `"messages-tuple"`, `"updates"`, `"events"`, `"debug"`, `"custom"`.
|
|
161
|
+
*/
|
|
162
|
+
streamMode?: StreamMode | Array<StreamMode>;
|
|
163
|
+
/**
|
|
164
|
+
* Stream output from subgraphs. By default, streams only the top graph.
|
|
165
|
+
*/
|
|
166
|
+
streamSubgraphs?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Whether the stream is considered resumable.
|
|
169
|
+
* If true, the stream can be resumed and replayed in its entirety even after disconnection.
|
|
170
|
+
*/
|
|
171
|
+
streamResumable?: boolean;
|
|
170
172
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
interface CronsCreatePayload extends RunsCreatePayload {
|
|
174
|
+
/**
|
|
175
|
+
* Schedule for running the Cron Job
|
|
176
|
+
*/
|
|
177
|
+
schedule: string;
|
|
176
178
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
interface RunsWaitPayload extends RunsStreamPayload {
|
|
180
|
+
/**
|
|
181
|
+
* Raise errors returned by the run. Default is `true`.
|
|
182
|
+
*/
|
|
183
|
+
raiseError?: boolean;
|
|
182
184
|
}
|
|
185
|
+
//#endregion
|
|
186
|
+
export { Command, CronsCreatePayload, DisconnectMode, Durability, MultitaskStrategy, OnCompletionBehavior, OnConflictBehavior, RunsCreatePayload, RunsInvokePayload, RunsStreamPayload, RunsWaitPayload, StreamEvent };
|
|
187
|
+
//# sourceMappingURL=types.d.ts.map
|