@voltro/client 0.62.2 → 0.63.0
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/CHANGELOG.md +27 -0
- package/dist/index.d.ts +141 -25
- package/dist/index.js +906 -652
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -39,6 +39,33 @@ _Changes staged for the next release accumulate here (rolled up from
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## [0.63.0] — 2026-09-03
|
|
43
|
+
|
|
44
|
+
### ⚠ BREAKING
|
|
45
|
+
|
|
46
|
+
- **@voltro/client, @voltro/runtime, @voltro/cli, @voltro/web, @voltro/react-native** — Short transport gaps now have one bounded recovery contract. Raw diagnostics remain immediate, while `useConnectionStatus` exposes `recovering` during a configurable grace window and `useOnRpcError` emits exactly one visible transport failure only if the gap remains open. Same-subject runtime swaps keep subscription bases, revisions and optimistic patches; subject changes discard them. Interrupted mutations report `outcome: unknown` and replay once with the same key only after the deployed API proves that server idempotency is active. The codemod explains the new status member and the raw versus presentation error channels.
|
|
47
|
+
|
|
48
|
+
**`voltro update` carries you across this** — codemod `0.63.0/01_recovery-presentation`. If you pin versions by hand and never run it, print the notes without changing anything: `voltro update --codemods-only --from <your current version> --dry-run` (this one ships in 0.63.0).
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- **@voltro/database, @voltro/sql-turso, @voltro/sql-sqlite, @voltro/sql-mssql** — Framework-table evolution now converges under real SQLite and both local Turso transports, and has a live MSSQL fixture. The new Turso runs also fixed internal table protection, boolean/number introspection normalization, and case-insensitive SQLite-family index-name comparison. The MSSQL fixture exposed and fixes a second convergence bug: unbounded text that MSSQL auto-bounds for an index is now rendered and compared with the same indexed-column rule, so a second plan no longer tries to widen an indexed `NVARCHAR(450)` to `NVARCHAR(MAX)`.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## [0.62.3] — 2026-09-03
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- **@voltro/runtime** — `EffectStore` now exposes the complete Promise-store mutation surface plus transactions that roll back while preserving an inner Effect Cause. `defineSubscriber` accepts `eachReplica: true` so local per-replica work can state its topology explicitly; it cannot be combined with `once`.
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- **@voltro/cli** — `voltro build` no longer starts Vite's HMR WebSocket while pre-rendering. A `RedirectError` from a static loader is now emitted as redirect metadata and served by `voltro start` with its exact status and `Location`; unrelated loader errors still fail the build.
|
|
65
|
+
- **@voltro/cli, @voltro/database, @voltro/plugin-storage** — `voltro doctor` now resolves grouped event bindings and narrows its hand-roll, junction, ownership, nullable-write, singleton-read, and UI reachability checks to evidence they can actually prove. Ids owned by external systems can be declared with `.externalId()`; plugin references and non-FK asset references carry that metadata automatically.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
42
69
|
## [0.62.2] — 2026-09-03
|
|
43
70
|
|
|
44
71
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -187,6 +187,8 @@ export declare interface ApiHandle {
|
|
|
187
187
|
* app-level listeners can react to typed errors globally (auto-logout
|
|
188
188
|
* on `Unauthenticated`, network-error toasts, etc.). */
|
|
189
189
|
readonly errorBus: RpcErrorBus;
|
|
190
|
+
/** Stable UI/raw transport recovery state for this logical api. */
|
|
191
|
+
readonly recovery?: RecoveryCoordinator;
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
/**
|
|
@@ -375,11 +377,12 @@ export declare interface BuildApiRuntimeOptions {
|
|
|
375
377
|
* Omit only when building a standalone, unsupervised runtime.
|
|
376
378
|
*/
|
|
377
379
|
readonly errorBus?: RpcErrorBus;
|
|
380
|
+
readonly recovery?: RecoveryCoordinator;
|
|
378
381
|
}
|
|
379
382
|
|
|
380
383
|
export declare type BuildClient = (api: MountedApi, generation: number, onSocketOpen: () => void, onSocketIssue: (kind: SocketIssueKind) => void,
|
|
381
384
|
/** Stable for this logical api across every transport generation. */
|
|
382
|
-
errorBus?: RpcErrorBus) => Promise<ResolvedClient>;
|
|
385
|
+
errorBus?: RpcErrorBus, recovery?: RecoveryCoordinator) => Promise<ResolvedClient>;
|
|
383
386
|
|
|
384
387
|
/** The transport-level pieces of one api's client stack. Combined with the
|
|
385
388
|
* api's descriptor map + inspect base URL, this is an `ApiHandle`. */
|
|
@@ -388,6 +391,7 @@ export declare interface BuiltApiRuntime {
|
|
|
388
391
|
readonly cache: SubscriptionCache;
|
|
389
392
|
readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
|
|
390
393
|
readonly errorBus: RpcErrorBus;
|
|
394
|
+
readonly recovery: RecoveryCoordinator;
|
|
391
395
|
}
|
|
392
396
|
|
|
393
397
|
declare interface CacheEntry {
|
|
@@ -616,7 +620,7 @@ export declare interface ClientDiagnosticEvent {
|
|
|
616
620
|
readonly fields: Readonly<Record<string, ClientDiagnosticValue>>;
|
|
617
621
|
}
|
|
618
622
|
|
|
619
|
-
export declare type ClientDiagnosticKind = 'runtime.build-started' | 'runtime.resolved' | 'runtime.failed' | 'runtime.swapped' | 'runtime.disposed' | 'socket.created' | 'socket.raw-open' | 'socket.close' | 'socket.error' | 'socket.connect-timeout' | 'socket.retry-scheduled' | 'protocol.ready' | 'subscription.transport-failed' | 'subscription.reissue-started' | 'subscription.reissue-skipped' | 'subscription.first-delivery' | 'subscription.recovery-stuck' | 'subscription.health-cleared' | 'connection.status' | 'fault.transport-cut';
|
|
623
|
+
export declare type ClientDiagnosticKind = 'runtime.build-started' | 'runtime.resolved' | 'runtime.failed' | 'runtime.capabilities' | 'runtime.swapped' | 'runtime.disposed' | 'socket.created' | 'socket.raw-open' | 'socket.close' | 'socket.error' | 'socket.connect-timeout' | 'socket.retry-scheduled' | 'protocol.ready' | 'subscription.transport-failed' | 'subscription.reissue-started' | 'subscription.reissue-skipped' | 'subscription.first-delivery' | 'subscription.recovery-stuck' | 'subscription.health-cleared' | 'event.gap' | 'connection.status' | 'recovery.state' | 'fault.transport-cut';
|
|
620
624
|
|
|
621
625
|
export declare interface ClientDiagnosticsSnapshot {
|
|
622
626
|
readonly version: 1;
|
|
@@ -750,17 +754,18 @@ export declare const CONNECTIONS_LIST_TAG = "__voltro.connections.list";
|
|
|
750
754
|
|
|
751
755
|
export declare interface ConnectionState {
|
|
752
756
|
readonly status: ConnectionStatus;
|
|
757
|
+
/** Immediate protocol transport state; never grace-filtered. */
|
|
758
|
+
readonly rawTransport: RawTransportStatus;
|
|
753
759
|
/** `navigator.onLine` (true during SSR — nothing better is knowable there). */
|
|
754
760
|
readonly online: boolean;
|
|
755
|
-
/** Transport failures not yet cleared by recovery evidence. */
|
|
756
761
|
readonly failureCount: number;
|
|
757
|
-
/** When the most recent failure was observed. */
|
|
758
762
|
readonly lastFailureAt: number | undefined;
|
|
759
|
-
/** Subscription tags still waiting for their own post-reconnect delivery. */
|
|
760
763
|
readonly failedSubscriptions: ReadonlyArray<string>;
|
|
764
|
+
readonly pendingMutationReplays: number;
|
|
765
|
+
readonly mutationReplay: 'unknown' | 'enabled' | 'disabled';
|
|
761
766
|
}
|
|
762
767
|
|
|
763
|
-
export declare type ConnectionStatus = 'connected' | 'degraded' | 'offline';
|
|
768
|
+
export declare type ConnectionStatus = 'connected' | 'recovering' | 'degraded' | 'offline';
|
|
764
769
|
|
|
765
770
|
export declare interface ConnectOptions {
|
|
766
771
|
/** Where the callback should send the browser. Same-origin path; the server
|
|
@@ -1583,6 +1588,7 @@ export declare interface MountedApi {
|
|
|
1583
1588
|
readonly descriptors: ClientDescriptorMap;
|
|
1584
1589
|
readonly wsUrl: string;
|
|
1585
1590
|
readonly headers?: ResolvableHeaders | undefined;
|
|
1591
|
+
readonly recovery?: RecoveryOptions | undefined;
|
|
1586
1592
|
}
|
|
1587
1593
|
|
|
1588
1594
|
export declare interface MutateOptions<Input, Output> {
|
|
@@ -1646,6 +1652,13 @@ export declare interface MutationNotifier {
|
|
|
1646
1652
|
readonly error: (message: string) => void;
|
|
1647
1653
|
}
|
|
1648
1654
|
|
|
1655
|
+
export declare interface MutationReplayReservation {
|
|
1656
|
+
/** Re-check immediately before sending: identity, capability and transport may have changed while waiting. */
|
|
1657
|
+
readonly isValid: () => boolean;
|
|
1658
|
+
/** Release the bounded pending slot. Safe to call more than once. */
|
|
1659
|
+
readonly release: () => void;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1649
1662
|
export declare interface MutationState<Input, Output> {
|
|
1650
1663
|
/** Run the mutation. With no options it rejects on failure (unchanged).
|
|
1651
1664
|
* With an error handler (`onError` / `notify.error`) the failure is handled
|
|
@@ -1675,8 +1688,10 @@ export declare const openAccessReason: (guards: ReadonlyArray<ManifestGuard> | u
|
|
|
1675
1688
|
|
|
1676
1689
|
export declare interface OptimisticContext {
|
|
1677
1690
|
/** Stage an optimistic patch keyed by `queryKey` (same convention as
|
|
1678
|
-
* useSubscription's: `[rpcTag, input]`).
|
|
1679
|
-
*
|
|
1691
|
+
* useSubscription's: `[rpcTag, input]`). A failure reverts the patch;
|
|
1692
|
+
* success keeps it confirmed until the authoritative subscription update.
|
|
1693
|
+
* A same-subject reconnect carries it to the replacement cache, while a
|
|
1694
|
+
* subject or tenant change discards it.
|
|
1680
1695
|
* Use when you know the EXACT input the subscription was opened with. */
|
|
1681
1696
|
readonly update: <T>(queryKey: ReadonlyArray<unknown>, reducer: (current: T) => T) => void;
|
|
1682
1697
|
/** Patch every cached entry whose rpc tag matches `rpcTag`, regardless
|
|
@@ -1995,6 +2010,8 @@ export declare interface QueryFiltersState<Row> {
|
|
|
1995
2010
|
|
|
1996
2011
|
declare type QueryTag<P extends ProcedureTypeMap> = TagsOfKind<P, 'query'>;
|
|
1997
2012
|
|
|
2013
|
+
export declare type RawTransportStatus = 'connected' | 'disconnected';
|
|
2014
|
+
|
|
1998
2015
|
/**
|
|
1999
2016
|
* Did the server attempt this preload, and did it work?
|
|
2000
2017
|
*
|
|
@@ -2026,6 +2043,85 @@ export declare interface RecordState<R> {
|
|
|
2026
2043
|
readonly error: unknown | undefined;
|
|
2027
2044
|
}
|
|
2028
2045
|
|
|
2046
|
+
/**
|
|
2047
|
+
* State owned by one logical API, not by one socket or one React hook.
|
|
2048
|
+
*
|
|
2049
|
+
* Raw listeners (`RpcErrorBus.on`) still receive every failure immediately.
|
|
2050
|
+
* Presentation listeners receive non-transport failures immediately, but at
|
|
2051
|
+
* most one transport failure per outage and only after the grace window. A
|
|
2052
|
+
* fully healed gap therefore leaves no toast/banner flash while diagnostics
|
|
2053
|
+
* retain the complete sequence.
|
|
2054
|
+
*/
|
|
2055
|
+
export declare class RecoveryCoordinator {
|
|
2056
|
+
#private;
|
|
2057
|
+
constructor(apiName: string, options?: RecoveryOptions, scheduler?: Partial<RecoveryScheduler>);
|
|
2058
|
+
get options(): ResolvedRecoveryOptions;
|
|
2059
|
+
getSnapshot: () => RecoverySnapshot;
|
|
2060
|
+
subscribe: (listener: () => void) => (() => void);
|
|
2061
|
+
onVisibleError(listener: RpcErrorListener): () => void;
|
|
2062
|
+
/** Called from the socket seam before request fibers report their errors. */
|
|
2063
|
+
transportIssue(): void;
|
|
2064
|
+
/** Called only after the rpc protocol has cleared its previous transport error. */
|
|
2065
|
+
protocolReady(): void;
|
|
2066
|
+
observeError(error: RpcError): void;
|
|
2067
|
+
observeSuccess(success: RpcSuccess): void;
|
|
2068
|
+
reportExternalSuccess(): void;
|
|
2069
|
+
/** Discard every stale row/replay/health fact at the subject boundary. */
|
|
2070
|
+
resetForSubjectChange(minimumCapabilityGeneration?: number): void;
|
|
2071
|
+
setMutationReplaySupported(supported: boolean, generation?: number): void;
|
|
2072
|
+
/**
|
|
2073
|
+
* Wait for the capability probe when transport fails during initial boot.
|
|
2074
|
+
* Unknown is never permission: the wait is bounded by the replay window and
|
|
2075
|
+
* resolves false if the server never proves that idempotency is active.
|
|
2076
|
+
*/
|
|
2077
|
+
waitForMutationReplaySupport(startedAt: number): Promise<boolean>;
|
|
2078
|
+
/**
|
|
2079
|
+
* Reserve one bounded waiting/replay slot; caller MUST release the returned
|
|
2080
|
+
* reservation. An unknown capability may reserve while its probe is in flight,
|
|
2081
|
+
* otherwise that short boot window would permit an unbounded waiter set.
|
|
2082
|
+
* Disabled is final for the current generation and refuses immediately.
|
|
2083
|
+
*/
|
|
2084
|
+
reserveMutationReplay(startedAt: number): MutationReplayReservation | undefined;
|
|
2085
|
+
waitForProtocolReady(startedAt: number): Promise<boolean>;
|
|
2086
|
+
dispose(): void;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
/** Stable fallback for hand-built ApiHandles that provide only an error bus. */
|
|
2090
|
+
export declare const recoveryCoordinatorFor: (errorBus: RpcErrorBus, apiName: string, options?: RecoveryOptions) => RecoveryCoordinator;
|
|
2091
|
+
|
|
2092
|
+
export declare interface RecoveryOptions {
|
|
2093
|
+
/** Hide a transport gap from the UI while recovery is still plausible. */
|
|
2094
|
+
readonly graceMs?: number;
|
|
2095
|
+
/** Maximum mutations allowed to wait for one safe replay at once. */
|
|
2096
|
+
readonly maxPendingMutations?: number;
|
|
2097
|
+
/** Maximum age of a mutation before an automatic replay is refused. */
|
|
2098
|
+
readonly replayWindowMs?: number;
|
|
2099
|
+
/**
|
|
2100
|
+
* Explicit HTTP endpoint for runtime capability discovery. Usually omitted:
|
|
2101
|
+
* the client derives a sibling of the WebSocket path. Set this only when an
|
|
2102
|
+
* edge routes the WebSocket and ordinary HTTP through unrelated paths.
|
|
2103
|
+
*/
|
|
2104
|
+
readonly capabilitiesUrl?: string;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
export declare type RecoveryPresentationStatus = 'connected' | 'recovering' | 'degraded';
|
|
2108
|
+
|
|
2109
|
+
declare interface RecoveryScheduler {
|
|
2110
|
+
readonly now: () => number;
|
|
2111
|
+
readonly setTimeout: (callback: () => void, ms: number) => unknown;
|
|
2112
|
+
readonly clearTimeout: (handle: unknown) => void;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
export declare interface RecoverySnapshot {
|
|
2116
|
+
readonly rawTransport: RawTransportStatus;
|
|
2117
|
+
readonly status: RecoveryPresentationStatus;
|
|
2118
|
+
readonly failureCount: number;
|
|
2119
|
+
readonly lastFailureAt: number | undefined;
|
|
2120
|
+
readonly failedSubscriptions: ReadonlyArray<string>;
|
|
2121
|
+
readonly pendingMutationReplays: number;
|
|
2122
|
+
readonly mutationReplay: 'unknown' | 'enabled' | 'disabled';
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2029
2125
|
/**
|
|
2030
2126
|
* Make an api's client descriptors visible to a SERVER render.
|
|
2031
2127
|
*
|
|
@@ -2087,8 +2183,19 @@ export declare interface ResolvedClient {
|
|
|
2087
2183
|
readonly runtime: AnyRuntime;
|
|
2088
2184
|
readonly cache: SubscriptionCache;
|
|
2089
2185
|
readonly client: RpcClient.RpcClient<Rpc.Any, RpcClientError.RpcClientError>;
|
|
2186
|
+
readonly errorBus?: RpcErrorBus;
|
|
2187
|
+
readonly recovery?: RecoveryCoordinator;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
export declare interface ResolvedRecoveryOptions {
|
|
2191
|
+
readonly graceMs: number;
|
|
2192
|
+
readonly maxPendingMutations: number;
|
|
2193
|
+
readonly replayWindowMs: number;
|
|
2194
|
+
readonly capabilitiesUrl: string | undefined;
|
|
2090
2195
|
}
|
|
2091
2196
|
|
|
2197
|
+
export declare const resolveRecoveryOptions: (options?: RecoveryOptions) => ResolvedRecoveryOptions;
|
|
2198
|
+
|
|
2092
2199
|
/** Resolve the storage for an area. Internal to the store layer. */
|
|
2093
2200
|
export declare const resolveStoreStorage: (area: StoreStorageArea) => StoreStorage | null;
|
|
2094
2201
|
|
|
@@ -2568,6 +2675,9 @@ export declare const richTextToPlainText: (value: unknown) => string;
|
|
|
2568
2675
|
* when the label field is absent. Exported for direct testing + reuse. */
|
|
2569
2676
|
export declare const rowsToOptions: (rows: ReadonlyArray<Record<string, unknown>>, labelField: string, valueField: string) => ReadonlyArray<FieldOption>;
|
|
2570
2677
|
|
|
2678
|
+
/** What the client can prove about a unary call's server-side result. */
|
|
2679
|
+
export declare type RpcCallOutcome = 'not-applicable' | 'not-started' | 'known' | 'unknown';
|
|
2680
|
+
|
|
2571
2681
|
export declare interface RpcError {
|
|
2572
2682
|
/** Source — `'mutation'` for transactional unary calls, `'action'` for
|
|
2573
2683
|
* non-transactional unary calls, `'subscription'` for streams. */
|
|
@@ -2581,6 +2691,9 @@ export declare interface RpcError {
|
|
|
2581
2691
|
* the rpc returned a declared failure; `client` is framework work that
|
|
2582
2692
|
* failed locally; `unknown` is deliberately unclassified. */
|
|
2583
2693
|
readonly kind: RpcErrorKind;
|
|
2694
|
+
/** A transport failure after a unary request started is `unknown`: the
|
|
2695
|
+
* server may have committed before the response disappeared. */
|
|
2696
|
+
readonly outcome?: RpcCallOutcome;
|
|
2584
2697
|
/** Trace id of the CLIENT call span. When the server accepted the request,
|
|
2585
2698
|
* @effect/rpc propagates this same id into its span. A transport failure may
|
|
2586
2699
|
* happen before that, so the id is not proof that server logs exist. Present
|
|
@@ -3132,6 +3245,13 @@ export declare const subscribeStoreHistory: (listener: Listener) => (() => void)
|
|
|
3132
3245
|
|
|
3133
3246
|
export declare class SubscriptionCache {
|
|
3134
3247
|
private readonly entries;
|
|
3248
|
+
/**
|
|
3249
|
+
* Same-subject runtime replacement. A mutation may settle against the cache
|
|
3250
|
+
* it started on after React has already switched to the replacement cache.
|
|
3251
|
+
* Keep this link one-way so staging and settlement follow the visible data
|
|
3252
|
+
* without retaining an old cache from the new runtime.
|
|
3253
|
+
*/
|
|
3254
|
+
private successor;
|
|
3135
3255
|
private readonly inactiveTtlMs;
|
|
3136
3256
|
private readonly onChangeHook;
|
|
3137
3257
|
private readonly errorBus;
|
|
@@ -3323,10 +3443,10 @@ export declare class SubscriptionCache {
|
|
|
3323
3443
|
* loading state it is already in.
|
|
3324
3444
|
* - `baseError` is dropped: the new transport gets to re-establish the
|
|
3325
3445
|
* truth, and a stale error banner over live data is worse than neither.
|
|
3326
|
-
* - Optimistic patches are
|
|
3327
|
-
*
|
|
3328
|
-
*
|
|
3329
|
-
*
|
|
3446
|
+
* - Optimistic patches are carried. A transport failure has an UNKNOWN
|
|
3447
|
+
* unary outcome, not a proven failure, and removing the preview before a
|
|
3448
|
+
* safe replay settles would flash stale data. The old cache links to this
|
|
3449
|
+
* one so later stage/confirm/revert operations reach the visible copy.
|
|
3330
3450
|
* - Seeded entries carry no fiber and no fetch, exactly like the stub
|
|
3331
3451
|
* entries a pre-mount optimistic patch creates. The first `subscribe()`
|
|
3332
3452
|
* promotes one: it saves the fetch and forks the stream, with the seeded
|
|
@@ -3664,6 +3784,8 @@ export declare interface SupervisorOptions {
|
|
|
3664
3784
|
* otherwise the supervisor creates one bus per api slot.
|
|
3665
3785
|
*/
|
|
3666
3786
|
readonly errorBusFor?: (apiName: string) => RpcErrorBus;
|
|
3787
|
+
/** Provider-scoped coordinator counterpart of {@link errorBusFor}. */
|
|
3788
|
+
readonly recoveryFor?: (apiName: string, options?: RecoveryOptions) => RecoveryCoordinator;
|
|
3667
3789
|
/**
|
|
3668
3790
|
* Called whenever the resolved-clients map changes (initial resolve,
|
|
3669
3791
|
* reconnect swap, api removed). The React layer mirrors this into
|
|
@@ -4031,21 +4153,11 @@ export declare const useConnection: (apiName: string, connectionId: string) => C
|
|
|
4031
4153
|
export declare const useConnections: (apiName: string) => ConnectedAccountsController;
|
|
4032
4154
|
|
|
4033
4155
|
/**
|
|
4034
|
-
*
|
|
4035
|
-
*
|
|
4036
|
-
*
|
|
4037
|
-
* const { status } = useConnectionStatus('app')
|
|
4038
|
-
* {status !== 'connected' && <OfflineBanner status={status} />}
|
|
4039
|
-
* ```
|
|
4040
|
-
*
|
|
4041
|
-
* `degraded` clears after a server round trip, except that every subscription
|
|
4042
|
-
* which failed with `kind: 'transport'` must deliver its own later snapshot.
|
|
4043
|
-
* An unrelated action cannot declare a dead screen healthy. Call
|
|
4044
|
-
* `reportSuccess()` when another signal proves reachability; it likewise does
|
|
4045
|
-
* not override outstanding subscription failures.
|
|
4156
|
+
* `recovering` is intentionally a normal, non-error UI state. Render a subtle
|
|
4157
|
+
* activity cue if useful; show a disconnect banner only for `degraded` or
|
|
4158
|
+
* `offline`. Read `rawTransport` for monitoring that must react immediately.
|
|
4046
4159
|
*/
|
|
4047
4160
|
export declare const useConnectionStatus: (apiName: string) => ConnectionState & {
|
|
4048
|
-
/** Clear the degraded state — call after a known-good round trip. */
|
|
4049
4161
|
readonly reportSuccess: () => void;
|
|
4050
4162
|
};
|
|
4051
4163
|
|
|
@@ -4278,6 +4390,10 @@ export declare const useFrameworkRuntimes: () => FrameworkRuntimes;
|
|
|
4278
4390
|
*/
|
|
4279
4391
|
export declare const useMutation: <Input = unknown, Output = unknown>(apiName: string, rpcTag: string) => MutationBuilder<Input, Output>;
|
|
4280
4392
|
|
|
4393
|
+
/** Immediate, unfiltered failures for diagnostics and monitoring. UI policy
|
|
4394
|
+
* should normally use {@link useOnRpcError}, which suppresses healed gaps. */
|
|
4395
|
+
export declare const useOnRawRpcError: (apiName: string, listener: RpcErrorListener) => void;
|
|
4396
|
+
|
|
4281
4397
|
export declare const useOnRpcError: (apiName: string, listener: RpcErrorListener) => void;
|
|
4282
4398
|
|
|
4283
4399
|
export declare const useOutbox: (options: UseOutboxOptions) => OutboxControls;
|