import { stripAnsi } from '../lib/ui.js'; /** * `api tools` — a one-line JSON array of tool NAMES (the posthog-cli shape: * token-cheap for agents, who `describe` only what they need). `--table` * renders the human boxed view with one-line descriptions. */ export declare function apiTools(options: { all?: boolean; table?: boolean; }): Promise; /** * `api search ` — case-insensitive regex over tool names and * descriptions (both advertised and expert), returning name + first sentence * so an agent can pick without a follow-up describe. Invalid regexes fall * back to a literal substring match. */ export declare function apiSearch(pattern: string, options: { json?: boolean; }): Promise; export declare function apiDescribe(toolName: string, options: { json?: boolean; }): Promise; /** * `api call [json]` — invoke one catalog tool with the CLI's session. * Output contract (agents depend on this): structuredContent as JSON on * stdout when the tool returns it, otherwise the text content; failures are a * JSON {error, hint} envelope with exit code 1. */ /** * Tools that move money or irreversibly change account state. `api call` * refuses them without --confirm (the posthog-cli destructive-tool rule, * applied to payments): the agent must verify with the user, then re-run * with --confirm. Advisory annotations can't be trusted for this — the list * is explicit and auditable. */ export declare const CONFIRM_REQUIRED_TOOLS: Set; /** * Minimal JSON-schema check for --dry-run: required fields present, primitive * types match, enums respected. Not a full validator — enough to catch the * mistakes agents actually make before money moves. */ export declare function validateAgainstSchema(args: Record, schema: Record | undefined): string[]; export declare function apiCall(toolName: string, argsJson: string | undefined, options: { stdin?: boolean; confirm?: boolean; dryRun?: boolean; }): Promise; /** Visible for tests: strip helper reused when asserting on rendered output. */ export { stripAnsi }; /** PostHog-style usage card for bare `agent-cards api` — the front door for agents. */ export declare function apiUsage(): void; /** * `agent-cards api --agent-help` — the complete agent guide, printed for the * agent to load into context (the posthog-cli pattern: the steering block * stays short and points here; this output is the canonical, always-current * reference). Tool index is generated live from the catalog, so renames land * here automatically. */ export declare function apiAgentHelp(): Promise; /** * `api schema [field.path]` — resolve a dot path inside a tool's * inputSchema (the posthog-cli drill-down: descend through object properties * and array items). No path prints the whole input schema. */ export declare function apiSchema(toolName: string, fieldPath: string | undefined, options: { json?: boolean; }): Promise; /** `api skill list` — the published Agentcard skills (agentskills.io registry format). */ export declare function apiSkillList(options: { json?: boolean; }): Promise; export declare function apiSkillInstall(name: string, options: { force?: boolean; }): Promise; //# sourceMappingURL=api.d.ts.map