openany-cli-dev 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +72 -61
  2. package/package.json +1 -1
  3. package/skills/openany/SKILL.md +17 -330
  4. package/skills/openany/SKILL.zh-CN.md +2 -2
  5. package/skills/openany/calls.md +116 -0
  6. package/skills/openany/setup.md +225 -0
  7. package/skills/openany/topups.md +70 -0
  8. package/skills/openany-provider/SKILL.md +12 -12
  9. package/skills/openany-provider/SKILL.zh-CN.md +10 -10
  10. package/skills/openany-provider/references/apis.md +12 -12
  11. package/skills/openany-provider/references/apis.zh-CN.md +55 -0
  12. package/skills/openany-provider/references/application.md +2 -2
  13. package/skills/openany-provider/references/application.zh-CN.md +2 -2
  14. package/skills/openany-provider/references/auth.md +1 -57
  15. package/skills/openany-provider/references/auth.zh-CN.md +3 -0
  16. package/skills/openany-provider/references/connections.md +17 -19
  17. package/skills/openany-provider/references/connections.zh-CN.md +23 -20
  18. package/skills/openany-provider/references/imports.md +42 -23
  19. package/skills/openany-provider/references/imports.zh-CN.md +37 -35
  20. package/skills/openany-provider/references/listing.md +6 -6
  21. package/skills/openany-provider/references/listing.zh-CN.md +11 -0
  22. package/skills/openany-provider/references/login.md +19 -20
  23. package/skills/openany-provider/references/login.zh-CN.md +15 -17
  24. package/skills/openany-provider/references/model-import.md +11 -0
  25. package/skills/openany-provider/references/model-import.zh-CN.md +2 -3
  26. package/skills/openany-provider/references/models.zh-CN.md +68 -0
  27. package/skills/openany-provider/references/publishing.md +20 -63
  28. package/skills/openany-provider/references/publishing.zh-CN.md +17 -58
  29. package/skills/openany-provider/references/reviews.zh-CN.md +20 -0
  30. package/skills/openany-provider/templates/seller-agent-api-import-template.json +10 -27
  31. package/src/cli.js +4 -0
  32. package/src/http.js +2 -1
  33. package/src/native/connection-macos.js +10 -10
  34. package/src/native/setup-macos.js +10 -10
  35. package/src/tasks.js +53 -0
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # OpenAny CLI
2
2
 
3
- 独立的 Node.js CLI,以一个 `openany-dev` 命令封装 OpenAny 的模型、聚合数据/工具、身份、Key 管理和充值接口。普通调用只需 API Key;缺少时在本地失败,不发起 HTTP 请求。
3
+ OpenAny CLI is a standalone Node.js CLI that provides access to OpenAny models, aggregated data and tools, identity, API key management, and top-ups through a single `openany-dev` command. Standard calls require only an API key. If the key is missing, the CLI fails locally before sending an HTTP request.
4
4
 
5
- 后端及签名服务域固定为 `https://dev.openany.si`,模型调用统一使用网关 `https://api-dev.openany.si`,路径和查询参数取自公开目录的 `curlExample`。
5
+ The backend and signing origin are fixed at `https://dev.openany.si`. Model calls use the `https://api-dev.openany.si` gateway and take their paths and query parameters from the public catalog's `curlExample`.
6
6
 
7
- 中文 skill 见 [SKILL.zh-CN.md](skills/openany/SKILL.zh-CN.md),英文版见 [SKILL.md](skills/openany/SKILL.md)。两份文件随 npm 包一起发布。
7
+ The skill is available in [Chinese](skills/openany/SKILL.zh-CN.md) and [English](skills/openany/SKILL.md). Both entries and the English task guides ship with the npm package.
8
8
 
9
- ## 安装
9
+ ## Installation
10
10
 
11
- 需要 Node.js >=22。从 npm 安装即可获得全局 `openany-dev` 命令:
11
+ Node.js 22 or later is required. Install from npm to make the `openany-dev` command available globally:
12
12
 
13
13
  ```bash
14
14
  npm install -g openany-cli-dev@latest --registry=https://registry.npmjs.org/
@@ -16,9 +16,9 @@ openany-dev --version
16
16
  openany-dev --help
17
17
  ```
18
18
 
19
- 包名为 `openany-cli-dev`,命令名为 `openany-dev`。发行包附带 `skills/openany/SKILL.md`;全局安装目录可通过 `npm root -g` 查询,再将其中 `openany-cli-dev/skills/openany` 目录安装到 Agent 的 skill 目录。更新 CLI 时同步更新配套 skill。
19
+ The npm package is `openany-cli-dev`, and the command is `openany-dev`. The package includes the entry and task guides in `skills/openany`. Run `npm root -g` to locate the global installation directory, then install `openany-cli-dev/skills/openany` from that directory into your agent's skill directory. Update the skill whenever you update the CLI.
20
20
 
21
- 从源码开发或构建本地安装包:
21
+ To develop from source or build a local installation package, run:
22
22
 
23
23
  ```bash
24
24
  npm ci
@@ -26,32 +26,32 @@ npm test
26
26
  npm pack
27
27
  ```
28
28
 
29
- ## 原生凭据配置窗口
29
+ ## Native credential setup dialogs
30
30
 
31
- macOS 和 Windows 桌面可分别打开 API Key 或钱包窗口,每次选择一条:
31
+ On macOS and Windows desktops, choose one of these commands to open the API key or wallet dialog:
32
32
 
33
33
  ```bash
34
34
  openany-dev setup --api_key api_key --gui -j
35
35
  openany-dev setup --wallet_connect wallet --gui -j
36
36
  ```
37
37
 
38
- API Key 窗口填写名称、密钥及是否启用;钱包窗口填写 Agent ID 和私钥,本地推导地址后由用户再次确认。输入通过子进程管道交给 CLI,标准输出只返回配置结果。Agent 不应读取或截图用户填写中的输入框。
38
+ In the API key dialog, enter a label and key, then choose whether to activate it. In the wallet dialog, enter the agent ID and private key. The CLI derives the address locally and asks the user to confirm it. The dialog sends input to the CLI through a subprocess pipe, and stdout contains only the setup result. Agents must avoid reading or taking screenshots of the input fields while the user fills them in.
39
39
 
40
- 五分钟超时或取消时不保存。保存复用配置锁和原子写入,环境变量仍优先于本地设置。macOS 使用系统 AppKit,Windows 使用系统 PowerShell 和 WinForms,无需浏览器或编译器。Windows 使用当前用户专属目录 ACL,macOS 使用目录 0700、文件 0600。本地文件仍可能被同一账户下有读取权限的程序访问。
40
+ Canceling or reaching the five-minute timeout discards the input. Saving uses the existing configuration lock and atomic writes. Environment variables still take precedence over local settings. macOS uses the system AppKit, and Windows uses PowerShell and WinForms. Both work without a browser or compiler. Windows uses a directory ACL restricted to the current user. macOS uses mode 0700 for the directory and 0600 for the file. Programs running under the same account can still read local files if they have read access.
41
41
 
42
- `--gui` 支持 `-j` 和无 TTY 调用,仅适用于 API Key、钱包配置。桌面不可用或系统策略阻止脚本时,移除 `--gui` 并让用户在自己的交互终端配置。邮箱、充值、`--prepare` 和 `--non-interactive` 不支持原生弹窗。未加 `--gui` 的检查行为保持不变。
42
+ `--gui` supports `-j` and invocation without a TTY for API key and wallet setup. If the desktop is unavailable or system policy blocks scripts, remove `--gui` and let the user configure credentials in their own interactive terminal. Email and top-up setup, `--prepare`, and `--non-interactive` are unavailable in native dialogs. CLI checks behave as before when `--gui` is omitted.
43
43
 
44
- ## 仅调用接口
44
+ ## Making API calls
45
45
 
46
- 首次使用可以在终端运行交互配置:
46
+ On first use, run interactive setup in your terminal:
47
47
 
48
48
  ```bash
49
49
  openany-dev setup
50
50
  ```
51
51
 
52
- 选择「API 调用」,填写 Key 名称、隐藏输入 API Key,并选择是否设为当前使用的 Key。也可使用 `openany-dev setup --api_key api_key` 直接进入。再次配置时,回车保留已有值,输入新值则更新;敏感值只提示「已配置」,不会回显。配置过程只读写本地文件,不发送请求。取消输入不会保存本次变更。
52
+ Select the API calls option, enter a key label and the API key using masked input, then choose whether to make it the active key. Run `openany-dev setup --api_key api_key` to open this option directly. When updating an existing configuration, press Enter to keep the current value or enter a new value to replace it. The prompt indicates when a sensitive value is already configured without displaying it. Setup reads and writes local files only. Canceling discards the changes.
53
53
 
54
- 将 `OPENANY_DEV_API_KEY` 注入 Agent 的安全凭证环境即可。也可以在终端执行 `openany-dev keys add --label main --activate`,隐藏输入已有 Key;如果环境已注入 Key,该命令直接保存它。无人值守可使用安全 stdin 和 `--stdin`,不要把 Key 放入命令行或日志。
54
+ Set `OPENANY_DEV_API_KEY` in the agent's secure credential environment. You can also run `openany-dev keys add --label main --activate` in a terminal and enter an existing key using masked input. If the key is already set in the environment, the command saves it directly. For unattended setup, pass the key through secure standard input with `--stdin` and keep it out of command arguments and logs.
55
55
 
56
56
  ```bash
57
57
  openany-dev status_check api_key -j
@@ -61,7 +61,7 @@ openany-dev inspect --id API_ID -j
61
61
  openany-dev run --id API_ID --query '{"limit":"10"}' -j
62
62
  ```
63
63
 
64
- API_ID 和参数必须依据实时目录。`status` 只检查本地配置,读取 `configured/missing`;它不会测试网络或 Key 有效性。缺少 Key 时先配置,不能继续发现或探测。用户明确只浏览公开目录时可以 `discover --public`。
64
+ Use the API ID and parameters from the live catalog. `status` checks local configuration and reports `configured/missing` without testing network access or key validity. Configure a key before proceeding with authenticated discovery or inspection. Use `discover --public` when the user explicitly requests public catalog browsing only.
65
65
 
66
66
  `run --headers` accepts `Accept` and `Accept-Language` even when they are absent from the published inputs. Header names are case-insensitive. Published constraints still apply when these headers are declared; other unknown headers and reserved headers remain rejected.
67
67
 
@@ -69,9 +69,20 @@ API_ID 和参数必须依据实时目录。`status` 只检查本地配置,读
69
69
  openany-dev run --id API_ID --headers '{"Accept":"application/json;version=20230203","Accept-Language":"zh-CN"}' -j
70
70
  ```
71
71
 
72
- 余额统一由 `GET /api/v1/agent-api-account` + Bearer API Key 查询,钱包及邮箱 Key 都适用。`run` 自动读取契约、验证参数、查余额并调用网关。`calls list/get` 查询当前 Key 的模型及数据/工具 API 用量记录(需要包含此修复的后端版本)。状态筛选只支持 `--status success` 或 `--status failed`;`--review-required` 不再支持,会在本地明确报错。
72
+ Balance checks use `GET /api/v1/agent-api-account` with a Bearer API key. This works with both wallet and email account keys. `run` reads the API contract, validates parameters, checks the balance, and calls the gateway. `calls list/get` retrieves model, data, and tool API usage records for the current key and requires a backend version that includes this fix. Status filters accept only `--status success` or `--status failed`. Passing `--review-required` produces a local error.
73
73
 
74
- ## 查询调用与费用
74
+ ## Retrieving asynchronous API results
75
+
76
+ When `run -j` returns HTTP 202, read `body.task_id` from its JSON output. Use the same API key and environment as the submission.
77
+
78
+ ```bash
79
+ openany-dev tasks get --id TASK_ID -j
80
+ openany-dev tasks wait --id TASK_ID --timeout-seconds 120 -j
81
+ ```
82
+
83
+ `tasks get` reads the task once. `tasks wait` polls until `status` is `completed`, `failed`, or `timed_out`, then prints the task record, including any available `result` or `artifacts` metadata. Check `status` for the task outcome. The wait defaults to 120 seconds and accepts 1–600 seconds. If the local wait expires, the command returns the latest available snapshot with `timedOut: true`. Run it again with the same task ID to resume reading. Both commands only query the existing task, with no balance check or repeat submission. In Dev, use `openany-dev`.
84
+
85
+ ## Viewing calls and costs
75
86
 
76
87
  ```bash
77
88
  openany-dev calls list --status success --limit 20 -j
@@ -79,13 +90,13 @@ openany-dev calls list --status failed --limit 20 -j
79
90
  openany-dev calls get --id 3535549d4364136631ff21dd06516e0a -j
80
91
  ```
81
92
 
82
- 替换为真实请求 ID。模型追踪 ID 与 UUID 可查询;32 位十六进制 UUID 与带连字符形式等价,其他 ID 精确匹配。`usageType` 区分 `model` / `api`;模型记录返回 `model`、`provider`,`apiId` 为 null。`chargedCostMicroUsd` 为该条用量的微美元金额,`monthlyUsageMicroUsd` 是累计值,不能据此推断某条请求的费用。
93
+ Replace the example ID with the actual request ID. Lookups accept model trace IDs and UUIDs. A 32-character hexadecimal UUID is equivalent to its hyphenated form. Other IDs require an exact match. `usageType` distinguishes `model` from `api`. Model records include `model` and `provider`, with `apiId` set to null. `chargedCostMicroUsd` gives the cost of the individual usage record in microdollars. `monthlyUsageMicroUsd` is cumulative and cannot be used to infer the cost of an individual request.
83
94
 
84
- 列表默认最近 7 天,`--from` / `--to` 使用 UTC 毫秒时间格式,最大跨度 31 天;详情不受列表时间窗口限制。查询范围始终受当前账号和 Key 限制。更新后旧游标需从第一页重取。不存在的审核、结算阶段等元数据保持未知;不支持 `succeeded/ok/pending/error/unknown` 等状态别名。后端发布前,模型记录仍无法通过旧接口查询。
95
+ The list defaults to the past seven days. `--from` and `--to` use UTC timestamps in milliseconds, with a maximum span of 31 days. Detail lookups are independent of the list's time window. All queries are scoped to the current account and key. After upgrading, restart pagination from the first page to get a new cursor. Missing metadata such as review and settlement stages remains unknown. Status aliases such as `succeeded/ok/pending/error/unknown` are unsupported. Model records become available only after the backend update is deployed.
85
96
 
86
- ## 调用模型
97
+ ## Calling models
87
98
 
88
- **0.2.0 升级说明:** 模型调用改为选择目录中的 curl 示例,旧的 `models run --protocol/--mode` 参数不再接受。升级后先用 `models examples` 读取供应商与示例 ID,再用 `--provider`、`--example` 选择请求。音频转写暂不支持。
99
+ **Upgrading to 0.2.0.** Model calls now use curl examples from the catalog. The legacy `models run --protocol/--mode` options are unsupported. After upgrading, run `models examples` to find providers and example IDs, then select a request with `--provider` and `--example`. Audio transcription is currently unsupported.
89
100
 
90
101
  Model examples prefer active playground `curlExample` records for the selected
91
102
  model and provider. Price examples supplement missing method/path pairs; a
@@ -99,13 +110,13 @@ URL path parameters `{model}` and `{provider}` are bound automatically.
99
110
  Concrete conflicting identities still fail validation; ordinary text fields
100
111
  are never rewritten. Refresh example IDs after upgrading.
101
112
 
102
- 先读取模型和供应商对应的 curl 示例:
113
+ First, fetch the curl examples for the model and provider:
103
114
 
104
115
  ```bash
105
116
  openany-dev models examples --model doubao-seedance-2-0-fast --public -j
106
117
  ```
107
118
 
108
- 输出包含每条请求的 `id`、`provider`、请求模板、路径变量和解析错误。将选择的创建请求模板 `request.json` 保存为 `input.json`,按需求填写完整正文;不要把整个示例列表作为输入。
119
+ The output includes each request's `id`, `provider`, request template, path variables, and parsing errors. Save the selected creation request's `request.json` template as `input.json` and fill in the complete body. Use that file as input and leave the rest of the example list out of the request.
109
120
 
110
121
  ```bash
111
122
  openany-dev models run --model doubao-seedance-2-0-fast --provider ByteDance --example CREATE_EXAMPLE_ID -f input.json --dry-run
@@ -113,55 +124,55 @@ openany-dev models run --model doubao-seedance-2-0-fast --provider ByteDance --e
113
124
  openany-dev models run --model doubao-seedance-2-0-fast --provider ByteDance --example QUERY_EXAMPLE_ID --path '{"task_id":"ACTUAL_TASK_ID"}'
114
125
  ```
115
126
 
116
- 从实时 `models examples` 输出复制示例 ID,不能把 `CREATE_EXAMPLE_ID` / `QUERY_EXAMPLE_ID` 原样提交。查询示例必须显式使用 `{task_id}` 变量;`YOUR_TASK_ID` 会报错,不自动猜测替换。任务 ID 由调用者根据服务响应取得;CLI 不自动提取 ID、轮询、重试或下载视频。
127
+ Replace `CREATE_EXAMPLE_ID` and `QUERY_EXAMPLE_ID` with IDs from the current `models examples` output. Query examples must use the explicit `{task_id}` variable. The CLI rejects `YOUR_TASK_ID`. Retrieve the task ID from the service response and pass it explicitly. The caller handles ID extraction, polling, retries, and video downloads.
117
128
 
118
129
  - `--provider` is optional. Multiple examples require `--example`; `--endpoint` only checks the selected path. Refresh IDs after example changes.
119
- - `--input` / `--file` 提供完整 JSON 请求体,必须包含匹配的 `model`(URL 明确包含 `{model}` 时可省略)。不合并示例中的 prompt、messages 或其他默认值。Omit `route.provider` for server-side automatic routing. An explicit `--provider` binds routing; a concrete input provider is preserved and validated against the selected example. Unresolved provider placeholders are removed when no provider is selected.
120
- - `--dry-run` 不需要 Key,仅查询公开目录并输出脱敏后的最终请求,不查询余额或执行模型。正式调用必须配置 API Key。GET 查询不检查余额;POST 创建请求发送前检查余额。
121
- - multipart 目前支持 `/v1/images/edit` 和 `/v1/images/edits`,用 `--attach FIELD=FILE` 明确指定本地文件,可以重复同名字段;示例文件路径不会被读取。标量表单字段用 JSON 输入,数组表示重复字段;`route` 用 JSON 对象。音频转写明确不支持。
122
- - `operations` 和 `parameters` 不再是执行前置条件;`models parameters` 仍可独立查询。`models run` 不接受旧的 `--protocol` / `--mode` 或额外的 `--method` / `--query` / `--headers` 覆盖。
123
- - 解析支持现有 GET、JSON POST、图片编辑 multipart POST,以及引号、续行、注释和重复表单字段。非法 JSON、悬空续行、模型或供应商冲突、未知 curl 选项明确报错,不修正、不执行 shell。`--location` 会显示说明,CLI 仍不自动跟随重定向。
130
+ - `--input` / `--file` supplies the complete JSON request body. Include the matching `model` unless the URL explicitly contains `{model}`. The CLI sends the supplied body without merging the example's prompt, messages, or other defaults. Omit `route.provider` for server-side automatic routing. An explicit `--provider` binds routing; a concrete input provider is preserved and validated against the selected example. Unresolved provider placeholders are removed when no provider is selected.
131
+ - `--dry-run` uses the public catalog and prints the redacted final request without requiring an API key, checking the balance, or calling the model. Live calls require an API key. The CLI checks the balance before POST creation requests and skips that check for GET queries.
132
+ - Multipart requests currently support `/v1/images/edit` and `/v1/images/edits`. Specify each local file explicitly with `--attach FIELD=FILE` and repeat the option as needed for the same field. The CLI never reads file paths from examples. Supply scalar form fields as JSON, use arrays for repeated fields, and provide `route` as a JSON object. Audio transcription is unsupported.
133
+ - Model calls can run without `operations` or `parameters`. You can still query `models parameters` independently. `models run` rejects the legacy `--protocol` and `--mode` options and the `--method`, `--query`, and `--headers` overrides.
134
+ - The parser supports GET, JSON POST, and multipart POST for image edits, including quotes, line continuations, comments, and repeated form fields. It reports invalid JSON, dangling line continuations, model or provider conflicts, and unknown curl options as errors. It neither attempts repairs nor executes shell commands. When it encounters `--location`, it explains that the CLI does not automatically follow redirects.
124
135
 
125
- 详细操作见 [SKILL.md](skills/openany/SKILL.md)。
136
+ See the [skill documentation](skills/openany/SKILL.md) for detailed instructions.
126
137
 
127
- ## 按需启用高级能力
138
+ ## Configuring advanced features
128
139
 
129
- | 能力 | 必需配置 |
130
- | ------------------------ | --------------------------------------------------------------------------------------------------- |
131
- | 普通模型/API 调用 | `OPENANY_DEV_API_KEY` 或已保存的当前 Key |
132
- | 钱包登录、创建/轮换 Key | `OPENANY_DEV_WALLET_ADDRESS`、`OPENANY_DEV_WALLET_PRIVATE_KEY` 或外部签名工具、稳定的 `OPENANY_DEV_AGENT_ID` |
133
- | 邮箱登录、管理 Key | `OPENANY_DEV_EMAIL`、Agent 的邮箱访问权限,必要时选择 workspace |
134
- | 充值 | 目标账户 API Key、对应钱包/邮箱会话、付款钱包和签名能力、明确的网络/单笔与累计额度/scope/有效期 |
140
+ | Feature | Required configuration |
141
+ | --- | --- |
142
+ | Standard model and API calls | `OPENANY_DEV_API_KEY` or a saved active key |
143
+ | Wallet login, key creation, and key rotation | `OPENANY_DEV_WALLET_ADDRESS`, either `OPENANY_DEV_WALLET_PRIVATE_KEY` or an external signer, and a stable `OPENANY_DEV_AGENT_ID` |
144
+ | Email login and key management | `OPENANY_DEV_EMAIL`, authorized mailbox access for the agent, and a workspace selection when required |
145
+ | Top-ups | The target account's API key, the corresponding wallet or email session, a payment wallet and signing capability, and explicit authorization for the network, per-payment and cumulative limits, scope, and expiration |
135
146
 
136
- `openany-dev setup` 在交互终端中提供三个配置场景,也可用以下参数直接选择:
147
+ `openany-dev setup` offers three setup options in an interactive terminal. You can also select one directly with a flag:
137
148
 
138
- - `--api_key api_key`:Key 名称、隐藏输入 API Key、是否激活;更新同名 Key 时替换原值。
139
- - `--wallet_connect wallet`:隐藏输入钱包私钥,自动推导地址,再填写稳定的 Agent ID;已有值可回车保留。不提供外部签名配置选项。保存后按 [SKILL.md](skills/openany/SKILL.md) 的钱包流程继续:首次使用先执行 `openany-dev keys create --identity wallet --label agent-main -j` 自动注册账号,确认 Key 保存成功后再执行 `openany-dev auth wallet -j`;已有对应钱包 Key 时直接登录。
140
- - `--email_login email`:填写邮箱地址;保存后使用 `openany-dev auth email send` 发送验证码,再用 `openany-dev auth email verify --code SIX_DIGITS` 登录。
149
+ - `--api_key api_key` prompts for a key label, the API key using masked input, and whether to activate it. Updating a key with the same label replaces its value.
150
+ - `--wallet_connect wallet` prompts for the wallet private key using masked input, derives the address, and asks for a stable agent ID. Press Enter to keep existing values. This setup option accepts local keys only. After saving, follow the wallet workflow in [the setup guide](skills/openany/setup.md#wallet-login-and-api-key-management). For first-time use, run `openany-dev keys create --identity wallet --label agent-main -j` to register the account automatically, confirm the key was saved, then run `openany-dev auth wallet -j`. If you already have a key for the wallet, log in directly.
151
+ - `--email_login email` prompts for an email address. After saving it, run `openany-dev auth email send` to send a verification code, then run `openany-dev auth email verify --code SIX_DIGITS` to log in.
141
152
 
142
- `openany-dev status_check wallet|email|api_key|payment` 只检查本地配置。参数后的 wallet、email 和 api_key 是固定名称。旧版 `setup --scenario …` 和 `status --scenario …` 均可继续使用,JSON 中的 `scenario` 保留原值。`setup -j`、`setup --non-interactive`、非终端输入、`setup --prepare` 和 `setup --scenario payment` 保留原有只检查行为,不等待输入或保存。外部签名的现有命令检查可加 `--prepare`;充值检查指定 `--identity wallet|email`。配置状态不代表已登录、Key 有效或取得付款授权。
153
+ `openany-dev status_check wallet|email|api_key|payment` checks local configuration only. Use the literal names `wallet`, `email`, and `api_key` where applicable. The legacy `setup --scenario …` and `status --scenario …` forms still work, and the JSON `scenario` field retains its original value. `setup -j`, `setup --non-interactive`, non-terminal input, `setup --prepare`, and `setup --scenario payment` continue to check configuration without waiting for input or saving changes. Add `--prepare` to check an existing external-signing command. For top-up checks, specify `--identity wallet|email`. Configuration status reports only whether local settings are present. Login, key validity, and payment authorization require separate checks.
143
154
 
144
155
  EVM private keys use 64 hexadecimal characters (32 bytes), with or without a `0x` prefix. MetaMask exports can be pasted directly into `setup`; environment-based keys accept both formats too. Solana requires a Base58-encoded 64-byte secret key.
145
156
 
146
- 私钥可通过 `setup` 保存到现有受限凭据文件,也可从 Secret 环境读取。后续命令自动读取本地钱包、Agent ID 和邮箱配置;非空环境变量优先,`setup` 结果中的 `environmentOverrides` 列出覆盖本地配置的变量名。CLI 不连接邮箱:验证码由 Agent 的已授权邮箱工具读取,再交给 `auth email verify --code SIX_DIGITS`。
157
+ Use `setup` to save the private key in the existing restricted credentials file, or supply it through a secure environment variable. Subsequent commands load the local wallet, agent ID, and email settings automatically. Nonempty environment variables take precedence. The `environmentOverrides` field in the setup result lists the names of variables that override local settings. The CLI leaves mailbox access to the agent. Use the agent's authorized mailbox tool to read the verification code, then pass it to `auth email verify --code SIX_DIGITS`.
147
158
 
148
- 钱包命令:`auth wallet`、`keys create|rotate --identity wallet --label LABEL`。外部签名先 `--prepare`,然后以相同命令加 `--challenge-id ID --signature-file FILE`;身份签名文件是原始签名文本。
159
+ Wallet commands include `auth wallet` and `keys create|rotate --identity wallet --label LABEL`. For external signing, first run the command with `--prepare`, then repeat it with `--challenge-id ID --signature-file FILE`. The identity signature file contains the raw signature as text.
149
160
 
150
- 邮箱命令:`auth email send|verify|refresh|workspace`;远端 Key 使用 `keys remote list|get|create|revoke`。邮箱轮换是创建新 Key、切换调用方、验证、撤销旧 Key,CLI 不自动撤销旧 Key。环境 `OPENANY_DEV_API_KEY` 优先于本地 Key,轮换后须同步更新环境 Secret。
161
+ Use `auth email send|verify|refresh|workspace` for email authentication and `keys remote list|get|create|revoke` to manage remote keys. To rotate an email account key, create a new key, switch callers to it, verify it works, and revoke the old key manually. The `OPENANY_DEV_API_KEY` environment variable takes precedence over the local key. Update the environment secret after rotation.
151
162
 
152
- 充值使用 `topups authorize → create → pay → get`,完整命令和外部签名格式见 [SKILL.md](skills/openany/SKILL.md)。额度以实际付款金额含手续费计;待付款订单也占用预留额度。同一 intent 不能更换金额、目标或网络;创建不明用原参数加 `--resume`,付款提交不明只查询。CLI 不执行自动充值循环,也不自动提高授权额度。
163
+ Top-ups use `topups authorize → create → pay → get`. See [the top-up guide](skills/openany/topups.md) for the complete commands and external signature formats. Limits apply to the actual payment amount, including fees. Orders awaiting payment also count against the reserved amount. Each intent fixes the amount, destination, and network. If creation has an uncertain outcome, rerun with the original arguments and `--resume`. If payment submission has an uncertain outcome, query its status only. The CLI leaves repeat top-ups and increases to authorization limits to the caller.
153
164
 
154
- ## 输出、持久化与恢复
165
+ ## Output, persistence, and recovery
155
166
 
156
- - `-j` 输出紧凑 JSON;`-o FILE` 保存结果,拒绝覆盖现有文件。正文 `-i JSON` 或 `-f FILE`,路径/查询/附加头用 JSON 参数。
157
- - 关键错误写入 stderr 并退出 1,包含错误码、说明以及可用的 requestId/status;无自动 HTTP 重试。stdout 不打印 Key 或私钥。
158
- - 本地配置默认 `~/.config/openany-dev/credentials.json`,可由 `OPENANY_DEV_CONFIG_DIR` 指定隔离目录;沿用文件 0600、目录 0700 的权限机制,无新增权限选项。包含 Key、保存的钱包私钥和地址、Agent ID、邮箱、会话、付款策略和 intent,不能提交或分享。文件不额外加密;写入持锁,崩溃遗留锁需确认进程结束后人工清理。
159
- - 服务已完成身份变更但本地保存失败时,会保留恢复文件。仅使用 CLI 返回的路径执行 `auth recover --file PATH`,不要重新发起创建/轮换。
160
- - 支付签名文件为 JSON:EVM `{ "signature": "..." }`,Solana `{ "transaction": "BASE64..." }`。签名工具负责签署 CLI 导出的确切内容。
161
- - SSE 完整接收并验证结束事件后返回,暂不实时显示 token。聚合调用是同步流程,不提供停止任务或通用异步模型轮询。
162
- - 音频生成要求 `-o`;其他二进制响应未指定输出时,保存为受限临时文件并返回路径。
167
+ - `-j` prints compact JSON. `-o FILE` saves the result and refuses to overwrite an existing file. Supply the request body with `-i JSON` or `-f FILE` and use JSON arguments for path parameters, query parameters, and additional headers.
168
+ - Critical errors go to stderr and exit with status 1. They include an error code, a description, and the `requestId` and `status` when available. HTTP requests are never retried automatically. Stdout excludes API keys and private keys.
169
+ - The default local configuration path is `~/.config/openany-dev/credentials.json`. Set `OPENANY_DEV_CONFIG_DIR` to use an isolated directory. The existing permissions remain mode 0600 for files and 0700 for directories, with no additional permission options. Keep the file private and out of version control. It contains keys, any saved wallet private key and address, the agent ID, email, sessions, payment policies, and intents. The file has no additional encryption. Writes hold a lock. If a crash leaves a stale lock, confirm the process has exited before removing it manually.
170
+ - If the service completes an identity change and local saving fails, the CLI keeps a recovery file. Run `auth recover --file PATH` with the exact path returned by the CLI. Avoid resubmitting the creation or rotation request.
171
+ - Payment signature files use JSON. Use `{ "signature": "..." }` for EVM and `{ "transaction": "BASE64..." }` for Solana. The signing tool must sign exactly what the CLI exports.
172
+ - SSE returns after the CLI receives the complete stream and validates the end event. Live token display is currently unavailable. Asynchronous data and tool APIs can return a task receipt. For asynchronous model requests, use the published GET example. Task cancellation is unavailable.
173
+ - Audio generation requires `-o`. For other binary responses without an output path, the CLI writes to a temporary file with restricted permissions and returns its path.
163
174
 
164
- ## 验证与部署边界
175
+ ## Verification and deployment
165
176
 
166
177
  ```bash
167
178
  npm test
@@ -169,20 +180,20 @@ npm run check
169
180
  npm pack --dry-run
170
181
  ```
171
182
 
172
- 测试使用注入的 HTTP transport 和无资金的固定测试密钥,覆盖缺 Key 零网络请求、契约、身份隔离、真实本地签名、充值额度及不确定结果恢复。不进行实际付款、数据库修改或收费 API 测试。
183
+ Tests use an injected HTTP transport and fixed, unfunded test keys. They cover zero network requests when the API key is missing, contracts, identity isolation, real local signing, top-up limits, and recovery from uncertain outcomes. They run without making real payments, modifying databases, or calling paid APIs.
173
184
 
174
- 后端签名域必须配置为 `https://dev.openany.si`。仓库 Dockerfile 默认值同步修改不等于在线服务已部署;旧域冻结订单不能由 CLI 改签名域绕过验证。部署前应处理原有订单和环境覆盖项。
185
+ The backend signing origin must be `https://dev.openany.si`. Deploy the service for changes to Dockerfile defaults to take effect. Orders locked to the previous origin remain subject to signature verification against that origin. Reconcile existing orders and environment overrides before deployment.
175
186
 
176
187
  ## Skill documentation maintenance
177
188
 
178
- `skills/openany/SKILL.md` is the source for the packaged skill and the website copies. After updating it, synchronize the website checkout and verify the result:
189
+ `SKILL.md`, `setup.md`, `calls.md`, and `topups.md` in `skills/openany` are the packaged English skill and the source for the website copies. After updating any of them, synchronize the website checkout and verify the result:
179
190
 
180
191
  ```bash
181
192
  npm run sync:skill -- ../openany-interface/openany-interface
182
193
  npm run sync:skill -- ../openany-interface/openany-interface --check
183
194
  ```
184
195
 
185
- The path must point to the `openany-web` project. The command validates that the skill uses the latest CLI release channel and updates `public/SKILL.md` and `docs/skills/openany/SKILL.md`. In the website checkout, run `npm run check:agent-docs` to verify that guides and client recipes also use the latest release channel without pinning a CLI version. Website builds run that check automatically. Commit both repositories together for a documentation release; these commands do not publish packages or deploy the website.
196
+ The path must point to the `openany-web` project. The command validates that the skill uses the latest CLI release channel and updates the entry and three guides under `public/` and `docs/skills/openany/`. In the website checkout, run `npm run check:agent-docs` to verify that guides and client recipes also use the latest release channel without pinning a CLI version. Website builds run that check automatically. Commit both repositories together for a documentation release; these commands do not publish packages or deploy the website.
186
197
 
187
198
  ### New email registration
188
199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openany-cli-dev",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "OpenAny command-line client for internal dev testing",
5
5
  "type": "module",
6
6
  "engines": {