Files
homeagent-sdk/tools/plugindev/templates
JianFeeeee fc236120e3 feat(shm): 统一共享内存区域(§13.1) — 子进程侧模板适配
- proc_shm_unix.go.tmpl: fd 3 = 统一区域,fd 4 = eventfd
- proc_main.go.tmpl: 握手解析 SuperBlock,从 ctxOff/evtOff 定位两段
- 新增 unified region 常量(magic/version/offset) + StageContext 内部布局常量
2026-09-10 11:46:12 +08:00
..

# {{.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`.