Interface: IPluginContext
Defined in: src/types/interfaces/plugin.interface.ts:200
Plugin context (dependency injection).
Remarks
Passed to plugin during initialization. Provides access to Chive services and infrastructure.
Since
0.1.0
Properties
cache
readonlycache:ICacheProvider
Defined in: src/types/interfaces/plugin.interface.ts:215
Cache provider for this plugin.
Remarks
Keys are automatically prefixed with plugin ID.
config
readonlyconfig:Record<string,unknown>
Defined in: src/types/interfaces/plugin.interface.ts:236
Plugin-specific configuration.
Remarks
Loaded from Chive configuration file or environment variables.
eventBus
readonlyeventBus:IPluginEventBus
Defined in: src/types/interfaces/plugin.interface.ts:228
Event bus for subscribing to hooks.
logger
readonlylogger:ILogger
Defined in: src/types/interfaces/plugin.interface.ts:207
Logger instance for this plugin.
Remarks
Pre-configured with plugin ID in context.
metrics
readonlymetrics:IMetrics
Defined in: src/types/interfaces/plugin.interface.ts:223
Metrics provider for this plugin.
Remarks
Metrics are automatically labeled with plugin ID.