Versions in this module Expand all Collapse all v1 v1.18.1 Nov 5, 2026 v1.18.0 Nov 1, 2026 Changes in this version + const EventsPublishMethod v1.17.1 Oct 19, 2026 v1.17.0 Oct 18, 2026 v1.16.0 Oct 16, 2026 Changes in this version + const AdminBase + const AdminCallsPath + const AuditRetention + const BlockAll + const ConnectorDefaultTimeout + const ConnectorMaxTimeout + const HostAPINotStarted + const PATConfigKey + const QueryMaxRows + const QueryMaxTimeout + const RestDefaultTimeout + const RestMaxRequestBytes + const RestMaxResponseBytes + const RestMaxTimeout + const RestPerPlugin + const SourceCaller + const SourcePAT + const SourceToken + const StatusAllowed + const StatusBlocked + const StatusOffByDefault + const StatusUndeclared + const StatusUnknown + const UsersCacheTTL + var ErrRevocationUnavailable = errors.New("host api revocation is not available") + func HTTPHandler(s hostpb.HostServer) http.Handler + func RegisterMethod(name, scope string, destructive bool, h InvokeHandler) + func RegisterUnavailableAdmin(mux *http.ServeMux, wrap func(http.Handler) http.Handler) + func WarnUnknownScopes(ctx context.Context, m wickplugin.Manifest) + func WithCaller(ctx context.Context, c Caller) context.Context + type AccessItem struct + Blocked bool + Destructive bool + Item string + type AccessScope struct + Calls int64 + Declarative bool + Declared bool + DefaultAllow bool + Denied int64 + Description string + Destructive bool + Failed int64 + Items []AccessItem + Known bool + Label string + Overlay string + Reason string + Resource string + Scope string + Sensitive bool + Status string + type AccountDirectory interface + ConnectedAccounts func(ctx context.Context, instanceID string) ([]*hostpb.AccountRef, error) + type Admin struct + Actor func(*http.Request) string + Calls CallReader + Op func(connector, op string) (destructive, found bool) + Perms *Permissions + Plugins AdminDirectory + Revoke func(key string, revoked bool) (dropped int, changed bool, err error) + Revoked func(key string) bool + func (a *Admin) Get(ctx context.Context, key string) (PluginAccess, bool) + func (a *Admin) List(ctx context.Context) []PluginAccess + func (a *Admin) RegisterAdmin(mux *http.ServeMux, wrap func(http.Handler) http.Handler) + type AdminDirectory interface + All func() []PluginInfo + type Audit struct + func NewAudit(w AuditWriter) *Audit + func (a *Audit) Close() + func (a *Audit) Dropped() int64 + func (a *Audit) Record(c entity.PluginHostCall) + func (a *Audit) Start(ctx context.Context) + type AuditWriter interface + PurgeCallsBefore func(ctx context.Context, t time.Time) (int64, error) + WriteCalls func(ctx context.Context, calls []entity.PluginHostCall) error + type Bridge struct + func NewBridge(srv *Server, service ServiceTokens) *Bridge + func (b *Bridge) BeginCall(key, kind, userID, sessionID string) (string, func()) + func (b *Bridge) BeginCallFrom(key, kind, userID, source, sessionID string) (string, func()) + func (b *Bridge) BeginCallInstance(key, kind, userID, sessionID, instanceID string) (string, func()) + func (b *Bridge) Close() error + func (b *Bridge) GRPCServer(key, kind string) func([]grpc.ServerOption) *grpc.Server + func (b *Bridge) ProcessEnv(key, kind string) ([]string, func()) + func (b *Bridge) RevokeKey(key string) + func (b *Bridge) Revoked(key string) bool + func (b *Bridge) ServeAs(w http.ResponseWriter, r *http.Request, key, kind string, scopes []string) + func (b *Bridge) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (b *Bridge) SetRevoked(key string, revoked bool) (dropped int, changed bool, err error) + func (b *Bridge) Start() error + func (b *Bridge) URL() string + type CallFilter struct + FailedOnly bool + Limit int + Offset int + PluginKey string + Since time.Time + type CallReader interface + CallStats func(ctx context.Context, since time.Time) ([]CallStat, error) + ListCalls func(ctx context.Context, f CallFilter) ([]entity.PluginHostCall, int64, error) + type CallStat struct + Calls int64 + Denied int64 + Failed int64 + Last time.Time + PluginKey string + Scope string + type CallView struct + Code string + DurationMs int64 + Item string + Kind string + OK bool + PluginKey string + RPC string + Scope string + Source string + Ts time.Time + UserID string + type Caller struct + CallbackScopes []string + InstanceID string + Kind string + PluginKey string + SessionID string + Source string + UserID string + func CallerFrom(ctx context.Context) (Caller, bool) + type ConfigReader interface + Config func(ctx context.Context, owner, key string) (value string, found, secret bool, err error) + type ConnectorCall struct + AccountID string + Args map[string]any + Connector string + InstanceID string + Op string + PluginKey string + type ConnectorResult struct + ResultJSON string + RunID string + Status string + type ConnectorRunner interface + Execute func(ctx context.Context, p Principal, call ConnectorCall) (*ConnectorResult, error) + ListInstances func(ctx context.Context, p Principal, connector string) ([]*hostpb.ConnectorInstance, error) + Op func(connector, op string) (destructive, found bool) + func NewConnectorRunner(svc *connectors.Service) ConnectorRunner + type Decision struct + Allowed bool + Reason string + Status string + type Deps struct + Accounts AccountDirectory + Audit *Audit + Configs ConfigReader + Connectors ConnectorRunner + DB *gorm.DB + PATs TokenAuthenticator + Perms *Permissions + Plugins PluginDirectory + Principals Principals + Router http.Handler + Sessions SessionService + Tickets TicketService + UserTags func(ctx context.Context, userIDs []string) (map[string][]string, error) + Users UserDirectory + WickVersion string + type GormStore struct + func NewGormStore(db *gorm.DB) *GormStore + func (s *GormStore) CallStats(ctx context.Context, since time.Time) ([]CallStat, error) + func (s *GormStore) Delete(ctx context.Context, pluginKey, scope, item string) error + func (s *GormStore) List(ctx context.Context, pluginKey string) ([]entity.PluginHostPermission, error) + func (s *GormStore) ListCalls(ctx context.Context, f CallFilter) ([]entity.PluginHostCall, int64, error) + func (s *GormStore) PurgeCallsBefore(ctx context.Context, t time.Time) (int64, error) + func (s *GormStore) Set(ctx context.Context, p entity.PluginHostPermission) error + func (s *GormStore) WriteCalls(ctx context.Context, calls []entity.PluginHostCall) error + type InvokeCall struct + Args json.RawMessage + PluginKey string + UserID string + type InvokeHandler func(ctx context.Context, in InvokeCall) (json.RawMessage, error) + type LayoutData struct + Layout agentconfig.Layout + Send func(ctx context.Context, userID, sessionID, text string) (bool, error) + Users UserLookup + func (l *LayoutData) AttachSession(ctx context.Context, userID string, in *hostpb.AttachSessionRequest) error + func (l *LayoutData) CreateTicket(ctx context.Context, userID string, in *hostpb.CreateTicketRequest) (*hostpb.Ticket, error) + func (l *LayoutData) GetSessionMeta(ctx context.Context, userID, id string) (*hostpb.SessionMeta, error) + func (l *LayoutData) GetTicket(ctx context.Context, userID string, in *hostpb.GetTicketRequest) (*hostpb.Ticket, error) + func (l *LayoutData) ListSessions(ctx context.Context, userID string, in *hostpb.ListSessionsRequest) ([]*hostpb.SessionMeta, error) + func (l *LayoutData) ListTickets(ctx context.Context, userID string, in *hostpb.ListTicketsRequest) ([]*hostpb.Ticket, error) + func (l *LayoutData) SendToSession(ctx context.Context, userID, sessionID, text string) (bool, error) + func (l *LayoutData) UpdateTicket(ctx context.Context, userID string, in *hostpb.UpdateTicketRequest) (*hostpb.Ticket, error) + type ManifestDirectory struct + ConfigOwner func(kind, key string) string + func NewManifestDirectory(scan Manifests) *ManifestDirectory + func (d *ManifestDirectory) All() []PluginInfo + func (d *ManifestDirectory) Plugin(key string) (PluginInfo, bool) + func (d *ManifestDirectory) Reload(ctx context.Context) + func (d *ManifestDirectory) UnknownScopes(key string) []string + type Manifests func(kind string) ([]wickplugin.Manifest, error) + type MemoryPermissionStore struct + func NewMemoryPermissionStore() *MemoryPermissionStore + func (m *MemoryPermissionStore) Delete(_ context.Context, pluginKey, scope, item string) error + func (m *MemoryPermissionStore) List(_ context.Context, pluginKey string) ([]entity.PluginHostPermission, error) + func (m *MemoryPermissionStore) Set(_ context.Context, p entity.PluginHostPermission) error + type PermissionStore interface + Delete func(ctx context.Context, pluginKey, scope, item string) error + List func(ctx context.Context, pluginKey string) ([]entity.PluginHostPermission, error) + Set func(ctx context.Context, p entity.PluginHostPermission) error + type Permissions struct + func NewPermissions(store PermissionStore) *Permissions + func (p *Permissions) Clear(ctx context.Context, pluginKey, scope, item string) error + func (p *Permissions) Decide(ctx context.Context, plugin PluginInfo, scope, item string) Decision + func (p *Permissions) Invalidate(pluginKey string) + func (p *Permissions) Set(ctx context.Context, pluginKey, scope, item string, allowed bool, by string) error + func (p *Permissions) Statuses(ctx context.Context, plugin PluginInfo) []ScopeStatus + type PluginAccess struct + BlockedAll bool + Calls int64 + Declares bool + Denied int64 + Failed int64 + ItemCount int + Key string + Kind string + LastCall *time.Time + Revoked bool + Scopes []AccessScope + Version string + type PluginDirectory interface + Plugin func(key string) (PluginInfo, bool) + type PluginInfo struct + ConfigOwner string + Key string + Kind string + Resources *wickplugin.HostResources + Scopes []string + Version string + type Principal struct + TagIDs []string + User *entity.User + type Principals interface + GetUserByID func(ctx context.Context, id string) (*entity.User, error) + GetUserFilterTagIDs func(ctx context.Context, userID string) []string + type RevocationStore interface + SetCallbackRevoked func(key string, revoked bool) error + type ScopeStatus struct + Decision Decision + Declared bool + Scope string + type Server struct + func NewServer(d Deps) *Server + func (s *Server) AttachSession(ctx context.Context, in *hostpb.AttachSessionRequest) (*hostpb.Empty, error) + func (s *Server) ConnectedAccounts(ctx context.Context, in *hostpb.ConnectedAccountsRequest) (*hostpb.ConnectedAccountsResponse, error) + func (s *Server) CreateTicket(ctx context.Context, in *hostpb.CreateTicketRequest) (*hostpb.Ticket, error) + func (s *Server) ExecuteConnector(ctx context.Context, in *hostpb.ExecuteConnectorRequest) (*hostpb.ExecuteConnectorResponse, error) + func (s *Server) GetConfig(ctx context.Context, in *hostpb.GetConfigRequest) (*hostpb.GetConfigResponse, error) + func (s *Server) GetSessionMeta(ctx context.Context, in *hostpb.GetSessionMetaRequest) (*hostpb.SessionMeta, error) + func (s *Server) GetTicket(ctx context.Context, in *hostpb.GetTicketRequest) (*hostpb.Ticket, error) + func (s *Server) GetUser(ctx context.Context, in *hostpb.GetUserRequest) (*hostpb.User, error) + func (s *Server) GetUserByEmail(ctx context.Context, in *hostpb.GetUserByEmailRequest) (*hostpb.User, error) + func (s *Server) Invoke(ctx context.Context, in *hostpb.InvokeRequest) (*hostpb.InvokeResponse, error) + func (s *Server) ListConnectorInstances(ctx context.Context, in *hostpb.ListConnectorInstancesRequest) (*hostpb.ListConnectorInstancesResponse, error) + func (s *Server) ListMethods(ctx context.Context, _ *hostpb.ListMethodsRequest) (*hostpb.ListMethodsResponse, error) + func (s *Server) ListSessions(ctx context.Context, in *hostpb.ListSessionsRequest) (*hostpb.ListSessionsResponse, error) + func (s *Server) ListTickets(ctx context.Context, in *hostpb.ListTicketsRequest) (*hostpb.ListTicketsResponse, error) + func (s *Server) ListUsers(ctx context.Context, in *hostpb.ListUsersRequest) (*hostpb.ListUsersResponse, error) + func (s *Server) Query(ctx context.Context, in *hostpb.QueryRequest) (*hostpb.QueryResponse, error) + func (s *Server) Rest(ctx context.Context, in *hostpb.RestRequest) (*hostpb.RestResponse, error) + func (s *Server) SendToSession(ctx context.Context, in *hostpb.SendToSessionRequest) (*hostpb.SendToSessionResponse, error) + func (s *Server) UpdateTicket(ctx context.Context, in *hostpb.UpdateTicketRequest) (*hostpb.Ticket, error) + func (s *Server) Whoami(ctx context.Context, _ *hostpb.WhoamiRequest) (*hostpb.WhoamiResponse, error) + type ServiceTokens interface + CallbackRevoked func(key string) bool + LookupCallback func(bearer string) (key string, scopes []string, ok bool) + type SessionService interface + GetSessionMeta func(ctx context.Context, userID, id string) (*hostpb.SessionMeta, error) + ListSessions func(ctx context.Context, userID string, in *hostpb.ListSessionsRequest) ([]*hostpb.SessionMeta, error) + SendToSession func(ctx context.Context, userID, sessionID, text string) (queued bool, err error) + type TicketService interface + AttachSession func(ctx context.Context, userID string, in *hostpb.AttachSessionRequest) error + CreateTicket func(ctx context.Context, userID string, in *hostpb.CreateTicketRequest) (*hostpb.Ticket, error) + GetTicket func(ctx context.Context, userID string, in *hostpb.GetTicketRequest) (*hostpb.Ticket, error) + ListTickets func(ctx context.Context, userID string, in *hostpb.ListTicketsRequest) ([]*hostpb.Ticket, error) + UpdateTicket func(ctx context.Context, userID string, in *hostpb.UpdateTicketRequest) (*hostpb.Ticket, error) + type TokenAuthenticator interface + Authenticate func(ctx context.Context, plain string) (userID string, err error) + type UserDirectory interface + ListUsers func(ctx context.Context) ([]*entity.User, error) + type UserLookup func(ctx context.Context, userID string) (*entity.User, []string, error)