helloagents 3.0.8-beta.1 → 3.0.9-beta.1
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 -1
- package/.claude-plugin/plugin.json +6 -6
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +8 -8
- package/README_CN.md +8 -8
- package/bootstrap-lite.md +4 -3
- package/bootstrap.md +5 -4
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/scripts/capability-registry.mjs +5 -5
- package/scripts/cli-codex.mjs +2 -0
- package/scripts/cli-doctor.mjs +6 -1
- package/scripts/cli-host-detect.mjs +18 -2
- package/scripts/delivery-gate.mjs +5 -4
- package/scripts/guard.mjs +5 -4
- package/scripts/notify-context.mjs +28 -26
- package/scripts/notify-route.mjs +5 -2
- package/scripts/notify-source.mjs +3 -60
- package/scripts/notify.mjs +33 -12
- package/scripts/project-storage.mjs +107 -15
- package/scripts/session-token.mjs +73 -0
- package/scripts/workflow-core.mjs +14 -6
- package/scripts/workflow-plan-files.mjs +17 -6
- package/scripts/workflow-state.mjs +12 -12
- package/skills/commands/build/SKILL.md +2 -2
- package/skills/commands/clean/SKILL.md +1 -1
- package/skills/commands/commit/SKILL.md +1 -1
- package/skills/commands/idea/SKILL.md +1 -1
- package/skills/commands/init/SKILL.md +2 -2
- package/skills/commands/loop/SKILL.md +4 -4
- package/skills/commands/plan/SKILL.md +3 -3
- package/skills/commands/prd/SKILL.md +3 -3
- package/skills/commands/wiki/SKILL.md +2 -2
- package/skills/hello-ui/SKILL.md +1 -1
- package/skills/helloagents/SKILL.md +1 -1
|
@@ -9,7 +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
|
-
"version": "3.0.
|
|
12
|
+
"version": "3.0.9-beta.1",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "HelloWind",
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9-beta.1",
|
|
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
|
-
"author":
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "HelloWind",
|
|
7
|
+
"email": "hellowind777@gmail.com"
|
|
8
|
+
},
|
|
6
9
|
"license": "Apache-2.0",
|
|
7
10
|
"keywords": [
|
|
8
11
|
"orchestration",
|
|
@@ -12,10 +15,7 @@
|
|
|
12
15
|
"notification",
|
|
13
16
|
"safety"
|
|
14
17
|
],
|
|
15
|
-
"repository":
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/hellowind777/helloagents.git"
|
|
18
|
-
},
|
|
18
|
+
"repository": "https://github.com/hellowind777/helloagents",
|
|
19
19
|
"skills": "./skills",
|
|
20
20
|
"hooks": "./hooks/hooks-claude.json"
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9-beta.1",
|
|
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
|
**Quality-driven workflow framework for AI coding CLIs — 14 auto-activated skills, process discipline, and checklist-based quality checks.**
|
|
10
10
|
|
|
11
|
-
[](./package.json)
|
|
12
12
|
[](https://www.npmjs.com/package/helloagents)
|
|
13
13
|
[](./package.json)
|
|
14
14
|
[](./skills)
|
|
@@ -95,7 +95,7 @@ HelloAGENTS fixes that. It's a workflow layer that sits on top of your AI CLI an
|
|
|
95
95
|
|
|
96
96
|
If the last version you used seriously was `v2.3.8`, this is not a minor update. The current line is a full product-line reset.
|
|
97
97
|
|
|
98
|
-
| Dimension | v2.3.8 | Local `v3.0.
|
|
98
|
+
| Dimension | v2.3.8 | Local `v3.0.9` |
|
|
99
99
|
|-----------|--------|----------------|
|
|
100
100
|
| **Implementation base** | Python package plus mixed scripts/rules | Pure Node.js + Markdown runtime built around `cli.mjs`, `bootstrap*.md`, `skills/`, and `scripts/` |
|
|
101
101
|
| **Product shape** | More like a multi-CLI management tool plus prompt protocol bundle | More like a quality workflow framework for AI CLIs, centered on routing, checks, verification, and resumable execution |
|
|
@@ -108,7 +108,7 @@ If the last version you used seriously was `v2.3.8`, this is not a minor update.
|
|
|
108
108
|
| **KB storage** | Project-local only | Project-local by default, plus `project_store_mode=repo-shared` for sharing stable KB/plan assets across git worktrees |
|
|
109
109
|
| **Codex integration** | Earlier compatibility layers and legacy paths | Standby = injected rules + local links; global = native local-plugin chain with less noise and drift |
|
|
110
110
|
|
|
111
|
-
In one sentence: `v2.3.8` was closer to "workflow glue for multiple CLIs"; `v3.0.
|
|
111
|
+
In one sentence: `v2.3.8` was closer to "workflow glue for multiple CLIs"; `v3.0.9` is a workflow framework that unifies quality rules, plan files, verification records, and installation lifecycle into one operating model.
|
|
112
112
|
|
|
113
113
|
## ✨ Core Features
|
|
114
114
|
|
|
@@ -304,12 +304,12 @@ HelloAGENTS touches different files depending on mode. The write/cleanup rules a
|
|
|
304
304
|
|-----|------------------------|----------------|
|
|
305
305
|
| Claude Code | Native plugin install (manual CLI command) | Managed by Claude's plugin system |
|
|
306
306
|
| Gemini CLI | Native extension install (manual CLI command) | Managed by Gemini's extension system |
|
|
307
|
-
| Codex CLI | Native local-plugin chain (automatic) | `~/.agents/plugins/marketplace.json`, `~/plugins/helloagents/`, `~/.codex/plugins/cache/local-plugins/helloagents/local/`, `~/.codex/config.toml` |
|
|
307
|
+
| Codex CLI | Native local-plugin chain (automatic) | `~/.agents/plugins/marketplace.json`, `~/plugins/helloagents/`, `~/.codex/plugins/cache/local-plugins/helloagents/local/`, `~/.codex/config.toml`, `~/.codex/helloagents -> ~/plugins/helloagents` |
|
|
308
308
|
|
|
309
309
|
### Update / reinstall / branch-switch behavior
|
|
310
310
|
|
|
311
311
|
- **Standby mode** keeps scripts, skills, templates, and hooks on `~/.claude/helloagents`, `~/.gemini/helloagents`, and `~/.codex/helloagents` symlinks, so linked package files reflect local changes immediately. The injected rules files (`CLAUDE.md`, `GEMINI.md`, `AGENTS.md`) are still snapshots and must be refreshed after bootstrap or branch changes.
|
|
312
|
-
- **Codex global mode** uses copied runtime files. Re-running `helloagents --global` refreshes both `~/plugins/helloagents/` and the Codex cache copy.
|
|
312
|
+
- **Codex global mode** uses copied runtime files and keeps `~/.codex/helloagents -> ~/plugins/helloagents` as the stable read-root fallback expected by bootstrap routing. Re-running `helloagents --global` refreshes both `~/plugins/helloagents/` and the Codex cache copy.
|
|
313
313
|
- Re-running the current mode command is supported intentionally: `helloagents --standby` and `helloagents --global` both act as **switch-or-refresh** commands.
|
|
314
314
|
- For deterministic manual cleanup, run `helloagents cleanup` before `npm uninstall -g helloagents`.
|
|
315
315
|
- `npm uninstall -g helloagents` removes the package; `~/.helloagents/helloagents.json` is intentionally preserved.
|
|
@@ -499,9 +499,9 @@ After every task, Ralph Loop auto-runs your project's verification commands:
|
|
|
499
499
|
|
|
500
500
|
`~wiki` creates or syncs the project knowledge base only. `~init` is the fuller bootstrap: it also writes project-level rule files (`AGENTS.md`, `CLAUDE.md`, `.gemini/GEMINI.md`), refreshes host-native project skill links, and appends the related ignore rules. In standby mode, the presence of the local `.helloagents/` is what promotes the current project into the full project workflow; project-level rule files are optional.
|
|
501
501
|
|
|
502
|
-
By default, KB and plan files live in the project's local `.helloagents/`. If `project_store_mode = "repo-shared"`, the local `.helloagents/` directory keeps
|
|
502
|
+
By default, KB and plan files live in the project's local `.helloagents/`. The active recovery snapshot now has a single authoritative path: `state_path`. When the host exposes a stable conversation/session identifier, HelloAGENTS writes it to `.helloagents/sessions/<branch>/<session>/STATE.md`; otherwise it uses the branch default slot at `.helloagents/sessions/<branch>/default/STATE.md`. If `project_store_mode = "repo-shared"`, the local `.helloagents/` directory keeps the activation signal, session-scoped `STATE.md`, and runtime files such as `.ralph-*`, while `context.md`, `guidelines.md`, `DESIGN.md`, `verify.yaml`, `modules/`, `plans/`, and `archive/` move to `~/.helloagents/projects/<repo-key>/` so multiple worktrees of the same git repo can share stable project memory.
|
|
503
503
|
|
|
504
|
-
`STATE.md` is
|
|
504
|
+
`STATE.md` is the active recovery snapshot resolved from `state_path`, not a universal memory file for every interaction. Its branch + session layout prevents concurrent conversations on the same repo from fighting over one shared file. It is created and continuously updated for long-running project workflows such as `~wiki`, `~init`, `~plan`, `~build`, `~auto`, `~prd`, and `~loop`; updated when already present for verification/review style tasks; and intentionally not created for one-off read-only interactions such as `~help`.
|
|
505
505
|
|
|
506
506
|
| File | Purpose |
|
|
507
507
|
|------|---------|
|
|
@@ -718,7 +718,7 @@ Subagents may skip workflow packaging such as routing, interaction flow, and out
|
|
|
718
718
|
|
|
719
719
|
## 📈 Version History
|
|
720
720
|
|
|
721
|
-
### v3.0.
|
|
721
|
+
### v3.0.9 (current)
|
|
722
722
|
|
|
723
723
|
**Fixes and verification:**
|
|
724
724
|
- 🔧 Claude Code / Gemini CLI `stop` delivery gating now prioritizes structured `turn-state` instead of inferring completion from natural-language text, so ordinary waiting turns no longer get misclassified as finished delivery
|
package/README_CN.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**质量驱动的 AI 编码 CLI 工作流框架 — 14 个自动激活技能、流程纪律、检查清单把关。**
|
|
10
10
|
|
|
11
|
-
[](./package.json)
|
|
12
12
|
[](https://www.npmjs.com/package/helloagents)
|
|
13
13
|
[](./package.json)
|
|
14
14
|
[](./skills)
|
|
@@ -95,7 +95,7 @@ HelloAGENTS 就是为了解决这个问题。它是一个编排层,装在你
|
|
|
95
95
|
|
|
96
96
|
如果你上一次认真使用 HelloAGENTS 还是 `v2.3.8`,这一代的变化不是“增量补丁”,而是整条产品线重构。
|
|
97
97
|
|
|
98
|
-
| 维度 | v2.3.8 | 本地 `v3.0.
|
|
98
|
+
| 维度 | v2.3.8 | 本地 `v3.0.9` |
|
|
99
99
|
|------|--------|---------------|
|
|
100
100
|
| **底层实现** | Python 包 + 大量脚本/规则混合 | 纯 Node.js + Markdown 运行时,围绕 `cli.mjs`、`bootstrap*.md`、`skills/`、`scripts/` 重建 |
|
|
101
101
|
| **目标定位** | 更像多 CLI 管理工具 + 提示协议集合 | 更像 AI CLI 的质量工作流框架,重点是路由、把关、验证和可恢复执行 |
|
|
@@ -108,7 +108,7 @@ HelloAGENTS 就是为了解决这个问题。它是一个编排层,装在你
|
|
|
108
108
|
| **知识库存储** | 默认项目本地 | 默认项目本地,同时新增 `project_store_mode=repo-shared`,支持同一 git 仓库多个 worktree 共享稳定知识和方案资产 |
|
|
109
109
|
| **Codex 集成** | 早期依赖更多兼容层和旧链路 | 标准模式使用注入规则 + 本地链接;全局模式使用原生本地插件链路,减少噪音与漂移 |
|
|
110
110
|
|
|
111
|
-
一句话概括:`v2.3.8` 更像“给多个 CLI 加一层工作流外壳”,`v3.0.
|
|
111
|
+
一句话概括:`v2.3.8` 更像“给多个 CLI 加一层工作流外壳”,`v3.0.9` 更像“把质量协议、计划产物、验证证据和安装生命周期统一成一套真正可运转的工作流框架”。
|
|
112
112
|
|
|
113
113
|
## ✨ 核心特性
|
|
114
114
|
|
|
@@ -304,12 +304,12 @@ HelloAGENTS 在不同模式下会写入不同文件,但写入/恢复/清理都
|
|
|
304
304
|
|-----|---------|----------|
|
|
305
305
|
| Claude Code | 原生插件安装(手动命令) | 由 Claude 插件系统管理 |
|
|
306
306
|
| Gemini CLI | 原生扩展安装(手动命令) | 由 Gemini 扩展系统管理 |
|
|
307
|
-
| Codex CLI | 原生本地插件链路(自动) | `~/.agents/plugins/marketplace.json`、`~/plugins/helloagents/`、`~/.codex/plugins/cache/local-plugins/helloagents/local/`、`~/.codex/config.toml` |
|
|
307
|
+
| Codex CLI | 原生本地插件链路(自动) | `~/.agents/plugins/marketplace.json`、`~/plugins/helloagents/`、`~/.codex/plugins/cache/local-plugins/helloagents/local/`、`~/.codex/config.toml`、`~/.codex/helloagents -> ~/plugins/helloagents` |
|
|
308
308
|
|
|
309
309
|
### 更新 / 重装 / 切分支行为
|
|
310
310
|
|
|
311
311
|
- **标准模式** 通过 `~/.claude/helloagents`、`~/.gemini/helloagents`、`~/.codex/helloagents` 这三个符号链接保持脚本、技能、模板和 hooks 与包根目录同步,相关链接文件会立即反映本地变化;但 `CLAUDE.md`、`GEMINI.md`、`AGENTS.md` 这类注入后的规则文件仍是快照,bootstrap 或分支变化后需要显式刷新。
|
|
312
|
-
- **Codex 全局模式**
|
|
312
|
+
- **Codex 全局模式** 使用复制后的运行时文件,并维护 `~/.codex/helloagents -> ~/plugins/helloagents` 作为 bootstrap 路由期望的稳定读取根目录。重新执行 `helloagents --global` 会刷新 `~/plugins/helloagents/` 和 Codex cache 中的副本。
|
|
313
313
|
- 重新执行当前模式命令是被支持的:`helloagents --standby` 和 `helloagents --global` 都是 **切换或刷新** 命令。
|
|
314
314
|
- 如需确定性的手动清理,先执行 `helloagents cleanup`,再执行 `npm uninstall -g helloagents`。
|
|
315
315
|
- `npm uninstall -g helloagents` 会移除包本身;`~/.helloagents/helloagents.json` 会被有意保留。
|
|
@@ -499,9 +499,9 @@ HelloAGENTS 支持两种安装模式,采用不同的安装方式:
|
|
|
499
499
|
|
|
500
500
|
`~wiki` 只创建或同步项目知识库。`~init` 是更完整的项目初始化:它还会写入项目级规则文件(`AGENTS.md`、`CLAUDE.md`、`.gemini/GEMINI.md`)、刷新各宿主项目级原生 skills 链接,并补齐相关忽略项。在标准模式下,真正让当前项目进入完整项目流程的是项目本地 `.helloagents/` 的存在,项目级规则文件只是 `~init` 的附加能力。
|
|
501
501
|
|
|
502
|
-
默认情况下,知识库和方案包都写在项目本地 `.helloagents
|
|
502
|
+
默认情况下,知识库和方案包都写在项目本地 `.helloagents/`。当前恢复快照现在只认一个权威路径:`state_path`。当宿主能提供稳定的会话标识时,HelloAGENTS 会把它写到 `.helloagents/sessions/<branch>/<session>/STATE.md`;否则写到分支默认槽位 `.helloagents/sessions/<branch>/default/STATE.md`。若 `project_store_mode = "repo-shared"`,本地 `.helloagents/` 仅保留激活信号、会话级 `STATE.md` 与 `.ralph-*` 等运行态文件;`context.md`、`guidelines.md`、`DESIGN.md`、`verify.yaml`、`modules/`、`plans/`、`archive/` 会改写到 `~/.helloagents/projects/<repo-key>/`,从而在同一 git 仓库的多个 worktree 间共享稳定资料。
|
|
503
503
|
|
|
504
|
-
`STATE.md`
|
|
504
|
+
`STATE.md` 是由 `state_path` 解析出的当前恢复快照,不是所有交互的统一记忆文件。按“分支 + 会话 / 默认槽位”存储后,同仓库并发对话不再争用同一个文件。它会在 `~wiki`、`~init`、`~plan`、`~build`、`~auto`、`~prd`、`~loop` 这类项目级连续流程中创建并持续更新;在验证/审查类任务中仅在文件已存在时更新;对 `~help` 这类一次性只读交互则不会创建。
|
|
505
505
|
|
|
506
506
|
| 文件 | 用途 |
|
|
507
507
|
|------|------|
|
|
@@ -718,7 +718,7 @@ npm test
|
|
|
718
718
|
|
|
719
719
|
## 📈 版本历史
|
|
720
720
|
|
|
721
|
-
### v3.0.
|
|
721
|
+
### v3.0.9(当前版本)
|
|
722
722
|
|
|
723
723
|
**修复与验证:**
|
|
724
724
|
- 🔧 Claude Code / Gemini CLI 的 `stop` 交付门控现在优先读取结构化 `turn-state`,不再先从自然语言文本反推“是否完成交付”,普通等待态不再被误判为已完成
|
package/bootstrap-lite.md
CHANGED
|
@@ -194,6 +194,7 @@
|
|
|
194
194
|
说明:
|
|
195
195
|
- `.helloagents/` 表示项目级存储路径,也是 standby 模式的激活信号
|
|
196
196
|
- `STATE.md`、`.ralph-*.json`、`loop-results.tsv` 等运行态文件始终保留在项目本地 `.helloagents/`
|
|
197
|
+
- 当前 `STATE.md` 只认当前项目存储中的 `state_path`;支持会话标识时,它会落在 `.helloagents/sessions/{branch}/{session}/STATE.md`,未提供稳定会话标识时则落到 `.helloagents/sessions/{branch}/default/STATE.md`
|
|
197
198
|
- 若 helloagents.json 中 `project_store_mode = "repo-shared"`,`context.md`、`guidelines.md`、`CHANGELOG.md`、`verify.yaml`、`DESIGN.md`、`modules/`、`plans/`、`archive/` 改按当前上下文中已注入的“当前项目存储”/“项目知识/方案目录”解析;未注入具体路径时,按当前存储模式自行解析,不要假定这些文件一定实际位于当前工作树中
|
|
198
199
|
templates/ 查找路径(按优先级;首次确定模板根目录后,本轮复用):
|
|
199
200
|
按上文 `~command` 路由中的相同技能根目录规则确定;确定根目录后读取其中的 `templates/`。
|
|
@@ -241,17 +242,17 @@ templates/ 查找路径(按优先级;首次确定模板根目录后,本轮
|
|
|
241
242
|
主线判断依据优先级:
|
|
242
243
|
1. 当前用户最新消息、显式 `~command`、本轮已确认的范围与结论
|
|
243
244
|
2. 当前活跃方案包 / PRD、代码与验证证据
|
|
244
|
-
3.
|
|
245
|
+
3. 当前 `STATE.md`(始终取当前项目存储中的 `state_path`;恢复快照,只用于补齐最近进度)
|
|
245
246
|
4. 其他知识沉淀与历史归档
|
|
246
247
|
|
|
247
248
|
### .helloagents/ 文件读取优先级
|
|
248
249
|
以下文件在任务需要时按需读取,按优先级分层:
|
|
249
250
|
说明:
|
|
250
|
-
- Tier 1 的 `STATE.md`
|
|
251
|
+
- Tier 1 的 `STATE.md` 始终读取当前项目存储中的 `state_path`
|
|
251
252
|
- Tier 2 / Tier 3 中的 `.helloagents/...` 路径默认按项目级存储路径解析;`project_store_mode=repo-shared` 时按共享知识/方案目录解析
|
|
252
253
|
|
|
253
254
|
Tier 1 — 恢复当前链路时优先读取:
|
|
254
|
-
-
|
|
255
|
+
- 当前 `STATE.md` → 恢复快照(始终取当前项目存储中的 `state_path`;先确认当前消息仍是同一任务,再用它找回最近进度)
|
|
255
256
|
|
|
256
257
|
Tier 2 — 理解项目时读取:
|
|
257
258
|
- .helloagents/context.md → 项目架构、技术栈、目录结构、模块索引
|
package/bootstrap.md
CHANGED
|
@@ -236,7 +236,7 @@ hello-* 技能读取路径:`{HELLOAGENTS_READ_ROOT}/skills/{技能名}/SKILL.m
|
|
|
236
236
|
### 6. CONSOLIDATE — 状态、沉淀与归档
|
|
237
237
|
所有任务:
|
|
238
238
|
- 有方案包且准备报告完成 → 优先调用 `scripts/closeout-state.mjs write` 写 `.helloagents/.ralph-closeout.json`,记录“需求覆盖”和“交付清单”;每项写明 `PASS` / `BLOCKED` 与简要摘要,再进入最终交付
|
|
239
|
-
- `STATE.md`
|
|
239
|
+
- `STATE.md` 维护:按上文“流程状态”中的适用边界执行。属于“强制创建并持续更新”范围时,重写当前 `STATE.md`(始终使用当前项目存储中的 `state_path`;“正在做什么”更新为已完成,清空关键上下文 / 下一步 / 阻塞项);属于“已有则更新”范围时,仅在文件已存在时重写;属于“不创建”范围时不生成此文件
|
|
240
240
|
- 有方案包且任务已完成 → 将整个 `plans/{feature}/` 目录归档到 `.helloagents/archive/YYYY-MM/`,并更新 `archive/_index.md`。清理临时文件(`loop-results.tsv`、`.ralph-breaker.json`、`.ralph-verify.json`、`.ralph-review.json`、`.ralph-closeout.json`)
|
|
241
241
|
- 按 `kb_create_mode` 同步知识库(0=关闭 / 1=已激活项目或全局模式中编码自动 / 2=已激活项目或全局模式中始终):
|
|
242
242
|
- `.helloagents/` 不存在则按 templates/ 创建知识库文件(`context.md`、`guidelines.md`、`verify.yaml`、`CHANGELOG.md`、`modules/`)
|
|
@@ -263,6 +263,7 @@ hello-* 技能读取路径:`{HELLOAGENTS_READ_ROOT}/skills/{技能名}/SKILL.m
|
|
|
263
263
|
说明:
|
|
264
264
|
- `.helloagents/` 表示项目级存储路径,也是 standby 模式的激活信号
|
|
265
265
|
- `STATE.md`、`.ralph-*.json`、`loop-results.tsv` 等运行态文件始终保留在项目本地 `.helloagents/`
|
|
266
|
+
- 当前 `STATE.md` 只认当前项目存储中的 `state_path`;支持会话标识时,它会落在 `.helloagents/sessions/{branch}/{session}/STATE.md`,未提供稳定会话标识时则落到 `.helloagents/sessions/{branch}/default/STATE.md`
|
|
266
267
|
- 若 helloagents.json 中 `project_store_mode = "repo-shared"`,`context.md`、`guidelines.md`、`CHANGELOG.md`、`verify.yaml`、`DESIGN.md`、`modules/`、`plans/`、`archive/` 改按当前上下文中已注入的“当前项目存储”/“项目知识/方案目录”解析;未注入具体路径时,按当前存储模式自行解析,不要假定这些文件一定实际位于当前工作树中
|
|
267
268
|
templates/ 查找路径(按优先级;首次确定模板根目录后,本轮复用):
|
|
268
269
|
按上文相同的技能根目录规则确定;确定根目录后读取其中的 `templates/`。
|
|
@@ -310,17 +311,17 @@ templates/ 查找路径(按优先级;首次确定模板根目录后,本轮
|
|
|
310
311
|
主线判断依据优先级:
|
|
311
312
|
1. 当前用户最新消息、显式 `~command`、本轮已确认的范围与结论
|
|
312
313
|
2. 当前活跃方案包 / PRD、代码与验证证据
|
|
313
|
-
3.
|
|
314
|
+
3. 当前 `STATE.md`(始终取当前项目存储中的 `state_path`;恢复快照,只用于补齐最近进度)
|
|
314
315
|
4. 其他知识沉淀与历史归档
|
|
315
316
|
|
|
316
317
|
### .helloagents/ 文件读取优先级
|
|
317
318
|
以下文件在任务需要时按需读取,按优先级分层:
|
|
318
319
|
说明:
|
|
319
|
-
- Tier 1 的 `STATE.md`
|
|
320
|
+
- Tier 1 的 `STATE.md` 始终读取当前项目存储中的 `state_path`
|
|
320
321
|
- Tier 2 / Tier 3 中的 `.helloagents/...` 路径默认按项目级存储路径解析;`project_store_mode=repo-shared` 时按共享知识/方案目录解析
|
|
321
322
|
|
|
322
323
|
Tier 1 — 恢复当前链路时优先读取:
|
|
323
|
-
-
|
|
324
|
+
- 当前 `STATE.md` → 恢复快照(始终取当前项目存储中的 `state_path`;先确认当前消息仍是同一任务,再用它找回最近进度)
|
|
324
325
|
|
|
325
326
|
Tier 2 — 理解项目时读取:
|
|
326
327
|
- .helloagents/context.md → 项目架构、技术栈、目录结构、模块索引
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9-beta.1",
|
|
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,9 +8,9 @@ function getPrimaryPlan(snapshot) {
|
|
|
8
8
|
return snapshot.activePlans[0] || snapshot.plans[0] || null
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function selectCapabilities({ cwd, skillName = '' }) {
|
|
12
|
-
const snapshot = getWorkflowSnapshot(cwd)
|
|
13
|
-
const recommendation = getWorkflowRecommendation(cwd)
|
|
11
|
+
export function selectCapabilities({ cwd, skillName = '', options = {} }) {
|
|
12
|
+
const snapshot = getWorkflowSnapshot(cwd, options)
|
|
13
|
+
const recommendation = getWorkflowRecommendation(cwd, options)
|
|
14
14
|
const plan = getPrimaryPlan(snapshot)
|
|
15
15
|
const advisorRequirement = getAdvisorRequirement(plan?.contract)
|
|
16
16
|
const visualRequirement = getVisualValidationRequirement(plan?.contract)
|
|
@@ -52,8 +52,8 @@ export function selectCapabilities({ cwd, skillName = '' }) {
|
|
|
52
52
|
return capabilities
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export function buildCapabilityHint({ cwd, skillName = '' }) {
|
|
56
|
-
const capabilities = selectCapabilities({ cwd, skillName })
|
|
55
|
+
export function buildCapabilityHint({ cwd, skillName = '', options = {} }) {
|
|
56
|
+
const capabilities = selectCapabilities({ cwd, skillName, options })
|
|
57
57
|
if (capabilities.length === 0) return ''
|
|
58
58
|
return `按需能力:${capabilities.map((entry) => `${entry.id}=${entry.description}`).join(' ')}`
|
|
59
59
|
}
|
package/scripts/cli-codex.mjs
CHANGED
|
@@ -248,6 +248,7 @@ export function installCodexGlobal(home, pkgRoot) {
|
|
|
248
248
|
|
|
249
249
|
copyEntries(pkgRoot, pluginRoot, CODEX_RUNTIME_ENTRIES);
|
|
250
250
|
copyEntries(pkgRoot, installedPluginRoot, CODEX_RUNTIME_ENTRIES);
|
|
251
|
+
createLink(pluginRoot, join(codexDir, 'helloagents'));
|
|
251
252
|
writeCodexRuntimeCarrier(
|
|
252
253
|
join(pluginRoot, CODEX_RUNTIME_CARRIER),
|
|
253
254
|
join(pluginRoot, 'bootstrap.md'),
|
|
@@ -286,6 +287,7 @@ export function uninstallCodexGlobal(home) {
|
|
|
286
287
|
removeIfExists(pluginCacheRoot);
|
|
287
288
|
removeCodexMarketplaceEntry(marketplaceFile);
|
|
288
289
|
removeMarkedContent(join(codexDir, 'AGENTS.md'));
|
|
290
|
+
removeLink(join(codexDir, 'helloagents'));
|
|
289
291
|
|
|
290
292
|
const toml = cleanupCodexManagedConfig(configPath, { removePluginConfig: true });
|
|
291
293
|
if (toml.trim()) safeWrite(configPath, toml);
|
package/scripts/cli-doctor.mjs
CHANGED
|
@@ -230,6 +230,7 @@ function appendCodexStandbyIssues(issues, checks) {
|
|
|
230
230
|
function appendCodexGlobalIssues(issues, checks, pluginVersion, cacheVersion) {
|
|
231
231
|
if (!checks.carrierMarker) issues.push(buildDoctorIssue('global-home-carrier-missing', 'global `~/.codex/AGENTS.md` 缺少 HelloAGENTS 规则内容', 'Global `~/.codex/AGENTS.md` is missing the HelloAGENTS carrier'))
|
|
232
232
|
if (checks.carrierMarker && !checks.carrierContentMatch) issues.push(buildDoctorIssue('global-home-carrier-drift', 'global `~/.codex/AGENTS.md` 与当前 bootstrap.md 不一致', 'Global `~/.codex/AGENTS.md` differs from the current bootstrap.md'))
|
|
233
|
+
if (!checks.globalHomeLink) issues.push(buildDoctorIssue('global-read-root-link-missing', 'global `~/.codex/helloagents` 链接缺失或未指向当前插件根目录', 'Global `~/.codex/helloagents` link is missing or does not point to the current plugin root'))
|
|
233
234
|
if (!checks.pluginRoot) issues.push(buildDoctorIssue('global-plugin-root-missing', 'global 插件根目录缺失', 'Global plugin root is missing'))
|
|
234
235
|
if (!checks.pluginCache) issues.push(buildDoctorIssue('global-plugin-cache-missing', 'global 插件缓存目录缺失', 'Global plugin cache directory is missing'))
|
|
235
236
|
if (checks.pluginRoot && !checks.pluginCarrierMatch) issues.push(buildDoctorIssue('global-plugin-carrier-drift', 'global 插件根目录中的 AGENTS.md 与当前 bootstrap.md 不一致', 'Global plugin AGENTS.md differs from the current bootstrap.md'))
|
|
@@ -258,6 +259,9 @@ function inspectCodexDoctor(settings) {
|
|
|
258
259
|
const marketplace = safeJson(join(runtime.home, '.agents', 'plugins', 'marketplace.json')) || {}
|
|
259
260
|
const pluginVersion = safeJson(join(pluginRoot, 'package.json'))?.version || ''
|
|
260
261
|
const cacheVersion = safeJson(join(pluginCacheRoot, 'package.json'))?.version || ''
|
|
262
|
+
const homeLinkTarget = safeRealTarget(join(codexDir, 'helloagents'))
|
|
263
|
+
const pkgRootTarget = safeRealTarget(runtime.pkgRoot) || normalizePath(runtime.pkgRoot)
|
|
264
|
+
const pluginRootTarget = safeRealTarget(pluginRoot) || normalizePath(pluginRoot)
|
|
261
265
|
const standbyNotifyPath = normalizePath(join(runtime.pkgRoot, 'scripts', 'notify.mjs'))
|
|
262
266
|
const globalNotifyPath = normalizePath(join(pluginRoot, 'scripts', 'notify.mjs'))
|
|
263
267
|
const managedHomeCarrierPath = normalizePath(join(codexDir, 'AGENTS.md'))
|
|
@@ -268,7 +272,8 @@ function inspectCodexDoctor(settings) {
|
|
|
268
272
|
const checks = {
|
|
269
273
|
carrierMarker: (safeRead(join(codexDir, 'AGENTS.md')) || '').includes('HELLOAGENTS_START'),
|
|
270
274
|
carrierContentMatch: extractManagedCarrierContent(join(codexDir, 'AGENTS.md')) === readBootstrapContent(expectedHomeCarrier),
|
|
271
|
-
homeLink:
|
|
275
|
+
homeLink: homeLinkTarget === pkgRootTarget,
|
|
276
|
+
globalHomeLink: homeLinkTarget === pluginRootTarget,
|
|
272
277
|
modelInstructionsFile: !!modelInstructionsLine,
|
|
273
278
|
modelInstructionsPathMatch: !!modelInstructionsLine
|
|
274
279
|
&& normalizePath(modelInstructionsLine).includes(`"${managedHomeCarrierPath}"`),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs'
|
|
1
|
+
import { existsSync, realpathSync } from 'node:fs'
|
|
2
2
|
import { join } from 'node:path'
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -27,6 +27,18 @@ function hasHelloagentsSettings(filePath) {
|
|
|
27
27
|
return JSON.stringify(safeJson(filePath) || {}).includes('helloagents')
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
function normalizePath(value = '') {
|
|
31
|
+
return String(value || '').replace(/\\/g, '/').toLowerCase()
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function safeRealTarget(linkPath) {
|
|
35
|
+
try {
|
|
36
|
+
return normalizePath(realpathSync(linkPath))
|
|
37
|
+
} catch {
|
|
38
|
+
return ''
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
30
42
|
function detectClaudeMode(home) {
|
|
31
43
|
const claudeDir = join(home, '.claude')
|
|
32
44
|
if (
|
|
@@ -53,19 +65,23 @@ function detectGeminiMode(home) {
|
|
|
53
65
|
|
|
54
66
|
function detectCodexMode(home) {
|
|
55
67
|
const codexDir = join(home, '.codex')
|
|
68
|
+
const codexHomeLink = join(codexDir, 'helloagents')
|
|
56
69
|
const codexConfig = safeRead(join(codexDir, 'config.toml')) || ''
|
|
57
70
|
const marketplace = safeRead(join(home, '.agents', 'plugins', 'marketplace.json')) || ''
|
|
71
|
+
const globalPluginRoot = normalizePath(join(home, 'plugins', CODEX_PLUGIN_NAME))
|
|
72
|
+
const codexHomeLinkTarget = safeRealTarget(codexHomeLink)
|
|
58
73
|
if (
|
|
59
74
|
existsSync(join(home, 'plugins', CODEX_PLUGIN_NAME))
|
|
60
75
|
|| existsSync(join(codexDir, 'plugins', 'cache', CODEX_MARKETPLACE_NAME, CODEX_PLUGIN_NAME))
|
|
61
76
|
|| marketplace.includes(`"name": "${CODEX_PLUGIN_NAME}"`)
|
|
62
77
|
|| codexConfig.includes(CODEX_PLUGIN_KEY)
|
|
63
78
|
|| codexConfig.includes(`/plugins/${CODEX_PLUGIN_NAME}/scripts/notify.mjs`)
|
|
79
|
+
|| codexHomeLinkTarget === globalPluginRoot
|
|
64
80
|
) {
|
|
65
81
|
return 'global'
|
|
66
82
|
}
|
|
67
83
|
if (
|
|
68
|
-
existsSync(
|
|
84
|
+
(existsSync(codexHomeLink) && codexHomeLinkTarget !== globalPluginRoot)
|
|
69
85
|
|| hasHelloagentsMarker(join(codexDir, 'AGENTS.md'))
|
|
70
86
|
|| codexConfig.includes('codex-notify')
|
|
71
87
|
|| codexConfig.includes('HelloAGENTS')
|
|
@@ -205,10 +205,11 @@ function main() {
|
|
|
205
205
|
data = JSON.parse(readFileSync(0, 'utf-8'))
|
|
206
206
|
} catch {}
|
|
207
207
|
const cwd = data.cwd || process.cwd()
|
|
208
|
-
const
|
|
209
|
-
const
|
|
208
|
+
const workflowOptions = { payload: data }
|
|
209
|
+
const snapshot = getWorkflowSnapshot(cwd, workflowOptions)
|
|
210
|
+
const recommendation = getWorkflowRecommendation(cwd, workflowOptions)
|
|
210
211
|
const verificationStatus = getVerifyEvidenceStatus(cwd)
|
|
211
|
-
const deliveryAction = getDeliveryAction(cwd)
|
|
212
|
+
const deliveryAction = getDeliveryAction(cwd, workflowOptions)
|
|
212
213
|
const gatePlans = selectGatePlans(snapshot)
|
|
213
214
|
const reviewStatus = getReviewEvidenceStatus(cwd, {
|
|
214
215
|
required: deliveryAction?.phase === 'verify' && deliveryAction?.mode === 'review-first',
|
|
@@ -248,7 +249,7 @@ function main() {
|
|
|
248
249
|
|
|
249
250
|
process.stdout.write(JSON.stringify({
|
|
250
251
|
decision: 'block',
|
|
251
|
-
reason: buildBlockReason(issues, recommendation, buildDeliveryGateHint(cwd)),
|
|
252
|
+
reason: buildBlockReason(issues, recommendation, buildDeliveryGateHint(cwd, workflowOptions)),
|
|
252
253
|
suppressOutput: true,
|
|
253
254
|
}))
|
|
254
255
|
}
|
package/scripts/guard.mjs
CHANGED
|
@@ -62,15 +62,16 @@ function emitGuardEvent(cwd, event, source, reason, details = {}) {
|
|
|
62
62
|
})
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function buildHighRiskGate(matches, cwd) {
|
|
66
|
-
const
|
|
65
|
+
function buildHighRiskGate(matches, cwd, payload = {}) {
|
|
66
|
+
const workflowOptions = { payload }
|
|
67
|
+
const stateSyncHint = buildStateSyncHint(cwd, workflowOptions)
|
|
67
68
|
if (stateSyncHint) {
|
|
68
69
|
return {
|
|
69
70
|
reason: `[HelloAGENTS Guard] Blocked T3 command until project recovery state is synced.\n${stateSyncHint}`,
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
const recommendation = getWorkflowRecommendation(cwd)
|
|
74
|
+
const recommendation = getWorkflowRecommendation(cwd, workflowOptions)
|
|
74
75
|
if (!recommendation) return null
|
|
75
76
|
if (matches.some((match) => match.gate === 'post-verify')) {
|
|
76
77
|
return {
|
|
@@ -172,7 +173,7 @@ function handleHighRiskCommand(data, command) {
|
|
|
172
173
|
if (warnings.length === 0) return []
|
|
173
174
|
|
|
174
175
|
const cwd = data.cwd || process.cwd()
|
|
175
|
-
const gate = buildHighRiskGate(warnings, cwd)
|
|
176
|
+
const gate = buildHighRiskGate(warnings, cwd, data)
|
|
176
177
|
if (gate) {
|
|
177
178
|
emitHookPayload({
|
|
178
179
|
hookSpecificOutput: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
|
-
import { buildCommandRouteHint, buildStateSyncHint, buildWorkflowRouteHint } from './workflow-state.mjs';
|
|
4
|
+
import { buildCommandRouteHint, buildStateSyncHint, buildWorkflowRouteHint, readStateSnapshot } from './workflow-state.mjs';
|
|
5
5
|
import { buildCapabilityHint } from './capability-registry.mjs';
|
|
6
6
|
import {
|
|
7
7
|
buildProjectStorageBlock,
|
|
@@ -69,16 +69,14 @@ export function buildCompactionContext({ payload, pkgRoot, settings, bootstrapFi
|
|
|
69
69
|
summaryParts.push('以下信息在上下文压缩前保存,确保压缩后不丢失关键状态。');
|
|
70
70
|
|
|
71
71
|
const cwd = payload.cwd || process.cwd();
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
summaryParts.push(stateContent);
|
|
81
|
-
} catch {}
|
|
72
|
+
const workflowOptions = { payload };
|
|
73
|
+
const stateSnapshot = readStateSnapshot(cwd, workflowOptions);
|
|
74
|
+
const stateSyncHint = buildStateSyncHint(cwd, workflowOptions);
|
|
75
|
+
if (stateSnapshot.exists && stateSnapshot.content) {
|
|
76
|
+
summaryParts.push('');
|
|
77
|
+
summaryParts.push(`## 恢复快照(从 ${stateSnapshot.statePath.replace(/\\/g, '/')} 读取,只用于找回上次停在哪)`);
|
|
78
|
+
summaryParts.push('恢复时先看当前用户消息,确认仍是同一任务再按 STATE.md 接续。');
|
|
79
|
+
summaryParts.push(stateSnapshot.content);
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
let bootstrap = '';
|
|
@@ -103,7 +101,7 @@ export function buildCompactionContext({ payload, pkgRoot, settings, bootstrapFi
|
|
|
103
101
|
summaryParts.push(readRootBlock);
|
|
104
102
|
}
|
|
105
103
|
|
|
106
|
-
const projectStorageBlock = buildProjectStorageBlock(cwd);
|
|
104
|
+
const projectStorageBlock = buildProjectStorageBlock(cwd, workflowOptions);
|
|
107
105
|
if (projectStorageBlock) {
|
|
108
106
|
summaryParts.push('');
|
|
109
107
|
summaryParts.push(projectStorageBlock);
|
|
@@ -123,13 +121,15 @@ export function buildCompactionContext({ payload, pkgRoot, settings, bootstrapFi
|
|
|
123
121
|
return summaryParts.join('\n');
|
|
124
122
|
}
|
|
125
123
|
|
|
126
|
-
export function buildInjectContext({ source, bootstrap, settings, pkgRoot, host, cwd }) {
|
|
124
|
+
export function buildInjectContext({ source, bootstrap, settings, pkgRoot, host, cwd, payload = {} }) {
|
|
125
|
+
const workflowOptions = { payload };
|
|
127
126
|
const packageRootBlock = buildPackageRootBlock(pkgRoot);
|
|
128
127
|
const readRootBlock = buildReadRootBlock(resolveReadRoot({ cwd, pkgRoot, host, settings }));
|
|
129
|
-
const workflowHint = buildWorkflowRouteHint(cwd);
|
|
130
|
-
const capabilityHint = buildCapabilityHint({ cwd });
|
|
131
|
-
const projectStorageBlock = buildProjectStorageBlock(cwd);
|
|
132
|
-
const
|
|
128
|
+
const workflowHint = buildWorkflowRouteHint(cwd, workflowOptions);
|
|
129
|
+
const capabilityHint = buildCapabilityHint({ cwd, options: workflowOptions });
|
|
130
|
+
const projectStorageBlock = buildProjectStorageBlock(cwd, workflowOptions);
|
|
131
|
+
const stateSnapshot = readStateSnapshot(cwd, workflowOptions);
|
|
132
|
+
const stateSyncHint = buildStateSyncHint(cwd, workflowOptions);
|
|
133
133
|
const settingsBlock = Object.keys(settings).length
|
|
134
134
|
? `\n\n## 当前用户设置\n\`\`\`json\n${JSON.stringify(settings, null, 2)}\n\`\`\``
|
|
135
135
|
: '';
|
|
@@ -143,26 +143,28 @@ export function buildInjectContext({ source, bootstrap, settings, pkgRoot, host,
|
|
|
143
143
|
if (stateSyncHint) context += `\n\n## STATE.md 提醒\n${stateSyncHint}`;
|
|
144
144
|
context += settingsBlock;
|
|
145
145
|
if (source === 'resume' || source === 'compact') {
|
|
146
|
-
context +=
|
|
146
|
+
context += `\n\n> ⚠️ 会话已恢复/压缩,请先读取当前 \`state_path\` 指向的 \`${stateSnapshot.statePath.replace(/\\/g, '/')}\` 恢复工作状态;先看当前用户消息确认仍是同一任务,再按 STATE.md 接续。`;
|
|
147
147
|
}
|
|
148
148
|
return context;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
export function buildRouteInstruction({ skillName, extraRules = '', cwd, pkgRoot, host, settings }) {
|
|
151
|
+
export function buildRouteInstruction({ skillName, extraRules = '', cwd, pkgRoot, host, settings, payload = {} }) {
|
|
152
|
+
const workflowOptions = { payload };
|
|
152
153
|
const readRoot = resolveReadRoot({ cwd, pkgRoot, host, settings });
|
|
153
154
|
const canonicalSkillName = resolveCanonicalCommandSkill(skillName);
|
|
154
155
|
const skillPath = join(readRoot.root, 'skills', 'commands', canonicalSkillName, 'SKILL.md');
|
|
155
156
|
const aliasNote = buildAliasRouteNote(skillName);
|
|
156
|
-
const commandHint = buildCommandRouteHint(canonicalSkillName, cwd);
|
|
157
|
-
const capabilityHint = buildCapabilityHint({ cwd, skillName: canonicalSkillName });
|
|
158
|
-
const projectStorageHint = buildProjectStorageHint(cwd);
|
|
157
|
+
const commandHint = buildCommandRouteHint(canonicalSkillName, cwd, workflowOptions);
|
|
158
|
+
const capabilityHint = buildCapabilityHint({ cwd, skillName: canonicalSkillName, options: workflowOptions });
|
|
159
|
+
const projectStorageHint = buildProjectStorageHint(cwd, workflowOptions);
|
|
159
160
|
return `用户使用了 ~${skillName} 命令。当前命令技能文件已解析为:${skillPath}。请直接读取这个 SKILL.md;不要再探测其他 helloagents 路径。${aliasNote ? ` ${aliasNote}` : ''}${projectStorageHint ? ` ${projectStorageHint}` : ''}${commandHint ? ` ${commandHint}` : ''}${capabilityHint ? ` ${capabilityHint}` : ''}${extraRules}`;
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
export function buildSemanticRouteInstruction(cwd) {
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
const
|
|
163
|
+
export function buildSemanticRouteInstruction(cwd, payload = {}) {
|
|
164
|
+
const workflowOptions = { payload };
|
|
165
|
+
const workflowHint = buildWorkflowRouteHint(cwd, workflowOptions);
|
|
166
|
+
const capabilityHint = buildCapabilityHint({ cwd, options: workflowOptions });
|
|
167
|
+
const projectStorageHint = buildProjectStorageHint(cwd, workflowOptions);
|
|
166
168
|
return [
|
|
167
169
|
'当前消息未使用 ~command。',
|
|
168
170
|
'请根据用户请求的真实意图选路,不依赖关键词表。',
|
package/scripts/notify-route.mjs
CHANGED
|
@@ -17,6 +17,7 @@ function buildHelpExtraRules(skillName) {
|
|
|
17
17
|
|
|
18
18
|
function routeExplicitCommand({
|
|
19
19
|
prompt,
|
|
20
|
+
payload,
|
|
20
21
|
cwd,
|
|
21
22
|
host,
|
|
22
23
|
pkgRoot,
|
|
@@ -51,6 +52,7 @@ function routeExplicitCommand({
|
|
|
51
52
|
pkgRoot,
|
|
52
53
|
host,
|
|
53
54
|
settings,
|
|
55
|
+
payload,
|
|
54
56
|
}))
|
|
55
57
|
return true
|
|
56
58
|
}
|
|
@@ -80,6 +82,7 @@ export function handleRouteCommand({
|
|
|
80
82
|
|
|
81
83
|
if (routeExplicitCommand({
|
|
82
84
|
prompt,
|
|
85
|
+
payload,
|
|
83
86
|
cwd,
|
|
84
87
|
host,
|
|
85
88
|
pkgRoot,
|
|
@@ -100,9 +103,9 @@ export function handleRouteCommand({
|
|
|
100
103
|
host,
|
|
101
104
|
event: 'semantic_route_prompted',
|
|
102
105
|
source: 'route',
|
|
103
|
-
recommendation: getWorkflowRecommendation(cwd),
|
|
106
|
+
recommendation: getWorkflowRecommendation(cwd, { payload }),
|
|
104
107
|
})
|
|
105
|
-
suppress(buildSemanticRouteInstruction(cwd))
|
|
108
|
+
suppress(buildSemanticRouteInstruction(cwd, payload))
|
|
106
109
|
return
|
|
107
110
|
}
|
|
108
111
|
|