skillmkt 0.4.12 → 0.4.14
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/client/commands/init.js +16 -9
- package/package.json +1 -1
package/client/commands/init.js
CHANGED
|
@@ -97,7 +97,12 @@ export async function run(ctx) {
|
|
|
97
97
|
{ label: L('现在粘贴进来(只输一次,自动加密保存)', 'Paste it now (entered once, saved encrypted)'), v: 'paste' },
|
|
98
98
|
{ label: L('从环境变量 SKILLMKT_API_KEY 读', 'Read env var SKILLMKT_API_KEY'), v: 'env:SKILLMKT_API_KEY' },
|
|
99
99
|
{ label: L('不需要密钥', 'No key needed'), v: null },
|
|
100
|
+
{ label: L('退出向导', 'Quit wizard'), v: 'quit' },
|
|
100
101
|
]);
|
|
102
|
+
if (ks.v === 'quit') {
|
|
103
|
+
info(L('配好后重跑:skillmkt init', 'after fixing, rerun: skillmkt init'));
|
|
104
|
+
return 0;
|
|
105
|
+
}
|
|
101
106
|
if (!ks.v) break; // 不需要密钥 → 出循环
|
|
102
107
|
if (ks.v === 'paste') {
|
|
103
108
|
for (;;) { // 粘贴后真验证:错密钥可重输,留空回上一步
|
|
@@ -131,15 +136,7 @@ export async function run(ctx) {
|
|
|
131
136
|
warn(L(`用 ${vn} 验证失败(${e.message})`, `key in ${vn} failed verification (${e.message})`));
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
|
-
|
|
135
|
-
{ label: L('换个方式(回上一步)', 'Pick another way (back)'), v: 'back' },
|
|
136
|
-
{ label: L('退出向导,配好后重跑', 'Quit wizard — fix it, then rerun'), v: 'quit' },
|
|
137
|
-
]);
|
|
138
|
-
if (act.v === 'quit') {
|
|
139
|
-
info(L(`终端里先执行 export ${vn}=你的key,再重跑:skillmkt init`, `run: export ${vn}=your-key, then rerun: skillmkt init`));
|
|
140
|
-
return 0;
|
|
141
|
-
}
|
|
142
|
-
// back → 回到外圈重选密钥来源
|
|
139
|
+
// 失败 → 直接回外圈重显示来源菜单(想退出选"退出向导")
|
|
143
140
|
}
|
|
144
141
|
}
|
|
145
142
|
|
|
@@ -171,5 +168,15 @@ export async function run(ctx) {
|
|
|
171
168
|
|
|
172
169
|
ok(`init done — default_targets: ${raw.default_targets.join(', ') || L('(无 installed harness,装好后 targets add)', '(no installed agent — use targets add later)')}`);
|
|
173
170
|
info(`llm: ${model ? `${model} @ ${base_url}` : L('未配置(skillmkt init 随时重跑)', 'not configured (rerun skillmkt init anytime)')}`);
|
|
171
|
+
|
|
172
|
+
info(L('接下来怎么用:', 'What you can do next:'));
|
|
173
|
+
for (const [cmd, desc] of [
|
|
174
|
+
['skillmkt install <路径>', L('收编一个本地 skill(目录或压缩包)', 'adopt a local skill (dir or archive)')],
|
|
175
|
+
['skillmkt search <关键词>', L('搜远端 skill 市场', 'search the remote skill market')],
|
|
176
|
+
['skillmkt list', L('看已管理的 skill', 'list managed skills')],
|
|
177
|
+
['skillmkt serve', L('打开 Web 面板(冲突/裁决/合并可视化)', 'open the web panel (conflicts/decisions/merge)')],
|
|
178
|
+
['skillmkt doctor', L('体检:配置、agent、端点连通性', 'health check: config, agents, endpoint')],
|
|
179
|
+
['skillmkt --help', L('全部命令', 'all commands')],
|
|
180
|
+
]) info(` ${cmd.padEnd(30)} ${desc}`);
|
|
174
181
|
return 0;
|
|
175
182
|
}
|