@langchain/langgraph-api 1.1.8 → 1.1.10
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/README.md +3 -3
- package/dist/api/assistants.d.mts +3 -0
- package/dist/api/assistants.mjs +193 -0
- package/dist/api/meta.d.mts +3 -0
- package/dist/api/meta.mjs +65 -0
- package/dist/api/runs.d.mts +3 -0
- package/dist/api/runs.mjs +324 -0
- package/dist/api/store.d.mts +3 -0
- package/dist/api/store.mjs +111 -0
- package/dist/api/threads.d.mts +3 -0
- package/dist/api/threads.mjs +143 -0
- package/dist/auth/custom.d.mts +9 -0
- package/dist/auth/custom.mjs +32 -0
- package/dist/auth/index.d.mts +43 -0
- package/dist/auth/index.mjs +163 -0
- package/dist/cli/entrypoint.d.mts +1 -0
- package/dist/cli/entrypoint.mjs +41 -0
- package/dist/cli/spawn.d.mts +42 -0
- package/dist/cli/spawn.mjs +47 -0
- package/dist/cli/utils/ipc/client.d.mts +5 -0
- package/dist/cli/utils/ipc/client.mjs +47 -0
- package/dist/cli/utils/ipc/utils/get-pipe-path.d.mts +1 -0
- package/dist/cli/utils/ipc/utils/get-pipe-path.mjs +29 -0
- package/dist/cli/utils/ipc/utils/temporary-directory.d.mts +5 -0
- package/dist/cli/utils/ipc/utils/temporary-directory.mjs +40 -0
- package/dist/command.d.mts +11 -0
- package/dist/command.mjs +15 -0
- package/dist/experimental/embed.d.mts +42 -0
- package/dist/experimental/embed.mjs +299 -0
- package/dist/graph/api.d.mts +1 -0
- package/dist/graph/api.mjs +2 -0
- package/dist/graph/load.d.mts +19 -0
- package/dist/graph/load.hooks.d.mts +2 -0
- package/dist/graph/load.hooks.mjs +52 -0
- package/dist/graph/load.mjs +96 -0
- package/dist/graph/load.utils.d.mts +22 -0
- package/dist/graph/load.utils.mjs +49 -0
- package/dist/graph/parser/index.d.mts +23 -0
- package/dist/graph/parser/index.mjs +58 -0
- package/dist/graph/parser/parser.d.mts +77 -0
- package/dist/graph/parser/parser.mjs +429 -0
- package/dist/graph/parser/parser.worker.d.mts +1 -0
- package/dist/graph/parser/parser.worker.mjs +7 -0
- package/dist/graph/parser/schema/types.d.mts +154 -0
- package/dist/graph/parser/schema/types.mjs +1496 -0
- package/dist/graph/parser/schema/types.template.d.mts +1 -0
- package/dist/graph/parser/schema/types.template.mts +92 -0
- package/dist/http/custom.d.mts +6 -0
- package/dist/http/custom.mjs +10 -0
- package/dist/http/middleware.d.mts +11 -0
- package/dist/http/middleware.mjs +57 -0
- package/dist/logging.d.mts +10 -0
- package/dist/logging.mjs +115 -0
- package/dist/loopback.d.mts +4 -0
- package/dist/loopback.mjs +10 -0
- package/dist/preload.d.mts +1 -0
- package/dist/preload.mjs +29 -0
- package/dist/queue.d.mts +2 -0
- package/dist/queue.mjs +119 -0
- package/dist/schemas.d.mts +1552 -0
- package/dist/schemas.mjs +492 -0
- package/dist/semver/index.d.mts +15 -0
- package/dist/semver/index.mjs +46 -0
- package/dist/server.d.mts +175 -0
- package/dist/server.mjs +181 -0
- package/dist/state.d.mts +3 -0
- package/dist/state.mjs +30 -0
- package/dist/storage/checkpoint.d.mts +19 -0
- package/dist/storage/checkpoint.mjs +127 -0
- package/dist/storage/context.d.mts +3 -0
- package/dist/storage/context.mjs +11 -0
- package/dist/storage/importMap.d.mts +55 -0
- package/dist/storage/importMap.mjs +55 -0
- package/dist/storage/ops.d.mts +169 -0
- package/dist/storage/ops.mjs +1262 -0
- package/dist/storage/persist.d.mts +18 -0
- package/dist/storage/persist.mjs +81 -0
- package/dist/storage/store.d.mts +17 -0
- package/dist/storage/store.mjs +41 -0
- package/dist/storage/types.d.mts +301 -0
- package/dist/storage/types.mjs +1 -0
- package/dist/stream.d.mts +43 -0
- package/dist/stream.mjs +235 -0
- package/dist/ui/load.d.mts +8 -0
- package/dist/ui/load.mjs +53 -0
- package/dist/utils/abort.d.mts +1 -0
- package/dist/utils/abort.mjs +8 -0
- package/dist/utils/hono.d.mts +5 -0
- package/dist/utils/hono.mjs +24 -0
- package/dist/utils/importMap.d.mts +55 -0
- package/dist/utils/importMap.mjs +55 -0
- package/dist/utils/runnableConfig.d.mts +3 -0
- package/dist/utils/runnableConfig.mjs +45 -0
- package/dist/utils/serde.d.mts +5 -0
- package/dist/utils/serde.mjs +20 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +11 -0
- package/dist/webhook.d.mts +11 -0
- package/dist/webhook.mjs +30 -0
- package/package.json +19 -19
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { AuthContext } from "../auth/index.mjs";
|
|
2
|
+
import { FileSystemPersistence } from "./persist.mjs";
|
|
3
|
+
import type { Metadata, ThreadStatus, RunStatus, MultitaskStrategy, OnConflictBehavior, IfNotExists, RunnableConfig, Assistant, RunKwargs, Run, Store, Message, Thread, CheckpointPayload, Ops, AssistantsRepo, RunsRepo, RunsStreamRepo, ThreadsRepo, ThreadsStateRepo } from "./types.mjs";
|
|
4
|
+
export declare class FileSystemOps implements Ops {
|
|
5
|
+
private readonly conn;
|
|
6
|
+
readonly assistants: FileSystemAssistants;
|
|
7
|
+
readonly runs: FileSystemRuns;
|
|
8
|
+
readonly threads: FileSystemThreads;
|
|
9
|
+
constructor(conn: FileSystemPersistence<Store>);
|
|
10
|
+
truncate(flags: {
|
|
11
|
+
runs?: boolean;
|
|
12
|
+
threads?: boolean;
|
|
13
|
+
assistants?: boolean;
|
|
14
|
+
checkpointer?: boolean;
|
|
15
|
+
store?: boolean;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
declare class Queue {
|
|
19
|
+
private log;
|
|
20
|
+
private listeners;
|
|
21
|
+
private nextId;
|
|
22
|
+
private resumable;
|
|
23
|
+
constructor(options: {
|
|
24
|
+
resumable: boolean;
|
|
25
|
+
});
|
|
26
|
+
push(item: Message): void;
|
|
27
|
+
get(options: {
|
|
28
|
+
timeout: number;
|
|
29
|
+
lastEventId?: string;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
}): Promise<[id: string, message: Message]>;
|
|
32
|
+
}
|
|
33
|
+
declare class CancellationAbortController extends AbortController {
|
|
34
|
+
abort(reason: "rollback" | "interrupt"): void;
|
|
35
|
+
}
|
|
36
|
+
declare class StreamManagerImpl {
|
|
37
|
+
readers: Record<string, Queue>;
|
|
38
|
+
control: Record<string, CancellationAbortController>;
|
|
39
|
+
getQueue(runId: string, options: {
|
|
40
|
+
ifNotFound: "create";
|
|
41
|
+
resumable: boolean;
|
|
42
|
+
}): Queue;
|
|
43
|
+
getControl(runId: string): CancellationAbortController | undefined;
|
|
44
|
+
isLocked(runId: string): boolean;
|
|
45
|
+
lock(runId: string): AbortSignal;
|
|
46
|
+
unlock(runId: string): void;
|
|
47
|
+
}
|
|
48
|
+
export declare const StreamManager: StreamManagerImpl;
|
|
49
|
+
export declare class FileSystemAssistants implements AssistantsRepo {
|
|
50
|
+
private readonly conn;
|
|
51
|
+
constructor(conn: FileSystemPersistence<Store>);
|
|
52
|
+
search(options: {
|
|
53
|
+
graph_id?: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
metadata?: Metadata;
|
|
56
|
+
limit: number;
|
|
57
|
+
offset: number;
|
|
58
|
+
}, auth: AuthContext | undefined): AsyncGenerator<{
|
|
59
|
+
assistant: Assistant;
|
|
60
|
+
total: number;
|
|
61
|
+
}>;
|
|
62
|
+
get(assistant_id: string, auth: AuthContext | undefined): Promise<Assistant>;
|
|
63
|
+
put(assistant_id: string, options: {
|
|
64
|
+
config: RunnableConfig;
|
|
65
|
+
context: unknown;
|
|
66
|
+
graph_id: string;
|
|
67
|
+
metadata?: Metadata;
|
|
68
|
+
if_exists: OnConflictBehavior;
|
|
69
|
+
name?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
}, auth: AuthContext | undefined): Promise<Assistant>;
|
|
72
|
+
patch(assistantId: string, options: {
|
|
73
|
+
config?: RunnableConfig;
|
|
74
|
+
context?: unknown;
|
|
75
|
+
graph_id?: string;
|
|
76
|
+
metadata?: Metadata;
|
|
77
|
+
name?: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
}, auth: AuthContext | undefined): Promise<Assistant>;
|
|
80
|
+
delete(assistant_id: string, auth: AuthContext | undefined): Promise<string[]>;
|
|
81
|
+
setLatest(assistant_id: string, version: number, auth: AuthContext | undefined): Promise<Assistant>;
|
|
82
|
+
getVersions(assistant_id: string, options: {
|
|
83
|
+
limit: number;
|
|
84
|
+
offset: number;
|
|
85
|
+
metadata?: Metadata;
|
|
86
|
+
}, auth: AuthContext | undefined): Promise<import("./types.mjs").AssistantVersion[]>;
|
|
87
|
+
count(options: {
|
|
88
|
+
graph_id?: string;
|
|
89
|
+
name?: string;
|
|
90
|
+
metadata?: Metadata;
|
|
91
|
+
}, auth: AuthContext | undefined): Promise<number>;
|
|
92
|
+
}
|
|
93
|
+
export declare class FileSystemThreads implements ThreadsRepo {
|
|
94
|
+
private readonly conn;
|
|
95
|
+
readonly state: ThreadsStateRepo;
|
|
96
|
+
constructor(conn: FileSystemPersistence<Store>);
|
|
97
|
+
search(options: {
|
|
98
|
+
metadata?: Metadata;
|
|
99
|
+
ids?: string[];
|
|
100
|
+
status?: ThreadStatus;
|
|
101
|
+
values?: Record<string, unknown>;
|
|
102
|
+
limit: number;
|
|
103
|
+
offset: number;
|
|
104
|
+
sort_by?: "thread_id" | "status" | "created_at" | "updated_at";
|
|
105
|
+
sort_order?: "asc" | "desc";
|
|
106
|
+
}, auth: AuthContext | undefined): AsyncGenerator<{
|
|
107
|
+
thread: Thread;
|
|
108
|
+
total: number;
|
|
109
|
+
}>;
|
|
110
|
+
get(thread_id: string, auth: AuthContext | undefined): Promise<Thread>;
|
|
111
|
+
put(thread_id: string, options: {
|
|
112
|
+
metadata?: Metadata;
|
|
113
|
+
if_exists: OnConflictBehavior;
|
|
114
|
+
}, auth: AuthContext | undefined): Promise<Thread>;
|
|
115
|
+
patch(threadId: string, options: {
|
|
116
|
+
metadata?: Metadata;
|
|
117
|
+
}, auth: AuthContext | undefined): Promise<Thread>;
|
|
118
|
+
setStatus(threadId: string, options: {
|
|
119
|
+
checkpoint?: CheckpointPayload;
|
|
120
|
+
exception?: Error;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
delete(thread_id: string, auth: AuthContext | undefined): Promise<string[]>;
|
|
123
|
+
copy(thread_id: string, auth: AuthContext | undefined): Promise<Thread>;
|
|
124
|
+
count(options: {
|
|
125
|
+
metadata?: Metadata;
|
|
126
|
+
values?: Record<string, unknown>;
|
|
127
|
+
status?: ThreadStatus;
|
|
128
|
+
}, auth: AuthContext | undefined): Promise<number>;
|
|
129
|
+
private static State;
|
|
130
|
+
}
|
|
131
|
+
export declare class FileSystemRuns implements RunsRepo {
|
|
132
|
+
private readonly conn;
|
|
133
|
+
private readonly threads;
|
|
134
|
+
readonly stream: RunsStreamRepo;
|
|
135
|
+
constructor(conn: FileSystemPersistence<Store>);
|
|
136
|
+
next(): AsyncGenerator<{
|
|
137
|
+
run: Run;
|
|
138
|
+
attempt: number;
|
|
139
|
+
signal: AbortSignal;
|
|
140
|
+
}>;
|
|
141
|
+
put(runId: string, assistantId: string, kwargs: RunKwargs, options: {
|
|
142
|
+
threadId?: string;
|
|
143
|
+
userId?: string;
|
|
144
|
+
status?: RunStatus;
|
|
145
|
+
metadata?: Metadata;
|
|
146
|
+
preventInsertInInflight?: boolean;
|
|
147
|
+
multitaskStrategy?: MultitaskStrategy;
|
|
148
|
+
ifNotExists?: IfNotExists;
|
|
149
|
+
afterSeconds?: number;
|
|
150
|
+
}, auth: AuthContext | undefined): Promise<Run[]>;
|
|
151
|
+
get(runId: string, thread_id: string | undefined, auth: AuthContext | undefined): Promise<Run | null>;
|
|
152
|
+
delete(run_id: string, thread_id: string | undefined, auth: AuthContext | undefined): Promise<string | null>;
|
|
153
|
+
wait(runId: string, threadId: string | undefined, auth: AuthContext | undefined): Promise<unknown>;
|
|
154
|
+
join(runId: string, threadId: string, auth: AuthContext | undefined): Promise<{} | null>;
|
|
155
|
+
cancel(threadId: string | undefined, runIds: string[], options: {
|
|
156
|
+
action?: "interrupt" | "rollback";
|
|
157
|
+
}, auth: AuthContext | undefined): Promise<void>;
|
|
158
|
+
search(threadId: string, options: {
|
|
159
|
+
limit?: number | null;
|
|
160
|
+
offset?: number | null;
|
|
161
|
+
status?: string | null;
|
|
162
|
+
metadata?: Metadata | null;
|
|
163
|
+
}, auth: AuthContext | undefined): Promise<Run[]>;
|
|
164
|
+
setStatus(runId: string, status: RunStatus): Promise<void>;
|
|
165
|
+
private static Stream;
|
|
166
|
+
}
|
|
167
|
+
export declare class Crons {
|
|
168
|
+
}
|
|
169
|
+
export {};
|