export type DocDecodePermission = "filesystem:read" | "office:document:decode";
export type DocDecodeBoundary = "input" | "scope" | "permission" | "contract";
export type DocDecodeFormat = "docx" | "doc" | "odt" | "rtf" | "txt";
export type DocDecodeContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    allowedDocumentRoots?: readonly string[];
    grantedPermissions?: readonly DocDecodePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type DocDecodeTarget = {
    documentPath: string;
    format?: DocDecodeFormat;
    extractText?: boolean;
    extractMetadata?: boolean;
    extractStructure?: boolean;
    maxCharacters?: number;
};
export type DocDecodeRequest = {
    target?: Partial<DocDecodeTarget>;
    context?: DocDecodeContext;
};
export type DocDecodeErrorCode = "MISSING_DOCUMENT_PATH" | "UNSUPPORTED_DOCUMENT_FORMAT" | "INVALID_MAX_CHARACTERS" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED";
export type DocDecodeError = {
    code: DocDecodeErrorCode;
    message: string;
    boundary: DocDecodeBoundary;
    publicSafe: true;
};
export type DocDecodeAuditEvent = {
    type: string;
    toolId: "office.docDecode";
    invocationId: string;
    dryRun: boolean;
    documentPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type DocDecodedEnvelope = {
    text?: string;
    metadata: Readonly<Record<string, unknown>>;
    structure: readonly {
        kind: "paragraph" | "heading" | "table" | "image" | "unknown";
        index: number;
        textPreview?: string;
    }[];
    truncated: boolean;
};
export type DocDecodeOutput = {
    kind: "agentCore.basicTool.office.docDecode";
    target: Required<Pick<DocDecodeTarget, "documentPath" | "format" | "extractText" | "extractMetadata" | "extractStructure" | "maxCharacters">>;
    decodePlan: {
        parserHint: "openxml" | "legacy-binary" | "opendocument" | "rich-text" | "plain-text";
        readsFilesystem: true;
        mutatesDocument: false;
    };
    dryRun: true;
    executionBlocked: true;
    permissionsRequired: readonly DocDecodePermission[];
    unsafeSideEffects: false;
    resultEnvelope: DocDecodedEnvelope;
};
export type DocDecodeResult = {
    ok: true;
    toolId: "office.docDecode";
    output: DocDecodeOutput;
    audit: readonly DocDecodeAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "office.docDecode";
    error: DocDecodeError;
    audit: readonly DocDecodeAuditEvent[];
    events: readonly string[];
};
export declare const docDecodeDescriptor: {
    readonly toolId: "office.docDecode";
    readonly capability: "decode-document";
    readonly route: "toolabilityPool.officeBase.documentations";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["filesystem:read", "office:document:decode"];
    readonly supportedFormats: readonly ["docx", "doc", "odt", "rtf", "txt"];
};
export declare function planDocDecode(request?: DocDecodeRequest): DocDecodeResult;
