claude-relay 3.6.0-beta.1 → 3.6.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +54 -196
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  <p align="center">
2
- <img src="media/logo/icon-full-banded-256-transparent.png" alt="Clay - self-hosted team workspace for Claude Code and Codex" />
2
+ <img src="lib/public/icon-192.png" width="120" alt="Clay Studio symbol" /><br>
3
+ <img src="lib/public/clay-studio-wordmark.svg" width="280" alt="Clay Studio" />
3
4
  </p>
4
5
 
5
- <h2 align="center">Multiplayer Claude Code and Codex.</h2>
6
- <h4 align="center">
7
- Drop into a teammate's session live.<br>
8
- Or pair with AI mates that remember and push back.<br>
9
- Self-hosted, one toggle between vendors.
10
- </h4>
6
+ <h2 align="center">Where minds work together.</h2>
7
+
8
+ <p align="center">
9
+ A self-hosted workspace where people and coding agents work together<br>
10
+ across projects, sessions, and providers.
11
+ </p>
11
12
 
12
13
  <p align="center">
13
14
  <a href="https://www.npmjs.com/package/clay-server"><img src="https://img.shields.io/npm/v/clay-server" alt="npm version" /></a>
@@ -16,235 +17,92 @@ Self-hosted, one toggle between vendors.
16
17
  <a href="https://github.com/chadbyte/clay/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
17
18
  </p>
18
19
 
19
- The browser tab your whole team lives in. Humans, AI agents, projects, sessions, decisions.
20
+ Clay Studio turns local coding agents into a shared, persistent team. Run different agents from one browser workspace, join a teammate's live session, keep project knowledge between conversations, and automate work without handing your workspace to another cloud.
20
21
 
21
- Afraid of locking your personal or team knowledge into one vendor? With Clay, your conventions, sessions, and decisions live on your disk. Switch when you want.
22
+ ## Quick start
22
23
 
23
- *A team-shared, self-hosted GUI for Claude Code and Codex CLIs.*
24
+ **Requirements:** Node.js 20+ and at least one supported coding-agent CLI installed and authenticated.
24
25
 
25
26
  ```bash
26
27
  npx clay-server
27
- # Scan the QR code to connect from any device
28
+ # Open the URL or scan the QR code from another device
28
29
  ```
29
30
 
30
- ## What's Clay?
31
-
32
- - **A browser-based workspace for Claude Code and Codex.** Open it on any device, alone or with your whole team.
33
- - **A place where your team collaborates across projects.** Engineers, PMs, designers, and domain experts share one workspace, hop between projects, drop into each other's sessions.
34
- - **Your virtual team.** Mates with names, memory, and roles — architect, reviewer, designer, whoever you need. They learn your codebase, push back on bad ideas, and don't reset between sessions.
35
- - **A multi-project dashboard.** Every repo on your machine in one sidebar. Run agents across several in parallel; permission requests and completions surface as notifications.
36
- - **A self-hosted dev server.** Runs on your machine in plain JSONL and Markdown. No proprietary database, no cloud relay, no lock-in. Walk away whenever — your data walks with you.
37
- - **A work-automation system.** Ralph Loop iterates a feature overnight; cron schedules agents while you're away. Wake up to results, or a clean failure trace.
38
-
39
- ## What it does
40
-
41
- ### Run Claude Code and Codex in one workspace
42
-
43
- Open a session, pick a vendor. Switch sessions, pick the other. Clay's adapter layer (YOKE) speaks the Claude Agent SDK and the Codex app-server protocol natively. Cross-vendor instruction loading: Codex reads AGENTS.md, Claude reads CLAUDE.md, Clay merges the rest into the system prompt automatically.
44
-
45
- <p align="center">
46
- <img src="media/split.gif" alt="Toggle between Claude Code and Codex in one click" width="700">
47
- </p>
48
-
49
- ### Every project on one dashboard
50
-
51
- All your projects live in the sidebar. Jump between them in one click, see live status across each, run agents in several at once. No more `cd ~/work/foo && tmux attach && ...`. One Clay daemon hosts every repo on your machine and gives you a single pane of glass over all of them.
52
-
53
- ### Mates: AI teammates with persistent memory
54
-
55
- Mates are AI personas with their own CLAUDE.md, knowledge files, and memory that compounds across sessions. They learn your stack, your conventions, your decision history. @mention them mid-session, DM them directly, or drop them into a debate. **They don't flatter you. They push back.**
31
+ Clay Studio runs on your machine and serves the workspace to your browser. For access outside your local network, use a private network such as Tailscale.
56
32
 
57
- <p align="center">
58
- <img src="media/mates.gif" alt="An AI teammate (Mate) pushing back on a bad design pitch in Clay" width="640">
59
- </p>
60
-
61
- ### Debate: structured multi-Mate decisions
62
-
63
- Stuck on REST vs GraphQL? Monorepo or split? Surface the question to a debate. Pick panelists, set the format, let your Mates argue both sides with moderated turns. You walk away with a recorded decision, not a vibe check.
64
-
65
- ### Parallel worktrees
66
-
67
- Detect existing git worktrees, spin up new ones from the sidebar, and run agents in each one independently. No more "wait, I have uncommitted changes." Each worktree is an isolated session with its own history.
68
-
69
- ### Ralph Loop: autonomous coding while you sleep
33
+ ## Why Clay Studio
70
34
 
71
- Write a `PROMPT.md`, optionally a `JUDGE.md`, hit go. Clay iterates: code, evaluate, retry, until the judge approves or you cap the loop. Run it once, or schedule it on standard Unix cron. Wake up to a finished feature or a clean failure trace.
35
+ ### Work together
72
36
 
73
- ### Web UI, mobile, push notifications
37
+ Projects, sessions, people, and agents share one workspace. Teammates can see live activity, enter the same session, hand off work, and respond to permission requests without gathering around one terminal.
74
38
 
75
- Installable PWA on iOS and Android. Push notifications for approvals, errors, and completed tasks. Service worker keeps the app responsive offline. When Claude needs approval, your phone buzzes, you tap approve, the agent keeps going.
39
+ ### Keep the context
76
40
 
77
- ## Who is Clay for
41
+ Sessions do not have to be disposable chats. Mates retain their roles and knowledge, project instructions carry across supported runtimes, and decisions remain available when the next task begins.
78
42
 
79
- ### Small teams (3–10)
43
+ ### Stay in control
80
44
 
81
- Engineers, PMs, designers, and domain experts in one workspace. Non-devs read the codebase and ask questions without ever opening an editor. Engineers @mention each other or drop into a teammate's session to help in real time. Share one org-wide API key or let each member bring their own, with costs routing to whoever ran the model.
45
+ The daemon runs on infrastructure you control. Sessions and knowledge live on disk in portable JSONL and Markdown rather than a proprietary database. Change coding agents without migrating the workspace around them.
82
46
 
83
- ### Larger teams (10+)
47
+ ## Supported coding agents
84
48
 
85
- Per-user, per-project, per-session permissions. On Linux, opt in to OS-level isolation: each Clay user maps to a real Linux account, file ACLs enforced via `setfacl`, processes spawn under the right UID/GID. Per-project API keys for billing separation. Plain JSONL sessions give you an audit trail you can grep.
49
+ Clay Studio currently includes integrations for:
86
50
 
87
- ### Solopreneurs and indie developers
51
+ **Claude Code · Codex · Grok Build · Kimi Code · GitHub Copilot CLI · Qwen Code · Junie CLI · Antigravity CLI · OpenCode · Kiro CLI**
88
52
 
89
- You don't have a team yet, so Mates are your team. A persistent architect, a reviewer, a designer — each with their own memory, ready to push back on bad ideas. Run Ralph Loop overnight to ship while you sleep. Toggle Claude and Codex per session to balance cost and capability.
53
+ Clay detects locally installed runtimes and exposes the ones available on your machine. Each runtime keeps its own authentication and may expose different models, modes, and capabilities.
90
54
 
91
- ### Self-hosting developers
55
+ ## Core capabilities
92
56
 
93
- Your code stays on your machine. Sessions are JSONL, knowledge is Markdown, settings are JSON. No proprietary database, no cloud relay, no middleman. CLAUDE.md, AGENTS.md, `.cursorrules` are all loaded automatically across vendors. Walk away whenever, your data walks with you.
57
+ - **Shared projects and live sessions.** Organize several repositories in one sidebar, run sessions in parallel, and collaborate with presence, cursors, mentions, and handoffs.
58
+ - **Persistent Mates.** Create AI collaborators with their own identity, instructions, knowledge, memory, direct messages, and roles in structured debates.
59
+ - **Cross-provider continuity.** YOKE gives supported coding agents a common session interface and carries project instruction files across vendor boundaries.
60
+ - **Parallel and background work.** Use git worktrees, paired sessions, spawned workers, scheduled tasks, and Ralph Loops without losing visibility into what is running.
61
+ - **A workspace on every device.** Use the desktop browser or install the PWA on mobile. Receive push notifications for approvals, failures, and completed work.
62
+ - **Tools where the work happens.** Browse and edit files, inspect diffs and history, open terminals, install skills, connect MCP servers, and manage project knowledge from the same workspace.
94
63
 
95
- ## Getting Started
64
+ ## Your machine is the server
96
65
 
97
- **Requirements:** Node.js 20+. Authenticated Claude Code CLI, Codex CLI, or both.
66
+ The normal request path is:
98
67
 
99
- ```bash
100
- npx clay-server
68
+ ```text
69
+ Browser → Clay Studio daemon → selected coding-agent runtime → model provider
101
70
  ```
102
71
 
103
- On first run, Clay asks for a port and whether you're solo or with a team. Open the URL or scan the QR code from your phone.
72
+ Clay Studio does not relay project traffic through a Clay-hosted cloud. Your code leaves the machine only when the selected runtime sends it to its model provider, just as it would when you use that CLI directly.
104
73
 
105
- For remote access, use a VPN like Tailscale.
74
+ The `d.clay.studio` hostname used for local HTTPS is a DNS-only service: no application data passes through it. See [clay-dns](clay-dns/) for the implementation and threat model.
106
75
 
107
- <p align="center">
108
- <img src="media/start.gif" alt="Starting Clay daemon from the CLI with npx clay-server" width="600">
109
- </p>
110
-
111
- ## CLI Options
76
+ ## Common CLI commands
112
77
 
113
78
  ```bash
114
- npx clay-server # Default (port 2633)
115
- npx clay-server -p 8080 # Specify port
116
- npx clay-server --yes # Skip interactive prompts (use defaults)
117
- npx clay-server -y --pin 123456
118
- # Non-interactive + PIN (for scripts/CI)
119
- npx clay-server --add . # Add current directory to running daemon
120
- npx clay-server --remove . # Remove project
79
+ npx clay-server # Start on the default port (2633)
80
+ npx clay-server -p 8080 # Use a different port
81
+ npx clay-server --add . # Add the current directory
121
82
  npx clay-server --list # List registered projects
122
- npx clay-server --shutdown # Stop running daemon
123
- npx clay-server --dangerously-skip-permissions
124
- # Bypass all permission prompts (requires PIN at setup)
125
- ```
126
-
127
- Run `npx clay-server --help` for all options.
128
-
129
- ## FAQ
130
-
131
- **"Is this a Claude Code wrapper?"**
132
- No. Clay drives Claude Code through the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) and Codex through the Codex app-server protocol. Both are first-class. Clay adds multi-session orchestration, persistent Mates, structured debates, scheduled agents, multi-user collaboration, built-in MCP servers, and a full browser UI on top.
133
-
134
- **"Can I run Claude Code and Codex in the same workspace?"**
135
- Yes. Pick a vendor when you open a session. Switch per session. Same projects, same Mates, same memory.
136
-
137
- **"How are Mates different from Claude Code's sub-agents?"**
138
- Sub-agents are ephemeral specialists spawned inside a single Claude Code session — a role and a system prompt for one task, then forgotten when the task ends. Mates are persistent teammates with their own knowledge files and memory that survive every session. A sub-agent forgets you the moment it returns; a Mate remembers your codebase, your decisions, and your conventions across months of work. @mention a Mate mid-session, DM it between sessions, or drop several into a debate.
139
-
140
- **"Does my code leave my machine?"**
141
- Only as model API calls (the same as using the CLI directly). Sessions, Mates, knowledge, and settings all stay on disk.
142
-
143
- **"Does my existing CLAUDE.md / AGENTS.md / .cursorrules work?"**
144
- Yes. Clay loads native instruction files for each vendor and merges the rest into the system prompt automatically.
145
-
146
- **"Can I continue a CLI session in the browser?"**
147
- Yes. CLI sessions show up in the sidebar. Browser sessions can be picked up in the CLI.
148
-
149
- **"Does each teammate need their own API key?"**
150
- No. Share one org-wide key, or let each user bring their own. On Linux with OS-level isolation, each member can also use their own Claude Code or Codex login.
151
-
152
- **"What does OS-level isolation actually do?"**
153
- On Linux, opt in and Clay provisions each user as a real Linux account. File ACLs are enforced via `setfacl`, agent processes spawn under the user's UID/GID, and the kernel handles the rest. One teammate can't read another's project files, even by accident. The guarantee comes from the OS, not from a promise in our code.
154
-
155
- **"Does it work with MCP servers?"**
156
- Yes. User-configured MCPs from `~/.clay/mcp.json` plus built-in browser, email, ask-user, and debate servers. All work in both Claude and Codex sessions.
157
-
158
- **"Can I use it on my phone?"**
159
- Yes. Install as a PWA on iOS or Android. Push notifications for approvals, errors, and task completion.
160
-
161
- **"What is d.clay.studio in my browser URL?"**
162
- A DNS-only service that resolves to your local IP for HTTPS certificate validation. No data passes through it. All traffic stays between your browser and your machine. See [clay-dns](clay-dns/) for details.
163
-
164
- ## Our Philosophy
165
-
166
- One idea: **user experience sovereignty**.
167
-
168
- Not a grand statement. A simple wish: not to have your thinking, your work, and your data locked in the moment a vendor changes a price or rewrites a ToS.
169
-
170
- That shows up in the technical choices we made:
171
-
172
- - **Your machine is the server.** Browser → your daemon → model API. That's the full chain. No vendor cloud, no relay server, no middle tier syncing your sessions through someone else's infrastructure.
173
- - **One toggle between vendors.** The adapter layer (YOKE) speaks the Claude Agent SDK and the Codex app-server protocol natively. Switching is a setting, not a migration.
174
- - **Plain text on disk.** Sessions, Mates, knowledge, and settings live as JSONL and Markdown. No proprietary database. You can `cat`, `grep`, version, and back up everything yourself.
175
- - **Standard formats only.** CLAUDE.md, AGENTS.md, `.cursorrules`, MCP, Unix cron. If you walk away from Clay, your data walks with you in formats every other tool already understands.
176
-
177
- That's the principle. The rest of the README is what it makes possible.
178
-
179
- ## Architecture
180
-
181
- Clay is a self-hosted daemon. It drives Claude Code (via the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)) and Codex (via the `codex app-server` JSON-RPC protocol) through a vendor-agnostic adapter layer (**YOKE**), and serves a multi-user web workspace over HTTP/WS. Sessions, Mates, and knowledge live as plain JSONL/Markdown on disk.
182
-
183
- ```mermaid
184
- graph LR
185
- subgraph Clients
186
- B1["Browser<br/>User A"]
187
- B2["Browser<br/>User B"]
188
- Phone["Phone PWA<br/>+ Push"]
189
- end
190
-
191
- subgraph Daemon["Clay Daemon (your machine)"]
192
- Auth["Auth + RBAC"]
193
- Server["HTTP / WS Server"]
194
- Project["Project Context"]
195
- YOKE["YOKE Adapter Layer"]
196
- MCP["Built-in MCP servers<br/>ask-user / browser /<br/>debate / email"]
197
- Push["Push (VAPID)"]
198
- end
199
-
200
- subgraph Vendors["Agent runtimes"]
201
- Claude["Claude Agent SDK"]
202
- Codex["codex app-server<br/>(JSON-RPC stdio)"]
203
- end
204
-
205
- B1 <-->|WS| Server
206
- B2 <-->|WS| Server
207
- Phone <-->|WS + push| Server
208
- Server --> Auth
209
- Server --> Project
210
- Project --> YOKE
211
- Project --> MCP
212
- Project --> Push
213
- YOKE --> Claude
214
- YOKE --> Codex
215
- Push -.-> Phone
83
+ npx clay-server --shutdown # Stop the daemon
216
84
  ```
217
85
 
218
- For sequence diagrams, OS-level isolation, daemon IPC, and key design decisions, see [docs/guides/architecture.md](docs/guides/architecture.md).
219
-
220
- ## Community Projects
221
-
222
- Projects built by the community on top of Clay.
223
-
224
- | Project | Description |
225
- |---------|-------------|
226
- | [clay-streamdeck-plugin](https://github.com/egns-ai/clay-streamdeck-plugin) | Stream Deck plugin that turns physical buttons into a live dashboard for managing Clay sessions, worktrees, and permission requests. |
227
-
228
- Building something with Clay? Share it in [Discussions](https://github.com/chadbyte/clay/discussions).
86
+ Run `npx clay-server --help` for the complete command reference.
229
87
 
230
- ## Contributors
88
+ ## Documentation
231
89
 
232
- <a href="https://github.com/chadbyte/clay/graphs/contributors">
233
- <img src="https://contrib.rocks/image?repo=chadbyte/clay" />
234
- </a>
90
+ - [Documentation index](docs/README.md)
91
+ - [Architecture](docs/guides/architecture.md)
92
+ - [MCP integration](docs/guides/MCP-IMPLEMENTATION.md)
93
+ - [Contributing](CONTRIBUTING.md)
94
+ - [Changelog](CHANGELOG.md)
235
95
 
236
- ## Contributing
96
+ ## Community
237
97
 
238
- Bug fixes and typo corrections are welcome. For feature suggestions, please open an issue first:
239
- [https://github.com/chadbyte/clay/issues](https://github.com/chadbyte/clay/issues)
98
+ The community-built [Clay Stream Deck plugin](https://github.com/egns-ai/clay-streamdeck-plugin) turns physical buttons into a live dashboard for sessions, worktrees, and permission requests.
240
99
 
241
- If you're using Clay, let us know how in Discussions:
242
- [https://github.com/chadbyte/clay/discussions](https://github.com/chadbyte/clay/discussions)
100
+ Building something with Clay Studio? Share it in [GitHub Discussions](https://github.com/chadbyte/clay/discussions).
243
101
 
244
102
  ## Disclaimer
245
103
 
246
- Not affiliated with Anthropic or OpenAI. Claude is a trademark of Anthropic. Codex is a trademark of OpenAI. Provided "as is" without warranty. Users are responsible for complying with their AI provider's terms of service.
104
+ Clay Studio is not affiliated with the providers of the coding agents it supports. Product names and trademarks belong to their respective owners. The software is provided "as is," and users are responsible for complying with the terms of their selected providers.
247
105
 
248
106
  ## License
249
107
 
250
- MIT
108
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "claude-relay",
3
- "version": "3.6.0-beta.1",
3
+ "version": "3.6.0-beta.2",
4
4
  "description": "Alias for clay-server — Web UI for Claude Code.",
5
5
  "bin": {
6
6
  "claude-relay": "bin/cli.js"
7
7
  },
8
8
  "dependencies": {
9
- "clay-server": "3.6.0-beta.1"
9
+ "clay-server": "3.6.0-beta.2"
10
10
  },
11
11
  "keywords": [
12
12
  "claude",