@langgraph-js/pure-graph 2.10.0 → 3.0.0

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 (44) hide show
  1. package/dist/adapter/fetch/assistants.d.ts +42 -0
  2. package/dist/adapter/fetch/endpoint.d.ts +25 -0
  3. package/dist/adapter/fetch/index.d.ts +5 -3
  4. package/dist/adapter/fetch/index.js +858 -25
  5. package/dist/adapter/fetch/index.js.map +1 -1
  6. package/dist/adapter/fetch/runs-extended.d.ts +21 -0
  7. package/dist/adapter/fetch/runs-stateless.d.ts +28 -0
  8. package/dist/adapter/fetch/runs.d.ts +0 -4
  9. package/dist/adapter/fetch/threads.d.ts +36 -0
  10. package/dist/adapter/nextjs/index.js +1 -1
  11. package/dist/adapter/zod.d.ts +292 -1
  12. package/dist/agents/ask_subagents.d.ts +1 -1
  13. package/dist/createEndpoint-BViLxrhh.js +208 -0
  14. package/dist/createEndpoint-BViLxrhh.js.map +1 -0
  15. package/dist/createEndpoint.d.ts +25 -0
  16. package/dist/index.js +2 -2
  17. package/dist/queue/stream_queue.d.ts +2 -2
  18. package/dist/queue-CtVch_az.js +153 -0
  19. package/dist/queue-CtVch_az.js.map +1 -0
  20. package/dist/remote/index.js +158 -0
  21. package/dist/remote/index.js.map +1 -0
  22. package/dist/remote-threads-CrG03ZS7.js +255 -0
  23. package/dist/remote-threads-CrG03ZS7.js.map +1 -0
  24. package/dist/storage/index.d.ts +1 -1
  25. package/dist/storage/kysely/index.d.ts +1 -0
  26. package/dist/storage/kysely/remote-threads.d.ts +124 -0
  27. package/dist/storage/kysely/threads.d.ts +26 -2
  28. package/dist/storage/kysely/types.d.ts +10 -0
  29. package/dist/storage/memory/threads.d.ts +27 -1
  30. package/dist/storage/redis/queue.d.ts +14 -11
  31. package/dist/storage/remote/fetch.d.ts +20 -0
  32. package/dist/storage/remote/remote-server.d.ts +17 -0
  33. package/dist/storage/remote/server.d.ts +11 -0
  34. package/dist/storage/remote/types.d.ts +121 -0
  35. package/dist/{stream-D0YD2Pjq.js → stream-umoA6h4q.js} +502 -78
  36. package/dist/stream-umoA6h4q.js.map +1 -0
  37. package/dist/threads/index.d.ts +25 -1
  38. package/dist/types.d.ts +53 -1
  39. package/package.json +10 -4
  40. package/dist/createEndpoint-CN_RHDEd.js +0 -122
  41. package/dist/createEndpoint-CN_RHDEd.js.map +0 -1
  42. package/dist/queue-D6tEGCGs.js +0 -146
  43. package/dist/queue-D6tEGCGs.js.map +0 -1
  44. package/dist/stream-D0YD2Pjq.js.map +0 -1
@@ -3,7 +3,49 @@ import { LangGraphServerContext } from './context';
3
3
  * POST /assistants/search
4
4
  */
5
5
  export declare function searchAssistants(req: Request, context: LangGraphServerContext): Promise<Response>;
6
+ /**
7
+ * POST /assistants/count
8
+ */
9
+ export declare function countAssistants(req: Request, context: LangGraphServerContext): Promise<Response>;
10
+ /**
11
+ * GET /assistants/:assistant_id
12
+ */
13
+ export declare function getAssistant(req: Request, context: LangGraphServerContext): Promise<Response>;
14
+ /**
15
+ * DELETE /assistants/:assistant_id
16
+ */
17
+ export declare function deleteAssistant(req: Request, context: LangGraphServerContext): Promise<Response>;
18
+ /**
19
+ * PATCH /assistants/:assistant_id
20
+ */
21
+ export declare function patchAssistant(req: Request, context: LangGraphServerContext): Promise<Response>;
6
22
  /**
7
23
  * GET /assistants/:assistant_id/graph
8
24
  */
9
25
  export declare function getAssistantGraph(req: Request, context: LangGraphServerContext): Promise<Response>;
26
+ /**
27
+ * GET /assistants/:assistant_id/subgraphs
28
+ * ⚠️ 此端点尚未实现
29
+ */
30
+ export declare function getAssistantSubgraphs(req: Request, context: LangGraphServerContext): Promise<Response>;
31
+ /**
32
+ * GET /assistants/:assistant_id/subgraphs/:namespace
33
+ * ⚠️ 此端点尚未实现
34
+ */
35
+ export declare function getAssistantSubgraphsByNamespace(req: Request, context: LangGraphServerContext): Promise<Response>;
36
+ /**
37
+ * GET /assistants/:assistant_id/schemas
38
+ */
39
+ export declare function getAssistantSchemas(req: Request, context: LangGraphServerContext): Promise<Response>;
40
+ /**
41
+ * POST /assistants/:assistant_id/versions
42
+ */
43
+ export declare function getAssistantVersions(req: Request, context: LangGraphServerContext): Promise<Response>;
44
+ /**
45
+ * POST /assistants/:assistant_id/latest
46
+ */
47
+ export declare function setLatestAssistantVersion(req: Request, context: LangGraphServerContext): Promise<Response>;
48
+ /**
49
+ * POST /assistants
50
+ */
51
+ export declare function createAssistant(req: Request, context: LangGraphServerContext): Promise<Response>;
@@ -8,9 +8,34 @@ export declare const client: {
8
8
  sortBy?: import("../../types.js").AssistantSortBy;
9
9
  sortOrder?: import("../../types.js").SortOrder;
10
10
  }): Promise<import("@langchain/langgraph-sdk").Assistant[]>;
11
+ count(query?: {
12
+ graphId?: string;
13
+ metadata?: import("@langchain/langgraph-sdk").Metadata;
14
+ }): Promise<number>;
15
+ get(assistantId: string): Promise<import("@langchain/langgraph-sdk").Assistant>;
16
+ delete(assistantId: string): Promise<void>;
17
+ update(assistantId: string, updates: Partial<Pick<import("@langchain/langgraph-sdk").Assistant, "name" | "description" | "metadata" | "config">>): Promise<import("@langchain/langgraph-sdk").Assistant>;
11
18
  getGraph(assistantId: string, options?: {
12
19
  xray?: boolean | number;
13
20
  }): Promise<import("@langchain/langgraph-sdk").AssistantGraph>;
21
+ getSchemas(assistantId: string): Promise<{
22
+ graph_id: string;
23
+ state_schema: any;
24
+ }>;
25
+ getVersions(assistantId: string, options?: {
26
+ limit?: number;
27
+ offset?: number;
28
+ }): Promise<import("@langchain/langgraph-sdk").Assistant[]>;
29
+ setLatest(assistantId: string, version: number): Promise<import("@langchain/langgraph-sdk").Assistant>;
30
+ create(params: {
31
+ assistantId?: string;
32
+ graphId: string;
33
+ name?: string;
34
+ description?: string;
35
+ metadata?: import("@langchain/langgraph-sdk").Metadata;
36
+ config?: any;
37
+ ifExists?: "raise" | "do_nothing";
38
+ }): Promise<import("@langchain/langgraph-sdk").Assistant>;
14
39
  };
15
40
  readonly threads: import("../../index.js").BaseThreadsManager<unknown>;
16
41
  runs: {
@@ -3,6 +3,8 @@ import type { LangGraphServerContext } from './context';
3
3
  * 主路由处理器
4
4
  */
5
5
  export declare function handleRequest(req: Request, context?: LangGraphServerContext): Promise<Response>;
6
- export * from './assistants';
7
- export * from './threads';
8
- export * from './runs';
6
+ export { searchAssistants, countAssistants, getAssistant, deleteAssistant, patchAssistant, getAssistantGraph, getAssistantSubgraphs, getAssistantSubgraphsByNamespace, getAssistantSchemas, getAssistantVersions, setLatestAssistantVersion, createAssistant } from './assistants';
7
+ export { createThread, searchThreads, getThread, deleteThread, patchThread, countThreads, getThreadState, updateThreadState, getThreadStateAtCheckpoint, getThreadHistory, getThreadHistoryPost, copyThread, joinThreadStream } from './threads';
8
+ export { streamRun, joinRunStream, listRuns, cancelRun } from './runs';
9
+ export { createRun, waitRun, getRun, deleteRun, joinRun } from './runs-extended';
10
+ export { createStatelessRun, streamStatelessRun, waitStatelessRun, createBatchRuns, cancelRuns } from './runs-stateless';