import type { CorpConfig } from "../../core/config/types.js"; import type { createSealClient } from "../../core/http/factory.js"; import { runTool } from "../helpers.js"; import { jsonObject } from "../parser.js"; import { outputOptions } from "../printer.js"; import type { ParsedArgs } from "../types.js"; export async function handleToolCommand( action: string | undefined, client: Awaited>, corp: CorpConfig, args: ParsedArgs ) { if (!action) throw new Error("Usage: seal-use tool [--json '{...}']"); await runTool(action, client, corp, jsonObject(args.json), outputOptions(args.options)); }