@guanzhu.me/xbot-cli 0.9.0 → 0.9.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/README.md +9 -2
- package/bin/xbot-cli.cjs +6 -1
- package/native/win32-x64/xbot-cli.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ xbot-cli 通过影刀客户端内置通道管理应用、编辑流程、运行
|
|
|
18
18
|
- **Agent 优先的输出契约。** 裸调用逐层返回帮助,`schema <path>` 给出机器可读的参数定义;成功写 stdout、失败写 stderr,配合明确的退出码与 `ok/data/error` JSON 信封。
|
|
19
19
|
- **应用与流程全生命周期。** `app` 创建、打开、保存、同步、发布;`flow` 读取、静态检查、运行与等待;`task` 运行已发布应用。
|
|
20
20
|
- **安全的写入边界。** `--dry-run` 离线预览,`--expect-app` 断言当前应用,高风险操作必须显式 `--yes`。
|
|
21
|
-
- **浏览器自动化。** `xbot-cli web` 提供“打开页面 → 快照 →
|
|
21
|
+
- **浏览器自动化。** `xbot-cli web` 提供“打开页面 → 快照 → 操作元素”的短命令循环,同时返回支持操作的影刀 Python;`web xpath <ref...>` 生成单元素或相似元素 XPath。
|
|
22
|
+
- **安装环境自动发现。** 支持识别非默认影刀安装目录,诊断失败时显示实际后端路径和针对性修复建议。
|
|
22
23
|
- **开放平台 Open API。** `oapi` 一条命令保存 AccessKey,token 自动刷新;应用、机器人、调度、日志、队列、企业账号全覆盖。
|
|
23
24
|
- **内置 Agent Skill。** `xbot-cli install --skills` 安装开发规范、Web/Windows 修复辅助和排障指南。
|
|
24
25
|
|
|
@@ -37,7 +38,7 @@ xbot-cli version
|
|
|
37
38
|
xbot-cli update # 升级到最新版本;--check 只检查不升级
|
|
38
39
|
```
|
|
39
40
|
|
|
40
|
-
不安装也可体验:`npx --yes --package '@guanzhu.me/xbot-cli' xbot --help`。历史版本与 `.tgz` 附件见 [GitHub Releases](https://github.com/wn0x00/xbot-cli/releases)。
|
|
41
|
+
不安装也可体验:`npx --yes --package '@guanzhu.me/xbot-cli' xbot-cli --help`。历史版本与 `.tgz` 附件见 [GitHub Releases](https://github.com/wn0x00/xbot-cli/releases)。
|
|
41
42
|
|
|
42
43
|
## 快速上手
|
|
43
44
|
|
|
@@ -54,8 +55,13 @@ xbot-cli task run <app-id> --json # 运行已发布应用
|
|
|
54
55
|
xbot-cli web open baidu.com
|
|
55
56
|
xbot-cli web fill e4 "影刀 RPA"
|
|
56
57
|
xbot-cli web click e7
|
|
58
|
+
# 使用当前快照中的实际 ref
|
|
59
|
+
xbot-cli web xpath e7
|
|
60
|
+
xbot-cli web xpath e7 e8
|
|
57
61
|
```
|
|
58
62
|
|
|
63
|
+
网页操作保留 snapshot,并显示“影刀 Python:”;`--no-python` 关闭代码生成。XPath 每次最多返回 5 组候选;iframe 使用分层 Selector,open ShadowRoot 标明需要影刀验证,closed ShadowRoot 明确拒绝生成。详见 [0.9.1 更新说明](docs/updates/2026-10-30-web-python-xpath.md)。
|
|
64
|
+
|
|
59
65
|
裸调用 `xbot-cli` 或任意分组(如 `xbot-cli flow`)会返回该层级的帮助和示例;`xbot-cli help <path>` 查看详细帮助。
|
|
60
66
|
|
|
61
67
|
## 给 AI Agent 使用
|
|
@@ -93,6 +99,7 @@ xbot-cli oapi job logs <jobUuid> --json
|
|
|
93
99
|
|
|
94
100
|
## 文档
|
|
95
101
|
|
|
102
|
+
- [0.9.1 更新说明](docs/updates/2026-10-30-web-python-xpath.md):Web Python、XPath、安装环境发现及验证范围
|
|
96
103
|
- [CLI 参考](docs/cli-reference.md):完整命令、参数语义、输出契约与设计依据
|
|
97
104
|
- [Skill v10 升级说明](docs/skill-v10-upgrade.md):Skill 模块、依赖与限制
|
|
98
105
|
- [平台指南](skills/xbot-app-dev/references/oapi.md):开放 API 的配置、概念与排障
|
package/bin/xbot-cli.cjs
CHANGED
|
@@ -146,6 +146,10 @@ async function updateNotice() {
|
|
|
146
146
|
return formatNotice(latest);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
function nativeEnvironment(env = process.env, launcherPid = process.pid) {
|
|
150
|
+
return { ...env, XBOT_CLI_LAUNCHER_PID: String(launcherPid) };
|
|
151
|
+
}
|
|
152
|
+
|
|
149
153
|
async function main() {
|
|
150
154
|
if (process.platform !== 'win32' || process.arch !== 'x64') {
|
|
151
155
|
process.stderr.write('xbot-cli currently supports Windows x64 with ShadowBot installed.\n');
|
|
@@ -166,6 +170,7 @@ async function main() {
|
|
|
166
170
|
stdio: 'inherit',
|
|
167
171
|
shell: false,
|
|
168
172
|
windowsHide: true,
|
|
173
|
+
env: nativeEnvironment(),
|
|
169
174
|
});
|
|
170
175
|
if (result.error) {
|
|
171
176
|
process.stderr.write(`Unable to start xbot-cli (${result.error.code}). Reinstall the npm package.\n`);
|
|
@@ -180,4 +185,4 @@ if (require.main === module) {
|
|
|
180
185
|
main();
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
module.exports = { compareVersions, notifierEnabled, updateNotice, formatNotice, selfUpdate };
|
|
188
|
+
module.exports = { compareVersions, notifierEnabled, updateNotice, formatNotice, selfUpdate, nativeEnvironment };
|
|
Binary file
|