/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { WebCommandNode } from "./commandTree"; /** * What the page describes and the server runs. Kept free of `node:` imports: * the browser composes the same value and renders the same line from it, so * what you read on screen is what executes. */ export interface WebInvocation { readonly path: readonly string[]; readonly args: readonly string[]; readonly options: Readonly>; /** * Task config values, which the CLI reads from SINGLE-dash flags (`-delay 5`) * so they cannot collide with the double-dash input flags. Kept apart here * for the same reason, rather than hoping a name never appears in both. */ readonly config?: Readonly>; } export declare function composeArgv(invocation: WebInvocation): string[]; /** The invocation as you would have typed it. */ export declare function renderCliLine(binary: string, invocation: WebInvocation): string; /** * The only gate between a page and `spawn`. * * An option the command does not declare is rejected rather than passed * through: this is the boundary where a browser's JSON becomes a process * argument, and commander would happily take an unknown flag on a command that * allows them. */ export declare function validateInvocation(node: WebCommandNode, invocation: WebInvocation, schemaKeys?: ReadonlySet, configKeys?: ReadonlySet): string[];