helloagents 3.0.23 → 3.0.26
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 +18 -10
- package/README_CN.md +18 -10
- package/bootstrap-lite.md +3 -3
- package/bootstrap.md +3 -3
- package/gemini-extension.json +1 -1
- package/install.ps1 +21 -15
- package/install.sh +37 -12
- package/package.json +1 -1
- package/scripts/cli-codex-config.mjs +50 -3
- package/scripts/cli-codex-hooks-state.mjs +271 -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-messages.mjs +2 -2
- 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 +7 -5
- package/skills/commands/help/SKILL.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.26",
|
|
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.26",
|
|
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)
|
|
@@ -233,7 +233,7 @@ npm install -g helloagents
|
|
|
233
233
|
If another executable named `helloagents` already exists in your `PATH`, use the stable managed-entry alias:
|
|
234
234
|
|
|
235
235
|
```bash
|
|
236
|
-
helloagents-js
|
|
236
|
+
helloagents-js
|
|
237
237
|
```
|
|
238
238
|
|
|
239
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`.
|
|
@@ -311,9 +311,9 @@ If you omit `--standby` or `--global`, HelloAGENTS first reuses the tracked/dete
|
|
|
311
311
|
|
|
312
312
|
### npm and one-shot script entries
|
|
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
|
|
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.
|
|
315
315
|
|
|
316
|
-
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.
|
|
317
317
|
|
|
318
318
|
#### npm commands
|
|
319
319
|
|
|
@@ -406,6 +406,8 @@ $env:HELLOAGENTS="codex:standby"; $env:HELLOAGENTS_ACTION="cleanup"; irm https:/
|
|
|
406
406
|
$env:HELLOAGENTS="gemini"; $env:HELLOAGENTS_ACTION="uninstall"; irm https://raw.githubusercontent.com/hellowind777/helloagents/main/install.ps1 | iex
|
|
407
407
|
```
|
|
408
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
|
+
|
|
409
411
|
### Branch switching
|
|
410
412
|
|
|
411
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:
|
|
@@ -439,7 +441,7 @@ npm uninstall -g helloagents
|
|
|
439
441
|
|-----|----------------|----------------|
|
|
440
442
|
| Claude Code | native plugin install | managed by Claude Code plugin system |
|
|
441
443
|
| Gemini CLI | native extension install | managed by Gemini extension system |
|
|
442
|
-
| 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` |
|
|
443
445
|
|
|
444
446
|
In global mode, HelloAGENTS now attempts the host-native install commands automatically. If a host command is unavailable, run the same commands manually:
|
|
445
447
|
|
|
@@ -640,11 +642,15 @@ Default shape:
|
|
|
640
642
|
Codex is rules-file driven by default.
|
|
641
643
|
|
|
642
644
|
- standby writes `~/.codex/AGENTS.md`
|
|
643
|
-
- standby writes a managed `model_instructions_file = "~/.codex/AGENTS.md"`
|
|
644
|
-
- standby writes a managed `notify = ["helloagents-js
|
|
645
|
+
- standby writes a portable managed `model_instructions_file = "~/.codex/AGENTS.md"`
|
|
646
|
+
- standby writes a managed `notify = ["helloagents-js", "codex-notify"]` command for closeout notification
|
|
645
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
|
|
650
|
+
- that hook trust state is machine-local generated metadata derived from the current absolute `~/.codex/hooks.json` path; unlike `model_instructions_file = "~/.codex/AGENTS.md"`, it is not portable config and should be regenerated on each machine
|
|
646
651
|
- standby creates `~/.codex/helloagents -> ~/.helloagents/helloagents`
|
|
647
|
-
- global mode installs the native local-plugin chain
|
|
652
|
+
- 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
|
|
653
|
+
- cleanup removes only the HelloAGENTS-managed hook trust entries and legacy managed notify residues, while keeping user-owned hook state untouched
|
|
648
654
|
- Codex hooks only synchronize runtime state and enforce Stop gates; they do not inject HelloAGENTS rules or route text through hook output
|
|
649
655
|
- Codex closeout de-duplicates Stop hooks and native `codex-notify`, so one turn does not notify twice
|
|
650
656
|
- `/goal` remains Codex-native. Enable it explicitly with `helloagents codex goals enable` when long-running plan execution is needed
|
|
@@ -658,11 +664,13 @@ Run all tests:
|
|
|
658
664
|
npm test
|
|
659
665
|
```
|
|
660
666
|
|
|
661
|
-
The current suite includes
|
|
667
|
+
The current suite includes 118 tests and covers:
|
|
662
668
|
|
|
663
669
|
- install, update, uninstall, cleanup, and mode switching
|
|
670
|
+
- one-shot PowerShell lifecycle dispatch plus shell-wrapper mode-routing rules for install, update, cleanup, uninstall, and branch switching
|
|
664
671
|
- Claude, Gemini, and Codex config merge and restore behavior
|
|
665
|
-
- Codex managed `model_instructions_file`, `notify`, `hooks.json`, local plugin, marketplace, and cache behavior
|
|
672
|
+
- Codex managed `model_instructions_file`, `notify`, `hooks.json`, hook trust state, local plugin, marketplace, and cache behavior
|
|
673
|
+
- Codex cleanup of legacy managed notify variants on Windows and canonical managed notify restoration rules
|
|
666
674
|
- Codex `/goal` feature toggles, long-running route context, and goal-aware command contracts
|
|
667
675
|
- `helloagents doctor`
|
|
668
676
|
- project storage and `repo-shared` behavior
|
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)
|
|
@@ -233,7 +233,7 @@ npm install -g helloagents
|
|
|
233
233
|
如果系统里已经有别的 `helloagents` 可执行文件,可以使用稳定的受管入口别名:
|
|
234
234
|
|
|
235
235
|
```bash
|
|
236
|
-
helloagents-js
|
|
236
|
+
helloagents-js
|
|
237
237
|
```
|
|
238
238
|
|
|
239
239
|
默认情况下,`postinstall` 会安装包命令、初始化 `~/.helloagents/helloagents.json`,并把运行时文件同步到 `~/.helloagents/helloagents`。如果希望 npm 在安装或更新后直接部署,设置 `HELLOAGENTS=目标[:模式]`,例如 `HELLOAGENTS=codex:global`。
|
|
@@ -311,9 +311,9 @@ helloagents codex goals enable
|
|
|
311
311
|
|
|
312
312
|
### npm 和一键脚本入口
|
|
313
313
|
|
|
314
|
-
当你不想依赖更新过程中的 `helloagents` 可执行文件时,用 npm 或一键脚本。`HELLOAGENTS=目标[:模式]` 中,目标支持 `all`、`claude`、`gemini`、`codex`;模式支持 `standby`、`global
|
|
314
|
+
当你不想依赖更新过程中的 `helloagents` 可执行文件时,用 npm 或一键脚本。`HELLOAGENTS=目标[:模式]` 中,目标支持 `all`、`claude`、`gemini`、`codex`;模式支持 `standby`、`global`。用于安装时,省略模式按 `standby` 处理;用于更新、清理、卸载和切换分支时,省略模式会原样下传,让 HelloAGENTS 先复用该 CLI 已记录或检测到的模式。
|
|
315
315
|
|
|
316
|
-
宿主配置使用稳定的 `helloagents-js
|
|
316
|
+
宿主配置使用稳定的 `helloagents-js` 入口和运行根目录 `~/.helloagents/helloagents`,Node 全局包路径变化不会破坏受管 hooks 或 Codex `notify`。Codex hooks 使用独立 `~/.codex/hooks.json`,不把大段配置写入 `config.toml`;Codex 全局插件根目录和插件缓存也会回链到这个稳定运行根目录。
|
|
317
317
|
|
|
318
318
|
#### npm 命令
|
|
319
319
|
|
|
@@ -406,6 +406,8 @@ $env:HELLOAGENTS="codex:standby"; $env:HELLOAGENTS_ACTION="cleanup"; irm https:/
|
|
|
406
406
|
$env:HELLOAGENTS="gemini"; $env:HELLOAGENTS_ACTION="uninstall"; irm https://raw.githubusercontent.com/hellowind777/helloagents/main/install.ps1 | iex
|
|
407
407
|
```
|
|
408
408
|
|
|
409
|
+
PowerShell 包装脚本现在会传递与 `install.sh` 相同的 npm 参数,因此安装、更新、清理、卸载和 `switch-branch` 走的是同一条生命周期链路。
|
|
410
|
+
|
|
409
411
|
### 分支切换
|
|
410
412
|
|
|
411
413
|
`switch-branch` 会先安装指定 npm/GitHub ref,再通过 npm 脚本同步宿主 CLI,避免依赖更新过程中的 `helloagents` 可执行文件:
|
|
@@ -439,7 +441,7 @@ npm uninstall -g helloagents
|
|
|
439
441
|
|-----|----------|----------|
|
|
440
442
|
| Claude Code | 原生插件安装 | 由 Claude Code 插件系统管理 |
|
|
441
443
|
| Gemini CLI | 原生扩展安装 | 由 Gemini 扩展系统管理 |
|
|
442
|
-
| 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` |
|
|
443
445
|
|
|
444
446
|
全局模式下,HelloAGENTS 会自动尝试宿主原生命令。若宿主命令不可用,再手动执行:
|
|
445
447
|
|
|
@@ -642,11 +644,15 @@ UI 任务遵循以下优先级:
|
|
|
642
644
|
Codex 默认走规则文件驱动。
|
|
643
645
|
|
|
644
646
|
- 标准模式写入 `~/.codex/AGENTS.md`
|
|
645
|
-
-
|
|
646
|
-
- 标准模式写入受管 `notify = ["helloagents-js
|
|
647
|
+
- 标准模式写入可移植的受管 `model_instructions_file = "~/.codex/AGENTS.md"`
|
|
648
|
+
- 标准模式写入受管 `notify = ["helloagents-js", "codex-notify"]` 命令用于收尾通知
|
|
647
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 反复提示确认
|
|
652
|
+
- 这些 hook trust 状态是基于当前机器 `~/.codex/hooks.json` 真实绝对路径生成的本机状态;它不同于 `model_instructions_file = "~/.codex/AGENTS.md"` 这类可移植配置,应在每台机器上重新生成
|
|
648
653
|
- 标准模式创建 `~/.codex/helloagents -> ~/.helloagents/helloagents`
|
|
649
|
-
-
|
|
654
|
+
- 全局模式安装原生本地插件流程,但仍把 `~/.helloagents/helloagents` 作为唯一受管运行时源;插件根目录、插件缓存和 `~/.codex/helloagents` 都会回链到它
|
|
655
|
+
- 清理时只删除 HelloAGENTS 自己写入的 hook trust 条目和旧式受管 notify 残留,不影响用户已有的 hook 状态
|
|
650
656
|
- Codex hooks 只做静默运行态同步和 Stop 门禁,不通过 hook 注入 HelloAGENTS 规则或路由说明
|
|
651
657
|
- Codex 收尾会对 Stop hook 和原生 `codex-notify` 去重,避免同一轮重复通知
|
|
652
658
|
- `/goal` 保持 Codex 原生能力;需要长程执行时,用 `helloagents codex goals enable` 显式启用
|
|
@@ -660,11 +666,13 @@ Codex 默认走规则文件驱动。
|
|
|
660
666
|
npm test
|
|
661
667
|
```
|
|
662
668
|
|
|
663
|
-
当前测试共
|
|
669
|
+
当前测试共 118 项,覆盖:
|
|
664
670
|
|
|
665
671
|
- 安装、更新、卸载、清理和模式切换
|
|
672
|
+
- PowerShell 一键脚本分发链路,以及 shell 包装脚本在安装、更新、清理、卸载和分支切换中的模式传递规则
|
|
666
673
|
- Claude、Gemini、Codex 的配置合并与恢复
|
|
667
|
-
- Codex 受管 `model_instructions_file`、`notify`、`hooks.json
|
|
674
|
+
- Codex 受管 `model_instructions_file`、`notify`、`hooks.json`、hook trust 状态、本地插件、marketplace 和缓存行为
|
|
675
|
+
- Windows 下 Codex 旧式受管 notify 变体的清理,以及受管 notify 恢复规则
|
|
668
676
|
- Codex `/goal` 功能开关、长程路由上下文和 goal 感知命令契约
|
|
669
677
|
- `helloagents doctor`
|
|
670
678
|
- 项目存储和 `repo-shared`
|
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
|
## 编码原则
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
### 语言与表述(强制)
|
|
31
31
|
- 所有用户可见文本,包括回复、生成文件、CLI 输出、运行时提示、模板内容、文档与说明,都必须遵守:简洁、自然、准确、合理、不赘述、不冗余、不过度精简
|
|
32
32
|
- 准确优先于压缩:不得为了更短而省略必要的条件、边界、风险、状态、路径、验证结论或下一步动作
|
|
33
|
-
-
|
|
34
|
-
-
|
|
33
|
+
- 不输出黑话、营销话、内部化表述或空泛形容;源码字段名、协议名、命令、路径、配置键等必须保留原名时除外
|
|
34
|
+
- 不输出客套内容、邀约式表述、重复确认、能力陈述或空泛建议
|
|
35
35
|
- 同一概念前后用语保持一致;先给结论再给细节,避免同义反复、重复解释和堆砌近义句
|
|
36
36
|
- 优化既有约束或文案时,优先在原条目内收敛表达;只有边界独立且原条目无法承载时才新增条目,并同步删除重复表述
|
|
37
37
|
|
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
|
## 编码原则
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
### 语言与表述(强制)
|
|
31
31
|
- 所有用户可见文本,包括回复、生成文件、CLI 输出、运行时提示、模板内容、文档与说明,都必须遵守:简洁、自然、准确、合理、不赘述、不冗余、不过度精简
|
|
32
32
|
- 准确优先于压缩:不得为了更短而省略必要的条件、边界、风险、状态、路径、验证结论或下一步动作
|
|
33
|
-
-
|
|
34
|
-
-
|
|
33
|
+
- 不输出黑话、营销话、内部化表述或空泛形容;源码字段名、协议名、命令、路径、配置键等必须保留原名时除外
|
|
34
|
+
- 不输出客套内容、邀约式表述、重复确认、能力陈述或空泛建议
|
|
35
35
|
- 同一概念前后用语保持一致;先给结论再给细节,避免同义反复、重复解释和堆砌近义句
|
|
36
36
|
- 优化既有约束或文案时,优先在原条目内收敛表达;只有边界独立且原条目无法承载时才新增条目,并同步删除重复表述
|
|
37
37
|
|
package/gemini-extension.json
CHANGED
package/install.ps1
CHANGED
|
@@ -26,15 +26,14 @@ if ($env:HELLOAGENTS) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (-not $Target) { $Target = "all" }
|
|
29
|
-
if (-not $Mode) { $Mode = "standby" }
|
|
30
29
|
$Target = $Target.ToLowerInvariant()
|
|
31
|
-
$Mode = $Mode.ToLowerInvariant()
|
|
30
|
+
if ($Mode) { $Mode = $Mode.ToLowerInvariant() }
|
|
32
31
|
|
|
33
32
|
if (@("all", "claude", "gemini", "codex") -notcontains $Target) {
|
|
34
33
|
throw "Unsupported HELLOAGENTS target: $Target"
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
if (@("standby", "global") -notcontains $Mode) {
|
|
36
|
+
if ($Mode -and @("standby", "global") -notcontains $Mode) {
|
|
38
37
|
throw "Unsupported HELLOAGENTS mode: $Mode"
|
|
39
38
|
}
|
|
40
39
|
|
|
@@ -47,26 +46,33 @@ if (-not $Package) {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
function Invoke-Npm {
|
|
50
|
-
param([string[]]$
|
|
51
|
-
& npm @
|
|
49
|
+
param([string[]]$NpmArgs)
|
|
50
|
+
& npm @NpmArgs
|
|
52
51
|
if ($LASTEXITCODE -ne 0) {
|
|
53
|
-
throw "npm $($
|
|
52
|
+
throw "npm $($NpmArgs -join ' ') failed with exit code $LASTEXITCODE"
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
function Enable-PostinstallDeploy {
|
|
58
57
|
$env:HELLOAGENTS_DEPLOY = "1"
|
|
59
58
|
$env:HELLOAGENTS_TARGET = $Target
|
|
60
|
-
|
|
59
|
+
if ($Mode) {
|
|
60
|
+
$env:HELLOAGENTS_MODE = $Mode
|
|
61
|
+
} else {
|
|
62
|
+
$env:HELLOAGENTS_MODE = "standby"
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
function Invoke-HostScript {
|
|
64
67
|
param([string]$ScriptName)
|
|
68
|
+
$scriptArgs = @("explore", "-g", "helloagents", "--", "npm", "run", $ScriptName, "--")
|
|
65
69
|
if ($Target -eq "all") {
|
|
66
|
-
|
|
70
|
+
$scriptArgs += "--all"
|
|
67
71
|
} else {
|
|
68
|
-
|
|
72
|
+
$scriptArgs += $Target
|
|
69
73
|
}
|
|
74
|
+
if ($Mode) { $scriptArgs += "--$Mode" }
|
|
75
|
+
Invoke-Npm -NpmArgs $scriptArgs
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
function Sync-Hosts {
|
|
@@ -84,15 +90,15 @@ function Uninstall-Hosts {
|
|
|
84
90
|
switch ($Action) {
|
|
85
91
|
"install" {
|
|
86
92
|
Enable-PostinstallDeploy
|
|
87
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
93
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
88
94
|
}
|
|
89
95
|
"update" {
|
|
90
96
|
if ($Branch -or $env:HELLOAGENTS_PACKAGE) {
|
|
91
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
97
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
92
98
|
} else {
|
|
93
99
|
& npm update -g helloagents
|
|
94
100
|
if ($LASTEXITCODE -ne 0) {
|
|
95
|
-
Invoke-Npm @("install", "-g", "helloagents")
|
|
101
|
+
Invoke-Npm -NpmArgs @("install", "-g", "helloagents")
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
Sync-Hosts
|
|
@@ -104,14 +110,14 @@ switch ($Action) {
|
|
|
104
110
|
if (-not $Branch -and -not $env:HELLOAGENTS_PACKAGE) {
|
|
105
111
|
throw "HELLOAGENTS_BRANCH or HELLOAGENTS_PACKAGE is required for switch-branch"
|
|
106
112
|
}
|
|
107
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
113
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
108
114
|
Sync-Hosts
|
|
109
115
|
}
|
|
110
116
|
"branch" {
|
|
111
117
|
if (-not $Branch -and -not $env:HELLOAGENTS_PACKAGE) {
|
|
112
118
|
throw "HELLOAGENTS_BRANCH or HELLOAGENTS_PACKAGE is required for branch"
|
|
113
119
|
}
|
|
114
|
-
Invoke-Npm @("install", "-g", $Package)
|
|
120
|
+
Invoke-Npm -NpmArgs @("install", "-g", $Package)
|
|
115
121
|
Sync-Hosts
|
|
116
122
|
}
|
|
117
123
|
"uninstall" {
|
|
@@ -120,7 +126,7 @@ switch ($Action) {
|
|
|
120
126
|
} catch {
|
|
121
127
|
Write-Warning "Failed to cleanup HelloAGENTS host integrations before uninstall: $_"
|
|
122
128
|
}
|
|
123
|
-
Invoke-Npm @("uninstall", "-g", "helloagents")
|
|
129
|
+
Invoke-Npm -NpmArgs @("uninstall", "-g", "helloagents")
|
|
124
130
|
}
|
|
125
131
|
default {
|
|
126
132
|
throw "Unsupported HELLOAGENTS_ACTION: $Action"
|
package/install.sh
CHANGED
|
@@ -32,7 +32,6 @@ if [ -n "${HELLOAGENTS:-}" ]; then
|
|
|
32
32
|
fi
|
|
33
33
|
|
|
34
34
|
TARGET="${TARGET:-all}"
|
|
35
|
-
MODE="${MODE:-standby}"
|
|
36
35
|
TARGET="$(printf '%s' "$TARGET" | tr '[:upper:]' '[:lower:]')"
|
|
37
36
|
MODE="$(printf '%s' "$MODE" | tr '[:upper:]' '[:lower:]')"
|
|
38
37
|
|
|
@@ -41,10 +40,12 @@ case "$TARGET" in
|
|
|
41
40
|
*) echo "Unsupported HELLOAGENTS target: $TARGET" >&2; exit 1 ;;
|
|
42
41
|
esac
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
if [ -n "$MODE" ]; then
|
|
44
|
+
case "$MODE" in
|
|
45
|
+
standby|global) ;;
|
|
46
|
+
*) echo "Unsupported HELLOAGENTS mode: $MODE" >&2; exit 1 ;;
|
|
47
|
+
esac
|
|
48
|
+
fi
|
|
48
49
|
|
|
49
50
|
if [ -z "$PACKAGE" ]; then
|
|
50
51
|
if [ -n "$BRANCH" ]; then
|
|
@@ -56,32 +57,56 @@ fi
|
|
|
56
57
|
|
|
57
58
|
sync_hosts() {
|
|
58
59
|
if [ "$TARGET" = "all" ]; then
|
|
59
|
-
|
|
60
|
+
if [ -n "$MODE" ]; then
|
|
61
|
+
npm explore -g helloagents -- npm run sync-hosts -- --all "--$MODE"
|
|
62
|
+
else
|
|
63
|
+
npm explore -g helloagents -- npm run sync-hosts -- --all
|
|
64
|
+
fi
|
|
60
65
|
else
|
|
61
|
-
|
|
66
|
+
if [ -n "$MODE" ]; then
|
|
67
|
+
npm explore -g helloagents -- npm run sync-hosts -- "$TARGET" "--$MODE"
|
|
68
|
+
else
|
|
69
|
+
npm explore -g helloagents -- npm run sync-hosts -- "$TARGET"
|
|
70
|
+
fi
|
|
62
71
|
fi
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
cleanup_hosts() {
|
|
66
75
|
if [ "$TARGET" = "all" ]; then
|
|
67
|
-
|
|
76
|
+
if [ -n "$MODE" ]; then
|
|
77
|
+
npm explore -g helloagents -- npm run cleanup-hosts -- --all "--$MODE"
|
|
78
|
+
else
|
|
79
|
+
npm explore -g helloagents -- npm run cleanup-hosts -- --all
|
|
80
|
+
fi
|
|
68
81
|
else
|
|
69
|
-
|
|
82
|
+
if [ -n "$MODE" ]; then
|
|
83
|
+
npm explore -g helloagents -- npm run cleanup-hosts -- "$TARGET" "--$MODE"
|
|
84
|
+
else
|
|
85
|
+
npm explore -g helloagents -- npm run cleanup-hosts -- "$TARGET"
|
|
86
|
+
fi
|
|
70
87
|
fi
|
|
71
88
|
}
|
|
72
89
|
|
|
73
90
|
uninstall_hosts() {
|
|
74
91
|
if [ "$TARGET" = "all" ]; then
|
|
75
|
-
|
|
92
|
+
if [ -n "$MODE" ]; then
|
|
93
|
+
npm explore -g helloagents -- npm run uninstall -- --all "--$MODE"
|
|
94
|
+
else
|
|
95
|
+
npm explore -g helloagents -- npm run uninstall -- --all
|
|
96
|
+
fi
|
|
76
97
|
else
|
|
77
|
-
|
|
98
|
+
if [ -n "$MODE" ]; then
|
|
99
|
+
npm explore -g helloagents -- npm run uninstall -- "$TARGET" "--$MODE"
|
|
100
|
+
else
|
|
101
|
+
npm explore -g helloagents -- npm run uninstall -- "$TARGET"
|
|
102
|
+
fi
|
|
78
103
|
fi
|
|
79
104
|
}
|
|
80
105
|
|
|
81
106
|
enable_postinstall_deploy() {
|
|
82
107
|
export HELLOAGENTS_DEPLOY=1
|
|
83
108
|
export HELLOAGENTS_TARGET="$TARGET"
|
|
84
|
-
export HELLOAGENTS_MODE="$MODE"
|
|
109
|
+
export HELLOAGENTS_MODE="${MODE:-standby}"
|
|
85
110
|
}
|
|
86
111
|
|
|
87
112
|
case "$ACTION" in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.26",
|
|
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,
|