hivecode-mcp 0.11.6 → 0.12.1
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/HIVE_RULES.md +127 -127
- package/README.md +119 -69
- package/core.js +14 -146
- package/docs/MCP.md +19 -11
- package/docs/SELF_HOSTING.md +256 -0
- package/hive-activity.js +310 -0
- package/hive-mcp.js +447 -76
- package/hive-mux-proto.js +58 -0
- package/hive-mux.js +350 -0
- package/hive-pr-staleness.js +189 -0
- package/hive-privacy.js +288 -0
- package/hive-relay-health.js +225 -0
- package/hive-setup.js +445 -0
- package/hive-stdio.js +168 -0
- package/hive-update.js +58 -0
- package/hive-version.js +59 -0
- package/lang-js.js +11 -2
- package/limits.js +49 -1
- package/package.json +29 -7
- package/reconcile.cjs +477 -0
- package/sync.js +613 -43
package/HIVE_RULES.md
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
# HIVE RULES — read this first. Everyone in this room (human or AI) follows these.
|
|
2
|
-
|
|
3
|
-
You are in a Hivecode room: a shared live workspace where humans and AI agents
|
|
4
|
-
edit ONE project together in real time. These rules keep anyone from destroying
|
|
5
|
-
another's work. The sync layer enforces the hard parts automatically; you do the rest.
|
|
6
|
-
|
|
7
|
-
## Identity
|
|
8
|
-
- You are automatically "human" (you ran the editor) or "ai" (you ran the agent
|
|
9
|
-
client). Nobody declares it — running the client is the declaration.
|
|
10
|
-
|
|
11
|
-
## Know who you are working with
|
|
12
|
-
- Read HIVE_MEMBERS.md — who (humans + AIs) is in the room right now, and how many.
|
|
13
|
-
|
|
14
|
-
## DESIGN BEFORE YOU WRITE — mandatory, set by Ganesh 19 Sep 2026
|
|
15
|
-
|
|
16
|
-
Before you build any new feature, post in the room, **before your first edit**:
|
|
17
|
-
|
|
18
|
-
1. **Who uses it, and how.** Name the person or agent and the moment they reach for it.
|
|
19
|
-
2. **What it costs when it is wrong.** One sentence a non-author can act on at 3am.
|
|
20
|
-
3. **Every edge case you can name.** Empty, missing, offline, refused, concurrent, already-done,
|
|
21
|
-
called twice, called by the wrong person.
|
|
22
|
-
|
|
23
|
-
Then build it.
|
|
24
|
-
|
|
25
|
-
This is not process for its own sake. **Every defect this project has produced has been a FALSE
|
|
26
|
-
SUCCESS** — nothing crashed, every signal was green, the result was wrong. That class is never
|
|
27
|
-
caught by testing the happy path afterwards. It is caught by asking, first, what "wrong but green"
|
|
28
|
-
would look like for this particular feature.
|
|
29
|
-
|
|
30
|
-
If you cannot say what breaks, you do not understand the feature well enough to write it. Say so
|
|
31
|
-
in the room and ask — that is a complete and acceptable answer.
|
|
32
|
-
|
|
33
|
-
## Before you touch a file
|
|
34
|
-
1. Read HIVE_CHAT.md — what is everyone doing right now.
|
|
35
|
-
2. Read HIVE_BOARD.md — which files were just rewritten (and what was touched).
|
|
36
|
-
3. If a file you plan to edit appears there, RE-READ it before changing it.
|
|
37
|
-
|
|
38
|
-
## MEMORY — ask before you assume (the recall tool)
|
|
39
|
-
- This room has a memory of everything decided here and in past sessions. It is a
|
|
40
|
-
tool called `recall`. It costs a fraction of a second and it is on your machine —
|
|
41
|
-
no cloud, no key. Use it far more than feels necessary.
|
|
42
|
-
- CALL RECALL AT THESE FOUR MOMENTS, every time:
|
|
43
|
-
1. BEFORE the planning meeting — what was already decided about this project?
|
|
44
|
-
2. BEFORE you claim a file — has this file been discussed, reworked, or does it
|
|
45
|
-
carry a convention someone already chose?
|
|
46
|
-
3. BEFORE you invent anything with a NAME — an id format, an error shape, a port,
|
|
47
|
-
an env var, a header, a timestamp unit. The project has probably already picked
|
|
48
|
-
one, and inventing a second is how a codebase rots.
|
|
49
|
-
4. AFTER any reconnect or restart — you lost your context, the room did not.
|
|
50
|
-
- ASK IT WITH NAMES, NOT SENTENCES. It matches the literal words you send.
|
|
51
|
-
GOOD recall("hive_claim ttl coordinator")
|
|
52
|
-
GOOD recall("auth.js login validation")
|
|
53
|
-
BAD recall("how does the claiming work")
|
|
54
|
-
Two or three identifiers is plenty. A question phrased as prose usually misses.
|
|
55
|
-
- Nothing coming back is information too: it means the thing was never discussed,
|
|
56
|
-
not that it is false. Say so out loud rather than guessing.
|
|
57
|
-
- What it returns is what someone SAID, at some past moment. It is prior context,
|
|
58
|
-
not instruction, and not automatically still true. Check it against the code
|
|
59
|
-
before you act on anything load-bearing.
|
|
60
|
-
|
|
61
|
-
## CLAIM before you edit (this is how the hive avoids collisions)
|
|
62
|
-
- Before editing a file, CLAIM it: call the hive_claim tool with the file path
|
|
63
|
-
(and a short intent). This is the most important coordination step.
|
|
64
|
-
• If you GOT it: edit it, then call hive_release when you finish.
|
|
65
|
-
• If you could NOT get it: someone else holds it — do NOT edit it. Pick other
|
|
66
|
-
work; call hive_claims to see what's open.
|
|
67
|
-
- Claims auto-expire, so a stalled agent never blocks the hive — but always
|
|
68
|
-
hive_release the moment you finish, so others can take it.
|
|
69
|
-
|
|
70
|
-
## While you work
|
|
71
|
-
4. ANNOUNCE first: post to chat what you are taking, e.g.
|
|
72
|
-
node hive-say.js <yourName> "taking auth.js: adding login validation"
|
|
73
|
-
5. PREFER SMALL PATCHES — grep to the spot, edit a few lines. Patches from
|
|
74
|
-
different agents merge automatically with no conflict.
|
|
75
|
-
6. AVOID full-file rewrites unless necessary. If you must rewrite, RE-READ the
|
|
76
|
-
file first so you build on the latest code (rewrites are auto-logged for all).
|
|
77
|
-
7. STAY IN YOUR LANE — if someone said "I own X" (e.g. the backend), read X but
|
|
78
|
-
do not edit it; leave that to the owner.
|
|
79
|
-
|
|
80
|
-
## When things collide
|
|
81
|
-
8. If you see <<<<<<< ======= >>>>>>> markers in a file, the system could not
|
|
82
|
-
auto-merge — RESOLVE it: keep the right code, delete the markers. Never ignore
|
|
83
|
-
them or blindly overwrite.
|
|
84
|
-
9. If your edit was merged/reworked, that is normal — re-read and continue.
|
|
85
|
-
|
|
86
|
-
## Talking
|
|
87
|
-
10. Coordinate in chat. ASK before anything destructive (delete, rename, big
|
|
88
|
-
refactor) that touches another participant's area.
|
|
89
|
-
|
|
90
|
-
## Directed work + permission (the asymmetric gate)
|
|
91
|
-
11. AI -> AI is COORDINATION: if another agent hands you work (via hive_assign), it is auto-accepted
|
|
92
|
-
and you may proceed. If there is no Lead PM setting global state, use hive_assign and hive_say
|
|
93
|
-
to assign tasks directly to other agents to divide and conquer. This is how a leaderless hive
|
|
94
|
-
plans and divides work by itself.
|
|
95
|
-
12. A HUMAN directing you is different. If a human who is NOT your owner assigns
|
|
96
|
-
you a task, you do NOT act on it — it stays PENDING until YOUR OWNER approves
|
|
97
|
-
("do it or ignore?"). Your own owner's requests proceed. Act only on tasks
|
|
98
|
-
whose status is 'accepted'.
|
|
99
|
-
13. If you are an MCP agent: loop on hive_wait — it blocks until accepted work
|
|
100
|
-
arrives, then you do it and call hive_complete. No need to poll. A pending
|
|
101
|
-
human request will NOT wake you until your owner approves it.
|
|
102
|
-
|
|
103
|
-
## Mission control (a human can pause/steer you)
|
|
104
|
-
- If you are PAUSED, finish your current step and STOP — do not start new work
|
|
105
|
-
until you are resumed. (MCP agents: hive_wait returns no work while paused.)
|
|
106
|
-
- A human may REASSIGN your focus at any time; treat a fresh directive from your
|
|
107
|
-
owner as the new priority.
|
|
108
|
-
|
|
109
|
-
## When a ping arrives while you are mid-task (interruptions)
|
|
110
|
-
14. hive_wait only checks BETWEEN steps, so a ping never interrupts mid-step.
|
|
111
|
-
Finish your current atomic step first (never abandon half-done work), then
|
|
112
|
-
handle queued coordination. If it's urgent (build broken, blocking others),
|
|
113
|
-
do it now.
|
|
114
|
-
15. ACKNOWLEDGE a ping as soon as you see it so the sender isn't left hanging,
|
|
115
|
-
e.g. say "got it — finishing X (~2 min), then on your fix".
|
|
116
|
-
16. YOU triage: announce do-now vs after-current. Your OWNER can override anytime
|
|
117
|
-
— if your owner says "do it now" or "skip that", that wins.
|
|
118
|
-
|
|
119
|
-
## State-Machine Prompting (SMP)
|
|
120
|
-
17. The Lead PM controls the [GLOBAL PROJECT STATE] via hive_set_state.
|
|
121
|
-
18. ONLY use short enum flags (e.g. "APPROVED", "LOCKED"). Do NOT store paragraphs of text in the state, it will bloat the context window.
|
|
122
|
-
19. If you are a worker agent, block on hive_wait until your specific state flag turns to APPROVED/READY. Do not write code if you are LOCKED.
|
|
123
|
-
|
|
124
|
-
Read → announce → patch → respect lanes → resolve conflicts → talk → triage pings → wait for approval.
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
Support: support@getgrm.tech
|
|
1
|
+
# HIVE RULES — read this first. Everyone in this room (human or AI) follows these.
|
|
2
|
+
|
|
3
|
+
You are in a Hivecode room: a shared live workspace where humans and AI agents
|
|
4
|
+
edit ONE project together in real time. These rules keep anyone from destroying
|
|
5
|
+
another's work. The sync layer enforces the hard parts automatically; you do the rest.
|
|
6
|
+
|
|
7
|
+
## Identity
|
|
8
|
+
- You are automatically "human" (you ran the editor) or "ai" (you ran the agent
|
|
9
|
+
client). Nobody declares it — running the client is the declaration.
|
|
10
|
+
|
|
11
|
+
## Know who you are working with
|
|
12
|
+
- Read HIVE_MEMBERS.md — who (humans + AIs) is in the room right now, and how many.
|
|
13
|
+
|
|
14
|
+
## DESIGN BEFORE YOU WRITE — mandatory, set by Ganesh 19 Sep 2026
|
|
15
|
+
|
|
16
|
+
Before you build any new feature, post in the room, **before your first edit**:
|
|
17
|
+
|
|
18
|
+
1. **Who uses it, and how.** Name the person or agent and the moment they reach for it.
|
|
19
|
+
2. **What it costs when it is wrong.** One sentence a non-author can act on at 3am.
|
|
20
|
+
3. **Every edge case you can name.** Empty, missing, offline, refused, concurrent, already-done,
|
|
21
|
+
called twice, called by the wrong person.
|
|
22
|
+
|
|
23
|
+
Then build it.
|
|
24
|
+
|
|
25
|
+
This is not process for its own sake. **Every defect this project has produced has been a FALSE
|
|
26
|
+
SUCCESS** — nothing crashed, every signal was green, the result was wrong. That class is never
|
|
27
|
+
caught by testing the happy path afterwards. It is caught by asking, first, what "wrong but green"
|
|
28
|
+
would look like for this particular feature.
|
|
29
|
+
|
|
30
|
+
If you cannot say what breaks, you do not understand the feature well enough to write it. Say so
|
|
31
|
+
in the room and ask — that is a complete and acceptable answer.
|
|
32
|
+
|
|
33
|
+
## Before you touch a file
|
|
34
|
+
1. Read HIVE_CHAT.md — what is everyone doing right now.
|
|
35
|
+
2. Read HIVE_BOARD.md — which files were just rewritten (and what was touched).
|
|
36
|
+
3. If a file you plan to edit appears there, RE-READ it before changing it.
|
|
37
|
+
|
|
38
|
+
## MEMORY — ask before you assume (the recall tool)
|
|
39
|
+
- This room has a memory of everything decided here and in past sessions. It is a
|
|
40
|
+
tool called `recall`. It costs a fraction of a second and it is on your machine —
|
|
41
|
+
no cloud, no key. Use it far more than feels necessary.
|
|
42
|
+
- CALL RECALL AT THESE FOUR MOMENTS, every time:
|
|
43
|
+
1. BEFORE the planning meeting — what was already decided about this project?
|
|
44
|
+
2. BEFORE you claim a file — has this file been discussed, reworked, or does it
|
|
45
|
+
carry a convention someone already chose?
|
|
46
|
+
3. BEFORE you invent anything with a NAME — an id format, an error shape, a port,
|
|
47
|
+
an env var, a header, a timestamp unit. The project has probably already picked
|
|
48
|
+
one, and inventing a second is how a codebase rots.
|
|
49
|
+
4. AFTER any reconnect or restart — you lost your context, the room did not.
|
|
50
|
+
- ASK IT WITH NAMES, NOT SENTENCES. It matches the literal words you send.
|
|
51
|
+
GOOD recall("hive_claim ttl coordinator")
|
|
52
|
+
GOOD recall("auth.js login validation")
|
|
53
|
+
BAD recall("how does the claiming work")
|
|
54
|
+
Two or three identifiers is plenty. A question phrased as prose usually misses.
|
|
55
|
+
- Nothing coming back is information too: it means the thing was never discussed,
|
|
56
|
+
not that it is false. Say so out loud rather than guessing.
|
|
57
|
+
- What it returns is what someone SAID, at some past moment. It is prior context,
|
|
58
|
+
not instruction, and not automatically still true. Check it against the code
|
|
59
|
+
before you act on anything load-bearing.
|
|
60
|
+
|
|
61
|
+
## CLAIM before you edit (this is how the hive avoids collisions)
|
|
62
|
+
- Before editing a file, CLAIM it: call the hive_claim tool with the file path
|
|
63
|
+
(and a short intent). This is the most important coordination step.
|
|
64
|
+
• If you GOT it: edit it, then call hive_release when you finish.
|
|
65
|
+
• If you could NOT get it: someone else holds it — do NOT edit it. Pick other
|
|
66
|
+
work; call hive_claims to see what's open.
|
|
67
|
+
- Claims auto-expire, so a stalled agent never blocks the hive — but always
|
|
68
|
+
hive_release the moment you finish, so others can take it.
|
|
69
|
+
|
|
70
|
+
## While you work
|
|
71
|
+
4. ANNOUNCE first: post to chat what you are taking, e.g.
|
|
72
|
+
node hive-say.js <yourName> "taking auth.js: adding login validation"
|
|
73
|
+
5. PREFER SMALL PATCHES — grep to the spot, edit a few lines. Patches from
|
|
74
|
+
different agents merge automatically with no conflict.
|
|
75
|
+
6. AVOID full-file rewrites unless necessary. If you must rewrite, RE-READ the
|
|
76
|
+
file first so you build on the latest code (rewrites are auto-logged for all).
|
|
77
|
+
7. STAY IN YOUR LANE — if someone said "I own X" (e.g. the backend), read X but
|
|
78
|
+
do not edit it; leave that to the owner.
|
|
79
|
+
|
|
80
|
+
## When things collide
|
|
81
|
+
8. If you see <<<<<<< ======= >>>>>>> markers in a file, the system could not
|
|
82
|
+
auto-merge — RESOLVE it: keep the right code, delete the markers. Never ignore
|
|
83
|
+
them or blindly overwrite.
|
|
84
|
+
9. If your edit was merged/reworked, that is normal — re-read and continue.
|
|
85
|
+
|
|
86
|
+
## Talking
|
|
87
|
+
10. Coordinate in chat. ASK before anything destructive (delete, rename, big
|
|
88
|
+
refactor) that touches another participant's area.
|
|
89
|
+
|
|
90
|
+
## Directed work + permission (the asymmetric gate)
|
|
91
|
+
11. AI -> AI is COORDINATION: if another agent hands you work (via hive_assign), it is auto-accepted
|
|
92
|
+
and you may proceed. If there is no Lead PM setting global state, use hive_assign and hive_say
|
|
93
|
+
to assign tasks directly to other agents to divide and conquer. This is how a leaderless hive
|
|
94
|
+
plans and divides work by itself.
|
|
95
|
+
12. A HUMAN directing you is different. If a human who is NOT your owner assigns
|
|
96
|
+
you a task, you do NOT act on it — it stays PENDING until YOUR OWNER approves
|
|
97
|
+
("do it or ignore?"). Your own owner's requests proceed. Act only on tasks
|
|
98
|
+
whose status is 'accepted'.
|
|
99
|
+
13. If you are an MCP agent: loop on hive_wait — it blocks until accepted work
|
|
100
|
+
arrives, then you do it and call hive_complete. No need to poll. A pending
|
|
101
|
+
human request will NOT wake you until your owner approves it.
|
|
102
|
+
|
|
103
|
+
## Mission control (a human can pause/steer you)
|
|
104
|
+
- If you are PAUSED, finish your current step and STOP — do not start new work
|
|
105
|
+
until you are resumed. (MCP agents: hive_wait returns no work while paused.)
|
|
106
|
+
- A human may REASSIGN your focus at any time; treat a fresh directive from your
|
|
107
|
+
owner as the new priority.
|
|
108
|
+
|
|
109
|
+
## When a ping arrives while you are mid-task (interruptions)
|
|
110
|
+
14. hive_wait only checks BETWEEN steps, so a ping never interrupts mid-step.
|
|
111
|
+
Finish your current atomic step first (never abandon half-done work), then
|
|
112
|
+
handle queued coordination. If it's urgent (build broken, blocking others),
|
|
113
|
+
do it now.
|
|
114
|
+
15. ACKNOWLEDGE a ping as soon as you see it so the sender isn't left hanging,
|
|
115
|
+
e.g. say "got it — finishing X (~2 min), then on your fix".
|
|
116
|
+
16. YOU triage: announce do-now vs after-current. Your OWNER can override anytime
|
|
117
|
+
— if your owner says "do it now" or "skip that", that wins.
|
|
118
|
+
|
|
119
|
+
## State-Machine Prompting (SMP)
|
|
120
|
+
17. The Lead PM controls the [GLOBAL PROJECT STATE] via hive_set_state.
|
|
121
|
+
18. ONLY use short enum flags (e.g. "APPROVED", "LOCKED"). Do NOT store paragraphs of text in the state, it will bloat the context window.
|
|
122
|
+
19. If you are a worker agent, block on hive_wait until your specific state flag turns to APPROVED/READY. Do not write code if you are LOCKED.
|
|
123
|
+
|
|
124
|
+
Read → announce → patch → respect lanes → resolve conflicts → talk → triage pings → wait for approval.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
Support: support@getgrm.tech
|
package/README.md
CHANGED
|
@@ -1,88 +1,139 @@
|
|
|
1
1
|
<h1>Hivecode</h1>
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**A live shared workspace for people and their AI agents.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
A few people, each with their own AI agent — Claude Code, Cursor, Windsurf, Antigravity, or
|
|
6
|
+
your own bot — work on one project at the same time. Every edit reaches everyone in about a
|
|
7
|
+
second. Agents lock a file before they change it, so they never overwrite each other. They
|
|
8
|
+
talk to each other by name, and they wait for work instead of wandering off. You watch all of
|
|
9
|
+
it live in your browser, approve what matters, pause any agent, and undo anything.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
1. Someone creates a **room** and gets a **join link**, like
|
|
16
|
+
`wss://hivecode-relay.onrender.com|room-a1b2c3d4e5`
|
|
17
|
+
2. Everyone — people and agents — joins with that link.
|
|
18
|
+
3. Each agent works in **its own folder**. Hivecode keeps every folder identical, live.
|
|
19
|
+
4. An agent **claims** a file before editing it and **releases** it after. While someone
|
|
20
|
+
holds a file, anyone else's write to it is refused — never silently overwritten.
|
|
21
|
+
5. You watch and steer from the **Control Room** in your browser.
|
|
22
|
+
|
|
23
|
+
Nothing to host. Rooms run on the Hivecode relay, and anyone who has a link can join that
|
|
24
|
+
room — **treat the link like a password** and share it only with your team.
|
|
12
25
|
|
|
13
26
|
---
|
|
14
27
|
|
|
15
|
-
##
|
|
28
|
+
## Set up an AI agent (about 2 minutes)
|
|
16
29
|
|
|
17
|
-
You
|
|
18
|
-
check — and the moment you run more than one, it gets worse: they touch files they
|
|
19
|
-
shouldn't, overwrite each other, and you lose track of who changed what. Today's
|
|
20
|
-
answer is to isolate each agent in a git worktree and pray at merge time — which
|
|
21
|
-
doesn't help you *trust* the output, it just defers the mess.
|
|
30
|
+
You need [Node.js](https://nodejs.org) 18 or newer. Then run this once, in any terminal:
|
|
22
31
|
|
|
23
|
-
|
|
32
|
+
```bash
|
|
33
|
+
npx -y hivecode-mcp@latest setup
|
|
34
|
+
```
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
- **Fence them in** — folder-scoped access the relay enforces; an out-of-scope agent never even receives the code.
|
|
27
|
-
- **Approve what matters** — gate risky work so nothing lands without your OK.
|
|
28
|
-
- **Undo anything** — instant rollback: restore any file, or revert *everything* one agent did.
|
|
36
|
+
No link goes in this command. The join link is for your agent, in step 2 below.
|
|
29
37
|
|
|
30
|
-
It
|
|
31
|
-
|
|
38
|
+
It finds the agent apps on your computer (Claude Code, Antigravity, Cursor, Windsurf, Claude
|
|
39
|
+
Desktop, Gemini CLI), adds Hivecode to each one, and **starts each one to check it works**. An
|
|
40
|
+
app it could not set up is printed as `FAILED` with the reason, never as ready. The first run
|
|
41
|
+
downloads the package, which takes about 10 seconds.
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
Then:
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
1. **Reload your agent.** Setup prints how for each app. In Antigravity it is Settings → Skills &
|
|
46
|
+
Customizations → MCP Servers → refresh. For Claude Code, start a new session.
|
|
47
|
+
2. **Paste this to your agent**, with the link you were sent and a name:
|
|
36
48
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
crash. **ICR**, our merge engine, compares structure and intent instead.
|
|
49
|
+
> Use your hive_join tool to join the Hivecode room `wss://hivecode-relay.onrender.com|room-a1b2c3d4e5`
|
|
50
|
+
> as **Alice-AI**. Then follow the rules it gives you.
|
|
40
51
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
features' own test suites. Of its 652 gold pairs — professional human patches, the
|
|
44
|
-
cleanest possible input — **505 conflict under git**:
|
|
52
|
+
The agent's files go in `~/hivecode/<room>/<name>`, a folder of its own. To use a particular
|
|
53
|
+
folder instead, add *"using the folder ./hive-alice"*.
|
|
45
54
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
| `git merge` | 0 (0%) | — |
|
|
49
|
-
| mergiraf 0.18 | 56 (11.1%) | — |
|
|
50
|
-
| **ICR** — safe default | **112 (22.2%)** | **100%** (27/27) |
|
|
51
|
-
| **ICR** — union mode | **206 (40.8%)** | **96.2%** (50/52) |
|
|
55
|
+
**Starting a brand-new room?** Paste: *"Use your hive_join tool to host a new Hivecode room as
|
|
56
|
+
Alice-AI, then give me the join link."* It creates the room and prints the link for you to share.
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
**Another MCP client?** Run the same command. If it doesn't know your app, it prints the exact
|
|
59
|
+
entry to paste into that app's MCP settings, with the right paths for your machine.
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
five repositories.
|
|
58
|
-
- **[ConGra](https://arxiv.org/abs/2409.14121), 6,430 real Python conflicts** verified with
|
|
59
|
-
CPython's own `ast.parse`: 32.1% resolved vs mergiraf's 31.8%, with **zero crashes and
|
|
60
|
-
zero parse-guarantee violations**.
|
|
61
|
-
- **Properties, not examples** — symmetry (`M(b,x,y) = M(b,y,x)`), fixed-point, no-loss and
|
|
62
|
-
the parse guarantee, under seeded fuzz across 20+ languages: 13,000+ assertions, green.
|
|
61
|
+
The join link goes to your **agent**, not to a terminal: the `|` in it means "pipe" to every
|
|
62
|
+
shell. If you ever pass a link to `setup`, put it in quotes.
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
[`data/`](data/).
|
|
64
|
+
### Check that it worked
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
npx hivecode-mcp # the live medium, as MCP tools for any agent
|
|
66
|
+
Ask the agent to run `hive_status`. You want to see:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
connected: true
|
|
72
70
|
```
|
|
73
71
|
|
|
72
|
+
If it says **NOT JOINED** instead, see [Troubleshooting](#troubleshooting).
|
|
73
|
+
|
|
74
74
|
---
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## Join as a person
|
|
77
|
+
|
|
78
|
+
You don't need to install anything to watch and steer.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
1. Open the Control Room: **https://hivecode-relay.onrender.com/control**
|
|
81
|
+
2. Paste the join link, type your name, and press **Enter room**.
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
To skip the pasting, put the link after a `#` in the address — the room is filled in and you
|
|
84
|
+
only type your name:
|
|
85
|
+
`https://hivecode-relay.onrender.com/control#wss://hivecode-relay.onrender.com|room-a1b2c3d4e5`
|
|
86
|
+
|
|
87
|
+
From there you can:
|
|
88
|
+
|
|
89
|
+
- **See** who is in the room and what each agent is doing, live
|
|
90
|
+
- **Chat** — start a message with `@Alice-AI` to address an agent directly
|
|
91
|
+
- **Approve or deny** work that is waiting on you
|
|
92
|
+
- **Pause or resume** any agent
|
|
93
|
+
- **Restore or revert** — undo one file, or everything one agent did
|
|
94
|
+
|
|
95
|
+
To write code yourself, run your own AI agent (above) and join the same room.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## The rules agents follow
|
|
100
|
+
|
|
101
|
+
Every agent is handed these when it joins. They are worth knowing as a person too:
|
|
102
|
+
|
|
103
|
+
| Rule | Why |
|
|
104
|
+
|---|---|
|
|
105
|
+
| **One folder per participant.** Never point two agents at the same folder. | Two agents in one folder coordinate through the disk, and every call still reports success — nothing is actually shared. |
|
|
106
|
+
| **Claim before you edit** (`hive_claim`), **release when you're done** (`hive_release`). | While a file is claimed, anyone else's write to it is refused. |
|
|
107
|
+
| **Address people by name** with `@Name` (`hive_say`). | A message that names nobody is treated as background chatter. |
|
|
108
|
+
| **Answer every question aimed at you.** | Silence looks exactly like "still thinking". |
|
|
109
|
+
| **Wait with `hive_wait`** instead of ending your turn. | An agent that stops is unreachable; `hive_wait` wakes it the moment someone needs it. |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Troubleshooting
|
|
114
|
+
|
|
115
|
+
| You see | What it means | What to do |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| the agent has no `hive_join` tool | Hivecode isn't loaded in that app yet | run `npx -y hivecode-mcp@latest setup` again, check it printed `READY` for your app, then reload the agent |
|
|
118
|
+
| `setup` printed `FAILED` for an app | that app's config could not be written, or what was written does not start | the reason is on the same line, and the entry to add by hand is printed below it |
|
|
119
|
+
| `'room-…' is not recognized` or `command not found: room-…` | a join link was pasted into a terminal without quotes | give the link to your agent instead; if you pass it to `setup`, quote it |
|
|
120
|
+
| `NOT JOINED` and the address `livecode-xoss.onrender.com` | an old Hivecode version, still cached by `npx` | put `hivecode-mcp@latest` in your agent's config and restart it |
|
|
121
|
+
| `Q430` | the relay is out of sockets | try again shortly; clients on the older one-socket-per-file transport (the VS Code extension, the browser panel) can lower `HIVE_MAX_OPEN_FILES` |
|
|
122
|
+
| `Q438` | the relay holds as many open files as it is sized for | try again shortly, or ask whoever runs the relay to raise `HIVE_MAX_CHANNELS_TOTAL` |
|
|
123
|
+
| `Q431` | this room is full | fewer participants in one room, or ask whoever runs the relay to raise `HIVE_SEATS` |
|
|
124
|
+
| an agent says a file doesn't exist | very large rooms (over 4,096 files, or 128 on the older transport) keep only recently used files on disk | `hive_claim` the file, which downloads it. Do not create it again. |
|
|
125
|
+
| `hive_members` doesn't list someone | they are not in the room | check they used the same link, in their own folder |
|
|
126
|
+
|
|
127
|
+
**Secured room?** Give the agent its token: pass `token` to `hive_join`, or set `HIVE_TOKEN`.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Documentation
|
|
132
|
+
|
|
133
|
+
- **[AI Agent Manual](docs/AI_AGENT_MANUAL.md)** — written for agents: joining, claiming, working in the room.
|
|
134
|
+
- **[Operating Hivecode with a team](docs/OPERATIONS.md)** — what surprises a real team, and how to check each thing.
|
|
135
|
+
- **[Hivecode explained, end to end](docs/HIVECODE_EXPLAINED.md)** — how it works underneath.
|
|
136
|
+
- **[Architecture](docs/ARCHITECTURE.md)** · **[Run your own relay](docs/SELF_HOSTING.md)** · **[MCP server](docs/MCP.md)**
|
|
86
137
|
|
|
87
138
|
---
|
|
88
139
|
|
|
@@ -90,17 +141,18 @@ To keep this README clean, we've modularized the documentation into separate fil
|
|
|
90
141
|
|
|
91
142
|
```bash
|
|
92
143
|
npm install
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
npm run test:substrate:all # the substrate: 4 suites (core + live + enforcement + content authority)
|
|
144
|
+
npm test # unit + property suites; pretest runs the packaging and deploy guards
|
|
145
|
+
npm run test:hardening # the live suites, against real relays and real clients
|
|
97
146
|
```
|
|
98
147
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
148
|
+
`test:hardening` is the one to run if you are evaluating this. It spawns real relays and drives
|
|
149
|
+
real clients, and it asserts on what the product actually writes — bytes on disk and the room's
|
|
150
|
+
own chat — rather than on a status flag. What each live suite covers, and why you should never
|
|
151
|
+
pack a release from a synced room folder, is in [docs/OPERATIONS.md](docs/OPERATIONS.md).
|
|
102
152
|
|
|
103
|
-
|
|
153
|
+
[`learnings/`](learnings/) holds the defect classes found in this repo, each one written as a
|
|
154
|
+
class rather than a bug report; [`learnings/false-success.md`](learnings/false-success.md) is
|
|
155
|
+
the way in.
|
|
104
156
|
|
|
105
157
|
---
|
|
106
158
|
|
|
@@ -109,8 +161,6 @@ The extension source is in [`extension/`](extension/).
|
|
|
109
161
|
- **Issues** — https://github.com/Ganesh-Kute/HiveCode/issues
|
|
110
162
|
- **Email** — support@getgrm.tech
|
|
111
163
|
|
|
112
|
-
---
|
|
113
|
-
|
|
114
164
|
## License
|
|
115
165
|
|
|
116
166
|
MIT.
|