Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

675 B
Raw Blame
import type { ProgressReporter } from "../application/ProgressReporter.js";

/** Report one lifecycle operation start through the shared monotonic boundary. */
export const reportLifecycleStart = (
  progress: ProgressReporter,
  phase: string,
  message = "started",
): Promise<void> => progress.report({ phase, completed: 0, total: 1, message });

/** Report one lifecycle operation's terminal disposition. */
export const reportLifecycleEnd = (
  progress: ProgressReporter,
  phase: string,
  succeeded: boolean,
): Promise<void> =>
  progress.report({
    phase,
    completed: 1,
    total: 1,
    message: succeeded ? "completed" : "failed",
    terminal: true,
  });