@stina/extension-api 1.7.0 → 1.16.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/types.localization.ts","../src/messages.ts"],"sourcesContent":["/**\n * @stina/extension-api\n *\n * Types and utilities for building Stina extensions.\n *\n * Extensions should import from this package for type definitions.\n * The runtime (worker-side code) should import from '@stina/extension-api/runtime'.\n */\n\n// Localization\nexport type { LocalizedString } from './types.js'\nexport { resolveLocalizedString } from './types.js'\n\n// Types\nexport type {\n // Manifest\n ExtensionManifest,\n Platform,\n ExtensionContributions,\n ToolSettingsViewDefinition,\n ToolSettingsView,\n ToolSettingsListView,\n ToolSettingsListMapping,\n ToolSettingsComponentView,\n ToolSettingsActionDataSource,\n PanelDefinition,\n StatusCardDefinition,\n PanelView,\n PanelComponentView,\n PanelActionDataSource,\n PanelUnknownView,\n ProviderDefinition,\n ProviderConfigView,\n PromptContribution,\n PromptSection,\n ToolDefinition,\n ToolConfirmationConfig,\n CommandDefinition,\n AccountProvider,\n AccountContribution,\n\n // Permissions\n Permission,\n NetworkPermission,\n StoragePermission,\n UserDataPermission,\n CapabilityPermission,\n SystemPermission,\n\n // Context\n ExtensionContext,\n Disposable,\n NetworkAPI,\n SettingsAPI,\n ProvidersAPI,\n ToolsAPI,\n ActionsAPI,\n EventsAPI,\n SchedulerAPI,\n SchedulerJobRequest,\n SchedulerSchedule,\n SchedulerFirePayload,\n UserAPI,\n UserProfile,\n ChatAPI,\n ChatInstructionMessage,\n ConversationPresentation,\n AttachmentsAPI,\n AttachmentContent,\n ConnectedAccountsAPI,\n ConnectedAccount,\n AccountAccessToken,\n LogAPI,\n\n // Background workers\n BackgroundWorkersAPI,\n BackgroundTaskConfig,\n BackgroundTaskCallback,\n BackgroundTaskContext,\n BackgroundTaskHealth,\n BackgroundRestartPolicy,\n\n // Storage and Secrets\n Query,\n QueryOptions,\n StorageAPI,\n SecretsAPI,\n StorageCollectionConfig,\n StorageContributions,\n\n // AI Provider\n AIProvider,\n ModelInfo,\n ModelCapabilities,\n ChatMessage,\n ChatImage,\n ChatFile,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolCall,\n\n // Duplex voice\n VoiceSessionOptions,\n VoiceSessionDescriptor,\n VoiceTransportRequest,\n\n // Tools\n Tool,\n ToolResult,\n ToolAttachment,\n\n // Actions\n Action,\n ActionResult,\n\n // Entry point\n ExtensionModule,\n} from './types.js'\n\n// Messages (for host implementation)\nexport type {\n HostToWorkerMessage,\n WorkerToHostMessage,\n ActivateMessage,\n DeactivateMessage,\n SettingsChangedMessage,\n ProviderChatRequestMessage,\n ProviderModelsRequestMessage,\n ToolExecuteRequestMessage,\n ToolExecuteResponseMessage,\n ActionExecuteRequestMessage,\n ActionExecuteResponseMessage,\n ResponseMessage,\n ReadyMessage,\n RequestMessage,\n RequestMethod,\n ProviderRegisteredMessage,\n ToolRegisteredMessage,\n ActionRegisteredMessage,\n StreamEventMessage,\n LogMessage,\n PendingRequest,\n // Background task messages\n BackgroundTaskStartMessage,\n BackgroundTaskStopMessage,\n BackgroundTaskRegisteredMessage,\n BackgroundTaskStatusMessage,\n BackgroundTaskHealthMessage,\n} from './messages.js'\n\nexport { generateMessageId } from './messages.js'\n\n// Component types (for extension UI components)\nexport type {\n // Icon Names\n HugeIconName,\n // Styling\n AllowedCSSProperty,\n ExtensionComponentStyle,\n // Base types\n ExtensionComponentData,\n // Iteration & Children\n ExtensionComponentIterator,\n ExtensionComponentChildren,\n // Actions\n ExtensionActionCall,\n ExtensionActionRef,\n // Data Sources & Panel Definition\n ExtensionDataSource,\n ExtensionPanelDefinition,\n // Component Props\n HeaderProps,\n LabelProps,\n ClockProps,\n ParagraphProps,\n ButtonProps,\n TextInputProps,\n PasswordInputProps,\n NumberInputProps,\n TextAreaProps,\n DateTimeInputProps,\n SelectProps,\n IconPickerProps,\n VerticalStackProps,\n HorizontalStackProps,\n GridProps,\n DividerProps,\n IconProps,\n IconButtonType,\n IconButtonProps,\n PanelAction,\n PanelProps,\n ToggleProps,\n CollapsibleProps,\n FrameVariant,\n FrameProps,\n ListProps,\n PillVariant,\n PillProps,\n CheckboxProps,\n MarkdownProps,\n TextPreviewProps,\n ModalProps,\n ConditionalGroupProps,\n // Purpose-built display components\n WeatherCondition,\n WeatherWind,\n WeatherNowProps,\n WeatherForecastStep,\n WeatherForecastProps,\n ChartKind,\n ChartSeries,\n ChartProps,\n StatTrend,\n StatTileProps,\n ProgressShape,\n ProgressColor,\n ProgressBarProps,\n KeyValueRow,\n KeyValueListProps,\n TimelineVariant,\n TimelineEntry,\n TimelineProps,\n NoteVariant,\n NoteProps,\n CalendarEventStatus,\n CalendarEventProps,\n} from './types.components.js'\n","/**\n * Localization Types\n *\n * Types and utilities for localized strings in extensions.\n */\n\n/**\n * A string that can be either a simple string or a map of language codes to localized strings.\n * When a simple string is provided, it's used as the default/fallback value.\n * When a map is provided, the appropriate language is selected at runtime.\n *\n * @example\n * // Simple string (backwards compatible)\n * name: \"Get Weather\"\n *\n * @example\n * // Localized strings\n * name: { en: \"Get Weather\", sv: \"Hämta väder\", de: \"Wetter abrufen\" }\n */\nexport type LocalizedString = string | Record<string, string>\n\n/**\n * Resolves a LocalizedString to an actual string value.\n * @param value The LocalizedString to resolve\n * @param lang The preferred language code (e.g., \"sv\", \"en\")\n * @param fallbackLang The fallback language code (defaults to \"en\")\n * @returns The resolved string value\n */\nexport function resolveLocalizedString(\n value: LocalizedString,\n lang: string,\n fallbackLang = 'en'\n): string {\n if (typeof value === 'string') {\n return value\n }\n // Try preferred language first, then fallback language, then first available, then empty string\n return value[lang] ?? value[fallbackLang] ?? Object.values(value)[0] ?? ''\n}\n","/**\n * Message protocol between Extension Host and Extension Workers\n */\n\nimport type {\n ChatMessage,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolResult,\n ActionResult,\n ModelInfo,\n SchedulerFirePayload,\n VoiceSessionOptions,\n VoiceSessionDescriptor,\n} from './types.js'\n\n// ============================================================================\n// Host → Worker Messages\n// ============================================================================\n\nexport type HostToWorkerMessage =\n | ActivateMessage\n | DeactivateMessage\n | SettingsChangedMessage\n | SchedulerFireMessage\n | ProviderChatRequestMessage\n | ProviderModelsRequestMessage\n | ProviderVoiceSessionRequestMessage\n | ToolExecuteRequestMessage\n | ActionExecuteRequestMessage\n | ResponseMessage\n | StreamingFetchChunkMessage\n | BackgroundTaskStartMessage\n | BackgroundTaskStopMessage\n\nexport interface ActivateMessage {\n type: 'activate'\n id: string\n payload: {\n extensionId: string\n extensionVersion: string\n storagePath: string\n permissions: string[]\n settings: Record<string, unknown>\n }\n}\n\nexport interface DeactivateMessage {\n type: 'deactivate'\n id: string\n}\n\nexport interface SettingsChangedMessage {\n type: 'settings-changed'\n id: string\n payload: {\n key: string\n value: unknown\n }\n}\n\nexport interface SchedulerFireMessage {\n type: 'scheduler-fire'\n id: string\n payload: SchedulerFirePayload\n}\n\nexport interface ProviderChatRequestMessage {\n type: 'provider-chat-request'\n id: string\n payload: {\n providerId: string\n messages: ChatMessage[]\n options: ChatOptions\n }\n}\n\nexport interface ProviderModelsRequestMessage {\n type: 'provider-models-request'\n id: string\n payload: {\n providerId: string\n options?: GetModelsOptions\n }\n}\n\nexport interface ProviderVoiceSessionRequestMessage {\n type: 'provider-voice-session-request'\n id: string\n payload: {\n providerId: string\n /**\n * `signal` is dropped on the way across: an AbortSignal cannot be\n * structured-cloned into a worker. Cancellation is handled by the host\n * rejecting the pending request instead.\n */\n options: Omit<VoiceSessionOptions, 'signal'>\n }\n}\n\nexport interface ToolExecuteRequestMessage {\n type: 'tool-execute-request'\n id: string\n payload: {\n toolId: string\n params: Record<string, unknown>\n /** User ID if the tool is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ActionExecuteRequestMessage {\n type: 'action-execute-request'\n id: string\n payload: {\n actionId: string\n params: Record<string, unknown>\n /** User ID if the action is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ResponseMessage {\n type: 'response'\n id: string\n payload: {\n requestId: string\n success: boolean\n data?: unknown\n error?: string\n }\n}\n\n/**\n * Message sent from host to worker with streaming fetch data chunks.\n * Used for streaming network responses (e.g., NDJSON streams from Ollama).\n */\nexport interface StreamingFetchChunkMessage {\n type: 'streaming-fetch-chunk'\n id: string\n payload: {\n requestId: string\n chunk: string\n done: boolean\n error?: string\n }\n}\n\n/**\n * Message sent from host to worker to start a registered background task.\n */\nexport interface BackgroundTaskStartMessage {\n type: 'background-task-start'\n id: string\n payload: {\n taskId: string\n }\n}\n\n/**\n * Message sent from host to worker to stop a running background task.\n */\nexport interface BackgroundTaskStopMessage {\n type: 'background-task-stop'\n id: string\n payload: {\n taskId: string\n }\n}\n\n// ============================================================================\n// Worker → Host Messages\n// ============================================================================\n\nexport type WorkerToHostMessage =\n | ReadyMessage\n | RequestMessage\n | ProviderRegisteredMessage\n | ToolRegisteredMessage\n | ActionRegisteredMessage\n | StreamEventMessage\n | LogMessage\n | ProviderModelsResponseMessage\n | ProviderVoiceSessionResponseMessage\n | ToolExecuteResponseMessage\n | ActionExecuteResponseMessage\n | StreamingFetchAckMessage\n | BackgroundTaskRegisteredMessage\n | BackgroundTaskStatusMessage\n | BackgroundTaskHealthMessage\n\nexport interface ReadyMessage {\n type: 'ready'\n}\n\n/**\n * Message sent from worker to host to acknowledge receipt of a streaming fetch chunk.\n * This enables backpressure control to prevent unbounded memory growth.\n */\nexport interface StreamingFetchAckMessage {\n type: 'streaming-fetch-ack'\n payload: {\n requestId: string\n }\n}\n\nexport interface RequestMessage {\n type: 'request'\n id: string\n method: RequestMethod\n payload: unknown\n}\n\nexport type RequestMethod =\n | 'network.fetch'\n | 'network.fetch-stream'\n | 'settings.getAll'\n | 'settings.get'\n | 'settings.set'\n | 'user.getProfile'\n | 'user.listIds'\n | 'events.emit'\n | 'scheduler.schedule'\n | 'scheduler.cancel'\n | 'scheduler.reportFireResult'\n | 'chat.appendInstruction'\n | 'database.execute'\n // Simple key-value storage methods\n | 'storage.set'\n | 'storage.keys'\n | 'storage.setForUser'\n | 'storage.keysForUser'\n // Collection-based storage methods\n | 'storage.put'\n | 'storage.get'\n | 'storage.delete'\n | 'storage.find'\n | 'storage.findOne'\n | 'storage.count'\n | 'storage.putMany'\n | 'storage.deleteMany'\n | 'storage.dropCollection'\n | 'storage.listCollections'\n | 'storage.putForUser'\n | 'storage.getForUser'\n | 'storage.deleteForUser'\n | 'storage.findForUser'\n | 'storage.findOneForUser'\n | 'storage.countForUser'\n | 'storage.putManyForUser'\n | 'storage.deleteManyForUser'\n | 'storage.dropCollectionForUser'\n | 'storage.listCollectionsForUser'\n // Secrets methods\n | 'secrets.set'\n | 'secrets.get'\n | 'secrets.delete'\n | 'secrets.list'\n | 'secrets.setForUser'\n | 'secrets.getForUser'\n | 'secrets.deleteForUser'\n | 'secrets.listForUser'\n // Tools cross-extension methods\n | 'tools.list'\n | 'tools.execute'\n // Attachments\n | 'attachments.read'\n // Connected accounts\n | 'accounts.list'\n | 'accounts.getAccessToken'\n\nexport interface ProviderRegisteredMessage {\n type: 'provider-registered'\n payload: {\n id: string\n name: string\n }\n}\n\nexport interface ToolRegisteredMessage {\n type: 'tool-registered'\n payload: {\n id: string\n name: string\n description: string\n parameters?: Record<string, unknown>\n }\n}\n\nexport interface ActionRegisteredMessage {\n type: 'action-registered'\n payload: {\n id: string\n }\n}\n\nexport interface StreamEventMessage {\n type: 'stream-event'\n payload: {\n requestId: string\n event: StreamEvent\n }\n}\n\nexport interface ProviderModelsResponseMessage {\n type: 'provider-models-response'\n payload: {\n requestId: string\n models: ModelInfo[]\n error?: string\n }\n}\n\nexport interface ProviderVoiceSessionResponseMessage {\n type: 'provider-voice-session-response'\n payload: {\n requestId: string\n /** Absent when `error` is set. */\n descriptor?: VoiceSessionDescriptor\n error?: string\n }\n}\n\nexport interface ToolExecuteResponseMessage {\n type: 'tool-execute-response'\n payload: {\n requestId: string\n result: ToolResult\n error?: string\n }\n}\n\nexport interface ActionExecuteResponseMessage {\n type: 'action-execute-response'\n payload: {\n requestId: string\n result: ActionResult\n error?: string\n }\n}\n\nexport interface LogMessage {\n type: 'log'\n payload: {\n level: 'debug' | 'info' | 'warn' | 'error'\n message: string\n data?: Record<string, unknown>\n }\n}\n\n/**\n * Message sent from worker to host when a background task is registered.\n */\nexport interface BackgroundTaskRegisteredMessage {\n type: 'background-task-registered'\n payload: {\n taskId: string\n name: string\n userId: string\n restartPolicy: {\n type: 'always' | 'on-failure' | 'never'\n maxRestarts?: number\n initialDelayMs?: number\n maxDelayMs?: number\n backoffMultiplier?: number\n }\n payload?: Record<string, unknown>\n }\n}\n\n/**\n * Message sent from worker to host with background task status updates.\n */\nexport interface BackgroundTaskStatusMessage {\n type: 'background-task-status'\n payload: {\n taskId: string\n status: 'running' | 'stopped' | 'completed' | 'failed'\n error?: string\n }\n}\n\n/**\n * Message sent from worker to host with background task health reports.\n */\nexport interface BackgroundTaskHealthMessage {\n type: 'background-task-health'\n payload: {\n taskId: string\n status: string\n timestamp: string\n }\n}\n\n// ============================================================================\n// Utility Types\n// ============================================================================\n\nexport interface PendingRequest<T = unknown> {\n resolve: (value: T) => void\n reject: (error: Error) => void\n timeout: ReturnType<typeof setTimeout>\n}\n\n/**\n * Generate a unique message ID\n */\nexport function generateMessageId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4BO,SAAS,uBACd,OACA,MACA,eAAe,MACP;AACR,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO,MAAM,IAAI,KAAK,MAAM,YAAY,KAAK,OAAO,OAAO,KAAK,EAAE,CAAC,KAAK;AAC1E;;;ACkXO,SAAS,oBAA4B;AAC1C,SAAO,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACjE;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/types.localization.ts","../src/messages.ts"],"sourcesContent":["/**\n * @stina/extension-api\n *\n * Types and utilities for building Stina extensions.\n *\n * Extensions should import from this package for type definitions.\n * The runtime (worker-side code) should import from '@stina/extension-api/runtime'.\n */\n\n// Localization\nexport type { LocalizedString } from './types.js'\nexport { resolveLocalizedString } from './types.js'\n\n// Types\nexport type {\n // Manifest\n ExtensionManifest,\n Platform,\n ExtensionContributions,\n ToolSettingsViewDefinition,\n ToolSettingsView,\n ToolSettingsListView,\n ToolSettingsListMapping,\n ToolSettingsComponentView,\n ToolSettingsActionDataSource,\n PanelDefinition,\n StatusCardDefinition,\n PanelView,\n PanelComponentView,\n PanelActionDataSource,\n PanelUnknownView,\n ProviderDefinition,\n ProviderConfigView,\n PromptContribution,\n PromptSection,\n ToolDefinition,\n ToolConfirmationConfig,\n CommandDefinition,\n AccountProvider,\n AccountContribution,\n\n // Permissions\n Permission,\n NetworkPermission,\n StoragePermission,\n UserDataPermission,\n CapabilityPermission,\n SystemPermission,\n\n // Context\n ExtensionContext,\n Disposable,\n NetworkAPI,\n SettingsAPI,\n ProvidersAPI,\n ToolsAPI,\n ActionsAPI,\n EventsAPI,\n SchedulerAPI,\n SchedulerJobRequest,\n SchedulerSchedule,\n SchedulerFirePayload,\n UserAPI,\n UserProfile,\n ChatAPI,\n ChatInstructionMessage,\n ConversationPresentation,\n AttachmentsAPI,\n AttachmentContent,\n ConnectedAccountsAPI,\n ConnectedAccount,\n AccountAccessToken,\n LogAPI,\n\n // Background workers\n BackgroundWorkersAPI,\n BackgroundTaskConfig,\n BackgroundTaskCallback,\n BackgroundTaskContext,\n BackgroundTaskHealth,\n BackgroundRestartPolicy,\n\n // Storage and Secrets\n Query,\n QueryOptions,\n StorageAPI,\n SecretsAPI,\n StorageCollectionConfig,\n StorageContributions,\n\n // AI Provider\n AIProvider,\n ModelInfo,\n ModelCapabilities,\n ChatMessage,\n ChatImage,\n ChatFile,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolCall,\n\n // Duplex voice\n VoiceSessionOptions,\n VoiceSessionDescriptor,\n VoiceTransportRequest,\n\n // Tools\n Tool,\n ToolResult,\n ToolAttachment,\n\n // Actions\n Action,\n ActionResult,\n\n // Entry point\n ExtensionModule,\n} from './types.js'\n\n// Messages (for host implementation)\nexport type {\n HostToWorkerMessage,\n WorkerToHostMessage,\n ActivateMessage,\n DeactivateMessage,\n SettingsChangedMessage,\n ProviderChatRequestMessage,\n ProviderModelsRequestMessage,\n ToolExecuteRequestMessage,\n ToolExecuteResponseMessage,\n ActionExecuteRequestMessage,\n ActionExecuteResponseMessage,\n ResponseMessage,\n ReadyMessage,\n RequestMessage,\n RequestMethod,\n ProviderRegisteredMessage,\n ToolRegisteredMessage,\n ActionRegisteredMessage,\n StreamEventMessage,\n LogMessage,\n PendingRequest,\n // Background task messages\n BackgroundTaskStartMessage,\n BackgroundTaskStopMessage,\n BackgroundTaskRegisteredMessage,\n BackgroundTaskStatusMessage,\n BackgroundTaskHealthMessage,\n} from './messages.js'\n\nexport { generateMessageId } from './messages.js'\n\n// Component types (for extension UI components)\nexport type {\n // Icon Names\n HugeIconName,\n // Styling\n AllowedCSSProperty,\n ExtensionComponentStyle,\n // Base types\n ExtensionComponentData,\n // Iteration & Children\n ExtensionComponentIterator,\n ExtensionComponentChildren,\n // Actions\n ExtensionActionCall,\n ExtensionActionRef,\n // Data Sources & Panel Definition\n ExtensionDataSource,\n ExtensionPanelDefinition,\n // Component Props\n HeaderProps,\n LabelProps,\n ClockProps,\n ParagraphProps,\n ButtonProps,\n TextInputProps,\n PasswordInputProps,\n NumberInputProps,\n TextAreaProps,\n DateTimeInputProps,\n SelectProps,\n IconPickerProps,\n VerticalStackProps,\n HorizontalStackProps,\n GridProps,\n DividerProps,\n IconProps,\n IconButtonType,\n IconButtonProps,\n PanelAction,\n PanelProps,\n ToggleProps,\n CollapsibleProps,\n FrameVariant,\n FrameProps,\n ListProps,\n PillVariant,\n PillProps,\n CheckboxProps,\n MarkdownProps,\n TextPreviewProps,\n ModalProps,\n ConditionalGroupProps,\n // Purpose-built display components\n WeatherCondition,\n WeatherWind,\n WeatherNowProps,\n WeatherForecastStep,\n WeatherForecastProps,\n ChartKind,\n ChartSeries,\n ChartProps,\n StatTrend,\n StatTileProps,\n ProgressShape,\n ProgressColor,\n ProgressBarProps,\n KeyValueRow,\n KeyValueListProps,\n TimelineVariant,\n TimelineEntry,\n TimelineProps,\n NoteVariant,\n NoteProps,\n CalendarEventStatus,\n CalendarEventProps,\n AgendaEvent,\n AgendaDay,\n AgendaProps,\n} from './types.components.js'\n","/**\n * Localization Types\n *\n * Types and utilities for localized strings in extensions.\n */\n\n/**\n * A string that can be either a simple string or a map of language codes to localized strings.\n * When a simple string is provided, it's used as the default/fallback value.\n * When a map is provided, the appropriate language is selected at runtime.\n *\n * @example\n * // Simple string (backwards compatible)\n * name: \"Get Weather\"\n *\n * @example\n * // Localized strings\n * name: { en: \"Get Weather\", sv: \"Hämta väder\", de: \"Wetter abrufen\" }\n */\nexport type LocalizedString = string | Record<string, string>\n\n/**\n * Resolves a LocalizedString to an actual string value.\n * @param value The LocalizedString to resolve\n * @param lang The preferred language code (e.g., \"sv\", \"en\")\n * @param fallbackLang The fallback language code (defaults to \"en\")\n * @returns The resolved string value\n */\nexport function resolveLocalizedString(\n value: LocalizedString,\n lang: string,\n fallbackLang = 'en'\n): string {\n if (typeof value === 'string') {\n return value\n }\n // Try preferred language first, then fallback language, then first available, then empty string\n return value[lang] ?? value[fallbackLang] ?? Object.values(value)[0] ?? ''\n}\n","/**\n * Message protocol between Extension Host and Extension Workers\n */\n\nimport type {\n ChatMessage,\n ChatOptions,\n GetModelsOptions,\n StreamEvent,\n ToolResult,\n ActionResult,\n ModelInfo,\n SchedulerFirePayload,\n VoiceSessionOptions,\n VoiceSessionDescriptor,\n} from './types.js'\n\n// ============================================================================\n// Host → Worker Messages\n// ============================================================================\n\nexport type HostToWorkerMessage =\n | ActivateMessage\n | DeactivateMessage\n | SettingsChangedMessage\n | SchedulerFireMessage\n | ProviderChatRequestMessage\n | ProviderModelsRequestMessage\n | ProviderVoiceSessionRequestMessage\n | ToolExecuteRequestMessage\n | ActionExecuteRequestMessage\n | ResponseMessage\n | StreamingFetchChunkMessage\n | BackgroundTaskStartMessage\n | BackgroundTaskStopMessage\n\nexport interface ActivateMessage {\n type: 'activate'\n id: string\n payload: {\n extensionId: string\n extensionVersion: string\n storagePath: string\n permissions: string[]\n settings: Record<string, unknown>\n }\n}\n\nexport interface DeactivateMessage {\n type: 'deactivate'\n id: string\n}\n\nexport interface SettingsChangedMessage {\n type: 'settings-changed'\n id: string\n payload: {\n key: string\n value: unknown\n }\n}\n\nexport interface SchedulerFireMessage {\n type: 'scheduler-fire'\n id: string\n payload: SchedulerFirePayload\n}\n\nexport interface ProviderChatRequestMessage {\n type: 'provider-chat-request'\n id: string\n payload: {\n providerId: string\n messages: ChatMessage[]\n options: ChatOptions\n }\n}\n\nexport interface ProviderModelsRequestMessage {\n type: 'provider-models-request'\n id: string\n payload: {\n providerId: string\n options?: GetModelsOptions\n }\n}\n\nexport interface ProviderVoiceSessionRequestMessage {\n type: 'provider-voice-session-request'\n id: string\n payload: {\n providerId: string\n /**\n * `signal` is dropped on the way across: an AbortSignal cannot be\n * structured-cloned into a worker. Cancellation is handled by the host\n * rejecting the pending request instead.\n */\n options: Omit<VoiceSessionOptions, 'signal'>\n }\n}\n\nexport interface ToolExecuteRequestMessage {\n type: 'tool-execute-request'\n id: string\n payload: {\n toolId: string\n params: Record<string, unknown>\n /** User ID if the tool is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ActionExecuteRequestMessage {\n type: 'action-execute-request'\n id: string\n payload: {\n actionId: string\n params: Record<string, unknown>\n /** User ID if the action is executed in a user context */\n userId?: string\n }\n}\n\nexport interface ResponseMessage {\n type: 'response'\n id: string\n payload: {\n requestId: string\n success: boolean\n data?: unknown\n error?: string\n }\n}\n\n/**\n * Message sent from host to worker with streaming fetch data chunks.\n * Used for streaming network responses (e.g., NDJSON streams from Ollama).\n */\nexport interface StreamingFetchChunkMessage {\n type: 'streaming-fetch-chunk'\n id: string\n payload: {\n requestId: string\n chunk: string\n done: boolean\n error?: string\n }\n}\n\n/**\n * Message sent from host to worker to start a registered background task.\n */\nexport interface BackgroundTaskStartMessage {\n type: 'background-task-start'\n id: string\n payload: {\n taskId: string\n }\n}\n\n/**\n * Message sent from host to worker to stop a running background task.\n */\nexport interface BackgroundTaskStopMessage {\n type: 'background-task-stop'\n id: string\n payload: {\n taskId: string\n }\n}\n\n// ============================================================================\n// Worker → Host Messages\n// ============================================================================\n\nexport type WorkerToHostMessage =\n | ReadyMessage\n | RequestMessage\n | ProviderRegisteredMessage\n | ToolRegisteredMessage\n | ActionRegisteredMessage\n | StreamEventMessage\n | LogMessage\n | ProviderModelsResponseMessage\n | ProviderVoiceSessionResponseMessage\n | ToolExecuteResponseMessage\n | ActionExecuteResponseMessage\n | StreamingFetchAckMessage\n | BackgroundTaskRegisteredMessage\n | BackgroundTaskStatusMessage\n | BackgroundTaskHealthMessage\n\nexport interface ReadyMessage {\n type: 'ready'\n}\n\n/**\n * Message sent from worker to host to acknowledge receipt of a streaming fetch chunk.\n * This enables backpressure control to prevent unbounded memory growth.\n */\nexport interface StreamingFetchAckMessage {\n type: 'streaming-fetch-ack'\n payload: {\n requestId: string\n }\n}\n\nexport interface RequestMessage {\n type: 'request'\n id: string\n method: RequestMethod\n payload: unknown\n}\n\nexport type RequestMethod =\n | 'network.fetch'\n | 'network.fetch-stream'\n | 'settings.getAll'\n | 'settings.get'\n | 'settings.set'\n | 'user.getProfile'\n | 'user.listIds'\n | 'events.emit'\n | 'scheduler.schedule'\n | 'scheduler.cancel'\n | 'scheduler.reportFireResult'\n | 'chat.appendInstruction'\n | 'database.execute'\n // Simple key-value storage methods\n | 'storage.set'\n | 'storage.keys'\n | 'storage.setForUser'\n | 'storage.keysForUser'\n // Collection-based storage methods\n | 'storage.put'\n | 'storage.get'\n | 'storage.delete'\n | 'storage.find'\n | 'storage.findOne'\n | 'storage.count'\n | 'storage.putMany'\n | 'storage.deleteMany'\n | 'storage.dropCollection'\n | 'storage.listCollections'\n | 'storage.putForUser'\n | 'storage.getForUser'\n | 'storage.deleteForUser'\n | 'storage.findForUser'\n | 'storage.findOneForUser'\n | 'storage.countForUser'\n | 'storage.putManyForUser'\n | 'storage.deleteManyForUser'\n | 'storage.dropCollectionForUser'\n | 'storage.listCollectionsForUser'\n // Secrets methods\n | 'secrets.set'\n | 'secrets.get'\n | 'secrets.delete'\n | 'secrets.list'\n | 'secrets.setForUser'\n | 'secrets.getForUser'\n | 'secrets.deleteForUser'\n | 'secrets.listForUser'\n // Tools cross-extension methods\n | 'tools.list'\n | 'tools.execute'\n // Attachments\n | 'attachments.read'\n // Connected accounts\n | 'accounts.list'\n | 'accounts.getAccessToken'\n\nexport interface ProviderRegisteredMessage {\n type: 'provider-registered'\n payload: {\n id: string\n name: string\n }\n}\n\nexport interface ToolRegisteredMessage {\n type: 'tool-registered'\n payload: {\n id: string\n name: string\n description: string\n parameters?: Record<string, unknown>\n }\n}\n\nexport interface ActionRegisteredMessage {\n type: 'action-registered'\n payload: {\n id: string\n }\n}\n\nexport interface StreamEventMessage {\n type: 'stream-event'\n payload: {\n requestId: string\n event: StreamEvent\n }\n}\n\nexport interface ProviderModelsResponseMessage {\n type: 'provider-models-response'\n payload: {\n requestId: string\n models: ModelInfo[]\n error?: string\n }\n}\n\nexport interface ProviderVoiceSessionResponseMessage {\n type: 'provider-voice-session-response'\n payload: {\n requestId: string\n /** Absent when `error` is set. */\n descriptor?: VoiceSessionDescriptor\n error?: string\n }\n}\n\nexport interface ToolExecuteResponseMessage {\n type: 'tool-execute-response'\n payload: {\n requestId: string\n result: ToolResult\n error?: string\n }\n}\n\nexport interface ActionExecuteResponseMessage {\n type: 'action-execute-response'\n payload: {\n requestId: string\n result: ActionResult\n error?: string\n }\n}\n\nexport interface LogMessage {\n type: 'log'\n payload: {\n level: 'debug' | 'info' | 'warn' | 'error'\n message: string\n data?: Record<string, unknown>\n }\n}\n\n/**\n * Message sent from worker to host when a background task is registered.\n */\nexport interface BackgroundTaskRegisteredMessage {\n type: 'background-task-registered'\n payload: {\n taskId: string\n name: string\n userId: string\n restartPolicy: {\n type: 'always' | 'on-failure' | 'never'\n maxRestarts?: number\n initialDelayMs?: number\n maxDelayMs?: number\n backoffMultiplier?: number\n }\n payload?: Record<string, unknown>\n }\n}\n\n/**\n * Message sent from worker to host with background task status updates.\n */\nexport interface BackgroundTaskStatusMessage {\n type: 'background-task-status'\n payload: {\n taskId: string\n status: 'running' | 'stopped' | 'completed' | 'failed'\n error?: string\n }\n}\n\n/**\n * Message sent from worker to host with background task health reports.\n */\nexport interface BackgroundTaskHealthMessage {\n type: 'background-task-health'\n payload: {\n taskId: string\n status: string\n timestamp: string\n }\n}\n\n// ============================================================================\n// Utility Types\n// ============================================================================\n\nexport interface PendingRequest<T = unknown> {\n resolve: (value: T) => void\n reject: (error: Error) => void\n timeout: ReturnType<typeof setTimeout>\n}\n\n/**\n * Generate a unique message ID\n */\nexport function generateMessageId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC4BO,SAAS,uBACd,OACA,MACA,eAAe,MACP;AACR,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AAEA,SAAO,MAAM,IAAI,KAAK,MAAM,YAAY,KAAK,OAAO,OAAO,KAAK,EAAE,CAAC,KAAK;AAC1E;;;ACkXO,SAAS,oBAA4B;AAC1C,SAAO,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACjE;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HugeIconName, E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, V as VoiceSessionOptions, b as StreamEvent, M as ModelInfo, c as VoiceSessionDescriptor, T as ToolResult, A as ActionResult } from './types.tools-DcFBsfRV.cjs';
2
- export { af as AIProvider, a1 as AccountAccessToken, x as AccountContribution, w as AccountProvider, an as Action, I as ActionsAPI, ap as AllowedCSSProperty, _ as AttachmentContent, Z as AttachmentsAPI, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, aC as ButtonProps, bo as CalendarEventProps, bn as CalendarEventStatus, b8 as ChartKind, ba as ChartProps, b9 as ChartSeries, W as ChatAPI, ai as ChatFile, ah as ChatImage, X as ChatInstructionMessage, a_ as CheckboxProps, aA as ClockProps, aU as CollapsibleProps, v as CommandDefinition, b2 as ConditionalGroupProps, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, Y as ConversationPresentation, aH as DateTimeInputProps, D as Disposable, aN as DividerProps, J as EventsAPI, au as ExtensionActionCall, av as ExtensionActionRef, at as ExtensionComponentChildren, ar as ExtensionComponentData, as as ExtensionComponentIterator, aq as ExtensionComponentStyle, y as ExtensionContext, aw as ExtensionDataSource, ao as ExtensionModule, ax as ExtensionPanelDefinition, aW as FrameProps, aV as FrameVariant, aM as GridProps, ay as HeaderProps, aL as HorizontalStackProps, aQ as IconButtonProps, aP as IconButtonType, aJ as IconPickerProps, aO as IconProps, bh as KeyValueListProps, bg as KeyValueRow, az as LabelProps, aX as ListProps, L as LocalizedString, a2 as LogAPI, a$ as MarkdownProps, b1 as ModalProps, ag as ModelCapabilities, N as NetworkAPI, bm as NoteProps, bl as NoteVariant, aF as NumberInputProps, aR as PanelAction, m as PanelActionDataSource, l as PanelComponentView, P as PanelDefinition, aS as PanelProps, n as PanelUnknownView, k as PanelView, aB as ParagraphProps, aE as PasswordInputProps, aZ as PillProps, aY as PillVariant, bf as ProgressBarProps, be as ProgressColor, bd as ProgressShape, q as PromptContribution, s as PromptSection, p as ProviderConfigView, o as ProviderDefinition, B as ProvidersAPI, a9 as Query, aa as QueryOptions, K as SchedulerAPI, O as SchedulerJobRequest, Q as SchedulerSchedule, ac as SecretsAPI, aI as SelectProps, z as SettingsAPI, bc as StatTileProps, bb as StatTrend, j as StatusCardDefinition, ab as StorageAPI, ad as StorageCollectionConfig, ae as StorageContributions, aG as TextAreaProps, aD as TextInputProps, b0 as TextPreviewProps, bj as TimelineEntry, bk as TimelineProps, bi as TimelineVariant, aT as ToggleProps, al as Tool, am as ToolAttachment, aj as ToolCall, u as ToolConfirmationConfig, t as ToolDefinition, i as ToolSettingsActionDataSource, h as ToolSettingsComponentView, g as ToolSettingsListMapping, f as ToolSettingsListView, e as ToolSettingsView, d as ToolSettingsViewDefinition, F as ToolsAPI, U as UserAPI, R as UserProfile, aK as VerticalStackProps, ak as VoiceTransportRequest, b3 as WeatherCondition, b7 as WeatherForecastProps, b6 as WeatherForecastStep, b5 as WeatherNowProps, b4 as WeatherWind, r as resolveLocalizedString } from './types.tools-DcFBsfRV.cjs';
1
+ import { H as HugeIconName, E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, V as VoiceSessionOptions, b as StreamEvent, M as ModelInfo, c as VoiceSessionDescriptor, T as ToolResult, A as ActionResult } from './types.tools-CK0As7KV.cjs';
2
+ export { af as AIProvider, a1 as AccountAccessToken, x as AccountContribution, w as AccountProvider, an as Action, I as ActionsAPI, bq as AgendaDay, bp as AgendaEvent, br as AgendaProps, ap as AllowedCSSProperty, _ as AttachmentContent, Z as AttachmentsAPI, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, aC as ButtonProps, bo as CalendarEventProps, bn as CalendarEventStatus, b8 as ChartKind, ba as ChartProps, b9 as ChartSeries, W as ChatAPI, ai as ChatFile, ah as ChatImage, X as ChatInstructionMessage, a_ as CheckboxProps, aA as ClockProps, aU as CollapsibleProps, v as CommandDefinition, b2 as ConditionalGroupProps, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, Y as ConversationPresentation, aH as DateTimeInputProps, D as Disposable, aN as DividerProps, J as EventsAPI, au as ExtensionActionCall, av as ExtensionActionRef, at as ExtensionComponentChildren, ar as ExtensionComponentData, as as ExtensionComponentIterator, aq as ExtensionComponentStyle, y as ExtensionContext, aw as ExtensionDataSource, ao as ExtensionModule, ax as ExtensionPanelDefinition, aW as FrameProps, aV as FrameVariant, aM as GridProps, ay as HeaderProps, aL as HorizontalStackProps, aQ as IconButtonProps, aP as IconButtonType, aJ as IconPickerProps, aO as IconProps, bh as KeyValueListProps, bg as KeyValueRow, az as LabelProps, aX as ListProps, L as LocalizedString, a2 as LogAPI, a$ as MarkdownProps, b1 as ModalProps, ag as ModelCapabilities, N as NetworkAPI, bm as NoteProps, bl as NoteVariant, aF as NumberInputProps, aR as PanelAction, m as PanelActionDataSource, l as PanelComponentView, P as PanelDefinition, aS as PanelProps, n as PanelUnknownView, k as PanelView, aB as ParagraphProps, aE as PasswordInputProps, aZ as PillProps, aY as PillVariant, bf as ProgressBarProps, be as ProgressColor, bd as ProgressShape, q as PromptContribution, s as PromptSection, p as ProviderConfigView, o as ProviderDefinition, B as ProvidersAPI, a9 as Query, aa as QueryOptions, K as SchedulerAPI, O as SchedulerJobRequest, Q as SchedulerSchedule, ac as SecretsAPI, aI as SelectProps, z as SettingsAPI, bc as StatTileProps, bb as StatTrend, j as StatusCardDefinition, ab as StorageAPI, ad as StorageCollectionConfig, ae as StorageContributions, aG as TextAreaProps, aD as TextInputProps, b0 as TextPreviewProps, bj as TimelineEntry, bk as TimelineProps, bi as TimelineVariant, aT as ToggleProps, al as Tool, am as ToolAttachment, aj as ToolCall, u as ToolConfirmationConfig, t as ToolDefinition, i as ToolSettingsActionDataSource, h as ToolSettingsComponentView, g as ToolSettingsListMapping, f as ToolSettingsListView, e as ToolSettingsView, d as ToolSettingsViewDefinition, F as ToolsAPI, U as UserAPI, R as UserProfile, aK as VerticalStackProps, ak as VoiceTransportRequest, b3 as WeatherCondition, b7 as WeatherForecastProps, b6 as WeatherForecastStep, b5 as WeatherNowProps, b4 as WeatherWind, r as resolveLocalizedString } from './types.tools-CK0As7KV.cjs';
3
3
 
4
4
  /**
5
5
  * Permission Types
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HugeIconName, E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, V as VoiceSessionOptions, b as StreamEvent, M as ModelInfo, c as VoiceSessionDescriptor, T as ToolResult, A as ActionResult } from './types.tools-DcFBsfRV.js';
2
- export { af as AIProvider, a1 as AccountAccessToken, x as AccountContribution, w as AccountProvider, an as Action, I as ActionsAPI, ap as AllowedCSSProperty, _ as AttachmentContent, Z as AttachmentsAPI, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, aC as ButtonProps, bo as CalendarEventProps, bn as CalendarEventStatus, b8 as ChartKind, ba as ChartProps, b9 as ChartSeries, W as ChatAPI, ai as ChatFile, ah as ChatImage, X as ChatInstructionMessage, a_ as CheckboxProps, aA as ClockProps, aU as CollapsibleProps, v as CommandDefinition, b2 as ConditionalGroupProps, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, Y as ConversationPresentation, aH as DateTimeInputProps, D as Disposable, aN as DividerProps, J as EventsAPI, au as ExtensionActionCall, av as ExtensionActionRef, at as ExtensionComponentChildren, ar as ExtensionComponentData, as as ExtensionComponentIterator, aq as ExtensionComponentStyle, y as ExtensionContext, aw as ExtensionDataSource, ao as ExtensionModule, ax as ExtensionPanelDefinition, aW as FrameProps, aV as FrameVariant, aM as GridProps, ay as HeaderProps, aL as HorizontalStackProps, aQ as IconButtonProps, aP as IconButtonType, aJ as IconPickerProps, aO as IconProps, bh as KeyValueListProps, bg as KeyValueRow, az as LabelProps, aX as ListProps, L as LocalizedString, a2 as LogAPI, a$ as MarkdownProps, b1 as ModalProps, ag as ModelCapabilities, N as NetworkAPI, bm as NoteProps, bl as NoteVariant, aF as NumberInputProps, aR as PanelAction, m as PanelActionDataSource, l as PanelComponentView, P as PanelDefinition, aS as PanelProps, n as PanelUnknownView, k as PanelView, aB as ParagraphProps, aE as PasswordInputProps, aZ as PillProps, aY as PillVariant, bf as ProgressBarProps, be as ProgressColor, bd as ProgressShape, q as PromptContribution, s as PromptSection, p as ProviderConfigView, o as ProviderDefinition, B as ProvidersAPI, a9 as Query, aa as QueryOptions, K as SchedulerAPI, O as SchedulerJobRequest, Q as SchedulerSchedule, ac as SecretsAPI, aI as SelectProps, z as SettingsAPI, bc as StatTileProps, bb as StatTrend, j as StatusCardDefinition, ab as StorageAPI, ad as StorageCollectionConfig, ae as StorageContributions, aG as TextAreaProps, aD as TextInputProps, b0 as TextPreviewProps, bj as TimelineEntry, bk as TimelineProps, bi as TimelineVariant, aT as ToggleProps, al as Tool, am as ToolAttachment, aj as ToolCall, u as ToolConfirmationConfig, t as ToolDefinition, i as ToolSettingsActionDataSource, h as ToolSettingsComponentView, g as ToolSettingsListMapping, f as ToolSettingsListView, e as ToolSettingsView, d as ToolSettingsViewDefinition, F as ToolsAPI, U as UserAPI, R as UserProfile, aK as VerticalStackProps, ak as VoiceTransportRequest, b3 as WeatherCondition, b7 as WeatherForecastProps, b6 as WeatherForecastStep, b5 as WeatherNowProps, b4 as WeatherWind, r as resolveLocalizedString } from './types.tools-DcFBsfRV.js';
1
+ import { H as HugeIconName, E as ExtensionContributions, S as SchedulerFirePayload, C as ChatMessage, a as ChatOptions, G as GetModelsOptions, V as VoiceSessionOptions, b as StreamEvent, M as ModelInfo, c as VoiceSessionDescriptor, T as ToolResult, A as ActionResult } from './types.tools-CK0As7KV.js';
2
+ export { af as AIProvider, a1 as AccountAccessToken, x as AccountContribution, w as AccountProvider, an as Action, I as ActionsAPI, bq as AgendaDay, bp as AgendaEvent, br as AgendaProps, ap as AllowedCSSProperty, _ as AttachmentContent, Z as AttachmentsAPI, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, aC as ButtonProps, bo as CalendarEventProps, bn as CalendarEventStatus, b8 as ChartKind, ba as ChartProps, b9 as ChartSeries, W as ChatAPI, ai as ChatFile, ah as ChatImage, X as ChatInstructionMessage, a_ as CheckboxProps, aA as ClockProps, aU as CollapsibleProps, v as CommandDefinition, b2 as ConditionalGroupProps, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, Y as ConversationPresentation, aH as DateTimeInputProps, D as Disposable, aN as DividerProps, J as EventsAPI, au as ExtensionActionCall, av as ExtensionActionRef, at as ExtensionComponentChildren, ar as ExtensionComponentData, as as ExtensionComponentIterator, aq as ExtensionComponentStyle, y as ExtensionContext, aw as ExtensionDataSource, ao as ExtensionModule, ax as ExtensionPanelDefinition, aW as FrameProps, aV as FrameVariant, aM as GridProps, ay as HeaderProps, aL as HorizontalStackProps, aQ as IconButtonProps, aP as IconButtonType, aJ as IconPickerProps, aO as IconProps, bh as KeyValueListProps, bg as KeyValueRow, az as LabelProps, aX as ListProps, L as LocalizedString, a2 as LogAPI, a$ as MarkdownProps, b1 as ModalProps, ag as ModelCapabilities, N as NetworkAPI, bm as NoteProps, bl as NoteVariant, aF as NumberInputProps, aR as PanelAction, m as PanelActionDataSource, l as PanelComponentView, P as PanelDefinition, aS as PanelProps, n as PanelUnknownView, k as PanelView, aB as ParagraphProps, aE as PasswordInputProps, aZ as PillProps, aY as PillVariant, bf as ProgressBarProps, be as ProgressColor, bd as ProgressShape, q as PromptContribution, s as PromptSection, p as ProviderConfigView, o as ProviderDefinition, B as ProvidersAPI, a9 as Query, aa as QueryOptions, K as SchedulerAPI, O as SchedulerJobRequest, Q as SchedulerSchedule, ac as SecretsAPI, aI as SelectProps, z as SettingsAPI, bc as StatTileProps, bb as StatTrend, j as StatusCardDefinition, ab as StorageAPI, ad as StorageCollectionConfig, ae as StorageContributions, aG as TextAreaProps, aD as TextInputProps, b0 as TextPreviewProps, bj as TimelineEntry, bk as TimelineProps, bi as TimelineVariant, aT as ToggleProps, al as Tool, am as ToolAttachment, aj as ToolCall, u as ToolConfirmationConfig, t as ToolDefinition, i as ToolSettingsActionDataSource, h as ToolSettingsComponentView, g as ToolSettingsListMapping, f as ToolSettingsListView, e as ToolSettingsView, d as ToolSettingsViewDefinition, F as ToolsAPI, U as UserAPI, R as UserProfile, aK as VerticalStackProps, ak as VoiceTransportRequest, b3 as WeatherCondition, b7 as WeatherForecastProps, b6 as WeatherForecastStep, b5 as WeatherNowProps, b4 as WeatherWind, r as resolveLocalizedString } from './types.tools-CK0As7KV.js';
3
3
 
4
4
  /**
5
5
  * Permission Types
@@ -1,5 +1,5 @@
1
- import { ao as ExtensionModule } from './types.tools-DcFBsfRV.cjs';
2
- export { af as AIProvider, a1 as AccountAccessToken, an as Action, A as ActionResult, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, ai as ChatFile, ah as ChatImage, C as ChatMessage, a as ChatOptions, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, D as Disposable, bp as ExecutionContext, y as ExtensionContext, G as GetModelsOptions, ag as ModelCapabilities, M as ModelInfo, a9 as Query, aa as QueryOptions, ac as SecretsAPI, ab as StorageAPI, b as StreamEvent, al as Tool, am as ToolAttachment, aj as ToolCall, t as ToolDefinition, T as ToolResult, c as VoiceSessionDescriptor, V as VoiceSessionOptions, ak as VoiceTransportRequest } from './types.tools-DcFBsfRV.cjs';
1
+ import { ao as ExtensionModule } from './types.tools-CK0As7KV.cjs';
2
+ export { af as AIProvider, a1 as AccountAccessToken, an as Action, A as ActionResult, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, ai as ChatFile, ah as ChatImage, C as ChatMessage, a as ChatOptions, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, D as Disposable, bs as ExecutionContext, y as ExtensionContext, G as GetModelsOptions, ag as ModelCapabilities, M as ModelInfo, a9 as Query, aa as QueryOptions, ac as SecretsAPI, ab as StorageAPI, b as StreamEvent, al as Tool, am as ToolAttachment, aj as ToolCall, t as ToolDefinition, T as ToolResult, c as VoiceSessionDescriptor, V as VoiceSessionOptions, ak as VoiceTransportRequest } from './types.tools-CK0As7KV.cjs';
3
3
 
4
4
  /**
5
5
  * Extension Runtime - Runs inside the worker
package/dist/runtime.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ao as ExtensionModule } from './types.tools-DcFBsfRV.js';
2
- export { af as AIProvider, a1 as AccountAccessToken, an as Action, A as ActionResult, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, ai as ChatFile, ah as ChatImage, C as ChatMessage, a as ChatOptions, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, D as Disposable, bp as ExecutionContext, y as ExtensionContext, G as GetModelsOptions, ag as ModelCapabilities, M as ModelInfo, a9 as Query, aa as QueryOptions, ac as SecretsAPI, ab as StorageAPI, b as StreamEvent, al as Tool, am as ToolAttachment, aj as ToolCall, t as ToolDefinition, T as ToolResult, c as VoiceSessionDescriptor, V as VoiceSessionOptions, ak as VoiceTransportRequest } from './types.tools-DcFBsfRV.js';
1
+ import { ao as ExtensionModule } from './types.tools-CK0As7KV.js';
2
+ export { af as AIProvider, a1 as AccountAccessToken, an as Action, A as ActionResult, a8 as BackgroundRestartPolicy, a5 as BackgroundTaskCallback, a4 as BackgroundTaskConfig, a6 as BackgroundTaskContext, a7 as BackgroundTaskHealth, a3 as BackgroundWorkersAPI, ai as ChatFile, ah as ChatImage, C as ChatMessage, a as ChatOptions, a0 as ConnectedAccount, $ as ConnectedAccountsAPI, D as Disposable, bs as ExecutionContext, y as ExtensionContext, G as GetModelsOptions, ag as ModelCapabilities, M as ModelInfo, a9 as Query, aa as QueryOptions, ac as SecretsAPI, ab as StorageAPI, b as StreamEvent, al as Tool, am as ToolAttachment, aj as ToolCall, t as ToolDefinition, T as ToolResult, c as VoiceSessionDescriptor, V as VoiceSessionOptions, ak as VoiceTransportRequest } from './types.tools-CK0As7KV.js';
3
3
 
4
4
  /**
5
5
  * Extension Runtime - Runs inside the worker
@@ -22,6 +22,9 @@ var schemas_exports = {};
22
22
  __export(schemas_exports, {
23
23
  AccountContributionSchema: () => AccountContributionSchema,
24
24
  AccountProviderSchema: () => AccountProviderSchema,
25
+ AgendaDaySchema: () => AgendaDaySchema,
26
+ AgendaEventSchema: () => AgendaEventSchema,
27
+ AgendaPropsSchema: () => AgendaPropsSchema,
25
28
  AllowedCSSPropertySchema: () => AllowedCSSPropertySchema,
26
29
  AuthorSchema: () => AuthorSchema,
27
30
  ButtonPropsSchema: () => ButtonPropsSchema,
@@ -692,6 +695,30 @@ var CalendarEventPropsSchema = import_zod2.z.object({
692
695
  notes: import_zod2.z.string().optional(),
693
696
  style: ExtensionComponentStyleSchema.optional()
694
697
  }).passthrough().describe("Single calendar event component");
698
+ var AgendaEventSchema = import_zod2.z.object({
699
+ id: import_zod2.z.string().optional().describe("Handed back to onEventClickAction as $event.id"),
700
+ title: import_zod2.z.string(),
701
+ start: import_zod2.z.string().describe("ISO 8601 with an offset"),
702
+ end: import_zod2.z.string().optional().describe("ISO 8601 with an offset"),
703
+ allDay: import_zod2.z.boolean().optional(),
704
+ detail: import_zod2.z.string().optional().describe("One quiet line under the title")
705
+ }).passthrough().describe("One agenda event");
706
+ var AgendaDaySchema = import_zod2.z.object({
707
+ label: import_zod2.z.string().describe("The day heading"),
708
+ date: import_zod2.z.string().optional().describe("A quieter line beside the heading"),
709
+ events: import_zod2.z.array(AgendaEventSchema)
710
+ }).passthrough().describe("One agenda day");
711
+ var AgendaPropsSchema = import_zod2.z.object({
712
+ component: import_zod2.z.literal("Agenda"),
713
+ title: import_zod2.z.string().optional(),
714
+ icon: import_zod2.z.string().optional().describe("Icon shown to the left of the title"),
715
+ days: import_zod2.z.array(AgendaDaySchema),
716
+ warnOverlaps: import_zod2.z.boolean().optional().describe("Word clashes between events"),
717
+ onEventClickAction: ExtensionActionRefSchema.optional().describe(
718
+ "Action to call when an event is clicked, with the event as $event"
719
+ ),
720
+ style: ExtensionComponentStyleSchema.optional()
721
+ }).passthrough().describe("Schedule component that tracks the current time");
695
722
 
696
723
  // src/schemas/contributions.schema.ts
697
724
  var LocalizedStringSchema = import_zod3.z.union([import_zod3.z.string(), import_zod3.z.record(import_zod3.z.string())]).describe("String or localized string map");
@@ -1032,6 +1059,14 @@ var NoteCardSchema = import_zod5.z.object({
1032
1059
  variant: NoteVariantSchema.optional(),
1033
1060
  style
1034
1061
  }).strict();
1062
+ var QuoteCardSchema = import_zod5.z.object({
1063
+ component: import_zod5.z.literal("Quote"),
1064
+ text: import_zod5.z.string(),
1065
+ source: import_zod5.z.string().optional(),
1066
+ context: import_zod5.z.string().optional(),
1067
+ footer: import_zod5.z.string().optional(),
1068
+ style
1069
+ }).strict();
1035
1070
  var CalendarEventCardSchema = import_zod5.z.object({
1036
1071
  component: import_zod5.z.literal("CalendarEvent"),
1037
1072
  title: import_zod5.z.string(),
@@ -1068,6 +1103,7 @@ var CHAT_CARD_COMPONENTS = [
1068
1103
  "KeyValueList",
1069
1104
  "Timeline",
1070
1105
  "Note",
1106
+ "Quote",
1071
1107
  "CalendarEvent"
1072
1108
  ];
1073
1109
  var CARD_MEMBERS = [
@@ -1091,6 +1127,7 @@ var CARD_MEMBERS = [
1091
1127
  KeyValueListCardSchema,
1092
1128
  TimelineCardSchema,
1093
1129
  NoteCardSchema,
1130
+ QuoteCardSchema,
1094
1131
  CalendarEventCardSchema
1095
1132
  ];
1096
1133
  var CHAT_CARD_PROPS = Object.freeze(
@@ -1253,6 +1290,9 @@ function describeChatCardProfile() {
1253
1290
  0 && (module.exports = {
1254
1291
  AccountContributionSchema,
1255
1292
  AccountProviderSchema,
1293
+ AgendaDaySchema,
1294
+ AgendaEventSchema,
1295
+ AgendaPropsSchema,
1256
1296
  AllowedCSSPropertySchema,
1257
1297
  AuthorSchema,
1258
1298
  ButtonPropsSchema,