@lunora/vue 1.0.0-alpha.31 → 1.0.0-alpha.310

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 (48) hide show
  1. package/README.md +23 -16
  2. package/dist/index.d.mts +1153 -241
  3. package/dist/index.d.ts +1153 -241
  4. package/dist/index.mjs +1 -13
  5. package/dist/packem_shared/AuthLoading-ZXVgXos1.mjs +1 -0
  6. package/dist/packem_shared/LUNORA_INJECTION_KEY-Bct9tKCj.mjs +1 -0
  7. package/dist/packem_shared/hydratePreloaded-DicHNxhB.mjs +1 -0
  8. package/dist/packem_shared/is-browser-BEdfLJHK.mjs +1 -0
  9. package/dist/packem_shared/scope-dispose-Mq3k4nvP.mjs +1 -0
  10. package/dist/packem_shared/subscribeToQuery-BvnA8ErG.mjs +1 -0
  11. package/dist/packem_shared/useAction-C4VLsh4M.mjs +1 -0
  12. package/dist/packem_shared/useAgent-Dsfu13_g.mjs +1 -0
  13. package/dist/packem_shared/useAgentChat-vfEyyMjv.mjs +1 -0
  14. package/dist/packem_shared/useAgentState-_XTW-VKn.mjs +1 -0
  15. package/dist/packem_shared/useAgentToolEvents-C7JtPVMk.mjs +1 -0
  16. package/dist/packem_shared/useAuth-QDllAwZL.mjs +1 -0
  17. package/dist/packem_shared/useConnectionStatus-CCUbKnj2.mjs +1 -0
  18. package/dist/packem_shared/useFlag-xVfWC_c6.mjs +1 -0
  19. package/dist/packem_shared/useInfiniteQuery-CDnZ4oNZ.mjs +1 -0
  20. package/dist/packem_shared/useLiveTopic-B0HA04MY.mjs +1 -0
  21. package/dist/packem_shared/useMutation-D6PkaNaE.mjs +1 -0
  22. package/dist/packem_shared/useMutator-CO7nXlRf.mjs +1 -0
  23. package/dist/packem_shared/usePresence-Dcb5dwMf.mjs +1 -0
  24. package/dist/packem_shared/useRateLimit-zoPsflSG.mjs +1 -0
  25. package/dist/packem_shared/useStream-Cw5oypZN.mjs +1 -0
  26. package/dist/packem_shared/useSubscription-CVjGuFfa.mjs +1 -0
  27. package/dist/packem_shared/useVoiceAgent-Dz1t4xgi.mjs +1 -0
  28. package/dist/server.mjs +1 -1
  29. package/dist/upload.d.mts +2 -0
  30. package/dist/upload.d.ts +2 -0
  31. package/dist/upload.mjs +1 -0
  32. package/package.json +9 -8
  33. package/dist/packem_shared/AuthLoading-DKra8yfG.mjs +0 -29
  34. package/dist/packem_shared/LUNORA_INJECTION_KEY-DQM5MgsC.mjs +0 -26
  35. package/dist/packem_shared/hydratePreloaded-Cnd2GmG1.mjs +0 -14
  36. package/dist/packem_shared/subscribeToQuery-hVYyvgOD.mjs +0 -51
  37. package/dist/packem_shared/useAuth-yXaaF-ro.mjs +0 -28
  38. package/dist/packem_shared/useConnectionStatus-DM_TOaW5.mjs +0 -20
  39. package/dist/packem_shared/useFlag-Diuk30zd.mjs +0 -108
  40. package/dist/packem_shared/useInfiniteQuery-DZMfVEuL.mjs +0 -199
  41. package/dist/packem_shared/useMutation-BKIwT8Jk.mjs +0 -29
  42. package/dist/packem_shared/useMutator-B_Ahs_ZN.mjs +0 -19
  43. package/dist/packem_shared/usePresence-VXq5yGzE.mjs +0 -59
  44. package/dist/packem_shared/useRateLimit-DlPWjcX1.mjs +0 -67
  45. package/dist/packem_shared/useSubscription-DHoCEXNh.mjs +0 -47
  46. package/dist/worker.d.mts +0 -1
  47. package/dist/worker.d.ts +0 -1
  48. package/dist/worker.mjs +0 -1
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