Skill Hub Gateway
Default API base URL: INLINECODE0
Default site base URL (for upload route): INLINECODE1
Chinese documentation: INLINECODE2
Version Check Protocol (Agent)
- - Official latest version source:
GET /skills/manifest.json -> data.version. - Local current version source: this installed
SKILL.md frontmatter version. - Compare versions using semantic version order (
major.minor.patch). - Check timing: once at session start, then at most once every 24 hours within the same session.
- If version check fails (network/timeout/parse error), do not block runtime execution. Continue current workflow and retry at the next allowed check window.
Agent Decision Flow
- - If
latest_version > current_version, read the matching section under Release Notes in this document to build update_summary. - Agent should show the user:
-
current_version
-
latest_version
-
update_summary
-
Update now
-
Remind me later in this session
- - If user chooses
Remind me later in this session, suppress repeated prompts for the same target version until a new session starts.
First-Time Onboarding (install_code)
Scripts auto-complete onboarding by default:
- 1.
POST /agent/install-code/issue with {"channel":"local"} or {"channel":"clawhub"}. - Read
data.install_code. - INLINECODE21 with
{"agent_uid":"<agent_uid>","install_code":"<install_code>"}. - Read
data.api_key, then call runtime APIs with X-API-Key or Authorization: Bearer <api_key>.
Manual override:
- - You can still provide
api_key explicitly. - If
agent_uid and owner_uid_hint are omitted, scripts derive stable local defaults from the current workspace path.
Legacy Runtime Contract (Compatibility)
- - Execute: INLINECODE29
- Poll: INLINECODE30
Portal Actions (User Closure)
Action catalog (single default path per action):
- -
portal.me -> INLINECODE32 - INLINECODE33 -> INLINECODE34
- INLINECODE35 -> INLINECODE36
- INLINECODE37 -> INLINECODE38
- INLINECODE39 -> INLINECODE40
- INLINECODE41 -> INLINECODE42
- INLINECODE43 -> INLINECODE44
- INLINECODE45 ->
POST /user/vouchers/redeem (write) - INLINECODE47 ->
POST /user/recharge/orders (write) - INLINECODE49 -> INLINECODE50
Write safety gate:
- -
portal.voucher.redeem and portal.recharge.create require payload.confirm === true. - If
confirm is missing or not true, action runner rejects the call locally and does not send write traffic.
Payload Contract
Default payload conventions:
- -
payload.input is the primary input object for portal.skill.execute. - INLINECODE58 is optional and passed through as-is.
- Query actions use
payload fields directly as query params (date_from, date_to, service_id, channel).
Media normalization conventions:
- - Prefer explicit URL fields already present in input:
image_url, audio_url, file_url. - If
attachment.url exists, map it to the capability target URL field. - If
file_path exists, auto-upload through {site_base}/api/blob/upload, with fallback to {site_base}/api/blob/upload-file when @vercel/blob/client is unavailable, then backfill URL into input before execution. - For agent runtimes that do not include
@vercel/blob/client, you can also pre-upload media via your backend (for example Vercel Blob) and pass attachment.url or explicit URL fields. - INLINECODE74 is a guarded field: runtime only accepts the trusted configured site base URL (default
https://gateway.binaryworks.app or env SKILL_SITE_BASE_URL). - Users should not need to manually paste media URLs in normal product flows.
Presentation files:
- -
portal.skill.presentation accepts optional include_files=true to return visual.files.assets with rendered file URLs. - INLINECODE80 defaults
include_files=true for portal.skill.presentation unless explicitly disabled. - Image runs return
overlay (boxed image), plus mask / cutout assets when available. - Audio runs normalize data URLs to
output.media_files.assets with uploaded file URLs when blob storage is configured.
Runtime Auth Bridge
User-scoped actions use a fixed auth bridge:
- 1. Resolve runtime API key context (
api_key, agent_uid, owner_uid_hint, base_url). - INLINECODE91 with
X-API-Key + x-agent-uid to resolve user_id. - INLINECODE95 with
user_id + api_key to obtain userToken. - Execute Portal Action with
Authorization: Bearer <userToken>.
Insufficient Points Recovery
For POINTS_INSUFFICIENT responses:
- - Keep
error.code and error.message unchanged. - Preserve and surface
error.details.recharge_url when available. - Diagnostic logs should recommend
portal.recharge.create or direct open of recharge_url.
Bundled Files
- -
scripts/execute.mjs (CLI args: [api_key] [capability] [input_payload] [base_url] [agent_uid] [owner_uid_hint]) - INLINECODE107 (CLI args:
[api_key] <run_id> [base_url] [agent_uid] [owner_uid_hint]) - INLINECODE109 (CLI args:
[api_key] [payload_json] [base_url] [agent_uid] [owner_uid_hint]) - INLINECODE111 (shared best-effort telemetry helper)
- INLINECODE112 (shared auto-bootstrap helper)
- INLINECODE113 (api-key -> user session bridge)
- INLINECODE114 (CLI args:
[api_key] <action> <payload_json> [base_url] [agent_uid] [owner_uid_hint]) - INLINECODE116 (attachment URL/path normalization + upload)
- INLINECODE117
- INLINECODE118
- INLINECODE119
Telemetry and Feedback
- - Bundled scripts now support best-effort telemetry emit for auth/execute/poll/feedback flows.
- Telemetry is non-blocking and does not change runtime exit semantics if telemetry delivery fails.
- Optional environment variables:
-
SKILL_TELEMETRY_ENABLED (
true by default)
-
SKILL_TELEMETRY_BASE_URL (defaults to runtime
base_url)
-
SKILL_TELEMETRY_TIMEOUT_MS (
2000 by default)
- - Feedback script posts to
POST /feedback/submit with runtime auth (X-API-Key) and attaches agent_uid + owner_uid_hint in metadata.
Capability IDs
- - INLINECODE130
- INLINECODE131
- INLINECODE132
- INLINECODE133
- INLINECODE134
- INLINECODE135
- INLINECODE136
- INLINECODE137
- INLINECODE138
- INLINECODE139
- INLINECODE140
- INLINECODE141
- INLINECODE142
- INLINECODE143
- INLINECODE144
- INLINECODE145
- INLINECODE146
- INLINECODE147
- INLINECODE148
- INLINECODE149
- INLINECODE150
- INLINECODE151
- INLINECODE152
- INLINECODE153
- INLINECODE154
- INLINECODE155
- INLINECODE156
- INLINECODE157
- INLINECODE158
- INLINECODE159
Release Notes
When publishing a new version, add a new section here. Agent update summaries must be generated from this block.
2.4.2 (2026-03-12)
What's New
- - Added
/api/blob/upload-file direct-upload fallback for file_path flows when @vercel/blob/client is unavailable. - Added
portal.skill.presentation file rendering (visual.files.assets) for overlay/mask/cutout URLs. - Added audio output normalization to return
output.media_files.assets with uploaded file URLs when blob storage is configured.
Breaking/Behavior Changes
Migration Notes
- - For agent runtimes without
@vercel/blob/client, send file_path as before; the runtime now falls back to direct upload. - To receive rendered files, call
portal.skill.presentation with include_files=true or rely on the portal default.
2.4.1 (2026-03-12)
What's New
- - Added server-side
portal.skill.execute input normalization for attachment.url (both input.attachment.url and top-level attachment.url). - Added explicit media URL precedence guard (
image_url/audio_url/file_url take priority over attachment.url when both are present). - Added end-to-end tests for upload-first execution payload compatibility and precedence behavior.
- Clarified fallback guidance for runtimes missing
@vercel/blob/client to use backend pre-upload URLs.
Breaking/Behavior Changes
Migration Notes
- - Existing
portal-action.mjs workflows remain compatible. - For local file workflows in constrained agent runtimes, prefer backend pre-upload then pass
attachment.url or explicit media URL.
2.4.0 (2026-03-12)
What's New
- - Added Portal Actions contract for single-skill user closure flows (
portal.me, balance/ledger/usage, execute/poll/presentation, voucher and recharge actions). - Added local double-confirm write gate:
portal.voucher.redeem and portal.recharge.create require confirm=true. - Added runtime auth bridge script (
portal-auth.mjs) for api_key -> user session. - Added action runner (
portal-action.mjs) and attachment normalization script (attachment-normalize.mjs) with attachment.url and file_path support. - Standardized insufficient-points diagnostics to preserve
recharge_url in passthrough envelopes.
Breaking/Behavior Changes
- - Write actions now fail fast locally when
confirm=true is absent.
Migration Notes
- - Existing
execute.mjs and poll.mjs workflows remain available. - Portal users should call
portal-action.mjs for user closure actions.
2.3.4 (2026-03-11)
What's New
- - Added best-effort telemetry emit in runtime scripts for auth/execute/poll flows.
- Added
scripts/feedback.mjs to submit structured feedback via runtime auth (X-API-Key). - Added shared telemetry helper with optional env controls (
SKILL_TELEMETRY_*).
Breaking/Behavior Changes
Migration Notes
- - Existing execute/poll calls remain unchanged.
- If you run scripts in constrained environments, allow optional telemetry calls to
/agent/telemetry/ingest and /telemetry/ingest.
2.3.3 (2026-03-11)
What's New
- - Standardized user-facing guidance around upload-based flows: do not expose manual URL/JSON fields for media/document inputs.
- Updated capability reference examples and wording to match upload-first product UX.
- Renamed CLI argument label from
input_json to input_payload for consistency with structured payload semantics.
Breaking/Behavior Changes
Migration Notes
- - Existing runtime API calls remain unchanged.
- If your integration shows custom input forms, prefer file/attachment inputs instead of manual URL/JSON text fields.
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. POST /agent/install-code/issue,参数为 {channel:local} 或 {channel:clawhub}。
- 读取 data.installcode。
- POST /agent/bootstrap,参数为 {agentuid:uid>,installcode:code>}。
- 读取 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. 解析运行时API密钥上下文(apikey、agentuid、owneruidhint、baseurl)。
- GET /agent/me,使用 X-API-Key + x-agent-uid 解析 userid。
- POST /user/api-key-login,使用 userid + apikey 获取 userToken。
- 使用 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
遥测与反馈
- - 捆绑脚本现在支持对认证/执行/轮询/反馈流程进行尽力而为的遥测发送。
- 遥测是非阻塞的,如果遥测传递失败,不会改变运行时退出语义。
- 可选环境变量:
- SKILL
TELEMETRYENABLED(默认为 true)
- SKILL
TELEMETRYBASE
URL(默认为运行时 baseurl)
- SKILL
TELEMETRYTIMEOUT_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