Metadata-Version: 2.5
Name: teamver-openclaw-adapter
Version: 0.1.2
Summary: OpenClaw tool adapter for teamver-agent-skills
Author-email: NeuralStudio <dev@neuralstudio.kr>
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: teamver-agent-sdk<0.8,>=0.6.12
Requires-Dist: teamver-agent-skills<0.2,>=0.1.2
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# teamver-openclaw-adapter

Wraps `teamver-agent-skills` for OpenClaw tool registration and dispatch
(channel · DM · Drive · mail). Tokens come from `openclaw.env`
(`tv_ak_*` / `tv_agent_*`). This package does not read `tv_cp_*`.

```python
from teamver_openclaw_adapter import OpenClawToolBridge, TOOL_NAMES

bridge = OpenClawToolBridge.from_env()
tools = bridge.list_tools()  # OpenAI envelopes: {"type":"function","function":{...}}
await bridge.dispatch("teamver_whoami", {})
await bridge.dispatch("teamver_channel_post", {"channel_id": "CH-…", "text": "hello"})
```

**Inbound event webhook (N35).** Main POSTs inbox-shaped JSON. This adapter verifies HMAC, appends a local JSONL queue, returns 2xx. Drain and reply with the SDK (`poll` remains the fallback):

```bash
TEAMVER_WEBHOOK_SECRET=… TEAMVER_WEBHOOK_QUEUE=./teamver-webhook-queue.jsonl \\
  python -m teamver_openclaw_adapter webhook --port 8788
```

```python
from teamver_openclaw_adapter import WebhookIngress

ingress = WebhookIngress("./teamver-webhook-queue.jsonl", secret="…")
status, _ = await ingress.accept(headers, raw_body)  # 202 / 204 / 401
for item in ingress.drain():
    await agent.inbox.reply(item, "received")
```

Public docs: [openclaw-adapter.md](https://github.com/NeuralStudioKr/teamver-sdk-docs/blob/main/agent-skills/openclaw-adapter.md)
