Documentation
¶
Overview ¶
Package plugins discovers, loads, installs and dispatches icebath plugins through one registration context
Index ¶
- Constants
- Variables
- func AInvokeHook(ctx context.Context, hookName string, kwargs map[string]any) []any
- func AcceptShellHooksForLaunch(ctx context.Context) error
- func AcceptShellHooksForProcess()
- func AckAdvisory(ctx context.Context, advisoryID string) bool
- func ActivationSummaries(ctx context.Context, m *Manager) []map[string]any
- func AddShellHook(ctx context.Context, event, command, matcher string, timeout int) error
- func AdmitPluginSetChange(ctx context.Context, enabled, disabled map[string]bool, opts AdmitOptions) error
- func AdvisoryFullRemediationText(ctx context.Context, hit AdvisoryHit) ([]string, error)
- func AdvisoryGatewayLogMessage(ctx context.Context, hits []AdvisoryHit) string
- func AdvisoryShortBannerLines(hits []AdvisoryHit) []string
- func AdvisoryStartupBanner(ctx context.Context, hits []AdvisoryHit) string
- func AllowlistedShellHookPairs(ctx context.Context) map[[2]string]bool
- func ApproveShellHook(ctx context.Context, event, command string) error
- func ArgFloat(v any, def float64) float64
- func AskerBound(ctx context.Context) bool
- func AttachToToolMessage(agent *PluginLiveNotes, message *state.Message)
- func AutoApplyEnabled(ctx context.Context) bool
- func BindAsker(ctx context.Context, asker ChoiceAsker) context.Context
- func BindHostCall(owner, method string, params []HostParam, args []any, kwargs map[string]any) (map[string]any, map[string]any, error)
- func BindSubagentParentRef(ctx context.Context, ref SubagentParentRef) context.Context
- func BroadcastPluginEvent(pluginID, event string, payload any) error
- func BundledPluginKeys() []string
- func BundledPluginsFS() fs.FS
- func CachedGitUpdates(ctx context.Context, installMetadata map[string]any) map[string]string
- func CapabilityGranted(ctx context.Context, pluginID, capability string) bool
- func CapabilitySetHash(caps []string) string
- func CatalogCap(f skills.Finding) (string, bool)
- func CatalogEntryRunsHere(ctx context.Context, entry *PluginCatalogEntry) bool
- func CatalogInstallRecord(ctx context.Context, pluginDir string) (map[string]any, error)
- func CatalogRowFields(h, dir string, pins, versions map[string]string) (map[string]any, error)
- func CatalogRowsMaps(ctx context.Context) (map[string]string, map[string]string, map[string]string)
- func CategoryActiveNames(ctx context.Context) map[string]bool
- func CheckDue(ctx context.Context, now, intervalHours *float64) bool
- func CheckIntervalHours(ctx context.Context) float64
- func ClearPublishedGatewayMessageHost(owner any)
- func ClearPublishedTUIMessageHost(owner any)
- func CmdAdopt(ctx context.Context, name string, out io.Writer) error
- func CmdCapabilities(ctx context.Context, name *string, out io.Writer) error
- func CmdCheckUpdates(ctx context.Context, asJSON bool, out io.Writer) error
- func CmdDisable(ctx context.Context, name string, out io.Writer) error
- func CmdEnable(ctx context.Context, name string, allowToolOverride *bool, out io.Writer) error
- func CmdInfo(ctx context.Context, name string, out io.Writer) error
- func CmdInstall(ctx context.Context, opts InstallCommandOptions, out io.Writer) error
- func CmdList(ctx context.Context, opts ListOptions, out io.Writer) error
- func CmdPackExport(ctx context.Context, enabledOnly bool, name string, out, errOut io.Writer) error
- func CmdPackInstall(ctx context.Context, source string, force bool, out io.Writer) error
- func CmdPackShow(ctx context.Context, source string, out io.Writer) error
- func CmdPluginDoctor(ctx context.Context, target string, ci bool, out io.Writer) error
- func CmdRemove(ctx context.Context, name string, out io.Writer) error
- func CmdSearch(ctx context.Context, term string, jsonOutput bool, out io.Writer) error
- func CmdShow(ctx context.Context, name string, out io.Writer) error
- func CmdToggle(ctx context.Context, out io.Writer) error
- func CmdTrustUpdateURL(ctx context.Context, name string, out io.Writer) error
- func CmdUpdate(ctx context.Context, name string, interactive, force bool, out io.Writer) error
- func CmdUpdateAll(ctx context.Context, yes bool, out io.Writer) error
- func CmdValidate(ctx context.Context, path string, asJSON, installDeps bool, ...) error
- func ConsentHash(ctx context.Context, pluginID string) string
- func DeclaredSetChanged(ctx context.Context, pluginID string, declared []string) bool
- func DecodeOrderedObject(raw []byte) ([]string, map[string]any, error)
- func DependencyBlockedSummaries(ctx context.Context, m *Manager) []map[string]any
- func DescribeGithubFailure(err error, authenticated bool, now *float64) string
- func DirectoryHookTimeout(raw any) int
- func DisabledPluginSet(ctx context.Context) map[string]bool
- func DisabledPlugins(h string) map[string]bool
- func DiscoverPlugins(ctx context.Context, force bool)
- func EnabledPluginSet(ctx context.Context) map[string]bool
- func EnqueuePluginStreamHook(ctx context.Context, hookName string, payload map[string]any) bool
- func EntryCapabilitySummary(e *PluginCatalogEntry) string
- func ErrorTypeName(err error) string
- func ExportPack(ctx context.Context, enabledOnly bool, packName string) (string, []string, error)
- func FetchLiveCatalog(ctx context.Context, force bool) map[string]any
- func FieldsOf(v any) map[string]any
- func FindEngineDir(ctx context.Context, name string) (string, bool)
- func FindPluginEntryDir(plugin string) (string, bool, error)
- func FirePreCommandHook(ctx context.Context, surface, command, aliasUsed, argsRaw string, ...)
- func FlushOutboundWebhooks(timeout time.Duration) bool
- func FormatPluginScanReport(result skills.ScanResult) string
- func FormatSessionResetNotice(mode string) string
- func FormatSystemPromptSection(sectionID, content string) string
- func FormatSystemPromptSections(sections []RenderedSystemPromptSection) string
- func GetAckedAdvisoryIDs(ctx context.Context) map[string]bool
- func GetActiveSubagentParent(ctx context.Context) any
- func GetBundledPluginsDir() string
- func GetPluginAuxiliaryTasks(ctx context.Context) []map[string]any
- func GetPluginCommandOrder(ctx context.Context) []string
- func GetPluginCommands(ctx context.Context) map[string]*PluginCommand
- func GetPluginContextEngine(ctx context.Context) any
- func GetPluginErrorClassification(ctx context.Context, in ErrorClassificationInput) (map[string]any, error)
- func GetPluginToolsetKeysNowait(ctx context.Context) map[string]bool
- func GetPortableMCPServerNamesNowait(ctx context.Context) map[string]bool
- func GetPreVerifyContinueMessage(ctx context.Context, in PreVerifyInput) string
- func GithubToken() (string, bool)
- func GithubTokenFromEnv(getenv func(string) string) (string, bool)
- func GrantedCapabilities(ctx context.Context, pluginID string) map[string]bool
- func GuestPluginDirs(root string) []string
- func GuestProvides(dir, category string) bool
- func HasEnabledAgentPluginMCP(ctx context.Context, rawConfig map[string]any) bool
- func HasHook(ctx context.Context, hookName string) bool
- func HasMiddleware(ctx context.Context, kind string) bool
- func HasReasoningStreamObserverHooks(ctx context.Context) bool
- func HasStreamObserverHooks(ctx context.Context) bool
- func HeldStreamTransforms(ctx context.Context) []*hookEntry
- func HooksCommand(ctx context.Context, args HooksArgs, w io.Writer) error
- func HooksOverview(ctx context.Context) ([]HookView, []WebhookView, error)
- func HostCallable(fn func(ctx context.Context, args []any, kwargs map[string]any) (any, error)) any
- func HostLauncher(ctx context.Context) ([]string, error)
- func InPluginLoadWorker(ctx context.Context) bool
- func InTreeCatalogTime() *float64
- func InspectPluginSource(ctx context.Context, identifier, catalogName string) (map[string]any, error)
- func InstallServices(s *Services)
- func InstalledInSelectedEnvironment(ctx context.Context, requirements []string) bool
- func InteractiveScanDecision(console *Console, verb string) func(scan any) bool
- func InvalidateLiveCacheForHome(h string)
- func InvokeHook(ctx context.Context, hookName string, kwargs map[string]any) []any
- func InvokePluginCommand(ctx context.Context, handler PluginCommandHandler, rawArgs string, ...) (any, error)
- func IsAgentFacing(f skills.Finding) bool
- func IsAllowedImageURL(raw string) bool
- func IsAuthorizedKeysProse(f skills.Finding, line string, isDoc bool) bool
- func IsBase64ArchiveRoundtrip(f skills.Finding, line string) bool
- func IsBase64Media(line string) bool
- func IsBenignLazyOSImport(f skills.Finding, line string) bool
- func IsCIWorkflow(relPath string) bool
- func IsCoinNameOnly(f skills.Finding, line string) bool
- func IsDisclosedConfigNote(f skills.Finding, relPath string) bool
- func IsDocProse(relPath string) bool
- func IsEnvDumpInSafetyClause(f skills.Finding, line string) bool
- func IsHexInCharClass(f skills.Finding, line string) bool
- func IsInertFixtureLine(f skills.Finding, line string, isCode bool, relPath string) bool
- func IsJSONProseValue(f skills.Finding, relPath, line string) bool
- func IsLocaleCatalog(relPath string) bool
- func IsLoopbackContinuation(f skills.Finding, line, joined string) bool
- func IsLoopbackOnly(f skills.Finding, line string) bool
- func IsOwnProcRead(f skills.Finding, line string) bool
- func IsPipInstallInProseLiteral(f skills.Finding, line string) bool
- func IsPluginEventID(key string) bool
- func IsPortablePluginDir(dir string) bool
- func IsPublicClientKey(f skills.Finding, line string) bool
- func IsQuotedInjectionPhrase(f skills.Finding, line string) bool
- func IsRegexAlternationToken(f skills.Finding, line string) bool
- func IsRepoRootTraversal(f skills.Finding, line string) bool
- func IsSelfUninstallDoc(f skills.Finding, line string) bool
- func IsSudoInert(f skills.Finding, line, relPath string) bool
- func IsTestTree(relPath string) bool
- func IsTrustedInstallerPipe(f skills.Finding, line string) bool
- func IsValidSystemPromptSectionID(value any) bool
- func KeepAfterTurnBudget(agent *PluginLiveNotes, batch []*state.Message)
- func ListedPluginStatus(ctx context.Context, e PluginEntry, enabled, disabled, active map[string]bool) (string, error)
- func LoadAndGoLive(ctx context.Context, name string) (map[string]any, error)
- func LoadNamed(name, pluginDir string, loadFromDir func(dir string) (any, error), ...) any
- func LoadShellHookAllowlist(ctx context.Context) map[string]any
- func LogicalLine(lines []string, index int) string
- func LooksLikeCatalogName(identifier string) bool
- func MiddlewarePayload(kwargs map[string]any) map[string]any
- func MissingPythonDependencies(ctx context.Context, mf *Manifest) []string
- func ObserverPayload(kwargs map[string]any) map[string]any
- func OrderedDict(keys []string, values map[string]any) map[string]any
- func PackCommand(ctx context.Context, args PackArgs, out, errOut io.Writer) error
- func ParseDeclaredCapabilities(raw any, pluginName string) []string
- func PendingCapabilities(ctx context.Context, pluginID string, declared []string) []string
- func PinnedRevision(ctx context.Context, name string, metadata map[string]any) (string, error)
- func PluginCommandContext(ctx context.Context) map[string]any
- func PluginEventName(pluginID, event string) (string, error)
- func PluginRelativeSegments(key string) ([]string, error)
- func PluginSettingsFields(ctx context.Context, h, pluginID, pluginDir string) []map[string]any
- func PluginStorageDir(ctx context.Context, name string) (string, error)
- func PluginsInBothLists(h string) []string
- func PopPluginNotices(agent *PluginLiveNotes) string
- func PortableLiveness(server string) map[string]any
- func PortableMCPServerName(server string) string
- func PortableMCPServers(h string) (map[string]map[string]any, error)
- func ProbeAvailability(load func() (any, error)) (ok bool)
- func ProseCap(f skills.Finding) (string, bool)
- func PublishGatewayMessageHost(owner any, injector MessageInjector)
- func PublishTUIMessageHost(owner any, injector MessageInjector)
- func QueuePluginNotice(agent *PluginLiveNotes, pluginKey, note string)
- func ReRegisterOutboundWebhooks(ctx context.Context) error
- func ReadInstallMetadata(h string) (map[string]any, error)
- func ReadManifestForInstall(pluginDir string) (map[string]any, error)
- func ReadPluginDescription(dir string) string
- func ReadSidecarRows(pluginsDir string) map[string]any
- func RecordConsent(ctx context.Context, h, pluginID string, granted, declared []string) error
- func ReferenceKeys(ctx context.Context, surface string) map[string]bool
- func RegisterActiveSettings(h string)
- func RegisterBundled(p Plugin)
- func RegisterPort(p Plugin)
- func RegisterProviderRegistry(kind string, registry func() ScopedRegistry)
- func RegisteredProviderRegistries() map[string]ScopedRegistry
- func RemoveInstalledPlugin(ctx context.Context, h, target string) error
- func RemoveShellHook(ctx context.Context, event, command string) (int, error)
- func RequiresVersionError(spec string) string
- func ResetOutboundWebhooksForTests()
- func ResetPluginEnabled(ctx context.Context) bool
- func ResetPluginManagersForTests()
- func ResetShellHooksForTests()
- func ResolveDirectoryHookCommand(hookDir, command string) ([]string, error)
- func ResolveLoadOrder(manifests map[string]*Manifest) []string
- func ResolveManifestWinners(manifests []*Manifest) map[string]*Manifest
- func ResolvePluginCommandResult(ctx context.Context, result any) (any, error)
- func ResolvePluginPath(ctx context.Context, target string) (string, error)
- func RevokeShellHook(ctx context.Context, command string) (int, error)
- func RunDirectoryHook(ctx context.Context, eventType, hookDir string, argv []string, timeout int, ...) (any, error)
- func RunLLMExecutionMiddleware(ctx context.Context, request map[string]any, next NextCall, ...) (any, error)
- func RunToolExecutionMiddleware(ctx context.Context, toolName string, args map[string]any, next NextCall, ...) (any, error)
- func RunVerifyCommand(ctx context.Context, ns map[string]any, w, errw io.Writer) int
- func SavePluginSetting(ctx context.Context, h, pluginID string, segments []string, value any) error
- func SavePluginSettings(ctx context.Context, h, pluginID, pluginDir string, ...) ([]string, error)
- func SaveShellHookAllowlist(ctx context.Context, data map[string]any) error
- func ScanBlockedResult(blocked *PluginScanBlocked) map[string]any
- func ScanPlugin(pluginDir, source string) skills.ScanResult
- func SecretEnvName(pluginID, key string, spec map[string]any) string
- func SessionCwd(ctx context.Context) (string, error)
- func SessionSurface(ctx context.Context) string
- func SetAgentPluginEnabled(ctx context.Context, name string, enabled bool) (map[string]any, error)
- func ShellHookAllowlistEntry(ctx context.Context, event, command string) map[string]any
- func ShellHookAllowlistPath(ctx context.Context) string
- func ShellHookDirective(result *ShellHookResult) (string, error)
- func ShellHookEvents() []string
- func ShellHookScriptIsExecutable(command string) bool
- func ShellHookScriptMtimeISO(command string) (string, bool)
- func ShouldAllowPluginInstall(result skills.ScanResult, force bool) (*bool, string)
- func StartBackgroundPluginDiscovery(ctx context.Context)
- func StreamHeld(ctx context.Context) bool
- func StreamReasoningDeltasEnabled(ctx context.Context) bool
- func SuppressPluginDiscovery(ctx context.Context) context.Context
- func SwapBundled(add ...Plugin) (restore func())
- func SwapCatalogDir(dir string) func()
- func SweepPendingPluginDeletes(ctx context.Context)
- func SyncShellHooksFromConfig(ctx context.Context)
- func TimedSessionReset(cfg any) (mode string, ok bool)
- func UnattendedInstallPlugin(ctx context.Context, opts UnattendedInstallOptions) (map[string]any, error)
- func UnattendedRemoveUserPlugin(ctx context.Context, name string) (map[string]any, error)
- func UnattendedUpdateUserPlugin(ctx context.Context, name string, acceptCapabilities, force bool) (map[string]any, error)
- func UserPluginsDir(ctx context.Context) (string, bool)
- func ValidCapabilityIDs() []string
- func ValidHooks() []string
- func ValidateConfigSchema(pluginID string, schema map[string]map[string]any, settings map[string]any) []string
- func ValidateConfigSeed(pluginID string, seed any) (map[string]any, error)
- func VersionSatisfies(spec, current string) bool
- func WithOrderedResult(ctx context.Context) context.Context
- func WithSharedDependencyAnswers(ctx context.Context) context.Context
- func WithToolWhitelist(ctx context.Context, allowed map[string]bool, denyFmt string) context.Context
- type AdmissionRefused
- type AdmitOptions
- type Advisory
- type AdvisoryHit
- type AdvisoryPackage
- type AgentPluginDiagnostic
- type AgentPluginError
- type AgentPluginPackage
- type AgentPluginServerDeclaration
- type AgentPluginSkill
- type AuxLLMRequest
- type AuxTaskOptions
- type Awaitable
- type BlueprintSpec
- type CLICommand
- type CLIOutcome
- type CallbackPanicError
- type CapabilitySpec
- type CatalogCapabilities
- type CatalogInstallOptions
- type Channel
- func (c *Channel) Call(ctx context.Context, method string, params map[string]any, ...) (any, error)
- func (c *Channel) Close(reason string)
- func (c *Channel) ClosedReason() (string, bool)
- func (c *Channel) ContextOf(id any) context.Context
- func (c *Channel) Request(ctx context.Context, method string, params map[string]any, ...) (map[string]any, error)
- func (c *Channel) Start() *Channel
- type CheckResult
- type ChoiceAsker
- type CommandExit
- type CommandSpec
- type ConsentRefusal
- type Console
- type Context
- func (c *Context) APostMessage(ctx context.Context, text string) (*PluginMessage, error)
- func (c *Context) AskChoice(ctx context.Context, question string, choices []any) (string, bool, error)
- func (c *Context) CallMCP(ctx context.Context, server, tool string, arguments map[string]any, ...) (map[string]any, error)
- func (c *Context) CredentialedProviderRequest(ctx context.Context, provider, method, url string, json any, ...) (*ProviderRequestAnswer, error)
- func (c *Context) CurrentCronExecution(ctx context.Context) (any, error)
- func (c *Context) DelegationBackends() (any, error)
- func (c *Context) DispatchTool(ctx context.Context, toolName string, args map[string]any, ...) (string, error)
- func (c *Context) Emit(ctx context.Context, event string, payload map[string]any) (int, error)
- func (c *Context) GetConfig(ctx context.Context, key string, def any) (any, error)
- func (c *Context) HasCapability(ctx context.Context, capability string) bool
- func (c *Context) HasPlugin(pluginID string) bool
- func (c *Context) HomeContext() context.Context
- func (c *Context) InjectMessage(ctx context.Context, content, role, sessionKey string, origin any) bool
- func (c *Context) LLM() *PluginLlm
- func (c *Context) MemoryProvider() any
- func (c *Context) OnUnload(callback func() error) (*Registration, error)
- func (c *Context) PlatformActions() (any, error)
- func (c *Context) PluginDir() string
- func (c *Context) PluginID() string
- func (c *Context) PostMessage(ctx context.Context, text string) *PluginMessage
- func (c *Context) ProfileName(ctx context.Context) string
- func (c *Context) RegisterApprovalTransport(ctx context.Context, name string, present tools.ApprovalPresentFunc) error
- func (c *Context) RegisterAutomationBlueprint(key any, spec BlueprintSpec) (*Registration, error)
- func (c *Context) RegisterAuxiliaryTask(rawKey any, opts AuxTaskOptions) (*Registration, error)
- func (c *Context) RegisterBrowserPageBackend(p any) (*Registration, error)
- func (c *Context) RegisterBrowserProvider(p any) (*Registration, error)
- func (c *Context) RegisterCLICommand(name, help string, setup func(parser any), handler func(args any) error, ...) *Registration
- func (c *Context) RegisterCommand(name string, handler PluginCommandHandler, ...) *Registration
- func (c *Context) RegisterContextEngine(engine any) (*Registration, error)
- func (c *Context) RegisterContextReference(provider any) (*Registration, error)
- func (c *Context) RegisterDelegationProvider(p any) (*Registration, error)
- func (c *Context) RegisterHook(hookName string, fn HookFunc, holdStream bool) *Registration
- func (c *Context) RegisterImageGenProvider(p any) (*Registration, error)
- func (c *Context) RegisterLocale(lang string, source any, endonym string, rtl bool, surface string) (*Registration, error)
- func (c *Context) RegisterLocaleDir(path string, metadata map[string]map[string]any) []*Registration
- func (c *Context) RegisterLoginBackend(p any) (*Registration, error)
- func (c *Context) RegisterMemoryProvider(provider any) error
- func (c *Context) RegisterMiddleware(kind string, fn MiddlewareFunc) *Registration
- func (c *Context) RegisterPlatform(spec PlatformSpec) (*Registration, error)
- func (c *Context) RegisterPlatformHandler(platform string, factory any) error
- func (c *Context) RegisterProvider(kind string, provider any) (*Registration, error)
- func (c *Context) RegisterRedactionPatterns(patterns any) int
- func (c *Context) RegisterSecretSource(source any) (*Registration, error)
- func (c *Context) RegisterSkill(name, path, description string, frontmatter map[string]any) (*Registration, error)
- func (c *Context) RegisterSlackActionHandler(actionID any, callback any) (*Registration, error)
- func (c *Context) RegisterSystemPromptSection(id string, content any, opts ...SectionOption) (*Registration, error)
- func (c *Context) RegisterTTSProvider(p any) (*Registration, error)
- func (c *Context) RegisterTelegramHandler(factory any) error
- func (c *Context) RegisterTerminalEnvironmentProvider(p any) (*Registration, error)
- func (c *Context) RegisterTool(ctx context.Context, spec ToolSpec) (*Registration, error)
- func (c *Context) RegisterTranscriptionProvider(p any) (*Registration, error)
- func (c *Context) RegisterVideoGenProvider(p any) (*Registration, error)
- func (c *Context) RegisterWebSearchProvider(p any) (*Registration, error)
- func (c *Context) RegisterWidget(spec WidgetSpec) (*Registration, error)
- func (c *Context) SessionCwd(ctx context.Context) (string, error)
- func (c *Context) SessionSurface(ctx context.Context) (string, error)
- func (c *Context) SetConfig(ctx context.Context, key string, value any) error
- func (c *Context) SideQuestion(ctx context.Context, token, prompt, timeout any) (*string, error)
- func (c *Context) SpawnTask(ctx context.Context, fn func(context.Context) error, name string) (*PluginTask, error)
- func (c *Context) State(ctx context.Context) *PluginState
- func (c *Context) SubagentLifecycle() *SubagentLifecycleService
- func (c *Context) Subscribe(event string, fn EventFunc) error
- func (c *Context) WithDelegationSink(sink func(provider any)) *Context
- type ContextEngineInfo
- type Dataclass
- type DeferredPlatformLoader
- type DependencyConflict
- type DiscordActionChannel
- type DiscordActionClient
- type DiscordActionMessage
- type DoctorFinding
- type EnvSpec
- type ErrorClassificationInput
- type EventFunc
- type FileNotFoundError
- type GitTimeoutError
- type GithubHTTPError
- type HookCheck
- type HookFunc
- type HookRefusal
- type HookView
- type HooksArgs
- type HostBuiltinError
- type HostEvent
- type HostFacade
- type HostObjectFacade
- type HostParam
- type HostedCallOptions
- type HostedCallable
- type HostedDerive
- type HostedObject
- func CollectMemoryProviderInHost(ctx context.Context, name, providerDir string, registerSkills bool, ...) (*HostedObject, error)
- func LoadCategoryInstance(ctx context.Context, pluginDir, baseRef, capture string, ...) (*HostedObject, error)
- func LoadComputerUseProviderInHost(ctx context.Context, providerDir string) (*HostedObject, error)
- func LoadContextEngine(ctx context.Context, name string) *HostedObject
- func (o *HostedObject) AcceptsKeyword(method, keyword string) bool
- func (o *HostedObject) BindPlatform(ctx context.Context, installHandle bool, ...) error
- func (o *HostedObject) Call(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
- func (o *HostedObject) CallBuilt(ctx context.Context, method string, args []any, kwargs map[string]any, ...) (any, error)
- func (o *HostedObject) DefinedOutside(ctx context.Context, module string, names []string) (map[string]bool, error)
- func (o *HostedObject) Dismiss(ctx context.Context)
- func (o *HostedObject) Get(ctx context.Context, name string) (any, error)
- func (o *HostedObject) HasMethod(name string) bool
- func (o *HostedObject) LoginBackendCall(ctx context.Context, op string, params map[string]any) (any, error)
- func (o *HostedObject) MethodIsAsync(name string) bool
- func (o *HostedObject) Next(ctx context.Context) (item any, ok bool, err error)
- func (o *HostedObject) PlatformCall(ctx context.Context, name string, args []any, kwargs map[string]any, ...) (any, error)
- func (o *HostedObject) Set(ctx context.Context, name string, value any) error
- func (o *HostedObject) String() string
- type HostedProfile
- type HostedProfileCall
- type HostedScopedRegistry
- func (r HostedScopedRegistry) Accepts(provider any) bool
- func (r HostedScopedRegistry) Identity(provider any) error
- func (r HostedScopedRegistry) ProviderName(provider any) string
- func (r HostedScopedRegistry) Register(provider any, scope string) (bool, error)
- func (r HostedScopedRegistry) Restore(name string, current, replacement any, scope string) bool
- func (r HostedScopedRegistry) Snapshot(name, scope string) any
- type InstallCommandOptions
- type InstallPhase
- type ListOptions
- type LoadedPlugin
- type MCPConnector
- type Manager
- func (m *Manager) AInvokeHook(ctx context.Context, hookName string, kwargs map[string]any) []any
- func (m *Manager) ApplyLLMRequestMiddleware(request map[string]any, context map[string]any) RequestMiddlewareResult
- func (m *Manager) ApplyToolRequestMiddleware(goctx context.Context, toolName string, args, originalArgs map[string]any, ...) (RequestMiddlewareResult, error)
- func (m *Manager) AuxiliaryTasks() map[string]map[string]any
- func (m *Manager) CLICommands() map[string]*CLICommand
- func (m *Manager) ClearGatewayMessageInjector(owner any)
- func (m *Manager) ClearTUIMessageInjector(owner any)
- func (m *Manager) ContextEngine() any
- func (m *Manager) DiscoverAndLoad(ctx context.Context, force bool)
- func (m *Manager) EnabledPluginsDeclaring(capability string) []string
- func (m *Manager) FindPluginSkill(qualified string) (string, bool)
- func (m *Manager) GetApprovalTransport(ctx context.Context, name string) *tools.RegisteredApprovalTransport
- func (m *Manager) GetPlatformHandlerFactories(platform string) []*PlatformHandlerFactory
- func (m *Manager) GetPortableMCPServerPlugins() map[string]string
- func (m *Manager) GetPortableMCPServers() map[string]map[string]any
- func (m *Manager) GetSlackActionHandlers() []*SlackActionHandler
- func (m *Manager) GetTelegramHandlerFactories() []*PlatformHandlerFactory
- func (m *Manager) GuestHosts() []*PluginHost
- func (m *Manager) HasEnabledPortableMCP(rawConfig map[string]any) bool
- func (m *Manager) HasGatewayMessageInjector() bool
- func (m *Manager) HasHook(hookName string) bool
- func (m *Manager) HasMiddleware(kind string) bool
- func (m *Manager) HasPortableMCPServers() bool
- func (m *Manager) HasTUIMessageInjector() bool
- func (m *Manager) HeldTransforms() []*hookEntry
- func (m *Manager) HoldsStream() bool
- func (m *Manager) InjectGatewayMessage(ctx context.Context, kwargs map[string]any) bool
- func (m *Manager) InjectTUIMessage(ctx context.Context, kwargs map[string]any) bool
- func (m *Manager) InvokeHook(ctx context.Context, hookName string, kwargs map[string]any) []any
- func (m *Manager) InvokeMiddleware(kind, payloadKey string, kwargs map[string]any) []any
- func (m *Manager) IterHookCallbacks(hookName string) []HookFunc
- func (m *Manager) ListAutomationBlueprints() []any
- func (m *Manager) ListPluginSkillMetadata() []map[string]any
- func (m *Manager) ListPluginSkills(pluginName string) []string
- func (m *Manager) ListPlugins() []map[string]any
- func (m *Manager) LoadFailures() [][2]string
- func (m *Manager) LoadedPluginsInOrder() []OrderedPlugin
- func (m *Manager) MarkDiscoveredForTests()
- func (m *Manager) OnPluginLoaded(callback func(summaries []map[string]any)) (func(), error)
- func (m *Manager) OwnedRegistrations(pluginKey string) []*Registration
- func (m *Manager) PluginCommandOrder() []string
- func (m *Manager) PluginCommands() map[string]*PluginCommand
- func (m *Manager) PluginKeys() []string
- func (m *Manager) RearmFailedPlatform(ctx context.Context, platformName string) bool
- func (m *Manager) RegisterApprovalTransport(ctx context.Context, name string, present tools.ApprovalPresentFunc, ...) error
- func (m *Manager) RegistrationOrder() []*Registration
- func (m *Manager) RemovePluginSkill(qualified string)
- func (m *Manager) RenderSystemPromptSections(sessionInfo map[string]any) []RenderedSystemPromptSection
- func (m *Manager) RunHeldTransforms(ctx context.Context, callbacks []*hookEntry, kwargs map[string]any) (string, bool)
- func (m *Manager) RunLLMExecutionMiddleware(request map[string]any, next NextCall, context map[string]any) (any, error)
- func (m *Manager) RunToolExecutionMiddleware(toolName string, args map[string]any, next NextCall, context map[string]any) (any, error)
- func (m *Manager) ScopeKey() string
- func (m *Manager) SetGatewayMessageInjector(owner any, injector MessageInjector)
- func (m *Manager) SetTUIMessageInjector(owner any, injector MessageInjector)
- func (m *Manager) TrackHook(c *Context, hookName string, fn HookFunc, holdStream bool) *Registration
- func (m *Manager) Unload(plugin any) bool
- func (m *Manager) Widgets() []Widget
- type Manifest
- func CatalogPortManifest(name string) Manifest
- func CollectDirectoryManifests(h string) []*Manifest
- func DiscoverEntrypointManifests(ctx context.Context) []*Manifest
- func ParseManifestFile(file, dir, source, prefix string) *Manifest
- func ScanDirectory(path, source string, skipNames map[string]bool) []*Manifest
- type ManifestGate
- type MessageInjector
- type MessageReactionAdapter
- type MiddlewareFunc
- type NamedPresence
- type NextCall
- type Opaque
- type OrderedPlugin
- type OutboundWebhookTarget
- func IterConfiguredOutboundWebhooks(ctx context.Context) ([]*OutboundWebhookTarget, error)
- func NewOutboundWebhookTarget(url string, events []string, name, secret, matcher string, timeout int) *OutboundWebhookTarget
- func RegisterOutboundWebhooksFromConfig(ctx context.Context) ([]*OutboundWebhookTarget, error)
- type PackArgs
- type PackError
- type PackInstallResult
- type PackPluginEntry
- type PackSeed
- type PlatformActionAdapter
- type PlatformActionRunner
- type PlatformActions
- func (p *PlatformActions) AddReaction(ctx context.Context, platform, chatID, messageID, emoji any) map[string]any
- func (p *PlatformActions) HostAttr(_ context.Context, name string) (any, bool, bool, error)
- func (p *PlatformActions) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
- func (p *PlatformActions) SetThreadTitle(ctx context.Context, platform, chatID, threadID, title any) map[string]any
- type PlatformCallOptions
- type PlatformDeclarations
- type PlatformHandlerFactory
- type PlatformRegistry
- type PlatformSlot
- type PlatformSpec
- type Plugin
- type PluginCatalogEntry
- func EntryFromMapping(raw any, label string) *PluginCatalogEntry
- func FilterEntries(entries []*PluginCatalogEntry, query string) []*PluginCatalogEntry
- func GetCatalogEntry(name, dir string) *PluginCatalogEntry
- func GetLiveCatalogEntry(ctx context.Context, name string) *PluginCatalogEntry
- func GetPluginCatalogEntry(name string) (*PluginCatalogEntry, error)
- func LoadCatalog(dir string) []*PluginCatalogEntry
- func LoadCatalogLive(ctx context.Context) []*PluginCatalogEntry
- type PluginCommand
- type PluginCommandHandler
- type PluginCommandTimeoutError
- type PluginDependency
- type PluginDoctorReport
- type PluginEntry
- type PluginEventNameError
- type PluginEventPayloadError
- type PluginHost
- func (h *PluginHost) Alive() bool
- func (h *PluginHost) Home() string
- func (h *PluginHost) Info() map[string]any
- func (h *PluginHost) Load(ctx context.Context, mf *Manifest, pctx *Context) error
- func (h *PluginHost) LoadInstance(ctx context.Context, pluginDir, baseRef, capture string, pctx *Context, ...) (*HostedObject, error)
- func (h *PluginHost) PID() int
- func (h *PluginHost) ProfileCall(ctx context.Context, pluginDir, moduleName, profile, attr string, args []any, ...) (any, error)
- func (h *PluginHost) Shutdown()
- type PluginHostError
- type PluginHostUnavailable
- type PluginHostUnsupported
- type PluginLLMClient
- type PluginLiveNotes
- type PluginLlm
- func (l *PluginLlm) AComplete(ctx context.Context, messages []any, o PluginLlmOptions) (*PluginLlmCompleteResult, error)
- func (l *PluginLlm) ACompleteStructured(ctx context.Context, spec PluginLlmStructuredRequest, o PluginLlmOptions) (*PluginLlmStructuredResult, error)
- func (l *PluginLlm) Complete(ctx context.Context, messages []any, o PluginLlmOptions) (*PluginLlmCompleteResult, error)
- func (l *PluginLlm) CompleteStructured(ctx context.Context, spec PluginLlmStructuredRequest, o PluginLlmOptions) (*PluginLlmStructuredResult, error)
- func (l *PluginLlm) HostAttr(_ context.Context, name string) (any, bool, bool, error)
- func (l *PluginLlm) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
- type PluginLlmCompleteResult
- type PluginLlmImageInput
- type PluginLlmOptions
- type PluginLlmStructuredRequest
- type PluginLlmStructuredResult
- type PluginLlmTextInput
- type PluginLlmTrustError
- type PluginLlmUsage
- type PluginLoadTimeout
- type PluginMessage
- func (h *PluginMessage) AEdit(ctx context.Context, text string) (map[string]any, error)
- func (h *PluginMessage) Edit(ctx context.Context, text string) map[string]any
- func (h *PluginMessage) ErrorCode() any
- func (h *PluginMessage) ErrorKind() string
- func (h *PluginMessage) HostAttr(_ context.Context, name string) (any, bool, bool, error)
- func (h *PluginMessage) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
- func (h *PluginMessage) MessageID() any
- func (h *PluginMessage) OK() bool
- func (h *PluginMessage) Pending() bool
- func (h *PluginMessage) Quoted() string
- func (h *PluginMessage) Result() map[string]any
- func (h *PluginMessage) String() string
- type PluginOperationError
- type PluginPack
- type PluginPanicError
- type PluginPathNotFoundError
- type PluginPermissionError
- type PluginScanBlocked
- type PluginSettingValue
- type PluginSettingsValueError
- type PluginSkill
- type PluginSourceMoved
- type PluginState
- func (s *PluginState) DataDir() string
- func (s *PluginState) Get(key string, def any) (any, error)
- func (s *PluginState) HostAttr(_ context.Context, name string) (any, bool, bool, error)
- func (s *PluginState) HostCall(_ context.Context, method string, args []any, kwargs map[string]any) (any, error)
- func (s *PluginState) Path() string
- func (s *PluginState) QuotaBytes() int
- func (s *PluginState) Set(key string, value any) error
- type PluginTask
- type PluginToolOverrideError
- type PluginToolset
- type PortableAvailability
- type PreToolCallDirective
- type PreToolCallIDs
- type PreVerifyInput
- type Presence
- type Provenance
- type ProvenanceClass
- type ProviderRequestAnswer
- type Record
- type Registration
- type RemovedEntry
- func FindRemoved(ctx context.Context, nameOrRepo, dir string) *RemovedEntry
- func InstalledPluginRemoval(h, name, pluginDir string) *RemovedEntry
- func LiveRemovedList(ctx context.Context) []RemovedEntry
- func MatchRemoved(candidate string, entries []RemovedEntry) *RemovedEntry
- func ResolvedRemovedEntries(ctx context.Context) []RemovedEntry
- type RenderedSystemPromptSection
- type RepinConsentRequired
- type RepinResult
- type ReplacementCoordinator
- type ReplacementLease
- type RequestMiddlewareResult
- type ResolvedPackPlugin
- type RunChecksOptions
- type ScheduledCheckOptions
- type ScopedRegistry
- type SecretSourceInfo
- type SecretSources
- type SectionOption
- type ServerLiveness
- type ServiceMissingError
- type Services
- type SetOf
- type ShellHookResult
- type ShellHookSpec
- func IterConfiguredShellHooks(ctx context.Context) []*ShellHookSpec
- func NewShellHookSpec(event, command, matcher string, timeout int, failClosed bool) *ShellHookSpec
- func RecordShellHookConsentFromConfig(ctx context.Context, acceptHooks bool) ([]*ShellHookSpec, error)
- func RegisterShellHooksFromConfig(ctx context.Context, acceptHooks, interactive bool) ([]*ShellHookSpec, error)
- type SkippedUpdate
- type SlackActionHandler
- type SubagentCancelResult
- type SubagentChild
- type SubagentChildSpec
- type SubagentDelegation
- type SubagentHandle
- type SubagentLaunchRequest
- type SubagentLifecycleError
- type SubagentLifecycleService
- func (s *SubagentLifecycleService) Cancel(ctx context.Context, handle any, reason string) *SubagentCancelResult
- func (s *SubagentLifecycleService) HostAttr(_ context.Context, name string) (any, bool, bool, error)
- func (s *SubagentLifecycleService) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
- func (s *SubagentLifecycleService) Launch(ctx context.Context, request any) (*SubagentHandle, error)
- func (s *SubagentLifecycleService) Reconnect(ctx context.Context, handle any) *SubagentReconnectResult
- func (s *SubagentLifecycleService) Result(ctx context.Context, handle any) *SubagentResult
- func (s *SubagentLifecycleService) Status(ctx context.Context, handle any) *SubagentStatus
- func (s *SubagentLifecycleService) Steer(ctx context.Context, handle any, text any) bool
- func (s *SubagentLifecycleService) Wait(ctx context.Context, handle any, timeoutSeconds *float64) *SubagentTerminalState
- type SubagentParentRef
- type SubagentReconnectResult
- type SubagentResult
- type SubagentState
- type SubagentStatus
- type SubagentTerminalState
- type SystemPromptSection
- type ThreadRenameOptions
- type ToolSpec
- type ToolsRegistrar
- type UnattendedInstallOptions
- type UpdatePlan
- type UserInterrupt
- type ValidationCheck
- type ValidationReport
- type WebhookView
- type Widget
- type WidgetFrame
- type WidgetInput
- type WidgetLine
- type WidgetSpan
- type WidgetSpec
- type WidgetView
Constants ¶
const ( PluginSchemaV1 = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json" MCPSchemaV1 = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json" )
Schema ids of the portable Agent Plugins v1 manifests
const ( GrantedCapabilitiesKey = "granted_capabilities" CapabilitiesConsentKey = "capabilities_consent" )
Config keys under plugins.entries.<id> holding consent state
const ( LoginBackendRule = "password-manager login backends are accepted only from plugins bundled with Icebath or " + "installed from the Icebath plugin catalog at tier verified or official (published by the " + "password-manager vendor itself or by icebath)" BrowserPageBackendRule = "browser page backends (which carry browser_vault fill scripts) are accepted only from " + "plugins bundled with Icebath or installed from the Icebath plugin catalog at tier " + "verified or official" )
const ( LiveCatalogTTLSeconds = 6 * 60 * 60 LiveCatalogFailureTTLSeconds = 60.0 )
const ( DefaultSystemPromptSectionMaxChars = 4000 MaxSystemPromptSectionChars = 4000 MaxSystemPromptSections = 32 MaxSystemPromptSectionsTotalChars = 8000 PluginSectionsStart = "<!-- icebath-plugin-sections:start -->" PluginSectionsEnd = "<!-- icebath-plugin-sections:end -->" )
const ( RuntimeWasm = "wasm" RuntimeProgram = "program" )
Forms a third party plugin takes
const ( GuestPluginNameEnv = "ICEBATH_PLUGIN_NAME" GuestPluginDirEnv = "ICEBATH_PLUGIN_DIR" )
Environment variables telling an external program plugin which plugin it runs as
const ( HostProcessEnv = "ICEBATH_PLUGIN_HOST_PROCESS" HostDenyNetworkEnv = "ICEBATH_PLUGIN_HOST_DENY_NETWORK" HostLogLevelEnv = "ICEBATH_PLUGIN_HOST_LOG_LEVEL" )
const ( CategoryMemoryProvider = "memory_provider" CategoryContextEngine = "context_engine" CategoryCronScheduler = "cron_scheduler" CategoryComputerUseProvider = "computer_use_provider" )
Categories a wasm or program plugin is found under by the category that selects it
const ( ObserverSchemaVersion = "icebath.observer.v1" MiddlewareSchemaVersion = "icebath.middleware.v1" ToolRequestMiddleware = "tool_request" ToolExecutionMiddleware = "tool_execution" LLMRequestMiddleware = "llm_request" LLMExecutionMiddleware = "llm_execution" )
const ( OutboundWebhookDefaultTimeoutSeconds = 10 OutboundWebhookMaxTimeoutSeconds = 60 OutboundWebhookMaxDeliveryAttempts = 2 OutboundWebhookQueueMaxSize = 256 )
const ( ActionsContractVersion = 1 PlatformActionCapability = "gateway.platform_actions" )
const ( ShellHookDefaultTimeoutSeconds = 60 ShellHookMaxTimeoutSeconds = 300 ShellHookAllowlistFilename = "shell-hooks-allowlist.json" ShellHookBlockExitCode = 2 )
const CatalogSidecar = ".icebath-catalog.json"
const CloneTimeoutHint = "On a slow connection, raise plugins.clone_timeout_seconds in config.yaml."
Advice a clone timeout ends with
const (
CoreEventNamespace = "icebath"
)
const EnvEnableProjectPlugins = "ICEBATH_ENABLE_PROJECT_PLUGINS"
Environment variable enabling project local plugin discovery
const EnvSafeMode = "ICEBATH_SAFE_MODE"
Environment variable that skips every plugin and user hook
const ImageHostSuffix = ".githubusercontent.com"
Host suffix every GitHub user content host shares
const InBothLists = "listed in both plugins.enabled and plugins.disabled — disabled wins"
Error recorded for a plugin listed in both the enabled and the disabled list
const LiveCatalogMaxStaleSeconds = 24 * 60 * 60
const PluginEventPrefix = "plugin."
Prefix every plugin event name starts with, core owning every other name
const PluginFormsText = "icebath loads plugins built in, as WebAssembly modules (runtime: wasm) or as external programs (runtime: program)"
Sentence naming every form icebath loads a plugin in
const PluginScannerVersion = "plugin-guard-v12"
const PortableExtension = "app.icebath"
Vendor extension namespace carrying icebath specific portable fields
const ProtocolVersion = 1
const (
PublicContractVersion = 1
)
const SessionResetConfigKey = "session_reset"
Config block the session reset plugin reads
const SessionResetPluginName = "icebath-session-reset-policy"
Catalog plugin that applies idle and daily session resets
const StreamHoldingHook = "transform_llm_output"
const SupportedManifestVersion = 2
Highest manifest schema version this build understands
Variables ¶
var Advisories = []Advisory{ { ID: "shai-hulud-2026-05", Title: "Mini Shai-Hulud worm — mistralai 2.4.6 compromised on PyPI", Summary: "PyPI quarantined the mistralai package on 2026-05-12 after a " + "malicious 2.4.6 release. The worm steals credentials from " + "environment variables and credential files (~/.npmrc, ~/.pypirc, " + "~/.aws/credentials, GitHub PATs, cloud SDK tokens) and exfils " + "them to a hardcoded webhook. If you ran any Python process that " + "imported mistralai 2.4.6 — including a Python plugin or tool " + "runtime icebath ran from its managed environment — assume those credentials " + "are exposed. PyPI has since removed 2.4.6 and the project ships " + "clean releases again (2.4.7, 2.4.8); this advisory only fires if " + "the compromised 2.4.6 is still installed in that environment.", URL: "https://socket.dev/blog/mini-shai-hulud-worm-pypi", Compromised: []AdvisoryPackage{{Name: "mistralai", Versions: map[string]bool{"2.4.6": true}}}, Remediation: []string{ "Run: icebath pm update --uv (re-resolves the managed Python environment past mistralai 2.4.6)", "Rotate API keys in {icebath_home}/.env (OpenRouter, Anthropic, OpenAI, " + "xAI, GitHub, AWS, Google, Mistral, etc.).", "Audit ~/.npmrc, ~/.pypirc, ~/.aws/credentials, ~/.config/gh/hosts.yml, " + "and any other credential files for tokens that may have been read.", "Check GitHub for unexpected new SSH keys, deploy keys, or webhook " + "additions on repos you have admin on.", "After cleanup: icebath doctor --ack shai-hulud-2026-05 to dismiss " + "this warning.", }, Published: "2026-05-12", Severity: "critical", }, }
Advisory catalog, entries are appended and never removed
var CapabilityRegistry = map[string]CapabilitySpec{ "tools.override": {"tools.override", []string{"allow_tool_override"}, "Replace built-in tools (e.g. shell_exec, write_file) — an override can intercept everything routed through that tool"}, "llm.provider_override": {"llm.provider_override", []string{"llm", "allow_provider_override"}, "Run host-owned LLM calls against a provider other than your active one (uses your credentials)"}, "llm.model_override": {"llm.model_override", []string{"llm", "allow_model_override"}, "Choose which model host-owned LLM calls use (spend follows the chosen model)"}, "llm.agent_id_override": {"llm.agent_id_override", []string{"llm", "allow_agent_id_override"}, "Attribute its LLM calls to a different agent id"}, "llm.profile_override": {"llm.profile_override", []string{"llm", "allow_profile_override"}, "Run LLM calls under a different auth profile"}, "llm.task_override": {"llm.task_override", []string{"llm", "allow_task_override"}, "Route its LLM calls through the host's built-in auxiliary task lanes"}, "llm.side_question": {"llm.side_question", nil, "Ask your agent a short question after each turn. It sees the whole session, including memory, and spends your main model's tokens."}, "gateway.platform_actions": {"gateway.platform_actions", []string{"allow_platform_actions"}, "Act on connected chat platforms as the gateway bot (add reactions, rename threads) via ctx.platform_actions"}, }
Every capability with an enforcing surface, keyed by id
var CatalogCategories = []string{"memory", "platform", "web", "tools", "voice", "automation", "models", "general"}
Browse shelves a catalog entry may name
var CatalogTiers = []string{"official", "verified", "community"}
Catalog badges, official first
var ConfigSchemaTypes = map[string][]string{
"str": {"string"}, "string": {"string"}, "int": {"int"}, "integer": {"int"}, "float": {"int", "float"},
"number": {"int", "float"}, "bool": {"bool"}, "boolean": {"bool"}, "list": {"list"}, "array": {"list"},
"dict": {"map"}, "object": {"map"}, "secret": {"string"},
}
Config schema type names and the Go kinds a setting value must have
var DefaultCatalogTiers = map[string]bool{"official": true, "verified": true}
Tiers whose entries may be marked default and installed in every home
var DocProseExtensions = map[string]bool{".md": true, ".txt": true, ".rst": true, ".html": true}
var ErrUserInterrupt = errors.New("user interrupt")
Error a plugin callback returns to propagate a user interrupt instead of reporting a failure
var GithubTokenEnvVars = []string{"GITHUB_TOKEN", "GH_TOKEN"}
Environment variables the update check reads a GitHub token from, in order
var HostDegradedHooks = map[string]string{
"pre_gateway_dispatch": "receives the live gateway runner and session store",
}
Hooks whose payload reaches hosted callbacks only as opaque values
var HostInProcessObjectBases = map[string]string{
"register_login_backend": "agent.vault_backends.base:LoginBackend",
"register_browser_page_backend": "agent.browser_page_backend:BrowserPageBackend",
"register_platform": "gateway.platforms.send_targets:StandaloneSendPolicy",
}
Unsupported registrars the parent serves for an in process plugin, mapped to the base their object subclasses
var HostObjectBases = map[string]string{
"register_image_gen_provider": "agent.image_gen_provider:ImageGenProvider",
"register_video_gen_provider": "agent.video_gen_provider:VideoGenProvider",
"register_web_search_provider": "agent.web_search_provider:WebSearchProvider",
"register_browser_provider": "agent.browser_provider:BrowserProvider",
"register_terminal_environment_provider": "agent.terminal_env_provider:TerminalEnvironmentProvider",
"register_secret_source": "agent.secret_sources.base:SecretSource",
"register_tts_provider": "agent.tts_provider:TTSProvider",
"register_transcription_provider": "agent.transcription_provider:TranscriptionProvider",
"register_delegation_provider": "agent.delegation_provider:DelegationProvider",
"register_context_engine": "agent.context_engine:ContextEngine",
"register_context_reference": "agent.context_references:ContextReferenceProvider",
"register_memory_provider": "agent.memory_provider:MemoryProvider",
}
Registrars whose argument may be a plugin object, mapped to the provider base it stands in for
var HostRemoteFacades = map[string]bool{ "state": true, "llm": true, "platform_actions": true, "subagent_lifecycle": true, "delegation_backends": true, }
Context facades whose methods run on the parent side object
var HostResultObjectBases = []string{"tools.computer_use.backend:ComputerUseProvider", "tools.computer_use.backend:ComputerUseBackend",
"agent.transcription_provider:TranscriptionStreamSession", "tools.environments.base:BaseEnvironment"}
Bases a category loader or a hosted provider method hands back as hosted objects though no ctx registration names them
var HostSkippedCtxMethods = map[string]string{
"register_cli_command": "`icebath <command>` subcommands are wired into the local CLI parser",
}
Context methods the host skips with a warning
var HostUnsupportedCtxMethods = map[string]string{
"register_login_backend": "browser-vault fills hold a server-local context manager",
"register_browser_page_backend": "browser-vault fill scripts carry credentials that stay in the Icebath process",
"register_platform": "platform adapters run on the gateway's event loop with native SDK clients",
"register_platform_handler": "the handler factory receives the platform's native SDK client",
"register_telegram_handler": "the handler factory receives the native Telegram Application",
"register_slack_action_handler": "the callback receives native slack_bolt ack/body objects",
"register_approval_transport": "approval transports hold the live approval request/response channel",
"post_message": "the returned handle is bound to the gateway's event loop and live adapter",
"apost_message": "the returned handle is bound to the gateway's event loop and live adapter",
}
Context methods the host refuses with the reason the live object cannot cross
var ImageHosts = []string{"raw.githubusercontent.com", "github.com"}
Hosts catalog images and screenshots may come from
var LiteralInertPatternIDs = map[string]bool{"sudo_usage": true, "dump_all_env": true, "format_filesystem": true}
var LiveCatalogURL = "https://icebath.app/api/plugin-catalog.json"
Site copy of the shipped catalog document the refresh fetches
var Logger = slog.Default()
Logger every plugin subsystem message goes through, replaceable by the host
var LoginBackendTiers = map[string]bool{"official": true, "verified": true}
var MemoryQueryRewrite func(ctx context.Context, userMessage string) string
Rewrite of a user message into one memory retrieval question, installed by the memory package and served to memory provider plugins only
var RunnerAdapterByValue func(runner any, value string) (adapter any, hasRegistry bool)
Live adapter a gateway runner's default profile registry holds for a platform value, installed by pkg/gateway
var RunnerAuthorizationAdapter func(runner any) (resolve func(ctx context.Context, value, profile string) any, callable bool)
Profile aware fail closed adapter resolver of a runner with _authorization_adapter, callable false without one, installed by pkg/gateway
var RunningVersion = buildVersion()
Version of the running binary, read from build info and overridable by the main package
var StepDown = map[string]string{"critical": "high", "high": "medium"}
StepDown lowers one severity step, medium and low are already informational
var (
SystemPromptSectionPositions = map[string]bool{"after_memory": true}
)
var TestTreeDirs = map[string]bool{"tests": true, "test": true, "testing": true, "spec": true, "specs": true, "fixtures": true}
var UnknownPresence = Presence{State: "unknown"}
Functions ¶
func AInvokeHook ¶
Loop side hook invocation on the active profile's manager after lazy discovery
func AcceptShellHooksForLaunch ¶
Records a launch's --accept-hooks in the allowlist and holds in memory each approval the write lost
func AcceptShellHooksForProcess ¶
func AcceptShellHooksForProcess()
Opts this process into every configured hook for its lifetime without exporting the variable
func AckAdvisory ¶
Persists the dismissal of an advisory id in security.acked_advisories of the profile of ctx, true when it is stored
func ActivationSummaries ¶
One summary per loaded plugin that is neither a deferred platform nor errored, the plugin loaded payload
func AddShellHook ¶
AddShellHook appends a hook to the hooks of an event in the user config, the tools it is for and the seconds it may take left out when not given
func AdmitPluginSetChange ¶
func AdmitPluginSetChange(ctx context.Context, enabled, disabled map[string]bool, opts AdmitOptions) error
Public admission of a plugin set change, refused without touching config when the union cannot resolve
func AdvisoryFullRemediationText ¶
func AdvisoryFullRemediationText(ctx context.Context, hit AdvisoryHit) ([]string, error)
Multi line block describing the advisory of a hit and its numbered remediation steps
func AdvisoryGatewayLogMessage ¶
func AdvisoryGatewayLogMessage(ctx context.Context, hits []AdvisoryHit) string
One line gateway log message for the hits not dismissed, empty when there is none
func AdvisoryShortBannerLines ¶
func AdvisoryShortBannerLines(hits []AdvisoryHit) []string
One to three unstyled startup banner lines naming the first hit and counting the others
func AdvisoryStartupBanner ¶
func AdvisoryStartupBanner(ctx context.Context, hits []AdvisoryHit) string
Printable startup banner of the hits due now, empty when none is due, bold red on a color terminal
func AllowlistedShellHookPairs ¶
Approved event and command pairs of the current home's allowlist
func ApproveShellHook ¶
ApproveShellHook puts a configured hook on the allowlist with the time of its script now, so it runs
func ArgFloat ¶
ArgFloat gives the number a plugin argument converts to, def when it does not convert
func AskerBound ¶
Reports whether a surface bound an asker for this context
func AttachToToolMessage ¶
func AttachToToolMessage(agent *PluginLiveNotes, message *state.Message)
Appends every queued notice after the content of the tool result about to be flushed
func AutoApplyEnabled ¶
Whether plugins.auto_apply of the profile of ctx opts into unattended git updates
func BindAsker ¶
func BindAsker(ctx context.Context, asker ChoiceAsker) context.Context
Context whose AskChoice calls the asker binds, the surface that dispatches the command wraps its handler call
func BindHostCall ¶
func BindHostCall(owner, method string, params []HostParam, args []any, kwargs map[string]any) (map[string]any, map[string]any, error)
BindHostCall exports the Python keyword binding of a host facade method for facades other packages implement
func BindSubagentParentRef ¶
func BindSubagentParentRef(ctx context.Context, ref SubagentParentRef) context.Context
Context carrying a weakly held parent so a context outliving the turn never pins the agent
func BroadcastPluginEvent ¶
Emits the namespaced plugin event to every connected client, a logged no op without a gateway here
func BundledPluginKeys ¶
func BundledPluginKeys() []string
Registry keys of every compiled-in plugin in registration order
func BundledPluginsFS ¶
Bundled plugins tree a reader walks, the ICEBATH_BUNDLED_PLUGINS directory when set, else the copy compiled in
func CachedGitUpdates ¶
Plugin names mapped to the commit or feed version the last check found for still matching git installs
func CapabilityGranted ¶
Reports whether a capability is live for a plugin in the profile of ctx through a grant or the legacy allow key
func CapabilitySetHash ¶
Order insensitive sha256 of a capability set
func CatalogCap ¶
CatalogCap is the stepped down severity for a finding inside a locale catalog
func CatalogEntryRunsHere ¶
func CatalogEntryRunsHere(ctx context.Context, entry *PluginCatalogEntry) bool
Whether this OS and this icebath can run a catalog entry, the verdict of the install gate
func CatalogInstallRecord ¶
Catalog sidecar of an installed plugin directory, nil when it was not installed from the catalog
func CatalogRowFields ¶
Provenance fields of one installed plugin row with the current pin and update flag when the pins know it
func CatalogRowsMaps ¶
Pins, versions and titles maps from one live catalog resolution, all empty when it fails
func CategoryActiveNames ¶
Provider names of the active scope home that category config switches on
func CheckDue ¶
Whether the interval has passed since the last run marker, true when no marker exists
func CheckIntervalHours ¶
Hours between update checks from plugins.auto_update_check_hours of the profile of ctx, zero or less disabling the check
func ClearPublishedGatewayMessageHost ¶
func ClearPublishedGatewayMessageHost(owner any)
Forgets this owner's gateway host without clobbering a newer runner
func ClearPublishedTUIMessageHost ¶
func ClearPublishedTUIMessageHost(owner any)
Forgets the process TUI host and clears it where this owner still holds the slot
func CmdCapabilities ¶
Prints declared against granted capabilities for one plugin or every plugin holding any
func CmdCheckUpdates ¶
Reports which installed plugins are outdated without changing anything
func CmdDisable ¶
Disables a plugin, removing its toolset from saved lists and hinting how the gateway applies it
func CmdEnable ¶
Enables a plugin, asking capability consent for non bundled ones and syncing saved toolset lists
func CmdInstall ¶
Installs a plugin from the catalog, a git URL or owner/repo shorthand, then prompts, enables and reports
func CmdList ¶
Lists bundled and user plugins with their activation state, provenance and catalog removals
func CmdPackExport ¶
Pack YAML of the current install on out, warnings and errors on errOut
func CmdPackInstall ¶
Review screen, one pack level consent, pinned fan out installs and per plugin consent, exit 1 on any failure
func CmdPackShow ¶
Dry run review of a pack
func CmdPluginDoctor ¶
Validates one plugin through runtime discovery and registration, exit 1 under ci when it fails
func CmdSearch ¶
Searches the curated catalog by name, description and declared tools, an empty term browsing everything
func CmdToggle ¶
Interactive composite screen of the general plugins and the provider plugin categories
func CmdTrustUpdateURL ¶
Moves the saved update url tag to the manifest update url after a needs fixing mismatch
func CmdUpdateAll ¶
Lists every plugin with an update and updates them all after one confirmation, exit 1 when any failed
func CmdValidate ¶
func CmdValidate(ctx context.Context, path string, asJSON, installDeps bool, out, errOut io.Writer) error
Catalog admission validation of a plugin directory, the CI gate exiting 0 or 1, with installDeps syncing its deps first
func ConsentHash ¶
Stored consent hash of a plugin in the profile of ctx, empty when absent
func DeclaredSetChanged ¶
Reports whether the declared set differs from the one the user consented to in the profile of ctx
func DecodeOrderedObject ¶
Keys and decoded values of a JSON object in document order, objects inside as plain maps, integers as int64 and other numbers as float64
func DependencyBlockedSummaries ¶
Plugins that failed to load while a declared Python dependency is missing, as activation entries
func DescribeGithubFailure ¶
One actionable line for a failed api.github.com call naming the reset time and the GITHUB_TOKEN fix
func DirectoryHookTimeout ¶
Seconds the command of a hook directory may run as a whole number of seconds or numeric text, the shell hook default for an unset, unusable or boolean value and its cap above that
func DisabledPluginSet ¶
Deny list of disabled plugin keys of the active scope home, empty on a failed read
func DisabledPlugins ¶
Names the plugins.disabled list of a home parks
func DiscoverPlugins ¶
Discovers and loads every plugin of the active profile, joining an in flight background scan first
func EnabledPluginSet ¶
Allow list of enabled plugin keys of the active scope home, empty on a failed read
func EnqueuePluginStreamHook ¶
Queues an observer hook for each consumer without running plugin code inline, true when any accepted it
func EntryCapabilitySummary ¶
func EntryCapabilitySummary(e *PluginCatalogEntry) string
One paragraph of what installing or enabling an entry grants
func ErrorTypeName ¶
Kind label of an error a plugin call returned, the exception class name a Python plugin catches
func ExportPack ¶
Pack YAML of the current install and the warnings for plugins without Git provenance
func FetchLiveCatalog ¶
Published catalog cached for the TTL under the current home, nil on any failure with a dead host remembered for a minute
func FieldsOf ¶
Fields of a mapping a hosted call answered, a record or a rebuilt dataclass read by its fields, nil for any other value
func FindEngineDir ¶
Engine dir of a name, bundled first then a user plugin dir that holds a context engine
func FindPluginEntryDir ¶
Entry directory of an installed or bundled plugin under the process home, found false when unresolved
func FirePreCommandHook ¶
func FirePreCommandHook(ctx context.Context, surface, command, aliasUsed, argsRaw string, sessionKey, platform *string)
Fires the observer only pre_command hook, logging and ignoring any directive a callback returns
func FlushOutboundWebhooks ¶
FlushOutboundWebhooks blocks until every queued delivery finished or the timeout passed, true when drained
func FormatPluginScanReport ¶
func FormatPluginScanReport(result skills.ScanResult) string
FormatPluginScanReport renders the compact scan report the CLI shows
func FormatSessionResetNotice ¶
Notice that a timed session_reset mode waits on the plugin that applies it
func FormatSystemPromptSection ¶
Auditable length framed block recoverable from the full prompt
func FormatSystemPromptSections ¶
func FormatSystemPromptSections(sections []RenderedSystemPromptSection) string
Canonical container of rendered sections used for persistence recovery, empty for no sections
func GetAckedAdvisoryIDs ¶
Advisory ids dismissed under security.acked_advisories of the profile of ctx
func GetActiveSubagentParent ¶
Parent agent bound to this execution context, nil when none or collected
func GetBundledPluginsDir ¶
func GetBundledPluginsDir() string
Bundled plugins directory, ICEBATH_BUNDLED_PLUGINS first, else the plugins tree beside the running install
func GetPluginAuxiliaryTasks ¶
Plugin auxiliary task registrations sorted by key after discovery
func GetPluginCommandOrder ¶
Plugin slash command names after discovery in the order their names were first registered
func GetPluginCommands ¶
func GetPluginCommands(ctx context.Context) map[string]*PluginCommand
Plugin slash commands by name after discovery
func GetPluginContextEngine ¶
Plugin registered context engine after discovery, nil when none
func GetPluginErrorClassification ¶
func GetPluginErrorClassification(ctx context.Context, in ErrorClassificationInput) (map[string]any, error)
First valid plugin error classification in registration order, sanitized, nil when none
func GetPluginToolsetKeysNowait ¶
Plugin toolset keys without blocking on an in flight background discovery
func GetPortableMCPServerNamesNowait ¶
Portable MCP server names without blocking on an in flight background discovery
func GetPreVerifyContinueMessage ¶
func GetPreVerifyContinueMessage(ctx context.Context, in PreVerifyInput) string
First non empty continue or block message of the pre_verify hooks, empty to let the turn finish
func GithubToken ¶
Credential for an api.github.com request, false for anonymous
func GithubTokenFromEnv ¶
First non blank environment token trimmed, a blank value falling through to the next
func GrantedCapabilities ¶
Capabilities the user granted the plugin in the profile of ctx
func GuestPluginDirs ¶
Sorted child directories of a plugins root that hold a wasm or program plugin, underscore and dot names skipped
func GuestProvides ¶
Whether a plugin directory holds a wasm or program plugin offering a category, one that lists it under provides or one of the exclusive kind that lists nothing
func HasEnabledAgentPluginMCP ¶
Whether config enables a portable package with MCP servers, scanned on a fresh manager
func HasMiddleware ¶
Reports whether the active profile has middleware of a kind after lazy discovery
func HasReasoningStreamObserverHooks ¶
Reports whether reasoning deltas are opted in and a delta observer is registered
func HasStreamObserverHooks ¶
Reports whether any stream start, delta or end observer is registered
func HeldStreamTransforms ¶
Held output transforms of the active profile's manager after lazy discovery
func HooksCommand ¶
Dispatches one icebath hooks action, printing usage for a missing one and a notice for an unknown one
func HooksOverview ¶
func HooksOverview(ctx context.Context) ([]HookView, []WebhookView, error)
HooksOverview is every configured shell hook with its consent state and every outbound webhook target of the home in the context
func HostCallable ¶
Value the wire sends to the plugin host as a callable running fn here
func HostLauncher ¶
Argv prefix the plugin host process runs under from plugins.host.launcher of the profile of ctx, a sandbox runner, a single line split like a shell command line
func InPluginLoadWorker ¶
Reports a deadline bound plugin load worker context to the gateway platform registry
func InTreeCatalogTime ¶
func InTreeCatalogTime() *float64
Commit time of the last change to the in-tree catalog, its newest file mtime on a treeless clone, nil outside a checkout
func InspectPluginSource ¶
func InspectPluginSource(ctx context.Context, identifier, catalogName string) (map[string]any, error)
Whether a source ships an agent plugin at the commit read, joining a running or recent read of the same request
func InstallServices ¶
func InstallServices(s *Services)
Installs the process wide collaborator set used by every plugin manager
func InstalledInSelectedEnvironment ¶
Whether every requirement is installed in the dependency environment the install currently selects
func InteractiveScanDecision ¶
Terminal y or N accepting a caution verdict, shared by install and update
func InvalidateLiveCacheForHome ¶
func InvalidateLiveCacheForHome(h string)
Removes the cached live catalog of any home, logging at debug when removal fails
func InvokeHook ¶
Invokes a hook on the active profile's manager after lazy discovery
func InvokePluginCommand ¶
func InvokePluginCommand(ctx context.Context, handler PluginCommandHandler, rawArgs string, context map[string]any) (any, error)
Calls a slash command handler once with the raw args plus the session context keywords it declares
func IsAgentFacing ¶
IsAgentFacing is true for a shape whose prose is the payload
func IsAllowedImageURL ¶
Whether a URL is https on a GitHub image host
func IsAuthorizedKeysProse ¶
IsAuthorizedKeysProse is true for an authorized_keys mention inside a literal with no write action
func IsBase64ArchiveRoundtrip ¶
IsBase64ArchiveRoundtrip is true for a base64 decode pipe line that creates and round trips an archive
func IsBase64Media ¶
IsBase64Media is true when a long base64 run on the line decodes to a recognised media header
func IsBenignLazyOSImport ¶
IsBenignLazyOSImport is true when every lazy os import reads a benign member with no dangerous call
func IsCIWorkflow ¶
IsCIWorkflow is true for a forge CI workflow definition that runs on the forge's runner
func IsCoinNameOnly ¶
IsCoinNameOnly is true when every crypto mining hit is the bare word monero with no mining machinery
func IsDisclosedConfigNote ¶
IsDisclosedConfigNote is true for a prose intent config mod finding on an install doc surface
func IsDocProse ¶
IsDocProse is true for a documentation file the loader never executes and the agent never runs as a skill
func IsEnvDumpInSafetyClause ¶
IsEnvDumpInSafetyClause is true when every env dump hit is governed by a safety negation
func IsHexInCharClass ¶
IsHexInCharClass is true when every hex escape on the line sits inside a regex character class
func IsInertFixtureLine ¶
IsInertFixtureLine is true when every hit is quoted test data nothing on the line runs
func IsJSONProseValue ¶
IsJSONProseValue is true when every hit sits mid sentence in a JSON string pair under a non command key
func IsLocaleCatalog ¶
IsLocaleCatalog is true for a locales catalog at the plugin root
func IsLoopbackContinuation ¶
IsLoopbackContinuation is true when the pattern stops matching on the logical line and every host is loopback
func IsLoopbackOnly ¶
IsLoopbackOnly is true when every hardcoded ip port hit is a loopback address
func IsOwnProcRead ¶
IsOwnProcRead is true when every proc path on the line is a benign leaf read only
func IsPipInstallInProseLiteral ¶
IsPipInstallInProseLiteral is true when every pip install sits mid sentence inside a literal
func IsPluginEventID ¶
Whether a plugin key forms a plugin event name
func IsPortablePluginDir ¶
Whether a plugin directory is an Agent Plugins v1 package
func IsPublicClientKey ¶
IsPublicClientKey is true when every hardcoded secret literal is a public by design client key
func IsQuotedInjectionPhrase ¶
IsQuotedInjectionPhrase is true when the injection phrase sits entirely inside a quoted span
func IsRegexAlternationToken ¶
IsRegexAlternationToken is true when every token occurrence is an alternation member or a whole literal
func IsRepoRootTraversal ¶
IsRepoRootTraversal is true when every traversal run climbs to an ancestor with no sensitive leaf
func IsSelfUninstallDoc ¶
IsSelfUninstallDoc is true for a README uninstall line removing the plugin's own install directory
func IsSudoInert ¶
IsSudoInert is true when every sudo on the line is an advisory hint or governed by a safety negation
func IsTestTree ¶
IsTestTree is true for a root level test dir, dunder test dirs at any depth, or a test file name
func IsTrustedInstallerPipe ¶
IsTrustedInstallerPipe is true when every URL on a curl pipe shell line names a trusted installer
func IsValidSystemPromptSectionID ¶
Reports whether a value is a stable heading safe section identifier
func KeepAfterTurnBudget ¶
func KeepAfterTurnBudget(agent *PluginLiveNotes, batch []*state.Message)
Puts a notice back on a batch row whose content the turn budget spilled to a file
func ListedPluginStatus ¶
func ListedPluginStatus(ctx context.Context, e PluginEntry, enabled, disabled, active map[string]bool) (string, error)
Activation state of a listed plugin as plugins list prints it, its directory deciding default on kinds
func LoadAndGoLive ¶
Rediscovers plugins here one go live at a time and makes the named plugin live in open chats
func LoadNamed ¶
func LoadNamed(name, pluginDir string, loadFromDir func(dir string) (any, error), kind, noun string) any
Shared body of a named category load, a warning on the category logger and nil when it fails or yields no instance
func LoadShellHookAllowlist ¶
Parsed allowlist, an empty skeleton when absent or broken
func LogicalLine ¶
LogicalLine joins a line with the lines a trailing backslash continues onto, at most eight
func LooksLikeCatalogName ¶
Bare lowercase catalog token rather than a url, owner/repo shorthand or path
func MiddlewarePayload ¶
Middleware payload stamped with the telemetry and middleware schema versions unless already set
func MissingPythonDependencies ¶
Declared Python requirements of a plugin that apply here and are not installed in the selected environment
func ObserverPayload ¶
Observer payload stamped with the telemetry schema version unless already set
func OrderedDict ¶
Dict value the child rebuilds with its keys in the given order, keys absent from values skipped
func PackCommand ¶
Dispatches icebath plugins pack install, export or show
func ParseDeclaredCapabilities ¶
Known capability ids of a manifest capabilities value, unknown ids dropped with a warning
func PendingCapabilities ¶
Declared capabilities the user has not granted yet in the profile of ctx
func PinnedRevision ¶
Full commit a ref install of the plugin is pinned to in the metadata, empty when it floats
func PluginCommandContext ¶
Session context keywords the dispatching surface passed, read by an in process handler taking every keyword
func PluginEventName ¶
Wire name plugin dot id dot event, a ValueError for an id or event that cannot form one
func PluginRelativeSegments ¶
Validated segments of a plugin relative settings key, refusing global, reserved and traversal paths
func PluginSettingsFields ¶
Renderable settings fields of one plugin with current values, secrets carrying only env and presence
func PluginStorageDir ¶
Creates and returns the plugin data directory under the active home, never the install tree
func PluginsInBothLists ¶
Keys the loader skips because both config lists name them
func PopPluginNotices ¶
func PopPluginNotices(agent *PluginLiveNotes) string
Every queued notice oldest plugin first joined by blank lines, clearing the queue
func PortableLiveness ¶
Copy of the liveness declaration of a portable MCP server, nil when it declared none
func PortableMCPServerName ¶
Internal MCP server name of a portable plugin server, exactly the name its mcp.json gives it
func PortableMCPServers ¶
MCP servers the enabled portable plugins of a home declare, after discovery of that home
func ProbeAvailability ¶
Whether load returns an instance whose is_available answers truthy, any failure counting as unavailable
func ProseCap ¶
ProseCap is the stepped down severity for a command or path shaped finding in documentation
func PublishGatewayMessageHost ¶
func PublishGatewayMessageHost(owner any, injector MessageInjector)
Remembers the process gateway host and stamps every existing manager with it
func PublishTUIMessageHost ¶
func PublishTUIMessageHost(owner any, injector MessageInjector)
Remembers the process TUI host and stamps every existing manager with it
func QueuePluginNotice ¶
func QueuePluginNotice(agent *PluginLiveNotes, pluginKey, note string)
Queues a note for the next tool result or user turn, replacing this plugin's older one
func ReRegisterOutboundWebhooks ¶
ReRegisterOutboundWebhooks drops the current home's wired keys and registers the saved config again after a force reload
func ReadInstallMetadata ¶
Profile-local plugin install metadata keyed by plugin directory name, for callers outside the package
func ReadManifestForInstall ¶
Manifest an install candidate publishes, a manifest_invalid error when it is unreadable or malformed, empty without one
func ReadPluginDescription ¶
Description of a plugin.yaml, empty when absent, falsy or unreadable
func ReadSidecarRows ¶
Install metadata rows of a plugins dir, empty when absent, unreadable or not an object
func RecordConsent ¶
Persists a consent decision, granting the union and mirroring every grant into its legacy gate
func ReferenceKeys ¶
English key set of a surface in the catalogs of the profile of ctx, nil when the bundled reference is unavailable
func RegisterActiveSettings ¶
func RegisterActiveSettings(h string)
Registers the settings blocks every discovered plugin and the selected memory provider declare
func RegisterBundled ¶
func RegisterBundled(p Plugin)
Adds a compiled-in plugin to the bundled set, panicking on an empty or duplicate registry key
func RegisterPort ¶
func RegisterPort(p Plugin)
Adds a compiled-in port of a plugin that ships outside core, listed and loaded only once installed into a home
func RegisterProviderRegistry ¶
func RegisterProviderRegistry(kind string, registry func() ScopedRegistry)
Registers the scoped registry plugins of a provider kind load into, called at init by its owner
func RegisteredProviderRegistries ¶
func RegisteredProviderRegistries() map[string]ScopedRegistry
Scoped registries of every provider kind the linked packages registered
func RemoveInstalledPlugin ¶
Removes the plugin tree at target from a home together with its install metadata
func RemoveShellHook ¶
RemoveShellHook takes every hook running the command out of the hooks of an event in the user config and reports how many went
func RequiresVersionError ¶
Load blocking reason when a requires_icebath spec rejects the running version, else empty
func ResetOutboundWebhooksForTests ¶
func ResetOutboundWebhooksForTests()
ResetOutboundWebhooksForTests clears the idempotence set and drains the queue
func ResetPluginEnabled ¶
Whether the session reset plugin is installed and enabled in the plugin set of this process
func ResetPluginManagersForTests ¶
func ResetPluginManagersForTests()
Drops every cached manager after unloading it and clears published hosts
func ResetShellHooksForTests ¶
func ResetShellHooksForTests()
Clears the wiring registry and every in process consent
func ResolveDirectoryHookCommand ¶
Argument vector of the command line a hook directory names, a program that sits inside the directory resolved to its full path
func ResolveLoadOrder ¶
Plugin keys in dependency order with alphabetical ties, alphabetical for all on a cycle
func ResolveManifestWinners ¶
Later sources win on key collision except a flat impostor claiming a bundled key from another directory
func ResolvePluginCommandResult ¶
Awaits an awaitable result, bounded on a running loop, returning any other value unchanged
func ResolvePluginPath ¶
Explicit plugin path or installed, bundled or project plugin id resolved to its directory
func RevokeShellHook ¶
Removes every allowlist record of the command and returns how many went
func RunDirectoryHook ¶
func RunDirectoryHook(ctx context.Context, eventType, hookDir string, argv []string, timeout int, hookContext map[string]any) (any, error)
Runs the command of a hook directory inside that directory for one gateway event with the event name and its context as JSON on standard input and answers the JSON object it printed, nil when it printed none
func RunLLMExecutionMiddleware ¶
func RunLLMExecutionMiddleware(ctx context.Context, request map[string]any, next NextCall, extra map[string]any) (any, error)
Runs LLM execution through the middleware of the active profile after lazy discovery, so a cold surface keeps its gates
func RunToolExecutionMiddleware ¶
func RunToolExecutionMiddleware(ctx context.Context, toolName string, args map[string]any, next NextCall, extra map[string]any) (any, error)
Runs tool execution through the middleware of the active profile after lazy discovery, so a cold surface keeps its gates
func RunVerifyCommand ¶
Detects a project's run recipe and smoke tests it
func SavePluginSetting ¶
Writes one value under plugins.entries.<id>.settings atomically, refusing managed installs and keys
func SavePluginSettings ¶
func SavePluginSettings(ctx context.Context, h, pluginID, pluginDir string, values []PluginSettingValue) ([]string, error)
Validates every edit against the schema then writes each one, returning the keys written in order
func SaveShellHookAllowlist ¶
Writes the allowlist atomically at mode 0600, an OS failure logged and the approval held in memory only
func ScanBlockedResult ¶
func ScanBlockedResult(blocked *PluginScanBlocked) map[string]any
Non interactive answer to a scan block with the verdict and findings a client can show
func ScanPlugin ¶
func ScanPlugin(pluginDir, source string) skills.ScanResult
ScanPlugin scans a plugin directory with every external plugin at community trust
func SecretEnvName ¶
Env variable a secret field lives under, the declared env or the upper snaked plugin id and key
func SessionCwd ¶
Recorded working directory of the calling session, then the policy cwd, then the profile terminal cwd
func SessionSurface ¶
Client surface of a local session turn or the messaging platform of a chat turn, empty outside any session
func SetAgentPluginEnabled ¶
Enables or disables a plugin without prompts, loading an enabled plugin live
func ShellHookAllowlistEntry ¶
Allowlist record of the pair, nil when none
func ShellHookAllowlistPath ¶
Path of the current home's shell hook allowlist
func ShellHookDirective ¶
func ShellHookDirective(result *ShellHookResult) (string, error)
ShellHookDirective is the answer a run handed back in the wire shape, empty when it answered nothing
func ShellHookEvents ¶
func ShellHookEvents() []string
ShellHookEvents is every event a shell hook may be set on
func ShellHookScriptIsExecutable ¶
Whether the command runs as configured, a bare script needing execute and an interpreted one read access
func ShellHookScriptMtimeISO ¶
ISO mtime of the command's resolved script, false when it is missing
func ShouldAllowPluginInstall ¶
func ShouldAllowPluginInstall(result skills.ScanResult, force bool) (*bool, string)
ShouldAllowPluginInstall maps a verdict to allowed, nil for confirmation, and the reason
func StartBackgroundPluginDiscovery ¶
Starts plugin discovery on a background goroutine unless done or already in flight
func StreamHeld ¶
Reports whether the active profile holds its reply stream for an output transform, after lazy discovery
func StreamReasoningDeltasEnabled ¶
Reports whether plugins.stream_reasoning_deltas opts the plugins of the manager's profile into reasoning deltas
func SuppressPluginDiscovery ¶
Context in which discovery is a no op so the scope manager stays undiscovered
func SwapBundled ¶
func SwapBundled(add ...Plugin) (restore func())
Adds compiled-in plugins for a caller outside the package until the returned restore drops them again
func SwapCatalogDir ¶
func SwapCatalogDir(dir string) func()
Points the in-tree catalog at a directory, the returned func putting the previous source back
func SweepPendingPluginDeletes ¶
Deletes what an earlier remove parked because another process held it
func SyncShellHooksFromConfig ¶
Brings this home's wired hooks in step with the hooks setting of ctx and consent, never prompting and never disarming on bad input
func TimedSessionReset ¶
Mode of a timed session_reset block a config declares, ok false when there is none
func UnattendedInstallPlugin ¶
func UnattendedInstallPlugin(ctx context.Context, opts UnattendedInstallOptions) (map[string]any, error)
Non interactive install with the kill list enforced on every path
func UnattendedRemoveUserPlugin ¶
Deletes a plugin tree under the user plugins dir only, refusing bundled plugins
func UnattendedUpdateUserPlugin ¶
func UnattendedUpdateUserPlugin(ctx context.Context, name string, acceptCapabilities, force bool) (map[string]any, error)
Non interactive update by catalog re pin or git pull, refusals as answers
func UserPluginsDir ¶
Plugins dir of the active home when it exists
func ValidHooks ¶
func ValidHooks() []string
Every lifecycle hook name a plugin may register, sorted
func ValidateConfigSchema ¶
func ValidateConfigSchema(pluginID string, schema map[string]map[string]any, settings map[string]any) []string
Warning strings for settings that violate the config schema
func ValidateConfigSeed ¶
Validated copy of one plugin's config seed, refusing reserved, trust gate and secret shaped keys at any depth
func VersionSatisfies ¶
Reports whether current satisfies every comma separated clause, unparseable versions passing
func WithOrderedResult ¶
Context whose host calls return dict results with their keys in wire order
func WithSharedDependencyAnswers ¶
Context in which each dependency question is asked once and repeats reuse the first answer
Types ¶
type AdmissionRefused ¶
type AdmissionRefused struct{ Msg string }
The candidate plugin set was refused with config and environment untouched
func (*AdmissionRefused) Error ¶
func (e *AdmissionRefused) Error() string
type AdmitOptions ¶
type AdmitOptions = admitOptions
AdmitOptions carries the keyword arguments of admit_plugin_set_change
type Advisory ¶
type Advisory struct {
ID string
Title string
Summary string
URL string
Compromised []AdvisoryPackage
Remediation []string
Published string
Severity string
}
One security advisory, its stable id, the compromised packages and the ordered remediation steps
type AdvisoryHit ¶
One package version match against an advisory
func AdvisoryHitsDueForBanner ¶
func AdvisoryHitsDueForBanner(ctx context.Context, hits []AdvisoryHit, repeatHours int) []AdvisoryHit
Hits not dismissed and not shown within the repeat window, each stamped into the banner cache
func DetectCompromised ¶
func DetectCompromised(ctx context.Context, advisories []Advisory) []AdvisoryHit
Every advisory package that is installed at a compromised version, or at any version for an empty set
func FilterUnackedAdvisories ¶
func FilterUnackedAdvisories(ctx context.Context, hits []AdvisoryHit) []AdvisoryHit
Hits whose advisories are not dismissed
type AdvisoryPackage ¶
One package of an advisory with its compromised versions, an empty set flagging any installed version
type AgentPluginDiagnostic ¶
One non fatal portable package problem
func ReadAgentPluginManifest ¶
func ReadAgentPluginManifest(pluginRoot string) (map[string]any, []AgentPluginDiagnostic, error)
Validated root plugin.json without discovering components
type AgentPluginError ¶
type AgentPluginError struct{ Msg string }
Fatal portable manifest validation failure
func (*AgentPluginError) Error ¶
func (e *AgentPluginError) Error() string
type AgentPluginPackage ¶
type AgentPluginPackage struct {
Name string
Version string
Description string
Root string
DataRoot string
Manifest map[string]any
Skills []AgentPluginSkill
MCPServers map[string]map[string]any
ServerDeclarations map[string]AgentPluginServerDeclaration
Diagnostics []AgentPluginDiagnostic
}
Validated and translated portable package
func LoadAgentPlugin ¶
func LoadAgentPlugin(pluginRoot, dataRoot string) (*AgentPluginPackage, error)
Validates and translates one installed portable package
type AgentPluginServerDeclaration ¶
type AgentPluginServerDeclaration struct {
Name string
App map[string]any
Requires map[string]any
Liveness map[string]any
}
One local application declaration of a portable package server
type AgentPluginSkill ¶
type AgentPluginSkill struct {
Name string
Description string
Root string
SkillMD string
Frontmatter map[string]any
}
One skill a portable package ships
type AuxLLMRequest ¶
type AuxLLMRequest struct {
Task *string
Provider *string
Model *string
Messages []any
Temperature *float64
MaxTokens *int
Timeout *float64
ExtraBody map[string]any
RouteInfo map[string]string
}
Keyword arguments of agent.auxiliary_client call_llm and async_call_llm for one plugin completion
type AuxTaskOptions ¶
Options of one plugin auxiliary task registration, each holding the value the plugin passed
type Awaitable ¶
Deferred result a hook, event or command callback returns for the dispatcher to await
type BlueprintSpec ¶
type BlueprintSpec struct {
Title any
Description any
ScheduleTemplate any
PromptTemplate any
Category any
Slots any
DeliverDefault any
Skills any
Tags any
}
Fields of one plugin automation blueprint registration as the plugin passed them, checked by the builder
type CLICommand ¶
type CLICommand struct {
Name string
Help string
Description string
Setup func(parser any)
Handler func(args any) error
// Plugin parser of a hosted plugin parsing the raw arguments onto the top level namespace and running its func
Parse func(ctx context.Context, top map[string]any, argv []string) (CLIOutcome, error)
Plugin string
PluginKey string
}
Plugin CLI subcommand registration with its parser setup and handler
type CLIOutcome ¶
What a hosted plugin command did, the exit status it raised or returned and arguments nothing recognized
type CallbackPanicError ¶
type CallbackPanicError struct{ Value any }
Error carrying a recovered callback panic
func (*CallbackPanicError) Error ¶
func (e *CallbackPanicError) Error() string
type CapabilitySpec ¶
One declarable capability and the legacy config gate it maps to
type CatalogCapabilities ¶
type CatalogCapabilities struct {
ProvidesTools []string
ProvidesHooks []string
ProvidesMiddleware []string
RequiresEnv []string
}
Tools, hooks, middleware and env vars a catalog entry declares
type CatalogInstallOptions ¶
type CatalogInstallOptions struct {
Force bool
Ref string
AllowRemoved bool
ScanDecision func(scan any) bool
BeforeSwap func(manifest map[string]any, tree string) ([]string, error)
InspectedSha string
NoDeps bool
AssumeDepsConsent bool
}
Options of a catalog entry install beyond the entry itself
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Bidirectional request and response over a pair of byte streams, one JSON document per line
func (*Channel) Call ¶
func (c *Channel) Call(ctx context.Context, method string, params map[string]any, timeout time.Duration) (any, error)
Sends a request and returns its result or remote error
func (*Channel) ClosedReason ¶
Close reason, empty while open
func (*Channel) ContextOf ¶
Caller context recorded for a pending request id this side sent, nil when none is pending
type CheckResult ¶
type CheckResult struct {
Name string
Class string
Current string
Latest string
UpdateAvailable *bool
NeedsFixing string
MinIcebath string
Reason string
}
Update check outcome of one plugin, nil pointers and empty strings stand for unknown
func MaybeRunGatewayCheck ¶
func MaybeRunGatewayCheck(ctx context.Context, opts ScheduledCheckOptions) ([]*CheckResult, bool, error)
Gateway boot and housekeeping tick filling the real check, plugins dir and non interactive update seams
func RunChecks ¶
func RunChecks(ctx context.Context, pluginsDir string, opts RunChecksOptions) []*CheckResult
Every update check for one plugins dir, never mutating anything on disk
func RunScheduledCheck ¶
func RunScheduledCheck(ctx context.Context, opts ScheduledCheckOptions) ([]*CheckResult, bool)
One cadence tick of gate, check, receipt and opt in apply, false when not due, disabled or already running
func (*CheckResult) ToJSON ¶
func (r *CheckResult) ToJSON() map[string]any
JSON form with null for every unknown field
type ChoiceAsker ¶
Surface prompt taking a question and shown labels, returning the picked label or false
func ClarifyAsker ¶
func ClarifyAsker(callback func(questions []any) map[string]any) ChoiceAsker
Asker over a clarify tool callback taking questions and returning answers keyed by qid
type CommandExit ¶
type CommandExit struct{ Code int }
Process exit a plugin command asks for after printing its message
func (*CommandExit) Error ¶
func (e *CommandExit) Error() string
type CommandSpec ¶
One slash command a manifest declares for its executable entry
type ConsentRefusal ¶
type ConsentRefusal struct{ Text, FailureClass string }
Refusal reason of a dependency consent with the closed install failure class it reports
type Console ¶
type Console struct {
Out io.Writer
Color bool
// Width in cells panels fit within, zero reading the terminal size the way rich does
Width int
}
Console markup printer writing plain text, or ANSI styled text when the writer is a terminal
func NewConsole ¶
Console over a writer, styled only when the writer is a terminal file
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Facade handed to a plugin so it can register tools, hooks and commands with its manager
func NewContext ¶
NewContext binds a registration context to a manifest on a manager
func (*Context) APostMessage ¶
Post for async code already on the gateway loop, its edits made with AEdit
func (*Context) AskChoice ¶
func (c *Context) AskChoice(ctx context.Context, question string, choices []any) (string, bool, error)
Asks the slash command user to pick one choice, false when nobody can answer
func (*Context) CallMCP ¶
func (c *Context) CallMCP(ctx context.Context, server, tool string, arguments map[string]any, timeout any) (map[string]any, error)
Calls a tool on an allowlisted MCP server through the native client and wraps the result in an envelope
func (*Context) CredentialedProviderRequest ¶
func (c *Context) CredentialedProviderRequest(ctx context.Context, provider, method, url string, json any, headers map[string]string, timeout time.Duration) (*ProviderRequestAnswer, error)
Sends one provider request with the sign in of the calling plugin attached, the plugin named by its directory
func (*Context) CurrentCronExecution ¶
Cron run executing in this context, nil outside a cron fire
func (*Context) DelegationBackends ¶
Delegation backend listing and selection service
func (*Context) DispatchTool ¶
func (c *Context) DispatchTool(ctx context.Context, toolName string, args map[string]any, kwargs map[string]any) (string, error)
Dispatches a tool through the registry with the CLI agent as parent when one is attached
func (*Context) Emit ¶
Publishes a bare event under this plugin's namespace and returns the subscriber count scheduled
func (*Context) GetConfig ¶
Plugin relative setting from plugins.entries.<id>.settings in the profile of ctx
func (*Context) HasCapability ¶
Whether a capability is live for this plugin under the context profile, bundled plugins trusted for overrides
func (*Context) HasPlugin ¶
Reports whether another plugin is loaded and enabled under that registry key or manifest name
func (*Context) HomeContext ¶
Context bound to the home of the manager loading this plugin, what load_config resolves during register
func (*Context) InjectMessage ¶
func (c *Context) InjectMessage(ctx context.Context, content, role, sessionKey string, origin any) bool
Queues content for a session key or an origin chat of this profile, true when a host accepted it
func (*Context) MemoryProvider ¶
Memory provider this plugin recorded, nil when none
func (*Context) OnUnload ¶
func (c *Context) OnUnload(callback func() error) (*Registration, error)
Registers a cleanup callback run in reverse acquisition order on unload, errors logged never raised
func (*Context) PlatformActions ¶
Capability gated platform action facade re-checking gateway.platform_actions on every call
func (*Context) PluginDir ¶
Directory of the installed plugin tree the context loads, empty for a plugin compiled into the bundled set
func (*Context) PostMessage ¶
func (c *Context) PostMessage(ctx context.Context, text string) *PluginMessage
Posts text into the session bound to this call and returns an editable handle that never raises
func (*Context) ProfileName ¶
Active profile name derived from the context home, default or custom outside named profiles
func (*Context) RegisterApprovalTransport ¶
func (c *Context) RegisterApprovalTransport(ctx context.Context, name string, present tools.ApprovalPresentFunc) error
Registers a human approval transport inactive until security.approval.transport selects it
func (*Context) RegisterAutomationBlueprint ¶
func (c *Context) RegisterAutomationBlueprint(key any, spec BlueprintSpec) (*Registration, error)
Adds an automation blueprint to this profile catalog, malformed or duplicate input warned and skipped
func (*Context) RegisterAuxiliaryTask ¶
func (c *Context) RegisterAuxiliaryTask(rawKey any, opts AuxTaskOptions) (*Registration, error)
Registers an auxiliary LLM task with its own auxiliary config block, the key a str a plugin passed
func (*Context) RegisterBrowserPageBackend ¶
func (c *Context) RegisterBrowserPageBackend(p any) (*Registration, error)
Registers a browser page backend for browsers without a CDP endpoint
func (*Context) RegisterBrowserProvider ¶
func (c *Context) RegisterBrowserProvider(p any) (*Registration, error)
Registers a cloud browser provider matched by browser.cloud_provider
func (*Context) RegisterCLICommand ¶
func (c *Context) RegisterCLICommand(name, help string, setup func(parser any), handler func(args any) error, description string) *Registration
Registers a CLI subcommand whose setup receives the subparser and whose handler runs it
func (*Context) RegisterCommand ¶
func (c *Context) RegisterCommand(name string, handler PluginCommandHandler, description, argsHint, argumentMode string) *Registration
Registers an in session slash command, refusing empty names and built-in conflicts
func (*Context) RegisterContextEngine ¶
func (c *Context) RegisterContextEngine(engine any) (*Registration, error)
Registers the single context engine replacing the built-in compressor, a second one rejected
func (*Context) RegisterContextReference ¶
func (c *Context) RegisterContextReference(provider any) (*Registration, error)
Registers an at prefix context reference provider for the profile, an empty, built-in or taken prefix refused with a warning
func (*Context) RegisterDelegationProvider ¶
func (c *Context) RegisterDelegationProvider(p any) (*Registration, error)
Registers a delegation provider matched by delegation.backend
func (*Context) RegisterHook ¶
func (c *Context) RegisterHook(hookName string, fn HookFunc, holdStream bool) *Registration
Registers a lifecycle hook callback, hold_stream declaring the reply must not stream
func (*Context) RegisterImageGenProvider ¶
func (c *Context) RegisterImageGenProvider(p any) (*Registration, error)
Registers an image generation provider matched by image_gen.provider
func (*Context) RegisterLocale ¶
func (c *Context) RegisterLocale(lang string, source any, endonym string, rtl bool, surface string) (*Registration, error)
Registers one language pack layer for a surface, unload removing the layer
func (*Context) RegisterLocaleDir ¶
func (c *Context) RegisterLocaleDir(path string, metadata map[string]map[string]any) []*Registration
Registers every language file of a locales directory, a broken file skipped with a warning
func (*Context) RegisterLoginBackend ¶
func (c *Context) RegisterLoginBackend(p any) (*Registration, error)
Registers a trusted in process browser vault login backend
func (*Context) RegisterMemoryProvider ¶
Records an inert memory provider whose activation the memory plugin loader owns
func (*Context) RegisterMiddleware ¶
func (c *Context) RegisterMiddleware(kind string, fn MiddlewareFunc) *Registration
Registers behaviour changing middleware, unknown kinds warned about but stored
func (*Context) RegisterPlatform ¶
func (c *Context) RegisterPlatform(spec PlatformSpec) (*Registration, error)
Registers a gateway platform adapter in the profile scoped platform registry and leases it
func (*Context) RegisterPlatformHandler ¶
Registers a factory invoked at platform connect before or as the core handlers register
func (*Context) RegisterProvider ¶
func (c *Context) RegisterProvider(kind string, provider any) (*Registration, error)
Registers a provider of one category into its scope keyed registry and leases the slot for unload
func (*Context) RegisterRedactionPatterns ¶
Additively registers secret token regexes with the redactor, returning how many were accepted
func (*Context) RegisterSecretSource ¶
func (c *Context) RegisterSecretSource(source any) (*Registration, error)
Registers a secret source run by the dotenv loader when secrets.name is enabled
func (*Context) RegisterSkill ¶
func (c *Context) RegisterSkill(name, path, description string, frontmatter map[string]any) (*Registration, error)
Registers a read only skill under the plugin namespace, refusing invalid names and missing files
func (*Context) RegisterSlackActionHandler ¶
func (c *Context) RegisterSlackActionHandler(actionID any, callback any) (*Registration, error)
Registers a Slack Block Kit action handler wired into the Slack app at connect
func (*Context) RegisterSystemPromptSection ¶
func (c *Context) RegisterSystemPromptSection(id string, content any, opts ...SectionOption) (*Registration, error)
Registers bounded context frozen into each new session prompt, from text or a session info callback
func (*Context) RegisterTTSProvider ¶
func (c *Context) RegisterTTSProvider(p any) (*Registration, error)
Registers a text to speech provider matched by tts.provider
func (*Context) RegisterTelegramHandler ¶
Registers a telegram handler factory
func (*Context) RegisterTerminalEnvironmentProvider ¶
func (c *Context) RegisterTerminalEnvironmentProvider(p any) (*Registration, error)
Registers a terminal environment provider matched by terminal.backend
func (*Context) RegisterTool ¶
Registers a tool in the profile scoped registry and leases it for unload
func (*Context) RegisterTranscriptionProvider ¶
func (c *Context) RegisterTranscriptionProvider(p any) (*Registration, error)
Registers a speech to text provider matched by stt.provider
func (*Context) RegisterVideoGenProvider ¶
func (c *Context) RegisterVideoGenProvider(p any) (*Registration, error)
Registers a video generation provider matched by video_gen.provider
func (*Context) RegisterWebSearchProvider ¶
func (c *Context) RegisterWebSearchProvider(p any) (*Registration, error)
Registers a web search provider matched by the web backend settings
func (*Context) RegisterWidget ¶
func (c *Context) RegisterWidget(spec WidgetSpec) (*Registration, error)
Registers a terminal UI widget under its id, a modal one by default and an ambient one in the top right by default
func (*Context) SessionCwd ¶
Recorded working directory of the calling session, never the gateway process cwd
func (*Context) SessionSurface ¶
Client surface or messaging platform of the calling session
func (*Context) SetConfig ¶
Atomically writes one value in the settings subtree of this plugin under the context profile
func (*Context) SideQuestion ¶
Asks the session agent about the turn that just ended, nil without the side question capability
func (*Context) SpawnTask ¶
func (c *Context) SpawnTask(ctx context.Context, fn func(context.Context) error, name string) (*PluginTask, error)
Starts a supervised task on its own goroutine, unload cancelling its context
func (*Context) State ¶
func (c *Context) State(ctx context.Context) *PluginState
Profile scoped durable JSON state of this plugin under the context profile
func (*Context) SubagentLifecycle ¶
func (c *Context) SubagentLifecycle() *SubagentLifecycleService
Plugin safe subagent lifecycle service returning serializable handles and snapshots
func (*Context) Subscribe ¶
Subscribes to a fully qualified plugin event, owner tagged so a failed load removes the callback
func (*Context) WithDelegationSink ¶
Context whose register_delegation_provider hands the provider to sink instead of the registry, the bundled registrar
type ContextEngineInfo ¶
ContextEngineInfo is one discovered context engine with its description and availability
func DiscoverContextEngines ¶
func DiscoverContextEngines(ctx context.Context) ([]ContextEngineInfo, error)
Every bundled and user context engine with its plugin.yaml description and availability
type Dataclass ¶
Dataclass is a Record rebuilt as the dataclass a provider base declares, every init field present
type DeferredPlatformLoader ¶
Lazy loader of a bundled platform plugin run when the registry is first asked for it
type DependencyConflict ¶
type DependencyConflict struct{ Cause, Plugin string }
The resolver proved the candidate set cannot co-install with the pinned dependency set
func (*DependencyConflict) Error ¶
func (e *DependencyConflict) Error() string
Conflict message leading with the plugin the user asked for and keeping the resolver cause
func (*DependencyConflict) Unwrap ¶
func (e *DependencyConflict) Unwrap() error
The AdmissionRefused base so a refusal check also catches a conflict
type DiscordActionChannel ¶
type DiscordActionChannel interface {
FetchMessage(ctx context.Context, id int64) (DiscordActionMessage, error)
}
type DiscordActionClient ¶
type DiscordActionClient interface {
GetChannel(id int64) DiscordActionChannel
FetchChannel(ctx context.Context, id int64) (DiscordActionChannel, error)
}
Discord client calls the reaction verb makes, a nil channel from GetChannel meaning not cached
type DiscordActionMessage ¶
type DoctorFinding ¶
One Doctor finding at error or warning level
type ErrorClassificationInput ¶
type ErrorClassificationInput struct {
Provider, Model, ErrorType, ErrorCode, ErrorMessage string
StatusCode *int
ErrorBody map[string]any
Err error
ApproxTokens, ContextLength, NumMessages int
}
Error facts offered to transform_api_error_classification hooks
type EventFunc ¶
Event subscriber receiving a private deep copy of the payload under the emitter's context
type FileNotFoundError ¶
type FileNotFoundError struct{ Msg string }
Missing file error mirroring Python FileNotFoundError
func (*FileNotFoundError) Error ¶
func (e *FileNotFoundError) Error() string
type GitTimeoutError ¶
Git subprocess killed at its deadline
func (*GitTimeoutError) Error ¶
func (e *GitTimeoutError) Error() string
type GithubHTTPError ¶
HTTP error status api.github.com answered with its response headers
func GithubHTTPErrorFromResponse ¶
func GithubHTTPErrorFromResponse(resp *http.Response) *GithubHTTPError
Error for a non success api.github.com response, nil for a 2xx or 3xx status
func (*GithubHTTPError) Error ¶
func (e *GithubHTTPError) Error() string
type HookCheck ¶
type HookCheck struct {
Executable bool
Allowed bool
// When it was allowed, a question mark when the allowlist does not say
ApprovedAt string
// Whether the allowlist holds a script time to compare, with Drift as in HookView when it does
DriftChecked bool
Drift int
DriftWas, DriftNow string
// Run on a sample event, nil for a hook that is not allowed or cannot run
Run *ShellHookResult
// What a finished run printed: empty, json or invalid
Output string
// How many of the findings are problems
Problems int
}
HookCheck is what checking one configured hook found
type HookFunc ¶
Hook callback receiving the hook payload fields and returning an optional directive or value
type HookRefusal ¶
type HookRefusal struct{ Message string }
HookRefusal is a change to the hooks refused for what was asked
func (*HookRefusal) Error ¶
func (e *HookRefusal) Error() string
type HookView ¶
type HookView struct {
Event, Command, Matcher string
Timeout int
FailClosed bool
// On the allowlist, so it runs
Allowed bool
// When it was allowed, empty when the allowlist does not say
ApprovedAt string
// 1 when the script changed since it was allowed, 0 when it did not, -1 when that cannot be told
Drift int
DriftWas, DriftNow string
}
HookView is one configured shell hook with its consent state
type HooksArgs ¶
type HooksArgs struct {
Action, Event, ForTool, PayloadFile, Command string
}
Parsed icebath hooks arguments, Action empty when no subcommand was given
type HostBuiltinError ¶
Remote raise of a builtin exception class plugins commonly catch, message only like str(exc)
func (*HostBuiltinError) ClassChain ¶
func (e *HostBuiltinError) ClassChain() []string
Class names of the remote exception through BaseException, its type(exc).__mro__ without object
func (*HostBuiltinError) Error ¶
func (e *HostBuiltinError) Error() string
type HostEvent ¶
type HostEvent struct {
// contains filtered or unexported fields
}
Flag living in this process that a plugin reads, waits on and sets through its host
type HostFacade ¶
type HostFacade interface {
HostAttr(ctx context.Context, name string) (value any, isMethod bool, async bool, err error)
HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
}
Parent object whose attributes and methods a hosted plugin reaches by Python name
type HostObjectFacade ¶
type HostObjectFacade interface {
HostFacade
ErrorKind() string
Quoted() string
}
Parent object a ctx method returns that the plugin keeps by reference, with the Python type name and repr it shows
type HostParam ¶
type HostParam = paramValue
HostParam is one Python parameter of a host facade method another package implements
type HostedCallOptions ¶
type HostedCallOptions struct {
// Per positional argument, the dotted builder path the child makes the Python value with from the dict sent
Build []string
// Base an instance answer is judged against when it crosses as a hosted object
Describe string
// Per positional argument, the method whose answer the child returns after the call
Dump []string
// Per positional argument, an item of another argument's attribute passed in its place
Derive []*HostedDerive
// Longest time the call may run, zero for no limit
Timeout time.Duration
}
Builders of a hosted call's positional arguments and how its answer crosses back
type HostedCallable ¶
type HostedCallable struct {
Async bool
Sig []wireParam
Name string
QualName string
Module string
// Dataclass fields or partial function and arguments of the callable, nil for a plain function
Shape map[string]any
// contains filtered or unexported fields
}
Plugin callable living in the child, invoked over the wire with its declared signature
func (*HostedCallable) CallWith ¶
func (f *HostedCallable) CallWith(ctx context.Context, args []any, kwargs map[string]any, opts HostedCallOptions) (any, []any, error)
Calls the plugin callable with built arguments, answering the value and the dumped arguments
func (*HostedCallable) HostContext ¶
func (f *HostedCallable) HostContext() context.Context
Context the plugin host was started for, its profile home bound
type HostedDerive ¶
Argument taken as getattr(args[From], Attr)[Key], the key built by KeyBuild when set
type HostedObject ¶
type HostedObject struct {
TypeName string
Base string
// Identity the child judged from the class alone for an object an in process registrar received
Identity map[string]any
// contains filtered or unexported fields
}
Plugin provider object living in the child, an instance of its provider base on the parent side
func CollectMemoryProviderInHost ¶
func CollectMemoryProviderInHost(ctx context.Context, name, providerDir string, registerSkills bool, trackSkill func(qualifiedName string)) (*HostedObject, error)
Loads the memory provider a wasm or program plugin directory registers, its hooks and skills collected the way the memory loader collects them
func LoadCategoryInstance ¶
func LoadCategoryInstance(ctx context.Context, pluginDir, baseRef, capture string, facades map[string]HostFacade) (*HostedObject, error)
Loads the one provider a wasm or program plugin directory registers for a category, its other registrations kept from the host and the objects in facades answering it under their names
func LoadComputerUseProviderInHost ¶
func LoadComputerUseProviderInHost(ctx context.Context, providerDir string) (*HostedObject, error)
Loads the computer use provider a wasm or program plugin directory registers, nil when it registers none
func LoadContextEngine ¶
func LoadContextEngine(ctx context.Context, name string) *HostedObject
Context engine instance by name, nil when it is not found or fails to load
func (*HostedObject) AcceptsKeyword ¶
func (o *HostedObject) AcceptsKeyword(method, keyword string) bool
Whether the hosted method takes keyword, true for an unknown signature or one taking var keywords
func (*HostedObject) BindPlatform ¶
func (o *HostedObject) BindPlatform(ctx context.Context, installHandle bool, handle, runner func(ctx context.Context, event map[string]any) (any, error), lifecycle func(ctx context.Context, name string, args []any, kwargs map[string]any) error) error
Routes a hosted platform adapter's inbound events and its own lifecycle hook calls to the Go adapter
func (*HostedObject) Call ¶
func (o *HostedObject) Call(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
Calls one method of the plugin object in the child, a dotted name reading its attribute path first as Python does
func (*HostedObject) CallBuilt ¶
func (o *HostedObject) CallBuilt(ctx context.Context, method string, args []any, kwargs map[string]any, build []string) (any, error)
Calls one method of the plugin object with positional arguments built in the child by the named builders
func (*HostedObject) DefinedOutside ¶
func (o *HostedObject) DefinedOutside(ctx context.Context, module string, names []string) (map[string]bool, error)
Python names among those asked that the object's class defines outside the module or the instance holds
func (*HostedObject) Dismiss ¶
func (o *HostedObject) Dismiss(ctx context.Context)
Gives back a category instance that was loaded only to look at it and stops its guest when no loaded plugin and no other instance uses it
func (*HostedObject) Get ¶
Reads an attribute, live ones from the child and the rest locally first, an absent one an AttributeError
func (*HostedObject) HasMethod ¶
func (o *HostedObject) HasMethod(name string) bool
Reports whether the object declared a method of that name
func (*HostedObject) LoginBackendCall ¶
func (o *HostedObject) LoginBackendCall(ctx context.Context, op string, params map[string]any) (any, error)
Runs one login backend operation on the object in the child, which type checks its result
func (*HostedObject) MethodIsAsync ¶
func (o *HostedObject) MethodIsAsync(name string) bool
Async flag of a declared method
func (*HostedObject) Next ¶
Takes the next item of a for loop over the object in the child, ok false once it raises StopIteration
func (*HostedObject) PlatformCall ¶
func (o *HostedObject) PlatformCall(ctx context.Context, name string, args []any, kwargs map[string]any, opts PlatformCallOptions) (any, error)
Calls or reads one name of the adapter surface on the hosted object, private overridable names included
func (*HostedObject) Set ¶
Assigns an attribute on the plugin object when the value can cross, else keeps it on the proxy
func (*HostedObject) String ¶
func (o *HostedObject) String() string
type HostedProfile ¶
type HostedProfile struct {
Name string
Type string
Fields map[string]any
Calls map[string]HostedProfileCall
PluginDir string
Module string
// Why this profile is imported in process, its create_client then serving a live host client
InProcess string
}
Model provider profile whose overridden methods and callable fields run in the plugin host
func LoadProviderPluginProfiles ¶
func LoadProviderPluginProfiles(ctx context.Context, pluginDir, moduleName string) ([]*HostedProfile, error)
Every profile a model provider plugin directory registers, a create_client override keeping its client in the host
func (*HostedProfile) Call ¶
func (p *HostedProfile) Call(ctx context.Context, attr string, args []any, kwargs map[string]any) (any, error)
Runs one overridden method or callable field in the plugin host of the active profile
func (*HostedProfile) CreateClient ¶
func (p *HostedProfile) CreateClient(ctx context.Context, args []any, kwargs map[string]any) (*HostedObject, error)
Runs the overridden create_client in the plugin host and returns the live client it built as a hosted object
type HostedProfileCall ¶
One overridden method or callable field of a hosted profile
type HostedScopedRegistry ¶
type HostedScopedRegistry struct {
Inner ScopedRegistry
// Typed provider standing in for a plugin host object of the kind, any other value unchanged
Adapt func(provider any) any
// Plugin host object behind a stored provider, false for a provider that is none
Object func(held any) (*HostedObject, bool)
}
Registry view that stores a plugin host object as the typed provider Adapt makes of it and answers snapshots as the object the plugin handed over
func (HostedScopedRegistry) Accepts ¶
func (r HostedScopedRegistry) Accepts(provider any) bool
Whether the inner registry takes the adapted provider
func (HostedScopedRegistry) Identity ¶
func (r HostedScopedRegistry) Identity(provider any) error
Identity verdict of the inner registry on the adapted provider
func (HostedScopedRegistry) ProviderName ¶
func (r HostedScopedRegistry) ProviderName(provider any) string
Name the inner registry reads off the adapted provider
func (HostedScopedRegistry) Register ¶
func (r HostedScopedRegistry) Register(provider any, scope string) (bool, error)
Registers the adapted provider
func (HostedScopedRegistry) Restore ¶
func (r HostedScopedRegistry) Restore(name string, current, replacement any, scope string) bool
Restores the adapted replacement while the adapted current still occupies the slot
func (HostedScopedRegistry) Snapshot ¶
func (r HostedScopedRegistry) Snapshot(name, scope string) any
Occupant of a slot, a stored plugin host provider answered as its host object so the registrar and the leases compare what the plugin registered
type InstallCommandOptions ¶
type InstallCommandOptions struct {
Identifier string
Force bool
Enable *bool
Ref string
AllowRemoved bool
Brief bool
NoDeps bool
YesDeps bool
}
Flags of the plugins install command, a nil Enable prompts for it
type InstallPhase ¶
type InstallPhase string
Slow install step ids a connector operation reports while a plugin installs
const ( InstallPhaseDownloading InstallPhase = "downloading" InstallPhasePythonPackages InstallPhase = "python_packages" InstallPhaseLoadingTools InstallPhase = "loading_tools" )
type ListOptions ¶
type ListOptions struct {
NoBundled, User, Enabled, Plain, JSON bool
}
Filters of icebath plugins list
type LoadedPlugin ¶
type LoadedPlugin struct {
Manifest *Manifest
Module string
ModuleFile string
ToolsRegistered []string
HooksRegistered []string
MiddlewareRegistered []string
CommandsRegistered []string
Enabled bool
Error string
Deferred bool
// Whether the enable gate left the plugin out, its error then saying why it was not tried
Skipped bool
}
type MCPConnector ¶
type MCPConnector interface {
LoadConfig(ctx context.Context) (map[string]any, error)
FilterSuspicious(servers map[string]any) map[string]any
RegisterServers(ctx context.Context, servers map[string]any) ([]string, error)
RegisteredToolNames(ctx context.Context, server string) ([]string, error)
UtilityKinds() []string
Status(ctx context.Context) ([]map[string]any, error)
SanitizeNameComponent(value string) string
ToolNamePrefix() string
}
MCP configuration, registration and naming the activation path reaches through the wiring
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Discovers, loads and invokes the plugins of one home
func GetPluginManager ¶
Plugin manager of the active profile, created once per resolved home and stamped with published hosts
func NewManager ¶
Manager scoped to one home with empty registries
func (*Manager) AInvokeHook ¶
Hook invocation for callers on a running loop, awaiting awaitable results inline under the hook timeout
func (*Manager) ApplyLLMRequestMiddleware ¶
func (m *Manager) ApplyLLMRequestMiddleware(request map[string]any, context map[string]any) RequestMiddlewareResult
Runs LLM request middleware where a returned request mapping replaces the provider kwargs
func (*Manager) ApplyToolRequestMiddleware ¶
func (m *Manager) ApplyToolRequestMiddleware(goctx context.Context, toolName string, args, originalArgs map[string]any, context map[string]any) (RequestMiddlewareResult, error)
Runs relay intercepts then tool request middleware where a returned args mapping replaces the tool arguments
func (*Manager) AuxiliaryTasks ¶
Plugin auxiliary task entries by key
func (*Manager) CLICommands ¶
func (m *Manager) CLICommands() map[string]*CLICommand
Plugin CLI subcommands by name
func (*Manager) ClearGatewayMessageInjector ¶
Clears the gateway injector only while it still belongs to the owner
func (*Manager) ClearTUIMessageInjector ¶
Clears the TUI injector only while it still belongs to the owner
func (*Manager) ContextEngine ¶
Plugin registered context engine, nil when none
func (*Manager) DiscoverAndLoad ¶
Scans every plugin source and loads each plugin, force unloading first so config changes apply
func (*Manager) EnabledPluginsDeclaring ¶
Keys of the enabled plugins whose manifest declares the capability, sorted
func (*Manager) FindPluginSkill ¶
SKILL.md path of a qualified plugin skill
func (*Manager) GetApprovalTransport ¶
func (m *Manager) GetApprovalTransport(ctx context.Context, name string) *tools.RegisteredApprovalTransport
Approval transport registered under a name, only inside the profile that registered it
func (*Manager) GetPlatformHandlerFactories ¶
func (m *Manager) GetPlatformHandlerFactories(platform string) []*PlatformHandlerFactory
Handler factories registered for one platform
func (*Manager) GetPortableMCPServerPlugins ¶
Owning plugin key of every portable MCP server
func (*Manager) GetPortableMCPServers ¶
Defensive copy of the enabled portable MCP server configs
func (*Manager) GetSlackActionHandlers ¶
func (m *Manager) GetSlackActionHandlers() []*SlackActionHandler
Slack action handlers for the Slack adapter to wire at connect
func (*Manager) GetTelegramHandlerFactories ¶
func (m *Manager) GetTelegramHandlerFactories() []*PlatformHandlerFactory
Handler factories registered for telegram
func (*Manager) GuestHosts ¶
func (m *Manager) GuestHosts() []*PluginHost
Hosts of the third party plugins of a manager, sorted by plugin key
func (*Manager) HasEnabledPortableMCP ¶
Whether config enables a portable package with MCP servers, probed without loading plugins
func (*Manager) HasGatewayMessageInjector ¶
Reports whether a live gateway can accept plugin triggered turns
func (*Manager) HasHook ¶
Reports whether at least one callback is registered for a hook outside a safe worker
func (*Manager) HasMiddleware ¶
Reports whether any middleware of a kind is registered outside a safe worker
func (*Manager) HasPortableMCPServers ¶
Whether any portable MCP server is registered
func (*Manager) HasTUIMessageInjector ¶
Reports whether a live TUI host can accept plugin triggered turns
func (*Manager) HeldTransforms ¶
func (m *Manager) HeldTransforms() []*hookEntry
Output transform callbacks a held turn runs, captured with the hold decision, nil when nothing holds
func (*Manager) HoldsStream ¶
Reports whether a loaded output transform registration declared hold_stream
func (*Manager) InjectGatewayMessage ¶
Submits a plugin triggered turn to the live gateway
func (*Manager) InjectTUIMessage ¶
Submits a plugin triggered turn to the live TUI host
func (*Manager) InvokeHook ¶
Calls every callback of a hook and returns their non nil results, empty inside a safe worker
func (*Manager) InvokeMiddleware ¶
Calls every middleware of a kind in isolation, request kinds composing rewrites under the payload key
func (*Manager) IterHookCallbacks ¶
Stable snapshot of a hook's callbacks, empty inside a safe worker
func (*Manager) ListAutomationBlueprints ¶
Plugin registered automation blueprints sorted by key
func (*Manager) ListPluginSkillMetadata ¶
Progressive disclosure metadata of every registered plugin skill sorted by qualified name
func (*Manager) ListPluginSkills ¶
Sorted bare names of every skill a plugin registered
func (*Manager) ListPlugins ¶
Info rows of every discovered plugin sorted by key
func (*Manager) LoadFailures ¶
Plugins whose load was tried and failed, each as its name and its failure, sorted by key
func (*Manager) LoadedPluginsInOrder ¶
func (m *Manager) LoadedPluginsInOrder() []OrderedPlugin
Every loaded record in the order its key was first stored
func (*Manager) MarkDiscoveredForTests ¶
func (m *Manager) MarkDiscoveredForTests()
Marks the manager discovered without a sweep, the test pin of a zero plugin runtime
func (*Manager) OnPluginLoaded ¶
Subscribes a process listener to sweeps that load plugins this process did not have, returning its unsubscribe
func (*Manager) OwnedRegistrations ¶
func (m *Manager) OwnedRegistrations(pluginKey string) []*Registration
Registrations the ownership ledger attributes to one plugin key
func (*Manager) PluginCommandOrder ¶
Registered plugin command names in insertion order, a name replaced in place keeping its rank
func (*Manager) PluginCommands ¶
func (m *Manager) PluginCommands() map[string]*PluginCommand
Plugin slash commands by name
func (*Manager) PluginKeys ¶
Keys of every plugin the manager has a record for, sorted
func (*Manager) RearmFailedPlatform ¶
Re-leases the deferred loader of a failed platform plugin so the next lookup retries it
func (*Manager) RegisterApprovalTransport ¶
func (m *Manager) RegisterApprovalTransport(ctx context.Context, name string, present tools.ApprovalPresentFunc, pluginID string) error
Manager level approval transport registration without unload tracking
func (*Manager) RegistrationOrder ¶
func (m *Manager) RegistrationOrder() []*Registration
Registrations enrolled in reverse order teardown, in registration order
func (*Manager) RemovePluginSkill ¶
Drops a stale plugin skill entry, ignoring missing names
func (*Manager) RenderSystemPromptSections ¶
func (m *Manager) RenderSystemPromptSections(sessionInfo map[string]any) []RenderedSystemPromptSection
Renders every registered section in id order within the count and size budgets, failing open
func (*Manager) RunHeldTransforms ¶
func (m *Manager) RunHeldTransforms(ctx context.Context, callbacks []*hookEntry, kwargs map[string]any) (string, bool)
Runs a held turn's snapshotted transforms returning the first non empty rewrite and whether all failed
func (*Manager) RunLLMExecutionMiddleware ¶
func (m *Manager) RunLLMExecutionMiddleware(request map[string]any, next NextCall, context map[string]any) (any, error)
Runs provider execution through the registered LLM execution middleware
func (*Manager) RunToolExecutionMiddleware ¶
func (m *Manager) RunToolExecutionMiddleware(toolName string, args map[string]any, next NextCall, context map[string]any) (any, error)
Runs tool execution through the registered tool execution middleware
func (*Manager) SetGatewayMessageInjector ¶
func (m *Manager) SetGatewayMessageInjector(owner any, injector MessageInjector)
Publishes a live gateway injector and its lifecycle owner
func (*Manager) SetTUIMessageInjector ¶
func (m *Manager) SetTUIMessageInjector(owner any, injector MessageInjector)
Publishes a live TUI injector without touching the gateway slot
func (*Manager) TrackHook ¶
func (m *Manager) TrackHook(c *Context, hookName string, fn HookFunc, holdStream bool) *Registration
Registers a hook callback for a context, hold_stream honoured only on the output transform hook
type Manifest ¶
type Manifest struct {
Name string
Version string
Description string
Author string
RequiresEnv []EnvSpec
ProvidesTools []string
ProvidesHooks []string
ProvidesMiddlewar []string
Source string
Path string
Kind string
Key string
RequiresIcebath string
Portable bool
DataNamespace string
Capabilities []string
ManifestVersion int
APIVersion *int
RequiresPlugins []PluginDependency
PythonDeps []string
PythonRuntime string
ConfigSchema map[string]map[string]any
License string
Homepage string
Tags []string
Emits []string
Listens []string
ProvidesLocales []string
LocaleMetadata map[string]map[string]any
ConfigKeys []string
UpdateURL string
RequiresAuth []string
OAuth []map[string]any
Entry []string
SkillDirs []string
Commands []CommandSpec
MCPServers map[string]map[string]any
Raw map[string]any
}
Parsed plugin.yaml or portable plugin.json manifest
func CatalogPortManifest ¶
Manifest of a catalog port read from the plugin.yaml of its compiled-in catalog tree
func CollectDirectoryManifests ¶
Directory manifests of a home in discovery order with bundled Go plugins first
func DiscoverEntrypointManifests ¶
Metadata only manifests of the entry point plugins installed in the selected dependency environment
func ParseManifestFile ¶
Parses one plugin.yaml file into a manifest, nil with a warning on failure
func ScanDirectory ¶
Manifests under a plugins root, one level of category nesting, portable packages included
func (*Manifest) HasEntry ¶
Reports whether the manifest names an executable that speaks the plugin host protocol
func (*Manifest) ManifestOnly ¶
Reports whether the plugin loads from declared files alone with no code to run
type ManifestGate ¶
Routing verdict for one winning manifest
func GateManifest ¶
func GateManifest(h string, m *Manifest, disabled map[string]bool, enabled map[string]bool) ManifestGate
Decides how one winning manifest is handled by the enable gate
type MessageInjector ¶
Callback a live host uses to accept a plugin triggered turn
type MessageReactionAdapter ¶
type MessageReactionAdapter interface {
AddReaction(ctx context.Context, chatID, messageID, emoji string) error
}
Adapter whose platform API adds an emoji reaction to a message
type MiddlewareFunc ¶
Middleware callback receiving keyword payload fields, returning a rewrite or the wrapped result
type NamedPresence ¶
type NamedPresence struct {
Name string `json:"name"`
Title string `json:"title"`
State string `json:"state"`
Sentence string `json:"sentence"`
Disclosure string `json:"disclosure"`
}
NamedPresence is one questionnaire row with the app state and the description disclosure
func PresenceFor ¶
func PresenceFor(ctx context.Context, names []string) ([]NamedPresence, error)
Named catalog plugins this os family runs in the order asked, manifests read in parallel, unknown names dropped
type NextCall ¶
Downstream continuation an execution middleware calls at most once, nil payload reusing the current one
type Opaque ¶
Live object the other process owns, any attribute access failing with a readable reason
type OrderedPlugin ¶
type OrderedPlugin struct {
Key string
Plugin *LoadedPlugin
}
Plugin key with its loaded record
type OutboundWebhookTarget ¶
type OutboundWebhookTarget struct {
URL string
Events []string
Name string
Secret string
Timeout int
// contains filtered or unexported fields
}
One hooks.outbound entry parsed and validated, the matcher regex compiled for the tool events
func IterConfiguredOutboundWebhooks ¶
func IterConfiguredOutboundWebhooks(ctx context.Context) ([]*OutboundWebhookTarget, error)
IterConfiguredOutboundWebhooks parses hooks.outbound of the hooks setting of ctx without registering anything, the error an unscoped secret read
func NewOutboundWebhookTarget ¶
func NewOutboundWebhookTarget(url string, events []string, name, secret, matcher string, timeout int) *OutboundWebhookTarget
NewOutboundWebhookTarget builds a target the way the dataclass does, the matcher stripped and compiled or kept literal
func RegisterOutboundWebhooksFromConfig ¶
func RegisterOutboundWebhooksFromConfig(ctx context.Context) ([]*OutboundWebhookTarget, error)
RegisterOutboundWebhooksFromConfig wires every configured target once per home and event, the targets newly wired
func (*OutboundWebhookTarget) Label ¶
func (t *OutboundWebhookTarget) Label() string
Label is the configured name, the url when there is none
func (*OutboundWebhookTarget) MatchesTool ¶
Whether the tool name passes the matcher, a TypeError for a non string name against a regex
type PackError ¶
type PackError struct{ Msg string }
Pack parse, validation or fetch failure the CLI exits non zero on
type PackInstallResult ¶
Outcome of one plugin install within a pack
func InstallPackPlugins ¶
func InstallPackPlugins(ctx context.Context, pack *PluginPack, resolved []ResolvedPackPlugin, console *Console, force bool) ([]PackInstallResult, error)
Fans a pack out to pinned installs with per plugin consent, enabling and seeding each success
type PackPluginEntry ¶
type PackPluginEntry struct {
Ref, Name, Repo, Subdir string
}
One pinned plugin of a pack, empty name, repo or subdir standing for None
func (PackPluginEntry) Display ¶
func (e PackPluginEntry) Display() string
Name or repo with the subdir of a repo entry, a question mark when neither is set
func (PackPluginEntry) InstallIdentifier ¶
func (e PackPluginEntry) InstallIdentifier() string
Install identifier of a repo entry, empty for a bare name the catalog resolves
type PlatformActionAdapter ¶
Live adapter surface every verb needs, its platform value and connection state
type PlatformActionRunner ¶
type PlatformActionRunner interface {
ParsePlatform(ctx context.Context, value string) (string, error)
}
Runner whose platform values gateway.config.Platform accepts, answering the enum value or an error
type PlatformActions ¶
type PlatformActions struct {
// contains filtered or unexported fields
}
Per plugin facade over the live gateway adapters, resolved at call time and gated by the capability
func NewPlatformActions ¶
func NewPlatformActions(pluginID string) *PlatformActions
Facade holding only the owning plugin id
func (*PlatformActions) AddReaction ¶
func (p *PlatformActions) AddReaction(ctx context.Context, platform, chatID, messageID, emoji any) map[string]any
Adds or sets an emoji reaction on a platform message
func (*PlatformActions) HostAttr ¶
Python attribute of the facade a hosted plugin reads, both verbs answering as coroutine methods
func (*PlatformActions) HostCall ¶
func (p *PlatformActions) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
Runs add_reaction or set_thread_title for a hosted plugin with the Python argument binding
func (*PlatformActions) SetThreadTitle ¶
func (p *PlatformActions) SetThreadTitle(ctx context.Context, platform, chatID, threadID, title any) map[string]any
Renames a thread or forum topic
type PlatformCallOptions ¶
type PlatformCallOptions struct {
// Per positional argument, the builder the child makes the Python value with, a leading ** passing the dict as keywords
Build []string
// Per keyword argument, the builder the child makes the Python value with when the value is not None
BuildKw map[string]string
// Whether the name is read as an attribute instead of called
Get bool
// Upstream class a non None answer stays in the child as, crossing as a hosted object, empty to encode it
Hold string
// Whether the class implementation runs past the instance bridge, answering None when the class has none
Own bool
}
How a hosted platform adapter call crosses, its arguments built in the child, an attribute read, or the answer held there
type PlatformDeclarations ¶
type PlatformDeclarations interface {
Register(name string, app, requires map[string]any) error
Unregister(name string)
}
Platform declaration registry of portable MCP servers
type PlatformHandlerFactory ¶
Platform handler factory a plugin registered, called with the native client and adapter at connect
type PlatformRegistry ¶
type PlatformRegistry interface {
CoreShipsPlatform(name string) bool
NewEntry(spec PlatformSpec) (any, error)
Snapshot(name, scope string) PlatformSlot
Register(entry any, scope string)
RegisterDeferred(name string, loader *DeferredPlatformLoader, scope string)
NoteActivationEnv(name string, env []string)
IsDeferredLoadCancelled(name, scope string) bool
Restore(name string, current, previous PlatformSlot, scope string) bool
Unregister(name string)
}
Gateway platform registry owned by the gateway package
type PlatformSlot ¶
type PlatformSlot struct {
Entry any
Loader *DeferredPlatformLoader
}
Entry and deferred loader occupying one platform registry slot
type PlatformSpec ¶
type PlatformSpec struct {
Name string
Label string
AdapterFactory any
Check func() bool
ValidateConfig any
RequiredEnv []string
InstallHint string
Extra map[string]any
}
Arguments of one gateway platform adapter registration
type Plugin ¶
A plugin compiled into the binary that registers its tools, hooks and commands through a context
type PluginCatalogEntry ¶
type PluginCatalogEntry struct {
Name string
Repo string
Sha string
Description string
Maintainer string
Tier string
Category string
RequiresIcebath string
Subdir string
DocsURL string
Version string
Image string
Screenshots []string
Readme bool
Platforms []string
Title string
Onboarding bool
// Installed and enabled once in every home, official and verified entries only
Default bool
Capabilities CatalogCapabilities
KnownIssues []string
}
One curated catalog entry pinned to an exact commit
func EntryFromMapping ¶
func EntryFromMapping(raw any, label string) *PluginCatalogEntry
Validated entry of one catalog mapping, nil with a warning on any failure
func FilterEntries ¶
func FilterEntries(entries []*PluginCatalogEntry, query string) []*PluginCatalogEntry
Entries whose name, description or declared tools contain the query case insensitively, all for an empty query
func GetCatalogEntry ¶
func GetCatalogEntry(name, dir string) *PluginCatalogEntry
In-tree catalog entry of a name, nil when the catalog lacks it
func GetLiveCatalogEntry ¶
func GetLiveCatalogEntry(ctx context.Context, name string) *PluginCatalogEntry
Live catalog entry of a name, nil when absent
func GetPluginCatalogEntry ¶
func GetPluginCatalogEntry(name string) (*PluginCatalogEntry, error)
In-tree catalog entry of a name, nil when absent, an error when the shipped catalog cannot be listed
func LoadCatalog ¶
func LoadCatalog(dir string) []*PluginCatalogEntry
Every valid in-tree or directory catalog entry sorted by file name, malformed ones skipped with a warning
func LoadCatalogLive ¶
func LoadCatalogLive(ctx context.Context) []*PluginCatalogEntry
Live or cached catalog entries merged with the in-tree ones, the newer source winning a differing pin
func (*PluginCatalogEntry) InstallIdentifier ¶
func (e *PluginCatalogEntry) InstallIdentifier() string
Installer identifier, repo#subdir for monorepo entries
func (*PluginCatalogEntry) ToDict ¶
func (e *PluginCatalogEntry) ToDict() map[string]any
Ordered mapping of every field the JSON output renders
type PluginCommand ¶
type PluginCommand struct {
Handler PluginCommandHandler
Description string
Plugin string
PluginKey string
ArgsHint string
ArgumentMode string
}
In session slash command a plugin registered
type PluginCommandHandler ¶
Slash command handler receiving the raw argument text
func GetPluginCommandHandler ¶
func GetPluginCommandHandler(ctx context.Context, name string) (PluginCommandHandler, bool)
Handler of a plugin slash command after discovery
type PluginCommandTimeoutError ¶
type PluginCommandTimeoutError struct{ Seconds float64 }
Error raised when an awaited plugin command result outlives its bound
func (*PluginCommandTimeoutError) Error ¶
func (e *PluginCommandTimeoutError) Error() string
type PluginDependency ¶
One advisory requires_plugins entry
type PluginDoctorReport ¶
type PluginDoctorReport struct {
Path string
Manifest *Manifest
Findings []DoctorFinding
RegisteredTools []string
RegisteredHooks []string
RegisteredProviders []string
}
Plugin Doctor result for one target
func (*PluginDoctorReport) FormatText ¶
func (r *PluginDoctorReport) FormatText() string
Human report with the manifest line, every finding, the verdict and the registration counts
func (*PluginDoctorReport) OK ¶
func (r *PluginDoctorReport) OK() bool
True when no finding is an error
type PluginEntry ¶
type PluginEntry struct {
Name string
Version string
Description string
Source string
Dir string
Key string
}
One plugin the loader sees with its display metadata, source label, directory and registry key
func DiscoverAllPlugins ¶
func DiscoverAllPlugins(h string) ([]PluginEntry, error)
Every plugin the loader sees in load order, bundled in sorted tree walk order, then user plugins, then entry points
func FindPluginEntry ¶
func FindPluginEntry(h, name string) (*PluginEntry, error)
Plugin entry for a key or manifest name, else a unique bare leaf, else the catalog name it was installed under
type PluginEventNameError ¶
type PluginEventNameError struct{ Msg string }
Error a ValueError raised by the plugin event naming carries
func (*PluginEventNameError) Error ¶
func (e *PluginEventNameError) Error() string
func (*PluginEventNameError) ErrorKind ¶
func (e *PluginEventNameError) ErrorKind() string
type PluginEventPayloadError ¶
type PluginEventPayloadError struct{ Msg string }
Error a TypeError raised for a plugin event payload that is not a dict carries
func (*PluginEventPayloadError) Error ¶
func (e *PluginEventPayloadError) Error() string
func (*PluginEventPayloadError) ErrorKind ¶
func (e *PluginEventPayloadError) ErrorKind() string
type PluginHost ¶
type PluginHost struct {
// contains filtered or unexported fields
}
Guest of one plugin of a manager, started on first use and restarted after an unexpected exit
func (*PluginHost) Alive ¶
func (h *PluginHost) Alive() bool
Reports whether the channel is open and the child has not exited
func (*PluginHost) Info ¶
func (h *PluginHost) Info() map[string]any
Hello reply of the running child
func (*PluginHost) Load ¶
Runs the register function of a plugin in its guest and replays its registrations onto the plugin context
func (*PluginHost) LoadInstance ¶
func (h *PluginHost) LoadInstance(ctx context.Context, pluginDir, baseRef, capture string, pctx *Context, beforeReload func(context.Context)) (*HostedObject, error)
Runs the register function of a category plugin in its guest and returns a proxy of the one provider it registered for capture, reloaded after a guest restart
func (*PluginHost) PID ¶
func (h *PluginHost) PID() int
Process id of the running child, zero when none
func (*PluginHost) ProfileCall ¶
func (h *PluginHost) ProfileCall(ctx context.Context, pluginDir, moduleName, profile, attr string, args []any, kwargs map[string]any) (any, error)
Runs a model provider profile overridden method or callable field in the child
func (*PluginHost) Shutdown ¶
func (h *PluginHost) Shutdown()
Stops the child, asking it to run unload callbacks first and killing it after the grace period
type PluginHostError ¶
Remote raise naming a class plugins do not commonly catch, or the parent raising while serving
func (*PluginHostError) ClassChain ¶
func (e *PluginHostError) ClassChain() []string
Class names of the remote exception through BaseException, the parent side raise standing as PluginHostError
func (*PluginHostError) Error ¶
func (e *PluginHostError) Error() string
type PluginHostUnavailable ¶
Channel closed because the host process exited or never started
func (*PluginHostUnavailable) Error ¶
func (e *PluginHostUnavailable) Error() string
type PluginHostUnsupported ¶
type PluginHostUnsupported struct{ Msg string }
Context method that cannot cross the plugin host boundary
func (*PluginHostUnsupported) Error ¶
func (e *PluginHostUnsupported) Error() string
type PluginLLMClient ¶
type PluginLLMClient interface {
CallLLM(ctx context.Context, req *AuxLLMRequest) (any, error)
AsyncCallLLM(ctx context.Context, req *AuxLLMRequest) (any, error)
ReadMainProvider() string
ReadMainModel() string
}
Auxiliary client the wiring installs, RouteInfo filled by the callee with the provider and model that ran
type PluginLiveNotes ¶
type PluginLiveNotes struct {
// contains filtered or unexported fields
}
Go live notices an open chat holds, one per plugin key in queue order, plus those riding this tool batch
type PluginLlm ¶
type PluginLlm struct {
// contains filtered or unexported fields
}
Host owned LLM access of one trusted plugin, identity bound at construction for the trust gate
func (*PluginLlm) AComplete ¶
func (l *PluginLlm) AComplete(ctx context.Context, messages []any, o PluginLlmOptions) (*PluginLlmCompleteResult, error)
Async sibling of the plain completion
func (*PluginLlm) ACompleteStructured ¶
func (l *PluginLlm) ACompleteStructured(ctx context.Context, spec PluginLlmStructuredRequest, o PluginLlmOptions) (*PluginLlmStructuredResult, error)
Async sibling of the structured completion
func (*PluginLlm) Complete ¶
func (l *PluginLlm) Complete(ctx context.Context, messages []any, o PluginLlmOptions) (*PluginLlmCompleteResult, error)
Host chat completion against the active model, overrides gated per plugin
func (*PluginLlm) CompleteStructured ¶
func (l *PluginLlm) CompleteStructured(ctx context.Context, spec PluginLlmStructuredRequest, o PluginLlmOptions) (*PluginLlmStructuredResult, error)
Bounded structured completion with text and image input, JSON parsed and validated when requested
type PluginLlmCompleteResult ¶
type PluginLlmCompleteResult struct {
Text string `json:"text"`
Provider string `json:"provider"`
Model string `json:"model"`
AgentID string `json:"agent_id"`
Usage PluginLlmUsage `json:"usage"`
Audit map[string]any `json:"audit"`
}
Result of a plain completion
type PluginLlmImageInput ¶
type PluginLlmImageInput struct {
Data []byte `json:"data"`
URL string `json:"url"`
MimeType string `json:"mime_type"`
FileName string `json:"file_name"`
Type string `json:"type"`
}
Image block given as raw bytes or an http or data URL
type PluginLlmOptions ¶
type PluginLlmOptions struct {
Provider, Model, AgentID, Profile, Purpose, Task *string
Temperature *float64
MaxTokens *int
Timeout *float64
}
Keyword options of the completion methods, nil pointers and empty strings meaning None
type PluginLlmStructuredRequest ¶
type PluginLlmStructuredRequest struct {
Instructions string
Input []any
JSONSchema any
JSONMode bool
SchemaName string
SystemPrompt string
}
Arguments of a structured completion
type PluginLlmStructuredResult ¶
type PluginLlmStructuredResult struct {
Text string `json:"text"`
Provider string `json:"provider"`
Model string `json:"model"`
AgentID string `json:"agent_id"`
Usage PluginLlmUsage `json:"usage"`
Parsed any `json:"parsed"`
ContentType string `json:"content_type"`
Audit map[string]any `json:"audit"`
}
Result of a structured completion, parsed only when JSON was requested and returned
type PluginLlmTextInput ¶
Text block of a structured input list
type PluginLlmTrustError ¶
type PluginLlmTrustError struct{ Message string }
Refusal of an LLM override the plugin is not trusted for, a PermissionError in Python
func (*PluginLlmTrustError) Error ¶
func (e *PluginLlmTrustError) Error() string
type PluginLlmUsage ¶
type PluginLlmUsage struct {
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
TotalTokens int `json:"total_tokens"`
CacheReadTokens int `json:"cache_read_tokens"`
CacheWriteTokens int `json:"cache_write_tokens"`
CostUSD *float64 `json:"cost_usd"`
}
Token and cost usage of one completion, cost the host estimate when known
type PluginLoadTimeout ¶
type PluginLoadTimeout struct{ Msg string }
Raised on the loading goroutine when a plugin import and register overran its deadline
func (*PluginLoadTimeout) Error ¶
func (e *PluginLoadTimeout) Error() string
type PluginMessage ¶
type PluginMessage struct {
// contains filtered or unexported fields
}
Handle of one posted message whose edits replace it in place and stay ordered behind a slow operation
func (*PluginMessage) AEdit ¶
Edit for code already running on the gateway loop, waiting for a pending operation first
func (*PluginMessage) Edit ¶
Replaces the message text in place or posts anew where the surface cannot edit, never raising
func (*PluginMessage) ErrorCode ¶
func (h *PluginMessage) ErrorCode() any
Error code of the last operation, nil after a success
func (*PluginMessage) ErrorKind ¶
func (h *PluginMessage) ErrorKind() string
Python type name a hosted plugin sees for the handle
func (*PluginMessage) HostAttr ¶
Attribute of the handle a hosted plugin reads, edit and the async aedit as methods
func (*PluginMessage) HostCall ¶
func (h *PluginMessage) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
Runs edit or aedit for a hosted plugin with the text argument bound as Python binds it
func (*PluginMessage) MessageID ¶
func (h *PluginMessage) MessageID() any
Message id the handle follows, nil before any message landed
func (*PluginMessage) Pending ¶
func (h *PluginMessage) Pending() bool
Whether an operation the gateway has not finished is still attached
func (*PluginMessage) Quoted ¶
func (h *PluginMessage) Quoted() string
Repr a hosted plugin sees for the handle
func (*PluginMessage) Result ¶
func (h *PluginMessage) Result() map[string]any
Result of the last operation on the handle
func (*PluginMessage) String ¶
func (h *PluginMessage) String() string
Summary of the handle for logs: whether the last operation succeeded, then the message id and error code it has, an absent one left out
type PluginOperationError ¶
Error raised by plugin management operations with a user facing message and its failure class
func (*PluginOperationError) Class ¶
func (e *PluginOperationError) Class() string
Failure class of an operation error, other when the raise site named none
func (*PluginOperationError) Error ¶
func (e *PluginOperationError) Error() string
type PluginPack ¶
type PluginPack struct {
Name, Description, Author, Version string
Plugins []PackPluginEntry
Config []PackSeed
Skills []string
}
A parsed and validated pack manifest
func LoadPack ¶
func LoadPack(ctx context.Context, pathOrURL string) (*PluginPack, error)
Loads a pack from a local file path or an https URL
func ParsePack ¶
func ParsePack(text, source string) (*PluginPack, error)
Parses and validates a pack YAML document
type PluginPanicError ¶
A plugin panic recovered during import or register, the Go form of SystemExit
func (*PluginPanicError) Error ¶
func (e *PluginPanicError) Error() string
type PluginPathNotFoundError ¶
type PluginPathNotFoundError struct{ Msg string }
Explicit path or plugin id that names no plugin
func (*PluginPathNotFoundError) Error ¶
func (e *PluginPathNotFoundError) Error() string
type PluginPermissionError ¶
type PluginPermissionError struct{ Msg string }
Refusal raised when a managed install or administrator owned key blocks a plugin settings write
func (*PluginPermissionError) Error ¶
func (e *PluginPermissionError) Error() string
type PluginScanBlocked ¶
type PluginScanBlocked struct {
*PluginOperationError
ScanResult *skills.ScanResult
}
Security scan refusal carrying the scan result it was decided on
func (*PluginScanBlocked) Unwrap ¶
func (e *PluginScanBlocked) Unwrap() error
type PluginSettingValue ¶
One key and value of an ordered settings edit
type PluginSettingsValueError ¶
type PluginSettingsValueError struct{ Msg string }
PluginSettingsValueError is a settings edit the schema refuses, the ValueError a form shows back
func (*PluginSettingsValueError) Error ¶
func (e *PluginSettingsValueError) Error() string
func (*PluginSettingsValueError) ErrorKind ¶
func (e *PluginSettingsValueError) ErrorKind() string
type PluginSkill ¶
type PluginSkill struct {
Path string
Plugin string
PluginKey string
PluginName string
Portable bool
BareName string
Description string
Frontmatter map[string]any
}
Read only plugin skill resolvable as plugin:name while the plugin is enabled
type PluginSourceMoved ¶
type PluginSourceMoved struct{ *PluginOperationError }
Source no longer at the commit the install dialog reviewed
func (*PluginSourceMoved) Unwrap ¶
func (e *PluginSourceMoved) Unwrap() error
type PluginState ¶
type PluginState struct {
// contains filtered or unexported fields
}
Atomic quota bounded JSON key value state owned by one plugin
func NewPluginState ¶
func NewPluginState(h, pluginID, dataNamespace string) *PluginState
State facade of one plugin under a home, keyed by its data namespace
func (*PluginState) DataDir ¶
func (s *PluginState) DataDir() string
Profile scoped directory matching the PLUGIN_DATA of portable plugins
func (*PluginState) Get ¶
func (s *PluginState) Get(key string, def any) (any, error)
Stored JSON value of a key, def when absent
func (*PluginState) HostAttr ¶
Python attribute of the plugin state store a hosted plugin reads, get and set answering as methods
func (*PluginState) HostCall ¶
func (s *PluginState) HostCall(_ context.Context, method string, args []any, kwargs map[string]any) (any, error)
Runs get(key, default=None) or set(key, value) of the plugin state store for a hosted plugin
func (*PluginState) Path ¶
func (s *PluginState) Path() string
The state.json file inside the data directory
func (*PluginState) QuotaBytes ¶
func (s *PluginState) QuotaBytes() int
Largest encoded state document a plugin may store
type PluginTask ¶
type PluginTask struct {
Name string
// contains filtered or unexported fields
}
Supervised background task of a plugin cancelled by unload or force reload
func (*PluginTask) Done ¶
func (t *PluginTask) Done() <-chan struct{}
Closed once the task function returned
func (*PluginTask) Err ¶
func (t *PluginTask) Err() error
Error the task function returned, valid after Done closed
type PluginToolOverrideError ¶
type PluginToolOverrideError struct{ Msg string }
Raised when a plugin overrides a built-in tool without the operator opt in
func (*PluginToolOverrideError) Error ¶
func (e *PluginToolOverrideError) Error() string
func (*PluginToolOverrideError) Is ¶
func (e *PluginToolOverrideError) Is(target error) bool
Matches PluginPermissionError the way the Python class subclasses PermissionError
type PluginToolset ¶
type PluginToolset struct {
Key, Label, Description string
}
One plugin toolset row of the tools picker
func GetPluginToolsets ¶
func GetPluginToolsets(ctx context.Context) []PluginToolset
Plugin toolsets as key, label and description rows for the tools picker
type PortableAvailability ¶
Install time availability verdict of a portable server declaration on this host
type PreToolCallDirective ¶
Resolved pre_tool_call outcome
func PreToolCallDirectiveDetails ¶
func PreToolCallDirectiveDetails(ctx context.Context, toolName string, args map[string]any, ids PreToolCallIDs) (PreToolCallDirective, error)
PreToolCallDirectiveDetails exports preToolCallDirectiveDetails for the tool dispatcher bridge
type PreToolCallIDs ¶
type PreToolCallIDs struct {
TaskID, SessionID, ToolCallID, TurnID, APIRequestID string
MiddlewareTrace []map[string]any
}
Observability ids forwarded to pre_tool_call hooks
type PreVerifyInput ¶
type PreVerifyInput struct {
SessionID, Platform, Model, FinalResponse string
Coding bool
Attempt int
ChangedPaths []string
}
Scope signals forwarded to pre_verify hooks
type Presence ¶
Catalog card app state with the reason sentence, empty when present or unknown
func CatalogPresence ¶
func CatalogPresence(ctx context.Context, entry *PluginCatalogEntry) (Presence, error)
App state of one catalog entry on this host, the worst server winning in manifest order
type Provenance ¶
type Provenance struct {
Name string
Class ProvenanceClass
Path string
Row map[string]any
OriginURL string
SavedUpdateURL string
}
Provenance of one installed plugin dir with its sidecar row, origin and saved feed tag
func PluginsProvenance ¶
func PluginsProvenance(ctx context.Context, pluginsDir string) []Provenance
Classifies every visible plugin dir by sidecar row and git checkout presence
type ProvenanceClass ¶
type ProvenanceClass string
Install provenance class of a plugin directory
const ( ProvenanceGit ProvenanceClass = "git" ProvenanceManual ProvenanceClass = "manual" ProvenanceSelfCloned ProvenanceClass = "self-cloned" ProvenanceDrift ProvenanceClass = "drift" )
type ProviderRequestAnswer ¶
Answer of a credentialed provider request the wiring sends for a plugin
type Registration ¶
type Registration struct {
Kind string
Key string
Release func() error
PluginKey string
HoldStream bool
// contains filtered or unexported fields
}
One host owned registration with the inverse that unwinds it
func (*Registration) Active ¶
func (r *Registration) Active() bool
Reports whether the handle still owns an active registration
func (*Registration) Dispose ¶
func (r *Registration) Dispose() error
Releases the registration once, repeated disposal being harmless
type RemovedEntry ¶
One catalog kill list entry naming a pulled plugin and why
func FindRemoved ¶
func FindRemoved(ctx context.Context, nameOrRepo, dir string) *RemovedEntry
Kill list entry matching a catalog name or repo, the in-tree list united with the live one when dir is empty
func InstalledPluginRemoval ¶
func InstalledPluginRemoval(h, name, pluginDir string) *RemovedEntry
Kill list verdict for an installed plugin by name, recorded source, catalog block or directory
func LiveRemovedList ¶
func LiveRemovedList(ctx context.Context) []RemovedEntry
Kill list of the live or cached catalog, empty when it is unavailable
func MatchRemoved ¶
func MatchRemoved(candidate string, entries []RemovedEntry) *RemovedEntry
One candidate against a resolved kill list by exact name or normalized repo
func ResolvedRemovedEntries ¶
func ResolvedRemovedEntries(ctx context.Context) []RemovedEntry
Full kill list in one resolution, the in-tree list united with the live one
type RenderedSystemPromptSection ¶
Validated prompt text frozen on the owning agent
func RenderSystemPromptSections ¶
func RenderSystemPromptSections(ctx context.Context, sessionInfo map[string]any) []RenderedSystemPromptSection
Renders the active profile's plugin prompt sections after ensuring discovery
type RepinConsentRequired ¶
New pin widens the plugin surface without consent, nothing changed on disk
func (*RepinConsentRequired) Error ¶
func (e *RepinConsentRequired) Error() string
type RepinResult ¶
Outcome of a catalog re-pin
type ReplacementCoordinator ¶
type ReplacementCoordinator struct {
// contains filtered or unexported fields
}
Links and removes registration generations in any unload order
func (*ReplacementCoordinator) Acquire ¶
func (c *ReplacementCoordinator) Acquire(slot, current, previous any, restore func(any) error, finalize func() error) *ReplacementLease
Attaches a new live generation to the active predecessor whose value equals previous
func (*ReplacementCoordinator) Transaction ¶
func (c *ReplacementCoordinator) Transaction(fn func())
Runs fn while serialized against every acquire and dispose, re-entrant on the owning goroutine
type ReplacementLease ¶
type ReplacementLease struct {
// contains filtered or unexported fields
}
One ownership generation in a replaceable registry slot
func (*ReplacementLease) Dispose ¶
func (l *ReplacementLease) Dispose() error
Releases the lease, restoring the nearest live predecessor when it is the latest generation
type RequestMiddlewareResult ¶
type RequestMiddlewareResult struct {
Payload any
OriginalPayload any
Changed bool
Trace []map[string]any
}
Result of running request middleware over a payload
func ApplyLLMRequestMiddleware ¶
func ApplyLLMRequestMiddleware(ctx context.Context, request map[string]any, extra map[string]any) RequestMiddlewareResult
Runs LLM request middleware of the active profile after lazy discovery, so a cold surface still rewrites requests
func ApplyToolRequestMiddleware ¶
func ApplyToolRequestMiddleware(ctx context.Context, toolName string, args, originalArgs map[string]any, extra map[string]any) (RequestMiddlewareResult, error)
Runs tool request middleware of the active profile after lazy discovery, so a cold surface still rewrites tool arguments
type ResolvedPackPlugin ¶
type ResolvedPackPlugin struct {
Entry PackPluginEntry
Identifier string
IndexCapabilities []string
ResolveError string
}
A pack entry resolved to an installable identifier, empty when catalog resolution failed
func ResolvePackPlugins ¶
func ResolvePackPlugins(ctx context.Context, pack *PluginPack) []ResolvedPackPlugin
Resolves every entry, bare names through the curated catalog, failures carried per entry
type RunChecksOptions ¶
Options of one update check run, nil functions taking the real network and git probes
type ScheduledCheckOptions ¶
type ScheduledCheckOptions struct {
RunChecks func(ctx context.Context, pluginsDir string) ([]*CheckResult, error)
PluginsDir string
ApplyUpdate func(ctx context.Context, name string) error
Log *slog.Logger
Now *float64
}
Seams of one scheduled update check, nil fields left to the caller defaults
type ScopedRegistry ¶
type ScopedRegistry interface {
Accepts(provider any) bool
ProviderName(provider any) string
Identity(provider any) error
Snapshot(name, scope string) any
Register(provider any, scope string) (bool, error)
Restore(name string, current, replacement any, scope string) bool
}
Scope keyed process wide provider registry of one category, owned by a higher package
type SecretSourceInfo ¶
Plugin registered secret source as the dotenv orchestrator sees it
type SecretSources ¶
type SecretSources interface {
ListPluginSources() []SecretSourceInfo
ResetCache(h string) error
LoadDotenv(ctx context.Context, h string) error
RefreshInstalledScope(ctx context.Context, h string) error
}
Secret source orchestrator the manager re-pulls after discovery
type SectionOption ¶
type SectionOption func(*SystemPromptSection)
Optional setting of a system prompt section registration
func WithSectionMaxChars ¶
func WithSectionMaxChars(maxChars int) SectionOption
Caps the rendered section length in characters
func WithSectionPosition ¶
func WithSectionPosition(position string) SectionOption
Places the section at a prompt position
type ServerLiveness ¶
type ServerLiveness struct {
Kind string
Path string
URLField string
TokenField string
PIDField string
}
ServerLiveness is a parsed server liveness declaration, field for field the mcp Liveness
type ServiceMissingError ¶
type ServiceMissingError struct{ Name string }
Error naming a collaborator the wiring never installed
func (*ServiceMissingError) Error ¶
func (e *ServiceMissingError) Error() string
type Services ¶
type Services struct {
InvokeLifecycleHook func(ctx context.Context, hookName string, kwargs map[string]any) []any
FailoverReason func(value any) (any, bool)
MemoryProviderDir func(h, name string) (string, bool)
HostObject func(kind string, obj any) (name string, ok bool)
BindProfileSecretScope func(ctx context.Context, home string) context.Context
GetSecret func(ctx context.Context, name string) (string, bool, error)
PluginLLM PluginLLMClient
SubagentLifecycle SubagentDelegation
DelegationBackends func(c *Context) any
CurrentCronExecution func(ctx context.Context) any
CallMCPTool func(ctx context.Context, server, tool string, timeout float64, args map[string]any) (string, error)
RedeemSideQuestion func(ctx context.Context, token, prompt any, pluginID, h string, timeout any) (*string, error)
BoundSessionKey func(ctx context.Context) string
ResolveBuiltinCommand func(name string) bool
DispatchTool func(ctx context.Context, scope, toolName string, args, kwargs map[string]any) (string, error)
Platforms PlatformRegistry
ProviderRegistries map[string]ScopedRegistry
BuiltinAuxTaskKeys func() []string
RegisterRedactionPatterns func(patterns any, source string) (int, error)
BuildPluginBlueprint func(pluginName string, key any, spec BlueprintSpec) (string, any, error)
SecretSources SecretSources
PlatformDeclarations PlatformDeclarations
OAuthSurface func(manifest map[string]any) map[string]bool
OAuthAdmissionProblems func(manifest map[string]any, pluginDir string) []string
OAuthAdmissionWarnings func(manifest map[string]any, pluginDir string) []string
PortableServerAvailability func(ctx context.Context, decl AgentPluginServerDeclaration) (PortableAvailability, error)
MaskedSecretPrompt func(prompt string) (string, error)
ServerAvailabilityReason func(ctx context.Context, declaration AgentPluginServerDeclaration, appTitle string) (reason string, offerable bool, err error)
PrepareMemoryProviderDependencies func(ctx context.Context, name string) error
RequiresAuthNotice func(manifest map[string]any) string
DeclaresModelProviderKind func(pluginDir string) bool
PluginOAuthKey func(pluginDir string) string
ForgetPluginGrants func(plugin string) error
ReloadGatewayPlugins func(ctx context.Context, target, profileHome string) (map[string]any, error)
GatewayRunningPid func(pidPath string, cleanupStale bool) (int, bool, error)
InstalledGatewayServiceKind func(ctx context.Context) (string, bool, error)
RefreshPluginSessions func(ctx context.Context, home, pluginKey, note string) error
MCP MCPConnector
BroadcastGlobalEvent func(name string, payload map[string]any)
ActiveMemoryProvider func(ctx context.Context, h string) string
PruneInactiveMemoryProviderSkills func(ctx context.Context, h, active string)
LoadMemoryProvider func(ctx context.Context, h, name string)
GatewayLoop func(ctx context.Context) (runner any, onLoop bool)
BoundRoute func(ctx context.Context) any
ResolvePluginMessageTarget func(ctx context.Context, runner any, sessionKey string, route any, pluginHome, pluginID string) (target any, refusal map[string]any, err error)
PostPluginMessage func(ctx context.Context, target any, text, pluginID string) map[string]any
EditPluginMessage func(ctx context.Context, target, messageID any, text, pluginID string) map[string]any
ActiveSessionPolicy func(ctx context.Context) (platform, cwd string, ok bool)
GatewayRunnerRef func() PlatformActionRunner
ParseServerLiveness func(raw any) (ServerLiveness, error)
ParseCostPolicy func(costs, spendLimit, costUnit any, where string) error
DiscoverMemoryProviders func(ctx context.Context) [][2]string
CredentialedProviderRequest func(ctx context.Context, pluginDir, provider, method, url string, json any, headers map[string]string, timeout time.Duration) (*ProviderRequestAnswer, error)
}
Higher package collaborators the top level wiring installs so pkg/plugins never imports them
func InstalledServices ¶
func InstalledServices() *Services
InstalledServices exports the installed collaborator set so other packages' tests can restore it
type SetOf ¶
type SetOf []any
SetOf is a set or frozenset rebuilt from a wire list, first occurrences kept in order
type ShellHookResult ¶
type ShellHookResult struct {
ReturnCode *int
Stdout, Stderr string
TimedOut bool
ElapsedSeconds float64
Error string
Parsed map[string]any
}
Outcome of one hook subprocess, Error empty and ReturnCode nil when not applicable
func RunShellHookOnce ¶
func RunShellHookOnce(ctx context.Context, spec *ShellHookSpec, kwargs map[string]any) (*ShellHookResult, error)
Fires one hook with a synthetic payload through the production path, the parsed directive attached
func TestShellHook ¶
func TestShellHook(ctx context.Context, event, command, forTool string) (*ShellHookResult, error)
TestShellHook runs a configured hook once on a sample event, naming the tool when one is given
type ShellHookSpec ¶
type ShellHookSpec struct {
Event, Command string
Timeout int
FailClosed bool
// contains filtered or unexported fields
}
One parsed hooks entry, the matcher empty when absent
func IterConfiguredShellHooks ¶
func IterConfiguredShellHooks(ctx context.Context) []*ShellHookSpec
Parsed hooks of the hooks setting of ctx without wiring any, for the hooks list command and doctor
func NewShellHookSpec ¶
func NewShellHookSpec(event, command, matcher string, timeout int, failClosed bool) *ShellHookSpec
Spec with its matcher stripped and compiled, an invalid regex kept for literal equality
func RecordShellHookConsentFromConfig ¶
func RecordShellHookConsentFromConfig(ctx context.Context, acceptHooks bool) ([]*ShellHookSpec, error)
First use consent for every configured hook without wiring any, returning the consented specs
func RegisterShellHooksFromConfig ¶
func RegisterShellHooksFromConfig(ctx context.Context, acceptHooks, interactive bool) ([]*ShellHookSpec, error)
Registers every consented configured hook once per home and returns the newly wired specs
func (*ShellHookSpec) MatchesTool ¶
Whether the tool name passes the matcher, a TypeError for a non string name against a regex
type SkippedUpdate ¶
type SkippedUpdate struct {
Row *CheckResult
Reason string
}
One check row an update with no name cannot move and why
type SlackActionHandler ¶
Slack Block Kit action handler a plugin registered
type SubagentCancelResult ¶
type SubagentCancelResult struct {
Accepted bool `json:"accepted"`
AlreadyTerminal bool `json:"already_terminal"`
UnknownHandle bool `json:"unknown_handle"`
Unsupported bool `json:"unsupported"`
State SubagentState `json:"state"`
}
Outcome of a cancellation request
type SubagentChild ¶
type SubagentChild interface {
SubagentID() string
Provider() *string
Model() *string
DelegateRole() (string, bool)
DelegateDepth() int
}
Child agent the delegate tool built, as the lifecycle reads it
type SubagentChildSpec ¶
type SubagentChildSpec struct {
Goal string
Context *string
Toolsets []string
Model any
Parent any
Role string
Credentials map[string]any
RoutingCfg map[string]any
}
Arguments of tools.delegate_tool _build_child_preserving_parent_tools for one lifecycle launch
type SubagentDelegation ¶
type SubagentDelegation interface {
SessionID(parent any) string
EnabledToolsets(parent any) ([]string, bool)
ValidateToolset(ctx context.Context, name string) bool
LoadConfig(ctx context.Context) map[string]any
ResolveCredentials(ctx context.Context, routingCfg map[string]any, parent any) (map[string]any, error)
BuildChild(ctx context.Context, spec SubagentChildSpec) (SubagentChild, error)
RunChild(ctx context.Context, goal string, child SubagentChild, parent any) (any, error)
HardInterrupt(child SubagentChild, reason, toolReason string) (bool, error)
Steer(subagentID, text string) bool
}
Delegate tool, toolset and parent agent collaborators the wiring installs for the lifecycle service
type SubagentHandle ¶
type SubagentHandle struct {
ContractVersion int `json:"contract_version"`
SubagentID string `json:"subagent_id"`
ParentSessionID *string `json:"parent_session_id"`
CorrelationID *string `json:"correlation_id"`
CreatedAt float64 `json:"created_at"`
Provider *string `json:"provider"`
Model *string `json:"model"`
Role string `json:"role"`
Depth int `json:"depth"`
Capability string `json:"capability"`
// contains filtered or unexported fields
}
Serializable handle of a launched subagent carrying its capability
func SubagentHandleFromDict ¶
func SubagentHandleFromDict(value map[string]any) (*SubagentHandle, error)
Handle rebuilt from its dict, malformed when a field is missing or unknown
func (*SubagentHandle) ToDict ¶
func (h *SubagentHandle) ToDict() map[string]any
Field dict of the handle in declaration order
type SubagentLaunchRequest ¶
type SubagentLaunchRequest struct {
Goal string `json:"goal"`
Context *string `json:"context"`
Role string `json:"role"`
Model *string `json:"model"`
Provider *string `json:"provider"`
AllowedToolsets []string `json:"allowed_toolsets"`
BlockedTools []string `json:"blocked_tools"`
WorkingDirectory *string `json:"working_directory"`
ParentSessionID *string `json:"parent_session_id"`
CorrelationID *string `json:"correlation_id"`
Metadata map[string]any `json:"metadata"`
TimeoutSeconds *float64 `json:"timeout_seconds"`
// contains filtered or unexported fields
}
Launch request of one delegated subagent, nil pointers and slices meaning None
type SubagentLifecycleError ¶
type SubagentLifecycleError struct{ Message string }
Request the public lifecycle API cannot safely accept, a ValueError in Python
func (*SubagentLifecycleError) Error ¶
func (e *SubagentLifecycleError) Error() string
type SubagentLifecycleService ¶
type SubagentLifecycleService struct {
// contains filtered or unexported fields
}
Plugin safe lifecycle service over the host delegate tool, children in process with terminal retention
func NewSubagentLifecycleService ¶
func NewSubagentLifecycleService(resolver func(ctx context.Context) any) *SubagentLifecycleService
Service resolving the parent bound to the calling context
func (*SubagentLifecycleService) Cancel ¶
func (s *SubagentLifecycleService) Cancel(ctx context.Context, handle any, reason string) *SubagentCancelResult
Requests a hard interrupt of a running child, accepted only when the child took it
func (*SubagentLifecycleService) HostAttr ¶
func (s *SubagentLifecycleService) HostAttr(_ context.Context, name string) (any, bool, bool, error)
The seven lifecycle methods for a hosted plugin, each a plain method
func (*SubagentLifecycleService) HostCall ¶
func (s *SubagentLifecycleService) HostCall(ctx context.Context, method string, args []any, kwargs map[string]any) (any, error)
Runs a lifecycle method for a hosted plugin with the Python argument binding
func (*SubagentLifecycleService) Launch ¶
func (s *SubagentLifecycleService) Launch(ctx context.Context, request any) (*SubagentHandle, error)
Validates, builds the child through the delegate tool and starts it on the lifecycle executor
func (*SubagentLifecycleService) Reconnect ¶
func (s *SubagentLifecycleService) Reconnect(ctx context.Context, handle any) *SubagentReconnectResult
Whether a handle still names a record of this process, never relaunching work
func (*SubagentLifecycleService) Result ¶
func (s *SubagentLifecycleService) Result(ctx context.Context, handle any) *SubagentResult
Terminal result, NOT_READY while running and UNKNOWN_HANDLE for foreign handles
func (*SubagentLifecycleService) Status ¶
func (s *SubagentLifecycleService) Status(ctx context.Context, handle any) *SubagentStatus
Current state of a handle, UNKNOWN_HANDLE for anything not owned by the active parent
func (*SubagentLifecycleService) Steer ¶
Queues text for the child next iteration boundary while it accepts steering
func (*SubagentLifecycleService) Wait ¶
func (s *SubagentLifecycleService) Wait(ctx context.Context, handle any, timeoutSeconds *float64) *SubagentTerminalState
Waits for the child to finish, timed out when the timeout elapses first, nil timeout waiting forever
type SubagentParentRef ¶
type SubagentParentRef func() any
Resolver of a weakly held parent agent, nil once the agent is collected
type SubagentReconnectResult ¶
type SubagentReconnectResult struct {
Connected bool `json:"connected"`
State SubagentState `json:"state"`
Diagnostic *string `json:"diagnostic"`
}
Outcome of reconnecting a serialized handle
type SubagentResult ¶
type SubagentResult struct {
Handle any `json:"handle"`
TerminalState SubagentState `json:"terminal_state"`
Ready bool `json:"ready"`
Summary *string `json:"summary"`
StructuredPayload map[string]any `json:"structured_payload"`
StartedAt *float64 `json:"started_at"`
CompletedAt *float64 `json:"completed_at"`
ErrorClassification *string `json:"error_classification"`
ErrorMessage *string `json:"error_message"`
UsageMetadata map[string]any `json:"usage_metadata"`
ToolExecutionSummary map[string]any `json:"tool_execution_summary"`
ResultHash *string `json:"result_hash"`
}
Terminal result snapshot of a subagent, ready once it finished
type SubagentState ¶
type SubagentState string
Lifecycle state of a delegated subagent, a str enum in Python
const ( SubagentPending SubagentState = "PENDING" SubagentStarting SubagentState = "STARTING" SubagentRunning SubagentState = "RUNNING" SubagentSucceeded SubagentState = "SUCCEEDED" SubagentFailed SubagentState = "FAILED" SubagentInterrupted SubagentState = "INTERRUPTED" SubagentCancelRequested SubagentState = "CANCEL_REQUESTED" SubagentCancelled SubagentState = "CANCELLED" SubagentUnknown SubagentState = "UNKNOWN" )
func (SubagentState) PythonEnumValue ¶
func (s SubagentState) PythonEnumValue() any
type SubagentStatus ¶
type SubagentStatus struct {
Handle any `json:"handle"`
State SubagentState `json:"state"`
UpdatedAt float64 `json:"updated_at"`
Diagnostic *string `json:"diagnostic"`
}
Status snapshot, Handle the handle given when it is unknown
type SubagentTerminalState ¶
type SubagentTerminalState struct {
Handle any `json:"handle"`
State SubagentState `json:"state"`
Completed bool `json:"completed"`
TimedOut bool `json:"timed_out"`
Diagnostic *string `json:"diagnostic"`
}
Outcome of waiting on a subagent
type SystemPromptSection ¶
type SystemPromptSection struct {
ID string
Content string
ContentFunc func(sessionInfo map[string]any) (any, error)
Position string
MaxChars int
Plugin string
}
Plugin owned system prompt section rendered once per new session, from text or a session callback
type ThreadRenameOptions ¶
type ThreadRenameOptions struct {
OnlyIfCurrentName *string
PreferConnectorCreated bool
ParentChatID *string
}
Keyword options of an adapter thread rename, the native guard or the relay connector guard
type ToolSpec ¶
type ToolSpec struct {
Name string
Toolset string
Schema *jsonutil.Object
Handler tools.Handler
Check func(env *tools.Env) bool
RequiresEnv []string
Description string
Emoji string
Override bool
}
Arguments of one plugin tool registration
type ToolsRegistrar ¶
Compiled-in plugin that pre-registers client tools of a deferred platform without its adapter
type UnattendedInstallOptions ¶
type UnattendedInstallOptions struct {
Identifier string
Force bool
Enable bool
CatalogName string
Ref string
OnStep func(InstallPhase)
InspectedSha string
// Consent the caller holds for the Python dependencies, nil taking a fresh enable without force as that consent
AssumeDepsConsent *bool
}
Inputs of an unattended install, a nil AssumeDepsConsent takes the fresh enable as consent
type UpdatePlan ¶
type UpdatePlan struct {
Movable []*CheckResult
Skipped []SkippedUpdate
Current int
}
Rows an update with no name moves, rows it skips with the reason, and the count already current
func PlanUpdateAll ¶
func PlanUpdateAll(results []*CheckResult) UpdatePlan
Splits check rows into movable plugins and skipped ones with the reason each cannot move
type UserInterrupt ¶
type UserInterrupt struct{ Err error }
UserInterrupt is the panic value a user interrupt escapes plugin dispatch with, recovered at the turn boundary
func (*UserInterrupt) Error ¶
func (u *UserInterrupt) Error() string
func (*UserInterrupt) Unwrap ¶
func (u *UserInterrupt) Unwrap() error
type ValidationCheck ¶
One admission check outcome
type ValidationReport ¶
type ValidationReport struct {
Checks []ValidationCheck
Warnings []string
}
Result of validating one plugin directory
func (*ValidationReport) ExitCode ¶
func (r *ValidationReport) ExitCode() int
Zero when every check passed, one otherwise
func (*ValidationReport) OK ¶
func (r *ValidationReport) OK() bool
Reports whether every check passed
func (*ValidationReport) ToDict ¶
func (r *ValidationReport) ToDict() *jsonutil.Object
JSON document of the report in the upstream key order
type WebhookView ¶
WebhookView is one outbound webhook target
type Widget ¶
type Widget struct {
Plugin string
Spec WidgetSpec
}
One registered widget with the plugin that provides it
type WidgetFrame ¶
Size and state a widget renders for
type WidgetInput ¶
One key press or text input the UI delivers to a widget
type WidgetSpan ¶
type WidgetSpan struct {
Text string
Role string
Bold bool
Dim bool
Italic bool
Underline bool
Inverse bool
}
Run of text in one theme role and style
type WidgetSpec ¶
type WidgetSpec struct {
ID string
Help string
Usage string
Mode string
Zone string
Width int
// Interval the UI refreshes the widget at, running Tick when set and rendering again, zero for input only
Refresh time.Duration
Open func(ctx context.Context, arg string) (state any, ok bool, err error)
Input func(ctx context.Context, state any, in WidgetInput) (next any, open bool, err error)
// Next state at each refresh, nil for a widget that only renders again
Tick func(ctx context.Context, state any) (next any, err error)
Render func(ctx context.Context, frame WidgetFrame) (WidgetView, error)
}
Named view a plugin provides and the terminal UI renders, its state a JSON value the UI holds between calls
Source Files
¶
- activation.go
- activation_live.go
- admission.go
- advisory_dist.go
- agentplugin.go
- bundled_tiers.go
- bundled_tree.go
- cadence.go
- capabilities.go
- capabilities_cmd.go
- catalog.go
- catalog_cmd.go
- catalog_dir_override.go
- catalog_live.go
- catalog_presence.go
- catalog_removed.go
- cmd.go
- computer_use_providers.go
- config_keys.go
- configio.go
- console_hide_unix.go
- context.go
- context_engines.go
- context_home.go
- context_providers.go
- context_registrars.go
- context_registry.go
- core_tables.go
- discovery.go
- dispatch.go
- dispatch_events.go
- dispatch_hooks.go
- entry.go
- entrypoints.go
- facade.go
- git.go
- github_api.go
- guest.go
- guest_io.go
- guest_module.go
- guest_profiles.go
- guest_program.go
- hook_dirs.go
- hooks_cmd.go
- hooks_view.go
- host.go
- host_ctx.go
- host_ctx_cli.go
- host_ctx_inprocess.go
- host_ctx_requests.go
- host_event.go
- host_platform.go
- host_restore.go
- host_tables.go
- hostprofiles.go
- hostprofiles_extract.go
- inspect.go
- install.go
- install_deps.go
- install_display.go
- install_manifest.go
- ledger.go
- lifecycle.go
- listing.go
- loader.go
- log.go
- manager.go
- manager_load.go
- manager_order.go
- manager_scope_export.go
- manifest.go
- memory_host.go
- middleware.go
- module.go
- module_names.go
- outbound_webhooks.go
- packs.go
- platform_actions.go
- plugin.go
- plugin_choices.go
- plugin_command_dispatch.go
- plugin_dev.go
- plugin_events.go
- plugin_guard.go
- plugin_guard_context.go
- plugin_keys_export.go
- plugin_live_notes.go
- plugin_llm.go
- plugin_loader.go
- plugin_messages.go
- plugin_session.go
- plugin_sets_export.go
- plugin_storage.go
- plugins_hub_export.go
- pm_host.go
- ports.go
- provenance.go
- provider_plugins.go
- provider_registries.go
- python_deps.go
- registry.go
- relay_intercepts.go
- remove.go
- security_advisories.go
- selection.go
- session_reset_policy.go
- settings.go
- shell_hooks.go
- shell_hooks_proc.go
- shell_hooks_unix.go
- skill_host.go
- state.go
- state_facade.go
- state_lock_unix.go
- streamhooks.go
- subagent_lifecycle.go
- thread_rename_options.go
- toggle.go
- tools_config_catalog.go
- tools_discovery_hooks.go
- transaction.go
- update.go
- update_all.go
- updates.go
- updates_checks.go
- validate.go
- validate_core_override.go
- validate_locales.go
- validate_private_imports.go
- validate_probe.go
- verify_command.go
- verify_process.go
- version.go
- widgets.go
- wire.go