@zhanfu/zhanfu-cli 0.0.0-stage → 1.0.0
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/AGENT_SETUP.md +130 -0
- package/README.md +50 -2
- package/SETUP.md +127 -0
- package/bin/win32-x64/zhanfu.exe +0 -0
- package/package.json +27 -4
- package/release-manifest.json +14 -0
- package/scripts/install-skills.js +118 -0
- package/scripts/package-layout.js +15 -0
- package/scripts/prepare-package.js +37 -0
- package/scripts/run.js +38 -0
- package/skills/zhanfu-cli-onboarding/SKILL.md +21 -0
- package/skills/zhanfu-cli-onboarding/agents/openai.yaml +3 -0
- package/skills/zhanfu-cli-onboarding/references/AGENT_SETUP.md +130 -0
- package/skills/zhanfu-page/SKILL.md +64 -0
- package/skills/zhanfu-page/agents/openai.yaml +3 -0
- package/skills/zhanfu-page/references/cli-handoff.md +54 -0
- package/skills/zhanfu-page/references/commands.md +71 -0
- package/skills/zhanfu-page/references/fallback.md +29 -0
- package/skills/zhanfu-page/scripts/check_deps.mjs +13 -0
- package/skills/zhanfu-page/scripts/dependencies.mjs +27 -0
- package/skills/zhanfu-page/scripts/package-lock.json +43 -0
- package/skills/zhanfu-page/scripts/package.json +7 -0
- package/skills/zhanfu-page/scripts/page.mjs +328 -0
- package/skills/zhanfu-page/scripts/page_snapshot.mjs +62 -0
- package/skills/zhanfu-page/scripts/page_state.mjs +43 -0
package/AGENT_SETUP.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# 站斧 CLI 首次安装与使用引导
|
|
2
|
+
|
|
3
|
+
面向 AI Agent 的执行规则与客户文案。当前客户端版本要求为 **站斧 ≥ 5.3.17**,且客户端已打开并登录。实际CLI命令为 `zhanfu`。
|
|
4
|
+
|
|
5
|
+
安装前入口是源码中的`md/SETUP.md`或npm包内`SETUP.md`。本文件是安装后接续流程:安装成功、技能复制成功不代表首次引导完成,不能在只验证`--version`和`--help`后结束。`postinstall`输出`onboarding`时继续读取实际引导技能和本文件;若新技能尚未列入当前会话的技能列表,直接按实际文件路径读取。
|
|
6
|
+
|
|
7
|
+
## 1. 首次选择确认
|
|
8
|
+
|
|
9
|
+
客户首次安装或要求首次引导时,先显示以下文案并等待选择。只复用本次引导中用户明确作出的确认;新对话或重测首次安装不从历史安装记录推定已经确认。“安装这个CLI”不代表确认了版本和登录条件。普通开关店任务不重复发安装菜单。
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
使用前请确认:
|
|
13
|
+
|
|
14
|
+
• 已安装站斧,版本大于或等于 5.3.17。
|
|
15
|
+
• 站斧客户端已经打开,并且已经登录。
|
|
16
|
+
|
|
17
|
+
请选择:
|
|
18
|
+
1. 已满足,继续安装和检查。
|
|
19
|
+
2. 尚未满足,我先升级或打开站斧并登录。
|
|
20
|
+
|
|
21
|
+
回复编号即可。
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- 选择1:继续检查实际安装入口并安装/验证CLI,再检查连接。
|
|
25
|
+
- 选择2:显示下方提示,暂停依赖这些条件的安装和检查步骤。
|
|
26
|
+
- 不能理解的回答:只澄清这个选择,不重复追问已经给出的信息。
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
请先将站斧升级到 5.3.17 或更高版本,
|
|
30
|
+
打开站斧客户端并登录,完成后回复“继续”。
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
客户按提示回复“继续”即视为其确认条件已满足,再继续后续步骤。该选择是用户对前置条件的确认;不能据此声称已经通过程序读取并验证客户端版本。
|
|
34
|
+
|
|
35
|
+
## 2. 安装和命令验证
|
|
36
|
+
|
|
37
|
+
检查当前系统与真实分发方式。底层程序是独立C#可执行文件,也提供npm分发包装;npm包名、安装器和macOS构建须以实际发布物为准,不编造npm安装地址,不以Windows程序冒充macOS程序。
|
|
38
|
+
|
|
39
|
+
通过已核实的npm包或本地tgz安装时,npm的postinstall会自动同步zhanfu-cli-onboarding和zhanfu-page;更新npm包时也会同步新版技能。检查安装结果,只有安装脚本被禁用、目标Agent安装于CLI之后或用户要求重新同步时,才补执行 `zhanfu skills install --copy`。该命令由npm包装提供,直接运行原生EXE不支持;不能仅因PATH中存在zhanfu就认定它来自npm。当前源码npm目录使用占位包名,尚不能将其作为正式npm安装地址。复制技能完成不代表Playwright依赖已就绪,页面任务仍按技能流程检查和安装依赖。
|
|
40
|
+
|
|
41
|
+
本任务解析并验证一次CLI入口后复用。npm安装后PATH缺失时,执行一次`npm.cmd prefix -g`,验证返回目录中真实存在的`zhanfu.cmd`并以绝对路径调用,不在每个步骤重新查找;新会话或入口失效时再解析。安装位置属于目标本机,不能用云端或临时沙盒中的同名命令代替。
|
|
42
|
+
|
|
43
|
+
Windows本地EXE安装流程:
|
|
44
|
+
|
|
45
|
+
1. 查找现有 `zhanfu` 命令;已有可用安装时复用,用户要求更新时再更新。
|
|
46
|
+
2. 没有可用安装时,使用客户已确认的EXE或正式下载入口。验证文件存在并可执行 `--version` / `--help`。
|
|
47
|
+
3. 本地用户安装位置为 `%LOCALAPPDATA%\Programs\ZhanfuCli\zhanfu.exe`,把其目录加入用户PATH,保留原PATH内容。
|
|
48
|
+
4. 验证命令可运行后才报告安装完成。依赖的读写操作按宿主权限要求执行。
|
|
49
|
+
5. 页面自动化交由实际可用的页面技能执行。分发包附带skills/zhanfu-page时,将该技能同步到当前Agent的用户技能目录,并按其依赖流程检查Node.js与Playwright;缺少Playwright时由AI安装技能本地依赖并重新检查。只有页面技能及依赖也安装验证完成时,才能声称页面自动化已就绪;当前引导技能本身不提供页面执行器。
|
|
50
|
+
|
|
51
|
+
首次打开某家店铺需要内核时,提示客户先在客户端手动打开一次,并确认已绑定可用IP或设备。不因连接失败猜测账号密码或擅自切换账号。
|
|
52
|
+
|
|
53
|
+
## 3. 检查连接
|
|
54
|
+
|
|
55
|
+
收到首次条件确认且CLI可用后,执行一次:
|
|
56
|
+
|
|
57
|
+
```powershell
|
|
58
|
+
zhanfu list
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
读取 `RESULT_JSON=` 和进程退出码:仅在结果 `ok=true` 时进入成功引导。列表查询会合并本地名称缓存,不能称为完全无写入的doctor自检。
|
|
62
|
+
|
|
63
|
+
连接或列表失败时,按真实返回说明原因。提示需要站斧 ≥ 5.3.17、客户端已打开并登录;不要把超时、解析异常一律断言为未登录。原生CLI没有doctor、status或skills install子命令;skills install仅由npm启动器提供,不编造其他调用。
|
|
64
|
+
|
|
65
|
+
## 4. 安装结果和使用示例的统一文案
|
|
66
|
+
|
|
67
|
+
这是安装入口和本技能共用的唯一最终回复模板。完成CLI验证、技能核验和连接检查后,合并结果与例子一次发送;进度消息不提前发送完整示例,最终回复也不另附一份同内容的验收清单。已在本次引导展示过例子时,后续仅补充新增结果,不重复展示。
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
站斧 CLI {实际版本} 已安装,连接正常,共 {实际total} 家店铺。
|
|
71
|
+
配套技能已安装。页面自动化依赖将在首次网页任务时检查并补齐。
|
|
72
|
+
|
|
73
|
+
你可以直接说:
|
|
74
|
+
|
|
75
|
+
• 打开店铺 ztest137。
|
|
76
|
+
• 关闭店铺 ztest137。
|
|
77
|
+
• 打开店铺 ztest137,并访问 B 站。
|
|
78
|
+
• 打开店铺 ztest137,在 B 站搜索“机械键盘”,整理前 5 条视频标题。
|
|
79
|
+
• 查询页面数据、填写表单、上传文件、截图等。
|
|
80
|
+
|
|
81
|
+
也可以直接描述其他任务。
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
将版本和店铺数量替换为本次真实结果,不把占位符或示例数量发给用户。技能安装和页面依赖描述按实际状态调整:已检查依赖时汇报其真实结果;缺少技能或依赖检查失败时说明原因,不照抄“已安装”或“已就绪”。已确认的前置条件无需再重复列出。
|
|
85
|
+
|
|
86
|
+
这些例子是任务入口,不自动执行、不保证所有网站或控件均已支持。用户已给出具体任务时直接承接,不强制重新选择平台或场景。页面技能尚不可用时,明确说明网页任务需要补齐实际页面能力,不冒充已安装。
|
|
87
|
+
|
|
88
|
+
## 5. 按名称开关店的示例
|
|
89
|
+
|
|
90
|
+
用户:“打开店铺 ztest137。”
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
zhanfu open --mall-name "ztest137"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
按真实结果回复店铺已打开、已在运行或失败原因,不在失败时返回成功文案。
|
|
97
|
+
|
|
98
|
+
用户:“关闭店铺 ztest137。”
|
|
99
|
+
|
|
100
|
+
```powershell
|
|
101
|
+
zhanfu close --mall-name "ztest137"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
仅在 `ok=true` 且 `status=closed` 时回复关闭成功。当前CLI的closed表示收到关闭请求响应并完成本地清理,没有进一步核验浏览器实际退出。
|
|
105
|
+
|
|
106
|
+
## 6. 打开店铺后继续自动化
|
|
107
|
+
|
|
108
|
+
用户:“打开店铺 ztest137,在 B 站搜索‘机械键盘’,整理前5条视频的标题。”
|
|
109
|
+
|
|
110
|
+
流程:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
通过CLI打开或复用店铺
|
|
114
|
+
→ 读取成功结果中的WebDriverPort
|
|
115
|
+
→ 由页面技能连接该店铺浏览器并确定目标标签页
|
|
116
|
+
→ 访问B站,搜索机械键盘
|
|
117
|
+
→ 检查搜索结果页面
|
|
118
|
+
→ 提取真实的视频标题并交付
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
开关店、登录和配置继续使用CLI;网页动作交给页面技能。任务完成保留店铺,只有用户要求关闭时再关闭。
|
|
122
|
+
|
|
123
|
+
页面需要人工验证时,保留现场并提示:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
当前页面需要你完成验证。请在店铺浏览器中处理,
|
|
127
|
+
完成后回复“继续”,我会从当前页面接着操作。
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
不要把示例中的店铺名称或搜索词当成用户已经授权执行的实际任务。用户只有安装要求时,引导到可用状态并展示例子即可。
|
package/README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 站斧 CLI npm 分发入口
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**AI接到“安装这个CLI”时,先读取本目录的[SETUP.md](SETUP.md),按其中的版本和登录确认、安装、读取引导技能、连接检查、使用示例完成任务。不要只安装并检查--version/--help就结束。** 源码中安装前入口为`../md/SETUP.md`,打包时自动复制到本目录。
|
|
4
|
+
|
|
5
|
+
一个npm包包含当前已构建的平台程序、首次引导技能和页面技能。当前只提供Windows x64程序;后续将Mac构建放入对应publish目录并重新打包,即可沿用同一包名。
|
|
6
|
+
|
|
7
|
+
## 当前状态
|
|
8
|
+
|
|
9
|
+
package.json中的`@your-scope/zhanfu-cli`是占位名,`private: true`阻止误发布。正式发布前,改成你拥有权限的npm包名,并移除private字段。不要把占位名当成可从npm下载的正式产品。
|
|
10
|
+
|
|
11
|
+
## 本地打包
|
|
12
|
+
|
|
13
|
+
在cli目录先构建Windows程序:
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
dotnet publish ./src/ZhanfuCli/ZhanfuCli.csproj -c Release -r win-x64 --self-contained true
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
在本npm目录中执行:
|
|
20
|
+
|
|
21
|
+
```powershell
|
|
22
|
+
npm run prepare:package
|
|
23
|
+
npm pack --dry-run
|
|
24
|
+
npm pack
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
prepack会自动从同级cli、zhanfu-cli-onboarding、zhanfu-page收集文件。只复制声明的技能文件,排除node_modules、缓存和本地配置。修改技能源码后重新pack即可同步。
|
|
28
|
+
|
|
29
|
+
## 客户安装
|
|
30
|
+
|
|
31
|
+
当前可先在测试环境安装生成的tgz。正式发布后,客户使用真实包名执行npm全局安装或安装latest版本即可。npm在安装或更新完成后通过postinstall自动运行技能安装脚本,同步zhanfu-cli-onboarding和zhanfu-page;客户无需另输技能安装命令。安装后可验证:
|
|
32
|
+
|
|
33
|
+
```powershell
|
|
34
|
+
zhanfu --version
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
如果安装时用了`--ignore-scripts`,或环境策略禁止执行生命周期脚本,则不会自动安装技能。之后可手动执行`zhanfu skills install --copy`补装或重新同步。脚本同步失败会返回失败,不会把技能未安装报告成安装成功。
|
|
38
|
+
|
|
39
|
+
`postinstall`只负责复制技能,并在`RESULT_JSON.onboarding`返回实际引导文件路径、前置确认文案和接续动作。它不会自动调用AI、读取用户回答或执行`zhanfu list`。AI应读取当前Agent使用的`zhanfu-cli-onboarding/SKILL.md`及其引导文档,确认条件后检查连接并展示使用例子;新技能尚未列入当前会话技能列表时,直接按实际文件路径读取即可。需要看到安装脚本输出时,使用npm的`--foreground-scripts`。
|
|
40
|
+
|
|
41
|
+
skills安装默认复制到共享技能目录,并同步到检测到的Codex、Claude Code、Cursor、Copilot根目录。也可用`--agent codex`只选一个Agent,或用`--target-dir <绝对技能目录>`指定测试或自定义目标;两者互斥。
|
|
42
|
+
|
|
43
|
+
自动安装也支持环境变量`ZHANFU_SKILLS_DIR`指定一个绝对技能目录,用于隔离测试或自定义安装;未设置时使用上述默认目录。手动指定`--target-dir`或`--agent`时优先使用命令行选择。
|
|
44
|
+
|
|
45
|
+
已有同名技能会先完整备份到目标skills目录之外的zhanfu-skill-backups中。其他技能不会被覆盖。页面技能首次使用时由AI检查并安装其本地Playwright依赖。
|
|
46
|
+
|
|
47
|
+
skills install由npm启动器提供;直接运行原生zhanfu.exe没有该子命令。网页自动化仍由页面技能执行,C# CLI只承担店铺管理。
|
|
48
|
+
|
|
49
|
+
## Mac扩展
|
|
50
|
+
|
|
51
|
+
启动器已识别darwin-arm64与darwin-x64,分别对应.NET osx-arm64/osx-x64。当前未提供Mac程序,因此Mac上会明确报告当前包不支持,而不会尝试运行Windows EXE。Native AOT的Mac构建需在macOS环境完成。
|
package/SETUP.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# 站斧 CLI 通用安装与首次使用引导
|
|
2
|
+
|
|
3
|
+
这份文档是给具备本机文件读取和命令执行能力的AI Agent使用的统一安装入口,不限定具体Agent产品。用户让你按本文安装时,按下列顺序完成安装、连接检查和首次引导;不要在“CLI命令可运行、技能文件已复制”时结束。当前支持Windows x64,站斧客户端要求 **≥ 5.3.17**,Node.js要求 **≥ 20**。
|
|
4
|
+
|
|
5
|
+
用户提供的本地目录属于目标电脑。先核实当前执行环境能访问该电脑;云端会话访问不到目标目录时,说明环境不匹配,使用宿主提供的本机执行能力。没有该能力时停止本机安装步骤,不在云端重装Node.js、搜索占位npm包或把云端安装当成本机安装。
|
|
6
|
+
|
|
7
|
+
## 1. 先确认站斧客户端条件
|
|
8
|
+
|
|
9
|
+
在安装或连接检查前,用简体中文展示以下选择,并等待用户回答:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
站斧 CLI 首次安装引导
|
|
13
|
+
|
|
14
|
+
使用前请确认:
|
|
15
|
+
• 已安装站斧,版本大于或等于 5.3.17。
|
|
16
|
+
• 站斧客户端已经打开,并且已经登录。
|
|
17
|
+
|
|
18
|
+
请选择:
|
|
19
|
+
1. 已满足,继续安装和检查。
|
|
20
|
+
2. 尚未满足,我先安装、升级或打开站斧并登录。
|
|
21
|
+
|
|
22
|
+
回复编号即可。
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- 选择 1:继续步骤 2。
|
|
26
|
+
- 选择 2:提示完成准备后回复“继续”,等待用户,不先执行后续安装或连接检查。
|
|
27
|
+
- 只复用本次引导中用户明确作出的确认。“安装这个 CLI”、客户端进程存在、已有 CLI 或技能文件,不等于用户确认了版本和登录状态。新对话或用户重测首次安装时,不从旧文件或历史安装记录推定已经确认。
|
|
28
|
+
- 如果用户明确只安装程序、暂不引导或检查,遵从其范围;完成后说明哪些引导步骤尚未执行。
|
|
29
|
+
|
|
30
|
+
## 2. 检查本机环境和真实安装入口
|
|
31
|
+
|
|
32
|
+
使用本机 Windows PowerShell,检查系统确为 Windows x64,并执行:
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
node --version
|
|
36
|
+
npm.cmd --version
|
|
37
|
+
Get-Command zhanfu -All -ErrorAction SilentlyContinue
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Node.js 不存在或低于 20 时,先安装适用于本机的 Node.js LTS,再验证。权限不足时按宿主实际权限机制处理,不能把临时沙盒安装当成本机安装完成。
|
|
41
|
+
|
|
42
|
+
当前项目的 npm 包名 `@your-scope/zhanfu-cli` 仍是占位名,且 `private: true`,不能声称已公开发布,也不能执行虚构的公网安装命令。当前按用户提供的本地目录或 `.tgz` 安装。已有可用 CLI 时可复用;用户要求重装或更新时使用其指定来源。
|
|
43
|
+
|
|
44
|
+
### 本项目本地源码入口
|
|
45
|
+
|
|
46
|
+
以用户提供的npm目录为准;从源码根目录进入时,使用其同级的`npm/`目录。先读取该目录的`package.json`和说明,再在该目录执行:
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
npm.cmd pack --json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
读取成功结果里的 `filename`,将它与该 npm 目录组合成真实绝对路径,再执行:
|
|
53
|
+
|
|
54
|
+
```powershell
|
|
55
|
+
# 将下面的路径替换为上一步实际生成的文件;不要直接执行占位文本。
|
|
56
|
+
npm.cmd install --global "<实际生成的tgz绝对路径>" --foreground-scripts --no-audit --no-fund
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`prepack` 会收集已构建的原生程序和两个技能。缺少 Windows 发布程序时停止并说明需先构建 `cli`,不把空包或 Mac 占位目录当作可用程序。用户直接提供可信 `.tgz` 时可以跳过打包,安装该文件。
|
|
60
|
+
|
|
61
|
+
将来正式发布后,安装命令应以实际发布的包名为准,再使用 `npm install -g <真实包名>@latest`。当前不填造发布地址。
|
|
62
|
+
|
|
63
|
+
## 3. 验证 CLI,并接续读取引导技能
|
|
64
|
+
|
|
65
|
+
```powershell
|
|
66
|
+
zhanfu --version
|
|
67
|
+
zhanfu --help
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
检查两条命令的退出码。本任务只解析一次实际CLI入口并复用,避免每一步重新查找。找不到命令时执行一次`npm.cmd prefix -g`,检查返回目录下真实存在的`zhanfu.cmd`,通过PowerShell的`& "<实际绝对路径>" --version`验证后,后续list/open/close和skills install均使用该入口。不要猜测前缀,或仅因当前Shell找到命令就声称已永久修复PATH;新会话前缀变化时重新解析。不修改成另一套旧开店脚本。
|
|
71
|
+
|
|
72
|
+
正常安装会由 `postinstall` 自动复制:
|
|
73
|
+
|
|
74
|
+
- `zhanfu-cli-onboarding`:首次引导。
|
|
75
|
+
- `zhanfu-page`:页面自动化。
|
|
76
|
+
|
|
77
|
+
读取安装脚本最后一行 `RESULT_JSON=`。`ok=true`、`status=skills_installed` 只证明技能复制成功,**不证明已完成引导、客户端已登录或页面自动化依赖已就绪**。
|
|
78
|
+
|
|
79
|
+
现在接续执行:
|
|
80
|
+
|
|
81
|
+
1. 从 `onboarding.skillPaths` 或 `installed` 中选择当前 AI 实际使用的技能目录,读取 `zhanfu-cli-onboarding/SKILL.md`,再读取它引用的 `references/AGENT_SETUP.md`。不要只检查文件存在就结束。
|
|
82
|
+
2. 新复制的技能若未出现在当前会话的技能列表里,直接用文件读取工具打开上述实际路径,按其流程继续;不能依赖宿主自动刷新技能列表才能完成本次任务。拿不到安装输出时,从本机 `npm root -g` 找到实际包,读取包内 `skills/zhanfu-cli-onboarding/SKILL.md` 和 `AGENT_SETUP.md`。
|
|
83
|
+
3. 步骤 1 的确认已经完成时复用,不再重复问;如果 CLI 已经装好但前置确认漏了,现在补问,收到回答前不做连接检查。
|
|
84
|
+
4. 安装脚本被禁用或当前 Agent 技能目录里确实缺少这两个技能时,执行 `zhanfu skills install --copy`,核验结果后再读文件。已有正确副本时不重复覆盖或备份。
|
|
85
|
+
|
|
86
|
+
安装脚本只能复制文件和输出接续提示,不会代替 AI 在聊天中提问,也不会替用户选择“1”。
|
|
87
|
+
|
|
88
|
+
## 4. 检查站斧连接
|
|
89
|
+
|
|
90
|
+
前置条件已确认且 CLI 可用后执行一次:
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
zhanfu list
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
同时检查退出码和最后一行 `RESULT_JSON=`。只有成功且 `ok=true` 才继续步骤 5;可按真实 `total` 汇报店铺总数。列表会更新本地名称缓存,不能把它描述成完全无写入的检查。
|
|
97
|
+
|
|
98
|
+
失败时报告真实错误,按客户端版本、打开与登录状态或接口可用性处理。不将所有超时都归因为未登录,不猜账号密码。当前没有 `zhanfu doctor`、`zhanfu status`,不照搬紫鸟的 API Key、授权页或 `config init` 流程。
|
|
99
|
+
|
|
100
|
+
## 5. 一次汇报安装结果和使用例子
|
|
101
|
+
|
|
102
|
+
连接成功后,使用`zhanfu-cli-onboarding/references/AGENT_SETUP.md`第4节的统一模板,合并安装结果和使用例子,作为一次最终回复。本文件不再提供第二份客户文案。
|
|
103
|
+
|
|
104
|
+
进度消息只报告当前进度;完整的成功文案和例子留到最终回复展示一次。已按引导技能输出过该模板时,不回到本文件重新输出;安装前入口和引导技能是同一流程,不是两轮分别汇报的任务。
|
|
105
|
+
|
|
106
|
+
只展示例子,不因安装要求就实际开关店、访问网站或提交表单。用户有具体后续任务时承接该任务。
|
|
107
|
+
|
|
108
|
+
## 6. 用户要求页面自动化时
|
|
109
|
+
|
|
110
|
+
使用 CLI 按名称开店,再把成功返回的真实 `WebDriverPort` 交给 `zhanfu-page`:
|
|
111
|
+
|
|
112
|
+
```powershell
|
|
113
|
+
zhanfu open --mall-name "ztest137"
|
|
114
|
+
zhanfu close --mall-name "ztest137"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
上面两条是独立示例,不是让你依次开店后关店。网页任务先读取当前 Agent 的 `zhanfu-page/SKILL.md`,运行其 `scripts/check_deps.mjs`;依赖缺失时按返回的技能本地目录安装 Playwright,再检查到 `ready` 后继续。不要全局安装 Playwright 代替技能依赖,也不要下载另一套浏览器代替站斧店铺。
|
|
118
|
+
|
|
119
|
+
页面动作优先组合技能的 17 类入口,不足时由 AI 在同一店铺和标签页上补充 Playwright 逻辑。不往 C# CLI 塞页面自动化命令。验证码阻塞时保留现场交给人工,不声称已自动解题。除非用户要求,不在任务结束后擅自关店。
|
|
120
|
+
|
|
121
|
+
## 安装结果的汇报边界
|
|
122
|
+
|
|
123
|
+
在同一次最终回复中简要汇报CLI实际版本、技能安装结果、连接结果和真实店铺总数,并展示一遍使用例子。前置确认成功后无需再逐项复述;只有漏做或异常时说明。页面依赖未检查就写首次网页任务时检查,已经检查则按真实结果汇报。不在成功模板前后再追加一份验收清单或相同例子,也不以“可以用 --help 查看命令”替代使用示例。
|
|
124
|
+
|
|
125
|
+
本文件是唯一的对外安装入口;`zhanfu-cli-onboarding`为安装后接续技能,性能复盘等开发记录不属于用户安装步骤。文档被下载、上传或复制到其他电脑后,仍按用户提供的实际路径和安装来源执行,不要求存在开发者的目录结构。给AI发任务时建议使用:
|
|
126
|
+
|
|
127
|
+
> 请按这份SETUP.md安装并完成站斧CLI首次引导;先让我确认站斧版本和登录状态,再使用我提供的本地安装包或已核实的正式安装入口。
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhanfu/zhanfu-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "站斧CLI及首次引导、页面自动化技能的统一安装入口",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"bin": {
|
|
7
|
+
"zhanfu": "scripts/run.js"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=20"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"postinstall": "node scripts/install-skills.js --copy",
|
|
14
|
+
"prepare:package": "node scripts/prepare-package.js",
|
|
15
|
+
"prepack": "node scripts/prepare-package.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"scripts/",
|
|
19
|
+
"bin/",
|
|
20
|
+
"skills/",
|
|
21
|
+
"SETUP.md",
|
|
22
|
+
"AGENT_SETUP.md",
|
|
23
|
+
"release-manifest.json",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"platforms": [
|
|
4
|
+
{
|
|
5
|
+
"platform": "win32-x64",
|
|
6
|
+
"file": "bin/win32-x64/zhanfu.exe",
|
|
7
|
+
"sha256": "68989d38789ac04f99b1af1c44b319f500a4168833e2825e1032c7e99eef22c4"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"skills": [
|
|
11
|
+
"zhanfu-cli-onboarding",
|
|
12
|
+
"zhanfu-page"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('node:fs/promises');
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const os = require('node:os');
|
|
5
|
+
const { randomUUID } = require('node:crypto');
|
|
6
|
+
const { SKILLS } = require('./package-layout');
|
|
7
|
+
|
|
8
|
+
const AGENTS = { shared: '.agents', codex: '.codex', claude: '.claude', cursor: '.cursor', copilot: '.copilot' };
|
|
9
|
+
function inside(root, child) {
|
|
10
|
+
const relative = path.relative(path.resolve(root), path.resolve(child));
|
|
11
|
+
if (!relative || relative.startsWith('..' + path.sep) || relative === '..' || path.isAbsolute(relative)) throw new Error('Invalid skill installation path');
|
|
12
|
+
}
|
|
13
|
+
async function exists(file) { try { await fs.lstat(file); return true; } catch (error) { if (error.code === 'ENOENT') return false; throw error; } }
|
|
14
|
+
function parse(args) {
|
|
15
|
+
const options = { agents: [] };
|
|
16
|
+
for (let i = 0; i < args.length; i++) {
|
|
17
|
+
const arg = args[i];
|
|
18
|
+
if (arg === '--copy') continue;
|
|
19
|
+
if (arg === '--help' || arg === '-h') { options.help = true; continue; }
|
|
20
|
+
if (!['--target-dir', '--agent'].includes(arg) || !args[i + 1] || args[i + 1].startsWith('--')) throw new Error(`Invalid argument: ${arg}`);
|
|
21
|
+
const value = args[++i];
|
|
22
|
+
if (arg === '--agent') {
|
|
23
|
+
if (!AGENTS[value]) throw new Error(`Unknown agent: ${value}`);
|
|
24
|
+
options.agents.push(value);
|
|
25
|
+
} else {
|
|
26
|
+
if (options.targetDir || !path.isAbsolute(value)) throw new Error('--target-dir must be one absolute skills directory');
|
|
27
|
+
options.targetDir = path.resolve(value);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (options.targetDir && options.agents.length) throw new Error('--target-dir and --agent are mutually exclusive');
|
|
31
|
+
return options;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function installSkills(args) {
|
|
35
|
+
const options = parse(args);
|
|
36
|
+
if (options.help) return { ok: true, status: 'help', usage: 'zhanfu skills install --copy [--agent codex] [--target-dir <absolute skills directory>]', agents: Object.keys(AGENTS), skills: Object.keys(SKILLS) };
|
|
37
|
+
if (!options.targetDir && !options.agents.length && process.env.ZHANFU_SKILLS_DIR) {
|
|
38
|
+
options.targetDir = parse(['--target-dir', process.env.ZHANFU_SKILLS_DIR]).targetDir;
|
|
39
|
+
}
|
|
40
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
41
|
+
// Validate the complete payload before modifying any destination.
|
|
42
|
+
for (const [name, files] of Object.entries(SKILLS)) for (const file of files) {
|
|
43
|
+
const source = path.join(packageRoot, 'skills', name, file);
|
|
44
|
+
if (!(await fs.stat(source)).isFile()) throw new Error(`Packaged skill file is unavailable: ${name}/${file}`);
|
|
45
|
+
}
|
|
46
|
+
const home = os.homedir();
|
|
47
|
+
const targets = [];
|
|
48
|
+
if (options.targetDir) targets.push(options.targetDir);
|
|
49
|
+
else {
|
|
50
|
+
const names = options.agents.length ? [...new Set(options.agents)] : Object.keys(AGENTS);
|
|
51
|
+
for (const name of names) {
|
|
52
|
+
const root = path.join(home, AGENTS[name]);
|
|
53
|
+
if (name !== 'shared' && !(await exists(root))) {
|
|
54
|
+
if (options.agents.length) throw new Error(`Agent root does not exist: ${root}`);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
targets.push(path.join(root, 'skills'));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const installed = [];
|
|
61
|
+
for (const targetRoot of targets) {
|
|
62
|
+
const parent = path.dirname(targetRoot);
|
|
63
|
+
if (parent === targetRoot) throw new Error('Do not use a filesystem root as the skills directory');
|
|
64
|
+
await fs.mkdir(targetRoot, { recursive: true });
|
|
65
|
+
const transaction = randomUUID();
|
|
66
|
+
const staging = path.join(parent, `.zhanfu-skills-stage-${transaction}`);
|
|
67
|
+
inside(parent, staging);
|
|
68
|
+
await fs.mkdir(staging, { recursive: true });
|
|
69
|
+
const committed = [];
|
|
70
|
+
try {
|
|
71
|
+
for (const [name, files] of Object.entries(SKILLS)) for (const file of files) {
|
|
72
|
+
const destination = path.join(staging, name, file);
|
|
73
|
+
inside(staging, destination);
|
|
74
|
+
await fs.mkdir(path.dirname(destination), { recursive: true });
|
|
75
|
+
await fs.copyFile(path.join(packageRoot, 'skills', name, file), destination);
|
|
76
|
+
}
|
|
77
|
+
for (const name of Object.keys(SKILLS)) {
|
|
78
|
+
const destination = path.join(targetRoot, name);
|
|
79
|
+
inside(targetRoot, destination);
|
|
80
|
+
const backup = path.join(parent, 'zhanfu-skill-backups', transaction, name);
|
|
81
|
+
inside(parent, backup);
|
|
82
|
+
const previous = await exists(destination);
|
|
83
|
+
if (previous) { await fs.mkdir(path.dirname(backup), { recursive: true }); await fs.rename(destination, backup); }
|
|
84
|
+
const record = { destination, backup: previous ? backup : null, name, active: false };
|
|
85
|
+
committed.push(record);
|
|
86
|
+
await fs.rename(path.join(staging, name), destination);
|
|
87
|
+
record.active = true;
|
|
88
|
+
}
|
|
89
|
+
installed.push(...committed.map(({ destination, backup, name }) => ({ name, path: destination, backup })));
|
|
90
|
+
} catch (error) {
|
|
91
|
+
for (const record of committed.reverse()) {
|
|
92
|
+
if (record.active) await fs.rename(record.destination, path.join(staging, record.name));
|
|
93
|
+
if (record.backup) await fs.rename(record.backup, record.destination);
|
|
94
|
+
}
|
|
95
|
+
throw error;
|
|
96
|
+
} finally {
|
|
97
|
+
// Only remove this transaction's verified staging directory; backups are retained.
|
|
98
|
+
inside(parent, staging);
|
|
99
|
+
await fs.rm(staging, { recursive: true, force: true });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
ok: true, status: 'skills_installed', mode: 'copy', installed,
|
|
104
|
+
note: '技能复制完成;首次使用引导、站斧连接和页面依赖尚未由本脚本检查。',
|
|
105
|
+
onboarding: {
|
|
106
|
+
status: 'not_run_by_installer',
|
|
107
|
+
setupPath: path.join(packageRoot, 'SETUP.md'),
|
|
108
|
+
guidePath: path.join(packageRoot, 'AGENT_SETUP.md'),
|
|
109
|
+
skillPaths: installed.filter(item => item.name === 'zhanfu-cli-onboarding').map(item => path.join(item.path, 'SKILL.md')),
|
|
110
|
+
nextAction: '首次安装任务:AI继续读取当前Agent使用的引导技能及其references/AGENT_SETUP.md;本次尚未确认前置条件时,先展示下方选择并等待用户,不以技能文件已复制结束任务。确认后执行zhanfu list,再展示按店铺名称开关店和网页任务示例。普通技能更新不重复首次引导。',
|
|
111
|
+
prompt: '使用前请确认:已安装站斧且版本≥5.3.17,客户端已打开并登录。\n1. 已满足,继续安装和检查。\n2. 尚未满足,我先安装、升级或登录。\n回复编号即可。',
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
module.exports = { installSkills };
|
|
116
|
+
if (require.main === module) installSkills(process.argv.slice(2))
|
|
117
|
+
.then(result => console.log('RESULT_JSON=' + JSON.stringify(result)))
|
|
118
|
+
.catch(error => { console.log('RESULT_JSON=' + JSON.stringify({ ok: false, status: 'skill_install_failed', message: error.message })); process.exitCode = 1; });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const SKILLS = {
|
|
2
|
+
'zhanfu-cli-onboarding': ['SKILL.md', 'agents/openai.yaml', 'references/AGENT_SETUP.md'],
|
|
3
|
+
'zhanfu-page': [
|
|
4
|
+
'SKILL.md', 'agents/openai.yaml', 'references/commands.md', 'references/fallback.md',
|
|
5
|
+
'references/cli-handoff.md', 'scripts/page.mjs', 'scripts/package.json',
|
|
6
|
+
'scripts/package-lock.json', 'scripts/dependencies.mjs', 'scripts/check_deps.mjs',
|
|
7
|
+
'scripts/page_state.mjs', 'scripts/page_snapshot.mjs',
|
|
8
|
+
],
|
|
9
|
+
};
|
|
10
|
+
const PLATFORMS = {
|
|
11
|
+
'win32-x64': { rid: 'win-x64', file: 'zhanfu.exe' },
|
|
12
|
+
'darwin-arm64': { rid: 'osx-arm64', file: 'zhanfu' },
|
|
13
|
+
'darwin-x64': { rid: 'osx-x64', file: 'zhanfu' },
|
|
14
|
+
};
|
|
15
|
+
module.exports = { SKILLS, PLATFORMS };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('node:fs/promises');
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const { createHash } = require('node:crypto');
|
|
5
|
+
const { SKILLS, PLATFORMS } = require('./package-layout');
|
|
6
|
+
const pkg = require('../package.json');
|
|
7
|
+
|
|
8
|
+
async function exists(file) { try { return (await fs.stat(file)).isFile(); } catch (error) { if (error.code === 'ENOENT') return false; throw error; } }
|
|
9
|
+
async function copy(source, destination) { await fs.mkdir(path.dirname(destination), { recursive: true }); await fs.copyFile(source, destination); }
|
|
10
|
+
async function main() {
|
|
11
|
+
const root = path.resolve(__dirname, '..');
|
|
12
|
+
const repository = path.dirname(root);
|
|
13
|
+
const hasSource = await exists(path.join(repository, 'cli', 'AGENT_SETUP.md'));
|
|
14
|
+
const platforms = [];
|
|
15
|
+
for (const [platform, target] of Object.entries(PLATFORMS)) {
|
|
16
|
+
const destination = path.join(root, 'bin', platform, target.file);
|
|
17
|
+
const source = path.join(repository, 'cli', 'src', 'ZhanfuCli', 'bin', 'Release', 'net9.0', target.rid, 'publish', target.file);
|
|
18
|
+
if (hasSource && await exists(source)) await copy(source, destination);
|
|
19
|
+
if (await exists(destination)) {
|
|
20
|
+
if (platform.startsWith('darwin') && process.platform !== 'win32') await fs.chmod(destination, 0o755);
|
|
21
|
+
platforms.push({ platform, file: path.relative(root, destination).replaceAll(path.sep, '/'), sha256: createHash('sha256').update(await fs.readFile(destination)).digest('hex') });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (!platforms.length) throw new Error('No CLI binary found. Build cli with dotnet publish before packaging.');
|
|
25
|
+
for (const [name, files] of Object.entries(SKILLS)) for (const file of files) {
|
|
26
|
+
const destination = path.join(root, 'skills', name, file);
|
|
27
|
+
if (hasSource) await copy(path.join(repository, name, file), destination);
|
|
28
|
+
if (!(await exists(destination))) throw new Error(`Missing skill file: ${name}/${file}`);
|
|
29
|
+
}
|
|
30
|
+
if (hasSource) await copy(path.join(repository, 'cli', 'AGENT_SETUP.md'), path.join(root, 'AGENT_SETUP.md'));
|
|
31
|
+
if (!(await exists(path.join(root, 'AGENT_SETUP.md')))) throw new Error('Missing AGENT_SETUP.md');
|
|
32
|
+
if (hasSource) await copy(path.join(repository, 'md', 'SETUP.md'), path.join(root, 'SETUP.md'));
|
|
33
|
+
if (!(await exists(path.join(root, 'SETUP.md')))) throw new Error('Missing SETUP.md');
|
|
34
|
+
await fs.writeFile(path.join(root, 'release-manifest.json'), JSON.stringify({ version: pkg.version, platforms, skills: Object.keys(SKILLS) }, null, 2) + '\n');
|
|
35
|
+
console.log(`Prepared ${pkg.name}@${pkg.version}: ${platforms.map(p => p.platform).join(', ')}; ${Object.keys(SKILLS).length} skills`);
|
|
36
|
+
}
|
|
37
|
+
main().catch(error => { console.error(error.message); process.exitCode = 1; });
|
package/scripts/run.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('node:fs');
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const { spawnSync } = require('node:child_process');
|
|
5
|
+
const { PLATFORMS } = require('./package-layout');
|
|
6
|
+
|
|
7
|
+
function fail(message) {
|
|
8
|
+
console.log('RESULT_JSON=' + JSON.stringify({ ok: false, status: 'launcher_failed', message }));
|
|
9
|
+
process.exitCode = 1;
|
|
10
|
+
}
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
if (args[0] === 'skills') {
|
|
13
|
+
if (args[1] === 'install' || args.length === 1 || args.includes('--help')) {
|
|
14
|
+
const { installSkills } = require('./install-skills');
|
|
15
|
+
installSkills(args[1] === 'install' ? args.slice(2) : ['--help'])
|
|
16
|
+
.then(result => console.log('RESULT_JSON=' + JSON.stringify(result)))
|
|
17
|
+
.catch(error => {
|
|
18
|
+
console.log('RESULT_JSON=' + JSON.stringify({ ok: false, status: 'skill_install_failed', message: error.message }));
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
});
|
|
21
|
+
} else fail('Supported npm skill command: zhanfu skills install --copy');
|
|
22
|
+
} else {
|
|
23
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
24
|
+
const target = PLATFORMS[platform];
|
|
25
|
+
const binary = target && path.join(__dirname, '..', 'bin', platform, target.file);
|
|
26
|
+
if (!binary || !fs.existsSync(binary)) fail(`This package has no CLI binary for ${platform}`);
|
|
27
|
+
else {
|
|
28
|
+
try {
|
|
29
|
+
if (process.platform !== 'win32') fs.chmodSync(binary, 0o755);
|
|
30
|
+
const result = spawnSync(binary, args, { stdio: 'inherit', shell: false });
|
|
31
|
+
if (result.error) fail(result.error.message);
|
|
32
|
+
else {
|
|
33
|
+
if (args.includes('--help') && (result.status ?? 1) === 0) console.log('\nAdditional npm command: zhanfu skills install --copy');
|
|
34
|
+
process.exitCode = result.status ?? 1;
|
|
35
|
+
}
|
|
36
|
+
} catch (error) { fail(error.message); }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zhanfu-cli-onboarding
|
|
3
|
+
description: "站斧CLI首次安装与新手使用引导。用户要求安装zhanfu、提供本地npm目录或tgz让你安装、要求首次设置或询问安装后如何开始时使用;先确认站斧版本≥5.3.17且客户端已打开并登录,再验证CLI和连接,展示按店铺名称开关店及网页自动化示例。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 站斧 CLI 首次安装引导
|
|
7
|
+
|
|
8
|
+
使用 [首次安装与使用引导](references/AGENT_SETUP.md) 中的完整流程与客户文案。
|
|
9
|
+
|
|
10
|
+
- 技能文件已复制不表示引导已执行。安装后在当前任务继续读取本技能及引用文档,完成前置确认、`zhanfu list`连接检查和使用示例;不能只检查`--version`、`--help`或技能文件存在就结束。
|
|
11
|
+
- 安装前本技能尚不存在时,先按项目的`md/SETUP.md`或npm包内的`SETUP.md`启动流程;安装后直接读取真实技能路径接续,不依赖本轮技能列表自动刷新。
|
|
12
|
+
- 安装入口和本技能共用引用文档第4节的最终回复模板:安装结果和使用例子合并一次发送。进度消息不提前展示完整例子,接续流程不再输出第二份模板;同次引导已经展示过的例子不重复。
|
|
13
|
+
|
|
14
|
+
- 首次引导先展示1/2选择,等待用户确认已安装站斧≥5.3.17、客户端已打开并登录;仅复用本次引导中用户明确作出的确认。新对话或用户重测首次安装时不从历史文件推定已确认。选择2后等待其升级或登录并回复继续。
|
|
15
|
+
- 当前实际命令为zhanfu;安装入口按真实发布信息处理,不编造npm包名或doctor命令。npm启动器支持skills install --copy,原生EXE不支持该子命令;先核实安装方式再执行。
|
|
16
|
+
- 连接检查使用CLI列表命令,只有真实成功结果才展示连接成功文案。
|
|
17
|
+
- 示例包括“打开店铺ztest137”“关闭店铺ztest137”“打开店铺并访问B站、搜索和整理结果”,以及查询、填写、上传、截图等其他任务。
|
|
18
|
+
- 示例用于说明,不自动执行;已有具体任务时直接承接,不强制进入平台菜单。
|
|
19
|
+
- 店铺生命周期和配置交给CLI,网页动作交给实际安装可用的页面技能。本引导不提供页面执行器。
|
|
20
|
+
- 本项目同级的 [zhanfu-page](../zhanfu-page/SKILL.md) 提供页面执行能力。用户提出网页任务时读取该技能并先完成依赖检查;以本次CLI返回的端口与页面查询结果衔接,不把示例端口当成实际连接信息。
|
|
21
|
+
- 仅在首次安装/首次引导使用,不为后续每次普通开关店任务重复条件确认。
|