@tt-a1i/hive 0.6.0-alpha.5 → 0.6.0-alpha.8

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/LICENSE +7 -1
  3. package/LICENSE.BSL +101 -0
  4. package/README.en.md +275 -0
  5. package/README.md +104 -152
  6. package/dist/src/server/agent-launch-cache.js +2 -2
  7. package/dist/src/server/agent-launch-cache.js.map +1 -1
  8. package/dist/src/server/agent-launch-resolver.d.ts +4 -0
  9. package/dist/src/server/agent-launch-resolver.js +33 -0
  10. package/dist/src/server/agent-launch-resolver.js.map +1 -0
  11. package/dist/src/server/hive-team-guidance.js +1 -0
  12. package/dist/src/server/hive-team-guidance.js.map +1 -1
  13. package/dist/src/server/orchestrator-autostart.js +12 -2
  14. package/dist/src/server/orchestrator-autostart.js.map +1 -1
  15. package/dist/src/server/orchestrator-launch.js +2 -27
  16. package/dist/src/server/orchestrator-launch.js.map +1 -1
  17. package/dist/src/server/recovery-summary.js +1 -1
  18. package/dist/src/server/recovery-summary.js.map +1 -1
  19. package/dist/src/server/route-types.d.ts +2 -0
  20. package/dist/src/server/routes-workspaces.js +26 -18
  21. package/dist/src/server/routes-workspaces.js.map +1 -1
  22. package/dist/src/server/team-list-enrichment.d.ts +22 -0
  23. package/dist/src/server/team-list-enrichment.js +41 -0
  24. package/dist/src/server/team-list-enrichment.js.map +1 -0
  25. package/dist/src/server/team-list-serializer.d.ts +1 -1
  26. package/dist/src/server/team-list-serializer.js +2 -1
  27. package/dist/src/server/team-list-serializer.js.map +1 -1
  28. package/dist/src/shared/types.d.ts +9 -0
  29. package/package.json +5 -4
  30. package/web/dist/assets/index-B8F00qo4.css +1 -0
  31. package/web/dist/assets/index-DFE1Ia4e.js +80 -0
  32. package/web/dist/cli-icons/claude.png +0 -0
  33. package/web/dist/cli-icons/codex.png +0 -0
  34. package/web/dist/cli-icons/gemini.png +0 -0
  35. package/web/dist/cli-icons/opencode.svg +18 -0
  36. package/web/dist/index.html +2 -2
  37. package/README.zh-CN.md +0 -215
  38. package/web/dist/assets/index-CMHbdGhT.css +0 -1
  39. package/web/dist/assets/index-CkY03NZW.js +0 -76
package/CHANGELOG.md CHANGED
@@ -2,6 +2,60 @@
2
2
 
3
3
  All notable user-facing changes will be documented in this file.
4
4
 
5
+ ## 0.6.0-alpha.8 - 2026-05-16
6
+
7
+ License switch — no code changes from alpha.7.
8
+
9
+ - Starting from this version, Hive is licensed under the **Business Source
10
+ License 1.1** (BSL), not Apache-2.0. BSL allows personal use, internal
11
+ organizational deployment, embedding in non-competitive products, and
12
+ non-commercial forks. It only prohibits offering Hive as a hosted or
13
+ embedded multi-agent orchestration service to third parties on a paid
14
+ basis. On **2030-05-16** the license automatically converts to Apache-2.0.
15
+ - All versions at or before `0.6.0-alpha.7` remain permanently licensed
16
+ under Apache-2.0 — that grant is irrevocable and is not affected by this
17
+ switch.
18
+ - See [`LICENSE.BSL`](./LICENSE.BSL) for the full BSL text including the
19
+ Additional Use Grant, and [`LICENSE`](./LICENSE) for the historical
20
+ Apache-2.0 grant.
21
+
22
+ ## 0.6.0-alpha.7 - 2026-05-16
23
+
24
+ Worker identity, language, and workflow polish.
25
+
26
+ - Worker cards and the worker detail modal now display the CLI agent's
27
+ brand logo (Claude Code, Codex, Gemini, OpenCode) instead of the
28
+ role-letter placeholder. Unknown presets or workers launched via a
29
+ custom command fall back to the legacy role-letter avatar so existing
30
+ rows never render blank. The `team list` payload gained a
31
+ `command_preset_id` field (snake_case wire, camelCase in-process); the
32
+ enrichment honours `presetAugmentationDisabled` so the launcher and
33
+ the UI stay in lockstep.
34
+ - Workers can now boot from a custom `startup_command` (e.g. native
35
+ `claude --resume <session-id>`) entered from the add-member or
36
+ add-Workspace dialogs. Routes-workspaces detects shell-driven
37
+ invocations and stores them without binding to a preset.
38
+ - UI language adapts across the entire surface: task drawer (including
39
+ the raw Markdown editor that previously mixed Chinese conflict copy
40
+ with English buttons), notification settings popover, OS-level
41
+ desktop notifications, the workspace add / confirm / server-browse
42
+ dialogs, the FS picker, the demo view, the toast container, and the
43
+ terminal screen-reader status. Adds a `~146`-key expansion of the
44
+ i18n table covering `tasks.*`, `notifications.*`, `workspace.*`,
45
+ `layout.*`, `terminal.*`, `terminalPanels.*`, `toast.*`, and a couple
46
+ of `demo.*` / `common.*` additions; `{plural}` placeholders are gone
47
+ so the wire shape can't leak literal `{plural}` tokens at runtime.
48
+ - Worker cards lost the bottom raw-PTY line preview (a noisy CLI
49
+ status row that varied per agent and confused users). The
50
+ `last_pty_line` field stays on the wire so a future "current task
51
+ summary" surface can reuse it.
52
+ - Translation copy itself was reviewed: `Queen` is gone from UI chrome
53
+ (the metaphor only appears in onboarding prose), Workspace /
54
+ Orchestrator / Agent are normalised as proper nouns in Chinese
55
+ copy, role names tightened (`Coder → 开发`, `Tester → 测试`),
56
+ ellipsis switched from ASCII `...` to typographic `…`, `task(s)`
57
+ notation retired.
58
+
5
59
  ## 0.6.0-alpha.5 - 2026-05-15
6
60
 
7
61
  Public-preview surface polish + internal hygiene pass.
package/LICENSE CHANGED
@@ -1,3 +1,10 @@
1
+ This Apache License 2.0 applies only to versions of Hive at or before
2
+ 0.6.0-alpha.7. Starting from 0.6.0-alpha.8, Hive is licensed under the
3
+ Business Source License 1.1 (see LICENSE.BSL). The BSL automatically
4
+ converts to Apache-2.0 on 2030-05-16.
5
+
6
+ ---
7
+
1
8
  Apache License
2
9
  Version 2.0, January 2004
3
10
  https://www.apache.org/licenses/
@@ -199,4 +206,3 @@
199
206
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
207
  See the License for the specific language governing permissions and
201
208
  limitations under the License.
202
-
package/LICENSE.BSL ADDED
@@ -0,0 +1,101 @@
1
+ Business Source License 1.1
2
+
3
+ Licensor: Shaokun Tu (tt-a1i)
4
+ Licensed Work: Hive 0.6.0-alpha.8 and later
5
+ Change Date: 2030-05-16
6
+ Change License: Apache License, Version 2.0
7
+
8
+ Additional Use Grant:
9
+
10
+ You may make production use of the Licensed Work, provided Your use does not
11
+ include offering the Licensed Work to third parties on a hosted or embedded
12
+ basis in order to compete with Licensor's multi-CLI-agent orchestration
13
+ product.
14
+
15
+ For purposes of this license, a "competitive offering" is a Product that:
16
+ (a) is offered to third parties on a paid basis, including paid support
17
+ arrangements or any form of revenue-generating arrangement; and
18
+ (b) provides browser-accessible multi-CLI-agent collaboration
19
+ (orchestrator + worker agents running as PTY sessions communicating
20
+ via a team protocol), substantially overlapping with the core
21
+ capabilities of the Licensed Work.
22
+
23
+ Internal production use by Your organization, embedding the Licensed Work
24
+ into a non-competitive product, and non-commercial forks are not
25
+ "competitive offerings".
26
+
27
+ License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
28
+ "Business Source License" is a trademark of MariaDB plc.
29
+
30
+ Terms
31
+
32
+ The Licensor hereby grants you the right to copy, modify, create derivative
33
+ works, redistribute, and make non-production use of the Licensed Work. The
34
+ Licensor may make an Additional Use Grant, above, permitting limited
35
+ production use.
36
+
37
+ Effective on the Change Date, or the fourth anniversary of the first publicly
38
+ available distribution of a specific version of the Licensed Work under this
39
+ License, whichever comes first, the Licensor hereby grants you rights under
40
+ the terms of the Change License, and the rights granted in the paragraph
41
+ above terminate.
42
+
43
+ If your use of the Licensed Work does not comply with the requirements
44
+ currently in effect as described in this License, you must purchase a
45
+ commercial license from the Licensor, its affiliated entities, or authorized
46
+ resellers, or you must refrain from using the Licensed Work.
47
+
48
+ All copies of the original and modified Licensed Work, and derivative works
49
+ of the Licensed Work, are subject to this License. This License applies
50
+ separately for each version of the Licensed Work and the Change Date may
51
+ vary for each version of the Licensed Work released by Licensor.
52
+
53
+ You must conspicuously display this License on each original or modified copy
54
+ of the Licensed Work. If you receive the Licensed Work in original or
55
+ modified form from a third party, the terms and conditions set forth in this
56
+ License apply to your use of that work.
57
+
58
+ Any use of the Licensed Work in violation of this License will automatically
59
+ terminate your rights under this License for the current and all other
60
+ versions of the Licensed Work.
61
+
62
+ This License does not grant you any right in any trademark or logo of
63
+ Licensor or its affiliates (provided that you may use a trademark or logo of
64
+ Licensor as expressly required by this License).
65
+
66
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
67
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
68
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
69
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
70
+ TITLE.
71
+
72
+ MariaDB hereby grants you permission to use this License's text to license
73
+ your works, and to refer to it using the trademark "Business Source License",
74
+ as long as you comply with the Covenants of Licensor below.
75
+
76
+ Covenants of Licensor
77
+
78
+ In consideration of the right to use this License's text and the "Business
79
+ Source License" name and trademark, Licensor covenants to MariaDB, and to
80
+ all other recipients of the licensed work to be provided by Licensor:
81
+
82
+ To specify as the Change License the GPL Version 2.0 or any later version,
83
+ or a license that is compatible with GPL Version 2.0 or a later version,
84
+ where "compatible" means that software provided under the Change License can
85
+ be included in a program with software provided under GPL Version 2.0 or a
86
+ later version. Licensor may specify additional Change Licenses without
87
+ limitation.
88
+
89
+ To either: (a) specify an additional grant of rights to use that does not
90
+ impose any additional restriction on the right granted in this License, as
91
+ the Additional Use Grant; or (b) insert the text "None".
92
+
93
+ To specify a Change Date.
94
+
95
+ Not to modify this License in any other way.
96
+
97
+ Notice
98
+
99
+ The Business Source License (this document, or the "License") is not an Open
100
+ Source license. However, the Licensed Work will eventually be made available
101
+ under an Open Source License, as stated in this License.
package/README.en.md ADDED
@@ -0,0 +1,275 @@
1
+ # Hive
2
+
3
+ <p align="center">
4
+ <img src="./assets/hive-hero.png" alt="Hive local-first multi-agent coding workspace hero image" />
5
+ </p>
6
+
7
+ **Hive is a browser-native hive-mind for CLI coding agents.** The orchestrator
8
+ is a real `claude` / `codex` / `opencode` / `gemini` process — not you, and
9
+ not a script — and so are the workers it dispatches to. Every agent runs as
10
+ a real PTY on your machine, talks through a small `team` protocol that Hive
11
+ injects into each agent's shell, and shares a markdown task graph at
12
+ `<workspace>/.hive/tasks.md`.
13
+
14
+ [![npm](https://img.shields.io/npm/v/@tt-a1i/hive.svg)](https://www.npmjs.com/package/@tt-a1i/hive)
15
+ [![ci](https://img.shields.io/github/actions/workflow/status/tt-a1i/hive/release.yml?branch=main&label=ci)](https://github.com/tt-a1i/hive/actions/workflows/release.yml)
16
+ [![Website](https://img.shields.io/badge/website-hive--site.pages.dev-5a8a8a.svg)](https://hive-site.pages.dev)
17
+ [![Node](https://img.shields.io/badge/node-%3E%3D22-3c873a.svg)](https://nodejs.org/)
18
+ [![License](https://img.shields.io/badge/license-BUSL--1.1-orange.svg)](./LICENSE.BSL)
19
+ [![Platforms](https://img.shields.io/badge/platforms-macOS%20%C2%B7%20Linux%20%C2%B7%20Windows%20(best--effort)-lightgrey.svg)](#platform-support)
20
+
21
+ 🌐 **Website**: [hive-site.pages.dev/en/](https://hive-site.pages.dev/en/) · [中文](https://hive-site.pages.dev/)
22
+
23
+ English · [简体中文](./README.md)
24
+
25
+ > Public preview. Hive is local-first, runs on `127.0.0.1`, and is intended
26
+ > for developers who already use CLI coding agents. The latest published
27
+ > version is on [npm](https://www.npmjs.com/package/@tt-a1i/hive) and the
28
+ > badge above resolves to it.
29
+
30
+ ## Why Hive
31
+
32
+ CLI coding agents are powerful, but coordinating several of them manually is
33
+ awkward:
34
+
35
+ - Long-running sessions are spread across terminals.
36
+ - It is hard to split a task into implementation, review, and testing without a
37
+ routing layer.
38
+ - Worker progress disappears into scrollback.
39
+ - Restart recovery depends on each CLI's native session behavior.
40
+
41
+ Hive adds that coordination layer without replacing the CLIs. The agents remain
42
+ real terminal processes running on your machine; Hive manages the team shell
43
+ around them.
44
+
45
+ ## Try the demo first
46
+
47
+ Don't have an agent CLI installed yet? Run `hive`, open the printed URL, and
48
+ click **Try Demo** in the first-run wizard. You get a fully client-side
49
+ preview — fake orchestrator + two workers, prerecorded scrollback, a
50
+ prefilled task list — without touching the server or any real CLI agent.
51
+ Useful for deciding whether to install a real CLI.
52
+
53
+ ## Quick Start
54
+
55
+ Prerequisites:
56
+
57
+ - Node.js 22 or newer.
58
+ - At least one supported agent CLI installed, authenticated, and available on
59
+ `PATH`.
60
+
61
+ Install and start Hive:
62
+
63
+ ```bash
64
+ npm install -g @tt-a1i/hive
65
+ hive
66
+ ```
67
+
68
+ Open the printed local URL, usually `http://127.0.0.1:3000/`. Use
69
+ `hive --port 4010` when you need a specific local port.
70
+
71
+ First-run flow:
72
+
73
+ 1. Create a workspace from a project folder.
74
+ 2. Choose an Orchestrator preset.
75
+ 3. Hive creates `<workspace>/.hive/tasks.md`, starts the Orchestrator PTY, and
76
+ injects the internal `team` command into the agent session.
77
+ 4. Add workers from the Team Members panel.
78
+ 5. Ask the Orchestrator to delegate work. It sends tasks with
79
+ `team send <worker-name> "<task>"`; workers report back with `team report`.
80
+
81
+ ## How It Works
82
+
83
+ ```text
84
+ Browser UI on 127.0.0.1
85
+ tasks, team, terminals, reports
86
+ |
87
+ | HTTP + WebSocket
88
+ v
89
+ Hive runtime
90
+ SQLite metadata, PTY lifecycle, task dispatch
91
+ |
92
+ +-- Orchestrator PTY
93
+ | can call: team send, team list, team report
94
+ |
95
+ +-- Worker PTY
96
+ | can call: team report
97
+ |
98
+ +-- Worker PTY
99
+ can call: team report
100
+
101
+ Workspace task graph:
102
+ <workspace>/.hive/tasks.md
103
+ ```
104
+
105
+ Three details matter:
106
+
107
+ - Agents are real CLI processes, not simulated subagents.
108
+ - `team` is injected only inside Hive-managed agent sessions by prepending the
109
+ package's internal bin directory to `PATH`; it is not installed as a global
110
+ command.
111
+ - The task graph is a markdown file in the workspace, so you can inspect or
112
+ edit it outside the app.
113
+
114
+ ## Agent Presets
115
+
116
+ | Preset | Command expected on `PATH` | Default bypass mode | Session resume |
117
+ | --- | --- | --- | --- |
118
+ | Claude Code | `claude` | `--dangerously-skip-permissions`, `--permission-mode=bypassPermissions` | `--resume <session_id>` |
119
+ | Codex | `codex` | `--dangerously-bypass-approvals-and-sandbox` | `resume <session_id>` |
120
+ | OpenCode | `opencode` | Config-driven in `~/.config/opencode/opencode.json` | `--session <session_id>` |
121
+ | Gemini | `gemini` | `--yolo` | `--resume <session_id>` |
122
+ | Custom | Any executable | User configured | User configured |
123
+
124
+ Hive does not install these CLIs for you. Install and authenticate them in the
125
+ same shell environment you use to start Hive.
126
+
127
+ ## What Hive Provides
128
+
129
+ - Workspace sidebar for switching between local projects.
130
+ - Orchestrator and worker terminals backed by real PTYs.
131
+ - Add Worker flow with role presets for coder, reviewer, tester, and custom
132
+ members.
133
+ - `.hive/tasks.md` editor with external-file conflict handling.
134
+ - Background PTY preservation and best-effort native session resume.
135
+ - Local SQLite metadata under `~/.config/hive` by default, or `$HIVE_DATA_DIR`
136
+ when set.
137
+
138
+ Hive does not provide sandboxing, multi-user auth, cloud hosting, or its own
139
+ coding model. It coordinates tools you already run locally.
140
+
141
+ ## Platform Support
142
+
143
+ | Platform | Status | Notes |
144
+ | --- | --- | --- |
145
+ | macOS | Tier 1 | Main development and release verification target. |
146
+ | Linux | Tier 1 | CI verified. Native folder picking expects `zenity`; manual path entry works without it. |
147
+ | Windows | Tier 2 | CI runs a Windows test subset and a packaged-install smoke. Folder picking uses Windows PowerShell and the package includes `team.cmd`. Treat as best-effort — full Windows verification before each release is manual. |
148
+
149
+ All platforms require Node.js 22+. Hive depends on native packages
150
+ (`node-pty` and `better-sqlite3`), so native install tooling may be required
151
+ when prebuilt binaries are unavailable.
152
+
153
+ ## Safety Model
154
+
155
+ Hive is a local development tool, not a hosted service.
156
+
157
+ - The runtime binds to `127.0.0.1`. Do not expose the Hive port through a public
158
+ tunnel, reverse proxy, or shared network interface.
159
+ - Built-in presets intentionally use each CLI's non-interactive or bypass mode
160
+ where available. Treat workers as able to run arbitrary shell commands inside
161
+ the selected workspace.
162
+ - Open only trusted workspaces. A worker has the same filesystem access as the
163
+ shell account running Hive.
164
+ - Agent tokens are session scoped, generated by the local runtime, injected into
165
+ agent process environments, and not intended as internet-facing credentials.
166
+ - Hive has no multi-user authentication boundary. Treat same-machine processes
167
+ that can reach the local port as trusted local access.
168
+ - The browser UI token is a local session guard, not protection against other
169
+ processes already running as your OS user.
170
+
171
+ Read [SECURITY.md](SECURITY.md) before using Hive with sensitive repositories.
172
+
173
+ ## Data Locations
174
+
175
+ | Data | Location |
176
+ | --- | --- |
177
+ | Runtime metadata | `~/.config/hive` or `$HIVE_DATA_DIR` |
178
+ | Workspace tasks | `<workspace>/.hive/tasks.md` |
179
+ | Internal `team` command | Packaged under `dist/bin/`, injected into PTYs |
180
+ | Web UI assets | Served by the runtime from the packaged `web/dist` build |
181
+
182
+ ## Troubleshooting
183
+
184
+ **Agent CLI not found**
185
+
186
+ Check that the selected command is installed, authenticated, executable from the
187
+ same shell, and available on `PATH`.
188
+
189
+ **Port already in use**
190
+
191
+ Start Hive with another local port:
192
+
193
+ ```bash
194
+ hive --port 4020
195
+ ```
196
+
197
+ **Native package install fails**
198
+
199
+ Hive depends on `node-pty` and `better-sqlite3`, which use native binaries. Use
200
+ Node.js 22+, keep your package manager cache clean, and verify your platform
201
+ build tools are available.
202
+
203
+ **Folder picker does not open on Linux**
204
+
205
+ Install `zenity`, or paste the workspace path manually.
206
+
207
+ **Folder picker does not open on Windows**
208
+
209
+ Verify Windows PowerShell is available as `powershell.exe`, or paste the
210
+ workspace path manually.
211
+
212
+ **Tasks file conflict banner appears**
213
+
214
+ Hive detected a newer `.hive/tasks.md` on disk. Use `Reload` to accept the file
215
+ from disk, or `Keep Local` to keep the editor contents and save again.
216
+
217
+ **Worker appears stuck in `working`**
218
+
219
+ Hive does not guess task completion from process activity. Workers move back to
220
+ `idle` when they call `team report`. If a worker is blocked, stop or restart it
221
+ from the UI.
222
+
223
+ ## Development
224
+
225
+ ```bash
226
+ pnpm install
227
+ pnpm dev
228
+ ```
229
+
230
+ Development mode runs the runtime on `127.0.0.1:4010`; Vite runs on
231
+ `127.0.0.1:5180` and proxies API and WebSocket traffic to the runtime.
232
+
233
+ Useful checks:
234
+
235
+ ```bash
236
+ pnpm check
237
+ pnpm build
238
+ pnpm test
239
+ ```
240
+
241
+ Production-style local run:
242
+
243
+ ```bash
244
+ pnpm build
245
+ node dist/src/cli/hive.js --port 4010
246
+ ```
247
+
248
+ The production server serves the built web UI directly. No Vite server is
249
+ needed after `pnpm build`.
250
+
251
+ ## Release
252
+
253
+ Maintainer dry run:
254
+
255
+ ```bash
256
+ pnpm release:dry
257
+ ```
258
+
259
+ See [docs/release.md](docs/release.md) for the full tagged release checklist,
260
+ including manual Windows smoke steps.
261
+
262
+ Tag pushes matching `v*` run the GitHub Actions release workflow. The workflow
263
+ verifies macOS, Ubuntu, and Windows, then publishes to npm with `NPM_TOKEN`.
264
+
265
+ ## Status
266
+
267
+ Hive is in alpha public preview. Expect UI and protocol details to keep moving
268
+ while the core local orchestration model hardens.
269
+
270
+ ## License
271
+
272
+ - **0.6.0-alpha.8 onward**: Business Source License 1.1 (see [LICENSE.BSL](LICENSE.BSL)). Automatically converts to Apache-2.0 on 2030-05-16.
273
+ - **0.6.0-alpha.7 and earlier**: Apache-2.0 (see [LICENSE](LICENSE)), permanent grant.
274
+
275
+ BSL permits personal use, internal deployment, embedding in non-competitive products, and non-commercial forks. **Only prohibits** offering Hive as a hosted multi-agent orchestration service to third parties. See the Additional Use Grant in [LICENSE.BSL](LICENSE.BSL) for the exact boundary.