export type OfficeDocEditPermission = "filesystem:read" | "filesystem:write" | "office:document:edit";
export type OfficeDocEditErrorBoundary = "input" | "scope" | "permission" | "contract";
export type OfficeDocEditContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    allowedDocumentRoots?: readonly string[];
    grantedPermissions?: readonly OfficeDocEditPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type OfficeDocEditOperation = {
    kind: "replaceText";
    targetText: string;
    replacementText: string;
    occurrence?: "first" | "all";
} | {
    kind: "insertText";
    locator: string;
    text: string;
    position?: "before" | "after";
} | {
    kind: "deleteRange";
    locator: string;
};
export type OfficeDocEditTarget = {
    documentPath: string;
    operations: readonly OfficeDocEditOperation[];
    outputPath?: string;
};
export type OfficeDocEditRequest = {
    target?: Partial<Omit<OfficeDocEditTarget, "operations">> & {
        operations?: readonly Partial<OfficeDocEditOperation>[];
    };
    context?: OfficeDocEditContext;
};
export type OfficeDocEditErrorCode = "MISSING_DOCUMENT_PATH" | "UNSAFE_DOCUMENT_PATH" | "DOCUMENT_PATH_OUTSIDE_SCOPE" | "MISSING_EDIT_OPERATIONS" | "INVALID_EDIT_OPERATION" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED";
export type OfficeDocEditError = {
    code: OfficeDocEditErrorCode;
    message: string;
    boundary: OfficeDocEditErrorBoundary;
    publicSafe: true;
};
export type OfficeDocEditAuditEvent = {
    type: string;
    toolId: "office.docEdit";
    invocationId: string;
    dryRun: boolean;
    documentPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type OfficeDocEditOutput = {
    kind: "agentCore.basicTool.office.docEdit";
    target: OfficeDocEditTarget;
    dryRun: true;
    executionBlocked: true;
    unsafeSideEffects: true;
    permissionsRequired: readonly OfficeDocEditPermission[];
    editPlan: {
        editor: "office-document-editor-v1";
        wouldMutateDocument: true;
        operationCount: number;
        patchEnvelope: {
            appliedOperations: 0;
            conflicts: readonly [];
        };
    };
};
export type OfficeDocEditResult = {
    ok: true;
    toolId: "office.docEdit";
    output: OfficeDocEditOutput;
    audit: readonly OfficeDocEditAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "office.docEdit";
    error: OfficeDocEditError;
    audit: readonly OfficeDocEditAuditEvent[];
    events: readonly string[];
};
export declare const officeDocEditDescriptor: {
    readonly toolId: "office.docEdit";
    readonly capability: "edit-document";
    readonly route: "toolabilityPool.officeBase.documentations";
    readonly defaultDryRun: true;
    readonly unsafeSideEffects: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["filesystem:read", "filesystem:write", "office:document:edit"];
};
export declare function planOfficeDocEdit(request?: OfficeDocEditRequest): OfficeDocEditResult;
