feat: plugindev sdk version management subcommand

- Add 'plugindev sdk' subcommand with list/install/use/path/current/latest
- Replace runtime.Caller(0) path detection with managed SDK store
- SDK stored at ~/.homeagent/plugindev/sdk/<version>/
- Active version tracked via current file
- Lazy initialization to avoid blocking other subcommands
This commit is contained in:
2026-07-19 11:14:27 +08:00
parent d38d42e57f
commit 49d19fb13c
3 changed files with 382 additions and 20 deletions

View File

@ -19,19 +19,22 @@ func main() {
cmdClean(os.Args[2:])
case "debug":
cmdDebug(os.Args[2:])
case "sdk":
cmdSDK(os.Args[2:])
default:
help()
}
}
func help() {
fmt.Println(`HomeAgent Plugin Dev Tool
fmt.Print(`HomeAgent Plugin Dev Tool
Usage:
plugindev init <name> Scaffold a new plugin project
plugindev build [flags] Compile and package plugin
plugindev clean Clean build/dist artifacts
plugindev debug [dir] Interpret and debug plugin source
plugindev sdk <command> Manage SDK versions
Flags:
--outdir Output directory (default: dist)