/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { Command } from "commander"; /** Nothing standard sits here, and it is easy to type. */ export declare const DEFAULT_WEB_PORT = 8787; /** * Loopback by default, and deliberately not a wildcard by accident. * * The console has no authentication beyond a per-process session token, and * every page can start work that spends real money on model calls, so binding * it to an interface the network can reach must be something an operator says * out loud rather than the default they get by typing `workglow web`. */ export declare const DEFAULT_WEB_HOST = "127.0.0.1"; export interface RegisterWebCommandOptions { /** Name shown in the rendered command line, e.g. `sec`. */ readonly binaryName?: string; /** How to start this CLI as a child, defaulting to how it was started. */ readonly binary?: readonly string[]; readonly logDir?: string; } /** * Adds `web` to a commander program. A downstream CLI gets the console — its * own commands included — by calling this once. */ /** * The command whose tree the console serves: the root of whatever `web` was * registered on. A CLI that files `web` under a group (`setup web`) still * means "this CLI's commands", not the group's — and the root is also where * the binary name lives, which the console prints in front of every run. */ export declare function consoleRoot(command: Command): Command; export declare function registerWebCommand(program: Command, options?: RegisterWebCommandOptions): void;