import { type SkillBaseContext, type SkillBasePermission, type SkillFilesystemProvider } from "../_shared/skillCore.js";
import type { SkillToolResult } from "../_shared/baseToolAdapter.js";
export type SkillIterationOperationKind = "replace-file" | "append" | "prepend" | "replace-text";
export type SkillIterationOperation = {
    kind: SkillIterationOperationKind;
    relativePath: string;
    summary: string;
    content?: string;
    search?: string;
    replace?: string;
};
export type SkillIterateTarget = {
    skillPath: string;
    changeIntent: string;
    operations: readonly SkillIterationOperation[];
};
export type SkillIterateRequest = {
    target?: unknown;
    context?: SkillBaseContext;
    provider?: SkillFilesystemProvider;
};
export type SkillIterateErrorCode = "MISSING_SKILL_PATH" | "UNSAFE_SKILL_PATH" | "SKILL_ROOT_OUTSIDE_SCOPE" | "MISSING_CHANGE_INTENT" | "MISSING_OPERATIONS" | "TOO_MANY_OPERATIONS" | "INVALID_OPERATION" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type SkillIterateOutput = {
    kind: "agentCore.basicTool.skill.iterate.output";
    target: SkillIterateTarget;
    runtimeEntry: {
        port: "BaseToolExecutorPort.filesystem.readText/writeText";
        runtimeOwnsFilesystem: true;
    };
    iterationEnvelope: {
        patchModel: "skill-iteration-patch-v1";
        affectedFiles: readonly string[];
        appliedFiles?: readonly string[];
    };
    dryRun: boolean;
    executionBlocked: boolean;
    permissionsRequired: readonly SkillBasePermission[];
    unsafeSideEffects: true;
};
export type SkillIterateResult = SkillToolResult<SkillIterateOutput, SkillIterateErrorCode>;
export declare const skillIterateDescriptor: {
    readonly toolId: "skill.iterate";
    readonly capability: "iterate-skill";
    readonly defaultDryRun: true;
    readonly permissionsRequired: readonly ["skill:read", "skill:write", "filesystem:read", "filesystem:write"];
    readonly maxOperations: 24;
};
export declare function executeSkillIterate(request?: SkillIterateRequest): Promise<SkillIterateResult>;
export declare const planSkillIteration: typeof executeSkillIterate;
