Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type SlotName =
| "admin.users" // the users card — replaces default if provided
| "admin.orgs" // the organizations card — replaces default if provided
| "admin.bottom" // below admin content
| "monitoring.charts" // time-series charts injected below the metric cards
| "topbar.right" // element in the top bar (right side)
| "global.provider" // React provider wrapping the entire app
| (string & {}); // extensible — allow custom slot names
Expand All @@ -62,6 +63,26 @@ export interface SlotRegistration {
* path: string (e.g. "/components" → served at /components)
*/
props?: Record<string, unknown>;
/**
* Canonical chart IDs this registration provides (e.g. ["workload.cpu", "workload.memory"]).
* Used by monitoring.charts slots for deduplication — if a higher-priority plugin already
* claimed an ID, lower-priority plugins providing the same ID are skipped.
*/
provides?: string[];
/**
* IDs this registration can replace from lower-priority plugins.
* At render time the slot system intersects this list with IDs actually registered
* by other plugins; the matched IDs are passed to the component as `capturedProvides`
* and are claimed so the original registrations are skipped.
* If no IDs match (e.g. no other monitoring plugin is installed) this registration
* is omitted entirely.
*/
capturesProviding?: string[];
/**
* Display group label shown as a section header when multiple plugins render
* into the same slot (e.g. "Grafana", "VictoriaMetrics").
*/
group?: string;
}

// ─── Plugin Manifest ─────────────────────────────────────────────────────────
Expand Down
Loading