import { z } from "zod"; import type { McpServer, RegisteredTool } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { ToolContext } from "../tool-context.js"; import type { OnLine } from "../utils/exec.js"; import { type AppActionResult, type AppGuardVerdict, type AppListResult, type PlatformInfo } from "./app-manager.js"; export declare const TOOL_NAME = "crosspad_apps"; export declare const AppsInputShape: { action: z.ZodEnum<{ list: "list"; install: "install"; remove: "remove"; update: "update"; sync: "sync"; }>; confirm_token: z.ZodOptional; platform: z.ZodDefault>; show_all: z.ZodOptional; app_name: z.ZodOptional; ref: z.ZodOptional; force: z.ZodOptional; update_all: z.ZodOptional; }; export declare const AppsInput: z.ZodDiscriminatedUnion<[z.ZodObject<{ action: z.ZodLiteral<"list">; platform: z.ZodOptional>>; show_all: z.ZodOptional; confirm_token: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"install">; platform: z.ZodDefault>; app_name: z.ZodString; ref: z.ZodOptional; force: z.ZodOptional; confirm_token: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"remove">; platform: z.ZodDefault>; app_name: z.ZodString; confirm_token: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"update">; platform: z.ZodDefault>; app_name: z.ZodOptional; update_all: z.ZodOptional; confirm_token: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"sync">; platform: z.ZodDefault>; confirm_token: z.ZodOptional; }, z.core.$strip>], "action">; export type AppsArgs = z.infer; export declare const O_Apps: { success: z.ZodBoolean; action: z.ZodOptional; platform: z.ZodOptional; app_name: z.ZodOptional; /** The app-manager payload verbatim: apps/counts for list, output for the rest. */ result: z.ZodOptional>; /** What the caller must still do for the change to reach the firmware. */ next: z.ZodOptional; ts: z.ZodOptional; error: z.ZodOptional>; details: z.ZodOptional>; }, z.core.$loose>>; resultType: z.ZodOptional; confirmation: z.ZodOptional>; tool: z.ZodOptional; hint: z.ZodOptional; }; /** * Everything this tool reaches the outside world with, injectable so the * dispatch can be tested without spawning Python or touching a git checkout. */ export interface AppsDeps { list: (showAll: boolean) => AppListResult; install: (app: string, platform: string, ref: string, force: boolean, onLine?: OnLine, signal?: AbortSignal) => Promise; remove: (app: string, platform: string, onLine?: OnLine, signal?: AbortSignal) => Promise; update: (platform: string, app: string | undefined, updateAll: boolean, onLine?: OnLine, signal?: AbortSignal) => Promise; sync: (platform: string, onLine?: OnLine, signal?: AbortSignal) => Promise; guard: (info: PlatformInfo, app: string, signal?: AbortSignal) => Promise; platforms: () => PlatformInfo[]; } export declare const defaultDeps: AppsDeps; type Payload = Record; /** Pure-ish dispatch: one action in, one envelope out. */ export declare function runApps(args: AppsArgs, deps?: AppsDeps, onLine?: OnLine, signal?: AbortSignal): Promise; export declare function registerAppsTool(server: McpServer, ctx: ToolContext): RegisteredTool; export {};