mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-31 12:37:59 +00:00
* fix(release): rerun install-smoke payload producer for all payload consumers * fix(release): key payload reruns on attempt-bound install-smoke consumers * fix(release): show payload rerun plans in frv dry-run output
166 lines
4.9 KiB
TypeScript
166 lines
4.9 KiB
TypeScript
import type { PublicationObservation } from "./frv-publication-status.mts";
|
|
|
|
export type FrvPublicationStatus = Partial<FrvContinuationStatus> & {
|
|
publication: PublicationObservation;
|
|
};
|
|
|
|
export interface FrvChildStatus extends Record<string, unknown> {
|
|
effectiveRunAttempt: number | null;
|
|
key: string;
|
|
plannedRunAttempt: number | null;
|
|
runId: string;
|
|
status: "active" | "failed" | "missing" | "passed";
|
|
}
|
|
|
|
export interface FrvContinuationStatus {
|
|
active: FrvChildStatus[];
|
|
children: FrvChildStatus[];
|
|
failed: FrvChildStatus[];
|
|
missing: FrvChildStatus[];
|
|
passed: FrvChildStatus[];
|
|
}
|
|
|
|
interface FrvReadOptions {
|
|
operationDeadline?: number;
|
|
}
|
|
|
|
export interface FrvClient {
|
|
repository?: string;
|
|
getReleaseEvidenceClient: () => ReturnType<
|
|
typeof import("./release-ci-summary.mjs").createReleaseEvidenceClient
|
|
>;
|
|
getAttemptJobs: (
|
|
runId: string,
|
|
runAttempt: number,
|
|
options?: FrvReadOptions,
|
|
) => Promise<Record<string, unknown>[]>;
|
|
getJobLog: (jobId: number, options?: FrvReadOptions) => Promise<string>;
|
|
getParentJobs: (runId: string, options?: FrvReadOptions) => Promise<Record<string, unknown>[]>;
|
|
getRun: (runId: string, options?: FrvReadOptions) => Promise<Record<string, unknown>>;
|
|
getRunAttempt: (
|
|
runId: string,
|
|
runAttempt: number,
|
|
options?: FrvReadOptions,
|
|
) => Promise<Record<string, unknown>>;
|
|
cancelRun?: (runId: string, force: boolean) => Promise<unknown>;
|
|
rerunFailed?: (runId: string) => Promise<unknown>;
|
|
rerunJob?: (jobId: number) => Promise<unknown>;
|
|
rerunParent?: (runId: string) => Promise<unknown>;
|
|
rerunRun?: (runId: string) => Promise<unknown>;
|
|
listRuns?: (query: string) => Promise<Record<string, unknown>[]>;
|
|
getVariable?: (name: string) => Promise<string>;
|
|
deleteVariable?: (name: string) => Promise<unknown>;
|
|
verify?: (
|
|
runId: string,
|
|
plan: Record<string, unknown>,
|
|
operationDeadline?: number,
|
|
expectedRunAttempts?: Record<string, number>,
|
|
) => Promise<unknown>;
|
|
verifySeal?: (
|
|
runId: string,
|
|
plan: Record<string, unknown>,
|
|
operationDeadline: number,
|
|
expectedRunAttempts: Record<string, number>,
|
|
) => Promise<boolean>;
|
|
}
|
|
|
|
export type FrvConcreteClient = FrvClient & {
|
|
getRef: (fullRef: string, options?: FrvReadOptions) => Promise<Record<string, unknown>>;
|
|
} & Required<
|
|
Pick<
|
|
FrvClient,
|
|
| "cancelRun"
|
|
| "rerunFailed"
|
|
| "rerunJob"
|
|
| "rerunParent"
|
|
| "rerunRun"
|
|
| "listRuns"
|
|
| "verify"
|
|
| "verifySeal"
|
|
>
|
|
>;
|
|
|
|
export function restoreReleasePriority(
|
|
recordPath: string,
|
|
client: Partial<FrvClient>,
|
|
options?: { dryRun?: boolean },
|
|
): Promise<Record<string, unknown>>;
|
|
export function clearReleasePriority(
|
|
client: Partial<FrvClient>,
|
|
parentRunId: string,
|
|
): Promise<boolean>;
|
|
export function watchRelease(
|
|
parentRunId: string,
|
|
client: Pick<
|
|
FrvConcreteClient,
|
|
| "getAttemptJobs"
|
|
| "getJobLog"
|
|
| "getParentJobs"
|
|
| "getRun"
|
|
| "repository"
|
|
| "getRef"
|
|
| "getReleaseEvidenceClient"
|
|
>,
|
|
options?: {
|
|
emit?: (event: {
|
|
message: string;
|
|
url?: string;
|
|
candidate?: {
|
|
sha: string | null;
|
|
ref: string | null;
|
|
tipSha: string | null;
|
|
state: "current" | "superseded" | "unknown";
|
|
};
|
|
}) => void;
|
|
intervalMs?: number;
|
|
once?: boolean;
|
|
operationDeadline?: number;
|
|
statePath?: string;
|
|
},
|
|
): Promise<{ complete: boolean; statePath: string }>;
|
|
export function inspectContinuation(
|
|
plan: Record<string, unknown>,
|
|
client: Pick<FrvClient, "getAttemptJobs" | "getRun" | "repository">,
|
|
options?: FrvReadOptions,
|
|
): Promise<FrvContinuationStatus>;
|
|
export function createClient(
|
|
repository: string,
|
|
dependencies?: Record<string, unknown>,
|
|
): FrvConcreteClient;
|
|
export function preflightContinuation(
|
|
plan: Record<string, unknown>,
|
|
rootRunId: string,
|
|
client: Pick<
|
|
FrvClient,
|
|
"getJobLog" | "getParentJobs" | "getRunAttempt" | "getReleaseEvidenceClient" | "getRun"
|
|
>,
|
|
repository?: string,
|
|
options?: FrvReadOptions,
|
|
): Promise<Record<string, unknown>>;
|
|
export function loadPlan(
|
|
options: Record<string, unknown>,
|
|
loadExecutionPlan?: (...args: unknown[]) => Promise<unknown>,
|
|
): Promise<Record<string, unknown>>;
|
|
export function inspectUnsealedPlan(
|
|
options: { repository: string; runId: string },
|
|
client: Pick<FrvClient, "getAttemptJobs" | "getRun">,
|
|
): Promise<Record<string, unknown>>;
|
|
export function loadPlanForCommand(
|
|
options: { command: string; repository: string; runId: string },
|
|
client: Pick<FrvClient, "getAttemptJobs" | "getRun">,
|
|
loadExecutionPlan?: (...args: unknown[]) => Promise<unknown>,
|
|
): Promise<
|
|
| { plan: Record<string, unknown>; pending?: never }
|
|
| { plan?: never; pending: Record<string, unknown> }
|
|
>;
|
|
export function continueFailed(
|
|
plan: Record<string, unknown>,
|
|
rootRunId: string,
|
|
client: FrvClient,
|
|
options?: Record<string, unknown>,
|
|
): Promise<{
|
|
action: string;
|
|
finalRunId?: string;
|
|
reruns?: Record<string, unknown>[];
|
|
status: FrvContinuationStatus;
|
|
}>;
|