@lunora/angular 1.0.0-alpha.50 → 1.0.0-alpha.51

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.
package/README.md CHANGED
@@ -110,4 +110,21 @@ import { connectionStatus } from "@lunora/angular";
110
110
  readonly status = connectionStatus(); // Signal<"idle" | "connecting" | "connected" | "offline">
111
111
  ```
112
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
+
113
130
  Part of the [Lunora](https://github.com/anolilab/lunora) framework.
package/dist/index.d.mts CHANGED
@@ -625,16 +625,22 @@ interface ConnectionStatusOptions {
625
625
  * @experimental
626
626
  */
627
627
  declare const connectionStatus: (options?: ConnectionStatusOptions) => Signal<ConnectionStatus>;
628
+ /** A targeting context merged on top of the app's default (`defineFlags({ identify })`). */
629
+ type FlagContext$1 = Record<string, unknown>;
630
+ /** The value kinds a flag resolves to — OpenFeature's boolean / number / string / structured (JSON) flags. */
631
+ type FlagValue$1 = boolean | number | string | {
632
+ [key: string]: unknown;
633
+ } | unknown[] | null;
628
634
  /**
629
635
  * The value kinds a flag resolves to — OpenFeature's boolean / number / string / structured (JSON) flags.
630
636
  * @experimental
631
637
  */
632
- type FlagValue = boolean | number | string | Record<string, unknown> | unknown[] | null;
638
+ type FlagValue = FlagValue$1;
633
639
  /**
634
640
  * Targeting context bag forwarded to the OpenFeature provider.
635
641
  * @experimental
636
642
  */
637
- type FlagContext = Record<string, unknown>;
643
+ type FlagContext = FlagContext$1;
638
644
  /**
639
645
  * `FlagOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
640
646
  * @experimental
@@ -660,7 +666,8 @@ interface FlagOptions {
660
666
  *
661
667
  * Evaluation runs through whatever OpenFeature provider the app wired in
662
668
  * `lunora/flags.ts`; the read never throws — a provider error resolves the
663
- * default (the same fail-open contract as server-side `ctx.flags`).
669
+ * default (the same fail-open contract as server-side `ctx.flags`). No
670
+ * subscription opens during SSR; the signal stays at `defaultValue`.
664
671
  *
665
672
  * Call from an injection context:
666
673
  * ```ts
package/dist/index.d.ts CHANGED
@@ -625,16 +625,22 @@ interface ConnectionStatusOptions {
625
625
  * @experimental
626
626
  */
627
627
  declare const connectionStatus: (options?: ConnectionStatusOptions) => Signal<ConnectionStatus>;
628
+ /** A targeting context merged on top of the app's default (`defineFlags({ identify })`). */
629
+ type FlagContext$1 = Record<string, unknown>;
630
+ /** The value kinds a flag resolves to — OpenFeature's boolean / number / string / structured (JSON) flags. */
631
+ type FlagValue$1 = boolean | number | string | {
632
+ [key: string]: unknown;
633
+ } | unknown[] | null;
628
634
  /**
629
635
  * The value kinds a flag resolves to — OpenFeature's boolean / number / string / structured (JSON) flags.
630
636
  * @experimental
631
637
  */
632
- type FlagValue = boolean | number | string | Record<string, unknown> | unknown[] | null;
638
+ type FlagValue = FlagValue$1;
633
639
  /**
634
640
  * Targeting context bag forwarded to the OpenFeature provider.
635
641
  * @experimental
636
642
  */
637
- type FlagContext = Record<string, unknown>;
643
+ type FlagContext = FlagContext$1;
638
644
  /**
639
645
  * `FlagOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
640
646
  * @experimental
@@ -660,7 +666,8 @@ interface FlagOptions {
660
666
  *
661
667
  * Evaluation runs through whatever OpenFeature provider the app wired in
662
668
  * `lunora/flags.ts`; the read never throws — a provider error resolves the
663
- * default (the same fail-open contract as server-side `ctx.flags`).
669
+ * default (the same fail-open contract as server-side `ctx.flags`). No
670
+ * subscription opens during SSR; the signal stays at `defaultValue`.
664
671
  *
665
672
  * Call from an injection context:
666
673
  * ```ts
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{agent as t}from"./packem_shared/agent-BPvUvuXh.mjs";import{agentChat as m}from"./packem_shared/agentChat-BgD9zNFw.mjs";import{agentState as f}from"./packem_shared/agentState-BBAruY2b.mjs";import{agentToolEvents as n}from"./packem_shared/agentToolEvents-CUwrn-Nu.mjs";import{auth as i,authGate as u}from"./packem_shared/auth-BgwruT_M.mjs";import{LUNORA_CLIENT as c,injectLunoraClient as s,provideLunora as l}from"./packem_shared/LUNORA_CLIENT-B0toApHY.mjs";import{connectionStatus as L}from"./packem_shared/connectionStatus-UhmuwzMa.mjs";import{flag as v,flags as y}from"./packem_shared/flag-orUoJY7A.mjs";import{hydratePreloaded as C}from"./packem_shared/hydratePreloaded-C8lNoww0.mjs";import{liveQuery as S}from"./packem_shared/liveQuery-BvA2co81.mjs";import{mutate as I}from"./packem_shared/mutate-BZvLQLyu.mjs";import{mutator as P}from"./packem_shared/mutator-DjG1yGk8.mjs";import{infiniteQuery as b,paginatedQuery as j}from"./packem_shared/infiniteQuery-B5Q21vgn.mjs";import{presence as K}from"./packem_shared/presence-vJUxsR5f.mjs";import{rateLimit as R}from"./packem_shared/rateLimit-B3h9qzh-.mjs";import{runAction as _}from"./packem_shared/runAction-BfiPq4Xz.mjs";import{stream as q}from"./packem_shared/stream-CcjYdpzt.mjs";import{subscription as z}from"./packem_shared/subscription-DqtYnats.mjs";import{voiceAgent as D}from"./packem_shared/voiceAgent-CzyUcUKj.mjs";import{SKIP as H}from"@lunora/client/query";export{c as LUNORA_CLIENT,H as SKIP,t as agent,m as agentChat,f as agentState,n as agentToolEvents,i as auth,u as authGate,L as connectionStatus,v as flag,y as flags,C as hydratePreloaded,b as infiniteQuery,s as injectLunoraClient,S as liveQuery,I as mutate,P as mutator,j as paginatedQuery,K as presence,l as provideLunora,R as rateLimit,_ as runAction,q as stream,z as subscription,D as voiceAgent};
1
+ import{agent as t}from"./packem_shared/agent-BPvUvuXh.mjs";import{agentChat as m}from"./packem_shared/agentChat-BgD9zNFw.mjs";import{agentState as f}from"./packem_shared/agentState-BBAruY2b.mjs";import{agentToolEvents as n}from"./packem_shared/agentToolEvents-CUwrn-Nu.mjs";import{auth as i,authGate as u}from"./packem_shared/auth-BgwruT_M.mjs";import{LUNORA_CLIENT as c,injectLunoraClient as s,provideLunora as l}from"./packem_shared/LUNORA_CLIENT-B0toApHY.mjs";import{connectionStatus as L}from"./packem_shared/connectionStatus-UhmuwzMa.mjs";import{flag as v,flags as y}from"./packem_shared/flag-qIhLP3Uo.mjs";import{hydratePreloaded as C}from"./packem_shared/hydratePreloaded-C8lNoww0.mjs";import{liveQuery as S}from"./packem_shared/liveQuery-BvA2co81.mjs";import{mutate as I}from"./packem_shared/mutate-BZvLQLyu.mjs";import{mutator as P}from"./packem_shared/mutator-DjG1yGk8.mjs";import{infiniteQuery as b,paginatedQuery as j}from"./packem_shared/infiniteQuery-B5Q21vgn.mjs";import{presence as K}from"./packem_shared/presence-vJUxsR5f.mjs";import{rateLimit as R}from"./packem_shared/rateLimit-B3h9qzh-.mjs";import{runAction as _}from"./packem_shared/runAction-BfiPq4Xz.mjs";import{stream as q}from"./packem_shared/stream-CcjYdpzt.mjs";import{subscription as z}from"./packem_shared/subscription-DqtYnats.mjs";import{voiceAgent as D}from"./packem_shared/voiceAgent-CzyUcUKj.mjs";import{SKIP as H}from"@lunora/client/query";export{c as LUNORA_CLIENT,H as SKIP,t as agent,m as agentChat,f as agentState,n as agentToolEvents,i as auth,u as authGate,L as connectionStatus,v as flag,y as flags,C as hydratePreloaded,b as infiniteQuery,s as injectLunoraClient,S as liveQuery,I as mutate,P as mutator,j as paginatedQuery,K as presence,l as provideLunora,R as rateLimit,_ as runAction,q as stream,z as subscription,D as voiceAgent};
@@ -0,0 +1 @@
1
+ import{inject as l,DestroyRef as u,signal as a}from"@angular/core";import{resolveLunoraClient as d}from"./LUNORA_CLIENT-B0toApHY.mjs";import{s as i}from"./platform-I2VyCEIl.mjs";const m="__lunora_flags__:eval",x=n=>{const e=typeof n;return e==="boolean"||e==="number"||e==="string"?e:"object"},_={__lunoraRef:m},y=(n,e,t)=>{try{return n.subscribe(_,{context:e.context,default:e.default,key:e.key,type:x(e.default)},c=>{t(c)},{onError:()=>{t(e.default)}})}catch{return()=>{}}},g=(n,e,t={})=>{const c=d(t.client),f=t.destroyRef===void 0,o=t.destroyRef??l(u),r=a(e);return i(f)&&o.onDestroy(y(c,{context:t.context,default:e,key:n},s=>{r.set(s)})),r.asReadonly()},h=(n,e={})=>{const t=d(e.client),c=e.destroyRef===void 0,f=e.destroyRef??l(u),o=a({...n});if(!i(c))return o.asReadonly();const r=[];for(const[s,b]of Object.entries(n))r.push(y(t,{context:e.context,default:b,key:s},R=>{o.set({...o(),[s]:R})}));return f.onDestroy(()=>{for(const s of r)s()}),o.asReadonly()};export{g as flag,h as flags};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/angular",
3
- "version": "1.0.0-alpha.50",
3
+ "version": "1.0.0-alpha.51",
4
4
  "description": "Angular reactive adapter for Lunora — signal-based live queries and mutations",
5
5
  "keywords": [
6
6
  "angular",
@@ -53,8 +53,8 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@lunora/client": "1.0.0-alpha.66",
57
- "@lunora/ratelimit": "1.0.0-alpha.30",
56
+ "@lunora/client": "1.0.0-alpha.67",
57
+ "@lunora/ratelimit": "1.0.0-alpha.31",
58
58
  "@visulima/storage-client": "1.0.2"
59
59
  },
60
60
  "peerDependencies": {
@@ -1 +0,0 @@
1
- import{inject as l,DestroyRef as i,signal as a}from"@angular/core";import{resolveLunoraClient as b}from"./LUNORA_CLIENT-B0toApHY.mjs";const d="__lunora_flags__:eval",y=o=>{const e=typeof o;return e==="boolean"||e==="number"||e==="string"?e:"object"},R={__lunoraRef:d},x=(o,e,r={})=>{const f=b(r.client),n=r.destroyRef??l(i),c=y(e),t=a(e);let s;try{s=f.subscribe(R,{context:r.context,default:e,key:o,type:c},u=>{t.set(u)},{onError:()=>{t.set(e)}})}catch{}return s&&n.onDestroy(s),t.asReadonly()},v=(o,e={})=>{const r=b(e.client),f=e.destroyRef??l(i),n=a({...o}),c=[];for(const[t,s]of Object.entries(o))try{const u=r.subscribe(R,{context:e.context,default:s,key:t,type:y(s)},_=>{n.set({...n(),[t]:_})},{onError:()=>{n.set({...n(),[t]:s})}});c.push(u)}catch{}return f.onDestroy(()=>{for(const t of c)t()}),n.asReadonly()};export{x as flag,v as flags};