@lunora/angular 1.0.0-alpha.9 → 1.0.0-alpha.91

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 (50) hide show
  1. package/README.md +42 -0
  2. package/dist/index.d.mts +879 -689
  3. package/dist/index.d.ts +879 -689
  4. package/dist/index.mjs +1 -19
  5. package/dist/packem_shared/LUNORA_CLIENT-B0toApHY.mjs +1 -0
  6. package/dist/packem_shared/agent-BCt1D_wQ.mjs +1 -0
  7. package/dist/packem_shared/agentChat-DMMjTLnF.mjs +1 -0
  8. package/dist/packem_shared/agentState-Cdyss0S4.mjs +1 -0
  9. package/dist/packem_shared/agentToolEvents-BOp6-TK8.mjs +1 -0
  10. package/dist/packem_shared/auth-C3dB8sYS.mjs +1 -0
  11. package/dist/packem_shared/connectionStatus-UhmuwzMa.mjs +1 -0
  12. package/dist/packem_shared/flag-BJxkgJR2.mjs +1 -0
  13. package/dist/packem_shared/hydratePreloaded-gUUl_6tS.mjs +1 -0
  14. package/dist/packem_shared/infiniteQuery-yZS4F7PI.mjs +1 -0
  15. package/dist/packem_shared/liveQuery-ZIgKq4et.mjs +1 -0
  16. package/dist/packem_shared/mutate-BZvLQLyu.mjs +1 -0
  17. package/dist/packem_shared/mutator-DjG1yGk8.mjs +1 -0
  18. package/dist/packem_shared/platform-DNlq-CRU.mjs +1 -0
  19. package/dist/packem_shared/presence-DUkZtSSL.mjs +1 -0
  20. package/dist/packem_shared/rateLimit-B3h9qzh-.mjs +1 -0
  21. package/dist/packem_shared/runAction-BfiPq4Xz.mjs +1 -0
  22. package/dist/packem_shared/stream-CVSnLbC2.mjs +1 -0
  23. package/dist/packem_shared/subscription-B_Xj8Ezd.mjs +1 -0
  24. package/dist/packem_shared/voiceAgent-CyPFWGUt.mjs +1 -0
  25. package/dist/server.d.mts +1 -0
  26. package/dist/server.d.ts +1 -0
  27. package/dist/server.mjs +1 -0
  28. package/dist/upload.d.mts +57 -0
  29. package/dist/upload.d.ts +57 -0
  30. package/dist/upload.mjs +1 -0
  31. package/package.json +12 -3
  32. package/dist/packem_shared/LUNORA_CLIENT-DHUfNu9x.mjs +0 -23
  33. package/dist/packem_shared/agent-DDKvrG4u.mjs +0 -31
  34. package/dist/packem_shared/agentChat-C7kUEwO9.mjs +0 -96
  35. package/dist/packem_shared/agentState-C8GWf3t3.mjs +0 -10
  36. package/dist/packem_shared/agentToolEvents-sXgYggvi.mjs +0 -59
  37. package/dist/packem_shared/auth-Df9N87Z4.mjs +0 -27
  38. package/dist/packem_shared/connectionStatus-BlLodleK.mjs +0 -15
  39. package/dist/packem_shared/flag-CGBo90HJ.mjs +0 -70
  40. package/dist/packem_shared/hydratePreloaded-DIpD1cAM.mjs +0 -33
  41. package/dist/packem_shared/infiniteQuery-nboKfr5E.mjs +0 -221
  42. package/dist/packem_shared/liveQuery-DVxKidjM.mjs +0 -32
  43. package/dist/packem_shared/mutate-D3rEHwbb.mjs +0 -8
  44. package/dist/packem_shared/mutator-BHL8bakL.mjs +0 -19
  45. package/dist/packem_shared/platform-Dg8Bppgq.mjs +0 -14
  46. package/dist/packem_shared/presence-BTuq19dS.mjs +0 -77
  47. package/dist/packem_shared/rateLimit-I4kRT9qV.mjs +0 -58
  48. package/dist/packem_shared/stream-PL64AghO.mjs +0 -47
  49. package/dist/packem_shared/subscription-oZ-WTmpp.mjs +0 -39
  50. package/dist/packem_shared/voiceAgent-DwbrDnB9.mjs +0 -401
package/README.md CHANGED
@@ -57,6 +57,31 @@ export class MessagesComponent {
57
57
 
58
58
  Pass `"skip"` as the args to short-circuit (no network call, no socket).
59
59
 
60
+ Pass a function/`Signal` instead of a plain object to make the args reactive —
61
+ each change tears the old subscription down, resets the signal to `undefined`,
62
+ and opens a fresh one for the new args:
63
+
64
+ ```ts
65
+ export class MessagesComponent {
66
+ private readonly channelId = input.required<string>();
67
+
68
+ readonly messages = liveQuery(api.messages.list, () => ({ channelId: this.channelId() }));
69
+ }
70
+ ```
71
+
72
+ `subscription` and `paginatedQuery`/`infiniteQuery` accept the same reactive
73
+ args form. Calling from outside an injection context (e.g. `ngOnInit`) needs an
74
+ explicit `injector` alongside `client`/`destroyRef` for the reactive form —
75
+ `effect()` can't resolve one on its own there:
76
+
77
+ ```ts
78
+ liveQuery(api.messages.list, () => ({ channelId: this.channelId() }), {
79
+ client: this.client,
80
+ destroyRef: this.destroyRef,
81
+ injector: this.injector,
82
+ });
83
+ ```
84
+
60
85
  ## Mutations
61
86
 
62
87
  ```ts
@@ -85,4 +110,21 @@ import { connectionStatus } from "@lunora/angular";
85
110
  readonly status = connectionStatus(); // Signal<"idle" | "connecting" | "connected" | "offline">
86
111
  ```
87
112
 
113
+ ## Agents
114
+
115
+ ```ts
116
+ import { agentToolEvents, voiceAgent } from "@lunora/angular";
117
+
118
+ // One thread's tool lifecycle: call / result / awaiting-approval / progress.
119
+ readonly events = agentToolEvents({ api, threadKey: "t1", stream: api.chat.liveEvents }).events;
120
+
121
+ // A full-duplex voice call against api.agents.<name>Voice.
122
+ readonly call = voiceAgent({ threadKey: "t1", voice: api.agents.supportVoice });
123
+ ```
124
+
125
+ `voiceAgent` opens nothing until `call.startCall()` — that call is what requests
126
+ the microphone, so it must run from a user gesture. `call.endCall()` releases the
127
+ socket, the mic tracks and the Web Audio graph, and the owning `DestroyRef` runs
128
+ it on destroy.
129
+
88
130
  Part of the [Lunora](https://github.com/anolilab/lunora) framework.