mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
* refactor: expand acp core package * chore: drop acp core package symlink * fix: keep acp core dependency graph stable * fix: add acp core tsconfig subpaths * fix: sync acp core boundary path artifacts * fix: use kysely for cron run-log queries * fix: resolve acp core subpaths in loaders
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { AcpSession } from "./types.mjs";
|
|
|
|
//#region src/session.d.ts
|
|
type AcpSessionStore = {
|
|
createSession: (params: {
|
|
sessionKey: string;
|
|
cwd: string;
|
|
sessionId?: string;
|
|
ledgerSessionId?: string;
|
|
}) => AcpSession;
|
|
hasSession: (sessionId: string) => boolean;
|
|
getSession: (sessionId: string) => AcpSession | undefined;
|
|
getSessionByRunId: (runId: string) => AcpSession | undefined;
|
|
setActiveRun: (sessionId: string, runId: string, abortController: AbortController) => void;
|
|
clearActiveRun: (sessionId: string) => void;
|
|
cancelActiveRun: (sessionId: string) => boolean;
|
|
deleteSession: (sessionId: string) => boolean;
|
|
clearAllSessionsForTest: () => void;
|
|
};
|
|
type AcpSessionStoreOptions = {
|
|
maxSessions?: number;
|
|
idleTtlMs?: number;
|
|
now?: () => number;
|
|
};
|
|
declare function createInMemorySessionStore(options?: AcpSessionStoreOptions): AcpSessionStore;
|
|
declare const defaultAcpSessionStore: AcpSessionStore;
|
|
//#endregion
|
|
export { AcpSessionStore, createInMemorySessionStore, defaultAcpSessionStore }; |