@logicseek/hello-cc 0.1.9 → 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 +59 -0
- package/README.md +18 -3
- package/README.zh-CN.md +17 -3
- package/bin/hcc.mjs +3 -5656
- package/docs/README.md +8 -0
- package/docs/README.zh-CN.md +6 -0
- package/docs/architecture.md +29 -18
- package/docs/architecture.zh-CN.md +20 -10
- package/docs/commands.md +13 -4
- package/docs/commands.zh-CN.md +13 -4
- package/docs/current-state-review-2026-08.md +341 -0
- package/docs/defect-review-2026-07.md +382 -0
- package/docs/guide.md +39 -3
- package/docs/guide.zh-CN.md +34 -2
- package/docs/superpowers/plans/2026-08-03-runtime-safety-plan.md +294 -0
- package/docs/superpowers/plans/2026-08-03-v1-data-identity-plan.md +400 -0
- package/docs/superpowers/plans/2026-08-03-v1-release-verification-plan.md +284 -0
- package/docs/superpowers/plans/2026-08-03-web-api-hardening-plan.md +303 -0
- package/docs/superpowers/plans/2026-08-04-runtime-buffer-gc-two-phase.md +71 -0
- package/docs/superpowers/specs/2026-08-03-runtime-safety-design.md +117 -0
- package/docs/superpowers/specs/2026-08-03-v1-data-identity-design.md +120 -0
- package/docs/superpowers/specs/2026-08-03-v1-release-verification-design.md +117 -0
- package/docs/superpowers/specs/2026-08-03-web-api-hardening-design.md +104 -0
- package/lib/cli/app.mjs +642 -0
- package/lib/cli/commands/coordination.mjs +247 -0
- package/lib/cli/commands/doctor.mjs +81 -0
- package/lib/cli/commands/gc.mjs +852 -0
- package/lib/cli/commands/hook.mjs +205 -0
- package/lib/cli/commands/install.mjs +294 -0
- package/lib/cli/commands/lifecycle.mjs +101 -0
- package/lib/cli/commands/lock.mjs +197 -0
- package/lib/cli/commands/misc.mjs +61 -0
- package/lib/cli/commands/msg.mjs +152 -0
- package/lib/cli/commands/peer.mjs +233 -0
- package/lib/cli/commands/query.mjs +96 -0
- package/lib/cli/commands/run.mjs +463 -0
- package/lib/cli/commands/task.mjs +405 -0
- package/lib/cli/commands/team.mjs +131 -0
- package/lib/cli/commands/tmux.mjs +838 -0
- package/lib/cli/commands/up.mjs +135 -0
- package/lib/cli-args.mjs +16 -2
- package/lib/coordination-state.mjs +112 -51
- package/lib/core/coordination/automation.mjs +5 -8
- package/lib/core/coordination/clock-safety.mjs +323 -0
- package/lib/core/coordination/event-retention.mjs +17 -0
- package/lib/core/coordination/gc-plan.mjs +614 -0
- package/lib/core/coordination/lease-renewal.mjs +102 -0
- package/lib/core/coordination/lock-evidence.mjs +77 -0
- package/lib/core/coordination/optimistic-evidence.mjs +26 -0
- package/lib/core/coordination/tasks.mjs +156 -36
- package/lib/core/peers/evidence-runtime.mjs +312 -0
- package/lib/core/peers/evidence.mjs +103 -0
- package/lib/core/peers/hook-owner.mjs +32 -0
- package/lib/core/peers/liveness.mjs +44 -4
- package/lib/core/peers/peer-helpers.mjs +121 -0
- package/lib/core/peers/session.mjs +8 -2
- package/lib/core/peers/tmux-safety.mjs +290 -0
- package/lib/core/sessions/launch.mjs +13 -1
- package/lib/db/connection.mjs +104 -0
- package/lib/db/events.mjs +34 -0
- package/lib/db/migration-backup.mjs +225 -0
- package/lib/db/schema.mjs +102 -5
- package/lib/db/stores/peers.mjs +34 -0
- package/lib/integrations/peers/identity.mjs +62 -16
- package/lib/integrations/shims/script.mjs +111 -9
- package/lib/process/identity.mjs +192 -0
- package/lib/process/pty-lifecycle.mjs +149 -0
- package/lib/runtime/buffer-directory-lease.mjs +47 -0
- package/lib/runtime/buffer-evidence.mjs +336 -0
- package/lib/runtime/buffer-gc-protocol.mjs +167 -0
- package/lib/runtime/buffer-gc.mjs +270 -0
- package/lib/runtime/client.mjs +60 -7
- package/lib/runtime/fatal-shutdown.mjs +54 -0
- package/lib/runtime/project-path.mjs +139 -0
- package/lib/runtime/projects.mjs +320 -40
- package/lib/runtime/state.mjs +227 -27
- package/lib/shared/cleanup-error.mjs +54 -0
- package/lib/shared/clock-grace.mjs +106 -0
- package/lib/shared/errors.mjs +9 -0
- package/lib/shared/file-lock.mjs +370 -0
- package/lib/shared/json-file.mjs +6 -2
- package/lib/shared/redact.mjs +60 -0
- package/lib/shared/socket-lock-worker.mjs +201 -0
- package/lib/terminal/tmux.mjs +78 -4
- package/lib/tmux.mjs +4 -0
- package/lib/ui/help.mjs +53 -15
- package/lib/web/api-version.mjs +42 -0
- package/lib/web/auto-attach.mjs +185 -0
- package/lib/web/buffer-gc-runtime.mjs +175 -0
- package/lib/web/cookie-auth.mjs +119 -0
- package/lib/web/external-sessions.mjs +254 -0
- package/lib/web/http-routes.mjs +542 -0
- package/lib/web/http.mjs +135 -6
- package/lib/web/liveness-reaper.mjs +145 -0
- package/lib/web/peer-actions.mjs +132 -23
- package/lib/web/project-contexts.mjs +178 -0
- package/lib/web/pty-sessions.mjs +203 -0
- package/lib/web/runtime-main.mjs +714 -0
- package/lib/web/runtime.mjs +91 -36
- package/lib/web/session-serialize.mjs +0 -0
- package/lib/web/startup.mjs +333 -0
- package/lib/web/tls.mjs +365 -0
- package/lib/web/tmux-sessions.mjs +1361 -0
- package/lib/web/tmux-stream.mjs +166 -0
- package/lib/web/ui-template.mjs +152 -20
- package/package.json +5 -2
- package/scripts/check-free-identifiers.mjs +290 -0
- package/scripts/regression.mjs +5397 -263
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,65 @@ the release description from the current changelog section. Use
|
|
|
16
16
|
`npm run release:github` with `GH_TOKEN` or `GITHUB_TOKEN` only for local
|
|
17
17
|
backfills.
|
|
18
18
|
|
|
19
|
+
## 1.0.0
|
|
20
|
+
|
|
21
|
+
### Summary
|
|
22
|
+
|
|
23
|
+
hello-cc 1.0.0 is a breaking data, identity, and Runtime API release. It makes
|
|
24
|
+
process identity the authority for session liveness, bounds unknown evidence,
|
|
25
|
+
and hardens browser terminal control and technical-state cleanup.
|
|
26
|
+
|
|
27
|
+
### Highlights
|
|
28
|
+
|
|
29
|
+
- Process identity now controls live/dead decisions across tmux and ordinary
|
|
30
|
+
child processes, including sleep, detach, PID reuse, and stale status rows.
|
|
31
|
+
- Browser credentials, trusted proxy headers, Runtime API TLS, and buffer GC
|
|
32
|
+
all have narrower, tested authority boundaries.
|
|
33
|
+
|
|
34
|
+
### Breaking Changes
|
|
35
|
+
|
|
36
|
+
- Databases upgrade to schema v7. Downgrading a migrated database is not
|
|
37
|
+
supported. Before migration, hello-cc creates a verified
|
|
38
|
+
`<db>.pre-v<from>-to-v7.<timestamp>.<suffix>.bak` snapshot; stop all hello-cc
|
|
39
|
+
processes and validate the backup with SQLite `quick_check` before any manual
|
|
40
|
+
recovery. At most five strictly named backups are retained per database; the
|
|
41
|
+
recovery procedure is documented in the user guide.
|
|
42
|
+
- Provider peer IDs now hash the complete provider session value. Existing
|
|
43
|
+
pre-v1 provider IDs and bindings are left unchanged: there is no automatic
|
|
44
|
+
alias, graph rewrite, or migration to the new ID.
|
|
45
|
+
- Protected HTTP and WebSocket operations require Runtime API v2. Browser
|
|
46
|
+
terminal write tokens are issued per WebSocket connection and revoked when
|
|
47
|
+
that connection closes.
|
|
48
|
+
|
|
49
|
+
### Security And Reliability
|
|
50
|
+
|
|
51
|
+
- Live tmux and non-tmux sessions are decided from immutable process evidence;
|
|
52
|
+
sleep and tmux detachment do not mark a live process dead. Unknown evidence
|
|
53
|
+
receives at most 120 seconds of grace, while confirmed dead owners expire.
|
|
54
|
+
- Generated Web access tokens are scoped to one runtime and are not persisted.
|
|
55
|
+
HTTPS runtime overrides use normal certificate verification; set
|
|
56
|
+
`HCC_RUNTIME_CA` to a CA file for a private or self-signed endpoint.
|
|
57
|
+
- `--trust-proxy` now requires `--proxy-origin https://host[:port]`; forwarded
|
|
58
|
+
scheme and host must match that fixed origin and arrive from loopback.
|
|
59
|
+
- Garbage collection keeps task/message/event/handoff history unless
|
|
60
|
+
`hcc gc --history --yes` is explicitly requested. Buffer deletion rechecks
|
|
61
|
+
producer evidence and leases immediately before each bounded batch.
|
|
62
|
+
|
|
63
|
+
### Accepted Risks
|
|
64
|
+
|
|
65
|
+
- The default Web listener remains `0.0.0.0` over plaintext HTTP for trusted
|
|
66
|
+
LAN use. The token controls access but does not provide transport encryption;
|
|
67
|
+
use `--tls` or a pinned TLS reverse proxy when the network is not trusted.
|
|
68
|
+
- An authenticated browser may select any existing server directory as a
|
|
69
|
+
project root. This is intentional for the operator console and is not a
|
|
70
|
+
project-root sandbox or tenant boundary.
|
|
71
|
+
|
|
72
|
+
### Validation
|
|
73
|
+
|
|
74
|
+
The release gate requires Node 24 unit and full regression tests, package import
|
|
75
|
+
closure checks, a fresh Docker build, and three consecutive container runs that
|
|
76
|
+
end with `FULL_REGRESSION_OK`.
|
|
77
|
+
|
|
19
78
|
## 0.1.9
|
|
20
79
|
|
|
21
80
|
### Summary
|
package/README.md
CHANGED
|
@@ -30,6 +30,20 @@ It is built for developers who run multiple AI coding agents in the same repo
|
|
|
30
30
|
and need them to coordinate instead of guessing what the other sessions are
|
|
31
31
|
doing.
|
|
32
32
|
|
|
33
|
+
## v1 Compatibility And Trust Model
|
|
34
|
+
|
|
35
|
+
Version 1.0.0 upgrades project databases to schema v7 after creating a verified
|
|
36
|
+
pre-migration backup; downgrading that database is unsupported. Provider peer
|
|
37
|
+
IDs now hash the full provider session value and old IDs are not remapped.
|
|
38
|
+
Runtime API v2 and per-connection terminal action tokens are required.
|
|
39
|
+
|
|
40
|
+
Liveness follows tmux/non-tmux process evidence: sleep or detachment does not
|
|
41
|
+
kill a live session, and only unknown evidence receives the bounded 120-second
|
|
42
|
+
grace. `hcc gc` retains history unless `--history` is explicit. `--tls` encrypts
|
|
43
|
+
the console; `--trust-proxy` requires a fixed `--proxy-origin`. Two risks remain
|
|
44
|
+
intentional: the default listener is plaintext HTTP on `0.0.0.0` for trusted
|
|
45
|
+
LANs, and an authenticated browser may select any existing server directory.
|
|
46
|
+
|
|
33
47
|
## Highlights
|
|
34
48
|
|
|
35
49
|
- **Shared project memory**: peers, tasks, messages, locks, handoffs, and
|
|
@@ -94,14 +108,14 @@ hcc web
|
|
|
94
108
|
```
|
|
95
109
|
|
|
96
110
|
Then open the printed URL. By default, `hcc web` listens on LAN interfaces and
|
|
97
|
-
requests `0.0.0.0:8787`, using a
|
|
111
|
+
requests `0.0.0.0:8787`, using a token generated for that runtime. If
|
|
98
112
|
port 8787 is already busy and you did not pass `--port`, it automatically tries
|
|
99
113
|
the next available port. The command prints both the LAN login URL and the local
|
|
100
114
|
loopback URL:
|
|
101
115
|
|
|
102
116
|
```text
|
|
103
|
-
open: http://<machine-ip>:8787/?token=<
|
|
104
|
-
local: http://127.0.0.1:8787/?token=<
|
|
117
|
+
open: http://<machine-ip>:8787/?token=<runtime-token>&project=/path/to/project
|
|
118
|
+
local: http://127.0.0.1:8787/?token=<runtime-token>&project=/path/to/project
|
|
105
119
|
```
|
|
106
120
|
|
|
107
121
|
Use `--local` to bind only to `127.0.0.1`, or `--port N` to request a specific
|
|
@@ -139,6 +153,7 @@ project database.
|
|
|
139
153
|
```bash
|
|
140
154
|
hcc task create --title "Review router changes" --priority 20
|
|
141
155
|
hcc task next
|
|
156
|
+
hcc task running --id 1 --summary "Started"
|
|
142
157
|
hcc lock acquire --resource src/router --ttl 900 --reason "edit router"
|
|
143
158
|
hcc status
|
|
144
159
|
hcc handoff create --summary "Router change ready for review" --tests "npm test"
|
package/README.zh-CN.md
CHANGED
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
|
|
26
26
|
它适合在同一个仓库里同时运行多个 AI 编程 agent 的场景:让它们知道彼此在做什么,而不是各自猜测。
|
|
27
27
|
|
|
28
|
+
## v1 兼容性与信任边界
|
|
29
|
+
|
|
30
|
+
1.0.0 会在生成并校验升级前备份后,把项目数据库升级到 schema v7;升级后的
|
|
31
|
+
数据库不支持降级。provider peer ID 改为对完整 provider session 值做哈希,旧 ID
|
|
32
|
+
不会自动映射或迁移。受保护的接口使用 Runtime API v2,终端 action token 按
|
|
33
|
+
WebSocket 连接签发和撤销。
|
|
34
|
+
|
|
35
|
+
存活判断以 tmux/非 tmux 进程证据为准:休眠或 detach 不会把活进程判死,只有
|
|
36
|
+
unknown 证据获得最长 120 秒宽限。`hcc gc` 默认保留历史,必须显式使用
|
|
37
|
+
`--history`。`--tls` 提供传输加密;`--trust-proxy` 必须固定
|
|
38
|
+
`--proxy-origin`。两项风险是有意保留的:默认在可信内网以明文 HTTP 监听
|
|
39
|
+
`0.0.0.0`,且已认证浏览器可以选择服务器上任意已存在目录。
|
|
40
|
+
|
|
28
41
|
## 特色
|
|
29
42
|
|
|
30
43
|
- **项目本地共享状态**:peers、tasks、messages、locks、handoffs 和 events 写入 `<project>/.hello-cc/mesh.db`。
|
|
@@ -82,13 +95,13 @@ hcc web
|
|
|
82
95
|
```
|
|
83
96
|
|
|
84
97
|
然后打开命令输出里的 URL。默认情况下,`hcc web` 会监听内网地址,请求
|
|
85
|
-
`0.0.0.0:8787`,并在 URL
|
|
98
|
+
`0.0.0.0:8787`,并在 URL 里附带为本次 runtime 自动生成的 token。如果 8787
|
|
86
99
|
端口已被占用,且你没有显式传 `--port`,它会自动尝试后续可用端口。启动时会同时
|
|
87
100
|
打印内网登录地址和本机 loopback 地址:
|
|
88
101
|
|
|
89
102
|
```text
|
|
90
|
-
open: http://<machine-ip>:8787/?token=<
|
|
91
|
-
local: http://127.0.0.1:8787/?token=<
|
|
103
|
+
open: http://<machine-ip>:8787/?token=<runtime-token>&project=/path/to/project
|
|
104
|
+
local: http://127.0.0.1:8787/?token=<runtime-token>&project=/path/to/project
|
|
92
105
|
```
|
|
93
106
|
|
|
94
107
|
使用 `--local` 可以只绑定 `127.0.0.1`,使用 `--port N` 可以指定请求端口。
|
|
@@ -122,6 +135,7 @@ provider CLI,不会使用全局 Web runtime,也不会为这个目录新建
|
|
|
122
135
|
```bash
|
|
123
136
|
hcc task create --title "Review router changes" --priority 20
|
|
124
137
|
hcc task next
|
|
138
|
+
hcc task running --id 1 --summary "Started"
|
|
125
139
|
hcc lock acquire --resource src/router --ttl 900 --reason "edit router"
|
|
126
140
|
hcc status
|
|
127
141
|
hcc handoff create --summary "Router change ready for review" --tests "npm test"
|