@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.
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.cts +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/schemas/index.cjs +5 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +15 -0
- package/dist/schemas/index.d.ts +15 -0
- package/dist/schemas/index.js +5 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/{types.tools-CK0As7KV.d.cts → types.tools-DswDxtun.d.cts} +26 -1
- package/dist/{types.tools-CK0As7KV.d.ts → types.tools-DswDxtun.d.ts} +26 -1
- package/package.json +1 -1
- package/schema/extension-manifest.schema.json +4 -0
- package/src/index.ts +2 -0
- package/src/schemas/contributions.schema.ts +8 -0
- package/src/types.contributions.ts +32 -0
- package/src/types.ts +2 -0
|
@@ -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
|
|
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
|
|
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
|
@@ -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'
|