@squidcloud/backend 1.0.497 → 1.0.498
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/backend/src/langgraph/index.d.ts +39 -0
- package/dist/backend/src/langgraph/langgraph-runner.d.ts +1 -0
- package/dist/backend/src/langgraph/squid-checkpointer.d.ts +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/langgraph.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/langgraph.js +1 -0
- package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +1 -1
- package/dist/node_modules/@langchain/protocol/protocol.d.ts +760 -0
- package/package.json +24 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ActionMethodDecorator } from '../../../internal-common/src/public-types-backend/bundle-api.public-types';
|
|
2
|
+
export * from './langgraph-runner';
|
|
3
|
+
export * from './squid-checkpointer';
|
|
4
|
+
/**
|
|
5
|
+
* Options of the {@link langGraph} decorator.
|
|
6
|
+
* @category AI
|
|
7
|
+
*/
|
|
8
|
+
export interface LangGraphOptions {
|
|
9
|
+
/** A description of the graph. */
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The graph a {@link langGraph} method returns: an uncompiled LangGraph graph, such as a `StateGraph`.
|
|
14
|
+
* @category AI
|
|
15
|
+
*/
|
|
16
|
+
export interface LangGraphDefinition {
|
|
17
|
+
/** LangGraph's `compile`. Squid calls it with a checkpointer that stores the threads of the graph. */
|
|
18
|
+
compile(options?: {
|
|
19
|
+
checkpointer?: unknown;
|
|
20
|
+
}): unknown;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Type of a method decorated with {@link langGraph}.
|
|
24
|
+
* @category AI
|
|
25
|
+
*/
|
|
26
|
+
export type LangGraphAction = () => LangGraphDefinition | Promise<LangGraphDefinition>;
|
|
27
|
+
/**
|
|
28
|
+
* A decorator that registers a LangGraph graph under an ID, so clients can run it with `squid.langGraph(graphId)`.
|
|
29
|
+
*
|
|
30
|
+
* The decorated method returns the uncompiled graph. Squid compiles it with a checkpointer that keeps every
|
|
31
|
+
* thread in Squid, so an interrupted thread can be resumed from any client. Secure the graph with
|
|
32
|
+
* `@secureLangGraph`.
|
|
33
|
+
*
|
|
34
|
+
* @param graphId The ID of the graph.
|
|
35
|
+
* @param options Options of the graph.
|
|
36
|
+
* @category AI
|
|
37
|
+
* @category Decorator
|
|
38
|
+
*/
|
|
39
|
+
export declare function langGraph(graphId: string, options?: LangGraphOptions): ActionMethodDecorator<LangGraphAction>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|