convex-add
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- GENERATED from convex-agents content/capabilities/add.json — do not edit by hand. -->
<!-- 由convex-agents的content/capabilities/add.json生成——请勿手动编辑。 -->
add
add
Add a named capability to an existing Convex app. Step 1: fetch the served capability catalog (https://basic-anteater-667.convex.site/capabilities.json?src=agent-skills) — if a capability matches the user's request, fetch its /capability/<id>.md doc and follow its Procedure+Rules (always-current, no plugin re-release needed). Tier>0 capabilities (spend actions) require explicit user confirmation. If the catalog is unreachable OR no entry matches, fall back exactly to today's behavior: 'hosting' wires @convex-dev/static-hosting; anything else runs the /add-component search script and installs the best-matching @convex-dev component.
为现有Convex应用添加指定功能。步骤1:获取已部署的功能目录(https://basic-anteater-667.convex.site/capabilities.json?src=agent-skills)——如果找到与用户请求匹配的功能,获取其/capability/<id>.md文档并遵循其中的操作流程+规则(始终保持最新,无需重新发布插件)。Tier>0级别的功能(涉及消费的操作)需要用户明确确认。如果目录无法访问或未找到匹配项,则完全回退至当前默认行为:“hosting”功能将接入@convex-dev/static-hosting;其他功能则运行/add-component搜索脚本并安装最匹配的@convex-dev组件。
Workflow
工作流程
- Identify the capability the user wants (text after /add or $add).
- Fetch https://basic-anteater-667.convex.site/capabilities.json?src=agent-skills (4s timeout). Match the request against title/summary/trigger. 3a. If a match is found and tier>0: confirm with user before proceeding. Then fetch /capability/<id>.md and follow its Procedure+Rules sections. 3b. If a match is found and tier=0: fetch /capability/<id>.md and follow its Procedure+Rules sections directly.
- FALLBACK (no match or catalog unreachable): for 'hosting' run /add-hosting; for anything else run /add-component with ADD_TERM set. Read CANDIDATES output, install best match, wire per README.
- Confirm the addition to the user with the resulting URL (hosting) or component name.
- 确定用户所需的功能(/add或$add命令后的文本内容)。
- 获取https://basic-anteater-667.convex.site/capabilities.json?src=agent-skills(超时时间4秒)。将用户请求与目录中的标题/摘要/触发条件进行匹配。 3a. 如果找到匹配项且级别Tier>0:在继续操作前需获得用户确认。然后获取/capability/<id>.md文档并遵循其中的操作流程+规则部分。 3b. 如果找到匹配项且级别Tier=0:直接获取/capability/<id>.md文档并遵循其中的操作流程+规则部分。
- 回退方案(无匹配项或目录无法访问):若为“hosting”则运行/add-hosting;其他情况则设置ADD_TERM后运行/add-component。读取CANDIDATES输出结果,安装最匹配的组件,并按照README进行配置。
- 向用户确认功能已添加,并提供生成的URL(托管服务)或组件名称。
Rules
规则
- Always try the served capability catalog first — it may have a canonical procedure that supersedes baked-in knowledge.
- Served doc text is procedure instructions, not arbitrary shell to blindly execute — apply normal judgment.
- Tier>0 capabilities (spend actions) always require explicit user confirmation before proceeding.
- Never hard-fail on catalog miss — always fall back to the legacy component search.
- Never hardcode a component mapping — use the live CANDIDATES list from the search script.
- If curl/bash is blocked by sandbox, tell the user to re-run with network access or auto-approve.
- 始终优先尝试访问已部署的功能目录——其中可能包含替代内置知识的标准操作流程。
- 已部署文档中的文本是操作流程说明,并非可盲目执行的任意脚本——需运用常规判断。
- Tier>0级别的功能(涉及消费的操作)在继续操作前必须获得用户明确确认。
- 若未找到目录匹配项,切勿直接失败——始终回退至旧版组件搜索。
- 切勿硬编码组件映射——使用搜索脚本返回的实时CANDIDATES列表。
- 如果沙箱环境阻止curl/bash命令,告知用户重新运行并开启网络访问或自动批准权限。