This repository has been archived on 2026-05-02 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
50d957e14e923a14c6ab3ca13e1088eb45e4478f
Initial commit. Establishes: - .gitignore: .env (secrets), .venv, __pycache__, runtime dirs (logs/, state/, queue/, dispatch/). Removes the duplicate .env entry and the .env.example exclusion that was preventing the example file from being tracked. - .env.example: ANTHROPIC_API_KEY/MODEL placeholders, NTFY_TOPIC (auto-generated on first run), STATUS_PORT, HISTORY_CHAR_CAP. - README: install + run quickstart. The daemon implementation lands on a feature branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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:
- CC drops a JSON envelope into
queue/. - Daemon picks oldest-first, appends to a running conversation history, calls the Anthropic API.
- If the response contains
[NEEDS-JC]in its first 200 characters, the daemon pauses and notifies via ntfy.sh. - Otherwise, the response is written to
dispatch/<session_id>/input.txtfor the originating CC session to consume.
JC can override at any time by writing to state/jc_input.txt.
Install
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
.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 packagetests/— pytest testsqueue/,dispatch/,state/,logs/— runtime directories created on first run; gitignoredconfig.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).
Description