kernel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompletionRegistry

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

CompletionRegistry is the host's implementation of capabilities.Completion. It is created once per Load and handed to plugins through Host.Services() at Init so they can contribute completion sources. Registration is last-wins per trigger (most-recent first), consistent with the registry merge rule. Core (internal/app) reads Loaded.Completion to drive the @file/slash dropdown and adds its own built-in sources.

func (*CompletionRegistry) Register

func (r *CompletionRegistry) Register(source capabilities.CompletionSource)

func (*CompletionRegistry) Sources

type Entry

type Entry struct {
	Kind  capabilities.RegistryKind
	Name  string
	Owner string
	Value any
}

type Hooks

type Hooks struct {
	OnMessage      []capabilities.OnMessage
	OnSessionStart []capabilities.OnSessionStart
	OnToolCall     []capabilities.OnToolCall
	OnShutdown     []capabilities.OnShutdown
}

type LoadOptions

type LoadOptions struct {
	// Defaults are the bundled Default Config plugins, activated first (lowest
	// priority) before the external config's plugins.
	Defaults []cfgpkg.Plugin
	// Settings is the resolved, merged Settings the host exposes to plugins. When
	// nil the loader projects it from cfg.Opts with zero SettingsDefaults.
	Settings *capabilities.Settings
	Logf     func(string, ...any)
}

type Loaded

type Loaded struct {
	Settings capabilities.Settings
	Registry *Registry
	Hooks    Hooks
	Skills   capabilities.SkillProvider
	GitDiff  capabilities.GitDiffProvider
	Question capabilities.QuestionProvider
	// Completion holds the completion sources plugins contributed via
	// Host.Services().Completion().Register at Init. Core consumes these (plus its
	// own built-in @file/slash sources) at runtime.
	Completion *CompletionRegistry
}

func Load

func Load(cfg cfgpkg.Config, opts LoadOptions) (*Loaded, error)

type Registry

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

func NewRegistry

func NewRegistry(logf func(string, ...any)) *Registry

func (*Registry) Disable

func (r *Registry) Disable(keys []capabilities.RegistryKey)

func (*Registry) EntriesInRegistrationOrder

func (r *Registry) EntriesInRegistrationOrder(kind capabilities.RegistryKind) []Entry

func (*Registry) Entry

func (r *Registry) Entry(kind capabilities.RegistryKind, name string) (Entry, bool)

func (*Registry) Register

func (r *Registry) Register(kind capabilities.RegistryKind, name string, value any, owner string) error

func (*Registry) Shadows

func (r *Registry) Shadows() []Shadow

type Shadow

type Shadow struct {
	Kind          capabilities.RegistryKind
	Name          string
	PreviousOwner string
	NewOwner      string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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