<?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"
           xsi:type="TaskPaneApp">
  <Id>82ceefae-3ea9-4aec-971f-9d2284df3481</Id>
  <Version>1.1.0.0</Version>
  <ProviderName>Hubtal</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Hubtal"/>
  <Description DefaultValue="AI legal intelligence in your document — review, redline, and draft with Hubtal."/>
  <IconUrl DefaultValue="https://addin.hubtal.ai/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://addin.hubtal.ai/icon-64.png"/>
  <SupportUrl DefaultValue="https://hubtal.ai"/>
  <AppDomains>
    <AppDomain>https://addin.hubtal.ai</AppDomain>
    <!-- Clerk frontend API — the embedded sign-in form's clerk-js + assets load
         from here; Word's dialog webview is stricter than the pane and blocks
         out-of-AppDomains resources (spike finding, 2026-07-16). -->
    <AppDomain>https://app.hubtal.ai</AppDomain>
    <AppDomain>https://clerk.hubtal.ai</AppDomain>
    <AppDomain>https://accounts.hubtal.ai</AppDomain>
    <!-- Clerk bot-protection (Cloudflare Turnstile) used by the sign-in form. -->
    <AppDomain>https://challenges.cloudflare.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Document"/>
  </Hosts>
  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <!-- Floor stays 1.1 so chat/review still load on older hosts; WordApi 1.4
           (change-tracking control) is feature-gated at runtime in Plan 2b. -->
      <Set Name="WordApi" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://addin.hubtal.ai/index.html"/>
  </DefaultSettings>
  <Permissions>ReadWriteDocument</Permissions>

  <!-- Ribbon (Word pane Part 1 §1.10, board E): a Hubtal tab. Items are
       FIXED at install — a menu cannot list a firm's playbooks, so "with a
       playbook" opens the pane's set-up. Every item is ShowTaskpane on the ONE
       taskpane id with its own SourceLocation carrying ?screen=…, so Office
       navigates the open pane rather than opening a second one. Pane-less
       buttons wait for a shared runtime. -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Document">
        <DesktopFormFactor>
          <!-- FunctionFile: hosts the right-click Ask / Redline / Draft
               commands. Each runs in its own isolated context and signals the
               pane via a document-settings pending action
               (src/commands.ts → pane.tsx). -->
          <FunctionFile resid="Commands.Url"/>
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <CustomTab id="Hubtal.Tab">
              <Group id="Hubtal.ReviewGroup">
                <Label resid="ReviewGroup.Label"/>
                <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="Menu" id="Hubtal.ReviewMenu">
                  <Label resid="ReviewMenu.Label"/>
                  <Supertip>
                    <Title resid="ReviewMenu.Label"/>
                    <Description resid="ReviewMenu.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>
                  <Items>
                    <Item id="Hubtal.ReviewWithPlaybook">
                      <Label resid="ReviewWithPlaybook.Label"/>
                      <Supertip>
                        <Title resid="ReviewWithPlaybook.Label"/>
                        <Description resid="ReviewWithPlaybook.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">
                        <TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId>
                        <SourceLocation resid="Taskpane.Review.Url"/>
                      </Action>
                    </Item>
                    <Item id="Hubtal.ReviewPlain">
                      <Label resid="ReviewPlain.Label"/>
                      <Supertip><Title resid="ReviewPlain.Label"/><Description resid="ReviewPlain.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.ReviewPlain.Url"/></Action>
                    </Item>
                    <Item id="Hubtal.Rerun">
                      <Label resid="Rerun.Label"/>
                      <Supertip><Title resid="Rerun.Label"/><Description resid="Rerun.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.Rerun.Url"/></Action>
                    </Item>
                  </Items>
                </Control>
                <Control xsi:type="Button" id="Hubtal.Xrefs">
                  <Label resid="Xrefs.Label"/>
                  <Supertip><Title resid="Xrefs.Label"/><Description resid="Xrefs.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.Xrefs.Url"/></Action>
                </Control>
                <Control xsi:type="Button" id="Hubtal.KeyTerms">
                  <Label resid="KeyTerms.Label"/>
                  <Supertip><Title resid="KeyTerms.Label"/><Description resid="KeyTerms.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.KeyTerms.Url"/></Action>
                </Control>
              </Group>
              <Group id="Hubtal.DraftGroup">
                <Label resid="DraftGroup.Label"/>
                <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="Menu" id="Hubtal.DraftMenu">
                  <Label resid="DraftMenu.Label"/>
                  <Supertip><Title resid="DraftMenu.Label"/><Description resid="DraftMenu.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>
                  <Items>
                    <Item id="Hubtal.DraftCursor">
                      <Label resid="DraftCursor.Label"/>
                      <Supertip><Title resid="DraftCursor.Label"/><Description resid="DraftCursor.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.DraftCursor.Url"/></Action>
                    </Item>
                    <Item id="Hubtal.DraftNew">
                      <Label resid="DraftNew.Label"/>
                      <Supertip><Title resid="DraftNew.Label"/><Description resid="DraftNew.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.DraftNew.Url"/></Action>
                    </Item>
                  </Items>
                </Control>
                <Control xsi:type="Button" id="Hubtal.Fill">
                  <Label resid="Fill.Label"/>
                  <Supertip><Title resid="Fill.Label"/><Description resid="Fill.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.Fill.Url"/></Action>
                </Control>
                <Control xsi:type="Button" id="Hubtal.Compare">
                  <Label resid="Compare.Label"/>
                  <Supertip><Title resid="Compare.Label"/><Description resid="Compare.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.Compare.Url"/></Action>
                </Control>
              </Group>
              <Group id="Hubtal.SessionGroup">
                <Label resid="SessionGroup.Label"/>
                <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="Hubtal.OpenPane">
                  <Label resid="OpenPane.Label"/>
                  <Supertip><Title resid="OpenPane.Label"/><Description resid="OpenPane.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.Url"/></Action>
                </Control>
                <Control xsi:type="Button" id="Hubtal.History">
                  <Label resid="History.Label"/>
                  <Supertip><Title resid="History.Label"/><Description resid="History.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.History.Url"/></Action>
                </Control>
                <Control xsi:type="Button" id="Hubtal.OpenWeb">
                  <Label resid="OpenWeb.Label"/>
                  <Supertip><Title resid="OpenWeb.Label"/><Description resid="OpenWeb.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"><TaskpaneId>Hubtal.OpenPane.Taskpane</TaskpaneId><SourceLocation resid="Taskpane.OpenWeb.Url"/></Action>
                </Control>
              </Group>
              <Label resid="Tab.Label"/>
            </CustomTab>
          </ExtensionPoint>
          <!-- Right-click on selected text: review or draft anywhere, even
               outside a formal review run (redesign §4.1). Each item writes a
               pending action the pane consumes on focus. -->
          <ExtensionPoint xsi:type="ContextMenu">
            <OfficeMenu id="ContextMenuText">
              <Control xsi:type="Button" id="Hubtal.AskSelection">
                <Label resid="AskSelection.Label"/>
                <Supertip>
                  <Title resid="AskSelection.Label"/>
                  <Description resid="AskSelection.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="ExecuteFunction">
                  <FunctionName>hubtalAskSelection</FunctionName>
                </Action>
              </Control>
              <Control xsi:type="Button" id="Hubtal.RedlineSelection">
                <Label resid="RedlineSelection.Label"/>
                <Supertip>
                  <Title resid="RedlineSelection.Label"/>
                  <Description resid="RedlineSelection.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="ExecuteFunction">
                  <FunctionName>hubtalRedlineSelection</FunctionName>
                </Action>
              </Control>
              <Control xsi:type="Button" id="Hubtal.DraftHere">
                <Label resid="DraftHere.Label"/>
                <Supertip>
                  <Title resid="DraftHere.Label"/>
                  <Description resid="DraftHere.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="ExecuteFunction">
                  <FunctionName>hubtalDraftHere</FunctionName>
                </Action>
              </Control>
            </OfficeMenu>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://addin.hubtal.ai/icon-32.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://addin.hubtal.ai/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://addin.hubtal.ai/icon-64.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://addin.hubtal.ai/index.html"/>
        <bt:Url id="Commands.Url" DefaultValue="https://addin.hubtal.ai/commands.html"/>
        <bt:Url id="Taskpane.Review.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=review"/>
        <bt:Url id="Taskpane.ReviewPlain.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=review&amp;playbook=none"/>
        <bt:Url id="Taskpane.Rerun.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=review&amp;rerun=1"/>
        <bt:Url id="Taskpane.Xrefs.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=xrefs"/>
        <bt:Url id="Taskpane.KeyTerms.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=ask&amp;prefill=key-terms"/>
        <bt:Url id="Taskpane.DraftCursor.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=draft&amp;at=cursor"/>
        <bt:Url id="Taskpane.DraftNew.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=draft&amp;at=new"/>
        <bt:Url id="Taskpane.Fill.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=fill"/>
        <bt:Url id="Taskpane.Compare.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=compare"/>
        <bt:Url id="Taskpane.History.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=history"/>
        <bt:Url id="Taskpane.OpenWeb.Url" DefaultValue="https://addin.hubtal.ai/index.html?screen=open-web"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Tab.Label" DefaultValue="Hubtal"/>
        <bt:String id="ReviewGroup.Label" DefaultValue="Review"/>
        <bt:String id="DraftGroup.Label" DefaultValue="Draft"/>
        <bt:String id="SessionGroup.Label" DefaultValue="Session"/>
        <bt:String id="ReviewMenu.Label" DefaultValue="Review"/>
        <bt:String id="ReviewWithPlaybook.Label" DefaultValue="Review with a playbook…"/>
        <bt:String id="ReviewPlain.Label" DefaultValue="Review without a playbook"/>
        <bt:String id="Rerun.Label" DefaultValue="Re-run the last playbook"/>
        <bt:String id="Xrefs.Label" DefaultValue="Check cross-references"/>
        <bt:String id="KeyTerms.Label" DefaultValue="Key terms"/>
        <bt:String id="DraftMenu.Label" DefaultValue="Draft"/>
        <bt:String id="DraftCursor.Label" DefaultValue="Draft a clause at my cursor"/>
        <bt:String id="DraftNew.Label" DefaultValue="Start a new draft"/>
        <bt:String id="Fill.Label" DefaultValue="Fill placeholders"/>
        <bt:String id="Compare.Label" DefaultValue="Compare…"/>
        <bt:String id="OpenPane.Label" DefaultValue="Open Hubtal"/>
        <bt:String id="History.Label" DefaultValue="Chat history"/>
        <bt:String id="OpenWeb.Label" DefaultValue="Open on the web"/>
        <bt:String id="AskSelection.Label" DefaultValue="Ask Hubtal about this…"/>
        <bt:String id="RedlineSelection.Label" DefaultValue="Redline this selection"/>
        <bt:String id="DraftHere.Label" DefaultValue="Draft a clause here…"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="OpenPane.Tooltip" DefaultValue="Open the Hubtal task pane to chat, review, and redline this document."/>
        <bt:String id="ReviewMenu.Tooltip" DefaultValue="Review this document in the Hubtal pane, with or without a playbook."/>
        <bt:String id="ReviewWithPlaybook.Tooltip" DefaultValue="Open Hubtal at the review set-up to choose a playbook and run it."/>
        <bt:String id="ReviewPlain.Tooltip" DefaultValue="Open Hubtal at the review set-up with no playbook chosen."/>
        <bt:String id="Rerun.Tooltip" DefaultValue="Open Hubtal with the playbook this file last ran, ready to run again."/>
        <bt:String id="Xrefs.Tooltip" DefaultValue="Open Hubtal with a request to check this document's cross-references, ready to send."/>
        <bt:String id="KeyTerms.Tooltip" DefaultValue="Open Hubtal with a request to extract this document's key terms, ready to send."/>
        <bt:String id="DraftMenu.Tooltip" DefaultValue="Draft with Hubtal at your cursor or as a new document."/>
        <bt:String id="DraftCursor.Tooltip" DefaultValue="Open Hubtal with a request to draft a clause at your cursor, ready to finish."/>
        <bt:String id="DraftNew.Tooltip" DefaultValue="Open Hubtal with a request to start a new draft, ready to finish."/>
        <bt:String id="Fill.Tooltip" DefaultValue="Open Hubtal with the placeholders it has found in this file, ready to fill."/>
        <bt:String id="Compare.Tooltip" DefaultValue="Open Hubtal to choose a document to compare this one with."/>
        <bt:String id="History.Tooltip" DefaultValue="Open Hubtal at your earlier Word chats."/>
        <bt:String id="OpenWeb.Tooltip" DefaultValue="Open this chat on the web once it is synced to Hubtal."/>
        <bt:String id="AskSelection.Tooltip" DefaultValue="Ask Hubtal about the selected text."/>
        <bt:String id="RedlineSelection.Tooltip" DefaultValue="Redline the selected text with Hubtal."/>
        <bt:String id="DraftHere.Tooltip" DefaultValue="Draft a clause to insert at the cursor."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
