@stina/extension-api 1.0.0 → 1.6.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/{chunk-ZB7GJUPS.js → chunk-3Q3YXWOH.js} +1 -1
- package/dist/{chunk-ZB7GJUPS.js.map → chunk-3Q3YXWOH.js.map} +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +1 -1
- package/dist/runtime.cjs +44 -7
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +45 -8
- package/dist/runtime.js.map +1 -1
- package/dist/schemas/index.cjs +15 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +16 -5
- package/dist/schemas/index.d.ts +16 -5
- package/dist/schemas/index.js +14 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/{types.tools-CQrbET-n.d.cts → types.tools-R0xGhiBa.d.cts} +142 -2
- package/dist/{types.tools-CQrbET-n.d.ts → types.tools-R0xGhiBa.d.ts} +142 -2
- package/package.json +1 -1
- package/schema/extension-manifest.schema.json +1 -0
- package/src/index.ts +5 -0
- package/src/messages.ts +2 -0
- package/src/runtime/executionContext.test.ts +71 -0
- package/src/runtime/executionContext.ts +22 -2
- package/src/runtime.ts +55 -6
- package/src/schemas/components.schema.ts +9 -0
- package/src/schemas/index.ts +2 -0
- package/src/schemas/permissions.schema.ts +9 -1
- package/src/types.components.ts +13 -0
- package/src/types.context.ts +43 -0
- package/src/types.permissions.ts +7 -0
- package/src/types.provider.ts +51 -1
- package/src/types.tools.ts +42 -0
- package/src/types.ts +4 -1
package/dist/schemas/index.d.cts
CHANGED
|
@@ -64,7 +64,7 @@ declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
64
64
|
}>>;
|
|
65
65
|
platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<["web", "electron", "tui"]>, "many">>;
|
|
66
66
|
main: z.ZodString;
|
|
67
|
-
permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
|
|
67
|
+
permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
|
|
68
68
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
69
69
|
toolSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
70
|
id: z.ZodString;
|
|
@@ -1228,7 +1228,7 @@ type ExtensionManifest = z.infer<typeof ExtensionManifestSchema>;
|
|
|
1228
1228
|
/**
|
|
1229
1229
|
* Valid exact permission values
|
|
1230
1230
|
*/
|
|
1231
|
-
declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
|
|
1231
|
+
declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
|
|
1232
1232
|
/**
|
|
1233
1233
|
* Permission patterns for dynamic permissions (network with host/port)
|
|
1234
1234
|
*/
|
|
@@ -1244,7 +1244,7 @@ declare const StoragePermissionSchema: z.ZodEnum<["storage.collections", "secret
|
|
|
1244
1244
|
/**
|
|
1245
1245
|
* User data permission schema
|
|
1246
1246
|
*/
|
|
1247
|
-
declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read"]>;
|
|
1247
|
+
declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read"]>;
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Capability permission schema
|
|
1250
1250
|
*/
|
|
@@ -1257,7 +1257,7 @@ declare const SystemPermissionSchema: z.ZodEnum<["files.read", "files.write", "c
|
|
|
1257
1257
|
* Combined permission schema - validates against all permission types
|
|
1258
1258
|
* Uses z.union with z.enum and z.string().regex() for better JSON Schema generation
|
|
1259
1259
|
*/
|
|
1260
|
-
declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
|
|
1260
|
+
declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
|
|
1261
1261
|
/**
|
|
1262
1262
|
* Check if a permission string is valid
|
|
1263
1263
|
*/
|
|
@@ -3521,6 +3521,16 @@ declare const LabelPropsSchema: z.ZodObject<{
|
|
|
3521
3521
|
text: z.ZodString;
|
|
3522
3522
|
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3523
3523
|
}, z.ZodTypeAny, "passthrough">>;
|
|
3524
|
+
declare const ClockPropsSchema: z.ZodObject<{
|
|
3525
|
+
component: z.ZodLiteral<"Clock">;
|
|
3526
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3527
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3528
|
+
component: z.ZodLiteral<"Clock">;
|
|
3529
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3530
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3531
|
+
component: z.ZodLiteral<"Clock">;
|
|
3532
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3533
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
3524
3534
|
declare const ParagraphPropsSchema: z.ZodObject<{
|
|
3525
3535
|
component: z.ZodLiteral<"Paragraph">;
|
|
3526
3536
|
text: z.ZodString;
|
|
@@ -5927,6 +5937,7 @@ type ConditionalGroupProps = z.infer<typeof ConditionalGroupPropsSchema>;
|
|
|
5927
5937
|
type FrameVariant = z.infer<typeof FrameVariantSchema>;
|
|
5928
5938
|
type FrameProps = z.infer<typeof FramePropsSchema>;
|
|
5929
5939
|
type ListProps = z.infer<typeof ListPropsSchema>;
|
|
5940
|
+
type ClockProps = z.infer<typeof ClockPropsSchema>;
|
|
5930
5941
|
|
|
5931
5942
|
/**
|
|
5932
5943
|
* Chat Card Schema
|
|
@@ -6018,4 +6029,4 @@ declare function validateChatCard(card: unknown): ChatCardValidation;
|
|
|
6018
6029
|
*/
|
|
6019
6030
|
declare function describeChatCardProfile(): string;
|
|
6020
6031
|
|
|
6021
|
-
export { type AllowedCSSProperty, AllowedCSSPropertySchema, type Author, AuthorSchema, type ButtonProps, ButtonPropsSchema, CHAT_CARD_COMPONENTS, CHAT_CARD_PROPS, CalendarEventPropsSchema, CalendarEventStatusSchema, type CapabilityPermission, CapabilityPermissionSchema, ChartKindSchema, ChartPropsSchema, ChartSeriesSchema, type ChatCardComponent, ChatCardComponentSchema, ChatCardSchema, type ChatCardValidation, type CheckboxProps, CheckboxPropsSchema, type CollapsibleProps, CollapsiblePropsSchema, type CommandDefinition, CommandDefinitionSchema, type ConditionalGroupProps, ConditionalGroupPropsSchema, type DateTimeInputProps, DateTimeInputPropsSchema, type DividerProps, DividerPropsSchema, type Engines, EnginesSchema, type ExtensionActionCall, ExtensionActionCallSchema, type ExtensionActionRef, ExtensionActionRefSchema, type ExtensionComponentChildren, ExtensionComponentChildrenSchema, type ExtensionComponentData, ExtensionComponentDataSchema, type ExtensionComponentIterator, ExtensionComponentIteratorSchema, type ExtensionComponentStyle, ExtensionComponentStyleSchema, type ExtensionContributions, ExtensionContributionsSchema, type ExtensionDataSource, ExtensionDataSourceSchema, type ExtensionManifest, ExtensionManifestSchema, type FrameProps, FramePropsSchema, type FrameVariant, FrameVariantSchema, type GridProps, GridPropsSchema, type HeaderProps, HeaderPropsSchema, type HorizontalStackProps, HorizontalStackPropsSchema, type IconButtonProps, IconButtonPropsSchema, type IconButtonType, IconButtonTypeSchema, type IconPickerProps, IconPickerPropsSchema, type IconProps, IconPropsSchema, KeyValueListPropsSchema, KeyValueRowSchema, type LabelProps, LabelPropsSchema, type ListProps, ListPropsSchema, type LocalizedString, LocalizedStringSchema, type MarkdownProps, MarkdownPropsSchema, type ModalProps, ModalPropsSchema, type NetworkPermission, NetworkPermissionSchema, NotePropsSchema, NoteVariantSchema, PERMISSION_PATTERNS, type PanelAction, type PanelActionDataSource, PanelActionDataSourceSchema, PanelActionSchema, type PanelComponentView, PanelComponentViewSchema, type PanelDefinition, PanelDefinitionSchema, type PanelProps, PanelPropsSchema, type PanelUnknownView, PanelUnknownViewSchema, type PanelView, PanelViewSchema, type ParagraphProps, ParagraphPropsSchema, type Permission, PermissionSchema, type PillProps, PillPropsSchema, type PillVariant, PillVariantSchema, type Platform, PlatformSchema, ProgressBarPropsSchema, ProgressColorSchema, ProgressShapeSchema, type PromptContribution, PromptContributionSchema, type PromptSection, PromptSectionSchema, type ProviderConfigView, ProviderConfigViewSchema, type ProviderDefinition, ProviderDefinitionSchema, type SelectProps, SelectPropsSchema, StatTilePropsSchema, StatTrendSchema, type StatusCardDefinition, StatusCardDefinitionSchema, type StoragePermission, StoragePermissionSchema, type SystemPermission, SystemPermissionSchema, type TextInputProps, TextInputPropsSchema, type TextPreviewProps, TextPreviewPropsSchema, TimelineEntrySchema, TimelinePropsSchema, TimelineVariantSchema, type ToggleProps, TogglePropsSchema, type ToolDefinition, ToolDefinitionSchema, type ToolSettingsActionDataSource, ToolSettingsActionDataSourceSchema, type ToolSettingsComponentView, ToolSettingsComponentViewSchema, type ToolSettingsListGroupBy, ToolSettingsListGroupBySchema, type ToolSettingsListMapping, ToolSettingsListMappingSchema, type ToolSettingsListView, ToolSettingsListViewSchema, type ToolSettingsView, type ToolSettingsViewDefinition, ToolSettingsViewDefinitionSchema, ToolSettingsViewSchema, type UserDataPermission, UserDataPermissionSchema, VALID_PERMISSIONS, type VerticalStackProps, VerticalStackPropsSchema, WeatherConditionSchema, WeatherForecastPropsSchema, WeatherForecastStepSchema, WeatherNowPropsSchema, WeatherWindSchema, describeChatCardProfile, isValidPermission, validateChatCard };
|
|
6032
|
+
export { type AllowedCSSProperty, AllowedCSSPropertySchema, type Author, AuthorSchema, type ButtonProps, ButtonPropsSchema, CHAT_CARD_COMPONENTS, CHAT_CARD_PROPS, CalendarEventPropsSchema, CalendarEventStatusSchema, type CapabilityPermission, CapabilityPermissionSchema, ChartKindSchema, ChartPropsSchema, ChartSeriesSchema, type ChatCardComponent, ChatCardComponentSchema, ChatCardSchema, type ChatCardValidation, type CheckboxProps, CheckboxPropsSchema, type ClockProps, ClockPropsSchema, type CollapsibleProps, CollapsiblePropsSchema, type CommandDefinition, CommandDefinitionSchema, type ConditionalGroupProps, ConditionalGroupPropsSchema, type DateTimeInputProps, DateTimeInputPropsSchema, type DividerProps, DividerPropsSchema, type Engines, EnginesSchema, type ExtensionActionCall, ExtensionActionCallSchema, type ExtensionActionRef, ExtensionActionRefSchema, type ExtensionComponentChildren, ExtensionComponentChildrenSchema, type ExtensionComponentData, ExtensionComponentDataSchema, type ExtensionComponentIterator, ExtensionComponentIteratorSchema, type ExtensionComponentStyle, ExtensionComponentStyleSchema, type ExtensionContributions, ExtensionContributionsSchema, type ExtensionDataSource, ExtensionDataSourceSchema, type ExtensionManifest, ExtensionManifestSchema, type FrameProps, FramePropsSchema, type FrameVariant, FrameVariantSchema, type GridProps, GridPropsSchema, type HeaderProps, HeaderPropsSchema, type HorizontalStackProps, HorizontalStackPropsSchema, type IconButtonProps, IconButtonPropsSchema, type IconButtonType, IconButtonTypeSchema, type IconPickerProps, IconPickerPropsSchema, type IconProps, IconPropsSchema, KeyValueListPropsSchema, KeyValueRowSchema, type LabelProps, LabelPropsSchema, type ListProps, ListPropsSchema, type LocalizedString, LocalizedStringSchema, type MarkdownProps, MarkdownPropsSchema, type ModalProps, ModalPropsSchema, type NetworkPermission, NetworkPermissionSchema, NotePropsSchema, NoteVariantSchema, PERMISSION_PATTERNS, type PanelAction, type PanelActionDataSource, PanelActionDataSourceSchema, PanelActionSchema, type PanelComponentView, PanelComponentViewSchema, type PanelDefinition, PanelDefinitionSchema, type PanelProps, PanelPropsSchema, type PanelUnknownView, PanelUnknownViewSchema, type PanelView, PanelViewSchema, type ParagraphProps, ParagraphPropsSchema, type Permission, PermissionSchema, type PillProps, PillPropsSchema, type PillVariant, PillVariantSchema, type Platform, PlatformSchema, ProgressBarPropsSchema, ProgressColorSchema, ProgressShapeSchema, type PromptContribution, PromptContributionSchema, type PromptSection, PromptSectionSchema, type ProviderConfigView, ProviderConfigViewSchema, type ProviderDefinition, ProviderDefinitionSchema, type SelectProps, SelectPropsSchema, StatTilePropsSchema, StatTrendSchema, type StatusCardDefinition, StatusCardDefinitionSchema, type StoragePermission, StoragePermissionSchema, type SystemPermission, SystemPermissionSchema, type TextInputProps, TextInputPropsSchema, type TextPreviewProps, TextPreviewPropsSchema, TimelineEntrySchema, TimelinePropsSchema, TimelineVariantSchema, type ToggleProps, TogglePropsSchema, type ToolDefinition, ToolDefinitionSchema, type ToolSettingsActionDataSource, ToolSettingsActionDataSourceSchema, type ToolSettingsComponentView, ToolSettingsComponentViewSchema, type ToolSettingsListGroupBy, ToolSettingsListGroupBySchema, type ToolSettingsListMapping, ToolSettingsListMappingSchema, type ToolSettingsListView, ToolSettingsListViewSchema, type ToolSettingsView, type ToolSettingsViewDefinition, ToolSettingsViewDefinitionSchema, ToolSettingsViewSchema, type UserDataPermission, UserDataPermissionSchema, VALID_PERMISSIONS, type VerticalStackProps, VerticalStackPropsSchema, WeatherConditionSchema, WeatherForecastPropsSchema, WeatherForecastStepSchema, WeatherNowPropsSchema, WeatherWindSchema, describeChatCardProfile, isValidPermission, validateChatCard };
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ declare const ExtensionManifestSchema: z.ZodObject<{
|
|
|
64
64
|
}>>;
|
|
65
65
|
platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<["web", "electron", "tui"]>, "many">>;
|
|
66
66
|
main: z.ZodString;
|
|
67
|
-
permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
|
|
67
|
+
permissions: z.ZodArray<z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>, "many">;
|
|
68
68
|
contributes: z.ZodOptional<z.ZodObject<{
|
|
69
69
|
toolSettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
70
|
id: z.ZodString;
|
|
@@ -1228,7 +1228,7 @@ type ExtensionManifest = z.infer<typeof ExtensionManifestSchema>;
|
|
|
1228
1228
|
/**
|
|
1229
1229
|
* Valid exact permission values
|
|
1230
1230
|
*/
|
|
1231
|
-
declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
|
|
1231
|
+
declare const VALID_PERMISSIONS: readonly ["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"];
|
|
1232
1232
|
/**
|
|
1233
1233
|
* Permission patterns for dynamic permissions (network with host/port)
|
|
1234
1234
|
*/
|
|
@@ -1244,7 +1244,7 @@ declare const StoragePermissionSchema: z.ZodEnum<["storage.collections", "secret
|
|
|
1244
1244
|
/**
|
|
1245
1245
|
* User data permission schema
|
|
1246
1246
|
*/
|
|
1247
|
-
declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read"]>;
|
|
1247
|
+
declare const UserDataPermissionSchema: z.ZodEnum<["user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read"]>;
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Capability permission schema
|
|
1250
1250
|
*/
|
|
@@ -1257,7 +1257,7 @@ declare const SystemPermissionSchema: z.ZodEnum<["files.read", "files.write", "c
|
|
|
1257
1257
|
* Combined permission schema - validates against all permission types
|
|
1258
1258
|
* Uses z.union with z.enum and z.string().regex() for better JSON Schema generation
|
|
1259
1259
|
*/
|
|
1260
|
-
declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
|
|
1260
|
+
declare const PermissionSchema: z.ZodUnion<[z.ZodEnum<["network:*", "network:localhost", "storage.collections", "secrets.manage", "user.profile.read", "user.list", "user.location.read", "chat.history.read", "chat.current.read", "attachments.read", "chat.message.write", "provider.register", "tools.register", "tools.list", "tools.execute", "actions.register", "settings.register", "commands.register", "panels.register", "statusCards.register", "events.emit", "scheduler.register", "background.workers", "files.read", "files.write", "clipboard.read", "clipboard.write"]>, z.ZodString]>;
|
|
1261
1261
|
/**
|
|
1262
1262
|
* Check if a permission string is valid
|
|
1263
1263
|
*/
|
|
@@ -3521,6 +3521,16 @@ declare const LabelPropsSchema: z.ZodObject<{
|
|
|
3521
3521
|
text: z.ZodString;
|
|
3522
3522
|
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3523
3523
|
}, z.ZodTypeAny, "passthrough">>;
|
|
3524
|
+
declare const ClockPropsSchema: z.ZodObject<{
|
|
3525
|
+
component: z.ZodLiteral<"Clock">;
|
|
3526
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3527
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3528
|
+
component: z.ZodLiteral<"Clock">;
|
|
3529
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3530
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3531
|
+
component: z.ZodLiteral<"Clock">;
|
|
3532
|
+
style: z.ZodOptional<z.ZodRecord<z.ZodEnum<["color", "background-color", "background", "border-color", "border", "border-width", "border-style", "border-radius", "border-top", "border-right", "border-bottom", "border-left", "border-top-left-radius", "border-top-right-radius", "border-bottom-left-radius", "border-bottom-right-radius", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left", "margin", "margin-top", "margin-right", "margin-bottom", "margin-left", "gap", "row-gap", "column-gap", "font-size", "font-weight", "font-style", "text-align", "text-decoration", "line-height", "letter-spacing", "white-space", "word-break", "overflow-wrap", "width", "height", "min-width", "min-height", "max-width", "max-height", "flex", "flex-grow", "flex-shrink", "flex-basis", "flex-wrap", "align-self", "justify-self", "align-items", "justify-content", "opacity", "visibility", "overflow", "overflow-x", "overflow-y", "box-shadow", "outline", "cursor", "border-collapse", "border-spacing"]>, z.ZodString>>;
|
|
3533
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
3524
3534
|
declare const ParagraphPropsSchema: z.ZodObject<{
|
|
3525
3535
|
component: z.ZodLiteral<"Paragraph">;
|
|
3526
3536
|
text: z.ZodString;
|
|
@@ -5927,6 +5937,7 @@ type ConditionalGroupProps = z.infer<typeof ConditionalGroupPropsSchema>;
|
|
|
5927
5937
|
type FrameVariant = z.infer<typeof FrameVariantSchema>;
|
|
5928
5938
|
type FrameProps = z.infer<typeof FramePropsSchema>;
|
|
5929
5939
|
type ListProps = z.infer<typeof ListPropsSchema>;
|
|
5940
|
+
type ClockProps = z.infer<typeof ClockPropsSchema>;
|
|
5930
5941
|
|
|
5931
5942
|
/**
|
|
5932
5943
|
* Chat Card Schema
|
|
@@ -6018,4 +6029,4 @@ declare function validateChatCard(card: unknown): ChatCardValidation;
|
|
|
6018
6029
|
*/
|
|
6019
6030
|
declare function describeChatCardProfile(): string;
|
|
6020
6031
|
|
|
6021
|
-
export { type AllowedCSSProperty, AllowedCSSPropertySchema, type Author, AuthorSchema, type ButtonProps, ButtonPropsSchema, CHAT_CARD_COMPONENTS, CHAT_CARD_PROPS, CalendarEventPropsSchema, CalendarEventStatusSchema, type CapabilityPermission, CapabilityPermissionSchema, ChartKindSchema, ChartPropsSchema, ChartSeriesSchema, type ChatCardComponent, ChatCardComponentSchema, ChatCardSchema, type ChatCardValidation, type CheckboxProps, CheckboxPropsSchema, type CollapsibleProps, CollapsiblePropsSchema, type CommandDefinition, CommandDefinitionSchema, type ConditionalGroupProps, ConditionalGroupPropsSchema, type DateTimeInputProps, DateTimeInputPropsSchema, type DividerProps, DividerPropsSchema, type Engines, EnginesSchema, type ExtensionActionCall, ExtensionActionCallSchema, type ExtensionActionRef, ExtensionActionRefSchema, type ExtensionComponentChildren, ExtensionComponentChildrenSchema, type ExtensionComponentData, ExtensionComponentDataSchema, type ExtensionComponentIterator, ExtensionComponentIteratorSchema, type ExtensionComponentStyle, ExtensionComponentStyleSchema, type ExtensionContributions, ExtensionContributionsSchema, type ExtensionDataSource, ExtensionDataSourceSchema, type ExtensionManifest, ExtensionManifestSchema, type FrameProps, FramePropsSchema, type FrameVariant, FrameVariantSchema, type GridProps, GridPropsSchema, type HeaderProps, HeaderPropsSchema, type HorizontalStackProps, HorizontalStackPropsSchema, type IconButtonProps, IconButtonPropsSchema, type IconButtonType, IconButtonTypeSchema, type IconPickerProps, IconPickerPropsSchema, type IconProps, IconPropsSchema, KeyValueListPropsSchema, KeyValueRowSchema, type LabelProps, LabelPropsSchema, type ListProps, ListPropsSchema, type LocalizedString, LocalizedStringSchema, type MarkdownProps, MarkdownPropsSchema, type ModalProps, ModalPropsSchema, type NetworkPermission, NetworkPermissionSchema, NotePropsSchema, NoteVariantSchema, PERMISSION_PATTERNS, type PanelAction, type PanelActionDataSource, PanelActionDataSourceSchema, PanelActionSchema, type PanelComponentView, PanelComponentViewSchema, type PanelDefinition, PanelDefinitionSchema, type PanelProps, PanelPropsSchema, type PanelUnknownView, PanelUnknownViewSchema, type PanelView, PanelViewSchema, type ParagraphProps, ParagraphPropsSchema, type Permission, PermissionSchema, type PillProps, PillPropsSchema, type PillVariant, PillVariantSchema, type Platform, PlatformSchema, ProgressBarPropsSchema, ProgressColorSchema, ProgressShapeSchema, type PromptContribution, PromptContributionSchema, type PromptSection, PromptSectionSchema, type ProviderConfigView, ProviderConfigViewSchema, type ProviderDefinition, ProviderDefinitionSchema, type SelectProps, SelectPropsSchema, StatTilePropsSchema, StatTrendSchema, type StatusCardDefinition, StatusCardDefinitionSchema, type StoragePermission, StoragePermissionSchema, type SystemPermission, SystemPermissionSchema, type TextInputProps, TextInputPropsSchema, type TextPreviewProps, TextPreviewPropsSchema, TimelineEntrySchema, TimelinePropsSchema, TimelineVariantSchema, type ToggleProps, TogglePropsSchema, type ToolDefinition, ToolDefinitionSchema, type ToolSettingsActionDataSource, ToolSettingsActionDataSourceSchema, type ToolSettingsComponentView, ToolSettingsComponentViewSchema, type ToolSettingsListGroupBy, ToolSettingsListGroupBySchema, type ToolSettingsListMapping, ToolSettingsListMappingSchema, type ToolSettingsListView, ToolSettingsListViewSchema, type ToolSettingsView, type ToolSettingsViewDefinition, ToolSettingsViewDefinitionSchema, ToolSettingsViewSchema, type UserDataPermission, UserDataPermissionSchema, VALID_PERMISSIONS, type VerticalStackProps, VerticalStackPropsSchema, WeatherConditionSchema, WeatherForecastPropsSchema, WeatherForecastStepSchema, WeatherNowPropsSchema, WeatherWindSchema, describeChatCardProfile, isValidPermission, validateChatCard };
|
|
6032
|
+
export { type AllowedCSSProperty, AllowedCSSPropertySchema, type Author, AuthorSchema, type ButtonProps, ButtonPropsSchema, CHAT_CARD_COMPONENTS, CHAT_CARD_PROPS, CalendarEventPropsSchema, CalendarEventStatusSchema, type CapabilityPermission, CapabilityPermissionSchema, ChartKindSchema, ChartPropsSchema, ChartSeriesSchema, type ChatCardComponent, ChatCardComponentSchema, ChatCardSchema, type ChatCardValidation, type CheckboxProps, CheckboxPropsSchema, type ClockProps, ClockPropsSchema, type CollapsibleProps, CollapsiblePropsSchema, type CommandDefinition, CommandDefinitionSchema, type ConditionalGroupProps, ConditionalGroupPropsSchema, type DateTimeInputProps, DateTimeInputPropsSchema, type DividerProps, DividerPropsSchema, type Engines, EnginesSchema, type ExtensionActionCall, ExtensionActionCallSchema, type ExtensionActionRef, ExtensionActionRefSchema, type ExtensionComponentChildren, ExtensionComponentChildrenSchema, type ExtensionComponentData, ExtensionComponentDataSchema, type ExtensionComponentIterator, ExtensionComponentIteratorSchema, type ExtensionComponentStyle, ExtensionComponentStyleSchema, type ExtensionContributions, ExtensionContributionsSchema, type ExtensionDataSource, ExtensionDataSourceSchema, type ExtensionManifest, ExtensionManifestSchema, type FrameProps, FramePropsSchema, type FrameVariant, FrameVariantSchema, type GridProps, GridPropsSchema, type HeaderProps, HeaderPropsSchema, type HorizontalStackProps, HorizontalStackPropsSchema, type IconButtonProps, IconButtonPropsSchema, type IconButtonType, IconButtonTypeSchema, type IconPickerProps, IconPickerPropsSchema, type IconProps, IconPropsSchema, KeyValueListPropsSchema, KeyValueRowSchema, type LabelProps, LabelPropsSchema, type ListProps, ListPropsSchema, type LocalizedString, LocalizedStringSchema, type MarkdownProps, MarkdownPropsSchema, type ModalProps, ModalPropsSchema, type NetworkPermission, NetworkPermissionSchema, NotePropsSchema, NoteVariantSchema, PERMISSION_PATTERNS, type PanelAction, type PanelActionDataSource, PanelActionDataSourceSchema, PanelActionSchema, type PanelComponentView, PanelComponentViewSchema, type PanelDefinition, PanelDefinitionSchema, type PanelProps, PanelPropsSchema, type PanelUnknownView, PanelUnknownViewSchema, type PanelView, PanelViewSchema, type ParagraphProps, ParagraphPropsSchema, type Permission, PermissionSchema, type PillProps, PillPropsSchema, type PillVariant, PillVariantSchema, type Platform, PlatformSchema, ProgressBarPropsSchema, ProgressColorSchema, ProgressShapeSchema, type PromptContribution, PromptContributionSchema, type PromptSection, PromptSectionSchema, type ProviderConfigView, ProviderConfigViewSchema, type ProviderDefinition, ProviderDefinitionSchema, type SelectProps, SelectPropsSchema, StatTilePropsSchema, StatTrendSchema, type StatusCardDefinition, StatusCardDefinitionSchema, type StoragePermission, StoragePermissionSchema, type SystemPermission, SystemPermissionSchema, type TextInputProps, TextInputPropsSchema, type TextPreviewProps, TextPreviewPropsSchema, TimelineEntrySchema, TimelinePropsSchema, TimelineVariantSchema, type ToggleProps, TogglePropsSchema, type ToolDefinition, ToolDefinitionSchema, type ToolSettingsActionDataSource, ToolSettingsActionDataSourceSchema, type ToolSettingsComponentView, ToolSettingsComponentViewSchema, type ToolSettingsListGroupBy, ToolSettingsListGroupBySchema, type ToolSettingsListMapping, ToolSettingsListMappingSchema, type ToolSettingsListView, ToolSettingsListViewSchema, type ToolSettingsView, type ToolSettingsViewDefinition, ToolSettingsViewDefinitionSchema, ToolSettingsViewSchema, type UserDataPermission, UserDataPermissionSchema, VALID_PERMISSIONS, type VerticalStackProps, VerticalStackPropsSchema, WeatherConditionSchema, WeatherForecastPropsSchema, WeatherForecastStepSchema, WeatherNowPropsSchema, WeatherWindSchema, describeChatCardProfile, isValidPermission, validateChatCard };
|
package/dist/schemas/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var VALID_PERMISSIONS = [
|
|
|
15
15
|
"user.location.read",
|
|
16
16
|
"chat.history.read",
|
|
17
17
|
"chat.current.read",
|
|
18
|
+
"attachments.read",
|
|
18
19
|
"chat.message.write",
|
|
19
20
|
"provider.register",
|
|
20
21
|
"tools.register",
|
|
@@ -51,7 +52,14 @@ var NetworkPermissionSchema = z.string().refine(
|
|
|
51
52
|
{ message: "Invalid network permission format" }
|
|
52
53
|
).describe('Network access permission (e.g., "network:*", "network:localhost:11434")');
|
|
53
54
|
var StoragePermissionSchema = z.enum(["storage.collections", "secrets.manage"]).describe("Storage permission");
|
|
54
|
-
var UserDataPermissionSchema = z.enum([
|
|
55
|
+
var UserDataPermissionSchema = z.enum([
|
|
56
|
+
"user.profile.read",
|
|
57
|
+
"user.list",
|
|
58
|
+
"user.location.read",
|
|
59
|
+
"chat.history.read",
|
|
60
|
+
"chat.current.read",
|
|
61
|
+
"attachments.read"
|
|
62
|
+
]).describe("User data access permission");
|
|
55
63
|
var CapabilityPermissionSchema = z.enum([
|
|
56
64
|
"provider.register",
|
|
57
65
|
"tools.register",
|
|
@@ -190,6 +198,10 @@ var LabelPropsSchema = z2.object({
|
|
|
190
198
|
text: z2.string().describe("Label text"),
|
|
191
199
|
style: ExtensionComponentStyleSchema.optional()
|
|
192
200
|
}).passthrough().describe("Label component");
|
|
201
|
+
var ClockPropsSchema = z2.object({
|
|
202
|
+
component: z2.literal("Clock"),
|
|
203
|
+
style: ExtensionComponentStyleSchema.optional()
|
|
204
|
+
}).passthrough().describe("Clock component: the current date and time where the user is");
|
|
193
205
|
var ParagraphPropsSchema = z2.object({
|
|
194
206
|
component: z2.literal("Paragraph"),
|
|
195
207
|
text: z2.string().describe("Paragraph text"),
|
|
@@ -1109,6 +1121,7 @@ export {
|
|
|
1109
1121
|
ChatCardComponentSchema,
|
|
1110
1122
|
ChatCardSchema,
|
|
1111
1123
|
CheckboxPropsSchema,
|
|
1124
|
+
ClockPropsSchema,
|
|
1112
1125
|
CollapsiblePropsSchema,
|
|
1113
1126
|
CommandDefinitionSchema,
|
|
1114
1127
|
ConditionalGroupPropsSchema,
|