Metadata-Version: 2.4
Name: takopi-party
Version: 0.1.0
Summary: Party mode plugin for Takopi - multi-user private topics
Project-URL: Homepage, https://github.com/l3wi/takopi-party
Project-URL: Repository, https://github.com/l3wi/takopi-party
Project-URL: Issues, https://github.com/l3wi/takopi-party/issues
Author-email: Lewis Freiberg <lewis@freiberg.dev>
License: MIT License
        
        Copyright (c) 2025
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: multi-user,party,plugin,takopi,telegram,topics
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Communications :: Chat
Classifier: Typing :: Typed
Requires-Python: >=3.14
Requires-Dist: takopi>=0.17.0
Description-Content-Type: text/markdown

# takopi-party

Party mode plugin for Takopi - enables multiple users to have private conversation topics with Takopi in a shared group chat.

## Features

- Each user gets their own dedicated forum topic
- Private workspaces with git repository for each user
- Guest access control - allow specific users to interact in your topic
- Message filtering - only authorized users can trigger bot responses

## Installation

```bash
uv pip install takopi-party
```

## Requirements

- Python 3.14+
- Takopi 0.17.0+
- A Telegram group with forum topics enabled
- Bot must have permission to manage topics

## Commands

| Command | Description |
|---------|-------------|
| `/party register [name]` | Register and get your own topic with optional custom name |
| `/party allow @username` | Allow another user to interact in your topic |
| `/party revoke @username` | Remove a user's access to your topic |
| `/party leave` | Unregister and archive your workspace |
| `/party list` | Show all registered party members |
| `/party help` | Show help message |

## How It Works

1. User runs `/party register` in the General topic
2. Bot creates a new forum topic for the user
3. Bot creates an isolated workspace folder with a git repo
4. Only the topic owner (and allowed guests) can interact with Takopi in that topic
5. Messages in the General topic are ignored by Takopi (used as a lobby)

## Configuration

The plugin expects these values in `ctx.plugin_config`:

- `workspace_base`: Path string for workspace root (default: `/root/dev/party`)
- `bot`: BotClient instance for topic creation
- `raw_message`: The raw Telegram message dict for sender extraction

## Integration Notes

This plugin provides the command backend. Full party mode functionality requires integration with takopi core to:

1. Load `PartyStateStore` in the main loop
2. Filter messages from unauthorized users in party topics
3. Override context resolution to use party workspace paths

## License

MIT
