mirror of
https://gitcode.com/JianFeeeee/homeagent-sdk.git
synced 2026-10-03 23:54:12 +00:00
plugindev: 全面 plg.json 持久化 + --replace 支持 + 文档
This commit is contained in:
38
README_EN.md
38
README_EN.md
@ -136,16 +136,42 @@ Supports both **Go** and **Lua** plugin languages.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "my-plugin",
|
||||
"name": "weather",
|
||||
"name_zh": "天气查询",
|
||||
"name_en": "Weather",
|
||||
"version": "1.0.0",
|
||||
"lang": "go",
|
||||
"entry": "main.go",
|
||||
"description": "Plugin description",
|
||||
"channels": ["my-channel"],
|
||||
"dependencies": {}
|
||||
"description": "Weather plugin",
|
||||
"author": "HomeAgent",
|
||||
"entry": "plugin.so",
|
||||
"tags": ["weather", "forecast"],
|
||||
"targets": "linux/amd64,windows/amd64",
|
||||
"outdir": "dist",
|
||||
"bundle": true,
|
||||
"replaces": {
|
||||
"github.com/example/pkg": "../local/pkg"
|
||||
},
|
||||
"source_dirs": [
|
||||
"../shared-lib"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `name` | string | Plugin identifier |
|
||||
| `name_zh` | string | Chinese name |
|
||||
| `name_en` | string | English name |
|
||||
| `version` | string | Version |
|
||||
| `description` | string | Plugin description |
|
||||
| `author` | string | Author |
|
||||
| `entry` | string | Entry file (`plugin.so` / `main.lua`) |
|
||||
| `tags` | string[] | Tags |
|
||||
| `targets` | string | Build targets, comma-separated (e.g. `linux/amd64,windows/amd64`) |
|
||||
| `outdir` | string | Output directory (default `dist`) |
|
||||
| `bundle` | bool | Bundle mode (build all platforms at once) |
|
||||
| `replaces` | object | Go module replacements, key=module path, value=local path |
|
||||
| `source_dirs` | string[] | Additional source search paths (auto-imported at build time) |
|
||||
|
||||
### .hmap Package Format
|
||||
|
||||
`.hmap` is a ZIP archive containing:
|
||||
|
||||
Reference in New Issue
Block a user