name: chatto-platform
label: Chatto
kind: platform
version: 1.0.0
description: >
  Chatto gateway adapter for Hermes Agent.
  Connects to a Chatto server (cloud-hosted or self-hosted team chat) and relays messages
  between rooms/DMs and the Hermes agent. Uses the Chatto ConnectRPC API
  (JSON over HTTP) for outbound messages and the Chatto realtime WebSocket
  protocol (binary protobuf) for inbound events.  No Python packages
  required beyond websockets.
author: Chatto community guys
requires_env:
  - name: CHATTO_BASE_URL
    description: "Base URL of the Chatto server (e.g. https://chat.example.com) leave blank for ChattoHQ (https://chat.chatto.run)"
    prompt: "Chatto server Base URL"
    password: false
  - name: CHATTO_LOGIN
    description: "Chatto login (username); leave blank only when you authenticate with CHATTO_TOKEN instead"
    prompt: "Chatto login"
    password: false
  - name: CHATTO_PASSWORD
    description: "Chatto password; leave blank only when you authenticate with CHATTO_TOKEN instead"
    prompt: "Chatto password"
    password: true
optional_env:
  - name: CHATTO_TOKEN
    description: "Existing bearer token — alternative to CHATTO_LOGIN + CHATTO_PASSWORD (default: none)"
    prompt: "Existing bearer token (or empty)"
    password: true
  - name: CHATTO_HOME_CHANNEL
    description: "Room ID for cron / notification delivery (defaults to the first joined room)"
    prompt: "Home room ID (or empty)"
    password: false
  # Asked before CHATTO_ALLOWED_USERS: a "yes" here makes the user list moot,
  # and the two are mutually exclusive (hermes_validate_config rejects both).
  - name: CHATTO_ALLOW_ALL_USERS
    description: "Allow any Chatto user to talk to the agent (default: false)"
    prompt: "Allow all users? (true/false)"
    password: false
  - name: CHATTO_ALLOWED_USERS
    description: "Comma-separated Chatto logins allowed to talk to the agent (default: none — denies everyone unless CHATTO_ALLOW_ALL_USERS=true)"
    prompt: "Allowed users (comma-separated)"
    password: false
  - name: CHATTO_REQUIRE_MENTION
    description: "Only respond to @mentions in channels (default: false). Group-kind rooms and DMs always get a response."
    prompt: "Require mention in rooms? (true/false)"
    password: false
  - name: CHATTO_AUTO_THREAD
    description: "Auto-create threads for replies in rooms (default: true). Set false to reply in the room timeline."
    prompt: "Auto-thread replies? (true/false)"
    password: false
  - name: CHATTO_RESPOND_ROOMS
    description: "Comma-separated room IDs the bot reads and answers in; other joined rooms stay read-only — marked as read, never seeded into context, never answered. Inbound replies only; context-less cron/notification delivery via CHATTO_HOME_CHANNEL is unaffected. (default: none — every joined room is a respond room)"
    prompt: "Respond room IDs (comma-separated)"
    password: false
  - name: CHATTO_FREE_RESPONSE_CHANNELS
    description: "Comma-separated room IDs where the bot responds without being tagged (default: none)"
    prompt: "Free-response room IDs (comma-separated)"
    password: false
  - name: CHATTO_REACTIONS
    description: "Add 👀/✅/❌/🚫 reactions to messages during processing (default: true)"
    prompt: "Enable message reactions? (true/false)"
    password: false