@tt-a1i/hive 0.6.0-alpha.8 → 1.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/CHANGELOG.md +20 -0
- package/README.en.md +9 -9
- package/README.md +4 -5
- package/dist/src/server/session-capture-codex.d.ts +1 -0
- package/dist/src/server/session-capture-codex.js +38 -2
- package/dist/src/server/session-capture-codex.js.map +1 -1
- package/package.json +1 -1
- package/web/dist/assets/index-BBxhzJnD.js +80 -0
- package/web/dist/assets/index-DcCBlqhh.css +1 -0
- package/web/dist/index.html +6 -2
- package/web/dist/assets/index-B8F00qo4.css +0 -1
- package/web/dist/assets/index-DFE1Ia4e.js +0 -80
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable user-facing changes will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.0.0 - 2026-05-17
|
|
6
|
+
|
|
7
|
+
Stable release.
|
|
8
|
+
|
|
9
|
+
- Hive is now published as the stable `1.0.0` release. The install path stays
|
|
10
|
+
the same: `npm install -g @tt-a1i/hive` or `npx @tt-a1i/hive`.
|
|
11
|
+
- Fixed PTY keyboard handling so Shift+Enter can reach terminal apps such as
|
|
12
|
+
Claude Code and Gemini instead of being swallowed as a plain submit.
|
|
13
|
+
- Worker cards now present live terminal state as `running` / `运行中` rather
|
|
14
|
+
than exposing the internal `working` vs `idle` dispatch-status distinction.
|
|
15
|
+
The protocol-level `idle / working / stopped` states remain unchanged.
|
|
16
|
+
- Worker detail modals reserve Escape for the embedded terminal, so agent
|
|
17
|
+
shortcuts that use Escape no longer close the modal accidentally.
|
|
18
|
+
- Codex session capture no longer decodes every historical
|
|
19
|
+
`~/.codex/sessions/**/rollout-*.jsonl` file during agent startup. It reads a
|
|
20
|
+
bounded first line only, which removes multi-second add-member stalls on
|
|
21
|
+
large Codex session stores.
|
|
22
|
+
- CLI agent logos are preloaded and decoded synchronously to reduce the blank
|
|
23
|
+
avatar flash immediately after a member is created.
|
|
24
|
+
|
|
5
25
|
## 0.6.0-alpha.8 - 2026-05-16
|
|
6
26
|
|
|
7
27
|
License switch — no code changes from alpha.7.
|
package/README.en.md
CHANGED
|
@@ -22,10 +22,10 @@ injects into each agent's shell, and shares a markdown task graph at
|
|
|
22
22
|
|
|
23
23
|
English · [简体中文](./README.md)
|
|
24
24
|
|
|
25
|
-
>
|
|
26
|
-
>
|
|
27
|
-
>
|
|
28
|
-
>
|
|
25
|
+
> Hive is local-first, runs on `127.0.0.1`, and is intended for developers who
|
|
26
|
+
> already use CLI coding agents. The latest stable release is on
|
|
27
|
+
> [npm](https://www.npmjs.com/package/@tt-a1i/hive) and the badge above resolves
|
|
28
|
+
> to it.
|
|
29
29
|
|
|
30
30
|
## Why Hive
|
|
31
31
|
|
|
@@ -264,12 +264,12 @@ verifies macOS, Ubuntu, and Windows, then publishes to npm with `NPM_TOKEN`.
|
|
|
264
264
|
|
|
265
265
|
## Status
|
|
266
266
|
|
|
267
|
-
Hive is
|
|
268
|
-
|
|
267
|
+
Hive is published as a stable release. Current work focuses on polishing the
|
|
268
|
+
multi-CLI-agent workflow, Windows support, and clearer orchestration
|
|
269
|
+
observability.
|
|
269
270
|
|
|
270
271
|
## License
|
|
271
272
|
|
|
272
|
-
|
|
273
|
-
- **0.6.0-alpha.7 and earlier**: Apache-2.0 (see [LICENSE](LICENSE)), permanent grant.
|
|
273
|
+
Hive is licensed under the Business Source License 1.1 (see [LICENSE.BSL](LICENSE.BSL)). BSL permits personal use, internal deployment, embedding in non-competitive products, and non-commercial forks; it **only prohibits** offering Hive as a hosted multi-agent orchestration service to third parties.
|
|
274
274
|
|
|
275
|
-
|
|
275
|
+
See the Additional Use Grant in [LICENSE.BSL](LICENSE.BSL) for the exact boundary.
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
[English](./README.en.md) · 简体中文
|
|
19
19
|
|
|
20
|
-
>
|
|
20
|
+
> Hive 是本机优先的工具,只监听 `127.0.0.1`,面向已经在用 CLI Coding Agent 的开发者。最新稳定版本见 [npm](https://www.npmjs.com/package/@tt-a1i/hive),上面的 badge 会指向它。
|
|
21
21
|
|
|
22
22
|
## 为什么需要 Hive
|
|
23
23
|
|
|
@@ -211,11 +211,10 @@ pnpm release:dry
|
|
|
211
211
|
|
|
212
212
|
## 状态
|
|
213
213
|
|
|
214
|
-
Hive
|
|
214
|
+
Hive 已发布稳定版。当前重点是继续打磨多 CLI Agent 协作体验、Windows 支持和更清晰的调度可观测性。
|
|
215
215
|
|
|
216
216
|
## License
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
- **0.6.0-alpha.7 及之前**: Apache-2.0([LICENSE](LICENSE)),永久授权
|
|
218
|
+
Hive 使用 Business Source License 1.1([LICENSE.BSL](LICENSE.BSL))。BSL 允许个人使用、内部部署、嵌入其他产品、非商业 fork;**仅禁止**把 Hive 包装成多 agent 协作 SaaS 卖给第三方。
|
|
220
219
|
|
|
221
|
-
|
|
220
|
+
详细边界见 [LICENSE.BSL](LICENSE.BSL) 的 Additional Use Grant。
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const getCodexHome: (pattern?: string) => string;
|
|
2
|
+
export declare const readCodexSessionFirstLine: (filePath: string, maxBytes?: number) => string | null;
|
|
2
3
|
export declare const hasCodexSession: (cwd: string, sessionId: string, pattern?: string) => boolean;
|
|
3
4
|
export declare const snapshotCodexSessionIds: (cwd: string, codexHome?: string) => Set<string>;
|
|
4
5
|
export declare const captureCodexSessionId: (cwd: string, knownSessionIds: Set<string>, onCapture: (sessionId: string) => void, timeoutMs?: number, intervalMs?: number, codexHome?: string) => Promise<void>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { existsSync, readdirSync,
|
|
1
|
+
import { closeSync, existsSync, openSync, readdirSync, readSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { captureSessionIdWithCoordinator } from './claude-session-coordinator.js';
|
|
5
5
|
const CODEX_SESSION_FILE = /^rollout-.*\.jsonl$/i;
|
|
6
|
+
const CODEX_HEADER_READ_CHUNK_BYTES = 4096;
|
|
7
|
+
const CODEX_HEADER_MAX_BYTES = 64 * 1024;
|
|
6
8
|
const getDefaultCodexHome = () => process.env.CODEX_HOME ?? join(homedir(), '.codex');
|
|
7
9
|
const expandHome = (path) => path === '~' || path.startsWith('~/') ? join(homedir(), path.slice(2)) : path;
|
|
8
10
|
export const getCodexHome = (pattern) => {
|
|
@@ -30,8 +32,42 @@ const walkSessionFiles = (dir) => {
|
|
|
30
32
|
return [];
|
|
31
33
|
}
|
|
32
34
|
};
|
|
35
|
+
export const readCodexSessionFirstLine = (filePath, maxBytes = CODEX_HEADER_MAX_BYTES) => {
|
|
36
|
+
const fd = openSync(filePath, 'r');
|
|
37
|
+
try {
|
|
38
|
+
const chunks = [];
|
|
39
|
+
let totalBytes = 0;
|
|
40
|
+
let position = 0;
|
|
41
|
+
let reachedLineEnd = false;
|
|
42
|
+
while (totalBytes < maxBytes) {
|
|
43
|
+
const bytesToRead = Math.min(CODEX_HEADER_READ_CHUNK_BYTES, maxBytes - totalBytes);
|
|
44
|
+
const buffer = Buffer.allocUnsafe(bytesToRead);
|
|
45
|
+
const bytesRead = readSync(fd, buffer, 0, bytesToRead, position);
|
|
46
|
+
if (bytesRead === 0) {
|
|
47
|
+
reachedLineEnd = true;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
const slice = buffer.subarray(0, bytesRead);
|
|
51
|
+
const newlineIndex = slice.indexOf(0x0a);
|
|
52
|
+
if (newlineIndex >= 0) {
|
|
53
|
+
chunks.push(slice.subarray(0, newlineIndex));
|
|
54
|
+
reachedLineEnd = true;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
chunks.push(slice);
|
|
58
|
+
totalBytes += bytesRead;
|
|
59
|
+
position += bytesRead;
|
|
60
|
+
}
|
|
61
|
+
if (!reachedLineEnd)
|
|
62
|
+
return null;
|
|
63
|
+
return Buffer.concat(chunks).toString('utf8').replace(/\r$/, '');
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
closeSync(fd);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
33
69
|
const parseCodexSession = (filePath) => {
|
|
34
|
-
const firstLine =
|
|
70
|
+
const firstLine = readCodexSessionFirstLine(filePath) ?? '';
|
|
35
71
|
const parsed = JSON.parse(firstLine);
|
|
36
72
|
if (!parsed || typeof parsed !== 'object' || !('payload' in parsed))
|
|
37
73
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-capture-codex.js","sourceRoot":"","sources":["../../../src/server/session-capture-codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"session-capture-codex.js","sourceRoot":"","sources":["../../../src/server/session-capture-codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAA;AAEjF,MAAM,kBAAkB,GAAG,sBAAsB,CAAA;AACjD,MAAM,6BAA6B,GAAG,IAAI,CAAA;AAC1C,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAA;AAExC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAA;AAErF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAClC,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,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AE,GAAG,CAAC;QAC5C,SAAS;KACV,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,SAAS,GAAG,mBAAmB,EAAE,EAAE,EAAE,CAC3E,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tt-a1i/hive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Browser-native hive-mind for CLI coding agents — Claude Code, Codex, Gemini, and OpenCode collaborate as real PTY processes via a team protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.30.3",
|