<?xml version="1.0" encoding="UTF-8"?>
<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"
  xsi:type="MailApp">

  <Id>7bb8b74c-d185-4484-afbf-cdecf01e6cdd</Id>
  <Version>1.0.0.5</Version>
  <ProviderName>Anthropic</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Claude" />
  <Description DefaultValue="Claude in Microsoft Office"/>
  <!-- Mail add-in spec: IconUrl 64x64, HighResolutionIconUrl 128x128 (differs from Excel/Word/PPT 32/64).
       In new Outlook/OWA this also feeds the in-app taskpane header, hence transparent
       -spark- assets rather than the full-bleed icon-64.png used by other hosts. -->
  <IconUrl DefaultValue="https://pivot.claude.ai/icon-spark-64.png" />
  <HighResolutionIconUrl DefaultValue="https://pivot.claude.ai/icon-spark-128.png" />
  <SupportUrl DefaultValue="https://support.claude.com" />

  <AppDomains>
    <AppDomain>https://claude.ai</AppDomain>
  </AppDomains>

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

  <Requirements>
    <Sets>
      <!-- Mailbox 1.5 floor: getFileData depends on body.getAsync coercion APIs from that set.
           Lowering to 1.1/1.3 would widen reach to Outlook 2016 perpetual but breaks the read
           path; revisit if perpetual-license coverage becomes a requirement. -->
      <Set Name="Mailbox" MinVersion="1.5"/>
    </Sets>
  </Requirements>

  <!-- FormSettings: required by the MailApp schema for legacy (pre-2016) clients.
       Modern Outlook ignores this in favor of VersionOverrides below. -->
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://pivot.claude.ai/?m=outlook-1.0.0.5"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>

  <!-- Rule: required by the MailApp schema even when VersionOverrides is present.
       Activates the add-in on messages and appointments in both read and compose. -->
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
  </Rule>

  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <!-- Outlook requires the nested V1_0 -> V1_1 structure. V1_0 is a shim;
       V1_1 is where MessageRead/MessageCompose command surfaces live. -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.5">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Taskpane.Url" />
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="CommandsGroup.Read">
                <Label resid="CommandsGroup.Label" />
                <Control xsi:type="Button" id="TaskpaneButton.Read">
                  <Label resid="TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="TaskpaneButton.Label" />
                    <Description resid="TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://pivot.claude.ai/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://pivot.claude.ai/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://pivot.claude.ai/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://pivot.claude.ai/?m=outlook-1.0.0.5"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="CommandsGroup.Label" DefaultValue="Claude"/>
        <bt:String id="TaskpaneButton.Label" DefaultValue="Claude"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open Claude to draft, summarize, and triage in Outlook."/>
      </bt:LongStrings>
    </Resources>

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Taskpane.Url" />

            <!-- Read mode: viewing a received/sent message -->
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="CommandsGroup.Read">
                  <Label resid="CommandsGroup.Label" />
                  <Control xsi:type="Button" id="TaskpaneButton.Read">
                    <Label resid="TaskpaneButton.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton.Label" />
                      <Description resid="TaskpaneButton.Tooltip" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                      <!-- SupportsMultiSelect implicitly enables SupportsNoItemContext per MS docs -->
                      <SupportsMultiSelect>true</SupportsMultiSelect>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Compose mode: drafting a new message or reply -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="CommandsGroup.Compose">
                  <Label resid="CommandsGroup.Label" />
                  <Control xsi:type="Button" id="TaskpaneButton.Compose">
                    <Label resid="TaskpaneButton.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton.Label" />
                      <Description resid="TaskpaneButton.Tooltip" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Appointment attendee: viewing a calendar invite as an invitee -->
            <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="CommandsGroup.ApptRead">
                  <Label resid="CommandsGroup.Label" />
                  <Control xsi:type="Button" id="TaskpaneButton.ApptRead">
                    <Label resid="TaskpaneButton.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton.Label" />
                      <Description resid="TaskpaneButton.Tooltip" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Appointment organizer: creating/editing a calendar event -->
            <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="CommandsGroup.ApptCompose">
                  <Label resid="CommandsGroup.Label" />
                  <Control xsi:type="Button" id="TaskpaneButton.ApptCompose">
                    <Label resid="TaskpaneButton.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton.Label" />
                      <Description resid="TaskpaneButton.Tooltip" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://pivot.claude.ai/icon-16.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://pivot.claude.ai/icon-32.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://pivot.claude.ai/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://pivot.claude.ai/?m=outlook-1.0.0.5"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="CommandsGroup.Label" DefaultValue="Claude"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="Claude"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open Claude to draft, summarize, and triage in Outlook."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
