foliko 1.1.2 → 1.1.4
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/.agent/agents/code-assistant.json +14 -0
- package/.agent/agents/email-assistant.json +14 -0
- package/.agent/agents/file-assistant.json +15 -0
- package/.agent/agents/system-assistant.json +15 -0
- package/.agent/agents/web-assistant.json +12 -0
- package/.agent/data/ambient/goals.json +50 -0
- package/.agent/data/ambient/memories.json +7 -0
- package/.agent/data/default.json +3 -412
- package/.agent/data/plugins-state.json +174 -173
- package/.agent/data/scheduler/tasks.json +1 -0
- package/.agent/memory/core.md +1 -0
- package/.agent/memory/project/mnn93ogy-ypjn27.md +9 -0
- package/.agent/memory/project/mnn98fqy-5nhc1u.md +25 -0
- package/.agent/memory/reference/mnq3oenw-46haj6.md +63 -0
- package/.agent/memory/reference/mnq5qxm2-mjoooh.md +116 -0
- package/.agent/memory/user/mnm67t9m-x8rekk.md +9 -0
- package/.agent/memory/user/mnn5mmqh-w6aktx.md +11 -0
- package/.agent/memory/user/mnnbfhhn-dk1bd1.md +22 -0
- package/.agent/package.json +8 -0
- package/.agent/plugins/__pycache__/file_writer.cpython-312.pyc +0 -0
- package/.agent/plugins/daytona/README.md +89 -0
- package/.agent/plugins/daytona/index.js +377 -0
- package/.agent/plugins/daytona/package.json +12 -0
- package/.agent/plugins/marknative/README.md +134 -0
- package/.agent/plugins/marknative/fonts/SegoeUI Emoji.ttf +0 -0
- package/.agent/plugins/marknative/index.js +256 -0
- package/.agent/plugins/marknative/package.json +12 -0
- package/.agent/plugins/marknative/update-readme.js +134 -0
- package/.agent/plugins/poster-plugin/emojis/rocket.png +1 -0
- package/.agent/plugins/poster-plugin/fonts/SegoeUI Emoji.ttf +0 -0
- package/.agent/plugins/poster-plugin/src/elements/text.js +3 -1
- package/.agent/plugins/poster-plugin/src/fonts.js +10 -0
- package/.agent/plugins/poster-plugin/yarn.lock +1007 -0
- package/.agent/plugins/system-info/index.js +387 -0
- package/.agent/plugins/system-info/package.json +4 -0
- package/.agent/plugins/system-info/test.js +40 -0
- package/.agent/plugins.json +11 -5
- package/.agent/python-scripts/test_sample.py +24 -0
- package/.agent/sessions/cli_default.json +1869 -691
- package/.agent/skills/agent-browser/SKILL.md +311 -0
- package/.agent/skills/agent-browser/TEST_PLAN.md +200 -0
- package/.agent/skills/sysinfo/SKILL.md +38 -0
- package/.agent/skills/sysinfo/system-info.sh +130 -0
- package/.agent/skills/workflow/SKILL.md +324 -0
- package/.agent/weixin.json +6 -0
- package/.agent/workflows/email-digest.json +50 -0
- package/.agent/workflows/file-backup.json +21 -0
- package/.agent/workflows/get-ip-notify.json +32 -0
- package/.agent/workflows/news-aggregator.json +93 -0
- package/.agent/workflows/news-dashboard-v2.json +94 -0
- package/.agent/workflows/notification-batch.json +32 -0
- package/.claude/settings.local.json +1 -20
- package/.env.example +56 -56
- package/README.md +441 -441
- package/cli/src/commands/chat.js +22 -13
- package/cli/src/ui/chat-ui.js +50 -37
- package/output/emoji-segoe-test-v2.png +0 -0
- package/output/emoji-segoe-test.png +0 -0
- package/output/emoji-test.png +0 -0
- package/output/emoji-windows-test.png +0 -0
- package/output/foliko-emoji-poster.png +0 -0
- package/output/foliko-muji-poster-final.png +0 -0
- package/output/foliko-muji-poster-v2.png +0 -0
- package/output/foliko-muji-poster.png +0 -0
- package/output/foliko-share.png +0 -0
- package/output/progress-circle-test.png +0 -0
- package/output/vb-agent-poster.png +0 -0
- package/package.json +1 -2
- package/plugins/default-plugins.js +4 -3
- package/plugins/extension-executor-plugin.js +12 -91
- package/plugins/file-system-plugin.js +19 -4
- package/plugins/memory-plugin.js +33 -4
- package/plugins/subagent-plugin.js +14 -37
- package/plugins/weixin-plugin.js +40 -168
- package/skills/find-skills/AGENTS.md +162 -162
- package/skills/find-skills/SKILL.md +133 -133
- package/skills/poster-guide/SKILL.md +669 -1426
- package/src/core/agent-chat.js +439 -269
- package/src/core/agent.js +3 -6
- package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
- package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
- package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
- package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
- package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
- package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
- package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
- package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
- package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
- package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
- package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
- package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
- package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
- package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
- package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
- package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
- package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
- package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
- package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
- package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
- package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
- package/.agent/ARCHITECTURE.md +0 -288
- package/.agent/agents/ambient-agent.md +0 -57
- package/.agent/agents/debugger.md +0 -55
- package/.agent/agents/email-assistant.md +0 -49
- package/.agent/agents/file-manager.md +0 -42
- package/.agent/agents/python-developer.md +0 -60
- package/.agent/agents/scheduler.md +0 -59
- package/.agent/agents/web-developer.md +0 -45
- package/.agent/data/puppeteer-sessions/undefined.json +0 -6
- package/.agent/data/weixin-media/2026-04-08/img_1775618677512.jpg +0 -0
- package/.agent/data/weixin-media/2026-04-08/img_1775619073340.jpg +0 -0
- package/.agent/data/weixin-media/2026-04-08/img_1775619097536.jpg +0 -0
- package/.agent/data/weixin-media/2026-04-08/img_1775619209388.jpg +0 -0
- package/.agent/mcp_config_updated.json +0 -12
- package/.agent/plugins/poster-plugin/fonts/NotoColorEmoji-Regular.ttf +0 -0
- package/.agent/plugins/puppeteer-plugin/README.md +0 -147
- package/.agent/plugins/puppeteer-plugin/index.js +0 -1418
- package/.agent/plugins/puppeteer-plugin/package.json +0 -9
- package/.agent/rules/GEMINI.md +0 -273
- package/.agent/rules/allow-rule.md +0 -77
- package/.agent/rules/log-rule.md +0 -83
- package/.agent/rules/security-rule.md +0 -93
- package/.agent/scripts/auto_preview.py +0 -148
- package/.agent/scripts/checklist.py +0 -217
- package/.agent/scripts/session_manager.py +0 -120
- package/.agent/scripts/verify_all.py +0 -327
- package/.agent/sessions/weixin_o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat.json +0 -11097
- package/.agent/skills/api-patterns/SKILL.md +0 -81
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/SKILL.md +0 -75
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/app-builder/templates/SKILL.md +0 -39
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/.agent/skills/architecture/SKILL.md +0 -55
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/clean-code/SKILL.md +0 -201
- package/.agent/skills/doc.md +0 -177
- package/.agent/skills/frontend-design/SKILL.md +0 -418
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -311
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
- package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
- package/.agent/skills/frontend-design/typography-system.md +0 -345
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- package/.agent/skills/i18n-localization/SKILL.md +0 -154
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/.agent/skills/mcp-builder/SKILL.md +0 -176
- package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
- package/.agent/workflows/brainstorm.md +0 -113
- package/.agent/workflows/create.md +0 -59
- package/.agent/workflows/debug.md +0 -103
- package/.agent/workflows/deploy.md +0 -176
- package/.agent/workflows/enhance.md +0 -63
- package/.agent/workflows/orchestrate.md +0 -237
- package/.agent/workflows/plan.md +0 -89
- package/.agent/workflows/preview.md +0 -81
- package/.agent/workflows/simple-test.md +0 -42
- package/.agent/workflows/status.md +0 -86
- package/.agent/workflows/structured-orchestrate.md +0 -180
- package/.agent/workflows/test.md +0 -144
- package/.agent/workflows/ui-ux-pro-max.md +0 -296
- package/output/beef-love-poster.png +0 -0
- package/output/international-news-daily.png +0 -0
- package/poster-test-2.png +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: scheduler
|
|
3
|
-
description: 定时任务管理专家。用于设置提醒、定时任务、Cron表达式、任务调度等任务。触发关键词:定时、提醒、调度、任务、计划、Cron。
|
|
4
|
-
tools: schedule_task, schedule_list, schedule_cancel, cron_examples
|
|
5
|
-
model: inherit
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# 定时任务管理专家
|
|
9
|
-
|
|
10
|
-
你是一个专业的定时任务管理专家,擅长设置和管理各种定时任务。
|
|
11
|
-
|
|
12
|
-
## 核心能力
|
|
13
|
-
|
|
14
|
-
1. **定时提醒**:设置一次性或重复的提醒
|
|
15
|
-
2. **Cron任务**:使用Cron表达式创建复杂调度
|
|
16
|
-
3. **任务管理**:列出、取消、管理定时任务
|
|
17
|
-
4. **时间查询**:获取常用Cron表达式示例
|
|
18
|
-
|
|
19
|
-
## 工具使用
|
|
20
|
-
|
|
21
|
-
### 任务管理
|
|
22
|
-
- `schedule_task`: 创建定时任务,支持多种时间格式
|
|
23
|
-
- `schedule_list`: 列出所有定时任务
|
|
24
|
-
- `schedule_cancel`: 取消指定的定时任务
|
|
25
|
-
|
|
26
|
-
### 辅助功能
|
|
27
|
-
- `cron_examples`: 获取常用Cron表达式示例
|
|
28
|
-
|
|
29
|
-
## 时间格式支持
|
|
30
|
-
|
|
31
|
-
### 相对时间
|
|
32
|
-
- `"1 minute"` - 1分钟后
|
|
33
|
-
- `"2 hours"` - 2小时后
|
|
34
|
-
- `"1 day"` - 1天后
|
|
35
|
-
|
|
36
|
-
### 具体时间
|
|
37
|
-
- `"12:00"` - 今天12:00
|
|
38
|
-
- `"14:30"` - 今天14:30
|
|
39
|
-
|
|
40
|
-
### Cron表达式
|
|
41
|
-
- `"* * * * *"` - 每分钟
|
|
42
|
-
- `"*/5 * * * *"` - 每5分钟
|
|
43
|
-
- `"0 * * * *"` - 每小时
|
|
44
|
-
- `"0 0 * * *"` - 每天午夜
|
|
45
|
-
|
|
46
|
-
## 参数说明
|
|
47
|
-
|
|
48
|
-
- `name`: 任务名称(可选)
|
|
49
|
-
- `message`: 提醒消息内容
|
|
50
|
-
- `repeat`: 是否重复执行(默认false)
|
|
51
|
-
- `cronExpression`: Cron表达式(repeat为true时使用)
|
|
52
|
-
- `llm`: 是否需要LLM处理(自动检测)
|
|
53
|
-
|
|
54
|
-
## 最佳实践
|
|
55
|
-
|
|
56
|
-
1. 清晰描述提醒内容
|
|
57
|
-
2. 合理设置重复周期
|
|
58
|
-
3. 使用有意义的任务名称
|
|
59
|
-
4. 记得保存任务ID以便取消
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: web-developer
|
|
3
|
-
description: Web开发专家。用于HTTP请求、Web服务、API调用、网页数据抓取等任务。触发关键词:HTTP、API、请求、Web、网页、抓取、网络。
|
|
4
|
-
tools: fetch, web_request, web_start, web_stop, web_register_route, web_register_webhook, web_register_static, web_list_routes
|
|
5
|
-
skills: api-patterns
|
|
6
|
-
model: inherit
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Web开发专家
|
|
10
|
-
|
|
11
|
-
你是一个专业的Web开发专家,擅长处理HTTP请求、API开发和Web服务相关任务。
|
|
12
|
-
|
|
13
|
-
## 核心能力
|
|
14
|
-
|
|
15
|
-
1. **HTTP请求**:GET/POST/PUT/DELETE等各类请求
|
|
16
|
-
2. **API开发**:RESTful API设计、Webhook开发
|
|
17
|
-
3. **数据抓取**:网页内容获取、API数据采集
|
|
18
|
-
4. **Web服务**:启动服务、注册路由、处理请求
|
|
19
|
-
|
|
20
|
-
## 工具使用
|
|
21
|
-
|
|
22
|
-
### HTTP请求
|
|
23
|
-
- `fetch`: 获取远程数据,支持代理重试
|
|
24
|
-
- `web_request`: 发送HTTP请求到指定路径
|
|
25
|
-
|
|
26
|
-
### Web服务
|
|
27
|
-
- `web_start`: 启动Web服务(默认端口3000)
|
|
28
|
-
- `web_register_route`: 注册HTTP路由处理函数
|
|
29
|
-
- `web_register_webhook`: 注册Webhook接收外部请求
|
|
30
|
-
- `web_register_static`: 注册静态资源文件夹
|
|
31
|
-
- `web_list_routes`: 列出所有已注册路由
|
|
32
|
-
|
|
33
|
-
## 工作流程
|
|
34
|
-
|
|
35
|
-
1. **分析需求**:确定是客户端请求还是服务端开发
|
|
36
|
-
2. **选择工具**:根据任务选择合适的HTTP工具
|
|
37
|
-
3. **处理响应**:解析返回数据,处理错误
|
|
38
|
-
4. **结果返回**:提供清晰的执行结果
|
|
39
|
-
|
|
40
|
-
## 最佳实践
|
|
41
|
-
|
|
42
|
-
1. 请求失败时自动使用代理重试
|
|
43
|
-
2. 设置合理的超时时间
|
|
44
|
-
3. 正确处理JSON响应格式
|
|
45
|
-
4. Webhook提示词要描述清楚数据处理逻辑
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mcpServers": {
|
|
3
|
-
"MiniMax": {
|
|
4
|
-
"command": "uvx",
|
|
5
|
-
"args": ["minimax-coding-plan-mcp", "-y"],
|
|
6
|
-
"env": {
|
|
7
|
-
"MINIMAX_API_KEY": "sk-cp-jRMMNA-8Nqb3gIszeqj5thnLHpbNeLAFPfWiAH3aR_282Cr6qE7WnINOvq3b_vQ5QLybWMoYiphLYPhZCpW8Jg9zx-XmpTc9qxrVpHIB8J0JGeixxm2KhLw",
|
|
8
|
-
"MINIMAX_API_HOST": "https://api.minimaxi.com"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
Binary file
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# puppeteer-plugin
|
|
2
|
-
|
|
3
|
-
Puppeteer 网页自动化操作插件,支持浏览器控制、页面操作、元素交互、Session 管理。
|
|
4
|
-
|
|
5
|
-
## 功能特性
|
|
6
|
-
|
|
7
|
-
- 🌐 浏览器管理:启动/关闭浏览器实例
|
|
8
|
-
- 📄 页面操作:打开页面、导航、截图、获取页面结构
|
|
9
|
-
- 🖱️ 元素交互:查找、点击、输入文本、悬停、按键模拟
|
|
10
|
-
- 🍪 Cookie 管理:获取、设置、清除 Cookie
|
|
11
|
-
- 💾 Session 管理:保存/恢复/删除浏览器会话状态
|
|
12
|
-
- ⏱️ 等待控制:元素等待、网络空闲等待
|
|
13
|
-
|
|
14
|
-
## 工具列表
|
|
15
|
-
|
|
16
|
-
### 浏览器控制
|
|
17
|
-
| 工具 | 说明 |
|
|
18
|
-
|------|------|
|
|
19
|
-
| `browser_launch` | 启动 Puppeteer 浏览器实例 |
|
|
20
|
-
| `browser_close` | 关闭浏览器实例 |
|
|
21
|
-
| `browser_status` | 获取当前浏览器状态 |
|
|
22
|
-
|
|
23
|
-
### 页面操作
|
|
24
|
-
| 工具 | 说明 |
|
|
25
|
-
|------|------|
|
|
26
|
-
| `page_open` | 打开新页面或导航到 URL |
|
|
27
|
-
| `page_navigate` | 页面导航(前进、后退、刷新) |
|
|
28
|
-
| `page_screenshot` | 对页面进行截图 |
|
|
29
|
-
| `page_html` | 获取页面 HTML 内容 |
|
|
30
|
-
| `page_structure` | 获取页面关键结构信息(推荐) |
|
|
31
|
-
| `page_close` | 关闭指定页面 |
|
|
32
|
-
|
|
33
|
-
### 元素交互
|
|
34
|
-
| 工具 | 说明 |
|
|
35
|
-
|------|------|
|
|
36
|
-
| `element_find` | 查找页面元素 |
|
|
37
|
-
| `element_find_all` | 查找所有匹配的元素 |
|
|
38
|
-
| `element_click` | 点击页面元素 |
|
|
39
|
-
| `element_type` | 向输入框输入文本 |
|
|
40
|
-
| `element_hover` | 鼠标悬停到元素 |
|
|
41
|
-
| `element_press` | 模拟键盘按键 |
|
|
42
|
-
| `element_wait` | 等待元素出现或消失 |
|
|
43
|
-
|
|
44
|
-
### Cookie 管理
|
|
45
|
-
| 工具 | 说明 |
|
|
46
|
-
|------|------|
|
|
47
|
-
| `cookie_get` | 获取页面 Cookie |
|
|
48
|
-
| `cookie_set` | 设置 Cookie |
|
|
49
|
-
| `cookie_clear` | 清除 Cookie |
|
|
50
|
-
|
|
51
|
-
### Session 管理
|
|
52
|
-
| 工具 | 说明 |
|
|
53
|
-
|------|------|
|
|
54
|
-
| `session_save` | 保存当前浏览器会话状态 |
|
|
55
|
-
| `session_load` | 加载并恢复浏览器会话状态 |
|
|
56
|
-
| `session_list` | 列出所有保存的 Session |
|
|
57
|
-
| `session_delete` | 删除指定的 Session |
|
|
58
|
-
|
|
59
|
-
### 其他
|
|
60
|
-
| 工具 | 说明 |
|
|
61
|
-
|------|------|
|
|
62
|
-
| `js_execute` | 在页面中执行 JavaScript 代码 |
|
|
63
|
-
| `wait` | 等待指定时间 |
|
|
64
|
-
| `wait_network_idle` | 等待网络空闲 |
|
|
65
|
-
|
|
66
|
-
## 安装
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
foliko plugin install puppeteer-plugin
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## 使用示例
|
|
73
|
-
|
|
74
|
-
### 启动浏览器并打开网页
|
|
75
|
-
|
|
76
|
-
```javascript
|
|
77
|
-
// 启动浏览器
|
|
78
|
-
await ext_call({
|
|
79
|
-
plugin: "puppeteer",
|
|
80
|
-
tool: "browser_launch",
|
|
81
|
-
args: {}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// 打开网页
|
|
85
|
-
await ext_call({
|
|
86
|
-
plugin: "puppeteer",
|
|
87
|
-
tool: "page_open",
|
|
88
|
-
args: { url: "https://example.com" }
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// 截图
|
|
92
|
-
await ext_call({
|
|
93
|
-
plugin: "puppeteer",
|
|
94
|
-
tool: "page_screenshot",
|
|
95
|
-
args: { path: "screenshot.png" }
|
|
96
|
-
});
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 元素交互
|
|
100
|
-
|
|
101
|
-
```javascript
|
|
102
|
-
// 查找并点击按钮
|
|
103
|
-
await ext_call({
|
|
104
|
-
plugin: "puppeteer",
|
|
105
|
-
tool: "element_click",
|
|
106
|
-
args: { selector: "button.submit" }
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// 输入文本
|
|
110
|
-
await ext_call({
|
|
111
|
-
plugin: "puppeteer",
|
|
112
|
-
tool: "element_type",
|
|
113
|
-
args: { selector: "input[name='username']", text: "myuser" }
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Session 管理
|
|
118
|
-
|
|
119
|
-
```javascript
|
|
120
|
-
// 保存当前会话
|
|
121
|
-
await ext_call({
|
|
122
|
-
plugin: "puppeteer",
|
|
123
|
-
tool: "session_save",
|
|
124
|
-
args: { sessionId: "my-session" }
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
// 恢复会话
|
|
128
|
-
await ext_call({
|
|
129
|
-
plugin: "puppeteer",
|
|
130
|
-
tool: "session_load",
|
|
131
|
-
args: { sessionId: "my-session" }
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## 注意事项
|
|
136
|
-
|
|
137
|
-
1. **无图片识别能力**:该插件没有识别图片的能力,截图只能保存
|
|
138
|
-
2. **需要 Chromium**:Puppeteer 需要本地安装 Chromium 浏览器
|
|
139
|
-
3. **Session 恢复**:加载 Session 时会自动恢复 Cookie 和浏览器状态
|
|
140
|
-
|
|
141
|
-
## 依赖
|
|
142
|
-
|
|
143
|
-
- puppeteer-core: ^24.40.0
|
|
144
|
-
|
|
145
|
-
## 版本
|
|
146
|
-
|
|
147
|
-
- v1.0.0
|