helloagents 3.0.39 → 3.1.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helloagents",
3
- "version": "3.0.39",
3
+ "version": "3.1.2",
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.39",
3
+ "version": "3.1.2",
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
- [![Version](https://img.shields.io/badge/version-3.0.39-orange.svg)](./package.json)
11
+ [![Version](https://img.shields.io/badge/version-3.1.2-orange.svg)](./package.json)
12
12
  [![npm](https://img.shields.io/npm/v/helloagents.svg)](https://www.npmjs.com/package/helloagents)
13
13
  [![Node](https://img.shields.io/badge/node-%3E%3D18-339933.svg)](./package.json)
14
14
  [![Skills](https://img.shields.io/badge/skills-14-6366f1.svg)](./skills)
@@ -110,6 +110,7 @@ Commands run inside the AI CLI chat with a `~` prefix. The command skill is read
110
110
  | Command | Purpose |
111
111
  |---------|---------|
112
112
  | `~idea` | Lightweight exploration and option comparison; does not write files |
113
+ | `~office` | Worth/scope review before planning; decides whether to do it, how big, and what the smallest wedge is |
113
114
  | `~auto` | Chooses the main path and keeps going until delivery or a real blocker |
114
115
  | `~plan` | Requirements, solution design, task breakdown, and plan package |
115
116
  | `~build` | Implementation from the current request or an existing plan |
@@ -128,6 +129,8 @@ Compatibility aliases:
128
129
  - `~design` → `~plan`
129
130
  - `~review` → `~qa`
130
131
 
132
+ Use `~idea` when you want to compare approaches. Use `~office` when you first need to decide whether the work is worth doing at all, how big it should be, and what the smallest wedge is.
133
+
131
134
  ### 3) Project knowledge base
132
135
 
133
136
  HelloAGENTS can create and maintain a project knowledge base under `.helloagents/`.
@@ -225,8 +228,10 @@ The CLI manages host files explicitly:
225
228
  - `update` refreshes the selected target or all targets
226
229
  - `cleanup` removes managed injections and links
227
230
  - `uninstall` performs scoped cleanup before package removal
228
- - `doctor` reports drift in carriers, links, hooks, config entries, plugin roots, cache copies, and versions; for Codex, it also surfaces native `codex doctor` output when available
231
+ - `doctor` reports drift in carriers, links, hooks, config entries, plugin roots, cache copies, versions, and real Claude/Gemini global install artifacts; for Codex, it also surfaces native `codex doctor` output when available
232
+ - Codex managed `notify = ["helloagents-js", "codex-notify"]` stays portable, and `doctor`, `cleanup`, and `uninstall` also recognize wrapped `--previous-notify` chains used by Codex App / Computer Use
229
233
  - per-host mode tracking is written only after host setup succeeds, and failed native global cleanup keeps the host tracked as `global` instead of silently layering standby on top
234
+ - Windows `.cmd` / `.bat` lifecycle calls now run through an explicit command wrapper, so host installs, branch switching, and doctor flows do not emit Node `DEP0190` shell deprecation warnings
230
235
 
231
236
  ## Quick Start
232
237
 
@@ -313,7 +318,7 @@ If you omit `--standby` or `--global`, HelloAGENTS first reuses the tracked/dete
313
318
 
314
319
  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.
315
320
 
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.
321
+ 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. Claude Code global installs now use a dedicated local marketplace projection under `~/.helloagents/host-projections/claude-marketplace`, and Gemini global extension packaging uses `~/.helloagents/host-projections/gemini`, so host-specific packaging stays isolated from the shared runtime root.
317
322
 
318
323
  #### npm commands
319
324
 
@@ -445,16 +450,16 @@ npm uninstall -g helloagents
445
450
 
446
451
  | CLI | Install method | Files involved |
447
452
  |-----|----------------|----------------|
448
- | Claude Code | native plugin install | managed by Claude Code plugin system |
449
- | Gemini CLI | native extension install | managed by Gemini extension system |
453
+ | Claude Code | native plugin install | `~/.helloagents/host-projections/claude-marketplace`, Claude Code plugin metadata/cache managed by the host |
454
+ | Gemini CLI | native extension install | `~/.helloagents/host-projections/gemini`, `~/.gemini/extensions/helloagents` |
450
455
  | 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` |
451
456
 
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:
457
+ In global mode, HelloAGENTS now attempts the host-native install commands automatically. Claude Code uses the local marketplace projection, Gemini uses the local extension projection, and Codex keeps linking back to the same stable runtime root, so install, update, branch switching, mode switching, cleanup, and uninstall all refresh against one consistent runtime copy. If a host command is unavailable, run the same commands manually:
453
458
 
454
459
  ```text
455
- /plugin marketplace add https://github.com/hellowind777/helloagents.git
460
+ /plugin marketplace add "~/.helloagents/host-projections/claude-marketplace"
456
461
  /plugin install helloagents@helloagents
457
- helloagents install gemini --global
462
+ gemini extensions link "~/.helloagents/host-projections/gemini"
458
463
  ```
459
464
 
460
465
  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.
@@ -470,6 +475,7 @@ Codex global mode is installed by HelloAGENTS automatically through the local-pl
470
475
  | Goal | Use |
471
476
  |------|-----|
472
477
  | Compare ideas before writing files | `~idea "compare two API designs"` |
478
+ | Decide whether something is worth doing and how small to start | `~office "should this become a full platform or just a thin wedge?"` |
473
479
  | Let HelloAGENTS choose the path and continue | `~auto "add JWT login"` |
474
480
  | Review a plan before implementation | `~plan "refactor payment module"` |
475
481
  | Implement from a clear request or active plan | `~build "finish task 2 in the plan"` |
@@ -652,13 +658,14 @@ Codex is rules-file driven by default.
652
658
 
653
659
  - standby writes `~/.codex/AGENTS.md`
654
660
  - standby writes a portable managed `model_instructions_file = "~/.codex/AGENTS.md"`
655
- - standby writes a managed `notify = ["helloagents-js", "codex-notify"]` command for closeout notification
661
+ - standby writes a managed and portable `notify = ["helloagents-js", "codex-notify"]` command for closeout notification, so reinstalling, updating, or moving to another machine does not require rewriting an absolute path
656
662
  - standby writes silent Codex hooks to `~/.codex/hooks.json`
657
663
  - 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
658
664
  - 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
659
665
  - 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
660
666
  - standby creates `~/.codex/helloagents -> ~/.helloagents/helloagents`
661
667
  - 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
668
+ - `doctor`, `cleanup`, and `uninstall` also recognize wrapped notify chains such as `--previous-notify ["helloagents-js", "codex-notify"]`, so Codex App / Computer Use wrappers do not cause false drift reports or break notify restoration
662
669
  - for Codex app/plugin discovery, `global` is the native path; `standby` remains the lighter default for explicit project work
663
670
  - cleanup removes only the HelloAGENTS-managed hook trust entries, while keeping user-owned hook state untouched
664
671
  - Codex hooks only synchronize runtime state and enforce Stop gates; they do not inject HelloAGENTS rules or route text through hook output
@@ -678,10 +685,11 @@ npm test
678
685
  The current suite covers:
679
686
 
680
687
  - install, update, cleanup, uninstall, branch switching, and mode switching
688
+ - Windows `.cmd` / `.bat` lifecycle dispatch without Node `DEP0190` warnings
681
689
  - one-shot shell and PowerShell lifecycle dispatch, plus wrapper env cleanup and mode-routing rules for install, update, cleanup, uninstall, and branch switching
682
690
  - Claude, Gemini, and Codex host integration behavior, including global-to-standby cleanup and failed native cleanup tracking
683
691
  - Codex managed `model_instructions_file`, `notify`, `hooks.json`, hook trust state, local plugin, marketplace, and cache behavior
684
- - Codex cleanup and canonical managed notify restoration rules
692
+ - Codex cleanup and canonical managed notify restoration rules, including wrapped `--previous-notify` chains
685
693
  - Codex `/goal` feature toggles, long-running route context, and goal-aware command contracts
686
694
  - `helloagents doctor`
687
695
  - project storage and `repo-shared` behavior
package/README_CN.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  **面向 AI 编码 CLI 的工作流层:技能、知识库、交付检查、更安全的配置写入,以及可恢复的执行流程。**
10
10
 
11
- [![Version](https://img.shields.io/badge/version-3.0.39-orange.svg)](./package.json)
11
+ [![Version](https://img.shields.io/badge/version-3.1.2-orange.svg)](./package.json)
12
12
  [![npm](https://img.shields.io/npm/v/helloagents.svg)](https://www.npmjs.com/package/helloagents)
13
13
  [![Node](https://img.shields.io/badge/node-%3E%3D18-339933.svg)](./package.json)
14
14
  [![Skills](https://img.shields.io/badge/skills-14-6366f1.svg)](./skills)
@@ -110,6 +110,7 @@ HelloAGENTS 内置 14 个技能。技能只在当前阶段需要时读取,因
110
110
  | 命令 | 用途 |
111
111
  |------|------|
112
112
  | `~idea` | 轻量探索和方向比较;不写文件 |
113
+ | `~office` | 价值与范围评估;先判断该不该做、该做多大、先做哪一小块 |
113
114
  | `~auto` | 自动选择主路径,并持续推进到交付或真实阻塞 |
114
115
  | `~plan` | 需求、方案、任务拆分和方案包 |
115
116
  | `~build` | 按当前请求或现有方案实现 |
@@ -128,6 +129,8 @@ HelloAGENTS 内置 14 个技能。技能只在当前阶段需要时读取,因
128
129
  - `~design` → `~plan`
129
130
  - `~review` → `~qa`
130
131
 
132
+ `~idea` 适合比较几种方向;`~office` 适合先判断这件事值不值得做、要不要做这么大,以及最小切口应该落在哪里。
133
+
131
134
  ### 3)项目知识库
132
135
 
133
136
  HelloAGENTS 可以在 `.helloagents/` 下创建和维护项目知识库。
@@ -225,8 +228,10 @@ CLI 显式管理宿主文件:
225
228
  - `update` 刷新指定目标或全部目标
226
229
  - `cleanup` 删除受管注入和链接
227
230
  - `uninstall` 在移除包前执行对应清理
228
- - `doctor` 检查规则文件、链接、hooks、配置项、插件根目录、缓存副本和版本漂移;对 Codex 还会在可用时附带原生 `codex doctor` 结果
231
+ - `doctor` 检查规则文件、链接、hooks、配置项、插件根目录、缓存副本、版本漂移,以及 Claude / Gemini 是否真的装上了全局插件或扩展;对 Codex 还会在可用时附带原生 `codex doctor` 结果
232
+ - Codex 受管 `notify = ["helloagents-js", "codex-notify"]` 会继续保持可移植;`doctor`、`cleanup` 和 `uninstall` 也能识别 Codex App / Computer Use 使用的 `--previous-notify` 包装链
229
233
  - 单 CLI 模式记录只会在宿主安装成功后写入;如果原生全局清理失败,也会继续保留 `global` 记录,而不是悄悄叠加 standby
234
+ - Windows 下的 `.cmd` / `.bat` 生命周期调用现在统一走显式命令包装,不再出现 Node `DEP0190` shell 弃用警告
230
235
 
231
236
  ## 快速开始
232
237
 
@@ -313,7 +318,7 @@ helloagents codex goals enable
313
318
 
314
319
  当你不想依赖更新过程中的 `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 -- ...`。
315
320
 
316
- 宿主配置使用稳定的 `helloagents-js` 入口和运行根目录 `~/.helloagents/helloagents`,Node 全局包路径变化不会破坏受管 hooks 或 Codex `notify`。Codex hooks 使用独立 `~/.codex/hooks.json`,不把大段配置写入 `config.toml`;Codex 全局插件根目录和插件缓存也会回链到这个稳定运行根目录。
321
+ 宿主配置使用稳定的 `helloagents-js` 入口和运行根目录 `~/.helloagents/helloagents`,Node 全局包路径变化不会破坏受管 hooks 或 Codex `notify`。Codex hooks 使用独立 `~/.codex/hooks.json`,不把大段配置写入 `config.toml`;Codex 全局插件根目录和插件缓存也会回链到这个稳定运行根目录。Claude Code 的 global 安装现在使用独立本地 marketplace 投影 `~/.helloagents/host-projections/claude-marketplace`,Gemini 的 global 扩展使用 `~/.helloagents/host-projections/gemini`,宿主专用打包链路不再污染共享运行根。
317
322
 
318
323
  #### npm 命令
319
324
 
@@ -445,16 +450,16 @@ npm uninstall -g helloagents
445
450
 
446
451
  | CLI | 安装方式 | 涉及文件 |
447
452
  |-----|----------|----------|
448
- | Claude Code | 原生插件安装 | Claude Code 插件系统管理 |
449
- | Gemini CLI | 原生扩展安装 | Gemini 扩展系统管理 |
453
+ | Claude Code | 原生插件安装 | `~/.helloagents/host-projections/claude-marketplace`,以及由 Claude Code 宿主管理的插件元数据 / 缓存 |
454
+ | Gemini CLI | 原生扩展安装 | `~/.helloagents/host-projections/gemini`、`~/.gemini/extensions/helloagents` |
450
455
  | 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` |
451
456
 
452
- 全局模式下,HelloAGENTS 会自动尝试宿主原生命令。对 Claude Code,marketplace 应使用 Git URL 添加,这样插件安装阶段会继续走 HTTPS,不会落回 SSH-only clone。若宿主命令不可用,再手动执行:
457
+ 全局模式下,HelloAGENTS 会自动尝试宿主原生命令。Claude Code 走本地 marketplace 投影,Gemini 走本地 extension 投影,Codex 继续回链同一个稳定运行根,因此安装、更新、切分支、切模式、清理和卸载都会围绕同一份运行时副本刷新。若宿主命令不可用,再手动执行:
453
458
 
454
459
  ```text
455
- /plugin marketplace add https://github.com/hellowind777/helloagents.git
460
+ /plugin marketplace add "~/.helloagents/host-projections/claude-marketplace"
456
461
  /plugin install helloagents@helloagents
457
- helloagents install gemini --global
462
+ gemini extensions link "~/.helloagents/host-projections/gemini"
458
463
  ```
459
464
 
460
465
  Claude Code 会自动尝试等价的 `claude plugin marketplace add ...` 和 `claude plugin install ...` 命令。marketplace 名称和插件名称都是 `helloagents`,所以安装目标是 `helloagents@helloagents`。全局安装后需要重启宿主 CLI。
@@ -470,6 +475,7 @@ Codex 全局模式由 HelloAGENTS 通过本地插件路径自动安装。
470
475
  | 目标 | 使用 |
471
476
  |------|------|
472
477
  | 写文件前先比较方案 | `~idea "compare two API designs"` |
478
+ | 先判断值不值得做、要不要做这么大 | `~office "should this become a full platform or just a thin wedge?"` |
473
479
  | 让 HelloAGENTS 自己选路并持续推进 | `~auto "add JWT login"` |
474
480
  | 先审查方案再实现 | `~plan "refactor payment module"` |
475
481
  | 按明确请求或活跃方案实现 | `~build "finish task 2 in the plan"` |
@@ -656,13 +662,14 @@ Codex 默认走规则文件驱动。
656
662
 
657
663
  - 标准模式写入 `~/.codex/AGENTS.md`
658
664
  - 标准模式写入可移植的受管 `model_instructions_file = "~/.codex/AGENTS.md"`
659
- - 标准模式写入受管 `notify = ["helloagents-js", "codex-notify"]` 命令用于收尾通知
665
+ - 标准模式写入受管且可移植的 `notify = ["helloagents-js", "codex-notify"]` 命令用于收尾通知,因此重装、更新或换电脑时都不需要改写绝对路径
660
666
  - 标准模式把静默 Codex hooks 写入 `~/.codex/hooks.json`
661
667
  - Codex 的 `SessionStart` 保持静默,并在运行时读取当前 `~/.helloagents/helloagents.json`,不会把配置快照固化进 `config.toml`,因此首次对话和上下文压缩后的设置都能保持最新
662
668
  - 安装和更新还会把 HelloAGENTS 受管的 Codex hook trust 状态同步到 `~/.codex/config.toml`,因此 Codex 0.129.0+ 不会再对这些受管 hooks 反复提示确认
663
669
  - 这些 hook trust 状态是基于当前机器 `~/.codex/hooks.json` 真实绝对路径生成的本机状态;它不同于 `model_instructions_file = "~/.codex/AGENTS.md"` 这类可移植配置,应在每台机器上重新生成
664
670
  - 标准模式创建 `~/.codex/helloagents -> ~/.helloagents/helloagents`
665
671
  - 全局模式安装原生本地插件流程,但仍把 `~/.helloagents/helloagents` 作为唯一受管运行时源;插件根目录、插件缓存和 `~/.codex/helloagents` 都会回链到它
672
+ - `doctor`、`cleanup` 和 `uninstall` 也能识别 `--previous-notify ["helloagents-js", "codex-notify"]` 这类包装后的 notify 链,因此 Codex App / Computer Use 不会再触发误报或破坏 notify 恢复
666
673
  - 如果你主要看重 Codex app / 插件发现链路,优先使用 `global`;如果你主要看重更轻量、更显式的项目工作流,保留 `standby`
667
674
  - 清理时只删除 HelloAGENTS 自己写入的 hook trust 条目,不影响用户已有的 hook 状态
668
675
  - Codex hooks 只做静默运行态同步和 Stop 门禁,不通过 hook 注入 HelloAGENTS 规则或路由说明
@@ -682,10 +689,11 @@ npm test
682
689
  当前测试覆盖:
683
690
 
684
691
  - 安装、更新、清理、卸载、分支切换和模式切换
692
+ - Windows `.cmd` / `.bat` 生命周期分发链路,且不再出现 Node `DEP0190` 警告
685
693
  - shell 与 PowerShell 一键脚本分发链路,以及包装脚本在安装、更新、清理、卸载和分支切换中的环境清理与模式传递规则
686
694
  - Claude、Gemini、Codex 的宿主集成行为,包括全局切回标准模式的清理和原生清理失败时的模式保留
687
695
  - Codex 受管 `model_instructions_file`、`notify`、`hooks.json`、hook trust 状态、本地插件、marketplace 和缓存行为
688
- - Codex 清理链路,以及受管 notify 恢复规则
696
+ - Codex 清理链路,以及包括 wrapped `--previous-notify` 在内的受管 notify 恢复规则
689
697
  - Codex `/goal` 功能开关、长程路由上下文和 goal 感知命令契约
690
698
  - `helloagents doctor`
691
699
  - 项目存储和 `repo-shared`
package/bootstrap-lite.md CHANGED
@@ -192,7 +192,7 @@
192
192
 
193
193
  ## 工作流与完成判定
194
194
  ### 任务分层(Delivery Tier)
195
- - `T0` — 只读分析、创意探索、方案比较 → 自然响应或 `~idea`
195
+ - `T0` — 只读分析、创意探索、方案比较、范围评估 → 自然响应或 `~idea` / `~office`
196
196
  - `T1` — 低风险小改动、明确实现、显式质量闭环、单文件或局部改动 → 直接执行或 `~build` / `~qa`
197
197
  - `T2` — 新项目、从零构建、3+ 文件新功能、架构级变更或需要结构化产物 → `~plan` 或 `~auto`
198
198
  - `T3` — 高风险或不可逆操作(权限、安全、支付、数据库、生产发布等)→ 先 `~plan` / `~prd`,再 `~build` / `~qa`
@@ -235,7 +235,7 @@ templates/ 查找路径(按优先级;首次确定模板根目录后,本会
235
235
  - 强制创建并持续更新:`~init`、`~plan`、`~build`、`~auto`、`~prd`、`~loop`,以及任何会创建/修改本地文件、会在当前工作区留下实际输出或操作记录的非只读任务
236
236
  - 强制更新,不要求首次创建:`~clean`,主代理汇总子代理结果后
237
237
  - 已有则更新:`~qa`、`~test`、`~commit`
238
- - 不创建:`~help`、`~idea`、普通问答、一次性只读任务、子代理自身执行过程、压缩/恢复钩子
238
+ - 不创建:`~help`、`~idea`、`~office`、普通问答、一次性只读任务、子代理自身执行过程、压缩/恢复钩子
239
239
  更新规则:
240
240
  - 属于“强制创建并持续更新”范围且状态文件不存在时,按 templates/STATE.md 创建
241
241
  - 每次更新是重写,不是追加。状态文件只记录当前状态,不记录历史
package/bootstrap.md CHANGED
@@ -192,7 +192,7 @@
192
192
 
193
193
  ## 工作流与完成判定
194
194
  ### 任务分层(Delivery Tier)
195
- - `T0` — 只读分析、创意探索、方案比较 → 自然响应或 `~idea`
195
+ - `T0` — 只读分析、创意探索、方案比较、范围评估 → 自然响应或 `~idea` / `~office`
196
196
  - `T1` — 低风险小改动、明确实现、显式质量闭环、单文件或局部改动 → 直接执行或 `~build` / `~qa`
197
197
  - `T2` — 新项目、从零构建、3+ 文件新功能、架构级变更或需要结构化产物 → `~plan` 或 `~auto`
198
198
  - `T3` — 高风险或不可逆操作(权限、安全、支付、数据库、生产发布等)→ 先 `~plan` / `~prd`,再 `~build` / `~qa`
@@ -202,6 +202,7 @@
202
202
  #### 1. ROUTE / TIER — 路由与分层
203
203
  先判断任务类型、风险等级、是否需要结构化产物,再决定进入哪条路径:
204
204
  - 创意探索 / 方案比较 → `~idea`
205
+ - 值得做与否 / 范围收缩 / 先做多大 → `~office`
205
206
  - 明确实现 / 小范围修复 → `~build`
206
207
  - 为指定模块编写测试 → `~test`
207
208
  - 结构化规划 / 新功能 / 新项目 → `~plan`
@@ -217,7 +218,7 @@
217
218
  - 约束:平台、技术、风险、时间、现有架构
218
219
  - 成功标准:做到什么程度算完成
219
220
 
220
- `~idea` / `~plan` / `~prd` 在此阶段展开探索或需求澄清;`~build` 在需求明确时快速通过。
221
+ `~idea` / `~office` / `~plan` / `~prd` 在此阶段展开探索或需求澄清;`~build` 在需求明确时快速通过。
221
222
 
222
223
  #### 3. PLAN — 规划与上下文准备
223
224
  根据 skills/ 目录下各 hello-* 技能的 SKILL.md frontmatter(name + description),标记本次任务可能需要的技能(不读取文件内容,仅记录名称)。
@@ -239,6 +240,7 @@ hello-* 技能读取路径:`{HELLOAGENTS_READ_ROOT}/skills/{技能名}/SKILL.m
239
240
  - `contract.json` 是方案包的机器契约,至少明确 `qaMode`、`qaFocus`;只有在 T3 / UI / 高风险流程确有收益时,才额外声明 `advisor`;进入质量闭环或最终交付前,优先消费它而不是从自然语言描述里回推执行路径
240
241
  - 涉及 UI 时,设计约束优先级固定为:当前 `plan.md` / PRD UI 决策 → 逻辑 `.helloagents/DESIGN.md`(实际路径按当前项目存储模式解析) → 已读取的 `hello-ui` 规则;同时所有 UI 任务都必须满足 UI 质量基线
241
242
  - `~idea` 在输出比较与推荐后结束,不进入实现,也不创建 `.helloagents/`、状态文件或方案包
243
+ - `~office` 在输出价值/范围判断后结束,不进入实现,也不创建 `.helloagents/`、状态文件或方案包
242
244
 
243
245
  #### 4. BUILD — 实现
244
246
  进入实现时,读取 PLAN 阶段标记的技能 SKILL.md(按上方 hello-* 技能查找路径读取 `skills/{技能名}/SKILL.md`),按其规范执行。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helloagents",
3
- "version": "3.0.39",
3
+ "version": "3.1.2",
4
4
  "description": "Quality-driven orchestration kernel for AI CLIs",
5
5
  "contextFileName": "bootstrap.md",
6
6
  "author": "HelloWind",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helloagents",
3
- "version": "3.0.39",
3
+ "version": "3.1.2",
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,15 +1,12 @@
1
- import { spawnSync } from 'node:child_process'
2
-
3
1
  import { normalizeHost } from './cli-lifecycle.mjs'
2
+ import { spawnCommandSync } from './cli-process.mjs'
4
3
 
5
4
  const DEFAULT_REPO_ARCHIVE_BASE = 'https://github.com/hellowind777/helloagents/archive/refs/heads'
6
5
 
7
6
  function runCommand(command, args) {
8
- const needsShell = process.platform === 'win32' && /\.cmd$/i.test(command)
9
- const result = spawnSync(command, args, {
7
+ const result = spawnCommandSync(command, args, {
10
8
  encoding: 'utf-8',
11
9
  errors: 'replace',
12
- shell: needsShell,
13
10
  stdio: 'inherit',
14
11
  windowsHide: true,
15
12
  })
@@ -24,6 +24,155 @@ function normalizePath(value = '') {
24
24
  return String(value || '').replace(/\\/g, '/')
25
25
  }
26
26
 
27
+ function isManagedCodexNotifyParts(parts) {
28
+ return Array.isArray(parts)
29
+ && parts.length === 2
30
+ && parts[0] === CODEX_MANAGED_NOTIFY_COMMAND
31
+ && parts[1] === 'codex-notify'
32
+ }
33
+
34
+ function extractTomlArrayLiteral(text = '') {
35
+ const source = String(text || '')
36
+ const equalsIndex = source.indexOf('=')
37
+ let quoted = false
38
+ let escaped = false
39
+ let commented = false
40
+ let depth = 0
41
+ let start = -1
42
+
43
+ for (let index = equalsIndex >= 0 ? equalsIndex + 1 : 0; index < source.length; index += 1) {
44
+ const char = source[index]
45
+
46
+ if (commented) {
47
+ if (char === '\n') commented = false
48
+ continue
49
+ }
50
+ if (escaped) {
51
+ escaped = false
52
+ continue
53
+ }
54
+ if (char === '\\' && quoted) {
55
+ escaped = true
56
+ continue
57
+ }
58
+ if (char === '"') {
59
+ quoted = !quoted
60
+ continue
61
+ }
62
+ if (quoted) continue
63
+ if (char === '#') {
64
+ commented = true
65
+ continue
66
+ }
67
+ if (char === '[') {
68
+ if (depth === 0) start = index
69
+ depth += 1
70
+ continue
71
+ }
72
+ if (char === ']' && depth > 0) {
73
+ depth -= 1
74
+ if (depth === 0 && start >= 0) return source.slice(start, index + 1)
75
+ }
76
+ }
77
+
78
+ return ''
79
+ }
80
+
81
+ function parseTomlStringArrayLiteral(literal = '') {
82
+ const source = String(literal || '').trim()
83
+ if (!source.startsWith('[') || !source.endsWith(']')) return null
84
+
85
+ const items = []
86
+ let quoted = false
87
+ let escaped = false
88
+ let tokenStart = -1
89
+
90
+ for (let index = 1; index < source.length; index += 1) {
91
+ const char = source[index]
92
+
93
+ if (quoted) {
94
+ if (escaped) {
95
+ escaped = false
96
+ continue
97
+ }
98
+ if (char === '\\') {
99
+ escaped = true
100
+ continue
101
+ }
102
+ if (char === '"') {
103
+ try {
104
+ items.push(JSON.parse(source.slice(tokenStart, index + 1)))
105
+ } catch {
106
+ return null
107
+ }
108
+ quoted = false
109
+ tokenStart = -1
110
+ }
111
+ continue
112
+ }
113
+
114
+ if (char === '#') {
115
+ while (index < source.length && source[index] !== '\n') index += 1
116
+ continue
117
+ }
118
+ if (/\s|,/.test(char)) continue
119
+ if (char === ']') return items
120
+ if (char !== '"') return null
121
+
122
+ quoted = true
123
+ tokenStart = index
124
+ }
125
+
126
+ return null
127
+ }
128
+
129
+ function analyzeNotifyCommandParts(parts = []) {
130
+ if (isManagedCodexNotifyParts(parts)) {
131
+ return {
132
+ managed: true,
133
+ shape: 'direct',
134
+ containsCodexNotify: true,
135
+ entrypoint: [...parts],
136
+ wrapper: '',
137
+ rawCommand: [...parts],
138
+ }
139
+ }
140
+
141
+ let containsCodexNotify = parts.includes('codex-notify')
142
+ for (let index = 0; index < parts.length - 1; index += 1) {
143
+ if (parts[index] !== '--previous-notify') continue
144
+
145
+ try {
146
+ const nested = JSON.parse(parts[index + 1])
147
+ if (!Array.isArray(nested) || !nested.every((entry) => typeof entry === 'string')) continue
148
+
149
+ const nestedAnalysis = analyzeNotifyCommandParts(nested)
150
+ containsCodexNotify = containsCodexNotify || nestedAnalysis.containsCodexNotify
151
+ if (!nestedAnalysis.managed) continue
152
+
153
+ return {
154
+ managed: true,
155
+ shape: 'chained',
156
+ containsCodexNotify: true,
157
+ entrypoint: [...nestedAnalysis.entrypoint],
158
+ wrapper: parts[0] || '',
159
+ rawCommand: [...parts],
160
+ }
161
+ } catch {
162
+ continue
163
+ }
164
+ }
165
+
166
+ return {
167
+ managed: false,
168
+ shape: parts.length ? 'external' : 'invalid',
169
+ containsCodexNotify,
170
+ entrypoint: [],
171
+ wrapper: '',
172
+ rawCommand: [...parts],
173
+ }
174
+ }
175
+
27
176
  function splitTomlLines(text = '') {
28
177
  return String(text || '').replace(/\r\n/g, '\n').split('\n')
29
178
  }
@@ -158,6 +307,43 @@ export function isManagedCodexNotify(line = '') {
158
307
  && value.includes(CODEX_MANAGED_NOTIFY_VALUE)
159
308
  }
160
309
 
310
+ export function analyzeCodexNotifyBlock(block = '') {
311
+ const source = String(block || '').trim()
312
+ if (!source) {
313
+ return {
314
+ exists: false,
315
+ managed: false,
316
+ containsCodexNotify: false,
317
+ shape: 'missing',
318
+ entrypoint: [],
319
+ wrapper: '',
320
+ rawCommand: [],
321
+ rawBlock: '',
322
+ }
323
+ }
324
+
325
+ const literal = extractTomlArrayLiteral(source)
326
+ const parts = literal ? parseTomlStringArrayLiteral(literal) : null
327
+ if (!parts) {
328
+ return {
329
+ exists: true,
330
+ managed: false,
331
+ containsCodexNotify: source.includes('codex-notify'),
332
+ shape: 'invalid',
333
+ entrypoint: [],
334
+ wrapper: '',
335
+ rawCommand: [],
336
+ rawBlock: source,
337
+ }
338
+ }
339
+
340
+ return {
341
+ exists: true,
342
+ ...analyzeNotifyCommandParts(parts),
343
+ rawBlock: source,
344
+ }
345
+ }
346
+
161
347
  export function isManagedCodexTuiNotifications(line = '') {
162
348
  return String(line || '').includes(CODEX_MANAGED_TUI_NOTIFICATIONS_VALUE)
163
349
  && String(line || '').includes(CODEX_MANAGED_TOML_COMMENT)
@@ -8,6 +8,7 @@ import {
8
8
  } from './cli-utils.mjs';
9
9
  import { ensureTimestampedBackup, readCodexBackup, removeCodexBackup } from './cli-codex-backup.mjs';
10
10
  import {
11
+ analyzeCodexNotifyBlock,
11
12
  CODEX_MANAGED_TOML_COMMENT,
12
13
  CODEX_MANAGED_MODEL_INSTRUCTIONS_PATH,
13
14
  CODEX_PLUGIN_CONFIG_HEADER,
@@ -30,8 +31,10 @@ import {
30
31
  syncManagedCodexHookTrust,
31
32
  } from './cli-codex-hooks-state.mjs';
32
33
  import {
34
+ hasTopLevelTomlBlock,
33
35
  readTopLevelTomlLine,
34
36
  readTopLevelTomlBlock,
37
+ removeTopLevelTomlBlock,
35
38
  removeTopLevelTomlLines,
36
39
  } from './cli-toml.mjs';
37
40
  import { buildRuntimeCarrier, readCarrierSettings } from './cli-runtime-carrier.mjs';
@@ -153,9 +156,10 @@ function cleanupCodexManagedConfig(configPath, { removePluginConfig = false } =
153
156
  const currentModelInstructions = readTopLevelTomlLine(toml, 'model_instructions_file');
154
157
  const currentNotify = readTopLevelTomlBlock(toml, 'notify');
155
158
  const currentCodexGoalsFeature = readCodexGoalsFeatureLine(toml);
159
+ const currentNotifyAnalysis = analyzeCodexNotifyBlock(currentNotify);
156
160
 
157
161
  const shouldRestoreModelInstructions = isManagedCodexModelInstruction(currentModelInstructions);
158
- const shouldRestoreNotify = isManagedCodexNotify(currentNotify);
162
+ const shouldRestoreNotify = currentNotifyAnalysis.managed || isManagedCodexNotify(currentNotify);
159
163
  const shouldRestoreCodexGoalsFeature = isManagedCodexGoalsFeature(currentCodexGoalsFeature);
160
164
 
161
165
  if (removePluginConfig) {
@@ -170,8 +174,10 @@ function cleanupCodexManagedConfig(configPath, { removePluginConfig = false } =
170
174
  line.startsWith('model_instructions_file =') && isManagedCodexModelInstruction(line)).text;
171
175
  }
172
176
  if (shouldRestoreNotify) {
173
- toml = removeTopLevelTomlLines(toml, (line) =>
174
- line.startsWith('notify =') && isManagedCodexNotify(line)).text;
177
+ toml = hasTopLevelTomlBlock(toml, 'notify')
178
+ ? removeTopLevelTomlBlock(toml, 'notify')
179
+ : removeTopLevelTomlLines(toml, (line) =>
180
+ line.startsWith('notify =')).text;
175
181
  }
176
182
 
177
183
  const backupModelInstructions = readTopLevelTomlLine(backupToml, 'model_instructions_file');
@@ -182,7 +188,7 @@ function cleanupCodexManagedConfig(configPath, { removePluginConfig = false } =
182
188
  modelInstructionsLine: shouldRestoreModelInstructions && !isManagedCodexBackupInstruction(backupModelInstructions)
183
189
  ? backupModelInstructions
184
190
  : '',
185
- notifyLine: shouldRestoreNotify && !isManagedCodexNotify(backupNotify)
191
+ notifyLine: shouldRestoreNotify && !analyzeCodexNotifyBlock(backupNotify).managed
186
192
  ? backupNotify
187
193
  : '',
188
194
  });