@molecule/app-svelte 3.16.0 → 3.18.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.
Files changed (60) hide show
  1. package/README.md +205 -281
  2. package/dist/ai-models.d.ts +2 -0
  3. package/dist/ai-models.d.ts.map +1 -0
  4. package/dist/ai-models.js +1 -0
  5. package/dist/chat/index.d.ts +6 -0
  6. package/dist/chat/index.d.ts.map +1 -0
  7. package/dist/chat/index.js +5 -0
  8. package/dist/chat-context.d.ts +13 -0
  9. package/dist/chat-context.d.ts.map +1 -0
  10. package/dist/chat-context.js +23 -0
  11. package/dist/chat-provider.d.ts +5 -0
  12. package/dist/chat-provider.d.ts.map +1 -0
  13. package/dist/chat-provider.js +5 -0
  14. package/dist/chat-types.d.ts +9 -0
  15. package/dist/chat-types.d.ts.map +1 -0
  16. package/dist/chat-types.js +1 -0
  17. package/dist/context.d.ts +0 -12
  18. package/dist/context.d.ts.map +1 -1
  19. package/dist/context.js +2 -22
  20. package/dist/hooks/index.d.ts +0 -2
  21. package/dist/hooks/index.d.ts.map +1 -1
  22. package/dist/hooks/index.js +0 -2
  23. package/dist/hooks/useAIModels.d.ts +1 -1
  24. package/dist/hooks/useAIModels.js +1 -1
  25. package/dist/hooks/usePush.d.ts +1 -1
  26. package/dist/hooks/usePush.js +1 -1
  27. package/dist/hooks/useTranslation.d.ts +2 -4
  28. package/dist/hooks/useTranslation.d.ts.map +1 -1
  29. package/dist/index.d.ts +7 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +7 -1
  32. package/dist/legacy-ai-models.d.ts +17 -0
  33. package/dist/legacy-ai-models.d.ts.map +1 -0
  34. package/dist/legacy-ai-models.js +11 -0
  35. package/dist/legacy-chat.d.ts +77 -0
  36. package/dist/legacy-chat.d.ts.map +1 -0
  37. package/dist/legacy-chat.js +51 -0
  38. package/dist/legacy-push.d.ts +22 -0
  39. package/dist/legacy-push.d.ts.map +1 -0
  40. package/dist/legacy-push.js +11 -0
  41. package/dist/providers/ChatProvider.svelte +1 -1
  42. package/dist/providers/ChatProvider.svelte.d.ts +1 -1
  43. package/dist/providers/ChatProvider.svelte.d.ts.map +1 -1
  44. package/dist/providers/providers.d.ts +0 -4
  45. package/dist/providers/providers.d.ts.map +1 -1
  46. package/dist/providers/providers.js +0 -5
  47. package/dist/providers/services.js +2 -1
  48. package/dist/push.d.ts +3 -0
  49. package/dist/push.d.ts.map +1 -0
  50. package/dist/push.js +2 -0
  51. package/dist/stores/chat.d.ts +1 -1
  52. package/dist/stores/chat.js +2 -2
  53. package/dist/stores/index.d.ts +0 -2
  54. package/dist/stores/index.d.ts.map +1 -1
  55. package/dist/stores/index.js +0 -2
  56. package/dist/stores/push.d.ts +1 -1
  57. package/dist/stores/push.js +1 -1
  58. package/dist/types.d.ts +0 -6
  59. package/dist/types.d.ts.map +1 -1
  60. package/package.json +18 -3
package/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-25T04:39:31.578Z
6
+ Generated: 2026-11-27T22:16:41.504Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-svelte
@@ -1209,31 +1209,6 @@ interface Theme {
1209
1209
  }
1210
1210
  ```
1211
1211
 
1212
- #### `UseAIModelsResult`
1213
-
1214
- Result returned by `useAIModels`.
1215
-
1216
- ```typescript
1217
- interface UseAIModelsResult {
1218
- /**
1219
- * Available models, or an empty array while loading or after a failed fetch, as a readable store. The list
1220
- * keeps its identity until the catalog changes, the empty one included.
1221
- */
1222
- models: Readable<AppModelDefinition[]>
1223
- /**
1224
- * Per-mode server default model ids for the requester's tier, or `undefined`
1225
- * while loading or on servers that don't provide them.
1226
- */
1227
- defaults: Readable<AppModeModelDefaults | undefined>
1228
- /** The single model marked `freeTier: true`, or `undefined`. */
1229
- freeTierModel: Readable<AppModelDefinition | undefined>
1230
- /** `true` while the initial fetch is in flight. */
1231
- loading: Readable<boolean>
1232
- /** Error from the initial fetch, or `null`. */
1233
- error: Readable<Error | null>
1234
- }
1235
- ```
1236
-
1237
1212
  #### `UseAuthOptions`
1238
1213
 
1239
1214
  Options for {@link useAuth}.
@@ -1815,51 +1790,6 @@ interface UsePromiseState<T> {
1815
1790
  }
1816
1791
  ```
1817
1792
 
1818
- #### `UsePushResult`
1819
-
1820
- Hook return type.
1821
-
1822
- ```typescript
1823
- interface UsePushResult {
1824
- /** The last permission status a check or request reported, null until one runs. */
1825
- permission: Readable<PermissionStatus | null>
1826
- /** The token register() resolved, null until a registration. */
1827
- token: Readable<PushToken | null>
1828
- /** Reads the permission status from the provider. */
1829
- checkPermission: () => Promise<PermissionStatus>
1830
- /** Asks the user for permission and stores the answer. */
1831
- requestPermission: () => Promise<PermissionStatus>
1832
- /** Registers for push and stores the token. */
1833
- register: (options?: PushRegisterOptions) => Promise<PushToken>
1834
- /** Unregisters and clears the token. */
1835
- unregister: () => Promise<void>
1836
- /** Subscribes a notification listener; returns its unsubscribe. */
1837
- onNotificationReceived: (listener: NotificationReceivedListener) => () => void
1838
- /** Subscribes a notification-action listener; returns its unsubscribe. */
1839
- onNotificationAction: (listener: NotificationActionListener) => () => void
1840
- /** Subscribes a token-change listener; returns its unsubscribe. */
1841
- onTokenChange: (listener: TokenChangeListener) => () => void
1842
- /** Sets the badge count. */
1843
- setBadge: (count: number) => Promise<void>
1844
- /** Clears the badge. */
1845
- clearBadge: () => Promise<void>
1846
- }
1847
- ```
1848
-
1849
- #### `UsePushOptions`
1850
-
1851
- Options for the usePush hook (e.g. check permission on mount).
1852
-
1853
- ```typescript
1854
- interface UsePushOptions {
1855
- /**
1856
- * Whether to check permission status on mount, and again when the flag turns
1857
- * on later on the same component.
1858
- */
1859
- checkOnMount?: boolean
1860
- }
1861
- ```
1862
-
1863
1793
  #### `UseRouterResult`
1864
1794
 
1865
1795
  What {@link useRouter} returns.
@@ -2478,16 +2408,6 @@ interface LoggerProviderProps extends ProviderProps {
2478
2408
  }
2479
2409
  ```
2480
2410
 
2481
- #### `ChatProviderProps`
2482
-
2483
- Props for the `ChatProvider` component.
2484
-
2485
- ```typescript
2486
- interface ChatProviderProps extends ProviderProps {
2487
- provider: ChatProvider
2488
- }
2489
- ```
2490
-
2491
2411
  #### `WorkspaceProviderProps`
2492
2412
 
2493
2413
  Props for the `WorkspaceProvider` component.
@@ -2584,17 +2504,6 @@ URL query string parameter map (single values or arrays for repeated keys).
2584
2504
  type QueryParams = Record<string, string | string[] | undefined>
2585
2505
  ```
2586
2506
 
2587
- #### `AgentIdentity`
2588
-
2589
- Display identity for the AI coding agent and the host product, used to
2590
- interpolate the `{{agentName}}` / `{{productName}}` tokens in shared chat/IDE
2591
- copy. A consuming app sets these to its own agent + product brand names; the
2592
- shared packages fall back to {@link DEFAULT_AGENT_IDENTITY} when it does not.
2593
-
2594
- ```typescript
2595
- type AgentIdentity = ChatAgentIdentity
2596
- ```
2597
-
2598
2507
  #### `MaybeReadable`
2599
2508
 
2600
2509
  A plain value or a readable store of one (a store of `undefined` stands for
@@ -2739,9 +2648,7 @@ Two compatible call forms:
2739
2648
  English `defaultValue`, with optional `count` for pluralization.
2740
2649
 
2741
2650
  ```typescript
2742
- type UseTFunction = I18nProvider['t'] & {
2743
- (key: string, fallback: string, options?: UseTShorthandOptions): string
2744
- }
2651
+ type UseTFunction = TranslateFunctionWithFallback
2745
2652
  ```
2746
2653
 
2747
2654
  #### `VerifyPaymentReturnStatus`
@@ -2752,49 +2659,102 @@ How far the return-page verification has got.
2752
2659
  type VerifyPaymentReturnStatus = 'idle' | 'verifying' | 'verified' | 'failed'
2753
2660
  ```
2754
2661
 
2755
- #### `CapacitorAppStore`
2662
+ #### `UseAIModelsResult` _(deprecated)_
2756
2663
 
2757
- Return type for the Capacitor app store.
2664
+ > **Deprecated:** Import UseAIModelsResult from `@molecule/app-svelte/ai-models`.
2665
+
2666
+ Compatibility alias for `UseAIModelsResult`.
2758
2667
 
2759
2668
  ```typescript
2760
- type CapacitorAppStore = Readable<CapacitorAppState> & {
2761
- initialize: () => Promise<void>
2762
- }
2669
+ type UseAIModelsResult = feature.UseAIModelsResult
2763
2670
  ```
2764
2671
 
2765
- #### `ChangePasswordStore`
2672
+ #### `AgentIdentity` _(deprecated)_
2766
2673
 
2767
- Change password store type.
2674
+ > **Deprecated:** Import AgentIdentity from `@molecule/app-ai-chat`.
2675
+
2676
+ Compatibility alias for `AgentIdentity`.
2768
2677
 
2769
2678
  ```typescript
2770
- type ChangePasswordStore = PromiseStore<void, [string, string]>
2679
+ type AgentIdentity = feature.AgentIdentity
2680
+ ```
2681
+
2682
+ #### `ChatProviderProps` _(deprecated)_
2683
+
2684
+ > **Deprecated:** Import ChatProviderProps from `@molecule/app-svelte/chat`.
2685
+
2686
+ Compatibility alias for `ChatProviderProps`.
2687
+
2688
+ ```typescript
2689
+ type ChatProviderProps = feature.ChatProviderProps
2690
+ ```
2691
+
2692
+ #### `SendMessageOptions` _(deprecated)_
2693
+
2694
+ > **Deprecated:** Import SendMessageOptions from `@molecule/app-svelte/chat`.
2695
+
2696
+ Compatibility alias for `SendMessageOptions`.
2697
+
2698
+ ```typescript
2699
+ type SendMessageOptions = feature.SendMessageOptions
2771
2700
  ```
2772
2701
 
2773
- #### `UseChatOptions`
2702
+ #### `UseChatOptions` _(deprecated)_
2703
+
2704
+ > **Deprecated:** Import UseChatOptions from `@molecule/app-svelte/chat`.
2774
2705
 
2775
- Options for {@link useChat} (the shared chat session's options).
2706
+ Compatibility alias for `UseChatOptions`.
2776
2707
 
2777
2708
  ```typescript
2778
- type UseChatOptions = ChatSessionOptions
2709
+ type UseChatOptions = feature.UseChatOptions
2779
2710
  ```
2780
2711
 
2781
- #### `SendMessageOptions`
2712
+ #### `UseChatResult` _(deprecated)_
2782
2713
 
2783
- Options for one `sendMessage` call.
2714
+ > **Deprecated:** Import UseChatResult from `@molecule/app-svelte/chat`.
2715
+
2716
+ Compatibility alias for `UseChatResult`.
2784
2717
 
2785
2718
  ```typescript
2786
- type SendMessageOptions = ChatSendOptions
2719
+ type UseChatResult = feature.UseChatResult
2787
2720
  ```
2788
2721
 
2789
- #### `UseChatResult`
2722
+ #### `UsePushOptions` _(deprecated)_
2723
+
2724
+ > **Deprecated:** Import UsePushOptions from `@molecule/app-svelte/push`.
2790
2725
 
2791
- What {@link useChat} returns: each chat state field as a readable store,
2792
- and the session's controls as plain functions (stable for the component's life).
2726
+ Compatibility alias for `UsePushOptions`.
2727
+
2728
+ ```typescript
2729
+ type UsePushOptions = feature.UsePushOptions
2730
+ ```
2731
+
2732
+ #### `UsePushResult` _(deprecated)_
2733
+
2734
+ > **Deprecated:** Import UsePushResult from `@molecule/app-svelte/push`.
2735
+
2736
+ Compatibility alias for `UsePushResult`.
2737
+
2738
+ ```typescript
2739
+ type UsePushResult = feature.UsePushResult
2740
+ ```
2741
+
2742
+ #### `CapacitorAppStore`
2743
+
2744
+ Return type for the Capacitor app store.
2745
+
2746
+ ```typescript
2747
+ type CapacitorAppStore = Readable<CapacitorAppState> & {
2748
+ initialize: () => Promise<void>
2749
+ }
2750
+ ```
2751
+
2752
+ #### `ChangePasswordStore`
2753
+
2754
+ Change password store type.
2793
2755
 
2794
2756
  ```typescript
2795
- type UseChatResult = {
2796
- readonly [K in keyof ChatSessionState]: Readable<ChatSessionState[K]>
2797
- } & ChatSessionControls
2757
+ type ChangePasswordStore = PromiseStore<void, [string, string]>
2798
2758
  ```
2799
2759
 
2800
2760
  #### `LoginStore`
@@ -2956,16 +2916,6 @@ function setLoggerContext(provider: LoggerProvider): void
2956
2916
 
2957
2917
  - `provider` — The logger provider to store in Svelte context.
2958
2918
 
2959
- #### `setChatContext(provider)`
2960
-
2961
- Sets the AI chat context.
2962
-
2963
- ```typescript
2964
- function setChatContext(provider: ChatProvider): void
2965
- ```
2966
-
2967
- - `provider` — The chat provider to store in Svelte context.
2968
-
2969
2919
  #### `setWorkspaceContext(provider)`
2970
2920
 
2971
2921
  Sets the IDE workspace context.
@@ -3079,16 +3029,6 @@ function getLoggerProvider(): LoggerProvider
3079
3029
 
3080
3030
  **Returns:** The logger provider instance.
3081
3031
 
3082
- #### `useChatProvider()`
3083
-
3084
- Gets the AI chat provider from Svelte context (`setMoleculeContext({ chat })`).
3085
-
3086
- ```typescript
3087
- function useChatProvider(): ChatProvider
3088
- ```
3089
-
3090
- **Returns:** The chat provider instance.
3091
-
3092
3032
  #### `useWorkspaceProvider()`
3093
3033
 
3094
3034
  Gets the IDE workspace provider from Svelte context
@@ -3266,36 +3206,6 @@ function toReadable<T>(value: MaybeReadable<T>): Readable<T>
3266
3206
 
3267
3207
  **Returns:** A readable store of the value.
3268
3208
 
3269
- #### `resetAIModelsCache()`
3270
-
3271
- Test-only: drops every cached model list so the next `useAIModels` call
3272
- refetches. Exposed for unit tests; do not call from production code.
3273
-
3274
- ```typescript
3275
- function resetAIModelsCache(): void
3276
- ```
3277
-
3278
- #### `useAIModels(projectId)`
3279
-
3280
- Subscribes to the cached AI model catalog, React's `useAIModels` in Svelte's
3281
- idiom: call it during component init under `setMoleculeContext({ http })`.
3282
- The first mount of a scope triggers a single `GET /ai/models` fetch;
3283
- subsequent mounts return the cached result, and a scope whose fetch failed
3284
- does not refetch on a later mount.
3285
-
3286
- The project id may be a plain value or a readable store of one (a store
3287
- holding `undefined` means the unscoped catalog): setting it resubscribes to
3288
- the new scope's cache and fetches it if nobody has yet, on the same
3289
- component, the way React's re-render does.
3290
-
3291
- ```typescript
3292
- function useAIModels(projectId?: MaybeReadable<string | undefined>): UseAIModelsResult
3293
- ```
3294
-
3295
- - `projectId` — Optional project scope: includes that project's custom ("bring your own AI") models on servers that support them (or a store of it).
3296
-
3297
- **Returns:** Models, free-tier model, loading flag, and error, as stores.
3298
-
3299
3209
  #### `useAsyncState(initialState)`
3300
3210
 
3301
3211
  State that accepts Promises and partial updates, React's `useAsyncState` in
@@ -3844,24 +3754,6 @@ function usePromise<T, A extends unknown[]>(
3844
3754
 
3845
3755
  **Returns:** A readable store of the [state, wrappedFunction] tuple.
3846
3756
 
3847
- #### `usePush(options)`
3848
-
3849
- Push notification state and actions, React's `usePush` in Svelte's idiom:
3850
- called during component init, `permission` and `token` are readable stores
3851
- the hook's own actions update, and the rest are plain functions.
3852
-
3853
- Uses module-level `getProvider()` — push is a singleton, not
3854
- context-provided. The provider's listeners are caller-managed: the returned
3855
- `on*` unsubscribes are the caller's to call, like React's.
3856
-
3857
- ```typescript
3858
- function usePush(options?: MaybeReadable<UsePushOptions | undefined>): UsePushResult
3859
- ```
3860
-
3861
- - `options` — Hook options (or a store of them): setting `checkOnMount` later runs its check on the same component, the way React's re-render re-runs its effect.
3862
-
3863
- **Returns:** Push notification state and action methods
3864
-
3865
3757
  #### `useRouter()`
3866
3758
 
3867
3759
  Routing state and navigation, React's `useRouter` in Svelte's idiom: call it
@@ -4399,25 +4291,6 @@ function createChangePasswordStore(): ChangePasswordStore
4399
4291
 
4400
4292
  **Returns:** Change password promise store
4401
4293
 
4402
- #### `useChat(options)`
4403
-
4404
- AI chat with streaming: the transcript, loading and error state, mode, and
4405
- the controls (send, abort, queue edits, history). Call it during component
4406
- init.
4407
-
4408
- The options may be a plain value or a readable store of one (a store holding
4409
- `undefined` means no options): a new `endpoint` switches conversation and a
4410
- new `projectId` moves to that project's transcript, on the same component,
4411
- the way React re-renders `useChat`.
4412
-
4413
- ```typescript
4414
- function useChat(options: UseChatOptions | Readable<UseChatOptions>): UseChatResult
4415
- ```
4416
-
4417
- - `options` — Chat options (or a store of them): endpoint, project id, history loading, callbacks.
4418
-
4419
- **Returns:** Each state field as a readable store, and the chat controls.
4420
-
4421
4294
  #### `createDeviceStores()`
4422
4295
 
4423
4296
  Create device stores from the module-level device provider.
@@ -4754,28 +4627,6 @@ function createPromiseStore<T, A extends unknown[]>(
4754
4627
 
4755
4628
  **Returns:** Promise store with subscribe, call, cancel, and reset
4756
4629
 
4757
- #### `createPushStores()`
4758
-
4759
- Create push notification stores from the module-level push provider.
4760
-
4761
- ```typescript
4762
- function createPushStores(): {
4763
- permission: Readable<PermissionStatus | null>
4764
- token: Readable<PushToken | null>
4765
- checkPermission: () => Promise<PermissionStatus>
4766
- requestPermission: () => Promise<PermissionStatus>
4767
- register: (options?: PushRegisterOptions) => Promise<PushToken>
4768
- unregister: () => Promise<void>
4769
- onNotificationReceived: (listener: NotificationReceivedListener) => () => void
4770
- onNotificationAction: (listener: NotificationActionListener) => () => void
4771
- onTokenChange: (listener: TokenChangeListener) => () => void
4772
- setBadge: (count: number) => Promise<void>
4773
- clearBadge: () => Promise<void>
4774
- }
4775
- ```
4776
-
4777
- **Returns:** Push notification stores and actions
4778
-
4779
4630
  #### `createRouterStores()`
4780
4631
 
4781
4632
  Create router stores from the router in context.
@@ -5018,30 +4869,144 @@ const RoutedView: LegacyComponentType
5018
4869
  const SessionReady: LegacyComponentType
5019
4870
  ```
5020
4871
 
5021
- #### `DEFAULT_AGENT_NAME`
4872
+ #### `resetAIModelsCache` _(deprecated)_
4873
+
4874
+ > **Deprecated:** Import resetAIModelsCache from `@molecule/app-svelte/ai-models`.
4875
+
4876
+ Compatibility alias for `resetAIModelsCache`.
4877
+
4878
+ ```typescript
4879
+ const resetAIModelsCache: typeof feature.resetAIModelsCache
4880
+ ```
4881
+
4882
+ #### `useAIModels` _(deprecated)_
4883
+
4884
+ > **Deprecated:** Import useAIModels from `@molecule/app-svelte/ai-models`.
4885
+
4886
+ Compatibility alias for `useAIModels`.
4887
+
4888
+ ```typescript
4889
+ const useAIModels: typeof feature.useAIModels
4890
+ ```
4891
+
4892
+ #### `ChatProvider` _(deprecated)_
5022
4893
 
5023
- Neutral, product-agnostic agent name used when the host supplies none.
4894
+ > **Deprecated:** Import ChatProvider from `@molecule/app-svelte/chat`.
4895
+
4896
+ Compatibility alias for `ChatProvider`.
5024
4897
 
5025
4898
  ```typescript
5026
- const DEFAULT_AGENT_NAME: typeof CHAT_DEFAULT_AGENT_NAME
4899
+ const ChatProvider: typeof feature.ChatProvider
5027
4900
  ```
5028
4901
 
5029
- #### `DEFAULT_PRODUCT_NAME`
4902
+ #### `DEFAULT_AGENT_IDENTITY` _(deprecated)_
4903
+
4904
+ > **Deprecated:** Import DEFAULT_AGENT_IDENTITY from `@molecule/app-ai-chat`.
5030
4905
 
5031
- Neutral, product-agnostic product/IDE name used when the host supplies none.
4906
+ Compatibility alias for `DEFAULT_AGENT_IDENTITY`.
5032
4907
 
5033
4908
  ```typescript
5034
- const DEFAULT_PRODUCT_NAME: typeof CHAT_DEFAULT_PRODUCT_NAME
4909
+ const DEFAULT_AGENT_IDENTITY: typeof feature.DEFAULT_AGENT_IDENTITY
5035
4910
  ```
5036
4911
 
5037
- #### `DEFAULT_AGENT_IDENTITY`
4912
+ #### `DEFAULT_AGENT_NAME` _(deprecated)_
5038
4913
 
5039
- The neutral default identity ({@link DEFAULT_AGENT_NAME} +
5040
- {@link DEFAULT_PRODUCT_NAME}) the shared packages use until a consuming app
5041
- passes its own.
4914
+ > **Deprecated:** Import DEFAULT_AGENT_NAME from `@molecule/app-ai-chat`.
4915
+
4916
+ Compatibility alias for `DEFAULT_AGENT_NAME`.
5042
4917
 
5043
4918
  ```typescript
5044
- const DEFAULT_AGENT_IDENTITY: AgentIdentity
4919
+ const DEFAULT_AGENT_NAME: typeof feature.DEFAULT_AGENT_NAME
4920
+ ```
4921
+
4922
+ #### `DEFAULT_PRODUCT_NAME` _(deprecated)_
4923
+
4924
+ > **Deprecated:** Import DEFAULT_PRODUCT_NAME from `@molecule/app-ai-chat`.
4925
+
4926
+ Compatibility alias for `DEFAULT_PRODUCT_NAME`.
4927
+
4928
+ ```typescript
4929
+ const DEFAULT_PRODUCT_NAME: typeof feature.DEFAULT_PRODUCT_NAME
4930
+ ```
4931
+
4932
+ #### `convergeHistory` _(deprecated)_
4933
+
4934
+ > **Deprecated:** Import convergeHistory from `@molecule/app-svelte/chat`.
4935
+
4936
+ Compatibility alias for `convergeHistory`.
4937
+
4938
+ ```typescript
4939
+ const convergeHistory: typeof feature.convergeHistory
4940
+ ```
4941
+
4942
+ #### `localOnlyMessages` _(deprecated)_
4943
+
4944
+ > **Deprecated:** Import localOnlyMessages from `@molecule/app-svelte/chat`.
4945
+
4946
+ Compatibility alias for `localOnlyMessages`.
4947
+
4948
+ ```typescript
4949
+ const localOnlyMessages: typeof feature.localOnlyMessages
4950
+ ```
4951
+
4952
+ #### `resetChatStoresForTests` _(deprecated)_
4953
+
4954
+ > **Deprecated:** Import resetChatStoresForTests from `@molecule/app-svelte/chat`.
4955
+
4956
+ Compatibility alias for `resetChatStoresForTests`.
4957
+
4958
+ ```typescript
4959
+ const resetChatStoresForTests: typeof feature.resetChatStoresForTests
4960
+ ```
4961
+
4962
+ #### `setChatContext` _(deprecated)_
4963
+
4964
+ > **Deprecated:** Import setChatContext from `@molecule/app-svelte/chat`.
4965
+
4966
+ Compatibility alias for `setChatContext`.
4967
+
4968
+ ```typescript
4969
+ const setChatContext: typeof feature.setChatContext
4970
+ ```
4971
+
4972
+ #### `useChat` _(deprecated)_
4973
+
4974
+ > **Deprecated:** Import useChat from `@molecule/app-svelte/chat`.
4975
+
4976
+ Compatibility alias for `useChat`.
4977
+
4978
+ ```typescript
4979
+ const useChat: typeof feature.useChat
4980
+ ```
4981
+
4982
+ #### `useChatProvider` _(deprecated)_
4983
+
4984
+ > **Deprecated:** Import useChatProvider from `@molecule/app-svelte/chat`.
4985
+
4986
+ Compatibility alias for `useChatProvider`.
4987
+
4988
+ ```typescript
4989
+ const useChatProvider: typeof feature.useChatProvider
4990
+ ```
4991
+
4992
+ #### `createPushStores` _(deprecated)_
4993
+
4994
+ > **Deprecated:** Import createPushStores from `@molecule/app-svelte/push`.
4995
+
4996
+ Compatibility alias for `createPushStores`.
4997
+
4998
+ ```typescript
4999
+ const createPushStores: typeof feature.createPushStores
5000
+ ```
5001
+
5002
+ #### `usePush` _(deprecated)_
5003
+
5004
+ > **Deprecated:** Import usePush from `@molecule/app-svelte/push`.
5005
+
5006
+ Compatibility alias for `usePush`.
5007
+
5008
+ ```typescript
5009
+ const usePush: typeof feature.usePush
5045
5010
  ```
5046
5011
 
5047
5012
  #### `MoleculeProvider`
@@ -5124,14 +5089,6 @@ Provider for logging, as `@molecule/app-react`'s `LoggerProvider`.
5124
5089
  const LoggerProvider: LegacyComponentType
5125
5090
  ```
5126
5091
 
5127
- #### `ChatProvider`
5128
-
5129
- Provider for AI chat, as `@molecule/app-react`'s `ChatProvider`.
5130
-
5131
- ```typescript
5132
- const ChatProvider: LegacyComponentType
5133
- ```
5134
-
5135
5092
  #### `WorkspaceProvider`
5136
5093
 
5137
5094
  Provider for the IDE workspace, as `@molecule/app-react`'s `WorkspaceProvider`.
@@ -5156,43 +5113,6 @@ Provider for the live preview, as `@molecule/app-react`'s `PreviewProvider`.
5156
5113
  const PreviewProvider: LegacyComponentType
5157
5114
  ```
5158
5115
 
5159
- #### `convergeHistory`
5160
-
5161
- Converges the local transcript with authoritative server history. See
5162
- `convergeHistory` in `@molecule/app-ai-chat`.
5163
-
5164
- ```typescript
5165
- const convergeHistory: typeof coreConvergeHistory
5166
- ```
5167
-
5168
- - `prev` — The local transcript.
5169
- - `history` — The server's history.
5170
-
5171
- **Returns:** The converged transcript.
5172
-
5173
- #### `localOnlyMessages`
5174
-
5175
- The local messages server history does not carry yet. See
5176
- `localOnlyMessages` in `@molecule/app-ai-chat`.
5177
-
5178
- ```typescript
5179
- const localOnlyMessages: typeof coreLocalOnlyMessages
5180
- ```
5181
-
5182
- - `prev` — The local transcript.
5183
- - `history` — The server's history.
5184
-
5185
- **Returns:** The local-only messages.
5186
-
5187
- #### `resetChatStoresForTests`
5188
-
5189
- Clears every chat session store. Tests only: each test starts with no
5190
- transcript, queue or stream left by the previous one.
5191
-
5192
- ```typescript
5193
- const resetChatStoresForTests: typeof coreResetChatStoresForTests
5194
- ```
5195
-
5196
5116
  ## Injection Notes
5197
5117
 
5198
5118
  ### Requirements
@@ -5206,7 +5126,7 @@ Peer dependencies:
5206
5126
  - `@molecule/app-device` ^1.0.1
5207
5127
  - `@molecule/app-forms` ^2.4.0
5208
5128
  - `@molecule/app-http` ^1.0.1
5209
- - `@molecule/app-i18n` ^1.3.0
5129
+ - `@molecule/app-i18n` ^1.4.0
5210
5130
  - `@molecule/app-ide` ^1.1.0 _(optional)_
5211
5131
  - `@molecule/app-live-preview` ^1.0.1 _(optional)_
5212
5132
  - `@molecule/app-logger` ^1.0.1
@@ -5264,6 +5184,10 @@ Peer dependencies:
5264
5184
  placed it. Nothing renders on the server; `target` replaces the body and `null` renders
5265
5185
  nothing until a target exists.
5266
5186
 
5187
+ Use `@molecule/app-svelte/chat`, `@molecule/app-svelte/ai-models`, and
5188
+ `@molecule/app-svelte/push` for those features. The corresponding exports at the
5189
+ package root are deprecated.
5190
+
5267
5191
  ## Translations
5268
5192
 
5269
5193
  Translation strings are provided by `@molecule/app-locales-svelte`.
@@ -0,0 +1,2 @@
1
+ export * from './hooks/useAIModels.js';
2
+ //# sourceMappingURL=ai-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-models.d.ts","sourceRoot":"","sources":["../src/ai-models.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './hooks/useAIModels.js';
@@ -0,0 +1,6 @@
1
+ export * from '../agent-identity.js';
2
+ export * from '../chat-context.js';
3
+ export * from '../chat-provider.js';
4
+ export * from '../chat-types.js';
5
+ export * from '../stores/chat.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from '../agent-identity.js';
2
+ export * from '../chat-context.js';
3
+ export * from '../chat-provider.js';
4
+ export * from '../chat-types.js';
5
+ export * from '../stores/chat.js';
@@ -0,0 +1,13 @@
1
+ import type { ChatProvider } from '@molecule/app-ai-chat';
2
+ /**
3
+ * Sets the AI chat context.
4
+ * @param provider - The chat provider to store in Svelte context.
5
+ */
6
+ export declare function setChatContext(provider: ChatProvider): void;
7
+ /**
8
+ * Gets the AI chat provider from Svelte context (`setMoleculeContext({ chat })`).
9
+ * @returns The chat provider instance.
10
+ * @throws {Error} If no chat provider has been set in context.
11
+ */
12
+ export declare function useChatProvider(): ChatProvider;
13
+ //# sourceMappingURL=chat-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-context.d.ts","sourceRoot":"","sources":["../src/chat-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAKzD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAS9C"}