# Carl - 1Password SaaS Manager agent.
#
# This first-pass manifest intentionally omits settings.event_subscriptions.
# Slack verifies the request URL when that block is added, but the Cloud Run service
# needs the bot token/signing secret before it can be deployed. Use this two-phase flow:
#
# 1. Create the app from this manifest in the Hillspire workspace and install it.
# 2. Store the Bot User OAuth Token and Signing Secret in Secret Manager.
# 3. Put the new app ID (A...) in SLACK_ALLOWED_API_APP_IDS, plus the workspace and
#    approved user IDs/roles in the local prod-env.yaml.
# 4. Deploy a no-traffic candidate and verify /diag.
# 5. In Event Subscriptions, set https://<service>/slack/events and subscribe ONLY
#    to message.im. Reinstall only if Slack requests it.
#
# No app_mentions event or public/private channel history scopes are granted. Carl is
# DM-only by design because contract and commercial data must not land in channels.
# files:write is used only to upload a generated PDF back to the requesting DM.
display_information:
  name: Carl - Contract Manager
  description: Private, read-only answers about our SaaS applications and executed contracts.
  background_color: "#1f2937"
  long_description: |
    Ask Carl concise questions about applications and executed contracts recorded in
    1Password SaaS Manager (formerly Trelica), including renewal dates, contract dates,
    license-plan details, and approved commercial summaries.

    Carl is private, read-only, and direct-message only. Access and field visibility are
    restricted by Slack member ID. Carl cannot modify records, retrieve contract documents,
    report pending legal reviews, or expose the SaaS Manager Spend ledger in phase 1.
features:
  bot_user:
    display_name: Carl - Contract Manager
    always_online: true
  app_home:
    home_tab_enabled: false
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
oauth_config:
  scopes:
    bot:
      # Required to reply in the same DM.
      - chat:write
      # Required for message.im delivery / Messages-tab conversations.
      - im:history
      # Required for an authorized user to export Carl's last redacted answer as PDF.
      - files:write
settings:
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false
