Initial commit: Cyrene Plugins SDK + Plugin Manager

Extracted from Cyrene main repo (backend/pkg/plugins + backend/plugin-manager).
Contains SDK interfaces (Plugin/Tool/HostAPI), 13 built-in plugins,
ToolRegistry with call log ring buffer, and Plugin Manager REST API service.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 09:49:12 +08:00
commit 5c807d76a0
27 changed files with 3609 additions and 0 deletions
@@ -0,0 +1,32 @@
package config
import "os"
type Config struct {
Port string
Env string
DataDir string
IoTSvcURL string
}
func Load() *Config {
cfg := &Config{
Port: "8094",
Env: "development",
DataDir: "./data",
IoTSvcURL: "http://localhost:8093",
}
if v := os.Getenv("PORT"); v != "" {
cfg.Port = v
}
if v := os.Getenv("ENV"); v != "" {
cfg.Env = v
}
if v := os.Getenv("DATA_DIR"); v != "" {
cfg.DataDir = v
}
if v := os.Getenv("IOT_SERVICE_URL"); v != "" {
cfg.IoTSvcURL = v
}
return cfg
}