@artemis-studio/plugin-sdk 2026.9.50 → 2026.9.51

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": "@artemis-studio/plugin-sdk",
3
- "version": "2026.9.50",
3
+ "version": "2026.9.51",
4
4
  "description": "Build the UI of an Artemis Studio plugin: typings for the Studio APIs a plugin may use, and a Vite preset.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,17 +1,12 @@
1
- import type { Query, QueryClient } from '@tanstack/react-query';
1
+ import { type Query, type QueryClient } from '@tanstack/react-query';
2
2
  /**
3
- * `refetchInterval` for a hook that should stop polling while paused.
3
+ * Make TanStack's focus state mean "may refresh on its own": the tab is visible and
4
+ * refreshing is not paused. Called once, beside the `QueryClient`.
4
5
  *
5
- * Returning `false` suspends the interval; TanStack Query calls this again on the
6
- * next cycle, so resuming needs no remount.
7
- *
8
- * ponytail: the interval is re-resolved when the *current* timer fires, so one
9
- * further poll can land up to `ms` after pausing. Closing that gap means
10
- * cancelling in-flight fetches, which throws away work the operator did not ask
11
- * to discard and can leave a screen mid-update. Accepted and recorded in
12
- * ADR-0055; revisit only if an operator can actually observe it.
6
+ * A side effect: the retryer also waits for focus, so a request that fails while
7
+ * paused retries on resume rather than during the pause.
13
8
  */
14
- export declare function poll(ms: number | false): () => number | false;
9
+ export declare function installPauseSeam(): void;
15
10
  /**
16
11
  * `refetchOnMount` for the QueryClient default, so pausing covers opening a view
17
12
  * and not only the intervals.
@@ -32,19 +27,11 @@ export declare function markPendingChange(): void;
32
27
  export declare function usePollingPaused(): boolean;
33
28
  export declare function usePendingChange(): boolean;
34
29
  /**
35
- * Refetch everything the current screen is observing, and resolve when it is done.
36
- *
37
- * `refetchType: 'active'` is the point: it refetches what is on the display and
38
- * leaves the rest of the cache alone — the same scope the freshness indicator
39
- * reports on, so the button and the label can never disagree.
40
- *
41
- * `cancelRefetch: false` is the other point. TanStack's default aborts the
42
- * in-flight fetch and starts another, which is right after a mutation (the
43
- * in-flight response is known-stale) and wrong for a refresh control (the
44
- * in-flight response is exactly what was asked for). With it, a second activation
45
- * joins the first instead of restarting it.
30
+ * Refetch everything the current screen is observing: what resuming does, because the
31
+ * first thing an operator needs after unpausing is current data.
46
32
  *
47
- * The returned promise is what lets the control show *the operator's* refresh
48
- * rather than every background poll.
33
+ * `refetchType: 'active'` scopes it to what is on the display, the same scope the
34
+ * freshness indicator reports on. `cancelRefetch: false` lets a fetch already in
35
+ * flight finish rather than aborting it for an identical one.
49
36
  */
50
37
  export declare function refreshActiveQueries(qc: QueryClient): Promise<void>;
@@ -596,22 +596,6 @@ export interface paths {
596
596
  patch?: never;
597
597
  trace?: never;
598
598
  };
599
- "/api/v1/clusters/{clusterId}/rediscover": {
600
- parameters: {
601
- query?: never;
602
- header?: never;
603
- path?: never;
604
- cookie?: never;
605
- };
606
- get?: never;
607
- put?: never;
608
- post: operations["rediscover"];
609
- delete?: never;
610
- options?: never;
611
- head?: never;
612
- patch?: never;
613
- trace?: never;
614
- };
615
599
  "/api/v1/clusters/{clusterId}/queues": {
616
600
  parameters: {
617
601
  query?: never;
@@ -6669,28 +6653,6 @@ export interface operations {
6669
6653
  };
6670
6654
  };
6671
6655
  };
6672
- rediscover: {
6673
- parameters: {
6674
- query?: never;
6675
- header?: never;
6676
- path: {
6677
- clusterId: string;
6678
- };
6679
- cookie?: never;
6680
- };
6681
- requestBody?: never;
6682
- responses: {
6683
- /** @description OK */
6684
- 200: {
6685
- headers: {
6686
- [name: string]: unknown;
6687
- };
6688
- content: {
6689
- "*/*": components["schemas"]["TopologyView"];
6690
- };
6691
- };
6692
- };
6693
- };
6694
6656
  queues: {
6695
6657
  parameters: {
6696
6658
  query: {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Light or dark, from the header. Mantine's own manager remembers the choice in this
3
+ * browser; dark stays the first-visit default (`main.tsx`).
4
+ *
5
+ * The name says where the control goes, not where it is: an operator reading
6
+ * "Switch to light theme" knows what activating it will do.
7
+ */
8
+ export declare function ColorSchemeToggle(): import("react").JSX.Element;
@@ -8,8 +8,7 @@
8
8
  * A view the operator may not open is still listed, disabled, with the reason: the rail shows it the
9
9
  * same way.
10
10
  *
11
- * Refresh and pause live here rather than on a hotkey: the browser owns both
12
- * shortcuts an operator would reach for (⌘R and ⇧⌘R), and taking either would be
13
- * worse than not having one (ADR-0052).
11
+ * Pause and the colour scheme are here too, so every header control is reachable from the keyboard
12
+ * without a hotkey of its own (ADR-0052, ADR-0118).
14
13
  */
15
14
  export declare function CommandPalette(): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /** The toggle and its name, shared with the command palette's entry. */
2
+ export declare function useColorSchemeToggle(): {
3
+ toggle: () => void;
4
+ label: string;
5
+ };