import type { ExecutorResult, WorkflowRun, WorkflowStepRun, WorkflowStepRunStatus } from "../types.js"; /** Maximum characters kept from each end of a child output when building parent envelopes. */ export declare const ENVELOPE_EXCERPT_CHARS = 2048; /** Stable marker prefix recorded on skipped step runs that were blocked by policy exit codes. */ export declare const BLOCKED_STEP_ERROR_PREFIX = "blocked:"; /** * Excerpts scrub BEFORE truncating: cutting raw output at fixed character * boundaries can bisect a credential (e.g. an `sk` + `-ant-…` key whose prefix * falls in the omitted middle), leaving a fragment no scrub pattern matches. * scrubSecrets is idempotent, so store-time re-scrubbing stays safe. */ export declare function boundedExcerpt(text: string | undefined, limit?: number): string | undefined; export interface OutputSummary { stdoutBytes: number; stderrBytes: number; stdoutExcerpt?: string; stderrExcerpt?: string; } export declare function summarizeOutput(stdout: string | undefined, stderr: string | undefined): OutputSummary; export interface ExecutorResultSummary extends OutputSummary { status: ExecutorResult["status"]; exitCode?: number; durationMs: number; error?: string; } export declare function summarizeExecutorResult(result: Pick): ExecutorResultSummary; export interface WorkflowStepRunSummary extends OutputSummary { stepId: string; status: WorkflowStepRunStatus; exitCode?: number; durationMs?: number; error?: string; blocked: boolean; } export declare function isBlockedStepRun(step: Pick | undefined): boolean; export declare function summarizeWorkflowStepRun(step: WorkflowStepRun): WorkflowStepRunSummary; /** * Parent-run result envelope: per-step summaries only. Full child output stays on the * workflow step run rows; duplicating it here bloated the database and propagated secrets. */ export declare function workflowRunEnvelope(run: WorkflowRun, steps: WorkflowStepRun[]): string;