cawcut-app-run

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CawCut App Run

CawCut 应用运行

Entry point for anything CawCut-App related: discovery ("what can this app do", "what apps are available"), catalog browsing, and running Apps. Wraps
cawcut app list
,
cawcut app describe
, and
cawcut app run
. Also decides when a request has no App match and hands off to
cawcut-generate
.
Skill files are English-only.
SKILL.md
and
references/
must not contain Chinese or other non-English prose (including YAML
description
trigger phrases). Match the user's language only in live replies via
reply_language
.
所有CawCut-App相关操作的入口:应用发现(如“这个应用能做什么”、“有哪些可用应用”)、目录浏览以及运行应用。封装了
cawcut app list
cawcut app describe
cawcut app run
命令。同时会判断请求是否无匹配应用,并将任务转交给
cawcut-generate
技能文件仅支持英文。
SKILL.md
references/
目录下不得包含中文或其他非英文文本(包括YAML中的
description
触发短语)。仅在通过
reply_language
进行实时回复时匹配用户使用的语言。

Step -1 — Handoff state (check first)

步骤-1 — 转交状态(优先检查)

If this turn started because
cawcut-generate
already ran its own app-catalog check and the user confirmed they want a specific App (see its "Check the App catalog first" rule), that App is already decided. Skip Step 1 catalog scoring and app-picker menus. Go straight to
cawcut app describe "<app name>"
+ tables + input menu.
Still live-fetch when needed: before
cawcut app run
, run a fresh
cawcut app list --json
in this turn to resolve the internal app ID — use only that command's output, not catalog JSON from earlier messages or from
cawcut-generate
's earlier call in the same turn.
describe
is always live; never substitute a prior
describe
snapshot from conversation memory.
If the user's subject or goal changes after this handoff (including after a rejected/interrupted tool call), Step -1 no longer applies — restart at Step 1 and re-score the catalog.
Otherwise, continue at Step 0.
如果当前轮次启动是因为**
cawcut-generate
**已完成自身的应用目录检查,且用户确认想要某个特定应用(参见其“优先检查应用目录”规则),则该应用已确定。跳过步骤1的目录评分和应用选择菜单,直接执行
cawcut app describe "<app name>"
+ 表格 + 输入菜单。
必要时仍需实时获取数据:在执行
cawcut app run
之前,需在当前轮次中重新运行
cawcut app list --json
来解析内部应用ID——仅使用该命令的输出结果,不得使用之前消息中的目录JSON或同一轮次中
cawcut-generate
之前调用的结果。
describe
命令始终需要实时执行;绝不能用对话记忆中之前的
describe
快照替代。
如果用户在转交后更改了主题或目标(包括工具调用被拒绝/中断后),步骤-1不再适用——需从步骤1重新开始并重新对目录进行评分。
否则,继续执行步骤0。

Step 0 — Bootstrap

步骤0 — 初始化

Run bootstrap as a silent guardrail, not as a user-facing phase.
  1. At most once per AI session. If any
    cawcut
    command has already succeeded in this AI session, skip all bootstrap checks and continue.
  2. Use only one explicit check command:
    cawcut upgrade check --json
    .
    • Do not also run
      cawcut --version
      ,
      command -v cawcut
      , or
      cawcut auth status
      .
    • If
      "update_available": true
      , run
      cawcut upgrade
      yourself via Bash
      (do not ask the user to type it). It refreshes CLI + skills. After it succeeds, continue this skill from Step 1 — do not stop or ask the user to re-invoke.
    • If
      "ahead_of_registry": true
      , continue without upgrading. Do not ask the user to downgrade or run
      cawcut upgrade
      .
    • If the check fails because
      cawcut
      is missing, ask the user to install the CLI via npm (external users — no git clone or repo
      ./setup
      ):
      bash
      npm install -g @ubnt/cawcut
      After install succeeds, continue bootstrap; auth is handled in step 4 below.
    • For other check failures, continue and mention the warning only if a later CLI command fails.
  3. Do not print "bootstrap checks passed" or ask "what would you like to run?" after bootstrap. Move directly to App discovery below.
  4. Let the first real command (
    cawcut app list --schema
    ,
    cawcut app describe
    , or
    cawcut app run
    ) validate auth. If it fails with token/auth errors (including
    Token expired
    ), run
    cawcut auth login
    yourself via Bash
    — do not ask the user to type it. Briefly tell the user a browser tab will open for OAuth consent; wait for login to finish, then retry the command that failed once. Only escalate to the user if login fails (denied, timeout, port conflict).
  5. This skill's references (
    references/troubleshooting.md
    ,
    references/app-inputs.md
    ,
    references/intent-matching.md
    ,
    references/app-presentation.md
    ) live under the base directory printed at the top of this skill body —
    Read
    them directly at
    <base_dir>/references/<file>.md
    . Do not
    find
    /
    grep
    to locate them; that base directory can be a symlink that a plain
    find <dir>
    silently fails to traverse.
  6. Structured user-ask tool (check every session). In Claude Code, use
    AskUserQuestion
    for every enumerable choice. In Cursor, use
    AskQuestion
    . If either tool is in your allowed-tools list, you must use it for all enumerable decisions in this skill — app pick, duplicate-name pick, enum/default branches, media source, optional-input skip/provide, upload recovery — unless overflow forces a numbered text table for that batch only (see Interactive selection). Never default to a numbered text menu while
    AskUserQuestion
    /
    AskQuestion
    is available and the option count fits. A user declining one such call is not grounds to stop using it for the next decision — see Interactive selection's opening rule for how to read the decline message.
执行初始化作为静默防护措施,而非面向用户的阶段。
  1. 每个AI会话最多执行一次。如果当前AI会话中已有
    cawcut
    命令执行成功,则跳过所有初始化检查并继续。
  2. 仅使用一个明确的检查命令
    cawcut upgrade check --json
    • 不得同时运行
      cawcut --version
      command -v cawcut
      cawcut auth status
    • 如果返回
      "update_available": true
      通过Bash自行执行
      cawcut upgrade
      (无需让用户手动输入)。此操作会更新CLI和技能。执行成功后,从步骤1继续本技能——无需停止或让用户重新调用。
    • 如果返回
      "ahead_of_registry": true
      ,无需升级直接继续。不得要求用户降级或执行
      cawcut upgrade
    • 如果检查失败是因为缺少
      cawcut
      ,请用户通过npm安装CLI(外部用户——不得使用git克隆或仓库的
      ./setup
      脚本):
      bash
      npm install -g @ubnt/cawcut
      安装成功后,继续初始化;身份认证将在下方步骤4中处理。
    • 对于其他检查失败情况,继续执行即可,仅当后续CLI命令失败时再提及警告信息。
  3. 初始化完成后,不得显示“初始化检查通过”或询问“你想运行什么?”。直接进入下方的应用发现环节。
  4. 让第一个实际命令(
    cawcut app list --schema
    cawcut app describe
    cawcut app run
    )验证身份。如果命令因令牌/身份认证错误失败(包括
    Token expired
    ),通过Bash自行执行
    cawcut auth login
    ——无需让用户手动输入。简要告知用户将打开一个浏览器标签页进行OAuth授权;等待登录完成后,重试一次失败的命令。仅当登录失败(被拒绝、超时、端口冲突)时再告知用户。
  5. 本技能的参考文档(
    references/troubleshooting.md
    references/app-inputs.md
    references/intent-matching.md
    references/app-presentation.md
    )位于本技能正文顶部显示的基础目录下——直接读取
    <base_dir>/references/<file>.md
    。不得使用
    find
    /
    grep
    来定位这些文件;该基础目录可能是符号链接,普通的
    find <dir>
    命令可能无法遍历。
  6. 结构化用户询问工具(每个会话都需检查)。在Claude Code中,对于所有可枚举的选择,使用**
    AskUserQuestion
    工具。在Cursor中,使用
    AskQuestion
    工具。如果你的允许工具列表中有上述任一工具,则在本技能中所有可枚举的决策(应用选择、重名应用选择、枚举/默认分支、媒体源、可选输入跳过/提供、上传恢复)都必须**使用该工具——除非选项数量过多导致只能使用编号文本表格(参见交互式选择)。
    AskUserQuestion
    /
    AskQuestion
    可用且选项数量符合要求时,绝不能默认使用编号文本菜单
    。用户拒绝一次此类调用并不意味着后续决策可以停止使用该工具——请参阅交互式选择的开篇规则了解如何解读拒绝信息。

Catalog freshness (mandatory)

目录新鲜度(强制要求)

Source of truth: only the output of a
cawcut app list …
command you run in this user message's turn for the current subject/goal. Never treat app names, IDs, counts, or JSON from earlier messages as authoritative — conversation memory is not a catalog. A "no App match" conclusion from a prior user message is never reusable.
Per-user-message rule (highest priority): On every new user message, before writing any reply or calling any other tool, run
cawcut app list --json
first — this is a mechanical step, not a judgment call; do not reason about whether the message "could involve" App discovery, matching, browsing,
cawcut app run
, or routing to
cawcut-generate
before running it. The catalog may have changed on the server since the last message (e.g. the user published a new App on the web).
Also re-run Step 1 when any of these is true:
  • User's tool call (
    AskUserQuestion
    /
    AskQuestion
    / menu) was rejected or interrupted and their next message changes subject, goal, or target App — treat exactly like a new user message and restart from Step 1, even as a "follow-up" in the same exchange (including mid-input-collection)
  • Discovery / browse / "what apps" / proactive catalog presentation (if not already covered by the per-user-message rule above)
  • Intent scoring or app-picker menus needed for the current goal
  • Resolving an app ID after the user picks by name (run fresh
    cawcut app list --json
    in this turn)
  • "App not found" recovery
  • User switched account, re-logged in, or
    cawcut auth login
    just succeeded
  • User says they published, shared, or created a new App
  • User asks to refresh or re-list Apps
  • A prior list was scoped (e.g. Official-only) but the user now asks for My Apps or Shared Apps
  • app describe
    /
    app run
    returns not-found or access errors
Skip Step 1 catalog scoring only when all are true (same user message's turn, same subject/goal):
  • You already ran
    cawcut app list --json
    for this user message and completed catalog scoring or confirmed no match
  • The App is already decided for the current subject/goal in this user message (user pick, strong auto-match ≥70 for this goal, or Step -1 handoff from
    cawcut-generate
    for this App name)
  • You are proceeding to
    describe
    + input collection for that named App only, or resolving its ID via a fresh
    cawcut app list --json
    run in this turn before
    run
  • You are not presenting an app-picker menu again without a new user message
  • The user's subject/goal has not changed within this user message (including after a rejected/interrupted tool call)
Never skip the per-user-message
app list
across user messages — even if subject, capability, and wording are unchanged.
Hard gate: Workflow §3 (Run with inputs) runs a pre-flight check immediately before
cawcut app run
— see there.
唯一可信来源:仅使用你在当前用户消息轮次中针对当前主题/目标运行
cawcut app list …
命令的输出结果。绝不能将之前消息中的应用名称、ID、数量或JSON视为权威信息——对话记忆不能作为目录使用。之前用户消息得出的“无匹配应用”结论绝不能重复使用
每条用户消息规则(最高优先级):在每条新用户消息到来时,在编写任何回复或调用任何其他工具之前,必须先运行
cawcut app list --json
——这是机械步骤,无需判断;无需先判断消息是否“可能涉及”应用发现、匹配、浏览、
cawcut app run
或路由到
cawcut-generate
,直接运行即可。自上次消息以来,服务器上的目录可能已发生变化(例如用户在网页端发布了新应用)。
当以下任一情况发生时,需重新执行步骤1
  • 用户的工具调用(
    AskUserQuestion
    /
    AskQuestion
    / 菜单)被拒绝或中断,且用户下一条消息更改了主题、目标或目标应用——完全视为新用户消息,从步骤1重新开始,即使是同一对话中的“跟进”消息(包括输入收集过程中)
  • 应用发现/浏览/“有哪些应用”/主动展示目录(如果未被上述每条用户消息规则覆盖)
  • 当前目标需要进行意图评分或应用选择菜单
  • 用户按名称选择应用后解析应用ID(在当前轮次中重新运行
    cawcut app list --json
  • “应用未找到”恢复操作
  • 用户切换账户、重新登录或
    cawcut auth login
    刚执行成功
  • 用户表示已发布、共享或创建了新应用
  • 用户要求刷新或重新列出应用
  • 之前的列表是限定范围的(例如仅官方应用),但用户现在询问“我的应用”或“共享应用”
  • app describe
    /
    app run
    返回未找到或访问错误
仅当以下所有条件都满足时,才可跳过步骤1的目录评分(同一用户消息轮次,同一主题/目标):
  • 你已针对当前用户消息运行
    cawcut app list --json
    ,并完成了目录评分或确认无匹配应用
  • 针对当前用户消息当前主题/目标,应用已确定(用户选择、针对当前目标的自动匹配评分≥70,或步骤-1中从
    cawcut-generate
    转交的该应用名称)
  • 你正针对该指定应用执行
    describe
    + 输入收集,或在执行
    run
    前通过当前轮次中重新运行
    cawcut app list --json
    解析其ID
  • 不会在未收到新用户消息的情况下再次展示应用选择菜单
  • 用户的主题/目标在当前用户消息内未发生变化(包括工具调用被拒绝/中断后)
绝不能跳过跨用户消息的
app list
命令——即使主题、功能和表述完全相同。
硬性要求:工作流第3节(带输入运行)会在
cawcut app run
之前立即执行预检——详见该部分。

Step 1 — Intent triage (before fetching the catalog)

步骤1 — 意图分类(获取目录前)

Every non-handoff invocation starts here. Apply the Per-user-message rule and Skip Step 1 checklists in Catalog freshness above before catalog scoring below — if you have not yet run
cawcut app list --json
for this user message, fetch the live catalog and score; do not reuse a prior message's list, selected App, or "no match" conclusion.
Official capabilities fast path — recognize a simple single-step official generation ask (no App needed) from the user's language:
Implied
--capability
User may say
text-to-image
text to image, text-to-image, generate an image, make an image
text-to-video
text to video, text-to-video, make a video
image-to-image
image to image, image-to-image, edit/stylize/remix this image
image-to-video
image to video, image-to-video, animate this photo
omni-to-video
omni to video, omni-to-video
After the mandatory per-user-message
cawcut app list --json
(Catalog freshness above) finds no plausible App match, if the request names/implies one of these and has no template/campaign/marketplace/multi-input/named-App cue, hand off directly to
cawcut-generate
with the implied
--capability
. Otherwise (ambiguous, or the language suggests a branded/template/multi-step workflow), continue to catalog scoring below.
Discovery vs run — if the user is asking what an App does, what it generates, what inputs it needs, or wants to browse the catalog, set
intent = discovery
(see
references/app-presentation.md
). Do not treat these as run requests until the user confirms.
Catalog scoring — for everything else, fetch the live catalog (Step below) and apply the rubric in
references/intent-matching.md
:
OutcomeAction
Discovery intentPresent per
references/app-presentation.md
; stop unless the user asks to run
Strong match (score ≥ 70)Treat as selected —
describe
+ tables + input menu
Weak/tied matches (40–69, or top two within 15 points)Always call
AskUserQuestion
/
AskQuestion
with top 2–4 Apps + "Official generation instead". Numbered text only if the tool is unavailable or overflow applies
No match (all < 40, catalog empty)Hand off to
cawcut-generate
with the implied
--capability
if any
Once you hand off to
cawcut-generate
, treat that as final for this turn — do not re-check the catalog again in the same turn. A new user message (new turn) always re-runs catalog freshness rules above, even if the topic sounds related.
所有非转交的调用都从此处开始。在进行下方的目录评分之前,先应用目录新鲜度中的“每条用户消息规则”和“跳过步骤1”检查清单——如果尚未针对当前用户消息运行
cawcut app list --json
,则获取实时目录并进行评分;不得重复使用之前消息的列表、选定的应用或“无匹配”结论。
官方功能快速通道——从用户的表述中识别简单的单步官方生成请求(无需应用):
隐含的
--capability
用户可能的表述
text-to-image
文本转图像、text-to-image、生成一张图片、制作一张图片
text-to-video
文本转视频、text-to-video、制作一个视频
image-to-image
图像转图像、image-to-image、编辑/风格化/remix这张图片
image-to-video
图像转视频、image-to-video、让这张照片动起来
omni-to-video
全格式转视频、omni-to-video
在执行强制的每条用户消息
cawcut app list --json
(见上方目录新鲜度)后,若未找到合理的应用匹配,且请求明确指向/隐含上述功能之一无模板/营销活动/市场/多输入/指定应用的提示,则直接将任务转交给**
cawcut-generate
**并传入隐含的
--capability
参数。否则(表述模糊,或语言表明是品牌化/模板/多步骤工作流),继续进行下方的目录评分。
发现与运行——如果用户询问应用的功能、生成内容、所需输入,或想要浏览目录,则设置
intent = discovery
(参见
references/app-presentation.md
)。在用户确认之前,不得将这些请求视为运行请求。
目录评分——对于其他所有情况,获取实时目录(见下方步骤)并应用
references/intent-matching.md
中的评分标准:
结果操作
发现意图按照
references/app-presentation.md
展示内容;除非用户要求运行,否则停止操作
强匹配(评分≥70)视为已选定——执行
describe
+ 表格 + 输入菜单
弱匹配/平局(40–69,或前两名评分差≤15)必须调用
AskUserQuestion
/
AskQuestion
工具,提供排名前2–4的应用 + “改用官方生成”选项。仅当工具不可用或选项数量过多时才使用编号文本
无匹配(所有评分<40,目录为空)如果有隐含的
--capability
,则将任务转交给**
cawcut-generate
**
一旦将任务转交给
cawcut-generate
,则视为当前轮次的最终操作——不得在同一轮次中再次检查目录。新用户消息(新轮次)始终需重新执行上述目录新鲜度规则,即使主题看似相关。

App categories (image / video)

应用分类(图像/视频)

Each App in
app list --json
includes
categories
derived from publish metadata (
image
,
video
,
text
,
audio
). Use them to group and filter Apps by output type:
CategoryCLI filterWhen to use
image
--category image
sticker, photo edit, marketplace card, still creative
video
--category video
ads, motion, animate, product video, presenter
Discovery layout (required for bare invoke / browse):
  1. Image Apps — Apps with
    categories
    containing
    image
  2. Video Apps — Apps with
    categories
    containing
    video
Within each section, keep the existing Official Apps / My Apps / Shared Apps source grouping from CLI output. When the user's goal is clearly image-only or video-only, fetch with
--category
to reduce noise.
bash
cawcut app list --schema              # grouped by category + source
cawcut app list --schema --category image
cawcut app list --schema --category video
cawcut app list --schema --json       # includes categories[] per app
app list --json
返回的每个应用都包含
categories
字段,该字段源自发布元数据(
image
video
text
audio
)。使用该字段按输出类型对应用进行分组和筛选:
分类CLI筛选参数使用场景
image
--category image
贴纸、照片编辑、市场卡片、静态创意内容
video
--category video
广告、动态效果、动画、产品视频、演示视频
发现布局(裸调用/浏览时必填)
  1. 图像应用——
    categories
    包含
    image
    的应用
  2. 视频应用——
    categories
    包含
    video
    的应用
在每个分类中,保留CLI输出中现有的官方应用/我的应用/共享应用来源分组。当用户目标明确为仅图像或仅视频时,使用
--category
参数筛选以减少干扰。
bash
cawcut app list --schema              # 按分类+来源分组
cawcut app list --schema --category image
cawcut app list --schema --category video
cawcut app list --schema --json       # 每个应用包含categories[]字段

Interactive selection (mandatory — tool first)

交互式选择(强制要求——优先使用工具)

If the user just declined an
AskUserQuestion
/
AskQuestion
call:
the tool result carries harness boilerplate telling you to "STOP what you are doing and wait for the user to tell you how to proceed." That sentence is attached automatically to every declined tool call by the runtime — it is not the user speaking, and it is not an instruction to stop using the tool. Read it as: stop the one specific action you were mid-way through (don't retry the identical question, don't proceed to
run
on unconfirmed choices) and look at what the user's actual next message says. It does not, by itself, license falling back to numbered text for the next enumerable decision — that next decision still must open with the tool, exactly as if the rejection had never happened. Only an explicit plain-text request from the user ("stop popping up menus", "just ask me in text") licenses a session-wide fallback. The STOP wording's urgency is not evidence of that request — do not let it override this rule.
Default behavior: For every enumerable choice, always call
AskUserQuestion
(Claude Code) or
AskQuestion
(Cursor) before showing a numbered text menu or asking the user to type
1
,
2
, or an app name. Text-only menus are fallback only.
Tool names by host:
HostTool name
Claude Code
AskUserQuestion
Cursor
AskQuestion
Below, structured user-ask tool means whichever of these is available in the current session. Do not guess from capability alone — check your allowed-tools list.
Session checklist (before the first menu in this turn):
  1. Is
    AskUserQuestion
    or
    AskQuestion
    available? If yes, you must use it for every row in the table below that fits in one call.
  2. If no tool exists (CLI-only host), use numbered text in
    reply_language
    .
  3. If the tool exists but the candidate count exceeds one call (App-picker overflow, rule 7), use a numbered text table for that batch only; then resume
    AskUserQuestion
    /
    AskQuestion
    for the next small decision.
Forbidden while the tool is available: numbered text menus (
1. … 2. …
), "reply with the number or name", or asking the user to type app names, input keys, or enum values from memory.
StepAlways use structured user-ask tool for
App pickerEvery app from
app list --schema
(label = name + credits + short description; no app IDs) — see App-picker overflow (rule 7) when the candidate count exceeds what the tool can hold
Duplicate nameEach matching copy (label = description + source; no app IDs)
Enum / default textEach allowed value + "Use default" / "Custom" when applicable
Media input
Photo already in chat
/
Paste HTTPS URL
/
Local file path
Optional input
Skip
/
Provide
Structured user-ask tool rules:
  1. Call before waiting for a free-text reply whenever options are enumerable.
  2. One decision per form when possible (e.g.
    pick-app
    , then
    scene-photo-source
    ).
  3. Option
    label
    is what the user reads; keep
    id
    short and stable (
    photo-sticker
    ,
    3d-model-zh
    ,
    3d-model-en
    ).
  4. Do not put app IDs in labels. After the user picks, run a fresh
    cawcut app list --json
    in this turn, then resolve ID from that output only.
  5. If the user picks Custom / Local file path / Paste URL, then ask one follow-up for that content (text or path) — still do not ask them to type input KEY names.
  6. Fallback only: Use numbered text menus in
    reply_language
    only when
    AskUserQuestion
    /
    AskQuestion
    is unavailable, or when option count/structure exceeds what the tool supports for that batch. Falling back for one decision does not exempt the next small decision — re-check and use the tool again when it fits. UX rule 11's combined text block is fallback shape only — not the default when the tool is present.
  7. App-picker overflow: the tool typically caps at ~2–4 options per question (and ~4 questions per call). When the candidate list from
    app list --schema
    exceeds that, present the batch as a numbered text table for browsing — a leading
    #
    index column, then name, source, credits, description — and tell the user they can reply with either the number or the app name. This text fallback covers only that oversized batch. Once the user narrows to a specific App, every later small-option-count decision (duplicate-copy pick, enum values, media source, optional-input skip/provide) must go through
    AskUserQuestion
    /
    AskQuestion
    again — same pattern as
    cawcut-generate
    's Phase A Choice 2 model-list overflow and Phase B axis batching (its rule for >4 cost/visual-impacting axes).
如果用户刚拒绝了
AskUserQuestion
/
AskQuestion
调用
:工具结果会包含运行时自动添加的 boilerplate 文本,提示你“STOP what you are doing and wait for the user to tell you how to proceed.”。这句话是运行时自动附加到每一次被拒绝的工具调用中的——并非用户的表述,也不是停止使用该工具的指令。应将其解读为:停止你正在进行的某一项具体操作(不要重试相同的问题,不要在未确认选择的情况下继续执行
run
),查看用户实际的下一条消息内容。这绝不意味着后续的可枚举决策可以默认使用编号文本——下一次决策仍必须优先使用工具,就像从未发生过拒绝一样。只有当用户明确以纯文本形式要求(如“停止弹出菜单”、“只用文本问我”)时,才允许在整个会话中回退到文本菜单。STOP文本的紧急性不能作为用户有此要求的证据——不得让其覆盖本规则。
默认行为:对于所有可枚举的选择,必须先调用
AskUserQuestion
(Claude Code)或
AskQuestion
(Cursor)展示编号文本菜单或要求用户输入
1
2
或应用名称。纯文本菜单仅作为回退选项
各平台对应的工具名称
平台工具名称
Claude Code
AskUserQuestion
Cursor
AskQuestion
下文提到的结构化用户询问工具指当前会话中可用的上述任一工具。不得仅凭功能猜测——请查看你的允许工具列表。
会话检查清单(当前轮次第一个菜单之前)
  1. AskUserQuestion
    AskQuestion
    是否可用?如果,则下表中所有适用的决策都必须使用该工具。
  2. 如果可用工具(仅CLI平台),则使用
    reply_language
    对应的编号文本。
  3. 如果工具可用但候选选项数量超过单次调用上限(应用选择溢出,规则7),则仅对该批次使用编号文本表格;然后恢复对后续小决策使用
    AskUserQuestion
    /
    AskQuestion
工具可用时禁止的操作:编号文本菜单(
1. … 2. …
)、“回复编号或名称”、要求用户凭记忆输入应用名称、输入键、枚举值。
步骤必须使用结构化用户询问工具的场景
应用选择器
app list --schema
返回的所有应用(标签=名称+积分+简短描述;不得包含应用ID)——当候选数量超过工具承载上限时,参见应用选择溢出(规则7)
重名应用选择每个匹配的副本(标签=描述+来源;不得包含应用ID
枚举/默认文本每个允许的值 + “使用默认值”/“自定义”(如适用)
媒体输入
聊天中已有的照片
/
粘贴HTTPS URL
/
本地文件路径
可选输入
跳过
/
提供
结构化用户询问工具规则
  1. 当选项可枚举时,必须在等待自由文本回复之前调用该工具。
  2. 尽可能每次调用处理一个决策(例如先
    pick-app
    ,再
    scene-photo-source
    )。
  3. 选项的
    label
    是用户看到的内容;
    id
    需简短且稳定(如
    photo-sticker
    3d-model-zh
    3d-model-en
    )。
  4. 不得在标签中包含应用ID。用户选择后,在当前轮次中重新运行
    cawcut app list --json
    ,仅从该输出结果中解析ID。
  5. 如果用户选择自定义 / 本地文件路径 / 粘贴URL针对该内容进行一次跟进询问(文本或路径)——仍不得要求用户输入输入键名称。
  6. 仅作为回退:仅当
    AskUserQuestion
    /
    AskQuestion
    不可用,或选项数量/结构超出该工具对该批次的支持范围时,才使用
    reply_language
    对应的编号文本菜单。某一次决策回退到文本菜单并不免除后续小决策使用工具的要求——重新检查并在适用时再次使用工具。UX规则11中的组合文本块仅为回退形式——并非工具可用时的默认形式。
  7. 应用选择溢出:工具通常单次调用最多支持约2–4个选项(每次调用最多约4个问题)。当
    app list --schema
    返回的候选列表超过该上限时,将该批次以编号文本表格形式展示供用户浏览——包含前导
    #
    索引列,然后是名称、来源、积分、描述,并告知用户可以回复编号或应用名称。这种文本回退仅适用于该超大批次。一旦用户缩小到特定应用,后续所有小选项数量的决策(重名副本选择、枚举值、媒体源、可选输入跳过/提供)必须再次使用
    AskUserQuestion
    /
    AskQuestion
    ——与
    cawcut-generate
    的阶段A选择2模型列表溢出和阶段B轴分批(其规则针对>4个影响成本/视觉效果的轴)模式相同。

UX Rules

用户体验规则

  1. Choice-first — if the user did not name an App, start with
    cawcut app list --schema
    , then always call
    AskUserQuestion
    /
    AskQuestion
    for app selection when the candidate count fits (numbered text only for App-picker overflow, rule 7). Do not show app IDs — use name, source, credits, description, and input summary only.
  2. Template first — apply Step 1 (Intent triage): score the live catalog per
    references/intent-matching.md
    and recommend a strong match first. Fall back to
    cawcut-generate
    only per Step 1's outcomes (no match, catalog empty, or a clear official-capability fast path).
  3. Disclose app on selection (required) — whenever an App is chosen — user pick, auto-match from a natural-language request, or your single recommendation — before asking for inputs:
    1. Run
      cawcut app describe "<app name>"
      (disambiguate first if needed).
    2. Present the App metadata table + inputs table (see "Present app inputs to users") in
      reply_language
      .
    3. Lead with the App name and description in prose — never say only "this app" without naming it.
    4. Then show the input collection menu (UX rules 11–12). Forbidden: vague lines like "this app can help you…" with no name, source, function, or input summary; jumping straight to "please provide the video path" without explaining which App and what it needs.
  4. Natural-language requests are allowed — translate the user's goal into an App recommendation using the Step 1 scoring rubric (
    references/intent-matching.md
    ) against app name, description, source, credits, and exposed input requirements. When one App scores ≥ 70, treat it as selected — run
    describe
    and disclose full app details immediately; do not wait for the user to ask "what app?".
  5. Reply language:
    • Bare skill invoke → English. If the user only runs the skill command with no substantive text (e.g.
      /cawcut-app-run
      ,
      cawcut-app-run
      , or the skill name alone), set
      reply_language
      to English for menus, summaries, and questions.
    • Follow the conversation after that. Once the user adds a real request or follow-up in another language, switch
      reply_language
      to match that language for the rest of the session (unless they explicitly ask for English).
    • All prose, status summaries, option labels, questions, and recovery guidance use
      reply_language
      .
    • Keep CLI commands/flags, model IDs, input keys, JSON keys, URLs, and raw error codes in English. App IDs are internal — resolve them from a fresh
      cawcut app list --json
      run in this turn when needed; never surface IDs in user-facing App lists.
    • Do not paste raw English CLI output as the user-facing answer; summarize it in
      reply_language
      .
  6. Proactive discovery — after bootstrap, do not wait for the user to ask for a list. If no App name was supplied, immediately run
    cawcut app list --schema
    , summarize Apps grouped by Image Apps and Video Apps (no IDs), and ask the user to choose an App or describe their goal freely.
  7. Always inspect inputs before running — call
    cawcut app describe "<app name>"
    first (or
    cawcut app describe <app_id>
    when resolving from
    --json
    ).
  8. Disambiguate duplicate names before run — if the name matches multiple Apps, always call
    AskUserQuestion
    /
    AskQuestion
    with one option per copy (description + source + input summary in labels) when the copy count fits. Wait for the click/choice before run. Numbered-text CLI fallback only when the tool is unavailable:
    cawcut app run "<name>" --pick <n>
    .
  9. Choice-first for every fixed or enumerable value — same bar as
    cawcut-generate
    . Never ask the user to type app names, input keys, enum values, or flags from memory. After
    describe
    , if a field has a default,
    options
    , or a small known set, always call
    AskUserQuestion
    /
    AskQuestion
    (plus "use default" when applicable). Only ask for open-ended content when the schema is genuinely free text with no default and the user has not already provided it. Never default to numbered text for small enumerable decisions while the tool is available.
  10. No unbounded input questions — forbidden patterns:
  • "What app do you want to run?"
  • "Please provide values for the required inputs."
  • "Paste the value for
    Input - Scene Photo
    ." Instead, always show concrete numbered choices derived from
    app list --schema
    /
    app describe
    .
  1. Input collection menu before run — after
    describe
    , collect input choices before run. Precedence: always decompose into
    AskUserQuestion
    /
    AskQuestion
    calls when the tool is present — one call for the "how to fill inputs" overview (defaults vs. custom) when there is more than one field, then one call per field needing a decision (media source A/B/C, text starter-vs-custom, enum value list). The combined text block below is fallback rendering only — use it only when
    AskUserQuestion
    /
    AskQuestion
    is unavailable, or when sub-choice count exceeds what the tool can hold (App-picker overflow, Interactive selection rule 7). Do not merge decomposed decisions into a single numbered text menu while the tool is available.
Fallback example (English) — when
AskUserQuestion
/
AskQuestion
is unavailable or overflow applies:
Ready to run Photo to Sticker. Choose how to fill inputs:
1. Use defaults only (if any exist) and run — list which fields use defaults
2. Scene photo — pick one:
   A. Use a photo you already shared in this chat (I'll use that file/URL)
   B. Paste an HTTPS image URL
   C. Give a local file path (e.g. ~/Pictures/photo.jpg)
3. Text fields (only when required and no default) — pick a starter or write custom:
   A. Use suggested prompt: "..."
   B. Custom (you describe; one short message)
4. Run now with choices above
When
AskUserQuestion
/
AskQuestion
is available (required path)
— same Photo to Sticker scenario, decomposed (one decision per call; labels in
reply_language
):
  1. Scene photo source
    AskUserQuestion
    /
    AskQuestion
    with options:
    • Photo already in chat
      — Use a photo you already shared in this chat
    • Paste HTTPS URL
      — Paste an HTTPS image URL
    • Local file path
      — Give a local file path (e.g. ~/Pictures/photo.jpg)
  2. Text field (if required and no default) —
    AskUserQuestion
    /
    AskQuestion
    with options:
    • Use default
      /
      Use suggested prompt
      — show the default or suggested value
    • Custom
      — then ask one follow-up for the user's text (rule 5 above)
Adapt items to the live schema — omit decisions for inputs that do not exist. Never show input KEY names as something the user must type; keys are for CLI only. 12. Per input kind — menu, not free-form parameter entryalways present each row's choices via
AskUserQuestion
/
AskQuestion
per Interactive selection (above). The numbered menus below are text fallback shape only. | Kind | User-facing menu (never ask for KEY names) | |------|---------------------------------------------| |
text
+ default | 1) Use default (show value) 2) Custom text | |
text
+ no default | 1) Suggest 2–3 starters from app description 2) Custom (user writes content once) | |
text
+ enum/options in schema | Number every allowed option from
describe --json
; add "other" only if schema allows | |
image
/
video
/
audio
| 1) File already in chat 2) HTTPS URL 3) Local path — user picks A/B/C, not a raw
--input
key | | optional input | 1) Skip 2) Provide (then show sub-menu for that kind) | 13. Map chosen menu options to
--input key=value
yourself using the KEY column from
describe
. The user selects options, not parameter names. 14. For media inputs: pass an HTTPS URL or a local path prefixed with
@
after the user picks a menu branch. 15. Never use illustrative media examples as actual inputs. For
image
/
video
/
audio
inputs, any sample URL, path, or asset from
describe
output (
sample:
,
x-cawcut-sample-url
), SKILL.md,
references/
, or other docs is hint only — not a usable resource. Do not pass them to
--input
unless the user explicitly provided that exact file or URL in this conversation. If required media is missing, show the media sub-menu (rule 12) and wait — do not run with fabricated or placeholder examples; do not ask for a bare URL/path without choices. 16. Pass
--wait
so long jobs block until completion; relay all result URLs. 17. Always pass
--download
when the result is an image, video, or audio file. The CLI resolves the platform-appropriate downloads folder automatically (
~/Downloads
on macOS/Linux,
%USERPROFILE%\Downloads
on Windows) — do not hardcode a path or download the result yourself. Only skip
--download
if the user explicitly says they only want the URL. 18. Do not guess key names — they vary per app. Always derive from describe output (agent-side only; never expose key spelling work to the user). 19. Understand app sources before selecting an app:
  • Official Apps
    : curated apps owned by the CawCut official account.
  • My Apps
    : apps owned by the authenticated user.
  • Shared Apps
    : apps another user shared with the authenticated user. If the user asks for "official" or "shared", pick only from that section of
    cawcut app list
    .
  1. Don't pre-inspect local media before attempting the run — do not shell out to
    ls
    /
    file
    /
    sips -g pixelWidth/pixelHeight
    (or similar) to check a local file's size or dimensions before running. Attempt
    cawcut app run
    directly; if upload pre-flight fails, the CLI's error already reports the exact size/dimension and its limit — act on that error (see Errors below), not on a manual inspection you ran first.
  1. 优先选择——如果用户未指定应用名称,先运行
    cawcut app list --schema
    ,然后必须在候选数量符合要求时调用
    AskUserQuestion
    /
    AskQuestion
    进行应用选择(仅当应用选择溢出时使用编号文本,规则7)。不得展示应用ID——仅使用名称、来源、积分、描述和输入摘要。
  2. 优先模板——应用步骤1(意图分类):根据
    references/intent-matching.md
    对实时目录进行评分,并优先推荐强匹配应用。仅当步骤1的结果为无匹配、目录为空或明确符合官方功能快速通道时,才回退到
    cawcut-generate
  3. 选择应用后必须披露信息——无论应用是用户选择的、自然语言请求自动匹配的,还是你推荐的单一应用,询问输入之前:
    1. 运行
      cawcut app describe "<app name>"
      (如有需要先消歧义)。
    2. reply_language
      展示应用元数据表 + 输入表(参见“向用户展示应用输入”)。
    3. 首先以文本形式展示应用名称描述——绝不能只说“这个应用可以…”而不提及名称。
    4. 然后展示输入收集菜单(UX规则11–12)。 禁止:模糊表述如“这个应用可以帮你…”而不提及名称、来源、功能或输入摘要;直接跳转到“请提供视频路径”而不说明是哪个应用以及需要什么。
  4. 支持自然语言请求——使用步骤1的评分标准(
    references/intent-matching.md
    ),根据应用名称、描述、来源、积分和公开的输入要求,将用户的目标转化为应用推荐。当某个应用评分≥70时,视为已选定——立即运行
    describe
    并披露完整的应用详情;无需等待用户询问“用哪个应用?”。
  5. 回复语言
    • 裸技能调用→英文。如果用户仅运行技能命令而无实质性文本(例如
      /cawcut-app-run
      cawcut-app-run
      或仅技能名称),则将
      reply_language
      设置为英文,用于菜单、摘要和问题。
    • 后续跟随对话语言。一旦用户用其他语言添加了实际请求或跟进内容,则将
      reply_language
      切换为该语言,并在整个会话中保持(除非用户明确要求使用英文)。
    • 所有文本、状态摘要、选项标签、问题和恢复指导均使用
      reply_language
    • CLI命令/标志、模型ID、输入键、JSON键、URL和原始错误代码保持英文。应用ID为内部使用——需要时在当前轮次中重新运行
      cawcut app list --json
      解析ID;绝不在面向用户的应用列表中展示ID。
    • 不得将原始英文CLI输出直接作为面向用户的回复;需以
      reply_language
      进行总结。
  6. 主动发现——初始化完成后,无需等待用户询问列表。如果未提供应用名称,立即运行
    cawcut app list --schema
    ,按图像应用视频应用分组总结应用(不包含ID),并请用户选择应用或自由描述其目标。
  7. 运行前必须检查输入——先调用
    cawcut app describe "<app name>"
    (或从
    --json
    解析ID时使用
    cawcut app describe <app_id>
    )。
  8. 运行前必须消歧义重名应用——如果名称匹配多个应用,必须在副本数量符合要求时调用
    AskUserQuestion
    /
    AskQuestion
    ,为每个副本提供一个选项(标签包含描述+来源+输入摘要)。等待用户点击/选择后再运行。仅当工具不可用时,才回退到编号文本CLI:
    cawcut app run "<name>" --pick <n>
  9. 所有固定或可枚举值优先选择——与
    cawcut-generate
    要求相同。绝不能要求用户凭记忆输入应用名称、输入、枚举值或标志。执行
    describe
    后,如果字段有默认值、
    options
    或已知的小范围值,必须调用
    AskUserQuestion
    /
    AskQuestion
    (如适用,添加“使用默认值”选项)。仅当架构确实是无默认值的自由文本且用户尚未提供内容时,才询问开放式内容工具可用时,绝不能默认使用编号文本处理小范围可枚举决策
  10. 禁止无限制输入问题——禁止以下模式:
    • “你想运行哪个应用?”
    • “请提供所需输入的值。”
    • “粘贴
      Input - Scene Photo
      的值。” 相反,始终展示从
      app list --schema
      /
      app describe
      衍生的具体编号选项。
  11. 运行前的输入收集菜单——执行
    describe
    后,先收集输入选择再运行。优先级:工具可用时,必须分解为
    AskUserQuestion
    /
    AskQuestion
    调用——当有多个字段时,先调用一次“如何填写输入”概述(默认值vs自定义),然后针对每个需要决策的字段调用一次(媒体源A/B/C、文本模板vs自定义、枚举值列表)。下方的组合文本块仅为回退渲染形式——仅当
    AskUserQuestion
    /
    AskQuestion
    不可用,或子选项数量超出工具承载范围(应用选择溢出,交互式选择规则7)时才使用。工具可用时,不得将分解后的决策合并为单一编号文本菜单。
回退示例(英文)——当
AskUserQuestion
/
AskQuestion
不可用或选项溢出时:
准备运行照片转贴纸。选择输入填写方式:
1. 仅使用默认值(如有)并运行——列出使用默认值的字段
2. 场景照片——选择一项:
   A. 使用你已在聊天中分享的照片(我将使用该文件/URL)
   B. 粘贴HTTPS图片URL
   C. 提供本地文件路径(例如~/Pictures/photo.jpg)
3. 文本字段(仅当必填且无默认值时)——选择模板或自定义:
   A. 使用建议提示词:"..."
   B. 自定义(你描述;一条简短消息)
4. 根据上述选择立即运行
工具可用时的必填流程——同样的照片转贴纸场景,分解为多次调用(每次调用处理一个决策;标签使用
reply_language
):
  1. 场景照片来源——调用
    AskUserQuestion
    /
    AskQuestion
    ,选项:
    • 聊天中已有的照片
      — 使用你已在聊天中分享的照片
    • 粘贴HTTPS URL
      — 粘贴HTTPS图片URL
    • 本地文件路径
      — 提供本地文件路径(例如~/Pictures/photo.jpg)
  2. 文本字段(如果必填且无默认值)——调用
    AskUserQuestion
    /
    AskQuestion
    ,选项:
    • 使用默认值
      /
      使用建议提示词
      — 展示默认值或建议值
    • 自定义
      — 然后对用户的文本进行一次跟进询问(上述规则5)
根据实时架构调整内容——省略不存在的输入对应的决策。绝不能将输入键名称展示为用户必须输入的内容;键仅用于CLI。 12. 按输入类型提供菜单,而非自由形式参数输入——必须始终通过
AskUserQuestion
/
AskQuestion
展示每个输入行的选项,遵循交互式选择(上文)。下方的编号菜单仅为文本回退形式。 | 类型 | 面向用户的菜单(绝不能询问键名称) | |------|---------------------------------------------| |
text
+ 默认值 | 1) 使用默认值(展示值) 2) 自定义文本 | |
text
+ 无默认值 | 1) 从应用描述中提供2–3个模板 2) 自定义(用户一次输入内容) | |
text
+ 架构中的枚举/选项 | 列出
describe --json
中的所有允许选项;仅当架构允许时添加“其他” | |
image
/
video
/
audio
| 1) 聊天中已有的文件 2) HTTPS URL 3) 本地路径 — 用户选择A/B/C,而非原始
--input
键 | | 可选输入 | 1) 跳过 2) 提供(然后展示该类型的子菜单) | 13. 使用
describe
输出中的KEY列,自行将用户选择的菜单选项映射为
--input key=value
。用户选择的是选项,而非参数名称。 14. 对于媒体输入:用户选择菜单分支后,传递HTTPS URL或前缀为
@
的本地路径。 15. 绝不能将示例媒体作为实际输入使用。对于
image
/
video
/
audio
输入,
describe
输出(
sample:
x-cawcut-sample-url
)、SKILL.md、
references/
或其他文档中的任何示例URL、路径或资产仅为提示——不可用作可用资源。除非用户在本次对话中明确提供了该 exact 文件或URL,否则不得将其传递给
--input
。如果缺少必填媒体,展示媒体子菜单(规则12)并等待——不得使用虚构或占位符示例运行;不得在无选项的情况下要求用户提供裸URL/路径。 16. 传递
--wait
参数,使长时间运行的任务阻塞直到完成; relay所有结果URL。 17. 当结果为图像、视频或音频文件时,始终传递
--download
参数。CLI会自动解析适合平台的下载文件夹(macOS/Linux为
~/Downloads
,Windows为
%USERPROFILE%\\Downloads
)——不得硬编码路径或自行下载结果。仅当用户明确表示只需要URL时才跳过
--download
。 18. 不得猜测键名称——每个应用的键名称可能不同。始终从
describe
输出中获取(仅在代理端处理;绝不能向用户展示键拼写过程)。 19. 选择应用前需了解应用来源: -
Official Apps
:CawCut官方账户拥有的精选应用。 -
My Apps
:已认证用户拥有的应用。 -
Shared Apps
:其他用户与已认证用户共享的应用。 如果用户询问“官方”或“共享”应用,仅从
cawcut app list
的对应部分选择。 20. 运行前无需预先检查本地媒体——不得使用
ls
/
file
/
sips -g pixelWidth/pixelHeight
(或类似命令)在运行前检查本地文件的大小或尺寸。直接尝试
cawcut app run
;如果上传预检失败,CLI的错误会准确报告具体的大小/尺寸及其限制——根据该错误采取行动(参见下方错误处理),而非预先手动检查。

Workflow

工作流

1. List available apps

1. 列出可用应用

bash
cawcut app list --schema
bash
cawcut app list --schema

optional: --category image | --category video

可选参数:--category image | --category video


Output: Apps grouped by **output category** (Image Apps / Video Apps), then by **source** (Official / My / Shared), with **name**, description, credits, and input schema lines when available (`cawcut app list` does **not** print app IDs in human output). Identify likely matches by app name, description, `categories`, source, credits, and required input kinds. Use `cawcut app list --json` internally when you need the app ID for automation.

Example human output shape:
Image Apps Official Apps Photo to Sticker 2 credits description: Turn a scene photo into a sticker My Apps My still template description: Custom image workflow
Video Apps Official Apps Product video generator 8 credits description: Generate a product ad video

Do not treat Official Apps, My Apps, and Shared Apps as interchangeable. When the same app is visible from multiple sources, prefer the source displayed by the CLI.
Translate app names/descriptions when `reply_language` is not English; keep input keys and source group names exact. **Never show app IDs in user-facing App lists.**

If the user provided a natural-language request, rank likely matches:

1. Best official app/template match, when present.
2. Best owned/shared app match.
3. `cawcut-generate` fallback, only when no app matches or the user chooses raw generation.

**Single clear match:** treat as selected — run `describe`, then present metadata + inputs tables + input menu (UX rule 3). Do not reply with only "this app can…".

**Multiple matches:** show a numbered list with name, description, source, credits, and input summary for each; after the user picks, run `describe` and disclose full details before collecting inputs.

If the user did not provide a request, still present useful choices immediately. Do not ask an empty "what would you like to run?" question.

Present choices in `reply_language`. Default example (bare skill invoke / English):
Here are runnable CawCut Apps:
  1. Product video generator — Generate a product ad video Source: Official Apps; est. 8 credits; needs: prompt(text), product_image(image)
  2. Generate a product ad video — My marketing template Source: My Apps; needs: prompt(text)
  3. Apply a shared style template — Shared by another user Source: Shared Apps; needs: image(image)
You can: A. Run 1 / 2 / 3 (I'll list required inputs next) B. Describe your goal and I'll recommend the best App C. Skip templates and use cawcut-generate instead

If the user later writes in another language, use the same structure in `reply_language`.

If the user chooses an App (or a single App was auto-matched), immediately inspect it:

```bash
cawcut app describe "Product video generator"
Then present the App metadata table, inputs table, and input collection menu (UX rules 3, 11–12). Do not run until required inputs are resolved via menu choices — not free-form parameter typing.
Example — user asks to capture a video's first frame (after
describe
):
Found a matching App: **First/Last Frame Extractor (qa test)**

| Field | Value |
|-------|-------|
| Name | First/Last Frame Extractor (qa test) |
| Source | Official Apps |
| Cost | … credits |
| Output | First frame + last frame images |

Extracts the first and last frame from a video and outputs them as images.

| Name | Type | Required | Notes |
|------|------|----------|-------|
| … | video | yes | The video to process (MP4, WebM, etc.) |

Provide the video:
A. Use a video already shared in this chat
B. Paste an HTTPS video URL
C. Provide a local file path

输出:应用按**输出分类**(图像应用/视频应用)分组,然后按**来源**(官方/我的/共享)分组,包含**名称**、描述、积分和可用的输入架构行(`cawcut app list`在人类可读输出中**不**显示应用ID)。根据应用名称、描述、`categories`、来源、积分和所需输入类型识别可能的匹配项。需要自动化时,在内部使用`cawcut app list --json`获取应用ID。

人类可读输出示例:
图像应用 官方应用 照片转贴纸 2积分 描述:将场景照片转换为贴纸 我的应用 我的静态模板 描述:自定义图像工作流
视频应用 官方应用 产品视频生成器 8积分 描述:生成产品广告视频

不得将官方应用、我的应用和共享应用视为可互换。当同一应用从多个来源可见时,优先选择CLI显示的来源。当`reply_language`非英文时,翻译应用名称/描述;输入键和来源组名称保持原样。**绝不在面向用户的应用列表中展示应用ID**。

如果用户提供了自然语言请求,对可能的匹配项进行排序:

1. 最佳官方应用/模板匹配(如果存在)。
2. 最佳自有/共享应用匹配。
3. `cawcut-generate`回退选项,仅当无应用匹配或用户选择原生生成时使用。

**单一明确匹配**:视为已选定——运行`describe`,然后展示元数据+输入表+输入菜单(UX规则3)。不得仅回复“这个应用可以…”。

**多个匹配项**:展示包含名称、描述、来源、积分和输入摘要的编号列表;用户选择后,运行`describe`并在收集输入前披露完整详情。

如果用户未提供请求,仍需立即展示有用的选项。不得询问空泛的“你想运行什么?”问题。

以`reply_language`展示选项。默认示例(裸技能调用/英文):
以下是可运行的CawCut应用:
  1. 产品视频生成器 — 生成产品广告视频 来源:官方应用;预计8积分;需要:prompt(文本), product_image(图像)
  2. 生成产品广告视频 — 我的营销模板 来源:我的应用;需要:prompt(文本)
  3. 应用共享风格模板 — 其他用户共享 来源:共享应用;需要:image(图像)
你可以: A. 运行1 / 2 / 3(我接下来会列出所需输入) B. 描述你的目标,我会推荐最佳应用 C. 跳过模板,改用cawcut-generate

如果用户之后使用其他语言,以`reply_language`使用相同结构。

如果用户选择了某个应用(或自动匹配到单一应用),立即检查该应用:

```bash
cawcut app describe "产品视频生成器"
然后展示应用元数据表输入表输入收集菜单(UX规则3、11–12)。必须通过菜单选择解决所需输入后再运行——不得使用自由形式参数输入。
示例——用户要求提取视频的第一帧(执行
describe
后):
找到匹配应用:**首尾帧提取器(qa测试)**

| 字段 | 值 |
|-------|-------|
| 名称 | 首尾帧提取器(qa测试) |
| 来源 | 官方应用 |
| 成本 | …积分 |
| 输出 | 第一帧 + 最后帧图像 |

从视频中提取第一帧和最后帧并输出为图像。

| 名称 | 类型 | 必填 | 说明 |
|------|------|----------|-------|
| … | 视频 | 是 | 要处理的视频(MP4、WebM等) |

提供视频:
A. 使用已在聊天中分享的视频
B. 粘贴HTTPS视频URL
C. 提供本地文件路径

2. Inspect inputs

2. 检查输入

bash
cawcut app describe "<app name>"
Output: a table of inputs with KEY, KIND, required/optional, DEFAULT, and DESCRIPTION. Example:
App: Product video generator
Description: Generate a product ad video

Inputs — use the KEY column with --input KEY=value:

  KEY                   KIND    REQ   DEFAULT           DESCRIPTION
  prompt                text    yes   no                Ad script or product description
    requirements: Required text input.
  product_image         image   yes   no                Product photo
    requirements: Required image input. Provide an HTTPS URL, local file path, or {asset_id,url} object.

Run: cawcut app run "Product video generator" --input 'prompt=...' --input 'product_image=@/path/to/file'
For the raw JSON schema (includes internal app id in tool
name
):
bash
cawcut app describe "<app name>" --json
bash
cawcut app describe "<app name>"
输出:包含KEY、KIND、必填/可选、DEFAULT和DESCRIPTION的输入表。示例:
应用:产品视频生成器
描述:生成产品广告视频

输入 — 使用KEY列配合--input KEY=value:

  KEY                   KIND    必填   默认值           描述
  prompt                文本    是     无                广告脚本或产品描述
    要求:必填文本输入。
  product_image         图像   是     无                产品照片
    要求:必填图像输入。提供HTTPS URL、本地文件路径或{asset_id,url}对象。

运行:cawcut app run "产品视频生成器" --input 'prompt=...' --input 'product_image=@/path/to/file'
如需原始JSON架构(工具
name
中包含内部应用ID):
bash
cawcut app describe "<app name>" --json

Disambiguate duplicate app names (required)

重名应用消歧义(必要时)

When
cawcut app describe
or
cawcut app run
returns
Multiple apps named "..."
, present a confirmation table — still no app IDs:
#NameSourceDescriptionCreditsInputs
Fill rows from the CLI message (source, description, credits, input schema lines). Ask the user to pick by number or describe which copy they want. Then run:
bash
cawcut app run "3D Model Generator" --pick 2 --input ... --wait --download --json
Only use
--pick
after the user confirms. If names are unique, omit
--pick
.
cawcut app describe
cawcut app run
返回
Multiple apps named "..."
时,展示确认表格——仍不显示应用ID
#名称来源描述积分输入
从CLI消息中填充行(来源、描述、积分、输入架构行)。请用户按编号选择或描述想要的副本。然后运行:
bash
cawcut app run "3D模型生成器" --pick 2 --input ... --wait --download --json
仅在用户确认后使用
--pick
参数。如果名称唯一,省略
--pick

Present app inputs to users (required)

向用户展示应用输入(必要时)

CawCut App inputs come from
cawcut app describe
— a KEY/KIND table plus requirement lines. Some CLIs print a ready param table from a dedicated
model get
-style command; CawCut does not. Render a user-facing markdown table when explaining an App; do not paste raw CLI output or vague prose.
Presentation rule: tables are for visibility; interaction is always numbered menus for enumerable/fixed values (same as
cawcut-generate
). Do not turn the table into "fill in each row" free input.
Use this column layout:
NameTypeConstraints / formatDefaultRequiredNotes
Row mapping from
describe
/
--json
:
SourceTable column
KEY (
properties
key in JSON)
Name — exact
--input
key; may contain spaces — quote in shell
x-cawcut-input-kind
or KIND
Type:
text
/
image
/
video
/
audio
oneOf
/ requirements text
Constraints —
HTTPS URL
,
@/local/path
,
{asset_id,url}
x-cawcut-has-default
+ default
Default —
none
when false
x-cawcut-required
Required —
yes
/
no
DESCRIPTION + requirementsNotes — human label;
x-cawcut-sample-url
/
sample:
lines are illustrative only — never pass as
--input
App metadata table — include above the inputs table:
FieldValue
Namefrom list/describe
SourceOfficial Apps / My Apps / Shared Apps
Categoryfrom
categories
in list JSON
Costcredits from
app list --schema
Outputimage / video / audio / text (prefer
categories
)
Do not include App ID in user-facing tables. Resolve ID from a fresh
cawcut app list --json
run in this turn when calling the CLI.
Example — Photo to Sticker:
FieldValue
NamePhoto to Sticker
SourceOfficial Apps
Cost6.9 credits
OutputSticker-style image (metallic outline + enamel border)
NameTypeConstraints / formatDefaultRequiredNotes
Input - Scene Photo
imageHTTPS URL,
@/local/path
(auto-upload),
{asset_id,url}
noneyesScene/person photo → sticker effect
User-facing menu (after table):
Scene photo for Photo to Sticker:
A. Use a photo already shared in this chat
B. Paste an HTTPS image URL
C. Provide a local file path
bash
cawcut app run "Photo to Sticker" \
  --input "Input - Scene Photo=@/path/to/photo.jpg" \
  --wait --download --json
Always run
describe
for the live app — keys and credits vary per app and environment.
CLI flags table for
cawcut app run
:
NameTypeConstraints / optionsDefaultRequiredNotes
<app_ref>
stringApp name from list, or internal IDyesquote if spaces; add
--pick <n>
when name is ambiguous
--pick
number1-based index from disambiguation listnoonly when multiple Apps share the same name
--input
key=valueKEY from describeper schemarepeatable; quote keys with spaces
--input-json
fileJSON objectnomutually exclusive with
--input
--wait
flagoffrecommendedblock until done
--download
flag | pathomit = system Downloadsoffrecommendedauto-save media results
--json
flagoffrecommendedstructured output
CawCut应用输入来自
cawcut app describe
——包含KEY/KIND表和要求说明。部分CLI会通过专门的
model get
类命令打印现成的参数表;但CawCut不会。解释应用时,必须渲染面向用户的Markdown表格;不得粘贴原始CLI输出或模糊文本。
展示规则:表格用于展示;交互始终使用编号菜单处理可枚举/固定值(与
cawcut-generate
相同)。不得将表格变成“逐行填写”的自由输入。
使用以下列布局:
名称类型约束/格式默认值必填说明
describe
/
--json
到表格列的映射
来源表格列
KEY(JSON中的
properties
键)
名称 — 精确的
--input
键;可能包含空格 — 在shell中需加引号
x-cawcut-input-kind
或KIND
类型:
文本
/
图像
/
视频
/
音频
oneOf
/ 要求文本
约束 —
HTTPS URL
@/local/path
{asset_id,url}
x-cawcut-has-default
+ 默认值
默认值 — 无默认值时显示
x-cawcut-required
必填 —
/
DESCRIPTION + 要求说明 — 人类可读标签;
x-cawcut-sample-url
/
sample:
行仅为示例 — 绝不能作为
--input
传递
应用元数据表——需显示在输入表上方:
字段
名称来自list/describe
来源官方应用 / 我的应用 / 共享应用
分类来自list JSON中的
categories
成本来自
app list --schema
的积分
输出图像 / 视频 / 音频 / 文本(优先使用
categories
绝不能在面向用户的表格中包含应用ID。调用CLI时,从当前轮次中重新运行
cawcut app list --json
解析ID。
示例——照片转贴纸
字段
名称照片转贴纸
来源官方应用
成本6.9积分
输出贴纸风格图像(金属轮廓+珐琅边框)
名称类型约束/格式默认值必填说明
Input - Scene Photo
图像HTTPS URL、
@/local/path
(自动上传)、
{asset_id,url}
场景/人物照片→贴纸效果
面向用户的菜单(表格之后)
照片转贴纸的场景照片:
A. 使用已在聊天中分享的照片
B. 粘贴HTTPS图像URL
C. 提供本地文件路径
bash
cawcut app run "照片转贴纸" \\
  --input "Input - Scene Photo=@/path/to/photo.jpg" \\
  --wait --download --json
始终为实时应用运行
describe
——每个应用和环境的键和积分可能不同。
cawcut app run
的CLI标志表
名称类型约束/选项默认值必填说明
<app_ref>
字符串来自list的应用名称,或内部ID含空格时需加引号;名称模糊时添加
--pick <n>
--pick
数字消歧义列表中的1-based索引仅当多个应用同名时使用
--input
key=value来自describe的KEY按架构要求可重复;含空格的键需加引号
--input-json
文件JSON对象
--input
互斥
--wait
标志关闭推荐阻塞直到完成
--download
标志|路径省略=系统下载文件夹关闭推荐自动保存媒体结果
--json
标志关闭推荐结构化输出

3. Run with inputs

3. 带输入运行

Pre-flight check (do this immediately before building the command): Has
cawcut app list --json
been run for this user message before routing/scoring for the current subject/goal? If no, or if the subject/goal or target App changed within this user message since the last catalog check → stop and go back to Step 1 now. Do not call
cawcut app run
first. A prior user message's catalog check or "no match" does not count. Before
run
, resolve the app ID from a fresh
cawcut app list --json
in this turn if you have not already done so for this App.
Always pass
--json
so the CLI outputs structured JSON instead of plain text — this prevents the agent from truncating the signed result URL.
bash
cawcut app run "Product video generator" \
  --input prompt="summer sale, bright colors" \
  --input product_image="https://cdn.example.com/shoe.jpg" \
  --wait --download --json
Local file (auto-uploaded to CawCut assets):
bash
cawcut app run "Product video generator" \
  --input prompt="summer sale" \
  --input product_image="@./shoe.jpg" \
  --wait --download --json
Multiple inputs:
bash
cawcut app run "<app name>" \
  --input key1=value1 \
  --input key2=value2 \
  --wait --download --json
JSON file (alternative for many keys or values with special characters):
bash
cawcut app run "<app name>" --input-json ./inputs.json --wait --download --json
inputs.json
shape:
json
{ "prompt": "...", "product_image": "https://cdn.example.com/img.jpg" }
Do not combine
--input
and
--input-json
in one invocation.
Media upload pre-flight failures (size/dimension) — local
@
paths trigger upload validation before the run proceeds. If the CLI prints a plain-text limit message (e.g.
Audio file size is 22.9 MB (limit 15 MB). Re-encode or trim…
) with no
Code:
/
Category:
/
Suggested actions:
markers, that still requires recovery — do not just echo the error. Always call
AskUserQuestion
/
AskQuestion
first with: compress/resize for the user now (
sips
/
ffmpeg
) and retry, let them fix it, or cancel. Numbered text only if the tool is unavailable. Never suggest CawCut Web. See
references/troubleshooting.md
for exact commands per failure type (MB limit vs longest-edge px are different fixes). Same rule in the Errors table below.
预检(构建命令前立即执行):针对当前主题/目标进行路由/评分前,是否已针对当前用户消息运行
cawcut app list --json
?如果,或当前用户消息内自上次目录检查以来主题/目标或目标应用已更改→立即停止并返回步骤1不得先调用
cawcut app run
。之前用户消息的目录检查或“无匹配”结论无效。运行
run
前,如果尚未针对该应用解析ID,需在当前轮次中重新运行
cawcut app list --json
解析。
始终传递
--json
参数,使CLI输出结构化JSON而非纯文本——避免代理截断已签名的结果URL。
bash
cawcut app run "产品视频生成器" \\
  --input prompt="夏季促销,鲜艳色彩" \\
  --input product_image="https://cdn.example.com/shoe.jpg" \\
  --wait --download --json
本地文件(自动上传到CawCut资产):
bash
cawcut app run "产品视频生成器" \\
  --input prompt="夏季促销" \\
  --input product_image="@./shoe.jpg" \\
  --wait --download --json
多个输入:
bash
cawcut app run "<app name>" \\
  --input key1=value1 \\
  --input key2=value2 \\
  --wait --download --json
JSON文件(适用于多个键或含特殊字符的值):
bash
cawcut app run "<app name>" --input-json ./inputs.json --wait --download --json
inputs.json
格式:
json
{ "prompt": "...", "product_image": "https://cdn.example.com/img.jpg" }
不得在一次调用中同时使用
--input
--input-json
媒体上传预检失败(大小/尺寸)——本地
@
路径会触发上传验证,然后才会运行。如果CLI打印纯文本限制消息(例如
Audio file size is 22.9 MB (limit 15 MB). Re-encode or trim…
)且
Code:
/
Category:
/
Suggested actions:
标记,仍需进行恢复处理——不得仅回显错误。必须先调用
AskUserQuestion
/
AskQuestion
,提供选项:立即为用户压缩/调整大小(使用
sips
/
ffmpeg
)并重试、让用户自行修复、或取消。仅当工具不可用时才使用编号文本。不得建议使用CawCut网页端。请参阅
references/troubleshooting.md
获取每种失败类型的确切命令(MB限制与最长边像素限制的修复方法不同)。下方错误表中的规则相同。

4. Download result

4. 下载结果

--download
is already included in the run commands above. The CLI resolves the correct system downloads folder automatically — no path needed.
上述运行命令中已包含
--download
参数。CLI会自动解析正确的系统下载文件夹——无需指定路径。

5. Deliver

5. 交付结果

The CLI outputs JSON when
--json
is used:
json
{
  "result_url": "https://cdn.cawcut.com/...?Expires=...&Signature=...&Key-Pair-Id=...",
  "result_urls": [
    "https://cdn.cawcut.com/...?Expires=...&Signature=...&Key-Pair-Id=...",
    "https://cdn.cawcut.com/...?Expires=...&Signature=...&Key-Pair-Id=..."
  ],
  "task_id": "...",
  "local_path": "/Users/.../file.png",
  "local_paths": ["/Users/.../file-1.png", "/Users/.../file-2.png"],
  "status": "done",
  "credits_used": 12.0,
  "credits_balance": 88.0
}
使用
--json
参数时,CLI输出JSON:
json
{
  "result_url": "https://cdn.cawcut.com/...?Expires=...&Signature=...&Key-Pair-Id=...",
  "result_urls": [
    "https://cdn.cawcut.com/...?Expires=...&Signature=...&Key-Pair-Id=...",
    "https://cdn.cawcut.com/...?Expires=...&Signature=...&Key-Pair-Id=..."
  ],
  "task_id": "...",
  "local_path": "/Users/.../file.png",
  "local_paths": ["/Users/.../file-1.png", "/Users/.../file-2.png"],
  "status": "done",
  "credits_used": 12.0,
  "credits_balance": 88.0
}

Input kinds and formats

输入类型和格式

KIND
--input
format
Notes
text
key=some text value
String; numbers/booleans coerced to string
image
key=https://…
or
key=@/local/path.jpg
Local files are auto-uploaded; URL passed as-is
video
key=https://…
or
key=@/local/path.mp4
Same upload behaviour as image
audio
key=https://…
or
key=@/local/path.mp3
Same upload behaviour as image
The
@
prefix explicitly marks a local path for upload. Bare paths (e.g.
./file.jpg
) are also auto-detected and uploaded if the file exists.
类型
--input
格式
说明
text
key=some text value
字符串;数字/布尔值会被转换为字符串
image
key=https://…
key=@/local/path.jpg
本地文件会自动上传;URL直接传递
video
key=https://…
key=@/local/path.mp4
上传行为与图像相同
audio
key=https://…
key=@/local/path.mp3
上传行为与图像相同
@
前缀明确标记本地路径用于上传。裸路径(例如
./file.jpg
)如果文件存在,也会被自动检测并上传。

Async tasks

异步任务

The CLI always prints
Task: <task_id>
to stdout before polling starts. Capture it — it is your recovery handle.
  • With
    --wait
    : CLI blocks, then prints all result URLs on success.
  • Without
    --wait
    : CLI prints
    Check status with: cawcut task status <task_id> --wait
    .
  • If
    --wait
    times out: CLI prints
    Polling timed out. Resume with: cawcut task status <task_id> --wait
    — run that command to resume.
CLI在开始轮询前,始终会向stdout打印
Task: <task_id>
。需记录该ID——这是恢复任务的句柄。
  • 使用
    --wait
    :CLI会阻塞,成功后打印所有结果URL。
  • 不使用
    --wait
    :CLI会打印
    Check status with: cawcut task status <task_id> --wait
  • 如果
    --wait
    超时:CLI会打印
    Polling timed out. Resume with: cawcut task status <task_id> --wait
    ——运行该命令恢复任务。

Errors

错误处理

If the CLI prints
Code:
,
Category:
, or
Suggested actions:
, present those numbered actions to the user before retrying. Use
references/troubleshooting.md
for fallback handling of token, app access, missing input, invalid input, credits, content policy, and timeout errors.
Many other failures are plain-text CLI messages without those markers — use the symptom→action table below (including media upload pre-flight size/dimension limits).
Extract
result_urls
from the JSON when present and present every URL to the user. For backward compatibility,
result_url
is the first URL. Also share every
local_paths
entry if present. Use exact signed URL values — do not truncate or strip query parameters (the
?Expires=...&Signature=...&Key-Pair-Id=...
part is required for access).
Always also report
credits_used
(or
credits_estimate
if
credits_used
is absent) and
credits_balance
(or
credits_balance_error
) from the same JSON — every single completed run, even back-to-back ones in the same session. Never omit this because it was already shown for a prior run.
SymptomAction
App not foundRe-run
cawcut app list
; verify App name spelling
Multiple apps with same nameShow disambiguation table (source, description, inputs); get user confirmation; re-run with
--pick <n>
App is not under Official AppsCheck My Apps and Shared Apps too; a user-owned or shared App is valid but should not be described as official.
unknown input key "..."
Check
cawcut app describe "<app name>"
; fix key spelling
Token expired
Run
cawcut auth login
via Bash, then retry the failed command
Media upload pre-flight fails (size/dimension)Do not just print the error — always call
AskUserQuestion
/
AskQuestion
first with: compress/resize for the user now (
sips
/
ffmpeg
) and retry, let them fix it, or cancel. Numbered text only if the tool is unavailable. Never suggest CawCut Web. See
references/troubleshooting.md
for exact commands per failure type (MB limit vs longest-edge px are different fixes).
Run fails on generate-time model limitsInspect
cawcut capabilities list --models --schema --json
medias[].limit
.
See
references/app-inputs.md
for deeper input resolution details.
如果CLI打印
Code:
Category:
Suggested actions:
,需向用户展示这些编号的操作建议,然后重试。使用
references/troubleshooting.md
处理令牌、应用访问、缺少输入、无效输入、积分、内容政策和超时错误的回退方案。
许多其他失败是无上述标记的纯文本CLI消息——使用下方的症状→操作表(包括媒体上传预检的大小/尺寸限制)。
如果存在
result_urls
,从JSON中提取并向用户展示每个URL。为了向后兼容,
result_url
是第一个URL。如果存在
local_paths
,也需分享每个条目。使用精确的签名URL值——不得截断或删除查询参数(
?Expires=...&Signature=...&Key-Pair-Id=...
部分是访问必需的)。
必须同时报告同一JSON中的
credits_used
(如果
credits_used
不存在则报告
credits_estimate
)和
credits_balance
(或
credits_balance_error
)——每一次完成的运行都要报告,即使是同一会话中的连续运行。不得因为之前运行已展示过就省略。
症状操作
应用未找到重新运行
cawcut app list
;验证应用名称拼写
多个应用同名展示消歧义表格(来源、描述、输入);获取用户确认;添加
--pick <n>
重新运行
应用不在官方应用中同时检查我的应用和共享应用;用户自有或共享的应用是有效的,但不得描述为官方应用。
unknown input key "..."
检查
cawcut app describe "<app name>"
;修正键拼写
Token expired
通过Bash运行
cawcut auth login
,然后重试失败的命令
媒体上传预检失败(大小/尺寸)不得仅打印错误——必须先调用
AskUserQuestion
/
AskQuestion
,提供选项:立即为用户压缩/调整大小(使用
sips
/
ffmpeg
)并重试、让用户自行修复、或取消。仅当工具不可用时才使用编号文本。不得建议使用CawCut网页端。请参阅
references/troubleshooting.md
获取每种失败类型的确切命令(MB限制与最长边像素限制的修复方法不同)。
运行时因模型限制失败检查
cawcut capabilities list --models --schema --json
medias[].limit
有关输入解析的详细信息,请参阅
references/app-inputs.md
。",