/**
 * Per-tool contract for `modify_skill`.
 *
 * Skill directories are mounted read-only in Modal bash. This host-mediated
 * tool is the single approved write path, so the LLM API intentionally mirrors
 * the paths already shown in the system prompt instead of asking the model to
 * split paths into storage scope/team fields.
 */
import { type HostToolRequest, type ToolContract, type ToolLlmOptionsBase } from '../../../contracts/host-tool.js';
export declare const MODIFY_SKILL_KIND: "modifySkill";
export type ModifySkillKind = typeof MODIFY_SKILL_KIND;
export declare const ModifySkillStorageContext: {
    readonly Team: "team";
    readonly User: "user";
};
export type ModifySkillStorageContext = (typeof ModifySkillStorageContext)[keyof typeof ModifySkillStorageContext];
export interface ModifySkillWriteFile {
    /** Path relative to the skill folder, for example `SKILL.md` or `scripts/load.py`. */
    readonly path: string;
    /** Full replacement content for this file. Partial patches are not accepted. */
    readonly content: string;
}
export interface ModifySkillParams {
    /**
     * Runtime skill folder path copied from the system prompt, for example
     * `/skills/user/my-skill` or `/skills/team/<team-uuid>/team-skill`.
     */
    readonly skillPath: string;
    readonly writeFiles?: readonly ModifySkillWriteFile[];
    readonly deleteFiles?: readonly string[];
}
export interface ModifySkillTouchedFile {
    readonly added_lines: number;
    readonly operation: 'added' | 'modified' | 'deleted';
    readonly path: string;
    readonly removed_lines: number;
}
export interface ModifySkillFileResult {
    readonly error?: string;
    readonly operation: 'delete' | 'write';
    readonly path: string;
    readonly status: 'failed' | 'succeeded';
}
export interface ModifySkillDetails {
    readonly deleted_count?: number;
    readonly failed_count?: number;
    readonly file_results?: readonly ModifySkillFileResult[];
    readonly skill_name?: string;
    readonly skill_path?: string;
    readonly storage_context?: ModifySkillStorageContext;
    readonly team_id?: string;
    readonly touched_files?: readonly ModifySkillTouchedFile[];
    readonly written_count?: number;
}
export type ModifySkillRequest = HostToolRequest & {
    readonly kind: ModifySkillKind;
    readonly params: ModifySkillParams;
};
export declare const MODIFY_SKILL_TOOL_DESCRIPTION: string;
/** Validate a file path relative to a skill folder (no absolute or `.`/`..` escapes). */
export declare function isValidRelativePath(value: unknown): value is string;
/**
 * Parse only the runtime paths the system prompt exposes for skills.
 * This is intentionally stricter than a generic path check: writes are only
 * allowed to a single user/team skill folder, never to `/skills` broadly.
 * Shared by both `modify_skill` and `read_skill`.
 */
export declare function parseModifySkillPath(value: unknown): {
    storageContext: ModifySkillStorageContext;
    teamId?: string;
    skillName: string;
    skillPath: string;
} | null;
export declare const modifySkillContract: ToolContract<ModifySkillParams, ModifySkillDetails, ToolLlmOptionsBase>;
//# sourceMappingURL=contract.d.ts.map