@dalehkx/quote-cli 0.3.7 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalehkx/quote-cli",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "通用询报价 CLI 工具",
5
5
  "type": "module",
6
6
  "bin": {
package/skill/SKILL.md CHANGED
@@ -1,11 +1,6 @@
1
1
  ---
2
2
  name: cass-quote
3
- description:
4
- 汽配询报价管理技能
5
- 支持账号注册/登录、创建询价单(多配件/VIN解析)、监听报价、比价分析。
6
- Use when the user wants to create an inquiry (RFQ), manage quotations,
7
- compare prices from suppliers, or confirm purchase orders.
8
- Also use when the user mentions 询价、报价、比价、下单、刹车片、配件.
3
+ description: 汽配询报价管理技能,支持账号注册/登录、创建询价单(多配件/VIN解析)、监听报价、比价分析。Use when the user wants to create an inquiry (RFQ), manage quotations, compare prices from suppliers, or confirm purchase orders. Also use when the user mentions 询价、报价、比价、下单、刹车片、配件.
9
4
  ---
10
5
 
11
6
  # Quote Skill
@@ -103,16 +103,22 @@ async function stepInstallSkill() {
103
103
  return;
104
104
  }
105
105
 
106
- // 优先用 playbooks 安装到所有 agent,失败则回退到仅复制 Claude Code
107
- try {
108
- execCmd('npx', ['-y', 'playbooks', 'add', 'skill', skillSrc, '-g', '-y'], { stdio: 'inherit', timeout: 60000 });
109
- console.log(' Skill 已安装到所有支持的 agent');
110
- } catch {
111
- // playbooks 不可用,直接复制到 Claude Code
112
- const claudeDest = path.join(os.homedir(), '.claude', 'skills', 'cass-quote');
113
- copyDir(skillSrc, claudeDest);
114
- console.log(` ✓ Skill 已安装到 Claude Code (${claudeDest})`);
106
+ // playbooks 依赖 TTY(Ink 框架),非 TTY 环境直接跳过
107
+ if (process.stdin.isTTY) {
108
+ try {
109
+ execCmd('npx', ['-y', 'playbooks', 'add', 'skill', skillSrc, '-g', '-y'], {
110
+ stdio: 'inherit',
111
+ timeout: 60000,
112
+ });
113
+ console.log(' ✓ Skill 已安装到所有支持的 agent');
114
+ return;
115
+ } catch { /* 回退到手动复制 */ }
115
116
  }
117
+
118
+ // 回退:直接复制到 Claude Code
119
+ const claudeDest = path.join(os.homedir(), '.claude', 'skills', 'cass-quote');
120
+ copyDir(skillSrc, claudeDest);
121
+ console.log(` ✓ Skill 已安装到 Claude Code (${claudeDest})`);
116
122
  }
117
123
 
118
124
  function copyDir(src, dest) {