neohive 6.0.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/LICENSE ADDED
@@ -0,0 +1,75 @@
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
5
+
6
+ Parameters
7
+
8
+ Licensor: Alionix
9
+ Licensed Work: Neohive v3.5.0
10
+ The Licensed Work is (c) 2024-2026 Alionix.
11
+ Additional Use Grant: You may make use of the Licensed Work, provided that
12
+ you may not use the Licensed Work for a Commercial
13
+ Hosted Service. A "Commercial Hosted Service" is a
14
+ service offered to third parties on a hosted or
15
+ managed basis that provides substantially the same
16
+ functionality as the Licensed Work, or any modified
17
+ version thereof, as a commercial offering.
18
+
19
+ For clarity, the following uses are always permitted:
20
+ - Self-hosting for personal or internal business use
21
+ - Using as a development tool in any project
22
+ - Integrating into non-competing products
23
+ - Academic and research use
24
+ - Non-commercial use of any kind
25
+
26
+ Change Date: 2028-03-14
27
+ Change License: Apache License, Version 2.0
28
+
29
+ For information about alternative licensing arrangements for the Licensed Work,
30
+ please contact: contact@alionix.com
31
+
32
+ Notice
33
+
34
+ Business Source License 1.1
35
+
36
+ Terms
37
+
38
+ The Licensor hereby grants you the right to copy, modify, create derivative
39
+ works, redistribute, and make non-production use of the Licensed Work. The
40
+ Licensor may make an Additional Use Grant, above, permitting limited production
41
+ use.
42
+
43
+ Effective on the Change Date, or the fourth anniversary of the first publicly
44
+ available distribution of a specific version of the Licensed Work under this
45
+ License, whichever comes first, the Licensor hereby grants you rights under the
46
+ terms of the Change License, and the rights granted in the paragraph above
47
+ terminate.
48
+
49
+ If your use of the Licensed Work does not comply with the requirements currently
50
+ in effect as described in this License, you must purchase a commercial license
51
+ from the Licensor, its affiliated entities, or authorized resellers, or you must
52
+ refrain from using the Licensed Work.
53
+
54
+ All copies of the original and modified Licensed Work, and derivative works of
55
+ the Licensed Work, are subject to this License. This License applies separately
56
+ for each version of the Licensed Work and the Change Date may vary for each
57
+ version of the Licensed Work released by Licensor.
58
+
59
+ You must conspicuously display this License on each original or modified copy of
60
+ the Licensed Work. If you receive the Licensed Work in original or modified form
61
+ from a third party, the terms and conditions set forth in this License apply to
62
+ your use of that work.
63
+
64
+ Any use of the Licensed Work in violation of this License will automatically
65
+ terminate your rights under this License for the current and all other versions
66
+ of the Licensed Work.
67
+
68
+ This License does not grant you any right in any trademark or logo of Licensor
69
+ or its affiliates (provided that you may use a trademark or logo of Licensor as
70
+ expressly required by this License).
71
+
72
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
73
+ "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
74
+ OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY,
75
+ FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
package/README.md ADDED
@@ -0,0 +1,342 @@
1
+ <p align="center">
2
+ <h1 align="center">Neohive</h1>
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>One command. Your AI agents can talk to each other.</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ The MCP collaboration layer for Claude Code, Gemini CLI, and Codex CLI.
11
+ </p>
12
+
13
+ <br />
14
+
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/neohive"><img src="https://img.shields.io/npm/v/neohive?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="npm version"></a>
17
+ &nbsp;
18
+ <a href="https://www.npmjs.com/package/neohive"><img src="https://img.shields.io/npm/dm/neohive?style=for-the-badge&logo=npm&logoColor=white&color=3fb950" alt="npm downloads"></a>
19
+ &nbsp;
20
+ <a href="https://github.com/fakiho/neohive/stargazers"><img src="https://img.shields.io/github/stars/fakiho/neohive?style=for-the-badge&logo=github&logoColor=white&color=58a6ff" alt="GitHub stars"></a>
21
+ &nbsp;
22
+ <a href="https://github.com/fakiho/neohive/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-BSL%201.1-f59e0b?style=for-the-badge" alt="License"></a>
23
+ &nbsp;
24
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node.js-18+-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js"></a>
25
+ </p>
26
+
27
+ <p align="center">
28
+ <a href="#-quick-start">Quick Start</a> &middot;
29
+ <a href="#-features">Features</a> &middot;
30
+ <a href="#-how-it-works">How It Works</a> &middot;
31
+ <a href="docs/DOCUMENTATION.md">Documentation</a> &middot;
32
+ <a href="#%EF%B8%8F-cli-reference">CLI Reference</a> &middot;
33
+ <a href="https://www.npmjs.com/package/neohive">npm</a>
34
+ </p>
35
+
36
+ <br />
37
+
38
+ ---
39
+
40
+ <br />
41
+
42
+ You open Claude Code in one terminal and Gemini CLI in another. Both are powerful — but they can't see each other. You copy context between windows, manually coordinate who does what.
43
+
44
+ **Neohive removes that bottleneck.** Install once, and your AI agents discover each other, send messages, delegate tasks, review work, and execute multi-step workflows — automatically.
45
+
46
+ > No framework to learn. No API keys to manage. No cloud account required. Just files on disk.
47
+
48
+ <br />
49
+
50
+ ## Contents
51
+
52
+ - [Quick Start](#-quick-start)
53
+ - [Features](#-features)
54
+ - [How It Works](#-how-it-works)
55
+ - [Supported CLIs](#-supported-clis)
56
+ - [Team Templates](#-team-templates)
57
+ - [Dashboard](#-dashboard)
58
+ - [MCP Tools](#-mcp-tools)
59
+ - [CLI Reference](#%EF%B8%8F-cli-reference)
60
+ - [Configuration](#%EF%B8%8F-configuration)
61
+ - [Security](#-security)
62
+ - [Documentation](#-documentation)
63
+ - [Contributing](#-contributing)
64
+ - [License](#-license)
65
+
66
+ <br />
67
+
68
+ ## 🚀 Quick Start
69
+
70
+ ```bash
71
+ npx neohive init
72
+ ```
73
+
74
+ That's it. Neohive auto-detects your CLI, writes the MCP config, and creates a `.neohive/` data directory.
75
+
76
+ Now open two terminals in the same project:
77
+
78
+ ```
79
+ # Terminal 1
80
+ Register as "Alice" and send a greeting to Bob, then call listen()
81
+
82
+ # Terminal 2
83
+ Register as "Bob" and call listen()
84
+ ```
85
+
86
+ Watch them communicate in real time:
87
+
88
+ ```bash
89
+ npx neohive dashboard # opens http://localhost:3000
90
+ ```
91
+
92
+ > **Want a pre-configured team?** Use templates:
93
+ > ```bash
94
+ > npx neohive init --template team # Coordinator + Researcher + Coder
95
+ > ```
96
+
97
+ <br />
98
+
99
+ ## ✨ Features
100
+
101
+ | | Feature | Description |
102
+ |---|---------|-------------|
103
+ | 💬 | **Real-time Messaging** | Send, broadcast, listen, thread, acknowledge — with rate limiting and dedup |
104
+ | 📋 | **Task Management** | Create, assign, and track tasks with a drag-and-drop kanban board |
105
+ | 🔄 | **Workflow Pipelines** | Multi-step automation with dependency graphs and auto-handoff |
106
+ | 🤖 | **Autonomy Engine** | Agents find work, self-verify, retry on failure, and escalate when stuck |
107
+ | 🎯 | **Managed Mode** | Structured turn-taking with floor control for disciplined multi-agent teams |
108
+ | 📊 | **Live Dashboard** | Web UI with messages, tasks, workflows, agent monitoring, and stats |
109
+ | 🧠 | **Knowledge Base** | Shared team memory for decisions, learnings, and patterns |
110
+ | 🔒 | **File Locking** | Concurrent write protection across all 19 data files |
111
+ | 🌿 | **Branching** | Fork conversations at any point with isolated history |
112
+ | 📡 | **Channels** | Sub-team communication with dedicated message streams |
113
+ | 🗳️ | **Voting & Reviews** | Team decisions and structured code review workflows |
114
+ | 🔌 | **Multi-CLI** | Works across Claude Code, Gemini CLI, Codex CLI, and Ollama |
115
+
116
+ <br />
117
+
118
+ ## 🏗 How It Works
119
+
120
+ ```
121
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
122
+ │ Claude Code │ │ Gemini CLI │ │ Codex CLI │
123
+ │ Terminal 1 │ │ Terminal 2 │ │ Terminal 3 │
124
+ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
125
+ │ │ │
126
+ MCP Server MCP Server MCP Server
127
+ (stdio) (stdio) (stdio)
128
+ │ │ │
129
+ └──────────────────┼───────────────────┘
130
+
131
+ ┌────────▼────────┐
132
+ │ .neohive/ │
133
+ │ │
134
+ │ messages.jsonl │
135
+ │ agents.json │
136
+ │ tasks.json │
137
+ │ workflows.json │
138
+ │ ... │
139
+ └────────┬────────┘
140
+
141
+ ┌────────▼────────┐
142
+ │ Dashboard │
143
+ │ localhost:3000 │
144
+ │ (SSE real-time) │
145
+ └─────────────────┘
146
+ ```
147
+
148
+ Each CLI spawns its own MCP server process. All processes share a `.neohive/` directory — append-only message files, JSON state files, per-agent tracking. No central server. No database. **The filesystem is the message bus.**
149
+
150
+ <br />
151
+
152
+ ## 🔌 Supported CLIs
153
+
154
+ | CLI | Config Location | Auto-detected | Init Flag |
155
+ |-----|----------------|:---:|-----------|
156
+ | [Claude Code](https://claude.ai/code) | `.mcp.json` | ✅ | `--claude` |
157
+ | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `.gemini/settings.json` | ✅ | `--gemini` |
158
+ | [Codex CLI](https://github.com/openai/codex) | `.codex/config.toml` | ✅ | `--codex` |
159
+ | [Ollama](https://ollama.com) | `.neohive/ollama-agent.js` | ✅ | `--ollama` |
160
+
161
+ ```bash
162
+ npx neohive init --all # configure all detected CLIs at once
163
+ ```
164
+
165
+ <br />
166
+
167
+ ## 🧩 Team Templates
168
+
169
+ Pre-configured teams with ready-to-paste prompts for each terminal:
170
+
171
+ ```bash
172
+ npx neohive init --template <name>
173
+ ```
174
+
175
+ | Template | Agents | Best For |
176
+ |----------|--------|----------|
177
+ | `team` | Coordinator, Researcher, Coder | Complex features needing research + implementation |
178
+ | `review` | Author, Reviewer | Code review with structured feedback |
179
+ | `pair` | A, B | Brainstorming, Q&A, simple conversations |
180
+ | `debate` | Pro, Con | Evaluating trade-offs and architecture decisions |
181
+ | `managed` | Manager, Designer, Coder, Tester | Large teams with structured turn-taking |
182
+
183
+ <br />
184
+
185
+ ## 📊 Dashboard
186
+
187
+ ```bash
188
+ npx neohive dashboard # http://localhost:3000
189
+ npx neohive dashboard --lan # accessible from your phone
190
+ ```
191
+
192
+ | Tab | What It Shows |
193
+ |-----|---------------|
194
+ | **Messages** | Live feed with markdown, search, bookmarks, pins, reactions |
195
+ | **Tasks** | Drag-and-drop kanban board (pending / in-progress / done / blocked) |
196
+ | **Workspaces** | Per-agent key-value storage browser |
197
+ | **Workflows** | Pipeline visualization with step progress |
198
+ | **Launch** | Spawn agents with templates and copyable prompts |
199
+ | **Stats** | Per-agent scores, response times, hourly activity charts |
200
+ | **Docs** | In-dashboard tool reference and mode guides |
201
+
202
+ Plus: agent status monitoring, profile popups, message injection, conversation export (HTML/JSON/replay), multi-project support, dark/light theme, mobile responsive.
203
+
204
+ <br />
205
+
206
+ ## 🛠 MCP Tools
207
+
208
+ **24 core tools** always available. **30+ optional tools** loaded with `NEOHIVE_FULL_TOOLS=true`.
209
+
210
+ <details>
211
+ <summary><strong>Core Tools (24)</strong> — messaging, tasks, workflows, storage</summary>
212
+
213
+ <br />
214
+
215
+ | Category | Tools |
216
+ |----------|-------|
217
+ | **Identity** | `register` · `list_agents` · `update_profile` · `get_briefing` |
218
+ | **Messaging** | `send_message` · `broadcast` · `listen` · `check_messages` · `ack_message` |
219
+ | **History** | `get_history` · `get_summary` · `search_messages` |
220
+ | **Collaboration** | `handoff` · `share_file` · `lock_file` · `unlock_file` |
221
+ | **Tasks** | `create_task` · `update_task` · `list_tasks` |
222
+ | **Workflows** | `create_workflow` · `advance_workflow` · `workflow_status` |
223
+ | **Storage** | `workspace_write` · `workspace_read` · `workspace_list` |
224
+
225
+ </details>
226
+
227
+ <details>
228
+ <summary><strong>Optional Tools (30+)</strong> — autonomy, voting, reviews, branching</summary>
229
+
230
+ <br />
231
+
232
+ | Category | Tools |
233
+ |----------|-------|
234
+ | **Autonomy** | `get_work` · `verify_and_advance` · `start_plan` · `retry_with_improvement` · `distribute_prompt` |
235
+ | **Managed Mode** | `claim_manager` · `yield_floor` · `set_phase` · `set_conversation_mode` |
236
+ | **Knowledge** | `kb_write` · `kb_read` · `kb_list` |
237
+ | **Decisions** | `log_decision` · `get_decisions` |
238
+ | **Voting** | `call_vote` · `cast_vote` · `vote_status` |
239
+ | **Reviews** | `request_review` · `submit_review` |
240
+ | **Progress** | `update_progress` · `get_progress` |
241
+ | **Dependencies** | `declare_dependency` · `check_dependencies` |
242
+ | **Reputation** | `get_reputation` · `suggest_task` |
243
+ | **Branching** | `fork_conversation` · `switch_branch` · `list_branches` |
244
+ | **Channels** | `join_channel` · `leave_channel` · `list_channels` |
245
+ | **Rules** | `add_rule` · `remove_rule` · `list_rules` · `toggle_rule` |
246
+
247
+ </details>
248
+
249
+ <br />
250
+
251
+ ## ⌨️ CLI Reference
252
+
253
+ ```bash
254
+ neohive init [--claude|--gemini|--codex|--all|--ollama] [--template <name>]
255
+ neohive dashboard [--lan]
256
+ neohive status # active agents, tasks, workflows
257
+ neohive msg <agent> <text> # send message from CLI
258
+ neohive doctor # diagnostic health check
259
+ neohive templates # list available templates
260
+ neohive reset --force # clear data (auto-archives first)
261
+ neohive uninstall # remove from all CLI configs
262
+ ```
263
+
264
+ <br />
265
+
266
+ ## ⚙️ Configuration
267
+
268
+ | Variable | Default | Description |
269
+ |----------|---------|-------------|
270
+ | `NEOHIVE_DATA_DIR` | `.neohive/` | Data directory path |
271
+ | `NEOHIVE_PORT` | `3000` | Dashboard port |
272
+ | `NEOHIVE_LAN` | `false` | Enable LAN access |
273
+ | `NEOHIVE_LOG_LEVEL` | `warn` | Logging: `error` · `warn` · `info` · `debug` |
274
+ | `NEOHIVE_FULL_TOOLS` | `false` | Load all 54 tools (core + optional) |
275
+
276
+ <br />
277
+
278
+ ## 🔐 Security
279
+
280
+ Neohive is a **local message broker**. It passes text between CLI terminals via shared files. It does not access the internet, store API keys, or run cloud services.
281
+
282
+ **Built-in protections:**
283
+
284
+ - ✅ CSRF custom header validation
285
+ - ✅ Content Security Policy (CSP)
286
+ - ✅ File-locked concurrent writes (all 19 data files)
287
+ - ✅ Path traversal protection with symlink validation
288
+ - ✅ Content sanitization on message injection
289
+ - ✅ SSE connection limits and rate limiting
290
+ - ✅ Message size limits (1MB)
291
+ - ✅ LAN mode with token-based authentication
292
+ - ✅ Structured error logging
293
+
294
+ Full details: [SECURITY.md](SECURITY.md)
295
+
296
+ <br />
297
+
298
+ ## 📚 Documentation
299
+
300
+ | Resource | Link |
301
+ |----------|------|
302
+ | Full API Reference | [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md) |
303
+ | Architecture & Data Flow | [docs/DOCUMENTATION.md#architecture](docs/DOCUMENTATION.md#architecture) |
304
+ | Tool Reference | [docs/DOCUMENTATION.md#tools-reference](docs/DOCUMENTATION.md#tools-reference) |
305
+ | Vision & Roadmap | [VISION.md](VISION.md) |
306
+ | Security Policy | [SECURITY.md](SECURITY.md) |
307
+ | Contributing Guide | [CONTRIBUTING.md](CONTRIBUTING.md) |
308
+ | Changelog | [CHANGELOG.md](CHANGELOG.md) |
309
+
310
+ <br />
311
+
312
+ ## 🤝 Contributing
313
+
314
+ We welcome contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
315
+
316
+ ```bash
317
+ git clone https://github.com/fakiho/neohive.git
318
+ cd neohive/agent-bridge
319
+ node server.js # run the MCP server
320
+ node dashboard.js # run the dashboard
321
+ ```
322
+
323
+ <br />
324
+
325
+ ## 📄 License
326
+
327
+ [Business Source License 1.1](LICENSE) — free to use, self-host, and modify. Converts to Apache 2.0 on March 14, 2028.
328
+
329
+ <br />
330
+
331
+ ---
332
+
333
+ <p align="center">
334
+ Built by <a href="https://alionix.com"><strong>Alionix</strong></a>
335
+ </p>
336
+
337
+ <p align="center">
338
+ <a href="https://github.com/fakiho/neohive">GitHub</a> &middot;
339
+ <a href="https://www.npmjs.com/package/neohive">npm</a> &middot;
340
+ <a href="docs/DOCUMENTATION.md">Docs</a> &middot;
341
+ <a href="mailto:contact@alionix.com">Contact</a>
342
+ </p>
package/SECURITY.md ADDED
@@ -0,0 +1,58 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 3.x.x | Yes |
8
+ | 2.x.x | No |
9
+ | < 2.0 | No |
10
+
11
+ ## Reporting a Vulnerability
12
+
13
+ If you discover a security vulnerability in Neohive, please report it responsibly.
14
+
15
+ **Do NOT open a public GitHub issue for security vulnerabilities.**
16
+
17
+ Instead, please email **contact@alionix.com** or use [GitHub's private vulnerability reporting](https://github.com/fakiho/neohive/security/advisories/new).
18
+
19
+ ### What to include
20
+
21
+ - Description of the vulnerability
22
+ - Steps to reproduce
23
+ - Potential impact
24
+ - Suggested fix (if any)
25
+
26
+ ### Response timeline
27
+
28
+ - **Acknowledgment**: Within 48 hours
29
+ - **Initial assessment**: Within 1 week
30
+ - **Fix release**: As soon as possible, typically within 2 weeks
31
+
32
+ ## Security Model
33
+
34
+ Neohive is a **local message broker** — it passes text messages between CLI terminals via shared files on your local machine.
35
+
36
+ ### What it does NOT do
37
+
38
+ - Does not give agents filesystem access (they already have it via their CLI)
39
+ - Does not expose anything to the internet (dashboard binds to `127.0.0.1` only)
40
+ - Does not store or transmit API keys
41
+ - Does not run any cloud services
42
+ - Does not execute remote code
43
+
44
+ ### Built-in protections
45
+
46
+ - **CORS restriction** — dashboard only accepts requests from localhost
47
+ - **XSS prevention** — all user inputs are escaped before rendering
48
+ - **Path traversal protection** — agents cannot read files outside the project directory
49
+ - **Symlink protection** — follows symlinks and validates the real path
50
+ - **Origin enforcement** — POST/DELETE requests require valid localhost origin
51
+ - **SSE connection limits** — prevents connection exhaustion
52
+ - **Input validation** — agent names, branch names, and file paths are validated
53
+ - **Message size limits** — 1MB max per message
54
+ - **Plugin sandboxing** — plugins run with a 30-second timeout
55
+
56
+ ### LAN mode
57
+
58
+ When using `--lan` mode, the dashboard is exposed to your local network only. It is never accessible from the internet.