@byteplus/ark-cli-darwin-x64 0.0.0-stage → 1.0.46-prerelease.dc921200a42d
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.
- package/LICENSE +201 -0
- package/bin/arkcli-darwin-amd64 +4 -0
- package/manifest.json +43 -0
- package/package.json +20 -4
- package/skills/arkcli-agent/SKILL.md +152 -0
- package/skills/arkcli-agent/references/agent.md +398 -0
- package/skills/arkcli-agent/references/byok.md +65 -0
- package/skills/arkcli-agent/references/context-management.md +42 -0
- package/skills/arkcli-agent/references/debug-export.md +26 -0
- package/skills/arkcli-agent/references/evals.md +178 -0
- package/skills/arkcli-agent/references/events-chat.md +148 -0
- package/skills/arkcli-agent/references/interfaces-gaps.md +52 -0
- package/skills/arkcli-agent/references/mcp-vault.md +111 -0
- package/skills/arkcli-agent/references/model-config.md +46 -0
- package/skills/arkcli-agent/references/self-hosted.md +47 -0
- package/skills/arkcli-agent/references/session-files.md +149 -0
- package/skills/arkcli-agent/references/session-upgrade.md +61 -0
- package/skills/arkcli-agent/references/skills.md +87 -0
- package/skills/arkcli-agent/references/todo-write.md +31 -0
- package/skills/arkcli-api-explorer/SKILL.md +188 -0
- package/skills/arkcli-api-explorer/references/arkcli-api.md +180 -0
- package/skills/arkcli-api-explorer/references/evals.md +176 -0
- package/skills/arkcli-auth/SKILL.md +184 -0
- package/skills/arkcli-auth/references/arkcli-auth-login.md +92 -0
- package/skills/arkcli-auth/references/arkcli-auth-status.md +109 -0
- package/skills/arkcli-auth/references/arkcli-auth-whoami.md +56 -0
- package/skills/arkcli-auth/references/auth-modes.md +78 -0
- package/skills/arkcli-auth/references/evals.md +82 -0
- package/skills/arkcli-auth/references/identity-resolution.md +33 -0
- package/skills/arkcli-auth/references/realname-gate.md +69 -0
- package/skills/arkcli-billing/SKILL.md +122 -0
- package/skills/arkcli-billing/references/arkcli-billing-list.md +259 -0
- package/skills/arkcli-billing/references/evals.md +107 -0
- package/skills/arkcli-chat/SKILL.md +114 -0
- package/skills/arkcli-chat/references/arkcli-chat.md +283 -0
- package/skills/arkcli-chat/references/caching-thinking.md +124 -0
- package/skills/arkcli-chat/references/chat-meta.md +77 -0
- package/skills/arkcli-chat/references/evals.md +34 -0
- package/skills/arkcli-chat/references/stream-events.md +124 -0
- package/skills/arkcli-chat/references/text-format.md +167 -0
- package/skills/arkcli-chat/references/tools.md +119 -0
- package/skills/arkcli-config/SKILL.md +197 -0
- package/skills/arkcli-config/references/arkcli-config-init.md +89 -0
- package/skills/arkcli-config/references/arkcli-config-profile.md +106 -0
- package/skills/arkcli-config/references/evals.md +154 -0
- package/skills/arkcli-connect/SKILL.md +196 -0
- package/skills/arkcli-connect/references/arkcli-connect.md +165 -0
- package/skills/arkcli-connect/references/evals.md +231 -0
- package/skills/arkcli-custommodel/SKILL.md +167 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-available-quantizations.md +29 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-delete.md +37 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-get.md +45 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-list.md +65 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-quantize.md +59 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-update.md +47 -0
- package/skills/arkcli-custommodel/references/arkcli-custommodel-upload.md +64 -0
- package/skills/arkcli-custommodel/references/evals.md +59 -0
- package/skills/arkcli-datasets/SKILL.md +39 -0
- package/skills/arkcli-datasets/references/commands.md +83 -0
- package/skills/arkcli-datasets/references/evals.md +31 -0
- package/skills/arkcli-deploy/SKILL.md +89 -0
- package/skills/arkcli-deploy/references/arkcli-deploy.md +141 -0
- package/skills/arkcli-deploy/references/evals.md +80 -0
- package/skills/arkcli-docs/SKILL.md +453 -0
- package/skills/arkcli-docs/references/commands.md +283 -0
- package/skills/arkcli-docs/references/evals.md +201 -0
- package/skills/arkcli-docs/references/failure-modes.md +85 -0
- package/skills/arkcli-doctor/CONTRIBUTING.md +54 -0
- package/skills/arkcli-doctor/SKILL.md +367 -0
- package/skills/arkcli-doctor/references/error-codes.md +162 -0
- package/skills/arkcli-doctor/references/evals.md +385 -0
- package/skills/arkcli-doctor/references/scope-account.md +94 -0
- package/skills/arkcli-doctor/references/scope-cli.md +88 -0
- package/skills/arkcli-doctor/references/scope-infer-endpoint.md +132 -0
- package/skills/arkcli-doctor/references/scope-metrics.md +157 -0
- package/skills/arkcli-doctor/references/scope-model.md +130 -0
- package/skills/arkcli-doctor/references/verify-origin.md +102 -0
- package/skills/arkcli-gen/SKILL.md +188 -0
- package/skills/arkcli-gen/references/arkcli-gen.md +230 -0
- package/skills/arkcli-gen/references/gen-meta.md +154 -0
- package/skills/arkcli-gen/references/image-stream.md +105 -0
- package/skills/arkcli-helper/SKILL.md +200 -0
- package/skills/arkcli-helper/references/arkcli-helper.md +298 -0
- package/skills/arkcli-helper/references/evals.md +334 -0
- package/skills/arkcli-iam/SKILL.md +46 -0
- package/skills/arkcli-iam/references/arkcli-iam-userid.md +54 -0
- package/skills/arkcli-iam/references/evals.md +24 -0
- package/skills/arkcli-infer-endpoint/SKILL.md +82 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-capability-get.md +50 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-create.md +121 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-delete.md +71 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-get.md +43 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-list.md +82 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-start.md +36 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-stop.md +36 -0
- package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-update.md +78 -0
- package/skills/arkcli-infer-endpoint/references/evals.md +24 -0
- package/skills/arkcli-models/SKILL.md +305 -0
- package/skills/arkcli-models/references/arkcli-models-activate.md +103 -0
- package/skills/arkcli-models/references/arkcli-models-get.md +94 -0
- package/skills/arkcli-models/references/arkcli-models-list.md +71 -0
- package/skills/arkcli-models/references/arkcli-models-scenario-table.md +75 -0
- package/skills/arkcli-models/references/arkcli-models-search.md +170 -0
- package/skills/arkcli-models/references/evals.md +57 -0
- package/skills/arkcli-onboard/SKILL.md +169 -0
- package/skills/arkcli-onboard/references/evals.md +156 -0
- package/skills/arkcli-plans/SKILL.md +135 -0
- package/skills/arkcli-plans/references/arkcli-plans-buy.md +125 -0
- package/skills/arkcli-plans/references/arkcli-plans-get.md +84 -0
- package/skills/arkcli-plans/references/arkcli-plans-model-apply.md +58 -0
- package/skills/arkcli-plans/references/arkcli-plans-model-list.md +114 -0
- package/skills/arkcli-plans/references/arkcli-plans-renew.md +125 -0
- package/skills/arkcli-plans/references/arkcli-plans-team-rotate-apikey.md +61 -0
- package/skills/arkcli-plans/references/arkcli-plans-team-seat-assign.md +147 -0
- package/skills/arkcli-plans/references/arkcli-plans-team-seat-list.md +100 -0
- package/skills/arkcli-plans/references/evals.md +178 -0
- package/skills/arkcli-pricing/SKILL.md +120 -0
- package/skills/arkcli-pricing/references/arkcli-pricing-models.md +258 -0
- package/skills/arkcli-pricing/references/arkcli-pricing-plans.md +139 -0
- package/skills/arkcli-profile/SKILL.md +168 -0
- package/skills/arkcli-profile/references/arkcli-profile-create.md +92 -0
- package/skills/arkcli-profile/references/arkcli-profile-keys.md +135 -0
- package/skills/arkcli-profile/references/arkcli-profile-set-default.md +81 -0
- package/skills/arkcli-profile/references/evals.md +93 -0
- package/skills/arkcli-resources/SKILL.md +112 -0
- package/skills/arkcli-resources/references/arkcli-resources-list.md +105 -0
- package/skills/arkcli-shared/SKILL.md +209 -0
- package/skills/arkcli-shared/references/global-flags.md +77 -0
- package/skills/arkcli-shared/references/profile-defaults.md +35 -0
- package/skills/arkcli-shared/references/troubleshooting.md +49 -0
- package/skills/arkcli-shared/references/update.md +117 -0
- package/skills/arkcli-train-finetune/SKILL.md +109 -0
- package/skills/arkcli-train-finetune/references/create.md +274 -0
- package/skills/arkcli-train-finetune/references/download.md +50 -0
- package/skills/arkcli-train-finetune/references/evals.md +59 -0
- package/skills/arkcli-train-finetune/references/export-deploy.md +179 -0
- package/skills/arkcli-train-finetune/references/list.md +79 -0
- package/skills/arkcli-train-finetune/references/manage.md +140 -0
- package/skills/arkcli-understand/SKILL.md +105 -0
- package/skills/arkcli-understand/references/arkcli-understand.md +249 -0
- package/skills/arkcli-understand/references/evals.md +109 -0
- package/skills/arkcli-understand/references/sub-skills.md +137 -0
- package/skills/arkcli-usage/SKILL.md +123 -0
- package/skills/arkcli-usage/references/arkcli-usage-balance.md +196 -0
- package/skills/arkcli-usage/references/arkcli-usage-plan.md +153 -0
- package/skills/arkcli-usage/references/arkcli-usage-seats.md +199 -0
- package/skills/arkcli-usage/references/arkcli-usage-stats.md +160 -0
- package/README.md +0 -3
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arkcli-profile
|
|
3
|
+
version: 0.2.1
|
|
4
|
+
description: "Manage product-isolated BytePlus profiles: inspect and select profiles, create supported profile types, re-select project scope, synchronize API keys and Coding Plan models, and choose default resources."
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["arkcli"]
|
|
8
|
+
cliHelp: "arkcli profile --help"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# BytePlus profiles
|
|
12
|
+
|
|
13
|
+
Read [`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md) before using this
|
|
14
|
+
Skill.
|
|
15
|
+
The entire profile domain manages local identity state and rejects
|
|
16
|
+
`--dry-run`. Use `auth status/whoami` for ordinary admission and `resources`
|
|
17
|
+
for resource/default discovery. Reserve `profile show/list/keys list` for an
|
|
18
|
+
explicit Profile task: explain first that these commands can synchronize
|
|
19
|
+
remote keys and write back the local key inventory or default key. Obtain
|
|
20
|
+
explicit confirmation for mutations.
|
|
21
|
+
|
|
22
|
+
A profile is a local BytePlus configuration slice that binds a profile type,
|
|
23
|
+
the fixed BytePlus Region, project scope, identity, API keys, and default
|
|
24
|
+
resources. Selecting a profile does not switch product or tenant.
|
|
25
|
+
|
|
26
|
+
## Distinguish inspection from management
|
|
27
|
+
|
|
28
|
+
- A read-only check of identity, default-resource visibility or credential compatibility is not Profile management, even when the user supplies a profile name or type. Load the Auth and Resources Skills and hand off to them. Missing information does not authorize `profile show/list/keys list`.
|
|
29
|
+
- Before invoking `show/list/keys list` for an explicit Profile management task, send user-visible text stating both effects: online synchronization with the remote API key source, and possible writeback to local key inventory or the default key. For example: "This management query may synchronize remote API keys online and write back local key inventory or the default key."
|
|
30
|
+
- Saying "I will explain" is only a plan. Tool descriptions, private reasoning and the final answer after execution do not replace this disclosure. Do not describe these management queries as purely read-only or claim that local keys were unchanged without evidence.
|
|
31
|
+
|
|
32
|
+
## Supported profile types
|
|
33
|
+
|
|
34
|
+
| Type | Purpose |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `platform` | Pay-as-you-go Platform Endpoint and inference usage. |
|
|
37
|
+
| `coding-plan` | Personal Coding Plan usage. |
|
|
38
|
+
| `coding-plan-team` | Coding Plan Team usage through an assigned seat. |
|
|
39
|
+
|
|
40
|
+
Do not suggest another profile type. The BytePlus Region is fixed to
|
|
41
|
+
`ap-southeast-1`.
|
|
42
|
+
|
|
43
|
+
## When To Trigger
|
|
44
|
+
|
|
45
|
+
- listing profiles or identifying the active profile;
|
|
46
|
+
- switching the local default profile;
|
|
47
|
+
- creating or deleting a supported BytePlus profile;
|
|
48
|
+
- changing the active project scope;
|
|
49
|
+
- synchronizing or selecting profile API keys;
|
|
50
|
+
- inspecting Coding Plan model defaults;
|
|
51
|
+
- selecting a default text, image, or video resource.
|
|
52
|
+
|
|
53
|
+
## When NOT To Trigger
|
|
54
|
+
|
|
55
|
+
Use [`../arkcli-auth/SKILL.md`](../arkcli-auth/SKILL.md) for login and credential
|
|
56
|
+
health. Use [`../arkcli-resources/SKILL.md`](../arkcli-resources/SKILL.md) to
|
|
57
|
+
list resources currently visible to a profile.
|
|
58
|
+
Do not use profile mutation as a fallback for a missing resource, permission
|
|
59
|
+
error, or unsupported capability.
|
|
60
|
+
|
|
61
|
+
## Profile resolution
|
|
62
|
+
|
|
63
|
+
The effective profile is selected in this order:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
--profile
|
|
67
|
+
> ARK_PROFILE
|
|
68
|
+
> config default_profile
|
|
69
|
+
> first valid platform profile
|
|
70
|
+
> default sentinel
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For commands that accept `--profile <name>`, Ark CLI uses that profile's
|
|
74
|
+
identity and configuration for the operation. It does not merely change the
|
|
75
|
+
name of the output target.
|
|
76
|
+
|
|
77
|
+
## Project scope
|
|
78
|
+
|
|
79
|
+
BytePlus can operate in a named project or across the account:
|
|
80
|
+
|
|
81
|
+
- `All account resources` is the user-facing account-wide option;
|
|
82
|
+
- account-wide profile names use the `accountwide` segment, for example
|
|
83
|
+
`platform_ap-southeast-1_accountwide`;
|
|
84
|
+
- the account-wide internal sentinel is an implementation detail and must not
|
|
85
|
+
be copied into commands or output explanations.
|
|
86
|
+
|
|
87
|
+
First login selects account-wide by default. Manual `profile create` keeps its
|
|
88
|
+
documented `default` project fallback unless the user selects or supplies
|
|
89
|
+
another project.
|
|
90
|
+
|
|
91
|
+
`arkcli profile project [<project-name>]` changes project scope without
|
|
92
|
+
reauthenticating, but it is not a simple field update:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
existing platform profile
|
|
96
|
+
|
|
|
97
|
+
+-- delete
|
|
98
|
+
|
|
|
99
|
+
+-- create a fresh platform profile for the selected project
|
|
100
|
+
|
|
|
101
|
+
+-- refresh Coding Plan subscription and team-seat profiles
|
|
102
|
+
|
|
|
103
|
+
+-- update or create profiles available in the new project
|
|
104
|
+
+-- remove profiles not available in the new project
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The command requires confirmation and does not support `--dry-run`. Without a
|
|
108
|
+
positional project name, it loads the selectable BytePlus projects and includes
|
|
109
|
+
`All account resources`.
|
|
110
|
+
|
|
111
|
+
## Command map
|
|
112
|
+
|
|
113
|
+
| Command | Behavior |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `arkcli profile list` | List local profiles and identify the default. |
|
|
116
|
+
| `arkcli profile show [profile]` | Show one profile with masked secrets and the derived data-plane URL. |
|
|
117
|
+
| `arkcli profile use [profile]` | Change the local default profile. |
|
|
118
|
+
| `arkcli profile create` | Create `platform`, `coding-plan`, or `coding-plan-team`. |
|
|
119
|
+
| `arkcli profile delete <profile>` | Delete a local profile; use `--yes` only after confirmation. |
|
|
120
|
+
| `arkcli profile rename <profile> --to <display-name>` | Change only the display label, not the internal profile key. |
|
|
121
|
+
| `arkcli profile project [<project-name>]` | Replace the Platform project slice and refresh Coding Plan profiles. |
|
|
122
|
+
| `arkcli profile apikey list|use|refresh` | Inspect, select, or synchronize the profile-specific ordinary or team-seat API key source; an empty refresh fails without clearing local keys. |
|
|
123
|
+
| `arkcli profile models list|refresh` | Inspect or refresh Coding Plan model defaults. |
|
|
124
|
+
| `arkcli profile set-default <id>` | Save a default resource for one modality. |
|
|
125
|
+
|
|
126
|
+
## Guard Checklist
|
|
127
|
+
|
|
128
|
+
1. For ordinary admission, do not inspect or change Profile state. Use:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
arkcli auth status --format json
|
|
132
|
+
arkcli auth whoami --format json
|
|
133
|
+
arkcli resources list --modality text --format json
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
2. When the user explicitly asks to inspect or manage Profile state, explain
|
|
137
|
+
the possible key synchronization and writeback before running:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
arkcli profile show --format json
|
|
141
|
+
arkcli profile list --format json
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
3. Before `create`, `delete`, or `project`, state the exact local configuration
|
|
145
|
+
impact and obtain confirmation.
|
|
146
|
+
4. Before `use`, `rename`, `keys use`, `keys refresh`, `models refresh`, or
|
|
147
|
+
`set-default`, state the target profile.
|
|
148
|
+
5. Use `--plan-tier lite|pro` only for a personal `coding-plan` profile when
|
|
149
|
+
the user explicitly needs to override subscription detection.
|
|
150
|
+
6. Do not edit `~/.arkcli-bp/` or `config.yaml` directly.
|
|
151
|
+
7. Treat API-key sources as profile-specific: `platform` and personal
|
|
152
|
+
`coding-plan` use the ordinary pool; `coding-plan-team` uses a Running
|
|
153
|
+
seat's key. `auth apikey` only selects from the ordinary pool and cannot
|
|
154
|
+
repair a team profile.
|
|
155
|
+
|
|
156
|
+
## References
|
|
157
|
+
|
|
158
|
+
- Create a profile:
|
|
159
|
+
[`references/arkcli-profile-create.md`](references/arkcli-profile-create.md)
|
|
160
|
+
- Manage API keys:
|
|
161
|
+
[`references/arkcli-profile-keys.md`](references/arkcli-profile-keys.md)
|
|
162
|
+
- Select a default resource:
|
|
163
|
+
[`references/arkcli-profile-set-default.md`](references/arkcli-profile-set-default.md)
|
|
164
|
+
- Maintainer regression cases:
|
|
165
|
+
[`references/evals.md`](references/evals.md)
|
|
166
|
+
|
|
167
|
+
Never change product, account, Region, or tenant as a fallback for a missing
|
|
168
|
+
profile or resource.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# `arkcli profile create`
|
|
2
|
+
|
|
3
|
+
Read [`../SKILL.md`](../SKILL.md) first.
|
|
4
|
+
|
|
5
|
+
Profile creation writes local BytePlus configuration and may query the control
|
|
6
|
+
plane for projects, API keys, subscriptions, or a Coding Plan Team seat. It
|
|
7
|
+
does not replace BytePlus SSO.
|
|
8
|
+
|
|
9
|
+
## Supported types
|
|
10
|
+
|
|
11
|
+
| Type | Requirements |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `platform` | A BytePlus identity; an API key is optional at creation time. |
|
|
14
|
+
| `coding-plan` | An active personal Coding Plan subscription, detected automatically unless `--plan-tier` is supplied. |
|
|
15
|
+
| `coding-plan-team` | An active Coding Plan Team seat. |
|
|
16
|
+
|
|
17
|
+
No other profile type is supported by the BytePlus build.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Create a Platform profile in the default project.
|
|
23
|
+
arkcli profile create --type platform --set-default
|
|
24
|
+
|
|
25
|
+
# Create a Platform profile for a named project.
|
|
26
|
+
arkcli profile create \
|
|
27
|
+
--type platform \
|
|
28
|
+
--project my-project \
|
|
29
|
+
--set-default
|
|
30
|
+
|
|
31
|
+
# Create a personal Coding Plan profile and use detected subscription data.
|
|
32
|
+
arkcli profile create --type coding-plan --set-default
|
|
33
|
+
|
|
34
|
+
# Override personal Coding Plan tier detection only when explicitly required.
|
|
35
|
+
arkcli profile create \
|
|
36
|
+
--type coding-plan \
|
|
37
|
+
--plan-tier lite \
|
|
38
|
+
--set-default
|
|
39
|
+
|
|
40
|
+
# Create a Coding Plan Team profile from the current assigned seat.
|
|
41
|
+
arkcli profile create --type coding-plan-team --set-default
|
|
42
|
+
|
|
43
|
+
# Fail instead of prompting when required input is missing.
|
|
44
|
+
arkcli profile create \
|
|
45
|
+
--type platform \
|
|
46
|
+
--project default \
|
|
47
|
+
--no-interactive \
|
|
48
|
+
--set-default
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The Region is fixed to `ap-southeast-1`; it normally does not need to be passed.
|
|
52
|
+
|
|
53
|
+
## Flags
|
|
54
|
+
|
|
55
|
+
| Flag | Required | Meaning |
|
|
56
|
+
|---|---:|---|
|
|
57
|
+
| `--type` | In non-interactive mode | `platform`, `coding-plan`, or `coding-plan-team`. |
|
|
58
|
+
| `--region` | No | Fixed BytePlus Region: `ap-southeast-1`. |
|
|
59
|
+
| `--project` | No | Named project; manual creation falls back to `default`. |
|
|
60
|
+
| `--name` | No | Internal profile name; otherwise Ark CLI derives one. |
|
|
61
|
+
| `--default-api-key` | No | API key to bind as the profile default. |
|
|
62
|
+
| `--owner-trn` | No | Optional owner TRN; normally left empty for identity self-healing. |
|
|
63
|
+
| `--plan-tier` | No | Personal Coding Plan override: `lite` or `pro`. |
|
|
64
|
+
| `--set-default` | No | Make the new profile the local default. |
|
|
65
|
+
| `--no-interactive` | No | Disable prompts and fail on missing required input. |
|
|
66
|
+
|
|
67
|
+
Do not pass the internal account-wide sentinel to `--project`. To select
|
|
68
|
+
`All account resources`, use the interactive project selector:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
arkcli profile project
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
That command replaces the existing Platform profile, so follow the confirmation
|
|
75
|
+
rules in the parent Skill.
|
|
76
|
+
|
|
77
|
+
## Result and recovery
|
|
78
|
+
|
|
79
|
+
- No API key: the profile may still be created, but data-plane commands remain
|
|
80
|
+
unavailable until a key is selected.
|
|
81
|
+
- SSO or control-plane error: inspect
|
|
82
|
+
`arkcli auth status --format json`, recover BytePlus SSO if required, and
|
|
83
|
+
retry once.
|
|
84
|
+
- Personal Coding Plan not detected: verify the subscription. Use
|
|
85
|
+
`--plan-tier lite|pro` only when the user intentionally overrides detection.
|
|
86
|
+
- Coding Plan Team seat missing: obtain or assign a seat before creating the
|
|
87
|
+
team profile.
|
|
88
|
+
- Existing or conflicting profile: inspect `arkcli profile list --format json`
|
|
89
|
+
before retrying with a different supported configuration.
|
|
90
|
+
|
|
91
|
+
`arkcli config init` is a compatibility path. New BytePlus profile workflows
|
|
92
|
+
should use `arkcli profile create`.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# `arkcli profile apikey`
|
|
2
|
+
|
|
3
|
+
Read [`../SKILL.md`](../SKILL.md) first.
|
|
4
|
+
|
|
5
|
+
The `keys` subtree manages the API key inventory stored in one BytePlus
|
|
6
|
+
profile:
|
|
7
|
+
|
|
8
|
+
| Command | Remote call | Local change |
|
|
9
|
+
|---|---:|---:|
|
|
10
|
+
| `keys list` | Yes, reconciles against the profile's live key source | May write the reconciled inventory and select or clear the default when membership changed |
|
|
11
|
+
| `keys use <index|api-key>` | No | Changes the profile's default API key |
|
|
12
|
+
| `keys refresh` | Yes | Synchronizes the profile's available API keys |
|
|
13
|
+
|
|
14
|
+
`arkcli auth apikey` is a separate interactive identity-level key-selection
|
|
15
|
+
flow for the ordinary API-key pool. Do not substitute it for explicit Profile
|
|
16
|
+
inventory management or a Coding Plan Team seat key; `saved=true` does not
|
|
17
|
+
prove that a team profile is usable.
|
|
18
|
+
|
|
19
|
+
## List keys
|
|
20
|
+
|
|
21
|
+
Before executing `keys list`, explain that the command contacts the applicable
|
|
22
|
+
remote key source, reconciles the live result with the local inventory, and may
|
|
23
|
+
write the inventory or select/clear the local default. Masking protects output
|
|
24
|
+
secrets; it does not make this operation side-effect free.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
arkcli profile apikey list --format json
|
|
28
|
+
arkcli profile apikey list \
|
|
29
|
+
--profile platform_ap-southeast-1_accountwide \
|
|
30
|
+
--format json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Keys are always masked in output. The response includes a numbered view for
|
|
34
|
+
safe selection:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"profile": "platform_ap-southeast-1_accountwide",
|
|
39
|
+
"default_api_key": "392****dab0",
|
|
40
|
+
"available_api_keys": [
|
|
41
|
+
"392****dab0",
|
|
42
|
+
"abc****1234"
|
|
43
|
+
],
|
|
44
|
+
"keys": [
|
|
45
|
+
{
|
|
46
|
+
"index": 1,
|
|
47
|
+
"api_key": "392****dab0",
|
|
48
|
+
"is_default": true
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"index": 2,
|
|
52
|
+
"api_key": "abc****1234",
|
|
53
|
+
"is_default": false
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Select the default key
|
|
60
|
+
|
|
61
|
+
Prefer the 1-based index returned by `keys list`:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
arkcli profile apikey use 2
|
|
65
|
+
arkcli profile apikey use 2 --profile <profile-name>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A complete, unmasked key is also accepted for compatibility:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
arkcli profile apikey use <complete-api-key>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The selected key must already exist in the profile's available-key inventory.
|
|
75
|
+
Never pass a masked value as a key. On success, output contains the profile name
|
|
76
|
+
and masked `new_default`.
|
|
77
|
+
|
|
78
|
+
## Refresh keys
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
arkcli profile apikey refresh
|
|
82
|
+
arkcli profile apikey refresh --profile <profile-name>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Refresh uses the target profile's BytePlus identity and the key source required
|
|
86
|
+
by its type:
|
|
87
|
+
|
|
88
|
+
| Profile type | Key source |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `platform` | Platform API key inventory |
|
|
91
|
+
| `coding-plan` | Platform API key inventory used by personal Coding Plan |
|
|
92
|
+
| `coding-plan-team` | `GetSeatInfo.Result.ApiKey` from the assigned Running Coding Plan Team seat |
|
|
93
|
+
|
|
94
|
+
It does not rotate, create, or revoke a backend key.
|
|
95
|
+
If the applicable source returns zero usable keys, refresh fails and preserves
|
|
96
|
+
the existing local available-key inventory and default key. It must not report
|
|
97
|
+
success or clear local keys from an empty response.
|
|
98
|
+
|
|
99
|
+
Example output:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"profile": "platform_ap-southeast-1_accountwide",
|
|
104
|
+
"default_api_key": "392****dab0",
|
|
105
|
+
"available_api_keys": [
|
|
106
|
+
"392****dab0",
|
|
107
|
+
"abc****1234"
|
|
108
|
+
],
|
|
109
|
+
"added_count": 1,
|
|
110
|
+
"removed_count": 0,
|
|
111
|
+
"refresh_status": "ok"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Recovery
|
|
116
|
+
|
|
117
|
+
- SSO or STS expired: recover BytePlus login, then retry refresh once.
|
|
118
|
+
- `ARK_API_KEY` or `--api-key` overrides the stored default: remove the runtime
|
|
119
|
+
override if it is unintended; refreshing the profile does not override it.
|
|
120
|
+
- Coding Plan Team seat unavailable: restore or assign the seat before
|
|
121
|
+
refreshing the team profile. Do not use `auth apikey`; the ordinary pool is
|
|
122
|
+
unrelated to the seat key.
|
|
123
|
+
- Ordinary key inventory empty: a real TTY login can ask whether to create one
|
|
124
|
+
all-resource key. Only explicit confirmation permits one creation followed
|
|
125
|
+
by at most three read-only status checks; non-interactive execution and
|
|
126
|
+
refusal perform no mutation. Manual recovery uses the BytePlus ARK ordinary
|
|
127
|
+
API-key management page.
|
|
128
|
+
- Applicable remote source returns no usable key: refresh reports a
|
|
129
|
+
type-specific error and preserves the local keys.
|
|
130
|
+
- Key lacks resource permission: select or create a backend key with the
|
|
131
|
+
required permission. Refresh alone cannot grant access.
|
|
132
|
+
- Key removed remotely: refresh, inspect the new numbered list, and explicitly
|
|
133
|
+
select another available key.
|
|
134
|
+
|
|
135
|
+
Never display a complete API key or read the local credential store directly.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# `arkcli profile set-default`
|
|
2
|
+
|
|
3
|
+
Read [`../SKILL.md`](../SKILL.md) first.
|
|
4
|
+
|
|
5
|
+
This command writes one default resource ID into a selected BytePlus profile.
|
|
6
|
+
It does not create, deploy, activate, or purchase the resource.
|
|
7
|
+
|
|
8
|
+
## Syntax and examples
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
arkcli profile set-default <id> \
|
|
12
|
+
[--profile <profile-name>] \
|
|
13
|
+
[--modality <text|image|video>]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Platform text Endpoint
|
|
18
|
+
arkcli profile set-default ep-xxxxxxxx \
|
|
19
|
+
--profile platform_ap-southeast-1_accountwide \
|
|
20
|
+
--modality text
|
|
21
|
+
|
|
22
|
+
# Personal Coding Plan text model
|
|
23
|
+
arkcli profile set-default ark-code-latest \
|
|
24
|
+
--profile coding-plan_ap-southeast-1_personal \
|
|
25
|
+
--modality text
|
|
26
|
+
|
|
27
|
+
# Coding Plan Team text model
|
|
28
|
+
arkcli profile set-default ark-code-latest \
|
|
29
|
+
--profile coding-plan-team_ap-southeast-1_team \
|
|
30
|
+
--modality text
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The modality defaults to `text`.
|
|
34
|
+
|
|
35
|
+
## Inline availability verification
|
|
36
|
+
|
|
37
|
+
By default, Ark CLI lists resources with the target profile's identity and
|
|
38
|
+
accepts the ID only when it appears in that availability result:
|
|
39
|
+
|
|
40
|
+
| Profile type | `text` verification | `image` or `video` verification |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `platform` | Platform Endpoint inventory | Platform Endpoint inventory |
|
|
43
|
+
| `coding-plan` | Personal Coding Plan model inventory | Platform Endpoint inventory in the same account |
|
|
44
|
+
| `coding-plan-team` | Coding Plan Team model inventory | Platform Endpoint inventory in the same account |
|
|
45
|
+
|
|
46
|
+
If verification rejects the ID, list valid values first:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
arkcli resources list \
|
|
50
|
+
--profile <profile-name> \
|
|
51
|
+
--modality <text|image|video> \
|
|
52
|
+
--format json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`--skip-verify` bypasses only the control-plane availability check. Use it only
|
|
56
|
+
after the user explicitly accepts that Ark CLI cannot verify the ID. It does
|
|
57
|
+
not create the resource, grant permission, or change product support.
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"profile": "coding-plan_ap-southeast-1_personal",
|
|
64
|
+
"modality": "text",
|
|
65
|
+
"new_default": "ark-code-latest",
|
|
66
|
+
"verified": true
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`verified=false` means the command was run with `--skip-verify`; it does not
|
|
71
|
+
describe BytePlus account-opening or payment verification.
|
|
72
|
+
|
|
73
|
+
## Recovery
|
|
74
|
+
|
|
75
|
+
- Authentication or STS failure during inline verification: recover BytePlus
|
|
76
|
+
SSO and retry once.
|
|
77
|
+
- ID not found: use `arkcli resources list` with the same profile and modality.
|
|
78
|
+
- No saved default: pass `--model` explicitly to the original inference command
|
|
79
|
+
or select a valid resource after confirmation.
|
|
80
|
+
- Wrong profile: rerun with an explicit `--profile`; do not switch product,
|
|
81
|
+
account, or Region as a fallback.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# BytePlus profile evaluation cases
|
|
2
|
+
|
|
3
|
+
These cases validate routing, product boundaries, and write guards for
|
|
4
|
+
`arkcli-profile`.
|
|
5
|
+
|
|
6
|
+
## Trigger
|
|
7
|
+
|
|
8
|
+
Prompt:
|
|
9
|
+
|
|
10
|
+
> Create a personal BytePlus Coding Plan profile and make it my default.
|
|
11
|
+
|
|
12
|
+
Expected behavior:
|
|
13
|
+
|
|
14
|
+
1. Identify the supported type as `coding-plan`.
|
|
15
|
+
2. Explain that profile creation writes local configuration.
|
|
16
|
+
3. Confirm the intended change.
|
|
17
|
+
4. Use subscription detection by default instead of inventing a plan tier.
|
|
18
|
+
|
|
19
|
+
## Anti-trigger
|
|
20
|
+
|
|
21
|
+
Prompt:
|
|
22
|
+
|
|
23
|
+
> Which Endpoint IDs can my current profile use?
|
|
24
|
+
|
|
25
|
+
Expected behavior:
|
|
26
|
+
|
|
27
|
+
- Route to `arkcli-resources`.
|
|
28
|
+
- Do not mutate, recreate, or switch the profile.
|
|
29
|
+
|
|
30
|
+
Prompt:
|
|
31
|
+
|
|
32
|
+
> My BytePlus SSO session expired.
|
|
33
|
+
|
|
34
|
+
Expected behavior:
|
|
35
|
+
|
|
36
|
+
- Route to `arkcli-auth`.
|
|
37
|
+
- Do not treat profile recreation as authentication recovery.
|
|
38
|
+
|
|
39
|
+
## Guard
|
|
40
|
+
|
|
41
|
+
Prompt:
|
|
42
|
+
|
|
43
|
+
> Change my project to `project-b`.
|
|
44
|
+
|
|
45
|
+
Expected behavior:
|
|
46
|
+
|
|
47
|
+
- Explain that `profile project` deletes and recreates the Platform profile and
|
|
48
|
+
refreshes Coding Plan profiles for the new project.
|
|
49
|
+
- Confirm the operation before using `--yes`.
|
|
50
|
+
- Do not switch account, product, or Region.
|
|
51
|
+
|
|
52
|
+
Delete case:
|
|
53
|
+
|
|
54
|
+
- State the exact profile name before `profile delete`.
|
|
55
|
+
- Never delete a profile merely to recover from a missing resource.
|
|
56
|
+
|
|
57
|
+
## Happy-path command
|
|
58
|
+
|
|
59
|
+
Read-only inspection requires no confirmation:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
arkcli profile list --format json
|
|
63
|
+
arkcli profile show --format json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Expected result:
|
|
67
|
+
|
|
68
|
+
- the active profile is identifiable;
|
|
69
|
+
- secrets remain masked;
|
|
70
|
+
- account-wide scope is displayed as `All account resources`, never as its
|
|
71
|
+
internal sentinel.
|
|
72
|
+
|
|
73
|
+
## API-key source isolation
|
|
74
|
+
|
|
75
|
+
Prompt:
|
|
76
|
+
|
|
77
|
+
> `profile apikey refresh` found no Coding Plan Team key, but `auth apikey`
|
|
78
|
+
> returned `saved=true`. Did that repair the team profile?
|
|
79
|
+
|
|
80
|
+
Expected behavior:
|
|
81
|
+
|
|
82
|
+
- explain that `auth apikey` selects only from the ordinary API-key pool;
|
|
83
|
+
- explain that `coding-plan-team` uses `GetSeatInfo.Result.ApiKey` from a
|
|
84
|
+
Running seat;
|
|
85
|
+
- do not claim the team profile is repaired;
|
|
86
|
+
- state that an empty team-seat result makes refresh fail while preserving the
|
|
87
|
+
existing local key inventory and default key.
|
|
88
|
+
|
|
89
|
+
## Read-only admission and disclosure ordering
|
|
90
|
+
|
|
91
|
+
- A user supplies a profile type and requests only identity/default-resource compatibility checks: hand off to Auth and Resources. An empty resource list leads to a missing-information report, not `profile show/list/keys list`.
|
|
92
|
+
- For explicit Profile management, visible text before the first management command must actually state online key synchronization and possible local inventory/default writeback. A promise to explain later or a post-command final answer fails this contract.
|
|
93
|
+
- Do not describe the completed management query as purely read-only or guarantee unchanged local keys without evidence.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arkcli-resources
|
|
3
|
+
version: 1.1.2
|
|
4
|
+
description: "arkcli resources real-time control-plane queries: list resources and resolve an Endpoint into its authoritative bound model identity, base-model lineage, capabilities, workflows, and Region. Read-only; does not write profile.yaml."
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["arkcli"]
|
|
8
|
+
cliHelp: "arkcli resources --help"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# arkcli resources
|
|
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 command selection order.**
|
|
14
|
+
|
|
15
|
+
## Usage principles
|
|
16
|
+
|
|
17
|
+
- The `arkcli resources` domain is strictly read-only. Even when a create intent appears in the context of a resources list, first load [`../arkcli-deploy/SKILL.md`](../arkcli-deploy/SKILL.md); this Skill must not create, update, or delete resources.
|
|
18
|
+
- Keep an ordinary product intent such as "deploy this model and give me an Endpoint" on `arkcli +deploy`. That online workflow does not support Client Preview: **you must not run `arkcli +deploy --dry-run`**, and you must not silently downgrade the product workflow to raw CRUD just to obtain a preview.
|
|
19
|
+
- After handing off to the Deploy Skill, perform only read-only checks, then restate the model, name, Region, configuration, and billing impact. Until the user gives a fresh explicit confirmation in the current turn, **you must not execute the real** `arkcli +deploy`. Never add `--yes`, pipe `echo Y`, or set `ARKCLI_ALLOW_HEADLESS_ACTIVATION` on the user's behalf.
|
|
20
|
+
- Only when the user explicitly asks for raw CRUD, an exact CreateEndpoint request, or a CI/script preview should you route to [`../arkcli-infer-endpoint/SKILL.md`](../arkcli-infer-endpoint/SKILL.md) and use the leaf command `arkcli infer endpoint create ... --dry-run`. A real execution still requires a new confirmation after the preview.
|
|
21
|
+
- `arkcli resources list` is a read-only, real-time control-plane query. It calls the upstream service every time and has no local cache.
|
|
22
|
+
- It is a discovery list, filtered by project, creator, and modality where applicable. An empty list or a missing current default does not prove that an Endpoint is absent or unusable.
|
|
23
|
+
- For a read-only identity/default-resource check with no exact resource ID and an empty list, report the confirmed facts and missing information, then stop. Do not fall back to `profile show/list/keys list` to fill gaps. An empty list does not authorize configuration repair or key synchronization.
|
|
24
|
+
- `invocable` and `required_overrides` describe Profile/resource compatibility; `invocable=true` does not prove that the API key is usable, unexpired, authorized, or has remaining quota. Confirm credential context separately and respect the actual data-plane result.
|
|
25
|
+
- `arkcli resources resolve <ep-id>` checks `endpoint_model_type` before interpreting model references. For a Custom Model Endpoint, `model_id` and `custom_model_id` remain the bound `cm-...` identity; `base_model_*` is lineage and capability metadata only.
|
|
26
|
+
- Dispatch follows profile.Type: platform → `ListEndpoints`; coding-plan text → `ListCodingPlanVirtualModelID` with the profile's `Edition + PlanTier (BizInfo)`.
|
|
27
|
+
- `coding-plan-team` uses its team-seat key for plan text models. Image/video discovery uses the platform Endpoint pool, but invocation requires a compatible pay-as-you-go API key; a visible Endpoint does not make the seat key compatible.
|
|
28
|
+
- This skill does not change defaults. When the user wants to change a default, use `profile set-default` from [`../arkcli-profile/SKILL.md`](../arkcli-profile/SKILL.md).
|
|
29
|
+
- `--profile X` genuinely switches identity (P0-A correction): the control-plane request uses X's token / UserID, rather than making the request as active=A and merely displaying B's resources.
|
|
30
|
+
|
|
31
|
+
## Applicable scenarios
|
|
32
|
+
|
|
33
|
+
- The user asks which endpoints / models are available under the current profile.
|
|
34
|
+
- The user gets `<id> is not in the available list` when running `profile set-default`; return here to view the actual available IDs.
|
|
35
|
+
- The user gets `InvalidEndpointOrModel.NotFound` when running `+chat / +gen --model`; return here to confirm that the ID is visible under the active profile.
|
|
36
|
+
- The user switched profiles and wants to know how the resources available under the new profile differ from the old profile.
|
|
37
|
+
- The user supplies an `ep-...` ID and needs its authoritative model binding, workflow, generation modality, or Region.
|
|
38
|
+
|
|
39
|
+
## Anti-trigger signals
|
|
40
|
+
|
|
41
|
+
- The user wants to **find a model** / **choose a model** / asks "which model is strongest / offers the best value" → route to [`../arkcli-models/SKILL.md`](../arkcli-models/SKILL.md) (with enrichment + weighted ranking).
|
|
42
|
+
- The user wants to **create an endpoint** → route to [`../arkcli-deploy/SKILL.md`](../arkcli-deploy/SKILL.md) (`arkcli +deploy`); only inspect, restate, and request confirmation in this turn.
|
|
43
|
+
- The user explicitly asks for a **raw CreateEndpoint / CI / exact request preview** → route to [`../arkcli-infer-endpoint/SKILL.md`](../arkcli-infer-endpoint/SKILL.md) and use `infer endpoint create --dry-run`.
|
|
44
|
+
- The user wants to **manage an endpoint** (start / stop / get / update / detailed list) → route to [`../arkcli-infer-endpoint/SKILL.md`](../arkcli-infer-endpoint/SKILL.md).
|
|
45
|
+
|
|
46
|
+
## Difference between resources and models
|
|
47
|
+
|
|
48
|
+
| Dimension | `arkcli resources list` | `arkcli models ...` |
|
|
49
|
+
|------|------------------------|----------------------|
|
|
50
|
+
| Scope | Resource discovery and compatibility under the current profile | Full-platform foundation model catalog |
|
|
51
|
+
| Output | Endpoint ID (`ep-xxx`) or plan model name | All foundation_model fields + ArkModels enrichment |
|
|
52
|
+
| Dispatch | Switches endpoint / plan / coding APIs by profile.type | General ListFoundationModel |
|
|
53
|
+
| Cache | None | Cache scoped by profile/region/project |
|
|
54
|
+
| Primary purpose | Discover candidates and check Profile/resource compatibility | Find models, compare models, and verify capabilities |
|
|
55
|
+
|
|
56
|
+
In short, `resources list` discovers resources and compatibility under the current profile; `models` describes the platform catalog. Neither proves a successful data-plane invocation.
|
|
57
|
+
|
|
58
|
+
## Agent quick execution order
|
|
59
|
+
|
|
60
|
+
1. If the user supplies an `ep-...` ID → `arkcli resources resolve <ep-id> --format json`; inspect `endpoint_model_type` and `model_id` before workflow fields.
|
|
61
|
+
2. If the current profile is uncertain → `arkcli auth whoami --format json` (inspect `profile.name` and `profile.type`). Do not use `profile show/list` as routine read-only admission: they may reconcile and update the local key inventory. Missing identity fields require diagnosis, not an assumed profile.
|
|
62
|
+
3. Text resources → `arkcli resources list --modality text --format json`.
|
|
63
|
+
4. Image / video resources → `arkcli resources list --modality image --format json` / `--modality video`.
|
|
64
|
+
5. Compare multiple profiles → run `--profile A --modality text` and `--profile B --modality text` separately.
|
|
65
|
+
6. In the output, `is_default: true` marks the current profile's default. To switch the default, use `arkcli profile set-default`.
|
|
66
|
+
7. If the user-selected or current default Endpoint is absent from discovery, resolve that same Endpoint under the same identity. Check its Region, Running status, intended workflow/API/modalities, and resolution warnings; separately verify the Profile/key lane. Do not bypass an explicit incompatible entry or required override. You must not create an Endpoint merely because a discovery list is empty, or silently change the model, Profile, or default.
|
|
67
|
+
|
|
68
|
+
## Command overview
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
|------|------|
|
|
72
|
+
| `arkcli resources list` | List available resource IDs for the specified modality under the current or specified profile (real-time). |
|
|
73
|
+
| `arkcli resources resolve <endpoint-id>` | Resolve the Endpoint's authoritative bound identity, base-model lineage, candidate workflows, generation modality, and Region. |
|
|
74
|
+
|
|
75
|
+
## Output format
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"profile": "platform_ap-southeast-1_default",
|
|
80
|
+
"type": "platform",
|
|
81
|
+
"modality": "text",
|
|
82
|
+
"items": [
|
|
83
|
+
{"id": "ep-20260424-aaaaa"},
|
|
84
|
+
{"id": "ep-20260424-bbbbb", "is_default": true},
|
|
85
|
+
{"id": "ep-20260424-ccccc"}
|
|
86
|
+
],
|
|
87
|
+
"current_default": "ep-20260424-bbbbb",
|
|
88
|
+
"item_count": 3
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`is_default` appears only when `items[].id == current_default`. If the default is an empty string, no item has `is_default`.
|
|
93
|
+
|
|
94
|
+
## Endpoint resolution contract
|
|
95
|
+
|
|
96
|
+
- `endpoint_model_type="CustomModel"`: `model_id == custom_model_id == "cm-..."`. Read `base_model_*` only as lineage and the source of capability metadata; never replace the actual binding with `base_model_id`.
|
|
97
|
+
- `endpoint_model_type="FoundationModel"`: `model_id` keeps the existing foundation-model meaning.
|
|
98
|
+
- Read `supported_workflows`, `generation_modality`, and `requires_user_intent` to route the next task.
|
|
99
|
+
- A non-empty `resolution_warnings` is fail-soft output. Do not guess a binding from ambiguous Custom Model and Foundation Model references.
|
|
100
|
+
|
|
101
|
+
## Common errors
|
|
102
|
+
|
|
103
|
+
- Under a coding-plan profile, image/video discovery uses the platform Endpoint pool. Check the pay-as-you-go key requirement before invoking an Endpoint. An empty list requires scope/permission diagnosis and exact resolution of a known target; creation is a separate user intent owned by Deploy Skill.
|
|
104
|
+
- `plan profile is missing an active profile name` / `load plan tier ...` → The Coding Plan profile has no persisted tier for `BizInfo`. Inspect it with `arkcli profile show`, then refresh or recreate it through the Profile Skill; do not issue an unscoped model-list request.
|
|
105
|
+
- `ListEndpoints: NotLogin / Unauthorized` → Login state/STS expired, or profile X supplied through `--profile X` has no token in the identity store; run `auth login` first.
|
|
106
|
+
- `unsupported profile type "X" for resources list` → inspect the effective context with `auth whoami`, then route to Config/Profile Skill for diagnosis. Do not recreate or change the profile without user intent.
|
|
107
|
+
|
|
108
|
+
## References
|
|
109
|
+
|
|
110
|
+
- [`../arkcli-profile/SKILL.md`](../arkcli-profile/SKILL.md) — Use this after reviewing resources when you need to change a default.
|
|
111
|
+
- [`../arkcli-models/SKILL.md`](../arkcli-models/SKILL.md) — Use this to find models or compare capabilities.
|
|
112
|
+
- [`../arkcli-deploy/SKILL.md`](../arkcli-deploy/SKILL.md) — Enter the creation workflow only when the user requests a new Endpoint.
|