@optima-chat/optima-agent 0.8.19 → 0.8.21
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/settings.local.json +3 -128
- package/.claude/skills/logistics/SKILL.md +156 -0
- package/.claude/skills/order/SKILL.md +5 -5
- package/.claude/skills/shipping/SKILL.md +2 -0
- package/.claude/skills/shopify/SKILL.md +225 -0
- 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/bin/shopify.d.ts +3 -0
- package/dist/bin/shopify.d.ts.map +1 -0
- package/dist/bin/shopify.js +3 -0
- package/dist/bin/shopify.js.map +1 -0
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +2 -18
- package/dist/src/agent.js.map +1 -1
- package/dist/src/system-prompt.d.ts.map +1 -1
- package/dist/src/system-prompt.js +4 -1
- package/dist/src/system-prompt.js.map +1 -1
- package/dist/src/types.d.ts +0 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/ui/headless-types.d.ts +0 -1
- package/dist/src/ui/headless-types.d.ts.map +1 -1
- package/dist/src/ui/headless.js +4 -4
- package/dist/src/ui/headless.js.map +1 -1
- package/package.json +5 -2
- 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
|
@@ -1,135 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
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
4
|
"Bash(commerce collection --help:*)",
|
|
45
|
-
"Bash(commerce collection update --help:*)",
|
|
46
5
|
"Bash(commerce collection set-cover:*)",
|
|
47
|
-
"Bash(commerce
|
|
48
|
-
"Bash(
|
|
49
|
-
|
|
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
|
-
"Bash(optima:*)",
|
|
118
|
-
"WebFetch(domain:www.npmjs.com)",
|
|
119
|
-
"WebFetch(domain:registry.npmjs.org)",
|
|
120
|
-
"WebFetch(domain:zod.dev)",
|
|
121
|
-
"Bash(npm ls:*)",
|
|
122
|
-
"Bash(NODE_DEBUG=child_process npx tsx:*)",
|
|
123
|
-
"Bash(DEBUG_CLAUDE_AGENT_SDK=1 npx tsx:*)",
|
|
124
|
-
"Bash(CLAUDECODE= npx tsx:*)",
|
|
125
|
-
"Bash(env:*)",
|
|
126
|
-
"Bash(gh release:*)",
|
|
127
|
-
"Bash(npm info:*)",
|
|
128
|
-
"Bash(gh run:*)",
|
|
129
|
-
"Bash(gtimeout 90:*)",
|
|
130
|
-
"Bash(sentinel:*)"
|
|
131
|
-
],
|
|
132
|
-
"deny": [],
|
|
133
|
-
"ask": []
|
|
6
|
+
"Bash(commerce homepage --help:*)",
|
|
7
|
+
"Bash(find:*)"
|
|
8
|
+
]
|
|
134
9
|
}
|
|
135
10
|
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: logistics
|
|
3
|
+
description: "物流服务管理。使用场景:运单查询、运单取消、标签获取、物流追踪、运费报价、地址验证。当用户问物流服务、运单详情、追踪号查询、快递识别、运费查询时使用。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 物流服务 (Logistics)
|
|
7
|
+
|
|
8
|
+
> **注意**:此模块管理 optima-logistics 物流服务的底层能力。日常订单发货请使用 **order** skill(`commerce order ship`)。
|
|
9
|
+
|
|
10
|
+
## 典型场景
|
|
11
|
+
|
|
12
|
+
| 用户说 | 命令 |
|
|
13
|
+
|--------|------|
|
|
14
|
+
| "查运单详情" / "运单 lo_xxx 的状态" | `logistics shipment get <id>` |
|
|
15
|
+
| "取消运单" | `logistics shipment cancel <id>` |
|
|
16
|
+
| "打印面单" / "下载标签" | `logistics shipment label <id>` |
|
|
17
|
+
| "追踪物流" / "包裹到哪了"(用运单号) | `logistics tracking get <tracking-number>` |
|
|
18
|
+
| "注册追踪号" | `logistics tracking register <tracking-number>` |
|
|
19
|
+
| "识别快递公司" | `logistics tracking detect-courier <tracking-number>` |
|
|
20
|
+
| "查运费" / "报价" | `logistics rates query` |
|
|
21
|
+
| "验证地址" | `logistics address validate` |
|
|
22
|
+
|
|
23
|
+
## 不在此模块
|
|
24
|
+
|
|
25
|
+
| 用户说 | 正确模块 |
|
|
26
|
+
|--------|----------|
|
|
27
|
+
| "订单发货" | **order** skill → `commerce order ship` |
|
|
28
|
+
| "运费设置" / "运费模式" | **shipping** skill → `commerce shipping` |
|
|
29
|
+
| "固定运费区域" | **shipping** skill → `commerce shipping-zone` |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 运单管理
|
|
34
|
+
|
|
35
|
+
### 查看运单详情
|
|
36
|
+
```bash
|
|
37
|
+
logistics shipment get <logistics-order-id>
|
|
38
|
+
|
|
39
|
+
# 示例
|
|
40
|
+
logistics shipment get lo_abc123def456
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 取消运单
|
|
44
|
+
```bash
|
|
45
|
+
logistics shipment cancel <logistics-order-id>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 获取运单标签
|
|
49
|
+
```bash
|
|
50
|
+
logistics shipment label <logistics-order-id>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
返回标签下载链接(PDF),用于打印贴在包裹上。
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 物流追踪
|
|
58
|
+
|
|
59
|
+
### 查询追踪信息
|
|
60
|
+
```bash
|
|
61
|
+
logistics tracking get <tracking-number> [--courier <slug>]
|
|
62
|
+
|
|
63
|
+
# 示例
|
|
64
|
+
logistics tracking get SF1234567890
|
|
65
|
+
logistics tracking get 1Z999AA10123456784 --courier ups
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
返回:当前状态、轨迹列表(checkpoints)、预计送达时间。
|
|
69
|
+
|
|
70
|
+
### 注册追踪号(推送通知)
|
|
71
|
+
```bash
|
|
72
|
+
logistics tracking register <tracking-number> [--courier <slug>] [--logistics-order-id <id>]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
注册后可通过 webhook 接收物流状态更新推送。
|
|
76
|
+
|
|
77
|
+
### 识别快递公司
|
|
78
|
+
```bash
|
|
79
|
+
logistics tracking detect-courier <tracking-number>
|
|
80
|
+
|
|
81
|
+
# 示例
|
|
82
|
+
logistics tracking detect-courier SF1234567890
|
|
83
|
+
# → sf-express
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 运费报价
|
|
89
|
+
|
|
90
|
+
### 查询运费
|
|
91
|
+
```bash
|
|
92
|
+
logistics rates query \
|
|
93
|
+
--origin '<JSON Address>' \
|
|
94
|
+
--destination '<JSON Address>' \
|
|
95
|
+
--items '<JSON ParcelItem[]>' \
|
|
96
|
+
[--currency USD]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Address JSON 格式:
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"name": "John",
|
|
103
|
+
"street1": "123 Main St",
|
|
104
|
+
"city": "New York",
|
|
105
|
+
"state": "NY",
|
|
106
|
+
"postalCode": "10001",
|
|
107
|
+
"country": "US",
|
|
108
|
+
"phone": "+1234567890"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
ParcelItem JSON 格式:
|
|
113
|
+
```json
|
|
114
|
+
[{
|
|
115
|
+
"title": "T-Shirt",
|
|
116
|
+
"quantity": 2,
|
|
117
|
+
"price": 29.99,
|
|
118
|
+
"currency": "USD",
|
|
119
|
+
"weight": 300,
|
|
120
|
+
"originCountry": "CN"
|
|
121
|
+
}]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 地址验证
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
logistics address validate --address '<JSON Address>'
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 命令参考
|
|
135
|
+
|
|
136
|
+
### 运单管理
|
|
137
|
+
- `logistics shipment get <id>` - 查看运单详情
|
|
138
|
+
- `logistics shipment cancel <id>` - 取消运单
|
|
139
|
+
- `logistics shipment label <id>` - 获取运单标签
|
|
140
|
+
|
|
141
|
+
### 物流追踪
|
|
142
|
+
- `logistics tracking get <number>` - 查询追踪信息
|
|
143
|
+
- `logistics tracking register <number>` - 注册追踪号
|
|
144
|
+
- `logistics tracking detect-courier <number>` - 识别快递公司
|
|
145
|
+
|
|
146
|
+
### 运费
|
|
147
|
+
- `logistics rates query` - 查询运费报价
|
|
148
|
+
|
|
149
|
+
### 地址
|
|
150
|
+
- `logistics address validate` - 验证地址
|
|
151
|
+
|
|
152
|
+
所有命令支持 `--pretty` 参数输出人类可读格式。
|
|
153
|
+
|
|
154
|
+
## 不确定用什么命令?
|
|
155
|
+
|
|
156
|
+
运行 `logistics --help` 查看所有子命令。
|
|
@@ -45,7 +45,7 @@ description: Order fulfillment and shipping management. Process orders, ship pac
|
|
|
45
45
|
|
|
46
46
|
| shipping_mode_used | 含义 | 发货方式 |
|
|
47
47
|
|--------------------|------|----------|
|
|
48
|
-
| `easyship` |
|
|
48
|
+
| `easyship` | 买家选择了动态运费快递 | 可选自动发货 或 手动发货 |
|
|
49
49
|
| `fixed` | 买家使用固定运费 | 只能手动发货 |
|
|
50
50
|
| `free` | 全球免运费 | 只能手动发货 |
|
|
51
51
|
| 空/null | 历史订单 | 只能手动发货 |
|
|
@@ -80,10 +80,10 @@ description: Order fulfillment and shipping management. Process orders, ship pac
|
|
|
80
80
|
**命令**:
|
|
81
81
|
```bash
|
|
82
82
|
# 使用买家选择的快递(推荐)
|
|
83
|
-
commerce order ship --id <order-id> --
|
|
83
|
+
commerce order ship --id <order-id> --auto
|
|
84
84
|
|
|
85
85
|
# 或指定其他 Easyship 支持的快递
|
|
86
|
-
commerce order ship --id <order-id> --
|
|
86
|
+
commerce order ship --id <order-id> --auto --courier-id <courier-id>
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
**返回结果包含**:
|
|
@@ -184,7 +184,7 @@ AskUserQuestion:
|
|
|
184
184
|
|
|
185
185
|
用户:[选择 Easyship 自动发货]
|
|
186
186
|
|
|
187
|
-
助手:[执行 Bash: commerce order ship --id order_abc --
|
|
187
|
+
助手:[执行 Bash: commerce order ship --id order_abc --auto]
|
|
188
188
|
[检查返回结果中的 label_state]
|
|
189
189
|
|
|
190
190
|
[情况A:label_state = "generated",有 label_url]
|
|
@@ -367,7 +367,7 @@ commerce order get --id order_123
|
|
|
367
367
|
|
|
368
368
|
# 步骤2a:如果 shipping_mode_used = "easyship",询问用户选择后
|
|
369
369
|
# 用户选择 Easyship 自动发货
|
|
370
|
-
commerce order ship --id order_123 --
|
|
370
|
+
commerce order ship --id order_123 --auto
|
|
371
371
|
|
|
372
372
|
# 步骤2b:如果用户选择手动发货,或 shipping_mode_used = "fixed"/"free"
|
|
373
373
|
# 只需提供运单号,carrier 可选
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shopify
|
|
3
|
+
description: Shopify store integration for Optima Commerce. Connect Shopify stores, sync products/orders/inventory/customers, manage collections, discounts, draft orders, refunds, webhooks, markets, and analytics. Use when user mentions Shopify, wants to connect a Shopify store, or manage Shopify-related operations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Shopify CLI - Shopify 店铺集成管理
|
|
7
|
+
|
|
8
|
+
Shopify 集成模块,用于连接和管理用户的 Shopify 店铺。
|
|
9
|
+
|
|
10
|
+
**重要**:这里管理的是用户在 Shopify 平台上的店铺,不是 Optima 自有店铺。用户可以将 Shopify 店铺连接到 Optima,实现跨平台管理。
|
|
11
|
+
|
|
12
|
+
## 典型场景
|
|
13
|
+
|
|
14
|
+
当用户说:
|
|
15
|
+
- "连接我的 Shopify 店铺" → `shopify auth login --shop mystore.myshopify.com`
|
|
16
|
+
- "查看我连接了哪些 Shopify 店铺" → `shopify auth stores`
|
|
17
|
+
- "看看 Shopify 上有哪些商品" → `shopify product list --store <storeId>`
|
|
18
|
+
- "把 Shopify 商品同步过来" → `shopify product sync --store <storeId>`
|
|
19
|
+
- "查看 Shopify 订单" → `shopify order list --store <storeId>`
|
|
20
|
+
- "Shopify 订单发货" → `shopify order fulfill --store <storeId> --order <orderId> --tracking <号码>`
|
|
21
|
+
- "查看 Shopify 库存" → `shopify inventory list --store <storeId>`
|
|
22
|
+
- "同步 Shopify 库存" → `shopify inventory sync --store <storeId>`
|
|
23
|
+
- "创建 Shopify 折扣码" → `shopify discount create --store <storeId> --code SAVE10 --percentage 10`
|
|
24
|
+
- "查看 Shopify 销售数据" → `shopify analytics report --store <storeId>`
|
|
25
|
+
|
|
26
|
+
### 场景决策表
|
|
27
|
+
|
|
28
|
+
| 用户需求 | 推荐命令 | 关键注意点 |
|
|
29
|
+
|---------|---------|-----------|
|
|
30
|
+
| 连接 Shopify 店铺 | `shopify auth login --shop <domain>` | 会打开浏览器授权 |
|
|
31
|
+
| 查看已连接店铺 | `shopify auth stores` | 显示所有已连接店铺 |
|
|
32
|
+
| 断开 Shopify 店铺 | `shopify auth stores --disconnect <storeId>` | 不可逆操作,需确认 |
|
|
33
|
+
| 浏览 Shopify 商品 | `shopify product list --store <id>` | 可用 --status 过滤 |
|
|
34
|
+
| 同步商品到 Optima | `shopify product sync --store <id>` | 从 Shopify 同步到 Optima |
|
|
35
|
+
| 查看 Shopify 订单 | `shopify order list --store <id>` | 可用 --status 过滤 |
|
|
36
|
+
| Shopify 订单发货 | `shopify order fulfill --store <id> --order <oid>` | 需要 tracking 号 |
|
|
37
|
+
| 库存对比 | `shopify inventory compare --store <id>` | 对比 Shopify 和 Optima 库存差异 |
|
|
38
|
+
| 客户同步 | `shopify customer sync --store <id>` | 同步客户数据到 Optima |
|
|
39
|
+
| 创建折扣码 | `shopify discount create --store <id>` | 支持百分比和固定金额 |
|
|
40
|
+
| 销售报表 | `shopify analytics report --store <id>` | ShopifyQL 数据分析 |
|
|
41
|
+
|
|
42
|
+
## 使用前提
|
|
43
|
+
|
|
44
|
+
1. 用户必须先登录 Optima(`optima auth login`)
|
|
45
|
+
2. 然后连接 Shopify 店铺(`shopify auth login --shop <domain>`)
|
|
46
|
+
3. 连接后通过 `--store <storeId>` 指定操作哪个店铺
|
|
47
|
+
|
|
48
|
+
### 获取 storeId
|
|
49
|
+
|
|
50
|
+
所有操作都需要 `--store <storeId>` 参数,先用 `shopify auth stores` 获取:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
shopify auth stores
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
如果用户只连接了一个店铺,可以从输出中直接取 storeId。
|
|
57
|
+
|
|
58
|
+
## 连接 Shopify 店铺流程
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 步骤1:连接店铺(自动打开浏览器授权)
|
|
62
|
+
shopify auth login --shop mystore.myshopify.com
|
|
63
|
+
|
|
64
|
+
# 步骤2:在浏览器中点击 Install App 授权
|
|
65
|
+
# CLI 会自动等待授权完成(最长10分钟)
|
|
66
|
+
|
|
67
|
+
# 步骤3:授权成功后显示店铺信息
|
|
68
|
+
# 如果在容器/无浏览器环境,使用 --no-browser 手动复制 URL
|
|
69
|
+
shopify auth login --shop mystore.myshopify.com --no-browser
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 命令参考
|
|
73
|
+
|
|
74
|
+
### 认证和店铺管理
|
|
75
|
+
- `shopify auth login --shop <domain>` - 连接 Shopify 店铺
|
|
76
|
+
- `shopify auth status` - 查看认证状态
|
|
77
|
+
- `shopify auth stores` - 列出已连接店铺
|
|
78
|
+
- `shopify auth stores --info <storeId>` - 查看店铺实时信息
|
|
79
|
+
- `shopify auth stores --disconnect <storeId>` - 断开店铺连接
|
|
80
|
+
|
|
81
|
+
### 商品管理
|
|
82
|
+
- `shopify product list --store <id>` - 商品列表
|
|
83
|
+
- `shopify product get --store <id> --product <pid>` - 商品详情
|
|
84
|
+
- `shopify product search --store <id> --query <关键词>` - 搜索商品
|
|
85
|
+
- `shopify product sync --store <id>` - 同步商品到 Optima
|
|
86
|
+
- `shopify product publish --store <id> --product <pid>` - 发布商品到销售渠道
|
|
87
|
+
- `shopify product mapping --store <id>` - 查看 Shopify↔Optima 商品映射
|
|
88
|
+
|
|
89
|
+
### 订单管理
|
|
90
|
+
- `shopify order list --store <id>` - 订单列表
|
|
91
|
+
- `shopify order get --store <id> --order <oid>` - 订单详情
|
|
92
|
+
- `shopify order fulfill --store <id> --order <oid> --tracking <号码>` - 订单发货
|
|
93
|
+
- `shopify order sync --store <id>` - 同步订单到 Optima
|
|
94
|
+
|
|
95
|
+
### 库存管理
|
|
96
|
+
- `shopify inventory list --store <id>` - 库存列表
|
|
97
|
+
- `shopify inventory get --store <id> --product <pid>` - 查看商品库存
|
|
98
|
+
- `shopify inventory adjust --store <id> --item <itemId> --delta <数量>` - 调整库存
|
|
99
|
+
- `shopify inventory sync --store <id>` - 同步库存
|
|
100
|
+
- `shopify inventory compare --store <id>` - 对比 Shopify/Optima 库存差异
|
|
101
|
+
- `shopify inventory locations --store <id>` - 查看库存位置
|
|
102
|
+
|
|
103
|
+
### 位置管理
|
|
104
|
+
- `shopify location list --store <id>` - 仓库/位置列表
|
|
105
|
+
- `shopify location get --store <id> --location <lid>` - 位置详情
|
|
106
|
+
|
|
107
|
+
### 集合管理
|
|
108
|
+
- `shopify collection list --store <id>` - 集合列表
|
|
109
|
+
- `shopify collection get --store <id> --collection <cid>` - 集合详情
|
|
110
|
+
- `shopify collection create --store <id> --title <名称>` - 创建集合
|
|
111
|
+
- `shopify collection add --store <id> --collection <cid> --products <pid1,pid2>` - 添加商品到集合
|
|
112
|
+
|
|
113
|
+
### 客户管理
|
|
114
|
+
- `shopify customer list --store <id>` - 客户列表
|
|
115
|
+
- `shopify customer get --store <id> --customer <cid>` - 客户详情
|
|
116
|
+
- `shopify customer sync --store <id>` - 同步客户到 Optima
|
|
117
|
+
|
|
118
|
+
### 折扣管理
|
|
119
|
+
- `shopify discount list --store <id>` - 折扣列表
|
|
120
|
+
- `shopify discount get --store <id> --discount <did>` - 折扣详情
|
|
121
|
+
- `shopify discount create --store <id>` - 创建折扣码
|
|
122
|
+
- `shopify discount delete --store <id> --discount <did>` - 删除折扣
|
|
123
|
+
|
|
124
|
+
### 草稿订单
|
|
125
|
+
- `shopify draft-order list --store <id>` - 草稿订单列表
|
|
126
|
+
- `shopify draft-order get --store <id> --draft-order <did>` - 草稿订单详情
|
|
127
|
+
- `shopify draft-order create --store <id>` - 创建草稿订单
|
|
128
|
+
- `shopify draft-order complete --store <id> --draft-order <did>` - 完成草稿订单
|
|
129
|
+
- `shopify draft-order delete --store <id> --draft-order <did>` - 删除草稿订单
|
|
130
|
+
|
|
131
|
+
### 退款管理
|
|
132
|
+
- `shopify refund list --store <id> --order <oid>` - 退款列表
|
|
133
|
+
- `shopify refund create --store <id> --order <oid>` - 创建退款
|
|
134
|
+
|
|
135
|
+
### 市场管理
|
|
136
|
+
- `shopify market list --store <id>` - 市场列表
|
|
137
|
+
- `shopify market get --store <id> --market <mid>` - 市场详情
|
|
138
|
+
|
|
139
|
+
### 数据分析
|
|
140
|
+
- `shopify analytics report --store <id>` - 销售报表
|
|
141
|
+
- `shopify analytics query --store <id> --query <ShopifyQL>` - 自定义 ShopifyQL 查询
|
|
142
|
+
|
|
143
|
+
### Webhook 管理
|
|
144
|
+
- `shopify webhook list --store <id>` - 已订阅的 webhook
|
|
145
|
+
- `shopify webhook subscribe --store <id> --topic <topic>` - 订阅 webhook
|
|
146
|
+
- `shopify webhook unsubscribe --store <id> --subscription <sid>` - 取消订阅
|
|
147
|
+
|
|
148
|
+
## 详细示例
|
|
149
|
+
|
|
150
|
+
### 连接店铺并查看商品
|
|
151
|
+
```bash
|
|
152
|
+
# 连接 Shopify 店铺
|
|
153
|
+
shopify auth login --shop my-cool-store.myshopify.com
|
|
154
|
+
|
|
155
|
+
# 查看已连接店铺,获取 storeId
|
|
156
|
+
shopify auth stores
|
|
157
|
+
|
|
158
|
+
# 查看商品列表
|
|
159
|
+
shopify product list --store abc123
|
|
160
|
+
|
|
161
|
+
# 搜索特定商品
|
|
162
|
+
shopify product search --store abc123 --query "T-shirt"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 同步商品和库存
|
|
166
|
+
```bash
|
|
167
|
+
# 将 Shopify 商品同步到 Optima Commerce
|
|
168
|
+
shopify product sync --store abc123
|
|
169
|
+
|
|
170
|
+
# 查看商品映射关系
|
|
171
|
+
shopify product mapping --store abc123
|
|
172
|
+
|
|
173
|
+
# 对比两个平台的库存差异
|
|
174
|
+
shopify inventory compare --store abc123
|
|
175
|
+
|
|
176
|
+
# 同步库存
|
|
177
|
+
shopify inventory sync --store abc123
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 订单发货
|
|
181
|
+
```bash
|
|
182
|
+
# 查看待发货订单
|
|
183
|
+
shopify order list --store abc123 --status unfulfilled
|
|
184
|
+
|
|
185
|
+
# 查看订单详情
|
|
186
|
+
shopify order get --store abc123 --order order_456
|
|
187
|
+
|
|
188
|
+
# 发货(提供 tracking 号码)
|
|
189
|
+
shopify order fulfill --store abc123 --order order_456 \
|
|
190
|
+
--tracking SF1234567890
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### 创建折扣码
|
|
194
|
+
```bash
|
|
195
|
+
# 创建 10% 折扣码
|
|
196
|
+
shopify discount create --store abc123 \
|
|
197
|
+
--code SAVE10 \
|
|
198
|
+
--percentage 10 \
|
|
199
|
+
--title "新年促销 10% off"
|
|
200
|
+
|
|
201
|
+
# 创建固定金额折扣
|
|
202
|
+
shopify discount create --store abc123 \
|
|
203
|
+
--code FLAT20 \
|
|
204
|
+
--amount 20 \
|
|
205
|
+
--title "满减优惠 $20 off"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### 销售数据分析
|
|
209
|
+
```bash
|
|
210
|
+
# 生成销售报表
|
|
211
|
+
shopify analytics report --store abc123
|
|
212
|
+
|
|
213
|
+
# 自定义 ShopifyQL 查询
|
|
214
|
+
shopify analytics query --store abc123 \
|
|
215
|
+
--query "FROM orders SHOW sum(total_price) GROUP BY day SINCE -30d"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## 重要提示
|
|
219
|
+
|
|
220
|
+
- 所有命令都需要 `--store <storeId>` 参数,先用 `shopify auth stores` 获取
|
|
221
|
+
- 商品/订单/库存同步是从 **Shopify → Optima** 方向
|
|
222
|
+
- 折扣码在 **Shopify 平台**上创建和管理
|
|
223
|
+
- 连接店铺需要浏览器交互(OAuth 授权),在无头环境用 `--no-browser`
|
|
224
|
+
- 断开店铺是软删除,不会影响 Shopify 上的数据
|
|
225
|
+
- 使用 `--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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify.d.ts","sourceRoot":"","sources":["../../bin/shopify.ts"],"names":[],"mappings":";AACA,OAAO,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify.js","sourceRoot":"","sources":["../../bin/shopify.ts"],"names":[],"mappings":";AACA,OAAO,0BAA0B,CAAC"}
|
package/dist/src/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAa5D,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,GAAE,YAAiB;IAiCtC;;;;OAIG;IACI,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAa5D,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,GAAE,YAAiB;IAiCtC;;;;OAIG;IACI,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW;cAqFH,YAAY;eAAS;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;IAHvF;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAuB1B"}
|
package/dist/src/agent.js
CHANGED
|
@@ -51,7 +51,6 @@ export class OptimaAgent {
|
|
|
51
51
|
async *chat(prompt, chatOptions) {
|
|
52
52
|
// delta 模式启用 SDK 的 partial messages
|
|
53
53
|
const includePartialMessages = chatOptions?.streamFormat === "delta";
|
|
54
|
-
const outputFormat = chatOptions?.outputFormat;
|
|
55
54
|
const response = query({
|
|
56
55
|
prompt,
|
|
57
56
|
options: {
|
|
@@ -89,7 +88,7 @@ export class OptimaAgent {
|
|
|
89
88
|
"optima-memory": createMemoryMcpServer(),
|
|
90
89
|
},
|
|
91
90
|
// System Prompt (合并项目级 OPTIMA.md 和用户指定的 append)
|
|
92
|
-
systemPrompt: this.buildSystemPrompt(
|
|
91
|
+
systemPrompt: this.buildSystemPrompt(),
|
|
93
92
|
// Hooks
|
|
94
93
|
hooks: this.options.hooks,
|
|
95
94
|
// 会话恢复
|
|
@@ -149,7 +148,7 @@ export class OptimaAgent {
|
|
|
149
148
|
/**
|
|
150
149
|
* 构建 System Prompt
|
|
151
150
|
*/
|
|
152
|
-
buildSystemPrompt(
|
|
151
|
+
buildSystemPrompt() {
|
|
153
152
|
const parts = [getSystemPrompt()];
|
|
154
153
|
// 添加用户工作目录信息
|
|
155
154
|
parts.push(`## 用户工作目录
|
|
@@ -165,21 +164,6 @@ export class OptimaAgent {
|
|
|
165
164
|
if (this.options.systemPromptAppend) {
|
|
166
165
|
parts.push(this.options.systemPromptAppend);
|
|
167
166
|
}
|
|
168
|
-
// JSON 输出模式(Sentinel 自动化监控使用)
|
|
169
|
-
if (outputFormat === "json") {
|
|
170
|
-
parts.push(`## 输出格式
|
|
171
|
-
|
|
172
|
-
你必须以纯 JSON 格式回复,不要包含 markdown、代码块标记或其他文本。直接输出 JSON 对象。
|
|
173
|
-
|
|
174
|
-
JSON Schema:
|
|
175
|
-
{
|
|
176
|
-
"condition_met": boolean, // 监控条件是否满足
|
|
177
|
-
"summary": "string", // 观察到什么
|
|
178
|
-
"action_taken": "string|null", // 执行了什么操作,未执行则为 null
|
|
179
|
-
"suggested_action": "string|null", // 需要审批时的建议操作,不需要则为 null
|
|
180
|
-
"error": "string|null" // 无法完成时的原因,正常则为 null
|
|
181
|
-
}`);
|
|
182
|
-
}
|
|
183
167
|
// 直接使用自定义 system prompt,不用 preset
|
|
184
168
|
return parts.join("\n\n");
|
|
185
169
|
}
|
package/dist/src/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,iCAAiC;AACjC,2CAA2C;AAC3C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,YAAY,GAAG,IAAI,CAAC,SA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