@optima-chat/optima-agent 0.8.30 → 0.8.31

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.
@@ -220,6 +220,7 @@ commerce product create --name "T恤" --price 99 --stock 50 # 确保真实有50
220
220
  - "设置商品原价/划线价" → `commerce product update --id XX --original-price YY`
221
221
  - "给商品打标签" → `commerce product update --id XX --tags "featured,new"`
222
222
  - "设置商品重量和尺寸" → `commerce product update --id XX --weight 0.5 --length 10 --width 8 --height 5`
223
+ - "库存设置为 N" → `commerce product update --id XX --stock N` 或 `commerce variant update --variant-id XX --stock N`(直接设为目标值,非增减)
223
224
  - "查看所有商品" → `commerce product list`
224
225
 
225
226
  ### 核心功能
@@ -337,7 +338,7 @@ commerce product get --id prod_123
337
338
  ## 重要提示
338
339
 
339
340
  - **国际化策略** - 平台默认语言是英文(en-US)。当用户同时提供中英文内容时,用英文创建商品,中文通过 `i18n` skill 添加翻译。当用户要求"国际化"时,确保英文在主表,其他语言通过 i18n 添加。详见 i18n skill。
340
- - **库存管理请使用 inventory skill** - 如果用户要求更新库存、设置库存数量、补货等,请加载 `/inventory` skill。特别是有变体的产品,必须通过 inventory skill 更新变体库存,不能直接更新产品库存。
341
+ - **库存设置 vs 库存调整** - 设置绝对库存值(如"库存设置为18")用 `commerce product update --id XX --stock 18` 或 `commerce variant update --variant-id XX --stock 18`。增减库存(如"补货+50")用 `commerce inventory update --id XX --quantity 50`。注意 `inventory update --quantity` 是**增量调整**(+=),不是设置绝对值。**有变体的产品不能直接更新主产品库存**(会被拒绝),必须更新各变体的库存。
341
342
  - **商品描述支持 Markdown 格式**,可以使用标题、列表、加粗、链接等排版
342
343
  - 所有命令默认 JSON 输出,便于 AI 解析
343
344
  - 图片需要先上传获取 `media_id`,再关联到商品
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/optima-agent",
3
- "version": "0.8.30",
3
+ "version": "0.8.31",
4
4
  "description": "基于 Claude Agent SDK 的电商运营 AI 助手",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",