Documentation
¶
Overview ¶
Package plugingen is the official AI plugin module: the generator over OpenAI-compatible APIs, the filesystem store, and the browser handler.
Index ¶
- Constants
- type Module
- func (m *Module) AdminManifest() kernel.AdminExtensionManifest
- func (m *Module) Handler() *api.PluginGenHandler
- func (m *Module) Init(_ kernel.Kernel) error
- func (m *Module) Name() string
- func (m *Module) Optional() []string
- func (m *Module) Requires() []string
- func (m *Module) Service() *plugingendomain.Service
- func (m *Module) Shutdown() error
- func (m *Module) Version() string
- type Option
Constants ¶
const Name = "plugingen"
Name is the registry key for this module.
const Version = "0.1.0"
Version is the module version reported via Module.Version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is the plugingen kernel module.
func New ¶
New builds the module, adopting the composition root's wiring. The handler is built once here so routes serve the same instance.
func (*Module) AdminManifest ¶
func (m *Module) AdminManifest() kernel.AdminExtensionManifest
AdminManifest declares this module's admin-shell extensions.
func (*Module) Handler ¶
func (m *Module) Handler() *api.PluginGenHandler
Handler exposes the plugin generator handler for core mounting. Core mounts it explicitly (rather than via RouteProvider) because the surface is gated by the plugGenEnabled feature flag, which a single RegisterRoutes call cannot express.
func (*Module) Init ¶
Init wires the module. The handler is already built by New; Init only validates presence.
func (*Module) Requires ¶
Requires lists hard dependencies. Generation degrades without plugin sources, so nothing is required.
func (*Module) Service ¶
func (m *Module) Service() *plugingendomain.Service
Service exposes the orchestration service. It stays valid for the module's lifetime.
type Option ¶
type Option func(*Module)
Option configures a Module. The composition root supplies every option; direct construction without options yields a standalone module that serves nothing (the handler built over nil dependencies must not be invoked).
func WithBuildTimeout ¶
WithBuildTimeout sets the server-side build request budget. Non-positive selects the handler default.
func WithLogger ¶
WithLogger attaches the module logger. Without one handler failures are dropped (discard sink).
func WithRoles ¶ added in v1.8.2
func WithRoles(roles api.RoleCapabilities) Option
WithRoles attaches the role registry for the publish and admin gates. Without one every authenticated caller may call every endpoint (the legacy behavior).
func WithService ¶
func WithService(service *plugingendomain.Service) Option
WithService adopts the orchestration service (composition root, nil when unconfigured). The handler is only mounted when generation is enabled.
func WithStatusReader ¶
func WithStatusReader(reader api.PluginStatusReader) Option
WithStatusReader adopts the loaded-plugin inspection seam for the status endpoint. Without one status returns an empty list.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for plugin generation.
|
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for plugin generation. |
|
Package plugingen is the AI plugin generator module's domain layer: the brief, project, and validation value types, the generation/store ports, and the envelope parser that validates the model's JSON output.
|
Package plugingen is the AI plugin generator module's domain layer: the brief, project, and validation value types, the generation/store ports, and the envelope parser that validates the model's JSON output. |
|
Package infrastructure adapts the plugingen domain port onto OpenAI-compatible chat-completion APIs.
|
Package infrastructure adapts the plugingen domain port onto OpenAI-compatible chat-completion APIs. |
|
Package store persists generated plugin projects on disk: one directory per project under plugins/src, a project.json metadata file, the synthesized capability manifest sidecar, and stdlib zip archives for download and manual installs.
|
Package store persists generated plugin projects on disk: one directory per project under plugins/src, a project.json metadata file, the synthesized capability manifest sidecar, and stdlib zip archives for download and manual installs. |