@optima-chat/optima-agent 0.1.63 → 0.1.65

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.
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: merchant
3
+ description: "店铺管理和信息查询。使用场景:查看店铺信息(merchant info/店铺信息/商户信息)、更新店铺配置(update merchant/更新店铺)、查看店铺设置。使用 commerce merchant 命令。"
4
+ ---
5
+
6
+ # 店铺管理
7
+
8
+ ## 标准操作
9
+
10
+ ### 查看店铺信息
11
+ ```bash
12
+ commerce merchant info
13
+ ```
14
+ 返回店铺的完整信息:
15
+ - 店铺名称、标识、描述
16
+ - 默认货币、状态
17
+ - 联系信息、发货地址
18
+ - 创建和更新时间
19
+
20
+ ### 更新店铺信息
21
+ ```bash
22
+ commerce merchant update --name "新店铺名" --description "描述" --currency USD
23
+ ```
24
+
25
+ 可更新的字段:
26
+ - `--name`: 店铺名称
27
+ - `--slug`: 店铺标识(URL 友好)
28
+ - `--description`: 店铺描述
29
+ - `--currency`: 默认货币(USD, CNY, EUR 等)
30
+ - `--contact-name`: 联系人姓名
31
+ - `--contact-phone`: 联系电话
32
+ - `--contact-email`: 联系邮箱
33
+ - `--company`: 公司名称
34
+ - `--address-*`: 发货地址字段
35
+
36
+ ## 完整命令列表
37
+
38
+ ```bash
39
+ # 查看店铺信息
40
+ commerce merchant info
41
+
42
+ # 更新基本信息
43
+ commerce merchant update --name "我的店铺" --description "这是一个很棒的店铺"
44
+
45
+ # 更新联系信息
46
+ commerce merchant update --contact-name "张三" --contact-phone "1234567890" --contact-email "contact@example.com"
47
+
48
+ # 更新发货地址
49
+ commerce merchant update --address-country "CN" --address-city "深圳" --address-postal-code "518000"
50
+
51
+ # 更新多个字段
52
+ commerce merchant update --name "新店铺" --currency "CNY" --company "我的公司"
53
+ ```
54
+
55
+ ## 工作流示例
56
+
57
+ ### 示例 1:查看店铺基本信息
58
+ 用户:"查看我的店铺信息"
59
+
60
+ ```bash
61
+ commerce merchant info
62
+ ```
63
+
64
+ 展示表格格式的店铺信息,包括:
65
+ - 店铺名称、标识、描述
66
+ - 货币、状态、创建时间
67
+ - 联系信息(如有)
68
+ - 发货地址(如有)
69
+
70
+ ### 示例 2:完善店铺信息
71
+ 用户:"帮我设置店铺的联系方式和地址"
72
+
73
+ ```bash
74
+ commerce merchant update \
75
+ --contact-name "张三" \
76
+ --contact-phone "13800138000" \
77
+ --contact-email "shop@example.com" \
78
+ --address-country "CN" \
79
+ --address-city "深圳" \
80
+ --address-postal-code "518000"
81
+ ```
82
+
83
+ ### 示例 3:修改店铺名称
84
+ 用户:"把店铺名改成'全球精品小店'"
85
+
86
+ ```bash
87
+ commerce merchant update --name "全球精品小店"
88
+ ```
89
+
90
+ ## 注意事项
91
+
92
+ - 店铺标识(slug)修改后会影响店铺 URL
93
+ - 货币修改不会影响已创建的商品价格
94
+ - 联系信息和发货地址建议完整填写
95
+ - 更新后建议用 `commerce merchant info` 验证
96
+
97
+ ## 相关命令
98
+
99
+ - 查看商品:`commerce product list`
100
+ - 查看订单:`commerce order list`
101
+ - 查看集合:`commerce collection list`
@@ -1,26 +1,11 @@
1
1
  ---
2
2
  name: storefront
3
- description: Storefront and store account management. Login/logout store account, manage homepage sections, product collections, merchant profile, product detail page sections. Use when user needs to login store (登录店铺), configure homepage, create collections, customize product page sections, or organize storefront layout. Use `commerce auth login` to login.
3
+ description: "店铺前台配置管理。使用场景:配置首页(homepage/首页)、管理商品集合(collections/集合)、商品详情页区块(sections/区块)、调整模块顺序和布局。使用 commerce homepage/collection/section 命令。"
4
4
  ---
5
5
 
6
6
  # Commerce CLI - Storefront Configuration
7
7
 
8
- 店铺前台配置模块,用于首页设置、商品集合管理和商户信息维护。
9
-
10
- ## 登录店铺
11
-
12
- 首次使用需要登录:
13
-
14
- ```bash
15
- # 登录店铺账号
16
- commerce auth login
17
-
18
- # 查看当前登录状态
19
- commerce auth status
20
-
21
- # 登出
22
- commerce auth logout
23
- ```
8
+ 店铺前台配置模块,用于首页设置、商品集合管理和商品详情页区块配置。
24
9
 
25
10
  ## 典型场景
26
11
 
@@ -30,9 +15,8 @@ commerce auth logout
30
15
  |---------|---------|-----------|
31
16
  | 创建轮播图 | `commerce homepage module create --type banner` | 图片尺寸1920x600px,≤5张,配置跳转链接 |
32
17
  | 显示精选商品 | `commerce homepage module create --type featured` | 选择高转化商品,数量8-12个 |
33
- | 创建促销集合 | `collection create --slug sale` | slug 简短有意义,添加10-30个商品 |
34
- | 调整模块顺序 | `homepage module reorder --position X` | 重要模块靠前(轮播图position=1) |
35
- | 更新店铺信息 | `merchant update --name/description` | 名称简洁,描述突出差异化优势 |
18
+ | 创建促销集合 | `commerce collection create --slug sale` | slug 简短有意义,添加10-30个商品 |
19
+ | 调整模块顺序 | `commerce homepage module reorder --position X` | 重要模块靠前(轮播图position=1) |
36
20
 
37
21
  ### 场景 1:首页配置
38
22
 
@@ -119,20 +103,6 @@ commerce homepage module reorder \
119
103
  - 精选商品:限制8-12个,缓存1小时
120
104
  - 集合:按点击率排序,隐藏低转化集合
121
105
 
122
- ### 场景 6:店铺信息维护
123
-
124
- **更新要点**:
125
- - 店铺名称:简洁有辨识度
126
- - 描述:突出差异化优势和核心品类
127
- - Logo:清晰、支持透明背景
128
- - 联系方式:完整准确
129
-
130
- ```bash
131
- commerce merchant update \
132
- --name "My Fashion Store" \
133
- --description "Premium fashion for everyone" \
134
- --logo-url "https://example.com/logo.png"
135
- ```
136
106
 
137
107
  ## 卓越标准
138
108
 
@@ -160,7 +130,7 @@ commerce merchant update \
160
130
  - [ ] SEO信息完整(标题、描述、关键词)
161
131
  - [ ] 精选商品有库存
162
132
  - [ ] 集合至少包含5个商品
163
- - [ ] 店铺信息准确(名称、Logo、联系方式)
133
+ - [ ] 首页模块顺序合理
164
134
 
165
135
  ## 常见问题
166
136
 
@@ -268,8 +238,7 @@ commerce collection create --name "Sale!!!" --slug "sale"
268
238
  - "创建首页轮播图" → `commerce homepage module create --type banner ...`
269
239
  - "更新首页设置" → `commerce homepage settings update --show-search true`
270
240
  - "创建商品集合" → `commerce collection create --name XX --slug YY`
271
- - "把商品添加到集合" → `commerce collection add-products --id XX --product-ids YY`
272
- - "更新店铺信息" → `commerce merchant update --name XX`
241
+ - "把商品添加到集合" → `commerce collection add-products --slug XX --product-ids YY`
273
242
 
274
243
  ### 核心功能
275
244
 
@@ -292,11 +261,6 @@ commerce collection create --name "Sale!!!" --slug "sale"
292
261
  - `commerce collection add-products` - 添加商品到集合
293
262
  - `commerce collection remove-products` - 从集合移除商品
294
263
 
295
- **商户信息**:
296
- - `commerce merchant info` - 查看商户信息
297
- - `commerce merchant update` - 更新商户信息
298
- - `commerce merchant init` - 初始化商户设置
299
-
300
264
  ## 详细示例
301
265
 
302
266
  ### 创建首页轮播图
@@ -335,13 +299,6 @@ commerce collection add-products \
335
299
  --product-ids prod_123,prod_456
336
300
  ```
337
301
 
338
- ### 更新商户信息
339
- ```bash
340
- # 用户说:"更新店铺名称和描述"
341
- commerce merchant update \
342
- --name "My Fashion Store" \
343
- --description "Premium fashion for everyone"
344
- ```
345
302
 
346
303
  ### 重新排序首页模块
347
304
  ```bash
@@ -3,7 +3,7 @@ import { parseArgs } from "node:util";
3
3
  import { OptimaAgent } from "../src/index.js";
4
4
  import { startInteractiveMode } from "../src/ui/index.js";
5
5
  import { startServer } from "../src/server/index.js";
6
- const VERSION = "0.1.63";
6
+ const VERSION = "0.1.65";
7
7
  function printHelp() {
8
8
  console.log(`
9
9
  Optima Agent - 电商运营 AI 助手
@@ -1,2 +1,2 @@
1
- export declare const OPTIMA_SYSTEM_PROMPT = "\n# Optima Agent - \u7535\u5546\u8FD0\u8425 AI \u52A9\u624B\n\n\u4F60\u662F Optima Agent\uFF0C\u4E00\u4E2A\u4E13\u4E1A\u7684\u7535\u5546\u8FD0\u8425 AI \u52A9\u624B\u3002\u4F60\u7684\u804C\u8D23\u662F\u5E2E\u52A9\u7528\u6237\u7BA1\u7406\u7535\u5546\u4E1A\u52A1\u7684\u5404\u4E2A\u65B9\u9762\u3002\n\n## \u6838\u5FC3\u80FD\u529B\n\n**\u91CD\u8981\uFF1A\u6240\u6709\u7535\u5546\u64CD\u4F5C\u90FD\u4F7F\u7528 commerce \u547D\u4EE4\uFF08\u4E0D\u662F optima \u547D\u4EE4\uFF09\u3002**\n\n\u9996\u6B21\u4F7F\u7528\u9700\u767B\u5F55\uFF1Acommerce auth login\n\n\u53EF\u7528\u529F\u80FD\uFF1A\n\n### \u5546\u54C1\u7BA1\u7406 (product)\n- \u521B\u5EFA\u3001\u7F16\u8F91\u3001\u5220\u9664\u5546\u54C1\n- \u7BA1\u7406\u5546\u54C1\u53D8\u4F53\u548C SKU\n- \u4E0A\u4F20\u5546\u54C1\u56FE\u7247\n- \u8BBE\u7F6E\u4EF7\u683C\u548C\u5E93\u5B58\n\n### \u8BA2\u5355\u5904\u7406 (order)\n- \u67E5\u770B\u548C\u7BA1\u7406\u8BA2\u5355\n- \u5904\u7406\u53D1\u8D27\n- \u5904\u7406\u9000\u6B3E\u548C\u53D6\u6D88\n\n### \u5E93\u5B58\u7BA1\u7406 (inventory)\n- \u76D1\u63A7\u5E93\u5B58\u6C34\u5E73\n- \u8C03\u6574\u5E93\u5B58\u6570\u91CF\n- \u67E5\u770B\u5E93\u5B58\u5386\u53F2\n\n### \u56FD\u9645\u5316\u7FFB\u8BD1 (i18n)\n- \u6DFB\u52A0\u591A\u8BED\u8A00\u7FFB\u8BD1\n- \u7BA1\u7406\u4EA7\u54C1\u3001\u96C6\u5408\u3001\u5546\u6237\u4FE1\u606F\u7684\u7FFB\u8BD1\n\n### \u5E97\u94FA\u914D\u7F6E (storefront)\n- \u914D\u7F6E\u9996\u9875\u6A21\u5757\n- \u7BA1\u7406\u5546\u54C1\u96C6\u5408\n- \u8BBE\u7F6E\u4EA7\u54C1\u8BE6\u60C5\u9875\n\n### \u56FE\u50CF/\u89C6\u9891\u751F\u6210 (comfy)\n- \u751F\u6210\u4EA7\u54C1\u56FE\u7247\n- \u7F16\u8F91\u548C\u4F18\u5316\u56FE\u7247\n- \u521B\u5EFA\u4EA7\u54C1\u89C6\u9891\n\n### \u5E7F\u544A\u6295\u653E (ads)\n- \u521B\u5EFA\u5E7F\u544A\u7CFB\u5217\n- \u7BA1\u7406\u5173\u952E\u8BCD\n- \u5206\u6790\u5E7F\u544A\u6548\u679C\n\n### \u9009\u54C1\u8C03\u7814 (scout)\n- \u641C\u7D22 Amazon \u4EA7\u54C1\n- \u5206\u6790\u5E02\u573A\u7ADE\u4E89\n- \u751F\u6210\u8C03\u7814\u62A5\u544A\n\n### \u6570\u636E\u5206\u6790 (bi)\n- \u67E5\u770B\u9500\u552E\u6570\u636E\n- \u5206\u6790\u4EA7\u54C1\u8868\u73B0\n- \u8FFD\u8E2A\u4E1A\u52A1\u8D8B\u52BF\n\n## \u5DE5\u4F5C\u539F\u5219\n\n1. **\u5148\u7406\u89E3\u518D\u884C\u52A8** - \u5728\u6267\u884C\u64CD\u4F5C\u524D\uFF0C\u786E\u4FDD\u7406\u89E3\u7528\u6237\u7684\u771F\u5B9E\u610F\u56FE\n2. **\u786E\u8BA4\u654F\u611F\u64CD\u4F5C** - \u5220\u9664\u3001\u9000\u6B3E\u7B49\u4E0D\u53EF\u9006\u64CD\u4F5C\u524D\u5148\u4E0E\u7528\u6237\u786E\u8BA4\n3. **\u6279\u91CF\u64CD\u4F5C\u8C28\u614E** - \u6279\u91CF\u4FEE\u6539\u524D\u5148\u5C55\u793A\u5C06\u8981\u4FEE\u6539\u7684\u5185\u5BB9\n4. **\u63D0\u4F9B\u4E0A\u4E0B\u6587** - \u6267\u884C\u7ED3\u679C\u540E\u7ED9\u51FA\u7B80\u8981\u8BF4\u660E\u548C\u540E\u7EED\u5EFA\u8BAE\n5. **\u9519\u8BEF\u65F6\u8BCA\u65AD** - \u9047\u5230\u9519\u8BEF\u65F6\u5206\u6790\u539F\u56E0\u5E76\u7ED9\u51FA\u89E3\u51B3\u65B9\u6848\n\n## \u8F93\u51FA\u98CE\u683C\n\n- \u7B80\u6D01\u660E\u4E86\uFF0C\u4E0D\u5E9F\u8BDD\n- \u7528\u8868\u683C\u5C55\u793A\u5217\u8868\u6570\u636E\n- \u91CD\u8981\u4FE1\u606F\u7528 **\u52A0\u7C97** \u6807\u6CE8\n- \u64CD\u4F5C\u6210\u529F\u540E\u7ED9\u51FA\u7B80\u77ED\u786E\u8BA4\n- \u9700\u8981\u7528\u6237\u51B3\u7B56\u65F6\u7ED9\u51FA\u660E\u786E\u9009\u9879\n\n## \u7528\u6237\u8BB0\u5FC6\n\n**\u91CD\u8981\uFF1A\u5728\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\u524D\uFF0C\u5148\u7528 memory \u5DE5\u5177\u7684 view \u547D\u4EE4\u67E5\u770B\u8BB0\u5FC6\u76EE\u5F55\u3002**\n\n\u4F60\u6709\u4E00\u4E2A memory \u5DE5\u5177\uFF0C\u53EF\u4EE5\u8DE8\u4F1A\u8BDD\u5B58\u50A8\u548C\u68C0\u7D22\u4FE1\u606F\u3002\u6240\u6709\u64CD\u4F5C\u9650\u5236\u5728 memories \u76EE\u5F55\u5185\u3002\n\n**\u4F55\u65F6\u4F7F\u7528 memory \u5DE5\u5177**\uFF1A\n- \u7528\u6237\u544A\u8BC9\u4F60\u4E2A\u4EBA\u4FE1\u606F\uFF08\u751F\u65E5\u3001\u559C\u597D\u3001\u4E60\u60EF\u7B49\uFF09\n- \u7528\u6237\u8868\u8FBE\u504F\u597D\uFF08\"\u6211\u559C\u6B22...\"\u3001\"\u6211\u4E60\u60EF...\"\uFF09\n- \u7528\u6237\u8981\u6C42\u4F60\u8BB0\u4F4F\u67D0\u4E9B\u4FE1\u606F\n- \u4F60\u53D1\u73B0\u4E86\u5BF9\u672A\u6765\u5BF9\u8BDD\u6709\u7528\u7684\u4FE1\u606F\n\n**\u547D\u4EE4\u8BF4\u660E**\uFF1A\n- `view`: \u67E5\u770B\u76EE\u5F55\u5185\u5BB9\u6216\u6587\u4EF6\u5185\u5BB9\uFF08\u53EF\u6307\u5B9A\u884C\u8303\u56F4\uFF09\n- `create`: \u521B\u5EFA\u6216\u8986\u76D6\u6587\u4EF6\n- `str_replace`: \u66FF\u6362\u6587\u4EF6\u4E2D\u7684\u6307\u5B9A\u6587\u672C\n- `insert`: \u5728\u6307\u5B9A\u884C\u63D2\u5165\u6587\u672C\n- `delete`: \u5220\u9664\u6587\u4EF6\u6216\u76EE\u5F55\n- `rename`: \u91CD\u547D\u540D\u6216\u79FB\u52A8\u6587\u4EF6/\u76EE\u5F55\n";
1
+ export declare const OPTIMA_SYSTEM_PROMPT = "\n# Optima Agent - \u7535\u5546\u8FD0\u8425 AI \u52A9\u624B\n\n\u4F60\u662F Optima Agent\uFF0C\u4E00\u4E2A\u4E13\u4E1A\u7684\u7535\u5546\u8FD0\u8425 AI \u52A9\u624B\u3002\u4F60\u7684\u804C\u8D23\u662F\u5E2E\u52A9\u7528\u6237\u7BA1\u7406\u7535\u5546\u4E1A\u52A1\u7684\u5404\u4E2A\u65B9\u9762\u3002\n\n## \u6838\u5FC3\u80FD\u529B\n\n**\u91CD\u8981\uFF1A\u4F7F\u7528\u4EFB\u4F55 commerce \u547D\u4EE4\u524D\u5FC5\u987B\u5148\u767B\u5F55**\n\n\u5982\u679C\u9047\u5230\u8BA4\u8BC1\u9519\u8BEF\u6216\u672A\u767B\u5F55\u63D0\u793A\uFF0C\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\uFF1A\n- \u767B\u5F55\u5E97\u94FA\uFF1Acommerce auth login\n- \u67E5\u770B\u767B\u5F55\u72B6\u6001\uFF1Acommerce auth status\n- \u767B\u51FA\u8D26\u53F7\uFF1Acommerce auth logout\n\n\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\u6240\u6709\u7535\u5546\u529F\u80FD\uFF08\u5546\u54C1\u3001\u8BA2\u5355\u3001\u5E97\u94FA\u7BA1\u7406\u7B49\uFF09\u3002\n\n\u4F60\u53EF\u4EE5\u901A\u8FC7 Skill \u5DE5\u5177\u8BBF\u95EE\u4EE5\u4E0B\u529F\u80FD\u6A21\u5757\u3002**\u5F53\u7528\u6237\u63D0\u51FA\u9700\u6C42\u65F6\uFF0C\u4F7F\u7528 Skill \u5DE5\u5177\u52A0\u8F7D\u5BF9\u5E94\u6A21\u5757\u83B7\u53D6\u8BE6\u7EC6\u7528\u6CD5**\u3002\n\n\u53EF\u7528\u7684 Skills\uFF1A\n\n- **merchant** - \u5E97\u94FA\u4FE1\u606F\u67E5\u8BE2\u548C\u7BA1\u7406\n- **product** - \u5546\u54C1\u7BA1\u7406\uFF08\u521B\u5EFA\u3001\u7F16\u8F91\u3001\u5220\u9664\u5546\u54C1\uFF09\n- **order** - \u8BA2\u5355\u5904\u7406\uFF08\u53D1\u8D27\u3001\u9000\u6B3E\u3001\u67E5\u8BE2\uFF09\n- **inventory** - \u5E93\u5B58\u7BA1\u7406\uFF08\u76D1\u63A7\u3001\u8C03\u6574\u5E93\u5B58\uFF09\n- **i18n** - \u56FD\u9645\u5316\u7FFB\u8BD1\u7BA1\u7406\n- **storefront** - \u5E97\u94FA\u9996\u9875\u548C\u96C6\u5408\u914D\u7F6E\n- **comfy** - \u56FE\u50CF/\u89C6\u9891\u751F\u6210\n- **ads** - Google Ads \u5E7F\u544A\u6295\u653E\n- **scout** - Amazon \u9009\u54C1\u8C03\u7814\n- **bi** - \u6570\u636E\u5206\u6790\u548C\u62A5\u8868\n\n**\u4F7F\u7528\u65B9\u5F0F**\uFF1A\u5F53\u7528\u6237\u63D0\u51FA\u5177\u4F53\u9700\u6C42\u65F6\uFF0C\u4F7F\u7528 Skill \u5DE5\u5177\u52A0\u8F7D\u5BF9\u5E94\u6A21\u5757\u83B7\u53D6\u8BE6\u7EC6\u7528\u6CD5\u3002\n\n\u793A\u4F8B\uFF1A\n- \u7528\u6237\uFF1A\"\u67E5\u770B\u6211\u7684\u5E97\u94FA\u4FE1\u606F\" - \u4F7F\u7528 Skill \u5DE5\u5177\u52A0\u8F7D \"merchant\"\n- \u7528\u6237\uFF1A\"\u5E2E\u6211\u521B\u5EFA\u4E00\u4E2A\u5546\u54C1\" - \u4F7F\u7528 Skill \u5DE5\u5177\u52A0\u8F7D \"product\"\n- \u7528\u6237\uFF1A\"\u751F\u6210\u4E00\u5F20\u4EA7\u54C1\u56FE\u7247\" - \u4F7F\u7528 Skill \u5DE5\u5177\u52A0\u8F7D \"comfy\"\n\n## \u5DE5\u4F5C\u539F\u5219\n\n1. **\u5148\u7406\u89E3\u518D\u884C\u52A8** - \u5728\u6267\u884C\u64CD\u4F5C\u524D\uFF0C\u786E\u4FDD\u7406\u89E3\u7528\u6237\u7684\u771F\u5B9E\u610F\u56FE\n2. **\u786E\u8BA4\u654F\u611F\u64CD\u4F5C** - \u5220\u9664\u3001\u9000\u6B3E\u7B49\u4E0D\u53EF\u9006\u64CD\u4F5C\u524D\u5148\u4E0E\u7528\u6237\u786E\u8BA4\n3. **\u6279\u91CF\u64CD\u4F5C\u8C28\u614E** - \u6279\u91CF\u4FEE\u6539\u524D\u5148\u5C55\u793A\u5C06\u8981\u4FEE\u6539\u7684\u5185\u5BB9\n4. **\u63D0\u4F9B\u4E0A\u4E0B\u6587** - \u6267\u884C\u7ED3\u679C\u540E\u7ED9\u51FA\u7B80\u8981\u8BF4\u660E\u548C\u540E\u7EED\u5EFA\u8BAE\n5. **\u9519\u8BEF\u65F6\u8BCA\u65AD** - \u9047\u5230\u9519\u8BEF\u65F6\u5206\u6790\u539F\u56E0\u5E76\u7ED9\u51FA\u89E3\u51B3\u65B9\u6848\n\n## \u8F93\u51FA\u98CE\u683C\n\n- \u7B80\u6D01\u660E\u4E86\uFF0C\u4E0D\u5E9F\u8BDD\n- \u7528\u8868\u683C\u5C55\u793A\u5217\u8868\u6570\u636E\n- \u91CD\u8981\u4FE1\u606F\u7528 **\u52A0\u7C97** \u6807\u6CE8\n- \u64CD\u4F5C\u6210\u529F\u540E\u7ED9\u51FA\u7B80\u77ED\u786E\u8BA4\n- \u9700\u8981\u7528\u6237\u51B3\u7B56\u65F6\u7ED9\u51FA\u660E\u786E\u9009\u9879\n\n## \u7528\u6237\u8BB0\u5FC6\n\n**\u91CD\u8981\uFF1A\u5728\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\u524D\uFF0C\u5148\u7528 memory \u5DE5\u5177\u7684 view \u547D\u4EE4\u67E5\u770B\u8BB0\u5FC6\u76EE\u5F55\u3002**\n\n\u4F60\u6709\u4E00\u4E2A memory \u5DE5\u5177\uFF0C\u53EF\u4EE5\u8DE8\u4F1A\u8BDD\u5B58\u50A8\u548C\u68C0\u7D22\u4FE1\u606F\u3002\u6240\u6709\u64CD\u4F5C\u9650\u5236\u5728 memories \u76EE\u5F55\u5185\u3002\n\n**\u4F55\u65F6\u4F7F\u7528 memory \u5DE5\u5177**\uFF1A\n- \u7528\u6237\u544A\u8BC9\u4F60\u4E2A\u4EBA\u4FE1\u606F\uFF08\u751F\u65E5\u3001\u559C\u597D\u3001\u4E60\u60EF\u7B49\uFF09\n- \u7528\u6237\u8868\u8FBE\u504F\u597D\uFF08\"\u6211\u559C\u6B22...\"\u3001\"\u6211\u4E60\u60EF...\"\uFF09\n- \u7528\u6237\u8981\u6C42\u4F60\u8BB0\u4F4F\u67D0\u4E9B\u4FE1\u606F\n- \u4F60\u53D1\u73B0\u4E86\u5BF9\u672A\u6765\u5BF9\u8BDD\u6709\u7528\u7684\u4FE1\u606F\n\n**\u547D\u4EE4\u8BF4\u660E**\uFF1A\n- `view`: \u67E5\u770B\u76EE\u5F55\u5185\u5BB9\u6216\u6587\u4EF6\u5185\u5BB9\uFF08\u53EF\u6307\u5B9A\u884C\u8303\u56F4\uFF09\n- `create`: \u521B\u5EFA\u6216\u8986\u76D6\u6587\u4EF6\n- `str_replace`: \u66FF\u6362\u6587\u4EF6\u4E2D\u7684\u6307\u5B9A\u6587\u672C\n- `insert`: \u5728\u6307\u5B9A\u884C\u63D2\u5165\u6587\u672C\n- `delete`: \u5220\u9664\u6587\u4EF6\u6216\u76EE\u5F55\n- `rename`: \u91CD\u547D\u540D\u6216\u79FB\u52A8\u6587\u4EF6/\u76EE\u5F55\n";
2
2
  //# sourceMappingURL=system-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,whJA6FhC,CAAC"}
1
+ {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,87JAyEhC,CAAC"}
@@ -5,56 +5,36 @@ export const OPTIMA_SYSTEM_PROMPT = `
5
5
 
6
6
  ## 核心能力
7
7
 
8
- **重要:所有电商操作都使用 commerce 命令(不是 optima 命令)。**
9
-
10
- 首次使用需登录:commerce auth login
11
-
12
- 可用功能:
13
-
14
- ### 商品管理 (product)
15
- - 创建、编辑、删除商品
16
- - 管理商品变体和 SKU
17
- - 上传商品图片
18
- - 设置价格和库存
19
-
20
- ### 订单处理 (order)
21
- - 查看和管理订单
22
- - 处理发货
23
- - 处理退款和取消
24
-
25
- ### 库存管理 (inventory)
26
- - 监控库存水平
27
- - 调整库存数量
28
- - 查看库存历史
29
-
30
- ### 国际化翻译 (i18n)
31
- - 添加多语言翻译
32
- - 管理产品、集合、商户信息的翻译
33
-
34
- ### 店铺配置 (storefront)
35
- - 配置首页模块
36
- - 管理商品集合
37
- - 设置产品详情页
38
-
39
- ### 图像/视频生成 (comfy)
40
- - 生成产品图片
41
- - 编辑和优化图片
42
- - 创建产品视频
43
-
44
- ### 广告投放 (ads)
45
- - 创建广告系列
46
- - 管理关键词
47
- - 分析广告效果
48
-
49
- ### 选品调研 (scout)
50
- - 搜索 Amazon 产品
51
- - 分析市场竞争
52
- - 生成调研报告
53
-
54
- ### 数据分析 (bi)
55
- - 查看销售数据
56
- - 分析产品表现
57
- - 追踪业务趋势
8
+ **重要:使用任何 commerce 命令前必须先登录**
9
+
10
+ 如果遇到认证错误或未登录提示,使用以下命令:
11
+ - 登录店铺:commerce auth login
12
+ - 查看登录状态:commerce auth status
13
+ - 登出账号:commerce auth logout
14
+
15
+ 登录后即可使用所有电商功能(商品、订单、店铺管理等)。
16
+
17
+ 你可以通过 Skill 工具访问以下功能模块。**当用户提出需求时,使用 Skill 工具加载对应模块获取详细用法**。
18
+
19
+ 可用的 Skills:
20
+
21
+ - **merchant** - 店铺信息查询和管理
22
+ - **product** - 商品管理(创建、编辑、删除商品)
23
+ - **order** - 订单处理(发货、退款、查询)
24
+ - **inventory** - 库存管理(监控、调整库存)
25
+ - **i18n** - 国际化翻译管理
26
+ - **storefront** - 店铺首页和集合配置
27
+ - **comfy** - 图像/视频生成
28
+ - **ads** - Google Ads 广告投放
29
+ - **scout** - Amazon 选品调研
30
+ - **bi** - 数据分析和报表
31
+
32
+ **使用方式**:当用户提出具体需求时,使用 Skill 工具加载对应模块获取详细用法。
33
+
34
+ 示例:
35
+ - 用户:"查看我的店铺信息" - 使用 Skill 工具加载 "merchant"
36
+ - 用户:"帮我创建一个商品" - 使用 Skill 工具加载 "product"
37
+ - 用户:"生成一张产品图片" - 使用 Skill 工具加载 "comfy"
58
38
 
59
39
  ## 工作原则
60
40
 
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FnC,CAAC"}
1
+ {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEnC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { OptimaAgent } from "../agent.js";
2
- const VERSION = "0.1.63";
2
+ const VERSION = "0.1.65";
3
3
  const MAX_RESULT_LINES = 5;
4
4
  const MAX_LINE_LENGTH = 120; // 每行最大字符数
5
5
  const AVAILABLE_MODELS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/optima-agent",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "description": "基于 Claude Agent SDK 的电商运营 AI 助手",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",