<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
  <vendor>Codex Desktop Linux</vendor>
  <vendor_url>https://github.com/ilysenko/codex-desktop-linux</vendor_url>
  <icon_name>codex-desktop</icon_name>

  <action id="com.github.ilysenko.codex-desktop-linux.update.install-deb">
    <description>Install a Codex Desktop update</description>
    <message>Authentication is required to install the Codex Desktop update.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/codex-update-manager</annotate>
    <annotate key="org.freedesktop.policykit.exec.argv1">install-deb</annotate>
  </action>

  <action id="com.github.ilysenko.codex-desktop-linux.update.install-rpm">
    <description>Install a Codex Desktop update</description>
    <message>Authentication is required to install the Codex Desktop update.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/codex-update-manager</annotate>
    <annotate key="org.freedesktop.policykit.exec.argv1">install-rpm</annotate>
  </action>

  <action id="com.github.ilysenko.codex-desktop-linux.update.install-pacman">
    <description>Install a Codex Desktop update</description>
    <message>Authentication is required to install the Codex Desktop update.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/codex-update-manager</annotate>
    <annotate key="org.freedesktop.policykit.exec.argv1">install-pacman</annotate>
  </action>

  <action id="com.github.ilysenko.codex-desktop-linux.update.rollback-deb">
    <description>Roll back a Codex Desktop update</description>
    <message>Authentication is required to roll back the Codex Desktop update.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/codex-update-manager</annotate>
    <annotate key="org.freedesktop.policykit.exec.argv1">install-rollback-deb</annotate>
  </action>

  <action id="com.github.ilysenko.codex-desktop-linux.update.rollback-rpm">
    <description>Roll back a Codex Desktop update</description>
    <message>Authentication is required to roll back the Codex Desktop update.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/codex-update-manager</annotate>
    <annotate key="org.freedesktop.policykit.exec.argv1">install-rollback-rpm</annotate>
  </action>

  <action id="com.github.ilysenko.codex-desktop-linux.update.rollback-pacman">
    <description>Roll back a Codex Desktop update</description>
    <message>Authentication is required to roll back the Codex Desktop update.</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/codex-update-manager</annotate>
    <annotate key="org.freedesktop.policykit.exec.argv1">install-rollback-pacman</annotate>
  </action>
</policyconfig>
