@zshuangmu/agenthub 0.3.6 → 0.3.8
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/package.json +1 -1
- package/src/cli.js +20 -2
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -527,14 +527,32 @@ async function main() {
|
|
|
527
527
|
console.log(`\n${warning("建议:")}`);
|
|
528
528
|
console.log(` - 检查文件权限`);
|
|
529
529
|
console.log(` - 尝试使用 ${highlight("sudo")} 命令`);
|
|
530
|
-
} else if (errMsg.includes("network") || errMsg.includes("econnrefused") || errMsg.includes("timeout")) {
|
|
530
|
+
} else if (errMsg.includes("network") || errMsg.includes("econnrefused") || errMsg.includes("timeout") || errMsg.includes("fetch failed")) {
|
|
531
531
|
console.log(`\n${warning("建议:")}`);
|
|
532
532
|
console.log(` - 检查网络连接`);
|
|
533
533
|
console.log(` - 确认服务器地址正确`);
|
|
534
534
|
console.log(` - 使用 ${highlight("--registry")} 指定本地 registry`);
|
|
535
|
+
console.log(` - 运行 ${highlight("agenthub doctor")} 诊断环境问题`);
|
|
536
|
+
} else if (errMsg.includes("agent not found") || errMsg.includes("no agent")) {
|
|
537
|
+
console.log(`\n${warning("建议:")}`);
|
|
538
|
+
console.log(` - 运行 ${highlight("agenthub search")} 查看可用 Agent`);
|
|
539
|
+
console.log(` - 检查 Agent 名称拼写`);
|
|
540
|
+
console.log(` - 确认使用正确的 --registry 路径`);
|
|
541
|
+
} else if (errMsg.includes("invalid") || errMsg.includes("validation")) {
|
|
542
|
+
console.log(`\n${warning("建议:")}`);
|
|
543
|
+
console.log(` - 检查配置文件格式 (openclaw.json)`);
|
|
544
|
+
console.log(` - 确认 workspace 包含必需文件 (AGENTS.md, SOUL.md 等)`);
|
|
545
|
+
console.log(` - 运行 ${highlight("agenthub verify")} 检查安装完整性`);
|
|
546
|
+
} else if (errMsg.includes("version") || errMsg.includes("already")) {
|
|
547
|
+
console.log(`\n${warning("建议:")}`);
|
|
548
|
+
console.log(` - 运行 ${highlight("agenthub versions <agent>")} 查看可用版本`);
|
|
549
|
+
console.log(` - 使用 ${highlight("--force")} 强制覆盖安装`);
|
|
550
|
+
console.log(` - 运行 ${highlight("agenthub list")} 查看已安装的 Agent`);
|
|
535
551
|
}
|
|
536
552
|
|
|
537
|
-
console.log(`\n${muted("
|
|
553
|
+
console.log(`\n${muted("如需更多帮助:")}`);
|
|
554
|
+
console.log(`${muted(" - 运行: agenthub <command> --help")}`);
|
|
555
|
+
console.log(`${muted(" - 诊断: agenthub doctor")}`);
|
|
538
556
|
process.exitCode = 1;
|
|
539
557
|
}
|
|
540
558
|
}
|