@lunora/vue 1.0.0-alpha.28 → 1.0.0-alpha.281

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 (49) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +23 -16
  3. package/dist/index.d.mts +1153 -241
  4. package/dist/index.d.ts +1153 -241
  5. package/dist/index.mjs +1 -13
  6. package/dist/packem_shared/AuthLoading-ZXVgXos1.mjs +1 -0
  7. package/dist/packem_shared/LUNORA_INJECTION_KEY-Bct9tKCj.mjs +1 -0
  8. package/dist/packem_shared/hydratePreloaded-DicHNxhB.mjs +1 -0
  9. package/dist/packem_shared/is-browser-BEdfLJHK.mjs +1 -0
  10. package/dist/packem_shared/scope-dispose-Mq3k4nvP.mjs +1 -0
  11. package/dist/packem_shared/subscribeToQuery-BvnA8ErG.mjs +1 -0
  12. package/dist/packem_shared/useAction-C4VLsh4M.mjs +1 -0
  13. package/dist/packem_shared/useAgent-Bp5UEoEp.mjs +1 -0
  14. package/dist/packem_shared/useAgentChat-CVgX8Z-J.mjs +1 -0
  15. package/dist/packem_shared/useAgentState-DpFm2lH0.mjs +1 -0
  16. package/dist/packem_shared/useAgentToolEvents-CWHORsCT.mjs +1 -0
  17. package/dist/packem_shared/useAuth-QDllAwZL.mjs +1 -0
  18. package/dist/packem_shared/useConnectionStatus-CCUbKnj2.mjs +1 -0
  19. package/dist/packem_shared/useFlag-xVfWC_c6.mjs +1 -0
  20. package/dist/packem_shared/useInfiniteQuery-Clqt_MYU.mjs +1 -0
  21. package/dist/packem_shared/useLiveTopic-B0HA04MY.mjs +1 -0
  22. package/dist/packem_shared/useMutation-D6PkaNaE.mjs +1 -0
  23. package/dist/packem_shared/useMutator-CO7nXlRf.mjs +1 -0
  24. package/dist/packem_shared/usePresence-Dpnb4kjv.mjs +1 -0
  25. package/dist/packem_shared/useRateLimit-zoPsflSG.mjs +1 -0
  26. package/dist/packem_shared/useStream-COVzNdKq.mjs +1 -0
  27. package/dist/packem_shared/useSubscription-cTKyOIAv.mjs +1 -0
  28. package/dist/packem_shared/useVoiceAgent-Dz1t4xgi.mjs +1 -0
  29. package/dist/server.mjs +1 -1
  30. package/dist/upload.d.mts +2 -0
  31. package/dist/upload.d.ts +2 -0
  32. package/dist/upload.mjs +1 -0
  33. package/package.json +9 -8
  34. package/dist/packem_shared/AuthLoading-DKra8yfG.mjs +0 -29
  35. package/dist/packem_shared/LUNORA_INJECTION_KEY-DQM5MgsC.mjs +0 -26
  36. package/dist/packem_shared/hydratePreloaded-Cnd2GmG1.mjs +0 -14
  37. package/dist/packem_shared/subscribeToQuery-hVYyvgOD.mjs +0 -51
  38. package/dist/packem_shared/useAuth-yXaaF-ro.mjs +0 -28
  39. package/dist/packem_shared/useConnectionStatus-DM_TOaW5.mjs +0 -20
  40. package/dist/packem_shared/useFlag-Diuk30zd.mjs +0 -108
  41. package/dist/packem_shared/useInfiniteQuery-DZMfVEuL.mjs +0 -199
  42. package/dist/packem_shared/useMutation-BKIwT8Jk.mjs +0 -29
  43. package/dist/packem_shared/useMutator-B_Ahs_ZN.mjs +0 -19
  44. package/dist/packem_shared/usePresence-VXq5yGzE.mjs +0 -59
  45. package/dist/packem_shared/useRateLimit-DlPWjcX1.mjs +0 -67
  46. package/dist/packem_shared/useSubscription-DHoCEXNh.mjs +0 -47
  47. package/dist/worker.d.mts +0 -1
  48. package/dist/worker.d.ts +0 -1
  49. package/dist/worker.mjs +0 -1
package/LICENSE.md CHANGED
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+ <!-- /DEPENDENCIES -->
109
+
110
+ <!-- TYPE_DEPENDENCIES -->
111
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -74,22 +74,29 @@ const { mutate, pending } = useMutation(api.messages.send);
74
74
 
75
75
  ## API
76
76
 
77
- | Composable | React equivalent | Description |
78
- | --------------------- | --------------------- | ------------------------------------------------------------------------------- |
79
- | `createLunora` | `LunoraProvider` | Vue plugin — call `app.use(createLunora(client))` at the app root. |
80
- | `useLunora` | `useLunora` | Inject the ambient `LunoraClient` from the nearest provider. |
81
- | `useQuery` | `useQuery` | Live query `ShallowRef` — re-subscribes when reactive args change. |
82
- | `useMutation` | `useMutation` | Optimistic mutation handle (`data`, `error`, `pending`, `mutate`, `reset`). |
83
- | `useSubscription` | `useSubscription` | Raw subscription `ShallowRef` — unbounded live stream. |
84
- | `usePaginatedQuery` | `usePaginatedQuery` | Cursor-paginated query with `loadMore`, `status`, and `results`. |
85
- | `useInfiniteQuery` | `useInfiniteQuery` | Infinite-scroll variant of `usePaginatedQuery`. |
86
- | `useAuth` | `useAuth` | Reactive auth: readonly `token`/`user` refs plus `setToken`. |
87
- | `usePresence` | `usePresence` | Collaborative-awareness — heartbeat + live present-members `ShallowRef`. |
88
- | `useFlag` | `useFlag` | Live OpenFeature flag as a readonly `Ref` — holds `default` until resolved. |
89
- | `useFlags` | `useFlags` | Batch variant — a readonly `Ref` of one value per key in the defaults map. |
90
- | `useRateLimit` | `useRateLimit` | Client-side rate-limit mirror — `ok`, `disabled`, `retryAfter` as ComputedRefs. |
91
- | `useConnectionStatus` | `useConnectionStatus` | Reactive connection state (`idle`, `connecting`, `connected`, `offline`). |
92
- | `hydratePreloaded` | `usePreloadedQuery` | Seed a query synchronously from an SSR `Preloaded` token, then go live. |
77
+ | Composable | React equivalent | Description |
78
+ | --------------------- | --------------------- | --------------------------------------------------------------------------------- |
79
+ | `createLunora` | `LunoraProvider` | Vue plugin — call `app.use(createLunora(client))` at the app root. |
80
+ | `useLunora` | `useLunora` | Inject the ambient `LunoraClient` from the nearest provider. |
81
+ | `useQuery` | `useQuery` | Live query `ShallowRef` — re-subscribes when reactive args change. |
82
+ | `useMutation` | `useMutation` | Optimistic mutation handle (`data`, `error`, `pending`, `mutate`, `reset`). |
83
+ | `useSubscription` | `useSubscription` | Raw subscription `ShallowRef` — unbounded live stream. |
84
+ | `usePaginatedQuery` | `usePaginatedQuery` | Cursor-paginated query with `loadMore`, `status`, `results`, and `error`. |
85
+ | `useInfiniteQuery` | `useInfiniteQuery` | Infinite-scroll variant of `usePaginatedQuery`. |
86
+ | `useAuth` | `useAuth` | Reactive auth: readonly `token`/`user`/`status` refs plus `setToken`. |
87
+ | `usePresence` | `usePresence` | Collaborative-awareness — heartbeat + live present-members `ShallowRef`. |
88
+ | `useLiveTopic` | `useLiveTopic` | Follow one declared live topic as `lastEvent` / `error` refs. |
89
+ | `useFlag` | `useFlag` | Live OpenFeature flag as a readonly `Ref` — holds `default` until resolved. |
90
+ | `useFlags` | `useFlags` | Batch variant — a readonly `Ref` of one value per key in the defaults map. |
91
+ | `useRateLimit` | `useRateLimit` | Client-side rate-limit mirror — `ok`, `disabled`, `retryAfter` as ComputedRefs. |
92
+ | `useConnectionStatus` | `useConnectionStatus` | Reactive connection state (`idle`, `connecting`, `connected`, `offline`). |
93
+ | `hydratePreloaded` | `usePreloadedQuery` | Seed a query synchronously from an SSR `Preloaded` token, then go live. |
94
+ | `useAgentToolEvents` | `useAgentToolEvents` | One agent thread's tool lifecycle as a `ComputedRef` of discriminated events. |
95
+ | `useVoiceAgent` | `useVoiceAgent` | Full-duplex voice call — refs for status/transcript/level, `startCall`/`endCall`. |
96
+
97
+ `useLiveTopic(topic, options?)` takes the reference `_generated/live.ts` hands out, e.g. `useLiveTopic(live.posts.post({ postId }), { onEvent })`, as a value, a ref or a getter, so a reactive `postId` resubscribes. The stream's route is resolved against the injected `LunoraClient`, and `lastEvent` and `onEvent` are typed by the payload the topic declares. Each connection option (`shardKey`, `sessionKey`, `headers`, `withCredentials`, `retryDelay`, `maxDelayMs`) may be a plain value, a ref, or a getter. `onEvent` and `onError` are plain functions and never trigger a resubscribe. The SSE connection is shared by stream route, and it opens nothing during SSR.
98
+
99
+ `useVoiceAgent` opens nothing until `startCall()` — that call is what requests the microphone, so it must run from a user gesture. `endCall()` releases the socket, the mic tracks and the Web Audio graph, and `onScopeDispose` runs it for you on unmount.
93
100
 
94
101
  ## Related
95
102