import { usageError } from "../../core/errors.js"; import { handleCorpActive } from "./corps/active.js"; import { handleCorpBindings } from "./corps/bindings.js"; import { handleCorpOnboarding, extractKeysFromLinkAction, showCorpKeysAction } from "./corps/onboarding.js"; import { handleCorpOverview } from "./corps/overview.js"; import { handleCorpSync, buildTestHosecloudOutboundName } from "./corps/sync.js"; import { maskCellphone } from "./corps/shared.js"; import type { ParsedArgs } from "../types.js"; export { buildTestHosecloudOutboundName, extractKeysFromLinkAction, maskCellphone, showCorpKeysAction }; export async function handleCorpsCommand( action: string | undefined, maybeName: string | undefined, args: ParsedArgs ) { if (await handleCorpOverview(action, maybeName, args)) return; if (await handleCorpActive(action, maybeName, args)) return; if (await handleCorpBindings(action, maybeName, args)) return; if (await handleCorpSync(action, maybeName, args)) return; if (await handleCorpOnboarding(action, maybeName, args)) return; throw usageError(`Unknown corps command: ${action ?? ""}. Run 'seal-use help' for available commands.`); }