Documentation
¶
Index ¶
- type AndroidPlugin
- type GitPlugin
- type HookContext
- type HookType
- type Hookable
- type MCPPlugin
- type NativePlugin
- type Registry
- func (r *Registry) Get(name string) NativePlugin
- func (r *Registry) GetHookablePlugins() []Hookable
- func (r *Registry) Has(name string) bool
- func (r *Registry) List() []string
- func (r *Registry) Register(p NativePlugin)
- func (r *Registry) RunHooks(ctx context.Context, hookType HookType, hookCtx HookContext) []string
- type UpdatePlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndroidPlugin ¶
type AndroidPlugin struct {
// contains filtered or unexported fields
}
AndroidPlugin shows connected Android devices (via adb) Config options:
- display: what to show for each device (default: "serial") Options: serial, model, version, sdk, manufacturer, device, build, arch Combine with colons: "model:version", "device:sdk:build"
- packages: array of package names for version lookup (supports wildcards)
func (*AndroidPlugin) Name ¶
func (p *AndroidPlugin) Name() string
func (*AndroidPlugin) OnHook ¶
func (p *AndroidPlugin) OnHook(ctx context.Context, hookType HookType, hookCtx HookContext) (string, error)
OnHook invalidates cache when Claude becomes idle (fresh data on next render)
func (*AndroidPlugin) SetCache ¶
func (p *AndroidPlugin) SetCache(c *cache.Cache)
type GitPlugin ¶
type GitPlugin struct {
// contains filtered or unexported fields
}
GitPlugin shows git branch and status
type HookContext ¶
HookContext provides context for hook handlers
type HookType ¶
type HookType string
HookType represents the type of hook event
const ( // Core hooks (most useful for plugins) HookIdle HookType = "idle" // Stop - Claude finished responding HookBusy HookType = "busy" // UserPromptSubmit - User submitted prompt HookSessionStart HookType = "session_start" // SessionStart - Session started/resumed HookSessionEnd HookType = "session_end" // SessionEnd - Session ending HookPreCompact HookType = "pre_compact" // PreCompact - Before context compaction )
type Hookable ¶
type Hookable interface {
// OnHook is called when a hook event occurs
// Return value is optional output to display (e.g., notifications)
OnHook(ctx context.Context, hookType HookType, hookCtx HookContext) (string, error)
}
Hookable is an optional interface for plugins that want to respond to state changes
type MCPPlugin ¶
type MCPPlugin struct {
// contains filtered or unexported fields
}
MCPPlugin shows MCP server count
type NativePlugin ¶
type NativePlugin interface {
Name() string
Execute(ctx context.Context, input plugin.Input) (string, error)
SetCache(c *cache.Cache)
}
NativePlugin defines the interface for built-in Go plugins
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all available native plugins
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry creates a new plugin registry with all native plugins
func (*Registry) Get ¶
func (r *Registry) Get(name string) NativePlugin
Get returns a native plugin by name, or nil if not found
func (*Registry) GetHookablePlugins ¶
GetHookablePlugins returns all plugins implementing Hookable
func (*Registry) Register ¶
func (r *Registry) Register(p NativePlugin)
Register adds a plugin to the registry
type UpdatePlugin ¶
type UpdatePlugin struct {
// contains filtered or unexported fields
}
UpdatePlugin shows indicator when Prism update is available
func (*UpdatePlugin) Name ¶
func (p *UpdatePlugin) Name() string
func (*UpdatePlugin) OnHook ¶
func (p *UpdatePlugin) OnHook(ctx context.Context, hookType HookType, hookCtx HookContext) (string, error)
OnHook implements Hookable interface for auto-update and notifications
func (*UpdatePlugin) SetCache ¶
func (p *UpdatePlugin) SetCache(c *cache.Cache)