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

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 (37) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.en.md +272 -0
  3. package/README.md +100 -151
  4. package/dist/src/server/agent-launch-cache.js +2 -2
  5. package/dist/src/server/agent-launch-cache.js.map +1 -1
  6. package/dist/src/server/agent-launch-resolver.d.ts +4 -0
  7. package/dist/src/server/agent-launch-resolver.js +33 -0
  8. package/dist/src/server/agent-launch-resolver.js.map +1 -0
  9. package/dist/src/server/hive-team-guidance.js +1 -0
  10. package/dist/src/server/hive-team-guidance.js.map +1 -1
  11. package/dist/src/server/orchestrator-autostart.js +12 -2
  12. package/dist/src/server/orchestrator-autostart.js.map +1 -1
  13. package/dist/src/server/orchestrator-launch.js +2 -27
  14. package/dist/src/server/orchestrator-launch.js.map +1 -1
  15. package/dist/src/server/recovery-summary.js +1 -1
  16. package/dist/src/server/recovery-summary.js.map +1 -1
  17. package/dist/src/server/route-types.d.ts +2 -0
  18. package/dist/src/server/routes-workspaces.js +26 -18
  19. package/dist/src/server/routes-workspaces.js.map +1 -1
  20. package/dist/src/server/team-list-enrichment.d.ts +22 -0
  21. package/dist/src/server/team-list-enrichment.js +41 -0
  22. package/dist/src/server/team-list-enrichment.js.map +1 -0
  23. package/dist/src/server/team-list-serializer.d.ts +1 -1
  24. package/dist/src/server/team-list-serializer.js +2 -1
  25. package/dist/src/server/team-list-serializer.js.map +1 -1
  26. package/dist/src/shared/types.d.ts +9 -0
  27. package/package.json +3 -3
  28. package/web/dist/assets/index-B8F00qo4.css +1 -0
  29. package/web/dist/assets/index-CGvIlvht.js +80 -0
  30. package/web/dist/cli-icons/claude.png +0 -0
  31. package/web/dist/cli-icons/codex.png +0 -0
  32. package/web/dist/cli-icons/gemini.png +0 -0
  33. package/web/dist/cli-icons/opencode.svg +18 -0
  34. package/web/dist/index.html +2 -2
  35. package/README.zh-CN.md +0 -215
  36. package/web/dist/assets/index-CMHbdGhT.css +0 -1
  37. package/web/dist/assets/index-CkY03NZW.js +0 -76
package/CHANGELOG.md CHANGED
@@ -2,6 +2,43 @@
2
2
 
3
3
  All notable user-facing changes will be documented in this file.
4
4
 
5
+ ## 0.6.0-alpha.7 - 2026-05-16
6
+
7
+ Worker identity, language, and workflow polish.
8
+
9
+ - Worker cards and the worker detail modal now display the CLI agent's
10
+ brand logo (Claude Code, Codex, Gemini, OpenCode) instead of the
11
+ role-letter placeholder. Unknown presets or workers launched via a
12
+ custom command fall back to the legacy role-letter avatar so existing
13
+ rows never render blank. The `team list` payload gained a
14
+ `command_preset_id` field (snake_case wire, camelCase in-process); the
15
+ enrichment honours `presetAugmentationDisabled` so the launcher and
16
+ the UI stay in lockstep.
17
+ - Workers can now boot from a custom `startup_command` (e.g. native
18
+ `claude --resume <session-id>`) entered from the add-member or
19
+ add-Workspace dialogs. Routes-workspaces detects shell-driven
20
+ invocations and stores them without binding to a preset.
21
+ - UI language adapts across the entire surface: task drawer (including
22
+ the raw Markdown editor that previously mixed Chinese conflict copy
23
+ with English buttons), notification settings popover, OS-level
24
+ desktop notifications, the workspace add / confirm / server-browse
25
+ dialogs, the FS picker, the demo view, the toast container, and the
26
+ terminal screen-reader status. Adds a `~146`-key expansion of the
27
+ i18n table covering `tasks.*`, `notifications.*`, `workspace.*`,
28
+ `layout.*`, `terminal.*`, `terminalPanels.*`, `toast.*`, and a couple
29
+ of `demo.*` / `common.*` additions; `{plural}` placeholders are gone
30
+ so the wire shape can't leak literal `{plural}` tokens at runtime.
31
+ - Worker cards lost the bottom raw-PTY line preview (a noisy CLI
32
+ status row that varied per agent and confused users). The
33
+ `last_pty_line` field stays on the wire so a future "current task
34
+ summary" surface can reuse it.
35
+ - Translation copy itself was reviewed: `Queen` is gone from UI chrome
36
+ (the metaphor only appears in onboarding prose), Workspace /
37
+ Orchestrator / Agent are normalised as proper nouns in Chinese
38
+ copy, role names tightened (`Coder → 开发`, `Tester → 测试`),
39
+ ellipsis switched from ASCII `...` to typographic `…`, `task(s)`
40
+ notation retired.
41
+
5
42
  ## 0.6.0-alpha.5 - 2026-05-15
6
43
 
7
44
  Public-preview surface polish + internal hygiene pass.
package/README.en.md ADDED
@@ -0,0 +1,272 @@
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-Apache--2.0-blue.svg)](./LICENSE)
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
+ Apache-2.0. See [LICENSE](LICENSE).