disposabl

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Disposabl

Disposabl

Use the configured Disposabl deployment and the current API contract. Do not invent deployment URLs, operation names, CLI flags, or credentials.
使用已配置的 Disposabl 部署和当前 API 合约。不得臆造部署 URL、操作名称、CLI flags 或凭据。

Discover before calling

调用前先进行发现

  1. Inspect the current CLI interface with
    npx --yes --prefer-online @disposabl/cli@latest --help
    . Use its documented subcommand help to discover authentication, deployment configuration, API discovery, and operation invocation. The installed CLI's help is authoritative for command syntax.
  2. In a starter checkout, read
    generated/openapi.json
    . For a deployed app, retrieve
    /openapi.json
    from the explicitly configured app/backend origin. The local file is a generated snapshot; prefer the deployed contract when operating a deployment.
  3. Select the operation by method, path, or operationId. Inspect its parameters, requestBody schema, security requirements, and response schema before constructing an invocation. Preserve the declared HTTP method and
    /api/v1
    route.
  4. Authenticate through the CLI's supported login or an existing configured bearer credential. Never print credentials or copy them into committed files.
  5. Invoke only the requested operation. If the CLI exposes generic API invocation, use the syntax shown by its help. Otherwise use the authenticated HTTP route from the contract. Report the status and relevant result; never report an attempted request as successful without its response.
  1. 使用
    npx --yes --prefer-online @disposabl/cli@latest --help
    检查当前 CLI 界面。通过其文档化的子命令 help 了解身份验证、部署配置、API 发现和操作调用方式。已安装 CLI 的 help 是命令语法的权威依据。
  2. 在 starter checkout 中,读取
    generated/openapi.json
    。对于已部署的应用,从明确配置的应用/后端 origin 获取
    /openapi.json
    。本地文件是生成的 snapshot;操作部署时应优先使用已部署的合约。
  3. 根据 method、path 或 operationId 选择操作。构建调用前,检查其参数、requestBody schema、安全要求和响应 schema。保持合约声明的 HTTP method 和
    /api/v1
    route 不变。
  4. 通过 CLI 支持的 login 或现有的已配置 bearer credential 进行身份验证。绝不打印凭据,也不要将其复制到已提交的文件中。
  5. 仅调用用户请求的操作。如果 CLI 提供通用 API 调用功能,请使用其 help 中给出的语法;否则使用合约中经过身份验证的 HTTP route。报告状态和相关结果;没有收到响应时,绝不能将已尝试的请求报告为成功。

Request rules

请求规则

  • Send the flat JSON object defined by requestBody; do not add an
    args
    wrapper.
  • Supply only declared properties and observe required fields and enum values. Do not send
    orgId
    ,
    userId
    , or
    role
    as identity overrides. Server authentication establishes identity. An operation may separately declare a legitimate business field such as
    roleSlug
    ; follow that schema.
  • Treat a read operation declared as POST as POST. Do not infer its method from the name.
  • Missing origin or credentials is a configuration requirement. Ask for the missing deployment context rather than selecting a guessed production host.
  • Respect authorization already given for the requested change. For invitations or other actions that contact people, require the user's explicit request for that action.
  • 发送 requestBody 定义的扁平 JSON 对象;不要添加
    args
    包装层。
  • 仅提供已声明的属性,并遵守必填字段和 enum 值要求。不要将
    orgId
    、
    userId
    或
    role
    作为身份覆盖值发送。服务器身份验证会确定当前身份。操作可能单独声明
    roleSlug
    等合理的业务字段;应遵循对应 schema。
  • 如果读操作在合约中声明为 POST,就按 POST 调用。不要根据操作名称推断 HTTP method。
  • 缺少 origin 或凭据属于配置要求。应询问用户缺失的部署上下文,而不是选择猜测的生产环境 host。
  • 对于请求的更改,应遵循已经授予的授权。对于邀请或其他需要联系人员的操作,必须由用户明确请求执行。

Starter examples to verify against the current contract

需要与当前合约核对的 starter 示例

The current starter snapshot includes
GET /api/v1/account/getAccount
with bearer security and no parameters. Its operationId is
account/internal:getAccount
.
It also includes
POST /api/v1/todo/createTodo
, operationId
todo/internal:createTodo
, whose JSON body is
{ "text": "Example" }
. Only create a todo when the user requests it. These examples are discovery aids, not a permanent operation registry.
当前 starter snapshot 包含
GET /api/v1/account/getAccount
,该操作使用 bearer security 且没有参数。其 operationId 为
account/internal:getAccount
。
其中还包含
POST /api/v1/todo/createTodo
,operationId 为
todo/internal:createTodo
,JSON 请求体为
{ "text": "Example" }
。仅当用户请求时才创建 todo。这些示例仅用于辅助发现,并非永久的操作注册表。

Skill and CLI freshness

Skill 和 CLI 更新

CLI invocations above resolve the npm
latest
release before execution. Skill content comes from the configured Git skill/plugin repository and updates independently of npm releases. Do not edit this skill or install other skills while carrying out an API request. A plugin or skill update may require a new agent session or plugin reload before the new instructions are active.
上述 CLI 调用会在执行前解析 npm 的
latest
release。Skill 内容来自已配置的 Git skill/plugin 仓库,并独立于 npm releases 更新。执行 API 请求时,不要编辑此 skill,也不要安装其他 skills。plugin 或 skill 更新后,可能需要启动新的 agent session 或重新加载 plugin,新的指令才会生效。