What problem does it solve?
OpenCode plugin compliance ensures that plugin developers follow the official hook-based architecture and safety constraints to preserve security, stability, and predictable behavior across the platform.
Core Features & Use Cases
- Hook-driven architecture enforcement: plugins may only act at predefined extension points and must export a Plugin function to participate in the lifecycle.
- Event subscriptions, tool interception, and permission handling: plugins can observe and influence events, intercept tool execution, automate permission decisions, while never directly mutating core state.
- SDK usage and storage boundaries: plugins must use the official SDK for logging and interactions, and adhere to storage access rules to prevent direct file system manipulation.
- Reference integration: consult references/hooks.md and references/events.md for complete interface definitions and examples of compliant implementations.
Quick Start
Create a minimal compliant plugin by exporting a Plugin function that wires the required hooks, then validate conformance with the OpenCode platform checks.