Skip to main content

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

readonly cache: ICacheProvider

Defined in: src/types/interfaces/plugin.interface.ts:215

Cache provider for this plugin.

Remarks

Keys are automatically prefixed with plugin ID.


config

readonly config: 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

readonly eventBus: IPluginEventBus

Defined in: src/types/interfaces/plugin.interface.ts:228

Event bus for subscribing to hooks.


logger

readonly logger: ILogger

Defined in: src/types/interfaces/plugin.interface.ts:207

Logger instance for this plugin.

Remarks

Pre-configured with plugin ID in context.


metrics

readonly metrics: IMetrics

Defined in: src/types/interfaces/plugin.interface.ts:223

Metrics provider for this plugin.

Remarks

Metrics are automatically labeled with plugin ID.