<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
  ThouShaltNotClick — Outlook Add-in
  Education Technology Professionals LLC
  Manifest schema: Office Add-in MailApp 1.1
  Requirement set: Mailbox 1.10 (universal across Outlook web/desktop/mobile)

  ⚠️  THE <Id> GUID BELOW IS THE STABLE PRODUCTION IDENTITY.
  Do NOT regenerate it between versions — M365 admin center treats a new
  GUID as a brand-new add-in (existing installs would not auto-update).
  Bump <Version> in MAJOR.MINOR.BUILD.REVISION format for every release.
-->
<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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
  xsi:type="MailApp">

  <Id>363fd840-de28-405d-955f-fb1fd5c87e94</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Education Technology Professionals LLC</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="ThouShaltNotClick"/>
  <Description DefaultValue="Catches phishing in Outlook. Real-time AI analysis, link trust scores, and one-click reporting — built by a Catholic, for Catholic schools, and always accessible and inclusive to all."/>
  <IconUrl DefaultValue="https://outlook.thoushaltnotclick.com/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://outlook.thoushaltnotclick.com/icon-64.png"/>
  <SupportUrl DefaultValue="https://www.thoushaltnotclick.com/help/admin/outlook-addin-setup"/>

  <!-- AppDomains: every cross-origin host the add-in's task pane or auth dialog
       may navigate to. The auth dialog opens www.thoushaltnotclick.com/login.
       Office uses this list to decide whether to open the URL inside the
       embedded browser or pop a system browser. Without the domain listed,
       the auth flow breaks on Outlook desktop. -->
  <AppDomains>
    <AppDomain>https://www.thoushaltnotclick.com</AppDomain>
    <AppDomain>https://thoushaltnotclick.com</AppDomain>
    <AppDomain>https://outlook.thoushaltnotclick.com</AppDomain>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
    <AppDomain>https://accounts.google.com</AppDomain>
  </AppDomains>

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

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.10"/>
    </Sets>
  </Requirements>

  <!-- 1.1-schema fallback. Modern clients use VersionOverrides below; older
       Outlook builds (anything < Mailbox 1.5) read this. We declare a Read-mode
       task pane so even a downlevel client gets the verdict panel via Outlook's
       "Get Add-ins" classic ribbon. -->
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://outlook.thoushaltnotclick.com/taskpane"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</Permissions>

  <!-- Activation rule. Show the add-in for any read message item — this is the
       broadest sensible scope. We explicitly do NOT include appointment/meeting
       items in v1 since the panel UX is email-centric. -->
  <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>

  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <!-- ════════════════════════════════════════════════════════════════════
       VersionOverrides 1.1 — modern Outlook clients (web, desktop ≥2016,
       mobile). Adds the explicit ribbon group with three buttons:
         1. Open TSNC Panel    (ShowTaskpane action)
         2. Report Phishing    (ExecuteFunction action — no UI)
         3. Mark as Safe       (ExecuteFunction action — no UI)
       The two ExecuteFunction buttons run handlers in commands.html that
       call our existing /report-phishing and /report-safe endpoints, then
       surface a notification on the email itself.
       ════════════════════════════════════════════════════════════════════ -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox" MinVersion="1.5"/>
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <!-- The hidden function file that hosts our ExecuteFunction
                 handlers. Loaded into a sandboxed background runtime,
                 NOT visible to the user. -->
            <FunctionFile resid="Commands.Url"/>

            <!-- Read message ribbon -->
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadTsncGroup">
                  <Label resid="GroupLabel"/>

                  <!-- Button 1: open the TSNC task pane -->
                  <Control xsi:type="Button" id="msgReadOpenPanelBtn">
                    <Label resid="OpenPanel.Label"/>
                    <Supertip>
                      <Title resid="OpenPanel.Label"/>
                      <Description resid="OpenPanel.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16"/>
                      <bt:Image size="32" resid="Icon.32"/>
                      <bt:Image size="80" resid="Icon.80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>

                  <!-- Button 2: quick-report phishing (no UI; notification only) -->
                  <Control xsi:type="Button" id="msgReadReportPhishingBtn">
                    <Label resid="ReportPhishing.Label"/>
                    <Supertip>
                      <Title resid="ReportPhishing.Label"/>
                      <Description resid="ReportPhishing.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="IconPhish.16"/>
                      <bt:Image size="32" resid="IconPhish.32"/>
                      <bt:Image size="80" resid="IconPhish.80"/>
                    </Icon>
                    <Action xsi:type="ExecuteFunction">
                      <FunctionName>quickReportPhishing</FunctionName>
                    </Action>
                  </Control>

                  <!-- Button 3: quick-mark safe (no UI; notification only) -->
                  <Control xsi:type="Button" id="msgReadReportSafeBtn">
                    <Label resid="ReportSafe.Label"/>
                    <Supertip>
                      <Title resid="ReportSafe.Label"/>
                      <Description resid="ReportSafe.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="IconSafe.16"/>
                      <bt:Image size="32" resid="IconSafe.32"/>
                      <bt:Image size="80" resid="IconSafe.80"/>
                    </Icon>
                    <Action xsi:type="ExecuteFunction">
                      <FunctionName>quickReportSafe</FunctionName>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16"      DefaultValue="https://outlook.thoushaltnotclick.com/icon-16.png"/>
          <bt:Image id="Icon.32"      DefaultValue="https://outlook.thoushaltnotclick.com/icon-32.png"/>
          <bt:Image id="Icon.80"      DefaultValue="https://outlook.thoushaltnotclick.com/icon-80.png"/>
          <bt:Image id="IconPhish.16" DefaultValue="https://outlook.thoushaltnotclick.com/icon-phish-16.png"/>
          <bt:Image id="IconPhish.32" DefaultValue="https://outlook.thoushaltnotclick.com/icon-phish-32.png"/>
          <bt:Image id="IconPhish.80" DefaultValue="https://outlook.thoushaltnotclick.com/icon-phish-80.png"/>
          <bt:Image id="IconSafe.16"  DefaultValue="https://outlook.thoushaltnotclick.com/icon-safe-16.png"/>
          <bt:Image id="IconSafe.32"  DefaultValue="https://outlook.thoushaltnotclick.com/icon-safe-32.png"/>
          <bt:Image id="IconSafe.80"  DefaultValue="https://outlook.thoushaltnotclick.com/icon-safe-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://outlook.thoushaltnotclick.com/commands.html"/>
          <bt:Url id="Taskpane.Url" DefaultValue="https://outlook.thoushaltnotclick.com/taskpane"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel"           DefaultValue="ThouShaltNotClick"/>
          <bt:String id="OpenPanel.Label"      DefaultValue="TSNC Panel"/>
          <bt:String id="ReportPhishing.Label" DefaultValue="Report Phishing"/>
          <bt:String id="ReportSafe.Label"     DefaultValue="Mark as Safe"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="OpenPanel.Tooltip"      DefaultValue="Open the ThouShaltNotClick analysis panel for this email."/>
          <bt:String id="ReportPhishing.Tooltip" DefaultValue="Report this email as phishing or suspicious. Sends to your school admin."/>
          <bt:String id="ReportSafe.Tooltip"     DefaultValue="Confirm this email is safe (you've verified the sender)."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
