api

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 10 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginGenHandler

type PluginGenHandler struct {
	// contains filtered or unexported fields
}

PluginGenHandler serves the AI plugin generator surface: generate, list, download, delete, and status.

func NewPluginGenHandler

func NewPluginGenHandler(service PluginService, status PluginStatusReader, logger kernel.Logger, buildTimeout time.Duration) *PluginGenHandler

NewPluginGenHandler builds the plugin generator handler. A non-positive buildTimeout selects the default server-side build budget.

func (*PluginGenHandler) Build

Build compiles an installed project to WASM and installs the .wasm plus the synthesized manifest into plugins/. In DEV_MODE the watcher hot-reloads it; otherwise the response asks for a restart.

func (*PluginGenHandler) Delete

func (h *PluginGenHandler) Delete(w http.ResponseWriter, r *http.Request)

Delete removes an installed project.

func (*PluginGenHandler) Download

func (h *PluginGenHandler) Download(w http.ResponseWriter, r *http.Request)

Download streams the project zip.

func (*PluginGenHandler) Generate

func (h *PluginGenHandler) Generate(w http.ResponseWriter, r *http.Request)

Generate creates a plugin project from a natural-language brief, validates it, and installs it as a source project.

func (*PluginGenHandler) List

List returns the installed plugin projects.

func (*PluginGenHandler) Status

func (h *PluginGenHandler) Status(w http.ResponseWriter, r *http.Request)

Status returns loaded-plugin inspection: the .wasm files the host sees.

type PluginService

PluginService is the generation orchestration seam the handler drives. It mirrors the domain Service's persistence-facing methods so mocks stay narrow.

type PluginStatus

type PluginStatus struct {
	Name   string   `json:"name"`
	Status string   `json:"status"`
	Hooks  []string `json:"hooks"`
}

PluginStatus is one loaded plugin for the status projection.

type PluginStatusReader

type PluginStatusReader interface {
	LoadedPlugins(ctx context.Context) []PluginStatus
}

PluginStatusReader exposes loaded-plugin inspection for the read-only status endpoint. It is satisfied by the edition over the plugin system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL