Metadata-Version: 2.1
Name: bub-wecom
Version: 0.1.1
Summary: WeCom channel plugin for Bub
Author: Bub contributors
License: Apache-2.0
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Project-URL: Homepage, https://github.com/ximenzun/bub-wecom
Project-URL: Repository, https://github.com/ximenzun/bub-wecom
Project-URL: Documentation, https://github.com/ximenzun/bub
Project-URL: Issues, https://github.com/ximenzun/bub-wecom/issues
Requires-Python: <4.0,>=3.12
Requires-Dist: bub>=0.3.0a1
Requires-Dist: aiohttp>=3.13.3
Requires-Dist: loguru>=0.7.2
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydantic-settings>=2.0.0
Description-Content-Type: text/markdown

# bub-wecom

WeCom channel plugin for [Bub](https://github.com/ximenzun/bub).

## Install

Once published:

```bash
uv pip install bub-wecom
```

For local development next to the Bub repo:

```bash
cd ../bub-wecom
uv sync
```

## Included Channels

- `wecom_webhook`: outbound-only Enterprise WeCom webhook adapter
- `wecom_longconn_bot`: Enterprise WeCom smart-bot bridge adapter

## Usage

Once installed, `bub gateway` will auto-discover this plugin via Python entry points.

```bash
uv run bub gateway --enable-channel wecom_longconn_bot
uv run bub gateway --enable-channel wecom_webhook
```

When `bub-wecom` is checked out next to [bub](https://github.com/ximenzun/bub), `uv sync` uses the sibling `../bub` checkout as an editable dependency via `tool.uv.sources`, matching the local-development workflow used by `bub-social-coding`.

## Run

From the `bub-wecom` repo root:

```bash
uv sync
uv run bub gateway --enable-channel wecom_longconn_bot
```

Use the bundled WeCom skill after installation; it is shipped through the `bub_skills` namespace package.

## Release

Publishing is driven by GitHub Actions.
Create a GitHub Release on `main` with a tag like `v0.1.0` or `0.1.0`, and the release workflow will:

1. normalize the tag to a package version
2. build the sdist and wheel
3. publish to PyPI through Trusted Publishing (GitHub OIDC)

No long-lived `PYPI_TOKEN` secret is required when PyPI Trusted Publisher is configured for `.github/workflows/on-release-main.yml`.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md) for the local workflow, verification commands, and pull request process.

## Development

```bash
uv run pytest -q
uv run ruff check .
```
