@volcengine/ark-cli-darwin-arm64 0.0.0-stage → 1.0.46-prerelease.2e2d76ea86c4

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 (171) hide show
  1. package/LICENSE +201 -0
  2. package/bin/arkcli-darwin-arm64 +4 -0
  3. package/manifest.json +37 -0
  4. package/package.json +20 -4
  5. package/skills/arkcli-agent/SKILL.md +197 -0
  6. package/skills/arkcli-agent/references/activation.md +23 -0
  7. package/skills/arkcli-agent/references/agent.md +442 -0
  8. package/skills/arkcli-agent/references/byok.md +74 -0
  9. package/skills/arkcli-agent/references/context-management.md +61 -0
  10. package/skills/arkcli-agent/references/debug-export.md +27 -0
  11. package/skills/arkcli-agent/references/dream.md +91 -0
  12. package/skills/arkcli-agent/references/evals.md +215 -0
  13. package/skills/arkcli-agent/references/events-chat.md +192 -0
  14. package/skills/arkcli-agent/references/interfaces-gaps.md +55 -0
  15. package/skills/arkcli-agent/references/mcp-vault.md +111 -0
  16. package/skills/arkcli-agent/references/model-config.md +46 -0
  17. package/skills/arkcli-agent/references/self-hosted.md +47 -0
  18. package/skills/arkcli-agent/references/session-files.md +157 -0
  19. package/skills/arkcli-agent/references/session-upgrade.md +64 -0
  20. package/skills/arkcli-agent/references/skills.md +94 -0
  21. package/skills/arkcli-agent/references/todo-write.md +37 -0
  22. package/skills/arkcli-agent/references/vision-agent.md +92 -0
  23. package/skills/arkcli-api-explorer/SKILL.md +114 -0
  24. package/skills/arkcli-api-explorer/references/arkcli-api.md +185 -0
  25. package/skills/arkcli-api-explorer/references/evals.md +92 -0
  26. package/skills/arkcli-auth/SKILL.md +127 -0
  27. package/skills/arkcli-auth/references/api-key-query.md +74 -0
  28. package/skills/arkcli-auth/references/arkcli-auth-init-volc.md +58 -0
  29. package/skills/arkcli-auth/references/arkcli-auth-login.md +125 -0
  30. package/skills/arkcli-auth/references/arkcli-auth-status.md +41 -0
  31. package/skills/arkcli-auth/references/arkcli-auth-whoami.md +128 -0
  32. package/skills/arkcli-auth/references/auth-modes.md +101 -0
  33. package/skills/arkcli-auth/references/identity-resolution.md +74 -0
  34. package/skills/arkcli-auth/references/realname-gate.md +23 -0
  35. package/skills/arkcli-auth/scripts/key-metadata.jq +34 -0
  36. package/skills/arkcli-billing/SKILL.md +105 -0
  37. package/skills/arkcli-billing/references/arkcli-billing-list.md +247 -0
  38. package/skills/arkcli-billing/references/evals.md +50 -0
  39. package/skills/arkcli-chat/SKILL.md +229 -0
  40. package/skills/arkcli-chat/references/arkcli-chat.md +300 -0
  41. package/skills/arkcli-chat/references/caching-thinking.md +138 -0
  42. package/skills/arkcli-chat/references/chat-meta.md +77 -0
  43. package/skills/arkcli-chat/references/evals.md +60 -0
  44. package/skills/arkcli-chat/references/stream-events.md +163 -0
  45. package/skills/arkcli-chat/references/text-format.md +160 -0
  46. package/skills/arkcli-chat/references/tools.md +130 -0
  47. package/skills/arkcli-code-example/SKILL.md +73 -0
  48. package/skills/arkcli-code-example/assets/demo-code/examples.json +14 -0
  49. package/skills/arkcli-code-example/assets/demo-code/go/main.go +53 -0
  50. package/skills/arkcli-code-example/assets/demo-code/python.py +26 -0
  51. package/skills/arkcli-code-example/references/arkcli-code-example.md +146 -0
  52. package/skills/arkcli-code-example/references/evals.md +12 -0
  53. package/skills/arkcli-config/SKILL.md +129 -0
  54. package/skills/arkcli-config/references/arkcli-config-init.md +49 -0
  55. package/skills/arkcli-config/references/arkcli-config-profile.md +54 -0
  56. package/skills/arkcli-config/references/evals.md +87 -0
  57. package/skills/arkcli-connect/SKILL.md +62 -0
  58. package/skills/arkcli-connect/references/arkcli-connect.md +129 -0
  59. package/skills/arkcli-connect/references/evals.md +117 -0
  60. package/skills/arkcli-custommodel/SKILL.md +177 -0
  61. package/skills/arkcli-custommodel/references/arkcli-custommodel-available-quantizations.md +28 -0
  62. package/skills/arkcli-custommodel/references/arkcli-custommodel-delete.md +36 -0
  63. package/skills/arkcli-custommodel/references/arkcli-custommodel-get.md +45 -0
  64. package/skills/arkcli-custommodel/references/arkcli-custommodel-list.md +72 -0
  65. package/skills/arkcli-custommodel/references/arkcli-custommodel-quantize.md +58 -0
  66. package/skills/arkcli-custommodel/references/arkcli-custommodel-update.md +47 -0
  67. package/skills/arkcli-custommodel/references/arkcli-custommodel-upload.md +60 -0
  68. package/skills/arkcli-custommodel/references/evals.md +58 -0
  69. package/skills/arkcli-datasets/SKILL.md +41 -0
  70. package/skills/arkcli-datasets/references/commands.md +91 -0
  71. package/skills/arkcli-datasets/references/evals.md +30 -0
  72. package/skills/arkcli-deploy/SKILL.md +128 -0
  73. package/skills/arkcli-deploy/references/arkcli-deploy.md +138 -0
  74. package/skills/arkcli-deploy/references/evals.md +117 -0
  75. package/skills/arkcli-docs/SKILL.md +232 -0
  76. package/skills/arkcli-docs/references/commands.md +225 -0
  77. package/skills/arkcli-docs/references/evals.md +200 -0
  78. package/skills/arkcli-docs/references/failure-modes.md +77 -0
  79. package/skills/arkcli-doctor/CONTRIBUTING.md +202 -0
  80. package/skills/arkcli-doctor/SKILL.md +302 -0
  81. package/skills/arkcli-doctor/references/error-codes.md +504 -0
  82. package/skills/arkcli-doctor/references/evals.md +70 -0
  83. package/skills/arkcli-doctor/references/scope-account.md +205 -0
  84. package/skills/arkcli-doctor/references/scope-cli.md +217 -0
  85. package/skills/arkcli-doctor/references/scope-infer-endpoint.md +214 -0
  86. package/skills/arkcli-doctor/references/scope-metrics.md +197 -0
  87. package/skills/arkcli-doctor/references/scope-model.md +241 -0
  88. package/skills/arkcli-doctor/references/scope-report.md +242 -0
  89. package/skills/arkcli-doctor/references/verify-origin.md +142 -0
  90. package/skills/arkcli-gen/SKILL.md +348 -0
  91. package/skills/arkcli-gen/references/arkcli-gen-audio.md +125 -0
  92. package/skills/arkcli-gen/references/arkcli-gen.md +297 -0
  93. package/skills/arkcli-gen/references/evals.md +93 -0
  94. package/skills/arkcli-gen/references/gen-meta.md +182 -0
  95. package/skills/arkcli-gen/references/image-stream.md +105 -0
  96. package/skills/arkcli-gen/references/intent-and-validation.md +177 -0
  97. package/skills/arkcli-helper/SKILL.md +233 -0
  98. package/skills/arkcli-helper/references/arkcli-helper.md +372 -0
  99. package/skills/arkcli-helper/references/evals.md +110 -0
  100. package/skills/arkcli-infer-endpoint/SKILL.md +141 -0
  101. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-create.md +142 -0
  102. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-delete.md +68 -0
  103. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-get.md +60 -0
  104. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-list.md +142 -0
  105. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-start.md +34 -0
  106. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-stop.md +34 -0
  107. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-update.md +76 -0
  108. package/skills/arkcli-infer-endpoint/references/evals.md +24 -0
  109. package/skills/arkcli-models/SKILL.md +314 -0
  110. package/skills/arkcli-models/references/arkcli-models-activate.md +110 -0
  111. package/skills/arkcli-models/references/arkcli-models-get.md +100 -0
  112. package/skills/arkcli-models/references/arkcli-models-list.md +73 -0
  113. package/skills/arkcli-models/references/arkcli-models-performance.md +32 -0
  114. package/skills/arkcli-models/references/arkcli-models-scenario-table.md +83 -0
  115. package/skills/arkcli-models/references/arkcli-models-search.md +208 -0
  116. package/skills/arkcli-models/references/evals.md +88 -0
  117. package/skills/arkcli-onboard/SKILL.md +81 -0
  118. package/skills/arkcli-onboard/references/evals.md +107 -0
  119. package/skills/arkcli-plans/SKILL.md +208 -0
  120. package/skills/arkcli-plans/references/arkcli-plans-agreement-signing.md +74 -0
  121. package/skills/arkcli-plans/references/arkcli-plans-buy.md +209 -0
  122. package/skills/arkcli-plans/references/arkcli-plans-get.md +96 -0
  123. package/skills/arkcli-plans/references/arkcli-plans-harness-status.md +149 -0
  124. package/skills/arkcli-plans/references/arkcli-plans-model-apply.md +56 -0
  125. package/skills/arkcli-plans/references/arkcli-plans-model-list.md +119 -0
  126. package/skills/arkcli-plans/references/arkcli-plans-personal-rotate-apikey.md +83 -0
  127. package/skills/arkcli-plans/references/arkcli-plans-renew.md +134 -0
  128. package/skills/arkcli-plans/references/arkcli-plans-team-rotate-apikey.md +108 -0
  129. package/skills/arkcli-plans/references/arkcli-plans-team-seat-assign.md +142 -0
  130. package/skills/arkcli-plans/references/arkcli-plans-team-seat-list.md +115 -0
  131. package/skills/arkcli-plans/references/evals.md +224 -0
  132. package/skills/arkcli-pricing/SKILL.md +125 -0
  133. package/skills/arkcli-pricing/references/arkcli-pricing-models.md +260 -0
  134. package/skills/arkcli-pricing/references/arkcli-pricing-plans.md +147 -0
  135. package/skills/arkcli-profile/SKILL.md +188 -0
  136. package/skills/arkcli-profile/references/arkcli-profile-create.md +101 -0
  137. package/skills/arkcli-profile/references/arkcli-profile-keys.md +100 -0
  138. package/skills/arkcli-profile/references/arkcli-profile-set-default.md +81 -0
  139. package/skills/arkcli-profile/references/evals.md +5 -0
  140. package/skills/arkcli-resources/SKILL.md +122 -0
  141. package/skills/arkcli-resources/references/arkcli-resources-list.md +140 -0
  142. package/skills/arkcli-shared/SKILL.md +236 -0
  143. package/skills/arkcli-shared/references/execution-context.md +108 -0
  144. package/skills/arkcli-shared/references/global-flags.md +45 -0
  145. package/skills/arkcli-shared/references/profile-defaults.md +57 -0
  146. package/skills/arkcli-shared/references/troubleshooting.md +36 -0
  147. package/skills/arkcli-shared/references/update.md +72 -0
  148. package/skills/arkcli-train-finetune/SKILL.md +123 -0
  149. package/skills/arkcli-train-finetune/references/ark-finetune-sdk.md +133 -0
  150. package/skills/arkcli-train-finetune/references/create.md +262 -0
  151. package/skills/arkcli-train-finetune/references/download.md +44 -0
  152. package/skills/arkcli-train-finetune/references/evals.md +14 -0
  153. package/skills/arkcli-train-finetune/references/export-deploy.md +177 -0
  154. package/skills/arkcli-train-finetune/references/job-configuration.md +122 -0
  155. package/skills/arkcli-train-finetune/references/list.md +78 -0
  156. package/skills/arkcli-train-finetune/references/manage.md +128 -0
  157. package/skills/arkcli-train-finetune/references/rl-plugins.md +77 -0
  158. package/skills/arkcli-train-finetune/references/testing-debug-monitoring.md +137 -0
  159. package/skills/arkcli-understand/SKILL.md +131 -0
  160. package/skills/arkcli-understand/references/arkcli-understand-asr.md +53 -0
  161. package/skills/arkcli-understand/references/arkcli-understand.md +268 -0
  162. package/skills/arkcli-understand/references/evals.md +119 -0
  163. package/skills/arkcli-understand/references/sub-skills.md +141 -0
  164. package/skills/arkcli-usage/SKILL.md +166 -0
  165. package/skills/arkcli-usage/references/arkcli-usage-balance.md +217 -0
  166. package/skills/arkcli-usage/references/arkcli-usage-plan-details.md +136 -0
  167. package/skills/arkcli-usage/references/arkcli-usage-plan.md +166 -0
  168. package/skills/arkcli-usage/references/arkcli-usage-seats.md +194 -0
  169. package/skills/arkcli-usage/references/arkcli-usage-stats.md +195 -0
  170. package/skills/arkcli-usage/references/evals.md +30 -0
  171. package/README.md +0 -3
@@ -0,0 +1,209 @@
1
+ # plans buy
2
+
3
+ > **前置条件:** 先阅读 [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) 了解认证、全局参数和安全规则。
4
+
5
+ > **⚠️ 写操作 + 计费:** `plans buy` 强制 `IsAutoPay=true`,加 `--yes` 调用成功即真实扣款。**不要替用户做选择**:`--plan`、`--type`、`--duration`、团队版 `--quantity` 必须由用户明确给出。
6
+
7
+ > **🔒 协议闸门 (强制流程,agent 必须遵守):** 不传 `--yes` 时,本命令**不下单**,只返协议清单。Agent **必须**:
8
+ > 1. 拿到 `agreements` 数组后,把每条协议的 `title` 和 `url` **逐条**展示给最终用户
9
+ > 2. 等待用户**明确表达**"已阅读并同意全部协议"(不能用模糊措辞默认同意)
10
+ > 3. 用户同意后才能加 `--yes` 重跑 `next_step` 字段里的命令
11
+ >
12
+ > **禁止**在用户没看过协议的情况下直接补 `--yes`。这是合规要求,跟 frontend 购买面板的 "我已阅读并同意《...》" checkbox 等价。
13
+
14
+ ## 三种调用形态
15
+
16
+ | 形态 | 行为 | 何时用 |
17
+ |---|---|---|
18
+ | 不传 `--yes` 不传 `--estimate` | **协议闸门**:返协议清单 + **价格** + `next_step`,内部走 EstimatePrice,**不下单** | 默认引导步骤;agent 走这个一次拿"协议 + 价格" |
19
+ | `--estimate` (无论是否带 `--yes`) | **在线询价**:调 EstimatePrice,返价格,**不下单** | 跟闸门重叠,留作脚本"只询价不看协议"的快捷出口 |
20
+ | `--yes` 不带 `--estimate` | **真下单**:`IsAutoPay=true` 自动扣款 | 用户已确认协议 + 价格,真下单 |
21
+
22
+ > **闸门里已经包含价格** — 不需要先 `--estimate` 再看协议。一次调用同时拿到 `agreements` + `total_amount_cny` + `original_amount_cny`;展示后等待明确同意,再走 `next_step`。
23
+
24
+ ## 收参与协议披露模板
25
+
26
+ 先读本 reference,再构造第一条命令。家族与个人/团队共同映射为 `--plan`,档位映射为 `--type`,团队席位数映射为 `--quantity`;不能发明 `--product`、`--edition` 或 `--tier`。
27
+
28
+ 一次只问一个尚未确定的决策;已提供的值不重复问。按以下顺序展开,不能在家族未定时混列两家的档位:
29
+
30
+ 1. 家族:Agent Plan(智能体任务)/Coding Plan(AI 编程工具)。
31
+ 2. 版本与档位:已选家族的个人版合法档位,或一个团队版入口。个人版一次选择确定版本和档位;选团队版后,再单问同家族档位,然后单问席位数,不同时把后续层选项堆进当前问题。
32
+ 3. 时长:提供 1/3/6/12 个月快捷选项;用户明确给出其他 1–12 的整数仍合法,不能强改为快捷值。
33
+ 4. 收齐参数后进入协议闸门。续费使用 [renew](arkcli-plans-renew.md) 的短决策链,不重新询问档位或购买数量。
34
+
35
+ 每个档位选项的说明必须包含当前价格、典型场景及关键限制,按下文权益说明填充;团队数量是席位数,不是月份。没有可靠当前权益数据就明确标注未知,不捏造价格或资格。
36
+
37
+ 协议披露使用以下结构,**所有占位符都取本次返回值**,不要复用历史询价或把协议缩写为“相关条款”:
38
+
39
+ ```text
40
+ 协议确认
41
+ 购买/续费:<plan> / <tier>,<duration> 个月
42
+ 数量/目标席位:<quantity 或 seat_ids;个人版注明不适用>
43
+ 本次实付:¥<total_amount_cny>(有原价时同时列原价)
44
+ 请阅读以下全部协议:
45
+ - [<agreements[0].title>](<agreements[0].url>)
46
+ - ... 按返回顺序逐条列出,不截断
47
+ 明确同意全部协议后,继续执行将按上述实付价格自动扣款。
48
+ 继续:已阅读并同意全部协议;停止:取消购买/续费。
49
+ ```
50
+
51
+ 必须实际等待用户回应。拒绝、取消、空答案、未回答、工具拒绝或模糊回应均不放行;不得代答或自行加 `--yes`。宿主支持结构化交互时在其正文中完整展示这些信息;具体 question、授权 Pane / Web Widget 的分工以共享宿主协议为准。工具执行 permission 不等于同意业务协议,协议同意也不等于已取得工具执行授权。价格、套餐或席位变化后须重新披露并确认。
52
+
53
+ ## 命令
54
+
55
+ ```bash
56
+ # 第 1 步: 引导 (不传 --yes) — 拿到协议清单
57
+ arkcli plans buy --plan agent-plan --type small --duration 1
58
+
59
+ # 第 2 步 (可选): 询价
60
+ arkcli plans buy --plan agent-plan --type small --duration 1 --estimate
61
+
62
+ # 第 3 步: 用户阅读并同意全部协议后, 真下单
63
+ arkcli plans buy --plan agent-plan --type small --duration 1 --yes
64
+
65
+ # 团队版各档位示例
66
+ arkcli plans buy --plan agent-plan-team --type medium --duration 2 --quantity 5 --yes
67
+ arkcli plans buy --plan coding-plan-team --type pro --quantity 10 --yes
68
+ ```
69
+
70
+ ## 参数
71
+
72
+ ### 档位选项的业务说明
73
+
74
+ 不能只让用户在裸 `small/pro` 等名称中盲选。每个档位选项应说明**价格、典型场景、关键限制**;已明确的参数不再问,Agent 与 Coding 的档位不能混在同一组。
75
+
76
+ 价格先复用本轮 `pricing plans` 的对应产品/版本/档位记录,没有时按 [pricing plans](../../arkcli-pricing/references/arkcli-pricing-plans.md) 查询;带 `error` 的记录不是零元档。团队价不能套个人价,多月和多席位最终以本次协议闸门的 `total_amount_cny` 为准。
77
+
78
+ 以下保留 Vaka 1.0.32 业务说明的场景和权益对照,**数值及视频资格是历史核对基线,不是当前权益承诺**:
79
+
80
+ | 家族 / 个人档位 | 典型场景 | 原业务说明的权益基线(使用前核对) |
81
+ | --- | --- | --- |
82
+ | Coding / `lite` | 中等强度开发、一般开发任务 | AI 编程工具场景;价格以当前查询为准 |
83
+ | Coding / `pro` | 复杂项目、高强度开发 | AI 编程工具场景;价格以当前查询为准 |
84
+ | Agent / `small` | 轻量体验 | ¥40/月、20,000 AFP、不支持视频生成 |
85
+ | Agent / `medium` | 1–2 个项目并行的参考档位 | ¥200/月、100,000 AFP、支持视频生成 |
86
+ | Agent / `large` | 2 个以上项目并行的参考档位 | ¥500/月、250,000 AFP |
87
+ | Agent / `max` | 2 个以上项目并行、较高额度需求 | ¥1,000/月、500,000 AFP |
88
+
89
+ - 场景是选择参考,不是并发数或任务成功保证。团队版沿用同家族档位集合,但计价与权益按当前团队商品核对,不直接套个人 AFP。
90
+ - 当前价格用查询返回;AFP、视频资格和使用限制用当前明确返回或官方权益条款核对,`pricing plans` 只有价格时不能声称已核实全部权益。未取得当前证据的项在选项说明中标“待核实”,不把历史值写成当前可用额度。
91
+ - 当前 AFP 快照与上述历史基线不同,只能报告两者数值、查询时间和范围;没有订单周期或官方折算规则的证据,不得推断是按剩余天数折算、赠送、升降档或权益缩水。
92
+ - Coding 的适用场景不能简化成“技术上完全没有 API”:客户端接入方式、套餐允许用途和实际 API 支持分别核对,不能用一把 Key 能调通推导任意用途都合规。
93
+ - 宿主使用结构化选项时将这些信息放进 `option.description`;普通终端用等价简短文字。参数已完整时跳过收参,但不跳过协议和价格披露。
94
+
95
+ ### 参数表
96
+
97
+ | 参数 | 必填 | 类型 | 说明 |
98
+ |------|------|------|------|
99
+ | `--plan` | 是 | string | `agent-plan` / `coding-plan` / `agent-plan-team` / `coding-plan-team` |
100
+ | `--type` | 是 | string | tier 档位:agent-plan* 取 `small/medium/large/max`;coding-plan* 取 `lite/pro` |
101
+ | `--duration` | 否 | int | 订阅时长(月),1-12,默认 1 |
102
+ | `--quantity` | 团队版 必填 | int | 席位数量(≥1);个人版传了会被忽略 |
103
+ | `--yes` | 否 | bool | 跳过协议闸门,真下单 (`IsAutoPay=true`) |
104
+
105
+ `--plan` 与 `--type` 兼容性:
106
+
107
+ | Plan 系 | 合法 tier |
108
+ |---|---|
109
+ | agent-plan / agent-plan-team | small, medium, large, max |
110
+ | coding-plan / coding-plan-team | lite, pro |
111
+
112
+ ## 返回值 (协议闸门, 默认形态)
113
+
114
+ 不传 `--yes` 不传 `--estimate` 时:
115
+
116
+ ```json
117
+ {
118
+ "status": "agreement_required",
119
+ "plan": "agent-plan",
120
+ "tier": "small",
121
+ "duration": 1,
122
+ "echo": {"plan": "agent-plan", "tier": "small", "duration": 1},
123
+ "agreements": [
124
+ {"title": "火山引擎数据授权协议", "url": "https://www.volcengine.com/docs/82379/1928265"},
125
+ {"title": "方舟平台专用条款", "url": "https://www.volcengine.com/docs/82379/1104498"},
126
+ {"title": "免责声明", "url": "https://www.volcengine.com/docs/82379/1108564"},
127
+ {"title": "豆包模型服务协议", "url": "https://www.volcengine.com/docs/82379/1142195"},
128
+ {"title": "开源模型许可证", "url": "https://www.volcengine.com/docs/82379/1454060"},
129
+ {"title": "语音模型服务协议", "url": "https://www.volcengine.com/docs/6561/1866421?lang=zh"},
130
+ {"title": "Harness权益说明和产品专用条款", "url": "https://www.volcengine.com/docs/82379/2516291?lang=zh"}
131
+ ],
132
+ "total_amount_cny": 99.5,
133
+ "original_amount_cny": 100.0,
134
+ "confirm_text": "下单将立即扣款 (IsAutoPay=true)。请把上述协议链接展示给最终用户...",
135
+ "next_step": "arkcli plans buy --plan agent-plan --type small --duration 1 --yes"
136
+ }
137
+ ```
138
+
139
+ **闸门同时返回价格**:`total_amount_cny`(实付)+ `original_amount_cny`(原价,有折扣时低于原价)。Agent 应该把价格 + 协议一起展示给用户。
140
+
141
+ **`agreements` 数组按 plan 类型不同**(agent-plan 系含 Harness 协议;团队版多一条对应套餐专用条款,不带《数据授权协议》)。**直接用返回值里的清单**,不要替换或省略。
142
+
143
+ ## 返回值 (真下单)
144
+
145
+ 加 `--yes` 后:
146
+
147
+ ```json
148
+ {
149
+ "status": "success",
150
+ "plan": "agent-plan-team",
151
+ "tier": "medium",
152
+ "duration": 2,
153
+ "quantity": 5,
154
+ "order_number": "ORD-...",
155
+ "instance_id": "ins-...",
156
+ "seat_ids": ["seat-...", "seat-..."]
157
+ }
158
+ ```
159
+
160
+ `seat_ids` 仅团队版填充。
161
+
162
+ ## 失败语义
163
+
164
+ **失败类型要分清;已确认的参数不得重新收集:**
165
+
166
+ 1. **transport error**:返回普通 error,但超时、断连或未解析出订单字段不能证明订单没落库/没扣钱。先核对订单状态;不得仅因失败退出就自动重新下单。
167
+ 2. **payment_failed**(订单**已**落库但支付未完成):典型如余额不足。返回 `output.ErrWithHint` envelope:
168
+ ```json
169
+ {
170
+ "ok": false,
171
+ "error": {
172
+ "type": "payment_failed",
173
+ "message": "INSUFFICIENT_BALANCE_ERROR",
174
+ "hint": "Order ID: ORD-...; please complete the payment manually in console"
175
+ }
176
+ }
177
+ ```
178
+ exit code = 5(`ExitAPI`)。**用户必须去 console 手动补单或取消订单**,不要在 CLI 重试 `plans buy`(会重复下单)。
179
+
180
+ 团队版 dangling:第一步 `CreateSeatInfo` 成功 + 第二步 trade 失败 → hint 里会带 `(Created seats: seat-001,seat-002; bound to the unpaid order above.)`,**席位资源已生成**,不会自动清理。
181
+
182
+ 3. **`ProductStockNotEnough`(商品库存不足)**:不是用户参数填错。不自动重试,不重新问 plan / tier / 时长 / 席位数,不擅自换档或拆单;说明库存不足,保留已返回的 Order ID / SeatID,引导到对应 Agent Plan / Coding Plan 控制台页面处理。没有返回订单号只表示本次响应未提供订单号,不能据此宣称订单未落库、没有扣款或无需补付/取消;是否已有订单须核对控制台记录。GUI 只是后续处理入口,不表示购买已成功或页面一定有库存;Vaka 的卡片格式见主 Skill 宿主说明。
183
+
184
+ transport error、库存不足、支付失败都保留本轮已确认参数。只有用户主动改变购买目标时才重新收集变更项;不得为了“恢复流程”再次创建收费订单。
185
+
186
+ ## 常见错误
187
+
188
+ | 错误 | 原因 | 处理 |
189
+ |------|------|------|
190
+ | `--plan must be one of ...` | 拼错 plan key | 严格用 4 选 1 |
191
+ | `--type %q not allowed for --plan %q` | tier 跟 plan 不兼容 | 见上方表格 |
192
+ | `--quantity is required for team plans` | 团队版漏传 | 加 `--quantity N` |
193
+ | `--duration must be 1..12` | 越界 | 1-12 之间 |
194
+ | `payment_failed` envelope | 余额不足 / auto-pay 失败 | 去 console 补单,不要 CLI 重试 |
195
+ | `ProductStockNotEnough` | 商品库存不足 | 不重试、不重问参数;转对应套餐控制台处理,保留已有订单/席位信息 |
196
+
197
+ ## 注意事项
198
+
199
+ - **真实扣款**:CLI 没有 "下单不支付" 模式;要询价用 `--estimate`,不得为了验证流程擅自换轻档位真实试买
200
+ - 团队版下单后席位会以 `BillingStatus=Running` 状态出现,但**没绑定子用户**;后续走 [`plans team seat-assign`](arkcli-plans-team-seat-assign.md) 分配
201
+ - 重试要谨慎:`payment_failed` 的订单**已经在服务端**,重跑会再开一单
202
+
203
+ ## 参考
204
+
205
+ - [arkcli-plans](../SKILL.md) -- skill 概览
206
+ - [`plans renew`](arkcli-plans-renew.md) -- 续费已有套餐
207
+ - [`plans get`](arkcli-plans-get.md) -- 下单后查持有状态
208
+ - [`plans team seat-assign`](arkcli-plans-team-seat-assign.md) -- 团队版下单后绑定子用户
209
+ - [arkcli-shared](../../arkcli-shared/SKILL.md)
@@ -0,0 +1,96 @@
1
+ # plans get
2
+
3
+ > **前置条件:** 先阅读 [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) 了解认证、全局参数和安全规则。
4
+
5
+ > **范围限制:** `plans get` 只回答"我**持有**哪些套餐 + 状态(Effective/Running/...)",**不回答"用了多少 / 还剩多少 / 几号刷新 / 按模型拆分"**。配额查询走:
6
+ > - `arkcli usage plan` —— 完整版,含 used / total / percent / reset_at + 多周期(5h/daily/weekly/monthly)
7
+ > - `arkcli usage balance --type plan` —— 精简版(同数据源)
8
+ > - `arkcli usage plan-details` —— AgentPlan 按模型 × 套餐内/外的时间序列
9
+ >
10
+ > 详见 [`../../arkcli-usage/SKILL.md`](../../arkcli-usage/SKILL.md)。
11
+
12
+ 一次性返回当前账号下**实际持有**的套餐:Agent Plan / Coding Plan 的个人版 + 团队版聚合。读操作,无副作用。
13
+
14
+ ## 命令
15
+
16
+ ```bash
17
+ arkcli plans get
18
+ ```
19
+
20
+ ## 参数
21
+
22
+ 零参数。所有 4 路 plan(agent-plan / agent-plan-team / coding-plan / coding-plan-team)一次并发拉取。
23
+
24
+ ## 返回值
25
+
26
+ ```json
27
+ {
28
+ "plans": [
29
+ {
30
+ "key": "agent-plan",
31
+ "name": "Agent Plan",
32
+ "scope": "personal",
33
+ "tier": "small",
34
+ "status": "Effective"
35
+ },
36
+ {
37
+ "key": "agent-plan-team",
38
+ "name": "Agent Plan Team",
39
+ "scope": "team",
40
+ "tier": "medium",
41
+ "status": "Running",
42
+ "seat_id": "seat-..."
43
+ }
44
+ ]
45
+ }
46
+ ```
47
+
48
+ | 字段 | 出现条件 | 含义 |
49
+ |------|---------|------|
50
+ | `key` | always | 稳定标识:agent-plan / agent-plan-team / coding-plan / coding-plan-team |
51
+ | `scope` | always | personal / team |
52
+ | `tier` | 持有时 | 个人版:small/medium/large/max(agent)或 lite/pro(coding);团队版:当前用户席位的 tier |
53
+ | `status` | 持有时 | 个人版:Effective / Pending / Expired 等;团队版:Running |
54
+ | `seat_id` | 团队版独有 | 当前用户在该 Scene 下的席位 ID(团队版才有) |
55
+ | `error` | 调用失败时 | API 透出诊断信息;跟 tier/status 互斥 |
56
+
57
+ **没持有的套餐 / Reclaimed 历史订阅 / 团队版无席位** 会被过滤掉,不出现在数组里。
58
+
59
+ ## 行为细节
60
+
61
+ - 内部并发拉 `ListSubscribeTrade`(个人版)+ `GetSeatInfo`(团队版)
62
+ - 任一 plan 失败不阻塞其它 plan:失败项保留在数组里,带 `error` 字段
63
+ - 团队版仅识别 `BillingStatus=Running` 的有效席位,历史席位(Pending/Expired/Reclaimed)会被过滤
64
+
65
+ ## 到期时间 / 还剩多少天
66
+
67
+ 这是订阅有效期问题,不是 Usage 的额度刷新时间。标准 `plans get` JSON **没有到期字段**,不能从 `status`、`tier`、购买月份或 `reset_at` 推算。
68
+
69
+ 1. 用户问到期时间时,可用 `arkcli --debug plans get --format json` 取证;但 debug 的团队响应可能含席位 Key,**必须先把 stdout/stderr 分别捕获到权限受限的临时文件,只向工具返回/对话输出目标时间和必要标识**,不能直接打印原始 debug。`--debug` 的上游响应在 stderr,不是给 stdout 增加字段,不要用 `2>&1` 混成 JSON。当前环境无法安全捕获并脱敏时不打开 debug,转 API Explorer 核对已注册的订阅读接口及字段投影,或说明缺少安全取证条件。
70
+ 2. 个人版从对应 `ListSubscribeTrade` 响应的 `Result.InfoList` 定位订阅,读取 `EndTime`;团队版从对应 `GetSeatInfo` 的 `Result` 读取 `SeatID` 与 `ExpiredTime`。区分 Agent/Coding、个人/团队、订阅/席位,不能把四路响应里的首个时间当作目标套餐到期时间。已有团队管理清单时可复用目标席位的 `expired_time`,不为查个人到期时间扩大到全团队。
71
+ 3. 上述字段是 Unix **秒**,可能以数字或数字字符串返回。转成北京时间 `Asia/Shanghai`(UTC+8)后交付完整日期和时间,并标明时区;不要把 UTC 原值直接标成北京时间,也不要误按毫秒转换。若上游已给带时区的 ISO 时间,按其原始时区解析后转换,不重复加 8 小时。
72
+ 4. “还剩几天”按本次查询时间与到期时间计算,注明查询时间及取整口径;已经到期明确说已到期。缺失、0、解析失败、目标记录不唯一或该路 API 失败时,只能说到期时间未确认,不能报 1970 年、永久有效或用别的套餐时间补齐。
73
+
74
+ 最终只给套餐/席位标识、到期时间、时区及必要状态;不回显 debug 原文、API Key 或其他身份信息。诊断只读失败时保留脱敏错误,遵循当前宿主的鉴权恢复规则,不自动购买、续费或切换身份。
75
+
76
+ ## 常见错误
77
+
78
+ | 错误 | 原因 | 处理 |
79
+ |------|------|------|
80
+ | `plans get: ark: API error: AuthFailure` | 未认证 / token 过期 | `arkcli auth login volc-sso` |
81
+ | 输出 `{"plans":[]}` | 当前账号没有任何套餐 | 用 `plans buy` 下单或检查账号是否切换 |
82
+
83
+ ## 注意事项
84
+
85
+ - 这是**唯一一个无需任何参数**的 plans 子命令;用户问 "我有什么套餐 / 我订阅了什么" 直接调用即可
86
+ - **想看用量 / 配额(used / total / percent / 几号刷新)**:本命令**不出**这些字段,转 `arkcli usage plan` / `arkcli usage balance --type plan` / `arkcli usage plan-details`(详见顶部范围限制说明)
87
+ - 不会列出别人的套餐 — 永远是当前 SSO 身份名下的视图
88
+ - 团队版只展示当前用户**自己持有的席位**;要看团队全部席位走 [`plans team seat-list`](arkcli-plans-team-seat-list.md)(基础信息)或 `arkcli usage seats --with-usage`(含席位用量)
89
+
90
+ ## 参考
91
+
92
+ - [arkcli-plans](../SKILL.md) -- skill 概览
93
+ - [`plans model-list`](arkcli-plans-model-list.md) -- 看持有套餐能调哪些模型
94
+ - [`plans buy`](arkcli-plans-buy.md) / [`plans renew`](arkcli-plans-renew.md) -- 下单 / 续费
95
+ - [arkcli-usage](../../arkcli-usage/SKILL.md) -- 套餐用量 / 配额(本命令不含的字段都在这里)
96
+ - [arkcli-shared](../../arkcli-shared/SKILL.md)
@@ -0,0 +1,149 @@
1
+ # plans harness-status
2
+
3
+ > **前置条件:** 先阅读 [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) 了解认证、全局参数和安全规则。
4
+
5
+ > **范围限制:** `plans harness-status` 是**只读视图** —— 只回答"本机某个 AI Agent 上,Agent Plan 内置 MCP 装没装、key 就没就绪",**不安装、不修改、不移除任何配置**。要**注入 / 配置 / 移除** MCP,走 [`../../arkcli-helper/SKILL.md`](../../arkcli-helper/SKILL.md)(`helper mcp` / `helper reset`)。
6
+
7
+ 只读本机 AI Agent(harness)的配置,镜像火山方舟控制台「配置 Harness」页:按**能力卡**报告专属 Harness 能力各自装没装、key 就没就绪。纯本地文件读取,**免登录**(不需要 `auth status` 通过)。
8
+
9
+ 输出分两段:
10
+
11
+ - **`agents[]`** —— per-agent 的 MCP 能力卡:**豆包搜索** / **专业数据集** / **Agent 记忆**。每张卡带 `forms` 交付形态标签 + 卡级 `installed`/`key_state` + 卡内底层 `mcp_servers` 明细。
12
+ - **`supabase`** —— 全局的**火山引擎Supabase** 集成态,**与能力卡同形**:`installed` 是「装好没」统一 headline(CLI 与 Skill 都就绪),`cli_installed` / `skill_installed` 是次要细分。它不是 per-agent 的 MCP,而是一次性的 CLI + Skill + 登录态注入,故置顶单列、**与查哪个 agent 无关**。
13
+
14
+ > **plan 维度提醒:** 命令免登录、不区分 plan 类型,只如实镜像磁盘节点。但「Agent 记忆」卡(OpenViking 两台)仅**个人版 `agent-plan`** 适用;**团队版 `agent-plan-team` 与 OpenViking 无关** —— 团队版机器上该卡 `installed:false` 是预期正确状态,**不是漏装**(详见文末注意事项)。`supabase` 块只报本机有没有装,**不判当前 plan 能不能用**(资格要登录读 profile,与本命令免登录冲突;想确认资格走 `arkcli helper supabase`)。
15
+
16
+ ## 命令
17
+
18
+ ```bash
19
+ arkcli plans harness-status [agent] [--scope project] [--codex-config-scope profile|global] [--codex-profile <name>]
20
+ ```
21
+
22
+ ## 目标 agent 的选择(三种模式)
23
+
24
+ | 调用 | 行为 |
25
+ |---|---|
26
+ | `plans harness-status`(在某 agent 里跑) | 自动识别当前宿主(claude-code / opencode / openclaw),只报它 |
27
+ | `plans harness-status`(裸终端 / 脚本,识别不出宿主) | **全量兜底**:列出全部支持 MCP 的 agent,不报错 |
28
+ | `plans harness-status <agent>` | 只报指定 agent;随处可用,被查 agent 此刻没在跑也能查(读磁盘配置) |
29
+
30
+ > 宿主识别靠宿主注入的环境变量(`CLAUDECODE` / `OPENCODE` / `OPENCLAW_*`)。脱离宿主就没有这些信号 —— 此时**不报错**,改列全部(只读、零风险)。Codex / Trae 不被自动识别(无环境信号),始终在"列全部"兜底里出现,或显式 `harness-status codex` / `harness-status trae`。
31
+
32
+ ## 参数
33
+
34
+ | 参数 | 必填 | 说明 |
35
+ |---|---|---|
36
+ | `[agent]` | 否 | `claude-code` / `codex` / `opencode` / `openclaw` / `trae` 之一。不传 = 按上表自动决定。传非法名或 `hermes`(不支持 MCP)→ `validation` 报错并列出合法值 |
37
+ | `--scope` | 否 | **仅 Trae**:`global`(默认)读 `~/.trae/mcp.json`;`project` 读当前目录 `./.trae/mcp.json`。对非 Trae agent 传 `project` 会报错 |
38
+ | `--codex-config-scope` | 否 | **仅 Codex**:`profile`(默认)读 `~/.codex/<profile>.config.toml`;`global` 读 `~/.codex/config.toml` |
39
+ | `--codex-profile` | 否 | **仅 Codex profile 模式**:Codex profile 名,默认 `arkcli` |
40
+
41
+ ## 返回值
42
+
43
+ ```json
44
+ {
45
+ "agents": [
46
+ {
47
+ "agent": "claude-code",
48
+ "mcp_config_path": "/Users/me/.claude.json",
49
+ "capabilities": [
50
+ {
51
+ "key": "web-search", "name": "豆包搜索", "forms": ["skill", "mcp"],
52
+ "installed": true, "key_state": "real",
53
+ "mcp_servers": [
54
+ { "name": "mcp-server-askecho-search-infinity", "transport": "stdio", "installed": true, "key_state": "real" }
55
+ ]
56
+ },
57
+ {
58
+ "key": "datapro", "name": "专业数据集", "forms": ["mcp"],
59
+ "installed": true, "key_state": "real",
60
+ "mcp_servers": [
61
+ { "name": "dataPro-search", "transport": "http", "installed": true, "key_state": "real" }
62
+ ]
63
+ },
64
+ {
65
+ "key": "agent-memory", "name": "Agent 记忆", "forms": ["mcp"],
66
+ "installed": true, "key_state": "real",
67
+ "mcp_servers": [
68
+ { "name": "openviking-dataplane", "transport": "http", "installed": false, "key_state": "absent" },
69
+ { "name": "openviking-controlplane", "transport": "stdio", "installed": true, "key_state": "real" }
70
+ ]
71
+ }
72
+ ]
73
+ }
74
+ ],
75
+ "supabase": {
76
+ "name": "火山引擎Supabase", "forms": ["cli", "skill"],
77
+ "installed": true, "cli_installed": true, "skill_installed": true
78
+ }
79
+ }
80
+ ```
81
+
82
+ | 字段 | 含义 |
83
+ |---|---|
84
+ | `agent` | harness 稳定标识:claude-code / codex / opencode / openclaw / trae |
85
+ | `mcp_config_path` | 实际读取的配置文件路径(诊断"为什么说没装"时看这里) |
86
+ | `capabilities[].key` | 能力稳定标识:`web-search` / `datapro` / `agent-memory` |
87
+ | `capabilities[].name` | 能力展示名(对齐控制台卡):豆包搜索 / 专业数据集 / Agent 记忆 |
88
+ | `capabilities[].forms` | 交付形态标签(描述性):`mcp` / `skill` / `cli`。豆包搜索同时交付 Skill+MCP |
89
+ | `capabilities[].installed` | **卡级**:代表性 server 是否注入(Agent 记忆取 `openviking-controlplane`) |
90
+ | `capabilities[].key_state` | **卡级**:`real` / `placeholder` / `absent`(见下表) |
91
+ | `capabilities[].mcp_servers[]` | 卡内底层 MCP server 明细(诊断用;Agent 记忆含 dataplane+controlplane 两台) |
92
+ | `mcp_servers[].name/transport/installed/key_state` | 单个底层 server 的名/传输/是否注入/key 三态 |
93
+ | `supabase.name` / `supabase.forms` | 与能力卡同形:展示名「火山引擎Supabase」+ 交付形态 `["cli","skill"]` |
94
+ | `supabase.installed` | **统一 headline**:CLI 与 Skill 都就绪才 `true`(= `cli_installed && skill_installed`)。用户/agent 看这一个就知「装好没」,不必自己 AND 两个细分字段 |
95
+ | `supabase.cli_installed` | 细分:`byted-supabase-cli` 是否在 PATH |
96
+ | `supabase.skill_installed` | 细分:byted-supabase 配套 skill 是否已装(靠 CLI 自带 `skills status`) |
97
+
98
+ ### key_state 三态
99
+
100
+ | key_state | installed | 含义 | 怎么处理 |
101
+ |---|---|---|---|
102
+ | `real` | true | 已注入且 key 就绪 ✅ | 可用,无需动作 |
103
+ | `placeholder` | true | 已注入但 key 还是占位符 / 空 | 带 key 重新注入:`arkcli helper mcp` |
104
+ | `absent` | false | 没注入这一个 | 需要的话注入:`arkcli helper mcp` |
105
+
106
+ > **安全**:本命令**从不输出真实 key**,只输出上面三种状态之一。
107
+
108
+ ## 能力卡 → 底层 MCP server 对照(个人版 agent-plan / 团队版 agent-plan-team)
109
+
110
+ | 能力卡 `key`(name) | `forms` | 卡内底层 MCP server | key 来源 |
111
+ |---|---|---|---|
112
+ | `web-search`(豆包搜索) | skill·mcp | `mcp-server-askecho-search-infinity` | Agent Plan API Key(与 dataPro 同一把) |
113
+ | `datapro`(专业数据集) | mcp | `dataPro-search` | Agent Plan API Key |
114
+ | `agent-memory`(Agent 记忆,**仅个人版 agent-plan**) | mcp | `openviking-dataplane` + `openviking-controlplane` | dataplane:绑定库访问 key(vikingdb 下发;0 库时跳过 → 可能 `absent`);controlplane:Agent Plan API Key(有 Agent Plan 即注入,不依赖 OV 库列表)。**团队版两台都从不注入** |
115
+
116
+ > 卡级 `installed`/`key_state` 取**代表性 server**:豆包搜索取 askecho、专业数据集取 dataPro-search、Agent 记忆取 **controlplane**(最稳的"能力配没配"信号)。逐台细节看 `capabilities[].mcp_servers[]`。
117
+
118
+ ## 全局 Supabase 集成(`supabase` 块)
119
+
120
+ | 字段 | 含义 | 怎么探测 |
121
+ |---|---|---|
122
+ | `cli_installed` | `byted-supabase-cli` 在不在 PATH | `exec.LookPath` |
123
+ | `skill_installed` | byted-supabase 配套 skill 装没装 | CLI 自带 `byted-supabase-cli skills status`(CLI 未装时直接 `false`,不误报) |
124
+
125
+ > Supabase 是 `arkcli helper supabase` 配的**全局**能力(CLI + Skill + 火山登录态注入),不是 per-agent 的 MCP,所以不进 `agents[]`、只在顶层 `supabase` 出现一次。本块**只报装没装、不判 plan 资格**(agent-plan 全档均支持,但资格判定要登录读 profile 类型/租户才知道,超出本免登录命令范围)。
126
+
127
+ ## 常见错误
128
+
129
+ | 错误 | 原因 | 处理 |
130
+ |---|---|---|
131
+ | `{"type":"validation","message":"未知 agent ..."}` exit 2 | `[agent]` 传了不认识的名字 | 用 claude-code / codex / opencode / openclaw / trae |
132
+ | `{"type":"validation","message":"agent \"hermes\" 不支持 MCP ..."}` exit 2 | 指定了不支持 MCP 注入的 agent | hermes 不支持 MCP |
133
+ | `parse ... 非法 JSON` | agent 配置文件被手改坏了 | 修复该 agent 的 JSON 配置 |
134
+
135
+ ## 注意事项
136
+
137
+ - 只读、免登录、零副作用 —— 跟 `helper mcp` / `helper reset`(写操作)相反方向
138
+ - Codex:默认查 profile `~/.codex/arkcli.config.toml`;查全局配置用 `harness-status codex --codex-config-scope global`;查其它 profile 用 `--codex-profile <name>`
139
+ - Trae:默认查全局 `~/.trae/mcp.json`;查项目级用 `harness-status trae --scope project`(读当前目录 `./.trae/mcp.json`)
140
+ - **先分 plan 类型再解读「Agent 记忆」卡**:它仅对**个人版 `agent-plan`** 有意义。**团队版 `agent-plan-team` 与 OpenViking 无关** —— 团队版下该卡 `installed:false`、卡内两台 `absent` 是**预期正确状态**,别据此提示用户去注入 OpenViking(团队版本就不该有这两台)
141
+ - 解读「Agent 记忆」卡时**展开卡内 `mcp_servers` 看两台**:(**个人版**)`openviking-dataplane` 报 `absent` 不一定是"漏装"——账号下没有 OpenViking 库时,注入本就会跳过它;`openviking-controlplane` 报 `absent` 才是真漏装(它始终随个人版 Agent Plan 注入、不依赖 OV 库),说明该 agent 从未跑过 `helper mcp`。**卡级 `installed` 取的就是 controlplane**,所以卡级 `installed:false` ≈ controlplane 漏装
142
+ - Supabase 块只反映本机 `cli_installed`/`skill_installed`;要**配置/重装**它走 [`../../arkcli-helper/SKILL.md`](../../arkcli-helper/SKILL.md) 的 `helper supabase`
143
+ - 这是 plan 视角下"我的能力落地了没"的快速自检;想看 agent 自身装没装(install)+ 模型 / provider 配没配 → [`../../arkcli-helper/SKILL.md`](../../arkcli-helper/SKILL.md) 的 `helper list`
144
+
145
+ ## 参考
146
+
147
+ - [arkcli-plans](../SKILL.md) -- skill 概览
148
+ - [arkcli-helper](../../arkcli-helper/SKILL.md) -- **注入 / 配置 / 移除** MCP(本命令只读查看,改动走这里)
149
+ - [arkcli-shared](../../arkcli-shared/SKILL.md)
@@ -0,0 +1,56 @@
1
+ # plans model-apply
2
+
3
+ > **前置条件:** 先阅读 [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) 了解认证、全局参数和安全规则。
4
+
5
+ 设置指定套餐的 **ark-code-latest 路由目标**:`auto`(智能调度,平台自动挑底层模型)或清单中某个具体影子模型。与控制台「选择 ark-code-latest 路由模型」确认按钮调同一批后端接口,改动立即生效、两端同步。写操作。
6
+
7
+ ## 命令
8
+
9
+ ```bash
10
+ # 交互终端:省略 --model 会弹出路由目标选择器(当前生效项带 [当前生效] 标注并默认高亮)
11
+ arkcli plans model-apply --plan agent-plan
12
+
13
+ # 非交互 / agent:必须显式 --model(model id / output name / auto 均可)
14
+ arkcli plans model-apply --plan agent-plan --model auto
15
+ arkcli plans model-apply --plan coding-plan --model doubao-seed-code
16
+ arkcli plans model-apply --plan coding-plan-team --model doubao-seed-code-251028
17
+ ```
18
+
19
+ ## 参数
20
+
21
+ | 参数 | 必填 | 类型 | 说明 |
22
+ |------|------|------|------|
23
+ | `--plan` | 否 | string | `agent-plan` / `coding-plan` / `agent-plan-team` / `coding-plan-team`,默认 `agent-plan-team` |
24
+ | `--model` | 非交互必填 | string | 路由目标:模型 `model_id`、`output_name` 或 `auto`;交互终端可省略进入选择器 |
25
+
26
+ ## 返回值
27
+
28
+ ```json
29
+ {
30
+ "plan": "agent-plan",
31
+ "previous_selected_model_id": "doubao-seed-code-251028",
32
+ "applied": {
33
+ "model_id": "auto",
34
+ "output_name": "auto"
35
+ }
36
+ }
37
+ ```
38
+
39
+ | 字段 | 说明 |
40
+ |------|------|
41
+ | `plan` | 入参回显 |
42
+ | `previous_selected_model_id` | 写入前 ark-code-latest 命中的影子模型 id(未设置时为空) |
43
+ | `applied.model_id` / `applied.output_name` | 本次写入的路由目标;`auto` 时两字段均为 `auto` |
44
+
45
+ ## 注意事项
46
+
47
+ - **可选项以 [`plans model-list --mode routing`](arkcli-plans-model-list.md) 返回的 `models[]` 为准**;`--model` 传清单外的值会报 `不支持路由目标` 并列出可选项
48
+ - 团队版(`*-team`)作用域是**当前身份的席位**:账号在该套餐下没有有效席位时会报错,需先在控制台开通席位
49
+ - 写入后 CLI 会重读一次清单校验;控制面异步生效期间不一致只打 stderr `warn`、不影响退出码,可用 `plans model-list --mode routing` 复核
50
+ - 该命令只改"路由指向",不改本机 Agent 配置;本机 Agent 要切模型走 [`../../arkcli-helper/SKILL.md`](../../arkcli-helper/SKILL.md) 的 `helper configure --model`
51
+
52
+ ## 参考
53
+
54
+ - [arkcli-plans](../SKILL.md) -- skill 概览
55
+ - [`plans model-list --mode routing`](arkcli-plans-model-list.md) -- 只查询可选路由目标与当前生效项
56
+ - [arkcli-shared](../../arkcli-shared/SKILL.md)
@@ -0,0 +1,119 @@
1
+ # plans model-list
2
+
3
+ > **前置条件:** 先阅读 [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) 了解认证、全局参数和安全规则。
4
+
5
+ 列出指定套餐的两类模型:`models` 是 `ark-code-latest` 的路由候选,
6
+ `direct_models` 是可直接写入推理请求或 Agent 配置 `model` 字段的 ModelName。
7
+ 两类条目都可包含负载和模型规格。读操作。
8
+
9
+ 清单包含具体模型及控制面的 Auto 路由选项,不能把所有 `output_name` 原样当客户端 Model Name。Coding Plan 的 `auto` 即使同时出现在 `model_id` 和 `output_name`,也只证明它是控制台/`plans model-apply` 的可选目标。客户端要跟随控制台选择(含 Auto),配置 `ark-code-latest`;要直接指定具体模型,则核对当前套餐官方文档并使用支持的具体名称。不能建议客户端填写 `model=auto`,也不因用户只问页面/配置方法而执行 `model-apply`。
10
+
11
+ 以本次 `selected_model_id`/`selected` 标记当前默认模型,不能照抄示例默认值。交付全部清单时保留每项名称与明确的档位限制;只列举部分时说明是示例。
12
+
13
+ ## 命令
14
+
15
+ ```bash
16
+ # 当前身份只持有一个有效套餐时,自动识别该套餐
17
+ arkcli plans model-list
18
+
19
+ # 看 Agent Plan 个人版模型
20
+ arkcli plans model-list --plan agent-plan
21
+
22
+ # 看 Coding Plan 团队版模型
23
+ arkcli plans model-list --plan coding-plan-team
24
+
25
+ # 只查可以直接配置/调用的 ModelName(只请求 VirtualModelID)
26
+ arkcli plans model-list --plan coding-plan --mode direct
27
+
28
+ # 只查 ark-code-latest 智能路由候选(只请求 LatestModel)
29
+ arkcli plans model-list --plan coding-plan --mode routing
30
+ ```
31
+
32
+ ## 参数
33
+
34
+ | 参数 | 必填 | 类型 | 说明 |
35
+ |------|------|------|------|
36
+ | `--plan` | 否 | string | `agent-plan` / `coding-plan` / `agent-plan-team` / `coding-plan-team`;省略时自动识别当前身份唯一持有的有效套餐,持有多个时要求显式指定 |
37
+ | `--mode` | 否 | string | `all` / `direct` / `routing`,默认 `all`;`direct` 只请求直接 ModelName,`routing` 只请求智能路由候选 |
38
+
39
+ 只有 `--plan` 一个业务筛选参数,不接受 `--type` / `--tier` / `--product` / `--edition`。套餐模型目录按 plan 查询,不按购买档位查询;同一家族的档位共享模型目录,价格、配额与其他权益另查 [buy](arkcli-plans-buy.md) 和 [pricing](../../arkcli-pricing/SKILL.md),不能把“模型列出来了”推导为某个档位已获全部权益。
40
+
41
+ 例如 `arkcli plans model-list --plan coding-plan --type pro` 会报未知 flag;应使用 `arkcli plans model-list --plan coding-plan`。需要 vendor、模态或基础模型版本元信息时,把返回的 `model_id`(不是友好展示名 `model_name`)交给 [models get](../../arkcli-models/references/arkcli-models-get.md),不要从名字推断。
42
+
43
+ 未传 `--plan` 时,CLI 会查询当前身份实际持有的四类套餐。只有一个有效个人订阅或 Running 团队席位时自动使用其 `Edition + BizInfo`;存在多个有效套餐时不按顺序猜选,而是报出候选并要求重新传 `--plan`。任一套餐状态查询失败时也不会根据不完整结果自动选择。
44
+
45
+ ## 返回值
46
+
47
+ ```json
48
+ {
49
+ "plan": "agent-plan-team",
50
+ "edition": "enterprise",
51
+ "tier": "large",
52
+ "selected_model_id": "doubao-seed-2-0-pro-260215",
53
+ "models": [
54
+ {
55
+ "model_id": "doubao-seed-2-0-pro-260215",
56
+ "model_name": "Doubao Seed 2.0 Pro",
57
+ "output_name": "doubao-seed-2-0-pro",
58
+ "context_window": 262144,
59
+ "max_input_tokens": 229376,
60
+ "max_completion_tokens": 65536,
61
+ "input_modalities": ["text", "image", "video"],
62
+ "load": {"status": 1, "level": 2, "score": 0.46, "coverage": 0.92, "updated_at": 1789999999},
63
+ "selected": true
64
+ },
65
+ {
66
+ "model_id": "doubao-pro-32k-260215",
67
+ "model_name": "Doubao Pro 32K",
68
+ "output_name": "doubao-pro-32k"
69
+ }
70
+ ],
71
+ "direct_models": [
72
+ {
73
+ "model_name": "doubao-seed-code",
74
+ "context_window": 262144,
75
+ "max_input_tokens": 229376,
76
+ "max_completion_tokens": 65536,
77
+ "input_modalities": ["text", "image", "video"],
78
+ "load": {"status": 1, "level": 1}
79
+ }
80
+ ]
81
+ }
82
+ ```
83
+
84
+ | 字段 | 说明 |
85
+ |------|------|
86
+ | `plan` | 入参回显 |
87
+ | `edition` | 请求套餐模型接口使用的版本:个人版 `personal`,团队版 `enterprise` |
88
+ | `tier` | 当前套餐档位,即请求中的 `BizInfo` |
89
+ | `selected_model_id` | 当前路由选择的后端模型 ID;个人版按订阅服务端 `Enabled` 字段判断,团队版从用户席位映射读取;未选择时省略 |
90
+ | `models[]` | `ark-code-latest` 的路由候选;用于 `plans model-apply`,不是直接 ModelName 清单 |
91
+ | `models[].model_id` | 后端路由目标 ID,适合控制面写入 |
92
+ | `models[].model_name` | 面向用户的展示名;不要把它误当成调用 ID |
93
+ | `models[].output_name` | 路由写接口配套的输出名;不要据此推断可直接调用的 ModelName |
94
+ | `models[].selected` | 为 `true` 时表示当前路由选中该项;未选中时因 `omitempty` 可能不出现 |
95
+ | `direct_models[]` | 当前套餐可直接调用的模型清单,来源为 VirtualModelID 接口 |
96
+ | `direct_models[].model_name` | 可直接写入推理请求或 Agent 配置 `model` 字段的准确 ModelName |
97
+ | `*.context_window` | 上下文窗口大小,单位为 token;接口未提供时省略 |
98
+ | `*.max_input_tokens` | 最大输入 token 长度;接口未提供时省略 |
99
+ | `*.max_completion_tokens` | 最大输出 token 长度;接口未提供时省略 |
100
+ | `*.input_modalities` | 支持的输入模态,例如 `text` / `image` / `video`;只有 `text` 时表示纯文本输入 |
101
+ | `*.load` | 服务端负载快照;仅 `status=1` 且 `level=1/2/3` 分别表示低/中/高负载,其余状态不能解释为当前可用负载 |
102
+
103
+ ## 注意事项
104
+
105
+ - CLI 会先解析目标套餐的当前档位,实际发出的每个模型列表请求都会携带 `Edition` + `BizInfo`;没有有效订阅/Running 席位或档位为空时直接报错,不发送无范围查询。
106
+ - `--mode all` 请求两类模型接口;`--mode direct` 只请求 VirtualModelID,返回空的 `models`;`--mode routing` 只请求 LatestModel,返回空的 `direct_models`。团队版 routing 为标识当前选中项仍可能读取席位信息。
107
+ - 个人版与团队版的 ark-code-latest 当前选择来源不同:
108
+ - 个人版:服务端按订阅维度返回模型清单 + Enabled flag
109
+ - 团队版:从用户席位 `ExtraConfig.ArkCodeLatestMappingModelID` 字段读
110
+ - 不要把路由候选与直接 ModelName 混用:切换 `ark-code-latest` 只看 `models[]`;直接配置/调用只看 `direct_models[].model_name`。
111
+ - 模型规格直接来自套餐模型接口的 `ModelCapability`;缺失字段会省略,不能按模型名猜测或用其它目录数据覆盖
112
+ - 数据是订阅期内允许调用的模型,不等同于全局可调用模型;试用模型用 [`../arkcli-models/`](../../arkcli-models/SKILL.md)
113
+
114
+ ## 参考
115
+
116
+ - [arkcli-plans](../SKILL.md) -- skill 概览
117
+ - [`plans get`](arkcli-plans-get.md) -- 先看自己持有哪些套餐
118
+ - [arkcli-models](../../arkcli-models/SKILL.md) -- 不限于套餐的模型查询
119
+ - [arkcli-shared](../../arkcli-shared/SKILL.md)