@agent-graph/core
Version:
A lightweight AI Agent orchestration solution
35 lines • 1.32 kB
TypeScript
import { VertexId } from './vertex';
import { Graph } from './graph';
import { Checkpointer, States, Steps } from './checkpoint';
import { GraphRuntime, Interrupt } from './runtime';
/**
* Lifecycle: run(init) -> superstep() -> interrupt() -> superstep() -> exit() -> ... -> shutdown()
* */
export declare class BuiltGraph<C, V extends VertexId = never> {
running: boolean;
readonly context: C;
readonly version = 1;
readonly builder: Graph<C, V>;
readonly checkpointer?: Checkpointer<V>;
readonly interruptVectorTable: Interrupt[];
readonly shutdownHooks: (() => void | Promise<void>)[];
readonly computedListeners: ((vertexId: V, props: Readonly<unknown>) => void)[];
constructor({ builder, context, checkpointer, }: {
builder: Graph<C, V>;
context: C;
checkpointer?: Checkpointer<V>;
});
private interrupt;
private exit;
private addShutdownHook;
private shutdown;
get runtime(): GraphRuntime<C>;
onComputed(listener: (vertexId: V, props: Readonly<unknown>) => void): void;
private activeAllVertices;
private setVertexStates;
private getVertexStates;
private compute;
private superstep;
run(initialSteps: Steps<V>, initialStates?: States<V>): Promise<void>;
}
//# sourceMappingURL=built-graph.d.ts.map