helloagents 3.0.31 → 3.0.32
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 +3 -2
- package/README_CN.md +3 -2
- package/bootstrap-lite.md +3 -3
- package/bootstrap.md +3 -3
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/scripts/notify-context.mjs +6 -1
- package/scripts/notify-events.mjs +0 -4
- package/scripts/notify-route.mjs +1 -1
- package/scripts/ralph-loop.mjs +35 -0
- package/skills/hello-subagent/SKILL.md +1 -1
- package/skills/helloagents/SKILL.md +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helloagents",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.32",
|
|
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.32",
|
|
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)
|
|
@@ -211,6 +211,7 @@ Runtime evidence files include:
|
|
|
211
211
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/loop-results.tsv`
|
|
212
212
|
|
|
213
213
|
Delivery gate, guard, and loop messages use action-oriented wording such as processing path, closeout action, and visual validation action, so blocked flows show what to do next without turning executable steps into optional suggestions. Final closeout also enforces a single HelloAGENTS wrapper, so one reply does not emit duplicate closeout headers.
|
|
214
|
+
That wrapper is now reserved for direct final-user delivery only. Intermediate reports, delegated task results, and sub-agent replies stay natural, and sub-agent stop hooks reject wrapped closeout replies.
|
|
214
215
|
|
|
215
216
|
### 7) Safer install, update, cleanup, and diagnostics
|
|
216
217
|
|
|
@@ -612,7 +613,7 @@ Default shape:
|
|
|
612
613
|
| Key | Default | Meaning |
|
|
613
614
|
|-----|---------|---------|
|
|
614
615
|
| `output_language` | `""` | follow the user language unless set |
|
|
615
|
-
| `output_format` | `true` |
|
|
616
|
+
| `output_format` | `true` | direct final-user closeout from the main agent uses the HelloAGENTS layout; intermediate, delegated, and sub-agent output stays natural |
|
|
616
617
|
| `notify_level` | `0` | `0` off, `1` desktop, `2` sound, `3` both |
|
|
617
618
|
| `ralph_loop_enabled` | `true` | run verification for explicit `~verify` / `~loop` or required closeout gates |
|
|
618
619
|
| `guard_enabled` | `true` | block dangerous commands |
|
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)
|
|
@@ -211,6 +211,7 @@ HelloAGENTS 不把“命令通过”和“任务完成”简单画等号。交
|
|
|
211
211
|
- `.helloagents/sessions/<workspace>/<session>/artifacts/loop-results.tsv`
|
|
212
212
|
|
|
213
213
|
交付门控、守卫和循环提示使用执行性表述,例如处理路径、收尾动作和视觉验收动作。阻塞流程会说明下一步要做什么,而不是把可执行步骤写成泛化建议。最终回复还会强制只保留一个 HelloAGENTS 外层块,避免同一条回复重复输出完成标题。
|
|
214
|
+
这个外层格式现在只保留给直接面向最终用户的终局交付。中间汇报、委派任务结果和子代理回复都保持自然输出;子代理结束钩子也会拦截错误的外层收尾格式。
|
|
214
215
|
|
|
215
216
|
### 7)更安全的安装、更新、清理和诊断
|
|
216
217
|
|
|
@@ -616,7 +617,7 @@ UI 任务遵循以下优先级:
|
|
|
616
617
|
| 键 | 默认值 | 含义 |
|
|
617
618
|
|----|--------|------|
|
|
618
619
|
| `output_language` | `""` | 默认跟随用户语言 |
|
|
619
|
-
| `output_format` | `true` |
|
|
620
|
+
| `output_format` | `true` | 仅主代理直接面向最终用户的终局交付使用 HelloAGENTS 格式;中间输出、委派结果和子代理输出保持自然 |
|
|
620
621
|
| `notify_level` | `0` | `0` 关闭,`1` 桌面通知,`2` 声音,`3` 两者 |
|
|
621
622
|
| `ralph_loop_enabled` | `true` | 显式 `~verify` / `~loop` 或收尾要求时运行验证 |
|
|
622
623
|
| `guard_enabled` | `true` | 拦截危险命令 |
|
package/bootstrap-lite.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HelloAGENTS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
当当前任务属于上级代理分派的局部任务、当前输出会交回上级代理或控制器继续汇总/决策/复述,或当前回复并非直接面向最终用户的终局交付时,按子代理处理:仅跳过输出格式、交互确认与停顿、统一执行流程、任务分层、完成判定、命令路由和流程状态,直接执行并返回结果。不使用 `~command`,不包装 HelloAGENTS 外层格式;其余规则持续生效。
|
|
4
4
|
|
|
5
5
|
## 配置
|
|
6
6
|
配置文件: ~/.helloagents/helloagents.json
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
|
|
113
113
|
排除条件:
|
|
114
114
|
- 当 `output_format` 为 `false` 时,所有回复保持自然输出,不得使用输出格式。
|
|
115
|
-
-
|
|
116
|
-
-
|
|
115
|
+
- 以下内容一律视为中间输出,必须自然输出,不得使用输出格式:流式输出阶段的可见文本、思考/进度说明、工具调用前的说明、工具执行中的状态汇报,以及任何发出后仍会继续调用工具、继续执行,或会交回上级代理/控制器继续消费的回复。
|
|
116
|
+
- 凡是不直接面向最终用户终局交付的回复,包括子代理、协作汇报和会交回上级代理继续处理的结果,都不得使用输出格式。
|
|
117
117
|
|
|
118
118
|
输出格式:
|
|
119
119
|
|
package/bootstrap.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# HelloAGENTS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
当当前任务属于上级代理分派的局部任务、当前输出会交回上级代理或控制器继续汇总/决策/复述,或当前回复并非直接面向最终用户的终局交付时,按子代理处理:仅跳过输出格式、交互确认与停顿、统一执行流程、任务分层、完成判定、命令路由和流程状态,直接执行并返回结果。不使用 `~command`,不包装 HelloAGENTS 外层格式;其余规则持续生效。
|
|
4
4
|
|
|
5
5
|
## 配置
|
|
6
6
|
配置文件: ~/.helloagents/helloagents.json
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
|
|
113
113
|
排除条件:
|
|
114
114
|
- 当 `output_format` 为 `false` 时,所有回复保持自然输出,不得使用输出格式。
|
|
115
|
-
-
|
|
116
|
-
-
|
|
115
|
+
- 以下内容一律视为中间输出,必须自然输出,不得使用输出格式:流式输出阶段的可见文本、思考/进度说明、工具调用前的说明、工具执行中的状态汇报,以及任何发出后仍会继续调用工具、继续执行,或会交回上级代理/控制器继续消费的回复。
|
|
116
|
+
- 凡是不直接面向最终用户终局交付的回复,包括子代理、协作汇报和会交回上级代理继续处理的结果,都不得使用输出格式。
|
|
117
117
|
|
|
118
118
|
输出格式:
|
|
119
119
|
|
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.32",
|
|
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",
|
|
@@ -54,6 +54,10 @@ function buildAliasRouteNote(skillName) {
|
|
|
54
54
|
return '';
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
function buildDelegatedTaskHint() {
|
|
58
|
+
return '若当前输入明显来自上级代理、控制器或多代理协作上下文,且本次输出会交回上级代理继续汇总、决策或复述,而不是直接交付给最终用户,则按子代理处理:直接完成局部任务并返回结果、证据或阻塞项,不使用 HelloAGENTS 外层输出格式,不写 turn-state,不做面向最终用户的收尾。'
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
export function buildCompactionContext({ payload, pkgRoot, settings, bootstrapFile, host }) {
|
|
58
62
|
const summaryParts = [];
|
|
59
63
|
summaryParts.push('## HelloAGENTS 压缩摘要');
|
|
@@ -148,7 +152,7 @@ export function buildRouteInstruction({ skillName, extraRules = '', cwd, pkgRoot
|
|
|
148
152
|
const commandHint = buildCommandRouteHint(canonicalSkillName, cwd, workflowOptions);
|
|
149
153
|
const capabilityHint = buildCapabilityHint({ cwd, skillName: canonicalSkillName, options: workflowOptions });
|
|
150
154
|
const projectStorageHint = buildProjectStorageHint(cwd, workflowOptions);
|
|
151
|
-
return `用户使用了 ~${skillName} 命令。当前命令技能文件已解析为:${skillPath}。请直接读取这个 SKILL.md;不要再探测其他 helloagents
|
|
155
|
+
return `用户使用了 ~${skillName} 命令。当前命令技能文件已解析为:${skillPath}。请直接读取这个 SKILL.md;不要再探测其他 helloagents 路径。 ${buildDelegatedTaskHint()}${aliasNote ? ` ${aliasNote}` : ''}${projectStorageHint ? ` ${projectStorageHint}` : ''}${commandHint ? ` ${commandHint}` : ''}${capabilityHint ? ` ${capabilityHint}` : ''}${extraRules}`;
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
export function buildSemanticRouteInstruction(cwd, payload = {}) {
|
|
@@ -159,6 +163,7 @@ export function buildSemanticRouteInstruction(cwd, payload = {}) {
|
|
|
159
163
|
return [
|
|
160
164
|
'当前消息未使用 ~command。',
|
|
161
165
|
'请根据用户请求的真实意图选路,不依赖关键词表。',
|
|
166
|
+
buildDelegatedTaskHint(),
|
|
162
167
|
'Delivery Tier: T0=探索/比较;T1=低风险小改动或显式验证;T2=多文件功能/新项目/需要结构化产物;T3=高风险或不可逆操作。',
|
|
163
168
|
'路由映射:~idea=只读探索,不创建文件;~build=明确实现;~verify=审查/验证;~plan=结构化规划;~prd=重型规格;~auto=自动选择并继续执行后续阶段。',
|
|
164
169
|
'若判定为 T3,默认先走 ~plan / ~prd;纯审查/验证请求才优先 ~verify。',
|
|
@@ -4,10 +4,6 @@ export function shouldIgnoreCodexNotifyClient(client) {
|
|
|
4
4
|
return normalized !== 'codex' && !normalized.startsWith('codex-');
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export function shouldIgnoreFormattedSubagent(lastMsg, outputFormatEnabled) {
|
|
8
|
-
return outputFormatEnabled && !lastMsg.includes('【HelloAGENTS】');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
export function resolveNotifyHost(argv = []) {
|
|
12
8
|
const args = Array.from(argv, (value) => String(value || ''));
|
|
13
9
|
const command = args[2] || args[0] || '';
|
package/scripts/notify-route.mjs
CHANGED
package/scripts/ralph-loop.mjs
CHANGED
|
@@ -89,6 +89,30 @@ function runVerify(commands, cwd) {
|
|
|
89
89
|
return failures;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function getLastAssistantMessage(data = {}) {
|
|
93
|
+
return String(
|
|
94
|
+
data.lastAssistantMessage
|
|
95
|
+
|| data.last_assistant_message
|
|
96
|
+
|| data['last-assistant-message']
|
|
97
|
+
|| '',
|
|
98
|
+
).trim();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function hasHelloagentsWrapper(message = '') {
|
|
102
|
+
if (!message.includes('【HelloAGENTS】')) return false;
|
|
103
|
+
const firstNonEmptyLine = message
|
|
104
|
+
.split(/\r?\n/)
|
|
105
|
+
.map((line) => line.trim())
|
|
106
|
+
.find(Boolean);
|
|
107
|
+
return /^[💡⚡🔵✅❓⚠️❌]【HelloAGENTS】- /.test(firstNonEmptyLine || '') || message.includes('【HelloAGENTS】');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function validateSubagentOutput(data = {}) {
|
|
111
|
+
const message = getLastAssistantMessage(data);
|
|
112
|
+
if (!message || !hasHelloagentsWrapper(message)) return '';
|
|
113
|
+
return '[HelloAGENTS Runtime] 子代理输出不应使用 HelloAGENTS 外层格式。当前回复不是直接面向最终用户的终局交付,请改为自然输出,只返回结果、证据或阻塞项。';
|
|
114
|
+
}
|
|
115
|
+
|
|
92
116
|
/** Filter commands to fast checks only for subagent mode. Returns null if no fast commands found. */
|
|
93
117
|
function filterSubagentCommands(commands) {
|
|
94
118
|
const fast = commands.filter(cmd =>
|
|
@@ -117,6 +141,17 @@ export function evaluateRalphLoop(data = {}, runtime = {}) {
|
|
|
117
141
|
const isSubagent = runtime.isSubagent ?? IS_SUBAGENT;
|
|
118
142
|
const hookEventName = runtime.hookEventName || HOOK_EVENT;
|
|
119
143
|
|
|
144
|
+
if (isSubagent) {
|
|
145
|
+
const formatReason = validateSubagentOutput(data);
|
|
146
|
+
if (formatReason) {
|
|
147
|
+
return {
|
|
148
|
+
decision: 'block',
|
|
149
|
+
reason: formatReason,
|
|
150
|
+
suppressOutput: true,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
120
155
|
let commands = detectCommands(cwd);
|
|
121
156
|
if (!commands?.length) {
|
|
122
157
|
return { suppressOutput: true };
|
|
@@ -12,7 +12,7 @@ description: 使用子代理执行任务、并行开发、分派工作时使用
|
|
|
12
12
|
## 派遣规范
|
|
13
13
|
- 每个子代理获得:tasks.md 中的对应任务 + 方案包中的相关约束(~plan: requirements.md + plan.md;~prd: prd/ 中的相关维度文件 + decisions.md)+ 验证命令;涉及 UI 时,再附 `.helloagents/DESIGN.md`(按当前项目存储模式解析)或其中相关片段
|
|
14
14
|
- 新鲜上下文:不继承主会话历史,避免上下文污染
|
|
15
|
-
-
|
|
15
|
+
- 明确这是局部委派任务:当前输出会交回上级代理继续汇总、决策或复述,而不是直接交付给最终用户;因此只返回结果、证据或阻塞项,不包装 HelloAGENTS 外层格式,也不写 turn-state
|
|
16
16
|
- 单一职责:一个子代理只做一件事
|
|
17
17
|
- 只提取子代理需要的上下文,不把整个方案包全部塞给子代理
|
|
18
18
|
|
|
@@ -5,8 +5,8 @@ description: 按任务类型适用 — 建立质量驱动工作流,通过技
|
|
|
5
5
|
|
|
6
6
|
# HelloAGENTS
|
|
7
7
|
|
|
8
|
-
主代理触发或读取任意 skill
|
|
9
|
-
|
|
8
|
+
主代理触发或读取任意 skill 时,只有直接面向最终用户、且当前对话已经结束的终局交付,才按通用输出格式包装;流式内容、进度或状态汇报、中间文本,以及任何仍将继续执行或会交回上级代理继续消费的文本,都保持自然输出。最终回复中的 `🔄 下一步` 写真实动作,不写当前状态;等待用户授权时使用等待输入态收尾,已获授权且可继续执行时不得收尾。同一条最终回复只包装一次;若需要分段,在同一个外层块内展开,不在正文里再次输出 `【HelloAGENTS】` 或第二个 `🔄 下一步`。
|
|
9
|
+
若当前输出会交回上级代理、控制器或其他代理继续汇总、决策、复述或等待后续动作,则按子代理处理:只豁免输出格式、交互确认与停顿、统一执行流程、任务分层、完成判定、命令路由和流程状态,直接执行任务;安全、质量、验证和失败处理规则仍持续生效,且不得包装 HelloAGENTS 外层输出格式。
|
|
10
10
|
只有运行时必须识别当前对话“完成 / 等待输入 / 阻塞”时,主代理才写 turn-state;普通问候、普通问答、T0 只读分析和一次性解释不调用。必须调用场景:显式 `~auto` / `~loop`、非只读任务完成验证并进入收尾、需要让运行时识别当前对话已完成、等待输入或已阻塞时、已进入项目连续流程或方案包闭环。首选 `helloagents-turn-state write --kind complete --role main`;等待或阻塞时写 `kind=waiting` / `kind=blocked`,并同时写 `reasonCategory` 与 `reason`。显式 `~auto` / `~loop` 下,还必须写入 `blocker.target`、`blocker.evidence`、`blocker.requiredAction`。不要查找、读取或拼接 `turn-state.mjs` 源码路径。子代理不得写 turn-state。
|
|
11
11
|
普通问答、解释、分析、改写、邮件回复和其他一次性交付虽然不进入完整实现、验证或收尾流程,但仍属于交付:默认只交付与当前请求直接对应的一版最终结果;请求已满足时直接结束,不主动追加无执行价值的延伸、派生版本、不同写法、第二版或邀约式收尾,除非用户明确要求。
|
|
12
12
|
|