@stina/extension-api 1.16.0 → 1.17.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.
@@ -894,6 +894,29 @@ interface AccountContribution {
894
894
  /** Why the extension needs them, shown next to the scopes in the settings. */
895
895
  reason?: LocalizedString;
896
896
  }
897
+ /**
898
+ * What a settings view is about, which decides where Stina shows it.
899
+ *
900
+ * An extension never picks a place in the settings menu: the menu belongs to Stina and
901
+ * changes between versions. It says what the view is *about*, and Stina puts each topic
902
+ * where it belongs, the way `accounts`, `providers` and `statusCards` already work.
903
+ *
904
+ * - `accounts`: connects Stina to an account or a service (a mailbox, a calendar feed).
905
+ * Shown with the other connected accounts.
906
+ * - `notifications`: when and how the extension may get in touch. Shown with Stina's own
907
+ * notification settings.
908
+ * - `personal`: facts about the user the extension relies on (a home town for the
909
+ * weather). Shown with the profile.
910
+ * - `tracking`: things Stina keeps track of for the user that are worth looking through
911
+ * now and then (people, projects, reminders). Gets its own row in the register.
912
+ *
913
+ * A view without a topic, or with one this version of Stina does not know, is shown on
914
+ * the extension's own page. That is always a working place, only a less fitting one, so
915
+ * a topic added later never breaks an older Stina.
916
+ */
917
+ type ExtensionSettingsTopic = 'accounts' | 'notifications' | 'personal' | 'tracking';
918
+ /** Every topic this version of the API knows, in no particular order. */
919
+ declare const EXTENSION_SETTINGS_TOPICS: readonly ExtensionSettingsTopic[];
897
920
  /**
898
921
  * Tool settings view definition (UI schema)
899
922
  */
@@ -904,6 +927,8 @@ interface ToolSettingsViewDefinition {
904
927
  title: string;
905
928
  /** Help text */
906
929
  description?: string;
930
+ /** What the view is about, and so where Stina shows it. See {@link ExtensionSettingsTopic}. */
931
+ topic?: ExtensionSettingsTopic;
907
932
  /** View configuration */
908
933
  view: ToolSettingsView;
909
934
  }
@@ -2665,4 +2690,4 @@ interface ActionResult {
2665
2690
  error?: string;
2666
2691
  }
2667
2692
 
2668
- export { type ConnectedAccountsAPI as $, type ActionResult as A, type ProvidersAPI as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type ToolsAPI as F, type GetModelsOptions as G, type HugeIconName as H, type ActionsAPI as I, type EventsAPI as J, type SchedulerAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type SchedulerJobRequest as O, type PanelDefinition as P, type SchedulerSchedule as Q, type UserProfile as R, type SchedulerFirePayload as S, type ToolResult as T, type UserAPI as U, type VoiceSessionOptions as V, type ChatAPI as W, type ChatInstructionMessage as X, type ConversationPresentation as Y, type AttachmentsAPI as Z, type AttachmentContent as _, type ChatOptions as a, type MarkdownProps as a$, type ConnectedAccount as a0, type AccountAccessToken as a1, type LogAPI as a2, type BackgroundWorkersAPI as a3, type BackgroundTaskConfig as a4, type BackgroundTaskCallback as a5, type BackgroundTaskContext as a6, type BackgroundTaskHealth as a7, type BackgroundRestartPolicy as a8, type Query as a9, type ClockProps as aA, type ParagraphProps as aB, type ButtonProps as aC, type TextInputProps as aD, type PasswordInputProps as aE, type NumberInputProps as aF, type TextAreaProps as aG, type DateTimeInputProps as aH, type SelectProps as aI, type IconPickerProps as aJ, type VerticalStackProps as aK, type HorizontalStackProps as aL, type GridProps as aM, type DividerProps as aN, type IconProps as aO, type IconButtonType as aP, type IconButtonProps as aQ, type PanelAction as aR, type PanelProps as aS, type ToggleProps as aT, type CollapsibleProps as aU, type FrameVariant as aV, type FrameProps as aW, type ListProps as aX, type PillVariant as aY, type PillProps as aZ, type CheckboxProps as a_, type QueryOptions as aa, type StorageAPI as ab, type SecretsAPI as ac, type StorageCollectionConfig as ad, type StorageContributions as ae, type AIProvider as af, type ModelCapabilities as ag, type ChatImage as ah, type ChatFile as ai, type ToolCall as aj, type VoiceTransportRequest as ak, type Tool as al, type ToolAttachment as am, type Action as an, type ExtensionModule as ao, type AllowedCSSProperty as ap, type ExtensionComponentStyle as aq, type ExtensionComponentData as ar, type ExtensionComponentIterator as as, type ExtensionComponentChildren as at, type ExtensionActionCall as au, type ExtensionActionRef as av, type ExtensionDataSource as aw, type ExtensionPanelDefinition as ax, type HeaderProps as ay, type LabelProps as az, type StreamEvent as b, type TextPreviewProps as b0, type ModalProps as b1, type ConditionalGroupProps as b2, type WeatherCondition as b3, type WeatherWind as b4, type WeatherNowProps as b5, type WeatherForecastStep as b6, type WeatherForecastProps as b7, type ChartKind as b8, type ChartSeries as b9, type ChartProps as ba, type StatTrend as bb, type StatTileProps as bc, type ProgressShape as bd, type ProgressColor as be, type ProgressBarProps as bf, type KeyValueRow as bg, type KeyValueListProps as bh, type TimelineVariant as bi, type TimelineEntry as bj, type TimelineProps as bk, type NoteVariant as bl, type NoteProps as bm, type CalendarEventStatus as bn, type CalendarEventProps as bo, type AgendaEvent as bp, type AgendaDay as bq, type AgendaProps as br, type ExecutionContext as bs, type VoiceSessionDescriptor as c, type ToolSettingsViewDefinition as d, type ToolSettingsView as e, type ToolSettingsListView as f, type ToolSettingsListMapping as g, type ToolSettingsComponentView as h, type ToolSettingsActionDataSource as i, type StatusCardDefinition as j, type PanelView as k, type PanelComponentView as l, type PanelActionDataSource as m, type PanelUnknownView as n, type ProviderDefinition as o, type ProviderConfigView as p, type PromptContribution as q, resolveLocalizedString as r, type PromptSection as s, type ToolDefinition as t, type ToolConfirmationConfig as u, type CommandDefinition as v, type AccountProvider as w, type AccountContribution as x, type ExtensionContext as y, type SettingsAPI as z };
2693
+ export { type AttachmentsAPI as $, type ActionResult as A, type ExtensionContext as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type SettingsAPI as F, type GetModelsOptions as G, type HugeIconName as H, type ProvidersAPI as I, type ToolsAPI as J, type ActionsAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type EventsAPI as O, type PanelDefinition as P, type SchedulerAPI as Q, type SchedulerJobRequest as R, type SchedulerFirePayload as S, type ToolResult as T, type SchedulerSchedule as U, type VoiceSessionOptions as V, type UserAPI as W, type UserProfile as X, type ChatAPI as Y, type ChatInstructionMessage as Z, type ConversationPresentation as _, type ChatOptions as a, type PillProps as a$, type AttachmentContent as a0, type ConnectedAccountsAPI as a1, type ConnectedAccount as a2, type AccountAccessToken as a3, type LogAPI as a4, type BackgroundWorkersAPI as a5, type BackgroundTaskConfig as a6, type BackgroundTaskCallback as a7, type BackgroundTaskContext as a8, type BackgroundTaskHealth as a9, type HeaderProps as aA, type LabelProps as aB, type ClockProps as aC, type ParagraphProps as aD, type ButtonProps as aE, type TextInputProps as aF, type PasswordInputProps as aG, type NumberInputProps as aH, type TextAreaProps as aI, type DateTimeInputProps as aJ, type SelectProps as aK, type IconPickerProps as aL, type VerticalStackProps as aM, type HorizontalStackProps as aN, type GridProps as aO, type DividerProps as aP, type IconProps as aQ, type IconButtonType as aR, type IconButtonProps as aS, type PanelAction as aT, type PanelProps as aU, type ToggleProps as aV, type CollapsibleProps as aW, type FrameVariant as aX, type FrameProps as aY, type ListProps as aZ, type PillVariant as a_, type BackgroundRestartPolicy as aa, type Query as ab, type QueryOptions as ac, type StorageAPI as ad, type SecretsAPI as ae, type StorageCollectionConfig as af, type StorageContributions as ag, type AIProvider as ah, type ModelCapabilities as ai, type ChatImage as aj, type ChatFile as ak, type ToolCall as al, type VoiceTransportRequest as am, type Tool as an, type ToolAttachment as ao, type Action as ap, type ExtensionModule as aq, type AllowedCSSProperty as ar, type ExtensionComponentStyle as as, type ExtensionComponentData as at, type ExtensionComponentIterator as au, type ExtensionComponentChildren as av, type ExtensionActionCall as aw, type ExtensionActionRef as ax, type ExtensionDataSource as ay, type ExtensionPanelDefinition as az, type StreamEvent as b, type CheckboxProps as b0, type MarkdownProps as b1, type TextPreviewProps as b2, type ModalProps as b3, type ConditionalGroupProps as b4, type WeatherCondition as b5, type WeatherWind as b6, type WeatherNowProps as b7, type WeatherForecastStep as b8, type WeatherForecastProps as b9, type ChartKind as ba, type ChartSeries as bb, type ChartProps as bc, type StatTrend as bd, type StatTileProps as be, type ProgressShape as bf, type ProgressColor as bg, type ProgressBarProps as bh, type KeyValueRow as bi, type KeyValueListProps as bj, type TimelineVariant as bk, type TimelineEntry as bl, type TimelineProps as bm, type NoteVariant as bn, type NoteProps as bo, type CalendarEventStatus as bp, type CalendarEventProps as bq, type AgendaEvent as br, type AgendaDay as bs, type AgendaProps as bt, type ExecutionContext as bu, type VoiceSessionDescriptor as c, EXTENSION_SETTINGS_TOPICS as d, type ToolSettingsViewDefinition as e, type ExtensionSettingsTopic as f, type ToolSettingsView as g, type ToolSettingsListView as h, type ToolSettingsListMapping as i, type ToolSettingsComponentView as j, type ToolSettingsActionDataSource as k, type StatusCardDefinition as l, type PanelView as m, type PanelComponentView as n, type PanelActionDataSource as o, type PanelUnknownView as p, type ProviderDefinition as q, resolveLocalizedString as r, type ProviderConfigView as s, type PromptContribution as t, type PromptSection as u, type ToolDefinition as v, type ToolConfirmationConfig as w, type CommandDefinition as x, type AccountProvider as y, type AccountContribution as z };
@@ -894,6 +894,29 @@ interface AccountContribution {
894
894
  /** Why the extension needs them, shown next to the scopes in the settings. */
895
895
  reason?: LocalizedString;
896
896
  }
897
+ /**
898
+ * What a settings view is about, which decides where Stina shows it.
899
+ *
900
+ * An extension never picks a place in the settings menu: the menu belongs to Stina and
901
+ * changes between versions. It says what the view is *about*, and Stina puts each topic
902
+ * where it belongs, the way `accounts`, `providers` and `statusCards` already work.
903
+ *
904
+ * - `accounts`: connects Stina to an account or a service (a mailbox, a calendar feed).
905
+ * Shown with the other connected accounts.
906
+ * - `notifications`: when and how the extension may get in touch. Shown with Stina's own
907
+ * notification settings.
908
+ * - `personal`: facts about the user the extension relies on (a home town for the
909
+ * weather). Shown with the profile.
910
+ * - `tracking`: things Stina keeps track of for the user that are worth looking through
911
+ * now and then (people, projects, reminders). Gets its own row in the register.
912
+ *
913
+ * A view without a topic, or with one this version of Stina does not know, is shown on
914
+ * the extension's own page. That is always a working place, only a less fitting one, so
915
+ * a topic added later never breaks an older Stina.
916
+ */
917
+ type ExtensionSettingsTopic = 'accounts' | 'notifications' | 'personal' | 'tracking';
918
+ /** Every topic this version of the API knows, in no particular order. */
919
+ declare const EXTENSION_SETTINGS_TOPICS: readonly ExtensionSettingsTopic[];
897
920
  /**
898
921
  * Tool settings view definition (UI schema)
899
922
  */
@@ -904,6 +927,8 @@ interface ToolSettingsViewDefinition {
904
927
  title: string;
905
928
  /** Help text */
906
929
  description?: string;
930
+ /** What the view is about, and so where Stina shows it. See {@link ExtensionSettingsTopic}. */
931
+ topic?: ExtensionSettingsTopic;
907
932
  /** View configuration */
908
933
  view: ToolSettingsView;
909
934
  }
@@ -2665,4 +2690,4 @@ interface ActionResult {
2665
2690
  error?: string;
2666
2691
  }
2667
2692
 
2668
- export { type ConnectedAccountsAPI as $, type ActionResult as A, type ProvidersAPI as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type ToolsAPI as F, type GetModelsOptions as G, type HugeIconName as H, type ActionsAPI as I, type EventsAPI as J, type SchedulerAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type SchedulerJobRequest as O, type PanelDefinition as P, type SchedulerSchedule as Q, type UserProfile as R, type SchedulerFirePayload as S, type ToolResult as T, type UserAPI as U, type VoiceSessionOptions as V, type ChatAPI as W, type ChatInstructionMessage as X, type ConversationPresentation as Y, type AttachmentsAPI as Z, type AttachmentContent as _, type ChatOptions as a, type MarkdownProps as a$, type ConnectedAccount as a0, type AccountAccessToken as a1, type LogAPI as a2, type BackgroundWorkersAPI as a3, type BackgroundTaskConfig as a4, type BackgroundTaskCallback as a5, type BackgroundTaskContext as a6, type BackgroundTaskHealth as a7, type BackgroundRestartPolicy as a8, type Query as a9, type ClockProps as aA, type ParagraphProps as aB, type ButtonProps as aC, type TextInputProps as aD, type PasswordInputProps as aE, type NumberInputProps as aF, type TextAreaProps as aG, type DateTimeInputProps as aH, type SelectProps as aI, type IconPickerProps as aJ, type VerticalStackProps as aK, type HorizontalStackProps as aL, type GridProps as aM, type DividerProps as aN, type IconProps as aO, type IconButtonType as aP, type IconButtonProps as aQ, type PanelAction as aR, type PanelProps as aS, type ToggleProps as aT, type CollapsibleProps as aU, type FrameVariant as aV, type FrameProps as aW, type ListProps as aX, type PillVariant as aY, type PillProps as aZ, type CheckboxProps as a_, type QueryOptions as aa, type StorageAPI as ab, type SecretsAPI as ac, type StorageCollectionConfig as ad, type StorageContributions as ae, type AIProvider as af, type ModelCapabilities as ag, type ChatImage as ah, type ChatFile as ai, type ToolCall as aj, type VoiceTransportRequest as ak, type Tool as al, type ToolAttachment as am, type Action as an, type ExtensionModule as ao, type AllowedCSSProperty as ap, type ExtensionComponentStyle as aq, type ExtensionComponentData as ar, type ExtensionComponentIterator as as, type ExtensionComponentChildren as at, type ExtensionActionCall as au, type ExtensionActionRef as av, type ExtensionDataSource as aw, type ExtensionPanelDefinition as ax, type HeaderProps as ay, type LabelProps as az, type StreamEvent as b, type TextPreviewProps as b0, type ModalProps as b1, type ConditionalGroupProps as b2, type WeatherCondition as b3, type WeatherWind as b4, type WeatherNowProps as b5, type WeatherForecastStep as b6, type WeatherForecastProps as b7, type ChartKind as b8, type ChartSeries as b9, type ChartProps as ba, type StatTrend as bb, type StatTileProps as bc, type ProgressShape as bd, type ProgressColor as be, type ProgressBarProps as bf, type KeyValueRow as bg, type KeyValueListProps as bh, type TimelineVariant as bi, type TimelineEntry as bj, type TimelineProps as bk, type NoteVariant as bl, type NoteProps as bm, type CalendarEventStatus as bn, type CalendarEventProps as bo, type AgendaEvent as bp, type AgendaDay as bq, type AgendaProps as br, type ExecutionContext as bs, type VoiceSessionDescriptor as c, type ToolSettingsViewDefinition as d, type ToolSettingsView as e, type ToolSettingsListView as f, type ToolSettingsListMapping as g, type ToolSettingsComponentView as h, type ToolSettingsActionDataSource as i, type StatusCardDefinition as j, type PanelView as k, type PanelComponentView as l, type PanelActionDataSource as m, type PanelUnknownView as n, type ProviderDefinition as o, type ProviderConfigView as p, type PromptContribution as q, resolveLocalizedString as r, type PromptSection as s, type ToolDefinition as t, type ToolConfirmationConfig as u, type CommandDefinition as v, type AccountProvider as w, type AccountContribution as x, type ExtensionContext as y, type SettingsAPI as z };
2693
+ export { type AttachmentsAPI as $, type ActionResult as A, type ExtensionContext as B, type ChatMessage as C, type Disposable as D, type ExtensionContributions as E, type SettingsAPI as F, type GetModelsOptions as G, type HugeIconName as H, type ProvidersAPI as I, type ToolsAPI as J, type ActionsAPI as K, type LocalizedString as L, type ModelInfo as M, type NetworkAPI as N, type EventsAPI as O, type PanelDefinition as P, type SchedulerAPI as Q, type SchedulerJobRequest as R, type SchedulerFirePayload as S, type ToolResult as T, type SchedulerSchedule as U, type VoiceSessionOptions as V, type UserAPI as W, type UserProfile as X, type ChatAPI as Y, type ChatInstructionMessage as Z, type ConversationPresentation as _, type ChatOptions as a, type PillProps as a$, type AttachmentContent as a0, type ConnectedAccountsAPI as a1, type ConnectedAccount as a2, type AccountAccessToken as a3, type LogAPI as a4, type BackgroundWorkersAPI as a5, type BackgroundTaskConfig as a6, type BackgroundTaskCallback as a7, type BackgroundTaskContext as a8, type BackgroundTaskHealth as a9, type HeaderProps as aA, type LabelProps as aB, type ClockProps as aC, type ParagraphProps as aD, type ButtonProps as aE, type TextInputProps as aF, type PasswordInputProps as aG, type NumberInputProps as aH, type TextAreaProps as aI, type DateTimeInputProps as aJ, type SelectProps as aK, type IconPickerProps as aL, type VerticalStackProps as aM, type HorizontalStackProps as aN, type GridProps as aO, type DividerProps as aP, type IconProps as aQ, type IconButtonType as aR, type IconButtonProps as aS, type PanelAction as aT, type PanelProps as aU, type ToggleProps as aV, type CollapsibleProps as aW, type FrameVariant as aX, type FrameProps as aY, type ListProps as aZ, type PillVariant as a_, type BackgroundRestartPolicy as aa, type Query as ab, type QueryOptions as ac, type StorageAPI as ad, type SecretsAPI as ae, type StorageCollectionConfig as af, type StorageContributions as ag, type AIProvider as ah, type ModelCapabilities as ai, type ChatImage as aj, type ChatFile as ak, type ToolCall as al, type VoiceTransportRequest as am, type Tool as an, type ToolAttachment as ao, type Action as ap, type ExtensionModule as aq, type AllowedCSSProperty as ar, type ExtensionComponentStyle as as, type ExtensionComponentData as at, type ExtensionComponentIterator as au, type ExtensionComponentChildren as av, type ExtensionActionCall as aw, type ExtensionActionRef as ax, type ExtensionDataSource as ay, type ExtensionPanelDefinition as az, type StreamEvent as b, type CheckboxProps as b0, type MarkdownProps as b1, type TextPreviewProps as b2, type ModalProps as b3, type ConditionalGroupProps as b4, type WeatherCondition as b5, type WeatherWind as b6, type WeatherNowProps as b7, type WeatherForecastStep as b8, type WeatherForecastProps as b9, type ChartKind as ba, type ChartSeries as bb, type ChartProps as bc, type StatTrend as bd, type StatTileProps as be, type ProgressShape as bf, type ProgressColor as bg, type ProgressBarProps as bh, type KeyValueRow as bi, type KeyValueListProps as bj, type TimelineVariant as bk, type TimelineEntry as bl, type TimelineProps as bm, type NoteVariant as bn, type NoteProps as bo, type CalendarEventStatus as bp, type CalendarEventProps as bq, type AgendaEvent as br, type AgendaDay as bs, type AgendaProps as bt, type ExecutionContext as bu, type VoiceSessionDescriptor as c, EXTENSION_SETTINGS_TOPICS as d, type ToolSettingsViewDefinition as e, type ExtensionSettingsTopic as f, type ToolSettingsView as g, type ToolSettingsListView as h, type ToolSettingsListMapping as i, type ToolSettingsComponentView as j, type ToolSettingsActionDataSource as k, type StatusCardDefinition as l, type PanelView as m, type PanelComponentView as n, type PanelActionDataSource as o, type PanelUnknownView as p, type ProviderDefinition as q, resolveLocalizedString as r, type ProviderConfigView as s, type PromptContribution as t, type PromptSection as u, type ToolDefinition as v, type ToolConfirmationConfig as w, type CommandDefinition as x, type AccountProvider as y, type AccountContribution as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stina/extension-api",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -163,6 +163,10 @@
163
163
  "type": "string",
164
164
  "description": "Help text"
165
165
  },
166
+ "topic": {
167
+ "type": "string",
168
+ "description": "What the view is about, which decides where Stina shows it: accounts, notifications, personal or tracking. Without one, or with one Stina does not know, the view is shown on the extension's own page."
169
+ },
166
170
  "view": {
167
171
  "anyOf": [
168
172
  {
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  // Localization
11
11
  export type { LocalizedString } from './types.js'
12
12
  export { resolveLocalizedString } from './types.js'
13
+ export { EXTENSION_SETTINGS_TOPICS } from './types.js'
13
14
 
14
15
  // Types
15
16
  export type {
@@ -18,6 +19,7 @@ export type {
18
19
  Platform,
19
20
  ExtensionContributions,
20
21
  ToolSettingsViewDefinition,
22
+ ExtensionSettingsTopic,
21
23
  ToolSettingsView,
22
24
  ToolSettingsListView,
23
25
  ToolSettingsListMapping,
@@ -117,6 +117,14 @@ export const ToolSettingsViewDefinitionSchema = z
117
117
  id: z.string().describe('Unique view ID within the extension'),
118
118
  title: z.string().describe('Display title'),
119
119
  description: z.string().optional().describe('Help text'),
120
+ // A string rather than the known topics: one this host does not know yet must not stop
121
+ // the extension installing, it only lands on the extension's own page.
122
+ topic: z
123
+ .string()
124
+ .optional()
125
+ .describe(
126
+ 'What the view is about, which decides where Stina shows it: accounts, notifications, personal or tracking. Without one, or with one Stina does not know, the view is shown on the extension\'s own page.'
127
+ ),
120
128
  view: ToolSettingsViewSchema.describe('View configuration'),
121
129
  })
122
130
  .describe('Tool settings view definition')
@@ -87,6 +87,36 @@ export interface AccountContribution {
87
87
  // Tool Settings Views
88
88
  // ============================================================================
89
89
 
90
+ /**
91
+ * What a settings view is about, which decides where Stina shows it.
92
+ *
93
+ * An extension never picks a place in the settings menu: the menu belongs to Stina and
94
+ * changes between versions. It says what the view is *about*, and Stina puts each topic
95
+ * where it belongs, the way `accounts`, `providers` and `statusCards` already work.
96
+ *
97
+ * - `accounts`: connects Stina to an account or a service (a mailbox, a calendar feed).
98
+ * Shown with the other connected accounts.
99
+ * - `notifications`: when and how the extension may get in touch. Shown with Stina's own
100
+ * notification settings.
101
+ * - `personal`: facts about the user the extension relies on (a home town for the
102
+ * weather). Shown with the profile.
103
+ * - `tracking`: things Stina keeps track of for the user that are worth looking through
104
+ * now and then (people, projects, reminders). Gets its own row in the register.
105
+ *
106
+ * A view without a topic, or with one this version of Stina does not know, is shown on
107
+ * the extension's own page. That is always a working place, only a less fitting one, so
108
+ * a topic added later never breaks an older Stina.
109
+ */
110
+ export type ExtensionSettingsTopic = 'accounts' | 'notifications' | 'personal' | 'tracking'
111
+
112
+ /** Every topic this version of the API knows, in no particular order. */
113
+ export const EXTENSION_SETTINGS_TOPICS: readonly ExtensionSettingsTopic[] = [
114
+ 'accounts',
115
+ 'notifications',
116
+ 'personal',
117
+ 'tracking',
118
+ ]
119
+
90
120
  /**
91
121
  * Tool settings view definition (UI schema)
92
122
  */
@@ -97,6 +127,8 @@ export interface ToolSettingsViewDefinition {
97
127
  title: string
98
128
  /** Help text */
99
129
  description?: string
130
+ /** What the view is about, and so where Stina shows it. See {@link ExtensionSettingsTopic}. */
131
+ topic?: ExtensionSettingsTopic
100
132
  /** View configuration */
101
133
  view: ToolSettingsView
102
134
  }
package/src/types.ts CHANGED
@@ -24,6 +24,7 @@ export type {
24
24
  ExtensionContributions,
25
25
  // Tool Settings Views
26
26
  ToolSettingsViewDefinition,
27
+ ExtensionSettingsTopic,
27
28
  ToolSettingsView,
28
29
  ToolSettingsListView,
29
30
  ToolSettingsListMapping,
@@ -51,6 +52,7 @@ export type {
51
52
  AccountProvider,
52
53
  AccountContribution,
53
54
  } from './types.contributions.js'
55
+ export { EXTENSION_SETTINGS_TOPICS } from './types.contributions.js'
54
56
 
55
57
  // Manifest
56
58
  export type { ExtensionManifest, Platform } from './types.manifest.js'