fix(examples): cmd/localuse/mcp 对齐仓内示例规约 —— 相对 replace、不声明 sdk

CI 红(run 39265187807)根因:这三个工程用了 `hmapdev init` 的本机
脚手架格式(replace => /root/.homeagent/...,plg.json 带 "sdk":"1.4.0"),
而仓内 22 个存量示例的规约(example_gomod_test.go 的两条判据 + hmapdev
构建逻辑)是:

  - go.mod:require v0.0.0 + replace => ../../(相对仓库根)
  - plg.json:不声明 sdk 字段 —— 声明了会让 hmapdev 去本地 SDK store
    找该版本,干净 CI 上必然失败("存储里还没有任何 SDK")

外部开发者拿 init 模板在本机构建没问题(init 面向本机 store),
但**仓内示例**面向的是 checkout 即可构建的 CI/发版路径,两者规约不同。

修后本地复验:example_gomod_test 3 条判据全绿;
build-examples.sh linux/amd64 与 darwin/arm64 均 25/25 成功。
This commit is contained in:
root
2026-10-20 07:00:53 +08:00
parent e849f39663
commit c63bce8304
6 changed files with 6 additions and 18 deletions

View File

@ -2,8 +2,6 @@ module localuse
go 1.25.0
require github.com/JianFeeeee/homeagentsdk v1.4.0
require github.com/JianFeeeee/homeagentsdk v0.0.0
replace github.com/JianFeeeee/homeagentsdk => /root/.homeagent/hmapdev/sdk/v1.4.0
replace github.com/JianFeeeee/homeagentsdk => ../../