import { z } from "zod"; import type { Board } from "./model.js"; import { handoffs } from "./derive.js"; import type { Store } from "./store.js"; export declare const exportOptionsSchema: z.ZodObject<{ purpose: z.ZodDefault>; jobIds: z.ZodOptional>; unknowns: z.ZodDefault>; constraints: z.ZodDefault; includeSources: z.ZodDefault; }, "strip", z.ZodTypeAny, { purpose: "feasibility" | "prototype" | "existing-system" | "workshop"; constraints: string; includeSources: boolean; unknowns: "ask-first" | "mark-assumptions"; jobIds?: string[] | undefined; }, { purpose?: "feasibility" | "prototype" | "existing-system" | "workshop" | undefined; constraints?: string | undefined; jobIds?: string[] | undefined; includeSources?: boolean | undefined; unknowns?: "ask-first" | "mark-assumptions" | undefined; }>; export type ExportOptions = z.input; export interface WorkflowExport { schema: "staves.workflow-handoff"; schemaVersion: 1; source: { boardId: string; revision: number; base?: { boardId: string; revision: number; }; }; request: z.output; board: Board; handoffs: ReturnType; boundaries: { jobId: string; relation: "input" | "output" | "exit" | "loop" | "parent" | "correction" | "board"; targetId: string; label: string; }[]; omitted: { pendingProposals: number; rawInstructionText: true; sourceReferences: boolean; transcripts: number; commentReplyTargets: string[]; }; warnings: string[]; } /** A bounded, read-only design handoff. It never interprets a design as executable code. */ export declare function workflowExport(board: Board, revision: number, input?: ExportOptions, pendingProposals?: number): WorkflowExport; /** Capture one entry sequence, so every format identifies the same revision. */ export declare function exportFromStore(store: Store, name: string, options?: ExportOptions): Promise; export declare function exportMarkdown(packet: WorkflowExport): string; export declare function exportPrompt(packet: WorkflowExport, connection?: string): string; export declare function exportSvg(packet: WorkflowExport): string; /** n8n's native Sticky Note v1 nodes: an importable planning canvas, never executable mappings. */ export declare function exportN8n(packet: WorkflowExport): string; export type ExportFormat = "json" | "markdown" | "prompt" | "svg" | "n8n"; /** Formats that describe the whole board rather than a scoped handoff: the Staves format, and the two * drawings made from it. They ignore purpose and scope. */ export declare const BOARD_FORMATS: readonly ["staves", "mermaid", "bpmn"]; export type BoardFormat = typeof BOARD_FORMATS[number]; export declare const isBoardFormat: (format: string) => format is BoardFormat; export declare function exportBoard(board: Board, format: BoardFormat): string; export declare function formatExport(packet: WorkflowExport, format: ExportFormat, connection?: string): string;