@byteplus/ark-cli-darwin-x64 1.0.62 → 1.0.66-prerelease.9a01567d3d65

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/bin/arkcli-darwin-amd64 +2 -2
  2. package/manifest.json +15 -44
  3. package/package.json +1 -1
  4. package/skills/arkcli-auth/SKILL.md +3 -0
  5. package/skills/arkcli-auth/references/arkcli-auth-login.md +2 -0
  6. package/skills/arkcli-auth/references/auth-modes.md +2 -0
  7. package/skills/arkcli-billing/SKILL.md +1 -1
  8. package/skills/arkcli-gen/SKILL.md +1 -0
  9. package/skills/arkcli-helper/SKILL.md +9 -7
  10. package/skills/arkcli-helper/references/arkcli-helper.md +11 -16
  11. package/skills/arkcli-helper/references/evals.md +10 -0
  12. package/skills/arkcli-infer-endpoint/SKILL.md +12 -2
  13. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-update.md +96 -17
  14. package/skills/arkcli-infer-endpoint/references/evals.md +32 -0
  15. package/skills/arkcli-plans/SKILL.md +44 -110
  16. package/skills/arkcli-plans/references/arkcli-plans-buy.md +28 -21
  17. package/skills/arkcli-plans/references/arkcli-plans-get.md +5 -3
  18. package/skills/arkcli-plans/references/arkcli-plans-model-apply.md +3 -3
  19. package/skills/arkcli-plans/references/arkcli-plans-model-list.md +6 -4
  20. package/skills/arkcli-plans/references/arkcli-plans-renew.md +25 -20
  21. package/skills/arkcli-plans/references/arkcli-plans-team-rotate-apikey.md +17 -46
  22. package/skills/arkcli-plans/references/arkcli-plans-team-seat-assign.md +2 -2
  23. package/skills/arkcli-plans/references/arkcli-plans-team-seat-list.md +2 -2
  24. package/skills/arkcli-plans/references/evals.md +27 -5
  25. package/skills/arkcli-pricing/SKILL.md +39 -93
  26. package/skills/arkcli-pricing/references/arkcli-pricing-plans.md +32 -123
  27. package/skills/arkcli-profile/SKILL.md +13 -9
  28. package/skills/arkcli-profile/references/arkcli-profile-create.md +6 -1
  29. package/skills/arkcli-profile/references/arkcli-profile-keys.md +4 -0
  30. package/skills/arkcli-profile/references/evals.md +9 -0
  31. package/skills/arkcli-shared/references/profile-defaults.md +4 -0
  32. package/skills/arkcli-usage/SKILL.md +34 -100
  33. package/skills/arkcli-usage/references/arkcli-usage-balance.md +1 -1
  34. package/skills/arkcli-usage/references/arkcli-usage-plan.md +4 -0
  35. package/skills/arkcli-usage/references/arkcli-usage-seats.md +2 -2
@@ -1,135 +1,69 @@
1
1
  ---
2
2
  name: arkcli-plans
3
3
  version: 1.2.0
4
- description: "Manages ARK plans (Coding Plan, personal + team): query holdings, buy, renew, list models, list enterprise seats (`plans team seat-list`), assign seats to employees (`plans team seat-assign`), rotate team-seat API keys (`plans team rotate-apikey`), and inspect seat bindings. Trigger terms: plan / buy / renew / list seats / view seat bindings / who is bound to which seat / assign employee seats / rotate team API key / team-seat admin view. Unbinding is not currently exposed by arkcli; route such requests here only to explain the limitation. Usage questions (remaining quota / percentage used / per-seat usage) go to [arkcli-usage](../arkcli-usage/SKILL.md). Verb routing: list / bind / assign / rotate → here; use / consumption / how much → arkcli-usage."
4
+ description: "Manage BytePlus Agent Plan and Coding Plan personal subscriptions and team seats: query holdings, buy or renew through web payment, inspect models, apply ark-code-latest routing, assign seats, and rotate personal or team API keys. Route quota, AFP, reset dates and consumption to arkcli-usage; prices to arkcli-pricing; local client configuration to arkcli-helper. Shared packages use --plan agent-plan-team --type agent-plan-team-shared-pool, require administrator permission and a concrete project, and use manually distributed keys."
5
5
  metadata:
6
6
  requires:
7
7
  bins: ["arkcli"]
8
8
  cliHelp: "arkcli plans --help"
9
9
  ---
10
10
 
11
- # arkcli plans
11
+ # BytePlus plans
12
12
 
13
- **CRITICAL — Before starting, you MUST use the Read tool to read [`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md), which contains authentication gates, configuration troubleshooting, and shared safety rules.**
14
- **CRITICAL — Before executing any `plans buy` / `plans renew` / `plans team seat-assign` / `plans team rotate-apikey`, you MUST use the Read tool to read the corresponding `references/*.md`. Do not invoke them blindly.**
13
+ Read [`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md) first. Read the relevant reference before purchase, renewal, routing changes, seat assignment, or credential rotation.
15
14
 
16
- ## 🔒 Agreement gate (mandatory process for plans buy / plans renew)
15
+ ## Products and routing
17
16
 
18
- `plans buy` / `plans renew` on BytePlus **never place orders in-CLI**. Adding `--yes` does not trigger a charge; it returns a `payment_via_web` payload with a `subscribe_url` pointing to the BytePlus console subscription page, where the user completes the purchase in the browser. **When neither `--yes` nor `--estimate` is passed**, the CLI runs the review gate and returns:
19
-
20
- ```json
21
- {
22
- "status": "agreement_required",
23
- "subscribe_url": "https://console.byteplus.com/ark/region:ark+ap-southeast-1/subscription/coding-plan",
24
- "total_amount_usd": 10,
25
- "original_amount_usd": 10,
26
- "next_step": "Ask the user to open <subscribe_url> in the browser and finish the purchase on the BytePlus subscription page. Do not rerun this command with --yes."
27
- }
28
- ```
29
-
30
- Note: BytePlus does **not** return the `agreements` array. The web subscription page handles agreement presentation and signing with the correct BytePlus legal documents; the CLI would only have Volc-region agreement text to show, which is wrong for BytePlus users. Amount fields are `total_amount_usd` / `original_amount_usd` (USD).
17
+ | Plan | Scope | Tiers |
18
+ |---|---|---|
19
+ | `agent-plan` | Personal | small / medium / large / max |
20
+ | `agent-plan-team` | Team seat | small / medium / large / max |
21
+ | `coding-plan` | Personal | lite / pro |
22
+ | `coding-plan-team` | Team seat | lite / pro |
31
23
 
32
- **The Agent must strictly follow this sequence:**
24
+ - Holdings/status: `arkcli plans get`; no arguments required. Do not interpret this as quota or usage.
25
+ - Models/specifications: `arkcli plans model-list --plan <plan> --mode all|direct|routing`. Omission selects only when exactly one active plan exists; otherwise ask for a target.
26
+ - Configure an Agent or invoke a concrete model: use `direct_models[].model_name`.
27
+ - Change `ark-code-latest`: read `models[]` from `--mode routing`, confirm the target, then `arkcli plans model-apply --plan <plan> --model <id|output-name|auto>`. Omitted `--plan` defaults to `agent-plan-team`; prefer explicit selection. This writes the control plane, not local Agent configuration.
28
+ - Seat metadata/bindings: `plans team seat-list --plan agent-plan-team|coding-plan-team`.
29
+ - Assign seats: resolve exact UserIDs through `arkcli iam userid` when needed, then `plans team seat-assign --plan <team-plan> --bind seat-id=user-id`. Read the reference and obtain confirmation.
30
+ - Quota, AFP, reset dates, model consumption: hand off to [`arkcli-usage`](../arkcli-usage/SKILL.md).
31
+ - Subscription prices: hand off to [`arkcli-pricing`](../arkcli-pricing/SKILL.md).
32
+ - Agent model/provider configuration: hand off to [`arkcli-helper`](../arkcli-helper/SKILL.md).
33
+ - Shared packages are an Agent Plan Team type, not an independent Plan: `--plan agent-plan-team --type agent-plan-team-shared-pool` for buy/renew/model-list. Require an enterprise administrator and a concrete project, not account-wide scope. Use dedicated shared-package data, never normal seat figures.
34
+ - Shared-package purchase requires positive integer `--quantity`; renewal preserves quantity and does not accept `--seat-ids`. Both retain BytePlus web payment. Shared-package route changes, seat binding and Key rotation are not supported in this phase; their shadow seats are not user seats.
33
35
 
34
- 1. **The first call must omit `--yes`** to obtain price + `subscribe_url`.
35
- 2. Display `total_amount_usd` and `original_amount_usd` to the user for transparency.
36
- 3. Then present the `subscribe_url` and ask the user to complete the purchase in the browser on the BytePlus console. **Do not rerun the command with `--yes`** expecting an in-CLI charge — both `--yes` and the gate resolve to the same subscribe URL on BytePlus.
36
+ ## Purchase and renewal: web payment only
37
37
 
38
- **Violating this process means skipping user-facing price transparency.** The web page also enforces its own agreement UI before the user can pay.
38
+ Read [plans buy](references/arkcli-plans-buy.md) or [plans renew](references/arkcli-plans-renew.md).
39
39
 
40
- `--estimate` is the online price-quote path; it is not Client Preview. It neither places an order nor returns a `subscribe_url` (use the default gate path when you need the URL).
40
+ 1. Collect the explicit plan, tier for purchase, duration, and team quantity or renewal SeatIDs. Do not choose paid parameters for the user.
41
+ 2. Run without `--yes` to obtain `agreement_required`, USD prices and `subscribe_url`.
42
+ 3. Display `total_amount_usd` / `original_amount_usd`, the target parameters and `subscribe_url` for BytePlus agreement review; obtain explicit confirmation before creating a pre-order.
43
+ 4. Only after confirmation, execute the returned `next_step` with `--yes`. It creates an unpaid pre-order and returns `payment_required`, `pre_order_numbers` and `payment_url`; team purchases also create pending seats. Hand off `payment_url` for browser payment. Never claim payment or renewal has completed, and never blindly retry an order-creation failure. The CLI does not return domestic `agreements`.
41
44
 
42
- ## Business positioning
45
+ `--estimate` is a read-only online quote, not Client Preview. `plans buy/renew --dry-run` emits an offline `preview.v1` plan without prices, network, writes, or orders. Its unresolved fields are not backend validation; preview never authorizes adding `--yes`.
43
46
 
44
- `arkcli plans` manages ARK plans:
45
- - **Coding Plan** (`coding-plan` / `coding-plan-team`): programming assistance plans divided into tiers (lite/pro).
47
+ ## Credential rotation and personal Plan access
46
48
 
47
- Plans have two forms: **personal edition** (`personal`) and **enterprise / team edition** (`team`):
49
+ - Personal: `plans personal rotate-apikey`; read [personal rotation](references/arkcli-plans-team-rotate-apikey.md).
50
+ - Own Agent Plan Team seat: `plans team rotate-apikey` without SeatIDs.
51
+ - Admin batch, either team product: `plans team rotate-apikey --seat-ids seat-001,seat-002`; read [team rotation](references/arkcli-plans-team-rotate-apikey.md).
52
+ - Rotation immediately invalidates old keys. Confirm the affected applications and secret destination before executing with `--yes`. Never paste plaintext returned keys into chat or logs.
53
+ - Personal Plan credential export, mutation and inference use the common agreement authorizer. If `plan_agreement_required`, direct the user to the interactive flow; do not inject headless agreement environment variables or use `--yes` to bypass it. Status lookup failures block execution.
54
+ - Personal Agent Plan keys come from the dedicated scene; team keys come from the current Running seat. Ordinary `auth apikey` cannot repair those sources. Personal Coding Plan uses the ordinary Key pool.
48
55
 
49
- | Form | Resource unit | Typical operations |
50
- |---|---|---|
51
- | personal | Individual subscription | View / buy / renew |
52
- | team | Enterprise seat | View / buy / renew / list seats / bind sub-users |
53
-
54
- > A personal account has one subscription; a team plan is managed at SeatID granularity, with each seat bound to one sub-user.
55
-
56
- > **This skill does not include plan usage / quota queries** ("how much has been used / how much remains / when it resets / breakdown by model"). `plans get` answers only "which plans do I **hold** + status (Effective/Running)", not "how much has been used". The quota view is in [`../arkcli-usage/`](../arkcli-usage/SKILL.md). See the routing table under "Quick decisions".
57
-
58
- > **Agent Plan boundary (BytePlus)**: BytePlus does not offer Agent Plan (`agent-plan` / `agent-plan-team`). When asked about Agent Plan, respond with "Agent Plan is not offered on BytePlus" and stop — never fall back to Coding Plan data as a stand-in, never invent an `agent-plan` invocation to "try".
59
-
60
- ## Applicable scenarios
61
-
62
- - View plans held by the current account → `plans get`.
63
- - Place an order for a plan (personal / team) → `plans buy`.
64
- - Renew an existing plan → `plans renew`.
65
- - View the models and model specifications supported by a plan (context window, input/output token limits, and input modalities) → `plans model-list`.
66
- - Switch the ark-code-latest route target (Auto smart scheduling or a concrete shadow model) → `plans model-apply`.
67
- - List / filter enterprise seats → `plans team seat-list`.
68
- - Bind an enterprise seat to a sub-user → `plans team seat-assign`.
69
- - Rotate API keys for explicit Coding Plan Team SeatIDs → `plans team rotate-apikey`.
70
-
71
- ## Quick decisions
72
-
73
- - User asks "What plans do I have / what have I subscribed to?": run `arkcli plans get` directly with no arguments (**holdings + status only, no usage**).
74
- - User asks **"How much have I used / how much remains / when does it reset / in-plan vs out-of-plan"**: this is **outside this skill**; route to [`../arkcli-usage/`](../arkcli-usage/SKILL.md):
75
- - "How much of my plan remains / when does it reset?" → `arkcli usage plan` or `arkcli usage balance --type plan`.
76
- - "Which model do I use most / in-plan versus out-of-plan ratio?" → `arkcli usage plan-details`.
77
- - "Team-seat usage" → `arkcli usage seats --product coding-plan-team --with-usage`.
78
- - User asks "Which models does Coding Plan support / how large is the context window / what are the maximum input and output lengths / does it support image or video input?": run `arkcli plans model-list --plan <plan>`. Add `--mode direct` when only directly invocable ModelNames are needed, `--mode routing` when only `ark-code-latest` route targets are needed, or keep the default `--mode all` to compare both catalogs. `models[]` contains route targets, while `direct_models[].model_name` contains directly invocable ModelNames; both may expose `context_window`, `max_input_tokens`, `max_completion_tokens`, `input_modalities`, and `load`.
79
- - User wants to "switch the ark-code-latest underlying model / use Auto smart scheduling / pin a specific model": `arkcli plans model-apply --plan <plan> --model <model-id|output-name|auto>` (**write operation**, synced with the console; confirm valid targets with `plans model-list --mode routing` first).
80
- - User wants to buy a plan: read [buy.md](references/arkcli-plans-buy.md), collect `--plan`, `--type`, `--duration`, and team `--quantity`. Do not choose for the user.
81
- - User wants to renew: read [renew.md](references/arkcli-plans-renew.md), confirm `--plan`, duration, and existing team `--seat-ids`. Renewal keeps the current tier; do not pass purchase-only `--type` or `--quantity`. Preserve the BytePlus web-payment handoff above; never import the Volc charging workflow.
82
- - User wants to "**query seats / inspect team-seat bindings / see who is bound to which seat / list seats / see activated seats / team-seat admin view**" → `plans team seat-list --plan <coding-plan-team>` (**the default entry point for seat management**; the management view lists basic information + bindings, **without usage numbers**. To see each seat's token usage / plan percentage → `arkcli usage seats --with-usage`).
83
- - User wants to "assign a seat to an employee / allocate employee seats" → `plans team seat-assign`; first prepare a `seat-id=user-id` pairing list.
84
- - The user **knows only the employee username**, not the exact UserID: first run `arkcli iam userid --username <prefix>` to resolve `user_id`, then pass it to `seat-assign --bind seat-id=<user_id>`.
85
- - User wants to rotate one or more Coding Plan Team seat API keys → `plans team rotate-apikey --seat-ids <seat-id,...>`; BytePlus requires explicit SeatIDs and never performs an implicit self lookup. Read the rotate reference, warn that every old key becomes invalid immediately, and obtain explicit confirmation before adding `--yes`.
86
-
87
- ## Agent quick execution order
88
-
89
- 1. First confirm authentication status: `arkcli auth status`; if missing, use `../arkcli-auth/`.
90
- 2. Execute read operations (`get` / `model-list` / `seat-list`) directly; consider the current identity only when the user asks about "mine".
91
- 3. For **write operations (`buy` / `renew` / `seat-assign` / `rotate-apikey` / `model-apply`)**, always:
92
- - Read the corresponding reference first.
93
- - Confirm key fields with the user (plan / type / duration / SeatIDs / UserID pairings).
94
- 4. Partial failure (per-item Success/Failed arrays) is a valid response. When the exit code is nonzero, **do not** immediately treat the entire operation as failed; first inspect `success_count` / `failed_count` in stdout.
95
-
96
- ## Write-operation risk list (must read)
97
-
98
- | Command | Risk | Mandatory action |
99
- |---|---|---|
100
- | `plans buy` | Compliance step; **payment happens on the BytePlus web console**, not in CLI | First run without `--yes` through the review gate → show `total_amount_usd` + `subscribe_url` to the user → direct them to `subscribe_url` in the browser (where BytePlus web handles agreement UI). `--yes` also returns `subscribe_url` and does **not** charge the account. See [agreement gate process](#-agreement-gate-mandatory-process-for-plans-buy--plans-renew) |
101
- | `plans renew` | Same as buy: payment happens on the BytePlus web console | Same review gate as buy; team edition requires `--seat-ids`. `--yes` also returns `subscribe_url` without renewing anything in-CLI |
102
- | `plans model-apply` | Changes the plan's request routing (effective immediately, synced with the console) | `--model` is required when non-interactive; confirm valid targets with `plans model-list --mode routing` first; team plans error when the account holds no active seat |
103
- | `plans team seat-assign` | Modifies seat bindings | Explicit `--bind seat-id=user-id`; automatically calls IAM to resolve UserName |
104
- | `plans team rotate-apikey` | **Credential rotation**; old keys are invalidated immediately | Explicit `--seat-ids`; confirm all affected applications are ready for replacement keys before adding `--yes`; never paste returned plaintext keys into chat |
56
+ ## Failure handling
105
57
 
106
- ## Command overview
58
+ Team purchases and renewals require confirmed eligibility before any write. `team_plan_status_unavailable` or `team_plan_not_supported` blocks order creation; do not bypass the check through Raw API or another identity.
107
59
 
108
- | Command | Type | Description |
109
- |---|---|---|
110
- | [`plans get`](references/arkcli-plans-get.md) | Read | List plans held by the current account (personal + team aggregation) |
111
- | [`plans buy`](references/arkcli-plans-buy.md) | Review + web redirect | Show price + `subscribe_url` so the user can complete the purchase on the BytePlus console (web handles agreement UI) |
112
- | [`plans renew`](references/arkcli-plans-renew.md) | Compliance + web redirect | Same as buy: `subscribe_url` points to the BytePlus console renewal page |
113
- | [`plans model-list`](references/arkcli-plans-model-list.md) | Read | Use `--mode all|direct|routing` to query both catalogs, direct ModelNames, or ark-code-latest route targets, with capability and load data |
114
- | [`plans model-apply`](references/arkcli-plans-model-apply.md) | Write | Set the ark-code-latest route target (auto or a concrete shadow model) |
115
- | [`plans team seat-list`](references/arkcli-plans-team-seat-list.md) | Read | List enterprise seats + multidimensional filtering |
116
- | [`plans team seat-assign`](references/arkcli-plans-team-seat-assign.md) | Write | Batch-bind enterprise seats to sub-users |
117
- | [`plans team rotate-apikey`](references/arkcli-plans-team-rotate-apikey.md) | Destructive write | Rotate API keys for explicitly selected Coding Plan Team seats |
118
-
119
- ## Common fallbacks
120
-
121
- - Authentication error: route to [`../arkcli-auth/SKILL.md`](../arkcli-auth/SKILL.md).
122
- - Wrong region / project: route to [`../arkcli-config/SKILL.md`](../arkcli-config/SKILL.md).
123
- - **View plan usage / quota (used / total / percent / reset_at / model breakdown)**: route to [`../arkcli-usage/SKILL.md`](../arkcli-usage/SKILL.md). This skill answers only "what is held", not "how much was used".
124
- - **View billing / settlement amounts**: route to [`../arkcli-billing/SKILL.md`](../arkcli-billing/SKILL.md). `plans` does not return monetary amounts.
125
- - Try a model without formal deployment: route to [`../arkcli-chat/SKILL.md`](../arkcli-chat/SKILL.md) / [`../arkcli-gen/SKILL.md`](../arkcli-gen/SKILL.md).
126
- - Fall back to [`../arkcli-api-explorer/SKILL.md`](../arkcli-api-explorer/SKILL.md) when no product command exists.
60
+ Inspect `success_count`, `failed_count`, `success` and `failed` after batch operations, including nonzero exits. Do not retry successful items blindly. Recover authentication through [`arkcli-auth`](../arkcli-auth/SKILL.md); never switch product, identity, project, or Key to hide a failure.
127
61
 
128
62
  ## References
129
63
 
130
- - [arkcli-shared](../arkcli-shared/SKILL.md) -- Authentication / global parameters / output rules
131
- - [arkcli-usage](../arkcli-usage/SKILL.md) -- Plan **usage / quota** views (`usage plan` / `usage plan-details` / `usage balance` / `usage seats --with-usage`), complementing this skill's holdings / purchases / seat management
132
- - [arkcli-billing](../arkcli-billing/SKILL.md) -- Plan **settlement amounts** (BytePlus billing-center breakdown, T+1)
133
- - [arkcli-deploy](../arkcli-deploy/SKILL.md) -- Deploy an endpoint with `+deploy` after purchasing a plan
134
- - [arkcli-helper](../arkcli-helper/SKILL.md) -- **Inject / remove** Plan model/provider for an AI Agent
135
- - [Coding Plan Team API-key rotation](references/arkcli-plans-team-rotate-apikey.md) -- Destructive administrator rotation for explicit SeatIDs
64
+ - [Holdings](references/arkcli-plans-get.md)
65
+ - [Purchase](references/arkcli-plans-buy.md) / [Renewal](references/arkcli-plans-renew.md)
66
+ - [Model catalog](references/arkcli-plans-model-list.md) / [Route changes](references/arkcli-plans-model-apply.md)
67
+ - [Seat listing](references/arkcli-plans-team-seat-list.md) / [Seat assignment](references/arkcli-plans-team-seat-assign.md)
68
+ - [Personal rotation](references/arkcli-plans-team-rotate-apikey.md) / [Team rotation](references/arkcli-plans-team-rotate-apikey.md)
69
+ - [Evaluation cases](references/evals.md)
@@ -1,22 +1,28 @@
1
1
  # plans buy
2
2
 
3
+ > **Agent Plan Team shared package:** use `--plan agent-plan-team --type agent-plan-team-shared-pool --quantity N` in a concrete project with enterprise administrator permission. Quantity counts packages, not seats. Default review shows USD and `subscribe_url`; after explicit confirmation, `--yes` creates an unpaid pre-order and returns `payment_url` for browser checkout. It does not automatically charge. An already-active shared package is renewed rather than incrementally purchased.
4
+
3
5
  > **Prerequisite:** Read [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
4
6
 
5
- > **⚠️ BytePlus payment flow:** BytePlus does not yet support balance-based auto-pay via arkcli. Adding `--yes` **does not place an order or charge the account**; instead the command returns a `payment_via_web` payload with a `subscribe_url` pointing to the BytePlus console subscription page. The user must open that URL in a browser and complete the purchase on the web. **Do not choose for the user**: the user must explicitly provide `--plan`, `--type`, `--duration`, and `--quantity` for team plans.
7
+ > **BytePlus payment flow:** `--yes` creates an unpaid pre-order with automatic payment disabled. The response includes `payment_required`, `pre_order_numbers` and `payment_url`; the user completes payment in the browser. **Do not choose for the user**: collect `--plan`, `--type`, `--duration`, and team/shared-package `--quantity`, show the quote and obtain explicit confirmation before using `--yes`.
6
8
 
7
9
  > **🔒 Review gate (mandatory process; the Agent must comply):** Without `--yes`, this command **does not place an order** and returns price + `subscribe_url`. The Agent **must**:
8
10
  > 1. Display `total_amount_usd` and `original_amount_usd` to the user for price transparency.
9
- > 2. Then present the `subscribe_url` and ask the user to complete the purchase in the browser. **Do not rerun the command with `--yes`** expecting an in-CLI charge — BytePlus does not support that path; both `--yes` and the gate resolve to the same subscribe URL.
11
+ > 2. Present `subscribe_url` for agreement review and confirm the exact purchase parameters. Only after explicit confirmation, run the returned `next_step` with `--yes`, then hand off its `payment_url` for payment. Quote approval alone is not payment.
10
12
  >
11
13
  > The BytePlus subscription page handles agreement presentation and signing with the correct BytePlus legal documents on the web; the CLI does **not** return an `agreements` array (see Return value below).
12
14
 
15
+ ## Offline Client Preview
16
+
17
+ `plans buy ... --dry-run` emits `preview.v1` without network, prices, orders, seats, or local writes. BytePlus payloads disable auto-pay; Project, eligibility and generated IDs remain unresolved. This preview is not an online quote or authorization to add `--yes`.
18
+
13
19
  ## Three invocation forms
14
20
 
15
21
  | Form | Behavior | When to use |
16
22
  |---|---|---|
17
23
  | Neither `--yes` nor `--estimate` | **Review gate**: returns **price** (USD) + `subscribe_url` + `next_step`; internally uses EstimatePrice and **does not place an order** | Default guidance step; the Agent obtains "price + web URL" in one call |
18
24
  | `--estimate` (with or without `--yes`) | **Online price inquiry**: calls EstimatePrice, returns the price, and **does not place an order** | Overlaps with the gate; retained as a convenient scripting path for "price only" |
19
- | `--yes` without `--estimate` | **Web redirect** (BytePlus): returns `payment_via_web` payload with `subscribe_url`; **no order-side API is called**, no order or seat is created | The user has confirmed the price; direct them to the web console to complete the purchase |
25
+ | `--yes` without `--estimate` | Creates an unpaid pre-order; team purchases first create pending seats; returns `payment_required` and `payment_url` | Only after explicit confirmation of parameters, price and agreement review; complete payment in the browser |
20
26
 
21
27
  > **The gate returns pricing + subscribe URL together**. One call returns `total_amount_usd` + `original_amount_usd` + `subscribe_url`; show these to the user together and then hand off the URL.
22
28
 
@@ -29,7 +35,7 @@ arkcli plans buy --plan coding-plan --type lite --duration 1
29
35
  # Step 2 (optional): Price inquiry
30
36
  arkcli plans buy --plan coding-plan --type lite --duration 1 --estimate
31
37
 
32
- # Step 3: After showing the user the price, hand off to the web page via subscribe_url
38
+ # Step 3: After explicit confirmation, create an unpaid pre-order and hand off payment_url
33
39
  arkcli plans buy --plan coding-plan --type lite --duration 1 --yes
34
40
 
35
41
  # Example for a team-edition tier
@@ -40,16 +46,17 @@ arkcli plans buy --plan coding-plan-team --type pro --quantity 10 --yes
40
46
 
41
47
  | Parameter | Required | Type | Description |
42
48
  |------|------|------|------|
43
- | `--plan` | Yes | string | `coding-plan` / `coding-plan-team` |
44
- | `--type` | Yes | string | Tier: coding-plan* accepts `lite/pro` |
49
+ | `--plan` | Yes | string | `agent-plan` / `agent-plan-team` / `coding-plan` / `coding-plan-team` |
50
+ | `--type` | Yes | string | Agent Plan personal/team: `small/medium/large/max`; Coding Plan personal/team: `lite/pro` |
45
51
  | `--duration` | No | int | Subscription duration (months), 1–12, default 1 |
46
52
  | `--quantity` | Required for team | int | Number of seats (≥1); ignored when passed for personal edition |
47
- | `--yes` | No | bool | On BytePlus, returns the `payment_via_web` payload directly (no charge; equivalent to the gate for the subscribe_url purpose) |
53
+ | `--yes` | No | bool | Confirm creation of an unpaid pre-order; payment is completed at the returned `payment_url` |
48
54
 
49
55
  Compatibility between `--plan` and `--type`:
50
56
 
51
57
  | Plan family | Valid tiers |
52
58
  |---|---|
59
+ | agent-plan / agent-plan-team | small, medium, large, max |
53
60
  | coding-plan / coding-plan-team | lite, pro |
54
61
 
55
62
  ## Return value (review gate, default form)
@@ -66,55 +73,55 @@ When neither `--yes` nor `--estimate` is passed:
66
73
  "total_amount_usd": 10,
67
74
  "original_amount_usd": 10,
68
75
  "subscribe_url": "https://console.byteplus.com/ark/region:ark+ap-southeast-1/subscription/coding-plan",
69
- "confirm_text": "BytePlus balance-based auto-pay is not supported by arkcli yet...",
70
- "next_step": "Ask the user to open <subscribe_url> in the browser and finish the purchase on the BytePlus subscription page. Do not rerun this command with --yes."
76
+ "confirm_text": "After explicit confirmation, --yes creates an unpaid pre-order without automatic charging...",
77
+ "next_step": "arkcli plans buy --plan coding-plan --duration 1 --type lite --yes"
71
78
  }
72
79
  ```
73
80
 
74
81
  Amount fields are always USD on BytePlus (`total_amount_usd` / `original_amount_usd`); `total_amount_cny` / `original_amount_cny` will never appear. There is intentionally **no `agreements` array** — the BytePlus subscription page handles agreement presentation and signing on the web with the correct BytePlus legal documents.
75
82
 
76
- ## Return value (`--yes` / web redirect)
83
+ ## Return value (`--yes` / unpaid checkout)
77
84
 
78
- After adding `--yes`, the CLI does **not** place an order or invoke any Create* API. Instead it returns:
85
+ After explicit confirmation and `--yes`, the CLI creates the unpaid order and returns:
79
86
 
80
87
  ```json
81
88
  {
82
- "status": "payment_via_web",
89
+ "status": "payment_required",
83
90
  "plan": "coding-plan-team",
84
91
  "tier": "pro",
85
92
  "duration": 2,
86
93
  "quantity": 5,
87
- "subscribe_url": "https://console.byteplus.com/ark/region:ark+ap-southeast-1/subscription/coding-plan-enterprise",
88
- "message": "BytePlus balance-based auto-pay is not supported by arkcli yet. Open the subscribe_url above in the browser to complete the purchase on the BytePlus console.",
89
- "next_step": "Ask the user to open <subscribe_url> in the browser and finish the purchase on the BytePlus subscription page. Do not rerun this command with --yes."
94
+ "seat_ids": ["seat-created"],
95
+ "pre_order_numbers": "PRE-EXAMPLE",
96
+ "payment_url": "<returned BytePlus checkout URL>"
90
97
  }
91
98
  ```
92
99
 
93
- `quantity` is populated only for team plans. For team plans **no seats are created**: the CLI does not call `CreateSeatInfo` before redirecting, so there are no dangling seats to clean up.
100
+ `quantity` is populated for team/shared-package purchases. Ordinary team purchases create pending seats before the trade call; `seat_ids` reports those seats. A later failure does not automatically delete them.
94
101
 
95
102
  ## Failure semantics
96
103
 
97
- BytePlus arkcli does not place orders, so the `payment_failed` envelope (which the Volc build emits when auto-pay fails after `CreateSubscribeTrade`) **does not exist here**. Failure modes are:
104
+ Order creation can fail or return an incomplete response. `payment_failed` preserves surfaced order numbers and created seat IDs in its hint. Do not blindly rerun `--yes`: check the BytePlus console for pending orders and seats before retrying. Failure modes are:
98
105
 
99
106
  - **Validation error** (e.g. `--quantity is required for team plans`): normal error, exit code = 1. Fix the arguments and retry.
100
107
  - **Auth / preflight error** (missing `arkcli auth login`, etc.): normal error, exit code = 1. Log in and retry. See [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md).
101
- - **Payment failure on the web**: after the user opens `subscribe_url`, if BytePlus web rejects the payment (e.g. account not opened, real-name pending, payment method missing), the console will surface the failure and the appropriate settings page. This is out of arkcli's control.
108
+ - **Payment failure on the web**: after the user opens `payment_url`, if BytePlus web rejects the payment (e.g. account not opened, real-name pending, payment method missing), the console will surface the failure and the appropriate settings page. This is out of arkcli's control.
102
109
 
103
110
  ## Common errors
104
111
 
105
112
  | Error | Cause | Handling |
106
113
  |---|---|---|
107
- | `--plan must be one of ...` | Plan key is misspelled | Strictly use `coding-plan` or `coding-plan-team` |
114
+ | `--plan must be one of ...` | Plan key is misspelled | Use an exact plan from the supported plan table |
108
115
  | `--type %q not allowed for --plan %q` | Tier is incompatible with plan | See the table above |
109
116
  | `--quantity is required for team plans` | Team quantity omitted | Add `--quantity N` |
110
117
  | `--duration must be 1..12` | Out of range | Use 1–12 |
111
118
 
112
119
  ## Notes
113
120
 
114
- - **No in-CLI charge**: BytePlus arkcli never invokes any Create-trade API. The purchase always happens on the web console.
121
+ - **No automatic charge**: the CLI creates unpaid orders with `IsAutoPay=false` (shared packages use `AutoPay=false`); payment happens on the web console.
115
122
  - **Use `--estimate` for pricing scripts** if you only need a price quote and want to skip the agreement + subscribe URL machinery.
116
123
  - After the user completes the purchase on the web console for a team plan, seats appear with `BillingStatus=Running` but are **not bound to sub-users**. Next use [`plans team seat-assign`](arkcli-plans-team-seat-assign.md) to assign them.
117
- - Rerunning `plans buy --yes` is safe on BytePlus: each call is a pure web-redirect stub that produces the same `subscribe_url`. It never places an order.
124
+ - Rerunning `plans buy --yes` can create another order and more seats. Never retry automatically after an uncertain result.
118
125
 
119
126
  ## References
120
127
 
@@ -1,5 +1,7 @@
1
1
  # plans get
2
2
 
3
+ > **Agent Plan Team shared package:** administrators in a concrete project may receive a row with `plan=agent-plan-team`, `type=agent-plan-team-shared-pool`, quantity/status/expiry. The backend shared discriminator and internal instance ID are not seat tiers or public selectors. Data comes from the project's shared-package configuration and billing snapshot; non-admin and account-wide queries omit the row.
4
+
3
5
  > **Prerequisite:** Read [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
4
6
 
5
7
  > **Scope limitation:** `plans get` answers only "which plans do I **hold** + status (Effective/Running/...)" and **does not answer "how much has been used / how much remains / when it resets / breakdown by model"**. For quota queries, use:
@@ -8,7 +10,7 @@
8
10
  >
9
11
  > See [`../../arkcli-usage/SKILL.md`](../../arkcli-usage/SKILL.md).
10
12
 
11
- Return all plans **actually held** by the current account in one call: an aggregation of Coding Plan personal + team editions. This is a read operation with no side effects.
13
+ Return all plans **actually held** by the current account in one call: an aggregation of Agent Plan and Coding Plan personal + team editions. This is a read operation with no side effects.
12
14
 
13
15
  ## Command
14
16
 
@@ -18,7 +20,7 @@ arkcli plans get
18
20
 
19
21
  ## Parameters
20
22
 
21
- No parameters. Both plan paths (`coding-plan` / `coding-plan-team`) are fetched concurrently.
23
+ No parameters. All four Plan paths (`agent-plan`, `agent-plan-team`, `coding-plan`, `coding-plan-team`) are fetched concurrently.
22
24
 
23
25
  ## Return value
24
26
 
@@ -46,7 +48,7 @@ No parameters. Both plan paths (`coding-plan` / `coding-plan-team`) are fetched
46
48
 
47
49
  | Field | Appears when | Meaning |
48
50
  |------|---------|------|
49
- | `key` | always | Stable identifier: coding-plan / coding-plan-team |
51
+ | `key` | always | Stable identifier: agent-plan / agent-plan-team / coding-plan / coding-plan-team |
50
52
  | `scope` | always | personal / team |
51
53
  | `tier` | When held | Personal: lite/pro (coding); team: tier of the current user's seat |
52
54
  | `status` | When held | Personal: Effective / Pending / Expired, and others; team: Running |
@@ -2,11 +2,11 @@
2
2
 
3
3
  > **Prerequisite:** Read [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
4
4
 
5
- Set the **ark-code-latest route target** of a Coding Plan: `auto` (smart scheduling — the platform picks the underlying model) or a concrete shadow model from the plan's model list. Uses the same backend Actions as the console's route-model confirmation, takes effect immediately, and stays in sync with the console. Write operation.
5
+ Set the **ark-code-latest route target** of an Agent Plan or Coding Plan: `auto` (smart scheduling — the platform picks the underlying model) or a concrete shadow model from the plan's model list. Uses the same backend Actions as the console's route-model confirmation, takes effect immediately, and stays in sync with the console. Write operation.
6
6
 
7
7
  ## Commands
8
8
 
9
- BytePlus requires an explicit plan target; this command has no default plan.
9
+ Omitting `--plan` defaults to `agent-plan-team`, matching the existing Plan command. Prefer an explicit target, especially when multiple subscriptions are active.
10
10
 
11
11
  ```bash
12
12
  # Interactive terminal: omit --model to open the route-target selector
@@ -22,7 +22,7 @@ arkcli plans model-apply --plan coding-plan-team --model doubao-seed-code-251028
22
22
 
23
23
  | Parameter | Required | Type | Description |
24
24
  |-----------|----------|------|-------------|
25
- | `--plan` | Yes | string | `coding-plan` / `coding-plan-team` |
25
+ | `--plan` | No | string | `agent-plan` / `agent-plan-team` / `coding-plan` / `coding-plan-team`; default `agent-plan-team` |
26
26
  | `--model` | Required when non-interactive | string | Route target: a model `model_id`, an `output_name`, or `auto`; may be omitted on an interactive terminal to open the selector |
27
27
 
28
28
  ## Response
@@ -1,5 +1,7 @@
1
1
  # plans model-list
2
2
 
3
+ > **Agent Plan Team shared package:** pass `--plan agent-plan-team --type agent-plan-team-shared-pool`. Administrator permission and a concrete project are required before shared-package discovery. The catalog uses the enterprise shared-package scope and returns `plan=agent-plan-team` plus `type=agent-plan-team-shared-pool`, not a seat tier. `plans model-apply` is unsupported for the shared-package type in this phase.
4
+
3
5
  > **Prerequisite:** Read [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
4
6
 
5
7
  List two model sets for a specified plan: `models` contains route targets behind
@@ -9,12 +11,12 @@ load and capability metadata. Read operation.
9
11
 
10
12
  ## Commands
11
13
 
12
- When the current identity holds exactly one active Coding Plan, omitting
14
+ When the current identity holds exactly one active Plan, omitting
13
15
  `--plan` auto-detects that plan. If both personal and team editions are active,
14
16
  the CLI asks for an explicit target instead of guessing.
15
17
 
16
18
  ```bash
17
- # Auto-detect the only active Coding Plan
19
+ # Auto-detect the only active Plan
18
20
  arkcli plans model-list
19
21
 
20
22
  # View Coding Plan personal-edition models
@@ -34,7 +36,7 @@ arkcli plans model-list --plan coding-plan --mode routing
34
36
 
35
37
  | Parameter | Required | Type | Description |
36
38
  |------|------|------|------|
37
- | `--plan` | No | string | Choose `coding-plan` or `coding-plan-team`; when omitted, auto-detect the only active Coding Plan and require an explicit value if multiple plans are active |
39
+ | `--plan` | No | string | Choose `agent-plan`, `agent-plan-team`, `coding-plan` or `coding-plan-team`; when omitted, auto-detect the only active Plan and require an explicit value if multiple plans are active |
38
40
  | `--mode` | No | string | `all`, `direct`, or `routing`; defaults to `all`. `direct` fetches only direct ModelNames, while `routing` fetches only smart-routing candidates |
39
41
 
40
42
  ## Return value
@@ -97,7 +99,7 @@ arkcli plans model-list --plan coding-plan --mode routing
97
99
 
98
100
  ## Notes
99
101
 
100
- - With an explicit `--plan`, the CLI resolves that target's active tier. Without it, the CLI queries the current identity's Coding Plan subscriptions and selects only when exactly one is active; multiple active plans or any incomplete status lookup require an explicit target. Every model-list request still carries `Edition` and `BizInfo`.
102
+ - With an explicit `--plan`, the CLI resolves that target's active tier. Without it, the CLI queries the current identity's Agent Plan / Coding Plan subscriptions and selects only when exactly one is active; multiple active plans or any incomplete status lookup require an explicit target. Every model-list request still carries `Edition` and `BizInfo`.
101
103
  - `--mode all` queries both model interfaces. `--mode direct` queries only VirtualModelID and returns an empty `models` array. `--mode routing` queries only LatestModel and returns an empty `direct_models` array. Team routing may still read seat information to identify the selected route.
102
104
  - Personal and team editions use different sources for the current ark-code-latest selection:
103
105
  - Personal: the server returns the model list + Enabled flag at subscription granularity.
@@ -1,11 +1,17 @@
1
1
  # plans renew
2
2
 
3
+ > **Agent Plan Team shared package:** use `--plan agent-plan-team --type agent-plan-team-shared-pool` in a concrete project with enterprise administrator permission. Omit `--seat-ids` and `--quantity`: renewal preserves the active package count. The CLI resolves the project's unique active package internally; no public `--instance-id` exists. BytePlus quotes without creating an order; after explicit confirmation, `--yes` creates an unpaid renewal pre-order and returns `payment_url`. Renewal completes only after browser payment.
4
+
3
5
  > **Prerequisite:** Read [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.
4
6
 
5
- > **⚠️ BytePlus payment flow:** Like `plans buy`, `plans renew` on BytePlus does not perform in-CLI charging. Adding `--yes` **does not renew or charge**; it returns a `payment_via_web` payload with a `subscribe_url` pointing to the BytePlus console subscription page (the same page where new purchases happen — it also handles renewals). The user completes the renewal in the browser.
7
+ > **BytePlus payment flow:** after explicit confirmation, `--yes` creates an unpaid renewal pre-order with automatic payment disabled. It returns `payment_required`, `pre_order_numbers` and `payment_url`; renewal completes only after browser payment.
8
+
9
+ > **Review gate:** without `--yes`, no renewal order is created. Show USD prices, tier, duration, selected seats/project and `subscribe_url` for agreement review. Obtain explicit confirmation before executing `next_step` with `--yes`; then hand off `payment_url`. The CLI does not return a domestic `agreements` array.
10
+
6
11
 
7
- > **🔒 Review gate (mandatory process, identical to `plans buy`):** Without `--yes`, this command **does not renew** and returns price + `subscribe_url`. The Agent **must** display `total_amount_usd` / `original_amount_usd` to the user for transparency, then present `subscribe_url` for the browser step. **Do not rerun with `--yes`** expecting an in-CLI renewal — BytePlus does not support that path; both `--yes` and the gate resolve to the same subscribe URL. See the [`plans buy` review gate](arkcli-plans-buy.md). The CLI does **not** return an `agreements` array; the BytePlus subscription page handles agreement UI on the web.
12
+ ## Offline Client Preview
8
13
 
14
+ `plans renew ... --dry-run` emits `preview.v1` without network, prices, orders or local writes. BytePlus payloads disable auto-pay; subscription and shared-package IDs remain unresolved. It does not prove eligibility or authorize `--yes`.
9
15
 
10
16
  ## Three invocation forms
11
17
 
@@ -15,7 +21,7 @@ Same as `plans buy`:
15
21
  |---|---|
16
22
  | Neither `--yes` nor `--estimate` | Review gate: returns **price** (USD) + `subscribe_url` + `next_step`; internally uses EstimatePrice (IsRenew=true / Scene=RENEW) and does not place an order |
17
23
  | `--estimate` | Online quote (scripting path for "price only") |
18
- | `--yes` | **Web redirect** (BytePlus): returns `payment_via_web` payload with `subscribe_url`; **no renewal API is called**, nothing is renewed |
24
+ | `--yes` without `--estimate` | Creates an unpaid renewal pre-order and returns `payment_url`; payment is not completed automatically |
19
25
 
20
26
  > The gate response **resolves and fills the tier**: personal from `ListSubscribeTrade.InfoList[0].BizInfo`; team from `ListSeatInfos` using SeatIDs[0]. The `echo.tier` field lets the Agent confirm with the user, "Do you still want to renew this tier?"
21
27
 
@@ -29,7 +35,7 @@ arkcli plans renew --plan coding-plan-team --duration 3 --seat-ids seat-001,seat
29
35
  # Step 2: Price inquiry (optional)
30
36
  arkcli plans renew --plan coding-plan --duration 6 --estimate
31
37
 
32
- # Step 3: After showing the user the price, hand off to the web page via subscribe_url
38
+ # Step 3: After explicit confirmation, create an unpaid renewal pre-order and hand off payment_url
33
39
  arkcli plans renew --plan coding-plan --yes
34
40
  arkcli plans renew --plan coding-plan --duration 6 --yes
35
41
  arkcli plans renew --plan coding-plan-team --duration 3 --seat-ids seat-001,seat-002 --yes
@@ -40,10 +46,10 @@ arkcli plans renew --plan coding-plan-team --seat-ids seat-aaa --yes
40
46
 
41
47
  | Parameter | Required | Type | Description |
42
48
  |------|------|------|------|
43
- | `--plan` | Yes | string | `coding-plan` / `coding-plan-team` |
49
+ | `--plan` | Yes | string | `agent-plan` / `agent-plan-team` / `coding-plan` / `coding-plan-team` |
44
50
  | `--duration` | No | int | Renewal duration (months), 1–12, default 1 |
45
51
  | `--seat-ids` | Required for team | string | Comma-separated seat IDs to renew (personal edition **does not allow** this argument) |
46
- | `--yes` | No | bool | On BytePlus, returns the `payment_via_web` payload directly (no charge; equivalent to the gate for the subscribe_url purpose) |
52
+ | `--yes` | No | bool | Confirm creation of an unpaid renewal pre-order; complete payment at `payment_url` |
47
53
 
48
54
  > **Key difference**: Unlike `plans buy`, `renew` does not need `--type`; renewal keeps the original tier. It also does not need `--quantity`; the quantity is determined by the number of `--seat-ids`.
49
55
 
@@ -61,8 +67,8 @@ When neither `--yes` nor `--estimate` is passed:
61
67
  "total_amount_usd": 10,
62
68
  "original_amount_usd": 10,
63
69
  "subscribe_url": "https://console.byteplus.com/ark/region:ark+ap-southeast-1/subscription/coding-plan",
64
- "confirm_text": "BytePlus balance-based auto-pay is not supported by arkcli yet...",
65
- "next_step": "Ask the user to open <subscribe_url> in the browser and finish the purchase on the BytePlus subscription page. Do not rerun this command with --yes."
70
+ "confirm_text": "After explicit confirmation, --yes creates an unpaid pre-order without automatic charging...",
71
+ "next_step": "arkcli plans renew --plan coding-plan --duration 1 --yes"
66
72
  }
67
73
  ```
68
74
 
@@ -72,19 +78,18 @@ For team edition, `echo.seat_ids` lists the seat IDs being renewed and the paylo
72
78
 
73
79
  Amount fields are always USD on BytePlus; `total_amount_cny` / `original_amount_cny` will never appear. There is intentionally **no `agreements` array**.
74
80
 
75
- ## Return value (`--yes` / web redirect)
81
+ ## Return value (`--yes` / unpaid checkout)
76
82
 
77
- After adding `--yes`, the CLI does **not** invoke any renewal API. Instead:
83
+ After explicit confirmation and `--yes`, the CLI invokes the renewal API with automatic payment disabled:
78
84
 
79
85
  ```json
80
86
  {
81
- "status": "payment_via_web",
87
+ "status": "payment_required",
82
88
  "plan": "coding-plan-team",
83
89
  "duration": 3,
84
90
  "seat_ids": ["seat-001", "seat-002"],
85
- "subscribe_url": "https://console.byteplus.com/ark/region:ark+ap-southeast-1/subscription/coding-plan-enterprise",
86
- "message": "BytePlus balance-based auto-pay is not supported by arkcli yet. Open the subscribe_url above in the browser to complete the purchase on the BytePlus console.",
87
- "next_step": "Ask the user to open <subscribe_url> in the browser and finish the purchase on the BytePlus subscription page. Do not rerun this command with --yes."
91
+ "pre_order_numbers": "PRE-RENEW-EXAMPLE",
92
+ "payment_url": "<returned BytePlus checkout URL>"
88
93
  }
89
94
  ```
90
95
 
@@ -92,17 +97,17 @@ After adding `--yes`, the CLI does **not** invoke any renewal API. Instead:
92
97
 
93
98
  ## Failure semantics
94
99
 
95
- BytePlus arkcli does not renew orders in-CLI, so the `payment_failed` envelope (which the Volc build emits when auto-renew fails) **does not exist here**. Failure modes are:
100
+ A renewal API failure or missing pre-order number must not be reported as successful payment. `payment_failed` preserves surfaced order/seat information in its hint. Check the BytePlus console before retrying an uncertain result. Failure modes are:
96
101
 
97
102
  - **Validation error** (e.g. `--seat-ids is required for team plans`): normal error, exit code = 1. Fix the arguments and retry.
98
103
  - **Auth / preflight error**: normal error, exit code = 1. Log in and retry. See [`../../arkcli-shared/SKILL.md`](../../arkcli-shared/SKILL.md).
99
- - **Renewal failure on the web**: after the user opens `subscribe_url`, if the BytePlus web console rejects the renewal, the console will surface the failure. This is out of arkcli's control.
104
+ - **Renewal failure on the web**: after the user opens `payment_url`, if the BytePlus web console rejects the renewal, the console will surface the failure. This is out of arkcli's control.
100
105
 
101
106
  ## Common errors
102
107
 
103
108
  | Error | Cause | Handling |
104
109
  |---|---|---|
105
- | `--plan must be one of ...` | Plan key is misspelled | Strictly use one of two choices |
110
+ | `--plan must be one of ...` | Plan key is misspelled | Use an exact plan from the supported plan table |
106
111
  | `--seat-ids is required for team plans` | Team seat IDs omitted | List the seat IDs to renew |
107
112
  | `--seat-ids only applies to team plans` | Passed for personal edition | Remove `--seat-ids`; personal edition does not need it |
108
113
  | `--seat-ids must contain at least one non-empty seat ID` | Empty string / commas only | Check the input |
@@ -110,16 +115,16 @@ BytePlus arkcli does not renew orders in-CLI, so the `payment_failed` envelope (
110
115
 
111
116
  ## Notes
112
117
 
113
- - **No in-CLI renewal**: BytePlus arkcli never invokes any Renew-trade API. The renewal always happens on the web console.
118
+ - **No automatic payment**: the CLI invokes the renewal trade with `IsAutoPay=false` (shared packages use `AutoPay=false`); completion requires browser payment.
114
119
  - Team `--seat-ids` are not deduplicated; duplicate IDs are resolved by the server using the final entry.
115
120
  - Personal renewal **does not require querying InstanceID first**; the agreement-gate path automatically resolves it with `ListSubscribeTrade` for pricing/tier resolution. The user only needs `--plan`.
116
121
  - Renewal duration is not constrained by existing expiration-time accumulation; `--duration` 1–12 is the per-call limit.
117
- - Rerunning `plans renew --yes` is safe on BytePlus: each call is a pure web-redirect stub returning the same `subscribe_url`. It never charges the account.
122
+ - Rerunning `plans renew --yes` can create another renewal order. Do not retry automatically after an uncertain result.
118
123
 
119
124
  ## References
120
125
 
121
126
  - [arkcli-plans](../SKILL.md) -- Skill overview
122
- - [`plans buy`](arkcli-plans-buy.md) -- Same web-redirect semantics
127
+ - [`plans buy`](arkcli-plans-buy.md) -- Same unpaid-preorder and checkout semantics
123
128
  - [`plans get`](arkcli-plans-get.md) -- View expiration time after renewal
124
129
  - [`plans team seat-list`](arkcli-plans-team-seat-list.md) -- List renewable team seats
125
130
  - [arkcli-shared](../../arkcli-shared/SKILL.md)