@posthog/agent
Version:
TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog
25 lines • 1.14 kB
TypeScript
export interface TaskExecutionState {
taskId: string;
status: "running" | "completed" | "failed" | "canceled" | "timeout";
mode: "plan_only" | "plan_and_build" | "build_only";
result?: unknown;
startedAt: number;
completedAt?: number;
abortController?: AbortController;
}
export declare class TaskManager {
executionStates: Map<string, TaskExecutionState>;
private defaultTimeout;
generateExecutionId(): string;
startExecution(taskId: string, mode: "plan_only" | "plan_and_build" | "build_only", executionId?: string): TaskExecutionState;
waitForCompletion(executionId: string): Promise<unknown>;
completeExecution(executionId: string, result: unknown): void;
failExecution(executionId: string, error: Error): void;
cancelExecution(executionId: string): void;
getExecution(executionId: string): TaskExecutionState | undefined;
getAbortSignal(executionId: string): AbortSignal | undefined;
getAbortController(executionId: string): AbortController | undefined;
private scheduleTimeout;
cleanup(olderThan?: number): void;
}
//# sourceMappingURL=task-manager.d.ts.map