using AIRuntime.Runtime.Capabilities.Attributes;

namespace AIRuntime.Runtime.Filesystem.Models
{
    /// <summary>
    /// Arguments used by WriteFileCapability.
    /// </summary>
    public sealed class WriteFileArguments
    {
        [Required]
        [WorkspacePath]
        public string Path { get; set; }

        [Required]
        public string Content { get; set; }

        [Description("Optional SHA-256 of the complete current file. The write is rejected if the file is absent or has changed.")]
        public string ExpectedSha256 { get; set; }

        [DefaultValue(false)]
        [Description("Require the destination not to exist. Use this when creating a new file.")]
        public bool ExpectedAbsent { get; set; }

        [DefaultValue(true)]
        [Description("Legacy-compatible overwrite policy. Set false to reject replacement unless ExpectedSha256 authorizes the exact current file.")]
        public bool AllowOverwrite { get; set; } = true;
    }
}
