Metadata-Version: 2.4
Name: waken-claude
Version: 0.1.0
Summary: Claude Target adapter for Waken — routes waken Events to the Claude Agent SDK.
Project-URL: Homepage, https://github.com/WakenHQ/waken-claude
Project-URL: Repository, https://github.com/WakenHQ/waken-claude
Project-URL: Issues, https://github.com/WakenHQ/waken-claude/issues
Author: Waken contributors
License: MIT
License-File: LICENSE
Keywords: agents,ai,anthropic,claude,waken
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: claude-agent-sdk>=0.1.0
Requires-Dist: waken>=0.1.0
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# waken-claude

[![CI](https://github.com/WakenHQ/waken-claude/actions/workflows/ci.yml/badge.svg)](https://github.com/WakenHQ/waken-claude/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-lightgrey)](https://github.com/WakenHQ/waken-claude/blob/main/LICENSE)

Claude Target adapter for [Waken](https://github.com/WakenHQ/waken) — "nginx
for AI agents." Routes a waken `Event` to the
[Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python) and
returns a `Response`.

## Install

```bash
pip install waken-claude
```

`ANTHROPIC_API_KEY` must be set in the environment — that's
`claude_agent_sdk`'s own convention, nothing waken-specific.

## Usage

```python
from waken import Runtime
from waken_claude import ClaudeAdapter

runtime = Runtime()
runtime.target("claude", ClaudeAdapter())
runtime.run()
```

```bash
waken send claude "Build tic tac toe." --wait
```

`ClaudeAdapter` keeps a `waken session_id -> SDK session id` map internally,
so a multi-turn conversation (same `event.session_id` across calls) resumes
via the SDK's `resume` option instead of starting over each turn. Extra
keyword arguments passed to `ClaudeAdapter(...)` are forwarded to
`ClaudeAgentOptions` on every call:

```python
runtime.target("claude", ClaudeAdapter(cwd="/repo", allowed_tools=["Read", "Bash"]))
```

## Development

```bash
git clone https://github.com/WakenHQ/waken-claude
cd waken-claude
pip install -e /path/to/waken   # waken isn't on PyPI yet — install it locally first
pip install -e ".[dev]"
pytest
```

Tests mock `claude_agent_sdk.ClaudeSDKClient` entirely — no API key or
network access needed to run the suite.

`waken` itself is pre-release and its repo is currently private, so
`pip install -e ".[dev]"` on its own (as CI does) can't resolve the
`waken>=0.1.0` dependency yet — this is a known, expected gap until `waken`
is published to PyPI, not something this package works around.

## License

[MIT](https://github.com/WakenHQ/waken-claude/blob/main/LICENSE)
