@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,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: text-format
|
|
3
|
+
description: arkcli +chat --text-format usage reference, makes the model output in the specified format (text / json_object / json_schema), with --text-schema for strong JSON Schema constraints.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# +chat Text Format
|
|
7
|
+
|
|
8
|
+
Make the model output in a structured format. The three modes cover the full spectrum from "free text" to "strict JSON Schema".
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- **text**: Default; free text.
|
|
13
|
+
- **json_object**: Makes the model output valid JSON without constraining shape; suitable for simple "return JSON" scenarios.
|
|
14
|
+
- **json_schema**: Strict JSON Schema; required when an agent / downstream program needs a stable shape (reduces parsing failures).
|
|
15
|
+
|
|
16
|
+
## Flag quick reference
|
|
17
|
+
|
|
18
|
+
| flag | Purpose |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `--text-format` | text \| json_object \| json_schema |
|
|
21
|
+
| `--text-schema <path>` | JSON Schema file path; required in json_schema mode, ignored in other modes. |
|
|
22
|
+
| `--text-schema-name` | Schema name; displayed when the server echoes it; the default value is `arkcli_response`. |
|
|
23
|
+
| `--text-strict` | Strong constraint switch; only takes effect in json_schema mode. |
|
|
24
|
+
|
|
25
|
+
With `--text-strict`, the CLI also enforces the response contract locally:
|
|
26
|
+
|
|
27
|
+
1. The schema is compiled before the request. An invalid schema returns a validation error without a network call.
|
|
28
|
+
2. Only a completed response is accepted. An incomplete response, including token truncation, exits non-zero with `invalid_response`.
|
|
29
|
+
3. `content` must be a direct JSON value, without Markdown code fences or explanatory text.
|
|
30
|
+
4. The JSON value must validate against the same schema. A mismatch exits non-zero with `invalid_response`.
|
|
31
|
+
|
|
32
|
+
`--stream --text-strict` buffers events until the terminal event, validates the final content, and only then replays the events in order. Failed validation emits no partial JSON to stdout. Non-strict streaming and non-streaming behavior is unchanged.
|
|
33
|
+
|
|
34
|
+
## Typical usage
|
|
35
|
+
|
|
36
|
+
### json_object (simplest, makes the model output JSON)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
arkcli +chat "What color are strawberries? Answer in JSON" --model ep-xxx \
|
|
40
|
+
--text-format json_object
|
|
41
|
+
# The CLI returns an envelope; its .content string may contain {"color":"red"}.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### json_schema (strongly constrained shape)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cat > schema.json <<'JSON'
|
|
48
|
+
{
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"color": {"type": "string", "description": "Color name"},
|
|
52
|
+
"hex": {"type": "string", "pattern": "^#[0-9A-Fa-f]{6}$"}
|
|
53
|
+
},
|
|
54
|
+
"required": ["color", "hex"]
|
|
55
|
+
}
|
|
56
|
+
JSON
|
|
57
|
+
|
|
58
|
+
arkcli +chat "What color are strawberries? Provide the color name and hex" --model ep-xxx \
|
|
59
|
+
--text-format json_schema --text-schema schema.json --text-strict
|
|
60
|
+
# The CLI returns an envelope; its .content string may contain {"color":"red","hex":"#FF3333"}.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Multi-turn continuation + json_schema
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
RID=$(arkcli +chat "What color are strawberries?" --model ep --store \
|
|
67
|
+
--text-format json_schema --text-schema schema.json --text-strict \
|
|
68
|
+
--format json | jq -r .id)
|
|
69
|
+
|
|
70
|
+
arkcli +chat "What about apples? Use the same format" --model ep --store \
|
|
71
|
+
--previous-response-id "$RID" \
|
|
72
|
+
--text-format json_schema --text-schema schema.json --text-strict
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Output format
|
|
76
|
+
|
|
77
|
+
In non-streaming mode (when `+chat ...` does not include `--stream`), `ResponsesResult` adds a `text_format` echo:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"id": "resp_...",
|
|
82
|
+
"model": "...",
|
|
83
|
+
"content": "{\"color\":\"red\",\"hex\":\"#FF3333\"}",
|
|
84
|
+
"usage": { ... },
|
|
85
|
+
"text_format": "json_schema"
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`text_format` is the format actually applied by the server, and you can also retrieve it with `chat get $RID` (autotest jsonschema_test asserts this parameter when running chat get).
|
|
90
|
+
|
|
91
|
+
## Save the structured body
|
|
92
|
+
|
|
93
|
+
`--text-format` constrains the model body; it does not remove the CLI envelope.
|
|
94
|
+
Deliver the original `.content`, not the envelope, reasoning, or an answer
|
|
95
|
+
rewritten by the Agent.
|
|
96
|
+
|
|
97
|
+
Before invoking, resolve the admitted `MODEL`, the user's `PROMPT`, the matching
|
|
98
|
+
`schema.json`, and the delivery path. This non-streaming strict example assumes
|
|
99
|
+
the user requested a new `result.json`. If it already exists, resolve the path
|
|
100
|
+
or overwrite intent before incurring usage. Add other verified parameters as
|
|
101
|
+
requested and retain the admitted profile context.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
test ! -e result.json && test ! -L result.json &&
|
|
105
|
+
chat_response_file="$(mktemp ./arkcli-chat-response.XXXXXX)" &&
|
|
106
|
+
arkcli +chat --model "$MODEL" --format json \
|
|
107
|
+
--text-format json_schema --text-schema schema.json --text-strict \
|
|
108
|
+
"$PROMPT" > "$chat_response_file" &&
|
|
109
|
+
(set -C; jq -ej 'select(.status == "completed") | .content | select(type == "string" and length > 0)' \
|
|
110
|
+
"$chat_response_file" > result.json) &&
|
|
111
|
+
jq empty result.json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This makes one model request. `jq -j` preserves the original body without adding
|
|
115
|
+
a newline. The last command checks JSON syntax without rewriting whitespace or
|
|
116
|
+
large integers. Local `set -C` prevents overwriting a file or symlink created
|
|
117
|
+
during the request without changing the parent shell. The CLI still enforces
|
|
118
|
+
schema and completion; a failed step must not be reported as successful delivery.
|
|
119
|
+
Plain-text delivery does not require JSON syntax validation.
|
|
120
|
+
If local extraction or writing fails, retain the captured response and repair
|
|
121
|
+
only the local step; do not invoke the model again just to save the answer.
|
|
122
|
+
Read `.id` or `.usage` from that file too, without enabling `--store` or calling
|
|
123
|
+
`chat get` merely for local backup. Explicit continuation or regeneration is a
|
|
124
|
+
separate request, not prohibited by this saving workflow.
|
|
125
|
+
|
|
126
|
+
## Common errors
|
|
127
|
+
|
|
128
|
+
| Symptom | Cause |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `--text-format=json_schema requires --text-schema <path>` | json_schema mode is missing --text-schema |
|
|
131
|
+
| `read --text-schema "X": no such file or directory` | Incorrect path or insufficient permissions |
|
|
132
|
+
| `unsupported text.format.type "yaml"` | Format value is not text / json_object / json_schema |
|
|
133
|
+
| `text.format.schema is required when type=json_schema` | Schema is omitted when using the raw API |
|
|
134
|
+
| `invalid --text-schema for --text-strict` | The schema is not valid or cannot be compiled; no request was sent. |
|
|
135
|
+
| `invalid_response` with `not completed` | The strict response was truncated; raise `--max-output-tokens` or request less output. |
|
|
136
|
+
| `invalid_response` with `not a direct JSON value` | The content contains a Markdown fence, explanation, or invalid JSON. |
|
|
137
|
+
| `invalid_response` with `did not match --text-schema` | The JSON does not match the schema; check the schema, model capability, and prompt. |
|
|
138
|
+
|
|
139
|
+
## Equivalent to the raw API
|
|
140
|
+
|
|
141
|
+
`+chat --text-format json_schema --text-schema f.json --text-strict --text-schema-name color` is equivalent to:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
arkcli api arkruntime.create_responses --params '{
|
|
145
|
+
"model":"ep-xxx",
|
|
146
|
+
"input":"What color are strawberries?",
|
|
147
|
+
"text":{
|
|
148
|
+
"format":{
|
|
149
|
+
"type":"json_schema",
|
|
150
|
+
"schema":{...},
|
|
151
|
+
"name":"color",
|
|
152
|
+
"strict":true
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}'
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Autotest unlock checklist
|
|
159
|
+
|
|
160
|
+
| Test case | Unlocked |
|
|
161
|
+
|---|---|
|
|
162
|
+
| `responseapi/jsonschema/TestJson1..3` | ✅ |
|
|
163
|
+
| `responseapi/jsonschema/TestJsonCache1..3` | ✅ |
|
|
164
|
+
| `responseapi/jsonschema/TestJsonSchema1..3` | ✅ |
|
|
165
|
+
| `responseapi/jsonschema/TestJsonSchemaCache1..3` | ✅ |
|
|
166
|
+
| `Test_ResponseCreate_TextFormat` (includes text + json_object) | ✅ |
|
|
167
|
+
| `Test_Stream_TextFormat` | ✅ (streaming input parameters can be passed; echo uses PR-4 --include-events) |
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tools
|
|
3
|
+
description: arkcli +chat tools usage reference, including the JSON file protocol for custom tools and tool_choice / max_tool_calls tuning.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# +chat Tools
|
|
7
|
+
|
|
8
|
+
PR-1 has the built-in `function` tool; `mcp` is left for PR-5b.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- The user provides a function schema for the model to call → `function`
|
|
13
|
+
- The user asks "Help me look up meeting minutes" → The current PR does not support this; prompt the user to use `arkcli api arkruntime.create_responses --params '...'` (raw API) or wait for PR-5b.
|
|
14
|
+
|
|
15
|
+
## 4 new flags
|
|
16
|
+
|
|
17
|
+
| flag | Type | Purpose |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `--tools <type>` | repeatable string | Simple syntactic sugar; supports only the single-parameter `{"type":"<type>"}` form. No tools are currently supported. |
|
|
20
|
+
| `--tools-file <path>` | string | Read a JSON file whose content is an array of tool objects in the full SDK form; function must use this method. |
|
|
21
|
+
| `--tool-choice <mode>` | string | Tool calling policy: `auto` / `required` / `none`. If omitted, the server default is used. |
|
|
22
|
+
| `--max-tool-calls <int>` | int | Maximum number of tool calls in a single session, to prevent uncontrollable behaviors.**Only takes effect for built-in tools**; when combined with a function tool (`--tools-file` or `--tools function:*`), arkcli intercepts it on the client side because the server reports `max_tool_calls only supported by build-in tools now`. |
|
|
23
|
+
|
|
24
|
+
`--tools` and `--tools-file` can be used together and are merged with "sugar first, file later".
|
|
25
|
+
|
|
26
|
+
## function (requires a JSON file)
|
|
27
|
+
|
|
28
|
+
`tools.json`:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
[
|
|
32
|
+
{
|
|
33
|
+
"type": "function",
|
|
34
|
+
"name": "query_weather",
|
|
35
|
+
"description": "Query the weather for a city and return JSON",
|
|
36
|
+
"parameters": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"city": {"type": "string", "description": "City name, such as Beijing"}
|
|
40
|
+
},
|
|
41
|
+
"required": ["city"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Call:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
arkcli +chat "What's the weather like in Beijing today?" \
|
|
51
|
+
--model ep-xxx \
|
|
52
|
+
--tools-file tools.json \
|
|
53
|
+
--tool-choice required
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`function` object parameters (aligned with SDK `responses.ToolFunction`):
|
|
57
|
+
|
|
58
|
+
| Parameter | Required |Description|
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `type` | ✅ | Must be `"function"` |
|
|
61
|
+
| `name` | ✅ | Function name; the model uses it to identify the tool. |
|
|
62
|
+
| `description` | Recommended | Function description for the model; the clearer it is, the more accurately the model can trigger it. |
|
|
63
|
+
| `parameters` | Recommended | The parameters that describe the JSON Schema; write them directly as nested content, and arkcli internally serializes it into SDK Bytes. |
|
|
64
|
+
| `strict` | Optional bool | Strict mode: forces parameters to conform to the schema |
|
|
65
|
+
|
|
66
|
+
## Three tool_choice modes
|
|
67
|
+
|
|
68
|
+
| mode | Meaning |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `auto` | Server default; lets the model decide whether to call a tool. |
|
|
71
|
+
| `required` | Forces at least one tool call. |
|
|
72
|
+
| `none` | Prevents the model from calling tools even if tools are passed. |
|
|
73
|
+
|
|
74
|
+
Complex function-specific tool_choice (`{"type":"function","name":"query_weather"}`) will be implemented in a later PR. For now, use `required` with a single tool to achieve the same effect.
|
|
75
|
+
|
|
76
|
+
## Output format
|
|
77
|
+
|
|
78
|
+
### Non-streaming (`+chat ...` without `--stream`)
|
|
79
|
+
|
|
80
|
+
`ResponsesResult` has an additional `function_calls` parameter:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"id": "resp_...",
|
|
85
|
+
"model": "...",
|
|
86
|
+
"content": "...", // The model's final text; it may be empty when a tool is triggered.
|
|
87
|
+
"reasoning_content": "...",
|
|
88
|
+
"usage": { ... },
|
|
89
|
+
"function_calls": [
|
|
90
|
+
{
|
|
91
|
+
"type": "function_tool_call",
|
|
92
|
+
"id": "call_...",
|
|
93
|
+
"name": "query_weather",
|
|
94
|
+
"arguments": "{\"city\":\"Beijing\"}",
|
|
95
|
+
...
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`function_calls[]` is passed through in the raw SDK form; different tool types have different parameters (`function_tool_call`, etc.). Use `jq '.function_calls[].type'` to distinguish them.
|
|
102
|
+
|
|
103
|
+
### Streaming (`--stream`)
|
|
104
|
+
|
|
105
|
+
Label lines such as `[Tool args] {"city":"Beijing"}` appear on stdout, inserted before or after `Response:` depending on the event order. Concatenating all chunks of `ChatStreamDelta.FunctionCallArgs` gives the complete args JSON.
|
|
106
|
+
|
|
107
|
+
## Error handling
|
|
108
|
+
|
|
109
|
+
| Symptom | Cause |
|
|
110
|
+
|---|---|
|
|
111
|
+
| `tool[N] type "X" not supported in this build` | A tool type supported only by PR-5b was used (`mcp`); use the raw API or wait for PR-5b. |
|
|
112
|
+
| `function tool requires 'name'` | The function is missing the name parameter. |
|
|
113
|
+
| `unsupported tool_choice "X"` | tool_choice is not auto/required/none. |
|
|
114
|
+
| Model replies but does not trigger the tool. | The tool description is not clear enough, tool_choice=none, or the question is unrelated to the tool. |
|
|
115
|
+
| Model repeatedly calls the same tool. | Add `--max-tool-calls` to limit it, or describe when to stop in the tool description. |
|
|
116
|
+
|
|
117
|
+
## Integration with chat get
|
|
118
|
+
|
|
119
|
+
After `--store` is added, even after streaming finishes, you can later use `chat get <id>` to get the complete `function_calls` list; `chat list-input-items <id>` can also show the complete tool call history (including result items such as `function_tool_call_output`).
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arkcli-config
|
|
3
|
+
version: 0.3.1
|
|
4
|
+
description: "Diagnose BytePlus Ark CLI configuration precedence, effective profile, Region, project, base URL, API key, environment, UI language, persisted update mode, and local reset behavior. Use for unclear overrides, update opt-in/out, legacy config migration, inspection, or reset."
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["arkcli"]
|
|
8
|
+
cliHelp: "arkcli config --help"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# BytePlus Ark CLI configuration
|
|
12
|
+
|
|
13
|
+
Before using this Skill, read
|
|
14
|
+
[`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md). It defines the
|
|
15
|
+
BytePlus product boundary, authentication flow, output rules, and write
|
|
16
|
+
confirmation requirements.
|
|
17
|
+
|
|
18
|
+
Use this Skill for configuration diagnosis and the remaining `arkcli config`
|
|
19
|
+
commands. Use [`../arkcli-profile/SKILL.md`](../arkcli-profile/SKILL.md) for
|
|
20
|
+
profile creation, selection, deletion, project changes, resource defaults, and
|
|
21
|
+
API key selection.
|
|
22
|
+
|
|
23
|
+
## BytePlus configuration boundary
|
|
24
|
+
|
|
25
|
+
- BytePlus state is stored under `$HOME/.arkcli-bp/`.
|
|
26
|
+
- The control-plane Region is fixed to `ap-southeast-1`. Do not fall back to
|
|
27
|
+
another Region or product.
|
|
28
|
+
- BytePlus supports the `en_us` UI locale only.
|
|
29
|
+
- Do not read or edit files under `$HOME/.arkcli-bp/` directly. Use Ark CLI
|
|
30
|
+
commands so secrets remain masked and migrations remain intact.
|
|
31
|
+
|
|
32
|
+
## When To Trigger
|
|
33
|
+
|
|
34
|
+
- A command used the wrong profile, account, project, Region, base URL, or API
|
|
35
|
+
key.
|
|
36
|
+
- The user needs to understand which flag, environment variable, profile, or
|
|
37
|
+
identity value won.
|
|
38
|
+
- The user asks about `ARK_PROFILE`, `ARK_API_KEY`, `ARK_BASE_URL`, or
|
|
39
|
+
`ARK_CLIENT_ENV`, including whether legacy `ARK_REGION` or
|
|
40
|
+
`ARK_PROJECT_NAME` values still have an effect.
|
|
41
|
+
- The user needs `arkcli config lang`, `arkcli config reset`, or a migration
|
|
42
|
+
from a deprecated `arkcli config` profile command.
|
|
43
|
+
- The user explicitly wants to enable, disable, or restore automatic-update behavior.
|
|
44
|
+
|
|
45
|
+
## When NOT To Trigger
|
|
46
|
+
|
|
47
|
+
- Missing login, an expired session, `401`, or permission failure: use
|
|
48
|
+
[`../arkcli-auth/SKILL.md`](../arkcli-auth/SKILL.md).
|
|
49
|
+
- Profile creation, switching, deletion, project selection, or API key
|
|
50
|
+
management: use [`../arkcli-profile/SKILL.md`](../arkcli-profile/SKILL.md).
|
|
51
|
+
- A business task such as model discovery, generation, deployment, or usage:
|
|
52
|
+
diagnose configuration only if evidence points here, then return to the
|
|
53
|
+
owning business Skill.
|
|
54
|
+
|
|
55
|
+
## Agent execution order
|
|
56
|
+
|
|
57
|
+
1. Follow the shared authentication boundary and inspect the masked current context:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
arkcli auth status --format json
|
|
61
|
+
arkcli auth whoami --format json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
2. For Chat/Gen defaults and routing, follow the Resources Skill:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
arkcli resources list --modality text --format json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. Identify invocation-scoped flags and relevant environment variables without
|
|
71
|
+
printing secret values.
|
|
72
|
+
4. Explain the winning source explicitly before proposing a change.
|
|
73
|
+
5. After the configuration issue is resolved, return to the user's original
|
|
74
|
+
task.
|
|
75
|
+
|
|
76
|
+
`profile show/list/keys list` may synchronize remote keys and write back the
|
|
77
|
+
local key inventory or default key. Masked output does not imply no side
|
|
78
|
+
effects. Do not use these commands for routine Chat/Gen admission or when the
|
|
79
|
+
user requests no configuration/key changes; deprecated `config show/list`
|
|
80
|
+
is not a workaround. Use `profile show` or `profile list` only for an explicit
|
|
81
|
+
Profile inspection/management task, explaining the synchronization impact first.
|
|
82
|
+
|
|
83
|
+
The Profile fields in `auth whoami` are a persisted-slice summary, not proof
|
|
84
|
+
that a temporary key/base-URL override or data-plane request works. State
|
|
85
|
+
unverified facts as unknown rather than changing configuration to fill gaps.
|
|
86
|
+
|
|
87
|
+
## Resolution precedence
|
|
88
|
+
|
|
89
|
+
Profile selection, from highest to lowest:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
--profile
|
|
93
|
+
> ARK_PROFILE
|
|
94
|
+
> config.yaml default_profile
|
|
95
|
+
> first supported platform profile by name
|
|
96
|
+
> "default"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Other effective values follow these product rules:
|
|
100
|
+
|
|
101
|
+
| Value | Highest to lowest |
|
|
102
|
+
|---|---|
|
|
103
|
+
| API key | `--api-key` > `ARK_API_KEY` > active profile > bound identity; legacy fallback is used only when no identity is bound |
|
|
104
|
+
| Base URL | `--base-url` > `ARK_BASE_URL` > active profile value > value derived from profile type and Region > BytePlus default |
|
|
105
|
+
| Region | active profile > `ap-southeast-1`; BytePlus rejects any other persisted effective Region |
|
|
106
|
+
| Project | active profile project > active identity fallback > `default` |
|
|
107
|
+
| Environment | `--env` > `ARK_CLIENT_ENV` > active profile > `prod` |
|
|
108
|
+
|
|
109
|
+
Do not infer product identity from these values. Product identity is compiled
|
|
110
|
+
into the BytePlus binary.
|
|
111
|
+
|
|
112
|
+
`--region`, `--project-name`, `ARK_REGION`, and `ARK_PROJECT_NAME` do not
|
|
113
|
+
override runtime scope. Select or update a profile instead. For temporary
|
|
114
|
+
data-plane calls, `--api-key`/`ARK_API_KEY` and
|
|
115
|
+
`--base-url`/`ARK_BASE_URL` are the supported override pair; an explicit base
|
|
116
|
+
URL must never reuse a profile API key.
|
|
117
|
+
|
|
118
|
+
## Active commands
|
|
119
|
+
|
|
120
|
+
| Command | Purpose | Safety |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `arkcli config lang get` | Show the persisted effective UI locale | Read-only |
|
|
123
|
+
| `arkcli config lang set en_us` | Persist the only locale supported by BytePlus | Writes `config.yaml` |
|
|
124
|
+
| `arkcli config lang unset` | Remove the persisted locale and use the BytePlus build default | Writes `config.yaml` |
|
|
125
|
+
| `arkcli config set update.mode automatic` | Explicitly enable automatic for this exact install; when recovering from non-latest, install latest first | Writes config and exact consent |
|
|
126
|
+
| `arkcli config set update.mode disabled` | Stop silent installation while retaining implicit checks, notices, and manual update commands | Writes `config.yaml` |
|
|
127
|
+
| `arkcli config reset` | Remove both local configuration files after an interactive confirmation | Destructive |
|
|
128
|
+
|
|
129
|
+
`arkcli config reset` does not remove BytePlus SSO tokens, the identity store,
|
|
130
|
+
or cached credentials. Use `arkcli auth logout` when the user explicitly wants
|
|
131
|
+
to remove authentication state.
|
|
132
|
+
|
|
133
|
+
The only public modes are `automatic` and `disabled`. `disabled` retains implicit version checks and update notices but never installs silently; explicit `arkcli update` and `arkcli update --check` also remain available. Missing mode values and legacy persisted `notify` values are presented as `disabled`. Legacy persisted `notify` values continue to read as `disabled`, but never recommend the legacy setter.
|
|
134
|
+
|
|
135
|
+
The fail-closed Windows, macOS, and Linux transactions and all BytePlus production gates are open. A stable global npm postinstall compares the installed version with the registry's current `latest`: non-latest persists `disabled`; current latest preserves the mode and reissues exact-install authorization when the persisted mode is `automatic`. Postinstall never performs an immediate version replacement.
|
|
136
|
+
|
|
137
|
+
### Fresh-install enrollment
|
|
138
|
+
|
|
139
|
+
Only a stable global npm install that can prove `$HOME/.arkcli-bp` did not previously exist and whose installed version equals registry `latest` defaults to `automatic` with inert pending evidence.
|
|
140
|
+
|
|
141
|
+
- The first successful eligible human business command completes pending -> grace -> active in one policy transaction.
|
|
142
|
+
- After exact-install consent is revalidated as active, that invocation may schedule an automatic patch update.
|
|
143
|
+
- Every CLI process started by npm `postinstall` (including its `+connect` invocation), and a user-run `+connect`, skips enrollment, implicit version checks, and automatic scheduling.
|
|
144
|
+
- AI Skills, CI, non-TTY invocations, Client Preview, `config`, `update`, and internal maintenance commands neither consume enrollment nor schedule automatic work.
|
|
145
|
+
- A committed update result appears once on stderr after the next successful human business command. It never changes stdout or the business exit code.
|
|
146
|
+
|
|
147
|
+
Production automatic updates deliberately keep the 24/48/72-hour and 10%/50%/100% cohort admission disabled. The original rollout implementation and regression coverage remain in place, and the online Probe still requires two independent observations. Normal automatic updates still require exact consent, a live registry target/SRI/tarball check, a one-use reservation, backoff, and every staged-apply safety boundary.
|
|
148
|
+
|
|
149
|
+
An npm reinstall never reuses the old exact-install receipt. If the installed version equals current `latest`, the existing mode is unchanged: `automatic` receives a new exact receipt, while `disabled` or legacy `notify` stays off. A non-latest install persists `disabled`. Registry failure leaves the mode unchanged and issues no receipt; `--ignore-scripts` performs no reconciliation. To recover from non-latest, install latest first and then run `arkcli config set update.mode automatic`. For a persistent version pin, run:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
arkcli config set update.mode disabled
|
|
153
|
+
npm i @byteplus/ark-cli@<exact-version> -g --registry https://registry.npmjs.org
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
For a deterministic pin even when the registry is unavailable, set `disabled` before installing the exact version. The policy lives in `$HOME/.arkcli-bp/config.yaml`, outside the npm package tree, and installing `@latest` does not change it back to `automatic`. `arkcli config reset` attempts to revoke exact consent before clearing configuration. A release published between npm resolving `@latest` and postinstall querying the registry can rarely cause a false non-latest classification.
|
|
157
|
+
|
|
158
|
+
BytePlus rejects `zh_cn` even though the shared command parser recognizes that
|
|
159
|
+
locale for other products.
|
|
160
|
+
|
|
161
|
+
## Deprecated compatibility
|
|
162
|
+
|
|
163
|
+
The following commands remain only for old scripts and are hidden from normal
|
|
164
|
+
`arkcli config --help` output:
|
|
165
|
+
|
|
166
|
+
| Deprecated | Use instead |
|
|
167
|
+
|---|---|
|
|
168
|
+
| `arkcli config init` | `arkcli profile create` |
|
|
169
|
+
| `arkcli config list` | `arkcli profile list` |
|
|
170
|
+
| `arkcli config show` | `arkcli profile show` |
|
|
171
|
+
| `arkcli config switch <name>` | `arkcli profile use <name>` |
|
|
172
|
+
| `arkcli config delete <name>` | `arkcli profile delete <name>` |
|
|
173
|
+
|
|
174
|
+
Do not generate new automation with deprecated commands.
|
|
175
|
+
|
|
176
|
+
## Guard Checklist
|
|
177
|
+
|
|
178
|
+
- For routine admission, use `auth status/whoami` and `resources`; preserve the
|
|
179
|
+
user's no-configuration-change intent, including implicit key reconciliation.
|
|
180
|
+
- Never echo a full token, API key, access key, or secret key.
|
|
181
|
+
- Confirm the exact target before `profile use`, `profile delete`, project
|
|
182
|
+
changes, language changes, or `config reset`.
|
|
183
|
+
- The entire `config` and `profile` domains reject `--dry-run`; restate the
|
|
184
|
+
exact mutation and obtain confirmation. Do not describe `profile show/list`
|
|
185
|
+
as a no-write substitute for preview.
|
|
186
|
+
- Keep BytePlus on `ap-southeast-1`; do not retry through another product.
|
|
187
|
+
- Return to the user's original business task after configuration is fixed.
|
|
188
|
+
- Use only the allowlisted `update.mode` key; never treat `config set` as a generic YAML-path writer. `disabled` still permits implicit checks and notices, and it does not disable explicit `arkcli update` or `arkcli update --check`.
|
|
189
|
+
|
|
190
|
+
## References
|
|
191
|
+
|
|
192
|
+
- [`references/arkcli-config-init.md`](references/arkcli-config-init.md) -
|
|
193
|
+
migration from `config init` to BytePlus profile creation
|
|
194
|
+
- [`references/arkcli-config-profile.md`](references/arkcli-config-profile.md) -
|
|
195
|
+
deprecated command mapping and active profile operations
|
|
196
|
+
- [`references/evals.md`](references/evals.md) - trigger, routing, precedence,
|
|
197
|
+
and safety evaluations
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Migrating from `config init`
|
|
2
|
+
|
|
3
|
+
`arkcli config init` is deprecated and hidden from normal help output. Create
|
|
4
|
+
BytePlus profiles with `arkcli profile create`.
|
|
5
|
+
|
|
6
|
+
## Product boundary
|
|
7
|
+
|
|
8
|
+
The standalone BytePlus binary fixes these values at build time:
|
|
9
|
+
|
|
10
|
+
| Setting | BytePlus value |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Product identity | BytePlus |
|
|
13
|
+
| State directory | `$HOME/.arkcli-bp/` |
|
|
14
|
+
| Control-plane Region | `ap-southeast-1` |
|
|
15
|
+
| UI locale | `en_us` |
|
|
16
|
+
|
|
17
|
+
Do not copy a tenant selector, Region fallback, state path, or credentials from
|
|
18
|
+
another product.
|
|
19
|
+
|
|
20
|
+
## Supported profile types
|
|
21
|
+
|
|
22
|
+
BytePlus profile creation accepts:
|
|
23
|
+
|
|
24
|
+
- `platform`
|
|
25
|
+
- `coding-plan`
|
|
26
|
+
- `coding-plan-team`
|
|
27
|
+
|
|
28
|
+
Inspect the exact current flags before constructing a command:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
arkcli profile create --help
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Preview a pay-as-you-go profile:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
arkcli profile create \
|
|
38
|
+
--type platform \
|
|
39
|
+
--region ap-southeast-1 \
|
|
40
|
+
--project default \
|
|
41
|
+
--set-default \
|
|
42
|
+
--format json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
After the user confirms the profile name, project, and default-profile change,
|
|
46
|
+
execute the command only after that confirmation.
|
|
47
|
+
|
|
48
|
+
For Coding Plan profiles, let Ark CLI detect the active subscription:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
arkcli profile create --type coding-plan --set-default
|
|
52
|
+
arkcli profile create --type coding-plan-team --set-default
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Do not force `--plan-tier` unless the user explicitly supplies the tier and
|
|
56
|
+
understands that it bypasses subscription detection. A team profile still
|
|
57
|
+
requires a valid assigned seat.
|
|
58
|
+
|
|
59
|
+
## Project resolution
|
|
60
|
+
|
|
61
|
+
Project Name participates in the effective runtime scope:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
active profile.project
|
|
65
|
+
> active BytePlus identity fallback
|
|
66
|
+
> default
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
There is no global `--project-name` or `ARK_PROJECT_NAME` runtime override.
|
|
70
|
+
The local `--project` flag on `profile create` persists the project in the new
|
|
71
|
+
profile. Use `arkcli profile project [<project-name>]` to change the persisted
|
|
72
|
+
project slice without adding a project override to a business command.
|
|
73
|
+
|
|
74
|
+
## Credentials
|
|
75
|
+
|
|
76
|
+
Do not place API keys directly into generated shell history unless the user
|
|
77
|
+
explicitly requests an inline key. For routine admission, prefer the masked
|
|
78
|
+
authenticated BytePlus identity summary:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
arkcli auth whoami --format json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use `arkcli profile apikey list --format json` only for explicit Profile key
|
|
85
|
+
management after warning that it may synchronize remote keys and write back the
|
|
86
|
+
local key inventory or default key.
|
|
87
|
+
|
|
88
|
+
Never read or edit files under `$HOME/.arkcli-bp/` to change a project or API
|
|
89
|
+
key.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Profile command migration and configuration scope
|
|
2
|
+
|
|
3
|
+
Profile operations belong to `arkcli profile`. The `arkcli config` group now
|
|
4
|
+
owns global UI language, the allowlisted `update.mode` policy, full
|
|
5
|
+
configuration reset, and compatibility for legacy scripts.
|
|
6
|
+
|
|
7
|
+
## Routine admission
|
|
8
|
+
|
|
9
|
+
Use `arkcli auth status --format json` and `arkcli auth whoami --format json`
|
|
10
|
+
for the masked current identity/Profile. Use `arkcli resources list --modality
|
|
11
|
+
text --format json` for the current chat default and follow the Resources Skill
|
|
12
|
+
for compatibility checks. These summaries do not prove a data-plane request
|
|
13
|
+
will succeed; report missing evidence instead of inferring key validity.
|
|
14
|
+
|
|
15
|
+
## Explicit Profile inspection and management
|
|
16
|
+
|
|
17
|
+
`profile show/list/keys list` may synchronize remote keys and write back the
|
|
18
|
+
local key inventory, clear an invalid key, or select another default key.
|
|
19
|
+
Explain that impact before using them for an explicit Profile task. Do not use
|
|
20
|
+
them for routine Chat/Gen admission or a no-configuration/key-change request,
|
|
21
|
+
and do not bypass that boundary with deprecated `config show/list`.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Show the effective active profile
|
|
25
|
+
arkcli profile show --format json
|
|
26
|
+
|
|
27
|
+
# Show one named profile
|
|
28
|
+
arkcli profile show <profile-name> --format json
|
|
29
|
+
|
|
30
|
+
# List all profiles
|
|
31
|
+
arkcli profile list --format json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Structured profile output masks secrets but is not side-effect-free. Do not read
|
|
35
|
+
`$HOME/.arkcli-bp/config.yaml`.
|
|
36
|
+
|
|
37
|
+
## Profile writes
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Change the default profile
|
|
41
|
+
arkcli profile use <profile-name> --format json
|
|
42
|
+
|
|
43
|
+
# Preview creation
|
|
44
|
+
arkcli profile create --type platform --format json
|
|
45
|
+
|
|
46
|
+
# Delete after confirming the exact target
|
|
47
|
+
arkcli profile delete <profile-name> --format json
|
|
48
|
+
|
|
49
|
+
# Re-select the project after reviewing the replacement scope
|
|
50
|
+
arkcli profile project <project-name>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`profile use` changes the top-level default-profile pointer. `profile delete`
|
|
54
|
+
removes one local profile. `profile project` can replace project-scoped
|
|
55
|
+
profiles, so inspect its output and confirm before using `--yes`.
|
|
56
|
+
|
|
57
|
+
Use [`../SKILL.md`](../SKILL.md) for configuration precedence and
|
|
58
|
+
[`../../arkcli-profile/SKILL.md`](../../arkcli-profile/SKILL.md) for the full
|
|
59
|
+
profile workflow.
|
|
60
|
+
|
|
61
|
+
## Active `config` commands
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
arkcli config lang get
|
|
65
|
+
arkcli config lang set en_us
|
|
66
|
+
arkcli config lang unset
|
|
67
|
+
arkcli config set update.mode automatic
|
|
68
|
+
arkcli config set update.mode disabled
|
|
69
|
+
arkcli config reset
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The only public update modes are `automatic` and `disabled`. `disabled` stops
|
|
73
|
+
silent installation while retaining implicit version checks, notices, and
|
|
74
|
+
explicit `arkcli update` / `arkcli update --check`. Legacy `notify` values in
|
|
75
|
+
persisted configuration remain compatible inputs but are not settable.
|
|
76
|
+
|
|
77
|
+
With the production gates open, a provably fresh BytePlus stable global npm
|
|
78
|
+
install whose version equals registry `latest` starts inert enrollment bound to
|
|
79
|
+
the exact install. The first successful eligible human business command
|
|
80
|
+
completes grace and consent; after active revalidation it may schedule. A
|
|
81
|
+
current-latest reinstall preserves the mode and reissues exact consent only for
|
|
82
|
+
existing `automatic`; a non-latest install persists `disabled`.
|
|
83
|
+
|
|
84
|
+
For a persistent version pin, set `disabled` before installing the exact
|
|
85
|
+
`@byteplus/ark-cli` version. Installing `@latest` does not turn `disabled` back
|
|
86
|
+
into `automatic`; recover by installing latest and then explicitly setting
|
|
87
|
+
automatic. The policy lives in `$HOME/.arkcli-bp/config.yaml`, outside the npm
|
|
88
|
+
package tree.
|
|
89
|
+
|
|
90
|
+
BytePlus rejects `zh_cn`. `config reset` removes
|
|
91
|
+
`$HOME/.arkcli-bp/config.yaml` and legacy
|
|
92
|
+
`$HOME/.arkcli-bp/config.json`; it does not remove the BytePlus identity store
|
|
93
|
+
or SSO tokens.
|
|
94
|
+
|
|
95
|
+
## Deprecated mapping
|
|
96
|
+
|
|
97
|
+
| Deprecated command | Active replacement |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `arkcli config init` | `arkcli profile create` |
|
|
100
|
+
| `arkcli config list` | `arkcli profile list` |
|
|
101
|
+
| `arkcli config show` | `arkcli profile show` |
|
|
102
|
+
| `arkcli config switch <name>` | `arkcli profile use <name>` |
|
|
103
|
+
| `arkcli config delete <name>` | `arkcli profile delete <name>` |
|
|
104
|
+
|
|
105
|
+
The deprecated commands may still execute for compatibility, but they are
|
|
106
|
+
hidden from normal help and must not be used in new automation.
|