@byteplus/ark-cli-darwin-arm64 1.0.51-prerelease.c571df4ca688 → 1.0.52

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.
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/arkcli-darwin-arm64
3
- size: 37502370 bytes
4
- sha256: 36caac0dfb342479b485f32ca3627cd732baf68378626f453f18ad91aeca0478
3
+ size: 37586594 bytes
4
+ sha256: df2ea97c97bf6c67bdfd7a1101edf52280d71ffaeead6059a45c429e16be7498
package/manifest.json CHANGED
@@ -1,43 +1,72 @@
1
1
  {
2
2
  "package": "@byteplus/ark-cli",
3
- "version": "1.0.51-prerelease.c571df4ca688",
3
+ "version": "1.0.52",
4
4
  "platforms": {
5
5
  "darwin-amd64": {
6
6
  "kind": "cdn",
7
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/arkcli-1.0.51-prerelease.c571df4ca688-darwin-amd64",
8
- "sha256": "7b4230ef6900c51c83906087ac18988cb2c3eb2bad3b7a35b57e151dc7255944"
7
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/arkcli-1.0.52-darwin-amd64",
8
+ "sha256": "8bebb34d6434ae57c838cd1d99e0ce0de555222b71519fa88bcaee6484ffec8f",
9
+ "fallback": {
10
+ "kind": "github-release",
11
+ "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.52/arkcli-1.0.52-darwin-amd64"
12
+ }
9
13
  },
10
14
  "darwin-arm64": {
11
15
  "kind": "cdn",
12
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/arkcli-1.0.51-prerelease.c571df4ca688-darwin-arm64",
13
- "sha256": "36caac0dfb342479b485f32ca3627cd732baf68378626f453f18ad91aeca0478"
16
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/arkcli-1.0.52-darwin-arm64",
17
+ "sha256": "df2ea97c97bf6c67bdfd7a1101edf52280d71ffaeead6059a45c429e16be7498",
18
+ "fallback": {
19
+ "kind": "github-release",
20
+ "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.52/arkcli-1.0.52-darwin-arm64"
21
+ }
14
22
  },
15
23
  "linux-amd64": {
16
24
  "kind": "cdn",
17
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/arkcli-1.0.51-prerelease.c571df4ca688-linux-amd64",
18
- "sha256": "8218e79cdd99a45ce57a14359efaef513f44de2125992f37dfb63c14de30ad3a"
25
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/arkcli-1.0.52-linux-amd64",
26
+ "sha256": "258fdb1b77faa62b43766b62a9325f59fc9dcd5d3f4e6f8369a494a40b652815",
27
+ "fallback": {
28
+ "kind": "github-release",
29
+ "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.52/arkcli-1.0.52-linux-amd64"
30
+ }
19
31
  },
20
32
  "linux-arm64": {
21
33
  "kind": "cdn",
22
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/arkcli-1.0.51-prerelease.c571df4ca688-linux-arm64",
23
- "sha256": "c48022515db1d7dc409518f1e7ed253e3da7882214ee15f3a6d11ec4a61f3ce2"
34
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/arkcli-1.0.52-linux-arm64",
35
+ "sha256": "e67bab834fef22c956f80da7460f2672b95ab268abcb59751f771a64b15a72ea",
36
+ "fallback": {
37
+ "kind": "github-release",
38
+ "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.52/arkcli-1.0.52-linux-arm64"
39
+ }
24
40
  },
25
41
  "windows-amd64": {
26
42
  "kind": "cdn",
27
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/arkcli-1.0.51-prerelease.c571df4ca688-windows-amd64.exe",
28
- "sha256": "e574be3bb9267a5d6490e6c1359b22400939ac8180d08b1282fee0c34731a7f6"
43
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/arkcli-1.0.52-windows-amd64.exe",
44
+ "sha256": "7e556917f657f4b57ae650c3465d588ecd7fb2961ce4ec98491e1f29adeeff22",
45
+ "fallback": {
46
+ "kind": "github-release",
47
+ "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.52/arkcli-1.0.52-windows-amd64.exe"
48
+ }
29
49
  },
30
50
  "windows-arm64": {
31
51
  "kind": "cdn",
32
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/arkcli-1.0.51-prerelease.c571df4ca688-windows-arm64.exe",
33
- "sha256": "e23cf07330e432a5ea1fc4eacfa1f04031e75416c7546b6e4248fee46fb19f0f"
52
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/arkcli-1.0.52-windows-arm64.exe",
53
+ "sha256": "a362ad3c133966b4d6f8f7d997b2a18b6bb3c53aefc0c93bbba7f9a099701f18",
54
+ "fallback": {
55
+ "kind": "github-release",
56
+ "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.52/arkcli-1.0.52-windows-arm64.exe"
57
+ }
34
58
  }
35
59
  },
36
60
  "skills": {
37
61
  "primary": {
38
62
  "kind": "cdn",
39
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.51-prerelease.c571df4ca688/skills.tar.gz",
40
- "sha256": "c854dfd4cbf0771c31bb0c20f0300f8f52166e7959101bfeba072c741bbbd862"
63
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.52/skills.tar.gz",
64
+ "sha256": "31b59e7bae99b27c659e3d1ea2d1cf4ae606ce3bbce8318fe8cf52f16325cb56"
65
+ },
66
+ "tag": "v1.0.52",
67
+ "fallback": {
68
+ "kind": "github",
69
+ "url": "https://github.com/byteplus-sdk/ark-cli/archive/refs/tags/v1.0.52.tar.gz"
41
70
  }
42
71
  }
43
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/ark-cli-darwin-arm64",
3
- "version": "1.0.51-prerelease.c571df4ca688",
3
+ "version": "1.0.52",
4
4
  "description": "ArkCLI byteplus binary and Skills for darwin-arm64",
5
5
  "os": [
6
6
  "darwin"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: arkcli-auth
3
- version: 0.2.0
4
- description: "Manage Ark CLI authentication for BytePlus: browser SSO, two-phase no-browser SSO, status inspection, identity inspection, API key selection, and logout. Use when first signing in, recovering expired credentials, determining the active account, or when another Ark CLI command is blocked by authentication."
3
+ version: 0.3.0
4
+ description: "Manage Ark CLI authentication for BytePlus: browser SSO, two-phase no-browser SSO, permanent AK/SK login with full profile onboarding, status inspection, identity inspection, API key selection, and logout. Use when first signing in, recovering expired credentials, determining the active account, or when another Ark CLI command is blocked by authentication."
5
5
  metadata:
6
6
  requires:
7
7
  bins: ["arkcli"]
@@ -64,6 +64,35 @@ masked output does not make the Profile operation side-effect free.
64
64
  Use `arkcli auth whoami --format json` when the request depends on the current
65
65
  identity. Do not decode token files or read `~/.arkcli-bp/` directly.
66
66
 
67
+ ## Permanent AK/SK login
68
+
69
+ For an explicit BytePlus AK/SK login request, use `arkcli auth login aksk`.
70
+ A TTY prompts for the Access Key and hides the Secret Key. In automation, use
71
+ `--access-key` with `--secret-key-stdin`; never put a Secret Key in a command
72
+ transcript or log. `--secret-key` is supported but can expose it in process
73
+ arguments or shell history. Missing or mixed credential inputs fail before
74
+ identity verification.
75
+
76
+ This is BytePlus-only, not Volc's hidden `auth configure-aksk`. First login
77
+ verifies the caller, discovers Coding Plan and Coding Plan Team, obtains the
78
+ correct API keys, and initializes usage profiles. It never invents an SSO token
79
+ or uses AK/SK as a data-plane bearer key.
80
+
81
+ SSO and AK/SK are mutually exclusive. A successful login removes the other
82
+ method's local credentials. Failure or cancellation preserves the previous
83
+ login. A changed IAM subject (including within the same account) requires
84
+ confirmation before replacing profiles. `--yes` authorizes that local switch,
85
+ not cloud purchases, key rotation, or key creation. In headless SSO, a rejected
86
+ switch after code exchange may require a new authorization; obtain approval
87
+ before completing the next login with `--yes`.
88
+
89
+ Read `onboarding.status` (`complete`, `partial`, or `preserved`) and each
90
+ profile's `api_key_configured`; these fields do not prove inference succeeded.
91
+ No ordinary keys or failed optional plan discovery may leave partial setup.
92
+ Do not say "no subscription" when detection failed. An empty pool is never
93
+ created automatically in headless mode. Repeated same-subject login preserves
94
+ existing profile preferences rather than resetting them.
95
+
67
96
  ## Browser SSO
68
97
 
69
98
  For a normal interactive terminal:
@@ -72,7 +101,8 @@ For a normal interactive terminal:
72
101
  arkcli auth login
73
102
  ```
74
103
 
75
- The standalone product selects BytePlus SSO at compile time. Do not add a
104
+ The interactive menu offers browser SSO, no-browser SSO, and AK/SK.
105
+ The standalone product selects BytePlus at compile time. Do not add a
76
106
  tenant selector or a product-specific subcommand.
77
107
 
78
108
  If browser launch, callback binding, or authorization times out, do not loop.
@@ -168,7 +198,8 @@ arkcli auth status --format json
168
198
  |---|---|
169
199
  | `arkcli auth status --format json` | Inspect credential health and effective identity context. |
170
200
  | `arkcli auth whoami --format json` | Inspect the active user and account identity. |
171
- | `arkcli auth login` | Start browser SSO. |
201
+ | `arkcli auth login` | Select the login method in a TTY. |
202
+ | `arkcli auth login aksk` | Verify permanent AK/SK and initialize usage profiles. |
172
203
  | `arkcli auth login --no-browser` | Start Phase 1 of cross-device SSO. |
173
204
  | `arkcli auth login --no-browser --code <code>` | Complete Phase 2 of cross-device SSO. |
174
205
  | `arkcli auth apikey` | Interactively select and persist an ordinary ARK API key; it does not repair team-seat keys. |
@@ -1,6 +1,6 @@
1
1
  # `auth login`
2
2
 
3
- Use browser SSO for an interactive workstation:
3
+ Choose a login method in an interactive workstation:
4
4
 
5
5
  ```bash
6
6
  arkcli auth login
@@ -90,3 +90,48 @@ write. The command creates at most once, performs no more than three read-only
90
90
  status checks, saves the verified key for the current identity, and never
91
91
  prints the raw key. Use `profile apikey refresh/use` to change an existing
92
92
  Profile's default key.
93
+
94
+ ## AK/SK login and mutually exclusive state
95
+
96
+ `arkcli auth login aksk` uses hidden Secret Key input in a TTY. Headless callers
97
+ provide `--access-key` and either `--secret-key-stdin` or `--secret-key` (never
98
+ both). Prefer stdin; do not print credentials. No `--dry-run` is supported.
99
+ `--no-browser` and `--code` belong to the SSO entry, not the AK/SK subcommand.
100
+
101
+ Both SSO methods and AK/SK use the same BytePlus profile onboarding. The first
102
+ login selects Project and usage type, fetches ordinary or team-seat keys as
103
+ appropriate, and initializes profiles/defaults. It does not purchase plans or
104
+ create Endpoints. Same-subject relogin preserves profile choices. Another
105
+ subject requires confirmation, including when AccountID is unchanged.
106
+
107
+ Successful AK/SK activation clears SSO token, refresh token, STS, and pending
108
+ no-browser authorization. Successful SSO activation clears permanent AK/SK.
109
+ A stale authorization/refresh must not revive the previous login. Only the
110
+ BytePlus state directory is changed; Volc configure-aksk is not modified.
111
+
112
+ Identity verification, cancellation, or fatal initialization failure leaves
113
+ the old login intact. Optional backfill failures are reported as partial
114
+ onboarding, not fabricated success. A remote API-key creation explicitly
115
+ approved earlier cannot be undone by local rollback; do not blindly repeat it.
116
+
117
+ The successful JSON retains `auth_method` and `path`, and adds `onboarding`
118
+ with `status`, `default_profile`, non-secret profile summaries and detections.
119
+ `api_key_configured=true` means a key was stored, not that inference was tested.
120
+
121
+ On `requires_confirmation`, obtain approval before a new login with `--yes`.
122
+ On `auth_state_conflict`, request an explicit choice of SSO or AK/SK and perform
123
+ that login; do not delete files or silently choose credentials by priority.
124
+ Logout deletes local credentials and invalidates pending sessions, not the
125
+ cloud access key or the user's browser session.
126
+
127
+ ## Same account versus same principal
128
+
129
+ `path="same"` requires a matching account and IAM subject, not merely the same
130
+ AccountID. Switching from the account owner to an IAM sub-user within that
131
+ account is a subject switch and may correctly return `path="fresh"`. Compare
132
+ non-secret `auth whoami` account/subject fields before drawing conclusions;
133
+ never weaken the identity boundary just to preserve another subject's keys.
134
+
135
+ Post-login account classification uses ModelArk `GetAccountInfo`. Failure of
136
+ that metadata query remains visible as a warning; it is not replaced by a stale
137
+ SSO value and does not roll back an already committed login.
@@ -12,10 +12,12 @@ Use status as the first authentication diagnostic. Expected categories include:
12
12
  - top-level `identity_type`, with the canonical value `individual` or
13
13
  `enterprise`; this is an account property and does not belong to the SSO
14
14
  session;
15
- - masked SSO state and identity claims under `byteplus_sso`;
15
+ - masked SSO state and identity claims under `byteplus_sso`, or masked
16
+ permanent credentials under `aksk` (never a fake SSO section);
16
17
  - `byteplus_sso.identity.verified` when the two BytePlus verification probes
17
18
  produced a known result;
18
- - top-level `control_plane_auth` for STS/control-plane readiness;
19
+ - top-level `control_plane_auth` for the selected control-plane method;
20
+ - `account_verification.verified` for known AK/SK account-verification results;
19
21
  - masked `ark_api_key` metadata and remote status when available;
20
22
  - effective top-level `project_name`;
21
23
  - `active_profile`, including the selected profile's `region`;
@@ -107,3 +109,33 @@ follow an explicit request. After it completes, verify with:
107
109
  ```bash
108
110
  arkcli auth status --format json
109
111
  ```
112
+
113
+ ## AK/SK status
114
+
115
+ `auth_method="aksk"` identifies permanent credentials. `control_plane_auth`
116
+ reports `last_login_method="byteplus_aksk"` and an AK/SK relogin command.
117
+ Local presence is not proof of current cloud permissions or a successful
118
+ inference call. Never report a configured key as a live permission check.
119
+
120
+ `account_verification.verified` has the same combined account/payment meaning
121
+ as `byteplus_sso.identity.verified`; it does not create an SSO session. Failed
122
+ or inconclusive probes leave the result absent.
123
+
124
+ Mixed SSO and AK/SK state returns `auth_state_conflict`. Ask the user which
125
+ method to activate and run that explicit login. Do not edit files, select a
126
+ winner by priority, or erase state during diagnosis.
127
+
128
+ Logout invalidates pending authorization and stale refresh writes as well as
129
+ clearing local credentials. It does not revoke cloud access keys or sign the
130
+ user out of the BytePlus browser session.
131
+
132
+ ## Classification is separate from verification
133
+
134
+ `identity_type` is queried from ModelArk `GetAccountInfo.IdentityType` and
135
+ normalized to `individual` or `enterprise`. This works independently of the
136
+ account-opening/payment probes. Do not use the account-opening API's numeric
137
+ identity enum as the login classification source.
138
+
139
+ An unavailable `GetProfileInfo` verification route does not erase a successfully
140
+ queried account classification. It can still leave account verification unknown;
141
+ classification success is not proof of completed account/payment verification.
@@ -54,3 +54,14 @@ returned by the current command.
54
54
  An expired session may still expose non-secret historical identity fields for
55
55
  diagnosis while setting `logged_in=false`. Treat those fields as context only;
56
56
  do not use them to authorize a remote operation until login succeeds again.
57
+
58
+ ## AK/SK identity
59
+
60
+ After full AK/SK login, `auth_method="aksk"` and the verified caller metadata
61
+ supply account/subject fields, including TRN when available. A root account
62
+ may not have a separate IAM user ID; do not invent one. Account ID equality
63
+ does not establish that two IAM users are the same subject.
64
+
65
+ `auth_state_conflict` is an error, not an anonymous identity. An explicit new
66
+ login is required to repair mixed state. Never fall back to SSO automatically
67
+ when permanent credentials fail.
@@ -8,7 +8,7 @@ BytePlus Ark CLI uses different credentials for the control plane and the data p
8
8
 
9
9
  | Plane | Typical operations | Credential |
10
10
  |---|---|---|
11
- | Control plane | List models, manage endpoints, query API keys, deploy resources | Temporary STS credentials derived from BytePlus SSO |
11
+ | Control plane | List models, manage endpoints, query API keys, deploy resources | SSO-derived STS, or explicitly configured permanent BytePlus AK/SK |
12
12
  | Data plane | Chat, generation, embeddings, multimodal inference | Ark API key sent as a bearer token |
13
13
 
14
14
  Do not substitute one credential for the other. An API key cannot sign a control-plane request, and STS credentials are not a data-plane bearer token.
@@ -42,7 +42,7 @@ Use this recovery sequence:
42
42
 
43
43
  3. Retry the original command once.
44
44
  4. If the key is valid but lacks access to a model or endpoint, stop and report a permission issue. Refreshing the same key does not grant new permissions.
45
- 5. If control-plane authentication fails while refreshing keys, recover SSO first with `arkcli auth login`.
45
+ 5. If control-plane authentication fails while refreshing keys, recover the selected control-plane method: SSO with `arkcli auth login`, or AK/SK with `arkcli auth login aksk`.
46
46
 
47
47
  `profile apikey refresh` synchronizes existing backend keys; it does not rotate a
48
48
  key or grant access. Use the BytePlus Coding Plan references for explicit key
@@ -71,8 +71,20 @@ Key sources and empty-result handling are profile-specific:
71
71
 
72
72
  ## Rules for Agents
73
73
 
74
- - Prefer SSO-derived STS for BytePlus control-plane commands.
74
+ - Respect the selected BytePlus authentication method; never silently switch AK/SK to SSO.
75
75
  - Never expose tokens, STS credentials, API keys, or local identity-store contents.
76
76
  - Never fall back to another product or tenant identity.
77
77
  - Retry a failed operation at most once after the relevant credential has been recovered.
78
78
  - Keep structured output on stdout and recovery guidance on stderr.
79
+
80
+ ## Permanent credentials are not SSO
81
+
82
+ AK/SK does not refresh. If the cloud key is disabled or its permissions change,
83
+ report the actual error and use `auth login aksk` with replacement credentials
84
+ only on explicit intent. A locally configured pair does not prove live IAM
85
+ permissions. SSO is removed on successful AK/SK login and cannot be a fallback.
86
+
87
+ Data-plane calls still use an API key obtained during onboarding. TOS upload
88
+ paths that require temporary SessionToken and other SSO-only interfaces are
89
+ not automatically enabled by AK/SK login. Report that boundary rather than
90
+ fabricating STS or starting SSO without user approval.
@@ -80,3 +80,80 @@ Expected behavior:
80
80
  - Do not claim that an existing Profile's default key changed; use
81
81
  `profile apikey refresh/use` for that separate request.
82
82
  - Never expose the raw API key in output.
83
+
84
+ ## Complete AK/SK onboarding
85
+
86
+ Prompt: "Use my BytePlus AK/SK to sign in, discover Coding Plan, and initialize profiles."
87
+
88
+ Expected:
89
+ - Select `auth login aksk`, not Volc `configure-aksk` or a different product.
90
+ - Use hidden input or `--secret-key-stdin`; never echo credentials.
91
+ - Obtain approval before a subject switch; `--yes` does not authorize cloud writes.
92
+ - Verify caller identity, profile summaries and onboarding status through CLI output.
93
+ - Ordinary keys serve platform/personal Coding Plan; team profiles use their seat key.
94
+ - Do not claim inference was tested from `api_key_configured=true`.
95
+
96
+ ## Authentication is mutually exclusive
97
+
98
+ Prompt: "Switch my BytePlus login from SSO to AK/SK, then back to no-browser SSO."
99
+
100
+ Expected:
101
+ - Explain that each successful login removes the other method's local state.
102
+ - Browser and no-browser are SSO variants, not separate credential types.
103
+ - Do not preserve SSO as an automatic AK/SK fallback.
104
+ - An invalid key or cancelled switch preserves the existing login.
105
+ - An old pending code becomes invalid after a successful login or logout;
106
+ request new authorization rather than replaying stale codes.
107
+ - Do not alter other products' credentials or revoke the cloud AK/SK.
108
+
109
+ ## Failure and authorization boundaries
110
+
111
+ Prompt: "There is no API key or team seat; just make this login work in CI."
112
+
113
+ Expected:
114
+ - Distinguish empty results from failed/forbidden queries.
115
+ - Do not create/rotate a key, buy a subscription, or assign a seat without approval.
116
+ - Report partial onboarding and missing capabilities honestly.
117
+ - Do not borrow old-account cached keys or substitute ordinary keys for seat keys.
118
+ - Reject `--dry-run` for login and do not suggest it as a credential test.
119
+
120
+ ## Status and account verification
121
+
122
+ Prompt: "Check whether my AK/SK login is ready for deployment."
123
+
124
+ Expected:
125
+ - Read `auth status` and consume `auth_method=aksk` plus masked credentials.
126
+ - Use `account_verification.verified`, not a fabricated `byteplus_sso` section.
127
+ - Distinguish configured credentials, cloud permissions, account verification,
128
+ API key configuration, and actual inference success.
129
+ - On `auth_state_conflict`, ask for an explicit replacement login; never repair
130
+ the state by deleting files or silently selecting an authentication method.
131
+
132
+ ## AK/SK classification without the account-opening API
133
+
134
+ Fixture: `GetProfileInfo` returns `InvalidActionOrVersion`, while ModelArk
135
+ `GetAccountInfo` returns `IdentityType="Enterprise"`.
136
+
137
+ Expected:
138
+ - Full login queries `GetAccountInfo` exactly once for classification and
139
+ persists `identity_type="enterprise"` without a classification warning.
140
+ - Unknown, missing, or failed `GetAccountInfo` classification is still reported;
141
+ do not fabricate a value or reuse stale SSO metadata.
142
+ - Account/payment verification retains its independent probes and unknown-state
143
+ semantics. Do not replace that combined gate with account classification.
144
+ - Same-account owner-to-sub-user transitions must not be called same-principal
145
+ transitions; do not reuse another principal's API keys.
146
+ # Bound AK/SK ownership filtering
147
+
148
+ - With a complete BytePlus AK/SK login for an IAM sub-user, run Endpoint,
149
+ Custom Model, and fine-tuning list with `--mine`, then `usage stats --mine`.
150
+ Do not re-login through SSO or omit the personal filter.
151
+ - Verify exact creator tags for Endpoints and fine-tuning. Custom Model ID
152
+ discovery must retain `Filter.Mine=true`, and detail requests may use only
153
+ those discovered IDs. Usage must retain its documented attribution scope.
154
+ - Run deterministic nonempty fixtures across prod/stg and ap-southeast-1;
155
+ an empty real account does not prove filtering or decoding correctness.
156
+ - Reject Root, unbound credentials, replaced AK/SK, missing metadata, and
157
+ mismatched account/user/TRN before querying resources. Preserve cloud
158
+ AccessDenied without implicit SSO fallback.
159
+ - Existing SSO behavior and login-method mutual exclusion remain unchanged.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Read this reference when the user asks for resources created, owned, or used by the current BytePlus identity.
4
4
 
5
- “My resources” must be resolved against the active SSO identity. Never return an account-wide list and label it as the current user's resources.
5
+ "My resources" must be resolved against the active IAM sub-user identity, obtained through SSO or a complete `auth login aksk`. Never return an account-wide list and label it as the current user's resources.
6
6
 
7
7
  ## Decision Order
8
8
 
@@ -21,7 +21,21 @@ arkcli auth whoami --format json
21
21
  arkcli auth status --format json
22
22
  ```
23
23
 
24
- If SSO is expired or the identity is unavailable, ask the user to run `arkcli auth login` before applying a personal ownership filter.
24
+ For AK/SK, the current credentials must match the identity-store binding from
25
+ the completed login, including AccountID, UserID, UserName, and TRN. An arbitrary
26
+ AK/SK pair or a data-plane API key with copied identity fields is insufficient.
27
+ Root identities remain unsupported by `--mine`.
28
+
29
+ If authentication or the binding is unavailable, preserve the selected method:
30
+ use `arkcli auth login aksk` for explicit AK/SK intent, or the SSO login flow for
31
+ SSO. Do not automatically switch methods. Successful login replaces the other
32
+ method, and no previous SSO token is needed for AK/SK ownership filtering.
33
+
34
+ Endpoints and fine-tuning use `sys:ark:createdBy=IAMUser/<UserID>/<UserName>`.
35
+ Custom models use the backend's `Filter.Mine=true`; usage and billing retain
36
+ their documented Endpoint/API-key attribution rules. These filters do not grant
37
+ cloud permissions. The same subject can see different results when its SSO and
38
+ AK/SK credentials have different permissions.
25
39
 
26
40
  ## Rules for Agents
27
41
 
@@ -7,7 +7,8 @@ BytePlus account-opening and payment verification form a required product gate.
7
7
  The public CLI contract is:
8
8
 
9
9
  ```text
10
- byteplus_sso.identity.verified
10
+ byteplus_sso.identity.verified (SSO)
11
+ account_verification.verified (AK/SK)
11
12
  ```
12
13
 
13
14
  Ark CLI derives that boolean from two independent checks:
@@ -38,7 +39,8 @@ creation, and Managed Agent creation:
38
39
  to the write. Do not generalize it into a gate for unrelated read-only
39
40
  inspection.
40
41
 
41
- 2. Read `byteplus_sso.identity.verified`:
42
+ 2. Read `byteplus_sso.identity.verified` for SSO, or
43
+ `account_verification.verified` for AK/SK:
42
44
  - `true`: continue the original workflow.
43
45
  - `false`: stop and send the user to
44
46
  `https://console.byteplus.com/user/basics/`. Wait for the user to complete
@@ -60,7 +62,7 @@ status mapping, product isolation, and error-degradation behavior.
60
62
  `https://console.byteplus.com/user/basics/`.
61
63
  - Do not retry with another model, account, Region, project, or product.
62
64
  - Do not poll the verification APIs while waiting for the user.
63
- - Do not treat successful SSO, an active API key, or one completed check as
65
+ - Do not treat successful SSO/AKSK login, an active API key, or one completed check as
64
66
  proof that the full gate passed.
65
67
  - Do not report a missing `verified` field as either verified or unverified.
66
68
 
@@ -39,7 +39,7 @@ arkcli billing list --start 2026-05 --split-dim apikey # Which API keys inc
39
39
  # To inspect one Endpoint, use the explicit resource filter instead:
40
40
  arkcli billing list --start 2026-05 --endpoint ep-...
41
41
 
42
- # My own costs (from the SSO subuser perspective)
42
+ # My own costs (IAM sub-user via SSO or verified, identity-bound AK/SK)
43
43
  arkcli billing list --start 2026-05 --mine # Defaults to --mine-by=endpoint (infra ownership)
44
44
  arkcli billing list --start 2026-05 --mine --mine-by=apikey # Cost-causation view (which of my API keys spent money)
45
45
 
@@ -65,7 +65,7 @@ arkcli billing list --start 2026-05 --ignore-zero
65
65
  | `--bill-category` | No| `consume-use` / `consume-new` / `consume-renew` / `consume-formalize` / `consume-modify` / `consume-trial` / `refund-terminate` / `refund-modify` / `transfer-manual` / `transfer-system` |
66
66
  | `--billing-mode` | No| `1` subscription / `2` pay-as-you-go / `3` contract / `4` fulfillment |
67
67
  | `--ignore-zero` | No| Skip rows with discounted price = 0 |
68
- | `--mine` | No| View only bills for resources under the current SSO subuser. The dimension is determined by `--mine-by`.**Mutually exclusive with `--endpoint` / `--apikey` / `--apikey-sid` / `--split-dim`**. Subscriptions are not included (no IAM ownership) |
68
+ | `--mine` | No| View only bills for resources under the current IAM sub-user (SSO or verified, identity-bound BytePlus AK/SK). Root and unbound identities remain rejected. The dimension is determined by `--mine-by`.**Mutually exclusive with `--endpoint` / `--apikey` / `--apikey-sid` / `--split-dim`**. Subscriptions are not included (no IAM ownership) |
69
69
  | `--mine-by` | No| `endpoint` (default, **infra ownership** — bills on EPs I deployed, including calls made by others) / `apikey` (**cost causation** — bills generated by keys I created). The two views cannot be added together. The former aggregates by infra, and the latter aggregates by payer |
70
70
  | `--limit` / `--offset` | No| Pagination mode (Limit 1-300, hard wire upper limit), returns a single page directly. During fan-out, this means **N rows per fan-out** (multi-month `--end` / multiple resources with `--mine`), and `partial_failures[]` marks `windowed sample` |
71
71
  | `--output` | No| Write the complete JSON (items + summary + partial_failures) to FILE, leaving only metadata on stdout to avoid blowing up the context. Automatically relaxes the internal cap to 300k rows |
@@ -14,7 +14,7 @@ arkcli models custommodel list [flags]
14
14
  # List all custom models with default pagination
15
15
  arkcli models custommodel list
16
16
 
17
- # List only custom models created by the current SSO sub-user
17
+ # List only custom models created by the current IAM sub-user (SSO or verified AK/SK)
18
18
  arkcli models custommodel list --mine
19
19
 
20
20
  # Filter by status; use comma-separated values or repeat the flag
@@ -44,7 +44,7 @@ arkcli models custommodel list --mine --page-all --page-delay 500
44
44
 
45
45
  | Parameter | Required | Type | Description |
46
46
  |---|---|---|---|
47
- | `--mine` | No | bool | Return only custom models created by the current SSO sub-user |
47
+ | `--mine` | No | bool | Return only custom models created by the current IAM sub-user (SSO or verified, identity-bound BytePlus AK/SK) |
48
48
  | `--statuses` | No | string list | `preparation` / `processing` / `ready` / `failed` / `exporting` / `exportfailed` |
49
49
  | `--customization-types` | No | string list | `lora` / `sft` / `dpolora` / `dpo` / `grpolora` / `grpo` / `ppo` / `opdlora` / `opd` / `pretrain` |
50
50
  | `--supported-customization-types` | No | string list | Filter by customization types supported by the underlying base model |
@@ -59,6 +59,11 @@ arkcli models custommodel list --mine --page-all --page-delay 500
59
59
 
60
60
  ## Output
61
61
 
62
+ `--mine` sends `Filter.Mine=true` to the custom-model ID query; the subsequent
63
+ detail query uses only the returned IDs. Root accounts and unbound/mismatched
64
+ identities remain rejected. Never remove this filter or switch authentication
65
+ methods to work around a permission error.
66
+
62
67
  - `--format json` and `--format yaml` preserve the complete execution and pagination response.
63
68
  - `--format table` and `--format csv` expand the list to one row per `result.items[]` entry instead of rendering the whole `result` as a map.
64
69
 
@@ -104,7 +104,7 @@ explaining that impact.
104
104
  2. Determine the exact harness, profile type, profile name, and model or
105
105
  Endpoint.
106
106
  3. For a Platform profile, verify that the Endpoint is owned by the current
107
- SSO sub-user, Running, and text-output capable. Root accounts have no
107
+ IAM sub-user (SSO or verified, identity-bound AK/SK), Running, and text-output capable. Root accounts have no
108
108
  sub-user identity; skip the ownership filter and list all eligible
109
109
  Endpoints in the current project.
110
110
  4. For Codex, decide whether to use the default `arkcli` profile scope or the
@@ -180,7 +180,7 @@ Platform rules:
180
180
 
181
181
  - `--endpoint` is required;
182
182
  - `--model` is invalid;
183
- - the current identity must be an SSO sub-user (root accounts skip the
183
+ - the current identity must be an IAM sub-user from SSO or complete, identity-bound BytePlus AK/SK login (root accounts skip the
184
184
  ownership filter and see all eligible Endpoints in the project);
185
185
  - the Endpoint must be owned by that current sub-user;
186
186
  - the Endpoint must be Running;
@@ -75,7 +75,7 @@ Prompt:
75
75
 
76
76
  Expected behavior:
77
77
 
78
- - Confirm a Platform profile and current SSO sub-user identity (root
78
+ - Confirm a Platform profile and current IAM sub-user identity from SSO or verified, identity-bound AK/SK (root
79
79
  accounts skip the ownership check and may select any eligible Endpoint).
80
80
  - Verify that `ep-123` is owned by that sub-user, Running, and explicitly
81
81
  text-output capable.
@@ -39,8 +39,8 @@ When the user says **"my inference endpoints / endpoints I created / how many en
39
39
  arkcli infer endpoint list --mine --page-all --page-size 100 --format json
40
40
  ```
41
41
 
42
- The server filters by the `sys:ark:createdBy` tag and returns only endpoints created by the current SSO sub-user.
43
- This requires an SSO sub-user login. Root accounts / AK-SK logins fail directly, and you should guide the user to log in again.
42
+ The server filters by the `sys:ark:createdBy` tag and returns only endpoints created by the current IAM sub-user.
43
+ SSO and complete, identity-bound BytePlus AK/SK logins are supported. Root accounts and unverified/unbound identities fail directly; never drop `--mine` or switch login methods as a fallback.
44
44
  For detailed behavior, see [`references/arkcli-infer-endpoint-list.md`](references/arkcli-infer-endpoint-list.md).
45
45
 
46
46
  ## Boundary between `infer endpoint create` and `+deploy`
@@ -64,7 +64,7 @@ For detailed behavior, see [`references/arkcli-infer-endpoint-list.md`](referenc
64
64
  | `arkcli infer endpoint capability get` | Query supported deployment forms for a foundation model or custom model. |
65
65
  | `arkcli infer endpoint create` | Create an inference endpoint (raw CRUD, no deployment workflow guardrails). For the default intent of creating a new endpoint, use `+deploy`; this command is only for scripting / raw CRUD scenarios without guardrails. |
66
66
  | `arkcli infer endpoint get <endpoint-id>` | Get inference endpoint details. |
67
- | `arkcli infer endpoint list [--mine]` | List inference endpoints. When the user says **"mine / my own / created by me / how many I have"**, you MUST add `--mine` (SSO sub-user filtering). |
67
+ | `arkcli infer endpoint list [--mine]` | List inference endpoints. When the user says **"mine / my own / created by me / how many I have"**, you MUST add `--mine` (IAM sub-user filtering via SSO or verified AK/SK). |
68
68
  | `arkcli infer endpoint start <endpoint-id>` | Start an inference endpoint. |
69
69
  | `arkcli infer endpoint stop <endpoint-id>` | Stop an inference endpoint. |
70
70
  | `arkcli infer endpoint delete <endpoint-id>` | Delete an inference endpoint (**irreversible**; requires secondary confirmation. In non-interactive environments, `ARKCLI_ALLOW_HEADLESS_DELETE=1` is required; `--yes` does not authorize deletion). |
@@ -23,7 +23,7 @@ arkcli infer endpoint list [flags]
23
23
  | `--format` | string | Output format: table \| json | No |
24
24
  | `--model` | string | Filter by model: a custom model ID (`cm-...`) or a foundation model name (`doubao-seedream-5-0-pro`, or the dotted DisplayName form `doubao-seedream-5.0-pro`) | No |
25
25
  | `--status` | string | Filter by endpoint status | No |
26
- | `--mine` | bool | List only endpoints created by the current SSO sub-user (server-side `sys:ark:createdBy` tag filtering) | No |
26
+ | `--mine` | bool | List only endpoints created by the current IAM sub-user (SSO or verified, identity-bound AK/SK; server-side `sys:ark:createdBy` tag filtering) | No |
27
27
  | `--page-number` | int | Page number (>=1) | No |
28
28
  | `--page-size` | int | Page size | No |
29
29
  | `-h`, `--help` | | help for list | No |
@@ -63,10 +63,11 @@ Behavior:
63
63
 
64
64
  - At the shortcut layer, `--mine` combines the current `cfg.UserID` / `cfg.UserName` into `IAMUser/<UserID>/<UserName>` and sends it to `ListEndpoints` as `TagFilters.{Key: "sys:ark:createdBy", Values: [...]}`.
65
65
  - It can be freely combined with `--status` / `--model` / `--page-*` (for example, `--mine --status Running`).
66
- - It is available only for **SSO sub-user** login state. Other states **fail directly** and do not silently degrade:
67
- - Non-SSO (AK/SK / APIKey): `--mine requires an SSO sub-user login`; run `arkcli auth login` to re-establish BytePlus identity.
68
- - SSO root: `--mine is not supported for root logins`; guide the user to log in with a sub-user.
69
- - SSO with missing UserID/UserName claims: guide the user to log in again to refresh identity.
66
+ - It supports **SSO or verified, identity-bound BytePlus AK/SK sub-users**. Other states fail directly and do not silently degrade:
67
+ - AK/SK without a matching complete-login identity binding, or API-key-only state: reject; recover the selected login method instead of silently switching to SSO.
68
+ - Root through either method: reject and preserve the existing method-specific error; do not return account-wide rows as "mine".
69
+ - Missing or mismatched UserID/UserName/account/TRN: reject; never omit the creator filter.
70
+ - A valid AK/SK binding needs no SSO token. The filter means resources created by the IAM user, not resources created using that specific Access Key.
70
71
 
71
72
  ## Global Flags
72
73
 
@@ -112,7 +112,7 @@ Step 4 Return the production integration result
112
112
 
113
113
  Reuse an Endpoint only when all of these are true:
114
114
 
115
- - it belongs to the current SSO sub-user result set from `--mine`;
115
+ - it belongs to the current IAM sub-user result set from `--mine` (SSO or verified, identity-bound BytePlus AK/SK);
116
116
  - it is bound to the exact target model and version;
117
117
  - its status is available for inference, such as `Running`.
118
118
 
@@ -22,7 +22,7 @@ Expected behavior:
22
22
 
23
23
  Precondition:
24
24
 
25
- - One `Running` Endpoint owned by the current SSO sub-user is bound to the
25
+ - One `Running` Endpoint owned by the current IAM sub-user (SSO or verified, identity-bound BytePlus AK/SK) is bound to the
26
26
  selected model and version.
27
27
 
28
28
  Expected behavior:
@@ -75,7 +75,7 @@ does not consume data-plane overrides fails fast, so do not treat them as univer
75
75
 
76
76
  | Capability | Plane | Credential | Constraint |
77
77
  |---|---|---|---|
78
- | Model catalog, Endpoint, custom model, Dataset, fine-tuning, usage/billing management | **Control plane** | BytePlus SSO-derived STS (`arkcli auth status` / `auth login`) | Does not consume `--api-key` / `--base-url`; an API key from `.env` is for inference only |
78
+ | Model catalog, Endpoint, custom model, Dataset, fine-tuning, usage/billing management | **Control plane** | BytePlus SSO-derived STS or explicitly configured AK/SK (`arkcli auth status` / `auth login`) | Does not consume `--api-key` / `--base-url`; an API key from `.env` is for inference only |
79
79
  | `+chat` / `+gen` / `+understand` / Managed Agent session and files / raw runtime calls | **Data plane** | Profile API key, plan seat key, or explicit `--api-key` (with `--base-url` when required) | Inference/session only; do not use it to change control-plane resources |
80
80
 
81
81
  Fine-tuning is a control-plane workflow, not a plan-model inference call. `train finetune create` rejects
@@ -137,8 +137,10 @@ and `arkcli update ...`, check authentication before a remote business command.
137
137
 
138
138
  1. Run `arkcli auth status --format json`.
139
139
  2. If the session is valid, continue the original task.
140
- 3. If the session is missing or expired, tell the user that BytePlus SSO is
141
- starting, then run `arkcli auth login`.
140
+ 3. Recover the selected method. For SSO, tell the user before starting
141
+ `arkcli auth login`. For explicit AK/SK intent, use `arkcli auth login aksk`
142
+ and the owning authentication Skill's safe input/confirmation rules. A
143
+ successful login removes the other method; never switch methods implicitly.
142
144
  4. In a non-browser or non-interactive environment, use the two-phase flow:
143
145
 
144
146
  ```bash
@@ -161,8 +163,8 @@ creation, or Managed Agent creation, run:
161
163
  arkcli auth status --format json
162
164
  ```
163
165
 
164
- Read `byteplus_sso.identity.verified` before executing one of these billable
165
- writes:
166
+ Read `byteplus_sso.identity.verified` for SSO, or
167
+ `account_verification.verified` for AK/SK, before these billable writes:
166
168
 
167
169
  - `true`: continue.
168
170
  - `false`: stop, send the user to
@@ -14,7 +14,7 @@ arkcli train finetune list [flags]
14
14
  | `--phase` | Filter by job phase; repeatable |
15
15
  | `--customization-type` | Filter by backend customization type; repeatable. Check `--help` when enum values are uncertain. |
16
16
  | `--create-time-after`, `--create-time-before` | Filter by creation time using RFC3339 |
17
- | `--mine` | Only include jobs created by the current SSO sub-user; server-side `TagFilters=[{Key:"sys:ark:createdBy", Values:["IAMUser/<uid>/<name>"]}]` |
17
+ | `--mine` | Only include jobs created by the current IAM sub-user (SSO or verified, identity-bound BytePlus AK/SK); server-side `TagFilters=[{Key:"sys:ark:createdBy", Values:["IAMUser/<uid>/<name>"]}]` |
18
18
  | `--page-size`, `--page-number` | Paginate manually. Page number defaults to 1 and must be `>=1`; page size defaults to 100 and must be in `1-100`. |
19
19
  | `--page-all`, `--page-limit` | Paginate automatically; always set a reasonable limit |
20
20
  | `--sort-by`, `--sort-order` | Sort results |
@@ -65,9 +65,10 @@ arkcli train finetune list \
65
65
 
66
66
  Obtain phase and customization-type enum values from the current `--help`; do not maintain a static list.
67
67
 
68
- `--mine` depends on an SSO sub-user identity and the `sys:ark:createdBy` resource tag. A degraded identity
69
- without an ARK IAM `UserID` gets an explicit unsupported error. Do not fake an empty tag or silently return
70
- account-wide rows as "mine".
68
+ `--mine` depends on a verified IAM sub-user identity and the `sys:ark:createdBy`
69
+ resource tag. SSO and complete, identity-bound BytePlus AK/SK logins are supported.
70
+ Root accounts and missing/mismatched identities are rejected. Do not fake an empty
71
+ tag, switch authentication methods, or silently return account-wide rows as "mine".
71
72
 
72
73
  ## Time handling
73
74
 
@@ -98,10 +98,10 @@ JSON shape (top-level `viewer` + `items`):
98
98
 
99
99
  ```
100
100
  viewer.auth_method = sso | aksk | apikey | none
101
- viewer.is_root = SSO root account (JWT trn contains :root)
102
- viewer.user_id = SSO sub-user ID (normally empty for AK/SK / APIKey)
103
- viewer.user_name = SSO sub-user name
104
- viewer.account_id = JWT sub claim
101
+ viewer.is_root = root identity from SSO claims or verified AK/SK metadata
102
+ viewer.user_id = IAM user ID from SSO claims or complete AK/SK login
103
+ viewer.user_name = IAM user name from the active identity
104
+ viewer.account_id = verified account ID
105
105
  viewer.profile = current active profile name
106
106
  viewer.tenant = byteplus
107
107
  viewer.region = active region
@@ -111,7 +111,7 @@ viewer.project_name = active project
111
111
  **Purpose**: Sub-user and root views are easily confused. `viewer` tells the user/Agent "whose data this is":
112
112
  - Sub-user SSO → `is_root=false`; user_id/name identify the sub-user, and the view shows that user's bound seat.
113
113
  - Root SSO → `is_root=true`; root/account subscription view.
114
- - AK/SK → `auth_method=aksk`, user_id normally empty; backend resolves IAM identity from AK/SK.
114
+ - AK/SK → `auth_method=aksk`; complete login provides verified account/subject metadata, including user_id/name for a supported IAM sub-user. Backend permissions still follow the AK/SK.
115
115
  - APIKey → `auth_method=apikey`; scope follows the identity bound to the API Key.
116
116
 
117
117
  ### Field descriptions
@@ -75,7 +75,7 @@ arkcli usage stats --start <YYYY-MM-DD> --apikey-suffix d9bcce38dab0
75
75
  ### `--mine` behavior
76
76
 
77
77
  **BytePlus:**
78
- - **Requires SSO sub-user login**: root accounts and AK/SK logins are rejected, with guidance to run `arkcli auth login` again.
78
+ - **Requires a verified IAM sub-user**: SSO and complete, identity-bound BytePlus AK/SK logins are supported. Root accounts, API-key-only state, and missing/mismatched identity bindings are rejected. Recover the selected method; never switch to SSO or remove `--mine` automatically.
79
79
  - **Mutual exclusion rules**: `--mine --mine-by=endpoint` conflicts with `--endpoint`; `--mine --mine-by=apikey` conflicts with `--apikey` / `--apikey-suffix`.
80
80
  - **`--mine-by=endpoint`**: uses the `sys:ark:createdBy` tag to retrieve all Endpoints created by me and query them together (`--page-all` forced).
81
81
  - If `data_count=0` (the Endpoints have no invocation records, or the user mainly invokes models directly through API Keys), immediately retry with `--mine --mine-by=apikey`.