# risv3-relay Relay daemon between Claude Code instances and a Claude.ai chat-equivalent session via the Anthropic API. ## What it does When CC produces output that would normally be pasted to a Claude.ai chat for review or a decision, the daemon does the relay automatically: 1. CC drops a JSON envelope into `queue/`. 2. Daemon picks oldest-first, appends to a running conversation history, calls the Anthropic API. 3. If the response contains `[NEEDS-JC]` in its first 200 characters, the daemon pauses and notifies via [ntfy.sh](https://ntfy.sh). 4. Otherwise, the response is written to `dispatch//input.txt` for the originating CC session to consume. JC can override at any time by writing to `state/jc_input.txt`. ## Install ```sh git clone git@localhost:AC/risv3-relay.git cd risv3-relay python3 -m venv .venv .venv/bin/pip install -e '.[dev]' cp .env.example .env # edit .env — add ANTHROPIC_API_KEY ``` ## Run ```sh .venv/bin/python -m relay run ``` The daemon prints the ntfy subscription URL on startup. Subscribe to it from your phone/laptop to receive `needs_jc` and error notifications. ## Project layout - `relay/` — Python package - `tests/` — pytest tests - `queue/`, `dispatch/`, `state/`, `logs/` — runtime directories created on first run; gitignored - `config.yaml` — registered CC sessions and per-session settings - `.env` — secrets and per-host overrides; gitignored ## Status First-PR scope: daemon skeleton, queue + dispatch loop, single-CC-session integration, basic logging, ntfy notifications, conversation history with summarization. See `docs/` and PR descriptions for follow-up scope (status web UI, multi-session, error recovery, cost tracking, systemd unit).