oc-browser-relay 1.0.1 → 1.0.2
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/bundled-relay/index.js +654 -209
- package/bundled-relay/public/configs/pages/index.json +1 -0
- package/bundled-relay/public/configs/pages/sycm-taobao-home.json +124 -0
- package/bundled-relay/public/configs/pages/taobao-item-detail.json +8 -11
- package/bundled-relay/public/configs/pages/xiaohongshu-creator-publish.json +35 -9
- package/bundled-relay/public/configs/pages/xiaohongshu-web-explore.json +7 -7
- package/bundled-relay/public/configs/pages/xiaohongshu-web-search-result.json +7 -7
- package/bundled-relay/public/configs/sites/index.json +2 -1
- package/bundled-relay/public/configs/sites/sycm-taobao.json +13 -0
- package/bundled-relay/public/configs/task-templates/index.json +1 -1
- package/bundled-relay/public/configs/task-templates/sycm-taobao-home-live-metrics.json +99 -0
- package/bundled-relay/public/configs/task-templates/taobao-item-detail-comments.json +24 -11
- package/bundled-relay/public/configs/task-templates/xiaohongshu-creator-publish.json +6 -6
- package/bundled-relay/public/configs/task-templates/xiaohongshu-creator-save-draft.json +6 -6
- package/bundled-relay/public/configs/task-templates/xiaohongshu-web-search-notes.json +26 -15
- package/index.js +1 -1
- package/package.json +3 -3
- package/skills/oc-browser-relay-taobao/SKILL.md +13 -17
- package/skills/oc-browser-relay-xiaohongshu/SKILL.md +56 -28
- package/skills/oc-sycm-live-metrics/SKILL.md +109 -0
- package/bundled-relay/public/configs/task-templates/xiaohongshu_open_website.json +0 -24
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oc-browser-relay-xiaohongshu
|
|
3
|
-
description: Publish Xiaohongshu (小红书 / RED) notes and search/list Xiaohongshu posts through the oc-browser-relay-xiaohongshu plugin tools backed by the local ChromeAgent Relay service. Use when the user wants to
|
|
3
|
+
description: Publish Xiaohongshu (小红书 / RED) notes and search/list Xiaohongshu posts through the oc-browser-relay-xiaohongshu plugin tools backed by the local ChromeAgent Relay service. Use when the user wants to 发小红书、发布图文、保存草稿、搜索小红书帖子、获取帖子列表、找对标内容、导出搜索结果、打开小红书首页、打开小红书创作者中心,或检查小红书连接是否正常。 Prefer oc-browser-relay-xiaohongshu Xiaohongshu tools over generic browser automation when this plugin is available.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Oc Browser Relay Xiaohongshu
|
|
@@ -19,6 +19,8 @@ The user should feel like they are asking for:
|
|
|
19
19
|
- 存草稿
|
|
20
20
|
- 搜帖子
|
|
21
21
|
- 导出结果
|
|
22
|
+
- 打开小红书首页
|
|
23
|
+
- 打开小红书创作者中心
|
|
22
24
|
- 看看连接有没有问题
|
|
23
25
|
|
|
24
26
|
Do the technical selection internally.
|
|
@@ -27,19 +29,20 @@ Do the technical selection internally.
|
|
|
27
29
|
|
|
28
30
|
Prefer these tools first:
|
|
29
31
|
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
32
|
+
- `xiaohongshu_open_home`
|
|
33
|
+
- `xiaohongshu_open_creator_center`
|
|
34
|
+
- `xiaohongshu_publish_note`
|
|
35
|
+
- `xiaohongshu_save_draft`
|
|
36
|
+
- `xiaohongshu_search_notes`
|
|
34
37
|
|
|
35
38
|
Use these only when needed for diagnosis or lower-level handling:
|
|
36
39
|
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
- `
|
|
41
|
-
- `
|
|
42
|
-
- `
|
|
40
|
+
- `browser_health`
|
|
41
|
+
- `browser_list_tools`
|
|
42
|
+
- `browser_execute_tool`
|
|
43
|
+
- `browser_wait_task`
|
|
44
|
+
- `browser_list_runtimes`
|
|
45
|
+
- `browser_list_tabs`
|
|
43
46
|
|
|
44
47
|
Do not default to the browser tool if oc-browser-relay-xiaohongshu can complete the task.
|
|
45
48
|
|
|
@@ -70,9 +73,34 @@ If you must use a lower-level diagnostic tool, do it silently and summarize in h
|
|
|
70
73
|
|
|
71
74
|
## Intent routing
|
|
72
75
|
|
|
76
|
+
### 0) Open Xiaohongshu pages
|
|
77
|
+
|
|
78
|
+
Use dedicated open tools when the user just wants a page opened.
|
|
79
|
+
|
|
80
|
+
Typical phrases:
|
|
81
|
+
|
|
82
|
+
- 打开小红书首页
|
|
83
|
+
- 打开首页
|
|
84
|
+
- 进入小红书首页
|
|
85
|
+
- 打开小红书创作者中心
|
|
86
|
+
- 打开创作者中心
|
|
87
|
+
- 进入创作平台
|
|
88
|
+
|
|
89
|
+
Tool selection:
|
|
90
|
+
|
|
91
|
+
- Homepage intent → `xiaohongshu_open_home`
|
|
92
|
+
- Creator center / 创作平台 intent → `xiaohongshu_open_creator_center`
|
|
93
|
+
|
|
94
|
+
Rules:
|
|
95
|
+
|
|
96
|
+
- Prefer these tools over generic browser automation.
|
|
97
|
+
- Do not ask the user for URLs unless they explicitly want a custom page.
|
|
98
|
+
- If the user says “打开小红书” without specifying, default to `xiaohongshu_open_home`.
|
|
99
|
+
- If opening fails, explain it as a connection/browser readiness issue in plain language.
|
|
100
|
+
|
|
73
101
|
### 1) Publish now
|
|
74
102
|
|
|
75
|
-
Use `
|
|
103
|
+
Use `xiaohongshu_publish_note` when the user clearly wants immediate posting.
|
|
76
104
|
|
|
77
105
|
Typical phrases:
|
|
78
106
|
|
|
@@ -102,7 +130,7 @@ Rules:
|
|
|
102
130
|
|
|
103
131
|
### 2) Save draft
|
|
104
132
|
|
|
105
|
-
Use `
|
|
133
|
+
Use `xiaohongshu_save_draft` when the user wants preparation without publishing.
|
|
106
134
|
|
|
107
135
|
Typical phrases:
|
|
108
136
|
|
|
@@ -115,7 +143,7 @@ Use the same validation rules as publish.
|
|
|
115
143
|
|
|
116
144
|
### 3) Search or get a list of posts
|
|
117
145
|
|
|
118
|
-
Use `
|
|
146
|
+
Use `xiaohongshu_search_notes` when the user wants discovery, examples, competitors, or note lists.
|
|
119
147
|
|
|
120
148
|
Typical phrases:
|
|
121
149
|
|
|
@@ -137,6 +165,7 @@ Useful inputs:
|
|
|
137
165
|
- `filters`
|
|
138
166
|
- `detailTargetCount` — when the user wants detailed note info (title, content, comments, interactions), not just the search list
|
|
139
167
|
- `randomizeOrder` — randomize the order of detail collection (default true)
|
|
168
|
+
- `saveToCsv` — pass `true`(默认)自动生成文件名并保存到 workspace 下的 `xhs/` 目录(`xhs/xhs_{keyword}_{timestamp}.csv`),或传自定义路径,`false` 不保存
|
|
140
169
|
- optional legacy shorthands: `sort`, `noteType`
|
|
141
170
|
|
|
142
171
|
Prefer `filters` over shorthand parameters.
|
|
@@ -155,24 +184,18 @@ If the user asks for “获取列表”, return a concise summary first. Offer C
|
|
|
155
184
|
|
|
156
185
|
### 4) Export results
|
|
157
186
|
|
|
158
|
-
Use `
|
|
187
|
+
Use `xiaohongshu_search_notes` with `saveToCsv` parameter when the user wants:
|
|
159
188
|
|
|
160
189
|
- 导出结果
|
|
161
190
|
- 保存成 CSV
|
|
162
191
|
- 发给同事分析
|
|
163
192
|
- 留档
|
|
164
193
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
If the user did not give one, suggest a sensible path and ask once.
|
|
168
|
-
|
|
169
|
-
Example:
|
|
170
|
-
|
|
171
|
-
- `/Users/rui/Desktop/xiaohongshu-results.csv`
|
|
194
|
+
The tool saves results as CSV by default to the workspace `xhs/` directory with auto-generated filename (`xhs/xhs_{keyword}_{timestamp}.csv`). You can also specify a custom path.
|
|
172
195
|
|
|
173
196
|
### 5) Check whether the setup is working
|
|
174
197
|
|
|
175
|
-
When the user asks why publishing/searching failed, first treat it as a connection problem, not a technical debugging session.
|
|
198
|
+
When the user asks why publishing/searching/opening failed, first treat it as a connection problem, not a technical debugging session.
|
|
176
199
|
|
|
177
200
|
Typical phrases:
|
|
178
201
|
|
|
@@ -183,10 +206,10 @@ Typical phrases:
|
|
|
183
206
|
|
|
184
207
|
Diagnosis order:
|
|
185
208
|
|
|
186
|
-
1. `
|
|
187
|
-
2. `
|
|
188
|
-
3. `
|
|
189
|
-
4. `
|
|
209
|
+
1. `browser_health`
|
|
210
|
+
2. `browser_list_tabs`
|
|
211
|
+
3. `browser_list_runtimes` only if needed internally
|
|
212
|
+
4. `browser_list_tools` only if tool exposure looks wrong
|
|
190
213
|
|
|
191
214
|
Translate the result into plain language.
|
|
192
215
|
|
|
@@ -250,6 +273,8 @@ Preferred progress updates:
|
|
|
250
273
|
- 我先帮你存成草稿
|
|
251
274
|
- 我先搜一批结果
|
|
252
275
|
- 已经导出成 CSV
|
|
276
|
+
- 我先帮你打开首页
|
|
277
|
+
- 我先帮你打开创作者中心
|
|
253
278
|
|
|
254
279
|
Preferred result style:
|
|
255
280
|
|
|
@@ -257,6 +282,8 @@ Preferred result style:
|
|
|
257
282
|
- 草稿已保存,还没发布
|
|
258
283
|
- 已搜到 30 条图文笔记
|
|
259
284
|
- 连接正常
|
|
285
|
+
- 首页已打开
|
|
286
|
+
- 创作者中心已打开
|
|
260
287
|
- 现在还发不了,因为浏览器扩展没连上
|
|
261
288
|
|
|
262
289
|
Avoid long technical explanations by default.
|
|
@@ -266,6 +293,7 @@ Avoid long technical explanations by default.
|
|
|
266
293
|
- If publish intent is ambiguous, choose draft.
|
|
267
294
|
- If search scope is vague, use a moderate `targetCount` first.
|
|
268
295
|
- If export is likely useful, offer it after summarizing search results.
|
|
296
|
+
- If the user asks to open Xiaohongshu and does not specify which page, default to `xiaohongshu_open_home`.
|
|
269
297
|
- If a lower-level tool returns an async action, wait properly instead of repeatedly retrying the original request.
|
|
270
298
|
- Prefer one clean answer over multiple fragmented status messages.
|
|
271
299
|
|
|
@@ -275,6 +303,6 @@ The skill is working well when the user experience feels like this:
|
|
|
275
303
|
|
|
276
304
|
- they ask in plain Chinese
|
|
277
305
|
- the agent responds in plain Chinese
|
|
278
|
-
- posting/search/export works without exposing internal terms
|
|
306
|
+
- opening/posting/search/export works without exposing internal terms
|
|
279
307
|
- failures are explained in everyday language
|
|
280
308
|
- the user never has to think about runtimes or bridge internals unless they explicitly want debugging
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oc-sycm-live-metrics
|
|
3
|
+
description: Capture live metrics from SYCM (生意参谋) home page through the oc-sycm-live-metrics plugin tools backed by the local ChromeAgent Relay service. Use when the user wants to 采集生意参谋实时数据、抓取生意参谋首页指标、获取实时经营数据,或检查生意参谋采集连接是否正常。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Oc SYCM Live Metrics
|
|
7
|
+
|
|
8
|
+
Use oc-sycm-live-metrics as the default path for SYCM live metrics data collection.
|
|
9
|
+
|
|
10
|
+
## Main goal
|
|
11
|
+
|
|
12
|
+
Make SYCM live metrics collection feel simple and straightforward.
|
|
13
|
+
|
|
14
|
+
The user should feel like they are asking for:
|
|
15
|
+
|
|
16
|
+
- 帮我采集生意参谋实时数据
|
|
17
|
+
- 抓一下生意参谋首页的指标
|
|
18
|
+
- 看看现在的实时经营数据
|
|
19
|
+
- 导出生意参谋数据
|
|
20
|
+
- 看看连接有没有问题
|
|
21
|
+
|
|
22
|
+
Do the technical selection internally.
|
|
23
|
+
|
|
24
|
+
## Default tool preference
|
|
25
|
+
|
|
26
|
+
Prefer this tool first:
|
|
27
|
+
|
|
28
|
+
- `sycm_capture_live_metrics`
|
|
29
|
+
|
|
30
|
+
Use these only when needed for diagnosis:
|
|
31
|
+
|
|
32
|
+
- `browser_health`
|
|
33
|
+
- `browser_list_runtimes`
|
|
34
|
+
- `browser_list_tabs`
|
|
35
|
+
|
|
36
|
+
## User-facing language
|
|
37
|
+
|
|
38
|
+
Use plain language.
|
|
39
|
+
|
|
40
|
+
Prefer saying:
|
|
41
|
+
|
|
42
|
+
- 生意参谋连接
|
|
43
|
+
- 浏览器连接
|
|
44
|
+
- 连接正常
|
|
45
|
+
- 还没连上
|
|
46
|
+
- 我先帮你检查一下
|
|
47
|
+
- 我开始帮你采集
|
|
48
|
+
|
|
49
|
+
Avoid technical terms unless debugging.
|
|
50
|
+
|
|
51
|
+
## Intent routing
|
|
52
|
+
|
|
53
|
+
### 1) Capture live metrics
|
|
54
|
+
|
|
55
|
+
Use `sycm_capture_live_metrics` when the user wants SYCM live data.
|
|
56
|
+
|
|
57
|
+
Typical phrases:
|
|
58
|
+
|
|
59
|
+
- 帮我采集生意参谋实时数据
|
|
60
|
+
- 抓一下生意参谋首页的指标
|
|
61
|
+
- 看看现在的经营数据
|
|
62
|
+
- 采集生意参谋数据
|
|
63
|
+
|
|
64
|
+
Optional inputs:
|
|
65
|
+
|
|
66
|
+
- `url` — SYCM home page URL (default: https://sycm.taobao.com/portal/home.htm)
|
|
67
|
+
- `metricPeriodLabel` — metric period label (default: "实时")
|
|
68
|
+
|
|
69
|
+
Rules:
|
|
70
|
+
|
|
71
|
+
- Data is automatically saved to workspace `sycm/` directory as JSON
|
|
72
|
+
- Filename format: `sycm-live-metrics-{timestamp}.json`
|
|
73
|
+
|
|
74
|
+
### 2) Check connection
|
|
75
|
+
|
|
76
|
+
When the user asks why collection failed:
|
|
77
|
+
|
|
78
|
+
Typical phrases:
|
|
79
|
+
|
|
80
|
+
- 为什么采集不了
|
|
81
|
+
- 怎么没反应
|
|
82
|
+
- 帮我检查一下
|
|
83
|
+
- 看看连接是不是坏了
|
|
84
|
+
|
|
85
|
+
Diagnosis order:
|
|
86
|
+
|
|
87
|
+
1. `browser_health`
|
|
88
|
+
2. `browser_list_tabs`
|
|
89
|
+
3. `browser_list_runtimes` if needed
|
|
90
|
+
|
|
91
|
+
Translate results into plain language.
|
|
92
|
+
|
|
93
|
+
## Response style
|
|
94
|
+
|
|
95
|
+
Be short, calm, and action-first.
|
|
96
|
+
|
|
97
|
+
Preferred updates:
|
|
98
|
+
|
|
99
|
+
- 我先检查一下连接
|
|
100
|
+
- 我开始帮你采集
|
|
101
|
+
- 正在打开生意参谋页面
|
|
102
|
+
- 正在采集实时数据
|
|
103
|
+
|
|
104
|
+
Preferred results:
|
|
105
|
+
|
|
106
|
+
- 已采集完成,实时数据都拿到了
|
|
107
|
+
- 连接正常
|
|
108
|
+
- 现在还采集不了,因为浏览器扩展没连上
|
|
109
|
+
- 数据已保存到 /path/to/file.json
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"taskType": "open_website",
|
|
3
|
-
"platform": "xiaohongshu",
|
|
4
|
-
"name": "打开小红书网站",
|
|
5
|
-
"description": "打开小红书网站首页或创作平台",
|
|
6
|
-
"requiredFields": [],
|
|
7
|
-
"optionalFields": [
|
|
8
|
-
{
|
|
9
|
-
"name": "page",
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "要打开的页面:home(首页) 或 creator(创作平台)",
|
|
12
|
-
"default": "home"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"workflow": [
|
|
16
|
-
{
|
|
17
|
-
"stepId": "s1",
|
|
18
|
-
"tool": "open_tab",
|
|
19
|
-
"args": {
|
|
20
|
-
"url": "https://www.xiaohongshu.com"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|