@rahdar/plugin-sdk 2026.10.66 → 2026.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rahdar/plugin-sdk",
3
- "version": "2026.10.66",
3
+ "version": "2026.11.0",
4
4
  "description": "Build the UI of a Rahdar plugin: typings for the Rahdar APIs a plugin may use, and a Vite preset.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,6 +42,11 @@ export interface NavContribution {
42
42
  * `/clusters/$clusterId/<system>/`, which another system's cluster answers with the not-found page.
43
43
  */
44
44
  system?: string;
45
+ /**
46
+ * The resource class (`CONNECTION`) the view lists. The navigation offers the view only on a cluster whose
47
+ * system has a kind of that class, so a system without connections has no empty Connections page.
48
+ */
49
+ resourceClass?: string;
45
50
  /**
46
51
  * The permission the view reads with. Without it the entry stays visible and disabled,
47
52
  * and says why; the server enforces it regardless.
@@ -7,7 +7,7 @@ import { type NavContribution } from '../feature.ts';
7
7
  export declare function viewHotkeys(features: {
8
8
  id: string;
9
9
  nav?: NavContribution[];
10
- }[], systemId?: string): Map<string, NavContribution>;
10
+ }[], systemId?: string, classes?: readonly string[]): Map<string, NavContribution>;
11
11
  /**
12
12
  * The single-key shortcuts (ADR-0109), as one document listener mounted by the shell:
13
13
  * `g` then a view's letter goes to that view of the open cluster, `?` opens the list of shortcuts,
@@ -5,9 +5,14 @@ export interface NavGroup {
5
5
  label: string;
6
6
  items: NavContribution[];
7
7
  }
8
+ /**
9
+ * Whether a cluster is offered a view: a system-only view only on a cluster that runs that system
10
+ * (`systemId`), and a view of a resource class only where the system has a kind of that class (`classes`).
11
+ */
12
+ export declare function offeredOn(item: NavContribution, systemId?: string, classes?: readonly string[]): boolean;
8
13
  /**
9
14
  * The features' views under the kernel's groups (ADR-0070): groups in their fixed order, views in
10
- * their declared order, and a group none of the features contributes to left out. A system-only view is
11
- * listed only for a cluster that runs that system (`systemId`).
15
+ * their declared order, and a group none of the features contributes to left out. A view is listed only for a
16
+ * cluster it is offered on ({@link offeredOn}).
12
17
  */
13
- export declare function navGroups(features: RahdarFeature[], systemId?: string): NavGroup[];
18
+ export declare function navGroups(features: RahdarFeature[], systemId?: string, classes?: readonly string[]): NavGroup[];
@@ -187,8 +187,8 @@ export interface SlotContribution<P> {
187
187
  */
188
188
  group?: string;
189
189
  /**
190
- * `routes.tabs` only: the id of the broker system the tab is for (`artemis`). The tab is listed only on a
191
- * cluster that runs that system.
190
+ * The id of the broker system the contribution is for (`artemis`). A cluster-scoped slot lists it only on a
191
+ * cluster that runs that system (`useClusterSlot`); without it the contribution applies to every system.
192
192
  */
193
193
  system?: string;
194
194
  /** `*.actions` only: the menu section the item is listed under. */