@logicseek/hello-cc 1.0.0 → 1.0.2-dsh.3

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 (123) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/README.md +36 -0
  3. package/README.zh-CN.md +35 -0
  4. package/docs/README.md +9 -0
  5. package/docs/README.zh-CN.md +9 -0
  6. package/docs/commands.md +53 -0
  7. package/docs/commands.zh-CN.md +48 -0
  8. package/docs/dsh.md +137 -0
  9. package/docs/dsh.zh-CN.md +139 -0
  10. package/docs/guide.md +58 -0
  11. package/docs/guide.zh-CN.md +55 -0
  12. package/docs/mcp.md +9 -0
  13. package/docs/mcp.zh-CN.md +23 -0
  14. package/docs/native.md +295 -0
  15. package/docs/native.zh-CN.md +253 -0
  16. package/docs/web-handoff.zh-CN.md +53 -0
  17. package/lib/cli/app.mjs +27 -6
  18. package/lib/cli/commands/coordination.mjs +3 -1
  19. package/lib/cli/commands/doctor.mjs +17 -2
  20. package/lib/cli/commands/dsh.mjs +79 -0
  21. package/lib/cli/commands/gc.mjs +182 -32
  22. package/lib/cli/commands/hook.mjs +241 -90
  23. package/lib/cli/commands/lock.mjs +34 -19
  24. package/lib/cli/commands/mcp.mjs +28 -0
  25. package/lib/cli/commands/misc.mjs +15 -0
  26. package/lib/cli/commands/native.mjs +130 -0
  27. package/lib/cli/commands/peer.mjs +21 -5
  28. package/lib/cli/commands/run.mjs +66 -21
  29. package/lib/cli/commands/task.mjs +6 -3
  30. package/lib/cli-args.mjs +4 -0
  31. package/lib/coordination-state.mjs +15 -1
  32. package/lib/core/coordination/event-retention.mjs +14 -2
  33. package/lib/core/coordination/gc-plan.mjs +3 -13
  34. package/lib/core/coordination/locks.mjs +45 -0
  35. package/lib/core/coordination/results.mjs +79 -0
  36. package/lib/core/peers/bindings.mjs +9 -3
  37. package/lib/diagnostics/codex.mjs +121 -0
  38. package/lib/integrations/codex-interactions.mjs +114 -0
  39. package/lib/integrations/dsh-collaboration.mjs +170 -0
  40. package/lib/integrations/dsh-cordis.d.ts +19 -0
  41. package/lib/integrations/dsh-cordis.mjs +177 -0
  42. package/lib/integrations/dsh.bundle.yml +7 -0
  43. package/lib/integrations/dsh.mjs +287 -0
  44. package/lib/integrations/native/claude.mjs +451 -0
  45. package/lib/integrations/native/codex.mjs +242 -0
  46. package/lib/integrations/native/dsh-acp.mjs +343 -0
  47. package/lib/integrations/native/index.mjs +19 -0
  48. package/lib/integrations/native/interactions.mjs +53 -0
  49. package/lib/integrations/native/jsonrpc.mjs +185 -0
  50. package/lib/integrations/peers/identity.mjs +36 -10
  51. package/lib/integrations/peers/processes.mjs +22 -8
  52. package/lib/integrations/providers.mjs +6 -2
  53. package/lib/mcp/scope.mjs +104 -0
  54. package/lib/mcp/stdio.mjs +80 -0
  55. package/lib/mcp/tools.mjs +197 -0
  56. package/lib/process/identity.mjs +33 -1
  57. package/lib/release/release-notes.mjs +9 -0
  58. package/lib/runtime/buffer-directory-lease.mjs +2 -1
  59. package/lib/runtime/client.mjs +3 -0
  60. package/lib/runtime/native/client.mjs +38 -0
  61. package/lib/runtime/native/service.mjs +511 -0
  62. package/lib/runtime/native/store.mjs +121 -0
  63. package/lib/shared/file-lock.mjs +11 -4
  64. package/lib/shared/socket-lock-worker.mjs +73 -24
  65. package/lib/terminal/tmux.mjs +53 -23
  66. package/lib/ui/help.mjs +5 -2
  67. package/lib/web/adoption-state.mjs +55 -0
  68. package/lib/web/auto-attach.mjs +18 -2
  69. package/lib/web/buffer-gc-runtime.mjs +2 -2
  70. package/lib/web/codex-app-server.mjs +557 -0
  71. package/lib/web/codex-sessions.mjs +287 -0
  72. package/lib/web/control-lease.mjs +204 -0
  73. package/lib/web/http-routes.mjs +197 -15
  74. package/lib/web/http.mjs +5 -4
  75. package/lib/web/native-sessions.mjs +286 -0
  76. package/lib/web/project-contexts.mjs +8 -2
  77. package/lib/web/pty-sessions.mjs +60 -33
  78. package/lib/web/runtime-main.mjs +101 -6
  79. package/lib/web/session-serialize.mjs +0 -0
  80. package/lib/web/startup.mjs +4 -2
  81. package/lib/web/task-results.mjs +76 -0
  82. package/lib/web/tmux-sessions.mjs +92 -11
  83. package/lib/web/tmux-stream.mjs +2 -2
  84. package/lib/web/ui-codex.mjs +550 -0
  85. package/lib/web/ui-command-palette.mjs +119 -0
  86. package/lib/web/ui-handoff.mjs +102 -0
  87. package/lib/web/ui-history.mjs +118 -0
  88. package/lib/web/ui-i18n.mjs +841 -0
  89. package/lib/web/ui-interactions.mjs +78 -0
  90. package/lib/web/ui-login.mjs +101 -0
  91. package/lib/web/ui-native.mjs +165 -0
  92. package/lib/web/ui-preferences.mjs +278 -0
  93. package/lib/web/ui-review.mjs +132 -0
  94. package/lib/web/ui-template.mjs +1106 -576
  95. package/lib/web/ui-terminal-find.mjs +98 -0
  96. package/lib/web/ui-workbench.mjs +94 -0
  97. package/lib/web/ui-workspace.mjs +222 -0
  98. package/package.json +12 -4
  99. package/scripts/check-free-identifiers.mjs +67 -8
  100. package/scripts/codex-diagnostics-installed-acceptance.mjs +72 -0
  101. package/scripts/dsh-cordis-acceptance.mjs +200 -0
  102. package/scripts/dsh-installed-acceptance.mjs +247 -0
  103. package/scripts/dsh-official-acceptance.mjs +180 -0
  104. package/scripts/dsh-web-startup-acceptance.mjs +87 -0
  105. package/scripts/github-release.mjs +3 -1
  106. package/scripts/native-live-acceptance.mjs +369 -0
  107. package/scripts/regression.mjs +338 -187
  108. package/scripts/web-handoff-installed-acceptance.mjs +98 -0
  109. package/scripts/web-native-interaction-acceptance.mjs +204 -0
  110. package/scripts/web-native-model-acceptance.mjs +138 -0
  111. package/docs/architecture-split-review.md +0 -217
  112. package/docs/current-state-review-2026-08.md +0 -341
  113. package/docs/defect-review-2026-07.md +0 -382
  114. package/docs/layout-split-stack-audit.md +0 -298
  115. package/docs/superpowers/plans/2026-08-03-runtime-safety-plan.md +0 -294
  116. package/docs/superpowers/plans/2026-08-03-v1-data-identity-plan.md +0 -400
  117. package/docs/superpowers/plans/2026-08-03-v1-release-verification-plan.md +0 -284
  118. package/docs/superpowers/plans/2026-08-03-web-api-hardening-plan.md +0 -303
  119. package/docs/superpowers/plans/2026-08-04-runtime-buffer-gc-two-phase.md +0 -71
  120. package/docs/superpowers/specs/2026-08-03-runtime-safety-design.md +0 -117
  121. package/docs/superpowers/specs/2026-08-03-v1-data-identity-design.md +0 -120
  122. package/docs/superpowers/specs/2026-08-03-v1-release-verification-design.md +0 -117
  123. package/docs/superpowers/specs/2026-08-03-web-api-hardening-design.md +0 -104
@@ -1,217 +0,0 @@
1
- # Architecture Split Review
2
-
3
- Date: 2026-06-14
4
-
5
- This review covers the local commits on `master` that are ahead of
6
- `origin/master` after `0.1.5`.
7
-
8
- It is written from the separate review branch
9
- `arch-review/split-layout-from-origin`. The main worktree is intentionally left
10
- untouched because other peers may still be finishing scoped implementation work.
11
-
12
- ## Recommendation
13
-
14
- Keep the current architecture direction. Do not merge the new product-boundary
15
- modules back into `bin/hcc.mjs`, and do not collapse them into another large
16
- generic helper file.
17
-
18
- If the goal is to publish or synchronize soon, keep the current local commit
19
- history and add one or more cleanup commits. Those cleanup commits should focus
20
- on remaining boundary issues and compatibility-shim policy.
21
-
22
- If the goal is clean commit history, rebuild the stack in a separate worktree
23
- from `origin/master`. Do not rewrite the active `master` worktree while peers
24
- are coordinating through it.
25
-
26
- ## What Happened
27
-
28
- The first local split commits were mostly flat helper extraction from
29
- `bin/hcc.mjs` into top-level `lib/*.mjs` files. They reduced the entrypoint size
30
- but did not yet express the product architecture:
31
-
32
- - provider and tmux helpers
33
- - lock and team planning helpers
34
- - peer identity, peer format, and peer binding helpers
35
- - project registry and project context helpers
36
- - handoff, timeline, runtime state, task liveness, automation, and render helpers
37
- - help text, message store, runtime request, task store, task CLI, and
38
- coordination-state helpers
39
-
40
- Later commits introduced `docs/architecture.md` and started moving primary
41
- implementations into product boundaries:
42
-
43
- - `lib/core/coordination`
44
- - `lib/core/peers`
45
- - `lib/core/sessions`
46
- - `lib/db`
47
- - `lib/db/stores`
48
- - `lib/runtime`
49
- - `lib/terminal`
50
- - `lib/web`
51
- - `lib/integrations`
52
- - `lib/release`
53
- - `lib/shared`
54
- - `lib/ui`
55
-
56
- That second phase is the correct direction.
57
-
58
- ## Keep
59
-
60
- These boundaries are worth keeping as the primary implementation shape:
61
-
62
- - `lib/core/coordination/*` for product coordination semantics.
63
- - `lib/core/peers/*` for pure peer semantics.
64
- - `lib/db/schema.mjs` and `lib/db/stores/*` for SQLite schema and stores.
65
- - `lib/runtime/*` for runtime files, runtime client access, project registry,
66
- and project context.
67
- - `lib/terminal/tmux.mjs` for tmux adapter behavior.
68
- - `lib/web/*` for Web runtime, HTTP helpers, peer actions, and UI template.
69
- - `lib/integrations/*` for provider, hook, shim, and process integration
70
- details.
71
- - `lib/release/*` for release metadata and release-note logic.
72
- - `lib/shared/*` only for small dependency-light utilities.
73
- - `lib/ui/*` for text/help/state rendering.
74
-
75
- ## Cleanup Candidates
76
-
77
- The remaining cleanup should be deliberate, not another broad helper extraction.
78
-
79
- ### Top-Level Compatibility Shims
80
-
81
- Many top-level `lib/*.mjs` files are now compatibility re-export shims. Examples
82
- include `lib/tmux.mjs`, `lib/provider-commands.mjs`, `lib/web-runtime.mjs`,
83
- `lib/web-http.mjs`, `lib/web-ui-template.mjs`, `lib/task-store.mjs`,
84
- `lib/messages.mjs`, `lib/locks.mjs`, `lib/db-schema.mjs`, and
85
- `lib/session-launch.mjs`.
86
-
87
- Before publish:
88
-
89
- - Treat the installed CLI commands as the public API. Do not document new
90
- `@logicseek/hello-cc/lib/*` imports as user-facing API.
91
- - `@logicseek/hello-cc@0.1.5` is already published from git head `4969100`, and
92
- that package exposed several top-level `lib/*.mjs` helper paths because the
93
- package includes `lib/` and has no `exports` map.
94
- - Keep already-published top-level `lib/*.mjs` paths as compatibility
95
- re-exports for at least one release cycle unless the project explicitly
96
- chooses a breaking package-surface change.
97
- - For compatibility shims added only in local commits after `0.1.5`, either
98
- remove them before the next publish or document them in the release notes as
99
- compatibility-only and revisit removal before the following release.
100
- - Do not let compatibility shims become the target architecture. Primary
101
- implementations should live under the product-boundary directories.
102
-
103
- Classify top-level shims before release:
104
-
105
- - Group A: already-published or CLI-facing helper paths that stay stable for
106
- this release.
107
- - Group B: migration compatibility paths that re-export moved implementations;
108
- keep only if needed and describe them as compatibility-only deep-import paths.
109
- - Group C: unpublished shims with no internal use and no compatibility value;
110
- remove before publishing.
111
-
112
- ### CLI Boundary
113
-
114
- `bin/hcc.mjs` is smaller but still mixes command dispatch, command handlers, Web
115
- startup, session lifecycle, and terminal/Web orchestration. Future work should
116
- move by command or subsystem boundary, not by helper name.
117
-
118
- Good next boundaries:
119
-
120
- - `lib/cli/args.mjs`
121
- - `lib/cli/context.mjs`
122
- - `lib/cli/dispatch.mjs`
123
- - `lib/cli/commands/*`
124
-
125
- ### Regression Runner
126
-
127
- `scripts/regression.mjs` has grown too large. It should become a runner over
128
- domain-specific files:
129
-
130
- - `scripts/regression/cli.mjs`
131
- - `scripts/regression/db.mjs`
132
- - `scripts/regression/runtime.mjs`
133
- - `scripts/regression/web.mjs`
134
- - `scripts/regression/integrations.mjs`
135
- - `scripts/regression/release.mjs`
136
-
137
- This should be done after the current layout work is stable, because regression
138
- coverage is the safety net for the refactor.
139
-
140
- ### Setup, Discover, Guidance, and Shims
141
-
142
- `lib/setup.mjs`, `lib/discover.mjs`, `lib/guidance.mjs`, and
143
- `lib/shim-script.mjs` still carry mixed responsibilities. Continue splitting
144
- these by product boundary:
145
-
146
- - hooks under `lib/integrations/hooks*`
147
- - shims under `lib/integrations/shims*`
148
- - shell and terminal adapters under `lib/terminal`
149
- - runtime/project concerns under `lib/runtime`
150
- - guidance text generation under `lib/ui` or a dedicated guidance boundary
151
-
152
- ### Handoff Boundary
153
-
154
- `lib/handoff.mjs` is still a top-level helper. Decide whether it belongs in
155
- `lib/core/coordination/handoff.mjs` as product semantics or under
156
- `lib/cli/commands/handoff.mjs` if it is mostly CLI formatting and file listing.
157
-
158
- ## Branch Strategy
159
-
160
- Use one of two paths.
161
-
162
- Path A: publish-oriented cleanup
163
-
164
- 1. Keep current `master` history.
165
- 2. Add focused cleanup commits.
166
- 3. Run full regression, release checks, GitHub release dry-run, and pack dry-run.
167
- 4. Publish/synchronize only after the cleanup decision is complete.
168
-
169
- Path B: clean-history rebuild
170
-
171
- 1. Keep `master` untouched.
172
- 2. Use a separate worktree from `origin/master`.
173
- 3. Rebuild the split as fewer architectural commits:
174
- - architecture docs
175
- - core coordination and peer semantics
176
- - db schema/stores
177
- - runtime/project/session helpers
178
- - terminal adapters
179
- - web runtime and UI
180
- - integrations providers/hooks/shims
181
- - release/shared/ui helpers
182
- - regression restructuring
183
- 4. Run full regression and release checks before replacing the active stack.
184
-
185
- ## Current Decision
186
-
187
- The safer default is Path A: keep current history and add cleanup commits.
188
-
189
- Choose Path B only if the project explicitly values a clean local commit stack
190
- more than the time and risk of rebuilding and revalidating the entire series.
191
-
192
- The current safety refs are:
193
-
194
- - `safety/layout-split-20260614-at-ffc42a7`, protecting the earlier split stack.
195
- - `safety/layout-split-20260614-at-11fd4f6`, protecting the split stack through
196
- `11fd4f6` before this package-surface policy update.
197
-
198
- Because `0.1.5` is already on npm, the next publish that includes the current
199
- local commits must bump the package version. Do not republish `0.1.5`.
200
-
201
- ## Coordination Notes
202
-
203
- Continue finishing any already-started layout lanes that are clearly correcting
204
- the architecture boundary. For example, moving setup hooks and shim
205
- implementation into `lib/integrations` is still part of the same boundary
206
- cleanup, not a new random helper extraction.
207
-
208
- After those active lanes finish, pause new implementation splits and make a
209
- cleanup decision:
210
-
211
- 1. Decide whether this review document should be copied into `master` as a
212
- durable design record.
213
- 2. Decide whether top-level compatibility shims are public for this release.
214
- 3. If shims are kept, document that they are compatibility paths.
215
- 4. If shims are removed, do it before publish and run full pack/release checks.
216
- 5. Do not start broad `bin/hcc.mjs` command extraction or regression runner
217
- splitting until the shim policy is settled.