import type { ActionHttpConfig } from "../action.js"; export type CliWrapperFlags = { http?: ActionHttpConfig | false; agentTool?: false; needsApproval?: true; persistInBrowser?: false; uiOnly?: true; toolCallable?: false; }; /** * The flags the dev scan reads from an action's source when it can't import * the module and falls back to running it through `pnpm action`. It parses * the source rather than running it, so it errs toward the safe side: only a * literal `needsApproval: false` skips the approval gate, only a literal * `persistInBrowser: true` lets the browser keep results, only a literal * `uiOnly: false` lets the agent and other callers reach it, and only a * literal `toolCallable: true` lets tool calls in, whether set in the * options or as a named `const` export beside `tool` and `run`. Any other * value sets the safe one, and so do options it can't see (spread in, passed * by name, built by another helper or a `defineAction` that isn't the * framework's, re-exported, or exported through a binding the module changes) * and a source it can't parse. A module that defines no action gets none of * them. `agentTool: false` and `http: false` are read as written wherever * they appear. An `http` route is read from the action's options or a named * `http` export beside `tool` and `run`; one it can't see leaves the default. */ export declare function cliWrapperFlagsFromSource(src: string): CliWrapperFlags;