mirror of
https://gitcode.com/JianFeeeee/homeagent-sdk.git
synced 2026-09-21 17:38:03 +00:00
工具调用/清洗由内核发起,内核标定一块内存帧交给插件(callee), 插件在帧内工作;只有结果超出内核预留预算时才向内核申请扩容块。 - 新增 frameInput/frameOutput/arenaPut:读写调用帧、按需扩容 - tool.invoke:从 frame[0,args_len) 读参数;结果优先写帧结果区, 放不下才 arena.alloc 扩容并打 sharedRefFlagExpand - cleaner.invoke:同一帧模型(frame + input_len) - SharedRef.Flags 语义位与内核对齐(JSON / EXPAND) - 防漂移测试更新为 frame/args_len/result_ref
# {{.Plg.Name}}
{{.Plg.Description}}
## Build
```bash
plugindev build
```
## Install
Upload the `.hmap` file through the Plugin Manager API:
```bash
curl -X POST http://localhost:8080/api/v1/plugins \
-H "Content-Type: application/octet-stream" \
--data-binary @dist/<name_en_snake>_linux_amd64.hmap
```
## Lifecycle
- `RegisterStopHandler` — runs on every stop (including reload/disable), before `Stop()`.
- `RegisterOnRemoveHandler` — runs **only on uninstall (remove)**, after `Stop()`; clean up the plugin's own data files here. Reload/disable do NOT trigger it. See the onRemove demo in `main.go`.