import { z } from "zod"; export declare const MCP_PROTOCOL_VERSION: 2; /** * Wire-format error codes emitted by `kind: "error"` frames. * The CLI emitter and MCP consumer pattern-match on these strings — * the codes ARE the contract. */ export declare const MCP_ERROR_CODES: { readonly AUTHENTICATION_REQUIRED: "AUTHENTICATION_REQUIRED"; readonly VALIDATION_ERROR: "VALIDATION_ERROR"; readonly INTERNAL_ERROR: "INTERNAL_ERROR"; readonly INVALID_SUBCOMMAND: "INVALID_SUBCOMMAND"; readonly INVALID_FRAME: "INVALID_FRAME"; }; export type McpErrorCode = (typeof MCP_ERROR_CODES)[keyof typeof MCP_ERROR_CODES]; /** Maximum length of a free-form `intent` string carried on scaffold inputs. */ export declare const INTENT_MAX_LENGTH = 1000; declare const stepStatusSchema: z.ZodEnum<{ error: "error"; completed: "completed"; skipped: "skipped"; }>; export type McpStepStatus = z.infer; export declare const StepStartFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"step.start">; stepId: z.ZodString; name: z.ZodString; index: z.ZodNumber; total: z.ZodNumber; }, z.core.$strict>; export type StepStartFrame = z.infer; export declare const StepCompleteFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"step.complete">; stepId: z.ZodString; name: z.ZodString; status: z.ZodEnum<{ error: "error"; completed: "completed"; skipped: "skipped"; }>; index: z.ZodNumber; total: z.ZodNumber; errorMessage: z.ZodOptional; }, z.core.$strict>; export type StepCompleteFrame = z.infer; export declare const WarningFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"warning">; message: z.ZodString; }, z.core.$strict>; export type WarningFrame = z.infer; declare const errorPayloadSchema: z.ZodObject<{ code: z.ZodString; message: z.ZodString; details: z.ZodOptional>; }, z.core.$strict>; export type McpErrorPayload = z.infer; export declare const ErrorFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"error">; error: z.ZodObject<{ code: z.ZodString; message: z.ZodString; details: z.ZodOptional>; }, z.core.$strict>; }, z.core.$strict>; export type ErrorFrame = z.infer; export declare const ResultFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"result">; data: z.ZodUnknown; }, z.core.$strict>; export type ResultFrame = z.infer; export declare const AuthBrowserRequiredFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"auth.browser.required">; url: z.ZodString; externalId: z.ZodString; region: z.ZodString; environment: z.ZodString; reason: z.ZodString; }, z.core.$strict>; export type AuthBrowserRequiredFrame = z.infer; export declare const AuthBrowserCompleteFrameSchema: z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"auth.browser.complete">; awsAccountId: z.ZodString; accountName: z.ZodString; roleArn: z.ZodString; }, z.core.$strict>; export type AuthBrowserCompleteFrame = z.infer; export declare const McpProtocolFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"step.start">; stepId: z.ZodString; name: z.ZodString; index: z.ZodNumber; total: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"step.complete">; stepId: z.ZodString; name: z.ZodString; status: z.ZodEnum<{ error: "error"; completed: "completed"; skipped: "skipped"; }>; index: z.ZodNumber; total: z.ZodNumber; errorMessage: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"warning">; message: z.ZodString; }, z.core.$strict>, z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"error">; error: z.ZodObject<{ code: z.ZodString; message: z.ZodString; details: z.ZodOptional>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"result">; data: z.ZodUnknown; }, z.core.$strict>, z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"auth.browser.required">; url: z.ZodString; externalId: z.ZodString; region: z.ZodString; environment: z.ZodString; reason: z.ZodString; }, z.core.$strict>, z.ZodObject<{ v: z.ZodLiteral<2>; kind: z.ZodLiteral<"auth.browser.complete">; awsAccountId: z.ZodString; accountName: z.ZodString; roleArn: z.ZodString; }, z.core.$strict>], "kind">; export type McpProtocolFrame = z.infer; /** * Scaffold protocol schemas — wire types for the `plan_app_scaffold`, * `apply_app_scaffold`, and dry-run helper paths in `@fjall/mcp`. * * These schemas are the single source of truth: the CLI imports them from * `@fjall/util/mcpProtocol` and re-exports aliases in * `cli/src/operations/types.ts`. */ export declare const FileToWriteSchema: z.ZodObject<{ path: z.ZodString; sizeBytes: z.ZodNumber; collisionMode: z.ZodEnum<{ create: "create"; overwrite: "overwrite"; }>; }, z.core.$strict>; export type ScaffoldFileToWrite = z.infer; export declare const RegistryActionSchema: z.ZodObject<{ type: z.ZodEnum<{ "register-application": "register-application"; "create-activity": "create-activity"; "auto-link-repository": "auto-link-repository"; "writeback-config-path": "writeback-config-path"; }>; description: z.ZodString; }, z.core.$strict>; export type ScaffoldRegistryAction = z.infer; export declare const TargetAccountSchema: z.ZodObject<{ name: z.ZodString; environment: z.ZodNullable; source: z.ZodString; }, z.core.$strict>; export type TargetAccount = z.infer; /** * Every input `plan_app_scaffold` accepts, as the plan records it and * `apply_app_scaffold` replays it (`buildApplyCommand`). Plan keys ⊆ these * keys is pinned by the MCP's resolvedInputsParity test: a key the plan * accepts but this schema drops was silently absent from the apply argv * (`type`, `database`, `containerPort` were, until Train 4). */ export declare const ResolvedInputsSchema: z.ZodObject<{ name: z.ZodString; pattern: z.ZodOptional>; patternTier: z.ZodOptional>; patternDomain: z.ZodOptional; network: z.ZodOptional>; template: z.ZodOptional; docker: z.ZodOptional; context: z.ZodOptional; target: z.ZodOptional; }, z.core.$strict>>; type: z.ZodOptional>; database: z.ZodOptional; containerPort: z.ZodOptional; source: z.ZodOptional; buildCommand: z.ZodOptional; outputDir: z.ZodOptional; git: z.ZodOptional; github: z.ZodOptional; repoVisibility: z.ZodOptional>; intent: z.ZodOptional; }, z.core.$strict>; export type ResolvedInputs = z.infer; export declare const ScaffoldPlanSchema: z.ZodObject<{ planId: z.ZodString; normalisedPath: z.ZodString; resolvedInputs: z.ZodObject<{ name: z.ZodString; pattern: z.ZodOptional>; patternTier: z.ZodOptional>; patternDomain: z.ZodOptional; network: z.ZodOptional>; template: z.ZodOptional; docker: z.ZodOptional; context: z.ZodOptional; target: z.ZodOptional; }, z.core.$strict>>; type: z.ZodOptional>; database: z.ZodOptional; containerPort: z.ZodOptional; source: z.ZodOptional; buildCommand: z.ZodOptional; outputDir: z.ZodOptional; git: z.ZodOptional; github: z.ZodOptional; repoVisibility: z.ZodOptional>; intent: z.ZodOptional; }, z.core.$strict>; targetAccount: z.ZodNullable; source: z.ZodString; }, z.core.$strict>>; targetAccountCandidates: z.ZodArray; source: z.ZodString; }, z.core.$strict>>; filesToWrite: z.ZodArray; }, z.core.$strict>>; npmPackages: z.ZodArray; registryActions: z.ZodArray; description: z.ZodString; }, z.core.$strict>>; patternUnsupportedForDryRun: z.ZodOptional; intent: z.ZodOptional; framework: z.ZodOptional; summary: z.ZodString; }, z.core.$strict>; export type ScaffoldPlan = z.infer; export declare const DryRunArtefactsSchema: z.ZodObject<{ filesToWrite: z.ZodArray; }, z.core.$strict>>; npmPackages: z.ZodArray; registryActions: z.ZodArray; description: z.ZodString; }, z.core.$strict>>; patternUnsupportedForDryRun: z.ZodOptional; }, z.core.$strict>; export type ScaffoldDryRunArtefacts = z.infer; export declare const ScaffoldResultDataSchema: z.ZodObject<{ path: z.ZodString; name: z.ZodString; mode: z.ZodEnum<{ pattern: "pattern"; application: "application"; }>; dependenciesInstalled: z.ZodOptional; warning: z.ZodOptional; dryRunArtefacts: z.ZodOptional; }, z.core.$strict>>; npmPackages: z.ZodArray; registryActions: z.ZodArray; description: z.ZodString; }, z.core.$strict>>; patternUnsupportedForDryRun: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; export type ScaffoldResultData = z.infer; /** * Progress frame emitted via MCP `notifications/progress` during * `apply_app_scaffold`. `total` is omitted for unbounded streams (warnings). */ export declare const ScaffoldProgressFrameSchema: z.ZodObject<{ step: z.ZodString; current: z.ZodNumber; total: z.ZodOptional; message: z.ZodString; }, z.core.$strict>; export type ScaffoldProgressFrame = z.infer; export type ParseFrameResult = { ok: true; frame: McpProtocolFrame; } | { ok: false; reason: "json"; raw: string; error: string; } | { ok: false; reason: "schema"; raw: string; error: string; }; export declare function parseFrame(line: string): ParseFrameResult; export {};