Documentation
¶
Overview ¶
Package host provides gRPC server implementations for host services exposed to plugins.
Package host provides vector storage operations for plugins. This file imports required drivers and the functionality is split across: - storage_vector_store.go: Store operations (VectorStoreEmbedding, VectorStoreBatch) - storage_vector_search.go: Search operations (VectorSearch, VectorSearchText) - storage_vector_crud.go: CRUD operations (VectorGet, VectorDelete, VectorDeleteByType, VectorCount) - storage_vector_helpers.go: Helper functions and table management
Index ¶
- func ContextWithPluginID(ctx context.Context, pluginID string) context.Context
- func GetPluginIDFromContext(ctx context.Context) string
- type CapabilityProvider
- type CastMemberInfo
- type DataServer
- func (s *DataServer) GetFilePath(ctx context.Context, req *pluginv1.MediaId) (*pluginv1.FilePath, error)
- func (s *DataServer) GetLibrary(ctx context.Context, req *pluginv1.LibraryId) (*pluginv1.Library, error)
- func (s *DataServer) GetMedia(ctx context.Context, req *pluginv1.MediaQuery) (*pluginv1.Media, error)
- func (s *DataServer) GetMediaByExternalId(ctx context.Context, req *pluginv1.ExternalIdQuery) (*pluginv1.Media, error)
- func (s *DataServer) GetMediaDetails(ctx context.Context, req *pluginv1.MediaQuery) (*pluginv1.MediaDetails, error)
- func (s *DataServer) ListMediaByDirector(ctx context.Context, req *pluginv1.ListMediaByDirectorRequest) (*pluginv1.MediaList, error)
- func (s *DataServer) ListMediaByGenre(ctx context.Context, req *pluginv1.ListMediaByGenreRequest) (*pluginv1.MediaList, error)
- func (s *DataServer) ListMediaByLibrary(ctx context.Context, req *pluginv1.ListMediaRequest) (*pluginv1.MediaDetailsList, error)
- func (s *DataServer) SearchMedia(ctx context.Context, req *pluginv1.SearchQuery) (*pluginv1.MediaList, error)
- type LibraryInfo
- type MediaDetailsInfo
- type MediaInfo
- type MediaQuerier
- type PluginLookup
- type PluginsServer
- func (s *PluginsServer) ClearCapabilityPreference(ctx context.Context, req *pluginv1.CapabilityPreferenceRequest) (*pluginv1.Empty, error)
- func (s *PluginsServer) DescribeCapability(ctx context.Context, req *pluginv1.DescribeCapabilityRequest) (*pluginv1.DescribeCapabilityResponse, error)
- func (s *PluginsServer) GetCapabilityPreferences(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.CapabilityPreferencesResponse, error)
- func (s *PluginsServer) HasCapability(capability string) bool
- func (s *PluginsServer) InvokeCapability(ctx context.Context, req *pluginv1.CapabilityInvokeRequest) (*pluginv1.CapabilityInvokeResponse, error)
- func (s *PluginsServer) InvokeCapabilityStream(req *pluginv1.CapabilityInvokeRequest, ...) error
- func (s *PluginsServer) InvokeVectorSearch(ctx context.Context, req *pluginv1.VectorSearchInvokeRequest) (*pluginv1.VectorSearchInvokeResponse, error)
- func (s *PluginsServer) ListCapabilities(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.CapabilityListResponse, error)
- func (s *PluginsServer) ListProviders(ctx context.Context, req *pluginv1.CapabilityRequest) (*pluginv1.ProviderListResponse, error)
- func (s *PluginsServer) RegisterCapability(pluginID, pluginName, capability string)
- func (s *PluginsServer) SetCapabilityPreference(ctx context.Context, req *pluginv1.CapabilityPreferenceRequest) (*pluginv1.Empty, error)
- func (s *PluginsServer) UnregisterPlugin(pluginID string)
- func (s *PluginsServer) UpdatePluginStatus(pluginID string, enabled, configured bool)
- type ProgressServer
- func (s *ProgressServer) GetWatchedEntityIDs(ctx context.Context, req *pluginv1.GetWatchedEntityIDsRequest) (*pluginv1.EntityIDsResponse, error)
- func (s *ProgressServer) HasWatchHistory(ctx context.Context, req *pluginv1.HasWatchHistoryRequest) (*pluginv1.HasWatchHistoryResponse, error)
- func (s *ProgressServer) ListInProgressItems(ctx context.Context, req *pluginv1.ListInProgressItemsRequest) (*pluginv1.ListInProgressItemsResponse, error)
- func (s *ProgressServer) ListWatchedItems(ctx context.Context, req *pluginv1.ListWatchedItemsRequest) (*pluginv1.ListWatchedItemsResponse, error)
- type RatingsServer
- func (s *RatingsServer) GetPositivelyRatedIDs(ctx context.Context, req *pluginv1.GetPositivelyRatedIDsRequest) (*pluginv1.EntityIDsResponse, error)
- func (s *RatingsServer) GetRatedEntityIDs(ctx context.Context, req *pluginv1.GetRatedEntityIDsRequest) (*pluginv1.EntityIDsResponse, error)
- func (s *RatingsServer) HasRatings(ctx context.Context, req *pluginv1.HasRatingsRequest) (*pluginv1.HasRatingsResponse, error)
- func (s *RatingsServer) ListRatings(ctx context.Context, req *pluginv1.ListRatingsRequest) (*pluginv1.ListRatingsResponse, error)
- type StorageConfig
- type StorageServer
- func (s *StorageServer) CleanupExpiredEntries(ctx context.Context) error
- func (s *StorageServer) DeletePluginStorage(ctx context.Context, pluginID string) error
- func (s *StorageServer) ExecuteSQL(ctx context.Context, req *pluginv1.SQLRequest) (*pluginv1.SQLExecResult, error)
- func (s *StorageServer) GetBaseDir() string
- func (s *StorageServer) GetDB() *sql.DB
- func (s *StorageServer) GetDBType() string
- func (s *StorageServer) GetDatabasePath(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.DatabasePath, error)
- func (s *StorageServer) GetDatabaseStats(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.DatabaseStats, error)
- func (s *StorageServer) KVDelete(ctx context.Context, req *pluginv1.KVKey) (*pluginv1.Empty, error)
- func (s *StorageServer) KVGet(ctx context.Context, req *pluginv1.KVKey) (*pluginv1.KVValue, error)
- func (s *StorageServer) KVList(ctx context.Context, req *pluginv1.KVListRequest) (*pluginv1.KVKeyList, error)
- func (s *StorageServer) KVSet(ctx context.Context, req *pluginv1.KVEntry) (*pluginv1.Empty, error)
- func (s *StorageServer) QuerySQL(ctx context.Context, req *pluginv1.SQLRequest) (*pluginv1.SQLQueryResult, error)
- func (s *StorageServer) RegisterSchema(ctx context.Context, req *pluginv1.SchemaVersion) (*pluginv1.Empty, error)
- func (s *StorageServer) VectorCount(ctx context.Context, req *pluginv1.VectorTypeQuery) (*pluginv1.VectorCountResponse, error)
- func (s *StorageServer) VectorDelete(ctx context.Context, req *pluginv1.VectorQuery) (*pluginv1.Empty, error)
- func (s *StorageServer) VectorDeleteByType(ctx context.Context, req *pluginv1.VectorTypeQuery) (*pluginv1.VectorDeleteResponse, error)
- func (s *StorageServer) VectorGet(ctx context.Context, req *pluginv1.VectorQuery) (*pluginv1.VectorGetResponse, error)
- func (s *StorageServer) VectorSearch(ctx context.Context, req *pluginv1.VectorSearchRequest) (*pluginv1.VectorSearchResponse, error)
- func (s *StorageServer) VectorSearchText(ctx context.Context, req *pluginv1.VectorTextSearchRequest) (*pluginv1.VectorSearchResponse, error)
- func (s *StorageServer) VectorStoreBatch(ctx context.Context, req *pluginv1.VectorStoreBatchRequest) (*pluginv1.Empty, error)
- func (s *StorageServer) VectorStoreEmbedding(ctx context.Context, req *pluginv1.VectorStoreRequest) (*pluginv1.Empty, error)
- type WeatherServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithPluginID ¶
ContextWithPluginID returns a context with the plugin ID set.
func GetPluginIDFromContext ¶
GetPluginIDFromContext extracts the plugin ID from the context.
Types ¶
type CapabilityProvider ¶
type CapabilityProvider struct {
PluginID string // Unique plugin identifier
PluginName string // Human-readable name
Enabled bool // Whether the plugin is currently enabled
Configured bool // Whether the plugin is properly configured
}
CapabilityProvider describes a plugin that provides a specific capability.
type CastMemberInfo ¶
type CastMemberInfo = querier.CastMemberInfo
Type aliases for backward compatibility - types are now defined in querier package.
type DataServer ¶
type DataServer struct {
pluginv1.UnimplementedHostDataServer
// contains filtered or unexported fields
}
DataServer implements the HostData gRPC service. This runs in the host process and provides read-only access to media data.
func NewDataServer ¶
func NewDataServer(querier MediaQuerier, logger *slog.Logger) *DataServer
NewDataServer creates a new DataServer.
func (*DataServer) GetFilePath ¶
func (s *DataServer) GetFilePath(ctx context.Context, req *pluginv1.MediaId) (*pluginv1.FilePath, error)
GetFilePath returns the full file path for a media item.
func (*DataServer) GetLibrary ¶
func (s *DataServer) GetLibrary(ctx context.Context, req *pluginv1.LibraryId) (*pluginv1.Library, error)
GetLibrary retrieves library information.
func (*DataServer) GetMedia ¶
func (s *DataServer) GetMedia(ctx context.Context, req *pluginv1.MediaQuery) (*pluginv1.Media, error)
GetMedia retrieves a single media item by ID.
func (*DataServer) GetMediaByExternalId ¶
func (s *DataServer) GetMediaByExternalId(ctx context.Context, req *pluginv1.ExternalIdQuery) (*pluginv1.Media, error)
GetMediaByExternalId looks up media by external ID.
func (*DataServer) GetMediaDetails ¶
func (s *DataServer) GetMediaDetails(ctx context.Context, req *pluginv1.MediaQuery) (*pluginv1.MediaDetails, error)
GetMediaDetails retrieves full metadata for a media item.
func (*DataServer) ListMediaByDirector ¶
func (s *DataServer) ListMediaByDirector(ctx context.Context, req *pluginv1.ListMediaByDirectorRequest) (*pluginv1.MediaList, error)
ListMediaByDirector lists media items directed by a specific person. Used for director-based recommendations and themed collections.
func (*DataServer) ListMediaByGenre ¶
func (s *DataServer) ListMediaByGenre(ctx context.Context, req *pluginv1.ListMediaByGenreRequest) (*pluginv1.MediaList, error)
ListMediaByGenre lists media items matching a genre pattern. Used for genre-based recommendations when semantic search is unavailable.
func (*DataServer) ListMediaByLibrary ¶
func (s *DataServer) ListMediaByLibrary(ctx context.Context, req *pluginv1.ListMediaRequest) (*pluginv1.MediaDetailsList, error)
ListMediaByLibrary lists all media in a library with pagination.
func (*DataServer) SearchMedia ¶
func (s *DataServer) SearchMedia(ctx context.Context, req *pluginv1.SearchQuery) (*pluginv1.MediaList, error)
SearchMedia searches for media by title/year.
type LibraryInfo ¶
type LibraryInfo = querier.LibraryInfo
Type aliases for backward compatibility - types are now defined in querier package.
type MediaDetailsInfo ¶
type MediaDetailsInfo = querier.MediaDetailsInfo
Type aliases for backward compatibility - types are now defined in querier package.
type MediaInfo ¶
Type aliases for backward compatibility - types are now defined in querier package.
type MediaQuerier ¶
type MediaQuerier interface {
// GetMediaByID returns a media item by its database ID.
GetMediaByID(ctx context.Context, id int64) (*MediaInfo, error)
// GetMediaDetails returns full metadata for a media item (for plugin indexing).
// mediaType is optional - if empty, it will try to determine the type from the media table.
GetMediaDetails(ctx context.Context, id int64, mediaType string) (*MediaDetailsInfo, error)
// GetMediaByExternalID returns a media item by an external ID.
GetMediaByExternalID(ctx context.Context, provider, externalID string) (*MediaInfo, error)
// SearchMedia searches for media by title and optional year.
SearchMedia(ctx context.Context, title string, year int, mediaType string, limit int) ([]*MediaInfo, error)
// ListMediaByLibrary lists all media in a library with pagination.
ListMediaByLibrary(ctx context.Context, libraryID int64, limit, offset int) ([]*MediaDetailsInfo, int, error)
// GetFilePath returns the file path for a media item.
GetFilePath(ctx context.Context, mediaID int64) (string, error)
// GetExternalIDs returns all external IDs for a media item.
GetExternalIDs(ctx context.Context, mediaID int64) (map[string]string, error)
// GetLibrary returns library information by ID.
GetLibrary(ctx context.Context, id int64) (*LibraryInfo, error)
// ListMediaByGenre returns media items matching a genre pattern.
// mediaType should be "movie" or "tv_show".
// libraryID=0 means all libraries.
// excludeIDs are entity IDs to exclude from results.
ListMediaByGenre(ctx context.Context, mediaType, genre string, libraryID int64, excludeIDs []int64, limit int) ([]*MediaInfo, error)
// ListMediaByDirector returns media items directed by a specific person.
// mediaType should be "movie" or "tv_show".
// libraryID=0 means all libraries.
// excludeIDs are entity IDs to exclude from results.
ListMediaByDirector(ctx context.Context, mediaType, directorName string, libraryID int64, excludeIDs []int64, limit int) ([]*MediaInfo, error)
}
MediaQuerier is the interface for querying media data. This abstracts the database layer so plugins don't need direct DB access.
type PluginLookup ¶
type PluginLookup interface {
// GetPlugin returns a running plugin instance by ID.
GetPlugin(id string) (*types.Instance, bool)
// IsPluginEnabled returns true if the plugin is enabled and healthy.
IsPluginEnabled(id string) bool
}
PluginLookup provides access to running plugin instances. Used to check plugin status and invoke methods on providers.
type PluginsServer ¶
type PluginsServer struct {
pluginv1.UnimplementedHostPluginsServer
// contains filtered or unexported fields
}
PluginsServer implements the HostPlugins gRPC service. This allows plugins to discover and invoke methods on other plugins that provide specific capabilities (e.g., "embedding", "chat").
The capability broker enables a plugin architecture where:
- Provider plugins declare capabilities they provide (e.g., ai-local provides "embedding", "chat")
- Consumer plugins can invoke methods on capability providers via the host
- The host manages capability resolution and proxies requests to providers
- Configuration plugins can set preferences to route capabilities to specific providers
Key design: The host acts as a "dumb pipe" that routes requests to providers. Provider plugins dispatch method calls via a generic Invoke pattern. Consumer plugins use typed protos for requests/responses, while the transport uses generic bytes.
func NewPluginsServer ¶
func NewPluginsServer(lookup PluginLookup, logger *slog.Logger) *PluginsServer
NewPluginsServer creates a new PluginsServer.
func (*PluginsServer) ClearCapabilityPreference ¶
func (s *PluginsServer) ClearCapabilityPreference(ctx context.Context, req *pluginv1.CapabilityPreferenceRequest) (*pluginv1.Empty, error)
ClearCapabilityPreference removes the preference for a capability. After clearing, InvokeCapability falls back to first available provider.
func (*PluginsServer) DescribeCapability ¶
func (s *PluginsServer) DescribeCapability(ctx context.Context, req *pluginv1.DescribeCapabilityRequest) (*pluginv1.DescribeCapabilityResponse, error)
DescribeCapability returns metadata about a capability's available methods. Useful for discovering what methods a capability supports.
func (*PluginsServer) GetCapabilityPreferences ¶
func (s *PluginsServer) GetCapabilityPreferences(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.CapabilityPreferencesResponse, error)
GetCapabilityPreferences returns all configured capability preferences.
func (*PluginsServer) HasCapability ¶
func (s *PluginsServer) HasCapability(capability string) bool
HasCapability returns true if any enabled plugin provides the capability.
func (*PluginsServer) InvokeCapability ¶
func (s *PluginsServer) InvokeCapability(ctx context.Context, req *pluginv1.CapabilityInvokeRequest) (*pluginv1.CapabilityInvokeResponse, error)
InvokeCapability forwards a request to a capability provider. The host resolves the capability to an available provider and proxies the request. This is the core of the cross-plugin RPC system.
func (*PluginsServer) InvokeCapabilityStream ¶
func (s *PluginsServer) InvokeCapabilityStream(req *pluginv1.CapabilityInvokeRequest, stream grpc.ServerStreamingServer[pluginv1.CapabilityInvokeResponse]) error
InvokeCapabilityStream forwards a streaming request to a capability provider. Used for server-streaming methods like ChatStream.
func (*PluginsServer) InvokeVectorSearch ¶
func (s *PluginsServer) InvokeVectorSearch(ctx context.Context, req *pluginv1.VectorSearchInvokeRequest) (*pluginv1.VectorSearchInvokeResponse, error)
InvokeVectorSearch forwards a vector search request to a plugin providing vector_search capability. This enables plugin-to-plugin semantic search operations (e.g., recommendations → semantic-search).
func (*PluginsServer) ListCapabilities ¶
func (s *PluginsServer) ListCapabilities(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.CapabilityListResponse, error)
ListCapabilities returns all available capabilities and their providers.
func (*PluginsServer) ListProviders ¶
func (s *PluginsServer) ListProviders(ctx context.Context, req *pluginv1.CapabilityRequest) (*pluginv1.ProviderListResponse, error)
ListProviders returns all plugins providing a specific capability.
func (*PluginsServer) RegisterCapability ¶
func (s *PluginsServer) RegisterCapability(pluginID, pluginName, capability string)
RegisterCapability registers a plugin as providing a capability. Called when a plugin is loaded and declares capabilities in its manifest.
func (*PluginsServer) SetCapabilityPreference ¶
func (s *PluginsServer) SetCapabilityPreference(ctx context.Context, req *pluginv1.CapabilityPreferenceRequest) (*pluginv1.Empty, error)
SetCapabilityPreference sets the preferred plugin for a capability. Used by configuration plugins (e.g., ai-local) to route capabilities to specific providers. The preference is used when InvokeCapability is called without a preferred_plugin.
func (*PluginsServer) UnregisterPlugin ¶
func (s *PluginsServer) UnregisterPlugin(pluginID string)
UnregisterPlugin removes all capabilities for a plugin. Called when a plugin is unloaded.
func (*PluginsServer) UpdatePluginStatus ¶
func (s *PluginsServer) UpdatePluginStatus(pluginID string, enabled, configured bool)
UpdatePluginStatus updates the enabled/configured status for a plugin.
type ProgressServer ¶
type ProgressServer struct {
pluginv1.UnimplementedHostProgressServer
// contains filtered or unexported fields
}
ProgressServer implements the HostProgress gRPC service. It provides read-only access to user watch progress for plugins.
func NewProgressServer ¶
func NewProgressServer(progressRepo progress.Repository, mediaRepo media.Repository, logger *slog.Logger) *ProgressServer
NewProgressServer creates a new ProgressServer.
func (*ProgressServer) GetWatchedEntityIDs ¶
func (s *ProgressServer) GetWatchedEntityIDs(ctx context.Context, req *pluginv1.GetWatchedEntityIDsRequest) (*pluginv1.EntityIDsResponse, error)
GetWatchedEntityIDs returns entity IDs of watched items.
func (*ProgressServer) HasWatchHistory ¶
func (s *ProgressServer) HasWatchHistory(ctx context.Context, req *pluginv1.HasWatchHistoryRequest) (*pluginv1.HasWatchHistoryResponse, error)
HasWatchHistory returns whether a user has any watch history.
func (*ProgressServer) ListInProgressItems ¶
func (s *ProgressServer) ListInProgressItems(ctx context.Context, req *pluginv1.ListInProgressItemsRequest) (*pluginv1.ListInProgressItemsResponse, error)
ListInProgressItems returns items the user is currently watching.
func (*ProgressServer) ListWatchedItems ¶
func (s *ProgressServer) ListWatchedItems(ctx context.Context, req *pluginv1.ListWatchedItemsRequest) (*pluginv1.ListWatchedItemsResponse, error)
ListWatchedItems returns all watched items for a user.
type RatingsServer ¶
type RatingsServer struct {
pluginv1.UnimplementedHostRatingsServer
// contains filtered or unexported fields
}
RatingsServer implements the HostRatings gRPC service. It provides read-only access to user ratings for plugins.
func NewRatingsServer ¶
func NewRatingsServer(repo ratings.Repository, logger *slog.Logger) *RatingsServer
NewRatingsServer creates a new RatingsServer.
func (*RatingsServer) GetPositivelyRatedIDs ¶
func (s *RatingsServer) GetPositivelyRatedIDs(ctx context.Context, req *pluginv1.GetPositivelyRatedIDsRequest) (*pluginv1.EntityIDsResponse, error)
GetPositivelyRatedIDs returns entity IDs with positive ratings (favorite or up).
func (*RatingsServer) GetRatedEntityIDs ¶
func (s *RatingsServer) GetRatedEntityIDs(ctx context.Context, req *pluginv1.GetRatedEntityIDsRequest) (*pluginv1.EntityIDsResponse, error)
GetRatedEntityIDs returns entity IDs with a specific rating type.
func (*RatingsServer) HasRatings ¶
func (s *RatingsServer) HasRatings(ctx context.Context, req *pluginv1.HasRatingsRequest) (*pluginv1.HasRatingsResponse, error)
HasRatings returns whether a user has any ratings.
func (*RatingsServer) ListRatings ¶
func (s *RatingsServer) ListRatings(ctx context.Context, req *pluginv1.ListRatingsRequest) (*pluginv1.ListRatingsResponse, error)
ListRatings returns all ratings for a user, optionally filtered.
type StorageConfig ¶
type StorageConfig struct {
// BaseDir is the base directory for plugin data files.
BaseDir string
// DefaultQuota is the default storage quota per plugin in bytes.
// Defaults to 100 MB if not set.
DefaultQuota int64
}
StorageConfig configures the host storage server.
type StorageServer ¶
type StorageServer struct {
pluginv1.UnimplementedHostStorageServer
// contains filtered or unexported fields
}
StorageServer implements the HostStorage gRPC service. Each plugin gets an isolated namespace for key-value storage.
func NewStorageServer ¶
func NewStorageServer(cfg StorageConfig, db *sql.DB, driver string, logger *slog.Logger) (*StorageServer, error)
NewStorageServer creates a new StorageServer.
func (*StorageServer) CleanupExpiredEntries ¶
func (s *StorageServer) CleanupExpiredEntries(ctx context.Context) error
CleanupExpiredEntries removes expired KV entries. Should be called periodically (e.g., daily).
func (*StorageServer) DeletePluginStorage ¶
func (s *StorageServer) DeletePluginStorage(ctx context.Context, pluginID string) error
DeletePluginStorage removes all storage for a plugin. Called when a plugin is uninstalled.
func (*StorageServer) ExecuteSQL ¶
func (s *StorageServer) ExecuteSQL(ctx context.Context, req *pluginv1.SQLRequest) (*pluginv1.SQLExecResult, error)
ExecuteSQL runs DDL/DML statements on plugin's namespaced tables.
func (*StorageServer) GetBaseDir ¶
func (s *StorageServer) GetBaseDir() string
GetBaseDir returns the base directory for plugin data.
func (*StorageServer) GetDB ¶
func (s *StorageServer) GetDB() *sql.DB
GetDB returns the database connection for advanced operations.
func (*StorageServer) GetDBType ¶
func (s *StorageServer) GetDBType() string
GetDBType returns the database type.
func (*StorageServer) GetDatabasePath ¶
func (s *StorageServer) GetDatabasePath(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.DatabasePath, error)
GetDatabasePath returns the path to the plugin's SQLite database. Plugins can use this for their own local caching needs.
func (*StorageServer) GetDatabaseStats ¶
func (s *StorageServer) GetDatabaseStats(ctx context.Context, _ *pluginv1.Empty) (*pluginv1.DatabaseStats, error)
GetDatabaseStats returns storage usage statistics for the plugin.
func (*StorageServer) KVList ¶
func (s *StorageServer) KVList(ctx context.Context, req *pluginv1.KVListRequest) (*pluginv1.KVKeyList, error)
KVList lists keys with an optional prefix.
func (*StorageServer) QuerySQL ¶
func (s *StorageServer) QuerySQL(ctx context.Context, req *pluginv1.SQLRequest) (*pluginv1.SQLQueryResult, error)
QuerySQL runs SELECT queries on plugin's namespaced tables.
func (*StorageServer) RegisterSchema ¶
func (s *StorageServer) RegisterSchema(ctx context.Context, req *pluginv1.SchemaVersion) (*pluginv1.Empty, error)
RegisterSchema is a no-op - plugins manage their own database schemas.
func (*StorageServer) VectorCount ¶
func (s *StorageServer) VectorCount(ctx context.Context, req *pluginv1.VectorTypeQuery) (*pluginv1.VectorCountResponse, error)
VectorCount returns the number of embeddings.
func (*StorageServer) VectorDelete ¶
func (s *StorageServer) VectorDelete(ctx context.Context, req *pluginv1.VectorQuery) (*pluginv1.Empty, error)
VectorDelete removes an embedding.
func (*StorageServer) VectorDeleteByType ¶
func (s *StorageServer) VectorDeleteByType(ctx context.Context, req *pluginv1.VectorTypeQuery) (*pluginv1.VectorDeleteResponse, error)
VectorDeleteByType removes all embeddings for an entity type.
func (*StorageServer) VectorGet ¶
func (s *StorageServer) VectorGet(ctx context.Context, req *pluginv1.VectorQuery) (*pluginv1.VectorGetResponse, error)
VectorGet retrieves an embedding.
func (*StorageServer) VectorSearch ¶
func (s *StorageServer) VectorSearch(ctx context.Context, req *pluginv1.VectorSearchRequest) (*pluginv1.VectorSearchResponse, error)
VectorSearch performs similarity search.
func (*StorageServer) VectorSearchText ¶
func (s *StorageServer) VectorSearchText(ctx context.Context, req *pluginv1.VectorTextSearchRequest) (*pluginv1.VectorSearchResponse, error)
VectorSearchText performs text-based search on embedding text field.
func (*StorageServer) VectorStoreBatch ¶
func (s *StorageServer) VectorStoreBatch(ctx context.Context, req *pluginv1.VectorStoreBatchRequest) (*pluginv1.Empty, error)
VectorStoreBatch stores multiple embeddings in a single transaction.
func (*StorageServer) VectorStoreEmbedding ¶
func (s *StorageServer) VectorStoreEmbedding(ctx context.Context, req *pluginv1.VectorStoreRequest) (*pluginv1.Empty, error)
VectorStoreEmbedding stores or updates an embedding for an entity.
type WeatherServer ¶
type WeatherServer struct {
pluginv1.UnimplementedHostWeatherServer
// contains filtered or unexported fields
}
WeatherServer implements the HostWeather gRPC service.
func NewWeatherServer ¶
func NewWeatherServer(locationRepo *location.Repository, weatherService *weather.Service, logger *slog.Logger) *WeatherServer
NewWeatherServer creates a new WeatherServer.
func (*WeatherServer) GetCurrentWeather ¶
func (s *WeatherServer) GetCurrentWeather(ctx context.Context, req *pluginv1.WeatherRequest) (*pluginv1.WeatherResponse, error)
GetCurrentWeather returns current weather for a user's location.