Commit Graph

9 Commits

Author SHA1 Message Date
c7c66b8d39 docs: 修正 plugindev 工具链描述 + 补充入口函数/Lua 插件说明 + 补全示例插件列表 2026-07-28 21:56:54 +08:00
04837f237d plugindev: 全面 plg.json 持久化 + --replace 支持 + 文档 2026-07-25 15:47:49 +08:00
1fa3c843ab refactor: centralize ABI metadata into meta/meta.go
- meta/meta.go: add ABIVersion, ABIVersionMin, 45 dispatch method IDs
- tools/plugindev/cmd_init.go: cabiVersion -> meta.ABIVersion
- tools/plugindev/templates.go: C header comments reference meta.go
2026-07-25 14:42:32 +08:00
cb7999ca71 feat: sdk NoMemory/Cleaner + example build fixes
- sdk/plugin.go: ToolDef adds NoMemory/Cleaner fields
- sdk/plugin_test.go: unit tests for NoMemory/Cleaner
- all example plugins: NoMemory/Cleaner annotated for each tool
- plugindev/templates.go: template shows NoMemory/Cleaner pattern
- plugindev/cmd_build.go: fix ensureGoMod, buildBundle/buildTarget sdkPath param, NewPluginFactory
- example/go.mod: add external dependency declarations (chromedp, gofeed)
- add main.go stubs for all example plugins
2026-07-25 11:17:21 +08:00
95dad649a8 feat: sdk install downloads from Release archive instead of git clone
- Replace git clone --branch with HTTP download from GitCode archive URL
- No git dependency needed for SDK installation
- Extracts tar.gz archive in-memory, strips top-level directory
- Fallback for 'latest' still uses git ls-remote (lightweight)
2026-07-20 11:50:55 +08:00
1834a66bff feat: plugindev build --bundle for multi-platform .hmap
- resolveBuild: use plugin.dylib for darwin (was plugin.so)
- --bundle flag: build linux/amd64 + darwin/amd64 + windows/amd64,
  package all binaries into a single .hmap with platforms field
- writePluginJSON: accept platforms []string for bundle manifest
- add createBundleHmap for zip entries with custom names
- add PlgConfig.IsLua() helper
2026-07-19 12:05:42 +08:00
4f9e064721 fix: read SDK version from meta/meta.go for plugin go.mod
- detectSDKInfo now returns SDK version from meta/meta.go
- Generated plugin go.mod uses real version (v0.7.1) instead of v0.0.0
- Tag v0.7.1 created for SDK version management
2026-07-19 11:17:42 +08:00
49d19fb13c 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
2026-07-19 11:14:27 +08:00
1762f0c34b docs: 修正全部文档使其与源码实现一致
- Plugin.Start(sdk *PluginSDK) 接口签名改为指针
- 方法表重写: 移除 CallLLM/QueryKnowledge/SetMemory 等不存在方法
- IOInjector 参数顺序修正为 (source, channel, text)
- 删除虚构 SDKConfig, 替换为实际 New() 构造函数签名
- .hmap 内容描述一致化 (plugin.so + plugin.dll + main.lua)
- 添加 meta/ 包元数据文件
2026-07-18 20:47:17 +08:00