@lunora/angular 1.0.0-alpha.21 → 1.0.0-alpha.211
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 +42 -0
- package/dist/index.d.mts +229 -50
- package/dist/index.d.ts +229 -50
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/LUNORA_CLIENT-B0toApHY.mjs +1 -0
- package/dist/packem_shared/agent-DjMQf-yE.mjs +1 -0
- package/dist/packem_shared/agentChat-DyJrje49.mjs +1 -0
- package/dist/packem_shared/agentState-Bjqf9q2f.mjs +1 -0
- package/dist/packem_shared/agentToolEvents-VuBRpS6v.mjs +1 -0
- package/dist/packem_shared/auth-C3dB8sYS.mjs +1 -0
- package/dist/packem_shared/connectionStatus-UhmuwzMa.mjs +1 -0
- package/dist/packem_shared/flag-BDKBQGos.mjs +1 -0
- package/dist/packem_shared/hydratePreloaded-QPAo50Am.mjs +1 -0
- package/dist/packem_shared/infiniteQuery-DGYdgFHW.mjs +1 -0
- package/dist/packem_shared/liveQuery-eE9zMaxo.mjs +1 -0
- package/dist/packem_shared/mutate-BZvLQLyu.mjs +1 -0
- package/dist/packem_shared/mutator-DjG1yGk8.mjs +1 -0
- package/dist/packem_shared/platform-DGTu4Ucl.mjs +1 -0
- package/dist/packem_shared/presence-1T4-U8ij.mjs +1 -0
- package/dist/packem_shared/rateLimit-B3h9qzh-.mjs +1 -0
- package/dist/packem_shared/runAction-BfiPq4Xz.mjs +1 -0
- package/dist/packem_shared/stream-BuhiwhIH.mjs +1 -0
- package/dist/packem_shared/subscription-zJv48q6C.mjs +1 -0
- package/dist/packem_shared/voiceAgent-CH--tRWP.mjs +1 -0
- package/dist/server.d.mts +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.mjs +1 -0
- package/dist/upload.mjs +1 -1
- package/package.json +9 -4
- package/dist/packem_shared/LUNORA_CLIENT-B0pGE0Tv.mjs +0 -1
- package/dist/packem_shared/agent-C-GavfBl.mjs +0 -1
- package/dist/packem_shared/agentChat-Bay8gA8i.mjs +0 -1
- package/dist/packem_shared/agentState-BAfa0QuC.mjs +0 -1
- package/dist/packem_shared/agentToolEvents-CBTZ_DsO.mjs +0 -1
- package/dist/packem_shared/auth-BTEtMnGG.mjs +0 -1
- package/dist/packem_shared/connectionStatus-C53UhkPi.mjs +0 -1
- package/dist/packem_shared/flag-BYFWoQTg.mjs +0 -1
- package/dist/packem_shared/hydratePreloaded-BKHgpXzQ.mjs +0 -1
- package/dist/packem_shared/infiniteQuery-C-T8hD7-.mjs +0 -1
- package/dist/packem_shared/liveQuery-DEIqmTPj.mjs +0 -1
- package/dist/packem_shared/mutate-DR8Uo8Hs.mjs +0 -1
- package/dist/packem_shared/mutator-Cw6jpG06.mjs +0 -1
- package/dist/packem_shared/platform-BGZypnc9.mjs +0 -1
- package/dist/packem_shared/presence-BMrTlOCF.mjs +0 -1
- package/dist/packem_shared/rateLimit-CQazDrPJ.mjs +0 -1
- package/dist/packem_shared/stream-CcvHiJf2.mjs +0 -1
- package/dist/packem_shared/subscription-DJeoGEDR.mjs +0 -1
- package/dist/packem_shared/voiceAgent-CwlzrEjH.mjs +0 -1
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.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DestroyRef, Signal, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
2
|
-
import { FunctionReference, LunoraClient, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle } from '@lunora/client';
|
|
1
|
+
import { DestroyRef, Signal, InjectionToken, EnvironmentProviders, Injector } from '@angular/core';
|
|
2
|
+
import { FunctionReference, LunoraClient, SubscriptionErrorCallback, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
3
3
|
export type { ArgsOf, ConnectionStatus, FunctionReference, LunoraClient, LunoraClientOptions, MutationCallOptions, Preloaded, ReturnOf, SubscriptionError, Unsubscribe } from '@lunora/client';
|
|
4
|
+
import { AuthStatus } from '@lunora/client/auth';
|
|
4
5
|
import { PaginationStatus } from '@lunora/client/pagination';
|
|
5
6
|
import { RateLimitStatus, RateLimitConfig } from '@lunora/ratelimit';
|
|
6
7
|
export { SKIP } from '@lunora/client/query';
|
|
@@ -22,8 +23,12 @@ type AgentThreadStatus = "awaiting_input" | "cancelled" | "error" | "idle" | "ru
|
|
|
22
23
|
*/
|
|
23
24
|
interface AgentThreadRecord {
|
|
24
25
|
createdAt?: number;
|
|
25
|
-
/**
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The failure message when `status === "error"`, `null` once a later run
|
|
28
|
+
* cleared it, absent on a thread that has never failed. Read it for
|
|
29
|
+
* truthiness — `null` and absent both mean "no error".
|
|
30
|
+
*/
|
|
31
|
+
error?: null | string;
|
|
27
32
|
/** The workflow instance id of the in-flight run — the handle `cancel` targets. */
|
|
28
33
|
instanceId?: string;
|
|
29
34
|
messageCount?: number;
|
|
@@ -125,7 +130,7 @@ interface AgentOptions {
|
|
|
125
130
|
api: AgentApi;
|
|
126
131
|
/**
|
|
127
132
|
* Optional app mutation over the agent's cancel path
|
|
128
|
-
* (`ctx.agents
|
|
133
|
+
* (`ctx.agents.<name>.cancel(id)`). Called with `{ instanceId, threadKey }`.
|
|
129
134
|
* When omitted (or no run is in flight) {@link AgentResult.cancel} is a no-op.
|
|
130
135
|
*/
|
|
131
136
|
cancel?: FunctionReference<"mutation">;
|
|
@@ -136,9 +141,15 @@ interface AgentOptions {
|
|
|
136
141
|
* `inject(DestroyRef)` — the calling component/service.
|
|
137
142
|
*/
|
|
138
143
|
destroyRef?: DestroyRef;
|
|
144
|
+
/**
|
|
145
|
+
* Called when the live thread subscription reports an error (a session
|
|
146
|
+
* expiry, an RLS denial). Without it — and without reading `error` — such a
|
|
147
|
+
* failure is invisible and `thread` / `status` are cleared until a later frame arrives.
|
|
148
|
+
*/
|
|
149
|
+
onError?: SubscriptionErrorCallback;
|
|
139
150
|
/**
|
|
140
151
|
* The app mutation that starts (or continues) a run — a thin wrapper over
|
|
141
|
-
* `ctx.agents
|
|
152
|
+
* `ctx.agents.<name>.run(...)`. Called with `{ threadKey, input }` merged with
|
|
142
153
|
* {@link AgentOptions.runArgs} and the per-call args.
|
|
143
154
|
*/
|
|
144
155
|
run: FunctionReference<"mutation">;
|
|
@@ -157,6 +168,8 @@ interface AgentResult {
|
|
|
157
168
|
* no-op when no `cancel` mutation was supplied or no run is in flight.
|
|
158
169
|
*/
|
|
159
170
|
cancel: () => Promise<void>;
|
|
171
|
+
/** The live thread subscription's last error, or `undefined`. */
|
|
172
|
+
error: Signal<SubscriptionError | undefined>;
|
|
160
173
|
/** `true` while a `run` invocation is in flight. */
|
|
161
174
|
pending: Signal<boolean>;
|
|
162
175
|
/** Start (or continue) a run with a user message; extra args merge over `runArgs`. */
|
|
@@ -174,7 +187,7 @@ interface AgentResult {
|
|
|
174
187
|
* conversation surface (durable history + streaming + approvals) use `agentChat`.
|
|
175
188
|
*
|
|
176
189
|
* `run` and `cancel` stay generic over the app-defined mutations that wrap
|
|
177
|
-
* `ctx.agents
|
|
190
|
+
* `ctx.agents.<name>.run` / `.cancel`, so the primitive hard-codes no function
|
|
178
191
|
* names beyond the `agents:*` surface.
|
|
179
192
|
*
|
|
180
193
|
* Call from an injection context (component/service field or constructor); pass an
|
|
@@ -232,7 +245,7 @@ interface AgentChatOptions {
|
|
|
232
245
|
api: AgentChatApi;
|
|
233
246
|
/**
|
|
234
247
|
* Optional app mutation over the agent's cancel path
|
|
235
|
-
* (`ctx.agents
|
|
248
|
+
* (`ctx.agents.<name>.cancel(id)`). Called with `{ instanceId, threadKey }`.
|
|
236
249
|
* When omitted (or no run is in flight) {@link AgentChatResult.cancel} is a
|
|
237
250
|
* no-op.
|
|
238
251
|
*/
|
|
@@ -246,9 +259,15 @@ interface AgentChatOptions {
|
|
|
246
259
|
destroyRef?: DestroyRef;
|
|
247
260
|
/** History depth forwarded to `agents:agentMessages`. */
|
|
248
261
|
limit?: number;
|
|
262
|
+
/**
|
|
263
|
+
* Called when the live history or thread subscription reports an error (a
|
|
264
|
+
* session expiry, an RLS denial). Without it — and without reading `error` —
|
|
265
|
+
* such a failure is invisible and `messages` / `status` are cleared until a later frame arrives.
|
|
266
|
+
*/
|
|
267
|
+
onError?: SubscriptionErrorCallback;
|
|
249
268
|
/**
|
|
250
269
|
* The app mutation that starts (or continues) a run — a thin wrapper over
|
|
251
|
-
* `ctx.agents
|
|
270
|
+
* `ctx.agents.<name>.run(...)`. Called with `{ threadKey, input }` merged with
|
|
252
271
|
* {@link AgentChatOptions.sendArgs} and the per-call args.
|
|
253
272
|
*/
|
|
254
273
|
send: FunctionReference<"mutation">;
|
|
@@ -275,6 +294,8 @@ interface AgentChatResult {
|
|
|
275
294
|
* no-op when no `cancel` mutation was supplied or no run is in flight.
|
|
276
295
|
*/
|
|
277
296
|
cancel: () => Promise<void>;
|
|
297
|
+
/** The history or thread subscription's last error, or `undefined`. */
|
|
298
|
+
error: Signal<SubscriptionError | undefined>;
|
|
278
299
|
/** Durable thread history (oldest first) plus any un-acknowledged optimistic user turns. */
|
|
279
300
|
messages: Signal<ReadonlyArray<AgentChatMessage>>;
|
|
280
301
|
/** Reject a paused human-in-the-loop tool call (optionally with a reason). */
|
|
@@ -363,7 +384,7 @@ interface AgentStateResult<T> {
|
|
|
363
384
|
* only on a real `setState`. The Angular counterpart to React's `useAgentState`,
|
|
364
385
|
* re-expressed with signals.
|
|
365
386
|
*
|
|
366
|
-
* Generic over the app's state shape (`agentState
|
|
387
|
+
* Generic over the app's state shape (`agentState<SupportState>(...)`, itself a
|
|
367
388
|
* record) — the reference is typed as an optional record because codegen cannot see
|
|
368
389
|
* the per-agent state type; the generic casts to `T`. The `extends` bound (not a
|
|
369
390
|
* bare unbounded type parameter) is required: this `.ts` file is parsed JSX-aware by
|
|
@@ -502,6 +523,12 @@ interface AuthOptions {
|
|
|
502
523
|
interface AuthResult {
|
|
503
524
|
/** Set the auth token (sign-in / sign-out). */
|
|
504
525
|
setToken: (token: string | null) => void;
|
|
526
|
+
/**
|
|
527
|
+
* The resolved auth state. Branch on this, not on `user() === null` — see the
|
|
528
|
+
* contract in `@lunora/client/auth`; `user` is `null` both when signed out
|
|
529
|
+
* and when a held credential's identity could not be resolved.
|
|
530
|
+
*/
|
|
531
|
+
status: Signal<AuthStatus>;
|
|
505
532
|
/** The current auth token, or `null`. */
|
|
506
533
|
token: Signal<string | null>;
|
|
507
534
|
/** The resolved user from `store.getUser()`, or `null`. */
|
|
@@ -529,18 +556,20 @@ declare const auth: (options?: AuthOptions) => AuthResult;
|
|
|
529
556
|
* @experimental
|
|
530
557
|
*/
|
|
531
558
|
interface AuthGateResult {
|
|
532
|
-
/** `true` once a
|
|
559
|
+
/** `true` once a credential is held and nothing has contradicted it. */
|
|
533
560
|
isAuthenticated: Signal<boolean>;
|
|
534
|
-
/** `true` while a
|
|
561
|
+
/** `true` while a credential's first identity resolve is in flight. */
|
|
535
562
|
isLoading: Signal<boolean>;
|
|
536
563
|
}
|
|
537
564
|
/**
|
|
538
565
|
* Derived auth-gate signals for template gating (Angular's `\@if` control
|
|
539
566
|
* flow), built on {@link auth}. Angular has no JSX-style `Authenticated` slot
|
|
540
567
|
* component the way React/Vue/Solid do, so this exposes the same three-state
|
|
541
|
-
* logic as two booleans instead
|
|
542
|
-
*
|
|
543
|
-
*
|
|
568
|
+
* logic as two booleans instead, mapped from the shared `AuthStatus` contract in
|
|
569
|
+
* `@lunora/client/auth`: a credential whose first identity resolve is in flight
|
|
570
|
+
* is `isLoading`; a credential nothing has contradicted — including one whose
|
|
571
|
+
* identity endpoint is unreachable — is `isAuthenticated`; no session is neither
|
|
572
|
+
* (the signed-out state a template checks for with a plain `\@else`).
|
|
544
573
|
*
|
|
545
574
|
* Call from an injection context (component/service field or constructor):
|
|
546
575
|
* ```ts
|
|
@@ -625,16 +654,15 @@ interface ConnectionStatusOptions {
|
|
|
625
654
|
* @experimental
|
|
626
655
|
*/
|
|
627
656
|
declare const connectionStatus: (options?: ConnectionStatusOptions) => Signal<ConnectionStatus>;
|
|
657
|
+
/** The value kinds a flag resolves to — OpenFeature's boolean / number / string / structured (JSON) flags. */
|
|
658
|
+
type FlagValue$1 = boolean | number | string | {
|
|
659
|
+
[key: string]: unknown;
|
|
660
|
+
} | unknown[] | null;
|
|
628
661
|
/**
|
|
629
662
|
* The value kinds a flag resolves to — OpenFeature's boolean / number / string / structured (JSON) flags.
|
|
630
663
|
* @experimental
|
|
631
664
|
*/
|
|
632
|
-
type FlagValue =
|
|
633
|
-
/**
|
|
634
|
-
* Targeting context bag forwarded to the OpenFeature provider.
|
|
635
|
-
* @experimental
|
|
636
|
-
*/
|
|
637
|
-
type FlagContext = Record<string, unknown>;
|
|
665
|
+
type FlagValue = FlagValue$1;
|
|
638
666
|
/**
|
|
639
667
|
* `FlagOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
640
668
|
* @experimental
|
|
@@ -642,11 +670,6 @@ type FlagContext = Record<string, unknown>;
|
|
|
642
670
|
interface FlagOptions {
|
|
643
671
|
/** Client to bind to. Defaults to the injected `LUNORA_CLIENT`. */
|
|
644
672
|
client?: LunoraClient;
|
|
645
|
-
/**
|
|
646
|
-
* Per-call targeting context merged on top of the app's default `identify`
|
|
647
|
-
* targeting key.
|
|
648
|
-
*/
|
|
649
|
-
context?: FlagContext;
|
|
650
673
|
/** `DestroyRef` whose `onDestroy` tears down the subscription. Defaults to `inject(DestroyRef)`. */
|
|
651
674
|
destroyRef?: DestroyRef;
|
|
652
675
|
}
|
|
@@ -658,9 +681,16 @@ interface FlagOptions {
|
|
|
658
681
|
* The flag's kind is inferred from `defaultValue`'s runtime type, so
|
|
659
682
|
* `flag("dark", false)` reads a boolean and `flag("hero", "control")` a string.
|
|
660
683
|
*
|
|
684
|
+
* The reactive channel is public, so the server evaluates every flag under the
|
|
685
|
+
* socket's own verified identity — the targeting key your `defineFlags({
|
|
686
|
+
* identify })` derives — and accepts no client-supplied targeting context. For
|
|
687
|
+
* evaluation under a context you compute, call `ctx.flags.*` inside a query,
|
|
688
|
+
* mutation, or action and return the resolved value.
|
|
689
|
+
*
|
|
661
690
|
* Evaluation runs through whatever OpenFeature provider the app wired in
|
|
662
691
|
* `lunora/flags.ts`; the read never throws — a provider error resolves the
|
|
663
|
-
* default (the same fail-open contract as server-side `ctx.flags`).
|
|
692
|
+
* default (the same fail-open contract as server-side `ctx.flags`). No
|
|
693
|
+
* subscription opens during SSR; the signal stays at `defaultValue`.
|
|
664
694
|
*
|
|
665
695
|
* Call from an injection context:
|
|
666
696
|
* ```ts
|
|
@@ -676,11 +706,6 @@ declare const flag: <T extends FlagValue>(key: string, defaultValue: T, options?
|
|
|
676
706
|
interface FlagsOptions {
|
|
677
707
|
/** Client to bind to. Defaults to the injected `LUNORA_CLIENT`. */
|
|
678
708
|
client?: LunoraClient;
|
|
679
|
-
/**
|
|
680
|
-
* Targeting context shared by every flag in the set, merged on top of the
|
|
681
|
-
* app's default `identify` targeting key.
|
|
682
|
-
*/
|
|
683
|
-
context?: FlagContext;
|
|
684
709
|
/** `DestroyRef` whose `onDestroy` tears down the subscriptions. Defaults to `inject(DestroyRef)`. */
|
|
685
710
|
destroyRef?: DestroyRef;
|
|
686
711
|
}
|
|
@@ -689,7 +714,8 @@ interface FlagsOptions {
|
|
|
689
714
|
*
|
|
690
715
|
* Pass a record of `key → defaultValue`; each flag's kind is inferred from its
|
|
691
716
|
* default, and the returned signal holds the same-shaped record with resolved
|
|
692
|
-
* values (the defaults until each evaluation lands).
|
|
717
|
+
* values (the defaults until each evaluation lands). Like {@link flag} it
|
|
718
|
+
* evaluates under the socket's server-verified identity only.
|
|
693
719
|
*
|
|
694
720
|
* Call from an injection context:
|
|
695
721
|
* ```ts
|
|
@@ -713,7 +739,7 @@ interface HydratePreloadedOptions {
|
|
|
713
739
|
* @experimental
|
|
714
740
|
*/
|
|
715
741
|
interface HydratePreloadedResult<T> {
|
|
716
|
-
/** The latest value pushed by the server. Seeded synchronously from the preloaded value. */
|
|
742
|
+
/** The latest value pushed by the server. Seeded synchronously from the preloaded value until an identity is retired. */
|
|
717
743
|
data: Signal<T | undefined>;
|
|
718
744
|
/** The latest subscription error, or `undefined`. */
|
|
719
745
|
error: Signal<SubscriptionError | undefined>;
|
|
@@ -731,6 +757,12 @@ interface HydratePreloadedResult<T> {
|
|
|
731
757
|
*
|
|
732
758
|
* The subscription tears down when the owning `DestroyRef` fires.
|
|
733
759
|
*
|
|
760
|
+
* The preloaded value was read for whoever was signed in when the page loaded.
|
|
761
|
+
* After a sign-out or user switch retires that identity
|
|
762
|
+
* (`client.identityEpoch() > 0`), every `hydratePreloaded` on the client (created
|
|
763
|
+
* then or later) stops using it and `data` holds `undefined` until the live value
|
|
764
|
+
* arrives — matching `@lunora/react`'s `usePreloadedQuery`.
|
|
765
|
+
*
|
|
734
766
|
* Call from an injection context:
|
|
735
767
|
* ```ts
|
|
736
768
|
* readonly { data, error } = hydratePreloaded(preloadedMessages);
|
|
@@ -754,6 +786,16 @@ interface LiveQueryOptions {
|
|
|
754
786
|
* component is destroyed. Pass one explicitly to control the lifetime yourself.
|
|
755
787
|
*/
|
|
756
788
|
destroyRef?: DestroyRef;
|
|
789
|
+
/**
|
|
790
|
+
* `Injector` to create the reactive-args `effect()` from. Only needed when
|
|
791
|
+
* `args` is a function/`Signal` AND `liveQuery` is called outside an injection
|
|
792
|
+
* context (an explicit `destroyRef` is also being passed — e.g. from
|
|
793
|
+
* `ngOnInit`, or from a test with no `TestBed`) — `effect()` cannot resolve an
|
|
794
|
+
* injector on its own there. Defaults to the ambient injection context, the
|
|
795
|
+
* same source `inject(DestroyRef)` already relies on. Unused for the static
|
|
796
|
+
* `args` form, which never creates an `effect()`.
|
|
797
|
+
*/
|
|
798
|
+
injector?: Injector;
|
|
757
799
|
/**
|
|
758
800
|
* Called when the subscription errors after the initial attach — the async
|
|
759
801
|
* error channel `createQuerySubscription` only wires when a sink is present.
|
|
@@ -787,9 +829,17 @@ interface LiveQueryOptions {
|
|
|
787
829
|
* short-circuit — no network call, no socket; the signal stays `undefined`. To
|
|
788
830
|
* call outside an injection context (e.g. lazily in `ngOnInit`), supply `client`
|
|
789
831
|
* and `destroyRef` via {@link LiveQueryOptions}.
|
|
832
|
+
*
|
|
833
|
+
* `args` also accepts a function/`Signal` — `() => ({ channelId: channelId() })`
|
|
834
|
+
* — to make the subscription reactive: an args change tears the old
|
|
835
|
+
* subscription down, resets the signal to `undefined`, and opens a fresh one
|
|
836
|
+
* for the new args, mirroring
|
|
837
|
+
* `@lunora/solid`'s `createQuery`/`@lunora/vue`'s `useQuery`. A static (plain
|
|
838
|
+
* object) `args` resolves once and never re-runs — no `effect()` is created for
|
|
839
|
+
* it, so it carries none of the reactive form's DI requirement.
|
|
790
840
|
* @experimental
|
|
791
841
|
*/
|
|
792
|
-
declare const liveQuery: <F extends FunctionReference>(reference: F, args: ArgsOf<F> | "skip", options?: LiveQueryOptions) => Signal<ReturnOf<F> | undefined>;
|
|
842
|
+
declare const liveQuery: <F extends FunctionReference>(reference: F, args: ArgsOf<F> | "skip" | (() => ArgsOf<F> | "skip"), options?: LiveQueryOptions) => Signal<ReturnOf<F> | undefined>;
|
|
793
843
|
/**
|
|
794
844
|
* `MutateOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
795
845
|
* @experimental
|
|
@@ -877,6 +927,15 @@ interface PaginatedQueryOptions {
|
|
|
877
927
|
destroyRef?: DestroyRef;
|
|
878
928
|
/** Page size for the first page (and the default for `loadMore`). */
|
|
879
929
|
initialNumItems: number;
|
|
930
|
+
/**
|
|
931
|
+
* `Injector` to create the reactive-args `effect()` from. Only needed when
|
|
932
|
+
* `args` is a function/`Signal` AND the call is outside an injection context
|
|
933
|
+
* (an explicit `destroyRef` is also being passed). Defaults to the ambient
|
|
934
|
+
* injection context. Unused for the static `args` form.
|
|
935
|
+
*/
|
|
936
|
+
injector?: Injector;
|
|
937
|
+
/** Called when a page subscription reports an error (also surfaced on the `error` signal). */
|
|
938
|
+
onError?: SubscriptionErrorCallback;
|
|
880
939
|
/** Route to a specific shard when the target function is `.shardBy(...)`-partitioned. */
|
|
881
940
|
shardKey?: string;
|
|
882
941
|
}
|
|
@@ -885,6 +944,13 @@ interface PaginatedQueryOptions {
|
|
|
885
944
|
* @experimental
|
|
886
945
|
*/
|
|
887
946
|
interface PaginatedQueryResult<T> {
|
|
947
|
+
/**
|
|
948
|
+
* The last page subscription error, or `undefined`. A tail page that fails
|
|
949
|
+
* before its first frame is dropped so `status` returns to `"CanLoadMore"`
|
|
950
|
+
* and `loadMore` can retry it; cleared by the next successful frame,
|
|
951
|
+
* `loadMore`, or an args change.
|
|
952
|
+
*/
|
|
953
|
+
error: Signal<SubscriptionError | undefined>;
|
|
888
954
|
/** `true` while the first page or a `loadMore` page is in flight. */
|
|
889
955
|
isLoading: Signal<boolean>;
|
|
890
956
|
/** Request the next page. A no-op unless `status === "CanLoadMore"`. */
|
|
@@ -899,6 +965,8 @@ interface PaginatedQueryResult<T> {
|
|
|
899
965
|
* @experimental
|
|
900
966
|
*/
|
|
901
967
|
interface InfiniteQueryResult<T> {
|
|
968
|
+
/** The last page subscription error, or `undefined` — see `PaginatedQueryResult.error`. */
|
|
969
|
+
error: Signal<SubscriptionError | undefined>;
|
|
902
970
|
/** Request the next page. A no-op unless `status === "CanLoadMore"`. */
|
|
903
971
|
fetchNextPage: (numberItems?: number) => void;
|
|
904
972
|
/** `true` when the loaded tail reports it can load another page. */
|
|
@@ -927,9 +995,13 @@ interface InfiniteQueryResult<T> {
|
|
|
927
995
|
* ```ts
|
|
928
996
|
* readonly messages = paginatedQuery(api.messages.list, {}, { initialNumItems: 20 });
|
|
929
997
|
* ```
|
|
998
|
+
*
|
|
999
|
+
* `args` also accepts a function/`Signal` to make the query reactive — an args
|
|
1000
|
+
* change disposes the current pagination engine and builds a fresh one for the
|
|
1001
|
+
* new args. A static (plain object) `args` resolves once and never re-runs.
|
|
930
1002
|
* @experimental
|
|
931
1003
|
*/
|
|
932
|
-
declare const paginatedQuery: <F extends FunctionReference>(reference: F, args: PaginatedArgs<F> | "skip", options: PaginatedQueryOptions) => PaginatedQueryResult<PageItemOf<F>>;
|
|
1004
|
+
declare const paginatedQuery: <F extends FunctionReference>(reference: F, args: PaginatedArgs<F> | "skip" | (() => PaginatedArgs<F> | "skip"), options: PaginatedQueryOptions) => PaginatedQueryResult<PageItemOf<F>>;
|
|
933
1005
|
/**
|
|
934
1006
|
* Subscribe to a reactively-paginated query and expose its pages discretely.
|
|
935
1007
|
*
|
|
@@ -941,9 +1013,12 @@ declare const paginatedQuery: <F extends FunctionReference>(reference: F, args:
|
|
|
941
1013
|
* ```ts
|
|
942
1014
|
* readonly feed = infiniteQuery(api.messages.list, {}, { initialNumItems: 20 });
|
|
943
1015
|
* ```
|
|
1016
|
+
*
|
|
1017
|
+
* `args` also accepts a function/`Signal` to make the query reactive — see
|
|
1018
|
+
* `paginatedQuery`'s equivalent note.
|
|
944
1019
|
* @experimental
|
|
945
1020
|
*/
|
|
946
|
-
declare const infiniteQuery: <F extends FunctionReference>(reference: F, args: PaginatedArgs<F> | "skip", options: PaginatedQueryOptions) => InfiniteQueryResult<PageItemOf<F>>;
|
|
1021
|
+
declare const infiniteQuery: <F extends FunctionReference>(reference: F, args: PaginatedArgs<F> | "skip" | (() => PaginatedArgs<F> | "skip"), options: PaginatedQueryOptions) => InfiniteQueryResult<PageItemOf<F>>;
|
|
947
1022
|
/**
|
|
948
1023
|
* `HeartbeatReference` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
949
1024
|
* @experimental
|
|
@@ -977,6 +1052,12 @@ interface PresenceOptions<H extends HeartbeatReference, L extends ListPresentRef
|
|
|
977
1052
|
intervalMs?: number;
|
|
978
1053
|
/** The `api.*` reference for the presence listPresent query. */
|
|
979
1054
|
listPresent: L;
|
|
1055
|
+
/**
|
|
1056
|
+
* Called when the `listPresent` subscription reports an error (a session
|
|
1057
|
+
* expiry, an RLS denial). Without it — and without reading `error` — such a
|
|
1058
|
+
* failure is invisible and `present` is cleared until a later frame arrives.
|
|
1059
|
+
*/
|
|
1060
|
+
onError?: SubscriptionErrorCallback;
|
|
980
1061
|
/**
|
|
981
1062
|
* Stable id for this presence row. Defaults to a fresh per-call id.
|
|
982
1063
|
* Pass a user/connection id to control deduping across tabs.
|
|
@@ -990,6 +1071,8 @@ interface PresenceOptions<H extends HeartbeatReference, L extends ListPresentRef
|
|
|
990
1071
|
* @experimental
|
|
991
1072
|
*/
|
|
992
1073
|
interface PresenceResult<L extends ListPresentReference> {
|
|
1074
|
+
/** The `listPresent` subscription's last error, or `undefined`. */
|
|
1075
|
+
error: Signal<SubscriptionError | undefined>;
|
|
993
1076
|
/** The present members for the room. `undefined` until the first push. */
|
|
994
1077
|
present: Signal<ReturnOf<L> | undefined>;
|
|
995
1078
|
/** This mount's session id (generated when not supplied). */
|
|
@@ -1065,6 +1148,43 @@ interface RateLimitResult {
|
|
|
1065
1148
|
* @experimental
|
|
1066
1149
|
*/
|
|
1067
1150
|
declare const rateLimit: (config: RateLimitConfig, options?: RateLimitOptions) => RateLimitResult;
|
|
1151
|
+
/**
|
|
1152
|
+
* `RunActionOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
1153
|
+
* @experimental
|
|
1154
|
+
*/
|
|
1155
|
+
interface RunActionOptions extends ActionCallOptions {
|
|
1156
|
+
/**
|
|
1157
|
+
* Client to run the action on. Defaults to the injected `LUNORA_CLIENT`.
|
|
1158
|
+
* Because actions usually fire from event handlers — which run *outside* an
|
|
1159
|
+
* injection context — capture the client once (`injectLunoraClient()` in a
|
|
1160
|
+
* field) and pass it here, or call `client.action(...)` directly.
|
|
1161
|
+
*/
|
|
1162
|
+
client?: LunoraClient;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Run a Lunora action and resolve with the server result (rejects on failure).
|
|
1166
|
+
*
|
|
1167
|
+
* The sibling of `mutate`, and a plain function for the same reason: Angular's
|
|
1168
|
+
* adapter models writes as calls rather than reactive handles, because they fire
|
|
1169
|
+
* from event handlers where a signal-returning primitive has nothing to bind to.
|
|
1170
|
+
* The other adapters return a reactive `{ call, pending, … }` handle because
|
|
1171
|
+
* their idioms make that natural; this one does not.
|
|
1172
|
+
*
|
|
1173
|
+
* Unlike `mutate` there are no `optimistic` / `optimisticUpdate` options. An
|
|
1174
|
+
* optimistic update patches the subscription cache on the assumption a write
|
|
1175
|
+
* will land; an action is not a write — it runs in the Worker, may call a third
|
|
1176
|
+
* party, and has no declared effect on any query.
|
|
1177
|
+
*
|
|
1178
|
+
* ```ts
|
|
1179
|
+
* private readonly client = injectLunoraClient();
|
|
1180
|
+
* verify = () => runAction(api.commands.run, { command: "lunora", args: ["verify"] }, { client: this.client });
|
|
1181
|
+
* ```
|
|
1182
|
+
*
|
|
1183
|
+
* When called from within an injection context you may omit `client` and let it
|
|
1184
|
+
* resolve from the injector.
|
|
1185
|
+
* @experimental
|
|
1186
|
+
*/
|
|
1187
|
+
declare const runAction: <F extends FunctionReference>(reference: F, args: ArgsOf<F>, options?: RunActionOptions) => Promise<ReturnOf<F>>;
|
|
1068
1188
|
/**
|
|
1069
1189
|
* The lifecycle of a stream the primitive is observing.
|
|
1070
1190
|
* @experimental
|
|
@@ -1082,6 +1202,13 @@ interface StreamOptions {
|
|
|
1082
1202
|
* `inject(DestroyRef)` — the calling component/service.
|
|
1083
1203
|
*/
|
|
1084
1204
|
destroyRef?: DestroyRef;
|
|
1205
|
+
/**
|
|
1206
|
+
* Opt into resume-on-reconnect for a stream the server declared `durable`.
|
|
1207
|
+
* The chunks already received are kept and the socket re-attaches to the same
|
|
1208
|
+
* run, so a dropped connection mid-generation continues instead of surfacing
|
|
1209
|
+
* `STREAM_DISCONNECTED`. Has no effect on an ephemeral stream.
|
|
1210
|
+
*/
|
|
1211
|
+
durable?: boolean;
|
|
1085
1212
|
/** Forwarded to `client.stream()` — caps the in-flight chunk buffer. */
|
|
1086
1213
|
maxBuffer?: number;
|
|
1087
1214
|
/** Route to a specific shard when the target function is `.shardBy(...)`-partitioned. */
|
|
@@ -1109,8 +1236,8 @@ interface StreamResult<T> {
|
|
|
1109
1236
|
* chunk the server pushes — use it for token-by-token deltas and other append-only
|
|
1110
1237
|
* feeds. Pass `"skip"` as `args` to keep the primitive mounted without opening a
|
|
1111
1238
|
* stream (mirrors `subscription`); the stream tears down when the owning
|
|
1112
|
-
* `DestroyRef` fires.
|
|
1113
|
-
* with signals.
|
|
1239
|
+
* `DestroyRef` fires. Nothing opens on the Angular server platform (SSR). The
|
|
1240
|
+
* Angular counterpart to React's `useStream`, re-expressed with signals.
|
|
1114
1241
|
*
|
|
1115
1242
|
* Call from an injection context (component/service field or constructor):
|
|
1116
1243
|
* ```ts
|
|
@@ -1131,6 +1258,14 @@ interface SubscriptionOptions {
|
|
|
1131
1258
|
* `inject(DestroyRef)` — the calling component/service.
|
|
1132
1259
|
*/
|
|
1133
1260
|
destroyRef?: DestroyRef;
|
|
1261
|
+
/**
|
|
1262
|
+
* `Injector` to create the reactive-args `effect()` from. Only needed when
|
|
1263
|
+
* `args` is a function/`Signal` AND `subscription` is called outside an
|
|
1264
|
+
* injection context (an explicit `destroyRef` is also being passed).
|
|
1265
|
+
* Defaults to the ambient injection context. Unused for the static `args`
|
|
1266
|
+
* form, which never creates an `effect()`.
|
|
1267
|
+
*/
|
|
1268
|
+
injector?: Injector;
|
|
1134
1269
|
/**
|
|
1135
1270
|
* Called when the subscription errors after the initial attach. Without it,
|
|
1136
1271
|
* a post-attach failure is dropped silently.
|
|
@@ -1164,9 +1299,13 @@ interface SubscriptionResult<T> {
|
|
|
1164
1299
|
* ```ts
|
|
1165
1300
|
* readonly stream = subscription(api.events.stream, { roomId: "general" });
|
|
1166
1301
|
* ```
|
|
1302
|
+
*
|
|
1303
|
+
* `args` also accepts a function/`Signal` to make the subscription reactive —
|
|
1304
|
+
* an args change tears the old subscription down and opens a fresh one for the
|
|
1305
|
+
* new args. A static (plain object) `args` resolves once and never re-runs.
|
|
1167
1306
|
* @experimental
|
|
1168
1307
|
*/
|
|
1169
|
-
declare const subscription: <F extends FunctionReference>(reference: F, args: ArgsOf<F> | "skip", options?: SubscriptionOptions) => SubscriptionResult<ReturnOf<F>>;
|
|
1308
|
+
declare const subscription: <F extends FunctionReference>(reference: F, args: ArgsOf<F> | "skip" | (() => ArgsOf<F> | "skip"), options?: SubscriptionOptions) => SubscriptionResult<ReturnOf<F>>;
|
|
1170
1309
|
/**
|
|
1171
1310
|
* Browser Web Audio subsystems for `voiceAgent` — the default microphone capture
|
|
1172
1311
|
* and speaker playback implementations injected into the primitive via its
|
|
@@ -1205,8 +1344,24 @@ interface MicrophoneConfig {
|
|
|
1205
1344
|
interruptChunks: number;
|
|
1206
1345
|
/** RMS above which the user is considered to be barging in while the agent speaks. */
|
|
1207
1346
|
interruptThreshold: number;
|
|
1208
|
-
/**
|
|
1209
|
-
|
|
1347
|
+
/**
|
|
1348
|
+
* `true` from the moment a turn is committed until it completes — the whole
|
|
1349
|
+
* `thinking` + `speaking` window, not just the audible half.
|
|
1350
|
+
*
|
|
1351
|
+
* It gates BOTH branches below, and the wider span is the point. Gated only
|
|
1352
|
+
* on "audibly speaking", turn detection kept running through the entire
|
|
1353
|
+
* STT+LLM window after a `commit`: room noise at the (deliberately low)
|
|
1354
|
+
* `silenceThreshold` re-armed `sawSpeech`, another quiet gap fired a SECOND
|
|
1355
|
+
* `commit`, and the DO refused it with "a turn is already in progress" —
|
|
1356
|
+
* a refusal that returns before draining the audio buffer, so the PCM
|
|
1357
|
+
* captured since the first commit leaked into the next utterance.
|
|
1358
|
+
*
|
|
1359
|
+
* A genuine barge-in still works in that window: it routes through the
|
|
1360
|
+
* `onInterrupt` branch, which needs `interruptChunks` consecutive chunks at
|
|
1361
|
+
* `interruptThreshold` — an order of magnitude above `silenceThreshold` —
|
|
1362
|
+
* and `interrupt` is exactly what the DO tells the client to send.
|
|
1363
|
+
*/
|
|
1364
|
+
isTurnActive: () => boolean;
|
|
1210
1365
|
/** One 16 kHz mono 16-bit little-endian PCM frame captured from the mic. */
|
|
1211
1366
|
onAudio: (pcm: Uint8Array) => void;
|
|
1212
1367
|
/** A barge-in was detected (RMS spike while the agent is speaking). */
|
|
@@ -1225,9 +1380,9 @@ type CreateSpeaker = (config: {
|
|
|
1225
1380
|
audioFormat: VoiceAudioFormat;
|
|
1226
1381
|
}) => VoiceSpeaker;
|
|
1227
1382
|
/**
|
|
1228
|
-
* The `agents
|
|
1383
|
+
* The `agents.<name>Voice` reference codegen emits for a voice-enabled agent — a
|
|
1229
1384
|
* live, WS-backed session keyed by `threadKey`. A structural subset of the
|
|
1230
|
-
* generated member, so passing `api.agents
|
|
1385
|
+
* generated member, so passing `api.agents.<name>Voice` type-checks.
|
|
1231
1386
|
* @experimental
|
|
1232
1387
|
*/
|
|
1233
1388
|
type VoiceReference = FunctionReference<"stream", {
|
|
@@ -1265,7 +1420,11 @@ interface VoiceAgentOptions {
|
|
|
1265
1420
|
* Audio graph stays isolated (and mockable in a non-browser test env).
|
|
1266
1421
|
*/
|
|
1267
1422
|
createMicrophone?: CreateMicrophone;
|
|
1268
|
-
/**
|
|
1423
|
+
/**
|
|
1424
|
+
* Advanced/test seam: open the transport. Defaults to the WebSocket
|
|
1425
|
+
* implementation the client was built with (`client.getWebSocketImpl()`),
|
|
1426
|
+
* NOT a raw `globalThis.WebSocket`.
|
|
1427
|
+
*/
|
|
1269
1428
|
createSocket?: CreateSocket;
|
|
1270
1429
|
/** Advanced/test seam: build the audio playback subsystem. Defaults to a Web Audio implementation. */
|
|
1271
1430
|
createSpeaker?: CreateSpeaker;
|
|
@@ -1282,9 +1441,13 @@ interface VoiceAgentOptions {
|
|
|
1282
1441
|
silenceDurationMs?: number;
|
|
1283
1442
|
/** Input RMS below which audio counts as silence. Default `0.01`. */
|
|
1284
1443
|
silenceThreshold?: number;
|
|
1285
|
-
/**
|
|
1286
|
-
|
|
1287
|
-
|
|
1444
|
+
/**
|
|
1445
|
+
* The thread to converse on — shared with the agent's text turns. A plain
|
|
1446
|
+
* value, or a `Signal`/getter resolved afresh every time a call opens — the
|
|
1447
|
+
* reactive-args form the package's other primitives take.
|
|
1448
|
+
*/
|
|
1449
|
+
threadKey: (() => string) | string;
|
|
1450
|
+
/** The generated `api.agents.<name>Voice` reference — identifies the voice DO endpoint. */
|
|
1288
1451
|
voice: VoiceReference;
|
|
1289
1452
|
}
|
|
1290
1453
|
/**
|
|
@@ -1320,7 +1483,7 @@ interface VoiceAgentResult {
|
|
|
1320
1483
|
* WebSocket to the agent's `VoiceSessionDO`, captures mic audio as 16 kHz PCM,
|
|
1321
1484
|
* streams the agent's synthesized speech back through the browser's audio output,
|
|
1322
1485
|
* and mirrors the call lifecycle (`status`, `transcript`, `interimTranscript`,
|
|
1323
|
-
* `audioLevel`) to Angular signals. Pass the generated `api.agents
|
|
1486
|
+
* `audioLevel`) to Angular signals. Pass the generated `api.agents.<name>Voice`
|
|
1324
1487
|
* reference (never a string), matching `agentChat`'s reference-passing style. The
|
|
1325
1488
|
* Angular counterpart to React's `useVoiceAgent`, re-expressed with signals; the
|
|
1326
1489
|
* per-call connection lives in a closure variable (the primitive runs once per
|
|
@@ -1336,4 +1499,20 @@ interface VoiceAgentResult {
|
|
|
1336
1499
|
* @experimental
|
|
1337
1500
|
*/
|
|
1338
1501
|
declare const voiceAgent: (options: VoiceAgentOptions) => VoiceAgentResult;
|
|
1339
|
-
export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChatOptions, type AgentChatResult, type AgentLiveEvent, type AgentOptions, type AgentProgressEvent, type AgentResult, type AgentStateApi, type AgentStateOptions, type AgentStateResult, type AgentThreadRecord, type AgentThreadStatus, type AgentTokenDelta, type AgentTokenStreamReference, type AgentToolEvent, type AgentToolEventsApi, type AgentToolEventsOptions, type AgentToolEventsResult, type AuthGateResult, type AuthOptions, type AuthResult, type ConnectionStatusOptions, type
|
|
1502
|
+
export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChatOptions, type AgentChatResult, type AgentLiveEvent, type AgentOptions, type AgentProgressEvent, type AgentResult, type AgentStateApi, type AgentStateOptions, type AgentStateResult, type AgentThreadRecord, type AgentThreadStatus, type AgentTokenDelta, type AgentTokenStreamReference, type AgentToolEvent, type AgentToolEventsApi, type AgentToolEventsOptions, type AgentToolEventsResult, type AuthGateResult, type AuthOptions, type AuthResult, type ConnectionStatusOptions, type FlagOptions, type FlagValue, type FlagsOptions, type HeartbeatReference, type HydratePreloadedOptions, type HydratePreloadedResult, type InfiniteQueryResult, LUNORA_CLIENT, type ListPresentReference, type LiveQueryOptions, type MutateOptions, type MutatorResult, type PaginatedQueryOptions, type PaginatedQueryResult, type PresenceOptions, type PresenceResult,
|
|
1503
|
+
/**
|
|
1504
|
+
* The Angular adapter for Lunora.
|
|
1505
|
+
*
|
|
1506
|
+
* Thin, idiomatic glue over the framework-neutral `@lunora/client`. Angular
|
|
1507
|
+
* signals map directly onto Lunora's per-subscription deltas, so a live query is
|
|
1508
|
+
* just a `signal` the WebSocket writes to.
|
|
1509
|
+
*
|
|
1510
|
+
* `provideLunora` / `LUNORA_CLIENT` / `injectLunoraClient` are the injectable
|
|
1511
|
+
* provider carrying one `LunoraClient` (opens its socket lazily), wired once in the
|
|
1512
|
+
* application config. `liveQuery` is a live-query `signal` that opens a
|
|
1513
|
+
* subscription and updates on every delta, torn down automatically on
|
|
1514
|
+
* `DestroyRef.onDestroy`. `mutate` runs a mutation (optimistic updates + offline
|
|
1515
|
+
* queue pass through to the client). `connectionStatus` is a `signal` of the
|
|
1516
|
+
* aggregate live-socket status.
|
|
1517
|
+
*/
|
|
1518
|
+
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|