// Package golem is the golem15.golem plugin: the shared AI layer of // SummerCMS applications. It ports the WinterCMS Golem15.Golem plugin's AI // service (provider adapters for the Anthropic Messages API and the // OpenAI-compatible chat completions API, prompts, image generation, file // uploads, streaming) and its SSRF guard. package golem import ( "embed" "io/fs" "git.golem15.com/golem15/summercms/modules/backpack" "git.golem15.com/golem15/summercms/modules/pact" "git.golem15.com/golem15/summercms/modules/party" ) var ( _ party.Plugin = (*Plugin)(nil) _ pact.HasConfig = (*Plugin)(nil) _ pact.HasLang = (*Plugin)(nil) ) //go:embed config var configFS embed.FS //go:embed lang var langFS embed.FS // Plugin is the golem15.golem plugin. type Plugin struct { app *backpack.App } // ID is the plugin ID, also its config and lang namespace. func (p *Plugin) ID() string { return "golem15.golem" } // Requires is empty: the plugin depends on no other plugin. func (p *Plugin) Requires() []string { return nil } // Register keeps the application. func (p *Plugin) Register(app *backpack.App) error { p.app = app return nil } // Boot keeps the application. func (p *Plugin) Boot(app *backpack.App) error { p.app = app return nil } // ConfigFS ships config/config.yaml, merged under golem15.golem.*. func (p *Plugin) ConfigFS() fs.FS { return configFS } // LangFS ships the golem15.golem lang namespace. func (p *Plugin) LangFS() fs.FS { return langFS } func init() { party.Register(&Plugin{}) }