/** * Global Type Definitions * Type definitions and Zod schemas for PlatformIO MCP Server. * * Provides: * - CommandResult: Execution stdout/stderr schema. * - BoardInfo: Detailed board specification parameters. * - SerialDevice: Detected serial port schema. * - ProjectConfig: Project initialization shape. * - BuildResult: Build status structure. * - UploadConfig: Upload execution parameters. * - MonitorConfig: Serial monitor options. * - LibraryInfo: PlatformIO registry library metadata. */ import { z } from "zod"; import type { DiagnosticResult } from "./core/diagnostics/types.js"; /** * Represents the standard output and exit status of a CLI command execution. */ export interface CommandResult { stdout: string; stderr: string; exitCode: number; } /** * Detailed specification parameters for a single PlatformIO development board. */ export interface BoardInfo { id: string; name: string; platform: string; mcu: string; frequency?: string; flash?: number; ram?: number; fcpu?: number; rom?: number; frameworks?: string[]; vendor?: string; url?: string; } /** * Zod schema for validating BoardInfo objects. */ export declare const BoardInfoSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; platform: z.ZodString; mcu: z.ZodString; frequency: z.ZodOptional; flash: z.ZodOptional; ram: z.ZodOptional; fcpu: z.ZodOptional; rom: z.ZodOptional; frameworks: z.ZodOptional>; vendor: z.ZodOptional; url: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; name: string; platform: string; mcu: string; frequency?: string | undefined; flash?: number | undefined; ram?: number | undefined; fcpu?: number | undefined; rom?: number | undefined; frameworks?: string[] | undefined; vendor?: string | undefined; url?: string | undefined; }, { id: string; name: string; platform: string; mcu: string; frequency?: string | undefined; flash?: number | undefined; ram?: number | undefined; fcpu?: number | undefined; rom?: number | undefined; frameworks?: string[] | undefined; vendor?: string | undefined; url?: string | undefined; }>; /** * Zod schema for an array of BoardInfo objects, typically from 'pio boards --json-output'. */ export declare const BoardsArraySchema: z.ZodArray; flash: z.ZodOptional; ram: z.ZodOptional; fcpu: z.ZodOptional; rom: z.ZodOptional; frameworks: z.ZodOptional>; vendor: z.ZodOptional; url: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; name: string; platform: string; mcu: string; frequency?: string | undefined; flash?: number | undefined; ram?: number | undefined; fcpu?: number | undefined; rom?: number | undefined; frameworks?: string[] | undefined; vendor?: string | undefined; url?: string | undefined; }, { id: string; name: string; platform: string; mcu: string; frequency?: string | undefined; flash?: number | undefined; ram?: number | undefined; fcpu?: number | undefined; rom?: number | undefined; frameworks?: string[] | undefined; vendor?: string | undefined; url?: string | undefined; }>, "many">; /** * Metadata for a detected serial deviceport. */ export interface SerialDevice { port: string; description: string; hwid: string; detectedBoard?: string; claim?: unknown; } /** * Zod schema for validating SerialDevice objects. */ export declare const SerialDeviceSchema: z.ZodObject<{ port: z.ZodString; description: z.ZodString; hwid: z.ZodString; detectedBoard: z.ZodOptional; claim: z.ZodOptional; }, "strip", z.ZodTypeAny, { port: string; description: string; hwid: string; detectedBoard?: string | undefined; claim?: any; }, { port: string; description: string; hwid: string; detectedBoard?: string | undefined; claim?: any; }>; /** * Zod schema for an array of SerialDevice objects, typically from 'pio device list --json-output'. */ export declare const DevicesArraySchema: z.ZodArray; claim: z.ZodOptional; }, "strip", z.ZodTypeAny, { port: string; description: string; hwid: string; detectedBoard?: string | undefined; claim?: any; }, { port: string; description: string; hwid: string; detectedBoard?: string | undefined; claim?: any; }>, "many">; /** * Configuration for initializing a new PlatformIO project. */ export interface ProjectConfig { board: string; framework?: string; projectDir?: string; platformOptions?: Record; } export declare const ProjectConfigSchema: z.ZodObject<{ board: z.ZodString; framework: z.ZodOptional; projectDir: z.ZodOptional; platformOptions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { board: string; framework?: string | undefined; projectDir?: string | undefined; platformOptions?: Record | undefined; }, { board: string; framework?: string | undefined; projectDir?: string | undefined; platformOptions?: Record | undefined; }>; export interface ProjectInitResult { success: boolean; path: string; message: string; } /** * Single structured build error surfaced to MCP clients. See * `parseStructuredBuildErrors` in `utils/errors.ts` for the parser. */ export interface StructuredBuildErrorJSON { category: string; message: string; file?: string; line?: number; raw: string; } /** * Outcome of a project build execution. Field order in serialized JSON is * not guaranteed by JS, but downstream tooling should treat `success`, * `cacheHit`, `structuredErrors`, and `nextSteps` as the first-pass * summary fields the agent should consult before scrolling the raw log. */ export interface BuildResult { success?: boolean; cacheHit?: boolean; environment?: string; output?: string; errors?: string[]; structuredErrors?: StructuredBuildErrorJSON[]; nextSteps?: string[]; ramUsageBytes?: number; flashUsageBytes?: number; firmwarePath?: string; status?: string; message?: string; pid?: number; taskId?: string; logPaths?: string[]; rawLogPath?: string; diagnostic?: DiagnosticResult; } /** * Outcome of a project clean execution. */ export interface CleanResult { success?: boolean; message?: string; status?: string; pid?: number; taskId?: string; logPaths?: string[]; } /** * Configuration options for firmware and filesystem uploads. */ export interface UploadConfig { projectDir: string; port?: string; environment?: string; } export declare const UploadConfigSchema: z.ZodObject<{ projectDir: z.ZodString; port: z.ZodOptional; environment: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; }>; /** * Outcome of a firmware or filesystem upload execution. */ export interface UploadResult { success?: boolean; port?: string; output?: string; errors?: string[]; status?: string; message?: string; pid?: number; taskId?: string; logPaths?: string[]; rawLogPath?: string; diagnostic?: DiagnosticResult; } /** * Author metadata for a library in the PlatformIO registry. */ export interface LibraryAuthor { name: string; email?: string; maintainer?: boolean; } /** * Repository location metadata for a library. */ export interface LibraryRepository { type: string; url: string; } /** * Metadata for a library from the PlatformIO Registry. */ export interface LibraryInfo { id?: number; name: string; description?: string; keywords?: string[]; authors?: LibraryAuthor[]; repository?: LibraryRepository; version?: string; frameworks?: unknown[]; platforms?: unknown[]; homepage?: string; } export declare const LibraryInfoSchema: z.ZodObject<{ id: z.ZodOptional; name: z.ZodString; description: z.ZodOptional; keywords: z.ZodOptional>; authors: z.ZodOptional; maintainer: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }>, "many">>; repository: z.ZodOptional>; version: z.ZodOptional; frameworks: z.ZodOptional>; platforms: z.ZodOptional>; homepage: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }>; export declare const LibrariesArraySchema: z.ZodArray; name: z.ZodString; description: z.ZodOptional; keywords: z.ZodOptional>; authors: z.ZodOptional; maintainer: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }>, "many">>; repository: z.ZodOptional>; version: z.ZodOptional; frameworks: z.ZodOptional>; platforms: z.ZodOptional>; homepage: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }>, "many">; export declare const LibrariesObjectSchema: z.ZodRecord; name: z.ZodString; description: z.ZodOptional; keywords: z.ZodOptional>; authors: z.ZodOptional; maintainer: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }>, "many">>; repository: z.ZodOptional>; version: z.ZodOptional; frameworks: z.ZodOptional>; platforms: z.ZodOptional>; homepage: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }>, "many">>; /** * Schema for a paginated response from the library registry search API. */ export declare const LibrarySearchResponseSchema: z.ZodObject<{ searchQuery: z.ZodOptional; total: z.ZodOptional; page: z.ZodOptional; items: z.ZodArray; name: z.ZodString; description: z.ZodOptional; keywords: z.ZodOptional>; authors: z.ZodOptional; maintainer: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }, { name: string; email?: string | undefined; maintainer?: boolean | undefined; }>, "many">>; repository: z.ZodOptional>; version: z.ZodOptional; frameworks: z.ZodOptional>; platforms: z.ZodOptional>; homepage: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }, { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { items: { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }[]; searchQuery?: string | undefined; total?: number | undefined; page?: number | undefined; }, { items: { name: string; id?: number | undefined; frameworks?: unknown[] | undefined; description?: string | undefined; keywords?: string[] | undefined; authors?: { name: string; email?: string | undefined; maintainer?: boolean | undefined; }[] | undefined; repository?: { type: string; url: string; } | undefined; version?: string | undefined; platforms?: unknown[] | undefined; homepage?: string | undefined; }[]; searchQuery?: string | undefined; total?: number | undefined; page?: number | undefined; }>; /** * Configuration parameters for searching libraries. */ export interface LibrarySearchConfig { query: string; limit?: number; } export declare const LibrarySearchConfigSchema: z.ZodObject<{ query: z.ZodString; limit: z.ZodOptional; }, "strip", z.ZodTypeAny, { query: string; limit?: number | undefined; }, { query: string; limit?: number | undefined; }>; /** * Configuration parameters for installing a library. */ export interface LibraryInstallConfig { library: string; projectDir?: string; version?: string; } export declare const LibraryInstallConfigSchema: z.ZodObject<{ library: z.ZodString; projectDir: z.ZodOptional; version: z.ZodOptional; }, "strip", z.ZodTypeAny, { library: string; projectDir?: string | undefined; version?: string | undefined; }, { library: string; projectDir?: string | undefined; version?: string | undefined; }>; /** * Outcome of a library installation. */ export interface LibraryInstallResult { success: boolean; library: string; message: string; } /** * Information about a PlatformIO platform. */ export interface PlatformInfo { name: string; title: string; version?: string; description?: string; homepage?: string; repository?: string; frameworks?: string[]; packages?: string[]; } export declare const ListBoardsParamsSchema: z.ZodObject<{ filter: z.ZodOptional; }, "strip", z.ZodTypeAny, { filter?: string | undefined; }, { filter?: string | undefined; }>; export declare const AcquireLockParamsSchema: z.ZodObject<{ sessionId: z.ZodString; reason: z.ZodOptional; }, "strip", z.ZodTypeAny, { sessionId: string; reason?: string | undefined; }, { sessionId: string; reason?: string | undefined; }>; export declare const ReleaseLockParamsSchema: z.ZodObject<{ sessionId: z.ZodString; }, "strip", z.ZodTypeAny, { sessionId: string; }, { sessionId: string; }>; /** * Zod schema for get_board_info tool parameters. */ export declare const GetBoardInfoParamsSchema: z.ZodObject<{ boardId: z.ZodString; }, "strip", z.ZodTypeAny, { boardId: string; }, { boardId: string; }>; export declare const InitProjectParamsSchema: z.ZodObject<{ board: z.ZodString; framework: z.ZodOptional; projectDir: z.ZodString; platformOptions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { board: string; projectDir: string; framework?: string | undefined; platformOptions?: Record | undefined; }, { board: string; projectDir: string; framework?: string | undefined; platformOptions?: Record | undefined; }>; export declare const GetProjectConfigParamsSchema: z.ZodObject<{ projectDir: z.ZodString; }, "strip", z.ZodTypeAny, { projectDir: string; }, { projectDir: string; }>; export declare const SystemInfoParamsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; export declare const BuildProjectParamsSchema: z.ZodObject<{ projectDir: z.ZodString; environment: z.ZodOptional; sessionId: z.ZodOptional; verbose: z.ZodOptional; background: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; environment?: string | undefined; sessionId?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; }, { projectDir: string; environment?: string | undefined; sessionId?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; }>; export declare const CleanProjectParamsSchema: z.ZodObject<{ projectDir: z.ZodString; sessionId: z.ZodOptional; background: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; sessionId?: string | undefined; background?: boolean | undefined; }, { projectDir: string; sessionId?: string | undefined; background?: boolean | undefined; }>; export declare const CheckProjectParamsSchema: z.ZodObject<{ projectDir: z.ZodString; environment: z.ZodOptional; background: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; environment?: string | undefined; background?: boolean | undefined; }, { projectDir: string; environment?: string | undefined; background?: boolean | undefined; }>; export declare const RunTestsParamsSchema: z.ZodObject<{ projectDir: z.ZodString; sessionId: z.ZodOptional; environment: z.ZodOptional; background: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; environment?: string | undefined; sessionId?: string | undefined; background?: boolean | undefined; }, { projectDir: string; environment?: string | undefined; sessionId?: string | undefined; background?: boolean | undefined; }>; export declare const UploadFirmwareParamsSchema: z.ZodObject<{ projectDir: z.ZodString; port: z.ZodOptional; environment: z.ZodOptional; sessionId: z.ZodOptional; verbose: z.ZodOptional; background: z.ZodOptional; startMonitorAfter: z.ZodOptional; targetBinding: z.ZodOptional>>; automationKey: z.ZodOptional; maxRunDurationSeconds: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; sessionId?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; startMonitorAfter?: boolean | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; maxRunDurationSeconds?: number | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; sessionId?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; startMonitorAfter?: boolean | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; maxRunDurationSeconds?: number | undefined; }>; export declare const UploadFilesystemParamsSchema: z.ZodObject<{ projectDir: z.ZodString; port: z.ZodOptional; environment: z.ZodOptional; sessionId: z.ZodOptional; verbose: z.ZodOptional; background: z.ZodOptional; startMonitorAfter: z.ZodOptional; targetBinding: z.ZodOptional>>; automationKey: z.ZodOptional; maxRunDurationSeconds: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; sessionId?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; startMonitorAfter?: boolean | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; maxRunDurationSeconds?: number | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; sessionId?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; startMonitorAfter?: boolean | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; maxRunDurationSeconds?: number | undefined; }>; export declare const SearchLibrariesParamsSchema: z.ZodObject<{ query: z.ZodString; limit: z.ZodDefault>; }, "strip", z.ZodTypeAny, { query: string; limit: number; }, { query: string; limit?: number | undefined; }>; export declare const InstallLibraryParamsSchema: z.ZodObject<{ library: z.ZodString; projectDir: z.ZodOptional; version: z.ZodOptional; global: z.ZodOptional; }, "strip", z.ZodTypeAny, { library: string; projectDir?: string | undefined; version?: string | undefined; global?: boolean | undefined; }, { library: string; projectDir?: string | undefined; version?: string | undefined; global?: boolean | undefined; }>; export declare const UninstallLibraryParamsSchema: z.ZodObject<{ library: z.ZodString; projectDir: z.ZodOptional; global: z.ZodOptional; }, "strip", z.ZodTypeAny, { library: string; projectDir?: string | undefined; global?: boolean | undefined; }, { library: string; projectDir?: string | undefined; global?: boolean | undefined; }>; export declare const UpdateLibraryParamsSchema: z.ZodObject<{ library: z.ZodString; projectDir: z.ZodOptional; global: z.ZodOptional; }, "strip", z.ZodTypeAny, { library: string; projectDir?: string | undefined; global?: boolean | undefined; }, { library: string; projectDir?: string | undefined; global?: boolean | undefined; }>; /** * Zod schema for list_installed_libraries tool parameters. */ export declare const ListInstalledLibrariesParamsSchema: z.ZodObject<{ projectDir: z.ZodOptional; global: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir?: string | undefined; global?: boolean | undefined; }, { projectDir?: string | undefined; global?: boolean | undefined; }>; export declare const StartMonitorParamsSchema: z.ZodObject<{ port: z.ZodOptional; baudRate: z.ZodOptional; projectDir: z.ZodOptional; environment: z.ZodOptional; }, "strip", z.ZodTypeAny, { port?: string | undefined; projectDir?: string | undefined; environment?: string | undefined; baudRate?: number | undefined; }, { port?: string | undefined; projectDir?: string | undefined; environment?: string | undefined; baudRate?: number | undefined; }>; export declare const StopMonitorParamsSchema: z.ZodObject<{ port: z.ZodString; projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { port: string; projectDir?: string | undefined; }, { port: string; projectDir?: string | undefined; }>; export declare const QueryLogsParamsSchema: z.ZodObject<{ lines: z.ZodOptional; searchPattern: z.ZodOptional; taskId: z.ZodOptional; logPath: z.ZodOptional; port: z.ZodOptional; projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { port?: string | undefined; projectDir?: string | undefined; lines?: number | undefined; searchPattern?: string | undefined; taskId?: string | undefined; logPath?: string | undefined; }, { port?: string | undefined; projectDir?: string | undefined; lines?: number | undefined; searchPattern?: string | undefined; taskId?: string | undefined; logPath?: string | undefined; }>; export declare const CheckTaskStatusParamsSchema: z.ZodObject<{ taskId: z.ZodOptional; logPath: z.ZodOptional; projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir?: string | undefined; taskId?: string | undefined; logPath?: string | undefined; }, { projectDir?: string | undefined; taskId?: string | undefined; logPath?: string | undefined; }>; /** Short-lived physical target binding accepted by write workflows. */ export declare const TargetBindingSchema: z.ZodObject<{ digest: z.ZodString; projectDir: z.ZodString; environment: z.ZodString; board: z.ZodString; port: z.ZodString; deviceFingerprint: z.ZodString; createdAt: z.ZodString; expiresAt: z.ZodString; }, "strip", z.ZodTypeAny, { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; }, { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; }>; /** Zod schema for deterministic project/environment/device resolution. */ export declare const AgentResolveTargetParamsSchema: z.ZodObject<{ projectDir: z.ZodString; environment: z.ZodOptional; port: z.ZodOptional; bindingTtlSeconds: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; bindingTtlSeconds?: number | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; bindingTtlSeconds?: number | undefined; }>; /** Zod schema for active serial monitor status inspection. */ export declare const GetMonitorStatusParamsSchema: z.ZodObject<{ projectDir: z.ZodOptional; port: z.ZodOptional; }, "strip", z.ZodTypeAny, { port?: string | undefined; projectDir?: string | undefined; }, { port?: string | undefined; projectDir?: string | undefined; }>; /** Zod schema for one bounded serial capture lease. */ export declare const CaptureSerialWindowParamsSchema: z.ZodObject<{ projectDir: z.ZodString; port: z.ZodOptional; environment: z.ZodOptional; baudRate: z.ZodOptional; durationSeconds: z.ZodOptional; maxBytes: z.ZodOptional; cursor: z.ZodOptional; targetBinding: z.ZodOptional>; automationKey: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; baudRate?: number | undefined; durationSeconds?: number | undefined; maxBytes?: number | undefined; cursor?: string | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; baudRate?: number | undefined; durationSeconds?: number | undefined; maxBytes?: number | undefined; cursor?: string | undefined; }>; /** Zod schema for change-aware serial health evaluation. */ export declare const AgentMonitorHealthParamsSchema: z.ZodObject<{ projectDir: z.ZodString; port: z.ZodOptional; environment: z.ZodOptional; baudRate: z.ZodOptional; captureDurationSeconds: z.ZodOptional; maxBytes: z.ZodOptional; expectedMarkers: z.ZodOptional>; rejectedPatterns: z.ZodOptional>; automationKey: z.ZodOptional; cursor: z.ZodOptional; failureThreshold: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; automationKey?: string | undefined; baudRate?: number | undefined; maxBytes?: number | undefined; cursor?: string | undefined; captureDurationSeconds?: number | undefined; expectedMarkers?: string[] | undefined; rejectedPatterns?: string[] | undefined; failureThreshold?: number | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; automationKey?: string | undefined; baudRate?: number | undefined; maxBytes?: number | undefined; cursor?: string | undefined; captureDurationSeconds?: number | undefined; expectedMarkers?: string[] | undefined; rejectedPatterns?: string[] | undefined; failureThreshold?: number | undefined; }>; /** Zod schema for idempotent cancellation of one tracked background task. */ export declare const CancelTaskParamsSchema: z.ZodObject<{ taskId: z.ZodString; projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { taskId: string; projectDir?: string | undefined; }, { taskId: string; projectDir?: string | undefined; }>; /** Zod schema for compact project-scoped task history. */ export declare const ListTaskHistoryParamsSchema: z.ZodObject<{ projectDir: z.ZodString; limit: z.ZodOptional; status: z.ZodOptional>; }, "strip", z.ZodTypeAny, { projectDir: string; status?: "error" | "inactive" | "running" | "success" | "terminated" | undefined; limit?: number | undefined; }, { projectDir: string; status?: "error" | "inactive" | "running" | "success" | "terminated" | undefined; limit?: number | undefined; }>; /** Zod schema for reading one approval request without mutating it. */ export declare const GetApprovalRequestParamsSchema: z.ZodObject<{ approvalId: z.ZodString; projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { approvalId: string; projectDir?: string | undefined; }, { approvalId: string; projectDir?: string | undefined; }>; /** Zod schema for project-scoped pending approval inspection. */ export declare const ListPendingApprovalsParamsSchema: z.ZodObject<{ projectDir: z.ZodOptional; limit: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir?: string | undefined; limit?: number | undefined; }, { projectDir?: string | undefined; limit?: number | undefined; }>; /** * Zod schema for get_dashboard_url tool parameters. */ export declare const GetDashboardUrlParamsSchema: z.ZodObject<{ open: z.ZodOptional; projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir?: string | undefined; open?: boolean | undefined; }, { projectDir?: string | undefined; open?: boolean | undefined; }>; /** * Zod schema for get_project_context tool parameters. The "project context" * is a compact pre-flight bundle that EmbedBench traces showed agents * synthesizing manually (via 3–5 `read_file` + `cat` calls) before every * iteration. Returning it from a single MCP call cuts cold-start latency * and gives the agent a deterministic, structured starting point. */ export declare const GetProjectContextParamsSchema: z.ZodObject<{ projectDir: z.ZodString; includeBuildHistory: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; includeBuildHistory?: boolean | undefined; }, { projectDir: string; includeBuildHistory?: boolean | undefined; }>; /** * Shape returned by `get_project_context`. All fields are optional so the * tool can degrade gracefully on uninitialized projects (missing * platformio.ini) — the agent still gets back a structured object instead * of an error. */ export interface ProjectContext { /** Absolute resolved project directory. */ projectDir: string; /** True if `platformio.ini` exists at the root. */ hasPlatformioIni: boolean; /** Environments declared in platformio.ini (parsed names only). */ environments?: string[]; /** Default environment, inferred as the first declared one. */ defaultEnvironment?: string; /** Source files present in `src/` (relative paths, capped at 50 entries). */ sourceFiles?: string[]; /** Declared `lib_deps` entries, when parseable. */ libDeps?: string[]; /** True if a recent successful build cache entry is present. */ cacheReady?: boolean; /** Absolute path to the most recent firmware artifact, if available. */ firmwarePath?: string; /** Auto-detected connected serial devices (port + description). */ connectedDevices?: Array<{ port: string; description: string; detectedBoard?: string; }>; /** Brief summary of the most recent build, when `includeBuildHistory` is true. */ lastBuild?: { status: string; logPath?: string; }; /** Actionable hints for the agent (e.g. "run init_project first"). */ nextSteps: string[]; } /** * Pin audit severity levels. */ export type PinAuditSeverity = "info" | "medium" | "high"; /** * Per-pin safety finding emitted by `agent_safe_pin_audit`. */ export interface AgentPinAuditResult { pin: number | string; severity: PinAuditSeverity; reason: string; recommendation: string; saferAlternatives?: number[]; } /** * Structured result from `agent_validate_project`. */ export interface AgentValidateProjectResult { success: boolean; projectDir: string; hasPlatformioIni: boolean; environments: string[]; defaultEnvironment?: string; boardIds: string[]; sourceFiles: string[]; missingConfigEntries: string[]; connectedDevices: Array<{ port: string; description: string; detectedBoard?: string; }>; nextSteps: string[]; } /** * Structured result from `agent_build_diagnose`. */ export interface AgentBuildDiagnoseResult { success: boolean; projectDir: string; environment: string; cacheHit?: boolean; diagnostic: DiagnosticResult; nextSteps: string[]; ramUsageBytes?: number; flashUsageBytes?: number; firmwarePath?: string; rawLogPath?: string; } /** * Verification result states from `agent_flash_monitor_verify`. */ export type AgentVerificationStatus = "passed" | "failed" | "inconclusive" | "flash_failed"; /** * Structured result from `agent_flash_monitor_verify`. */ export interface AgentFlashMonitorVerifyResult { success: boolean; projectDir: string; environment: string; flashSuccess: boolean; monitorSuccess: boolean; verificationStatus: AgentVerificationStatus; matchedExpectations: string[]; unmatchedExpectations: string[]; rejectedPatterns: string[]; detectedRuntimeErrors: string[]; diagnostic?: DiagnosticResult; recommendedNextAction: string; rawMonitorLogPath?: string; monitorSnippet?: string; targetBindingDigest?: string; } /** * Board profile payload emitted by `agent_generate_board_report`. */ export interface AgentBoardReport { boardId: string; platform: string; frameworks: string[]; mcu: string; flashBytes?: number; ramBytes?: number; dangerousPins: number[]; inputOnlyPins: number[]; flashSpiPins: number[]; recommendedMonitorBaudRate: number; generatedAt: string; } /** * Persisted summary of the latest agent workflow execution. */ export interface LastAgentReport { tool: string; timestamp: string; projectDir: string; success: boolean; summary: string; payload: AgentValidateProjectResult | AgentBuildDiagnoseResult | AgentFlashMonitorVerifyResult | AgentBoardReport | AgentPinAuditResult[]; } /** * Structured result from `agent_get_last_report`. */ export interface AgentGetLastReportResult { success: boolean; report?: LastAgentReport; message?: string; } /** * Effective policy status payload returned by `get_policy_status`. */ export interface PolicyStatusResult { profile: string; source: string; allowedOperations: string[]; approvalRequiredOperations: string[]; deniedOperations: string[]; requireWorkspaceBoundary: boolean; requireDeviceLockForUpload: boolean; redactSecretsFromLogs: boolean; auditAllAgentActions: boolean; } /** * Zod schema for `agent_validate_project` tool parameters. */ export declare const AgentValidateProjectParamsSchema: z.ZodObject<{ projectDir: z.ZodString; }, "strip", z.ZodTypeAny, { projectDir: string; }, { projectDir: string; }>; /** * Zod schema for `agent_build_diagnose` tool parameters. */ export declare const AgentBuildDiagnoseParamsSchema: z.ZodObject<{ projectDir: z.ZodString; environment: z.ZodOptional; verbose: z.ZodOptional; background: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; environment?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; }, { projectDir: string; environment?: string | undefined; verbose?: boolean | undefined; background?: boolean | undefined; }>; /** * Zod schema for `agent_safe_pin_audit` tool parameters. */ export declare const AgentSafePinAuditParamsSchema: z.ZodObject<{ projectDir: z.ZodString; boardId: z.ZodString; }, "strip", z.ZodTypeAny, { boardId: string; projectDir: string; }, { boardId: string; projectDir: string; }>; /** * Zod schema for `agent_flash_monitor_verify` tool parameters. */ export declare const AgentFlashMonitorVerifyParamsSchema: z.ZodObject<{ projectDir: z.ZodString; environment: z.ZodOptional; port: z.ZodOptional; targetBinding: z.ZodOptional>; expect_all: z.ZodOptional>; reject_patterns: z.ZodOptional>; timeoutSeconds: z.ZodOptional; stabilityWindowSeconds: z.ZodOptional; autoBuild: z.ZodOptional; automationKey: z.ZodOptional; maxRunDurationSeconds: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir: string; port?: string | undefined; environment?: string | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; maxRunDurationSeconds?: number | undefined; expect_all?: string[] | undefined; reject_patterns?: string[] | undefined; timeoutSeconds?: number | undefined; stabilityWindowSeconds?: number | undefined; autoBuild?: boolean | undefined; }, { projectDir: string; port?: string | undefined; environment?: string | undefined; targetBinding?: { port: string; board: string; projectDir: string; environment: string; digest: string; deviceFingerprint: string; createdAt: string; expiresAt: string; } | undefined; automationKey?: string | undefined; maxRunDurationSeconds?: number | undefined; expect_all?: string[] | undefined; reject_patterns?: string[] | undefined; timeoutSeconds?: number | undefined; stabilityWindowSeconds?: number | undefined; autoBuild?: boolean | undefined; }>; /** * Zod schema for `agent_get_last_report` tool parameters. */ export declare const AgentGetLastReportParamsSchema: z.ZodObject<{ projectDir: z.ZodString; }, "strip", z.ZodTypeAny, { projectDir: string; }, { projectDir: string; }>; /** * Zod schema for `agent_generate_board_report` tool parameters. */ export declare const AgentGenerateBoardReportParamsSchema: z.ZodObject<{ projectDir: z.ZodString; boardId: z.ZodString; }, "strip", z.ZodTypeAny, { boardId: string; projectDir: string; }, { boardId: string; projectDir: string; }>; /** * Zod schema for `get_policy_status` tool parameters. */ export declare const GetPolicyStatusParamsSchema: z.ZodObject<{ projectDir: z.ZodOptional; }, "strip", z.ZodTypeAny, { projectDir?: string | undefined; }, { projectDir?: string | undefined; }>; //# sourceMappingURL=types.d.ts.map