eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
37 lines (36 loc) • 1.99 kB
TypeScript
import type { EveAgentStoreCallbacks, EveAgentStoreInit, EveAgentStoreSnapshot } from "#client/eve-agent-store-state.js";
import type { CancelSessionResult, SendTurnPayload } from "#client/types.js";
export type { EveAgentStoreCallbacks, EveAgentStoreInit, EveAgentStoreSnapshot, EveAgentStoreStatus, PrepareSend, } from "#client/eve-agent-store-state.js";
declare const detachStore: unique symbol;
declare const attachStore: unique symbol;
/**
* Owns frontend session creation, continuous streaming, turn submission, and UI projection.
* Framework bindings subscribe to snapshots and attach or detach transport with their lifecycle.
* Reset clears local state; cancellation remains an explicit durable operation.
*/
export declare class EveAgentStore<TData> {
#private;
constructor(init: EveAgentStoreInit<TData>);
get snapshot(): EveAgentStoreSnapshot<TData>;
setCallbacks(callbacks: EveAgentStoreCallbacks<TData>): void;
subscribe(callback: () => void): () => void;
/** Creates this store's owned session without starting a turn. */
prewarm(): Promise<void>;
send<TOutput = unknown>(input: SendTurnPayload<TOutput>): Promise<void>;
/** Replays this store's attached durable session and follows an in-flight turn. */
resume(): Promise<void>;
/**
* Requests cooperative cancellation of the active durable turn.
*
* If the server has not emitted `turn.started` yet, the request waits for
* that turn ID. The event stream stays attached until the turn settles.
*/
cancel(): Promise<CancelSessionResult>;
[attachStore](): void;
[detachStore](): void;
reset(): void;
}
/** @internal Detaches local transport without cancelling durable server work. */
export declare function detachEveAgentStore<TData>(store: EveAgentStore<TData>): void;
/** @internal Starts mount-scoped session work after the framework commits. */
export declare function attachEveAgentStore<TData>(store: EveAgentStore<TData>): void;