import type { ClosureBlocker, ClosureNextPayload, ClosureStatusPayload, ClosureStep } from "./workflow-closure.js"; export type SafeWorkflowBlocker = { readonly evidenceRef?: string; readonly id: string; readonly source?: string; }; export type SafeWorkflowStep = { readonly blockerId?: string; readonly command?: string; readonly commandAfterContent?: string; readonly evidenceRef?: string; readonly id: string; readonly kind: ClosureStep["kind"]; readonly source?: string; readonly status: ClosureStep["status"]; }; export type WorkflowDiagnosticReference = { readonly artifactRefs: readonly string[]; readonly blockerId: string; readonly status?: ClosureStep["status"]; readonly stepId?: string; }; export declare function safeWorkflowCode(value: string, fallback: string): string; export declare function safeWorkflowDiagnostic(value: string): string; export declare function safeWorkflowTitle(_value: string): string; export declare function safeArtifactReference(value: string | undefined): string | undefined; export declare function safeProjectArtifactReference(projectDir: string, artifactPath: string | undefined): string | undefined; export declare function safeWorkflowCommand(value: string | undefined): string | undefined; export declare function safeClosureBlocker(blocker: ClosureBlocker): SafeWorkflowBlocker; export declare function safeClosureStep(step: ClosureStep): SafeWorkflowStep; export declare function workflowDiagnosticReference(blocker: ClosureBlocker, step: ClosureStep | null): WorkflowDiagnosticReference; export declare function safeWorkflowClosureNextPayload(payload: ClosureNextPayload): { action: "next"; nextStep: SafeWorkflowStep; rendering: { blockerCount: number; renderedBlockerCount: number; truncated: boolean; }; state: { archive: "pending" | "complete" | "history-only-repair"; blockers: SafeWorkflowBlocker[]; currentTicket: { reviewArchiveCandidate: boolean; state: "active-work" | "history-only" | "missing-work"; path?: string | undefined; id: string; } | null; evidence: "present" | "missing"; finish: "blocked" | "passed"; implementationReport: "missing" | "malformed" | "conflicting" | "filled" | "template" | "unknown"; lifecycle: { blockers: { source?: string | undefined; id: string; }[]; evidence: { status: "present" | "missing"; source?: string | undefined; }; finishAuthority: { status: "blocked" | "trusted"; blocker?: SafeWorkflowBlocker | undefined; }; loops: { readonly ralph: "absent" | "current" | "malformed" | "unsafe"; readonly workflow: "absent" | "current" | "malformed" | "stale" | "unassessed" | "unsafe"; }; paths: { readonly evidence: "unsafe" | "unavailable" | "safe"; readonly harness: "invalid" | "safe"; readonly rules: "unsafe" | "unavailable" | "safe"; }; readiness: "blocked" | "ready-for-closure"; reports: { readonly implementation: import("../runtime/workflow-report-status.js").WorkflowReportStatusDetail; readonly review: import("../runtime/workflow-report-status.js").WorkflowReportStatusDetail; }; schemaVersion: "workflow-lifecycle.1"; tickets: { readonly status: "clear" | "pending"; }; }; pendingTickets: string[]; plan: string; reportCoverage: "missing" | "not-checked" | "sufficient"; reviewReport: "missing" | "malformed" | "conflicting" | "filled" | "template" | "unknown"; tdd: { source?: string | undefined; kind: "passed" | "unavailable" | "disabled" | "no-ticket" | "red-missing" | "red-without-green"; evidenceRef?: string | undefined; }; verification: import("./workflow-closure-verification.js").ClosureVerification; }; steps: SafeWorkflowStep[]; }; export declare function safeWorkflowClosureStatusPayload(payload: ClosureStatusPayload): { action: "status"; state: { blockers: { tickets?: { reviewArchiveCandidate: boolean; state: "active-work" | "history-only" | "missing-work"; technicalSignals: string[]; path: string; id: string; title: string; }[] | undefined; source: string; id: string; reason: string; evidenceRef?: string | undefined; }[]; currentTicket: { reviewArchiveCandidate: boolean; state: "active-work" | "history-only" | "missing-work"; technicalSignals: string[]; path: string; id: string; title: string; } | null; tdd: { source?: string | undefined; kind: "passed" | "unavailable" | "disabled" | "no-ticket" | "red-missing" | "red-without-green"; reason: string; evidenceRef?: string | undefined; }; archive: "pending" | "complete" | "history-only-repair"; evidence: "present" | "missing"; finish: "blocked" | "passed"; implementationReport: "missing" | "malformed" | "conflicting" | "filled" | "template" | "unknown"; lifecycle: { blockers: { source?: string | undefined; id: string; }[]; evidence: { status: "present" | "missing"; source?: string | undefined; }; finishAuthority: { status: "blocked" | "trusted"; blocker?: SafeWorkflowBlocker | undefined; }; loops: { readonly ralph: "absent" | "current" | "malformed" | "unsafe"; readonly workflow: "absent" | "current" | "malformed" | "stale" | "unassessed" | "unsafe"; }; paths: { readonly evidence: "unsafe" | "unavailable" | "safe"; readonly harness: "invalid" | "safe"; readonly rules: "unsafe" | "unavailable" | "safe"; }; readiness: "blocked" | "ready-for-closure"; reports: { readonly implementation: import("../runtime/workflow-report-status.js").WorkflowReportStatusDetail; readonly review: import("../runtime/workflow-report-status.js").WorkflowReportStatusDetail; }; schemaVersion: "workflow-lifecycle.1"; tickets: { readonly status: "clear" | "pending"; }; }; pendingTickets: string[]; plan: string; reportCoverage: "missing" | "not-checked" | "sufficient"; reviewReport: "missing" | "malformed" | "conflicting" | "filled" | "template" | "unknown"; verification: import("./workflow-closure-verification.js").ClosureVerification; }; steps: { reason?: string | undefined; blockerId?: string; command?: string; commandAfterContent?: string; evidenceRef?: string; id: string; kind: ClosureStep["kind"]; source?: string; status: ClosureStep["status"]; }[]; };