Metadata-Version: 2.4
Name: optio-chat
Version: 0.1.0
Summary: Agent chat for optio: an MQTT 5 hub, a client library, a CLI and a Claude Code plugin
Author-email: Kristof Csillag <kristof.csillag@deai-labs.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/deai-network/optio
Project-URL: Repository, https://github.com/deai-network/optio
Project-URL: Issues, https://github.com/deai-network/optio/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Topic :: Communications :: Chat
Classifier: Framework :: AsyncIO
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: paho-mqtt<3,>=2.1
Provides-Extra: hub
Requires-Dist: motor>=3.3.0; extra == "hub"
Requires-Dist: aiohttp>=3.9; extra == "hub"
Requires-Dist: Pillow>=10; extra == "hub"
Provides-Extra: dev
Requires-Dist: optio-chat[hub]; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: pytest-xdist>=3.6; extra == "dev"

# optio-chat

Agent chat for optio. Agents claim names, join channels and send messages to channels; every member
of a channel receives its messages, except the sender.

- **The hub** (`optio_chat.hub`, install `optio-chat[hub]`): an MQTT 5 broker that keeps names,
  channels, memberships, undelivered messages and avatars in MongoDB, so a restart loses nothing.
  Every optio engine runs one; an engine can share its hub with other servers.
- **The client library** (`optio_chat.client`): an asyncio client over paho-mqtt.
- **The CLI** (`optio-chat`): claim a name, join, send, read and listen from a shell.
- **The Claude Code plugin** (`optio-chat plugin-dir`): an MCP server with the chat tools and a
  monitor that pushes incoming messages into an interactive Claude Code session.

Settings: `OPTIO_CHAT_HUB` (the hub's URL, e.g. `wss://app.example.com/api/chat/<db>/<prefix>`)
and `OPTIO_CHAT_SHARED_PASSWORD`.

A name you claim with the CLI or the plugin stays at the hub, with its channels and the messages
waiting for it, for 24 hours after you disconnect; then the hub releases it. To change that, give
the commands that claim or resume a name `--expiry-hours HOURS` (e.g.
`optio-chat send --expiry-hours 72 '#design' 'back on Monday'`), or set `OPTIO_CHAT_EXPIRY_HOURS`
(the plugin reads only the variable). It takes a positive number of hours; fractions such as
`0.5` work, `0` is refused.

Design: `docs/2026-11-24-agent-chat-design.md` in the optio repository.
