返回顶部
z

ziniao-assistant紫鸟助手

Control Ziniao Browser via the local Ziniao bridge. On skill load or before first invoke, GET /zclaw/tools and treat returned name list as the only allowed tool strings; then POST /zclaw/tools/invoke. API key for invoke via ~/.zclaw/config.json or ZCLAW_API_KEY. On bridge failure stop the turn per skill.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,104
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

ziniao-assistant

Ziniao 助手

会话工具允许列表(强制——优先获取)

目标: 在任何 invoke 调用之前,将权威的工具名称放入上下文中,以便每个 tool 字段仅从该集合中选择(减少虚构名称)。

  1. 1. 处理 ZClaw 任务时的首次 HTTP 调用(或在此技能加载后立即执行):
GET {baseUrl}/zclaw/tools 与 invoke 使用相同的 baseUrl(ZCLAWBASEURL / ZINIAOZCLAWBASE_URL,默认 http://127.0.0.1:9481)。 此 GET 请求不需要 X-ZClaw-Api-Key 和 Ziniao 登录(桥接器上的公共注册表)。
  1. 2. 解析响应: JSON 格式 { ret, data },其中 data 是 { name, description, inputSchema } 的数组。构建
allowedTools = data.map((t) => t.name) 并在会话的工作记忆中保留它。在选择参数时,可选择在每个名称旁边保留 description / inputSchema。
  1. 3. 每次 POST {baseUrl}/zclaw/tools/invoke 之前: 确保 allowedTools.includes(tool)。如果你打算使用的名称不在 allowedTools 中,不要发送请求——将用户的意图映射到 allowedTools 中的真实名称(例如,打开 URL → visitpage 或 openstore + launchUrl)。
  1. 4. 如果 invoke 返回错误,如不支持的/未知的工具:重新运行 GET /zclaw/tools,刷新 allowedTools,并使用有效的 name 重试。
  1. 5. 如果 GET /zclaw/tools 失败(连接被拒绝、超时):遵循阻塞时停止处理不可达的桥接器;如果必须仅使用静态知识继续,请使用下面的静态回退允许列表——仍然不要使用虚构的名称。

静态回退允许列表(当 GET 不可用时)

逗号分隔的 tool 名称,匹配健康的桥接器(当 GET 可用时重新同步):

liststores, resolvestore, openstore, closestore, visitpage, getpagecontent, queryelements, clickelement, inputtext, scrollpage, takescreenshot, waitforelement, waitfornavigation, executescript, runautomation, extractdata, prepareagent, getlogs, downloadfile, debugcomparelists



可用功能

所有 invoke 操作使用 POST {baseUrl}/zclaw/tools/invoke,包含 tool + args。权威名称来自 GET /zclaw/tools(见上文);下表是与该注册表对齐的文档。

类别工具描述
店铺liststores列出店铺(storeId, storeName, platformName, ip)。调用一次;不循环。
resolvestore | 通过 storeId 或 storeName 解析店铺。 |
| | open_store | 打开店铺(通过列表或解析中的 storeId/storeName)。调用一次。 |
| | close_store | 通过 storeId 关闭店铺。 |
| 页面 | visit_page | 导航到 URL,可选的 waitUntil/timeout。 |
| | getpagecontent | 读取页面内容(text/html/structured)。 |
| 交互 | query_elements | 通过选择器查询 DOM。 |
| | click_element | 通过选择器点击元素,可选的 waitForNavigation。 |
| | input_text | 在元素中输入文本;可选的 clear, submit。 |
| | scroll_page | 滚动页面或元素。 |
| | take_screenshot | 截图(全页或视口)。 |
| 等待 | waitforelement | 等待选择器。 |
| | waitfornavigation | 等待导航。 |
| 自动化 | execute_script | 在页面中运行 JavaScript。 |
| | run_automation | 多步骤自动化(steps 数组)。 |
| | extract_data | 提取元数据/页面状态;mode=running 列出已启动的店铺。 |
| 工具 | prepare_agent | 准备代理资源。 |
| | download_file | 将内容写入下载目录(content, filename)。 |
| | get_logs | 获取桥接器日志。 |
| 调试 | debugcomparelists | 调试:比较账户/列表与店铺/列表(可选;在 GET /zclaw/tools 注册表中)。 |

不要使用: runscript → 使用 executescript;screenshot / getscreenshot → 使用 takescreenshot;executeautomation → 使用 runautomation。



工具名称:禁止虚构(强制)

桥接器接受下面核心工具中列出的 tool 字符串。没有单独的导航 API、浏览器 API或店铺工具命名空间——所有内容都是同一个 POST .../zclaw/tools/invoke 请求体字段 tool。

你绝不能从一般的自动化习惯(Playwright、Selenium、browser-use 等)中发明或猜测工具名称。如果某个名称不在核心工具中,它就不存在

以下及类似名称无效(将失败或被拒绝):navigate, navigation, goto, goto, openurl, openUrl, gotourl, loadurl, browse, openpage, openPage, callstoretool, storetool, browsernavigate, visit, gototab, switchtab(作为工具名称——请改用 visitpage / open_store)。

在店铺中打开 URL——仅支持两种方式:

  1. 1. visitpage — 参数:storeId, url(以及可选的 waitUntil, timeoutMs, targetId)。在店铺已打开后使用。
  2. openstore — 参数:storeId 或 storeName,以及可选的 launchUrl,以便在店铺启动时第一个标签页打开该 URL。

在尝试 visitpage 或 openstore + launchUrl 之前,不要链式调用虚构的工具。



API:如何调用工具(必需)

所有工具仅通过一个端点调用。 不要调用其他路径。

  • - 发现工具(无需认证): GET {baseUrl}/zclaw/tools — 首先使用;参见会话工具允许列表
  • 方法和路径: POST {baseUrl}/zclaw/tools/invoke(例如 POST http://127.0.0.1:9481/zclaw/tools/invoke)。基础 URL 来自 ZCLAWBASEURL 或 ZINIAOZCLAWBASEURL(默认 http://127.0.0.1:9481)。
  • invoke 必须认证: 每次 POST {baseUrl}/zclaw/tools/invoke 必须携带 API 密钥凭据。首选标头:X-ZClaw-Api-Key: 。也接受:请求体 apiKey,或 Authorization: Bearer (仅兼容)。切勿发送不带密钥的 invoke。
  • 请求体(JSON): { tool: , args: { ... } }。可选:action: json。
  • tool 必须精确匹配下面核心工具列表中的一个工具名称(例如 liststores, visitpage, getpagecontent, clickelement, takescreenshot, executescript, runautomation)。错误的名称(例如 runscript, screenshot)或自定义路径将失败。
  • 不要调用像 /zclaw/page/execute, /zclaw/page/visit, /zclaw/page/click 等路径。每个工具调用必须是 POST /zclaw/tools/invoke,并在请求体中包含正确的 tool 名称。

Invoke 认证示例(强制)

正确(首选):

bash
curl -X POST http://127.0.0.1:9481/zclaw/tools/invoke \
-H Content-Type: application/json \
-H X-ZClaw-Api-Key: APIKEY> \
-d {tool

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ziniao-assistant-1776387302 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ziniao-assistant-1776387302 技能

通过命令行安装

skillhub install ziniao-assistant-1776387302

下载

⬇ 下载 ziniao-assistant v1.0.1(免费)

文件大小: 8.6 KB | 发布时间: 2026-4-17 16:39

v1.0.1 最新 2026-4-17 16:39
**Ziniao Assistant 1.0.1 introduces dynamic tool discovery for safer, more reliable browser control.**

- On skill load or before first tool use, fetch available tools from the bridge via GET /zclaw/tools and only allow invoking tool names from this live list.
- Prevents using hallucinated or invalid tool names by always mapping user actions to names in the session's allowedTools.
- Retains static fallback allowlist for tool names only if the bridge registry cannot be reached.
- No changes to browser control capabilities or stop-on-blocker logic.
- Updated documentation for dynamic discovery, static fallback, and stricter tool invocation flow.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部