# Slack app manifest for pi-tag.
#
# Create your app in one step:
#   https://api.slack.com/apps -> "Create New App" -> "From a manifest"
#   -> pick your workspace -> paste this file.
#
# The app runs in Socket Mode, so no public Request URL is needed — the
# gateway opens an outbound WebSocket from your machine. After creating
# the app:
#   1. Install it to your workspace (OAuth & Permissions -> Install to
#      Workspace) and copy the Bot User OAuth Token (xoxb-...).
#   2. Basic Information -> App-Level Tokens -> generate a token with the
#      connections:write scope and copy it (xapp-...).
#   3. Run `pitag setup` and paste both tokens.
display_information:
  name: pi
  description: Chat with the pi coding agent from Slack — sessions, files, and scheduled tasks in any channel or DM
  background_color: '#1a1d21'
features:
  app_home:
    home_tab_enabled: false
    # Without a writable Messages tab, users cannot DM the bot at all.
    messages_tab_enabled: true
    messages_tab_read_only_enabled: false
  bot_user:
    display_name: pi
    always_online: true
  slash_commands:
    - command: /pi
      description: Manage the pi gateway session in this channel
      usage_hint: '[status | model <ref> | models | reset-model | thinking <level> | new | stop]'
      should_escape: false
oauth_config:
  scopes:
    bot:
      - chat:write
      - channels:history
      - groups:history
      - im:history
      - mpim:history
      # conversations.info for auto-registered channel/group/mpim labels
      - channels:read
      - groups:read
      - mpim:read
      - files:read
      - files:write
      - reactions:write
      - users:read
      - commands
settings:
  event_subscriptions:
    bot_events:
      - message.channels
      - message.groups
      - message.im
      - message.mpim
  interactivity:
    is_enabled: true
  org_deploy_enabled: false
  socket_mode_enabled: true
  token_rotation_enabled: false
