<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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/taskpaneappversionoverrides"
  xsi:type="TaskPaneApp">

  <!-- Permanent. Users install this manifest by hand (sheetai.co/excel-addin)
       and admins deploy it org-wide; a new Id would be a different add-in and
       strand every existing install. -->
  <Id>333c2471-50c3-4529-9960-19a61138bafe</Id>
  <!-- 1.1: adds the AI formulas (=SHEETAI.AI_ASK(...)). An install made from
       the 1.0 file keeps working as a chat pane; it gets the formulas when the
       user (or their admin) loads this file again. -->
  <Version>1.1.0.0</Version>
  <ProviderName>SheetAI</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="SheetAI" />
  <Description DefaultValue="AI-powered spreadsheet assistant for Excel" />
  <IconUrl DefaultValue="https://sheetai.co/icons/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://sheetai.co/icons/icon-64.png" />
  <SupportUrl DefaultValue="https://sheetai.co/contact" />

  <!-- Only one host: Excel workbook. Adding Word/PowerPoint would expand
       review scope without delivering value. -->
  <Hosts>
    <Host Name="Workbook" />
  </Hosts>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://sheetai.co/excel/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <!-- The formulas run in the pane's own page (a "shared runtime"), which
         is how they use the sign-in the pane already has. Asked for HERE and
         not at the top of the file on purpose: an Excel without it (iPad,
         volume-licensed Excel 2019 and older) then ignores this block and
         still opens SheetAI as a plain pane, instead of refusing the add-in. -->
    <Requirements>
      <bt:Sets DefaultMinVersion="1.1">
        <bt:Set Name="SharedRuntime" MinVersion="1.1" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="Workbook">
        <Runtimes>
          <Runtime resid="Taskpane.Url" lifetime="long" />
        </Runtimes>
        <AllFormFactors>
          <!-- =SHEETAI.AI_ASK("..."), =SHEETAI.AI_SUMMARIZE(A1) ... The list is
               functions.json, built from src/functions/catalog.json. -->
          <ExtensionPoint xsi:type="CustomFunctions">
            <Script>
              <SourceLocation resid="Functions.Script.Url" />
            </Script>
            <Page>
              <SourceLocation resid="Taskpane.Url" />
            </Page>
            <Metadata>
              <SourceLocation resid="Functions.Metadata.Url" />
            </Metadata>
            <Namespace resid="Functions.Namespace" />
          </ExtensionPoint>
        </AllFormFactors>
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="SheetAI.Group">
                <Label resid="SheetAI.GroupLabel" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>
                <Control xsi:type="Button" id="SheetAI.OpenTaskPane">
                  <Label resid="SheetAI.OpenLabel" />
                  <Supertip>
                    <Title resid="SheetAI.OpenLabel" />
                    <Description resid="SheetAI.OpenDesc" />
                  </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">
                    <TaskpaneId>SheetAI.Taskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://sheetai.co/icons/icon-16.png" />
        <bt:Image id="Icon.32x32" DefaultValue="https://sheetai.co/icons/icon-32.png" />
        <bt:Image id="Icon.80x80" DefaultValue="https://sheetai.co/icons/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://sheetai.co" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://sheetai.co/excel/taskpane.html" />
        <bt:Url id="Functions.Script.Url" DefaultValue="https://sheetai.co/excel/functions.js" />
        <bt:Url id="Functions.Metadata.Url" DefaultValue="https://sheetai.co/excel/functions.json" />
      </bt:Urls>
      <bt:ShortStrings>
        <!-- The prefix every formula carries in Excel. Permanent: changing it
             breaks every formula already typed into a workbook. -->
        <bt:String id="Functions.Namespace" DefaultValue="SHEETAI" />
        <bt:String id="GetStarted.Title" DefaultValue="Welcome to SheetAI" />
        <bt:String id="SheetAI.GroupLabel" DefaultValue="SheetAI" />
        <bt:String id="SheetAI.OpenLabel" DefaultValue="Open SheetAI" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="GetStarted.Description" DefaultValue="AI-powered spreadsheet assistant. Open the task pane to chat with the agent." />
        <bt:String id="SheetAI.OpenDesc" DefaultValue="Opens the SheetAI task pane on the right." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
