teamroom 0.1.1 → 0.2.0
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.
- package/README.md +82 -63
- package/dist/cli/index.js +199 -104
- package/dist/cli/index.js.map +1 -1
- package/dist/client/agents-md.d.ts +14 -0
- package/dist/client/agents-md.js +53 -0
- package/dist/client/agents-md.js.map +1 -0
- package/dist/client/backend.d.ts +60 -0
- package/dist/client/backend.js +103 -0
- package/dist/client/backend.js.map +1 -0
- package/dist/client/claude-events.d.ts +18 -0
- package/dist/client/claude-events.js +176 -0
- package/dist/client/claude-events.js.map +1 -0
- package/dist/client/claude-hook.d.ts +19 -12
- package/dist/client/claude-hook.js +90 -48
- package/dist/client/claude-hook.js.map +1 -1
- package/dist/client/config.d.ts +13 -4
- package/dist/client/config.js +25 -6
- package/dist/client/config.js.map +1 -1
- package/dist/client/doctor.js +60 -7
- package/dist/client/doctor.js.map +1 -1
- package/dist/client/git.d.ts +0 -2
- package/dist/client/git.js +0 -5
- package/dist/client/git.js.map +1 -1
- package/dist/client/ignore.d.ts +12 -0
- package/dist/client/ignore.js +96 -0
- package/dist/client/ignore.js.map +1 -0
- package/dist/client/invite-link.d.ts +3 -1
- package/dist/client/invite-link.js +19 -4
- package/dist/client/invite-link.js.map +1 -1
- package/dist/client/mcp-config.d.ts +39 -6
- package/dist/client/mcp-config.js +81 -26
- package/dist/client/mcp-config.js.map +1 -1
- package/dist/client/workspace.d.ts +27 -7
- package/dist/client/workspace.js +67 -39
- package/dist/client/workspace.js.map +1 -1
- package/dist/core/overlap.d.ts +3 -2
- package/dist/core/overlap.js +36 -8
- package/dist/core/overlap.js.map +1 -1
- package/dist/core/room.d.ts +2 -0
- package/dist/core/room.js +2 -0
- package/dist/core/room.js.map +1 -1
- package/dist/core/schemas.d.ts +1 -0
- package/dist/core/schemas.js +1 -0
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/dashboard/Dashboard.d.ts +2 -1
- package/dist/dashboard/Dashboard.js +3 -3
- package/dist/dashboard/Dashboard.js.map +1 -1
- package/dist/dashboard/model.d.ts +5 -2
- package/dist/dashboard/model.js +6 -3
- package/dist/dashboard/model.js.map +1 -1
- package/dist/dashboard/run.js +2 -2
- package/dist/dashboard/run.js.map +1 -1
- package/dist/mcp/auto-report.d.ts +32 -0
- package/dist/mcp/auto-report.js +83 -0
- package/dist/mcp/auto-report.js.map +1 -0
- package/dist/mcp/server.d.ts +16 -4
- package/dist/mcp/server.js +31 -25
- package/dist/mcp/server.js.map +1 -1
- package/dist/server/app.js +7 -9
- package/dist/server/app.js.map +1 -1
- package/dist/store/file-store.js +1 -1
- package/dist/store/file-store.js.map +1 -1
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -1,104 +1,118 @@
|
|
|
1
1
|
# teamroom
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run coding agents in parallel without them stepping on each other's files.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
You have Claude Code refactoring auth in one worktree, Codex building a feature in another, and Gemini CLI fixing tests in a third. Nothing tells them they are about to change the same file, until you merge. teamroom does: every session shares what it is changing, and each agent learns who else is in a file before it edits it.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- **Any agent.** Claude Code, Codex, Cursor, Gemini CLI, Mistral Vibe, or anything else that speaks MCP.
|
|
8
|
+
- **One command, no server.** `teamroom init` and you are done. Worktrees on one machine share a file in `.git`.
|
|
9
|
+
- **Sees work that is not pushed yet.** Uncommitted edits, untracked files, and plans that are not code yet ("renaming User to Account").
|
|
10
|
+
- **Optional team mode.** Point the repo at a small server and teammates' agents join the same room.
|
|
8
11
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
- **Sessions, not people.** Every checkout (worktree, clone, agent box) is its own session. Two agents of the same developer in two worktrees warn each other.
|
|
12
|
-
- **Snapshots replace each other.** A session's newest `wip` snapshot replaces its previous one, so once you merge, revert or switch branches, the warnings go away.
|
|
13
|
-
- **Merged commits are ignored.** Commit entries already in the default branch are filtered out on your machine using your local git.
|
|
14
|
-
- **Nothing blocks git.** Hooks run in the background and never fail a commit, even when the server is down.
|
|
12
|
+
## Quick start
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Requires Node.js 22 or newer and git.
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
```sh
|
|
17
|
+
npm install --global teamroom
|
|
18
|
+
cd your-repo
|
|
19
|
+
teamroom init
|
|
20
|
+
git add .mcp.json AGENTS.md && git commit -m "chore: coordinate parallel agents with teamroom"
|
|
21
|
+
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Then give each agent its own worktree and start them:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
|
|
26
|
+
git worktree add ../app-auth -b feat/auth && (cd ../app-auth && claude)
|
|
27
|
+
git worktree add ../app-billing -b feat/billing && (cd ../app-billing && codex)
|
|
28
|
+
teamroom watch # live view: every session, its agent, and files in more than one place
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
`teamroom doctor` checks every piece and prints the command that fixes each problem.
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
## What `init` sets up
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
| Piece | Works with | What it does |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| Git hooks | everything | After each commit, checkout, merge and rebase, shares the files this checkout changed compared with `main`, including uncommitted and untracked ones. Runs in the background and never fails a commit. |
|
|
38
|
+
| MCP server | any MCP agent | Runs for as long as the agent does. Shares the checkout's changes every few seconds without being asked, and puts a **heads-up** in front of the next tool result when another session starts changing a file this one is changing. Also gives the agent tools to announce a plan and check before editing. |
|
|
39
|
+
| `AGENTS.md` block | Codex, Cursor, and most agents | Tells the agent to announce its plan with `teamroom_post_note` and to call `teamroom_check_overlap` before editing. |
|
|
40
|
+
| Claude Code hooks | Claude Code | Briefs each new session on what the others are changing. **Pauses an edit once** when another session is in that file, with who and why; the retry goes through. Shares every edit the moment it happens. Worktrees created later get these hooks automatically, and teamroom's own tools are pre-approved so they run without a prompt. |
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
npm install --global teamroom
|
|
37
|
-
teamroom create --server https://teamroom.example.com
|
|
38
|
-
git add .mcp.json && git commit -m "chore: add teamroom for coding agents"
|
|
39
|
-
```
|
|
42
|
+
MCP config is written for Claude Code (`.mcp.json`) always, and for Cursor (`.cursor/mcp.json`), Gemini CLI (`.gemini/settings.json`) and Codex (`.codex/config.toml`) when the repo already has that folder. Force one with `teamroom init --agents codex,gemini`. For anything else, add a stdio MCP server with command `teamroom` and args `["mcp"]`. Examples:
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
```toml
|
|
45
|
+
# Codex, ~/.codex/config.toml (a project .codex/config.toml only loads in trusted projects)
|
|
46
|
+
[mcp_servers.teamroom]
|
|
47
|
+
command = "teamroom"
|
|
48
|
+
args = ["mcp"]
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
# Mistral Vibe, ~/.vibe/config.toml
|
|
51
|
+
[[mcp_servers]]
|
|
52
|
+
name = "teamroom"
|
|
53
|
+
transport = "stdio"
|
|
54
|
+
command = "teamroom"
|
|
55
|
+
args = ["mcp"]
|
|
45
56
|
```
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
Hooks are enforced, tools are a request. The git hooks, the MCP server's background reports and the Claude Code hooks run whatever the model decides, so the room stays accurate even when an agent ignores its instructions.
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
teamroom join 'https://teamroom.example.com/join/room_...#tri_...'
|
|
51
|
-
```
|
|
60
|
+
## How it works
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
- **Sessions, not people.** Every checkout (worktree, clone, agent box) is its own session. Two agents of the same developer in two worktrees warn each other.
|
|
63
|
+
- **Snapshots replace each other.** A session's newest snapshot replaces its previous one and the agent edits before it, so once you merge, revert or switch branches, the warnings go away.
|
|
64
|
+
- **Noise stays out.** Lockfiles never count as overlap. Add your own patterns (generated code, snapshots) to a `.teamroomignore` at the repo root, gitignore style, with `!` to re-include.
|
|
65
|
+
- **Nothing blocks git, and nothing blocks an agent for good.** A paused Claude edit goes through on retry; hooks exit cleanly when the room cannot be read.
|
|
66
|
+
|
|
67
|
+
## MCP tools
|
|
54
68
|
|
|
55
|
-
|
|
69
|
+
| Tool | What it does |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `teamroom_post_note` | Announce a plan and the files it will touch, before editing |
|
|
72
|
+
| `teamroom_check_overlap` | Who else is changing these files (default: everything this checkout changed) |
|
|
73
|
+
| `teamroom_report_work` | Share this checkout's changes now, with an optional one-line note |
|
|
74
|
+
| `teamroom_recent_activity` | What other sessions and agents did recently |
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
Activity is labeled with the agent that sent it, from the name it gives in the MCP handshake.
|
|
58
77
|
|
|
59
78
|
## Daily use
|
|
60
79
|
|
|
61
80
|
```sh
|
|
62
|
-
teamroom
|
|
81
|
+
teamroom watch # live dashboard
|
|
82
|
+
teamroom check # who else is changing the files you changed
|
|
63
83
|
teamroom check src/auth.ts # or specific files; exits 3 when there is overlap
|
|
64
|
-
teamroom note "
|
|
65
|
-
teamroom report # share your
|
|
66
|
-
teamroom status #
|
|
67
|
-
teamroom watch # live dashboard: who is working, their agents, files in more than one place
|
|
84
|
+
teamroom note "renaming User to Account" --files src/user.ts,src/db/schema.ts
|
|
85
|
+
teamroom report # share your changes now (hooks do this on commit and checkout)
|
|
86
|
+
teamroom status # recent activity
|
|
68
87
|
```
|
|
69
88
|
|
|
70
|
-
##
|
|
89
|
+
## Team mode
|
|
71
90
|
|
|
72
|
-
|
|
91
|
+
Local mode covers every worktree on one machine. To include teammates and their agents on other machines, run a server somewhere your team can reach:
|
|
73
92
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
| `teamroom_report_work` | Share this checkout's snapshot, with an optional one-line note |
|
|
78
|
-
| `teamroom_post_note` | Announce an intent before acting on it |
|
|
79
|
-
| `teamroom_recent_activity` | Recent activity in the room |
|
|
93
|
+
```sh
|
|
94
|
+
npx teamroom serve --host 0.0.0.0 --port 8787 --data-dir /var/lib/teamroom
|
|
95
|
+
```
|
|
80
96
|
|
|
81
|
-
|
|
97
|
+
Put it behind HTTPS, and pass `--trust-proxy` only when that proxy sets `X-Forwarded-For`. [docs/hosting.md](docs/hosting.md) covers Fly.io, Docker, the environment variables, and how to restrict who can create rooms.
|
|
82
98
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
99
|
+
In your repo, one person creates the room:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
teamroom create --server https://teamroom.example.com
|
|
87
103
|
```
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
It names the room after the repo folder and you after your git `user.name` (override with `--room-name` and `--name`), sets up the repo like `init`, and prints an invite link. Anyone who has the link can join, so share it privately. Teammates run, inside their clone:
|
|
90
106
|
|
|
91
107
|
```sh
|
|
92
|
-
teamroom
|
|
108
|
+
teamroom join 'https://teamroom.example.com/join/room_...#tri_...'
|
|
93
109
|
```
|
|
94
110
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Tell agents to use it, for example in `AGENTS.md` or `CLAUDE.md`:
|
|
111
|
+
Membership is saved to `.git/teamroom.json` (mode `600`, never committed) and every worktree shares it. The invite code sits after the `#`, which browsers never send, so it stays out of server logs. Without a scheme, `--server` defaults to `https://` (and `http://` for localhost).
|
|
98
112
|
|
|
99
|
-
|
|
113
|
+
`teamroom leave` removes you from the room and returns the repo to local mode.
|
|
100
114
|
|
|
101
|
-
|
|
115
|
+
Room admin:
|
|
102
116
|
|
|
103
117
|
```sh
|
|
104
118
|
teamroom invite rotate # owner only; the old invite stops working
|
|
@@ -106,19 +120,24 @@ teamroom member remove bo # owner only, or yourself; revokes the token
|
|
|
106
120
|
teamroom token rotate # replace your own token, for example after a leak
|
|
107
121
|
```
|
|
108
122
|
|
|
123
|
+
## What is shared
|
|
124
|
+
|
|
125
|
+
File paths, branch names, commit ids, short notes, member and agent names. Never file contents. In local mode nothing leaves your machine: the room is `.git/teamroom/`, readable only by you. On a server, tokens and invite codes are stored as SHA-256 hashes.
|
|
126
|
+
|
|
109
127
|
## Environment variables
|
|
110
128
|
|
|
111
129
|
| Variable | Purpose |
|
|
112
130
|
| --- | --- |
|
|
113
|
-
| `TEAMROOM_SERVER`, `TEAMROOM_ROOM`, `TEAMROOM_MEMBER`, `TEAMROOM_TOKEN` | Override `.git/teamroom.json`, for CI or shared agent machines |
|
|
114
131
|
| `TEAMROOM_SESSION` | Name this checkout's session (default: folder name plus a short hash of its path) |
|
|
132
|
+
| `TEAMROOM_MEMBER` | Your name (default: git `user.name`) |
|
|
133
|
+
| `TEAMROOM_AUTO_REPORT=0` | Stop `teamroom mcp` from sharing changes in the background |
|
|
134
|
+
| `TEAMROOM_SERVER`, `TEAMROOM_ROOM`, `TEAMROOM_TOKEN` | Override `.git/teamroom.json`, for CI or shared agent machines |
|
|
115
135
|
|
|
116
136
|
## Limits
|
|
117
137
|
|
|
118
|
-
-
|
|
138
|
+
- The room keeps the latest 1000 entries. Overlap looks back 72 hours by default (`--since-hours`, up to 90 days).
|
|
119
139
|
- A snapshot holds up to 200 files. Larger change sets are truncated and the CLI says so.
|
|
120
|
-
-
|
|
121
|
-
- Rooms are stored as one JSON file each. That is fine for teams, not for thousands of active rooms.
|
|
140
|
+
- On a server, rate limits are kept in memory per process, and rooms are stored as one JSON file each. That is fine for teams, not for thousands of active rooms.
|
|
122
141
|
|
|
123
142
|
## Development
|
|
124
143
|
|