@langchain/langgraph-sdk 1.3.1 → 1.4.4
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/package.json +5 -5
- package/CHANGELOG.md +0 -281
- package/dist/_virtual/rolldown_runtime.cjs +0 -25
- package/dist/auth/error.cjs +0 -79
- package/dist/auth/error.cjs.map +0 -1
- package/dist/auth/error.d.cts +0 -13
- package/dist/auth/error.d.cts.map +0 -1
- package/dist/auth/error.d.ts +0 -13
- package/dist/auth/error.d.ts.map +0 -1
- package/dist/auth/error.js +0 -78
- package/dist/auth/error.js.map +0 -1
- package/dist/auth/index.cjs +0 -39
- package/dist/auth/index.cjs.map +0 -1
- package/dist/auth/index.d.cts +0 -31
- package/dist/auth/index.d.cts.map +0 -1
- package/dist/auth/index.d.ts +0 -31
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -37
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/types.d.cts +0 -294
- package/dist/auth/types.d.cts.map +0 -1
- package/dist/auth/types.d.ts +0 -294
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/client.cjs +0 -1219
- package/dist/client.cjs.map +0 -1
- package/dist/client.d.cts +0 -803
- package/dist/client.d.cts.map +0 -1
- package/dist/client.d.ts +0 -803
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -1212
- package/dist/client.js.map +0 -1
- package/dist/index.cjs +0 -6
- package/dist/index.d.cts +0 -7
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -4
- package/dist/logging/index.cjs +0 -35
- package/dist/logging/index.cjs.map +0 -1
- package/dist/logging/index.d.cts +0 -47
- package/dist/logging/index.d.cts.map +0 -1
- package/dist/logging/index.d.ts +0 -47
- package/dist/logging/index.d.ts.map +0 -1
- package/dist/logging/index.js +0 -34
- package/dist/logging/index.js.map +0 -1
- package/dist/react/index.cjs +0 -5
- package/dist/react/index.d.cts +0 -4
- package/dist/react/index.d.ts +0 -4
- package/dist/react/index.js +0 -4
- package/dist/react/stream.cjs +0 -18
- package/dist/react/stream.cjs.map +0 -1
- package/dist/react/stream.custom.cjs +0 -129
- package/dist/react/stream.custom.cjs.map +0 -1
- package/dist/react/stream.custom.d.cts +0 -39
- package/dist/react/stream.custom.d.cts.map +0 -1
- package/dist/react/stream.custom.d.ts +0 -39
- package/dist/react/stream.custom.d.ts.map +0 -1
- package/dist/react/stream.custom.js +0 -127
- package/dist/react/stream.custom.js.map +0 -1
- package/dist/react/stream.d.cts +0 -73
- package/dist/react/stream.d.cts.map +0 -1
- package/dist/react/stream.d.ts +0 -73
- package/dist/react/stream.d.ts.map +0 -1
- package/dist/react/stream.js +0 -17
- package/dist/react/stream.js.map +0 -1
- package/dist/react/stream.lgp.cjs +0 -446
- package/dist/react/stream.lgp.cjs.map +0 -1
- package/dist/react/stream.lgp.js +0 -445
- package/dist/react/stream.lgp.js.map +0 -1
- package/dist/react/thread.cjs +0 -22
- package/dist/react/thread.cjs.map +0 -1
- package/dist/react/thread.js +0 -21
- package/dist/react/thread.js.map +0 -1
- package/dist/react/types.d.cts +0 -363
- package/dist/react/types.d.cts.map +0 -1
- package/dist/react/types.d.ts +0 -363
- package/dist/react/types.d.ts.map +0 -1
- package/dist/react-ui/client.cjs +0 -137
- package/dist/react-ui/client.cjs.map +0 -1
- package/dist/react-ui/client.d.cts +0 -90
- package/dist/react-ui/client.d.cts.map +0 -1
- package/dist/react-ui/client.d.ts +0 -90
- package/dist/react-ui/client.d.ts.map +0 -1
- package/dist/react-ui/client.js +0 -134
- package/dist/react-ui/client.js.map +0 -1
- package/dist/react-ui/index.cjs +0 -14
- package/dist/react-ui/index.cjs.map +0 -1
- package/dist/react-ui/index.d.cts +0 -3
- package/dist/react-ui/index.d.ts +0 -3
- package/dist/react-ui/index.js +0 -9
- package/dist/react-ui/index.js.map +0 -1
- package/dist/react-ui/server/index.cjs +0 -5
- package/dist/react-ui/server/index.d.cts +0 -3
- package/dist/react-ui/server/index.d.ts +0 -3
- package/dist/react-ui/server/index.js +0 -4
- package/dist/react-ui/server/server.cjs +0 -57
- package/dist/react-ui/server/server.cjs.map +0 -1
- package/dist/react-ui/server/server.d.cts +0 -55
- package/dist/react-ui/server/server.d.cts.map +0 -1
- package/dist/react-ui/server/server.d.ts +0 -55
- package/dist/react-ui/server/server.d.ts.map +0 -1
- package/dist/react-ui/server/server.js +0 -56
- package/dist/react-ui/server/server.js.map +0 -1
- package/dist/react-ui/types.cjs +0 -38
- package/dist/react-ui/types.cjs.map +0 -1
- package/dist/react-ui/types.d.cts +0 -25
- package/dist/react-ui/types.d.cts.map +0 -1
- package/dist/react-ui/types.d.ts +0 -25
- package/dist/react-ui/types.d.ts.map +0 -1
- package/dist/react-ui/types.js +0 -35
- package/dist/react-ui/types.js.map +0 -1
- package/dist/schema.d.cts +0 -284
- package/dist/schema.d.cts.map +0 -1
- package/dist/schema.d.ts +0 -284
- package/dist/schema.d.ts.map +0 -1
- package/dist/singletons/fetch.cjs +0 -24
- package/dist/singletons/fetch.cjs.map +0 -1
- package/dist/singletons/fetch.d.cts +0 -14
- package/dist/singletons/fetch.d.cts.map +0 -1
- package/dist/singletons/fetch.d.ts +0 -14
- package/dist/singletons/fetch.d.ts.map +0 -1
- package/dist/singletons/fetch.js +0 -22
- package/dist/singletons/fetch.js.map +0 -1
- package/dist/types.d.cts +0 -187
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.ts +0 -187
- package/dist/types.d.ts.map +0 -1
- package/dist/types.messages.d.cts +0 -91
- package/dist/types.messages.d.cts.map +0 -1
- package/dist/types.messages.d.ts +0 -91
- package/dist/types.messages.d.ts.map +0 -1
- package/dist/types.stream.d.cts +0 -235
- package/dist/types.stream.d.cts.map +0 -1
- package/dist/types.stream.d.ts +0 -235
- package/dist/types.stream.d.ts.map +0 -1
- package/dist/ui/branching.cjs +0 -153
- package/dist/ui/branching.cjs.map +0 -1
- package/dist/ui/branching.d.cts +0 -22
- package/dist/ui/branching.d.cts.map +0 -1
- package/dist/ui/branching.d.ts +0 -22
- package/dist/ui/branching.d.ts.map +0 -1
- package/dist/ui/branching.js +0 -152
- package/dist/ui/branching.js.map +0 -1
- package/dist/ui/errors.cjs +0 -15
- package/dist/ui/errors.cjs.map +0 -1
- package/dist/ui/errors.js +0 -14
- package/dist/ui/errors.js.map +0 -1
- package/dist/ui/manager.cjs +0 -182
- package/dist/ui/manager.cjs.map +0 -1
- package/dist/ui/manager.js +0 -182
- package/dist/ui/manager.js.map +0 -1
- package/dist/ui/messages.cjs +0 -70
- package/dist/ui/messages.cjs.map +0 -1
- package/dist/ui/messages.js +0 -68
- package/dist/ui/messages.js.map +0 -1
- package/dist/ui/utils.cjs +0 -14
- package/dist/ui/utils.cjs.map +0 -1
- package/dist/ui/utils.js +0 -12
- package/dist/ui/utils.js.map +0 -1
- package/dist/utils/async_caller.cjs +0 -111
- package/dist/utils/async_caller.cjs.map +0 -1
- package/dist/utils/async_caller.d.cts +0 -53
- package/dist/utils/async_caller.d.cts.map +0 -1
- package/dist/utils/async_caller.d.ts +0 -53
- package/dist/utils/async_caller.d.ts.map +0 -1
- package/dist/utils/async_caller.js +0 -110
- package/dist/utils/async_caller.js.map +0 -1
- package/dist/utils/env.cjs +0 -13
- package/dist/utils/env.cjs.map +0 -1
- package/dist/utils/env.js +0 -12
- package/dist/utils/env.js.map +0 -1
- package/dist/utils/error.cjs +0 -17
- package/dist/utils/error.cjs.map +0 -1
- package/dist/utils/error.js +0 -16
- package/dist/utils/error.js.map +0 -1
- package/dist/utils/signals.cjs +0 -20
- package/dist/utils/signals.cjs.map +0 -1
- package/dist/utils/signals.js +0 -19
- package/dist/utils/signals.js.map +0 -1
- package/dist/utils/sse.cjs +0 -124
- package/dist/utils/sse.cjs.map +0 -1
- package/dist/utils/sse.js +0 -122
- package/dist/utils/sse.js.map +0 -1
- package/dist/utils/stream.cjs +0 -176
- package/dist/utils/stream.cjs.map +0 -1
- package/dist/utils/stream.js +0 -175
- package/dist/utils/stream.js.map +0 -1
package/dist/react-ui/types.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/react-ui/types.ts
|
|
3
|
-
function isUIMessage(message) {
|
|
4
|
-
if (typeof message !== "object" || message == null) return false;
|
|
5
|
-
if (!("type" in message)) return false;
|
|
6
|
-
return message.type === "ui";
|
|
7
|
-
}
|
|
8
|
-
function isRemoveUIMessage(message) {
|
|
9
|
-
if (typeof message !== "object" || message == null) return false;
|
|
10
|
-
if (!("type" in message)) return false;
|
|
11
|
-
return message.type === "remove-ui";
|
|
12
|
-
}
|
|
13
|
-
function uiMessageReducer(state, update) {
|
|
14
|
-
const events = Array.isArray(update) ? update : [update];
|
|
15
|
-
let newState = state.slice();
|
|
16
|
-
for (const event of events) {
|
|
17
|
-
if (event.type === "remove-ui") {
|
|
18
|
-
newState = newState.filter((ui) => ui.id !== event.id);
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
const index = state.findIndex((ui) => ui.id === event.id);
|
|
22
|
-
if (index !== -1) newState[index] = typeof event.metadata === "object" && event.metadata != null && event.metadata.merge ? {
|
|
23
|
-
...event,
|
|
24
|
-
props: {
|
|
25
|
-
...state[index].props,
|
|
26
|
-
...event.props
|
|
27
|
-
}
|
|
28
|
-
} : event;
|
|
29
|
-
else newState.push(event);
|
|
30
|
-
}
|
|
31
|
-
return newState;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
exports.isRemoveUIMessage = isRemoveUIMessage;
|
|
36
|
-
exports.isUIMessage = isUIMessage;
|
|
37
|
-
exports.uiMessageReducer = uiMessageReducer;
|
|
38
|
-
//# sourceMappingURL=types.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/react-ui/types.ts"],"sourcesContent":["export interface UIMessage<\n TName extends string = string,\n TProps extends Record<string, unknown> = Record<string, unknown>\n> {\n type: \"ui\";\n\n id: string;\n name: TName;\n props: TProps;\n metadata?: {\n merge?: boolean;\n run_id?: string;\n name?: string;\n tags?: string[];\n message_id?: string;\n [key: string]: unknown;\n };\n}\n\nexport interface RemoveUIMessage {\n type: \"remove-ui\";\n id: string;\n}\n\nexport function isUIMessage(message: unknown): message is UIMessage {\n if (typeof message !== \"object\" || message == null) return false;\n if (!(\"type\" in message)) return false;\n return message.type === \"ui\";\n}\n\nexport function isRemoveUIMessage(\n message: unknown\n): message is RemoveUIMessage {\n if (typeof message !== \"object\" || message == null) return false;\n if (!(\"type\" in message)) return false;\n return message.type === \"remove-ui\";\n}\n\nexport function uiMessageReducer(\n state: UIMessage[],\n update: UIMessage | RemoveUIMessage | (UIMessage | RemoveUIMessage)[]\n) {\n const events = Array.isArray(update) ? update : [update];\n let newState = state.slice();\n\n for (const event of events) {\n if (event.type === \"remove-ui\") {\n newState = newState.filter((ui) => ui.id !== event.id);\n continue;\n }\n\n const index = state.findIndex((ui) => ui.id === event.id);\n if (index !== -1) {\n newState[index] =\n typeof event.metadata === \"object\" &&\n event.metadata != null &&\n event.metadata.merge\n ? { ...event, props: { ...state[index].props, ...event.props } }\n : event;\n } else {\n newState.push(event);\n }\n }\n\n return newState;\n}\n"],"mappings":";;AAwBA,SAAgB,YAAY,SAAwC;AAClE,KAAI,OAAO,YAAY,YAAY,WAAW,KAAM,QAAO;AAC3D,KAAI,EAAE,UAAU,SAAU,QAAO;AACjC,QAAO,QAAQ,SAAS;;AAG1B,SAAgB,kBACd,SAC4B;AAC5B,KAAI,OAAO,YAAY,YAAY,WAAW,KAAM,QAAO;AAC3D,KAAI,EAAE,UAAU,SAAU,QAAO;AACjC,QAAO,QAAQ,SAAS;;AAG1B,SAAgB,iBACd,OACA,QACA;CACA,MAAM,SAAS,MAAM,QAAQ,UAAU,SAAS,CAAC;CACjD,IAAI,WAAW,MAAM;AAErB,MAAK,MAAM,SAAS,QAAQ;AAC1B,MAAI,MAAM,SAAS,aAAa;AAC9B,cAAW,SAAS,QAAQ,OAAO,GAAG,OAAO,MAAM;AACnD;;EAGF,MAAM,QAAQ,MAAM,WAAW,OAAO,GAAG,OAAO,MAAM;AACtD,MAAI,UAAU,GACZ,UAAS,SACP,OAAO,MAAM,aAAa,YAC1B,MAAM,YAAY,QAClB,MAAM,SAAS,QACX;GAAE,GAAG;GAAO,OAAO;IAAE,GAAG,MAAM,OAAO;IAAO,GAAG,MAAM;;MACrD;MAEN,UAAS,KAAK;;AAIlB,QAAO"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/react-ui/types.d.ts
|
|
2
|
-
interface UIMessage<TName extends string = string, TProps extends Record<string, unknown> = Record<string, unknown>> {
|
|
3
|
-
type: "ui";
|
|
4
|
-
id: string;
|
|
5
|
-
name: TName;
|
|
6
|
-
props: TProps;
|
|
7
|
-
metadata?: {
|
|
8
|
-
merge?: boolean;
|
|
9
|
-
run_id?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
tags?: string[];
|
|
12
|
-
message_id?: string;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
interface RemoveUIMessage {
|
|
17
|
-
type: "remove-ui";
|
|
18
|
-
id: string;
|
|
19
|
-
}
|
|
20
|
-
declare function isUIMessage(message: unknown): message is UIMessage;
|
|
21
|
-
declare function isRemoveUIMessage(message: unknown): message is RemoveUIMessage;
|
|
22
|
-
declare function uiMessageReducer(state: UIMessage[], update: UIMessage | RemoveUIMessage | (UIMessage | RemoveUIMessage)[]): UIMessage<string, Record<string, unknown>>[];
|
|
23
|
-
//#endregion
|
|
24
|
-
export { RemoveUIMessage, UIMessage, isRemoveUIMessage, isUIMessage, uiMessageReducer };
|
|
25
|
-
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":["UIMessage","Record","TName","TProps","RemoveUIMessage","isUIMessage","isRemoveUIMessage","uiMessageReducer"],"sources":["../../src/react-ui/types.d.ts"],"sourcesContent":["export interface UIMessage<TName extends string = string, TProps extends Record<string, unknown> = Record<string, unknown>> {\n type: \"ui\";\n id: string;\n name: TName;\n props: TProps;\n metadata?: {\n merge?: boolean;\n run_id?: string;\n name?: string;\n tags?: string[];\n message_id?: string;\n [key: string]: unknown;\n };\n}\nexport interface RemoveUIMessage {\n type: \"remove-ui\";\n id: string;\n}\nexport declare function isUIMessage(message: unknown): message is UIMessage;\nexport declare function isRemoveUIMessage(message: unknown): message is RemoveUIMessage;\nexport declare function uiMessageReducer(state: UIMessage[], update: UIMessage | RemoveUIMessage | (UIMessage | RemoveUIMessage)[]): UIMessage<string, Record<string, unknown>>[];\n"],"mappings":";UAAiBA,wDAAwDC,0BAA0BA;EAAlFD,IAAAA,EAAAA,IAAAA;EAAS,EAAA,EAAA,MAAA;MAA+CC,EAG/DC,KAH+DD;OAA0BA,EAIxFE,MAJwFF;UAGzFC,CAAAA,EAAAA;IACCC,KAAAA,CAAAA,EAAAA,OAAAA;;IAUMC,IAAAA,CAAAA,EAAAA,MAAAA;IAIOC,IAAAA,CAAAA,EAAAA,MAAW,EAAA;IACXC,UAAAA,CAAAA,EAAAA,MAAiB;IACjBC,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAgB,OAAA;EAAA,CAAA;;AAA6BP,UANpDI,eAAAA,CAMoDJ;MAAYI,EAAAA,WAAAA;MAAmBJ,MAAAA;;AAAmDC,iBAF/HI,WAAAA,CAE+HJ,OAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA,IAFrFD,SAEqFC;AAAlBD,iBAD7GM,iBAAAA,CAC6GN,OAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA,IAD7DI,eAC6DJ;iBAA7GO,gBAAAA,QAAwBP,qBAAqBA,YAAYI,mBAAmBJ,YAAYI,qBAAqBJ,kBAAkBC"}
|
package/dist/react-ui/types.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/react-ui/types.d.ts
|
|
2
|
-
interface UIMessage<TName extends string = string, TProps extends Record<string, unknown> = Record<string, unknown>> {
|
|
3
|
-
type: "ui";
|
|
4
|
-
id: string;
|
|
5
|
-
name: TName;
|
|
6
|
-
props: TProps;
|
|
7
|
-
metadata?: {
|
|
8
|
-
merge?: boolean;
|
|
9
|
-
run_id?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
tags?: string[];
|
|
12
|
-
message_id?: string;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
interface RemoveUIMessage {
|
|
17
|
-
type: "remove-ui";
|
|
18
|
-
id: string;
|
|
19
|
-
}
|
|
20
|
-
declare function isUIMessage(message: unknown): message is UIMessage;
|
|
21
|
-
declare function isRemoveUIMessage(message: unknown): message is RemoveUIMessage;
|
|
22
|
-
declare function uiMessageReducer(state: UIMessage[], update: UIMessage | RemoveUIMessage | (UIMessage | RemoveUIMessage)[]): UIMessage<string, Record<string, unknown>>[];
|
|
23
|
-
//#endregion
|
|
24
|
-
export { RemoveUIMessage, UIMessage, isRemoveUIMessage, isUIMessage, uiMessageReducer };
|
|
25
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":["UIMessage","Record","TName","TProps","RemoveUIMessage","isUIMessage","isRemoveUIMessage","uiMessageReducer"],"sources":["../../src/react-ui/types.d.ts"],"sourcesContent":["export interface UIMessage<TName extends string = string, TProps extends Record<string, unknown> = Record<string, unknown>> {\n type: \"ui\";\n id: string;\n name: TName;\n props: TProps;\n metadata?: {\n merge?: boolean;\n run_id?: string;\n name?: string;\n tags?: string[];\n message_id?: string;\n [key: string]: unknown;\n };\n}\nexport interface RemoveUIMessage {\n type: \"remove-ui\";\n id: string;\n}\nexport declare function isUIMessage(message: unknown): message is UIMessage;\nexport declare function isRemoveUIMessage(message: unknown): message is RemoveUIMessage;\nexport declare function uiMessageReducer(state: UIMessage[], update: UIMessage | RemoveUIMessage | (UIMessage | RemoveUIMessage)[]): UIMessage<string, Record<string, unknown>>[];\n"],"mappings":";UAAiBA,wDAAwDC,0BAA0BA;EAAlFD,IAAAA,EAAAA,IAAAA;EAAS,EAAA,EAAA,MAAA;MAA+CC,EAG/DC,KAH+DD;OAA0BA,EAIxFE,MAJwFF;UAGzFC,CAAAA,EAAAA;IACCC,KAAAA,CAAAA,EAAAA,OAAAA;;IAUMC,IAAAA,CAAAA,EAAAA,MAAAA;IAIOC,IAAAA,CAAAA,EAAAA,MAAW,EAAA;IACXC,UAAAA,CAAAA,EAAAA,MAAiB;IACjBC,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAgB,OAAA;EAAA,CAAA;;AAA6BP,UANpDI,eAAAA,CAMoDJ;MAAYI,EAAAA,WAAAA;MAAmBJ,MAAAA;;AAAmDC,iBAF/HI,WAAAA,CAE+HJ,OAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA,IAFrFD,SAEqFC;AAAlBD,iBAD7GM,iBAAAA,CAC6GN,OAAAA,EAAAA,OAAAA,CAAAA,EAAAA,OAAAA,IAD7DI,eAC6DJ;iBAA7GO,gBAAAA,QAAwBP,qBAAqBA,YAAYI,mBAAmBJ,YAAYI,qBAAqBJ,kBAAkBC"}
|
package/dist/react-ui/types.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
//#region src/react-ui/types.ts
|
|
2
|
-
function isUIMessage(message) {
|
|
3
|
-
if (typeof message !== "object" || message == null) return false;
|
|
4
|
-
if (!("type" in message)) return false;
|
|
5
|
-
return message.type === "ui";
|
|
6
|
-
}
|
|
7
|
-
function isRemoveUIMessage(message) {
|
|
8
|
-
if (typeof message !== "object" || message == null) return false;
|
|
9
|
-
if (!("type" in message)) return false;
|
|
10
|
-
return message.type === "remove-ui";
|
|
11
|
-
}
|
|
12
|
-
function uiMessageReducer(state, update) {
|
|
13
|
-
const events = Array.isArray(update) ? update : [update];
|
|
14
|
-
let newState = state.slice();
|
|
15
|
-
for (const event of events) {
|
|
16
|
-
if (event.type === "remove-ui") {
|
|
17
|
-
newState = newState.filter((ui) => ui.id !== event.id);
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
const index = state.findIndex((ui) => ui.id === event.id);
|
|
21
|
-
if (index !== -1) newState[index] = typeof event.metadata === "object" && event.metadata != null && event.metadata.merge ? {
|
|
22
|
-
...event,
|
|
23
|
-
props: {
|
|
24
|
-
...state[index].props,
|
|
25
|
-
...event.props
|
|
26
|
-
}
|
|
27
|
-
} : event;
|
|
28
|
-
else newState.push(event);
|
|
29
|
-
}
|
|
30
|
-
return newState;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export { isRemoveUIMessage, isUIMessage, uiMessageReducer };
|
|
35
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/react-ui/types.ts"],"sourcesContent":["export interface UIMessage<\n TName extends string = string,\n TProps extends Record<string, unknown> = Record<string, unknown>\n> {\n type: \"ui\";\n\n id: string;\n name: TName;\n props: TProps;\n metadata?: {\n merge?: boolean;\n run_id?: string;\n name?: string;\n tags?: string[];\n message_id?: string;\n [key: string]: unknown;\n };\n}\n\nexport interface RemoveUIMessage {\n type: \"remove-ui\";\n id: string;\n}\n\nexport function isUIMessage(message: unknown): message is UIMessage {\n if (typeof message !== \"object\" || message == null) return false;\n if (!(\"type\" in message)) return false;\n return message.type === \"ui\";\n}\n\nexport function isRemoveUIMessage(\n message: unknown\n): message is RemoveUIMessage {\n if (typeof message !== \"object\" || message == null) return false;\n if (!(\"type\" in message)) return false;\n return message.type === \"remove-ui\";\n}\n\nexport function uiMessageReducer(\n state: UIMessage[],\n update: UIMessage | RemoveUIMessage | (UIMessage | RemoveUIMessage)[]\n) {\n const events = Array.isArray(update) ? update : [update];\n let newState = state.slice();\n\n for (const event of events) {\n if (event.type === \"remove-ui\") {\n newState = newState.filter((ui) => ui.id !== event.id);\n continue;\n }\n\n const index = state.findIndex((ui) => ui.id === event.id);\n if (index !== -1) {\n newState[index] =\n typeof event.metadata === \"object\" &&\n event.metadata != null &&\n event.metadata.merge\n ? { ...event, props: { ...state[index].props, ...event.props } }\n : event;\n } else {\n newState.push(event);\n }\n }\n\n return newState;\n}\n"],"mappings":";AAwBA,SAAgB,YAAY,SAAwC;AAClE,KAAI,OAAO,YAAY,YAAY,WAAW,KAAM,QAAO;AAC3D,KAAI,EAAE,UAAU,SAAU,QAAO;AACjC,QAAO,QAAQ,SAAS;;AAG1B,SAAgB,kBACd,SAC4B;AAC5B,KAAI,OAAO,YAAY,YAAY,WAAW,KAAM,QAAO;AAC3D,KAAI,EAAE,UAAU,SAAU,QAAO;AACjC,QAAO,QAAQ,SAAS;;AAG1B,SAAgB,iBACd,OACA,QACA;CACA,MAAM,SAAS,MAAM,QAAQ,UAAU,SAAS,CAAC;CACjD,IAAI,WAAW,MAAM;AAErB,MAAK,MAAM,SAAS,QAAQ;AAC1B,MAAI,MAAM,SAAS,aAAa;AAC9B,cAAW,SAAS,QAAQ,OAAO,GAAG,OAAO,MAAM;AACnD;;EAGF,MAAM,QAAQ,MAAM,WAAW,OAAO,GAAG,OAAO,MAAM;AACtD,MAAI,UAAU,GACZ,UAAS,SACP,OAAO,MAAM,aAAa,YAC1B,MAAM,YAAY,QAClB,MAAM,SAAS,QACX;GAAE,GAAG;GAAO,OAAO;IAAE,GAAG,MAAM,OAAO;IAAO,GAAG,MAAM;;MACrD;MAEN,UAAS,KAAK;;AAIlB,QAAO"}
|
package/dist/schema.d.cts
DELETED
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { JSONSchema7 } from "json-schema";
|
|
2
|
-
|
|
3
|
-
//#region src/schema.d.ts
|
|
4
|
-
type Optional<T> = T | null | undefined;
|
|
5
|
-
type RunStatus = "pending" | "running" | "error" | "success" | "timeout" | "interrupted";
|
|
6
|
-
type ThreadStatus = "idle" | "busy" | "interrupted" | "error";
|
|
7
|
-
type MultitaskStrategy = "reject" | "interrupt" | "rollback" | "enqueue";
|
|
8
|
-
type CancelAction = "interrupt" | "rollback";
|
|
9
|
-
type Config = {
|
|
10
|
-
/**
|
|
11
|
-
* Tags for this call and any sub-calls (eg. a Chain calling an LLM).
|
|
12
|
-
* You can use these to filter calls.
|
|
13
|
-
*/
|
|
14
|
-
tags?: string[];
|
|
15
|
-
/**
|
|
16
|
-
* Maximum number of times a call can recurse.
|
|
17
|
-
* If not provided, defaults to 25.
|
|
18
|
-
*/
|
|
19
|
-
recursion_limit?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Runtime values for attributes previously made configurable on this Runnable.
|
|
22
|
-
*/
|
|
23
|
-
configurable?: {
|
|
24
|
-
/**
|
|
25
|
-
* ID of the thread
|
|
26
|
-
*/
|
|
27
|
-
thread_id?: Optional<string>;
|
|
28
|
-
/**
|
|
29
|
-
* Timestamp of the state checkpoint
|
|
30
|
-
*/
|
|
31
|
-
checkpoint_id?: Optional<string>;
|
|
32
|
-
[key: string]: unknown;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
interface GraphSchema {
|
|
36
|
-
/**
|
|
37
|
-
* The ID of the graph.
|
|
38
|
-
*/
|
|
39
|
-
graph_id: string;
|
|
40
|
-
/**
|
|
41
|
-
* The schema for the input state.
|
|
42
|
-
* Missing if unable to generate JSON schema from graph.
|
|
43
|
-
*/
|
|
44
|
-
input_schema?: JSONSchema7 | null | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* The schema for the output state.
|
|
47
|
-
* Missing if unable to generate JSON schema from graph.
|
|
48
|
-
*/
|
|
49
|
-
output_schema?: JSONSchema7 | null | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* The schema for the graph state.
|
|
52
|
-
* Missing if unable to generate JSON schema from graph.
|
|
53
|
-
*/
|
|
54
|
-
state_schema?: JSONSchema7 | null | undefined;
|
|
55
|
-
/**
|
|
56
|
-
* The schema for the graph config.
|
|
57
|
-
* Missing if unable to generate JSON schema from graph.
|
|
58
|
-
*/
|
|
59
|
-
config_schema?: JSONSchema7 | null | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* The schema for the graph context.
|
|
62
|
-
* Missing if unable to generate JSON schema from graph.
|
|
63
|
-
*/
|
|
64
|
-
context_schema?: JSONSchema7 | null | undefined;
|
|
65
|
-
}
|
|
66
|
-
type Subgraphs = Record<string, GraphSchema>;
|
|
67
|
-
type Metadata = Optional<{
|
|
68
|
-
source?: "input" | "loop" | "update" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
|
|
69
|
-
step?: number;
|
|
70
|
-
writes?: Record<string, unknown> | null;
|
|
71
|
-
parents?: Record<string, string>;
|
|
72
|
-
[key: string]: unknown;
|
|
73
|
-
}>;
|
|
74
|
-
interface AssistantBase {
|
|
75
|
-
/** The ID of the assistant. */
|
|
76
|
-
assistant_id: string;
|
|
77
|
-
/** The ID of the graph. */
|
|
78
|
-
graph_id: string;
|
|
79
|
-
/** The assistant config. */
|
|
80
|
-
config: Config;
|
|
81
|
-
/** The assistant context. */
|
|
82
|
-
context: unknown;
|
|
83
|
-
/** The time the assistant was created. */
|
|
84
|
-
created_at: string;
|
|
85
|
-
/** The assistant metadata. */
|
|
86
|
-
metadata: Metadata;
|
|
87
|
-
/** The version of the assistant. */
|
|
88
|
-
version: number;
|
|
89
|
-
/** The name of the assistant */
|
|
90
|
-
name: string;
|
|
91
|
-
/** The description of the assistant */
|
|
92
|
-
description?: string;
|
|
93
|
-
}
|
|
94
|
-
interface AssistantVersion extends AssistantBase {}
|
|
95
|
-
interface Assistant extends AssistantBase {
|
|
96
|
-
/** The last time the assistant was updated. */
|
|
97
|
-
updated_at: string;
|
|
98
|
-
}
|
|
99
|
-
interface AssistantsSearchResponse {
|
|
100
|
-
/** The assistants returned for the current search page. */
|
|
101
|
-
assistants: Assistant[];
|
|
102
|
-
/** Pagination cursor from the X-Pagination-Next response header. */
|
|
103
|
-
next: string | null;
|
|
104
|
-
}
|
|
105
|
-
interface AssistantGraph {
|
|
106
|
-
nodes: Array<{
|
|
107
|
-
id: string | number;
|
|
108
|
-
name?: string;
|
|
109
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
-
data?: Record<string, any> | string;
|
|
111
|
-
metadata?: unknown;
|
|
112
|
-
}>;
|
|
113
|
-
edges: Array<{
|
|
114
|
-
source: string;
|
|
115
|
-
target: string;
|
|
116
|
-
data?: string;
|
|
117
|
-
conditional?: boolean;
|
|
118
|
-
}>;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* An interrupt thrown inside a thread.
|
|
122
|
-
*/
|
|
123
|
-
interface Interrupt<TValue = unknown> {
|
|
124
|
-
/**
|
|
125
|
-
* The ID of the interrupt.
|
|
126
|
-
*/
|
|
127
|
-
id?: string;
|
|
128
|
-
/**
|
|
129
|
-
* The value of the interrupt.
|
|
130
|
-
*/
|
|
131
|
-
value?: TValue;
|
|
132
|
-
/**
|
|
133
|
-
* Will be deprecated in the future.
|
|
134
|
-
* @deprecated Will be removed in the future.
|
|
135
|
-
*/
|
|
136
|
-
when?: "during" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types
|
|
137
|
-
/**
|
|
138
|
-
* Whether the interrupt can be resumed.
|
|
139
|
-
* @deprecated Will be removed in the future.
|
|
140
|
-
*/
|
|
141
|
-
resumable?: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* The namespace of the interrupt.
|
|
144
|
-
* @deprecated Replaced by `interrupt_id`
|
|
145
|
-
*/
|
|
146
|
-
ns?: string[];
|
|
147
|
-
}
|
|
148
|
-
interface Thread<ValuesType = DefaultValues> {
|
|
149
|
-
/** The ID of the thread. */
|
|
150
|
-
thread_id: string;
|
|
151
|
-
/** The time the thread was created. */
|
|
152
|
-
created_at: string;
|
|
153
|
-
/** The last time the thread was updated. */
|
|
154
|
-
updated_at: string;
|
|
155
|
-
/** The thread metadata. */
|
|
156
|
-
metadata: Metadata;
|
|
157
|
-
/** The status of the thread */
|
|
158
|
-
status: ThreadStatus;
|
|
159
|
-
/** The current state of the thread. */
|
|
160
|
-
values: ValuesType;
|
|
161
|
-
/** Interrupts which were thrown in this thread */
|
|
162
|
-
interrupts: Record<string, Array<Interrupt>>;
|
|
163
|
-
}
|
|
164
|
-
interface Cron {
|
|
165
|
-
/** The ID of the cron */
|
|
166
|
-
cron_id: string;
|
|
167
|
-
/** The ID of the assistant */
|
|
168
|
-
assistant_id: string;
|
|
169
|
-
/** The ID of the thread */
|
|
170
|
-
thread_id: Optional<string>;
|
|
171
|
-
/** The end date to stop running the cron. */
|
|
172
|
-
end_time: Optional<string>;
|
|
173
|
-
/** The schedule to run, cron format. */
|
|
174
|
-
schedule: string;
|
|
175
|
-
/** The time the cron was created. */
|
|
176
|
-
created_at: string;
|
|
177
|
-
/** The last time the cron was updated. */
|
|
178
|
-
updated_at: string;
|
|
179
|
-
/** The run payload to use for creating new run. */
|
|
180
|
-
payload: Record<string, unknown>;
|
|
181
|
-
/** The user ID of the cron */
|
|
182
|
-
user_id: Optional<string>;
|
|
183
|
-
/** The next run date of the cron */
|
|
184
|
-
next_run_date: Optional<string>;
|
|
185
|
-
/** The metadata of the cron */
|
|
186
|
-
metadata: Record<string, unknown>;
|
|
187
|
-
}
|
|
188
|
-
type DefaultValues = Record<string, unknown>[] | Record<string, unknown>;
|
|
189
|
-
type ThreadValuesFilter = Record<string, unknown>;
|
|
190
|
-
interface ThreadState<ValuesType = DefaultValues> {
|
|
191
|
-
/** The state values */
|
|
192
|
-
values: ValuesType;
|
|
193
|
-
/** The next nodes to execute. If empty, the thread is done until new input is received */
|
|
194
|
-
next: string[];
|
|
195
|
-
/** Checkpoint of the thread state */
|
|
196
|
-
checkpoint: Checkpoint;
|
|
197
|
-
/** Metadata for this state */
|
|
198
|
-
metadata: Metadata;
|
|
199
|
-
/** Time of state creation */
|
|
200
|
-
created_at: Optional<string>;
|
|
201
|
-
/** The parent checkpoint. If missing, this is the root checkpoint */
|
|
202
|
-
parent_checkpoint: Optional<Checkpoint>;
|
|
203
|
-
/** Tasks to execute in this step. If already attempted, may contain an error */
|
|
204
|
-
tasks: Array<ThreadTask>;
|
|
205
|
-
}
|
|
206
|
-
interface ThreadTask {
|
|
207
|
-
id: string;
|
|
208
|
-
name: string;
|
|
209
|
-
result?: unknown;
|
|
210
|
-
error: Optional<string>;
|
|
211
|
-
interrupts: Array<Interrupt>;
|
|
212
|
-
checkpoint: Optional<Checkpoint>;
|
|
213
|
-
state: Optional<ThreadState>;
|
|
214
|
-
}
|
|
215
|
-
interface Run {
|
|
216
|
-
/** The ID of the run */
|
|
217
|
-
run_id: string;
|
|
218
|
-
/** The ID of the thread */
|
|
219
|
-
thread_id: string;
|
|
220
|
-
/** The assistant that wwas used for this run */
|
|
221
|
-
assistant_id: string;
|
|
222
|
-
/** The time the run was created */
|
|
223
|
-
created_at: string;
|
|
224
|
-
/** The last time the run was updated */
|
|
225
|
-
updated_at: string;
|
|
226
|
-
/** The status of the run. */
|
|
227
|
-
status: RunStatus;
|
|
228
|
-
/** Run metadata */
|
|
229
|
-
metadata: Metadata;
|
|
230
|
-
/** Strategy to handle concurrent runs on the same thread */
|
|
231
|
-
multitask_strategy: Optional<MultitaskStrategy>;
|
|
232
|
-
}
|
|
233
|
-
type Checkpoint = {
|
|
234
|
-
thread_id: string;
|
|
235
|
-
checkpoint_ns: string;
|
|
236
|
-
checkpoint_id: Optional<string>;
|
|
237
|
-
checkpoint_map: Optional<Record<string, unknown>>;
|
|
238
|
-
};
|
|
239
|
-
interface ListNamespaceResponse {
|
|
240
|
-
namespaces: string[][];
|
|
241
|
-
}
|
|
242
|
-
interface Item {
|
|
243
|
-
namespace: string[];
|
|
244
|
-
key: string;
|
|
245
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
246
|
-
value: Record<string, any>;
|
|
247
|
-
createdAt: string;
|
|
248
|
-
updatedAt: string;
|
|
249
|
-
}
|
|
250
|
-
interface SearchItem extends Item {
|
|
251
|
-
score?: number;
|
|
252
|
-
}
|
|
253
|
-
interface SearchItemsResponse {
|
|
254
|
-
items: SearchItem[];
|
|
255
|
-
}
|
|
256
|
-
interface CronCreateResponse {
|
|
257
|
-
cron_id: string;
|
|
258
|
-
assistant_id: string;
|
|
259
|
-
thread_id: string | undefined;
|
|
260
|
-
user_id: string;
|
|
261
|
-
payload: Record<string, unknown>;
|
|
262
|
-
schedule: string;
|
|
263
|
-
next_run_date: string;
|
|
264
|
-
end_time: string | undefined;
|
|
265
|
-
created_at: string;
|
|
266
|
-
updated_at: string;
|
|
267
|
-
metadata: Metadata;
|
|
268
|
-
}
|
|
269
|
-
interface CronCreateForThreadResponse extends Omit<CronCreateResponse, "thread_id"> {
|
|
270
|
-
thread_id: string;
|
|
271
|
-
}
|
|
272
|
-
type AssistantSortBy = "assistant_id" | "graph_id" | "name" | "created_at" | "updated_at";
|
|
273
|
-
type ThreadSortBy = "thread_id" | "status" | "created_at" | "updated_at";
|
|
274
|
-
type CronSortBy = "cron_id" | "assistant_id" | "thread_id" | "created_at" | "updated_at" | "next_run_date";
|
|
275
|
-
type SortOrder = "asc" | "desc";
|
|
276
|
-
// Select field aliases for client-side typing of `select` parameters.
|
|
277
|
-
// These mirror the server's allowed field sets.
|
|
278
|
-
type AssistantSelectField = "assistant_id" | "graph_id" | "name" | "description" | "config" | "context" | "created_at" | "updated_at" | "metadata" | "version";
|
|
279
|
-
type ThreadSelectField = "thread_id" | "created_at" | "updated_at" | "metadata" | "config" | "context" | "status" | "values" | "interrupts";
|
|
280
|
-
type RunSelectField = "run_id" | "thread_id" | "assistant_id" | "created_at" | "updated_at" | "status" | "metadata" | "kwargs" | "multitask_strategy";
|
|
281
|
-
type CronSelectField = "cron_id" | "assistant_id" | "thread_id" | "end_time" | "schedule" | "created_at" | "updated_at" | "user_id" | "payload" | "next_run_date" | "metadata" | "now";
|
|
282
|
-
//#endregion
|
|
283
|
-
export { Assistant, AssistantBase, AssistantGraph, AssistantSelectField, AssistantSortBy, AssistantVersion, AssistantsSearchResponse, CancelAction, Checkpoint, Config, Cron, CronCreateForThreadResponse, CronCreateResponse, CronSelectField, CronSortBy, DefaultValues, GraphSchema, Interrupt, Item, ListNamespaceResponse, Metadata, Run, RunSelectField, RunStatus, SearchItem, SearchItemsResponse, SortOrder, Subgraphs, Thread, ThreadSelectField, ThreadSortBy, ThreadState, ThreadStatus, ThreadTask, ThreadValuesFilter };
|
|
284
|
-
//# sourceMappingURL=schema.d.cts.map
|
package/dist/schema.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.cts","names":["JSONSchema7","Optional","T","RunStatus","ThreadStatus","MultitaskStrategy","CancelAction","Config","GraphSchema","Subgraphs","Record","Metadata","AssistantBase","AssistantVersion","Assistant","AssistantsSearchResponse","AssistantGraph","Array","Interrupt","TValue","Thread","DefaultValues","ValuesType","Cron","ThreadValuesFilter","ThreadState","Checkpoint","ThreadTask","Run","ListNamespaceResponse","Item","SearchItem","SearchItemsResponse","CronCreateResponse","CronCreateForThreadResponse","Omit","AssistantSortBy","ThreadSortBy","CronSortBy","SortOrder","AssistantSelectField","ThreadSelectField","RunSelectField","CronSelectField"],"sources":["../src/schema.d.ts"],"sourcesContent":["import type { JSONSchema7 } from \"json-schema\";\ntype Optional<T> = T | null | undefined;\nexport type RunStatus = \"pending\" | \"running\" | \"error\" | \"success\" | \"timeout\" | \"interrupted\";\nexport type ThreadStatus = \"idle\" | \"busy\" | \"interrupted\" | \"error\";\ntype MultitaskStrategy = \"reject\" | \"interrupt\" | \"rollback\" | \"enqueue\";\nexport type CancelAction = \"interrupt\" | \"rollback\";\nexport type Config = {\n /**\n * Tags for this call and any sub-calls (eg. a Chain calling an LLM).\n * You can use these to filter calls.\n */\n tags?: string[];\n /**\n * Maximum number of times a call can recurse.\n * If not provided, defaults to 25.\n */\n recursion_limit?: number;\n /**\n * Runtime values for attributes previously made configurable on this Runnable.\n */\n configurable?: {\n /**\n * ID of the thread\n */\n thread_id?: Optional<string>;\n /**\n * Timestamp of the state checkpoint\n */\n checkpoint_id?: Optional<string>;\n [key: string]: unknown;\n };\n};\nexport interface GraphSchema {\n /**\n * The ID of the graph.\n */\n graph_id: string;\n /**\n * The schema for the input state.\n * Missing if unable to generate JSON schema from graph.\n */\n input_schema?: JSONSchema7 | null | undefined;\n /**\n * The schema for the output state.\n * Missing if unable to generate JSON schema from graph.\n */\n output_schema?: JSONSchema7 | null | undefined;\n /**\n * The schema for the graph state.\n * Missing if unable to generate JSON schema from graph.\n */\n state_schema?: JSONSchema7 | null | undefined;\n /**\n * The schema for the graph config.\n * Missing if unable to generate JSON schema from graph.\n */\n config_schema?: JSONSchema7 | null | undefined;\n /**\n * The schema for the graph context.\n * Missing if unable to generate JSON schema from graph.\n */\n context_schema?: JSONSchema7 | null | undefined;\n}\nexport type Subgraphs = Record<string, GraphSchema>;\nexport type Metadata = Optional<{\n source?: \"input\" | \"loop\" | \"update\" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types\n step?: number;\n writes?: Record<string, unknown> | null;\n parents?: Record<string, string>;\n [key: string]: unknown;\n}>;\nexport interface AssistantBase {\n /** The ID of the assistant. */\n assistant_id: string;\n /** The ID of the graph. */\n graph_id: string;\n /** The assistant config. */\n config: Config;\n /** The assistant context. */\n context: unknown;\n /** The time the assistant was created. */\n created_at: string;\n /** The assistant metadata. */\n metadata: Metadata;\n /** The version of the assistant. */\n version: number;\n /** The name of the assistant */\n name: string;\n /** The description of the assistant */\n description?: string;\n}\nexport interface AssistantVersion extends AssistantBase {\n}\nexport interface Assistant extends AssistantBase {\n /** The last time the assistant was updated. */\n updated_at: string;\n}\nexport interface AssistantsSearchResponse {\n /** The assistants returned for the current search page. */\n assistants: Assistant[];\n /** Pagination cursor from the X-Pagination-Next response header. */\n next: string | null;\n}\nexport interface AssistantGraph {\n nodes: Array<{\n id: string | number;\n name?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: Record<string, any> | string;\n metadata?: unknown;\n }>;\n edges: Array<{\n source: string;\n target: string;\n data?: string;\n conditional?: boolean;\n }>;\n}\n/**\n * An interrupt thrown inside a thread.\n */\nexport interface Interrupt<TValue = unknown> {\n /**\n * The ID of the interrupt.\n */\n id?: string;\n /**\n * The value of the interrupt.\n */\n value?: TValue;\n /**\n * Will be deprecated in the future.\n * @deprecated Will be removed in the future.\n */\n when?: \"during\" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types\n /**\n * Whether the interrupt can be resumed.\n * @deprecated Will be removed in the future.\n */\n resumable?: boolean;\n /**\n * The namespace of the interrupt.\n * @deprecated Replaced by `interrupt_id`\n */\n ns?: string[];\n}\nexport interface Thread<ValuesType = DefaultValues> {\n /** The ID of the thread. */\n thread_id: string;\n /** The time the thread was created. */\n created_at: string;\n /** The last time the thread was updated. */\n updated_at: string;\n /** The thread metadata. */\n metadata: Metadata;\n /** The status of the thread */\n status: ThreadStatus;\n /** The current state of the thread. */\n values: ValuesType;\n /** Interrupts which were thrown in this thread */\n interrupts: Record<string, Array<Interrupt>>;\n}\nexport interface Cron {\n /** The ID of the cron */\n cron_id: string;\n /** The ID of the assistant */\n assistant_id: string;\n /** The ID of the thread */\n thread_id: Optional<string>;\n /** The end date to stop running the cron. */\n end_time: Optional<string>;\n /** The schedule to run, cron format. */\n schedule: string;\n /** The time the cron was created. */\n created_at: string;\n /** The last time the cron was updated. */\n updated_at: string;\n /** The run payload to use for creating new run. */\n payload: Record<string, unknown>;\n /** The user ID of the cron */\n user_id: Optional<string>;\n /** The next run date of the cron */\n next_run_date: Optional<string>;\n /** The metadata of the cron */\n metadata: Record<string, unknown>;\n}\nexport type DefaultValues = Record<string, unknown>[] | Record<string, unknown>;\nexport type ThreadValuesFilter = Record<string, unknown>;\nexport interface ThreadState<ValuesType = DefaultValues> {\n /** The state values */\n values: ValuesType;\n /** The next nodes to execute. If empty, the thread is done until new input is received */\n next: string[];\n /** Checkpoint of the thread state */\n checkpoint: Checkpoint;\n /** Metadata for this state */\n metadata: Metadata;\n /** Time of state creation */\n created_at: Optional<string>;\n /** The parent checkpoint. If missing, this is the root checkpoint */\n parent_checkpoint: Optional<Checkpoint>;\n /** Tasks to execute in this step. If already attempted, may contain an error */\n tasks: Array<ThreadTask>;\n}\nexport interface ThreadTask {\n id: string;\n name: string;\n result?: unknown;\n error: Optional<string>;\n interrupts: Array<Interrupt>;\n checkpoint: Optional<Checkpoint>;\n state: Optional<ThreadState>;\n}\nexport interface Run {\n /** The ID of the run */\n run_id: string;\n /** The ID of the thread */\n thread_id: string;\n /** The assistant that wwas used for this run */\n assistant_id: string;\n /** The time the run was created */\n created_at: string;\n /** The last time the run was updated */\n updated_at: string;\n /** The status of the run. */\n status: RunStatus;\n /** Run metadata */\n metadata: Metadata;\n /** Strategy to handle concurrent runs on the same thread */\n multitask_strategy: Optional<MultitaskStrategy>;\n}\nexport type Checkpoint = {\n thread_id: string;\n checkpoint_ns: string;\n checkpoint_id: Optional<string>;\n checkpoint_map: Optional<Record<string, unknown>>;\n};\nexport interface ListNamespaceResponse {\n namespaces: string[][];\n}\nexport interface Item {\n namespace: string[];\n key: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: Record<string, any>;\n createdAt: string;\n updatedAt: string;\n}\nexport interface SearchItem extends Item {\n score?: number;\n}\nexport interface SearchItemsResponse {\n items: SearchItem[];\n}\nexport interface CronCreateResponse {\n cron_id: string;\n assistant_id: string;\n thread_id: string | undefined;\n user_id: string;\n payload: Record<string, unknown>;\n schedule: string;\n next_run_date: string;\n end_time: string | undefined;\n created_at: string;\n updated_at: string;\n metadata: Metadata;\n}\nexport interface CronCreateForThreadResponse extends Omit<CronCreateResponse, \"thread_id\"> {\n thread_id: string;\n}\nexport type AssistantSortBy = \"assistant_id\" | \"graph_id\" | \"name\" | \"created_at\" | \"updated_at\";\nexport type ThreadSortBy = \"thread_id\" | \"status\" | \"created_at\" | \"updated_at\";\nexport type CronSortBy = \"cron_id\" | \"assistant_id\" | \"thread_id\" | \"created_at\" | \"updated_at\" | \"next_run_date\";\nexport type SortOrder = \"asc\" | \"desc\";\n// Select field aliases for client-side typing of `select` parameters.\n// These mirror the server's allowed field sets.\nexport type AssistantSelectField = \"assistant_id\" | \"graph_id\" | \"name\" | \"description\" | \"config\" | \"context\" | \"created_at\" | \"updated_at\" | \"metadata\" | \"version\";\nexport type ThreadSelectField = \"thread_id\" | \"created_at\" | \"updated_at\" | \"metadata\" | \"config\" | \"context\" | \"status\" | \"values\" | \"interrupts\";\nexport type RunSelectField = \"run_id\" | \"thread_id\" | \"assistant_id\" | \"created_at\" | \"updated_at\" | \"status\" | \"metadata\" | \"kwargs\" | \"multitask_strategy\";\nexport type CronSelectField = \"cron_id\" | \"assistant_id\" | \"thread_id\" | \"end_time\" | \"schedule\" | \"created_at\" | \"updated_at\" | \"user_id\" | \"payload\" | \"next_run_date\" | \"metadata\" | \"now\";\nexport {};\n"],"mappings":"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"}
|