@seeed-studio/solution-cli 0.3.2 → 0.4.1
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 +161 -113
- package/bin/cli.js +427 -34
- package/catalog/client-config.json +2 -2
- package/catalog/knowledge-core.json +75469 -639
- package/docs/cli-guide.md +195 -227
- package/lib/agent.js +132 -23
- package/lib/catalog-dto.js +14 -1
- package/lib/doctor.js +19 -1
- package/lib/downloader.js +24 -0
- package/lib/gotchas.js +126 -0
- package/lib/installer.js +75 -9
- package/lib/integration.js +265 -0
- package/lib/knowledge.js +1140 -103
- package/package.json +4 -3
- package/skills/solution-cli/SKILL.md +120 -28
- package/skills/solution-cli/references/consult-and-select.md +58 -14
- package/skills/solution-cli/references/deploy.md +60 -248
- package/skills/solution-cli/references/device-management.md +249 -77
- package/skills/solution-cli/references/diagnose.md +15 -0
- package/skills/solution-cli/references/edge-gotchas.md +205 -0
- package/skills/solution-cli/references/generic-rk3588.md +106 -0
- package/skills/solution-cli/references/hardware-bom.md +9 -3
- package/skills/solution-cli/references/sales-feasibility.md +65 -0
- package/skills/solution-cli/references/secondary-development.md +10 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seeed-studio/solution-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Installer for the Rust deployment engine and Solution CLI Agent skills (Work
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Installer for the Rust deployment engine and Solution CLI Agent skills (Doubao Work, WorkBuddy, Claude Code, Codex, CodeBuddy, Hermes)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/installer.js",
|
|
7
7
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "node scripts/bake-client-config.mjs",
|
|
24
24
|
"prepack": "node scripts/bake-client-config.mjs",
|
|
25
|
-
"test": "node --test
|
|
25
|
+
"test": "node --test",
|
|
26
26
|
"install:self": "node bin/cli.js install",
|
|
27
27
|
"status": "node bin/cli.js status",
|
|
28
28
|
"doctor": "node bin/cli.js doctor"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"claude-code",
|
|
37
37
|
"codex",
|
|
38
38
|
"codebuddy",
|
|
39
|
+
"hermes",
|
|
39
40
|
"skills",
|
|
40
41
|
"edge-ai",
|
|
41
42
|
"jetson",
|
|
@@ -5,21 +5,105 @@ description: 用于客户询盘、客户需求、方案选型、我们能提供
|
|
|
5
5
|
|
|
6
6
|
# Solution CLI
|
|
7
7
|
|
|
8
|
-
This skill drives the `sensecraft-engine` execution engine and `solution-cli` toolset. It operates across the complete lifecycle: **Solution Consultation ➔ Hardware & Accessory BOM Selection ➔ Local Deployment ➔ Self-Healing Diagnostics**. For Engine-only operations, use the injected absolute Engine path. If the wrapper is not on `PATH`, invoke the CLI as `npx -y --package=@seeed-studio/solution-cli@latest solution-cli <args>`. Keep catalog queries such as `hub` and `product` on `solution-cli`; do not forward them to the Engine.
|
|
9
|
-
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
This skill drives the `sensecraft-engine` execution engine and `solution-cli` toolset. It operates across the complete lifecycle: **Solution Consultation ➔ Hardware & Accessory BOM Selection ➔ Local Deployment ➔ Self-Healing Diagnostics**. For Engine-only operations, use the injected absolute Engine path. If the wrapper is not on `PATH`, invoke the CLI as `npx -y --registry=https://registry.npmjs.org/ --package=@seeed-studio/solution-cli@latest solution-cli <args>`. Keep catalog queries such as `hub` and `product` on `solution-cli`; do not forward them to the Engine.
|
|
9
|
+
|
|
10
|
+
## Catalog model and production pages
|
|
11
|
+
|
|
12
|
+
Treat the catalog as a graph with distinct content types. A **Scenario** is a
|
|
13
|
+
business landing page. It owns links to one or more **Tech** pages and/or
|
|
14
|
+
**Reference Designs (RDs)**. A Tech page is an independently published
|
|
15
|
+
technology or ownership page; it is not a Wiki page and must not be inferred
|
|
16
|
+
from an RD. An RD is the concrete design that can contain architecture,
|
|
17
|
+
products, and a deployment mapping. A deployable RD maps to the executable
|
|
18
|
+
deployment document and presets exposed by the Engine; a website RD without
|
|
19
|
+
that mapping remains informative and is not deployable.
|
|
20
|
+
|
|
21
|
+
Use the catalog commands progressively:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
solution-cli hub list --type scenario --locale <en|zh|ja> --page 1 --limit 50 --json
|
|
25
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section overview --json
|
|
26
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section links --json
|
|
27
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section architecture --json
|
|
28
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section products --json
|
|
29
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section playbook --json
|
|
30
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section integration --json
|
|
31
|
+
solution-cli hub get <id> --locale <en|zh|ja> --section deployment [--preset <id>] --json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For a catalog-wide request, page through `hub list` until `has_more` is
|
|
35
|
+
false. For a specific request, search first, then use `hub get` on the chosen
|
|
36
|
+
IDs. For links, call `hub get --section links`; do not scan manifests or write
|
|
37
|
+
an ad-hoc parser. `hub get --section links` returns the production landing
|
|
38
|
+
mapping for all three locales when published, plus separately declared Wiki,
|
|
39
|
+
repository, and document links. The verified landing hosts are:
|
|
40
|
+
|
|
41
|
+
| Locale | Production host |
|
|
42
|
+
|---|---|
|
|
43
|
+
| English (`en`) | `www.seeed.cc` |
|
|
44
|
+
| Chinese (`zh`) | `www.seeedstudio.com.cn` |
|
|
45
|
+
| Japanese (`ja`) | `www.seeed.co.jp` |
|
|
46
|
+
|
|
47
|
+
The path and availability must come from the CLI record. Do not construct a
|
|
48
|
+
Wiki route, CDN asset URL, or translated URL from an ID. A missing translation
|
|
49
|
+
may still have a published production route; report the returned content
|
|
50
|
+
locale/fallback separately. A catalog record is not proof that the local
|
|
51
|
+
Engine has the matching content: before deployment, read the actual Engine
|
|
52
|
+
`deploy-info` for the mapped solution ID.
|
|
53
|
+
|
|
54
|
+
A metadata or links response is not evidence that the content was read. When
|
|
55
|
+
the user asks what a solution does, how it is built, or which products it
|
|
56
|
+
uses, call `hub get` for the chosen `description`, `architecture`, or
|
|
57
|
+
`products` section and use that returned body. When a returned production page
|
|
58
|
+
or architecture image is material to the answer, open that exact returned
|
|
59
|
+
URL and state what was checked. When a solution includes an architecture diagram
|
|
60
|
+
(from `architecture_preview` or `hub get --section architecture`), present the
|
|
61
|
+
official architecture image to the user, render an editable Mermaid flowchart
|
|
62
|
+
based on its topology summary, and offer to customize the topology. A relative asset
|
|
63
|
+
path is usable only when the matching signed local content is present; otherwise
|
|
64
|
+
report the source asset as unavailable instead of treating the URL as an image that
|
|
65
|
+
has been reviewed.
|
|
66
|
+
|
|
67
|
+
## Workflow Routing & Intent Classification
|
|
68
|
+
|
|
69
|
+
```mermaid
|
|
70
|
+
flowchart TD
|
|
71
|
+
User["用户提问: 'J4012 Super 包含电源吗?买回去能直接用吗?'"] --> AgentIntent{"意图识别 (SKILL.md)"}
|
|
72
|
+
AgentIntent -- "问行业/业务方案 (跌倒/农业/质检/选型)" --> HubSearch["hub search '<方案关键词>'"]
|
|
73
|
+
AgentIntent -- "问硬件单品/型号/包装清单/电源/接口/能干嘛" --> ProdSearch["product search '<型号/SKU>'"]
|
|
74
|
+
HubSearch -- "误把硬件当方案搜" --> Fallback["Fallback: 检测到硬件型号,引导使用 product search"]
|
|
75
|
+
ProdSearch --> ClearOutput["直出: 电源随附情况 + 开箱即用判定 + 必选配件 + 接口 + 落地场景"]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Do NOT read all reference files at once. Determine the user's workflow state and intent, then execute the corresponding command and load **at most ONE** reference file on demand:
|
|
13
79
|
|
|
14
80
|
| User State & Intent | Reference to Load | Primary CLI Tool to Call | Guardrails & Forbidden Actions |
|
|
15
81
|
|---|---|---|---|
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **
|
|
19
|
-
| **
|
|
20
|
-
| **
|
|
82
|
+
| **HARDWARE_SPEC / BOX_CONTENTS / POWER_READINESS**<br>“J4012 Super 包含电源吗?”、“盒子里有什么”、“带不带电源”、“买回去能否直接用/能否开箱即用”、“发货清单”、“有哪些接口”、“能干嘛” | `references/hardware-bom.md` | `solution-cli product search "<型号/SKU/关键词>" --json` | **STRICT HARD REDLINE**: 严禁凭常识臆测硬件包材(如擅自推测 Super 版本带电源)或谎称没有清单。包装随附情况、电源线适配器状态、开箱即用性必须严格以 `product search` 返回的 `package_profile`、`package_contents` 和 `interfaces` 为准!回答“设备能干嘛”直接使用返回的 `supported_scenarios`。 |
|
|
83
|
+
| **DISCOVERY / CONSULT**<br>“我想做防跌倒监控”、“有智慧农场方案吗”、“怎么做园区安防” | `references/consult-and-select.md` | `solution-cli hub search "<keyword>" --json`, then `hub get <id> --sections architecture,playbook --json` | **DO NOT run deploy**; search exposes `available_sections` and evidence status (`documented`/`generic`/`inferred`). 若返回 warning 提示包含硬件关键词,立即按提示切换至 `product search`。 |
|
|
84
|
+
| **PROCUREMENT / VERIFY_BOM**<br>“买什么硬件?”、“J4012 需要配什么配件?”、“推荐镜头/天线” | `references/hardware-bom.md` | `solution-cli product accessories <id> [--category <power,camera>] --compact --json` | **DO NOT fabricate** third-party SKUs or prices. Always distinguish REQUIRED vs OPTIONAL accessories. Use `--compact` and `--category` to save tokens. |
|
|
85
|
+
| **ONBOARDING / PRECHECK**<br>“设备到了,插上了网线/USB”、“环境自检”、“发现新设备” | `references/diagnose.md` & `references/device-management.md#0` | `solution-cli doctor` / `sensecraft-engine device scan` | **Early & Proactive**: Check device firmware & drivers early. Intercept and prompt for reCamera firmware/patch or SBC env fixes before deploy. |
|
|
86
|
+
| **DEPLOYING / APPLY**<br>“开始安装”、“部署 fall_detection” | `references/deploy.md` | `solution-cli hub get <id> --section deployment --preset <id> --json` then `sensecraft-engine deploy <id>` | **DEPLOYMENT CRITICAL SECTION**: Zero external commercial queries allowed during apply. Filter guide with `--preset` to reduce token bloat. |
|
|
87
|
+
| **INTEGRATION / INGESTION**<br>“怎么接到我们系统”、“MQTT主题是什么”、“Webhook格式”、“接入 Home Assistant” | `references/device-management.md#5` | `solution-cli hub get <id> --section integration --json` | **System Ingestion**: Provide exact MQTT topics, payload schemas, Webhook endpoints, and port mappings directly from verified integration contract. Batch with `--sections architecture,integration` if needed. |
|
|
88
|
+
| **MANAGE / RECONFIG**<br>“改一下 MQTT 地址”、“换模型/业务流”、“重启服务”、“修改配置”、“打本地补丁”、“换应用镜像” | `references/device-management.md` | `curl BASE/api/docker-devices/local/config/<id>` / `solution-cli doctor` | **On-Demand (JIT)**: Only query when user requests application-layer modifications. Apply tiered hotpatches without touching underlying OS. |
|
|
89
|
+
| **FEASIBILITY / SALES_EVAL**<br>“我们能不能做这个?”、“非标需求评估”、“需求匹配度如何”、“做这个要多久” | `references/sales-feasibility.md` | `solution-cli hub search "<keyword>" --json` / `product query <family>` | **DO NOT make blind promises**. Strictly follow the 4-tier feasibility matrix and scoring criteria. |
|
|
21
90
|
| **CUSTOMIZE / SECONDARY_DEV**<br>“我想改源码”、“换成自研模型”、“改前端看板”、“GitHub 仓库” | `references/secondary-development.md` | `git clone <repo_url>` / `sensecraft-engine --solutions-dir` | **Never edit cached content**: Clone to user workspace, pair-program, test locally with `--solutions-dir`. |
|
|
22
|
-
| **
|
|
91
|
+
| **EDGE_GOTCHAS / HARDWARE_DEBUG**<br>“3576/3588编译报错”、“/dev/rknn打不开”、“recamera崩溃”、“VPSS overflow”、“fork风暴”、“高卡/踩坑” | `references/edge-gotchas.md` | `solution-cli gotchas "<keyword>" [--chip <chip>] --json` / `dmesg \| grep -i -E "rknpu\|vpss\|fifo\|oom"` | **Brand-agnostic**: Focus on generic 3576, 3588, reCamera, reCamera Pro, and MCU gotchas and hardware traps. |
|
|
92
|
+
| **TROUBLESHOOTING**<br>“部署报错”、“黑屏”、“无视频流” | `references/error-catalog.md` | `sensecraft-engine logs` / `solution-cli gotchas "<symptom>" --json` | Max 3 fix-and-retry rounds. Follow local auto-patching rule. |
|
|
93
|
+
|
|
94
|
+
### Progressive Disclosure & Multi-Section Fetch
|
|
95
|
+
During discovery, `hub search` returns records with `available_sections` and their status (`section_status`: `documented`, `inherited`, `generic`, `inferred`).
|
|
96
|
+
Instead of multiple roundtrips, retrieve multiple sections at once:
|
|
97
|
+
`solution-cli hub get <id> --sections architecture,integration --json`
|
|
98
|
+
To retrieve single sections:
|
|
99
|
+
- `overview`: basic metadata, tags, and progressive directory navigation
|
|
100
|
+
- `links`: landing pages, wiki, repo, and declared documents
|
|
101
|
+
- `description`: deep solution background and functional breakdown
|
|
102
|
+
- `architecture`: modules, block diagrams, topology, and gallery
|
|
103
|
+
- `products`: bill of materials (BOM), required vs optional hardware
|
|
104
|
+
- `deployment`: deployment steps (use `--preset <id>` to filter and reduce token usage)
|
|
105
|
+
- `playbook`: field diagnostic questions and engineering rationales
|
|
106
|
+
- `integration`: system ingestion contracts (MQTT topics, Webhooks, REST endpoints)
|
|
23
107
|
|
|
24
108
|
Capabilities that need the **SenseCraft Solution desktop app** (editing a
|
|
25
109
|
solution's configuration, the app's `/api/ai/context`, diagnosing through the
|
|
@@ -52,12 +136,7 @@ daemon is a host prerequisite, not evidence that a deployment has passed.
|
|
|
52
136
|
|
|
53
137
|
## Rules
|
|
54
138
|
|
|
55
|
-
1. **Credentials and secrets:**
|
|
56
|
-
ask the user. Replace passwords, tokens, API keys and any other secret a
|
|
57
|
-
deployment prints (for example a gateway token) with `<REDACTED>` in
|
|
58
|
-
anything you show or log. Tell the user where to find the value (on the
|
|
59
|
-
device, in the solution's page, in the file that holds it) instead of
|
|
60
|
-
printing it.
|
|
139
|
+
1. **Credentials and secrets (Zero-Plaintext-Password):** NEVER ask the user to send raw passwords, API keys, or private tokens into the chat context (this triggers LLM safety refusal guardrails and risks credential leakage). Always prefer SSH Key-based authentication (defaulting to `~/.ssh/id_ed25519` or `~/.ssh/id_rsa`). If the remote target lacks key-trust, guide the user to run `ssh-copy-id -i ~/.ssh/id_ed25519.pub <user>@<host>` in their local terminal. Replace any echoed secrets with `<REDACTED>`. Never invent hosts or usernames.
|
|
61
140
|
2. **What you may do without asking, and what needs the user's OK:**
|
|
62
141
|
|
|
63
142
|
| Action | Ask first? |
|
|
@@ -93,15 +172,16 @@ daemon is a host prerequisite, not evidence that a deployment has passed.
|
|
|
93
172
|
and thoroughly using local knowledge and tools. Do NOT dump raw link lists
|
|
94
173
|
or write pushy sales pitches. External links (`landing_url`, `wiki_url`,
|
|
95
174
|
product purchase URLs, `repo_url`) must be smoothly integrated as
|
|
96
|
-
supplemental reading / procurement / code exploration.
|
|
97
|
-
|
|
98
|
-
|
|
175
|
+
supplemental reading / procurement / code exploration. Search and product
|
|
176
|
+
results may include attribution parameters when the CLI adds them; links
|
|
177
|
+
returned by `hub get --section links` are declared URLs and must be used as
|
|
178
|
+
returned.
|
|
99
179
|
8. **Proactive diagnosis & domain-specific questioning:** During solution consultation,
|
|
100
|
-
Agent must avoid one-way monologues.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
180
|
+
Agent must avoid one-way monologues. Use a returned `diagnostic_playbook` only
|
|
181
|
+
when the selected search result actually contains one; otherwise use the
|
|
182
|
+
domain matrix in `references/consult-and-select.md` §3 and label the questions
|
|
183
|
+
as general engineering checks. Ask 2–3 targeted questions explaining the
|
|
184
|
+
rationale (topology, asset reuse, power/cabling, inspection speed/materials).
|
|
105
185
|
|
|
106
186
|
## Step 0 — Install the engine and the solutions (when needed)
|
|
107
187
|
|
|
@@ -128,16 +208,16 @@ daemon is a host prerequisite, not evidence that a deployment has passed.
|
|
|
128
208
|
|
|
129
209
|
**Recommended (Zero-friction via solution-cli, target the current Agent explicitly)**:
|
|
130
210
|
```bash
|
|
131
|
-
npx -y @seeed-studio/solution-cli@latest install --agent <current-agent-id> -y
|
|
211
|
+
npx -y --registry=https://registry.npmjs.org/ @seeed-studio/solution-cli@latest install --agent <current-agent-id> -y
|
|
132
212
|
```
|
|
133
213
|
|
|
134
214
|
Fill `<current-agent-id>` with the actual host ID: `workbuddy`, `claude`,
|
|
135
215
|
`codex`, `codebuddy`, or `antigravity`. The WorkBuddy example is:
|
|
136
216
|
```bash
|
|
137
|
-
npx -y @seeed-studio/solution-cli@latest install --agent workbuddy -y
|
|
217
|
+
npx -y --registry=https://registry.npmjs.org/ @seeed-studio/solution-cli@latest install --agent workbuddy -y
|
|
138
218
|
```
|
|
139
219
|
An AI agent must use its current host ID; Codex must not hardcode WorkBuddy.
|
|
140
|
-
Use `npx -y @seeed-studio/solution-cli@latest install` for interactive
|
|
220
|
+
Use `npx -y --registry=https://registry.npmjs.org/ @seeed-studio/solution-cli@latest install` for interactive
|
|
141
221
|
selection. When one or more Agents are detected, pressing Enter selects all
|
|
142
222
|
detected Agents; entering the matching number selects one host. In
|
|
143
223
|
non-interactive mode, `install -y` without `--agent` also selects all detected
|
|
@@ -145,6 +225,18 @@ daemon is a host prerequisite, not evidence that a deployment has passed.
|
|
|
145
225
|
the CLI's default target set; pass `--agent <agent-id>` to control the scope
|
|
146
226
|
explicitly.
|
|
147
227
|
|
|
228
|
+
**Routine Update & Skill Synchronization**:
|
|
229
|
+
```bash
|
|
230
|
+
solution-cli update -y
|
|
231
|
+
```
|
|
232
|
+
(Automatically checks signed stable Engine, increments content definitions with `content update`, and synchronizes skills for all managed agents).
|
|
233
|
+
|
|
234
|
+
**Custom or Third-party Agent Extension**:
|
|
235
|
+
```bash
|
|
236
|
+
solution-cli install --skills-dir <path> -y
|
|
237
|
+
```
|
|
238
|
+
(Injects Solution CLI skills into any custom, internal, or proprietary AI Agent skill directory).
|
|
239
|
+
|
|
148
240
|
The command checks the signed stable Engine on fresh and repeat runs, reuses
|
|
149
241
|
an equal or newer local version, and upgrades an older one. It preserves
|
|
150
242
|
modified/unregistered skills and protected symlinks. Add `--agent ...` for an
|
|
@@ -28,22 +28,66 @@
|
|
|
28
28
|
使用命令:
|
|
29
29
|
```bash
|
|
30
30
|
solution-cli hub search "<用户关键词>" --limit 5 --json
|
|
31
|
+
solution-cli hub get <chosen-id> --locale <en|zh|ja> --section overview --json
|
|
32
|
+
solution-cli hub get <chosen-id> --locale <en|zh|ja> --section links --json
|
|
31
33
|
```
|
|
32
|
-
-
|
|
34
|
+
- **咨询顺序**:先用用户原话和同义技术词查询,再对选中的 Scenario、Tech 或 RD 调用 `hub get`;只有需要回答架构、产品或部署问题时,才追加 `--section architecture|products|deployment`。根据返回的 `diagnostic_playbook` 拆解需求;向用户确认点位、协议、供电、通信、控制闭环和预算等关键参数后,给出可提供的方案、硬件方向和缺口说明。
|
|
35
|
+
- **内容核验**:链接或 metadata 只用于定位,不代表已经阅读内容。用户问方案能力、架构或产品时,必须读取选中记录对应的 `description`、`architecture` 或 `products` section;确切生产页或架构图影响答案时,再打开 CLI 返回的确切 URL/图片并说明核验范围。相对资源路径只有在签名本地内容实际存在时才可读取,否则标为 source asset 未就绪。
|
|
33
36
|
- **交付边界**:咨询阶段只做检索、需求澄清和方案建议,不自动执行 `deploy`;用户确认硬件和部署目标后,再转入硬件校验或部署流程。
|
|
34
37
|
- **输出结果说明**:
|
|
35
|
-
- `Scenario
|
|
36
|
-
- `
|
|
38
|
+
- `Scenario`:业务场景、痛点、所属 Tech/RD 关系、生产落地页链接;
|
|
39
|
+
- `Tech`:独立技术/归属页及其明确关联的 Scenario/RD;不要把 Tech 当作 Wiki 或 RD;
|
|
40
|
+
- `Reference Design`:具体架构、产品说明、部署文档/预设、生产落地页和已声明的 Wiki/源码链接;只有存在部署映射时才称为可部署;
|
|
37
41
|
- `family_ids`:推荐的主板/相机/网关产品族。
|
|
38
42
|
|
|
43
|
+
### 动作二:识别页面归属与可部署映射
|
|
44
|
+
|
|
45
|
+
页面关系按 `Scenario → Tech / Reference Design` 的显式关系读取。落地页
|
|
46
|
+
是业务入口,技术页是独立内容归属,RD 是具体设计;不要根据标题、slug
|
|
47
|
+
或同名关系补出边。每个 RD 的一键部署入口都对应一个部署文档和 preset
|
|
48
|
+
映射。先读取:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
solution-cli hub get <rd-id> --locale <en|zh|ja> --section architecture --json
|
|
52
|
+
solution-cli hub get <rd-id> --locale <en|zh|ja> --section products --json
|
|
53
|
+
solution-cli hub get <rd-id> --locale <en|zh|ja> --section deployment --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
架构内容只把明确标注为 architecture 的图或 tab 称为架构图;其他图片
|
|
57
|
+
保留为 gallery。产品说明、BOM、架构图和部署文档要标明内容语言与来源。
|
|
58
|
+
`deployment` 返回的是目录中的部署映射,不等于本机已经安装;实际执行
|
|
59
|
+
前必须用 Engine 查询该映射的真实 `solution_id`:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
sensecraft-engine deploy-info <solution-id> --lang <en|zh>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
生产落地页按请求语言直接使用 CLI 返回的 URL。当前生产域名是英文
|
|
66
|
+
`www.seeed.cc`、中文 `www.seeedstudio.com.cn`、日文 `www.seeed.co.jp`;
|
|
67
|
+
不要把三者统一替换成另一个域名,也不要自行拼接 `/wiki` 或资产 CDN
|
|
68
|
+
路径。Wiki 只有在返回的已发布/授权元数据中存在时才展示。
|
|
69
|
+
|
|
70
|
+
### 动作三:呈现官方架构图与可编辑拓扑 (Architecture Presentation & Mermaid)
|
|
71
|
+
|
|
72
|
+
当方案检索或通过 `hub get <id> --section architecture` 匹配到方案包含官方架构图时(数据中包含 `architecture_preview` 或 `architecture.image_url`/`architecture.intro`):
|
|
73
|
+
1. **推荐并呈现官方参考架构图**:在向用户回复方案介绍时,直接嵌入官方高清参考架构图的 Markdown 引用:
|
|
74
|
+
```markdown
|
|
75
|
+

|
|
76
|
+
```
|
|
77
|
+
向用户说明这是经过官方实测验证的标准拓扑结构与设备选型。
|
|
78
|
+
2. **生成可二次编辑的通用 Mermaid 拓扑**:基于架构图返回的拓扑摘要(`summary`)与连接关系,紧随其后生成一份结构清晰的 Mermaid 流程图(`flowchart LR`):
|
|
79
|
+
- 按分层划分子图(`subgraph`):采集现场(Sensor/Camera/Mic)、边缘算力与主机(Edge Host/Gateway)、平台管理与应用(Cloud/Platform/Web Console);
|
|
80
|
+
- 在连线上准确标注通信介质与协议(如 USB、RTSP、MQTT、HTTP、BLE、LoRaWAN、Modbus);
|
|
81
|
+
3. **主动提示可修改定制**:说明“此拓扑为官方基准设计;若现场有特殊工况(如由云端改为纯局域网离线、更换通信总线、接入已有摄像头/传感器),可直接基于该 Mermaid 流程图调整修改”,方便用户或方案人员快速二次编辑。
|
|
82
|
+
|
|
39
83
|
---
|
|
40
84
|
|
|
41
85
|
## 3. 现场工况诊断与场景提问知识库 (Domain Diagnostic Playbook)
|
|
42
86
|
|
|
43
87
|
> [!IMPORTANT]
|
|
44
88
|
> **拒绝自说自话!真正的方案专家不仅回答问题,更主动诊断现场工况。**
|
|
45
|
-
>
|
|
46
|
-
> Agent
|
|
89
|
+
> 当用户提出场景诉求时,先调用 `solution-cli hub search "<关键词>" --json`。如果选中的返回记录带有 `diagnostic_playbook`,可以使用其中的问题;当前 CLI 的 compact search 结果可能不带该字段,此时使用本节矩阵,并明确这是通用工程核查。
|
|
90
|
+
> Agent **必须结合可用的工况诊断信息,主动提出 2~3 个决定物理架构、通信链路与商务成本的关键问题**,并解释“为什么问这个问题”(如利旧省钱、避免停机、规避环境干扰)。
|
|
47
91
|
|
|
48
92
|
### 3.1 四大底层工程决断杠杆 (The 4 Engineering Levers)
|
|
49
93
|
|
|
@@ -52,7 +96,7 @@ solution-cli hub search "<用户关键词>" --limit 5 --json
|
|
|
52
96
|
| 工程决断杠杆 | 核心影响与决断依据 | 典型追问切入点 |
|
|
53
97
|
|---|---|---|
|
|
54
98
|
| **1. 物理拓扑分布**<br>(集中式 vs 分布式) | 决定是采用“1 台计算主机集中拉流/汇聚”(极度摊薄单点算力成本),还是“分布式独立一体化终端”(免拉长线、点位隔离)。 | “点位是在同一栋楼/同一车间集中分布,还是分散在多处?” |
|
|
55
|
-
| **2. 存量资产利旧**<br>(绿地新建 vs 棕地利旧) |
|
|
99
|
+
| **2. 存量资产利旧**<br>(绿地新建 vs 棕地利旧) | 决定能否在协议、带宽、供电和性能满足时复用客户现有的监控摄像头(RTSP/ONVIF)、传感器(RS485/Modbus)或 PLC;具体节省量必须基于现场清单核算。 | “现场是否已经有现成的摄像头/传感器?支持什么协议?” |
|
|
56
100
|
| **3. 供电与通信边界**<br>(市电 vs 电池 / 有线 vs 无线) | 决定供电配件(220V 电源适配器 vs 太阳能/电池休眠机制)以及网络介质(PoE 网线、Wi-Fi、4G 插卡、LoRaWAN 远距离低功耗)。 | “安装点是否有 220V 市电?是否方便布设网线(PoE)?” |
|
|
57
101
|
| **4. 业务执行与闭环联动**<br>(被动看板 vs 主动控制) | 决定硬件接口规格(是否需要工业隔离数字量 I/O、继电器触点、CAN 总线)以及告警延迟容忍度。 | “判定异常后,是仅在大屏/手机告警,还是需直接联动 PLC/气缸/道闸执行控制?” |
|
|
58
102
|
|
|
@@ -78,21 +122,21 @@ solution-cli hub search "<用户关键词>" --limit 5 --json
|
|
|
78
122
|
## 4. 推荐应答呈现规范(自然专家与诊断对话风格)
|
|
79
123
|
|
|
80
124
|
向用户作答时,采用流利、专业的对话口吻,涵盖以下要素:
|
|
81
|
-
1.
|
|
125
|
+
1. **方案业务价值与实现逻辑**(直接讲透):解释返回内容能证实的端侧处理、响应和隐私边界;没有实测或来源的性能数字不得补充;
|
|
82
126
|
2. **两类硬件架构对比**:说明一体机与工控机/Jetson 的各自适用场景;
|
|
83
|
-
3.
|
|
127
|
+
3. **参数可调性预告**:只有在部署内容或管理接口返回 `reconfigurable` 字段时,才说明 MQTT 地址、检测灵敏度等参数支持在线修改;
|
|
84
128
|
4. **自然延伸出口**:随口附上“了解更多”落地页与技术 Wiki;若涉及二次开发提供 GitHub 源码;
|
|
85
129
|
5. **主动诊断追问(结合理由)**:提出针对该领域的 2~3 个工况诊断关键问题,并简明说明“为什么这样问能帮您优化方案或降低成本”。
|
|
86
130
|
|
|
87
131
|
#### 范例 1:智慧农业 / 环境监测咨询
|
|
88
132
|
> 做农业温室大棚和农田监测,推荐采用 **`agri_env_monitor`(农业环境监测方案)**。
|
|
89
133
|
>
|
|
90
|
-
>
|
|
134
|
+
> 当前目录中的 `agri_env_monitor` 可通过 `hub get --section deployment` 查看部署映射;实测返回 `cloud`、`tts_local`、`chirpstack_local` 三个 preset 和 `guide.md`/`guide_zh.md`,但其 RD 注册状态为 review,生产落地页链接为空。这表示可以继续读取目录中的部署内容进行诊断,不能把它当作已发布生产页面。架构和产品说明应分别读取 `--section architecture` 与 `--section products`。
|
|
91
135
|
>
|
|
92
136
|
> - **硬件组合**:大棚内部通常采用 **SenseCAP S2100 采集器 + 工业级土壤三参数探头(水分/EC/温度)**;如果需要户外微气象,可搭配 **S700 七合一气象站**。
|
|
93
|
-
> -
|
|
137
|
+
> - **参数灵活性**:是否可在线修改要以实际部署内容返回的 `reconfigurable` 字段和管理接口为准。
|
|
94
138
|
>
|
|
95
|
-
> 💡
|
|
139
|
+
> 💡 *如果想了解更多具体参数与传感器配件,先对选中的 RD 执行 `solution-cli hub get <rd-id> --locale <en|zh|ja> --section links --json`,使用返回的对应语言生产落地页和已声明的源码链接。不要从方案 ID 拼接网址。*
|
|
96
140
|
>
|
|
97
141
|
> ---
|
|
98
142
|
> **为了帮您设计最合理、施工最方便的硬件选型与网络拓扑,我想先了解几个现场工况:**
|
|
@@ -103,12 +147,12 @@ solution-cli hub search "<用户关键词>" --limit 5 --json
|
|
|
103
147
|
#### 范例 2:工业流水线视觉质检咨询
|
|
104
148
|
> 做产线表面缺陷或装配防错质检,通常推荐采用 **`edge_inspection_surface`(工业表面缺陷边缘质检方案)**。
|
|
105
149
|
>
|
|
106
|
-
>
|
|
150
|
+
> 具体架构和推理链路必须读取选中 RD 的 `architecture` section;实测 `acoustic-audio-ai` Tech 记录返回 4 个架构模块,并带有明确的 architecture 图片 URL。当前 CLI 只把来源明确标注的模块或架构图作为架构内容,不从方案名称推断响应时间或输出闭环。
|
|
107
151
|
>
|
|
108
152
|
> - **硬件算力**:单工位常规线速可采用 **reComputer J3011 (Orin Nano 8GB)**;如果是高节拍复杂缺陷或多工位合并,推荐 **reComputer J4012 (Orin NX 16GB)**。
|
|
109
|
-
> -
|
|
153
|
+
> - **接口与参数**:实测 `conversational_voice_ai` RD 的 `products` section 返回 6 个产品条目;是否支持热配置要以部署内容和管理接口的实际字段为准,不从示例文案推断。
|
|
110
154
|
>
|
|
111
|
-
> 💡
|
|
155
|
+
> 💡 *更多机械安装与光学镜头打光指导,先对选中的 RD 执行 `solution-cli hub get <rd-id> --locale <en|zh|ja> --section links --json` 和 `--section architecture --json`,只使用返回的生产落地页、已发布 Wiki 和源码链接。*
|
|
112
156
|
>
|
|
113
157
|
> ---
|
|
114
158
|
> **为了确定相机快门、打光方案与工控机选型,我先跟您确认三个关键细节:**
|