@langchain/langgraph-api 1.1.10 → 1.1.11
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/dist/api/assistants.mjs
CHANGED
|
@@ -86,7 +86,8 @@ api.get("/assistants/:assistant_id", async (c) => {
|
|
|
86
86
|
api.delete("/assistants/:assistant_id", async (c) => {
|
|
87
87
|
// Delete Assistant
|
|
88
88
|
const assistantId = getAssistantId(c.req.param("assistant_id"));
|
|
89
|
-
|
|
89
|
+
const deleteThreads = c.req.query("delete_threads") === "true";
|
|
90
|
+
return c.json(await assistants().delete(assistantId, deleteThreads, c.var.auth));
|
|
90
91
|
});
|
|
91
92
|
api.patch("/assistants/:assistant_id", zValidator("json", schemas.AssistantPatch), async (c) => {
|
|
92
93
|
// Patch Assistant
|
package/dist/storage/ops.d.mts
CHANGED
|
@@ -77,7 +77,7 @@ export declare class FileSystemAssistants implements AssistantsRepo {
|
|
|
77
77
|
name?: string;
|
|
78
78
|
description?: string;
|
|
79
79
|
}, auth: AuthContext | undefined): Promise<Assistant>;
|
|
80
|
-
delete(assistant_id: string, auth: AuthContext | undefined): Promise<string[]>;
|
|
80
|
+
delete(assistant_id: string, delete_threads: boolean, auth: AuthContext | undefined): Promise<string[]>;
|
|
81
81
|
setLatest(assistant_id: string, version: number, auth: AuthContext | undefined): Promise<Assistant>;
|
|
82
82
|
getVersions(assistant_id: string, options: {
|
|
83
83
|
limit: number;
|
package/dist/storage/ops.mjs
CHANGED
|
@@ -330,7 +330,7 @@ export class FileSystemAssistants {
|
|
|
330
330
|
return assistant;
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
async delete(assistant_id, auth) {
|
|
333
|
+
async delete(assistant_id, delete_threads, auth) {
|
|
334
334
|
const [filters] = await handleAuthEvent(auth, "assistants:delete", {
|
|
335
335
|
assistant_id,
|
|
336
336
|
});
|
|
@@ -343,13 +343,20 @@ export class FileSystemAssistants {
|
|
|
343
343
|
throw new HTTPException(404, { message: "Assistant not found" });
|
|
344
344
|
}
|
|
345
345
|
delete STORE.assistants[assistant_id];
|
|
346
|
-
// Cascade delete for assistant versions and crons
|
|
346
|
+
// Cascade delete for assistant versions and crons and threads
|
|
347
347
|
STORE.assistant_versions = STORE.assistant_versions.filter((v) => v["assistant_id"] !== assistant_id);
|
|
348
348
|
for (const run of Object.values(STORE.runs)) {
|
|
349
349
|
if (run["assistant_id"] === assistant_id) {
|
|
350
350
|
delete STORE.runs[run["run_id"]];
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
+
if (delete_threads === true) {
|
|
354
|
+
for (const thread of Object.values(STORE.threads)) {
|
|
355
|
+
if (thread["metadata"]?.["assistant_id"] === assistant_id) {
|
|
356
|
+
delete STORE.threads[thread["thread_id"]];
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
353
360
|
return [assistant.assistant_id];
|
|
354
361
|
});
|
|
355
362
|
}
|
package/dist/storage/types.d.mts
CHANGED
|
@@ -274,7 +274,7 @@ export interface AssistantsRepo {
|
|
|
274
274
|
name?: string;
|
|
275
275
|
description?: string;
|
|
276
276
|
}, auth: AuthContext | undefined): Promise<Assistant>;
|
|
277
|
-
delete(assistant_id: string, auth: AuthContext | undefined): Promise<string[]>;
|
|
277
|
+
delete(assistant_id: string, delete_threads: boolean, auth: AuthContext | undefined): Promise<string[]>;
|
|
278
278
|
count(options: {
|
|
279
279
|
graph_id?: string;
|
|
280
280
|
name?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-api",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^18.19.0 || >=20.16.0"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"winston": "^3.17.0",
|
|
71
71
|
"winston-console-format": "^1.0.8",
|
|
72
72
|
"zod": "^3.25.76 || ^4",
|
|
73
|
-
"@langchain/langgraph-ui": "1.1.
|
|
73
|
+
"@langchain/langgraph-ui": "1.1.11"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@langchain/core": "^0.3.59 || ^1.0.1",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"typescript": "^4.9.5 || ^5.4.5",
|
|
99
99
|
"vitest": "^3.2.4",
|
|
100
100
|
"wait-port": "^1.1.0",
|
|
101
|
-
"@langchain/langgraph": "1.0.
|
|
101
|
+
"@langchain/langgraph": "1.0.15",
|
|
102
102
|
"@langchain/langgraph-checkpoint": "1.0.0",
|
|
103
|
-
"@langchain/langgraph-sdk": "1.
|
|
103
|
+
"@langchain/langgraph-sdk": "1.5.0"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
106
106
|
"clean": "rm -rf dist/ .turbo/ ./tests/graphs/.langgraph_api/",
|