import type { ApplicationDeployRequest } from "@supacloud/delivery"; import { type ToolServer } from "../tool-server"; import { type AppManifest } from "./app-tool-export"; declare const REMOTE_APP_ACTIONS: { readonly upload: "upload_release"; readonly "transfer-plan": "get_release_transfer_plan"; readonly "promote-plan": "get_promotion_plan"; readonly "promote-status": "get_promotion_status"; readonly "promote-reconcile": "reconcile_promotion"; readonly "preview-plan": "get_preview_plan"; readonly "preview-list": "list_previews"; readonly "preview-create": "create_preview"; readonly "preview-status": "get_preview"; readonly "preview-cleanup": "cleanup_preview"; readonly transfer: "transfer_release"; readonly configure: "put_configuration"; readonly deploy: "deploy_release"; readonly "deploy-plan": "get_deploy_plan"; readonly diff: "get_deploy_plan"; readonly status: "get_runtime"; readonly rollback: "rollback_release"; readonly "rollback-plan": "get_rollback_snapshot"; readonly history: "get_history"; readonly reconcile: "reconcile_activation"; readonly retire: "retire_activation"; readonly logs: "logs"; readonly preview: "create_preview"; readonly previews: "list_previews"; readonly "preview-reconcile": "reconcile_preview"; }; export interface AppToolOptions { getApplications?: () => ((args: Record) => Promise) | undefined; projectDeployment?: (args: Record) => Promise; projectRef?: string; /** Abort signal for long-running local actions (`app dev` watch), used for cancellation and tests. */ signal?: AbortSignal; /** Watch progress only. The caller owns its transport; the final result is returned separately. */ onDevProgress?: (result: ToolResult) => void; } export interface AppToolArguments { action: "init" | "generate" | "dev" | "watch" | "verify-plan" | "compile" | "check" | "graph" | "explain" | "export-tools" | "context" | "doctor" | "fix" | "plan" | "build" | "release" | "promote" | keyof typeof REMOTE_APP_ACTIONS; ref?: string; id?: string; environment_id?: string; configuration_id?: string; activation_id?: string; expected_activation_id?: string | null; configuration_path?: string; manifest_path?: string; /** `app release`: reuse an existing configuration revision instead of writing configuration_path. */ skip_build?: boolean; release_id?: string; source_ref?: string; source_release_id?: string; source_environment_id?: string; mutation_id?: string; approved_migration_digest?: string; web_release?: ApplicationDeployRequest["web_release"]; branch_ref?: string; branch_name?: string; data_mode?: "schema_only" | "full_clone"; preview_id?: string; cursor?: string; limit?: number; ttl_seconds?: number; wait?: boolean; timeout_seconds?: number; kind?: "module" | "command" | "query" | "controller" | "job" | "contract" | "resource"; template?: "minimal" | "http" | "command" | "edge"; name?: string; module?: string; dir?: string; force?: boolean; dry_run?: boolean; register_in?: string; "dry-run"?: boolean; "register-in"?: string; root?: string; include?: string; out_dir?: string; strict?: boolean; format?: "text" | "json"; json?: boolean; target?: string; fix?: string; write?: boolean; /** `app dev` local profile. `fast` is local/ephemeral; `integration` requires an explicit database URL. */ profile?: "fast" | "integration"; /** `app dev`: validate and report once without watching. */ once?: boolean; /** `app dev`: watch for changes (default true; `--once` disables). */ watch?: boolean; /** Integration dev verifies an explicit loopback database before running dev:integration. */ database_url?: string; "database-url"?: string; offset?: number; service?: string; search?: string; start?: string; end?: string; } export interface ToolResult { isError?: boolean; content: Array<{ type: "text"; text: string; }>; } /** kebab/snake/space-separated name -> PascalCase (class name for generate). */ declare function pascalName(name: string): string; /** kebab-case -> camelCase (semantic name suffix for command/query). */ declare function camelName(name: string): string; declare function formatGraphText(manifest: AppManifest): string; /** token -> dependent provider/controller module and name (reverse index). */ declare function reverseDependencies(manifest: AppManifest, token: string): string[]; export declare function runAppTool(request: AppToolArguments, options?: AppToolOptions): Promise; export declare function registerAppTools(server: ToolServer, options?: AppToolOptions): void; /** * Promotes the single-entry development verbs to top-level commands so an AI or * developer does not need to remember the `app` namespace. The `app` tool and * these aliases share one implementation and one execution-policy classification. */ export declare function registerAppAliases(server: ToolServer): void; export declare const __internal: { pascalName: typeof pascalName; camelName: typeof camelName; formatGraphText: typeof formatGraphText; reverseDependencies: typeof reverseDependencies; }; export {};