helloagents 3.0.35 → 3.0.38
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/.claude-plugin/marketplace.json +1 -4
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +21 -13
- package/README_CN.md +21 -13
- package/bootstrap-lite.md +3 -4
- package/bootstrap.md +3 -4
- package/gemini-extension.json +1 -1
- package/install.ps1 +9 -2
- package/install.sh +11 -2
- package/package.json +1 -1
- package/scripts/cli-doctor-codex.mjs +4 -1
- package/scripts/cli-doctor.mjs +3 -3
- package/scripts/cli-hosts.mjs +1 -1
- package/scripts/cli-lifecycle-hosts.mjs +48 -20
- package/scripts/cli-messages.mjs +2 -2
- package/scripts/cli-runtime-root.mjs +9 -1
- package/scripts/notify-sound.mjs +2 -1
- package/scripts/notify.mjs +4 -0
- package/scripts/project-session-cleanup.mjs +60 -16
- package/scripts/project-storage.mjs +2 -8
- package/scripts/runtime-artifacts.mjs +2 -2
- package/scripts/runtime-scope.mjs +115 -20
- package/scripts/runtime-ttl.mjs +7 -4
- package/scripts/session-capsule.mjs +117 -13
- package/scripts/session-token.mjs +62 -9
- package/scripts/state-document.mjs +6 -7
- package/scripts/turn-state.mjs +2 -3
- package/scripts/workflow-core.mjs +1 -4
- package/scripts/workflow-plan-files.mjs +1 -1
- /package/hooks/{hooks.json → hooks-gemini.json} +0 -0
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "helloagents",
|
|
11
11
|
"description": "Quality-driven orchestration kernel for AI CLIs: intelligent routing, quality verification, safety guards, and notifications",
|
|
12
|
-
"source":
|
|
13
|
-
"source": "github",
|
|
14
|
-
"repo": "hellowind777/helloagents"
|
|
15
|
-
},
|
|
12
|
+
"source": "./",
|
|
16
13
|
"author": {
|
|
17
14
|
"name": "HelloWind",
|
|
18
15
|
"email": "hellowind777@gmail.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.38",
|
|
4
4
|
"description": "HelloAGENTS — The orchestration kernel that makes any AI CLI smarter. Adds intelligent routing, unified QA gates, safety guards, and notifications.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "HelloWind",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.38",
|
|
4
4
|
"description": "HelloAGENTS — Quality-driven orchestration kernel for AI CLIs with intelligent routing, unified QA gates, safety guards, and notifications.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "HelloWind",
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**A workflow layer for AI coding CLIs: skills, project knowledge, delivery checks, safer config writes, and resumable execution.**
|
|
10
10
|
|
|
11
|
-
[](./package.json)
|
|
12
12
|
[](https://www.npmjs.com/package/helloagents)
|
|
13
13
|
[](./package.json)
|
|
14
14
|
[](./skills)
|
|
@@ -184,10 +184,12 @@ Long tasks need a small recovery snapshot, but one shared state file is not safe
|
|
|
184
184
|
|
|
185
185
|
HelloAGENTS now resolves the current state file from `state_path`:
|
|
186
186
|
|
|
187
|
-
- with a stable session id: `.helloagents/sessions/<workspace>/<session>/STATE.md`
|
|
188
|
-
-
|
|
187
|
+
- with a stable or reusable session id: `.helloagents/sessions/<workspace>/<session>/STATE.md`
|
|
188
|
+
- before a reusable session id is available: `.helloagents/sessions/<workspace>/default/STATE.md`
|
|
189
189
|
|
|
190
|
-
`<workspace>` is the current Git branch, `detached-<sha>` for a detached HEAD, or `workspace` for non-Git projects. `.helloagents/sessions/active.json` only
|
|
190
|
+
`<workspace>` is the current Git branch, `detached-<sha>` for a detached HEAD, or `workspace` for non-Git projects. `<session>` is the current project-local session token. `.helloagents/sessions/active.json` only keeps the latest active workspace/session mapping plus alias bridges, so the same CLI session stays in one directory and `/resume` can reuse it.
|
|
191
|
+
|
|
192
|
+
For project-local sessions, HelloAGENTS first uses stable host identifiers such as `sessionId`, `conversationId`, `threadId`, or `HELLOAGENTS_NOTIFY_SESSION_ID`. If the host only exposes a window or terminal id such as `WT_SESSION`, `TERM_SESSION_ID`, or `WINDOWID`, HelloAGENTS uses it only as a lightweight alias bridge and reuses the mapped session first instead of fanning out duplicate directories.
|
|
191
193
|
|
|
192
194
|
`STATE.md` records where the current workflow stopped. It is not a universal memory file for every conversation. Codex `/goal` does not replace `state_path`, `turn-state`, or local evidence files; it only handles long-running continuation on the Codex side.
|
|
193
195
|
|
|
@@ -198,14 +200,19 @@ HelloAGENTS does not treat “tests passed” and “task complete” as the sam
|
|
|
198
200
|
Runtime state now stays intentionally small:
|
|
199
201
|
|
|
200
202
|
- `.helloagents/sessions/<workspace>/<session>/STATE.md`
|
|
203
|
+
- `.helloagents/sessions/<workspace>/<session>/runtime.json`
|
|
201
204
|
- `.helloagents/sessions/active.json`
|
|
202
205
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/qa-review.json`
|
|
203
206
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/advisor.json`
|
|
204
207
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/visual.json`
|
|
205
208
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/closeout.json`
|
|
209
|
+
- optional `.helloagents/sessions/<workspace>/<session>/events.jsonl`
|
|
206
210
|
- `~/.codex/.helloagents/notify-state.json` for Codex-native closeout de-duplication only
|
|
207
211
|
|
|
208
|
-
`
|
|
212
|
+
`STATE.md` only keeps the human-readable recovery snapshot. `runtime.json` is machine-only and keeps the minimal runtime state. `artifacts/*.json` stays limited to structured receipts. `events.jsonl` remains opt-in trace output and stays off by default.
|
|
213
|
+
Project-local `STATE.md` is now materialized more lazily, and legacy root-level `.helloagents/artifacts/*.log` files are cleaned up automatically instead of growing as a second history system.
|
|
214
|
+
|
|
215
|
+
Standard runtime evidence and transient runtime state now expire after 72 hours. Long-running Codex goal flows still keep their 720-hour upper bound where the workflow explicitly needs it.
|
|
209
216
|
|
|
210
217
|
Delivery gate, guard, and QA gate messages use action-oriented wording such as processing path, closeout action, and visual validation action, so blocked flows show what to do next without turning executable steps into optional suggestions. Final closeout also enforces a single HelloAGENTS wrapper, so one reply does not emit duplicate closeout headers.
|
|
211
218
|
That wrapper is now reserved for direct final-user delivery only. Intermediate reports, delegated task results, and sub-agent replies stay natural, and sub-agent stop hooks reject wrapped closeout replies.
|
|
@@ -304,7 +311,7 @@ If you omit `--standby` or `--global`, HelloAGENTS first reuses the tracked/dete
|
|
|
304
311
|
|
|
305
312
|
### npm and one-shot script entries
|
|
306
313
|
|
|
307
|
-
Use these when you do not want to depend on the `helloagents` binary being available during package updates. In `HELLOAGENTS=target[:mode]`, target can be `all`, `claude`, `gemini`, or `codex`; mode can be `standby` or `global`. For install, an omitted mode is treated as `standby`. For update, cleanup, uninstall, and branch switching, an omitted mode is forwarded unchanged so HelloAGENTS can reuse the tracked or detected mode for that CLI first. For a custom tarball or package spec, set `HELLOAGENTS_PACKAGE` instead of `HELLOAGENTS_BRANCH`. For a guaranteed refresh of an already installed package, prefer `npm explore -g helloagents -- npm run sync-hosts -- ...` after the package command.
|
|
314
|
+
Use these when you do not want to depend on the `helloagents` binary being available during package updates. In `HELLOAGENTS=target[:mode]`, target can be `all`, `claude`, `gemini`, or `codex`; mode can be `standby` or `global`. For install, an omitted mode is treated as `standby`. For update, cleanup, uninstall, and branch switching, an omitted mode is forwarded unchanged so HelloAGENTS can reuse the tracked or detected mode for that CLI first. If you do not provide `HELLOAGENTS`, the one-shot install scripts now behave like plain package install: they install or update the package only and do not auto-deploy any host CLI. For a custom tarball or package spec, set `HELLOAGENTS_PACKAGE` instead of `HELLOAGENTS_BRANCH`. For a guaranteed refresh of an already installed package, prefer `npm explore -g helloagents -- npm run sync-hosts -- ...` after the package command.
|
|
308
315
|
|
|
309
316
|
Host configs use the stable `helloagents-js` entrypoint and runtime root `~/.helloagents/helloagents`, so Node global package paths can change without breaking managed hooks or Codex `notify`. Codex hooks use standalone `~/.codex/hooks.json` instead of adding large hook blocks to `config.toml`, and Codex global plugin roots plus plugin cache now link back to that same stable runtime root.
|
|
310
317
|
|
|
@@ -405,7 +412,7 @@ $env:HELLOAGENTS="codex:standby"; $env:HELLOAGENTS_ACTION="cleanup"; irm https:/
|
|
|
405
412
|
$env:HELLOAGENTS="gemini"; $env:HELLOAGENTS_ACTION="uninstall"; irm https://raw.githubusercontent.com/hellowind777/helloagents/main/install.ps1 | iex
|
|
406
413
|
```
|
|
407
414
|
|
|
408
|
-
The shell and PowerShell wrappers now parse `HELLOAGENTS` once, clear lifecycle env before update, branch switching, and uninstall, and then run one explicit sync or cleanup path.
|
|
415
|
+
The shell and PowerShell wrappers now parse `HELLOAGENTS` once, keep plain package install/update behavior when no target is specified, clear lifecycle env before update, branch switching, and uninstall, and then run one explicit sync or cleanup path.
|
|
409
416
|
|
|
410
417
|
### Branch switching
|
|
411
418
|
|
|
@@ -442,12 +449,12 @@ npm uninstall -g helloagents
|
|
|
442
449
|
| Gemini CLI | native extension install | managed by Gemini extension system |
|
|
443
450
|
| Codex CLI | native local-plugin chain | `~/.agents/plugins/marketplace.json`, `~/plugins/helloagents/ -> ~/.helloagents/helloagents`, `~/.codex/plugins/cache/local-plugins/helloagents/local/ -> ~/.helloagents/helloagents`, `~/.codex/config.toml`, `~/.codex/hooks.json`, `~/.codex/helloagents -> ~/.helloagents/helloagents` |
|
|
444
451
|
|
|
445
|
-
In global mode, HelloAGENTS now attempts the host-native install commands automatically. If a host command is unavailable, run the same commands manually:
|
|
452
|
+
In global mode, HelloAGENTS now attempts the host-native install commands automatically. For Claude Code, the marketplace should be added from the Git URL so the plugin source stays on HTTPS and avoids an SSH-only clone during installation. If a host command is unavailable, run the same commands manually:
|
|
446
453
|
|
|
447
454
|
```text
|
|
448
|
-
/plugin marketplace add hellowind777/helloagents
|
|
455
|
+
/plugin marketplace add https://github.com/hellowind777/helloagents.git
|
|
449
456
|
/plugin install helloagents@helloagents
|
|
450
|
-
|
|
457
|
+
helloagents install gemini --global
|
|
451
458
|
```
|
|
452
459
|
|
|
453
460
|
For Claude Code, the CLI also tries the equivalent `claude plugin marketplace add ...` and `claude plugin install ...` commands. The marketplace is named `helloagents`, and the plugin is also named `helloagents`, so the install target is `helloagents@helloagents`. Restart the host CLI after a global install.
|
|
@@ -502,6 +509,7 @@ Runtime state and evidence remain local to the working project:
|
|
|
502
509
|
|
|
503
510
|
- `state_path`
|
|
504
511
|
- `.helloagents/sessions/active.json`
|
|
512
|
+
- `.helloagents/sessions/<workspace>/<session>/runtime.json`
|
|
505
513
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/*.json`
|
|
506
514
|
|
|
507
515
|
### Temporary sessions outside project-local storage
|
|
@@ -512,9 +520,9 @@ For read-only work with no local output, if neither the current directory nor it
|
|
|
512
520
|
~/.helloagents/runtime/<scope-key>/
|
|
513
521
|
```
|
|
514
522
|
|
|
515
|
-
This only stores short-lived `STATE.md` and `artifacts/`. Optional `events.jsonl` trace files are only written when trace mode is enabled. It is not project knowledge. Expired transient sessions are removed by TTL cleanup.
|
|
523
|
+
This only stores short-lived `STATE.md`, `runtime.json`, and `artifacts/`. Optional `events.jsonl` trace files are only written when trace mode is enabled. It is not project knowledge. Expired transient sessions are removed by TTL cleanup.
|
|
516
524
|
|
|
517
|
-
Once the task creates or modifies local files, or otherwise leaves local output in the current project, HelloAGENTS creates the project-local `.helloagents/sessions
|
|
525
|
+
Once the task creates or modifies local files, or otherwise leaves local output in the current project, HelloAGENTS creates the project-local `.helloagents/sessions/<workspace>/<session>/STATE.md` automatically instead of keeping that task only in the user-level transient runtime.
|
|
518
526
|
|
|
519
527
|
### Knowledge creation rules
|
|
520
528
|
|
|
@@ -677,7 +685,7 @@ The current suite covers:
|
|
|
677
685
|
- Codex `/goal` feature toggles, long-running route context, and goal-aware command contracts
|
|
678
686
|
- `helloagents doctor`
|
|
679
687
|
- project storage and `repo-shared` behavior
|
|
680
|
-
- session
|
|
688
|
+
- workspace-session scoped `state_path`, runtime signals, and evidence
|
|
681
689
|
- runtime injection, routing, guard, verification, visual evidence, delivery gates, closeout de-duplication, sub-agent wrapper and notification suppression, and successful-mode tracking after native install failures
|
|
682
690
|
- README and skill contract alignment
|
|
683
691
|
|
package/README_CN.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**面向 AI 编码 CLI 的工作流层:技能、知识库、交付检查、更安全的配置写入,以及可恢复的执行流程。**
|
|
10
10
|
|
|
11
|
-
[](./package.json)
|
|
12
12
|
[](https://www.npmjs.com/package/helloagents)
|
|
13
13
|
[](./package.json)
|
|
14
14
|
[](./skills)
|
|
@@ -184,10 +184,12 @@ HelloAGENTS 可以在 `.helloagents/` 下创建和维护项目知识库。
|
|
|
184
184
|
|
|
185
185
|
HelloAGENTS 现在只从 `state_path` 解析当前状态文件:
|
|
186
186
|
|
|
187
|
-
-
|
|
188
|
-
-
|
|
187
|
+
- 宿主提供稳定会话标识或可复用会话标识时:`.helloagents/sessions/<workspace>/<session>/STATE.md`
|
|
188
|
+
- 暂时还拿不到可复用会话标识时:`.helloagents/sessions/<workspace>/default/STATE.md`
|
|
189
189
|
|
|
190
|
-
`<workspace>` 是当前 Git 分支、detached HEAD 的 `detached-<sha>`,或非 Git 项目的 `workspace
|
|
190
|
+
`<workspace>` 是当前 Git 分支、detached HEAD 的 `detached-<sha>`,或非 Git 项目的 `workspace`。`<session>` 是当前项目本地会话标识。`.helloagents/sessions/active.json` 只保留最近一次活跃的工作区/会话映射和 alias 桥接,这样同一个 CLI 会话会稳定落在同一个目录里,`/resume` 也能复用它。
|
|
191
|
+
|
|
192
|
+
对于项目本地会话目录,HelloAGENTS 会优先使用稳定宿主标识,如 `sessionId`、`conversationId`、`threadId` 或 `HELLOAGENTS_NOTIFY_SESSION_ID`。如果宿主只能提供 `WT_SESSION`、`TERM_SESSION_ID`、`WINDOWID` 这类窗口或终端标识,HelloAGENTS 只把它们当作轻量 alias 桥接,并优先复用已映射的会话目录,而不是继续分裂出重复目录。
|
|
191
193
|
|
|
192
194
|
`STATE.md` 只记录当前工作流做到哪里,不承担所有对话的统一记忆。Codex `/goal` 也不替代 `state_path`、`turn-state` 或本地证据文件;它只负责 Codex 侧的长程续跑。
|
|
193
195
|
|
|
@@ -198,14 +200,19 @@ HelloAGENTS 不把“命令通过”和“任务完成”简单画等号。交
|
|
|
198
200
|
运行态现在尽量收敛,只保留真正有用的文件:
|
|
199
201
|
|
|
200
202
|
- `.helloagents/sessions/<workspace>/<session>/STATE.md`
|
|
203
|
+
- `.helloagents/sessions/<workspace>/<session>/runtime.json`
|
|
201
204
|
- `.helloagents/sessions/active.json`
|
|
202
205
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/qa-review.json`
|
|
203
206
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/advisor.json`
|
|
204
207
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/visual.json`
|
|
205
208
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/closeout.json`
|
|
209
|
+
- 可选 `.helloagents/sessions/<workspace>/<session>/events.jsonl`
|
|
206
210
|
- 仅用于 Codex 原生收尾去重的 `~/.codex/.helloagents/notify-state.json`
|
|
207
211
|
|
|
208
|
-
`
|
|
212
|
+
`STATE.md` 只保留给人看的恢复快照。`runtime.json` 只给机器用,只保存极少量运行态。`artifacts/*.json` 只保留结构化收据。`events.jsonl` 仍是可选 trace 输出,默认不写。
|
|
213
|
+
项目本地 `STATE.md` 现在会更晚创建;旧版残留的项目根 `.helloagents/artifacts/*.log` 也会自动清理,不再继续充当第二套历史系统。
|
|
214
|
+
|
|
215
|
+
标准运行态证据和临时运行态现在默认 72 小时过期。只有工作流明确需要的长程 Codex goal 链路,才继续保留 720 小时上限。
|
|
209
216
|
|
|
210
217
|
交付门控、守卫和 QA gate 提示使用执行性表述,例如处理路径、收尾动作和视觉验收动作。阻塞流程会说明下一步要做什么,而不是把可执行步骤写成泛化建议。最终回复还会强制只保留一个 HelloAGENTS 外层块,避免同一条回复重复输出完成标题。
|
|
211
218
|
这个外层格式现在只保留给直接面向最终用户的终局交付。中间汇报、委派任务结果和子代理回复都保持自然输出;子代理结束钩子也会拦截错误的外层收尾格式。
|
|
@@ -304,7 +311,7 @@ helloagents codex goals enable
|
|
|
304
311
|
|
|
305
312
|
### npm 和一键脚本入口
|
|
306
313
|
|
|
307
|
-
当你不想依赖更新过程中的 `helloagents` 可执行文件时,用 npm 或一键脚本。`HELLOAGENTS=目标[:模式]` 中,目标支持 `all`、`claude`、`gemini`、`codex`;模式支持 `standby`、`global`。用于安装时,省略模式按 `standby` 处理;用于更新、清理、卸载和切换分支时,省略模式会原样下传,让 HelloAGENTS 先复用该 CLI
|
|
314
|
+
当你不想依赖更新过程中的 `helloagents` 可执行文件时,用 npm 或一键脚本。`HELLOAGENTS=目标[:模式]` 中,目标支持 `all`、`claude`、`gemini`、`codex`;模式支持 `standby`、`global`。用于安装时,省略模式按 `standby` 处理;用于更新、清理、卸载和切换分支时,省略模式会原样下传,让 HelloAGENTS 先复用该 CLI 已记录或检测到的模式。如果未提供 `HELLOAGENTS`,一键安装脚本现在会保持“只装包/只升级包”的默认语义,不会自动部署任何宿主 CLI。若要安装自定义 tarball 或包规格,用 `HELLOAGENTS_PACKAGE`,不要写 `HELLOAGENTS_BRANCH`。对于已经装好的包,如需确保宿主一定刷新,优先在包命令后显式执行一次 `npm explore -g helloagents -- npm run sync-hosts -- ...`。
|
|
308
315
|
|
|
309
316
|
宿主配置使用稳定的 `helloagents-js` 入口和运行根目录 `~/.helloagents/helloagents`,Node 全局包路径变化不会破坏受管 hooks 或 Codex `notify`。Codex hooks 使用独立 `~/.codex/hooks.json`,不把大段配置写入 `config.toml`;Codex 全局插件根目录和插件缓存也会回链到这个稳定运行根目录。
|
|
310
317
|
|
|
@@ -405,7 +412,7 @@ $env:HELLOAGENTS="codex:standby"; $env:HELLOAGENTS_ACTION="cleanup"; irm https:/
|
|
|
405
412
|
$env:HELLOAGENTS="gemini"; $env:HELLOAGENTS_ACTION="uninstall"; irm https://raw.githubusercontent.com/hellowind777/helloagents/main/install.ps1 | iex
|
|
406
413
|
```
|
|
407
414
|
|
|
408
|
-
Shell 和 PowerShell 一键脚本现在都会先解析一次 `HELLOAGENTS
|
|
415
|
+
Shell 和 PowerShell 一键脚本现在都会先解析一次 `HELLOAGENTS`;未指定目标时保持普通包安装/升级语义;在更新、切分支和卸载前清掉生命周期环境变量,然后只走一条显式同步或清理链路。
|
|
409
416
|
|
|
410
417
|
### 分支切换
|
|
411
418
|
|
|
@@ -442,12 +449,12 @@ npm uninstall -g helloagents
|
|
|
442
449
|
| Gemini CLI | 原生扩展安装 | 由 Gemini 扩展系统管理 |
|
|
443
450
|
| Codex CLI | 原生本地插件流程 | `~/.agents/plugins/marketplace.json`、`~/plugins/helloagents/ -> ~/.helloagents/helloagents`、`~/.codex/plugins/cache/local-plugins/helloagents/local/ -> ~/.helloagents/helloagents`、`~/.codex/config.toml`、`~/.codex/hooks.json`、`~/.codex/helloagents -> ~/.helloagents/helloagents` |
|
|
444
451
|
|
|
445
|
-
全局模式下,HelloAGENTS
|
|
452
|
+
全局模式下,HelloAGENTS 会自动尝试宿主原生命令。对 Claude Code,marketplace 应使用 Git URL 添加,这样插件安装阶段会继续走 HTTPS,不会落回 SSH-only clone。若宿主命令不可用,再手动执行:
|
|
446
453
|
|
|
447
454
|
```text
|
|
448
|
-
/plugin marketplace add hellowind777/helloagents
|
|
455
|
+
/plugin marketplace add https://github.com/hellowind777/helloagents.git
|
|
449
456
|
/plugin install helloagents@helloagents
|
|
450
|
-
|
|
457
|
+
helloagents install gemini --global
|
|
451
458
|
```
|
|
452
459
|
|
|
453
460
|
Claude Code 会自动尝试等价的 `claude plugin marketplace add ...` 和 `claude plugin install ...` 命令。marketplace 名称和插件名称都是 `helloagents`,所以安装目标是 `helloagents@helloagents`。全局安装后需要重启宿主 CLI。
|
|
@@ -506,6 +513,7 @@ Codex 全局模式由 HelloAGENTS 通过本地插件路径自动安装。
|
|
|
506
513
|
|
|
507
514
|
- `state_path`
|
|
508
515
|
- `.helloagents/sessions/active.json`
|
|
516
|
+
- `.helloagents/sessions/<workspace>/<session>/runtime.json`
|
|
509
517
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/*.json`
|
|
510
518
|
|
|
511
519
|
### 项目本地存储之外的临时会话
|
|
@@ -516,9 +524,9 @@ Codex 全局模式由 HelloAGENTS 通过本地插件路径自动安装。
|
|
|
516
524
|
~/.helloagents/runtime/<scope-key>/
|
|
517
525
|
```
|
|
518
526
|
|
|
519
|
-
这里仅保存短期的 `STATE.md` 和 `artifacts/`。`events.jsonl` 只有在启用 trace 时才会写入,不作为默认运行态文件。它也不属于项目知识库。过期临时会话会按 TTL 清理。
|
|
527
|
+
这里仅保存短期的 `STATE.md`、`runtime.json` 和 `artifacts/`。`events.jsonl` 只有在启用 trace 时才会写入,不作为默认运行态文件。它也不属于项目知识库。过期临时会话会按 TTL 清理。
|
|
520
528
|
|
|
521
|
-
一旦任务会创建或修改本地文件,或会在当前项目留下本地输出,HelloAGENTS 就会自动创建项目本地 `.helloagents/sessions
|
|
529
|
+
一旦任务会创建或修改本地文件,或会在当前项目留下本地输出,HelloAGENTS 就会自动创建项目本地 `.helloagents/sessions/<workspace>/<session>/STATE.md`,而不是只停留在用户级临时运行态。
|
|
522
530
|
|
|
523
531
|
### 知识创建规则
|
|
524
532
|
|
|
@@ -681,7 +689,7 @@ npm test
|
|
|
681
689
|
- Codex `/goal` 功能开关、长程路由上下文和 goal 感知命令契约
|
|
682
690
|
- `helloagents doctor`
|
|
683
691
|
- 项目存储和 `repo-shared`
|
|
684
|
-
-
|
|
692
|
+
- 工作区+会话级 `state_path`、运行态信号和证据
|
|
685
693
|
- 运行时注入、选路、Guard、验证、视觉证据、交付门控、收尾去重、子代理外层格式与通知静默保护,以及原生安装失败后的模式记录
|
|
686
694
|
- README 与 skill 契约一致性
|
|
687
695
|
|
package/bootstrap-lite.md
CHANGED
|
@@ -221,9 +221,9 @@
|
|
|
221
221
|
路径: {CWD}/.helloagents/
|
|
222
222
|
所有文件的创建和更新必须按 templates/ 目录中对应模板的格式执行,不可自由发挥格式。
|
|
223
223
|
- `.helloagents/` 表示项目本地存储路径,负责知识、方案、状态与运行态;它不再作为项目是否已初始化的判定信号
|
|
224
|
-
- `state_path` 指向的状态文件始终保留在项目本地 `.helloagents/sessions/{workspace}/{session}/STATE.md`;当前会话的 `turn-state`、路由上下文和 artifact
|
|
225
|
-
- `state_path`
|
|
226
|
-
- `{workspace}` 为当前 Git 分支、`detached-{sha}` 或非 Git 项目的 `workspace`;`.helloagents/sessions/active.json`
|
|
224
|
+
- `state_path` 指向的状态文件始终保留在项目本地 `.helloagents/sessions/{workspace}/{session}/STATE.md`;当前会话的 `turn-state`、路由上下文和 artifact 索引写入同目录 `runtime.json`,`artifacts/*.json` 仅在需要结构化证据时按需生成,`events.jsonl` 仅在显式 trace 模式下写入
|
|
225
|
+
- `state_path` 是状态文件的唯一位置。宿主提供稳定会话标识时,写入 `.helloagents/sessions/{workspace}/{session}/STATE.md`;没有稳定或可复用会话标识时,写入 `.helloagents/sessions/{workspace}/default/STATE.md`
|
|
226
|
+
- `{workspace}` 为当前 Git 分支、`detached-{sha}` 或非 Git 项目的 `workspace`;`.helloagents/sessions/active.json` 只记录最近一次活跃的工作区/会话映射与 alias 桥接,避免同一 CLI 会话被拆成多个目录
|
|
227
227
|
- 若 helloagents.json 中 `project_store_mode = "repo-shared"`,`context.md`、`guidelines.md`、`CHANGELOG.md`、`verify.yaml`、`DESIGN.md`、`modules/`、`plans/`、`archive/` 改按当前上下文中已注入的“当前项目存储”/“项目知识/方案目录”解析;未注入具体路径时,按当前存储模式自行解析,不要假定这些文件一定实际位于当前工作树中
|
|
228
228
|
templates/ 查找路径(按优先级;首次确定模板根目录后,本会话复用):
|
|
229
229
|
按上文 `~command` 路由中的相同技能根目录规则确定;确定根目录后读取其中的 `templates/`。
|
|
@@ -292,4 +292,3 @@ Tier 3 — 深入特定模块时读取:
|
|
|
292
292
|
|
|
293
293
|
### 项目文件
|
|
294
294
|
根据知识库中的架构描述和模块索引,结合当前任务需求,按需读取相关的项目源码、配置和资源文件。不要一次性读取整个项目,先通过知识库了解项目结构,再有针对性地读取需要的文件。不要把项目级规则文件(`AGENTS.md`、`CLAUDE.md`、`.gemini/GEMINI.md`)当作普通项目文件重复读取。
|
|
295
|
-
|
package/bootstrap.md
CHANGED
|
@@ -290,9 +290,9 @@ hello-* 技能读取路径:`{HELLOAGENTS_READ_ROOT}/skills/{技能名}/SKILL.m
|
|
|
290
290
|
路径: {CWD}/.helloagents/
|
|
291
291
|
所有文件的创建和更新必须按 templates/ 目录中对应模板的格式执行,不可自由发挥格式。
|
|
292
292
|
- `.helloagents/` 表示项目本地存储路径,负责知识、方案、状态与运行态;它不再作为项目是否已初始化的判定信号
|
|
293
|
-
- `state_path` 指向的状态文件始终保留在项目本地 `.helloagents/sessions/{workspace}/{session}/STATE.md`;当前会话的 `turn-state`、路由上下文和 artifact
|
|
294
|
-
- `state_path`
|
|
295
|
-
- `{workspace}` 为当前 Git 分支、`detached-{sha}` 或非 Git 项目的 `workspace`;`.helloagents/sessions/active.json`
|
|
293
|
+
- `state_path` 指向的状态文件始终保留在项目本地 `.helloagents/sessions/{workspace}/{session}/STATE.md`;当前会话的 `turn-state`、路由上下文和 artifact 索引写入同目录 `runtime.json`,`artifacts/*.json` 仅在需要结构化证据时按需生成,`events.jsonl` 仅在显式 trace 模式下写入
|
|
294
|
+
- `state_path` 是状态文件的唯一位置。宿主提供稳定会话标识时,写入 `.helloagents/sessions/{workspace}/{session}/STATE.md`;没有稳定或可复用会话标识时,写入 `.helloagents/sessions/{workspace}/default/STATE.md`
|
|
295
|
+
- `{workspace}` 为当前 Git 分支、`detached-{sha}` 或非 Git 项目的 `workspace`;`.helloagents/sessions/active.json` 只记录最近一次活跃的工作区/会话映射与 alias 桥接,避免同一 CLI 会话被拆成多个目录
|
|
296
296
|
- 若 helloagents.json 中 `project_store_mode = "repo-shared"`,`context.md`、`guidelines.md`、`CHANGELOG.md`、`verify.yaml`、`DESIGN.md`、`modules/`、`plans/`、`archive/` 改按当前上下文中已注入的“当前项目存储”/“项目知识/方案目录”解析;未注入具体路径时,按当前存储模式自行解析,不要假定这些文件一定实际位于当前工作树中
|
|
297
297
|
templates/ 查找路径(按优先级;首次确定模板根目录后,本会话复用):
|
|
298
298
|
按上文相同的技能根目录规则确定;确定根目录后读取其中的 `templates/`。
|
|
@@ -361,4 +361,3 @@ Tier 3 — 深入特定模块时读取:
|
|
|
361
361
|
|
|
362
362
|
### 项目文件
|
|
363
363
|
根据知识库中的架构描述和模块索引,结合当前任务需求,按需读取相关的项目源码、配置和资源文件。不要一次性读取整个项目,先通过知识库了解项目结构,再有针对性地读取需要的文件。不要把项目级规则文件(`AGENTS.md`、`CLAUDE.md`、`.gemini/GEMINI.md`)当作普通项目文件重复读取。
|
|
364
|
-
|
package/gemini-extension.json
CHANGED
package/install.ps1
CHANGED
|
@@ -16,6 +16,7 @@ $Mode = if ($env:HELLOAGENTS_MODE) { $env:HELLOAGENTS_MODE } else { "" }
|
|
|
16
16
|
$Branch = if ($env:HELLOAGENTS_BRANCH) { $env:HELLOAGENTS_BRANCH } else { "" }
|
|
17
17
|
$Package = if ($env:HELLOAGENTS_PACKAGE) { $env:HELLOAGENTS_PACKAGE } else { "" }
|
|
18
18
|
$HasExplicitPackage = [bool]$Package
|
|
19
|
+
$HasExplicitTarget = $false
|
|
19
20
|
|
|
20
21
|
if ($env:HELLOAGENTS) {
|
|
21
22
|
$Parts = $env:HELLOAGENTS.Split(":", 2)
|
|
@@ -26,6 +27,8 @@ if ($env:HELLOAGENTS) {
|
|
|
26
27
|
if (-not $Mode -and $Parts.Count -gt 1) { $Mode = $Parts[1] }
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
$HasExplicitTarget = [bool]$Target
|
|
31
|
+
|
|
29
32
|
if (-not $Target) { $Target = "all" }
|
|
30
33
|
$Target = $Target.ToLowerInvariant()
|
|
31
34
|
if ($Mode) { $Mode = $Mode.ToLowerInvariant() }
|
|
@@ -107,7 +110,9 @@ function Uninstall-Hosts {
|
|
|
107
110
|
|
|
108
111
|
switch ($Action) {
|
|
109
112
|
"install" {
|
|
110
|
-
|
|
113
|
+
if ($HasExplicitTarget) {
|
|
114
|
+
Enable-PostinstallDeploy
|
|
115
|
+
}
|
|
111
116
|
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
112
117
|
}
|
|
113
118
|
"update" {
|
|
@@ -119,7 +124,9 @@ switch ($Action) {
|
|
|
119
124
|
Invoke-Npm -NpmArgs @("install", "-g", "helloagents")
|
|
120
125
|
}
|
|
121
126
|
}
|
|
122
|
-
|
|
127
|
+
if ($HasExplicitTarget) {
|
|
128
|
+
Sync-Hosts
|
|
129
|
+
}
|
|
123
130
|
}
|
|
124
131
|
"cleanup" {
|
|
125
132
|
Cleanup-Hosts
|
package/install.sh
CHANGED
|
@@ -17,6 +17,7 @@ MODE="${HELLOAGENTS_MODE:-}"
|
|
|
17
17
|
BRANCH="${HELLOAGENTS_BRANCH:-}"
|
|
18
18
|
PACKAGE="${HELLOAGENTS_PACKAGE:-}"
|
|
19
19
|
HAS_EXPLICIT_PACKAGE=0
|
|
20
|
+
HAS_EXPLICIT_TARGET=0
|
|
20
21
|
if [ -n "$PACKAGE" ]; then
|
|
21
22
|
HAS_EXPLICIT_PACKAGE=1
|
|
22
23
|
fi
|
|
@@ -35,6 +36,10 @@ if [ -n "${HELLOAGENTS:-}" ]; then
|
|
|
35
36
|
MODE="${MODE:-$SPEC_MODE}"
|
|
36
37
|
fi
|
|
37
38
|
|
|
39
|
+
if [ -n "$TARGET" ]; then
|
|
40
|
+
HAS_EXPLICIT_TARGET=1
|
|
41
|
+
fi
|
|
42
|
+
|
|
38
43
|
TARGET="${TARGET:-all}"
|
|
39
44
|
TARGET="$(printf '%s' "$TARGET" | tr '[:upper:]' '[:lower:]')"
|
|
40
45
|
MODE="$(printf '%s' "$MODE" | tr '[:upper:]' '[:lower:]')"
|
|
@@ -128,7 +133,9 @@ enable_postinstall_deploy() {
|
|
|
128
133
|
|
|
129
134
|
case "$ACTION" in
|
|
130
135
|
install)
|
|
131
|
-
|
|
136
|
+
if [ "$HAS_EXPLICIT_TARGET" -eq 1 ]; then
|
|
137
|
+
enable_postinstall_deploy
|
|
138
|
+
fi
|
|
132
139
|
npm install -g "$PACKAGE"
|
|
133
140
|
;;
|
|
134
141
|
update)
|
|
@@ -137,7 +144,9 @@ case "$ACTION" in
|
|
|
137
144
|
else
|
|
138
145
|
npm update -g helloagents || npm install -g helloagents
|
|
139
146
|
fi
|
|
140
|
-
|
|
147
|
+
if [ "$HAS_EXPLICIT_TARGET" -eq 1 ]; then
|
|
148
|
+
sync_hosts
|
|
149
|
+
fi
|
|
141
150
|
;;
|
|
142
151
|
cleanup)
|
|
143
152
|
cleanup_hosts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "HelloAGENTS — The orchestration kernel that makes any AI CLI smarter. Adds intelligent routing, unified QA gates, safety guards, and notifications.",
|
|
6
6
|
"author": "HelloWind",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process'
|
|
2
2
|
import { existsSync, realpathSync } from 'node:fs'
|
|
3
|
+
import { platform } from 'node:os'
|
|
3
4
|
import { join } from 'node:path'
|
|
4
5
|
|
|
5
6
|
import { CODEX_MARKETPLACE_NAME, CODEX_PLUGIN_CONFIG_HEADER, CODEX_PLUGIN_NAME } from './cli-codex.mjs'
|
|
@@ -147,8 +148,9 @@ function summarizeNativeCodexDoctorOutput(payload = {}) {
|
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
function inspectNativeCodexDoctor(runtime) {
|
|
151
|
+
const command = platform() === 'win32' ? 'codex.cmd' : 'codex'
|
|
150
152
|
try {
|
|
151
|
-
const result = spawnSync(
|
|
153
|
+
const result = spawnSync(command, ['doctor', '--json'], {
|
|
152
154
|
cwd: process.cwd(),
|
|
153
155
|
env: {
|
|
154
156
|
...process.env,
|
|
@@ -158,6 +160,7 @@ function inspectNativeCodexDoctor(runtime) {
|
|
|
158
160
|
},
|
|
159
161
|
encoding: 'utf-8',
|
|
160
162
|
timeout: 20_000,
|
|
163
|
+
shell: platform() === 'win32',
|
|
161
164
|
windowsHide: true,
|
|
162
165
|
})
|
|
163
166
|
|
package/scripts/cli-doctor.mjs
CHANGED
|
@@ -106,8 +106,8 @@ function suggestDoctorFix(host, status, trackedMode) {
|
|
|
106
106
|
return `helloagents update ${host}${trackedMode && trackedMode !== 'none' ? ` --${trackedMode}` : ''}`
|
|
107
107
|
}
|
|
108
108
|
if (status === 'manual-plugin') {
|
|
109
|
-
if (host === 'claude') return '/plugin marketplace add hellowind777/helloagents; /plugin install helloagents@helloagents'
|
|
110
|
-
if (host === 'gemini') return '
|
|
109
|
+
if (host === 'claude') return '/plugin marketplace add https://github.com/hellowind777/helloagents.git; /plugin install helloagents@helloagents'
|
|
110
|
+
if (host === 'gemini') return 'helloagents install gemini --global'
|
|
111
111
|
}
|
|
112
112
|
if (status === 'not-installed') {
|
|
113
113
|
return `helloagents install ${host} --standby`
|
|
@@ -176,7 +176,7 @@ function inspectGeminiDoctor(settings) {
|
|
|
176
176
|
const detectedMode = normalizeDoctorMode(runtime.detectHostMode(host))
|
|
177
177
|
const geminiDir = join(runtime.home, '.gemini')
|
|
178
178
|
const geminiSettings = safeJson(join(geminiDir, 'settings.json')) || {}
|
|
179
|
-
const expectedHooks = readExpectedHooks('hooks.json', '${extensionPath}')
|
|
179
|
+
const expectedHooks = readExpectedHooks('hooks-gemini.json', '${extensionPath}')
|
|
180
180
|
const checks = {
|
|
181
181
|
carrierMarker: (safeRead(join(geminiDir, 'GEMINI.md')) || '').includes('HELLOAGENTS_START'),
|
|
182
182
|
carrierContentMatch: extractManagedCarrierContent(join(geminiDir, 'GEMINI.md'))
|
package/scripts/cli-hosts.mjs
CHANGED
|
@@ -65,7 +65,7 @@ export function installGeminiStandby(home, pkgRoot) {
|
|
|
65
65
|
createLink(pkgRoot, join(geminiDir, 'helloagents'));
|
|
66
66
|
|
|
67
67
|
const settingsPath = join(geminiDir, 'settings.json');
|
|
68
|
-
const hooksData = loadHooksWithCliEntry(pkgRoot, 'hooks.json', '${extensionPath}');
|
|
68
|
+
const hooksData = loadHooksWithCliEntry(pkgRoot, 'hooks-gemini.json', '${extensionPath}');
|
|
69
69
|
if (hooksData) mergeSettingsHooks(settingsPath, hooksData);
|
|
70
70
|
|
|
71
71
|
return true;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process'
|
|
2
|
+
import { platform } from 'node:os'
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
installClaudeStandby,
|
|
@@ -17,23 +18,50 @@ import { getHostLabel } from './cli-host-detect.mjs'
|
|
|
17
18
|
|
|
18
19
|
const CLAUDE_COMMAND = process.env.HELLOAGENTS_CLAUDE_CMD || 'claude'
|
|
19
20
|
const GEMINI_COMMAND = process.env.HELLOAGENTS_GEMINI_CMD || 'gemini'
|
|
20
|
-
const CLAUDE_MARKETPLACE = 'hellowind777/helloagents'
|
|
21
|
+
const CLAUDE_MARKETPLACE = 'https://github.com/hellowind777/helloagents.git'
|
|
21
22
|
const CLAUDE_PLUGIN = 'helloagents@helloagents'
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
function normalizeCommand(command = '') {
|
|
25
|
+
return String(command || '').trim()
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function commandCandidates(command = '') {
|
|
29
|
+
const normalized = normalizeCommand(command)
|
|
30
|
+
if (!normalized) return []
|
|
31
|
+
|
|
32
|
+
if (platform() !== 'win32') return [normalized]
|
|
33
|
+
|
|
34
|
+
const candidates = new Set([normalized])
|
|
35
|
+
if (!/\.(cmd|bat|exe|ps1)$/i.test(normalized)) {
|
|
36
|
+
candidates.add(`${normalized}.cmd`)
|
|
37
|
+
candidates.add(`${normalized}.exe`)
|
|
38
|
+
}
|
|
39
|
+
return [...candidates]
|
|
40
|
+
}
|
|
23
41
|
|
|
24
42
|
function runHostCommand(command, args) {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
const attempts = commandCandidates(command)
|
|
44
|
+
let lastResult = null
|
|
45
|
+
|
|
46
|
+
for (const candidate of attempts) {
|
|
47
|
+
const needsShell = process.platform === 'win32' && /\.(cmd|bat)$/i.test(candidate)
|
|
48
|
+
const result = spawnSync(candidate, args, {
|
|
49
|
+
encoding: 'utf-8',
|
|
50
|
+
errors: 'replace',
|
|
51
|
+
shell: needsShell,
|
|
52
|
+
windowsHide: true,
|
|
53
|
+
})
|
|
54
|
+
lastResult = result
|
|
55
|
+
if (!result.error || !['ENOENT', 'EINVAL'].includes(result.error.code)) {
|
|
56
|
+
break
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const errorMessage = lastResult?.error?.message || ''
|
|
33
61
|
return {
|
|
34
|
-
ok:
|
|
35
|
-
missing:
|
|
36
|
-
output: `${
|
|
62
|
+
ok: lastResult?.status === 0,
|
|
63
|
+
missing: ['ENOENT', 'EINVAL'].includes(lastResult?.error?.code || ''),
|
|
64
|
+
output: `${lastResult?.stdout || ''}${lastResult?.stderr || ''}${errorMessage}`.trim(),
|
|
37
65
|
}
|
|
38
66
|
}
|
|
39
67
|
|
|
@@ -60,8 +88,8 @@ function installClaudeGlobalPlugin() {
|
|
|
60
88
|
return { ok: install.ok, output: install.output || add.output }
|
|
61
89
|
}
|
|
62
90
|
|
|
63
|
-
function installGeminiGlobalExtension() {
|
|
64
|
-
return runHostCommand(GEMINI_COMMAND, ['extensions', '
|
|
91
|
+
function installGeminiGlobalExtension(runtimeRoot) {
|
|
92
|
+
return runHostCommand(GEMINI_COMMAND, ['extensions', 'link', runtimeRoot])
|
|
65
93
|
}
|
|
66
94
|
|
|
67
95
|
function removeClaudeGlobalPlugin() {
|
|
@@ -150,18 +178,18 @@ function installHostGlobal(runtime, host) {
|
|
|
150
178
|
installClaudeGlobalPlugin(),
|
|
151
179
|
'已自动安装 Claude Code 插件;重启 Claude Code 后生效',
|
|
152
180
|
'Claude Code plugin installed automatically; restart Claude Code to apply',
|
|
153
|
-
'Claude Code 插件自动安装失败,请在 Claude Code 中执行: /plugin marketplace add hellowind777/helloagents;/plugin install helloagents@helloagents',
|
|
154
|
-
'Claude Code plugin auto-install failed. Run inside Claude Code: /plugin marketplace add hellowind777/helloagents; /plugin install helloagents@helloagents',
|
|
181
|
+
'Claude Code 插件自动安装失败,请在 Claude Code 中执行: /plugin marketplace add https://github.com/hellowind777/helloagents.git;/plugin install helloagents@helloagents',
|
|
182
|
+
'Claude Code plugin auto-install failed. Run inside Claude Code: /plugin marketplace add https://github.com/hellowind777/helloagents.git; /plugin install helloagents@helloagents',
|
|
155
183
|
)
|
|
156
184
|
}
|
|
157
185
|
if (host === 'gemini') {
|
|
158
186
|
uninstallGeminiStandby(runtime.home)
|
|
159
187
|
return buildNativeResult(
|
|
160
|
-
installGeminiGlobalExtension(),
|
|
188
|
+
installGeminiGlobalExtension(runtime.pkgRoot),
|
|
161
189
|
'已自动安装 Gemini CLI 扩展;重启 Gemini CLI 后生效',
|
|
162
190
|
'Gemini CLI extension installed automatically; restart Gemini CLI to apply',
|
|
163
|
-
|
|
164
|
-
|
|
191
|
+
`Gemini CLI 扩展自动安装失败,请手动执行: gemini extensions link ${runtime.pkgRoot}`,
|
|
192
|
+
`Gemini CLI extension auto-install failed. Run manually: gemini extensions link ${runtime.pkgRoot}`,
|
|
165
193
|
)
|
|
166
194
|
}
|
|
167
195
|
uninstallCodexStandby(runtime.home)
|
package/scripts/cli-messages.mjs
CHANGED
|
@@ -21,9 +21,9 @@ function codexGlobalStatus({ home, msg }) {
|
|
|
21
21
|
|
|
22
22
|
function pluginCommands() {
|
|
23
23
|
return [
|
|
24
|
-
' Claude Code: /plugin marketplace add hellowind777/helloagents',
|
|
24
|
+
' Claude Code: /plugin marketplace add https://github.com/hellowind777/helloagents.git',
|
|
25
25
|
' /plugin install helloagents@helloagents',
|
|
26
|
-
' Gemini CLI:
|
|
26
|
+
' Gemini CLI: helloagents install gemini --global',
|
|
27
27
|
].join('\n')
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdtempSync, realpathSync, renameSync } from 'node:fs'
|
|
1
|
+
import { copyFileSync, existsSync, mkdtempSync, realpathSync, renameSync } from 'node:fs'
|
|
2
2
|
import { dirname, join, resolve } from 'node:path'
|
|
3
3
|
|
|
4
4
|
import { copyEntries, ensureDir, removeIfExists } from './cli-utils.mjs'
|
|
@@ -63,6 +63,13 @@ function retryTransientFs(operation) {
|
|
|
63
63
|
throw lastError
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
function materializeGeminiHooks(root) {
|
|
67
|
+
const source = join(root, 'hooks', 'hooks-gemini.json')
|
|
68
|
+
const target = join(root, 'hooks', 'hooks.json')
|
|
69
|
+
if (!existsSync(source)) return
|
|
70
|
+
copyFileSync(source, target)
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
/** Sync package runtime files into the stable root without copying repo-only files. */
|
|
67
74
|
export function syncRuntimeRoot(sourceRoot, runtimeRoot) {
|
|
68
75
|
const source = resolve(sourceRoot)
|
|
@@ -77,6 +84,7 @@ export function syncRuntimeRoot(sourceRoot, runtimeRoot) {
|
|
|
77
84
|
|
|
78
85
|
try {
|
|
79
86
|
copyEntries(source, staging, RUNTIME_ROOT_ENTRIES)
|
|
87
|
+
materializeGeminiHooks(staging)
|
|
80
88
|
retryTransientFs(() => {
|
|
81
89
|
removeIfExists(target)
|
|
82
90
|
renameSync(staging, target)
|
package/scripts/notify-sound.mjs
CHANGED
|
@@ -24,7 +24,8 @@ export function buildWindowsSoundCommand(filePath = '') {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function playWindows(filePath) {
|
|
27
|
-
const
|
|
27
|
+
const command = process.platform === 'win32' ? 'powershell.exe' : 'powershell'
|
|
28
|
+
const result = spawnSync(command, [
|
|
28
29
|
'-NoProfile',
|
|
29
30
|
'-c',
|
|
30
31
|
buildWindowsSoundCommand(filePath),
|
package/scripts/notify.mjs
CHANGED
|
@@ -349,6 +349,10 @@ function attachTurnSession(payload = {}, cwd = payload.cwd || process.cwd()) {
|
|
|
349
349
|
allowPpidFallback: !isProjectRuntimeActive(cwd),
|
|
350
350
|
});
|
|
351
351
|
if (!sessionId || payload.sessionId) return payload;
|
|
352
|
+
const aliasSource = String(process.env.HELLOAGENTS_NOTIFY_SESSION_ID || process.env.WT_SESSION || process.env.TERM_SESSION_ID || process.env.WINDOWID || '').trim();
|
|
353
|
+
if (aliasSource) {
|
|
354
|
+
return { ...payload, sessionId, _helloagentsSessionAlias: aliasSource };
|
|
355
|
+
}
|
|
352
356
|
return { ...payload, sessionId };
|
|
353
357
|
}
|
|
354
358
|
|