pub const Opcode = enum(u8) {
    queue_job = 0x01,
    queue_job_with_tracking = 0x0C,
    queue_job_with_snapshot = 0x17,
    queue_job_with_args = 0x1A,
    queue_job_with_note = 0x1B,
    annotate_run = 0x1C,
    set_run_narrative = 0x1D,
    set_run_privacy = 0x1F,
    status_request = 0x02,
    cancel_job = 0x03,
    prune = 0x04,
    crash_report = 0x05,
    log_metric = 0x0A,
    get_experiment = 0x0B,
    create_experiment = 0x24,
    list_experiments = 0x25,
    start_jupyter = 0x0D,
    stop_jupyter = 0x0E,
    remove_jupyter = 0x18,
    restore_jupyter = 0x19,
    list_jupyter = 0x0F,
    list_jupyter_packages = 0x1E,

    validate_request = 0x16,

    // Job query opcode
    query_job = 0x23,

    // Logs and debug opcodes
    get_logs = 0x20,
    stream_logs = 0x21,
    attach_debug = 0x22,

    // Dataset management opcodes
    dataset_list = 0x06,
    dataset_register = 0x07,
    dataset_info = 0x08,
    dataset_search = 0x09,

    // Sync opcode
    sync_run = 0x26,

    // Rerun opcode
    rerun_request = 0x27,

    // Structured response opcodes
    response_success = 0x10,
    response_error = 0x11,
    response_progress = 0x12,
    response_status = 0x13,
    response_data = 0x14,
    response_log = 0x15,
};

pub const ValidateTargetType = enum(u8) {
    commit_id = 0,
    task_id = 1,
};

pub const queue_job = Opcode.queue_job;
pub const queue_job_with_tracking = Opcode.queue_job_with_tracking;
pub const queue_job_with_snapshot = Opcode.queue_job_with_snapshot;
pub const queue_job_with_args = Opcode.queue_job_with_args;
pub const queue_job_with_note = Opcode.queue_job_with_note;
pub const annotate_run = Opcode.annotate_run;
pub const set_run_narrative = Opcode.set_run_narrative;
pub const set_run_privacy = Opcode.set_run_privacy;
pub const status_request = Opcode.status_request;
pub const cancel_job = Opcode.cancel_job;
pub const prune = Opcode.prune;
pub const crash_report = Opcode.crash_report;
pub const log_metric = Opcode.log_metric;
pub const get_experiment = Opcode.get_experiment;
pub const create_experiment = Opcode.create_experiment;
pub const list_experiments = Opcode.list_experiments;
pub const start_jupyter = Opcode.start_jupyter;
pub const stop_jupyter = Opcode.stop_jupyter;
pub const remove_jupyter = Opcode.remove_jupyter;
pub const restore_jupyter = Opcode.restore_jupyter;
pub const list_jupyter = Opcode.list_jupyter;
pub const list_jupyter_packages = Opcode.list_jupyter_packages;
pub const validate_request = Opcode.validate_request;
pub const query_job = Opcode.query_job;
pub const get_logs = Opcode.get_logs;
pub const stream_logs = Opcode.stream_logs;
pub const attach_debug = Opcode.attach_debug;
pub const dataset_list = Opcode.dataset_list;
pub const dataset_register = Opcode.dataset_register;
pub const dataset_info = Opcode.dataset_info;
pub const dataset_search = Opcode.dataset_search;
pub const sync_run = Opcode.sync_run;
pub const rerun_request = Opcode.rerun_request;
pub const response_success = Opcode.response_success;
pub const response_error = Opcode.response_error;
pub const response_progress = Opcode.response_progress;
pub const response_status = Opcode.response_status;
pub const response_data = Opcode.response_data;
pub const response_log = Opcode.response_log;
