返回顶部
s

skill-hub-gateway技能中心网关

Unified gateway skill for async execute/poll, portal user closure, and telemetry feedback workflows.

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

skill-hub-gateway

Skill Hub Gateway

默认API基础URL:https://gateway-api.binaryworks.app

默认站点基础URL(用于上传路由):https://gateway.binaryworks.app

中文文档:SKILL.zh-CN.md

版本检查协议(Agent)

  • - 官方最新版本来源:GET /skills/manifest.json -> data.version。
  • 本地当前版本来源:已安装的 SKILL.md 前置元数据中的 version。
  • 使用语义化版本顺序(major.minor.patch)比较版本。
  • 检查时机:会话开始时检查一次,之后在同一会话中每24小时最多检查一次。
  • 如果版本检查失败(网络/超时/解析错误),不阻塞运行时执行。继续当前工作流程,并在下一个允许的检查窗口重试。

Agent决策流程

  • - 如果 latestversion > currentversion,读取本文档中 Release Notes 下的匹配章节,构建 update_summary。
  • Agent应向用户展示:
- current_version - latest_version - update_summary
  • - 用户决策选项:
- 立即更新 - 稍后在本会话中提醒我
  • - 如果用户选择 稍后在本会话中提醒我,则在同一目标版本的提示被抑制,直到新会话开始。

首次使用引导(install_code)

脚本默认自动完成引导:

  1. 1. POST /agent/install-code/issue,参数为 {channel:local} 或 {channel:clawhub}。
  2. 读取 data.installcode。
  3. POST /agent/bootstrap,参数为 {agentuid:uid>,installcode:code>}。
  4. 读取 data.apikey,然后使用 X-API-Key 或 Authorization: Bearer 调用运行时API。

手动覆盖:

  • - 您仍然可以显式提供 apikey。
  • 如果省略 agentuid 和 owneruidhint,脚本将从当前工作空间路径派生稳定的本地默认值。

旧版运行时合约(兼容性)

  • - 执行:POST /skill/execute
  • 轮询:GET /skill/runs/:run_id

Portal操作(用户闭环)

操作目录(每个操作单个默认路径):

  • - portal.me -> GET /user/me
  • portal.balance -> GET /user/points/balance
  • portal.ledger.query -> GET /user/points/ledger
  • portal.usage.query -> GET /user/usage
  • portal.skill.execute -> POST /user/skills/execute
  • portal.skill.poll -> GET /user/skills/runs/:runId
  • portal.skill.presentation -> GET /user/skills/runs/:runId/presentation
  • portal.voucher.redeem -> POST /user/vouchers/redeem(写入)
  • portal.recharge.create -> POST /user/recharge/orders(写入)
  • portal.recharge.get -> GET /user/recharge/orders/:orderId

写入安全门:

  • - portal.voucher.redeem 和 portal.recharge.create 需要 payload.confirm === true。
  • 如果 confirm 缺失或不为 true,操作运行器将在本地拒绝调用,不发送写入流量。

负载合约

默认负载约定:

  • - payload.input 是 portal.skill.execute 的主要输入对象。
  • payload.requestid 是可选的,并按原样传递。
  • 查询操作直接使用 payload 字段作为查询参数(datefrom、dateto、serviceid、channel)。

媒体标准化约定:

  • - 优先使用输入中已有的显式URL字段:imageurl、audiourl、fileurl。
  • 如果存在 attachment.url,将其映射到能力目标URL字段。
  • 如果存在 filepath,通过 {sitebase}/api/blob/upload 自动上传,当 @vercel/blob/client 不可用时回退到 {sitebase}/api/blob/upload-file,然后在执行前将URL回填到输入中。
  • 对于不包含 @vercel/blob/client 的Agent运行时,您也可以通过后端(例如Vercel Blob)预上传媒体,并传递 attachment.url 或显式URL字段。
  • sitebaseurl 是一个受保护字段:运行时只接受受信任的已配置站点基础URL(默认 https://gateway.binaryworks.app 或环境变量 SKILLSITEBASE_URL)。
  • 在正常产品流程中,用户不应需要手动粘贴媒体URL。

展示文件:

  • - portal.skill.presentation 接受可选的 includefiles=true,以返回包含渲染文件URL的 visual.files.assets。
  • portal-action.mjs 默认对 portal.skill.presentation 启用 includefiles=true,除非显式禁用。
  • 图像运行返回 overlay(框选图像),以及可用的 mask / cutout 资源。
  • 当配置了Blob存储时,音频运行将数据URL规范化为 output.media_files.assets,其中包含上传的文件URL。

运行时认证桥接

用户范围的操作使用固定的认证桥接:

  1. 1. 解析运行时API密钥上下文(apikey、agentuid、owneruidhint、baseurl)。
  2. GET /agent/me,使用 X-API-Key + x-agent-uid 解析 userid。
  3. POST /user/api-key-login,使用 userid + apikey 获取 userToken。
  4. 使用 Authorization: Bearer 执行Portal操作。

积分不足恢复

对于 POINTS_INSUFFICIENT 响应:

  • - 保持 error.code 和 error.message 不变。
  • 保留并展示可用的 error.details.rechargeurl。
  • 诊断日志应推荐 portal.recharge.create 或直接打开 rechargeurl。

捆绑文件

  • - scripts/execute.mjs(CLI参数:[apikey] [capability] [inputpayload] [baseurl] [agentuid] [owneruidhint])
  • scripts/poll.mjs(CLI参数:[apikey] id> [baseurl] [agentuid] [owneruidhint])
  • scripts/feedback.mjs(CLI参数:[apikey] [payloadjson] [baseurl] [agentuid] [owneruidhint])
  • scripts/telemetry.mjs(共享的尽力而为遥测辅助工具)
  • scripts/runtime-auth.mjs(共享的自动引导辅助工具)
  • scripts/portal-auth.mjs(api-key -> 用户会话桥接)
  • scripts/portal-action.mjs(CLI参数:[apikey] json> [baseurl] [agentuid] [owneruidhint])
  • scripts/attachment-normalize.mjs(附件URL/路径标准化 + 上传)
  • references/capabilities.json
  • references/openapi.json
  • SKILL.zh-CN.md

遥测与反馈

  • - 捆绑脚本现在支持对认证/执行/轮询/反馈流程进行尽力而为的遥测发送。
  • 遥测是非阻塞的,如果遥测传递失败,不会改变运行时退出语义。
  • 可选环境变量:
- SKILLTELEMETRYENABLED(默认为 true) - SKILLTELEMETRYBASEURL(默认为运行时 baseurl) - SKILLTELEMETRYTIMEOUT_MS(默认为 2000)
  • - 反馈脚本使用运行时认证(X-API-Key)向 POST /feedback/submit 发送数据,并在元数据中附加 agentuid + owneruid_hint。

能力ID

  • - humandetect
  • imagetagging
  • ttsreport
  • embeddings
  • reranker
  • asr
  • ttslowcost
  • markdownconvert
  • face-detect
  • person-detect
  • hand-detect
  • body-keypoints-2d
  • body-contour-63pt
  • face-keypoints-106pt
  • head-pose
  • face-feature-classification
  • face-action-classification
  • face-image-quality
  • face-emotion-recognition
  • face-physical-attributes
  • face-social-attributes
  • political-figure-recognition
  • designated-person-recognition
  • exhibit

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 skill-hub-gateway-1776187502 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 skill-hub-gateway-1776187502 技能

通过命令行安装

skillhub install skill-hub-gateway-1776187502

下载

⬇ 下载 skill-hub-gateway v2.4.2(免费)

文件大小: 30.64 KB | 发布时间: 2026-4-15 11:23

v2.4.2 最新 2026-4-15 11:23
- Added `/api/blob/upload-file` as a fallback upload endpoint for `file_path` inputs when `@vercel/blob/client` is unavailable.
- Enhanced `portal.skill.presentation` to render output files and return `visual.files.assets`, including overlay, mask, and cutout URLs.
- Audio outputs now normalize to `output.media_files.assets` with uploaded file URLs when blob storage is available.
- No breaking changes.

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

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

p2p_official_large