export type OfficeDocEncodePermission = "filesystem:write" | "office:document:encode";
export type OfficeDocEncodeErrorBoundary = "input" | "scope" | "permission" | "contract";
export type OfficeDocEncodeContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    allowedOutputRoots?: readonly string[];
    grantedPermissions?: readonly OfficeDocEncodePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type OfficeDocEncodeFormat = "docx" | "odt" | "html" | "markdown";
export type OfficeDocEncodeBlock = {
    kind: "paragraph" | "heading" | "listItem";
    text: string;
    level?: number;
};
export type OfficeDocEncodeTarget = {
    outputFormat: OfficeDocEncodeFormat;
    blocks: readonly OfficeDocEncodeBlock[];
    title?: string;
    outputPath?: string;
};
export type OfficeDocEncodeRequest = {
    target?: Partial<Omit<OfficeDocEncodeTarget, "blocks">> & {
        blocks?: readonly Partial<OfficeDocEncodeBlock>[];
    };
    context?: OfficeDocEncodeContext;
};
export type OfficeDocEncodeErrorCode = "MISSING_OUTPUT_FORMAT" | "INVALID_OUTPUT_FORMAT" | "MISSING_DOCUMENT_BLOCKS" | "INVALID_DOCUMENT_BLOCK" | "UNSAFE_OUTPUT_PATH" | "OUTPUT_PATH_OUTSIDE_SCOPE" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED";
export type OfficeDocEncodeError = {
    code: OfficeDocEncodeErrorCode;
    message: string;
    boundary: OfficeDocEncodeErrorBoundary;
    publicSafe: true;
};
export type OfficeDocEncodeAuditEvent = {
    type: string;
    toolId: "office.docEncode";
    invocationId: string;
    dryRun: boolean;
    outputPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type OfficeDocEncodeOutput = {
    kind: "agentCore.basicTool.office.docEncode";
    target: {
        outputFormat: OfficeDocEncodeFormat;
        blocks: readonly OfficeDocEncodeBlock[];
        title?: string;
        outputPath?: string;
    };
    dryRun: true;
    executionBlocked: true;
    unsafeSideEffects: boolean;
    permissionsRequired: readonly OfficeDocEncodePermission[];
    encodePlan: {
        encoder: "office-document-encoder-v1";
        wouldWriteFile: boolean;
        byteEstimate: number;
        artifactEnvelope: {
            producedBytes: 0;
            mimeType: string;
        };
    };
};
export type OfficeDocEncodeResult = {
    ok: true;
    toolId: "office.docEncode";
    output: OfficeDocEncodeOutput;
    audit: readonly OfficeDocEncodeAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "office.docEncode";
    error: OfficeDocEncodeError;
    audit: readonly OfficeDocEncodeAuditEvent[];
    events: readonly string[];
};
export declare const officeDocEncodeDescriptor: {
    readonly toolId: "office.docEncode";
    readonly capability: "encode-document";
    readonly route: "toolabilityPool.officeBase.documentations";
    readonly defaultDryRun: true;
    readonly unsafeSideEffects: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["office:document:encode"];
    readonly fileWritePermissions: readonly ["filesystem:write", "office:document:encode"];
};
export declare function planOfficeDocEncode(request?: OfficeDocEncodeRequest): OfficeDocEncodeResult;
