Skip to content

Type Definitions

Common types used across both Browser-Complete and Server-Connected modes.

RunStatus

ts
type RunStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'
StatusDescription
pendingJob is queued, waiting to be picked up by worker
runningJob is currently executing
completedJob finished successfully
failedJob encountered an error
cancelledJob was cancelled before completion

Progress

ts
interface Progress {
  current: number
  total?: number
  message?: string
}
PropertyTypeDescription
currentnumberCurrent progress value
totalnumber | undefinedTotal expected value
messagestring | undefinedHuman-readable progress message

LogEntry

ts
interface LogEntry {
  id: string
  runId: string
  stepName: string | null
  level: 'info' | 'warn' | 'error'
  message: string
  data: unknown
  timestamp: string
}
PropertyTypeDescription
idstringUnique log entry ID
runIdstringAssociated run ID
stepNamestring | nullStep that created the log
level'info' | 'warn' | 'error'Log severity
messagestringLog message
dataunknownOptional structured data
timestampstringISO timestamp

RunRecord

ts
interface RunRecord {
  id: string
  jobName: string
  status: RunStatus
  payload: unknown
  output: unknown
  error: string | null
  progress: Progress | null
  createdAt: string
  updatedAt: string
}
PropertyTypeDescription
idstringUnique run ID
jobNamestringName of the job
statusRunStatusCurrent status
payloadunknownInput payload
outputunknownJob output (when completed)
errorstring | nullError message (when failed)
progressProgress | nullCurrent progress
createdAtstringISO timestamp of creation
updatedAtstringISO timestamp of last update

StepRecord

ts
interface StepRecord {
  name: string
  status: 'completed' | 'failed'
  output: unknown
  error: string | null
  startedAt: string
  completedAt: string | null
}
PropertyTypeDescription
namestringStep name
status'completed' | 'failed'Step result
outputunknownStep return value
errorstring | nullError message (when failed)
startedAtstringISO timestamp of start
completedAtstring | nullISO timestamp of completion

Released under the MIT License.