Skip to content

jobs.output

A job’s state, exit and newest output (PRT-353).

/** `jobs.output` params (PRT-353). */
export type JobOutputParams = {
jobId: string;
/** Default 16000. */
maxChars?: number | null;
};
/** `jobs.output` result (PRT-353): a job as an agent reads it. */
export type JobOutput = {
command: string;
/** `null` while it runs or when a signal ended it. */
exitCode: number | null;
jobId: string;
/** The label its agent gave it (`job_start`'s `name`). */
name?: string | null;
/** Older lines left out of `output`. */
omittedLines: number;
/** Its newest lines (both streams, in order) joined by line breaks, at most `maxChars` characters. */
output: string;
signal: number | null;
/** `completed` on exit 0, `failed` on another exit or a signal, `cancelled` when killed (PRT-351). */
state: "running" | "completed" | "failed" | "cancelled";
};