helloagents 3.0.22 → 3.0.25
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/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +19 -11
- package/README_CN.md +19 -11
- package/bootstrap-lite.md +2 -2
- package/bootstrap.md +2 -2
- package/gemini-extension.json +1 -1
- package/install.ps1 +11 -11
- package/package.json +1 -1
- package/scripts/cli-codex-config.mjs +50 -3
- package/scripts/cli-codex-hooks-state.mjs +264 -0
- package/scripts/cli-codex.mjs +21 -14
- package/scripts/cli-doctor-codex.mjs +26 -3
- package/scripts/cli-host-detect.mjs +3 -3
- package/scripts/cli-lifecycle.mjs +14 -7
- package/scripts/cli-messages.mjs +1 -1
- package/scripts/cli-utils.mjs +4 -3
- package/scripts/delivery-gate.mjs +20 -11
- package/scripts/notify-closeout.mjs +22 -2
- package/scripts/notify-route.mjs +22 -15
- package/scripts/notify-sound.mjs +94 -0
- package/scripts/notify-ui.mjs +43 -11
- package/scripts/notify.mjs +241 -66
- package/scripts/project-session-cleanup.mjs +27 -1
- package/scripts/ralph-loop.mjs +76 -81
- package/scripts/runtime-scope.mjs +45 -17
- package/scripts/session-capsule.mjs +1 -0
- package/scripts/turn-state-cli.mjs +24 -2
- package/scripts/turn-stop-gate.mjs +61 -7
- package/skills/commands/help/SKILL.md +1 -1
- package/skills/helloagents/SKILL.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.25",
|
|
4
4
|
"description": "HelloAGENTS — The orchestration kernel that makes any AI CLI smarter. Adds intelligent routing, quality verification (Ralph Loop), 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.25",
|
|
4
4
|
"description": "HelloAGENTS — Quality-driven orchestration kernel for AI CLIs with intelligent routing, quality verification (Ralph Loop), 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)
|
|
@@ -209,7 +209,7 @@ Runtime evidence files include:
|
|
|
209
209
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/closeout.json`
|
|
210
210
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/loop-results.tsv`
|
|
211
211
|
|
|
212
|
-
Delivery gate, guard, and loop 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.
|
|
212
|
+
Delivery gate, guard, and loop 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.
|
|
213
213
|
|
|
214
214
|
### 7) Safer install, update, cleanup, and diagnostics
|
|
215
215
|
|
|
@@ -220,6 +220,7 @@ The CLI manages host files explicitly:
|
|
|
220
220
|
- `cleanup` removes managed injections and links
|
|
221
221
|
- `uninstall` performs scoped cleanup before package removal
|
|
222
222
|
- `doctor` reports drift in carriers, links, hooks, config entries, plugin roots, cache copies, and versions
|
|
223
|
+
- per-host mode tracking is written only after a host setup succeeds, so failed native global installs do not leave stale mode records
|
|
223
224
|
|
|
224
225
|
## Quick Start
|
|
225
226
|
|
|
@@ -232,7 +233,7 @@ npm install -g helloagents
|
|
|
232
233
|
If another executable named `helloagents` already exists in your `PATH`, use the stable managed-entry alias:
|
|
233
234
|
|
|
234
235
|
```bash
|
|
235
|
-
helloagents-js
|
|
236
|
+
helloagents-js
|
|
236
237
|
```
|
|
237
238
|
|
|
238
239
|
By default, `postinstall` installs the package command, initializes `~/.helloagents/helloagents.json`, and syncs runtime files to `~/.helloagents/helloagents`. No host CLI is deployed unless you set `HELLOAGENTS=target[:mode]`, such as `HELLOAGENTS=codex:global`.
|
|
@@ -312,7 +313,7 @@ If you omit `--standby` or `--global`, HelloAGENTS first reuses the tracked/dete
|
|
|
312
313
|
|
|
313
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`, and defaults to `standby`.
|
|
314
315
|
|
|
315
|
-
Host configs use the stable `helloagents-js
|
|
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.
|
|
316
317
|
|
|
317
318
|
#### npm commands
|
|
318
319
|
|
|
@@ -405,6 +406,8 @@ $env:HELLOAGENTS="codex:standby"; $env:HELLOAGENTS_ACTION="cleanup"; irm https:/
|
|
|
405
406
|
$env:HELLOAGENTS="gemini"; $env:HELLOAGENTS_ACTION="uninstall"; irm https://raw.githubusercontent.com/hellowind777/helloagents/main/install.ps1 | iex
|
|
406
407
|
```
|
|
407
408
|
|
|
409
|
+
The PowerShell wrapper now forwards the same npm arguments as `install.sh`, so install, update, cleanup, uninstall, and `switch-branch` stay on the same lifecycle path.
|
|
410
|
+
|
|
408
411
|
### Branch switching
|
|
409
412
|
|
|
410
413
|
`switch-branch` installs the requested npm/GitHub ref first, then syncs host CLIs through npm scripts so it does not depend on the `helloagents` executable during updates:
|
|
@@ -438,7 +441,7 @@ npm uninstall -g helloagents
|
|
|
438
441
|
|-----|----------------|----------------|
|
|
439
442
|
| Claude Code | native plugin install | managed by Claude Code plugin system |
|
|
440
443
|
| Gemini CLI | native extension install | managed by Gemini extension system |
|
|
441
|
-
| Codex CLI | native local-plugin chain | `~/.agents/plugins/marketplace.json`, `~/plugins/helloagents
|
|
444
|
+
| 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` |
|
|
442
445
|
|
|
443
446
|
In global mode, HelloAGENTS now attempts the host-native install commands automatically. If a host command is unavailable, run the same commands manually:
|
|
444
447
|
|
|
@@ -616,7 +619,7 @@ Default shape:
|
|
|
616
619
|
| `project_store_mode` | `"local"` | `local` or `repo-shared` |
|
|
617
620
|
| `commit_attribution` | `""` | optional text appended to commit messages |
|
|
618
621
|
| `install_mode` | `"standby"` | current default install mode |
|
|
619
|
-
| `host_install_modes` | `{}` | managed per-CLI mode map, such as `{ "codex": "standby" }`; used before falling back to `install_mode` |
|
|
622
|
+
| `host_install_modes` | `{}` | managed per-CLI mode map, such as `{ "codex": "standby" }`; recorded only after successful host setup and used before falling back to `install_mode` |
|
|
620
623
|
|
|
621
624
|
## How Each CLI Is Integrated
|
|
622
625
|
|
|
@@ -640,10 +643,13 @@ Codex is rules-file driven by default.
|
|
|
640
643
|
|
|
641
644
|
- standby writes `~/.codex/AGENTS.md`
|
|
642
645
|
- standby writes a managed `model_instructions_file = "~/.codex/AGENTS.md"`
|
|
643
|
-
- standby writes a managed `notify = ["helloagents-js
|
|
646
|
+
- standby writes a managed `notify = ["helloagents-js", "codex-notify"]` command for closeout notification
|
|
644
647
|
- standby writes silent Codex hooks to `~/.codex/hooks.json`
|
|
648
|
+
- Codex `SessionStart` stays silent and reads the current `~/.helloagents/helloagents.json` at runtime instead of baking a config snapshot into `config.toml`, so first-turn and post-compaction settings stay current
|
|
649
|
+
- install and update also sync HelloAGENTS-managed Codex hook trust state in `~/.codex/config.toml`, so Codex 0.129.0+ does not re-prompt for the managed hooks
|
|
645
650
|
- standby creates `~/.codex/helloagents -> ~/.helloagents/helloagents`
|
|
646
|
-
- global mode installs the native local-plugin chain
|
|
651
|
+
- global mode installs the native local-plugin chain, but keeps `~/.helloagents/helloagents` as the single managed runtime source by linking plugin roots, plugin cache, and `~/.codex/helloagents` back to it
|
|
652
|
+
- cleanup removes only the HelloAGENTS-managed hook trust entries and legacy managed notify residues, while keeping user-owned hook state untouched
|
|
647
653
|
- Codex hooks only synchronize runtime state and enforce Stop gates; they do not inject HelloAGENTS rules or route text through hook output
|
|
648
654
|
- Codex closeout de-duplicates Stop hooks and native `codex-notify`, so one turn does not notify twice
|
|
649
655
|
- `/goal` remains Codex-native. Enable it explicitly with `helloagents codex goals enable` when long-running plan execution is needed
|
|
@@ -657,16 +663,18 @@ Run all tests:
|
|
|
657
663
|
npm test
|
|
658
664
|
```
|
|
659
665
|
|
|
660
|
-
The current suite includes
|
|
666
|
+
The current suite includes 116 tests and covers:
|
|
661
667
|
|
|
662
668
|
- install, update, uninstall, cleanup, and mode switching
|
|
669
|
+
- one-shot PowerShell lifecycle dispatch for install, update, cleanup, uninstall, and branch switching
|
|
663
670
|
- Claude, Gemini, and Codex config merge and restore behavior
|
|
664
|
-
- Codex managed `model_instructions_file`, `notify`, `hooks.json`, local plugin, marketplace, and cache behavior
|
|
671
|
+
- Codex managed `model_instructions_file`, `notify`, `hooks.json`, hook trust state, local plugin, marketplace, and cache behavior
|
|
672
|
+
- Codex cleanup of legacy managed notify variants on Windows and canonical managed notify restoration rules
|
|
665
673
|
- Codex `/goal` feature toggles, long-running route context, and goal-aware command contracts
|
|
666
674
|
- `helloagents doctor`
|
|
667
675
|
- project storage and `repo-shared` behavior
|
|
668
676
|
- session-scoped `state_path`, runtime signals, and evidence
|
|
669
|
-
- runtime routing, guard, verification, visual evidence, and
|
|
677
|
+
- runtime routing, guard, verification, visual evidence, delivery gates, single-wrapper closeout validation, and successful-mode tracking after native install failures
|
|
670
678
|
- README and skill contract alignment
|
|
671
679
|
|
|
672
680
|
## FAQ
|
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)
|
|
@@ -209,7 +209,7 @@ HelloAGENTS 不把“命令通过”和“任务完成”简单画等号。交
|
|
|
209
209
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/closeout.json`
|
|
210
210
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/loop-results.tsv`
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
交付门控、守卫和循环提示使用执行性表述,例如处理路径、收尾动作和视觉验收动作。阻塞流程会说明下一步要做什么,而不是把可执行步骤写成泛化建议。最终收尾还会强制只保留一个 HelloAGENTS 外层块,避免同一条回复重复输出完成标题。
|
|
213
213
|
|
|
214
214
|
### 7)更安全的安装、更新、清理和诊断
|
|
215
215
|
|
|
@@ -220,6 +220,7 @@ CLI 显式管理宿主文件:
|
|
|
220
220
|
- `cleanup` 删除受管注入和链接
|
|
221
221
|
- `uninstall` 在移除包前执行对应清理
|
|
222
222
|
- `doctor` 检查规则文件、链接、hooks、配置项、插件根目录、缓存副本和版本漂移
|
|
223
|
+
- 单 CLI 模式记录只会在宿主安装成功后写入,避免原生全局安装失败后留下错误模式记录
|
|
223
224
|
|
|
224
225
|
## 快速开始
|
|
225
226
|
|
|
@@ -232,7 +233,7 @@ npm install -g helloagents
|
|
|
232
233
|
如果系统里已经有别的 `helloagents` 可执行文件,可以使用稳定的受管入口别名:
|
|
233
234
|
|
|
234
235
|
```bash
|
|
235
|
-
helloagents-js
|
|
236
|
+
helloagents-js
|
|
236
237
|
```
|
|
237
238
|
|
|
238
239
|
默认情况下,`postinstall` 会安装包命令、初始化 `~/.helloagents/helloagents.json`,并把运行时文件同步到 `~/.helloagents/helloagents`。如果希望 npm 在安装或更新后直接部署,设置 `HELLOAGENTS=目标[:模式]`,例如 `HELLOAGENTS=codex:global`。
|
|
@@ -312,7 +313,7 @@ helloagents codex goals enable
|
|
|
312
313
|
|
|
313
314
|
当你不想依赖更新过程中的 `helloagents` 可执行文件时,用 npm 或一键脚本。`HELLOAGENTS=目标[:模式]` 中,目标支持 `all`、`claude`、`gemini`、`codex`;模式支持 `standby`、`global`,省略时默认 `standby`。
|
|
314
315
|
|
|
315
|
-
宿主配置使用稳定的 `helloagents-js
|
|
316
|
+
宿主配置使用稳定的 `helloagents-js` 入口和运行根目录 `~/.helloagents/helloagents`,Node 全局包路径变化不会破坏受管 hooks 或 Codex `notify`。Codex hooks 使用独立 `~/.codex/hooks.json`,不把大段配置写入 `config.toml`;Codex 全局插件根目录和插件缓存也会回链到这个稳定运行根目录。
|
|
316
317
|
|
|
317
318
|
#### npm 命令
|
|
318
319
|
|
|
@@ -405,6 +406,8 @@ $env:HELLOAGENTS="codex:standby"; $env:HELLOAGENTS_ACTION="cleanup"; irm https:/
|
|
|
405
406
|
$env:HELLOAGENTS="gemini"; $env:HELLOAGENTS_ACTION="uninstall"; irm https://raw.githubusercontent.com/hellowind777/helloagents/main/install.ps1 | iex
|
|
406
407
|
```
|
|
407
408
|
|
|
409
|
+
PowerShell 包装脚本现在会传递与 `install.sh` 相同的 npm 参数,因此安装、更新、清理、卸载和 `switch-branch` 走的是同一条生命周期链路。
|
|
410
|
+
|
|
408
411
|
### 分支切换
|
|
409
412
|
|
|
410
413
|
`switch-branch` 会先安装指定 npm/GitHub ref,再通过 npm 脚本同步宿主 CLI,避免依赖更新过程中的 `helloagents` 可执行文件:
|
|
@@ -438,7 +441,7 @@ npm uninstall -g helloagents
|
|
|
438
441
|
|-----|----------|----------|
|
|
439
442
|
| Claude Code | 原生插件安装 | 由 Claude Code 插件系统管理 |
|
|
440
443
|
| Gemini CLI | 原生扩展安装 | 由 Gemini 扩展系统管理 |
|
|
441
|
-
| Codex CLI | 原生本地插件流程 | `~/.agents/plugins/marketplace.json`、`~/plugins/helloagents
|
|
444
|
+
| 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` |
|
|
442
445
|
|
|
443
446
|
全局模式下,HelloAGENTS 会自动尝试宿主原生命令。若宿主命令不可用,再手动执行:
|
|
444
447
|
|
|
@@ -618,7 +621,7 @@ UI 任务遵循以下优先级:
|
|
|
618
621
|
| `project_store_mode` | `"local"` | `local` 或 `repo-shared` |
|
|
619
622
|
| `commit_attribution` | `""` | 提交信息附加署名 |
|
|
620
623
|
| `install_mode` | `"standby"` | 当前默认安装模式 |
|
|
621
|
-
| `host_install_modes` | `{}` | 受管的单 CLI 模式记录,如 `{ "codex": "standby" }
|
|
624
|
+
| `host_install_modes` | `{}` | 受管的单 CLI 模式记录,如 `{ "codex": "standby" }`;仅在宿主安装成功后写入,并优先于 `install_mode` |
|
|
622
625
|
|
|
623
626
|
## 各 CLI 集成方式
|
|
624
627
|
|
|
@@ -642,10 +645,13 @@ Codex 默认走规则文件驱动。
|
|
|
642
645
|
|
|
643
646
|
- 标准模式写入 `~/.codex/AGENTS.md`
|
|
644
647
|
- 标准模式写入受管 `model_instructions_file = "~/.codex/AGENTS.md"`
|
|
645
|
-
- 标准模式写入受管 `notify = ["helloagents-js
|
|
648
|
+
- 标准模式写入受管 `notify = ["helloagents-js", "codex-notify"]` 命令用于收尾通知
|
|
646
649
|
- 标准模式把静默 Codex hooks 写入 `~/.codex/hooks.json`
|
|
650
|
+
- Codex 的 `SessionStart` 保持静默,并在运行时读取当前 `~/.helloagents/helloagents.json`,不会把配置快照固化进 `config.toml`,因此首次对话和上下文压缩后的设置都能保持最新
|
|
651
|
+
- 安装和更新还会把 HelloAGENTS 受管的 Codex hook trust 状态同步到 `~/.codex/config.toml`,因此 Codex 0.129.0+ 不会再对这些受管 hooks 反复提示确认
|
|
647
652
|
- 标准模式创建 `~/.codex/helloagents -> ~/.helloagents/helloagents`
|
|
648
|
-
-
|
|
653
|
+
- 全局模式安装原生本地插件流程,但仍把 `~/.helloagents/helloagents` 作为唯一受管运行时源;插件根目录、插件缓存和 `~/.codex/helloagents` 都会回链到它
|
|
654
|
+
- 清理时只删除 HelloAGENTS 自己写入的 hook trust 条目和旧式受管 notify 残留,不影响用户已有的 hook 状态
|
|
649
655
|
- Codex hooks 只做静默运行态同步和 Stop 门禁,不通过 hook 注入 HelloAGENTS 规则或路由说明
|
|
650
656
|
- Codex 收尾会对 Stop hook 和原生 `codex-notify` 去重,避免同一轮重复通知
|
|
651
657
|
- `/goal` 保持 Codex 原生能力;需要长程执行时,用 `helloagents codex goals enable` 显式启用
|
|
@@ -659,16 +665,18 @@ Codex 默认走规则文件驱动。
|
|
|
659
665
|
npm test
|
|
660
666
|
```
|
|
661
667
|
|
|
662
|
-
当前测试共
|
|
668
|
+
当前测试共 116 项,覆盖:
|
|
663
669
|
|
|
664
670
|
- 安装、更新、卸载、清理和模式切换
|
|
671
|
+
- PowerShell 一键脚本的安装、更新、清理、卸载和分支切换分发链路
|
|
665
672
|
- Claude、Gemini、Codex 的配置合并与恢复
|
|
666
|
-
- Codex 受管 `model_instructions_file`、`notify`、`hooks.json
|
|
673
|
+
- Codex 受管 `model_instructions_file`、`notify`、`hooks.json`、hook trust 状态、本地插件、marketplace 和缓存行为
|
|
674
|
+
- Windows 下 Codex 旧式受管 notify 变体的清理,以及受管 notify 恢复规则
|
|
667
675
|
- Codex `/goal` 功能开关、长程路由上下文和 goal 感知命令契约
|
|
668
676
|
- `helloagents doctor`
|
|
669
677
|
- 项目存储和 `repo-shared`
|
|
670
678
|
- 会话级 `state_path`、运行态信号和证据
|
|
671
|
-
- 运行时选路、Guard
|
|
679
|
+
- 运行时选路、Guard、验证、视觉证据、交付门控、单次收尾包装校验,以及原生安装失败后的模式记录
|
|
672
680
|
- README 与 skill 契约一致性
|
|
673
681
|
|
|
674
682
|
## FAQ
|
package/bootstrap-lite.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
配置文件: ~/.helloagents/helloagents.json
|
|
7
7
|
`output_language` 非空时,所有用户可见文本使用该语言;为空则跟随用户当前语言。
|
|
8
8
|
会话级缓存优先:当前上下文已有"当前用户设置"、原始 JSON 或读取摘要,且覆盖所需配置项时,直接复用。
|
|
9
|
-
|
|
9
|
+
仅在缺少所需项、用户要求刷新,或本轮修改后需要核验时读取;对 Codex 来说,首次对话前若当前上下文仍缺少所需配置项,必须先读取一次 `~/.helloagents/helloagents.json`,压缩/恢复后的首次对话同样先重读一次;输出格式只在缺少 `output_format` 已知值时触发读取。
|
|
10
10
|
同一会话内,同一路径的配置文件、模块、SKILL、模板只读一次并跨轮复用;读取失败必须明示,并按默认值或已知设置执行。
|
|
11
11
|
|
|
12
12
|
## 编码原则
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
图标:💡直接响应 | ⚡快速执行 | 🔵规划流程 | ✅完成 | ❓等待输入 | ⚠️警告 | ❌错误
|
|
117
117
|
|
|
118
118
|
使用约束:
|
|
119
|
-
- 首行必须保留 `【HelloAGENTS】` 和连字符 `-`,不得省略;状态图标与收尾内容必须一致。正文仍在等待用户输入、确认、授权或补充信息(含确认是否执行已给出的方案或修改)时,只能使用 `❓等待输入`;仅在本轮执行已完成且不存在待确认动作时,才能使用
|
|
119
|
+
- 首行必须保留 `【HelloAGENTS】` 和连字符 `-`,不得省略;状态图标与收尾内容必须一致。正文仍在等待用户输入、确认、授权或补充信息(含确认是否执行已给出的方案或修改)时,只能使用 `❓等待输入`;仅在本轮执行已完成且不存在待确认动作时,才能使用 `✅完成`。同一条最终收尾消息只使用一次该格式;若主体需要分段,在同一个外层块内分节,不得在正文中再次输出 `【HelloAGENTS】` 或第二个 `🔄 下一步`。
|
|
120
120
|
- `🔄 下一步` 必须写真正的下一步动作,不写单纯当前状态或条件式能力表述。若正在等待确认,写清待确认动作;若仍有已授权且可继续执行的动作,不得收尾,必须继续执行;若当前任务已完整结束且确无合理后续,可填写“当前任务已完成;无后续动作。”
|
|
121
121
|
|
|
122
122
|
### 收尾状态信号
|
package/bootstrap.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
配置文件: ~/.helloagents/helloagents.json
|
|
7
7
|
`output_language` 非空时,所有用户可见文本使用该语言;为空则跟随用户当前语言。
|
|
8
8
|
会话级缓存优先:当前上下文已有"当前用户设置"、原始 JSON 或读取摘要,且覆盖所需配置项时,直接复用。
|
|
9
|
-
|
|
9
|
+
仅在缺少所需项、用户要求刷新,或本轮修改后需要核验时读取;对 Codex 来说,首次对话前若当前上下文仍缺少所需配置项,必须先读取一次 `~/.helloagents/helloagents.json`,压缩/恢复后的首次对话同样先重读一次;输出格式只在缺少 `output_format` 已知值时触发读取。
|
|
10
10
|
同一会话内,同一路径的配置文件、模块、SKILL、模板只读一次并跨轮复用;读取失败必须明示,并按默认值或已知设置执行。
|
|
11
11
|
|
|
12
12
|
## 编码原则
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
图标:💡直接响应 | ⚡快速执行 | 🔵规划流程 | ✅完成 | ❓等待输入 | ⚠️警告 | ❌错误
|
|
117
117
|
|
|
118
118
|
使用约束:
|
|
119
|
-
- 首行必须保留 `【HelloAGENTS】` 和连字符 `-`,不得省略;状态图标与收尾内容必须一致。正文仍在等待用户输入、确认、授权或补充信息(含确认是否执行已给出的方案或修改)时,只能使用 `❓等待输入`;仅在本轮执行已完成且不存在待确认动作时,才能使用
|
|
119
|
+
- 首行必须保留 `【HelloAGENTS】` 和连字符 `-`,不得省略;状态图标与收尾内容必须一致。正文仍在等待用户输入、确认、授权或补充信息(含确认是否执行已给出的方案或修改)时,只能使用 `❓等待输入`;仅在本轮执行已完成且不存在待确认动作时,才能使用 `✅完成`。同一条最终收尾消息只使用一次该格式;若主体需要分段,在同一个外层块内分节,不得在正文中再次输出 `【HelloAGENTS】` 或第二个 `🔄 下一步`。
|
|
120
120
|
- `🔄 下一步` 必须写真正的下一步动作,不写单纯当前状态或条件式能力表述。若正在等待确认,写清待确认动作;若仍有已授权且可继续执行的动作,不得收尾,必须继续执行;若当前任务已完整结束且确无合理后续,可填写“当前任务已完成;无后续动作。”
|
|
121
121
|
|
|
122
122
|
### 收尾状态信号
|
package/gemini-extension.json
CHANGED
package/install.ps1
CHANGED
|
@@ -47,10 +47,10 @@ if (-not $Package) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
function Invoke-Npm {
|
|
50
|
-
param([string[]]$
|
|
51
|
-
& npm @
|
|
50
|
+
param([string[]]$NpmArgs)
|
|
51
|
+
& npm @NpmArgs
|
|
52
52
|
if ($LASTEXITCODE -ne 0) {
|
|
53
|
-
throw "npm $($
|
|
53
|
+
throw "npm $($NpmArgs -join ' ') failed with exit code $LASTEXITCODE"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -63,9 +63,9 @@ function Enable-PostinstallDeploy {
|
|
|
63
63
|
function Invoke-HostScript {
|
|
64
64
|
param([string]$ScriptName)
|
|
65
65
|
if ($Target -eq "all") {
|
|
66
|
-
Invoke-Npm @("explore", "-g", "helloagents", "--", "npm", "run", $ScriptName, "--", "--all", "--$Mode")
|
|
66
|
+
Invoke-Npm -NpmArgs @("explore", "-g", "helloagents", "--", "npm", "run", $ScriptName, "--", "--all", "--$Mode")
|
|
67
67
|
} else {
|
|
68
|
-
Invoke-Npm @("explore", "-g", "helloagents", "--", "npm", "run", $ScriptName, "--", $Target, "--$Mode")
|
|
68
|
+
Invoke-Npm -NpmArgs @("explore", "-g", "helloagents", "--", "npm", "run", $ScriptName, "--", $Target, "--$Mode")
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -84,15 +84,15 @@ function Uninstall-Hosts {
|
|
|
84
84
|
switch ($Action) {
|
|
85
85
|
"install" {
|
|
86
86
|
Enable-PostinstallDeploy
|
|
87
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
87
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
88
88
|
}
|
|
89
89
|
"update" {
|
|
90
90
|
if ($Branch -or $env:HELLOAGENTS_PACKAGE) {
|
|
91
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
91
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
92
92
|
} else {
|
|
93
93
|
& npm update -g helloagents
|
|
94
94
|
if ($LASTEXITCODE -ne 0) {
|
|
95
|
-
Invoke-Npm @("install", "-g", "helloagents")
|
|
95
|
+
Invoke-Npm -NpmArgs @("install", "-g", "helloagents")
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
Sync-Hosts
|
|
@@ -104,14 +104,14 @@ switch ($Action) {
|
|
|
104
104
|
if (-not $Branch -and -not $env:HELLOAGENTS_PACKAGE) {
|
|
105
105
|
throw "HELLOAGENTS_BRANCH or HELLOAGENTS_PACKAGE is required for switch-branch"
|
|
106
106
|
}
|
|
107
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
107
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
108
108
|
Sync-Hosts
|
|
109
109
|
}
|
|
110
110
|
"branch" {
|
|
111
111
|
if (-not $Branch -and -not $env:HELLOAGENTS_PACKAGE) {
|
|
112
112
|
throw "HELLOAGENTS_BRANCH or HELLOAGENTS_PACKAGE is required for branch"
|
|
113
113
|
}
|
|
114
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
114
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
115
115
|
Sync-Hosts
|
|
116
116
|
}
|
|
117
117
|
"uninstall" {
|
|
@@ -120,7 +120,7 @@ switch ($Action) {
|
|
|
120
120
|
} catch {
|
|
121
121
|
Write-Warning "Failed to cleanup HelloAGENTS host integrations before uninstall: $_"
|
|
122
122
|
}
|
|
123
|
-
Invoke-Npm @("uninstall", "-g", "helloagents")
|
|
123
|
+
Invoke-Npm -NpmArgs @("uninstall", "-g", "helloagents")
|
|
124
124
|
}
|
|
125
125
|
default {
|
|
126
126
|
throw "Unsupported HELLOAGENTS_ACTION: $Action"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "HelloAGENTS — The orchestration kernel that makes any AI CLI smarter. Adds intelligent routing, quality verification (Ralph Loop), safety guards, and notifications.",
|
|
6
6
|
"author": "HelloWind",
|
|
@@ -8,15 +8,22 @@ import {
|
|
|
8
8
|
|
|
9
9
|
export const CODEX_PLUGIN_CONFIG_HEADER = '[plugins."helloagents@local-plugins"]'
|
|
10
10
|
export const CODEX_FEATURES_HEADER = '[features]'
|
|
11
|
+
export const CODEX_TUI_HEADER = '[tui]'
|
|
11
12
|
export const CODEX_MANAGED_TOML_COMMENT = '# helloagents-managed'
|
|
12
13
|
export const CODEX_MANAGED_MODEL_INSTRUCTIONS_PATH = '~/.codex/AGENTS.md'
|
|
13
|
-
export const CODEX_MANAGED_NOTIFY_COMMAND = 'helloagents-js
|
|
14
|
+
export const CODEX_MANAGED_NOTIFY_COMMAND = 'helloagents-js'
|
|
14
15
|
export const CODEX_MANAGED_NOTIFY_VALUE = `["${CODEX_MANAGED_NOTIFY_COMMAND}", "codex-notify"]`
|
|
16
|
+
const CODEX_MANAGED_NOTIFY_LEGACY_VALUES = [
|
|
17
|
+
`["${CODEX_MANAGED_NOTIFY_COMMAND}.cmd", "codex-notify"]`,
|
|
18
|
+
`["${CODEX_MANAGED_NOTIFY_COMMAND}.exe", "codex-notify"]`,
|
|
19
|
+
]
|
|
20
|
+
export const CODEX_MANAGED_TUI_NOTIFICATIONS_VALUE = '["plan-mode-prompt"]'
|
|
15
21
|
export const CODEX_HOOKS_FEATURE_KEY = 'hooks'
|
|
16
22
|
export const CODEX_LEGACY_HOOKS_FEATURE_KEY = 'codex_hooks'
|
|
17
23
|
export const CODEX_GOALS_FEATURE_KEY = 'goals'
|
|
18
24
|
export const CODEX_MANAGED_GOALS_FEATURE_LINE = `${CODEX_GOALS_FEATURE_KEY} = true ${CODEX_MANAGED_TOML_COMMENT}`
|
|
19
25
|
export const CODEX_MANAGED_GOALS_DISABLED_LINE = `${CODEX_GOALS_FEATURE_KEY} = false ${CODEX_MANAGED_TOML_COMMENT}`
|
|
26
|
+
export const CODEX_MANAGED_TUI_NOTIFICATIONS_LINE = `notifications = ${CODEX_MANAGED_TUI_NOTIFICATIONS_VALUE} ${CODEX_MANAGED_TOML_COMMENT}`
|
|
20
27
|
|
|
21
28
|
function normalizePath(value = '') {
|
|
22
29
|
return String(value || '').replace(/\\/g, '/')
|
|
@@ -106,9 +113,17 @@ export function readCodexGoalsFeatureLine(text) {
|
|
|
106
113
|
return readCodexFeatureLine(text, CODEX_GOALS_FEATURE_KEY)
|
|
107
114
|
}
|
|
108
115
|
|
|
116
|
+
export function readCodexTuiNotificationsLine(text) {
|
|
117
|
+
return readCodexSectionLine(text, CODEX_TUI_HEADER, 'notifications')
|
|
118
|
+
}
|
|
119
|
+
|
|
109
120
|
export function readCodexFeatureLine(text, key) {
|
|
121
|
+
return readCodexSectionLine(text, CODEX_FEATURES_HEADER, key)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function readCodexSectionLine(text, headerLine, key) {
|
|
110
125
|
const lines = splitTomlLines(text)
|
|
111
|
-
const bounds = findSectionBounds(lines,
|
|
126
|
+
const bounds = findSectionBounds(lines, headerLine)
|
|
112
127
|
const keyIndex = findSectionKeyIndex(lines, bounds, key)
|
|
113
128
|
return keyIndex >= 0 ? lines[keyIndex].trim() : ''
|
|
114
129
|
}
|
|
@@ -157,7 +172,16 @@ export function isManagedCodexModelInstruction(line = '') {
|
|
|
157
172
|
|
|
158
173
|
export function isManagedCodexNotify(line = '') {
|
|
159
174
|
const value = String(line || '').replace(/\\/g, '/')
|
|
160
|
-
return value.includes(
|
|
175
|
+
return value.includes(CODEX_MANAGED_TOML_COMMENT)
|
|
176
|
+
&& (
|
|
177
|
+
value.includes(CODEX_MANAGED_NOTIFY_VALUE)
|
|
178
|
+
|| CODEX_MANAGED_NOTIFY_LEGACY_VALUES.some((entry) => value.includes(entry))
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function isManagedCodexTuiNotifications(line = '') {
|
|
183
|
+
return String(line || '').includes(CODEX_MANAGED_TUI_NOTIFICATIONS_VALUE)
|
|
184
|
+
&& String(line || '').includes(CODEX_MANAGED_TOML_COMMENT)
|
|
161
185
|
}
|
|
162
186
|
|
|
163
187
|
function isManagedFeatureLine(line = '', key = '') {
|
|
@@ -223,6 +247,29 @@ export function installCodexManagedTopLevelConfig(toml, { modelInstructionsPath
|
|
|
223
247
|
])
|
|
224
248
|
}
|
|
225
249
|
|
|
250
|
+
export function installCodexManagedTuiConfig(text) {
|
|
251
|
+
const currentLine = readCodexTuiNotificationsLine(text)
|
|
252
|
+
if (currentLine && !isManagedCodexTuiNotifications(currentLine)) {
|
|
253
|
+
return normalizeToml(text)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return upsertTomlSectionLine(
|
|
257
|
+
text,
|
|
258
|
+
CODEX_TUI_HEADER,
|
|
259
|
+
'notifications',
|
|
260
|
+
CODEX_MANAGED_TUI_NOTIFICATIONS_LINE,
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function removeCodexManagedTuiConfig(text) {
|
|
265
|
+
return removeTomlSectionLine(
|
|
266
|
+
text,
|
|
267
|
+
CODEX_TUI_HEADER,
|
|
268
|
+
'notifications',
|
|
269
|
+
isManagedCodexTuiNotifications,
|
|
270
|
+
)
|
|
271
|
+
}
|
|
272
|
+
|
|
226
273
|
export function restoreCodexTopLevelConfig(toml, { modelInstructionsLine = '', notifyLine = '' }) {
|
|
227
274
|
return upsertOrderedCodexTopLevelLines(toml, [
|
|
228
275
|
modelInstructionsLine,
|