clyops Node API
    Preparing search index...

    Interface ApiOptions

    Tool root, authorization, execution limits, and lifecycle settings for the HTTP server.

    interface ApiOptions {
        apiKey?: string;
        audit?: (entry: Omit<AuditEntry, "time">) => void;
        concurrency?: number;
        cwd?: string;
        filter?: ToolFilter;
        keys?: Record<string, ApiKey>;
        maxBody?: number;
        maxOutput?: number;
        mcp?: boolean;
        name?: string;
        onReload?: (loaded: { tools: ApiTool[]; tree: Group }) => void;
        positionalsOrder?: "first" | "last";
        root: string;
        timeoutMs?: number;
        version?: string;
        watch?: boolean;
        within?: string[];
    }
    Index
    apiKey?: string

    Required as Authorization: Bearer KEY or X-API-Key: KEY when set; it may run every tool.

    audit?: (entry: Omit<AuditEntry, "time">) => void

    Called after every run, for an audit log.

    concurrency?: number

    Async jobs run at the same time (default: the number of CPUs).

    cwd?: string

    Working directory tools run in (default: the server's).

    filter?: ToolFilter

    Which tools to serve at all (with the root's allow/deny settings).

    keys?: Record<string, ApiKey>

    Named keys, each limited to the tools its allow/deny globs let through.

    maxBody?: number

    Largest request body accepted: JSON, multipart, or spooled for an async job (default 10 MiB).

    maxOutput?: number

    Keep at most this many bytes of a tool's stdout and stderr (0 or unset: all). Streamed stdout is not kept.

    mcp?: boolean

    Also serve the tools over MCP (streamable HTTP) at /mcp (default: true).

    name?: string

    API title (default: the root's name).

    onReload?: (loaded: { tools: ApiTool[]; tree: Group }) => void

    Called after each reload when watching.

    positionalsOrder?: "first" | "last"

    Positionals before or after options (default: first).

    root: string

    Tools directory or dispatcher definition file.

    timeoutMs?: number

    Kill a tool after this long (0: never).

    version?: string

    Server version advertised to clients.

    watch?: boolean

    Pick up added, changed and removed tools without a restart (default: false; call close() to stop).

    within?: string[]

    Path-valued inputs must resolve inside these directories.