@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,105 @@
|
|
|
1
|
+
# resources list detailed reference
|
|
2
|
+
|
|
3
|
+
> **Prerequisite**: Read [`../SKILL.md`](../SKILL.md) first.
|
|
4
|
+
|
|
5
|
+
## Flag overview
|
|
6
|
+
|
|
7
|
+
| Parameter | Required | Default | Description |
|
|
8
|
+
|------|------|------|------|
|
|
9
|
+
| `--profile` | No | active | Explicit target profile; uses `RebuildForProfile` after the P0-A correction to switch identity for the control-plane request |
|
|
10
|
+
| `--modality` | No | `text` | `text` / `image` / `video` |
|
|
11
|
+
|
|
12
|
+
## Dispatch logic
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
profile.Type:
|
|
16
|
+
platform → ListEndpoints (PageAll) lists all active endpoints by modality
|
|
17
|
+
filtering (Endpoint.ModelReference.FoundationModel.name
|
|
18
|
+
→ GetFoundationModel → task_types/filter_task_types;
|
|
19
|
+
unknown stays visible with modality_confidence=unknown and a stderr warning)
|
|
20
|
+
coding-plan
|
|
21
|
+
text → ListCodingPlanVirtualModelID (Edition=personal, BizInfo=PlanTier)
|
|
22
|
+
image → uses platform ListEndpoints + modality filter (S10, commit f69be53)
|
|
23
|
+
video → same as image
|
|
24
|
+
coding-plan-team
|
|
25
|
+
text → ListCodingPlanVirtualModelID (Edition=enterprise, BizInfo=seat tier)
|
|
26
|
+
image/video → platform Endpoint pool; invocation requires a compatible pay-as-you-go API key
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Endpoint modality contract
|
|
30
|
+
|
|
31
|
+
The platform path uses this control-plane relationship:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
Endpoint ID
|
|
35
|
+
-> ModelReference.FoundationModel.name
|
|
36
|
+
-> GetFoundationModel
|
|
37
|
+
-> task_types / filter_task_types
|
|
38
|
+
-> text | image | video | unknown
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- Endpoint names, FoundationModel names, and display names are identifiers, not capability evidence.
|
|
42
|
+
- Dola, Dreamina, Seedream, Seedance, and future branding may appear in examples, but must never be used as image/video routing rules.
|
|
43
|
+
- Missing, unknown, or conflicting task metadata produces `modality_confidence="unknown"`. The item remains visible with a warning for review, but selecting it as a modality default or generating through it still requires authoritative metadata or an explicit `--modality`.
|
|
44
|
+
|
|
45
|
+
## Resolve an Endpoint
|
|
46
|
+
|
|
47
|
+
When the user supplies an Endpoint and needs its binding, workflow, modality,
|
|
48
|
+
or Region, run:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
arkcli resources resolve <endpoint-id> --format json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Interpret the binding fields before the capability fields:
|
|
55
|
+
|
|
56
|
+
- `endpoint_model_type="CustomModel"`: `model_id` and `custom_model_id` are
|
|
57
|
+
the same bound `cm-...` ID. `base_model_*` is lineage and the authoritative
|
|
58
|
+
source for task, API, and modality capabilities; it is not the Endpoint's
|
|
59
|
+
bound identity.
|
|
60
|
+
- `endpoint_model_type="FoundationModel"`: `model_id` retains its existing
|
|
61
|
+
foundation-model meaning and `custom_model_id` is absent.
|
|
62
|
+
- If Custom Model lineage metadata cannot be loaded, preserve the known
|
|
63
|
+
`model_id == custom_model_id`, keep capabilities unknown, and inspect
|
|
64
|
+
`resolution_warnings`. Never substitute `base_model_id` or guess from names.
|
|
65
|
+
|
|
66
|
+
Use `supported_workflows`, `generation_modality`, and `requires_user_intent`
|
|
67
|
+
only after the binding has been interpreted. `resource_region` is the
|
|
68
|
+
authoritative Endpoint Region for a stateless Endpoint plus API key call.
|
|
69
|
+
|
|
70
|
+
## Output format
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"profile": "<name>",
|
|
75
|
+
"type": "<platform | coding-plan>",
|
|
76
|
+
"modality": "<text|image|video>",
|
|
77
|
+
"items": [
|
|
78
|
+
{"id": "<id>"},
|
|
79
|
+
{"id": "<id>", "is_default": true}
|
|
80
|
+
],
|
|
81
|
+
"current_default": "<id-or-empty>",
|
|
82
|
+
"item_count": <n>
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`is_default` appears only when items[].id matches `Resources.<modality>.Default` in profile.yaml.
|
|
87
|
+
|
|
88
|
+
## Differences from the old list format (before 0.1.16)
|
|
89
|
+
|
|
90
|
+
Version 0.1.16 removed all static `profile.AvailableTextModels` / `AvailableImageModels` / `AvailableVideoModels` lists (S2). All data is now fetched in real time through `resources list`. This means:
|
|
91
|
+
|
|
92
|
+
- Logic in old scripts that reads `profile.yaml.available_text_models` no longer works.
|
|
93
|
+
- When an Agent needs the "available model list", it MUST run `resources list` and cannot assume that profile.yaml contains it.
|
|
94
|
+
- profile.yaml now stores only defaults (`Resources.<modality>.Default`), not available lists.
|
|
95
|
+
|
|
96
|
+
## Difference from `arkcli api ListEndpoints`
|
|
97
|
+
|
|
98
|
+
| Dimension | `arkcli resources list` | `arkcli api ListEndpoints` |
|
|
99
|
+
|------|------------------------|----------------------------|
|
|
100
|
+
| Entry point | Product command (shortcuts) | Raw API explorer |
|
|
101
|
+
| Dispatch | Routes endpoint / plan / coding by profile.Type | Always ListEndpoints |
|
|
102
|
+
| Output | Minimal `[{"id": ...}, ...]` | All Endpoint fields |
|
|
103
|
+
| Identity scope | `RebuildForProfile` switches to the target identity | Uses the active profile |
|
|
104
|
+
|
|
105
|
+
Agents should prefer `arkcli resources list` and fall back to `arkcli api ListEndpoints --params ...` only when full Endpoint fields (status / quota / created_at) are required.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arkcli-shared
|
|
3
|
+
version: 0.3.0
|
|
4
|
+
description: "Shared Ark CLI execution protocol for BytePlus: first-use setup, authentication gates, command routing, structured output, safety, confirmation handling, version checks, and explicit upgrades. Trigger directly when the user asks whether Ark CLI is current, requests a live version refresh or upgrade, or when any other arkcli-* Skill needs common context."
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["arkcli"]
|
|
8
|
+
cliHelp: "arkcli --help"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Ark CLI shared protocol for BytePlus
|
|
12
|
+
|
|
13
|
+
Read this file before using any other `arkcli-*` Skill. Keep common execution,
|
|
14
|
+
authentication, output, and safety rules here instead of duplicating them in
|
|
15
|
+
each capability Skill.
|
|
16
|
+
|
|
17
|
+
## When To Trigger
|
|
18
|
+
|
|
19
|
+
- before using any other BytePlus `arkcli-*` Skill;
|
|
20
|
+
- on first use, before the owning capability is known;
|
|
21
|
+
- when authentication, profile, output, confirmation, or command-routing rules
|
|
22
|
+
are needed by more than one capability;
|
|
23
|
+
- when the user asks whether Ark CLI is current, requests a live registry
|
|
24
|
+
refresh, or explicitly asks to upgrade Ark CLI.
|
|
25
|
+
|
|
26
|
+
## When NOT To Trigger
|
|
27
|
+
|
|
28
|
+
Except for the version-check and explicit-upgrade workflow owned by
|
|
29
|
+
[`references/update.md`](references/update.md), this shared protocol is not the
|
|
30
|
+
final destination for a capability-specific task. After applying the common
|
|
31
|
+
rules, continue with the owning BytePlus Skill. Do not use this file as a
|
|
32
|
+
substitute for command-specific flags, output fields, or recovery guidance.
|
|
33
|
+
|
|
34
|
+
## References
|
|
35
|
+
|
|
36
|
+
Load detailed shared guidance only when needed:
|
|
37
|
+
|
|
38
|
+
| Situation | Reference |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Global flag or runtime override diagnosis | [`references/global-flags.md`](references/global-flags.md) |
|
|
41
|
+
| Default model or Endpoint selection | [`references/profile-defaults.md`](references/profile-defaults.md) |
|
|
42
|
+
| Version status, live refresh, or explicit Ark CLI upgrade | [`references/update.md`](references/update.md) |
|
|
43
|
+
| Control-plane versus data-plane credential recovery | [`../arkcli-auth/references/auth-modes.md`](../arkcli-auth/references/auth-modes.md) |
|
|
44
|
+
| Resolving resources owned by the current identity | [`../arkcli-auth/references/identity-resolution.md`](../arkcli-auth/references/identity-resolution.md) |
|
|
45
|
+
| Account-opening and payment verification before billable writes | [`../arkcli-auth/references/realname-gate.md`](../arkcli-auth/references/realname-gate.md) |
|
|
46
|
+
| Unclassified command failure | [`references/troubleshooting.md`](references/troubleshooting.md) |
|
|
47
|
+
|
|
48
|
+
## Product boundary
|
|
49
|
+
|
|
50
|
+
- This Skill set is for the standalone BytePlus product.
|
|
51
|
+
- Do not switch to another tenant or reuse credentials, Regions, endpoints, or
|
|
52
|
+
local state from another product.
|
|
53
|
+
- Ark CLI stores BytePlus state under `~/.arkcli-bp/`.
|
|
54
|
+
- The control-plane Region is fixed to `ap-southeast-1`; another Region is
|
|
55
|
+
invalid and must not be used as a fallback.
|
|
56
|
+
- The control-plane environment is `prod` by default. Use `--env stg` only
|
|
57
|
+
when the user explicitly requests the BytePlus staging environment.
|
|
58
|
+
- BytePlus supports the `en_us` UI locale only.
|
|
59
|
+
- Load [`references/update.md`](references/update.md) for version checks and
|
|
60
|
+
explicit upgrades. Route `update.mode` reads, writes, and automatic-gate
|
|
61
|
+
interpretation to [`../arkcli-config/SKILL.md`](../arkcli-config/SKILL.md).
|
|
62
|
+
|
|
63
|
+
## Command selection order
|
|
64
|
+
|
|
65
|
+
Choose commands from the user's goal, not from an API action name.
|
|
66
|
+
|
|
67
|
+
### Control plane vs data plane
|
|
68
|
+
|
|
69
|
+
Different commands use different credentials. Passing `--api-key` / `--base-url` to a command that
|
|
70
|
+
does not consume data-plane overrides fails fast, so do not treat them as universal credentials.
|
|
71
|
+
|
|
72
|
+
| Capability | Plane | Credential | Constraint |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| 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 |
|
|
75
|
+
| `+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 |
|
|
76
|
+
|
|
77
|
+
Fine-tuning is a control-plane workflow, not a plan-model inference call. `train finetune create` rejects
|
|
78
|
+
`--api-key`. Use `--train-file` / `--validation-file` so ArkCLI uploads local data to managed TOS, and do
|
|
79
|
+
not route SFT / LoRA / DPO / RL to `+chat` or `+gen`.
|
|
80
|
+
|
|
81
|
+
For explicit documentation requests, a documentation URL, or missing product
|
|
82
|
+
knowledge delegated by an owning Skill, use [docs](../arkcli-docs/SKILL.md).
|
|
83
|
+
Read the returned Markdown before answering. Do not replace resource operations,
|
|
84
|
+
authentication, diagnosis or CLI help with documentation search.
|
|
85
|
+
|
|
86
|
+
1. Prefer a product command: `arkcli <domain> <verb>` or
|
|
87
|
+
`arkcli +<workflow>`.
|
|
88
|
+
2. Read the capability reference before executing a documented command.
|
|
89
|
+
3. Use the API Explorer only when no product command covers the task.
|
|
90
|
+
4. Execute read-only operations directly. Confirm user intent before writes,
|
|
91
|
+
deletion, credential rotation, or default-profile changes.
|
|
92
|
+
|
|
93
|
+
Do not require an Endpoint for a one-off model trial. Use a task workflow such
|
|
94
|
+
as chat or generation when that capability is available. Use Endpoint commands
|
|
95
|
+
for stable production integration.
|
|
96
|
+
|
|
97
|
+
## AI Skill invocation protocol
|
|
98
|
+
|
|
99
|
+
Every `arkcli` command executed by an AI Agent through an `arkcli-*` Skill must
|
|
100
|
+
use the complete single-command prefix below. It records the caller and owning
|
|
101
|
+
Skill while freezing the installed CLI version for the whole Skill workflow:
|
|
102
|
+
no implicit registry refresh, update notice, or automatic apply scheduling may
|
|
103
|
+
run between commands.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
ARKCLI_NO_UPDATE_NOTIFIER=1 \
|
|
107
|
+
ARKCLI_CALLER_TYPE=ai_agent \
|
|
108
|
+
ARKCLI_CALLER_NAME=<agent-id> \
|
|
109
|
+
ARKCLI_SKILL_NAME=<current-arkcli-skill> \
|
|
110
|
+
arkcli <command> ...
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- Use a stable Agent ID such as `codex`, `claude-code`, `opencode`, `openclaw`,
|
|
114
|
+
`trae`, or `cursor`; use `unknown_agent` only when it cannot be determined.
|
|
115
|
+
- Set `ARKCLI_SKILL_NAME` to the actual owning capability. Use
|
|
116
|
+
`arkcli-shared` only when this Skill directly owns a version check or explicit
|
|
117
|
+
upgrade; never use it for another capability's workflow.
|
|
118
|
+
- Apply the full prefix to every `arkcli` command in a multi-command workflow,
|
|
119
|
+
not only the first command.
|
|
120
|
+
- Despite its compatibility name, `ARKCLI_NO_UPDATE_NOTIFIER=1` suppresses all
|
|
121
|
+
implicit update activity: cache checks/refreshes, notices, and automatic
|
|
122
|
+
apply scheduling. It does not block an explicit user-requested
|
|
123
|
+
`arkcli update` or `arkcli update --check`.
|
|
124
|
+
- Keep the variables scoped to one command; do not export them into unrelated
|
|
125
|
+
shell work.
|
|
126
|
+
|
|
127
|
+
## Authentication gate
|
|
128
|
+
|
|
129
|
+
Except for authentication commands, profile inspection, local Skill listing,
|
|
130
|
+
and `arkcli update ...`, check authentication before a remote business command.
|
|
131
|
+
|
|
132
|
+
**Pending authorization takes precedence over starting another login.** If this turn or the user supplies a previous `stage=authorize_pending` and the user has neither completed authorization nor returned a code, wait. Do not rerun any `auth login`, `config init`, or the original business command. One read-only `auth status` check is allowed: resume if the required valid credentials already exist; `logged_in=false` alone does not establish that the pending session expired or disappeared, so keep waiting. Restart Phase 1 only after an explicit CLI session-expired/missing error or an explicit user request to restart login.
|
|
133
|
+
|
|
134
|
+
1. Run `arkcli auth status --format json`.
|
|
135
|
+
2. If the session is valid, continue the original task.
|
|
136
|
+
3. If the session is missing or expired, tell the user that BytePlus SSO is
|
|
137
|
+
starting, then run `arkcli auth login`.
|
|
138
|
+
4. In a non-browser or non-interactive environment, use the two-phase flow:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
arkcli auth login --no-browser
|
|
142
|
+
arkcli auth login --no-browser --code <authorization-code>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
5. After login succeeds, resume the original task. Authentication is an
|
|
146
|
+
intermediate step, not the final result.
|
|
147
|
+
|
|
148
|
+
Do not print, persist, or echo full tokens, access keys, secret keys, or API
|
|
149
|
+
keys.
|
|
150
|
+
|
|
151
|
+
## Account verification gate
|
|
152
|
+
|
|
153
|
+
Before model activation, deployment, inference Endpoint creation, fine-tuning
|
|
154
|
+
creation, or Managed Agent creation, run:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
arkcli auth status --format json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Read `byteplus_sso.identity.verified` before executing one of these billable
|
|
161
|
+
writes:
|
|
162
|
+
|
|
163
|
+
- `true`: continue.
|
|
164
|
+
- `false`: stop, send the user to
|
|
165
|
+
`https://console.byteplus.com/user/basics/`, and wait for the user to finish
|
|
166
|
+
both account-opening and payment verification.
|
|
167
|
+
- absent: the result is unknown; continue without claiming either state and
|
|
168
|
+
preserve any structured backend error.
|
|
169
|
+
|
|
170
|
+
See
|
|
171
|
+
[`../arkcli-auth/references/realname-gate.md`](../arkcli-auth/references/realname-gate.md)
|
|
172
|
+
for the exact two-check contract and failure rules.
|
|
173
|
+
|
|
174
|
+
## Output contract
|
|
175
|
+
|
|
176
|
+
- Prefer `--format json` or `--format yaml` for automation.
|
|
177
|
+
- Use `--transform` when the next step needs a stable field rather than the
|
|
178
|
+
full response.
|
|
179
|
+
- Treat stdout as structured business output. Send explanations, diagnostics,
|
|
180
|
+
and errors to stderr.
|
|
181
|
+
- Do not parse decorative or table-formatted text when structured output is
|
|
182
|
+
available.
|
|
183
|
+
|
|
184
|
+
## Confirmation handling
|
|
185
|
+
|
|
186
|
+
For destructive, credential-changing, or cost-sensitive operations:
|
|
187
|
+
|
|
188
|
+
1. Confirm the exact target, scope, and cost or destructive impact before
|
|
189
|
+
adding `--yes` or otherwise authorizing the write.
|
|
190
|
+
2. If Ark CLI returns `type="requires_confirmation"`, treat it as a normal
|
|
191
|
+
interaction boundary and show the action and its
|
|
192
|
+
impact to the user.
|
|
193
|
+
3. After confirmation, repeat the same command with `--yes`.
|
|
194
|
+
4. If the user declines, stop without changing state.
|
|
195
|
+
|
|
196
|
+
## Guard Checklist
|
|
197
|
+
|
|
198
|
+
- Do not use the API Explorer as the default entry point.
|
|
199
|
+
- Do not retry business commands repeatedly before checking authentication and
|
|
200
|
+
configuration.
|
|
201
|
+
- Do not treat login, model lookup, or profile selection as the user's final
|
|
202
|
+
outcome when the original task still has remaining steps.
|
|
203
|
+
- Do not invent invocation-global `--project-name` or `--region` overrides.
|
|
204
|
+
Select or update a profile for runtime project and Region scope. Use a
|
|
205
|
+
command-local project/Region flag only when that exact command documents it
|
|
206
|
+
for its own resource or query semantics.
|
|
207
|
+
- Do not infer BytePlus support from a similarly named command or Skill in
|
|
208
|
+
another product. Use the installed BytePlus command help and the matching
|
|
209
|
+
BytePlus capability Skill.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Global flags
|
|
2
|
+
|
|
3
|
+
Read this reference when building a complex command or diagnosing profile,
|
|
4
|
+
data-plane, environment, or output overrides. Command-specific flags remain
|
|
5
|
+
authoritative in `arkcli <domain> <verb> --help`.
|
|
6
|
+
|
|
7
|
+
| Flag | Purpose |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `--profile` | Select the active profile for this command. |
|
|
10
|
+
| `--api-key` | Override the ARK API key for this command. |
|
|
11
|
+
| `--base-url` | Override the data-plane base URL. |
|
|
12
|
+
| `--env` | Select the BytePlus control-plane environment: `prod` or `stg`. |
|
|
13
|
+
| `--lang` | Select the UI locale. BytePlus accepts `en_us` only. |
|
|
14
|
+
| `--ui-lang` | Unambiguous alias for the global UI locale when a command has a historical local `--lang` flag. BytePlus accepts `en_us` only. |
|
|
15
|
+
| `--format` | Select `json`, `yaml`, `table`, `csv`, `jsonl`, or `pretty`. Automation should prefer `json` or `yaml`. |
|
|
16
|
+
| `--transform` | Extract a stable field or subtree from structured output. |
|
|
17
|
+
| `--page-all` | Follow all available pages. |
|
|
18
|
+
| `--page-limit` | Limit automatic pagination. |
|
|
19
|
+
| `--page-delay` | Set the delay between pages in milliseconds. |
|
|
20
|
+
| `--debug` | Send diagnostic details to stderr. |
|
|
21
|
+
|
|
22
|
+
`--dry-run` is not a global flag. Only a leaf command with Client Preview
|
|
23
|
+
support registers it; verify the leaf command's `--help`. A supported preview
|
|
24
|
+
emits local `preview.v1` output without network access, filesystem writes, or
|
|
25
|
+
subprocesses. An unsupported leaf rejects the flag explicitly.
|
|
26
|
+
|
|
27
|
+
## Override diagnosis
|
|
28
|
+
|
|
29
|
+
When persisted profile values and runtime behavior differ:
|
|
30
|
+
|
|
31
|
+
1. Run `arkcli auth status --format json` and `arkcli auth whoami --format json`
|
|
32
|
+
to inspect the masked runtime identity/Profile summary.
|
|
33
|
+
2. Use `arkcli resources list --format json` for defaults and routing. Reserve
|
|
34
|
+
`profile show/list/keys list` for explicit Profile management after warning
|
|
35
|
+
that they may synchronize remote keys and write back the local key inventory
|
|
36
|
+
or default key.
|
|
37
|
+
3. Check supported invocation flags and environment variables before changing
|
|
38
|
+
the profile. `--region`, `--project-name`, `ARK_REGION`, and
|
|
39
|
+
`ARK_PROJECT_NAME` are not runtime override mechanisms.
|
|
40
|
+
4. Keep BytePlus local state under `~/.arkcli-bp/`; do not inspect or modify a
|
|
41
|
+
different product's state directory.
|
|
42
|
+
|
|
43
|
+
## Important precedence rules
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
profile:
|
|
47
|
+
--profile > ARK_PROFILE > config default_profile
|
|
48
|
+
> first platform profile > default sentinel
|
|
49
|
+
|
|
50
|
+
project:
|
|
51
|
+
active profile project > bound identity fallback > default
|
|
52
|
+
|
|
53
|
+
control-plane environment:
|
|
54
|
+
--env > ARK_CLIENT_ENV > active profile env > prod
|
|
55
|
+
|
|
56
|
+
Region:
|
|
57
|
+
active profile region > BytePlus fixed ap-southeast-1
|
|
58
|
+
|
|
59
|
+
temporary data-plane API key:
|
|
60
|
+
--api-key > ARK_API_KEY > active profile > bound identity
|
|
61
|
+
|
|
62
|
+
temporary data-plane base URL:
|
|
63
|
+
--base-url > ARK_BASE_URL > active profile
|
|
64
|
+
> product/profile derivation > BytePlus default
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
An explicit unsupported environment, Region, or locale is an input error. Do
|
|
68
|
+
not silently replace it with another product or Region.
|
|
69
|
+
|
|
70
|
+
`--base-url` affects the data plane. `--env` selects the BytePlus control-plane
|
|
71
|
+
environment. Do not use one as a substitute for the other.
|
|
72
|
+
|
|
73
|
+
An explicit `--base-url` or `ARK_BASE_URL` must be accompanied by an explicit
|
|
74
|
+
`--api-key` or `ARK_API_KEY`. This prevents a profile API key from being sent
|
|
75
|
+
to an overridden endpoint. For `+chat`, `+understand`, and `+gen`, an explicit
|
|
76
|
+
API key plus an endpoint ID may derive the missing BytePlus base URL from
|
|
77
|
+
authoritative endpoint metadata.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Profile resource defaults
|
|
2
|
+
|
|
3
|
+
Read this reference only when chat, generation, or deployment needs a default
|
|
4
|
+
model or Endpoint. Ordinary read-only resource queries do not need it.
|
|
5
|
+
|
|
6
|
+
Profiles may store a default resource per modality:
|
|
7
|
+
|
|
8
|
+
- `text`
|
|
9
|
+
- `image`
|
|
10
|
+
- `video`
|
|
11
|
+
|
|
12
|
+
The default may be a model ID or an Endpoint ID depending on the active
|
|
13
|
+
profile and the capability contract. Never infer one form from the other.
|
|
14
|
+
|
|
15
|
+
## Selection rules
|
|
16
|
+
|
|
17
|
+
1. If the user passes `--model` or `--endpoint`, use the explicit value after
|
|
18
|
+
validating that the active BytePlus capability supports it.
|
|
19
|
+
2. If the user omits the value, let Ark CLI resolve the profile default.
|
|
20
|
+
3. If Ark CLI reports that no default exists, list compatible resources first,
|
|
21
|
+
then ask the user which one should become the default.
|
|
22
|
+
4. Do not silently select a resource from another Region, project, account, or
|
|
23
|
+
product.
|
|
24
|
+
|
|
25
|
+
## Drift prompt
|
|
26
|
+
|
|
27
|
+
After a successful command that used an explicit resource different from the
|
|
28
|
+
current default, offer to promote it:
|
|
29
|
+
|
|
30
|
+
> This command used `<new>`, while the current `<modality>` default is `<old>`.
|
|
31
|
+
> Set `<new>` as the new default?
|
|
32
|
+
|
|
33
|
+
Only update the profile after the user confirms. Do not prompt after a failed
|
|
34
|
+
command, when the command already used the default, or when the user has
|
|
35
|
+
declined the same suggestion in the current session.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Troubleshooting and capability boundaries
|
|
2
|
+
|
|
3
|
+
Read this reference when a command fails and the failure has not yet been
|
|
4
|
+
classified.
|
|
5
|
+
|
|
6
|
+
## Failure routing
|
|
7
|
+
|
|
8
|
+
1. Classify the failure before retrying:
|
|
9
|
+
- authentication or expired credentials;
|
|
10
|
+
- runtime override or profile configuration;
|
|
11
|
+
- invalid arguments;
|
|
12
|
+
- missing model, Endpoint, or other resource;
|
|
13
|
+
- unsupported BytePlus capability;
|
|
14
|
+
- missing external dependency or permission.
|
|
15
|
+
2. For authentication failures, run `arkcli auth status --format json` and use
|
|
16
|
+
the `arkcli-auth` Skill.
|
|
17
|
+
3. For profile, Region, project, API key, or base URL confusion, use
|
|
18
|
+
`arkcli auth whoami --format json` for the current identity/Profile summary
|
|
19
|
+
and `arkcli resources list --format json` for defaults and routing. Use
|
|
20
|
+
`profile show/list/keys list` only for an explicit Profile-management task
|
|
21
|
+
after warning that they may synchronize remote keys and write back the local
|
|
22
|
+
key inventory or default key.
|
|
23
|
+
4. For an unknown resource identifier, use the corresponding list or search
|
|
24
|
+
command instead of guessing.
|
|
25
|
+
5. If the product command does not cover the task, inspect the installed
|
|
26
|
+
BytePlus command help and the matching BytePlus capability Skill before
|
|
27
|
+
considering the raw API explorer.
|
|
28
|
+
|
|
29
|
+
## Error meaning
|
|
30
|
+
|
|
31
|
+
Keep these outcomes distinct:
|
|
32
|
+
|
|
33
|
+
- the product does not support the capability;
|
|
34
|
+
- the current account lacks permission;
|
|
35
|
+
- the resource does not exist or is outside the active scope;
|
|
36
|
+
- the Region is unsupported;
|
|
37
|
+
- an external service, SDK, or entitlement is not enabled.
|
|
38
|
+
|
|
39
|
+
Do not reinterpret an authorization error as proof that the product lacks the
|
|
40
|
+
capability. Do not reinterpret a missing BytePlus command as a permission
|
|
41
|
+
issue.
|
|
42
|
+
|
|
43
|
+
## Retry rules
|
|
44
|
+
|
|
45
|
+
- Retry only operations documented as safe and idempotent.
|
|
46
|
+
- Refresh authentication once when the status explicitly reports expiry.
|
|
47
|
+
- Do not loop over business commands after repeated 401, 403, or scope errors.
|
|
48
|
+
- For writes, preserve the original request and ask for confirmation before a
|
|
49
|
+
retry that could create duplicate resources or additional cost.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Version checks and explicit upgrades
|
|
2
|
+
|
|
3
|
+
This reference only answers whether the installed BytePlus Ark CLI is current
|
|
4
|
+
and applies an upgrade that the user explicitly requested. It does not access a
|
|
5
|
+
business account, so do not run `auth status` first.
|
|
6
|
+
|
|
7
|
+
The reading and writing of `update.mode`, its default, and automatic production
|
|
8
|
+
gates belong to
|
|
9
|
+
[`../../arkcli-config/SKILL.md`](../../arkcli-config/SKILL.md). Never infer
|
|
10
|
+
active automatic consent from a discovered release or postinstall enrollment.
|
|
11
|
+
The config Skill owns fresh-install pending evidence, registry-latest
|
|
12
|
+
reconciliation, exact-receipt rotation, and persistent version pins.
|
|
13
|
+
|
|
14
|
+
Every Agent invocation in this reference must retain the
|
|
15
|
+
`ARKCLI_CALLER_TYPE=ai_agent` metadata below. Besides attribution, it ensures an
|
|
16
|
+
AI Skill never consumes human enrollment grace, activates exact consent, or
|
|
17
|
+
schedules automatic work. Do not remove caller metadata to imitate a human
|
|
18
|
+
command.
|
|
19
|
+
|
|
20
|
+
## Check only
|
|
21
|
+
|
|
22
|
+
Read the zero-network local cache first:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
ARKCLI_NO_UPDATE_NOTIFIER=1 \
|
|
26
|
+
ARKCLI_CALLER_TYPE=ai_agent \
|
|
27
|
+
ARKCLI_CALLER_NAME=<agent-id> \
|
|
28
|
+
ARKCLI_SKILL_NAME=arkcli-shared \
|
|
29
|
+
arkcli --format json update --check
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Interpret `status`, not only the compatibility field `update_available`:
|
|
33
|
+
|
|
34
|
+
| `status` | Meaning | Agent action |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `unknown` | No valid cache exists for this distribution | Report unknown; use `--refresh` only when a live answer is needed |
|
|
37
|
+
| `up_to_date` | Cache or registry confirms current is not older than latest | Report up to date and include `source` |
|
|
38
|
+
| `update_available` | `latest` is strictly newer than `current` | Report the version delta; do not update automatically |
|
|
39
|
+
|
|
40
|
+
`source` is `none`, `cache`, or `registry`; `checked_at` records the cache or
|
|
41
|
+
query time. Refresh only when the user needs a live answer:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ARKCLI_NO_UPDATE_NOTIFIER=1 \
|
|
45
|
+
ARKCLI_CALLER_TYPE=ai_agent \
|
|
46
|
+
ARKCLI_CALLER_NAME=<agent-id> \
|
|
47
|
+
ARKCLI_SKILL_NAME=arkcli-shared \
|
|
48
|
+
arkcli --format json update --check --refresh
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`--refresh` queries the npm registry embedded in the current binary. Preserve
|
|
52
|
+
registry failures. Never present stale cache data as a live result, and never
|
|
53
|
+
interpret `status=unknown` as no update or up to date.
|
|
54
|
+
|
|
55
|
+
## Explicit upgrade
|
|
56
|
+
|
|
57
|
+
Enter the write flow only when the user explicitly asks to upgrade in the
|
|
58
|
+
current turn. Check first, show `current -> latest` and the distribution, then
|
|
59
|
+
obtain confirmation. Add `--yes` to a non-interactive invocation only after
|
|
60
|
+
that confirmation:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
ARKCLI_NO_UPDATE_NOTIFIER=1 \
|
|
64
|
+
ARKCLI_CALLER_TYPE=ai_agent \
|
|
65
|
+
ARKCLI_CALLER_NAME=<agent-id> \
|
|
66
|
+
ARKCLI_SKILL_NAME=arkcli-shared \
|
|
67
|
+
arkcli update --yes
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Explicit `arkcli update` and `arkcli update --check` remain available in every
|
|
71
|
+
mode. `disabled` stops only silent installation. `disabled` still allows implicit checks and version notices.
|
|
72
|
+
|
|
73
|
+
After a background automatic patch update commits and releases its update locks,
|
|
74
|
+
the newly installed binary silently runs bare `+connect` once. The matching
|
|
75
|
+
BytePlus CDN Skills have already been staged with that version, so this reads
|
|
76
|
+
the local snapshot without `--refresh`. Output goes to `update-apply.log`.
|
|
77
|
+
If Agent Skill sync fails, the CLI update remains committed; inspect the log
|
|
78
|
+
and retry with `arkcli +connect`.
|
|
79
|
+
|
|
80
|
+
For a persistent version pin, do not only downgrade with npm. Instruct the user
|
|
81
|
+
to persist `arkcli config set update.mode disabled` before installing an exact
|
|
82
|
+
version. A reinstall never reuses the old exact receipt: current latest
|
|
83
|
+
preserves the mode and reissues consent for existing `automatic`, while
|
|
84
|
+
non-latest persists `disabled`. Installing `@latest` does not turn `disabled`
|
|
85
|
+
back into `automatic`; recover by installing latest and then explicitly setting
|
|
86
|
+
automatic.
|
|
87
|
+
|
|
88
|
+
`update` launches npm and is classified as `opaque_external_execution`; it
|
|
89
|
+
does not support `--dry-run`. Do not invent Client Preview or bypass the
|
|
90
|
+
product command with a raw API. Use the version delta and explicit confirmation
|
|
91
|
+
as the safety boundary.
|
|
92
|
+
|
|
93
|
+
Report success only when npm finishes, the package under the same npm global
|
|
94
|
+
root equals `latest`, and the npm-managed target executable's `--version` also
|
|
95
|
+
equals `latest`. Never report success after a command or verification failure.
|
|
96
|
+
|
|
97
|
+
## Failure and platform routing
|
|
98
|
+
|
|
99
|
+
- Missing npm: relay the CLI's manual command; do not install Node or npm.
|
|
100
|
+
- npm prefix, Node, or NVM mismatch: stop and ask the user to activate the Node
|
|
101
|
+
environment that installed this Ark CLI. Never update a different PATH
|
|
102
|
+
prefix.
|
|
103
|
+
- Non-npm running binary: explain that the current copy is unaffected. A
|
|
104
|
+
verified npm package still does not mean that copy changed.
|
|
105
|
+
- On Windows, the immediate explicit-update result is only scheduled. Report
|
|
106
|
+
completion only after a new `arkcli --version` shows the target or
|
|
107
|
+
`update-apply.log` records `installed and verified`.
|
|
108
|
+
- Preserve the previous installation, logs, and `.arkcli-update-*` recovery
|
|
109
|
+
directories after a Windows failure. Never describe failure as partial
|
|
110
|
+
success.
|
|
111
|
+
- On macOS and Linux, explicit update retains manual npm-upgrade semantics. Do
|
|
112
|
+
not describe the automatic atomic-cutover path as part of the explicit
|
|
113
|
+
command.
|
|
114
|
+
|
|
115
|
+
Do not simulate automatic updates with cron, a system service, or an Agent
|
|
116
|
+
scheduled task. Never interrupt a normal business command or change its exit
|
|
117
|
+
code because an update exists.
|