@seeed-studio/solution-cli 0.4.0 → 0.4.2
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 +15 -12
- package/bin/cli.js +115 -8
- package/catalog/knowledge-core.json +17440 -574
- package/docs/cli-guide.md +34 -11
- package/lib/agent.js +77 -16
- package/lib/installer.js +14 -0
- package/lib/knowledge.js +308 -9
- package/package.json +4 -3
- package/skills/solution-cli/SKILL.md +14 -4
|
@@ -64,14 +64,24 @@ path is usable only when the matching signed local content is present; otherwise
|
|
|
64
64
|
report the source asset as unavailable instead of treating the URL as an image that
|
|
65
65
|
has been reviewed.
|
|
66
66
|
|
|
67
|
-
## Workflow Routing &
|
|
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
|
+
```
|
|
68
77
|
|
|
69
|
-
Do NOT read all reference files at once. Determine the user's workflow state and intent, then load **at most ONE** reference file on demand:
|
|
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:
|
|
70
79
|
|
|
71
80
|
| User State & Intent | Reference to Load | Primary CLI Tool to Call | Guardrails & Forbidden Actions |
|
|
72
81
|
|---|---|---|---|
|
|
73
|
-
| **
|
|
74
|
-
| **
|
|
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. |
|
|
75
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. |
|
|
76
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. |
|
|
77
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. |
|