@optima-chat/optima-agent 0.8.27 → 0.8.29
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.
|
@@ -132,7 +132,15 @@
|
|
|
132
132
|
"Bash(git fetch:*)",
|
|
133
133
|
"Bash(git log:*)",
|
|
134
134
|
"Bash(npm bin:*)",
|
|
135
|
-
"Bash(git status:*)"
|
|
135
|
+
"Bash(git status:*)",
|
|
136
|
+
"Bash(browser-cli --version && browser-cli --help)",
|
|
137
|
+
"Bash(browser-cli status:*)",
|
|
138
|
+
"Bash(browser-cli launch:*)",
|
|
139
|
+
"Bash(browser-cli screenshot:*)",
|
|
140
|
+
"Bash(browser-cli --version)",
|
|
141
|
+
"Bash(browser-cli close:*)",
|
|
142
|
+
"Bash(npm update:*)",
|
|
143
|
+
"Bash(node -e \"console.log\\(require\\('./node_modules/@optima-chat/browser-cli/package.json'\\).version\\)\")"
|
|
136
144
|
],
|
|
137
145
|
"deny": [],
|
|
138
146
|
"ask": []
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser
|
|
3
|
-
description: "Browser automation for web interactions. Use when user needs to login to platforms, fill forms, post content, test websites, or operate on third-party platforms without APIs. Uses 'browser-cli' commands. Do NOT use for simple web scraping (use WebFetch) or
|
|
3
|
+
description: "Browser automation for web interactions. Use when user needs to open/navigate to websites, login to platforms, fill forms, post content, test websites, or operate on third-party platforms without APIs. Uses 'browser-cli' commands. Do NOT use for simple web scraping (use WebFetch) or tasks that have dedicated skills (e.g. scout, tiktok, instagram, shein, etc.)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Browser Automation Skill
|
|
7
7
|
|
|
8
8
|
## When to Use
|
|
9
9
|
|
|
10
|
+
- User asks to open a website or navigate to a URL (e.g. "打开 github", "open youtube")
|
|
10
11
|
- User asks to login to a platform, fill a form, or post content
|
|
11
12
|
- User needs to test website functionality
|
|
12
13
|
- User needs to operate on third-party platforms without APIs
|
|
@@ -14,7 +15,7 @@ description: "Browser automation for web interactions. Use when user needs to lo
|
|
|
14
15
|
|
|
15
16
|
**Do NOT use for:**
|
|
16
17
|
- Simple web scraping → use WebFetch
|
|
17
|
-
-
|
|
18
|
+
- Tasks that have dedicated skills (e.g. scout, tiktok, instagram, shein, etc.)
|
|
18
19
|
|
|
19
20
|
## Commands
|
|
20
21
|
|
|
@@ -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,CAiKxC"}
|
|
@@ -115,6 +115,29 @@ export function getSystemPrompt() {
|
|
|
115
115
|
- 简要说明创建商铺的价值(管理商品、查看数据等)
|
|
116
116
|
- 必须使用准确的 action link 格式:\`action://create-merchant\`
|
|
117
117
|
|
|
118
|
+
## 文件下载链接
|
|
119
|
+
|
|
120
|
+
当你生成报告、文档、图片等文件后,需要给用户提供**可直接在浏览器打开的下载链接**。
|
|
121
|
+
|
|
122
|
+
**步骤**:
|
|
123
|
+
1. 用 Write 工具将文件保存到用户工作目录(如 \`/home/aiuser/docs/报告.pdf\`)
|
|
124
|
+
2. 用 Bash 调用签名链接 API 生成下载 URL:
|
|
125
|
+
\`\`\`bash
|
|
126
|
+
curl -s -X POST "http://localhost:8080/api/user/files/share?path=/home/aiuser/docs/报告.pdf" \\
|
|
127
|
+
-H "Authorization: Bearer $OPTIMA_TOKEN"
|
|
128
|
+
\`\`\`
|
|
129
|
+
3. 从返回的 JSON 中提取 \`url\` 字段,展示给用户
|
|
130
|
+
|
|
131
|
+
**返回示例**:
|
|
132
|
+
\`\`\`json
|
|
133
|
+
{"data":{"url":"https://shell.optima.shop/api/files/d/xxxxx","expiresAt":"...","fileName":"报告.pdf","fileSize":12345}}
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
**注意事项**:
|
|
137
|
+
- 链接有效期 30 分钟,过期后需重新生成
|
|
138
|
+
- **不要**自己拼接下载 URL,必须通过 API 生成
|
|
139
|
+
- 展示链接时用 Markdown 格式:\`[下载报告](url)\`
|
|
140
|
+
|
|
118
141
|
## 用户记忆
|
|
119
142
|
|
|
120
143
|
**重要:在执行任何操作前,先用 memory 工具的 view 命令查看记忆目录。**
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0I9B,CAAC;AACF,CAAC"}
|