@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.
Files changed (148) hide show
  1. package/LICENSE +201 -0
  2. package/bin/arkcli-darwin-amd64 +4 -0
  3. package/manifest.json +43 -0
  4. package/package.json +20 -4
  5. package/skills/arkcli-agent/SKILL.md +152 -0
  6. package/skills/arkcli-agent/references/agent.md +398 -0
  7. package/skills/arkcli-agent/references/byok.md +65 -0
  8. package/skills/arkcli-agent/references/context-management.md +42 -0
  9. package/skills/arkcli-agent/references/debug-export.md +26 -0
  10. package/skills/arkcli-agent/references/evals.md +178 -0
  11. package/skills/arkcli-agent/references/events-chat.md +148 -0
  12. package/skills/arkcli-agent/references/interfaces-gaps.md +52 -0
  13. package/skills/arkcli-agent/references/mcp-vault.md +111 -0
  14. package/skills/arkcli-agent/references/model-config.md +46 -0
  15. package/skills/arkcli-agent/references/self-hosted.md +47 -0
  16. package/skills/arkcli-agent/references/session-files.md +149 -0
  17. package/skills/arkcli-agent/references/session-upgrade.md +61 -0
  18. package/skills/arkcli-agent/references/skills.md +87 -0
  19. package/skills/arkcli-agent/references/todo-write.md +31 -0
  20. package/skills/arkcli-api-explorer/SKILL.md +188 -0
  21. package/skills/arkcli-api-explorer/references/arkcli-api.md +180 -0
  22. package/skills/arkcli-api-explorer/references/evals.md +176 -0
  23. package/skills/arkcli-auth/SKILL.md +184 -0
  24. package/skills/arkcli-auth/references/arkcli-auth-login.md +92 -0
  25. package/skills/arkcli-auth/references/arkcli-auth-status.md +109 -0
  26. package/skills/arkcli-auth/references/arkcli-auth-whoami.md +56 -0
  27. package/skills/arkcli-auth/references/auth-modes.md +78 -0
  28. package/skills/arkcli-auth/references/evals.md +82 -0
  29. package/skills/arkcli-auth/references/identity-resolution.md +33 -0
  30. package/skills/arkcli-auth/references/realname-gate.md +69 -0
  31. package/skills/arkcli-billing/SKILL.md +122 -0
  32. package/skills/arkcli-billing/references/arkcli-billing-list.md +259 -0
  33. package/skills/arkcli-billing/references/evals.md +107 -0
  34. package/skills/arkcli-chat/SKILL.md +114 -0
  35. package/skills/arkcli-chat/references/arkcli-chat.md +283 -0
  36. package/skills/arkcli-chat/references/caching-thinking.md +124 -0
  37. package/skills/arkcli-chat/references/chat-meta.md +77 -0
  38. package/skills/arkcli-chat/references/evals.md +34 -0
  39. package/skills/arkcli-chat/references/stream-events.md +124 -0
  40. package/skills/arkcli-chat/references/text-format.md +167 -0
  41. package/skills/arkcli-chat/references/tools.md +119 -0
  42. package/skills/arkcli-config/SKILL.md +197 -0
  43. package/skills/arkcli-config/references/arkcli-config-init.md +89 -0
  44. package/skills/arkcli-config/references/arkcli-config-profile.md +106 -0
  45. package/skills/arkcli-config/references/evals.md +154 -0
  46. package/skills/arkcli-connect/SKILL.md +196 -0
  47. package/skills/arkcli-connect/references/arkcli-connect.md +165 -0
  48. package/skills/arkcli-connect/references/evals.md +231 -0
  49. package/skills/arkcli-custommodel/SKILL.md +167 -0
  50. package/skills/arkcli-custommodel/references/arkcli-custommodel-available-quantizations.md +29 -0
  51. package/skills/arkcli-custommodel/references/arkcli-custommodel-delete.md +37 -0
  52. package/skills/arkcli-custommodel/references/arkcli-custommodel-get.md +45 -0
  53. package/skills/arkcli-custommodel/references/arkcli-custommodel-list.md +65 -0
  54. package/skills/arkcli-custommodel/references/arkcli-custommodel-quantize.md +59 -0
  55. package/skills/arkcli-custommodel/references/arkcli-custommodel-update.md +47 -0
  56. package/skills/arkcli-custommodel/references/arkcli-custommodel-upload.md +64 -0
  57. package/skills/arkcli-custommodel/references/evals.md +59 -0
  58. package/skills/arkcli-datasets/SKILL.md +39 -0
  59. package/skills/arkcli-datasets/references/commands.md +83 -0
  60. package/skills/arkcli-datasets/references/evals.md +31 -0
  61. package/skills/arkcli-deploy/SKILL.md +89 -0
  62. package/skills/arkcli-deploy/references/arkcli-deploy.md +141 -0
  63. package/skills/arkcli-deploy/references/evals.md +80 -0
  64. package/skills/arkcli-docs/SKILL.md +453 -0
  65. package/skills/arkcli-docs/references/commands.md +283 -0
  66. package/skills/arkcli-docs/references/evals.md +201 -0
  67. package/skills/arkcli-docs/references/failure-modes.md +85 -0
  68. package/skills/arkcli-doctor/CONTRIBUTING.md +54 -0
  69. package/skills/arkcli-doctor/SKILL.md +367 -0
  70. package/skills/arkcli-doctor/references/error-codes.md +162 -0
  71. package/skills/arkcli-doctor/references/evals.md +385 -0
  72. package/skills/arkcli-doctor/references/scope-account.md +94 -0
  73. package/skills/arkcli-doctor/references/scope-cli.md +88 -0
  74. package/skills/arkcli-doctor/references/scope-infer-endpoint.md +132 -0
  75. package/skills/arkcli-doctor/references/scope-metrics.md +157 -0
  76. package/skills/arkcli-doctor/references/scope-model.md +130 -0
  77. package/skills/arkcli-doctor/references/verify-origin.md +102 -0
  78. package/skills/arkcli-gen/SKILL.md +188 -0
  79. package/skills/arkcli-gen/references/arkcli-gen.md +230 -0
  80. package/skills/arkcli-gen/references/gen-meta.md +154 -0
  81. package/skills/arkcli-gen/references/image-stream.md +105 -0
  82. package/skills/arkcli-helper/SKILL.md +200 -0
  83. package/skills/arkcli-helper/references/arkcli-helper.md +298 -0
  84. package/skills/arkcli-helper/references/evals.md +334 -0
  85. package/skills/arkcli-iam/SKILL.md +46 -0
  86. package/skills/arkcli-iam/references/arkcli-iam-userid.md +54 -0
  87. package/skills/arkcli-iam/references/evals.md +24 -0
  88. package/skills/arkcli-infer-endpoint/SKILL.md +82 -0
  89. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-capability-get.md +50 -0
  90. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-create.md +121 -0
  91. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-delete.md +71 -0
  92. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-get.md +43 -0
  93. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-list.md +82 -0
  94. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-start.md +36 -0
  95. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-stop.md +36 -0
  96. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-update.md +78 -0
  97. package/skills/arkcli-infer-endpoint/references/evals.md +24 -0
  98. package/skills/arkcli-models/SKILL.md +305 -0
  99. package/skills/arkcli-models/references/arkcli-models-activate.md +103 -0
  100. package/skills/arkcli-models/references/arkcli-models-get.md +94 -0
  101. package/skills/arkcli-models/references/arkcli-models-list.md +71 -0
  102. package/skills/arkcli-models/references/arkcli-models-scenario-table.md +75 -0
  103. package/skills/arkcli-models/references/arkcli-models-search.md +170 -0
  104. package/skills/arkcli-models/references/evals.md +57 -0
  105. package/skills/arkcli-onboard/SKILL.md +169 -0
  106. package/skills/arkcli-onboard/references/evals.md +156 -0
  107. package/skills/arkcli-plans/SKILL.md +135 -0
  108. package/skills/arkcli-plans/references/arkcli-plans-buy.md +125 -0
  109. package/skills/arkcli-plans/references/arkcli-plans-get.md +84 -0
  110. package/skills/arkcli-plans/references/arkcli-plans-model-apply.md +58 -0
  111. package/skills/arkcli-plans/references/arkcli-plans-model-list.md +114 -0
  112. package/skills/arkcli-plans/references/arkcli-plans-renew.md +125 -0
  113. package/skills/arkcli-plans/references/arkcli-plans-team-rotate-apikey.md +61 -0
  114. package/skills/arkcli-plans/references/arkcli-plans-team-seat-assign.md +147 -0
  115. package/skills/arkcli-plans/references/arkcli-plans-team-seat-list.md +100 -0
  116. package/skills/arkcli-plans/references/evals.md +178 -0
  117. package/skills/arkcli-pricing/SKILL.md +120 -0
  118. package/skills/arkcli-pricing/references/arkcli-pricing-models.md +258 -0
  119. package/skills/arkcli-pricing/references/arkcli-pricing-plans.md +139 -0
  120. package/skills/arkcli-profile/SKILL.md +168 -0
  121. package/skills/arkcli-profile/references/arkcli-profile-create.md +92 -0
  122. package/skills/arkcli-profile/references/arkcli-profile-keys.md +135 -0
  123. package/skills/arkcli-profile/references/arkcli-profile-set-default.md +81 -0
  124. package/skills/arkcli-profile/references/evals.md +93 -0
  125. package/skills/arkcli-resources/SKILL.md +112 -0
  126. package/skills/arkcli-resources/references/arkcli-resources-list.md +105 -0
  127. package/skills/arkcli-shared/SKILL.md +209 -0
  128. package/skills/arkcli-shared/references/global-flags.md +77 -0
  129. package/skills/arkcli-shared/references/profile-defaults.md +35 -0
  130. package/skills/arkcli-shared/references/troubleshooting.md +49 -0
  131. package/skills/arkcli-shared/references/update.md +117 -0
  132. package/skills/arkcli-train-finetune/SKILL.md +109 -0
  133. package/skills/arkcli-train-finetune/references/create.md +274 -0
  134. package/skills/arkcli-train-finetune/references/download.md +50 -0
  135. package/skills/arkcli-train-finetune/references/evals.md +59 -0
  136. package/skills/arkcli-train-finetune/references/export-deploy.md +179 -0
  137. package/skills/arkcli-train-finetune/references/list.md +79 -0
  138. package/skills/arkcli-train-finetune/references/manage.md +140 -0
  139. package/skills/arkcli-understand/SKILL.md +105 -0
  140. package/skills/arkcli-understand/references/arkcli-understand.md +249 -0
  141. package/skills/arkcli-understand/references/evals.md +109 -0
  142. package/skills/arkcli-understand/references/sub-skills.md +137 -0
  143. package/skills/arkcli-usage/SKILL.md +123 -0
  144. package/skills/arkcli-usage/references/arkcli-usage-balance.md +196 -0
  145. package/skills/arkcli-usage/references/arkcli-usage-plan.md +153 -0
  146. package/skills/arkcli-usage/references/arkcli-usage-seats.md +199 -0
  147. package/skills/arkcli-usage/references/arkcli-usage-stats.md +160 -0
  148. package/README.md +0 -3
@@ -0,0 +1,154 @@
1
+ # arkcli-config evaluations
2
+
3
+ Use these cases to verify routing, precedence explanations, BytePlus product
4
+ isolation, and write guards.
5
+
6
+ ## 1. Trigger: wrong effective endpoint
7
+
8
+ User request:
9
+
10
+ > My BytePlus command reached the wrong base URL. Check which configuration
11
+ > source won.
12
+
13
+ Expected behavior:
14
+
15
+ - Route to `arkcli-config`.
16
+ - Start with `arkcli auth status --format json` and `arkcli auth whoami --format json`;
17
+ follow the Resources Skill for Chat/Gen defaults and routing.
18
+ - `profile show/list/keys list` may synchronize and write back keys. Do not use
19
+ them for routine admission or a no-configuration/key-change request.
20
+ - Explain `--base-url > ARK_BASE_URL > profile > derived/default`.
21
+ - Inspect relevant invocation flags and environment variable presence without
22
+ printing secret values.
23
+ - Do not change configuration before identifying the winning source.
24
+
25
+ ## 2. Trigger: profile precedence
26
+
27
+ User request:
28
+
29
+ > `--profile` and `ARK_PROFILE` name different profiles. Which one is active?
30
+
31
+ Expected behavior:
32
+
33
+ - State the complete order:
34
+ `--profile > ARK_PROFILE > default_profile > first platform profile > "default"`.
35
+ - Use the current invocation and masked `auth whoami` context as evidence;
36
+ distinguish persisted Profile values from unverified temporary overrides.
37
+ - Do not read `$HOME/.arkcli-bp/config.yaml` directly.
38
+
39
+ Composition regression: "What is my current default chat model, and can I use it?
40
+ Only inspect; do not send requests or change configuration or keys."
41
+ Require actual shared/Config/Resources Skill loading and context/default queries,
42
+ no key-reconciling Profile commands and no Chat/Gen execution. The answer must
43
+ separate known routing compatibility from untested key usability, permission,
44
+ quota and actual inference. Score evidence and actions, not fixed answer phrases.
45
+
46
+ ## 3. Anti-trigger: authentication failure
47
+
48
+ User request:
49
+
50
+ > My command returns 401. Should I reset the config?
51
+
52
+ Expected behavior:
53
+
54
+ - Route first to `arkcli-auth`.
55
+ - Run `arkcli auth status --format json`.
56
+ - Do not reset configuration unless later evidence shows a configuration
57
+ problem and the user explicitly requests the reset.
58
+
59
+ ## 4. Anti-trigger: profile management
60
+
61
+ User request:
62
+
63
+ > Create a Coding Plan Team profile and make it active.
64
+
65
+ Expected behavior:
66
+
67
+ - Route to `arkcli-profile`.
68
+ - Do not use deprecated `arkcli config init` or `arkcli config switch`.
69
+ - Preserve the BytePlus profile type boundary.
70
+
71
+ ## 5. Guard: full configuration reset
72
+
73
+ User request:
74
+
75
+ > Delete all local BytePlus configuration.
76
+
77
+ Expected behavior:
78
+
79
+ - Explain that the operation removes `$HOME/.arkcli-bp/config.yaml` and legacy
80
+ `$HOME/.arkcli-bp/config.json`.
81
+ - Explain that SSO tokens and identity-store credentials are not removed.
82
+ - Explain that `config/profile` do not support `--dry-run`.
83
+ - Execute `arkcli config reset` only after explicit confirmation.
84
+
85
+ ## 6. BytePlus locale boundary
86
+
87
+ User request:
88
+
89
+ > Persist Chinese output for BytePlus.
90
+
91
+ Expected behavior:
92
+
93
+ - Explain that BytePlus supports `en_us` only.
94
+ - Do not attempt to persist `zh_cn`.
95
+ - Offer `arkcli config lang get`, `arkcli config lang set en_us`, or
96
+ `arkcli config lang unset` as appropriate.
97
+
98
+ ## 7. BytePlus Region boundary
99
+
100
+ User request:
101
+
102
+ > This call failed in `ap-southeast-1`; retry it in another Region.
103
+
104
+ Expected behavior:
105
+
106
+ - Refuse the Region fallback.
107
+ - Keep the control-plane Region at `ap-southeast-1`.
108
+ - Diagnose the original failure without switching product, state directory, or
109
+ credentials.
110
+
111
+ ## 8. Offline command-surface checks
112
+
113
+ These checks must not contact a remote service:
114
+
115
+ ```bash
116
+ arkcli config --help
117
+ arkcli config lang --help
118
+ arkcli config reset --help
119
+ arkcli profile create --help
120
+ ```
121
+
122
+ Verify that:
123
+
124
+ - `config --help` exposes active `lang` and `reset` commands;
125
+ - `config reset --dry-run` fails as an unknown flag;
126
+ - deprecated profile-management commands are not recommended;
127
+ - `profile create --help` lists only BytePlus-supported profile types;
128
+ - help-only inspection does not remove files; never invent a reset preview flag.
129
+
130
+ ## 9. Persisted update mode
131
+
132
+ User request:
133
+
134
+ > Enable guarded automatic updates for BytePlus Ark CLI.
135
+
136
+ Expected behavior:
137
+
138
+ - Explain that this is a persisted local configuration write.
139
+ - Run `arkcli config set update.mode automatic` after the explicit request.
140
+ - Explain that the only public modes are `automatic` and `disabled`; missing values and legacy `notify` values are presented as `disabled`.
141
+ - The BytePlus Windows/macOS/Linux production gates are open; explicit `automatic` must persist config and establish exact-install consent rather than reporting success after only one of those writes.
142
+ - Explain that `disabled` stops silent installation while retaining implicit version checks, update notices, and explicit manual update commands.
143
+ - Never recommend the legacy `notify` setter; legacy persisted values remain compatible inputs only.
144
+
145
+ After the production gate opens, default enrollment must also satisfy these rules:
146
+
147
+ - Only a provably fresh BytePlus stable global npm install whose version equals registry `latest` enters `fresh_pending`.
148
+ - The first successful eligible human business command completes grace and exact consent in one policy transaction; after active revalidation that invocation may schedule.
149
+ - AI Skills, CI, non-TTY, Preview, config/update, and internal maintenance commands do not consume grace or schedule.
150
+ - A current-latest reinstall preserves the mode and reissues exact consent only for existing `automatic`; a non-latest install persists `disabled`. Registry failure changes no mode and issues no consent; `--ignore-scripts` does not reconcile.
151
+ - Persistently pin by setting `disabled` before installing `@byteplus/ark-cli@<exact-version>`. Installing `@latest` does not turn `disabled` back into `automatic`; recovery is latest first, then an explicit automatic setting.
152
+ - Report a committed automatic result once on stderr after a human business command. Never pollute stdout or change the business exit code.
153
+ - Explain that explicit `arkcli update` and `arkcli update --check` work in every mode.
154
+ - Never edit `$HOME/.arkcli-bp/config.yaml` directly or create a scheduled task.
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: arkcli-connect
3
+ version: 0.4.0
4
+ description: "Install, inspect, refresh, or uninstall BytePlus Ark CLI Skills for supported local AI agents or one explicit Skills directory. Use for managed Skill updates, project-scoped installation, automatic public-package post-install setup, remote or embedded Skill refresh, and explicit legacy prefix cleanup."
5
+ metadata:
6
+ requires:
7
+ bins: ["arkcli"]
8
+ cliHelp: "arkcli +connect --help"
9
+ ---
10
+
11
+ # Connect BytePlus Ark CLI Skills
12
+
13
+ Before using this Skill, read
14
+ [`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md) for common safety and
15
+ product-isolation rules.
16
+
17
+ `arkcli +connect` copies the Skills available to the current BytePlus build into
18
+ supported local AI agent directories. Internal builds may embed Skills. Public
19
+ npm builds download their reviewed English Skills from the package manifest,
20
+ with CDN as primary and GitHub Release as fallback. Installation is local and
21
+ does not require BytePlus authentication.
22
+
23
+ ## When To Trigger
24
+
25
+ - Install BytePlus Ark CLI Skills into detected local AI agents.
26
+ - Install them into a project-level or custom Skills directory.
27
+ - List supported agents and local detection status.
28
+ - Preview or remove installed Ark CLI Skills.
29
+ - Explain why package installation automatically connected Skills.
30
+ - Explain `--refresh` or `--keep-conflicting`.
31
+
32
+ ## When NOT To Trigger
33
+
34
+ - `401`, login, token, or permission failures: use
35
+ [`../arkcli-auth/SKILL.md`](../arkcli-auth/SKILL.md).
36
+ - Profile, Region, project, base URL, or API key selection: use
37
+ [`../arkcli-config/SKILL.md`](../arkcli-config/SKILL.md) or
38
+ [`../arkcli-profile/SKILL.md`](../arkcli-profile/SKILL.md).
39
+ - Model invocation or code generation: use the owning business Skill.
40
+ - Agent runtime, model-provider, or MCP configuration: `+connect` installs
41
+ Skills only and does not configure those systems.
42
+
43
+ ## Command surface
44
+
45
+ | Command | Behavior |
46
+ |---|---|
47
+ | `arkcli +connect list` | List supported agents, paths, and detection status; read-only |
48
+ | `arkcli +connect` | Install into all detected agent Skill directories |
49
+ | `arkcli +connect --path <skills-dir>` | Install only into one explicit Skills directory |
50
+ | `arkcli +connect uninstall` | Remove unchanged Skills recorded in the ArkCLI ownership manifest from all detected agents |
51
+ | `arkcli +connect uninstall --path <skills-dir>` | Remove unchanged managed Skills only from one explicit directory |
52
+ | `arkcli +connect uninstall --purge-prefix` | Destructively remove every `ark-` or `arkcli-` directory or symlink from detected targets |
53
+ | `arkcli +connect uninstall --path <skills-dir> --purge-prefix` | Apply destructive prefix cleanup only to one explicit directory |
54
+
55
+ Installation is the default action. The only subcommands are `list` and
56
+ `uninstall`. Do not invent `install`, `setup`, `sync`, or `remove`
57
+ subcommands. `--path` is a flag, not a subcommand.
58
+
59
+ ## Agent execution order
60
+
61
+ 1. If the user only asks what is supported, run `arkcli +connect list` and
62
+ stop.
63
+ 2. `+connect` does not support `--dry-run`; inspect targets with `list`.
64
+ 3. Explain that installation makes the current catalog authoritative, while
65
+ normal uninstall removes only unchanged ownership-manifest entries.
66
+ 4. Require an additional explicit confirmation before any `--purge-prefix`
67
+ command because it includes user-managed entries.
68
+ 5. Run the exact confirmed command.
69
+ 6. Report installed, purged, skipped, or removed counts and paths.
70
+
71
+ ## Managed ownership contract
72
+
73
+ Each target contains `.arkcli-managed-skills.json`, which records the exact
74
+ Skill names, product, and tree digests written by ArkCLI.
75
+
76
+ Normal installation:
77
+
78
+ - overwrites every exact current-catalog name, regardless of previous owner,
79
+ digest, product, or local edits;
80
+ - removes every previously manifest-owned name that is absent from the current
81
+ catalog, even when its bytes changed;
82
+ - preserves every different name that is neither in the current catalog nor
83
+ in the previous manifest;
84
+ - stages, backs up, installs, and updates the manifest as one rollback-safe
85
+ transaction.
86
+
87
+ The manifest digests remain provenance and protect normal uninstall. They no
88
+ longer block installation. Local customization under an official catalog name
89
+ is intentionally ephemeral; use a different Skill name to preserve it.
90
+
91
+ The historical `arkcli-managed-agent` alias is retired through this general
92
+ rule when an old manifest owns it, while the canonical `arkcli-agent` is
93
+ installed from the current catalog. There is no BytePlus-only install bypass.
94
+
95
+ Use `uninstall --purge-prefix` only for an explicitly confirmed legacy cleanup.
96
+ That mode restores the old broad prefix deletion and can remove user content.
97
+
98
+ ## `--path` isolation
99
+
100
+ ```bash
101
+ arkcli +connect --path .claude/skills
102
+ ```
103
+
104
+ - The value is the exact Skills directory, not a project root.
105
+ - Relative paths resolve from the current working directory.
106
+ - Absolute paths are used unchanged.
107
+ - Only that directory is created and its current catalog plus previous
108
+ manifest are converged.
109
+ - Other different-name entries remain untouched.
110
+ - The command does not scan global agents, clean legacy private agent
111
+ directories, or remove external conflicting Skills outside the target.
112
+
113
+ ## Detected-agent installation
114
+
115
+ Default installation:
116
+
117
+ - detects supported agents from local filesystem paths;
118
+ - deduplicates agents that share one Skills directory;
119
+ - prefers an agent-specific detection home, such as Codex or Pi, when choosing
120
+ the representative name for a shared target;
121
+ - installs each unique target path once;
122
+ - cleans legacy private Ark CLI copies that would otherwise create duplicate
123
+ Skill names;
124
+ - may remove specifically recognized external generation Skills that conflict
125
+ with Ark CLI routing.
126
+
127
+ Use `arkcli +connect --keep-conflicting` only when the user explicitly wants to
128
+ preserve those recognized external Skills. This flag applies to detected-agent
129
+ installation; isolated `--path` installation does not remove them.
130
+
131
+ Do not hardcode the supported-agent list in an answer. Use:
132
+
133
+ ```bash
134
+ arkcli +connect list
135
+ ```
136
+
137
+ ## BytePlus `--refresh`
138
+
139
+ Delivery mode depends on the build:
140
+
141
+ - public npm BytePlus: refresh the package-local Skill tree from CDN primary,
142
+ then GitHub Release fallback when configured;
143
+ - internal BytePlus: report embedded mode and continue with the embedded tree.
144
+
145
+ Do not guess. Report the source printed by the CLI, such as `cdn`, `github`, or
146
+ `embedded`, and never claim a successful download for an embedded build.
147
+
148
+ ## Uninstall guard
149
+
150
+ Normal `uninstall` removes only manifest-owned, digest-unchanged Skills. It
151
+ preserves unowned and user-modified entries. `--purge-prefix` is the separate
152
+ destructive compatibility path.
153
+
154
+ Always:
155
+
156
+ 1. run `arkcli +connect list` for global scope or resolve the exact `--path`;
157
+ 2. inspect the exact target with `list`;
158
+ 3. show the affected paths and whether managed-only or prefix purge applies;
159
+ 4. obtain explicit confirmation for prefix purge;
160
+ 5. execute the exact confirmed command.
161
+
162
+ ## Automatic package setup
163
+
164
+ The package post-install script can run `+connect` automatically when it has
165
+ an interactive controlling terminal. It silently skips CI, non-interactive
166
+ sessions, unsupported platforms, or missing binaries. Set
167
+ `ARKCLI_SKIP_POSTINSTALL=1` before package installation to disable automatic
168
+ connection.
169
+
170
+ Automatic post-install always uses the same authoritative-catalog transaction
171
+ and never enables `--purge-prefix`. It is non-blocking for package installation.
172
+ On success, its compact summary reports the unique target count and the
173
+ representative agent names without per-target path progress. A filesystem or
174
+ connection failure does not imply a BytePlus authentication failure.
175
+
176
+ ## Guard Checklist
177
+
178
+ - Use `list` for read-only discovery.
179
+ - Never generate `--dry-run` for this domain; use `list` and explicit confirmation.
180
+ - Overwrite every exact official catalog name during install; preserve only
181
+ unrelated different-name entries.
182
+ - Preserve modified manifest-owned entries during normal uninstall.
183
+ - Treat `--purge-prefix` as an explicit destructive compatibility operation.
184
+ - Confirm global versus explicit `--path` scope.
185
+ - Never translate `--path` into an agent selector.
186
+ - Do not invent subcommands.
187
+ - Do not require login.
188
+ - Distinguish public remote refresh from internal embedded mode using actual CLI output.
189
+ - Do not use `+connect` to diagnose a business-command `401`.
190
+
191
+ ## References
192
+
193
+ - [`references/arkcli-connect.md`](references/arkcli-connect.md) - detailed
194
+ paths, cleanup, post-install, and error behavior
195
+ - [`references/evals.md`](references/evals.md) - routing, preview, uninstall,
196
+ and anti-hallucination evaluations
@@ -0,0 +1,165 @@
1
+ # `+connect` detailed reference
2
+
3
+ Read [`../SKILL.md`](../SKILL.md) first.
4
+
5
+ ## Exact command grammar
6
+
7
+ ```text
8
+ arkcli +connect [flags]
9
+ arkcli +connect list
10
+ arkcli +connect uninstall [flags]
11
+ ```
12
+
13
+ Valid parent flags:
14
+
15
+ - `--path <skills-dir>`
16
+ - `--refresh`
17
+ - `--keep-conflicting`
18
+
19
+ Valid uninstall flags:
20
+
21
+ - `--path <skills-dir>`
22
+ - `--purge-prefix`
23
+
24
+ There is no `install`, `setup`, `sync`, or `remove` subcommand.
25
+
26
+ ## Default installation
27
+
28
+ ```bash
29
+ arkcli +connect
30
+ ```
31
+
32
+ The default workflow:
33
+
34
+ 1. detects supported agents from local directories;
35
+ 2. maps each detected agent to its Skills directory;
36
+ 3. deduplicates shared directory paths;
37
+ 4. prefers an agent-specific detection home, such as Codex or Pi, when choosing
38
+ the representative name for a shared target;
39
+ 5. reads the Ark CLI ownership manifest and stages the complete current catalog;
40
+ 6. removes recognized routing conflicts unless `--keep-conflicting` is set;
41
+ 7. atomically overwrites every current-catalog name and retires names that left
42
+ the catalog;
43
+ 8. cleans duplicate legacy private copies where required;
44
+ 9. reports the result for each unique target path.
45
+
46
+ Detection and installation paths may differ for agents that consume a shared
47
+ Skills directory. Always use `arkcli +connect list` instead of assuming a
48
+ path.
49
+
50
+ ## Explicit directory mode
51
+
52
+ ```bash
53
+ cd /path/to/project
54
+ arkcli +connect --path .claude/skills
55
+ ```
56
+
57
+ The result is similar to:
58
+
59
+ ```text
60
+ /path/to/project/.claude/skills/arkcli-auth/SKILL.md
61
+ /path/to/project/.claude/skills/arkcli-chat/SKILL.md
62
+ /path/to/project/.claude/skills/arkcli-shared/SKILL.md
63
+ /path/to/project/.claude/skills/.arkcli-managed-skills.json
64
+ ```
65
+
66
+ Explicit directory mode:
67
+
68
+ - resolves a relative value from the current working directory;
69
+ - accepts an absolute value unchanged;
70
+ - creates the target directory when installing;
71
+ - overwrites every exact current-catalog name inside that directory;
72
+ - retires previous manifest names that left the catalog;
73
+ - preserves unrelated different-name `ark-` and `arkcli-` directories;
74
+ - does not scan global agents;
75
+ - does not clean legacy private directories;
76
+ - does not remove external conflicts outside the directory;
77
+ - does not change agent runtime or MCP configuration.
78
+
79
+ An empty `--path` is rejected and must never fall back to global installation
80
+ or uninstallation.
81
+
82
+ ## Ownership and cleanup details
83
+
84
+ Each target contains `.arkcli-managed-skills.json`. The manifest records the
85
+ exact managed Skill names and their full-tree SHA-256 digests.
86
+
87
+ Install and uninstall intentionally use different digest policies:
88
+
89
+ - install treats the current CLI catalog as authoritative and overwrites every
90
+ exact current-catalog name, regardless of ownership or local changes;
91
+ - install retires every previous manifest name absent from the current catalog,
92
+ regardless of local changes;
93
+ - install preserves a different name that is in neither the current catalog nor
94
+ the previous manifest, even when it begins with `ark-` or `arkcli-`;
95
+ - install stages the full incoming tree before moving current paths to backup;
96
+ any failure rolls the whole catalog and manifest back;
97
+ - normal uninstall still requires the current digest to match the recorded
98
+ digest and preserves modified managed entries.
99
+
100
+ `arkcli-managed-agent` to `arkcli-agent` follows the same catalog transaction:
101
+ an old manifest-owned alias leaves the catalog and is retired, while the
102
+ canonical current name is overwritten with the selected bundle. The outcome
103
+ does not depend on the old manifest product or digest.
104
+
105
+ For intentional legacy cleanup, use:
106
+
107
+ ```bash
108
+ arkcli +connect uninstall --purge-prefix
109
+ arkcli +connect uninstall --path /exact/skills/dir --purge-prefix
110
+ ```
111
+
112
+ `--purge-prefix` is destructive: it removes every directory or symlink whose
113
+ name begins with `ark-` or `arkcli-`, including user-managed entries. The flag
114
+ is the explicit opt-in to that broad cleanup. Symlinks are unlinked without
115
+ following and deleting their source target.
116
+
117
+ ## Safety boundary
118
+
119
+ The entire `+connect` domain rejects `--dry-run`. Use `+connect list` to
120
+ inspect detected targets. Restate the exact path and broad cleanup impact
121
+ before any `uninstall --purge-prefix` command.
122
+
123
+ ## BytePlus refresh behavior
124
+
125
+ Public BytePlus npm packages use the reviewed English Skill manifest published
126
+ with the release. `arkcli +connect --refresh` prefers the BytePlus CDN bundle
127
+ and falls back to the BytePlus GitHub release bundle. Internal BytePlus builds
128
+ may use the English bundle embedded in the current binary.
129
+
130
+ The CLI output is authoritative: report the actual selected source as `cdn`,
131
+ `github`, or `embedded`. Do not claim a remote refresh when the CLI reports
132
+ `embedded`.
133
+
134
+ ## Post-install behavior
135
+
136
+ The package post-install script:
137
+
138
+ 1. skips when `ARKCLI_SKIP_POSTINSTALL=1` or a CI environment is detected;
139
+ 2. validates the platform binary;
140
+ 3. attempts to open an interactive controlling terminal;
141
+ 4. runs the binary with `+connect` when that terminal is available;
142
+ 5. reports the unique target count and representative agent names in the
143
+ compact success line without per-target path progress;
144
+ 6. treats connection failure as non-blocking for package installation.
145
+
146
+ Piped and other non-interactive installations skip automatically. The
147
+ post-install path uses the same authoritative-catalog transaction and never
148
+ opts into `--purge-prefix`.
149
+
150
+ ## Common messages and errors
151
+
152
+ | Message or error | Meaning | Recovery |
153
+ |---|---|---|
154
+ | `No AI agents detected` | No supported local agent directory was found | Install an agent or use an explicit `--path` |
155
+ | `No skills found locally` | No valid local or refreshed Skill bundle is available | Install a complete package or retry refresh when the configured source is available |
156
+ | `managed skill was modified` during uninstall | A previously managed Skill no longer matches its recorded digest | Normal uninstall preserves it; use a separately confirmed `--purge-prefix` only when broad deletion is intended |
157
+ | `--path must not be empty` | An explicit path flag had no value | Supply the exact Skills directory |
158
+ | `permission denied` | The target directory is not writable | Fix permissions or choose an authorized directory |
159
+ | `copy ...: not a directory` | A regular file blocks a Skill directory name | Move the blocking file, then retry |
160
+
161
+ Do not route these local filesystem failures to BytePlus authentication.
162
+
163
+ `arkcli-managed-agent` is not a current installable Skill name. If an old
164
+ manifest owns it, the next install retires it under the general catalog rule.
165
+ Current BytePlus embedded, CDN, and GitHub bundles publish only `arkcli-agent`.