hivecode-mcp 0.14.1 → 0.14.3
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 +98 -98
- package/LICENSE +21 -21
- package/README.md +421 -421
- package/core.js +91 -91
- package/docs/ALWAYS_ON.md +310 -310
- package/docs/GITHUB_WORKFLOW.md +394 -394
- package/docs/HIVE_RULES.md +41 -41
- package/docs/MCP.md +157 -157
- package/docs/QUICKSTART.md +266 -266
- package/docs/SELF_HOSTING.md +256 -256
- package/docs/SLACK_SETUP.md +474 -474
- package/docs/TROUBLESHOOTING.md +106 -105
- package/hive-activity.js +336 -336
- package/hive-authors.js +46 -44
- package/hive-await.js +230 -230
- package/hive-branch.js +674 -607
- package/hive-busy.js +88 -88
- package/hive-coord.js +110 -110
- package/hive-gate.js +135 -135
- package/hive-github.js +3 -1
- package/hive-hook-install.js +179 -179
- package/hive-instructions.js +74 -74
- package/hive-land.js +709 -691
- package/hive-listen.js +81 -81
- package/hive-mailbox.js +520 -520
- package/hive-mcp-http.js +591 -591
- package/hive-mcp.js +92 -12
- package/hive-mux-proto.js +58 -58
- package/hive-mux.js +354 -351
- package/hive-notify.js +234 -233
- package/hive-obligations.js +247 -247
- package/hive-poll-proto.js +50 -50
- package/hive-pr-staleness.js +189 -189
- package/hive-pr.js +637 -512
- package/hive-privacy.js +327 -327
- package/hive-receipts.js +233 -233
- package/hive-relay-health.js +234 -234
- package/hive-repos.js +430 -430
- package/hive-room-key.js +210 -210
- package/hive-room-mode.js +1761 -1668
- package/hive-room-watcher.js +623 -561
- package/hive-secrets.js +89 -89
- package/hive-session.js +114 -114
- package/hive-setup.js +560 -560
- package/hive-slack-agent.js +408 -408
- package/hive-slack.js +2417 -2367
- package/hive-stdio.js +172 -172
- package/hive-stop-hook.js +293 -293
- package/hive-throttle.js +118 -118
- package/hive-time.js +71 -71
- package/hive-transport.js +617 -578
- package/hive-update.js +58 -58
- package/hive-version.js +110 -110
- package/hive-webhook.js +55 -54
- package/icr-merge.js +58 -58
- package/icr.js +856 -851
- package/lang-brace.js +305 -305
- package/lang-js.js +695 -651
- package/lang-json.js +211 -211
- package/lang-python.js +588 -588
- package/lang-ruby.js +230 -230
- package/lang-toml.js +136 -136
- package/lang-yaml.js +183 -183
- package/limits.js +413 -413
- package/package.json +11 -3
- package/reconcile.cjs +621 -621
- package/slack-app-manifest-agent.json +61 -61
- package/slack-app-manifest-inbound.json +36 -36
- package/slack-app-manifest.json +27 -27
- package/substrate.js +252 -252
- package/sync.js +434 -60
- package/token.js +201 -201
package/HIVE_RULES.md
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
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 (Ganesh, 19 Sep 2026)
|
|
15
|
-
Before you build any new feature, post in the room, BEFORE your first edit:
|
|
16
|
-
1. WHO uses it, and when — name the person or agent and the moment they reach for it.
|
|
17
|
-
2. WHAT IT COSTS when it is wrong — one sentence someone who did not write it can act on at 3am.
|
|
18
|
-
3. EVERY EDGE CASE you can name — empty, missing, offline, refused, concurrent, already-done,
|
|
19
|
-
called twice, called by the wrong person.
|
|
20
|
-
Then build it.
|
|
21
|
-
This is not process for its own sake. Every defect this project has produced has been a FALSE
|
|
22
|
-
SUCCESS — nothing crashed, every signal was green, the result was wrong. That class is never
|
|
23
|
-
caught by testing the happy path afterwards; it is caught by asking first what "wrong but green"
|
|
24
|
-
would look like for this particular feature. If you cannot say what breaks, you do not understand
|
|
25
|
-
it well enough to write it — say so in the room and ask. That is a complete answer.
|
|
26
|
-
|
|
27
|
-
## Before you touch a file
|
|
28
|
-
1. Read HIVE_CHAT.md — what is everyone doing right now.
|
|
29
|
-
2. Read HIVE_BOARD.md — which files were just rewritten (and what was touched).
|
|
30
|
-
3. If a file you plan to edit appears there, RE-READ it before changing it.
|
|
31
|
-
|
|
32
|
-
## CLAIM before you edit (this is how the hive avoids collisions)
|
|
33
|
-
- Before editing a file, CLAIM it: call the hive_claim tool with the file path
|
|
34
|
-
(and a short intent). This is the most important coordination step.
|
|
35
|
-
• If you GOT it: edit it, then call hive_release when you finish.
|
|
36
|
-
• If you could NOT get it: someone else holds it — do NOT edit it. Pick other
|
|
37
|
-
work; call hive_claims to see what's open.
|
|
38
|
-
- Claims auto-expire, so a stalled agent never blocks the hive — but always
|
|
39
|
-
hive_release the moment you finish, so others can take it.
|
|
40
|
-
|
|
41
|
-
## While you work
|
|
42
|
-
4. ANNOUNCE first: post to chat what you are taking, e.g.
|
|
43
|
-
call hive_say with "taking auth.js: adding login validation"
|
|
44
|
-
5. PREFER SMALL PATCHES — grep to the spot, edit a few lines. Patches from
|
|
45
|
-
different agents merge automatically with no conflict.
|
|
46
|
-
6. AVOID full-file rewrites unless necessary. If you must rewrite, RE-READ the
|
|
47
|
-
file first so you build on the latest code (rewrites are auto-logged for all).
|
|
48
|
-
7. STAY IN YOUR LANE — if someone said "I own X" (e.g. the backend), read X but
|
|
49
|
-
do not edit it; leave that to the owner.
|
|
50
|
-
|
|
51
|
-
## When things collide
|
|
52
|
-
8. If you see <<<<<<< ======= >>>>>>> markers in a file, the system could not
|
|
53
|
-
auto-merge — RESOLVE it: keep the right code, delete the markers. Never ignore
|
|
54
|
-
them or blindly overwrite.
|
|
55
|
-
9. If your edit was merged/reworked, that is normal — re-read and continue.
|
|
56
|
-
|
|
57
|
-
## Talking
|
|
58
|
-
10. Coordinate in chat. ASK before anything destructive (delete, rename, big
|
|
59
|
-
refactor) that touches another participant's area.
|
|
60
|
-
|
|
61
|
-
## Directed work + permission (the asymmetric gate)
|
|
62
|
-
11. AI -> AI is COORDINATION: if another agent hands you work (via hive_assign), it is auto-accepted
|
|
63
|
-
and you may proceed. If there is no Lead PM setting global state, use hive_assign and hive_say
|
|
64
|
-
to assign tasks directly to other agents to divide and conquer. This is how a leaderless hive
|
|
65
|
-
plans and divides work by itself.
|
|
66
|
-
12. A HUMAN directing you is different. If a human who is NOT your owner assigns
|
|
67
|
-
you a task, you do NOT act on it — it stays PENDING until YOUR OWNER approves
|
|
68
|
-
("do it or ignore?"). Your own owner's requests proceed. Act only on tasks
|
|
69
|
-
whose status is 'accepted'.
|
|
70
|
-
13. If you are an MCP agent: loop on hive_wait — it blocks until accepted work
|
|
71
|
-
arrives, then you do it and call hive_complete. No need to poll. A pending
|
|
72
|
-
human request will NOT wake you until your owner approves it.
|
|
73
|
-
|
|
74
|
-
## Mission control (a human can pause/steer you)
|
|
75
|
-
- If you are PAUSED, finish your current step and STOP — do not start new work
|
|
76
|
-
until you are resumed. (MCP agents: hive_wait returns no work while paused.)
|
|
77
|
-
- A human may REASSIGN your focus at any time; treat a fresh directive from your
|
|
78
|
-
owner as the new priority.
|
|
79
|
-
|
|
80
|
-
## When a ping arrives while you are mid-task (interruptions)
|
|
81
|
-
14. hive_wait only checks BETWEEN steps, so a ping never interrupts mid-step.
|
|
82
|
-
Finish your current atomic step first (never abandon half-done work), then
|
|
83
|
-
handle queued coordination. If it's urgent (build broken, blocking others),
|
|
84
|
-
do it now.
|
|
85
|
-
15. ACKNOWLEDGE a ping as soon as you see it so the sender isn't left hanging,
|
|
86
|
-
e.g. say "got it — finishing X (~2 min), then on your fix".
|
|
87
|
-
16. YOU triage: announce do-now vs after-current. Your OWNER can override anytime
|
|
88
|
-
— if your owner says "do it now" or "skip that", that wins.
|
|
89
|
-
|
|
90
|
-
## State-Machine Prompting (SMP)
|
|
91
|
-
17. The Lead PM controls the [GLOBAL PROJECT STATE] via hive_set_state.
|
|
92
|
-
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.
|
|
93
|
-
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.
|
|
94
|
-
|
|
95
|
-
Read → announce → patch → respect lanes → resolve conflicts → talk → triage pings → wait for approval.
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
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 (Ganesh, 19 Sep 2026)
|
|
15
|
+
Before you build any new feature, post in the room, BEFORE your first edit:
|
|
16
|
+
1. WHO uses it, and when — name the person or agent and the moment they reach for it.
|
|
17
|
+
2. WHAT IT COSTS when it is wrong — one sentence someone who did not write it can act on at 3am.
|
|
18
|
+
3. EVERY EDGE CASE you can name — empty, missing, offline, refused, concurrent, already-done,
|
|
19
|
+
called twice, called by the wrong person.
|
|
20
|
+
Then build it.
|
|
21
|
+
This is not process for its own sake. Every defect this project has produced has been a FALSE
|
|
22
|
+
SUCCESS — nothing crashed, every signal was green, the result was wrong. That class is never
|
|
23
|
+
caught by testing the happy path afterwards; it is caught by asking first what "wrong but green"
|
|
24
|
+
would look like for this particular feature. If you cannot say what breaks, you do not understand
|
|
25
|
+
it well enough to write it — say so in the room and ask. That is a complete answer.
|
|
26
|
+
|
|
27
|
+
## Before you touch a file
|
|
28
|
+
1. Read HIVE_CHAT.md — what is everyone doing right now.
|
|
29
|
+
2. Read HIVE_BOARD.md — which files were just rewritten (and what was touched).
|
|
30
|
+
3. If a file you plan to edit appears there, RE-READ it before changing it.
|
|
31
|
+
|
|
32
|
+
## CLAIM before you edit (this is how the hive avoids collisions)
|
|
33
|
+
- Before editing a file, CLAIM it: call the hive_claim tool with the file path
|
|
34
|
+
(and a short intent). This is the most important coordination step.
|
|
35
|
+
• If you GOT it: edit it, then call hive_release when you finish.
|
|
36
|
+
• If you could NOT get it: someone else holds it — do NOT edit it. Pick other
|
|
37
|
+
work; call hive_claims to see what's open.
|
|
38
|
+
- Claims auto-expire, so a stalled agent never blocks the hive — but always
|
|
39
|
+
hive_release the moment you finish, so others can take it.
|
|
40
|
+
|
|
41
|
+
## While you work
|
|
42
|
+
4. ANNOUNCE first: post to chat what you are taking, e.g.
|
|
43
|
+
call hive_say with "taking auth.js: adding login validation"
|
|
44
|
+
5. PREFER SMALL PATCHES — grep to the spot, edit a few lines. Patches from
|
|
45
|
+
different agents merge automatically with no conflict.
|
|
46
|
+
6. AVOID full-file rewrites unless necessary. If you must rewrite, RE-READ the
|
|
47
|
+
file first so you build on the latest code (rewrites are auto-logged for all).
|
|
48
|
+
7. STAY IN YOUR LANE — if someone said "I own X" (e.g. the backend), read X but
|
|
49
|
+
do not edit it; leave that to the owner.
|
|
50
|
+
|
|
51
|
+
## When things collide
|
|
52
|
+
8. If you see <<<<<<< ======= >>>>>>> markers in a file, the system could not
|
|
53
|
+
auto-merge — RESOLVE it: keep the right code, delete the markers. Never ignore
|
|
54
|
+
them or blindly overwrite.
|
|
55
|
+
9. If your edit was merged/reworked, that is normal — re-read and continue.
|
|
56
|
+
|
|
57
|
+
## Talking
|
|
58
|
+
10. Coordinate in chat. ASK before anything destructive (delete, rename, big
|
|
59
|
+
refactor) that touches another participant's area.
|
|
60
|
+
|
|
61
|
+
## Directed work + permission (the asymmetric gate)
|
|
62
|
+
11. AI -> AI is COORDINATION: if another agent hands you work (via hive_assign), it is auto-accepted
|
|
63
|
+
and you may proceed. If there is no Lead PM setting global state, use hive_assign and hive_say
|
|
64
|
+
to assign tasks directly to other agents to divide and conquer. This is how a leaderless hive
|
|
65
|
+
plans and divides work by itself.
|
|
66
|
+
12. A HUMAN directing you is different. If a human who is NOT your owner assigns
|
|
67
|
+
you a task, you do NOT act on it — it stays PENDING until YOUR OWNER approves
|
|
68
|
+
("do it or ignore?"). Your own owner's requests proceed. Act only on tasks
|
|
69
|
+
whose status is 'accepted'.
|
|
70
|
+
13. If you are an MCP agent: loop on hive_wait — it blocks until accepted work
|
|
71
|
+
arrives, then you do it and call hive_complete. No need to poll. A pending
|
|
72
|
+
human request will NOT wake you until your owner approves it.
|
|
73
|
+
|
|
74
|
+
## Mission control (a human can pause/steer you)
|
|
75
|
+
- If you are PAUSED, finish your current step and STOP — do not start new work
|
|
76
|
+
until you are resumed. (MCP agents: hive_wait returns no work while paused.)
|
|
77
|
+
- A human may REASSIGN your focus at any time; treat a fresh directive from your
|
|
78
|
+
owner as the new priority.
|
|
79
|
+
|
|
80
|
+
## When a ping arrives while you are mid-task (interruptions)
|
|
81
|
+
14. hive_wait only checks BETWEEN steps, so a ping never interrupts mid-step.
|
|
82
|
+
Finish your current atomic step first (never abandon half-done work), then
|
|
83
|
+
handle queued coordination. If it's urgent (build broken, blocking others),
|
|
84
|
+
do it now.
|
|
85
|
+
15. ACKNOWLEDGE a ping as soon as you see it so the sender isn't left hanging,
|
|
86
|
+
e.g. say "got it — finishing X (~2 min), then on your fix".
|
|
87
|
+
16. YOU triage: announce do-now vs after-current. Your OWNER can override anytime
|
|
88
|
+
— if your owner says "do it now" or "skip that", that wins.
|
|
89
|
+
|
|
90
|
+
## State-Machine Prompting (SMP)
|
|
91
|
+
17. The Lead PM controls the [GLOBAL PROJECT STATE] via hive_set_state.
|
|
92
|
+
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.
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
Read → announce → patch → respect lanes → resolve conflicts → talk → triage pings → wait for approval.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
Support: support@getgrm.tech
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Hivecode
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hivecode
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|