import { WorkspaceResolution } from "../../workspace/WorkspaceManager.js"; import { JobRecord, JobService, JobState } from "./JobService.js"; export interface JobListFilters { status?: string; type?: string; projectKey?: string; since?: string; limit?: number; } export interface JobSummary extends JobRecord { progressPct?: number | null; lastCheckpointStage?: string; lastCheckpointAt?: string; stateDetail?: string; jobState?: JobState; jobStateDetail?: string; totalUnits?: number; completedUnits?: number; } export interface CheckpointSummary { stage?: string; timestamp?: string; details?: Record; path?: string; } export interface JobLogEntry { timestamp: string; sequence?: number | null; level?: string | null; source?: string | null; message?: string | null; taskId?: string | null; taskKey?: string | null; phase?: string | null; details?: Record | null; } export interface JobLogsResult { entries: JobLogEntry[]; cursor?: { timestamp: string; sequence?: number | null; }; } export interface TaskRunSnapshot { taskId?: string | null; taskKey?: string | null; status?: string | null; startedAt?: string | null; finishedAt?: string | null; command?: string | null; } export interface TaskRunSummary { totals: Record; tasks: TaskRunSnapshot[]; } export interface TokenUsageSummary { agentId?: string | null; modelName?: string | null; commandName?: string | null; commandRunId?: string | null; taskId?: string | null; tokensPrompt?: number | null; tokensCompletion?: number | null; tokensTotal?: number | null; tokensCached?: number | null; tokensCacheRead?: number | null; tokensCacheWrite?: number | null; durationMs?: number | null; cost?: number | null; } export declare class JobInsightsService { private workspace; private jobService; private apiClient?; constructor(workspace: WorkspaceResolution, jobService: JobService, apiBaseUrl?: string); static create(workspace: WorkspaceResolution): Promise; close(): Promise; listJobs(filters?: JobListFilters): Promise; getJob(jobId: string): Promise; latestCheckpoint(jobId: string): Promise; getJobLogs(jobId: string, options?: { since?: string; after?: { timestamp: string; sequence?: number | null; }; }): Promise; summarizeTasks(jobId: string): Promise; summarizeTokenUsage(jobId: string): Promise; readJobLog(jobId: string): Promise; readJobLogTail(jobId: string, offset: number): Promise<{ content: string; nextOffset: number; }>; updateJobState(jobId: string, state: JobState, meta?: Record): Promise; cancelJob(jobId: string, options?: { force?: boolean; reason?: string; }): Promise; } //# sourceMappingURL=JobInsightsService.d.ts.map