<?xml version="1.0" encoding="UTF-8"?>
<!--
  Outlook add-in manifest. CLASSIC XML, deliberately.

  NOTE FOR ANYONE EDITING THIS FILE: an XML comment may not contain a double
  hyphen. The project's prose style uses it constantly, and it silently makes
  the manifest unparseable, which Outlook reports as a flat refusal to
  install rather than as a syntax error. Use single hyphens in here.

  The newer "unified manifest" (JSON) is Microsoft 365 only. This mailbox is
  on-prem Exchange 2019, so the XML manifest is the only option, not a
  stylistic preference.

  Everything points at https://assistant-test.drimagri.fr because that is where serve.py
  hosts the pages during testing. HTTPS is mandatory even for localhost
  (Outlook refuses plain HTTP), which is why make_cert.ps1 exists.

  RENAMED 2026-08-26 from "Diagnostic complement". The diagnostic sections
  still exist in the task pane but are collapsed behind a disclosure: a tester
  should land on the feature, not on a wall of API version numbers. Renaming
  after testers had installed would have forced a reinstall on each of them,
  so it was done while that cost was zero.

  Permissions are ReadItem, the LOWEST level that still allows
  getCallbackTokenAsync. That is on purpose: the whole point of testing the
  callback token is per-item scope. Raising this to ReadWriteMailbox would
  hand the add-in the whole mailbox and quietly defeat the thing we are
  trying to prove.
-->
<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:ov="http://schemas.microsoft.com/office/mailappversionoverrides"
  xsi:type="MailApp">

  <Id>64674da9-b713-475a-b88e-9e5c1dded02b</Id>
  <Version>1.1.0.0</Version>
  <ProviderName>Coop Sud - test interne</ProviderName>
  <DefaultLocale>fr-FR</DefaultLocale>
  <DisplayName DefaultValue="Assistant (TEST)"/>
  <Description DefaultValue="Redige un brouillon de reponse a partir d'une consigne en une phrase. N'envoie jamais rien : vous relisez et vous envoyez vous-meme."/>
  <IconUrl DefaultValue="https://assistant-test.drimagri.fr/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://assistant-test.drimagri.fr/icon-128.png"/>
  <SupportUrl DefaultValue="https://assistant-test.drimagri.fr/taskpane.html"/>

  <AppDomains>
    <AppDomain>https://assistant-test.drimagri.fr</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>

  <!-- 1.1 on purpose: we want this to LOAD everywhere, then measure the real
       supported level at runtime. Requiring a high version here would make a
       capability question look like an installation failure. -->
  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://assistant-test.drimagri.fr/taskpane.html"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadItem</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <!-- Adds a real ribbon button. Without this the add-in only appears in the
       old add-in bar, which is easy to miss and would read as "it didn't
       install". Exchange 2016+ supports VersionOverrides on-prem. -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="functionFile"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="diagGroup">
                <Label resid="groupLabel"/>
                <Control xsi:type="Button" id="diagOpenPaneButton">
                  <Label resid="buttonLabel"/>
                  <Supertip>
                    <Title resid="buttonLabel"/>
                    <Description resid="buttonTip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="taskpaneUrl"/>
                  </Action>
                </Control>
                <Control xsi:type="Button" id="playgroundButton">
                  <Label resid="playgroundLabel"/>
                  <Supertip>
                    <Title resid="playgroundLabel"/>
                    <Description resid="playgroundTip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="playgroundUrl"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="https://assistant-test.drimagri.fr/icon-16.png"/>
        <bt:Image id="icon32" DefaultValue="https://assistant-test.drimagri.fr/icon-32.png"/>
        <bt:Image id="icon80" DefaultValue="https://assistant-test.drimagri.fr/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="functionFile" DefaultValue="https://assistant-test.drimagri.fr/commands.html"/>
        <bt:Url id="taskpaneUrl" DefaultValue="https://assistant-test.drimagri.fr/taskpane.html"/>
        <bt:Url id="playgroundUrl" DefaultValue="https://assistant-test.drimagri.fr/playground.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Assistant"/>
        <bt:String id="buttonLabel" DefaultValue="Assistant (TEST)"/>
        <bt:String id="playgroundLabel" DefaultValue="Bac a sable"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="buttonTip" DefaultValue="Redige un brouillon de reponse a cet e-mail a partir de votre consigne."/>
        <bt:String id="playgroundTip" DefaultValue="Ecrire et executer du code Office.js contre ce message. Outil de developpement."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>

</OfficeApp>
