@byteplus/ark-cli-darwin-x64 0.0.0-stage → 1.0.46-prerelease.46bd0d6dcc58
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,149 @@
|
|
|
1
|
+
# Session and Files
|
|
2
|
+
|
|
3
|
+
`session resources list/get/add` are data-plane commands and accept explicit `--api-key` / `--base-url`. An explicit URL requires an explicit key and must target the MA data plane, not the BYOK model's BaseUrl. With only an explicit key, use the standard MA endpoint for the current product, Region and environment, not a plan route. Control-plane authentication for `session create/get` is unchanged.
|
|
4
|
+
|
|
5
|
+
## Env / Session
|
|
6
|
+
|
|
7
|
+
### Session Project Consistency
|
|
8
|
+
|
|
9
|
+
When creating a Session through `session create`, `+new session`, or `+iterate`, the selected Agent, Environment, and other project-scoped dependencies must belong to the same Project as the Session. Overrides do not waive this requirement.
|
|
10
|
+
|
|
11
|
+
- Check the selected Platform profile's project context with `auth status`, then verify actual `ProjectName` values from resource list/get responses. `account-wide` is a query scope, not a concrete Project or proof that returned resources share one.
|
|
12
|
+
- If the target Project is unresolved, ownership is missing, or projects conflict, perform the relevant read or ask the user before creating. Do not infer ownership from names, account membership, visibility, or creation time. Do not invent a ProjectName for resources without project ownership.
|
|
13
|
+
- Filter Environment candidates to the same Project before selecting, and explicitly pass `--environment-id` (or `--env-id` where supported). Do not rely on the latest account-wide environment. If no same-Project candidate exists, obtain confirmation to create one in the target Project instead of borrowing another project's resource.
|
|
14
|
+
- Create with a verified project-scoped Platform profile. If none exists, follow the Profile skill; do not silently change the global default or invent a global `--project-name`. Read the Session back to verify its project and bindings; a successful preview does not establish project consistency.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
arkcli agent env create --name arkcli-<domain>-env-<timestamp> --config '{Type: cloud, Networking: {Type: unrestricted}}' --format json
|
|
18
|
+
arkcli agent session create --agent-id <agent-id> --environment-id <env-id> --title arkcli-<domain>-session-<timestamp> --format json
|
|
19
|
+
arkcli agent session get <session-id> --format json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Session operations follow OpenTOP; Session resources/events/threads traverse the data plane directly.
|
|
23
|
+
|
|
24
|
+
When creating a cloud environment online, an explicit `Networking: {Type: unrestricted}` must be specified; only `{Type: cloud}` will be validated by the backend as missing `config.networking`.
|
|
25
|
+
|
|
26
|
+
### Session TOS Resource
|
|
27
|
+
|
|
28
|
+
A Session can mount an existing TOS directory at creation time. The CLI appends a resource with `Type=tos`, `TosBucket=<bucket>`, and `TosKey=<prefix>/`.
|
|
29
|
+
|
|
30
|
+
Use `--tos-path` only when the user explicitly asks for a TOS mount and provides the location. If the user asks for a mount without a location, request the complete `tos://<bucket>/<prefix>/` value instead of guessing it.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
arkcli agent session create \
|
|
34
|
+
--agent-id agent-xxx \
|
|
35
|
+
--environment-id env-xxx \
|
|
36
|
+
--tos-path tos://my-bucket/analysis/ \
|
|
37
|
+
--format json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The protocol may be omitted as `my-bucket/analysis/`. The value must identify a directory: the prefix must be non-empty and end in `/`. Values such as `tos://bucket/`, `bucket`, or `bucket/path` fail local validation. If `--resource` is also provided, the TOS resource is appended to that array.
|
|
41
|
+
|
|
42
|
+
`arkcli +new session` and `arkcli +iterate` support the same flag. It mounts an existing directory; it does not create a bucket, upload objects, or grant access. Confirm that the account has TOS access and permission to read the bucket and prefix.
|
|
43
|
+
|
|
44
|
+
### Environment Setup Script
|
|
45
|
+
|
|
46
|
+
An Environment initialization script is stored in `Config.SetupScript`. Pass the script directly or use `@` to read a local file:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
arkcli agent env create \
|
|
50
|
+
--name arkcli-analysis-env \
|
|
51
|
+
--config '{Type: cloud, Networking: {Type: unrestricted}}' \
|
|
52
|
+
--setup-script @./bootstrap.sh \
|
|
53
|
+
--format json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`--setup-script` overrides `Config.SetupScript`. Complex configuration can still be supplied with `--config @./env.yaml` or `--file`. The CLI normalizes common lower-case and snake-case fields such as `setup_script` and `networking` to the OpenTOP request shape.
|
|
57
|
+
|
|
58
|
+
### Session Overrides
|
|
59
|
+
|
|
60
|
+
Before overriding runtime parameters, query the target model's [parameter metadata](model-config.md). Query again when changing models; do not inject defaults automatically.
|
|
61
|
+
|
|
62
|
+
A Session may override an existing Agent or Environment for that Session only. Non-null fields such as Agent `System`, `Tools`, `McpServers`, `Skills`, and `Multiagent`, and Environment `Config`, use the service's replacement semantics. Supply complete arrays instead of expecting them to merge with the base Agent.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
arkcli agent session create \
|
|
66
|
+
--agent-id agent-xxx \
|
|
67
|
+
--environment-id env-xxx \
|
|
68
|
+
--agent-overrides '{model: {id: dola-seed-2-1-pro-260628, thinking: enabled, reasoning_effort: low, service_tier: auto}, Tools: [...]}' \
|
|
69
|
+
--environment-overrides @./environment-overrides.yaml \
|
|
70
|
+
--format json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`--agent-overrides` maps to `AgentWithOverrides`; `--environment-overrides` maps to `Environment`. If an override omits `Id`, the CLI fills it from `--agent-id` or `--environment-id`. These are one-of request variants, so the CLI removes the corresponding `AgentId`/`AgentVersion` or `EnvironmentId` from the final request. Do not use `--agent` and `--agent-overrides` together. `arkcli +new session` and `arkcli +iterate` accept the same override flags.
|
|
74
|
+
|
|
75
|
+
`AgentWithOverrides.Model` supports `Id/Provider/Protocol/BaseUrl/Headers/TokenLimits/InputModalities` and `Speed/Thinking/ReasoningEffort/ServiceTier`. Explicit connection fields are no longer filtered. See [BYOK](byok.md) for types, omission semantics, and request credentials. Use the selected model's capabilities; do not invent defaults or equate persistence with successful inference.
|
|
76
|
+
|
|
77
|
+
The same model-structure normalization applies to `--agent-overrides`, `--agent-overrides @file`, and `AgentWithOverrides` supplied through the general `session create --file` payload. Explicit empty values such as `--agent-overrides=` or `--environment-overrides=` are invalid; ArkCLI returns a validation error and does not create a Session.
|
|
78
|
+
|
|
79
|
+
### Environment Status Filtering
|
|
80
|
+
|
|
81
|
+
Currently, `arkcli agent env list` **does not support the `--status` flag**. Do not generate the following command:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
arkcli agent env list --status active
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`ListEnvironments` does not support a `Status` filter field either; the `Environment` objects only have an optional `ArchiveTime`.
|
|
88
|
+
|
|
89
|
+
To filter by status, fetch the full list first, then filter locally using the AI Agent in the `arkcli` CLI:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
arkcli agent env list --page-all --format json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- `ArchiveTime` is non-empty: `archived`
|
|
96
|
+
- `ArchiveTime` is empty or missing: `active`
|
|
97
|
+
- Although the frontend domain type reserves `updating`, no reliable field is available for this state; do not claim support for `updating`.
|
|
98
|
+
- Do not filter based on the default page; status filtering must be combined with `--page-all`, and be mindful of the global `--page-limit` affecting the results.
|
|
99
|
+
|
|
100
|
+
`--page-all` defaults to `Limit=100`, and the next page is fetched using `NextPage` in the response. `--page-limit` limits the number of pages to request, not the number of results.
|
|
101
|
+
|
|
102
|
+
## Other resources at Session creation
|
|
103
|
+
|
|
104
|
+
Complex resources belong to `session create --resource`, not the file-only `session resources add`. For an already selected memory store, use an array such as `[{Type: memory_store, MemoryStoreId: ms-xxx, Name: user-memory}]`. Canonical field names are PascalCase and type values remain snake_case. The current CLI also normalizes supported aliases such as `memory_store_id`; snake_case is not inherently invalid. For a required-field error, inspect nesting, the real ID and the local Preview payload rather than guessing fields or creating a substitute resource.
|
|
105
|
+
|
|
106
|
+
## Diagnostics and export
|
|
107
|
+
|
|
108
|
+
- Use `arkcli +debug <session-id> --format json` for a known Session. Distinguish running, failed and waiting-for-confirmation states from the returned Session/events/resources/threads. Warnings indicate partial retrieval failures, not empty data.
|
|
109
|
+
- On an explicit export request, use `arkcli +export <session-id> --output ./session-diagnostics.tar.gz`. This packages CLI-visible diagnostics, not a complete workspace, memory store or environment snapshot. Explain the manifest/notes, event count and warnings.
|
|
110
|
+
- The archive lives on the CLI host. Inspect potentially sensitive messages/code/business data before delivery; a remote sandbox path is not a file on the user's computer. Do not automatically upload or publish diagnostics.
|
|
111
|
+
|
|
112
|
+
## Files and Session Resources
|
|
113
|
+
|
|
114
|
+
### Inspect Mounted Resources
|
|
115
|
+
|
|
116
|
+
Read `agent session get <session-id>`, then `agent session resources list <session-id>`. Use `resources get` with the resource/file ID or mount-path selector from its help for a single item, and `agent file get <file-id>` for file metadata. Mounted resources are not a complete Sandbox directory tree, and file get does not download content. Do not invent filesystem traversal or internal storage commands when a public read API is unavailable.
|
|
117
|
+
|
|
118
|
+
For memory mounts, use the returned store ID with `agent memory-store get`, `memories list`, and `memories get --view full`. The default basic view excludes content. After a path update, use the returned ID and Path instead of assuming the old ID remains valid. Never connect to OV internal storage or bypass resource/account authorization.
|
|
119
|
+
|
|
120
|
+
- Upload local files to the Files API: `arkcli agent file upload --path ./data.csv --purpose user_data --wait-active`.
|
|
121
|
+
- Register with URLs/TOS: `arkcli agent file upload --url https://... --purpose user_data` or `--url tos://bucket/path/file --tos '{bucket: b, prefix: arkfiles/}'`.
|
|
122
|
+
- `agent file upload/delete` support command-local `--dry-run`. It emits a zero-network `preview.v1` plan and never uploads, polls, or deletes. Delete preview does not require `--yes`; real deletion still requires explicit confirmation and `--yes`.
|
|
123
|
+
- Preprocess for videos/special files can include `--preprocess-configs`; an expiration time can be specified with `--expire-at <unix-seconds>`.
|
|
124
|
+
- Wait for upload completion: `arkcli agent file wait <file-id>`.
|
|
125
|
+
- List existing files: `arkcli agent file list --purpose user_data --limit 20`. Use `arkcli --page-all agent file list` for full traversal, with `limit=100` and fetching `has_more + last_id -> after` for subsequent requests.
|
|
126
|
+
- When a user provides a local path and wants to mount it to an existing session, complete the following steps:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
arkcli agent session resources add <session-id> --path ./data.csv --mount-path data.csv
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This involves uploading the file, waiting for it to become active, and then adding the session resource.
|
|
133
|
+
The `session resources add --path` command supports passing related parameters: `--purpose`, `--tos`, `--preprocess-configs`, `--expire-at`, `--wait-timeout`, and `--wait-interval`.
|
|
134
|
+
|
|
135
|
+
Boundaries:
|
|
136
|
+
|
|
137
|
+
- `session resources add` currently only supports `type=file`, `file_id`, and `mount_path`, and does not support the more complex `github_repository`/`memory_store` parameters in PRD.
|
|
138
|
+
- The backend automatically prepends `mount_path` with `/mnt/session/uploads/`. The CLI will warn about this in stderr, but will not modify the user-provided path; for example, if the path is `reports/data.csv`, the final path becomes `/mnt/session/uploads/reports/data.csv`. Avoid providing `uploads/` or paths containing `..` to avoid overwriting or invalid paths.
|
|
139
|
+
- `resources get` is a derived CLI capability: list resources and filter by `resource_id`, `file_id`, or `mount_path`.
|
|
140
|
+
- Currently, the data plane does not have native resource update/delete capabilities; the CLI remains unsupported.
|
|
141
|
+
- After `session resources add`, the backend copies the source file to the session-managed uploads path. Therefore, the `file_id` seen in `resources list` may differ from the source `file_id` passed during the addition.
|
|
142
|
+
- Do not use ArkBFF/NodeBFF to fetch files; the CLI only connects directly to `/api/v3/files` for the data plane.
|
|
143
|
+
|
|
144
|
+
## Example
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
arkcli agent file upload --path ./sales.csv --purpose user_data --wait-active --format json
|
|
148
|
+
arkcli agent session resources add sess-xxx --path ./sales.csv --mount-path sales.csv --format json
|
|
149
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Upgrade an Existing Session
|
|
2
|
+
|
|
3
|
+
Use `agent session upgrade` to change the model, Agent version, or runtime configuration of an **existing Session**. Updating the Agent resource does not automatically update its old Sessions; `+iterate` creates a new Session and is not a substitute. Use `session update` for title/tags only. Creation-time overrides are described in `session-files.md`.
|
|
4
|
+
|
|
5
|
+
## Command and Input
|
|
6
|
+
|
|
7
|
+
Consult [model parameter metadata](model-config.md) before configuring or changing runtime parameters. Metadata guides supported values; it does not replace upgrade baseline semantics or add client-side business validation.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
arkcli agent session upgrade <session-id> \
|
|
11
|
+
--model <selected-model-id> \
|
|
12
|
+
--thinking enabled \
|
|
13
|
+
--reasoning-effort low \
|
|
14
|
+
--dry-run --format json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
arkcli agent session upgrade <session-id> \
|
|
19
|
+
--agent-version 4 \
|
|
20
|
+
--agent '{skills: [], mcp_servers: []}' \
|
|
21
|
+
--environment '{config: {env: {LOG_LEVEL: debug}, packages: {pip: [pytest]}}}' \
|
|
22
|
+
--compact \
|
|
23
|
+
--dry-run --format json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
| Flag | Meaning |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `<session-id>` | Required; preserves the existing Session rather than creating one |
|
|
29
|
+
| `--file <path>` | Local JSON/YAML request file; no implicit stdin or `--file -` support |
|
|
30
|
+
| `--agent <object>` | Inline JSON/YAML or `@file`; fields: `type/id/version/model/system/tools/mcp_servers/skills/multiagent/display_name` |
|
|
31
|
+
| `--environment <object>` | Inline JSON/YAML or `@file`; fields: `type/id/config` |
|
|
32
|
+
| `--agent-version <int>` | Overrides `agent.version`; omitted or 0 preserves the current snapshot, not the latest version |
|
|
33
|
+
| `--model <id-or-object>` | An ID replaces only `agent.model.id`; an object or `@file` replaces the model object in the request |
|
|
34
|
+
| `--speed/--thinking/--reasoning-effort/--service-tier` | Overrides the corresponding snake_case model field, preserving explicit empty strings |
|
|
35
|
+
| `--vault-ids <array>` | JSON/YAML array or `@file`; complete target user Vault set, not a delta; `[]` clears user bindings |
|
|
36
|
+
| `--initial-events <array>` | JSON/YAML array or `@file`; optional or `[]`; the backend accepts only one fixed `/compact` event when nonempty |
|
|
37
|
+
| `--compact[=false]` | true builds the fixed `/compact` event; false sets `initial_events: []`; conflicts with `--initial-events` |
|
|
38
|
+
|
|
39
|
+
This uses data-plane `POST /api/v3/sessions/{id}/upgrades` and **snake_case**, not TOP CamelCase or creation-time `AgentWithOverrides`. Missing type values become `agent_with_upgrades` / `environment_with_upgrades`; explicit types are forwarded unchanged. IDs may be omitted to keep current bindings. Supplied Agent/Environment IDs must match the Session and cannot switch its bindings.
|
|
40
|
+
|
|
41
|
+
Precedence: load `--file`, replace its entire agent/environment object when the respective flag is present, then apply version/model leaf flags. Event/Vault flags replace the corresponding arrays. The CLI preserves omitted values, `null`, `[]`, and empty strings. Apart from defaulting missing discriminators, it does not look up or merge remote snapshots or enforce business allowlists; report server errors without inventing unsupported fields.
|
|
42
|
+
|
|
43
|
+
## Configuration Semantics
|
|
44
|
+
|
|
45
|
+
- Supply at least one of `agent/environment/vault_ids`; initial events alone are not an upgrade target. This API does not expose top-level `title/tags/resources/checkpoint_id/environment_id`.
|
|
46
|
+
- Without a version, patch the current Session Agent snapshot and preserve unprovided fields. With a positive version, start from that published version and apply explicit overrides; previous Session overrides are not automatically retained. Resolve an actual published version number when the user asks for the latest; neither omission nor the string `latest` means latest.
|
|
47
|
+
- `tools/mcp_servers/skills` replace entire arrays; `[]` clears them and omitted/null preserves the baseline. No default tools or skills are injected.
|
|
48
|
+
- Model fields: `id/provider/protocol/base_url/headers/token_limits/input_modalities` and the four runtime settings. Creation overrides support the same fields; upgrade emits snake_case without rewriting Header keys or values. See [BYOK](byok.md). Omitted fields are not filled from defaults.
|
|
49
|
+
- Cloud networking replaces the policy; `config.env` merges by key and packages merge by package name, with supplied values/specs winning. Empty env/packages do not clear existing entries. Explicit setup_script replaces it, including an empty string. An environment ID alone does not reload the Environment resource's latest configuration; supply the desired config explicitly.
|
|
50
|
+
- Self-hosted Sessions can upgrade their Agent, but cannot switch environment type or configure customer-owned sandbox networking/packages/env/setup_script. User TOS cannot be changed by upgrade.
|
|
51
|
+
- On servers supporting Vault replacement, a nonempty `vault_ids` array replaces all user bindings: include every Vault to retain. Omission or request-file `null` preserves bindings; `[]` clears user bindings while server-managed authorization Vaults remain. The same set refreshes credentials. The server validates existence and account/project access; no Vault is created automatically. Show the binding diff and obtain confirmation, then read back after upgrading. Do not supply credential secrets. BytePlus deployment availability must be verified from the actual response; report older-server rejection without silently substituting another operation.
|
|
52
|
+
|
|
53
|
+
## Execution and Verification
|
|
54
|
+
|
|
55
|
+
1. Read the Session to identify current bindings/configuration and state. The server requires idle and rejects terminated/upgrading Sessions or a previous turn that has not normally ended. The CLI does not preempt these business checks or retry business errors.
|
|
56
|
+
2. Use leaf-local `upgrade ... --dry-run --format json`. It is an offline plan, not model/resource validation. Explain the changes and possible sandbox preparation/compaction effects, obtain explicit confirmation, then execute without dry-run. There is no `--yes` flag on this command.
|
|
57
|
+
3. Execution submits once and returns the actual Session object; it does not return a separate upgrade task or wait for completion. `upgrading` means accepted/in progress, not that the new model is already effective. Do not invent an `/upgrades/{upgrade_id}` query command.
|
|
58
|
+
4. Separately read the Session until it leaves upgrading and verify model ID, version, runtime settings, and target configuration. Idle alone does not prove success. Diagnose mismatched configuration with events or `+debug`. After an ambiguous response/timeout, read back before considering another upgrade.
|
|
59
|
+
5. Do not send messages, delete, interrupt, or repeat an upgrade while upgrading. If compact was requested with upgrade, do not send another compact. After configuration verification, obtain test authorization before sending a minimal inference message.
|
|
60
|
+
|
|
61
|
+
Use the current product/profile API Key and project; an explicit base URL needs a paired explicit API Key. Standard Authorization/API Key fields are redacted in preview, but arbitrary environment variables/custom headers are not guaranteed to be secret-free. Never disclose real secrets in conversation, logs, or reports.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Skills
|
|
2
|
+
|
|
3
|
+
## Skill Selection
|
|
4
|
+
|
|
5
|
+
- BytePlus exposes TOP `custom`, `ark`, and `all` sources. `agent skill search/list` defaults to `--source custom`; `ark` queries Ark-provided skills and `all` omits `Source`. Only `market`, `skillhub`, and `skill_hub` are rejected before any remote request.
|
|
6
|
+
- Market/SkillHub skill is **not available in BytePlus**. Ark skills can be discovered and attached, but they are read-only: update, delete, download, and protection changes are rejected by the CLI.
|
|
7
|
+
- Custom skill: The default selection process for skills within the user's account involves pagination: fetch the first page of 100 items, and the AI agent within the CLI calls `ListSkillsForTop` to filter by name, description, and capability. If no suitable candidate is found, the `NextPage` is used to fetch the next page until a match is found or no further pages are available. Do not filter by `Name` on the server side or pull the entire catalog in one go. The internal CLI entry point is `ListSkillsForTop`, and the actual top-level action is `ListSkills`. Only use the `skill-...` IDs returned by this interface; `s-...` IDs are not used for custom skills.
|
|
8
|
+
- When creating an Agent, a bare custom ID can be passed directly as `--skill skill-xxx`. The CLI omits `Version`, allowing the service to use the latest version; it never sends the literal string `latest`. A bare `--skill s-xxx` is rejected in BytePlus.
|
|
9
|
+
- When uploading a custom skill, it goes through the data plane `POST /api/v3/skills`, not the top-level `CreateSkill`. A current profile with an available ARK API key is required.
|
|
10
|
+
- `agent skill get <id>` and `versions` read custom or Ark skills through TOP. List summaries preserve `DisplayTitle`, `Source`, `UpdateTime`, `Name`, and `ProtectionEnabled`; Agent Skill responses preserve `UseLatest`, concrete `Version`, and `DisplayName`.
|
|
11
|
+
- `agent skill create --protection-enabled` sets protection during upload. Use `agent skill set-protection <id> --enabled=true|false` for an existing custom skill; explicit `false` is preserved and sent through TOP `UpdateSkill`.
|
|
12
|
+
- `agent skill update <id> --zip <file>` creates a new version through OpenTOP `CreateSkillVersion`; it does not modify an existing version in place. Use `agent skill versions <id>` to list versions.
|
|
13
|
+
- `agent skill download <id> [--version <version>]` resolves the requested or latest version, obtains `PreSignedTOSURL` through `GetSkillVersion`, and downloads it with an ordinary unauthenticated GET. The default filename is `<skill-id>-v<version>.zip`.
|
|
14
|
+
- `agent skill download ... --dry-run` previews version resolution, download, and local save steps without network or filesystem writes. If `--version` or `--output` is omitted, treat the corresponding `unresolved` value as a placeholder; never claim it was resolved online and never create or replace a file during Preview.
|
|
15
|
+
- `agent skill delete <id>` calls `DeleteSkill`. It does not cascade to SkillVersions and may run only after every version has been deleted.
|
|
16
|
+
- `agent skill delete <id> --version <version>` calls `DeleteSkillVersion` and deletes only that version. Before deleting the latest version, delete every non-latest version.
|
|
17
|
+
- `agent skill create/update/delete` support command-local `--dry-run` for a zero-network preview of the upload or delete request. Delete preview does not require `--yes`, but it does not validate the online version dependency order. Real deletion still requires a complete version-list read and interactive confirmation or explicit `--yes`.
|
|
18
|
+
- BytePlus does not expose a market skill selection flow. Custom/Ark selection uses `Items[].Id`, `Name`, `DisplayTitle`, `Description`, `Source`, and version fields from TOP `ListSkills`.
|
|
19
|
+
- When selecting a custom skill, read the first page of complete `Items`, and compare `Id`, `Name`, `Description`, and `LatestVersion`. Do not rely solely on the service-end keywords or the first entry. If there are not enough relevant candidates, use `NextPage` to fetch the next page. The `AgentSkills` only contain `skill-...` custom skills. After confirming the candidates, they can be fetched directly or pass the bare `--skill <Items[].Id>`.
|
|
20
|
+
- When multiple candidates are close, list them for the user to choose from. When the user requests automatic completion, select the skill with the highest relevance and the most explicit version.
|
|
21
|
+
|
|
22
|
+
- Pagination selection prioritizes "on-demand fetching": the first page uses `--limit 100`, and the next page's `NextPage` is passed directly to `--page`. Only when the user requests a complete list or needs offline analysis of all skills, or when no pages are hit, use `--page-all`. It is subject to the global `--page-limit` and cannot treat truncated catalogs as complete candidates.
|
|
23
|
+
|
|
24
|
+
- Do not mix `Items[].Id` and `LatestVersionStatus.VersionId`: for creating an Agent, pass `SkillId` and the semantic version `Version`, not `VersionId`.
|
|
25
|
+
|
|
26
|
+
## Import from GitHub
|
|
27
|
+
|
|
28
|
+
GitHub import uses only the public repository's default-branch HEAD. There are no private-repository, branch, or tag options:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
arkcli agent skill github scan owner/repo --format json
|
|
32
|
+
arkcli agent skill github import https://github.com/owner/repo --path skills/foo --path skills/bar --format json
|
|
33
|
+
arkcli agent skill github import 'npx skills add owner/repo' --all --protection-enabled=true --format json
|
|
34
|
+
arkcli agent skill github import owner/repo --selected @./selected.json --format json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- When constructing a command, prefer the input forms known to the service: `owner/repo`, a complete GitHub HTTPS URL, or a complete `npx skills add ...` string. These are invocation guidelines, not an Agent-side or CLI-side allowlist.
|
|
38
|
+
- Once the user supplies repository input, do not parse, rewrite, or reject it in the Agent or CLI. Pass it unchanged to `ScanGithubSkill.Input` and let the service interpret and validate it. The CLI never starts a shell or executes npx from the input.
|
|
39
|
+
- Repeat `--path`, or use `--all`; they conflict and selections must be valid scan candidates.
|
|
40
|
+
- `--selected` reads an array of `{Path, ProtectionEnabled}` objects and conflicts with global `--protection-enabled`.
|
|
41
|
+
- scan is read-only. import uses Workflow Client Preview; `--dry-run` sends no network requests and leaves scan-dependent values unresolved.
|
|
42
|
+
- All item results (`ok`, `updated`, `skipped_duplicate`, `failed`) are printed. Any failed item makes the command exit nonzero after preserving the complete result.
|
|
43
|
+
|
|
44
|
+
## Custom Skill Deletion Order
|
|
45
|
+
|
|
46
|
+
Skill deletion has a strict dependency order. Before deleting anything, use `agent skill versions <id>` to fetch the complete version list and identify the latest version:
|
|
47
|
+
|
|
48
|
+
1. To delete the entire Skill, delete every non-latest SkillVersion first, delete the latest SkillVersion next, confirm that the version list is empty, and then delete the Skill.
|
|
49
|
+
2. To delete the latest SkillVersion, delete every non-latest SkillVersion first. Delete the latest version only after confirming that it is the only remaining version.
|
|
50
|
+
3. To delete one non-latest SkillVersion, delete that version directly and then fetch the version list again to verify the result.
|
|
51
|
+
|
|
52
|
+
Re-run `agent skill versions <id>` after every deletion. Do not assume that `DeleteSkill` cascades to versions, and do not call it while any SkillVersion remains. Run each destructive command separately and follow the interactive confirmation or `--yes` requirement.
|
|
53
|
+
|
|
54
|
+
## Common Commands
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
arkcli agent skill search "Excel data analysis" --source custom --limit 10 --format json
|
|
58
|
+
arkcli agent skill list --source custom --query "Excel data analysis" --limit 20 --format json
|
|
59
|
+
arkcli agent skill list --source custom --name "My analysis data" --limit 20 --format json
|
|
60
|
+
arkcli agent skill list --source custom --limit 100 --format json
|
|
61
|
+
# If the previous page returns `NextPage` and no suitable candidate is found, continue:
|
|
62
|
+
arkcli agent skill list --source custom --limit 100 --page '<NextPage>' --format json
|
|
63
|
+
# Note: --source market is not supported on BytePlus; custom (default), ark, and all are supported.
|
|
64
|
+
arkcli agent skill create --zip ./my-skill.zip --display-title "My Skill" --format json
|
|
65
|
+
arkcli agent skill create --zip ./my-skill.zip --display-title "My Skill" --protection-enabled=true --format json
|
|
66
|
+
arkcli agent skill set-protection skill-xxx --enabled=false --format json
|
|
67
|
+
arkcli agent skill list --source ark --limit 100 --format json
|
|
68
|
+
arkcli agent skill list --source all --limit 100 --format json
|
|
69
|
+
arkcli agent skill github scan owner/repo --format json
|
|
70
|
+
arkcli agent skill github import owner/repo --all --format json
|
|
71
|
+
arkcli agent agent create --name arkcli-local-skill-agent --model <items[].model from agent model list> --skill-zip ./my-skill.zip --format json
|
|
72
|
+
arkcli agent agent create --name arkcli-existing-custom-skill-agent --model <items[].model from agent model list> --skill skill-xxx --format json
|
|
73
|
+
arkcli agent skill update skill-xxx --zip ./my-skill-v2.zip --format json
|
|
74
|
+
arkcli --page-all agent skill versions skill-xxx --format json
|
|
75
|
+
# Replace the placeholder with the selected entry's exact Version from the versions response:
|
|
76
|
+
arkcli agent skill download skill-xxx --version '<Version-from-versions>' --output ./skill-selected-version.zip --format json
|
|
77
|
+
# Omit --version when the user wants latest; the CLI resolves LatestVersion:
|
|
78
|
+
arkcli agent skill download skill-xxx --output ./skill-latest.zip --format json
|
|
79
|
+
# To delete a Skill, delete each non-latest version first:
|
|
80
|
+
arkcli agent skill delete skill-xxx --version <non-latest-version> --yes --format json
|
|
81
|
+
# Fetch versions again and delete latest only after it is the sole remaining version:
|
|
82
|
+
arkcli --page-all agent skill versions skill-xxx --format json
|
|
83
|
+
arkcli agent skill delete skill-xxx --version <latest-version> --yes --format json
|
|
84
|
+
# Fetch versions again and delete the Skill only after the list is empty:
|
|
85
|
+
arkcli --page-all agent skill versions skill-xxx --format json
|
|
86
|
+
arkcli agent skill delete skill-xxx --yes --format json
|
|
87
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Todo Write planning tool
|
|
2
|
+
|
|
3
|
+
Read this when the user explicitly requests a task-plan/todo tool. `todo_write` is built in and uses Agent create/update `--tool`; it is not a custom tool or a separate Todo CLI command. Product rollout and access remain subject to the BytePlus service; Volc availability is not proof of BytePlus availability.
|
|
4
|
+
|
|
5
|
+
Use configuration name `todo_write` within `agent_toolset_multimodal_20260825`, never a base toolset such as `agent_toolset_20260701`. It needs no `Models` or tool-model discovery. Do not enable image/video tools just because the toolset name contains multimodal. Stop on permission or unsupported-toolset errors, preserve the error and RequestId, and do not switch toolsets or use Raw API to bypass the rejection.
|
|
6
|
+
|
|
7
|
+
This is **one toolset entry, not the complete Tools array**. When adding this toolset for Todo only, explicitly disable its defaults to avoid enabling unrelated tools or triggering their model dependencies:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"Type": "agent_toolset_multimodal_20260825",
|
|
12
|
+
"DefaultConfig": {
|
|
13
|
+
"Enabled": false,
|
|
14
|
+
"PermissionPolicy": {"Type": "always_allow"}
|
|
15
|
+
},
|
|
16
|
+
"Configs": [
|
|
17
|
+
{
|
|
18
|
+
"Name": "todo_write",
|
|
19
|
+
"Enabled": true,
|
|
20
|
+
"PermissionPolicy": {"Type": "always_allow"}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- Creation: explicit `--tool` replaces all default tools. Combine this entry with the complete base-tool configuration the user needs; passing this entry alone drops other tools.
|
|
27
|
+
- Update: first run `arkcli agent agent get <agent-id> --format json`. If the toolset already exists, merge the Todo configuration into it without adding a duplicate or overwriting its DefaultConfig with this example. Preserve other tools, model bindings, and PermissionPolicy, even if the frontend hides permission controls.
|
|
28
|
+
- Submit with `arkcli agent agent update <agent-id> --tool '<complete Tools JSON array>' --format json`, then read back. To disable Todo, set its Enabled to false while retaining other settings.
|
|
29
|
+
- For runtime verification, create a Session bound to the updated Agent version; do not assume an existing Session inherits the update. Ask it to use Todo to maintain a plan and inspect tool events. An accepted configuration alone is not proof of a tool invocation.
|
|
30
|
+
|
|
31
|
+
Runtime events may use `todo_write` or `TodoWrite` depending on BaseAgent; configuration always uses `todo_write`. Agent Loop executes it internally, so no custom-tool implementation or manually returned custom-tool result is needed.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arkcli-api-explorer
|
|
3
|
+
version: 0.2.0
|
|
4
|
+
description: Inspect or invoke locally registered BytePlus ArkCLI actions when product commands cannot cover a task. Use for registry errors or exact raw payloads. Public catalogs and OpenAPI schemas use arkcli-docs.
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["arkcli"]
|
|
8
|
+
cliHelp: "arkcli api --help"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# BytePlus Raw API Explorer
|
|
12
|
+
|
|
13
|
+
Before using this Skill:
|
|
14
|
+
|
|
15
|
+
1. Read [`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md) for the
|
|
16
|
+
BytePlus product boundary, authentication, output, and confirmation rules.
|
|
17
|
+
2. Read
|
|
18
|
+
[`references/arkcli-api.md`](references/arkcli-api.md) before constructing
|
|
19
|
+
any `arkcli api` invocation.
|
|
20
|
+
|
|
21
|
+
Raw API Explorer is the final fallback, not the default command path.
|
|
22
|
+
|
|
23
|
+
## When To Trigger
|
|
24
|
+
|
|
25
|
+
- The user explicitly names an action, operation, registry entry, or raw
|
|
26
|
+
request contract.
|
|
27
|
+
- `arkcli api ...` returns `unknown action` or rejects `--params`.
|
|
28
|
+
- A contributor needs to confirm that a registered operation is visible and
|
|
29
|
+
routed to the expected protocol and target.
|
|
30
|
+
- No stable product command covers a specialized data-plane operation.
|
|
31
|
+
|
|
32
|
+
## When NOT To Trigger
|
|
33
|
+
|
|
34
|
+
- Public API catalogs, identifiers, OpenAPI schemas or required request fields
|
|
35
|
+
belong to [`arkcli-docs`](../arkcli-docs/SKILL.md) and `docs apis list/spec`.
|
|
36
|
+
`api --list` only lists locally compiled actions, not the public API catalog
|
|
37
|
+
or complete OpenAPI schemas.
|
|
38
|
+
- A stable product command or workflow covers the goal, including model
|
|
39
|
+
discovery, generation, deployment, Endpoint management, usage, profile, or
|
|
40
|
+
billing.
|
|
41
|
+
- The problem is missing login, `401`, permissions, profile selection, Region,
|
|
42
|
+
or base URL. Diagnose authentication or configuration first.
|
|
43
|
+
- The action contract is unknown. Do not guess a payload merely because an
|
|
44
|
+
action name appears in the registry.
|
|
45
|
+
|
|
46
|
+
## Command selection order
|
|
47
|
+
|
|
48
|
+
1. Check the owning product command and Skill.
|
|
49
|
+
2. Use `arkcli <domain> --help` or `arkcli +<workflow> --help`.
|
|
50
|
+
3. If no product command applies, list the local registry.
|
|
51
|
+
4. Confirm the exact BytePlus request contract.
|
|
52
|
+
5. Apply authentication, verification, and write guards.
|
|
53
|
+
6. Invoke the registered action and extract only the fields the task needs.
|
|
54
|
+
|
|
55
|
+
## Registry boundary
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
arkcli api --list
|
|
59
|
+
arkcli api
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Both commands list the actions compiled into the local binary, sorted by name.
|
|
63
|
+
List mode is local and does not require authentication.
|
|
64
|
+
|
|
65
|
+
A registry entry proves only that the client knows an operation descriptor. It
|
|
66
|
+
does not prove that the active BytePlus account, service, Region, or product
|
|
67
|
+
contract supports that action. Require a matching BytePlus capability Skill or
|
|
68
|
+
an authoritative BytePlus API contract before invocation. Never switch to
|
|
69
|
+
another product to make an action succeed.
|
|
70
|
+
|
|
71
|
+
## Invocation contract
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
arkcli api <registered-action> --params '<json-object>'
|
|
75
|
+
|
|
76
|
+
# Local client preview: validates and displays the descriptor and payload
|
|
77
|
+
# without creating a transport or sending a request.
|
|
78
|
+
arkcli api <registered-action> --params '<json-object>' --dry-run
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- `<registered-action>` must exactly match a name from `arkcli api --list`.
|
|
82
|
+
- `--params` is an optional JSON object string and defaults to `{}`.
|
|
83
|
+
- Field names and casing come from the action request contract; do not infer
|
|
84
|
+
them from the action name.
|
|
85
|
+
- `--dry-run` is a local flag of Raw API invoke mode. It emits a
|
|
86
|
+
`preview.v1` plan with a redacted `steps[0].payload` and does not contact
|
|
87
|
+
BytePlus services.
|
|
88
|
+
- `arkcli api --list --dry-run` is invalid because list mode is already a
|
|
89
|
+
local registry read and has no remote request to preview.
|
|
90
|
+
- Prefer `--format json` and a global `--transform` expression for stable
|
|
91
|
+
machine-readable output.
|
|
92
|
+
|
|
93
|
+
Example of a data-plane fallback without a dedicated product command:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Text embeddings (/embeddings); discover the versioned model id first:
|
|
97
|
+
# arkcli models list --modality embed
|
|
98
|
+
arkcli api arkruntime.create_embeddings \
|
|
99
|
+
--params '{"model":"<text-embedding-model-id>","input":"BytePlus Ark"}' \
|
|
100
|
+
--transform 'data.0.embedding'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Replace the model placeholder with a versioned ID available to the active
|
|
104
|
+
BytePlus profile (not a display name or bare family name). Vision/multimodal
|
|
105
|
+
embedding models (e.g. `skylark-embedding-vision-*`) cannot use this action:
|
|
106
|
+
they return 400 "does not support this api" and must go through
|
|
107
|
+
`arkruntime.create_multimodal_embeddings` (`/embeddings/multimodal`).
|
|
108
|
+
|
|
109
|
+
## Authentication and verification
|
|
110
|
+
|
|
111
|
+
- Run `arkcli auth status --format json` before a remote control-plane action.
|
|
112
|
+
- Data-plane actions require an active API key resolved through the selected
|
|
113
|
+
BytePlus profile.
|
|
114
|
+
- Do not call account-opening or payment-verification actions directly. Use
|
|
115
|
+
the combined `byteplus_sso.identity.verified` contract exposed by
|
|
116
|
+
`arkcli auth status`.
|
|
117
|
+
- A billable write must follow the shared BytePlus verification gate and
|
|
118
|
+
explicit confirmation rules.
|
|
119
|
+
|
|
120
|
+
## Write guard
|
|
121
|
+
|
|
122
|
+
Raw API invoke mode supports a command-local Client Preview:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
arkcli api <action> --params '<json-object>' --dry-run --format json
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Inspect `mode=client_preview`, `steps[0].target`, and
|
|
129
|
+
`steps[0].payload`. Preview success does not prove authentication,
|
|
130
|
+
permission, quota, account verification, Region support, or server-side
|
|
131
|
+
validation.
|
|
132
|
+
|
|
133
|
+
A `"DryRun":true` member inside `--params` is a backend request field, not the
|
|
134
|
+
CLI Client Preview flag. Without CLI `--dry-run`, the command still creates a
|
|
135
|
+
transport and sends a real network request.
|
|
136
|
+
|
|
137
|
+
For create, update, delete, activation, credential rotation, or billing
|
|
138
|
+
actions:
|
|
139
|
+
|
|
140
|
+
1. Prefer the guarded product command when one exists.
|
|
141
|
+
2. Resolve the exact action and payload.
|
|
142
|
+
3. Run the exact invocation once with CLI `--dry-run` and inspect the plan.
|
|
143
|
+
4. Show the target and impact to the user.
|
|
144
|
+
5. Obtain explicit confirmation.
|
|
145
|
+
6. Remove CLI `--dry-run` and invoke only the confirmed payload.
|
|
146
|
+
|
|
147
|
+
## Pagination and output
|
|
148
|
+
|
|
149
|
+
- `--page-all` has special Raw API behavior only for `apikey.list`.
|
|
150
|
+
- Other actions are passed through once; `--page-all` does not invent or
|
|
151
|
+
mutate their pagination fields.
|
|
152
|
+
- Use `--debug` only for diagnosis because it writes request and response
|
|
153
|
+
details to stderr.
|
|
154
|
+
- Do not expose tokens or full keys in debug output or copied results.
|
|
155
|
+
|
|
156
|
+
## Common errors
|
|
157
|
+
|
|
158
|
+
| Error | Meaning | Recovery |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| `unknown action "..."` | The exact name is not registered | Run `arkcli api --list`; do not guess a replacement |
|
|
161
|
+
| `invalid --params JSON: ...` | The payload is not a valid JSON object | Validate quoting, commas, and field casing |
|
|
162
|
+
| Authentication or permission error | The action reached a remote boundary without usable credentials or permission | Return to `arkcli-auth`; do not retry blindly |
|
|
163
|
+
| Unexpected response fields | The assumed contract was wrong or changed | Re-check the exact BytePlus contract before parsing |
|
|
164
|
+
|
|
165
|
+
## Guard Checklist
|
|
166
|
+
|
|
167
|
+
- Keep Raw API Explorer as the last fallback.
|
|
168
|
+
- Require an exact registered action name and exact BytePlus payload contract.
|
|
169
|
+
- Treat registry presence and product support as different facts.
|
|
170
|
+
- Route authentication and configuration failures to their owning Skills.
|
|
171
|
+
- Use command-local `--dry-run` to preview a raw action, but never treat it as
|
|
172
|
+
server validation or permission verification.
|
|
173
|
+
- Never treat payload `"DryRun":true` as a local preview.
|
|
174
|
+
- Confirm every write target and impact.
|
|
175
|
+
- Use `auth status`, not direct verification actions, for the combined
|
|
176
|
+
BytePlus gate.
|
|
177
|
+
- Preserve structured backend errors and request IDs.
|
|
178
|
+
|
|
179
|
+
## References
|
|
180
|
+
|
|
181
|
+
- [`references/arkcli-api.md`](references/arkcli-api.md) - detailed command,
|
|
182
|
+
parameter, pagination, authentication, and safety contract
|
|
183
|
+
- [`references/evals.md`](references/evals.md) - trigger, fallback, and write
|
|
184
|
+
safety evaluations
|
|
185
|
+
- [`../arkcli-auth/SKILL.md`](../arkcli-auth/SKILL.md) - authentication and
|
|
186
|
+
verification recovery
|
|
187
|
+
- [`../arkcli-config/SKILL.md`](../arkcli-config/SKILL.md) - effective
|
|
188
|
+
profile, Region, project, and base URL diagnosis
|