// SPEC: PJ2026-01060505 Workbench Performance draft-2026-06-17-p0.
// Responsibility: Thin HWLAB node/lane CLI entrypoint. Domain implementation lives in focused modules.
import type { Config } from "./config";
import type { RenderedCliResult } from "./output";
import {
  hwlabNodeHelp as hwlabNodeHelpImpl,
  hwlabNodeObservabilityHelp as hwlabNodeObservabilityHelpImpl,
  hwlabNodeWebProbeHelp as hwlabNodeWebProbeHelpImpl,
  nodeSecretStatusFromTextForTest as nodeSecretStatusFromTextForTestImpl,
  runHwlabNodeCommand as runHwlabNodeCommandImpl,
} from "./hwlab-node-impl";

export async function runHwlabNodeCommand(config: Config, args: string[]): Promise<Record<string, unknown> | RenderedCliResult> {
  return runHwlabNodeCommandImpl(config, args);
}

export function hwlabNodeHelp(): Record<string, unknown> {
  return hwlabNodeHelpImpl();
}

export function hwlabNodeWebProbeHelp(): Record<string, unknown> {
  return hwlabNodeWebProbeHelpImpl();
}

export function hwlabNodeObservabilityHelp(): Record<string, unknown> {
  return hwlabNodeObservabilityHelpImpl();
}

export function nodeSecretStatusFromTextForTest(text: string, commandOk: boolean, exitCode: number | null, stderr: string, node = "G14", lane = "v03"): Record<string, unknown> {
  return nodeSecretStatusFromTextForTestImpl(text, commandOk, exitCode, stderr, node, lane);
}
