hivemind-agents 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +106 -2
- package/dist/hivemind.mjs +319 -0
- package/package.json +53 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leonhest
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,3 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# hivemind
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**A shared, live plan for teams of coding agents.**
|
|
4
|
+
|
|
5
|
+
You split the work, everyone's agents go off and build, and an hour later the plan in each agent's
|
|
6
|
+
head is stale: someone changed the `User` schema, someone else switched auth libraries, two agents are
|
|
7
|
+
building the same endpoint. hivemind keeps one plan in sync across every agent on the team and puts
|
|
8
|
+
teammates' changes into each agent's context at its next tool call.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npx hivemind-agents install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Run it once per machine. No server, no account, no room codes: **the team is the git repo.**
|
|
15
|
+
|
|
16
|
+
## What your agent sees
|
|
17
|
+
|
|
18
|
+
Teammate's agent changes an API while yours is mid-task. A few seconds later, after its next command, your agent sees:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
[hivemind] Teammates updated the shared plan since you last checked:
|
|
22
|
+
⚠️ BREAKING alice-3f2a1c updated contract: `User.id`: uuid (breaking) (was: int)
|
|
23
|
+
🎯 (overlaps files you touched) bob-91d0e4 added task: [doing] Signup form @bob-91d0e4
|
|
24
|
+
- alice-3f2a1c added decision: JWT in an httpOnly cookie, not localStorage [inferred]
|
|
25
|
+
Check whether your current work depends on the breaking changes above and adapt it.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
At session start it gets the whole plan: goals, contracts (API shapes, schemas, shared types),
|
|
29
|
+
decisions, who's doing what, and open questions.
|
|
30
|
+
|
|
31
|
+
## How it works
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
your agent ── hooks ──► hivemind ──► .git/hivemind/state.json (local cache, read in ~30 ms)
|
|
35
|
+
│
|
|
36
|
+
background daemon: push your ref, fetch everyone's (every 3 s while active)
|
|
37
|
+
│
|
|
38
|
+
origin: refs/hivemind/<member> (hidden refs, never branches)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- **Sync through git.** Each person's plan entries live on their own hidden ref
|
|
42
|
+
(`refs/hivemind/<member>`) on your existing remote. Nobody ever writes to someone else's ref, so
|
|
43
|
+
there are no merge conflicts. Branches, PRs and your working tree are never touched.
|
|
44
|
+
- **Updates arrive by themselves.** Hooks add the full plan at session start, then only what
|
|
45
|
+
changed since the agent last looked, with the most important items first.
|
|
46
|
+
- **The plan updates itself.** When an agent finishes a turn, a background extractor reads only the
|
|
47
|
+
new part of its transcript and pulls out the things teammates need: contracts, decisions and task
|
|
48
|
+
progress, each with a quote as evidence. Agents can also publish explicitly through MCP tools
|
|
49
|
+
(`contract_publish`, `decision_log`, `task_claim`, …), and they're told to for anything urgent.
|
|
50
|
+
- **Updates arrive in seconds.** Typically 2–5 s from one agent's change to the other machine,
|
|
51
|
+
then shown at that agent's next tool call.
|
|
52
|
+
|
|
53
|
+
## Supported agents
|
|
54
|
+
|
|
55
|
+
| Agent | Plan at start | Updates mid-task | Auto-extraction | Notes |
|
|
56
|
+
|---|---|---|---|---|
|
|
57
|
+
| Claude Code | ✅ | ✅ every prompt and tool call | ✅ | |
|
|
58
|
+
| Codex CLI | ✅ | ✅ every prompt and tool call | ✅ | Approve the hooks once with `/hooks` in Codex (Codex requires this for any new hook) |
|
|
59
|
+
| Cursor | ✅ | ✅ after each tool call | ✅ | Built from Cursor's hook docs; not yet tested in a live Cursor session |
|
|
60
|
+
|
|
61
|
+
`install` detects which of these you have and configures each one (`--only=claude,codex` to choose).
|
|
62
|
+
|
|
63
|
+
### Claude Code plugin (alternative)
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
/plugin marketplace add Leonhest/hivemind
|
|
67
|
+
/plugin install hivemind@hivemind
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Same hooks and MCP tools, no npm needed. Use either the plugin or `npx … install`, not both.
|
|
71
|
+
|
|
72
|
+
## Commands
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
hivemind status who's in the plan, last sync
|
|
76
|
+
hivemind plan print the shared plan
|
|
77
|
+
hivemind open live dashboard in your browser (and a form to add to the plan)
|
|
78
|
+
hivemind add <goal|task|contract|decision|question> <key> <text> [--breaking]
|
|
79
|
+
hivemind doctor check that everything is wired up
|
|
80
|
+
hivemind uninstall remove hooks and MCP config (your repos' plan data is left alone)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Privacy and cost
|
|
84
|
+
|
|
85
|
+
- **Your plan data never leaves your git host.** There's no hivemind server. Anyone with read
|
|
86
|
+
access to the repo can read its plan refs, the same people who can read the code.
|
|
87
|
+
- **Extraction runs on your machine with your own agent login.** It calls `claude -p` with Haiku
|
|
88
|
+
(or `codex exec` if you only have Codex) using your existing subscription or API key: about
|
|
89
|
+
$0.005 per extraction on API pricing, or a small slice of your subscription usage. Set
|
|
90
|
+
`HIVEMIND_EXTRACTOR_BACKEND=none` to turn it off and rely on the MCP tools only.
|
|
91
|
+
- Only new parts of transcripts with real work in them (a request or a code change) get
|
|
92
|
+
extracted. Read-only exploration is skipped.
|
|
93
|
+
|
|
94
|
+
## Requirements and limits
|
|
95
|
+
|
|
96
|
+
- macOS or Linux, Node 20+, git, and a repo with an `origin` remote you can push to (without push
|
|
97
|
+
access you still receive updates, but can't share yours).
|
|
98
|
+
- Tested with GitHub. Other hosts that accept custom refs should work; GitLab hasn't been tested yet.
|
|
99
|
+
- Not inside a git repo, or no `origin`? hivemind stays out of the way.
|
|
100
|
+
|
|
101
|
+
## Troubleshooting
|
|
102
|
+
|
|
103
|
+
Run `hivemind doctor`. Logs are in `.git/hivemind/` in each repo (`hivemind.log`, `daemon.log`, `extract.log`).
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT
|