@optima-chat/optima-agent 0.8.3 → 0.8.5
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/.claude/skills/order/SKILL.md +74 -25
- package/dist/bin/bi-cli.js +0 -0
- package/dist/bin/comfy.js +0 -0
- package/dist/bin/commerce.js +0 -0
- package/dist/bin/google-ads.js +0 -0
- package/dist/bin/optima.js +0 -0
- package/dist/bin/scout.js +0 -0
- package/dist/src/system-prompt.d.ts.map +1 -1
- package/dist/src/system-prompt.js +13 -1
- package/dist/src/system-prompt.js.map +1 -1
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -121
- package/dist/src/hooks-loader.d.ts +0 -6
- package/dist/src/hooks-loader.d.ts.map +0 -1
- package/dist/src/hooks-loader.js +0 -215
- package/dist/src/hooks-loader.js.map +0 -1
- package/dist/src/ui/App.d.ts +0 -6
- package/dist/src/ui/App.d.ts.map +0 -1
- package/dist/src/ui/App.js +0 -164
- package/dist/src/ui/App.js.map +0 -1
- package/dist/src/ui/components/Composer.d.ts +0 -10
- package/dist/src/ui/components/Composer.d.ts.map +0 -1
- package/dist/src/ui/components/Composer.js +0 -13
- package/dist/src/ui/components/Composer.js.map +0 -1
- package/dist/src/ui/components/Header.d.ts +0 -7
- package/dist/src/ui/components/Header.d.ts.map +0 -1
- package/dist/src/ui/components/Header.js +0 -7
- package/dist/src/ui/components/Header.js.map +0 -1
- package/dist/src/ui/components/Message.d.ts +0 -12
- package/dist/src/ui/components/Message.d.ts.map +0 -1
- package/dist/src/ui/components/Message.js +0 -21
- package/dist/src/ui/components/Message.js.map +0 -1
- package/dist/src/ui/components/MessageList.d.ts +0 -9
- package/dist/src/ui/components/MessageList.d.ts.map +0 -1
- package/dist/src/ui/components/MessageList.js +0 -18
- package/dist/src/ui/components/MessageList.js.map +0 -1
- package/dist/src/ui/components/Spinner.d.ts +0 -6
- package/dist/src/ui/components/Spinner.d.ts.map +0 -1
- package/dist/src/ui/components/Spinner.js +0 -7
- package/dist/src/ui/components/Spinner.js.map +0 -1
- package/dist/src/ui/components/StatusBar.d.ts +0 -11
- package/dist/src/ui/components/StatusBar.d.ts.map +0 -1
- package/dist/src/ui/components/StatusBar.js +0 -7
- package/dist/src/ui/components/StatusBar.js.map +0 -1
- package/dist/src/ui/components/index.d.ts +0 -7
- package/dist/src/ui/components/index.d.ts.map +0 -1
- package/dist/src/ui/components/index.js +0 -7
- package/dist/src/ui/components/index.js.map +0 -1
- package/dist/src/validation/error-formatter.d.ts +0 -21
- package/dist/src/validation/error-formatter.d.ts.map +0 -1
- package/dist/src/validation/error-formatter.js +0 -98
- package/dist/src/validation/error-formatter.js.map +0 -1
- package/dist/src/validation/index.d.ts +0 -10
- package/dist/src/validation/index.d.ts.map +0 -1
- package/dist/src/validation/index.js +0 -10
- package/dist/src/validation/index.js.map +0 -1
- package/dist/src/validation/json-validator.d.ts +0 -25
- package/dist/src/validation/json-validator.d.ts.map +0 -1
- package/dist/src/validation/json-validator.js +0 -173
- package/dist/src/validation/json-validator.js.map +0 -1
- package/dist/src/validation/schema.d.ts +0 -353
- package/dist/src/validation/schema.d.ts.map +0 -1
- package/dist/src/validation/schema.js +0 -57
- package/dist/src/validation/schema.js.map +0 -1
- package/dist/src/validation/suggestions.d.ts +0 -25
- package/dist/src/validation/suggestions.d.ts.map +0 -1
- package/dist/src/validation/suggestions.js +0 -144
- package/dist/src/validation/suggestions.js.map +0 -1
- package/dist/src/validation/types.d.ts +0 -40
- package/dist/src/validation/types.d.ts.map +0 -1
- package/dist/src/validation/types.js +0 -5
- package/dist/src/validation/types.js.map +0 -1
- package/dist/src/validation/yaml-validator.d.ts +0 -25
- package/dist/src/validation/yaml-validator.d.ts.map +0 -1
- package/dist/src/validation/yaml-validator.js +0 -177
- package/dist/src/validation/yaml-validator.js.map +0 -1
|
@@ -12,6 +12,7 @@ description: Order fulfillment and shipping management. Process orders, ship pac
|
|
|
12
12
|
当用户说:
|
|
13
13
|
- "查看待发货订单" → `commerce order list --status paid`
|
|
14
14
|
- "订单XX发货" → 先查订单详情,根据 shipping_mode_used 决定发货方式(见下方流程)
|
|
15
|
+
- "单号XX发货" / "只有运单号" → 只需提供运单号即可发货,carrier 可选,后端自动检测快递公司
|
|
15
16
|
- "查询订单物流" / "包裹到哪了" → `commerce order tracking --id XX`
|
|
16
17
|
- "运单标签好了吗" / "查标签" → `commerce order refresh-label --id XX`
|
|
17
18
|
- "取消订单XX" → `commerce order cancel --id XX --yes`
|
|
@@ -32,7 +33,7 @@ description: Order fulfillment and shipping management. Process orders, ship pac
|
|
|
32
33
|
1. **查看待发货** - `commerce order list --status paid` 按时间升序
|
|
33
34
|
2. **验证订单** - 检查库存、地址、特殊要求
|
|
34
35
|
3. **批量打包** - 准备商品、包装材料、打印面单
|
|
35
|
-
4. **标记发货** - 循环 `commerce order ship --id XX --tracking YY
|
|
36
|
+
4. **标记发货** - 循环 `commerce order ship --id XX --tracking YY`(carrier 可选)
|
|
36
37
|
5. **物流跟踪** - 定期 `commerce order tracking` 监控异常
|
|
37
38
|
6. **确认送达** - 签收后 `commerce order mark-delivered --id XX`
|
|
38
39
|
|
|
@@ -66,8 +67,11 @@ description: Order fulfillment and shipping management. Process orders, ship pac
|
|
|
66
67
|
4. 等待用户选择后再执行对应命令
|
|
67
68
|
|
|
68
69
|
- **如果 `shipping_mode_used = "fixed"` 或 `"free"` 或字段为空**:
|
|
69
|
-
1.
|
|
70
|
-
2.
|
|
70
|
+
1. 询问用户提供运单号。快递公司名称为**可选**,如果用户未提供,后端会根据运单号自动检测
|
|
71
|
+
2. 用户提供运单号后即可执行发货命令,无需等待用户补充 carrier
|
|
72
|
+
3. **即使用户提供了快递公司名称,发货时也统一不传 carrier**,让后端根据运单号自动检测并存储准确的快递公司名称(人类可读,如 "SF Express"、"UPS")。发货成功后对比响应中的 carrier 与用户所说的:
|
|
73
|
+
- 一致 → 正常告知
|
|
74
|
+
- 不一致 → 告知用户:"您提供的是 XX,系统根据运单号识别为 YY,已按识别结果记录。如有误请告知。"
|
|
71
75
|
|
|
72
76
|
#### Easyship 自动发货
|
|
73
77
|
|
|
@@ -122,20 +126,25 @@ commerce easyship couriers
|
|
|
122
126
|
|
|
123
127
|
**命令**:
|
|
124
128
|
```bash
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
# 推荐:只提供运单号,后端自动检测快递公司并生成追踪链接
|
|
130
|
+
commerce order ship --id <order-id> --tracking <运单号>
|
|
131
|
+
|
|
132
|
+
# 可选参数(一般不需要手动指定)
|
|
133
|
+
# --carrier <快递公司名称> 后端会自动检测,通常无需手动指定
|
|
134
|
+
# --tracking-url <跟踪链接> 后端自动生成 AfterShip 链接
|
|
129
135
|
```
|
|
130
136
|
|
|
131
137
|
**示例**:
|
|
132
138
|
```bash
|
|
133
|
-
#
|
|
139
|
+
# 只提供运单号(推荐,后端自动检测快递公司和生成追踪链接)
|
|
140
|
+
commerce order ship --id order_123 --tracking SF1234567890
|
|
141
|
+
|
|
142
|
+
# 指定快递公司
|
|
134
143
|
commerce order ship --id order_123 \
|
|
135
144
|
--tracking SF1234567890 \
|
|
136
145
|
--carrier "顺丰速运"
|
|
137
146
|
|
|
138
|
-
#
|
|
147
|
+
# 完整参数(带跟踪链接)
|
|
139
148
|
commerce order ship --id order_123 \
|
|
140
149
|
--tracking DHL9876543210 \
|
|
141
150
|
--carrier "DHL Express" \
|
|
@@ -181,10 +190,11 @@ AskUserQuestion:
|
|
|
181
190
|
[情况A:label_state = "generated",有 label_url]
|
|
182
191
|
发货成功!运单号 ES123456789,快递公司 FedEx。
|
|
183
192
|
运单标签已生成,请下载打印后贴在包裹上:https://...
|
|
193
|
+
物流信息同步中,稍后可以让我帮你查询物流状态。
|
|
184
194
|
|
|
185
195
|
[情况B:label_state = "pending" 或 "generating"]
|
|
186
196
|
发货成功!运单号 ES123456789,快递公司 FedEx。
|
|
187
|
-
|
|
197
|
+
运单标签正在生成中,稍后可以让我帮你查询标签和物流状态。
|
|
188
198
|
|
|
189
199
|
用户:标签好了吗
|
|
190
200
|
|
|
@@ -198,18 +208,50 @@ AskUserQuestion:
|
|
|
198
208
|
运单标签仍在生成中,请稍后再试。
|
|
199
209
|
```
|
|
200
210
|
|
|
201
|
-
**场景2
|
|
211
|
+
**场景2:固定运费/免运费订单(手动发货)**
|
|
202
212
|
```
|
|
203
213
|
用户:订单 order_xyz 发货
|
|
204
214
|
|
|
205
215
|
助手:[执行 Bash: commerce order get --id order_xyz]
|
|
216
|
+
[发现 shipping_mode_used = "fixed" 或 "free"]
|
|
217
|
+
请提供运单号(快递公司可选,系统会自动识别)。
|
|
218
|
+
|
|
219
|
+
用户:单号 SF123456
|
|
220
|
+
|
|
221
|
+
助手:[执行 Bash: commerce order ship --id order_xyz --tracking SF123456]
|
|
222
|
+
发货成功!运单号 SF123456,快递公司顺丰速运(自动识别)。
|
|
223
|
+
随时可以让我帮你查询物流状态。
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**场景3:用户直接提供运单号发货**
|
|
227
|
+
```
|
|
228
|
+
用户:订单 order_abc 发货,单号 YT9876543210
|
|
229
|
+
|
|
230
|
+
助手:[执行 Bash: commerce order get --id order_abc]
|
|
206
231
|
[发现 shipping_mode_used = "fixed"]
|
|
207
|
-
|
|
232
|
+
[用户已提供运单号,直接发货]
|
|
233
|
+
[执行 Bash: commerce order ship --id order_abc --tracking YT9876543210]
|
|
234
|
+
发货成功!运单号 YT9876543210,快递公司 YTO Express(自动识别)。
|
|
235
|
+
随时可以让我帮你查询物流状态。
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**场景4:用户提供了快递公司名称(carrier 确认)**
|
|
239
|
+
```
|
|
240
|
+
用户:订单 order_def 发货,顺丰,单号 773456789012
|
|
241
|
+
|
|
242
|
+
助手:[执行 Bash: commerce order get --id order_def]
|
|
243
|
+
[发现 shipping_mode_used = "fixed"]
|
|
244
|
+
[用户提供了 carrier "顺丰",但统一不传 carrier,让后端自动检测]
|
|
245
|
+
[执行 Bash: commerce order ship --id order_def --tracking 773456789012]
|
|
208
246
|
|
|
209
|
-
|
|
247
|
+
[情况A:检测结果与用户一致]
|
|
248
|
+
发货成功!运单号 773456789012,快递公司 SF Express(自动识别)。
|
|
249
|
+
随时可以让我帮你查询物流状态。
|
|
210
250
|
|
|
211
|
-
|
|
212
|
-
|
|
251
|
+
[情况B:检测结果与用户不一致]
|
|
252
|
+
发货成功!运单号 773456789012。
|
|
253
|
+
提示:您说的快递公司是顺丰,但系统根据运单号识别为 YTO Express,已按识别结果记录。如有误请告知我修正。
|
|
254
|
+
随时可以让我帮你查询物流状态。
|
|
213
255
|
```
|
|
214
256
|
|
|
215
257
|
### 退款处理流程
|
|
@@ -250,10 +292,10 @@ done
|
|
|
250
292
|
# 先查看订单列表
|
|
251
293
|
commerce order list --status paid
|
|
252
294
|
|
|
253
|
-
# 准备好所有真实tracking
|
|
254
|
-
commerce order ship --id order_123 --tracking DHL123456
|
|
255
|
-
commerce order ship --id order_456 --tracking DHL123457
|
|
256
|
-
commerce order ship --id order_789 --tracking DHL123458
|
|
295
|
+
# 准备好所有真实tracking号后,逐个发货(carrier 可选)
|
|
296
|
+
commerce order ship --id order_123 --tracking DHL123456
|
|
297
|
+
commerce order ship --id order_456 --tracking DHL123457
|
|
298
|
+
commerce order ship --id order_789 --tracking DHL123458
|
|
257
299
|
```
|
|
258
300
|
|
|
259
301
|
### 订单取消场景
|
|
@@ -291,7 +333,7 @@ commerce order ship --id order_789 --tracking DHL123458 --carrier DHL
|
|
|
291
333
|
### 订单管理
|
|
292
334
|
- `commerce order list` - 查看订单列表
|
|
293
335
|
- `commerce order get` - 查看订单详情
|
|
294
|
-
- `commerce order ship` -
|
|
336
|
+
- `commerce order ship` - 标记订单发货(carrier 可选,后端自动检测)
|
|
295
337
|
- `commerce order tracking` - 查询物流跟踪(含轨迹、预计送达)
|
|
296
338
|
- `commerce order refresh-label` - 刷新 Easyship 运单标签状态
|
|
297
339
|
- `commerce order update-shipping-status` - 更新物流状态
|
|
@@ -328,10 +370,11 @@ commerce order get --id order_123
|
|
|
328
370
|
commerce order ship --id order_123 --easyship
|
|
329
371
|
|
|
330
372
|
# 步骤2b:如果用户选择手动发货,或 shipping_mode_used = "fixed"/"free"
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
373
|
+
# 只需提供运单号,carrier 可选
|
|
374
|
+
commerce order ship --id order_123 --tracking DHL123456
|
|
375
|
+
|
|
376
|
+
# 或同时指定 carrier
|
|
377
|
+
commerce order ship --id order_123 --tracking DHL123456 --carrier DHL
|
|
335
378
|
```
|
|
336
379
|
|
|
337
380
|
### 取消订单
|
|
@@ -368,11 +411,17 @@ commerce refund approve --id refund_456
|
|
|
368
411
|
commerce order tracking --id order_123
|
|
369
412
|
```
|
|
370
413
|
|
|
414
|
+
**响应指导**:
|
|
415
|
+
- **有 checkpoints**:展示当前状态、预计送达时间、轨迹列表
|
|
416
|
+
- **checkpoints 为空**:告诉用户"物流信息同步中,快递公司通常需要几小时更新,稍后可以再查"
|
|
417
|
+
- **可以**:展示返回的 tracking_url(用户自己决定是否点击)
|
|
418
|
+
- **禁止**:主动建议用户"去快递官网查询"或"用小程序/APP查询"。平台提供物流追踪服务,应引导用户通过平台查询
|
|
419
|
+
|
|
371
420
|
## 重要提示
|
|
372
421
|
|
|
373
422
|
- 订单状态流转:pending → paid → shipped → delivered → completed
|
|
374
423
|
- 取消和删除操作需要 `--yes` 确认
|
|
375
424
|
- 发货后订单状态自动变为 shipped
|
|
376
425
|
- 退款需要先创建,然后批准才会实际退款
|
|
377
|
-
-
|
|
426
|
+
- 发货后**主动告知用户**"随时可以让我帮你查询物流状态"
|
|
378
427
|
- 使用 `--help` 查看命令详细参数
|
package/dist/bin/bi-cli.js
CHANGED
|
File without changes
|
package/dist/bin/comfy.js
CHANGED
|
File without changes
|
package/dist/bin/commerce.js
CHANGED
|
File without changes
|
package/dist/bin/google-ads.js
CHANGED
|
File without changes
|
package/dist/bin/optima.js
CHANGED
|
File without changes
|
package/dist/bin/scout.js
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,IAAI,MAAM,CAsIxC"}
|
|
@@ -29,7 +29,7 @@ export function getSystemPrompt() {
|
|
|
29
29
|
|
|
30
30
|
- **merchant** - 店铺信息查询和管理
|
|
31
31
|
- **product** - 商品管理(创建、编辑、删除商品、变体管理)
|
|
32
|
-
- **order** -
|
|
32
|
+
- **order** - 订单处理(发货、退款、物流追踪)
|
|
33
33
|
- **inventory** - 库存管理(**设置/更新库存必须用这个**,特别是变体库存)
|
|
34
34
|
- **i18n** - 国际化翻译管理
|
|
35
35
|
- **collection** - 商品集合管理(分组、促销专区)
|
|
@@ -49,6 +49,7 @@ export function getSystemPrompt() {
|
|
|
49
49
|
- 用户:"查看我的店铺信息" - 使用 Skill 工具加载 "merchant"
|
|
50
50
|
- 用户:"帮我创建一个商品" - 使用 Skill 工具加载 "product"
|
|
51
51
|
- 用户:"生成一张产品图片" - 使用 Skill 工具加载 "comfy"
|
|
52
|
+
- 用户:"包裹到哪了" / "查物流" - 使用 Skill 工具加载 "order"
|
|
52
53
|
|
|
53
54
|
## 工作原则
|
|
54
55
|
|
|
@@ -58,6 +59,17 @@ export function getSystemPrompt() {
|
|
|
58
59
|
4. **提供上下文** - 执行结果后给出简要说明和后续建议
|
|
59
60
|
5. **错误时诊断** - 遇到错误时分析原因并给出解决方案
|
|
60
61
|
|
|
62
|
+
## 认证处理(重要)
|
|
63
|
+
|
|
64
|
+
- **绝对禁止**执行 \`optima auth logout\`、\`commerce auth logout\` 或任何 auth 相关命令(\`optima auth whoami\` 除外)
|
|
65
|
+
- logout 会删除 token 文件,导致所有操作永久失效
|
|
66
|
+
- 如果 API 调用返回 401 或 "认证已过期" 错误:
|
|
67
|
+
1. 等待 5 秒(系统会在后台自动刷新 token)
|
|
68
|
+
2. 重新执行**完全相同**的命令
|
|
69
|
+
3. 如果仍然失败,再等 5 秒重试一次(含首次共 3 次尝试)
|
|
70
|
+
4. 3 次均失败后,告知用户:"认证已过期,请刷新页面后重试",**停止重试**
|
|
71
|
+
- 不要尝试通过 login/logout 修复认证问题
|
|
72
|
+
|
|
61
73
|
## 链接处理规则
|
|
62
74
|
|
|
63
75
|
当用户发送电商平台链接时,**不要用 WebFetch 访问**(会被反爬拦截),先用 Skill 工具加载对应技能,再按技能中的 URL 解析规则执行命令:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,GAAG,CAAC,kBAAkB,CAAC,OAAO,EAAE;QAC9C,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,MAAM;KAChB,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,GAAG,CAAC,kBAAkB,CAAC,OAAO,EAAE;QAC9C,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IAEH,OAAO;;;;;;;;;aASI,OAAO,IAAI,OAAO
|
|
1
|
+
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,GAAG,CAAC,kBAAkB,CAAC,OAAO,EAAE;QAC9C,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,MAAM;KAChB,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,GAAG,CAAC,kBAAkB,CAAC,OAAO,EAAE;QAC9C,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IAEH,OAAO;;;;;;;;;aASI,OAAO,IAAI,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+G9B,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(gh api:*)",
|
|
5
|
-
"WebFetch(domain:platform.claude.com)",
|
|
6
|
-
"Bash(git init:*)",
|
|
7
|
-
"Bash(mkdir:*)",
|
|
8
|
-
"Bash(npm run typecheck:*)",
|
|
9
|
-
"Bash(npm view:*)",
|
|
10
|
-
"WebSearch",
|
|
11
|
-
"Bash(commerce --help)",
|
|
12
|
-
"Bash(done)",
|
|
13
|
-
"Bash(commerce product:*)",
|
|
14
|
-
"Bash(commerce order:*)",
|
|
15
|
-
"Bash(commerce i18n:*)",
|
|
16
|
-
"Bash(google-ads:*)",
|
|
17
|
-
"Bash(scout --help:*)",
|
|
18
|
-
"Bash(tree:*)",
|
|
19
|
-
"Bash(cloc:*)",
|
|
20
|
-
"Bash(npm run build:*)",
|
|
21
|
-
"Bash(git restore:*)",
|
|
22
|
-
"Bash(gh repo view:*)",
|
|
23
|
-
"Bash(mv:*)",
|
|
24
|
-
"Bash(rmdir:*)",
|
|
25
|
-
"Bash(git add:*)",
|
|
26
|
-
"Bash(git commit:*)",
|
|
27
|
-
"Bash(git push)",
|
|
28
|
-
"Bash(timeout 5 npm run optima:*)",
|
|
29
|
-
"Bash(npm install:*)",
|
|
30
|
-
"Bash(cat:*)",
|
|
31
|
-
"Bash(gh issue create:*)",
|
|
32
|
-
"Bash(npx tsx:*)",
|
|
33
|
-
"Bash(timeout 30 npx tsx:*)",
|
|
34
|
-
"Bash(git push origin feature/ask-user-question)",
|
|
35
|
-
"Bash(node:*)",
|
|
36
|
-
"Bash(npm version:*)",
|
|
37
|
-
"Bash(git push:*)",
|
|
38
|
-
"Bash(npm publish:*)",
|
|
39
|
-
"Bash(pkill:*)",
|
|
40
|
-
"Bash(git -C /Users/verypro/optima-agent log --oneline --all -- \".claude/\")",
|
|
41
|
-
"Bash(wc:*)",
|
|
42
|
-
"Bash(grep:*)",
|
|
43
|
-
"Bash(find:*)",
|
|
44
|
-
"Bash(commerce collection --help:*)",
|
|
45
|
-
"Bash(commerce collection update --help:*)",
|
|
46
|
-
"Bash(commerce collection set-cover:*)",
|
|
47
|
-
"Bash(commerce collection get --help:*)",
|
|
48
|
-
"Bash(commerce collection list --help:*)",
|
|
49
|
-
"Bash(commerce collection create --help:*)",
|
|
50
|
-
"Bash(commerce collection remove-products:*)",
|
|
51
|
-
"Bash(commerce collection list-products:*)",
|
|
52
|
-
"Bash(commerce --version:*)",
|
|
53
|
-
"Bash(bi-cli --version:*)",
|
|
54
|
-
"Bash(commerce homepage create --help:*)",
|
|
55
|
-
"Bash(commerce homepage reorder --help:*)",
|
|
56
|
-
"Bash(commerce homepage delete --help:*)",
|
|
57
|
-
"Bash(commerce homepage update-images:*)",
|
|
58
|
-
"Bash(commerce homepage update-collections:*)",
|
|
59
|
-
"Bash(commerce homepage update-target:*)",
|
|
60
|
-
"Bash(commerce homepage switch-template:*)",
|
|
61
|
-
"Bash(commerce inventory:*)",
|
|
62
|
-
"Bash(commerce merchant:*)",
|
|
63
|
-
"Bash(commerce review:*)",
|
|
64
|
-
"Bash(commerce product-page:*)",
|
|
65
|
-
"Bash(bi-cli:*)",
|
|
66
|
-
"Bash(comfy:*)",
|
|
67
|
-
"Bash(scout search:*)",
|
|
68
|
-
"Bash(scout product:*)",
|
|
69
|
-
"Bash(commerce homepage create-collections:*)",
|
|
70
|
-
"Bash(commerce homepage create-featured:*)",
|
|
71
|
-
"Bash(commerce homepage create-collection-products:*)",
|
|
72
|
-
"Bash(commerce homepage create-banner:*)",
|
|
73
|
-
"Bash(xargs -I {} sh -c 'echo \"\"\"\"=== {} ===\"\"\"\"; head -3 /Users/verypro/optima-agent/.claude/skills/{}/SKILL.md | grep \"\"\"\"name:\"\"\"\"')",
|
|
74
|
-
"Bash(ls:*)",
|
|
75
|
-
"Bash(gh issue view:*)",
|
|
76
|
-
"Bash(npx markdownlint-cli:*)",
|
|
77
|
-
"Bash(chmod:*)",
|
|
78
|
-
"Bash(npm whoami:*)",
|
|
79
|
-
"Bash(tsx test-scripts/test-headless-progress.ts:*)",
|
|
80
|
-
"Bash(DEBUG_STREAM=1 node dist/bin/optima.js:*)",
|
|
81
|
-
"Bash(git describe:*)",
|
|
82
|
-
"WebFetch(domain:github.com)",
|
|
83
|
-
"Bash(./scripts/test-headless.sh:*)",
|
|
84
|
-
"Bash(./scripts/test-headless-simple.sh:*)",
|
|
85
|
-
"Bash(env)",
|
|
86
|
-
"Bash(gh pr list:*)",
|
|
87
|
-
"Bash(gh pr view:*)",
|
|
88
|
-
"Bash(gh pr diff:*)",
|
|
89
|
-
"Bash(optima --version:*)",
|
|
90
|
-
"Bash(optima agent headless:*)",
|
|
91
|
-
"Bash(optima headless:*)",
|
|
92
|
-
"Bash(/Users/verypro/optima-agent/scripts/test-headless.sh:*)",
|
|
93
|
-
"Bash(/Users/verypro/optima-agent/scripts/test-headless-simple.sh:*)",
|
|
94
|
-
"Bash(tee:*)",
|
|
95
|
-
"Bash(CONV_ID=\"conv-1\":*)",
|
|
96
|
-
"Bash(echo:*)",
|
|
97
|
-
"Bash(scout tiktok trending --help:*)",
|
|
98
|
-
"Bash(scout tiktok trending:*)",
|
|
99
|
-
"Bash(git checkout:*)",
|
|
100
|
-
"Bash(npm test:*)",
|
|
101
|
-
"Bash(git tag:*)",
|
|
102
|
-
"Bash(/private/tmp/claude/-Users-verypro-optima-agent/68a9ac2c-def2-44e1-b42b-e53bd9022ab6/scratchpad/test-canUseTool.sh)",
|
|
103
|
-
"Bash(optima --help:*)",
|
|
104
|
-
"Bash(npx @optima-chat/ads-cli:*)",
|
|
105
|
-
"Bash(head:*)",
|
|
106
|
-
"Bash(git pull:*)",
|
|
107
|
-
"Bash(pnpm build:*)",
|
|
108
|
-
"Skill(read-code)",
|
|
109
|
-
"Bash(npm run cli:*)",
|
|
110
|
-
"Bash(scout:*)",
|
|
111
|
-
"WebFetch(domain:docs.scrapecreators.com)",
|
|
112
|
-
"WebFetch(domain:scrapecreators.com)",
|
|
113
|
-
"Bash(gh auth status:*)",
|
|
114
|
-
"Bash(optima-agent:*)",
|
|
115
|
-
"Bash(python3:*)",
|
|
116
|
-
"Bash(python3 -c \" import sys content = sys.stdin.read\\(\\) # Find flushMessageQueueSync idx = content.find\\(''flushMessageQueueSync''\\) # Get context around it lines = content.split\\(''\\\\n''\\) for i, line in enumerate\\(lines\\): if ''flushMessageQueueSync'' in line and ''private'' in line: for j in range\\(i, min\\(i+20, len\\(lines\\)\\)\\): print\\(f''{j+1}: {lines[j]}''\\) break \")"
|
|
117
|
-
],
|
|
118
|
-
"deny": [],
|
|
119
|
-
"ask": []
|
|
120
|
-
}
|
|
121
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-loader.d.ts","sourceRoot":"","sources":["../../src/hooks-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,YAAY,CAAC;AAwL5D;;GAEG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,MAAM,GAAG,SAAS,GACrC,WAAW,CAiFb"}
|
package/dist/src/hooks-loader.js
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { readFileSync, readdirSync, existsSync, writeFileSync, mkdirSync } from "fs";
|
|
2
|
-
import { join, dirname } from "path";
|
|
3
|
-
import yaml from "js-yaml";
|
|
4
|
-
import { execSync } from "child_process";
|
|
5
|
-
import { YamlValidator, formatValidationErrors, formatValidationWarning } from "./validation/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* 从 SKILL.md 提取 YAML frontmatter
|
|
8
|
-
*/
|
|
9
|
-
function extractYamlFrontmatter(content) {
|
|
10
|
-
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
11
|
-
if (!match)
|
|
12
|
-
return null;
|
|
13
|
-
try {
|
|
14
|
-
return yaml.load(match[1]);
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
console.error("Failed to parse YAML frontmatter:", error);
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 执行 shell 命令并返回结果
|
|
23
|
-
*/
|
|
24
|
-
function executeCommand(command, cwd, skillDir, sessionId) {
|
|
25
|
-
try {
|
|
26
|
-
// 替换环境变量
|
|
27
|
-
const expandedCommand = command
|
|
28
|
-
.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g, skillDir)
|
|
29
|
-
.replace(/\$\{SESSION_ID\}/g, sessionId || 'default');
|
|
30
|
-
const result = execSync(expandedCommand, {
|
|
31
|
-
cwd,
|
|
32
|
-
encoding: "utf-8",
|
|
33
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
34
|
-
});
|
|
35
|
-
return result.trim();
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
// 命令失败不阻塞,返回错误信息
|
|
39
|
-
return error.stdout || error.message || "";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 转换 skill hooks 为 SDK hooks 格式
|
|
44
|
-
*/
|
|
45
|
-
function convertSkillHooksToSdkHooks(skillHooks, skillDir, cwd, getSessionId, hookType) {
|
|
46
|
-
return skillHooks.map((hookConfig) => ({
|
|
47
|
-
matcher: hookConfig.matcher,
|
|
48
|
-
hooks: hookConfig.hooks.map((hook) => {
|
|
49
|
-
// SDK HookCallback 签名: (input, toolUseID, options) => Promise<HookJSONOutput>
|
|
50
|
-
return async (input, toolUseID, options) => {
|
|
51
|
-
// PreToolUse: 拦截并重定向 planning 文件操作
|
|
52
|
-
if (hookType === "PreToolUse" && input.tool_name && input.tool_input) {
|
|
53
|
-
const toolName = input.tool_name;
|
|
54
|
-
const toolInput = input.tool_input;
|
|
55
|
-
// 处理文件操作工具的路径重定向
|
|
56
|
-
if ((toolName === "Write" || toolName === "Read" || toolName === "Edit") && toolInput.file_path) {
|
|
57
|
-
const filePath = toolInput.file_path;
|
|
58
|
-
if (filePath.includes(".planning/default/")) {
|
|
59
|
-
const sessionId = getSessionId() || "default";
|
|
60
|
-
const updatedPath = filePath.replace(".planning/default/", `.planning/${sessionId}/`);
|
|
61
|
-
console.log(`[hooks-loader] Intercepting and redirecting: ${filePath} -> ${updatedPath}`);
|
|
62
|
-
// 手动执行文件操作并 return,不要继续到 command 部分
|
|
63
|
-
try {
|
|
64
|
-
console.log(`[hooks-loader] Inside try block, toolName=${toolName}`);
|
|
65
|
-
if (toolName === "Write") {
|
|
66
|
-
console.log(`[hooks-loader] Handling Write operation`);
|
|
67
|
-
// 创建目录
|
|
68
|
-
const dir = dirname(updatedPath);
|
|
69
|
-
if (!existsSync(dir)) {
|
|
70
|
-
mkdirSync(dir, { recursive: true });
|
|
71
|
-
}
|
|
72
|
-
// 写入文件
|
|
73
|
-
writeFileSync(updatedPath, toolInput.content || "", "utf-8");
|
|
74
|
-
console.log(`[hooks-loader] File written to ${updatedPath}`);
|
|
75
|
-
// Block 原始工具执行
|
|
76
|
-
return {
|
|
77
|
-
decision: "block",
|
|
78
|
-
systemMessage: `File written to session-specific directory`,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
else if (toolName === "Read") {
|
|
82
|
-
// 读取文件
|
|
83
|
-
if (existsSync(updatedPath)) {
|
|
84
|
-
const content = readFileSync(updatedPath, "utf-8");
|
|
85
|
-
console.log(`[hooks-loader] File read from ${updatedPath}`);
|
|
86
|
-
// Block 原始工具,返回文件内容
|
|
87
|
-
return {
|
|
88
|
-
decision: "block",
|
|
89
|
-
systemMessage: `File content:\n\n${content}`,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
return {
|
|
94
|
-
decision: "block",
|
|
95
|
-
systemMessage: `File not found: ${updatedPath}`,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
else if (toolName === "Edit") {
|
|
100
|
-
// Edit 需要读取、修改、写入
|
|
101
|
-
if (existsSync(updatedPath)) {
|
|
102
|
-
let content = readFileSync(updatedPath, "utf-8");
|
|
103
|
-
// 执行替换
|
|
104
|
-
if (toolInput.old_string && toolInput.new_string) {
|
|
105
|
-
if (toolInput.replace_all) {
|
|
106
|
-
content = content.split(toolInput.old_string).join(toolInput.new_string);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
content = content.replace(toolInput.old_string, toolInput.new_string);
|
|
110
|
-
}
|
|
111
|
-
writeFileSync(updatedPath, content, "utf-8");
|
|
112
|
-
console.log(`[hooks-loader] File edited at ${updatedPath}`);
|
|
113
|
-
}
|
|
114
|
-
return {
|
|
115
|
-
decision: "block",
|
|
116
|
-
systemMessage: `File edited successfully`,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
return {
|
|
121
|
-
decision: "block",
|
|
122
|
-
systemMessage: `File not found: ${updatedPath}`,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
console.error(`[hooks-loader] Error:`, error);
|
|
129
|
-
return {
|
|
130
|
-
decision: "block",
|
|
131
|
-
systemMessage: `Error: ${error.message}`,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (hook.type === "command") {
|
|
138
|
-
const sessionId = getSessionId();
|
|
139
|
-
const result = executeCommand(hook.command, cwd, skillDir, sessionId);
|
|
140
|
-
// 如果有输出,作为系统消息返回
|
|
141
|
-
if (result) {
|
|
142
|
-
return {
|
|
143
|
-
continue: true,
|
|
144
|
-
systemMessage: result,
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return { continue: true };
|
|
149
|
-
};
|
|
150
|
-
}),
|
|
151
|
-
}));
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* 从 skills 目录加载所有 skill 的 hooks
|
|
155
|
-
*/
|
|
156
|
-
export function loadSkillHooks(skillsDir, cwd, getSessionId) {
|
|
157
|
-
const hooks = {};
|
|
158
|
-
if (!existsSync(skillsDir)) {
|
|
159
|
-
return hooks;
|
|
160
|
-
}
|
|
161
|
-
const skillDirs = readdirSync(skillsDir, { withFileTypes: true })
|
|
162
|
-
.filter((dirent) => dirent.isDirectory())
|
|
163
|
-
.map((dirent) => dirent.name);
|
|
164
|
-
for (const skillName of skillDirs) {
|
|
165
|
-
const skillDir = join(skillsDir, skillName);
|
|
166
|
-
const skillMdPath = join(skillDir, "SKILL.md");
|
|
167
|
-
if (!existsSync(skillMdPath)) {
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
try {
|
|
171
|
-
const content = readFileSync(skillMdPath, "utf-8");
|
|
172
|
-
// 验证配置文件
|
|
173
|
-
const validator = new YamlValidator();
|
|
174
|
-
const validationResult = validator.validate(content, skillMdPath);
|
|
175
|
-
// 显示错误
|
|
176
|
-
if (!validationResult.valid) {
|
|
177
|
-
console.error(formatValidationErrors(validationResult.errors));
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
// 显示警告
|
|
181
|
-
if (validationResult.warnings && validationResult.warnings.length > 0) {
|
|
182
|
-
for (const warning of validationResult.warnings) {
|
|
183
|
-
console.warn(formatValidationWarning(warning));
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
const frontmatter = extractYamlFrontmatter(content);
|
|
187
|
-
if (!frontmatter?.hooks) {
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
// 转换各个 hook 事件
|
|
191
|
-
if (frontmatter.hooks.SessionStart) {
|
|
192
|
-
hooks.SessionStart = hooks.SessionStart || [];
|
|
193
|
-
hooks.SessionStart.push(...convertSkillHooksToSdkHooks(frontmatter.hooks.SessionStart, skillDir, cwd, getSessionId, "SessionStart"));
|
|
194
|
-
}
|
|
195
|
-
if (frontmatter.hooks.PreToolUse) {
|
|
196
|
-
hooks.PreToolUse = hooks.PreToolUse || [];
|
|
197
|
-
hooks.PreToolUse.push(...convertSkillHooksToSdkHooks(frontmatter.hooks.PreToolUse, skillDir, cwd, getSessionId, "PreToolUse"));
|
|
198
|
-
}
|
|
199
|
-
if (frontmatter.hooks.PostToolUse) {
|
|
200
|
-
hooks.PostToolUse = hooks.PostToolUse || [];
|
|
201
|
-
hooks.PostToolUse.push(...convertSkillHooksToSdkHooks(frontmatter.hooks.PostToolUse, skillDir, cwd, getSessionId, "PostToolUse"));
|
|
202
|
-
}
|
|
203
|
-
if (frontmatter.hooks.Stop) {
|
|
204
|
-
hooks.Stop = hooks.Stop || [];
|
|
205
|
-
hooks.Stop.push(...convertSkillHooksToSdkHooks(frontmatter.hooks.Stop, skillDir, cwd, getSessionId, "Stop"));
|
|
206
|
-
}
|
|
207
|
-
console.log(`[hooks-loader] Loaded hooks from skill: ${skillName}`);
|
|
208
|
-
}
|
|
209
|
-
catch (error) {
|
|
210
|
-
console.error(`[hooks-loader] Failed to load hooks from ${skillName}:`, error);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return hooks;
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=hooks-loader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-loader.js","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