@kvell007/embed-labs-cli 0.1.0-alpha.97 → 0.1.0-alpha.99

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/README.md CHANGED
@@ -1,40 +1,42 @@
1
- # @embed-labs/cli
1
+ # EmbedLabs CLI
2
2
 
3
- Command-line interface for Embed Labs Cloud.
3
+ Command-line interface for the EmbedLabs local-first embedded Native Agent.
4
4
 
5
5
  ## Package Status
6
6
 
7
- The experimental personal-scope CLI is published for integration testing as
8
- `@kvell007/embed-labs-cli`. The long-term `@embed-labs/cli` release is still
9
- pending organization scope ownership, license, support URLs, and release policy.
10
- The workspace manifest intentionally remains marked `private: true`; release
11
- scripts stage temporary public packages without changing the source package
12
- names.
7
+ The public user-facing npm package is `embedlabs` and exposes the `embedlabs`
8
+ binary. The internal workspace package is still named `@embed-labs/cli` for
9
+ local monorepo builds and staged release scripts; do not document it as the
10
+ normal public install package.
13
11
 
14
12
  ## What It Provides
15
13
 
16
14
  - `embedlabs` binary exposed by the npm `bin` entry after install.
17
- - `embed` remains exposed as a compatibility alias while existing scripts,
18
- plugin bridges, and docs finish migrating.
19
- - First-run diagnostic command for CLI runtime, auth, Local Bridge, local scans,
20
- and Cloud API readiness.
21
- - Local bridge startup and status commands.
22
- - Auth token login, logout, and status commands.
23
- - Account registration, API key issue/list, token usage metering, and billing
24
- statement preview commands.
25
- - Board knowledge/method discovery through Cloud API, plus local-first
26
- toolchain installation, validation, compile, and hardware handoff.
15
+ - `embedlabs` is the documented user entrypoint. The shorter `embed` binary is
16
+ not part of the current public package surface and must not be used in new
17
+ public examples.
18
+ - First-run diagnostic command for CLI runtime, local model config, Agent
19
+ installation identity, Local Bridge, local scans, and optional public-report
20
+ readiness.
21
+ - Local model/provider configuration and local Agent chat/run/status/memory
22
+ commands.
23
+ - Local bridge status and advanced diagnostic startup commands. Normal hardware
24
+ workflows should enter through Agent actions; the Agent may start or reach the
25
+ bridge as needed.
26
+ - Local installation identity and redacted public-experience report commands.
27
+ These do not require an EmbedLabs platform API key for local Agent use.
28
+ - Board knowledge/method discovery through BoardPack/registry metadata, plus
29
+ local-first toolchain installation, validation, compile, and hardware
30
+ handoff.
27
31
  - Debug tool, device, serial, SSH, and flash commands routed through the local
28
32
  bridge.
29
- - Project, task, artifact, and cloud status commands routed through the cloud
30
- API.
31
- - Approval request, list, show, approve, and reject commands routed through the
32
- cloud API.
33
+ - BoardPack/download manifest, plugin release, redacted report, and cloud
34
+ status commands routed through the cloud API when needed.
33
35
  - Human-readable output by default and `--json` output for automation.
34
36
 
35
- The installed binary is the primary interface. Package and library APIs are
36
- secondary implementation details for now; do not treat `@embed-labs/cli` as a
37
- public SDK until a versioned API contract is approved.
37
+ The installed `embedlabs` binary is the primary interface. Package and library
38
+ APIs are secondary implementation details for now; do not treat the internal
39
+ workspace package as a public SDK until a versioned API contract is approved.
38
40
 
39
41
  ## Install
40
42
 
@@ -44,11 +46,32 @@ Current experimental npm install:
44
46
  npm install -g embedlabs@latest
45
47
  embedlabs --help
46
48
  embedlabs help getting-started
47
- embedlabs local toolchain list
49
+ embedlabs config set model <provider>/<model> && embedlabs config set <PROVIDER>_API_KEY <key>
50
+ embedlabs config set providers.<provider>.base_url <openai-compatible-base-url>
51
+ embedlabs config set profiles.spark.model <provider>/<model>
52
+ embedlabs config set profiles.spark.base_url <openai-compatible-base-url>
53
+ embedlabs config set profile spark
54
+ embedlabs agent init
55
+ embedlabs agent status
56
+ embedlabs agent action run install_toolchain --operation list --json
48
57
  embedlabs plugin update check
49
58
  embedlabs plugin update
50
59
  ```
51
60
 
61
+ Install or reinstall the IDE compatibility plugins through the CLI:
62
+
63
+ ```bash
64
+ embedlabs plugin install codex
65
+ embedlabs plugin install opencode
66
+ embedlabs plugin install trae
67
+ embedlabs plugin install all --force
68
+ ```
69
+
70
+ These Codex, OpenCode, and Trae installers are retained IDE compatibility
71
+ entrypoints into the local Native Agent. Removing old platform auth, billing,
72
+ quota, or server-workspace flows must not remove these plugin install/update
73
+ commands.
74
+
52
75
  Clean reinstall:
53
76
 
54
77
  ```bash
@@ -57,23 +80,22 @@ npm install -g embedlabs@latest
57
80
  embedlabs plugin install all --force
58
81
  ```
59
82
 
60
- Trae users can install only the Trae MCP integration:
83
+ Trae users can install only the Trae integration:
61
84
 
62
85
  ```bash
63
- embedlabs auth login --token <your_token>
64
86
  embedlabs plugin install trae
65
87
  ```
66
88
 
67
- The Trae installer writes Trae's `mcp.json`, configures
68
- `embedlabs mcp start`, copies the Embed Labs icon, and creates the local
69
- Gallery metadata Trae uses for MCP icons. Restart Trae after installation.
89
+ The Trae installer writes Trae's technical `mcp.json`, configures the local
90
+ compatibility transport, copies the EmbedLabs icon, and creates the local
91
+ Gallery metadata Trae uses for plugin icons. Restart Trae after installation.
70
92
 
71
- For IDEs that support MCP but do not have an automatic installer yet, generate
72
- the correct manual MCP config:
93
+ Maintainers can still generate MCP config snippets for diagnostics or new
94
+ adapter development, but this is not the normal user install path and must not
95
+ replace the retained Codex/OpenCode/Trae installers:
73
96
 
74
97
  ```bash
75
98
  embedlabs mcp config
76
- embedlabs mcp config --client cursor
77
99
  embedlabs mcp config --client trae
78
100
  ```
79
101
 
@@ -84,14 +106,6 @@ aliases once with:
84
106
  npm uninstall -g embedlabs-cli embedboard embedboard-cli
85
107
  ```
86
108
 
87
- Future organization-scope install after final release approval:
88
-
89
- ```bash
90
- npm install -g @embed-labs/cli
91
- embedlabs --help
92
- embedlabs help getting-started
93
- ```
94
-
95
109
  Local package testing before public npm publish:
96
110
 
97
111
  ```bash
@@ -115,76 +129,82 @@ node packages/cli/dist/index.js help getting-started
115
129
  embedlabs --help
116
130
  embedlabs help getting-started
117
131
  embedlabs doctor
118
- embedlabs auth login --token <token>
132
+ embedlabs config set model <provider>/<model> && embedlabs config set <PROVIDER>_API_KEY <key>
133
+ embedlabs agent init
134
+ embedlabs agent status
119
135
  ```
120
136
 
121
- If a cloud or plugin command reaches a protected API before a token is
122
- configured, the CLI returns `auth_token_missing` with the registration URL and
123
- these setup options:
137
+ Local Agent, Local Bridge, BoardPack, SDK install, compile, flash, deploy, and
138
+ debug workflows do not require an EmbedLabs platform API key. Model provider
139
+ keys are configured locally and must not be uploaded to EmbedLabs servers.
124
140
 
125
- ```bash
126
- open https://api.embedboard.com/dashboard
127
- embedlabs auth login --token <your_token>
128
- # or for automation:
129
- export EMBED_API_TOKEN=<your_token>
130
- embedlabs auth status
131
- ```
141
+ If optional public-experience reporting is unavailable, the CLI should keep
142
+ local Agent, Local Bridge, SDK, compile, flash, deploy, and debug workflows
143
+ running and report the upload limitation separately. Public reports must be
144
+ redacted and associated with the local installation identity rather than
145
+ requiring a platform API key for normal local use.
132
146
 
133
- If `.embed-labs/auth.json` was copied from another computer, protected Cloud
134
- requests fail before network I/O with `tool_integrity_check_failed` and the
135
- message `工具完整性校验失败,请在当前电脑重新执行 embedlabs auth login --token <key>`.
147
+ If an old or copied local identity file comes from another computer,
148
+ identity-sensitive sync commands must fail before network I/O with
149
+ `tool_integrity_check_failed` and tell the user to reinitialize EmbedLabs on the
150
+ current computer. Legacy platform auth-token files are not accepted as a
151
+ compatibility path.
136
152
 
137
153
  For the current public API plus local TaishanPi verification path, see
138
154
  `docs/runbooks/PUBLIC_CLI_USER_VERIFICATION.md`.
139
155
 
140
- For board knowledge and local toolchain work:
156
+ For board knowledge, SDK/toolchain, build, flash, deploy, and capture work,
157
+ use the Native Agent first:
141
158
 
142
159
  ```bash
143
- embed board registry list
144
- embed board methods taishanpi-1m-rk3566
145
- embed board knowledge search taishanpi-1m-rk3566 --query "UART pinout"
146
- embed local toolchain list
147
- embed local toolchain latest --board taishanpi-1m-rk3566
148
- embed local toolchain validate --board taishanpi-1m-rk3566 --mode minimal
149
- embed local compile taishanpi --source ./main.c --output ./.embed-labs/build/main
160
+ embedlabs agent run --prompt "当前支持哪些开发板"
161
+ embedlabs agent run --prompt "泰山派的 UART 引脚是什么"
162
+ embedlabs agent action run manage_board_pack --operation list --json
163
+ embedlabs agent action run manage_board_pack --operation show --template-id taishanpi-1m-rk3566 --json
164
+ embedlabs agent action run install_toolchain --operation list --json
165
+ embedlabs agent action run install_toolchain --operation install --board-id taishanpi-1m-rk3566 --mode compile --json
166
+ embedlabs agent action run build_project --board-id taishanpi-1m-rk3566 --source ./main.c --json
167
+ embedlabs agent action run flash_image --board-id <board_id> --artifact <image_or_uf2> --approve --json
168
+ embedlabs agent action run deploy_app --board-id taishanpi-1m-rk3566 --artifact <local_file> --remote-dir /userdata/embed-labs/apps --approve --json
169
+ embedlabs agent action run capture_signal --board-id pico2w-rp2350-monitor --device <local_device_id> --approve --json
150
170
  ```
151
171
 
152
172
  Server-side user workspaces and server Docker builds are disabled in the
153
- local-first product mode. The server remains responsible for accounts, API
154
- keys, model routing, billing, plugin releases, SDK/download metadata, and small
155
- image/DTB/logo package generation.
173
+ local-first product mode. The server remains responsible for software downloads,
174
+ version manifests, SDK/BoardPack/tool/plugin package metadata, public knowledge,
175
+ redacted public-experience report intake, admin/owner review, Maintainer task
176
+ handoff, and release evidence.
156
177
 
157
- For local hardware access:
178
+ For local hardware access, the Agent reads GoLocalBridge inventory through
179
+ high-level actions and returns board-level status:
158
180
 
159
181
  ```bash
160
- embed bridge start
161
- embed device list
162
- embed tool call wifi.scan --input-json '{"host":"198.19.77.2","user":"root"}'
163
- embed tool call rp2350.monitor.capabilities --json
164
- embed tool call rp2350.monitor.gpio.read --input-json '{"pins":[16,17],"pull":"none"}' --approve
165
- embed tool call rp2350.monitor.spi.transfer --input-json '{"hex":"a55a3cc3"}' --approve
166
- embed tool call rp2350.monitor.uart.write --input-json '{"baud":115200,"text":"hello","line_ending":"lf"}' --approve
167
- embed tool call rp2350.monitor.i2c.transfer --input-json '{"address":"0x50","write":"00","read_len":4}' --approve
168
- embed tool call rp2350.monitor.wifi.manage --input-json '{"action":"scan"}' --approve
169
- embed tool call rp2350.monitor.probe.debug --input-json '{"action":"status"}' --approve
170
- embed tool call chip.temperature --input-json '{"host":"198.19.77.2","user":"root"}'
171
- embed flash plan --board <rp2350|taishanpi> --artifact ./artifact.bin
182
+ embedlabs agent run --prompt "查看当前开发板状态"
183
+ embedlabs agent action run detect_board --json
172
184
  ```
173
185
 
186
+ Low-level BoardPack catalog, local toolchain, bridge, task, and Cloud API commands
187
+ exist for owner diagnostics, smoke tests, and compatibility adapters. They are
188
+ not the normal user workflow and should not be the first examples shown to
189
+ users or IDE agents.
190
+
174
191
  For local Cloud API development, override the production default:
175
192
 
176
193
  ```bash
177
- EMBED_CLOUD_API_URL=http://127.0.0.1:18100 embed cloud status
194
+ EMBED_CLOUD_API_URL=http://127.0.0.1:18100 embedlabs cloud status
178
195
  ```
179
196
 
180
197
  ## Interaction Modes
181
198
 
182
- - Human terminal: run `embed` directly and read the default output.
183
- - Local scripts and CI: run `embed ... --json` and parse the response envelope.
184
- - Localhost tools: start `embed bridge start` and call the Local Bridge HTTP API
185
- only from trusted same-host tools.
186
- - Remote AI: use Cloud API tasks, events, artifacts, and evidence instead of
187
- direct local bridge or unrestricted hardware access.
199
+ - Human terminal: run `embedlabs` directly and read the default output.
200
+ - Local scripts and CI: run `embedlabs ... --json` and parse the response
201
+ envelope.
202
+ - Localhost tools: use `embedlabs agent action run ...` for hardware-facing
203
+ work. Direct Local Bridge HTTP calls and manual bridge startup are reserved
204
+ for trusted same-host diagnostics and compatibility adapter development.
205
+ - Remote/service-side analysis: consume redacted public-experience reports,
206
+ owner-reviewed Maintainer tasks, and release evidence. It must not create
207
+ normal-user Cloud tasks or call Local Bridge on the user's behalf.
188
208
  - Future IDE and Warp flows: wrap the same CLI, Local Bridge, and Cloud API
189
209
  boundaries rather than depending on internal package APIs.
190
210
 
@@ -194,138 +214,72 @@ remain local and approval-gated.
194
214
 
195
215
  ## Common Commands
196
216
 
197
- `embed --help` is intentionally a short first-run guide. Use
198
- `embed help getting-started` for the guided workflow or `embed help commands`
217
+ `embedlabs --help` is intentionally a short first-run guide. Use
218
+ `embedlabs help getting-started` for the guided workflow or `embedlabs help commands`
199
219
  for the full command reference.
200
220
 
201
221
  ```bash
202
- embed doctor [--json]
203
-
204
- embed auth login --token <token> [--profile default]
205
- embed auth status
206
- embed auth logout
207
-
208
- embed account create --email <email> [--display-name <name>] [--json]
209
- embed account show <account_id> [--json]
210
- embed account keys create --account <account_id> [--name <name>] [--json]
211
- embed account keys list --account <account_id> [--json]
212
- embed account keys revoke <api_key_id> [--json]
213
-
214
- embed usage record --api-key <key>|--api-key-id <api_key_id> --model <model> --input-tokens <n> --output-tokens <n> [--provider <name>] [--operation <name>] [--task <task_id>] [--request-id <id>] [--json]
215
- embed usage summary --account <account_id>|--api-key-id <api_key_id> [--from <iso>] [--to <iso>] [--json]
216
- embed usage events --account <account_id> [--api-key-id <api_key_id>] [--from <iso>] [--to <iso>] [--limit 100] [--json]
217
- embed billing statement --account <account_id> [--from <iso>] [--to <iso>] [--json]
218
- embed billing balance --account <account_id> [--json]
219
- embed billing recharge create --account <account_id> --amount-usd <amount> [--provider mock|stripe|onchain] [--chain <chain>] [--token <symbol>] [--qr] [--json]
220
- embed billing recharge submit-tx <recharge_session_id> --tx-hash <hash> [--json]
221
- embed billing recharge list --account <account_id> [--json]
222
- embed billing recharge show <recharge_session_id> [--json]
223
- embed billing snapshot create --account <account_id> [--from <iso>] [--to <iso>] [--json]
224
- embed billing snapshot list --account <account_id> [--json]
225
- embed billing snapshot show <billing_snapshot_id> [--json]
226
-
227
- embed board registry list [--json]
228
- embed board methods <template_id> [--json]
229
- embed board knowledge <template_id> [--json]
230
- embed board knowledge search <template_id> --query <text> [--json]
231
- embed build template list [--json]
232
- embed build template show <template_id> [--json]
233
- embed local toolchain list [--board <board_id>] [--json]
234
- embed local toolchain installed [--board <board_id>] [--json]
235
- embed local toolchain latest [--board <board_id>] [--json]
236
- embed local toolchain current [--json]
237
- embed local toolchain install [--board <board_id>] [--mode minimal|runtime|compile|qt|firmware|full|images] [--json]
238
- embed local toolchain validate [--board <board_id>] [--mode minimal|runtime|compile|qt|firmware|full|images] [--json]
239
- embed local compile taishanpi --source <main.c|main.cpp> --output <artifact> [--json]
240
- embed local build qt-smoke --build-dir <build_dir> [--source <qt-cmake-dir>] [--target-name <executable>] [--json]
222
+ embedlabs doctor [--json]
223
+
224
+ embedlabs config set model <provider>/<model> && embedlabs config set <PROVIDER>_API_KEY <key>
225
+ embedlabs config set providers.<provider>.base_url <openai-compatible-base-url>
226
+ embedlabs config set profiles.<profile>.model <provider>/<model>
227
+ embedlabs config set profiles.<profile>.base_url <openai-compatible-base-url>
228
+ embedlabs config set profile <profile>
229
+ embedlabs config show [--json]
230
+ embedlabs agent init [--json]
231
+ embedlabs agent status [--json]
232
+ embedlabs agent run --prompt <request> [--json]
233
+ embedlabs agent chat --prompt <request> [--json]
234
+ embedlabs agent memory [show|search|export|clear|refine] [--json]
235
+ embedlabs agent report [list|submit] [--limit <n>] [--offset <n>] [--all] [--status pending|uploaded|failed] [--category <category>] [--severity low|medium|high|critical] [--component <component>] [--board <board_id>] [--variant <variant_id>] [--action <action_id>] [--capability <capability_id>] [--error-code <code>] [--json]
236
+ embedlabs agent sync [--limit <n>] [--timeout-ms <ms>] [--json]
237
+
238
+ embedlabs agent action list [--json]
239
+ embedlabs agent action describe detect_board [--json]
240
+ embedlabs agent action run detect_board [--json]
241
+ embedlabs agent action run query_board_knowledge --board-id <board_id> --query <text> [--json]
242
+ embedlabs agent action run install_toolchain --operation install --board-id <board_id> [--json]
243
+ embedlabs agent action run build_project --board-id taishanpi-1m-rk3566 --source <main.c|main.cpp> [--json]
244
+ embedlabs agent action run flash_image --board-id <board_id> --artifact <image_or_uf2> --approve [--json]
245
+ embedlabs agent action run deploy_app --board-id taishanpi-1m-rk3566 --artifact <local_file> --remote-dir /userdata/embed-labs/apps --approve [--json]
246
+ embedlabs agent action run debug_board --board-id <board_id> --device <local_device_id> [--json]
247
+ embedlabs agent action run capture_signal --board-id pico2w-rp2350-monitor --device <local_device_id> --approve [--json]
248
+ ```
249
+
250
+ Advanced diagnostics and compatibility commands are available for maintainers:
251
+
252
+ ```bash
253
+ embedlabs board pack list [--json]
254
+ embedlabs board methods <template_id> [--json]
255
+ embedlabs board knowledge search <template_id> --query <text> [--json]
256
+ embedlabs local toolchain list [--board <board_id>] [--json]
257
+ embedlabs local toolchain validate [--board <board_id>] [--mode minimal|runtime|compile|qt|firmware|full|images] [--json]
258
+ embedlabs local compile taishanpi --source <main.c|main.cpp> --output <artifact> [--json]
259
+ embedlabs bridge start [--host 127.0.0.1] [--port 18083]
260
+ embedlabs bridge status [--json]
261
+ embedlabs mcp start [--bridge-path <path>]
262
+ embedlabs mcp config [--client generic|trae] [--absolute-command] [--cloud-url <url>] [--json]
263
+ ```
241
264
 
242
265
  The `qt-smoke` subcommand name is kept for compatibility. When `--source` and
243
266
  `--target-name` are supplied, it builds the supplied TaishanPi Qt/CMake
244
267
  application, including official board-pack examples such as
245
268
  `board-packs/taishanpi/examples/modbus-loop-demo/taishanpi`.
246
269
 
247
- embed bridge start [--host 127.0.0.1] [--port 18083]
248
- embed bridge status [--json]
249
-
250
- embed debug tools [--json]
251
-
252
- embed device list [--json]
253
- embed device probe --host <host> --ports 22,15301 [--serial-path <path>] [--timeout-ms 1000] [--json]
254
- embed tool list [--json]
255
- embed tool call wifi.scan --input-json '{"host":"198.19.77.2","user":"root"}' [--json]
256
- embed tool call bluetooth.scan --input-json '{"host":"198.19.77.2","user":"root","duration_seconds":8}' [--json]
257
- embed tool call chip.cpu.frequency --input-json '{"host":"198.19.77.2","user":"root"}' [--json]
258
- embed tool call chip.temperature --input-json '{"host":"198.19.77.2","user":"root"}' [--json]
259
- embed tool call qml.runtime.status --input-json '{"host":"198.19.77.2","user":"root","port":18130}' [--json]
260
- embed tool call qml.runtime.start --input-json '{"host":"198.19.77.2","user":"root","port":18130}' [--json]
261
- embed tool call rp2350.monitor.capabilities [--json]
262
- embed tool call rp2350.monitor.gpio.read --input-json '{"pins":[16,17]}' --approve [--json]
263
- embed tool call rp2350.monitor.spi.transfer --input-json '{"hex":"a55a3cc3"}' --approve [--json]
264
- embed tool call rp2350.monitor.uart.write --input-json '{"baud":115200,"text":"hello","line_ending":"lf"}' --approve [--json]
265
- embed tool call rp2350.monitor.i2c.transfer --input-json '{"address":"0x50","write":"00","read_len":4}' --approve [--json]
266
- embed tool call rp2350.monitor.wifi.manage --input-json '{"action":"scan"}' --approve [--json]
267
- embed tool call rp2350.monitor.probe.debug --input-json '{"action":"status"}' --approve [--json]
268
- embed tool call rp2350.monitor.operation --input-json '{"action":"logic.stop","params":{}}' --approve [--json]
269
-
270
- embed serial list [--json]
271
- embed serial capture --path <port> [--baud 115200] [--duration 5] [--json]
272
- embed ssh run --host <host> [--user root] -- <command> [--json]
273
-
274
- embed flash plan --board <rp2350|taishanpi> [--artifact file.uf2] [--image-dir dir] [--json]
275
- embed flash run --board <rp2350|taishanpi> --approve [--artifact file.uf2] [--image-dir dir] [--json]
276
- embed task list [--json]
277
- embed task status <local_job_id> [--json]
278
-
279
- embed project create <name> [--board <board_id>] [--workspace <path>] [--json]
280
- embed project list [--json]
281
- embed project status <project_id> [--json]
282
-
283
- embed ask --prompt <request> [--project <project_id>] [--board <board_id>] [--json]
284
- embed cloud status [--json]
285
- embed cloud task create [--kind build.firmware] [--progress-text "Task created."] [--json]
286
- embed cloud task list [--json]
287
- embed cloud task status <task_id> [--json]
288
- embed cloud task events <task_id> [--json]
289
- embed cloud task artifacts <task_id> [--json]
290
- embed cloud task evidence <task_id> [--json]
291
- embed cloud task event append <task_id> [--state <state>] [--progress-stage <stage>|--stage <stage>] [--progress-text <text>|--message <text>] [--progress-percent 0-100] [--severity info|warning|error] [--type <event_type>] [--artifact-json '<json>'] [--evidence-json '<json>'] [--json]
292
- embed artifact status <artifact_id> [--json]
293
-
294
- embed approval request --task <task_id> --action <action> --risk <low|medium|high|destructive> --plan-summary <summary> [--affected-device <id>] [--affected-artifact <id>] [--expires-at <iso>] [--json]
295
- embed approval list --task <task_id> [--json]
296
- embed approval show <approval_id> [--json]
297
- embed approval approve <approval_id> [--decided-by <name>] [--json]
298
- embed approval reject <approval_id> [--decided-by <name>] [--json]
299
- ```
270
+ Account, usage, billing, recharge, quota, and platform-token login commands are
271
+ not part of the current EmbedLabs CLI. Native Agent setup uses local model
272
+ configuration plus the local installation identity.
273
+
274
+ Advanced/internal diagnostics exist for owner maintenance and compatibility
275
+ tests, but normal users should go through `embedlabs agent run`, `embedlabs
276
+ agent chat`, or the high-level `embedlabs agent action run ...` surface.
277
+ Hidden diagnostic commands are intentionally omitted from this user reference
278
+ and must not be selected before the high-level Agent action layer.
300
279
 
301
- `embed approval request` creates a task-scoped approval record with the Cloud
302
- API. Repeat `--affected-artifact` to attach multiple artifact IDs. Approval
303
- commands record request and decision state in the Cloud API only. They do not
304
- execute Local Bridge actions; any future local runner must re-check the approval
305
- record before running one bounded localhost action.
306
-
307
- `embed account keys create` returns the raw API key only in the creation
308
- response. Store it in a secret manager or environment variable; future list and
309
- summary commands show metadata, key prefix, and usage totals but never the raw
310
- key. `embed usage record` is the current metering ingestion path used by smoke
311
- tests and future billing reports. Reusing the same `request_id` for the same
312
- API key returns the original usage record so callers can safely retry without
313
- double counting. `embed account keys revoke` marks a key unusable for future
314
- usage ingestion while preserving historical usage and billing evidence.
315
- `embed usage events` lists the account's raw usage records for audit and
316
- settlement investigation without exposing raw API key material. Event reads are
317
- bounded; the server default is 100 and the current maximum is 500.
318
-
319
- `embed billing statement` reads the account's recorded token usage and applies
320
- the Cloud API's configured input/output micro USD per-token rates. It is a
321
- preview for product and settlement validation, not an invoice or payment action.
322
- `embed billing recharge create --provider onchain --qr` creates a wallet payment
323
- session and renders the payment URI as a terminal QR. After paying from a wallet,
324
- `embed billing recharge submit-tx <recharge_session_id> --tx-hash <hash>` sends
325
- the payment evidence to the server for confirmation and crediting.
326
- `embed billing snapshot create` freezes one statement preview result so later
327
- queries can compare against a stable settlement input. Snapshots are still MVP
328
- preview records; they are not invoices and do not collect payment.
280
+ The upstream architecture audit command is owner-maintainer only and requires
281
+ `EMBEDLABS_ENABLE_UPSTREAM_AUDIT=1`; it is not part of normal user onboarding
282
+ or ordinary embedded development workflows.
329
283
 
330
284
  ## Environment
331
285
 
@@ -333,18 +287,22 @@ preview records; they are not invoices and do not collect payment.
333
287
  `http://127.0.0.1:18083`.
334
288
  - `EMBED_CLOUD_API_URL`: cloud API URL used by cloud-backed commands. Default:
335
289
  `https://api.embedboard.com`.
336
- - `EMBED_API_TOKEN`: auth token source for non-interactive sessions.
337
- - `EMBED_AUTH_PROFILE`: profile name used with `EMBED_API_TOKEN`.
338
- - `EMBED_AUTH_FILE`: token file path for `embed auth login`. Default:
339
- `.embed-labs/auth.json`.
340
- - `EMBED_BILLING_INPUT_MICROUSD_PER_TOKEN` and
341
- `EMBED_BILLING_OUTPUT_MICROUSD_PER_TOKEN`: Cloud API server-side statement
342
- preview rates. These are read by the Cloud API process, not by the CLI.
343
-
344
- `embed doctor --json` is safe to run before services are started. Missing Local
345
- Bridge or Cloud API services are reported inside the structured doctor result as
346
- `unreachable` or `not_ready`; the command does not start services or mutate
347
- hardware or Cloud API state.
290
+ - `EMBED_AGENT_HOME`: optional Agent home override. Default:
291
+ `~/.embedlabs/agent`.
292
+ The Agent installation identity is stored below this directory as
293
+ `installation.json`.
294
+ - `EMBEDLABS_ENABLE_UPSTREAM_AUDIT`: owner-maintainer source-checkout gate for
295
+ upstream architecture audits. Leave unset for normal user flows.
296
+
297
+ `embedlabs doctor --json` is safe to run before services are started. It checks
298
+ Node.js, the local installation identity, Local Bridge, and optional Cloud API
299
+ health. Missing or copied installation identity is reported as a local readiness
300
+ problem with `embedlabs agent identity init --reset` as the repair command.
301
+ Missing Local Bridge is also reported as a local readiness problem because
302
+ hardware actions use the bridge. Missing Cloud API is reported as a warning only:
303
+ local Agent workflows can still run, while downloads, update checks, and public
304
+ report upload may be unavailable. The command does not start services, create
305
+ platform accounts, mutate hardware, or mutate Cloud API state.
348
306
 
349
307
  ## Hardware Support Boundary
350
308
 
@@ -353,15 +311,15 @@ perform direct hardware access itself.
353
311
 
354
312
  Current local workflows are intentionally guarded:
355
313
 
356
- - Device commands can report local detection and probe evidence.
357
- - `embed debug tools` reports local debug tool availability and version/help
358
- evidence without opening probes or starting debug sessions.
359
- - RP2350 UF2 flashing requires a mounted UF2 volume, a `.uf2` artifact, a ready
360
- flash plan, and explicit `--approve`.
361
- - TaishanPi initialization image flashing resolves the installed local SDK
362
- image set by default. `embed flash run --board taishanpi --approve` writes
363
- through Local Bridge only after the ready plan validates `rkdeveloptool`,
364
- `parameter.txt`, and all required images.
314
+ - Board detection uses the Agent `detect_board` action, which reads the current
315
+ GoLocalBridge inventory and filters it to supported development boards.
316
+ - RP2350 and TaishanPi flashing should go through `embedlabs agent action run
317
+ flash_image ... --approve`; the Agent resolves the board, validates the local
318
+ SDK artifact, asks for explicit approval, and delegates the bounded operation
319
+ to GoLocalBridge.
320
+ - Protocol capture, board debug, and deployment should go through the matching
321
+ Agent actions so BoardPack knowledge, target selection, approval checks, and
322
+ recovery guidance stay in one layer.
365
323
 
366
324
  These commands should be treated as current local evidence and planning tools,
367
325
  not broad hardware support claims.
@@ -369,15 +327,18 @@ not broad hardware support claims.
369
327
  ## Runtime Requirements
370
328
 
371
329
  - Node.js 20 or newer.
372
- - A running local bridge for debug tool, device, serial, SSH, flash, and local task
373
- commands. Start it with `embed bridge start`.
374
- - A running Embed Labs Cloud API for account, usage, billing statement, project,
375
- cloud task, artifact, approval, and ask commands.
330
+ - A reachable local bridge for board detection, protocol capture, deploy,
331
+ flash, and local task commands. High-level Agent actions should reach or
332
+ auto-start the bridge for normal local URLs; manual `embedlabs bridge start`
333
+ is an advanced diagnostic and release-smoke command, not ordinary onboarding.
334
+ - A running EmbedLabs Cloud API only for download metadata, BoardPack/package
335
+ release metadata, plugin/package downloads, redacted public-experience report
336
+ uploads, and admin/owner review.
376
337
 
377
338
  ## Publish Readiness
378
339
 
379
340
  Before public publish, confirm the runbook checklist in
380
341
  `docs/runbooks/CLI_NPM_PACKAGING.md`, including approved SPDX license metadata,
381
342
  repository, issue tracker, homepage, support metadata, changelog or release
382
- notes, final npm scope ownership, executable verification for `embed`, and
343
+ notes, final npm scope ownership, executable verification for `embedlabs`, and
383
344
  removal of `private: true` only in an approved metadata task.