const VERIFY_USAGE = [
  "Usage: wigolo verify [options]",
  "",
  "Options:",
  "  --plain, --non-interactive, -y   Force plain text output (no TUI)",
  "  --help, -h                       Show this message",
  "",
  "Exit code 0 when all capabilities pass or skip.",
  "Exit code 1 when any capability fails.",
  ""
].join("\n");
function parseVerifyFlags(args) {
  const flags = { plain: false, help: false };
  for (const arg of args) {
    if (arg === "--plain" || arg === "-y" || arg === "--non-interactive") {
      flags.plain = true;
    } else if (arg === "--help" || arg === "-h") {
      flags.help = true;
    }
  }
  return flags;
}
async function runVerifyE2E(args) {
  const flags = parseVerifyFlags(args);
  if (flags.help) {
    process.stderr.write(VERIFY_USAGE);
    return 0;
  }
  const { buildDefaultDeps, verifyEndToEnd, formatVerifyResultPlain } = await import("./tui/actions/verify-e2e.js");
  const deps = await buildDefaultDeps();
  const result = await verifyEndToEnd(deps);
  for (const line of formatVerifyResultPlain(result)) {
    process.stderr.write(`${line}
`);
  }
  return result.allPassed ? 0 : 1;
}
export {
  parseVerifyFlags,
  runVerifyE2E
};
//# sourceMappingURL=verify.js.map