import type { AgentRole, AgentStatus, HeartbeatInvocationSource, HeartbeatRunStatus, WakeupTriggerDetail, WakeupRequestStatus } from "../constants.js"; export interface HeartbeatRun { id: string; companyId: string; agentId: string; invocationSource: HeartbeatInvocationSource; triggerDetail: WakeupTriggerDetail | null; status: HeartbeatRunStatus; startedAt: Date | null; finishedAt: Date | null; error: string | null; wakeupRequestId: string | null; exitCode: number | null; signal: string | null; usageJson: Record | null; resultJson: Record | null; sessionIdBefore: string | null; sessionIdAfter: string | null; logStore: string | null; logRef: string | null; logBytes: number | null; logSha256: string | null; logCompressed: boolean; stdoutExcerpt: string | null; stderrExcerpt: string | null; errorCode: string | null; externalRunId: string | null; processPid: number | null; processStartedAt: Date | null; retryOfRunId: string | null; processLossRetryCount: number; contextSnapshot: Record | null; createdAt: Date; updatedAt: Date; } export interface HeartbeatRunEvent { id: number; companyId: string; runId: string; agentId: string; seq: number; eventType: string; stream: "system" | "stdout" | "stderr" | null; level: "info" | "warn" | "error" | null; color: string | null; message: string | null; payload: Record | null; createdAt: Date; } export interface AgentRuntimeState { agentId: string; companyId: string; adapterType: string; sessionId: string | null; sessionDisplayId?: string | null; sessionParamsJson?: Record | null; stateJson: Record; lastRunId: string | null; lastRunStatus: string | null; totalInputTokens: number; totalOutputTokens: number; totalCachedInputTokens: number; totalCostCents: number; lastError: string | null; createdAt: Date; updatedAt: Date; } export interface AgentTaskSession { id: string; companyId: string; agentId: string; adapterType: string; taskKey: string; sessionParamsJson: Record | null; sessionDisplayId: string | null; lastRunId: string | null; lastError: string | null; createdAt: Date; updatedAt: Date; } export interface AgentWakeupRequest { id: string; companyId: string; agentId: string; source: HeartbeatInvocationSource; triggerDetail: WakeupTriggerDetail | null; reason: string | null; payload: Record | null; status: WakeupRequestStatus; coalescedCount: number; requestedByActorType: "user" | "agent" | "system" | null; requestedByActorId: string | null; idempotencyKey: string | null; runId: string | null; requestedAt: Date; claimedAt: Date | null; finishedAt: Date | null; error: string | null; createdAt: Date; updatedAt: Date; } export interface InstanceSchedulerHeartbeatAgent { id: string; companyId: string; companyName: string; companyIssuePrefix: string; agentName: string; agentUrlKey: string; role: AgentRole; title: string | null; status: AgentStatus; adapterType: string; intervalSec: number; heartbeatEnabled: boolean; schedulerActive: boolean; lastHeartbeatAt: Date | null; } //# sourceMappingURL=heartbeat.d.ts.map