Plugin Data Model
Use this reference when changing backend implementation or inspecting persisted state. Start with the Quickstart for authoring; understanding every table is not a prerequisite.
Data separates version declarations, user installations and permissions, device execution, and message processing. Fields and states are defined by service/migrations/, service/pkg/model/, and service/pkg/repo/plugin/.
Catalog and Versions
plugin.json.name is the stable identity. extensions["com.liyanlabs"].displayName declares the user-facing name in the immutable release manifest; omission displays the identity. Installation reads it from the package.
Installations and Permissions
Devices and Agent Runtimes
External Operations and Messages
Permissions and State
Capability declarations describe what an author provides; plugin_permission holds user policy. Reads, device access, and inbound events use allow / deny; local reversible actions use prompt / allow / deny; external writes use prompt / deny. See service/pkg/core/plugin/permission/service.go.
Operations record both package and activation receipts. A succeeded state alone requires checking confirmation. API projections expose pending confirmation; see service/pkg/core/plugin/lifecycle/activation.go.
Feishu and GitHub operational credentials stay on the device. Current API wiring uses an unavailable provider OAuth exchanger in service/pkg/web/database_plugin_routes.go. Existing secret/OAuth tables do not constitute a supported server credential solution.
Client module graphs are projected from current installations, release capabilities, permissions and device state. There is no separate UI installation table. Web/native modules and their provider belong to one plugin release; updates and revocation invalidate old graphs. Module code is read from the exact authorized Runner.
Use the diagnostics guide to inspect operation, setup, and health before changing database state. Do not insert permission records directly.
Package Icons
A native package declares a PNG, JPEG or WebP through extensions["com.liyanlabs"].icon. The packer indexes its icon role, size and SHA-256. Native import and server admission validate the declaration, role, digest, decoded image format and dimensions. Limits are 256 KiB and 1024 pixels per side. The server persists this public presentation metadata and returns a bounded icon_data_url, without executable bytes or device paths. Undeclared icons use the generic plugin mark; builtins retain catalog brand icons. An icon grants no execution or data authority.