@seeed-studio/sensecraft-cli 0.1.3 → 0.1.4

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/INSTALL.md CHANGED
@@ -318,6 +318,7 @@ npm root -g
318
318
  | 应用广场 | `skills/sensecraft-apps/` | Access Key |
319
319
  | 文件上传 | `skills/sensecraft-files/` | Access Key |
320
320
  | 模型库 | `skills/sensecraft-models/` | Access Key |
321
+ | 经典 reCamera 40 | `skills/sensecraft-recamera/` | Access Key |
321
322
  | 云设备 | `skills/sensecraft-devices-cloud/` | Access Key |
322
323
 
323
324
  更细的发现说明:[`skills/README.md`](skills/README.md)。
package/README.md CHANGED
@@ -24,6 +24,7 @@ After install, Skill markdown lives under this package's `skills/` directory:
24
24
  | Application Plaza | `skills/sensecraft-apps/` |
25
25
  | File upload | `skills/sensecraft-files/` |
26
26
  | Model library | `skills/sensecraft-models/` |
27
+ | Classic reCamera 40 | `skills/sensecraft-recamera/` |
27
28
  | Cloud devices | `skills/sensecraft-devices-cloud/` |
28
29
 
29
30
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seeed-studio/sensecraft-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "SenseCAP / SenseCraft AI cloud CLI (devices, apps, models, files, cloud deploy)",
5
5
  "license": "MIT",
6
6
  "repository": {
package/skills/README.md CHANGED
@@ -11,6 +11,7 @@ Skills for this repo live under `skills/`.
11
11
  | `skills/sensecraft-apps/` | Access Key | Application Plaza |
12
12
  | `skills/sensecraft-files/` | Access Key | Upload file and obtain `file_url` |
13
13
  | `skills/sensecraft-models/` | Access Key | Model library |
14
+ | `skills/sensecraft-recamera/` | `sensecap` Access Key | Classic reCamera 40 pick / check / open |
14
15
  | `skills/sensecraft-devices-cloud/` | Access Key | Jetson / cloud kit deploy |
15
16
 
16
17
  ## Cursor / Agent setup
@@ -36,6 +36,8 @@ Example (user said 「删这个63760」):
36
36
  将从 Develop 环境删除模型 63760。删除后可能无法恢复。是否确认执行?
37
37
  ```
38
38
 
39
+ Classic reCamera flash is **not** an L2 `--yes` write. After the user picked the app/model (and firmware if several), `recamera open` may run. The user then clicks Deploy in Console (L3). Do not invent `recamera deploy`.
40
+
39
41
  Wait for a **new** user reply: `确认` / `confirm` / `yes`. Only then:
40
42
 
41
43
  ```bash
@@ -2,10 +2,10 @@
2
2
  name: sensecraft-ai
3
3
  description: >-
4
4
  Routes SenseCraft AI platform work for Agents: Application Plaza, model library,
5
- model upload, and cloud deploy vs SenseCAP IoT CLI. Use when the user mentions
6
- SenseCraft AI, 应用广场, App Square, 模型库, 上传模型, aiserverapi, or asks
7
- which SenseCraft skill/CLI profile to use. Does not replace domain skills
8
- (apps/models/files) or sensecraft-data (SenseCAP devices/data).
5
+ model upload, classic reCamera deploy page, and cloud deploy vs SenseCAP IoT CLI.
6
+ Use when the user mentions SenseCraft AI, 应用广场, App Square, 模型库, 上传模型,
7
+ reCamera, aiserverapi, or asks which SenseCraft skill/CLI profile to use.
8
+ Does not replace domain skills (apps/models/files/recamera) or sensecraft-data.
9
9
  ---
10
10
 
11
11
  # SenseCraft AI (Meta)
@@ -17,7 +17,7 @@ Sibling (already shipped): [`../sensecraft-data/SKILL.md`](../sensecraft-data/SK
17
17
  ## Agent rules
18
18
 
19
19
  1. **Pick the auth kind before any cloud call**
20
- - `app` / `model` / `file` / `cloud` use SenseCAP **Access Key** → `{ai-host}/openapi` + HTTP Basic (no access_token, no `/aiserverapi`)
20
+ - `app` / `model` / `file` / `cloud` / `recamera` use SenseCAP **Access Key** → `{ai-host}/openapi` + HTTP Basic (no access_token, no `/aiserverapi`)
21
21
  - Never send Access Key as a fake Bearer/JWT
22
22
  2. **Always run auth check first** (ask user to fix if missing):
23
23
  ```bash
@@ -26,18 +26,18 @@ Sibling (already shipped): [`../sensecraft-data/SKILL.md`](../sensecraft-data/SK
26
26
  Published commands require an active **SenseCAP Access Key** → `{ai-host}/openapi` + HTTP Basic.
27
27
  3. **Never run `auth init` on behalf of the user** — browser OAuth Device Flow, interactive TTY only. Tell the user to run locally:
28
28
  ```bash
29
- sensecraft-cli auth init --kind sensecap # Access Key (app/model/file/cloud)
29
+ sensecraft-cli auth init --kind sensecap # Access Key (app/model/file/cloud/recamera)
30
30
  ```
31
31
  4. **L2 confirmation is a separate chat turn** — follow [`../confirmation.md`](../confirmation.md). 「删这个63760」/「删除应用 demo」is **intent, not confirmation**. Ask first (操作类型 + 环境 + 对象 ID), wait for `确认`/`confirm`, **then** `--yes`. Never add `--yes` on the same turn as the first request. Applies to: app/model create·update·publish·unpublish·delete·clone, upload attach, cloud deploy, device bind/unbind, group create/rename/delete/move.
32
32
  5. **Treat tokens and keys as secrets** — do not echo full `access_token`, `refresh_token`, or `access_key`. **Public model artifacts are not downloadable** — if the user asks for 下载地址 / 下载链接 / download URL / 怎么下载, that is the same as asking for `file_url`: refuse the address, explain deploy-only (`cloud deploy` or Console). Never run `model download --url-only` on public models.
33
33
  6. **Success = indented JSON on stdout**; failure = stderr + non-zero exit. Parse stdout only on success.
34
- 7. **Local USB / Web Serial flashing is L3** — do not pretend remote auto-flash. Guide the user to Console `/ai/device/local/...` when real hardware burn is required. Skill/CLI may configure app tool-blocks only.
34
+ 7. **Local USB / IP flashing is L3** — do not pretend remote auto-flash. Classic reCamera (`40`): [`sensecraft-recamera`](../sensecraft-recamera/SKILL.md) (`check` / `open` the AI deploy page). Other USB benches: Console `/ai/device/local/32|36|37|41|52`. Do **not** use `/ai/recamera` (it 301s to Grove `36`) or `/ai/device/local/40` (no such bench).
35
35
 
36
36
  ## Auth model (same OAuth client, different persistence)
37
37
 
38
38
  | Kind | After Device Flow (`client_id=sensecraft-cli`) | Daily API auth |
39
39
  |------|-----------------------------------------------|----------------|
40
- | `sensecap` | Exchange for Access Key; store `key_id` + `access_key` | HTTP Basic → SenseCAP `/openapi` **and** AI `{ai-host}/openapi` (app/model/file/cloud) |
40
+ | `sensecap` | Exchange for Access Key; store `key_id` + `access_key` | HTTP Basic → SenseCAP `/openapi` **and** AI `{ai-host}/openapi` (app/model/file/cloud/recamera) |
41
41
 
42
42
  ### Site / `remote_type` (AI)
43
43
 
@@ -61,9 +61,10 @@ Console 测试站 `test-sensecraft.seeed.cc` → CLI 必须用 **`remote_type: D
61
61
  | Upload image/file/firmware/doc/archive and obtain `file_url` | [`sensecraft-files`](../sensecraft-files/SKILL.md) + `file upload` | `sensecap` | Types `1`–`2` require `--model-id`/`--app-id --yes`/`--for-app`/`--unlinked`; types `3`–`6` direct |
62
62
  | Model library search/view/download/constants | [`sensecraft-models`](../sensecraft-models/SKILL.md) | `sensecap` | **CLI shipped** |
63
63
  | Upload / publish / unpublish / delete model | same + `model upload --id --yes` / `create\|update\|publish\|unpublish\|delete` | `sensecap` | Attach bumps patch version like Console |
64
+ | Classic reCamera (`40`) pick / check / open deploy page | [`sensecraft-recamera`](../sensecraft-recamera/SKILL.md) + `app/model list --uniform-type 40` + `recamera check` / `open` | `sensecap` | **CLI shipped**. Flash is Console L3 (IP/USB). Not `cloud deploy`. Not Pro `53`. |
64
65
  | reCamera Pro model library | [`sensecraft-models`](../sensecraft-models/SKILL.md) + `model create --target recamera-pro` / `recamera-pro resolve` | `sensecap` | Deploy is local IP/USB L3 — not `cloud deploy` |
65
66
  | Jetson / cloud kit list & deploy | [`sensecraft-devices-cloud`](../sensecraft-devices-cloud/SKILL.md) + `cloud …` | `sensecap` | **CLI shipped** (list/view/deploy/order); not SenseCAP `device` |
66
- | Local USB/IP model deploy or firmware flash | Console reCamera workspace / local device page | — | **L3 only** |
67
+ | Local USB/IP model deploy or firmware flash | [`sensecraft-recamera`](../sensecraft-recamera/SKILL.md) then Console Deploy, or `/ai/device/local/32\|36\|37\|41\|52` | — | **L3 only**; CLI does not talk to the device |
67
68
 
68
69
  ## Cross-domain example
69
70
 
@@ -106,16 +107,17 @@ Published commands use **SenseCAP Access Key** (`kind=sensecap`) → `{ai-host}/
106
107
  2. **Files** — `file upload` for image/model/app/firmware/doc/archive; types 1–2 require `--model-id` / `--app-id --yes` / `--for-app` / `--unlinked` before PUT (bare upload fails).
107
108
  3. **Model library** — list/view/constants; **private** download only; public models deploy-only (no `file_url`); `model upload --id --yes` attaches and auto-bumps patch version; create/update; publish/unpublish/delete (L2).
108
109
  4. **Cloud devices** — `cloud device` / `cloud deploy` / `cloud order`.
109
- 5. **Local USB** — Meta guides to Console local device page only.
110
+ 5. **Classic reCamera 40** — `recamera check` / `recamera open` (Console AI deploy page; flash is L3).
111
+ 6. **Local USB** — Other benches: Console `/ai/device/local/32|36|37|41|52`.
110
112
 
111
113
  ## When something is missing
112
114
 
113
- Published AI CLI is `app` / `model` / `file` / `cloud`. If a command fails:
115
+ Published AI CLI is `app` / `model` / `file` / `cloud` / `recamera`. If a command fails:
114
116
 
115
117
  1. Run `sensecraft-cli auth info` — need an active SenseCAP Access Key.
116
118
  2. Do **not** call SenseCAP `device`/`data` as a substitute.
117
119
  3. Do **not** scrape Console cookies or invent HTTP with guessed tokens.
118
- 4. Prefer domain skills (`apps` / `files` / `models` / `devices-cloud`).
120
+ 4. Prefer domain skills (`apps` / `files` / `models` / `recamera` / `devices-cloud`).
119
121
 
120
122
  ## Related files in this repo
121
123
 
@@ -125,5 +127,6 @@ Published AI CLI is `app` / `model` / `file` / `cloud`. If a command fails:
125
127
  | [`../sensecraft-data/commands.md`](../sensecraft-data/commands.md) | Full SenseCAP command reference |
126
128
  | `skills/sensecraft-apps/` | App Plaza skill + field/block refs (**shipped**) |
127
129
  | `skills/sensecraft-models/` | Model library skill + field refs (**shipped**) |
130
+ | `skills/sensecraft-recamera/` | Classic reCamera 40 pick → check → open deploy page (**shipped**) |
128
131
  | `skills/sensecraft-devices-cloud/` | Jetson / cloud kit (**shipped**) |
129
132
  | `skills/README.md` | Skill discovery for Agents |
@@ -26,7 +26,7 @@ SenseCAP IoT: [`../sensecraft-data/SKILL.md`](../sensecraft-data/SKILL.md).
26
26
  **`app create` is not L2** — including `--from-json` with full fields (create + internal follow-up `update_app` on the **new** `app_id` only). Prefer one-shot create when the payload is ready. Still tell the user what will be created before running create.
27
27
  3. **Privacy values**: submit review → `privacy` / flow uses **`2`** (pending); unpublish/private → **`0`**. **Never send `1`** (ops-approved public; Admin only).
28
28
  4. **Clone ≠ Fleet install**. Clone copies into My Apps. Installing Docker apps on devices is Fleet — out of scope.
29
- 5. Tool-block **configuration** may be written into `deployment.blocks`. **Executing** flash / USB deploy / container install on hardware is **L3** — guide user to Console preview / `/ai/device/local/...`.
29
+ 5. Tool-block **configuration** may be written into `deployment.blocks`. **Executing** flash / USB deploy / container install on hardware is **L3**. Classic reCamera (`40`): [`sensecraft-recamera`](../sensecraft-recamera/SKILL.md) (`check` / `open`). Other benches: Console `/ai/device/local/32|36|37|41|52`. `flash-firmware` run is out of scope this pass.
30
30
  6. Parse indented JSON on stdout; on failure read stderr + exit code. After `app update`, **re-read** the app — success body may be `{}`.
31
31
  7. **Rename / edit info**: sparse `{"app_name":"…"}` is OK (CLI merges other info fields from sketch). Do not invent HTTP; do **not** put `be_public=1` in user JSON. For **already published** apps the CLI injects `be_public=1` (Console info save) and returns `sketch_saved` — plaza copy is unchanged until `app publish`.
32
32
  8. **Lifecycle vs Console**: edit / publish / unpublish / delete / BOM / cover only for **your** apps (`user_id` == profile). Others' plaza apps: **clone** then edit the copy. `be_public=2` locks owner edit. `be_public=1` owner may save sketch then `app publish` (草稿). Delete only `be_public=0`.
@@ -54,6 +54,7 @@ When a command exists, prefer it. When it does not, explain the gap and use fiel
54
54
  sensecraft-cli auth info
55
55
  sensecraft-cli app list --public --name "<keyword>" --scene <id>
56
56
  sensecraft-cli app list --public --uniform-type 40
57
+ sensecraft-cli app list --mine --uniform-type 40
57
58
  sensecraft-cli app view --id <app_id>
58
59
  ```
59
60
 
@@ -34,6 +34,7 @@ List apps.
34
34
  # Application Plaza
35
35
  sensecraft-cli app list --public --name "vision" --scene <scene_id> --page 1 --length 20
36
36
  sensecraft-cli app list --public --uniform-type 40
37
+ sensecraft-cli app list --mine --uniform-type 40
37
38
 
38
39
  # My Apps / marked apps
39
40
  sensecraft-cli app list --mine
@@ -38,10 +38,10 @@ Training artifacts (train job model download): [`sensecraft-train`](../sensecraf
38
38
  - **Do not clone** — the platform has no model clone (unlike `app clone`). Do not copy `model view` JSON into `model create` (including `id` / `model_id` / `from_id` / `file_url` / checksum). CLI `model create` refuses public-library sources. Tell the user to **deploy** instead.
39
39
  - **Do not download.** Phrases like 下载地址 / 下载链接 / `file_url` / download URL / 怎么下载 / 给我链接 are the **same leak** as `model download --url-only`. Do **not** run `model download` (`--apply` / `--url-only` included).
40
40
  - Do **not** print, quote, or reconstruct `file_url`, `apply_model` URLs, CDN/OSS paths, or signed query strings — even if they appear in a tool error, browser, or prior message.
41
- - Answer the **method**, not an address: browse metadata, then deploy so the device pulls firmware at apply time (`cloud deploy` or Console local workspace).
41
+ - Answer the **method**, not an address: browse metadata, then deploy so the device pulls firmware at apply time (`cloud deploy` for Jetson/`26`, or classic reCamera `40` via [`sensecraft-recamera`](../sensecraft-recamera/SKILL.md)).
42
42
  - Owner file download is only for **private** My Models (`be_public=0`). Even then, do not paste signed URLs into chat unless the user explicitly needs `--url-only` for a local script; prefer `--out` file path. Treat remaining `file_url`, checksums, and tokens as secrets.
43
43
  6. Success = indented JSON stdout; failure = stderr + non-zero exit.
44
- 7. reCamera Pro (`uniform_type=53`) deployment uses the device's local IP/USB workspace, **not** aiserver `update_stream`; use `model recamera-pro resolve` to validate metadata, then guide the user through the local L3 deploy.
44
+ 7. Classic reCamera (`uniform_type=40`): list with `--uniform-type 40`, then [`sensecraft-recamera`](../sensecraft-recamera/SKILL.md) `check` / `open`. **Do not** `cloud deploy`. **Do not** download public models. reCamera Pro (`53`) is a different device — use `model recamera-pro resolve`, then Console local L3 (not this 40 flow).
45
45
 
46
46
  ## CLI status
47
47
 
@@ -70,11 +70,11 @@ Report: name, description, **task/category**, **supported devices** (`uniform_ty
70
70
 
71
71
  If they ask to **clone** a public model into My Models, refuse. There is no `model clone`. Do not `model create` from that model's view JSON. Reply that others' public models cannot be cloned; deploy instead:
72
72
 
73
- > 他人公开模型不支持克隆。请用 `cloud deploy --eui <EUI> --model-id <id> --yes`(Jetson/云套件)或 Console 本地工作区(reCamera Pro / USB)部署。
73
+ > 他人公开模型不支持克隆。Jetson/云套件用 `cloud deploy`;经典 reCamera(40)用 `recamera check` / `recamera open` 后在 Console 点部署;Pro(53)走 Console 本地工作区。
74
74
 
75
75
  If they ask for a **download address / link / URL / 怎么下载** on a public model, do **not** fetch a URL. Reply that public models have no download link; the way to get the artifact is to **deploy** (device pulls firmware). Example:
76
76
 
77
- > 公开模型不提供下载地址。请用 `cloud deploy --eui <EUI> --model-id <id> --yes`(Jetson/云套件)或 Console 本地工作区(reCamera Pro / USB)部署,设备会在 apply 时拉取固件。
77
+ > 公开模型不提供下载地址。Jetson/云套件用 `cloud deploy`;经典 reCamera(40)用 `recamera open` 后在 Console 点部署。设备会在 apply 时拉取固件。
78
78
 
79
79
  ### Download (private / My Models only)
80
80
 
@@ -33,11 +33,14 @@ sensecraft-cli auth init --kind sensecap
33
33
  # Public library (default when neither --public nor --mine is set)
34
34
  sensecraft-cli model list --public --task 1 --name "vision" --page 1 --length 20
35
35
  sensecraft-cli model list --public --uniform-type 40
36
+ sensecraft-cli model list --mine --uniform-type 40
36
37
 
37
38
  # My Models
38
39
  sensecraft-cli model list --mine --name "custom"
39
40
  ```
40
41
 
42
+ Classic reCamera (`40`) pick-and-open: [`../sensecraft-recamera/commands.md`](../sensecraft-recamera/commands.md). Do not `cloud deploy` those models.
43
+
41
44
  ### `model view --id <id>`
42
45
 
43
46
  **Status: implemented.** Return name, description, task, format, labels/classes, uniform_types, version, size, be_public, etc.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: sensecraft-recamera
3
+ description: >-
4
+ Picks classic reCamera (uniform_type 40) public or My Apps / My Models, checks
5
+ compatibility, then opens the Console AI deploy page so the user flashes over
6
+ IP or USB. Use when the user mentions reCamera, 烧录, 刷机, 部署到 recamera,
7
+ uniform_type 40, or picking a model/app for reCamera. Not reCamera Pro (53),
8
+ not Jetson cloud deploy, not CodeCraft App Square.
9
+ ---
10
+
11
+ # SenseCraft reCamera (classic, uniform_type 40)
12
+
13
+ Orchestration skill: **list → pick → check → open Console → user clicks Deploy**.
14
+
15
+ Parent: [`../sensecraft-ai/SKILL.md`](../sensecraft-ai/SKILL.md).
16
+ List/view/clone: [`../sensecraft-apps/SKILL.md`](../sensecraft-apps/SKILL.md), [`../sensecraft-models/SKILL.md`](../sensecraft-models/SKILL.md).
17
+ Commands: [`commands.md`](commands.md).
18
+
19
+ **This skill does not flash.** Flash is L3 in the browser (IP or USB). There is no `recamera deploy` and no device HTTP in this CLI.
20
+
21
+ ## Agent rules
22
+
23
+ 1. Auth first:
24
+ ```bash
25
+ sensecraft-cli auth info
26
+ ```
27
+ Need **SenseCAP Access Key** (`auth init --kind sensecap`) for `app` / `model` / `recamera`. Never run init for them.
28
+ 2. **Classic reCamera only (`40`)**. Do **not** treat Pro `53`, XIAO `32`, or Grove `36` as the same device. `/ai/recamera` redirects to Grove `36` — do not send users there.
29
+ 3. Filter **only** with API `--uniform-type 40`. Do not guess from local materials, SKU strings, or adapteds-only. Public **and** mine:
30
+ ```bash
31
+ sensecraft-cli app list --public --uniform-type 40
32
+ sensecraft-cli app list --mine --uniform-type 40
33
+ sensecraft-cli model list --public --uniform-type 40
34
+ sensecraft-cli model list --mine --uniform-type 40
35
+ ```
36
+ 4. **Empty list: say so and stop.** Do not drop `--uniform-type` or widen to 53/32.
37
+ 5. After the user picks an app or model, `recamera check`. If `ok` is false, say it is not classic reCamera and stop.
38
+ 6. **Multiple firmwares / models** (`ask_pick: true` or several candidates): **ask again** which one to flash. Do not pick for them.
39
+ 7. Both allowed:
40
+ - Flash the model already on the app `deploy-ai-model` block
41
+ - Flash a **separately picked** model from the 40 list
42
+ 8. **Public models are deploy-only.** Never `model download`, never print `file_url`, never clone a public model into My Models. Private My Models may be used as-is. **Apps may be cloned** (`app clone`, L2) if the user wants their own copy — clone is optional, not required to flash.
43
+ 9. **Do not `cloud deploy`.** That path is Jetson / cloud kit (`26`), not reCamera.
44
+ 10. **`flash-firmware` blocks are out of scope** this pass. Do not invent a firmware-flash CLI.
45
+ 11. After a successful check, if the user wants to flash, run `recamera open` (or `--print-only` if they will paste the URL). Success = they say the Console page worked and they clicked Deploy. Opening a page is **not** an L2 `--yes` write.
46
+ 12. If there is **no device / no IP**: still open the Console deploy page and stop. Do not invent a device protocol. Do not require an IP to confirm.
47
+ 13. Retry list/check/open at most **5 times per run**. Then stop and report the last error.
48
+ 14. CodeCraft App Square is unrelated — do not route plaza-upload work here.
49
+
50
+ ## Typical workflow
51
+
52
+ ```bash
53
+ sensecraft-cli auth info
54
+ sensecraft-cli model list --public --uniform-type 40
55
+ sensecraft-cli app list --public --uniform-type 40
56
+ # optional: mine
57
+ sensecraft-cli model list --mine --uniform-type 40
58
+ sensecraft-cli app list --mine --uniform-type 40
59
+
60
+ sensecraft-cli recamera check --model-id <id>
61
+ # or
62
+ sensecraft-cli recamera check --app-id <id>
63
+
64
+ # After the user chose the item (and, if ask_pick, which firmware):
65
+ sensecraft-cli recamera open --model-id <id>
66
+ # or --print-only if a browser cannot be opened
67
+ ```
68
+
69
+ Then tell the user: on the opened **model/app detail** page, click **Deploy**, connect classic reCamera over **IP or USB**, and finish in Console. Do not download the public weights.
70
+
71
+ ## CLI status
72
+
73
+ | Area | Status |
74
+ |------|--------|
75
+ | `app/model list --uniform-type 40` | **Implemented** |
76
+ | `recamera check` / `recamera open` | **Implemented** (P2) |
77
+ | `app clone` | Use apps skill (L2) |
78
+ | Device flash / `recamera deploy` | **Not implemented** (L3 Console) |
79
+ | `model recamera-pro resolve` | Pro `53` only — not this skill |
@@ -0,0 +1,87 @@
1
+ # sensecraft-recamera — CLI commands
2
+
3
+ Target binary: `sensecraft-cli` (this repo). Auth: active **SenseCAP Access Key** (`auth init --kind sensecap`) → `{ai-host}/openapi`.
4
+
5
+ > Status: **shipped (P1 list + P2 check/open)**. Flash stays in Console. There is no `recamera deploy`.
6
+
7
+ ## Auth prerequisite
8
+
9
+ ```bash
10
+ sensecraft-cli auth info
11
+ sensecraft-cli auth init --kind sensecap # user only, interactive
12
+ ```
13
+
14
+ ## List (existing commands)
15
+
16
+ Always pass `--uniform-type 40`. Empty list → stop.
17
+
18
+ ```bash
19
+ sensecraft-cli app list --public --uniform-type 40
20
+ sensecraft-cli app list --mine --uniform-type 40
21
+ sensecraft-cli model list --public --uniform-type 40
22
+ sensecraft-cli model list --mine --uniform-type 40
23
+ ```
24
+
25
+ ## `recamera check`
26
+
27
+ **Status: implemented.**
28
+
29
+ Verify the id is classic reCamera (`40`). Does not open a browser.
30
+
31
+ | Flag | Required | Notes |
32
+ | ------------ | -------- | ------------------------------------------ |
33
+ | `--model-id` | one of | Model id |
34
+ | `--app-id` | one of | App id |
35
+ | `--sandbox` | no | Sample JSON, no network |
36
+
37
+ Exactly one of `--model-id` / `--app-id`.
38
+
39
+ Stdout JSON includes `ok`, `device` (40), `flash` (`local`), `console_url`, `candidates`, `ask_pick`.
40
+ `ok=false` → non-zero exit. Do not loosen the filter.
41
+
42
+ ```bash
43
+ sensecraft-cli recamera check --model-id <model_id>
44
+ sensecraft-cli recamera check --app-id <app_id>
45
+ ```
46
+
47
+ If `ask_pick` is true, ask the user which candidate to flash.
48
+
49
+ ## `recamera open`
50
+
51
+ **Status: implemented.**
52
+
53
+ Runs the same check, then opens `console_url` (or prints it). Sandbox never opens a browser.
54
+
55
+ | Flag | Required | Notes |
56
+ | ------------- | -------- | --------------------------------------------- |
57
+ | `--model-id` | one of | Model detail = AI deploy page (click 部署) |
58
+ | `--app-id` | one of | App detail; plaza omits `from=my-apps` |
59
+ | `--print-only`| no | Print URL only |
60
+ | `--sandbox` | no | Sample JSON; never open a browser |
61
+
62
+ ```bash
63
+ sensecraft-cli recamera open --model-id <model_id>
64
+ sensecraft-cli recamera open --app-id <app_id> --print-only
65
+ ```
66
+
67
+ `console_url` is `/ai/model/detail?id=…` or `/ai/application/detail/…`.
68
+ **Not** `/ai/device/local/40` (that family is 32/36/37/41/52). **Not** `/ai/recamera` (301 → Grove 36).
69
+
70
+ ## Out of scope
71
+
72
+ | Action | What to do instead |
73
+ |--------|--------------------|
74
+ | `cloud deploy` | Jetson / cloud kit only |
75
+ | Public model download / clone | Refuse; deploy-only |
76
+ | `recamera deploy` / device HTTP | Do not invent; user flashes in Console |
77
+ | `flash-firmware` block | Later |
78
+ | reCamera Pro `53` | `sensecraft-models` + `model recamera-pro resolve` |
79
+ | CodeCraft App Square | Unrelated |
80
+
81
+ ## Optional: clone an app first (L2)
82
+
83
+ ```bash
84
+ sensecraft-cli app clone --id <app_id> --agree-disclaimer --yes
85
+ ```
86
+
87
+ Follow [`../confirmation.md`](../confirmation.md). Clone is not required to open the plaza app and click Deploy.