@voltro/client 0.84.0 → 0.86.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.
Files changed (111) hide show
  1. package/CHANGELOG.md +1215 -0
  2. package/THIRD-PARTY-NOTICES.md +5 -89
  3. package/dist/analyticsCatalog.js +47 -0
  4. package/dist/apiConnectivity.js +33 -0
  5. package/dist/apiRuntime.js +135 -0
  6. package/dist/apiSupervisor.js +125 -0
  7. package/dist/authRefresh.js +20 -0
  8. package/dist/awaitResolvedApi.js +23 -0
  9. package/dist/bootstrap.d.ts +1144 -0
  10. package/dist/bootstrap.js +8 -0
  11. package/dist/cellMerger.js +6 -0
  12. package/dist/clientDiagnostics.js +94 -0
  13. package/dist/clientErrorBus.js +16 -0
  14. package/dist/clientScheduler.js +31 -0
  15. package/dist/connectionPrerequisite.js +70 -0
  16. package/dist/connectionScope.js +35 -0
  17. package/dist/connectionSetupController.js +206 -0
  18. package/dist/createHooks.js +15 -0
  19. package/dist/deepLink.js +69 -0
  20. package/dist/filters.js +58 -0
  21. package/dist/form.d.ts +8 -11
  22. package/dist/form.js +5 -2
  23. package/dist/formBinding.js +325 -0
  24. package/dist/formData.js +65 -0
  25. package/dist/formFlashId.js +4 -0
  26. package/dist/frameworkRuntimesContext.js +8 -0
  27. package/dist/globalContext.js +10 -0
  28. package/dist/index.d.ts +285 -279
  29. package/dist/index.js +83 -3686
  30. package/dist/liveRowSort.js +66 -0
  31. package/dist/mutationConnectionSetup.js +16 -0
  32. package/dist/mutationIdentity.js +10 -0
  33. package/dist/mutationSerialExecution.js +53 -0
  34. package/dist/mutationsBus.js +40 -0
  35. package/dist/onlineSource.js +13 -0
  36. package/dist/outbox.js +213 -0
  37. package/dist/outboxHttp.js +104 -0
  38. package/dist/outboxState.js +43 -0
  39. package/dist/permissions.js +20 -0
  40. package/dist/platform.js +121 -0
  41. package/dist/preloadSeed.js +47 -0
  42. package/dist/provider.js +22 -0
  43. package/dist/query.js +12 -2
  44. package/dist/recoveryCoordinator.js +195 -0
  45. package/dist/recoveryRetry.js +24 -0
  46. package/dist/richText.js +176 -0
  47. package/dist/rpcErrorBus.js +39 -0
  48. package/dist/rpcErrorKind.js +13 -0
  49. package/dist/runRpc.js +12 -0
  50. package/dist/runtime.d.ts +79 -15
  51. package/dist/runtime.js +16 -129
  52. package/dist/runtimeCapabilities.js +44 -0
  53. package/dist/runtimeContext.js +49 -0
  54. package/dist/schemaFields.js +219 -0
  55. package/dist/scopeMembership.js +12 -0
  56. package/dist/seedResolvers.js +7 -0
  57. package/dist/sequence.js +65 -0
  58. package/dist/serverRequest.js +24 -0
  59. package/dist/serviceClient.js +128 -0
  60. package/dist/squashRpcCause.js +8 -0
  61. package/dist/stableKey.js +21 -0
  62. package/dist/store.js +288 -0
  63. package/dist/storeStorage.js +28 -0
  64. package/dist/subscriptionCache.js +724 -0
  65. package/dist/tagWalk.js +23 -0
  66. package/dist/traceBus.js +10 -0
  67. package/dist/tracking.js +40 -0
  68. package/dist/uploadProgress.js +21 -0
  69. package/dist/useAction.js +101 -0
  70. package/dist/useAgent.js +53 -0
  71. package/dist/useAgentChat.js +43 -0
  72. package/dist/useAgentStream.js +64 -0
  73. package/dist/useApiOnline.js +14 -0
  74. package/dist/useCapabilityManifest.js +101 -0
  75. package/dist/useConnectionSetup.js +28 -0
  76. package/dist/useConnectionStatus.js +38 -0
  77. package/dist/useConnections.js +107 -0
  78. package/dist/useDataCopilot.js +24 -0
  79. package/dist/useDataTable.js +34 -0
  80. package/dist/useDerived.js +22 -0
  81. package/dist/useEvent.js +88 -0
  82. package/dist/useFormBinding.js +476 -0
  83. package/dist/useLocalQuery.js +59 -0
  84. package/dist/useMutation.js +214 -0
  85. package/dist/useOnRpcError.js +13 -0
  86. package/dist/usePreloadedSubscription.js +18 -0
  87. package/dist/usePreview.js +14 -0
  88. package/dist/useProvenance.js +51 -0
  89. package/dist/useQueryField.js +34 -0
  90. package/dist/useRecord.js +12 -0
  91. package/dist/useRefreshSubscriptions.js +22 -0
  92. package/dist/useResourceCan.js +18 -0
  93. package/dist/useResumableAgentStream.js +75 -0
  94. package/dist/useSequence.js +25 -0
  95. package/dist/useSkeleton.js +13 -0
  96. package/dist/useSubscription.js +89 -0
  97. package/dist/useSubscriptionHealth.js +32 -0
  98. package/dist/useTranscription.js +51 -0
  99. package/dist/useUndo.js +33 -0
  100. package/dist/useUndoLog.js +44 -0
  101. package/dist/useUpload.js +296 -0
  102. package/dist/useWindowedSubscription.js +65 -0
  103. package/dist/useWorkflow.js +284 -0
  104. package/dist/useWorkflowRunState.js +93 -0
  105. package/dist/validation.js +39 -0
  106. package/dist/validationMessages.js +5 -0
  107. package/package.json +8 -5
  108. package/dist/authRefresh-C4Ow8HH7.js +0 -346
  109. package/dist/formData-dGz5aoUR.js +0 -649
  110. package/dist/queryOnce-CvdopzOj.js +0 -55
  111. package/dist/runRpc-DvHpFZAZ.js +0 -1034
package/dist/index.d.ts CHANGED
@@ -3,12 +3,19 @@ import { clearPairing } from '@voltro/protocol';
3
3
  import { ClientDescriptor } from '@voltro/protocol';
4
4
  import { ClipboardEvent as ClipboardEvent_2 } from 'react';
5
5
  import { Context } from 'react';
6
+ import { createRowPatchApplier } from '@voltro/protocol';
7
+ import { DEV_ACTIVITY_EVENT } from '@voltro/protocol';
8
+ import { DevActivityMessage } from '@voltro/protocol';
6
9
  import { DragEvent as DragEvent_2 } from 'react';
7
10
  import { Effect } from 'effect';
8
11
  import { errorMessage } from '@voltro/protocol';
9
12
  import { errorTag } from '@voltro/protocol';
10
13
  import { EventDescriptor as EventDescriptor_2 } from '@voltro/protocol';
11
14
  import { Fiber } from 'effect';
15
+ import { JsonSchemaDocument } from '@voltro/protocol';
16
+ import { jsonSchemaDocumentOf } from '@voltro/protocol';
17
+ import { jsonSchemaOf } from '@voltro/protocol';
18
+ import { JsonSchemaOptions } from '@voltro/protocol';
12
19
  import { ManagedRuntime } from 'effect';
13
20
  import { Pairing } from '@voltro/protocol';
14
21
  import { PAIRING_HOST } from '@voltro/protocol';
@@ -17,20 +24,21 @@ import { PAIRING_STORAGE_KEY } from '@voltro/protocol';
17
24
  import { pairingLink } from '@voltro/protocol';
18
25
  import { PairingStorage } from '@voltro/protocol';
19
26
  import { parsePairingLink } from '@voltro/protocol';
20
- import { ParseResult } from 'effect';
21
27
  import { ReactElement } from 'react';
22
28
  import { ReactNode } from 'react';
23
29
  import { readPairing } from '@voltro/protocol';
24
- import { Rpc } from '@effect/rpc';
25
- import { RpcClient } from '@effect/rpc';
26
- import { RpcClientError } from '@effect/rpc';
27
- import { RpcGroup } from '@effect/rpc';
30
+ import { Rpc } from 'effect/rpc';
31
+ import { RpcClient } from 'effect/rpc';
32
+ import { RpcClientError } from 'effect/rpc';
33
+ import { RpcGroup } from 'effect/rpc';
28
34
  import { Schema } from 'effect';
29
- import * as Socket from '@effect/platform/Socket';
35
+ import * as Socket from 'effect/socket/Socket';
36
+ import { StorageAccessPolicy } from '@voltro/protocol';
30
37
  import { Stream } from 'effect';
31
38
  import { SubscriptionEvent } from '@voltro/protocol';
32
39
  import { TargetRelations } from '@voltro/protocol';
33
40
  import { UIEvent as UIEvent_2 } from 'react';
41
+ import { WebSocketConstructorOptions } from 'effect/socket/Socket';
34
42
  import { WorkflowControlIntent } from '@voltro/protocol';
35
43
  import { WorkflowControlReadInput } from '@voltro/protocol';
36
44
  import { WorkflowControlResult } from '@voltro/protocol';
@@ -414,7 +422,7 @@ export declare interface BuildApiRuntimeOptions {
414
422
  /**
415
423
  * The api's rpc group, as the ERASED `RpcGroup.Any`.
416
424
  *
417
- * `RpcGroup` is declared `in out` in @effect/rpc — invariant on purpose — so a
425
+ * `RpcGroup` is declared `in out` in effect/rpc — invariant on purpose — so a
418
426
  * CONCRETE group (the `appGroup` codegen emits) is not assignable to
419
427
  * `RpcGroup<Rpc.Any>`, and a boundary typed that way rejects the only value
420
428
  * anyone ever passes it. This mirrors what `ApiHandle.client` already does:
@@ -428,7 +436,7 @@ export declare interface BuildApiRuntimeOptions {
428
436
  /** How to construct a WebSocket. Web wraps `globalThis.WebSocket` with
429
437
  * tracking + a connect-timeout; RN passes a plain `globalThis.WebSocket`.
430
438
  * Injected so this module touches no environment global directly. */
431
- readonly webSocketConstructor: (url: string, protocols?: string | ReadonlyArray<string>) => globalThis.WebSocket;
439
+ readonly webSocketConstructor: (url: string, options?: Socket.WebSocketConstructorOptions) => globalThis.WebSocket;
432
440
  /**
433
441
  * Error channel owned by the logical api mount. A reconnect supervisor passes
434
442
  * the SAME instance to every transport generation so a failure emitted by the
@@ -472,6 +480,7 @@ export declare interface BuiltApiRuntime {
472
480
  }
473
481
 
474
482
  declare interface CacheEntry {
483
+ rowPatchApplier?: ReturnType<typeof createRowPatchApplier>;
475
484
  readonly key: string;
476
485
  /** First element of the keyArr — the rpc tag (e.g. 'todos.list'). Used
477
486
  * by `forTag()` so callers can patch every sub-key for a tag without
@@ -489,7 +498,7 @@ declare interface CacheEntry {
489
498
  /** Subscriber re-render callbacks. */
490
499
  subscribers: Set<() => void>;
491
500
  /** Fiber running the underlying stream. */
492
- fiber: Fiber.RuntimeFiber<unknown, unknown> | null;
501
+ fiber: Fiber.Fiber<unknown, unknown> | null;
493
502
  /** The last fiber ended because the rpc transport failed. A later socket
494
503
  * `open` re-issues active entries with their last-known-good base intact. */
495
504
  resumeAfterTransportOpen: boolean;
@@ -1015,11 +1024,11 @@ export declare interface DataTableState<Row> {
1015
1024
  export declare const decideAccess: (guards: ReadonlyArray<ManifestGuard> | undefined, subjectScopes: ReadonlyArray<string>) => AccessDecision;
1016
1025
 
1017
1026
  /**
1018
- * Walk a ParseError's issue tree into structured, PATH-PRESERVING issues.
1027
+ * Walk a schema failure's issue tree into structured, PATH-PRESERVING issues.
1019
1028
  * Every leaf keeps its full path (`address.city`, `entries.0.startsAt`) —
1020
1029
  * nothing collapses to the top-level segment.
1021
1030
  */
1022
- export declare const decodeFieldIssues: (error: ParseResult.ParseError) => ReadonlyArray<FieldIssue>;
1031
+ export declare const decodeFieldIssues: (error: Schema.SchemaError) => ReadonlyArray<FieldIssue>;
1023
1032
 
1024
1033
  /**
1025
1034
  * The descriptor a `*.deepLink.ts` file default-exports. `_tag` marks it for
@@ -1098,7 +1107,7 @@ export declare interface DefineDeepLinkConfig<Pattern extends string> {
1098
1107
  export declare const definedStores: () => ReadonlyArray<StoreHandle<never>>;
1099
1108
 
1100
1109
  /** Declare a typed analytics event. */
1101
- export declare const defineEvent: <const Name extends string, A, I>(name: Name, payload: Schema.Schema<A, I>) => EventDescriptor<Name, A>;
1110
+ export declare const defineEvent: <const Name extends string, A, I>(name: Name, payload: Schema.Codec<A, I>) => EventDescriptor<Name, A>;
1102
1111
 
1103
1112
  /** Fill in the derived capabilities. Adapters are built through this. */
1104
1113
  export declare const definePlatform: (input: PlatformAdapterInput) => PlatformAdapter;
@@ -1138,6 +1147,10 @@ export declare const defineTracking: <P = Record<string, unknown>>(name: string,
1138
1147
  */
1139
1148
  export declare const deriveEntityAdmins: (manifest: CapabilityManifest) => ReadonlyArray<EntityAdminSpec>;
1140
1149
 
1150
+ export { DEV_ACTIVITY_EVENT }
1151
+
1152
+ export { DevActivityMessage }
1153
+
1141
1154
  export declare const disableClientDiagnosticsPersistence: () => void;
1142
1155
 
1143
1156
  /**
@@ -1274,6 +1287,15 @@ declare interface EntryState<T> {
1274
1287
  /** Cached optimistic snapshot — invalidated on every state change so
1275
1288
  * `getSnapshot` returns a stable reference between mutations. */
1276
1289
  cachedSnapshot: CacheSnapshot<T> | null;
1290
+ previewPrefix?: {
1291
+ readonly base: T;
1292
+ readonly count: number;
1293
+ readonly data: T;
1294
+ };
1295
+ previewBase?: {
1296
+ readonly base: T;
1297
+ readonly eligible: boolean;
1298
+ };
1277
1299
  }
1278
1300
 
1279
1301
  /** Compares two selector results. Return true to keep the previous value. */
@@ -1299,7 +1321,7 @@ export declare interface EventDescriptor<Name extends string, A> {
1299
1321
  * `A` and break a heterogeneous catalog. The decoded type is carried by the
1300
1322
  * covariant phantom `_type` below instead, so `EventDescriptor<string,
1301
1323
  * unknown>` accepts every typed descriptor AND `track` stays typed. */
1302
- readonly payload: Schema.Schema.Any;
1324
+ readonly payload: Schema.Top;
1303
1325
  /** Phantom — never present at runtime; carries the decoded payload type for
1304
1326
  * `track`'s compile-time signature. Covariant (optional), so erasure works. */
1305
1327
  readonly _type?: A;
@@ -1428,7 +1450,7 @@ export declare type FilterKind = 'text' | 'select' | 'multi-select' | 'number-ra
1428
1450
 
1429
1451
  /** Derive the filter controls from a query's input Schema. Each filterable
1430
1452
  * input field → one FilterDescriptor. Pure. */
1431
- export declare const filtersFromSchema: (schema: Schema.Schema.Any) => ReadonlyArray<FilterDescriptor>;
1453
+ export declare const filtersFromSchema: (schema: Schema.Top) => ReadonlyArray<FilterDescriptor>;
1432
1454
 
1433
1455
  /** DOM id of the JSON script the 422 re-render embeds (survives the
1434
1456
  * `interactive:'none'` strip — it is neither `type="module"` nor `src`). */
@@ -1518,8 +1540,8 @@ export declare interface FormBinding<Input, Output> {
1518
1540
  *
1519
1541
  * `<AutoForm>` mounts one for you.
1520
1542
  */
1521
- export declare const FormBindingProvider: (props: {
1522
- readonly binding: FormBinding<never, never> | FormBinding<Record<string, unknown>, unknown>;
1543
+ export declare const FormBindingProvider: <Input extends Record<string, unknown>, Output>(props: {
1544
+ readonly binding: FormBinding<Input, Output>;
1523
1545
  readonly children?: ReactNode;
1524
1546
  }) => ReactElement;
1525
1547
 
@@ -1542,7 +1564,7 @@ export declare const FormBindingProvider: (props: {
1542
1564
  * the server rejects undeclared fields, and a hidden bookkeeping field must
1543
1565
  * not turn every no-JS submit into a validation error.
1544
1566
  */
1545
- export declare const formDataToInput: (schema: Schema.Schema.Any, entries: Iterable<FormEntry>) => Record<string, unknown>;
1567
+ export declare const formDataToInput: (schema: Schema.Top, entries: Iterable<FormEntry>) => Record<string, unknown>;
1546
1568
 
1547
1569
  /** One posted entry. File entries must be filtered out by the caller —
1548
1570
  * uploads are a declared limit of the no-JS path. */
@@ -1564,9 +1586,7 @@ export declare const formField: (meta: {
1564
1586
  * list, for a multi-reference feeding a target's `relations:`). */
1565
1587
  readonly reference?: string;
1566
1588
  }) => {
1567
- readonly jsonSchema: {
1568
- readonly "x-voltro": typeof meta;
1569
- };
1589
+ readonly voltroField: typeof meta;
1570
1590
  };
1571
1591
 
1572
1592
  /** One field, bound: value + change/blur wiring + gated error + descriptor
@@ -1693,11 +1713,27 @@ export declare interface FrameworkRuntimes {
1693
1713
  * keeps working; absent means "already connected", which is the safe reading.
1694
1714
  */
1695
1715
  readonly demand?: (apiName: string) => void;
1716
+ /**
1717
+ * One read through an api's client — the browser half of a loader's
1718
+ * `ctx.query`. Supplied by the host that builds the rpc runtime
1719
+ * (`VoltroRuntimeProvider`), not by this context: the read reaches the rpc
1720
+ * client and with it the Effect runtime, and an app that mounts no api must
1721
+ * not load either just because its router can ask. Absent → `ctx.query` is
1722
+ * `undefined` in the browser, as it is for an app without apis.
1723
+ */
1724
+ readonly queryOnce?: QueryOnce;
1725
+ /**
1726
+ * Resolves once the rpc runtime behind these apis is loaded. A host that
1727
+ * loads it on demand (the web boot keeps it out of an app's first load and
1728
+ * fetches it with the first route that reads data) supplies it; absent means
1729
+ * the runtime is already there.
1730
+ */
1731
+ readonly ready?: () => Promise<void>;
1696
1732
  }
1697
1733
 
1698
1734
  export declare const FrameworkRuntimesContext: Context<FrameworkRuntimes | null>;
1699
1735
 
1700
- export declare const FrameworkRuntimesProvider: ({ apis, children, demand, }: FrameworkRuntimesProviderProps) => ReactNode;
1736
+ export declare const FrameworkRuntimesProvider: ({ apis, children, demand, queryOnce, }: FrameworkRuntimesProviderProps) => ReactNode;
1701
1737
 
1702
1738
  export declare interface FrameworkRuntimesProviderProps {
1703
1739
  readonly apis: ReadonlyMap<string, ApiHandle>;
@@ -1707,6 +1743,9 @@ export declare interface FrameworkRuntimesProviderProps {
1707
1743
  * `web.api.connect: 'lazy'`; a foreign host may omit it, which reads as
1708
1744
  * "already connected". */
1709
1745
  readonly demand?: (apiName: string) => void;
1746
+ /** Passed straight through to the context for loader reads in the browser —
1747
+ * see `FrameworkRuntimes.queryOnce`. The web boot supplies `queryOnce`. */
1748
+ readonly queryOnce?: QueryOnce;
1710
1749
  }
1711
1750
 
1712
1751
  /** One browser-safe key per logical mutation, stable across its resends. */
@@ -1858,6 +1897,14 @@ export declare const isUnauthenticated: (error: unknown) => boolean;
1858
1897
  */
1859
1898
  export declare const isUnresolvedApi: (handle: ApiHandle) => boolean;
1860
1899
 
1900
+ export { JsonSchemaDocument }
1901
+
1902
+ export { jsonSchemaDocumentOf }
1903
+
1904
+ export { jsonSchemaOf }
1905
+
1906
+ export { JsonSchemaOptions }
1907
+
1861
1908
  /** Foreground/background transitions — `AppState` on React Native,
1862
1909
  * `visibilitychange` in a browser, window focus in a desktop shell. */
1863
1910
  export declare interface LifecycleSource {
@@ -1906,6 +1953,8 @@ export declare interface LocalQueryOptions<Row> {
1906
1953
 
1907
1954
  export declare const makePreloadSeedBag: () => PreloadSeedBag;
1908
1955
 
1956
+ /* Excluded from this release type: makeProtocolOpenRecovery */
1957
+
1909
1958
  export declare const makeStoreSeedBag: () => StoreSeedBag;
1910
1959
 
1911
1960
  /**
@@ -2154,6 +2203,8 @@ declare interface OptimisticPatch<T = unknown> {
2154
2203
  /** A successful write stays previewed until a matching post-ACK primary
2155
2204
  * snapshot supersedes it. A different write's delta proves nothing. */
2156
2205
  confirmed?: boolean;
2206
+ /** Only framework-owned reducers with an unchanged input can reuse a prefix. */
2207
+ readonly canReuse?: (() => boolean) | undefined;
2157
2208
  }
2158
2209
 
2159
2210
  /**
@@ -2281,7 +2332,7 @@ export declare interface PlatformAdapter {
2281
2332
  readonly platform: PlatformInfo;
2282
2333
  readonly capabilities: PlatformCapabilities;
2283
2334
  /** The WebSocket the api runtime opens — `buildApiRuntime`'s constructor. */
2284
- readonly webSocket: (url: string, protocols?: string | ReadonlyArray<string>) => WebSocket;
2335
+ readonly webSocket: (url: string, options?: Socket.WebSocketConstructorOptions) => WebSocket;
2285
2336
  /** Backing store for `defineStore({ persist })`; installed via `setStoreStorage`. */
2286
2337
  readonly storage: StoreStorageProvider;
2287
2338
  readonly secureStorage: TokenStore;
@@ -2427,7 +2478,7 @@ export declare interface PreviewState<Input> {
2427
2478
 
2428
2479
  /** The value a procedure's `input` schema decodes to on the client. */
2429
2480
  export declare type ProcedureInput<D> = D extends {
2430
- readonly input: infer I extends Schema.Schema.Any;
2481
+ readonly input: infer I extends Schema.Top;
2431
2482
  } ? Schema.Schema.Type<I> : never;
2432
2483
 
2433
2484
  /**
@@ -2437,9 +2488,9 @@ export declare type ProcedureInput<D> = D extends {
2437
2488
  * per-element schema is named differently in its descriptor.
2438
2489
  */
2439
2490
  export declare type ProcedureOutput<D> = D extends {
2440
- readonly output: infer O extends Schema.Schema.Any;
2491
+ readonly output: infer O extends Schema.Top;
2441
2492
  } ? Schema.Schema.Type<O> : D extends {
2442
- readonly element: infer E extends Schema.Schema.Any;
2493
+ readonly element: infer E extends Schema.Top;
2443
2494
  } ? Schema.Schema.Type<E> : never;
2444
2495
 
2445
2496
  /**
@@ -2525,6 +2576,14 @@ export declare interface QueryFiltersState<Row> {
2525
2576
  readonly error: unknown | undefined;
2526
2577
  }
2527
2578
 
2579
+ /** `queryOnce`'s shape, declared here so this module stays free of it. */
2580
+ export declare type QueryOnce = (handleRef: {
2581
+ readonly current: {
2582
+ readonly runtime: unknown;
2583
+ readonly client: unknown;
2584
+ };
2585
+ }, apiName: string, tag: string, input: Record<string, unknown> | undefined, signal?: AbortSignal) => Promise<unknown>;
2586
+
2528
2587
  /**
2529
2588
  * Resolve `tag(input)` once on the api behind `handleRef`: a query to the data
2530
2589
  * of its first snapshot, a mutation or action to its result.
@@ -2598,6 +2657,13 @@ export declare class RecoveryCoordinator {
2598
2657
  get options(): ResolvedRecoveryOptions;
2599
2658
  /** Ends on login/logout, tenant change or API disposal, not ordinary reconnect. */
2600
2659
  get subjectSignal(): AbortSignal;
2660
+ /** Hydration values belong to the initial subject only. Once identity may
2661
+ * have changed, a later generation/remount must obtain its own snapshot.
2662
+ * Ordinary transport recovery does not cross this boundary. */
2663
+ getPreloadSeedPermission: () => boolean;
2664
+ /** A whole-cache resnapshot can follow same-socket re-authentication. Its
2665
+ * replacement reads must not reuse the original server-rendered values. */
2666
+ invalidatePreloadSeeds(): void;
2601
2667
  getSnapshot: () => RecoverySnapshot;
2602
2668
  /** The SSR / hydration snapshot — see INITIAL_RECOVERY_SNAPSHOT. Stable by
2603
2669
  * reference, so both renders agree and React swaps to the live one after. */
@@ -2629,7 +2695,7 @@ export declare class RecoveryCoordinator {
2629
2695
  * Disabled is final for the current generation and refuses immediately.
2630
2696
  */
2631
2697
  reserveMutationReplay(startedAt: number): MutationReplayReservation | undefined;
2632
- waitForProtocolReady(startedAt: number): Promise<boolean>;
2698
+ waitForProtocolReady(startedAt: number, signal?: AbortSignal): Promise<boolean>;
2633
2699
  dispose(): void;
2634
2700
  }
2635
2701
 
@@ -2841,7 +2907,7 @@ export declare interface ResourceCansResult {
2841
2907
  * Non-struct schemas (a scalar input) are returned untouched — there is no
2842
2908
  * declared key set to restrict against.
2843
2909
  */
2844
- export declare const restrictToSchema: (schema: Schema.Schema.Any, input: unknown) => {
2910
+ export declare const restrictToSchema: (schema: Schema.Top, input: unknown) => {
2845
2911
  readonly input: unknown;
2846
2912
  readonly dropped: ReadonlyArray<string>;
2847
2913
  };
@@ -2931,91 +2997,91 @@ export declare const RICH_TEXT_MAX_NODES = 5000;
2931
2997
 
2932
2998
  export declare type RichTextBlock = typeof RichTextBlock_2.Type;
2933
2999
 
2934
- declare const RichTextBlock_2: Schema.Union<[Schema.Struct<{
2935
- type: Schema.Literal<["paragraph"]>;
2936
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
2937
- type: Schema.Literal<["text"]>;
2938
- text: typeof Schema.String;
2939
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3000
+ declare const RichTextBlock_2: Schema.Union<readonly [Schema.Struct<{
3001
+ readonly type: Schema.Literal<"paragraph">;
3002
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3003
+ readonly type: Schema.Literal<"text">;
3004
+ readonly text: Schema.String;
3005
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2940
3006
  }>, Schema.Struct<{
2941
- type: Schema.Literal<["link"]>;
2942
- href: Schema.filter<typeof Schema.String>;
2943
- content: Schema.Array$<Schema.Struct<{
2944
- type: Schema.Literal<["text"]>;
2945
- text: typeof Schema.String;
2946
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3007
+ readonly type: Schema.Literal<"link">;
3008
+ readonly href: Schema.String;
3009
+ readonly content: Schema.$Array<Schema.Struct<{
3010
+ readonly type: Schema.Literal<"text">;
3011
+ readonly text: Schema.String;
3012
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2947
3013
  }>>;
2948
3014
  }>]>>;
2949
3015
  }>, Schema.Struct<{
2950
- type: Schema.Literal<["heading"]>;
2951
- level: Schema.Literal<[1, 2, 3]>;
2952
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
2953
- type: Schema.Literal<["text"]>;
2954
- text: typeof Schema.String;
2955
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3016
+ readonly type: Schema.Literal<"heading">;
3017
+ readonly level: Schema.Literals<readonly [1, 2, 3]>;
3018
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3019
+ readonly type: Schema.Literal<"text">;
3020
+ readonly text: Schema.String;
3021
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2956
3022
  }>, Schema.Struct<{
2957
- type: Schema.Literal<["link"]>;
2958
- href: Schema.filter<typeof Schema.String>;
2959
- content: Schema.Array$<Schema.Struct<{
2960
- type: Schema.Literal<["text"]>;
2961
- text: typeof Schema.String;
2962
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3023
+ readonly type: Schema.Literal<"link">;
3024
+ readonly href: Schema.String;
3025
+ readonly content: Schema.$Array<Schema.Struct<{
3026
+ readonly type: Schema.Literal<"text">;
3027
+ readonly text: Schema.String;
3028
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2963
3029
  }>>;
2964
3030
  }>]>>;
2965
3031
  }>, Schema.Struct<{
2966
- type: Schema.Literal<["blockquote"]>;
2967
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
2968
- type: Schema.Literal<["text"]>;
2969
- text: typeof Schema.String;
2970
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3032
+ readonly type: Schema.Literal<"blockquote">;
3033
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3034
+ readonly type: Schema.Literal<"text">;
3035
+ readonly text: Schema.String;
3036
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2971
3037
  }>, Schema.Struct<{
2972
- type: Schema.Literal<["link"]>;
2973
- href: Schema.filter<typeof Schema.String>;
2974
- content: Schema.Array$<Schema.Struct<{
2975
- type: Schema.Literal<["text"]>;
2976
- text: typeof Schema.String;
2977
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3038
+ readonly type: Schema.Literal<"link">;
3039
+ readonly href: Schema.String;
3040
+ readonly content: Schema.$Array<Schema.Struct<{
3041
+ readonly type: Schema.Literal<"text">;
3042
+ readonly text: Schema.String;
3043
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2978
3044
  }>>;
2979
3045
  }>]>>;
2980
3046
  }>, Schema.Struct<{
2981
- type: Schema.Literal<["bulletList"]>;
2982
- content: Schema.Array$<Schema.Struct<{
2983
- type: Schema.Literal<["listItem"]>;
2984
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
2985
- type: Schema.Literal<["text"]>;
2986
- text: typeof Schema.String;
2987
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3047
+ readonly type: Schema.Literal<"bulletList">;
3048
+ readonly content: Schema.$Array<Schema.Struct<{
3049
+ readonly type: Schema.Literal<"listItem">;
3050
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3051
+ readonly type: Schema.Literal<"text">;
3052
+ readonly text: Schema.String;
3053
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2988
3054
  }>, Schema.Struct<{
2989
- type: Schema.Literal<["link"]>;
2990
- href: Schema.filter<typeof Schema.String>;
2991
- content: Schema.Array$<Schema.Struct<{
2992
- type: Schema.Literal<["text"]>;
2993
- text: typeof Schema.String;
2994
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3055
+ readonly type: Schema.Literal<"link">;
3056
+ readonly href: Schema.String;
3057
+ readonly content: Schema.$Array<Schema.Struct<{
3058
+ readonly type: Schema.Literal<"text">;
3059
+ readonly text: Schema.String;
3060
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
2995
3061
  }>>;
2996
3062
  }>]>>;
2997
3063
  }>>;
2998
3064
  }>, Schema.Struct<{
2999
- type: Schema.Literal<["orderedList"]>;
3000
- content: Schema.Array$<Schema.Struct<{
3001
- type: Schema.Literal<["listItem"]>;
3002
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3003
- type: Schema.Literal<["text"]>;
3004
- text: typeof Schema.String;
3005
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3065
+ readonly type: Schema.Literal<"orderedList">;
3066
+ readonly content: Schema.$Array<Schema.Struct<{
3067
+ readonly type: Schema.Literal<"listItem">;
3068
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3069
+ readonly type: Schema.Literal<"text">;
3070
+ readonly text: Schema.String;
3071
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3006
3072
  }>, Schema.Struct<{
3007
- type: Schema.Literal<["link"]>;
3008
- href: Schema.filter<typeof Schema.String>;
3009
- content: Schema.Array$<Schema.Struct<{
3010
- type: Schema.Literal<["text"]>;
3011
- text: typeof Schema.String;
3012
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3073
+ readonly type: Schema.Literal<"link">;
3074
+ readonly href: Schema.String;
3075
+ readonly content: Schema.$Array<Schema.Struct<{
3076
+ readonly type: Schema.Literal<"text">;
3077
+ readonly text: Schema.String;
3078
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3013
3079
  }>>;
3014
3080
  }>]>>;
3015
3081
  }>>;
3016
3082
  }>, Schema.Struct<{
3017
- type: Schema.Literal<["codeBlock"]>;
3018
- text: typeof Schema.String;
3083
+ readonly type: Schema.Literal<"codeBlock">;
3084
+ readonly text: Schema.String;
3019
3085
  }>]>;
3020
3086
 
3021
3087
  declare type RichTextBlock = typeof RichTextBlock_2.Type;
@@ -3029,199 +3095,111 @@ declare type RichTextBlock = typeof RichTextBlock_2.Type;
3029
3095
  * editor with no extra `formField({ widget })` call — and the decode that
3030
3096
  * validates the mutation input IS the sanitizing boundary (see the header).
3031
3097
  */
3032
- export declare const RichTextDocument: Schema.refine<{
3033
- readonly type: "doc";
3034
- readonly content: readonly ({
3035
- readonly type: "paragraph";
3036
- readonly content: readonly ({
3037
- readonly type: "text";
3038
- readonly text: string;
3039
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3040
- } | {
3041
- readonly type: "link";
3042
- readonly content: readonly {
3043
- readonly type: "text";
3044
- readonly text: string;
3045
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3046
- }[];
3047
- readonly href: string;
3048
- })[];
3049
- } | {
3050
- readonly type: "heading";
3051
- readonly level: 2 | 1 | 3;
3052
- readonly content: readonly ({
3053
- readonly type: "text";
3054
- readonly text: string;
3055
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3056
- } | {
3057
- readonly type: "link";
3058
- readonly content: readonly {
3059
- readonly type: "text";
3060
- readonly text: string;
3061
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3062
- }[];
3063
- readonly href: string;
3064
- })[];
3065
- } | {
3066
- readonly type: "blockquote";
3067
- readonly content: readonly ({
3068
- readonly type: "text";
3069
- readonly text: string;
3070
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3071
- } | {
3072
- readonly type: "link";
3073
- readonly content: readonly {
3074
- readonly type: "text";
3075
- readonly text: string;
3076
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3077
- }[];
3078
- readonly href: string;
3079
- })[];
3080
- } | {
3081
- readonly type: "bulletList";
3082
- readonly content: readonly {
3083
- readonly type: "listItem";
3084
- readonly content: readonly ({
3085
- readonly type: "text";
3086
- readonly text: string;
3087
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3088
- } | {
3089
- readonly type: "link";
3090
- readonly content: readonly {
3091
- readonly type: "text";
3092
- readonly text: string;
3093
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3094
- }[];
3095
- readonly href: string;
3096
- })[];
3097
- }[];
3098
- } | {
3099
- readonly type: "orderedList";
3100
- readonly content: readonly {
3101
- readonly type: "listItem";
3102
- readonly content: readonly ({
3103
- readonly type: "text";
3104
- readonly text: string;
3105
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3106
- } | {
3107
- readonly type: "link";
3108
- readonly content: readonly {
3109
- readonly type: "text";
3110
- readonly text: string;
3111
- readonly marks?: readonly ("code" | "bold" | "strike" | "italic")[] | undefined;
3112
- }[];
3113
- readonly href: string;
3114
- })[];
3115
- }[];
3116
- } | {
3117
- readonly type: "codeBlock";
3118
- readonly text: string;
3119
- })[];
3120
- }, Schema.Struct<{
3121
- type: Schema.Literal<["doc"]>;
3122
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3123
- type: Schema.Literal<["paragraph"]>;
3124
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3125
- type: Schema.Literal<["text"]>;
3126
- text: typeof Schema.String;
3127
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3098
+ export declare const RichTextDocument: Schema.Struct<{
3099
+ readonly type: Schema.Literal<"doc">;
3100
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3101
+ readonly type: Schema.Literal<"paragraph">;
3102
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3103
+ readonly type: Schema.Literal<"text">;
3104
+ readonly text: Schema.String;
3105
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3128
3106
  }>, Schema.Struct<{
3129
- type: Schema.Literal<["link"]>;
3130
- href: Schema.filter<typeof Schema.String>;
3131
- content: Schema.Array$<Schema.Struct<{
3132
- type: Schema.Literal<["text"]>;
3133
- text: typeof Schema.String;
3134
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3107
+ readonly type: Schema.Literal<"link">;
3108
+ readonly href: Schema.String;
3109
+ readonly content: Schema.$Array<Schema.Struct<{
3110
+ readonly type: Schema.Literal<"text">;
3111
+ readonly text: Schema.String;
3112
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3135
3113
  }>>;
3136
3114
  }>]>>;
3137
3115
  }>, Schema.Struct<{
3138
- type: Schema.Literal<["heading"]>;
3139
- level: Schema.Literal<[1, 2, 3]>;
3140
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3141
- type: Schema.Literal<["text"]>;
3142
- text: typeof Schema.String;
3143
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3116
+ readonly type: Schema.Literal<"heading">;
3117
+ readonly level: Schema.Literals<readonly [1, 2, 3]>;
3118
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3119
+ readonly type: Schema.Literal<"text">;
3120
+ readonly text: Schema.String;
3121
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3144
3122
  }>, Schema.Struct<{
3145
- type: Schema.Literal<["link"]>;
3146
- href: Schema.filter<typeof Schema.String>;
3147
- content: Schema.Array$<Schema.Struct<{
3148
- type: Schema.Literal<["text"]>;
3149
- text: typeof Schema.String;
3150
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3123
+ readonly type: Schema.Literal<"link">;
3124
+ readonly href: Schema.String;
3125
+ readonly content: Schema.$Array<Schema.Struct<{
3126
+ readonly type: Schema.Literal<"text">;
3127
+ readonly text: Schema.String;
3128
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3151
3129
  }>>;
3152
3130
  }>]>>;
3153
3131
  }>, Schema.Struct<{
3154
- type: Schema.Literal<["blockquote"]>;
3155
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3156
- type: Schema.Literal<["text"]>;
3157
- text: typeof Schema.String;
3158
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3132
+ readonly type: Schema.Literal<"blockquote">;
3133
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3134
+ readonly type: Schema.Literal<"text">;
3135
+ readonly text: Schema.String;
3136
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3159
3137
  }>, Schema.Struct<{
3160
- type: Schema.Literal<["link"]>;
3161
- href: Schema.filter<typeof Schema.String>;
3162
- content: Schema.Array$<Schema.Struct<{
3163
- type: Schema.Literal<["text"]>;
3164
- text: typeof Schema.String;
3165
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3138
+ readonly type: Schema.Literal<"link">;
3139
+ readonly href: Schema.String;
3140
+ readonly content: Schema.$Array<Schema.Struct<{
3141
+ readonly type: Schema.Literal<"text">;
3142
+ readonly text: Schema.String;
3143
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3166
3144
  }>>;
3167
3145
  }>]>>;
3168
3146
  }>, Schema.Struct<{
3169
- type: Schema.Literal<["bulletList"]>;
3170
- content: Schema.Array$<Schema.Struct<{
3171
- type: Schema.Literal<["listItem"]>;
3172
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3173
- type: Schema.Literal<["text"]>;
3174
- text: typeof Schema.String;
3175
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3147
+ readonly type: Schema.Literal<"bulletList">;
3148
+ readonly content: Schema.$Array<Schema.Struct<{
3149
+ readonly type: Schema.Literal<"listItem">;
3150
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3151
+ readonly type: Schema.Literal<"text">;
3152
+ readonly text: Schema.String;
3153
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3176
3154
  }>, Schema.Struct<{
3177
- type: Schema.Literal<["link"]>;
3178
- href: Schema.filter<typeof Schema.String>;
3179
- content: Schema.Array$<Schema.Struct<{
3180
- type: Schema.Literal<["text"]>;
3181
- text: typeof Schema.String;
3182
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3155
+ readonly type: Schema.Literal<"link">;
3156
+ readonly href: Schema.String;
3157
+ readonly content: Schema.$Array<Schema.Struct<{
3158
+ readonly type: Schema.Literal<"text">;
3159
+ readonly text: Schema.String;
3160
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3183
3161
  }>>;
3184
3162
  }>]>>;
3185
3163
  }>>;
3186
3164
  }>, Schema.Struct<{
3187
- type: Schema.Literal<["orderedList"]>;
3188
- content: Schema.Array$<Schema.Struct<{
3189
- type: Schema.Literal<["listItem"]>;
3190
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3191
- type: Schema.Literal<["text"]>;
3192
- text: typeof Schema.String;
3193
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3165
+ readonly type: Schema.Literal<"orderedList">;
3166
+ readonly content: Schema.$Array<Schema.Struct<{
3167
+ readonly type: Schema.Literal<"listItem">;
3168
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3169
+ readonly type: Schema.Literal<"text">;
3170
+ readonly text: Schema.String;
3171
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3194
3172
  }>, Schema.Struct<{
3195
- type: Schema.Literal<["link"]>;
3196
- href: Schema.filter<typeof Schema.String>;
3197
- content: Schema.Array$<Schema.Struct<{
3198
- type: Schema.Literal<["text"]>;
3199
- text: typeof Schema.String;
3200
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3173
+ readonly type: Schema.Literal<"link">;
3174
+ readonly href: Schema.String;
3175
+ readonly content: Schema.$Array<Schema.Struct<{
3176
+ readonly type: Schema.Literal<"text">;
3177
+ readonly text: Schema.String;
3178
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3201
3179
  }>>;
3202
3180
  }>]>>;
3203
3181
  }>>;
3204
3182
  }>, Schema.Struct<{
3205
- type: Schema.Literal<["codeBlock"]>;
3206
- text: typeof Schema.String;
3183
+ readonly type: Schema.Literal<"codeBlock">;
3184
+ readonly text: Schema.String;
3207
3185
  }>]>>;
3208
- }>>;
3186
+ }>;
3209
3187
 
3210
3188
  export declare type RichTextDocument = typeof RichTextDocument.Type;
3211
3189
 
3212
3190
  export declare type RichTextInline = typeof RichTextInline_2.Type;
3213
3191
 
3214
- declare const RichTextInline_2: Schema.Union<[Schema.Struct<{
3215
- type: Schema.Literal<["text"]>;
3216
- text: typeof Schema.String;
3217
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3192
+ declare const RichTextInline_2: Schema.Union<readonly [Schema.Struct<{
3193
+ readonly type: Schema.Literal<"text">;
3194
+ readonly text: Schema.String;
3195
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3218
3196
  }>, Schema.Struct<{
3219
- type: Schema.Literal<["link"]>;
3220
- href: Schema.filter<typeof Schema.String>;
3221
- content: Schema.Array$<Schema.Struct<{
3222
- type: Schema.Literal<["text"]>;
3223
- text: typeof Schema.String;
3224
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3197
+ readonly type: Schema.Literal<"link">;
3198
+ readonly href: Schema.String;
3199
+ readonly content: Schema.$Array<Schema.Struct<{
3200
+ readonly type: Schema.Literal<"text">;
3201
+ readonly text: Schema.String;
3202
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3225
3203
  }>>;
3226
3204
  }>]>;
3227
3205
 
@@ -3230,18 +3208,18 @@ declare type RichTextInline = typeof RichTextInline_2.Type;
3230
3208
  export declare type RichTextListItem = typeof RichTextListItem_2.Type;
3231
3209
 
3232
3210
  declare const RichTextListItem_2: Schema.Struct<{
3233
- type: Schema.Literal<["listItem"]>;
3234
- content: Schema.Array$<Schema.Union<[Schema.Struct<{
3235
- type: Schema.Literal<["text"]>;
3236
- text: typeof Schema.String;
3237
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3211
+ readonly type: Schema.Literal<"listItem">;
3212
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3213
+ readonly type: Schema.Literal<"text">;
3214
+ readonly text: Schema.String;
3215
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3238
3216
  }>, Schema.Struct<{
3239
- type: Schema.Literal<["link"]>;
3240
- href: Schema.filter<typeof Schema.String>;
3241
- content: Schema.Array$<Schema.Struct<{
3242
- type: Schema.Literal<["text"]>;
3243
- text: typeof Schema.String;
3244
- marks: Schema.optional<Schema.Array$<Schema.Literal<["bold", "italic", "code", "strike"]>>>;
3217
+ readonly type: Schema.Literal<"link">;
3218
+ readonly href: Schema.String;
3219
+ readonly content: Schema.$Array<Schema.Struct<{
3220
+ readonly type: Schema.Literal<"text">;
3221
+ readonly text: Schema.String;
3222
+ readonly marks: Schema.optional<Schema.$Array<Schema.Literals<readonly ["bold", "italic", "code", "strike"]>>>;
3245
3223
  }>>;
3246
3224
  }>]>>;
3247
3225
  }>;
@@ -3283,7 +3261,7 @@ export declare interface RpcError {
3283
3261
  * server may have committed before the response disappeared. */
3284
3262
  readonly outcome?: RpcCallOutcome;
3285
3263
  /** Trace id of the CLIENT call span. When the server accepted the request,
3286
- * @effect/rpc propagates this same id into its span. A transport failure may
3264
+ * effect/rpc propagates this same id into its span. A transport failure may
3287
3265
  * happen before that, so the id is not proof that server logs exist. Present
3288
3266
  * only when a client span was active. */
3289
3267
  readonly traceId?: string;
@@ -3393,14 +3371,14 @@ export declare interface RunSequenceOptions {
3393
3371
  * its properties (same descriptor shape as `schemaToFields`, reused for
3394
3372
  * `<DataTable>` cells). Returns `[]` if the output isn't an array of objects.
3395
3373
  */
3396
- export declare const schemaToColumns: (schema: Schema.Schema.Any) => ReadonlyArray<FieldDescriptor>;
3374
+ export declare const schemaToColumns: (schema: Schema.Top) => ReadonlyArray<FieldDescriptor>;
3397
3375
 
3398
3376
  /**
3399
3377
  * Derive the ordered field list for a `Schema.Struct` input. Returns `[]` for a
3400
3378
  * schema with no object properties (a scalar, `Schema.Void`, or anything
3401
3379
  * `JSONSchema.make` cannot represent).
3402
3380
  */
3403
- export declare const schemaToFields: (schema: Schema.Schema.Any) => ReadonlyArray<FieldDescriptor>;
3381
+ export declare const schemaToFields: (schema: Schema.Top) => ReadonlyArray<FieldDescriptor>;
3404
3382
 
3405
3383
  /**
3406
3384
  * Seed a subscription's first value for THIS request's hydration. Call it on the
@@ -3855,10 +3833,18 @@ export declare const subscribeStoreHistory: (listener: Listener) => (() => void)
3855
3833
 
3856
3834
  export declare class SubscriptionCache {
3857
3835
  private readonly entries;
3836
+ private readonly entriesByTable;
3837
+ private readonly entriesByTag;
3838
+ private readonly entriesByMutation;
3839
+ private readonly patchMemberships;
3840
+ private readonly entryOrder;
3841
+ private orderedMemberships;
3842
+ private nextEntryOrder;
3858
3843
  /** Standing optimistic intents, by mutation id — see `autoApply`. */
3859
3844
  private readonly intents;
3860
3845
  private readonly tableRows;
3861
3846
  private readonly anyListeners;
3847
+ private readonly tableListeners;
3862
3848
  private readonly refreshing;
3863
3849
  /**
3864
3850
  * Same-subject runtime replacement. A mutation may settle against the cache
@@ -4114,6 +4100,16 @@ export declare class SubscriptionCache {
4114
4100
  private createStub;
4115
4101
  private freshState;
4116
4102
  private startFiber;
4103
+ private sourceTables;
4104
+ private addIndex;
4105
+ private removeIndex;
4106
+ private orderedEntries;
4107
+ private indexSource;
4108
+ private appendPatch;
4109
+ private replacePatches;
4110
+ private indexPatches;
4111
+ private registerEntry;
4112
+ private unindexEntry;
4117
4113
  private invalidate;
4118
4114
  /**
4119
4115
  * Every row of `table` this cache holds — the client's local replica of the
@@ -4124,6 +4120,8 @@ export declare class SubscriptionCache {
4124
4120
  * for `useSyncExternalStore`.
4125
4121
  */
4126
4122
  rowsOf(table: string): ReadonlyArray<Readonly<Record<string, unknown>>>;
4123
+ /** Subscribe to cache changes affecting this source table only. */
4124
+ subscribeTable(table: string, listener: () => void): () => void;
4127
4125
  /** Call `listener` after any entry changed. Returns the unsubscribe. */
4128
4126
  subscribeAny(listener: () => void): () => void;
4129
4127
  private getSnapshot;
@@ -4244,11 +4242,10 @@ export declare interface SubscriptionMeta {
4244
4242
  readonly revision: number;
4245
4243
  /** Wall-clock ms when the most recent delta was emitted; undefined for snapshots / optimistic. */
4246
4244
  readonly emittedAt: number | undefined;
4247
- /** Stream error — surfaced ONLY when no snapshot has ever arrived (a cold-start
4248
- * failure). A failure AFTER data arrived deliberately does NOT replace good
4249
- * data with an error: a transient ws hiccup would otherwise blank a working
4250
- * screen. Those still reach the api's error bus — subscribe with
4251
- * `useOnRpcError` for connection-level UX.
4245
+ /** Subscription refusal or terminal non-transport stream failure.
4246
+ * After a snapshot, data remains available alongside the error. Check it
4247
+ * before presenting retained data as current/live. Transport interruptions
4248
+ * preserve delivered data and report through recovery health/error buses.
4252
4249
  *
4253
4250
  * A cold-start failure is its own STATE: `loading` is `false`, `failed` is
4254
4251
  * `true`, and this field is non-optional there (see
@@ -4680,6 +4677,9 @@ export declare interface UndoLogEntry {
4680
4677
  readonly createdAt: string;
4681
4678
  }
4682
4679
 
4680
+ /** The error for an api name nothing mounted — one wording for every host. */
4681
+ export declare const unknownApiError: (name: string, known: Iterable<string>) => Error;
4682
+
4683
4683
  /** How the running code gets replaced: a service worker, a desktop updater,
4684
4684
  * an OTA bundle. `apply` is the restart/reload; callers gate it on an empty
4685
4685
  * outbox. */
@@ -4736,6 +4736,8 @@ export declare interface UploadHandle {
4736
4736
  export declare interface UploadOptions {
4737
4737
  /** `'private'` (default) or `'public'`. Public objects get a cacheable URL. */
4738
4738
  readonly visibility?: 'public' | 'private';
4739
+ /** Requested private-file policy. The server must authorize it before issuing a ticket. */
4740
+ readonly access?: StorageAccessPolicy;
4739
4741
  /** Fixed logical key (e.g. `avatars/<userId>.png`); else content-addressed. */
4740
4742
  readonly key?: string;
4741
4743
  /** App metadata stored on the ref (so no parallel `assets` table is needed). */
@@ -4743,6 +4745,10 @@ export declare interface UploadOptions {
4743
4745
  readonly tags?: ReadonlyArray<string>;
4744
4746
  readonly alt?: string;
4745
4747
  readonly caption?: string;
4748
+ /** Stable identity for one through-app transfer. Reuse unchanged bytes and metadata
4749
+ * after an uncertain acknowledgement. Requires native operation storage.
4750
+ * uploadMany accepts an explicit identity only when it contains one file. */
4751
+ readonly operationId?: string;
4746
4752
  /** rpc tag of the ticket-minting action. Default `'storage.mintUploadTicket'`
4747
4753
  * — override for a namespaced storage plugin instance. */
4748
4754
  readonly mintTag?: string;
@@ -4921,7 +4927,7 @@ export declare const useDerived: <S extends Record<string, unknown>, T>(sources:
4921
4927
  * at this call site, and the `key` must structurally match the descriptor's key
4922
4928
  * schema, so a typo cannot produce a subscription that silently never fires.
4923
4929
  */
4924
- export declare function useEvent<Name extends string, Key extends Schema.Schema.Any, Payload extends Schema.Schema.Any>(descriptor: EventDescriptor_2<Name, Key, Payload>, key: Schema.Schema.Type<Key> | null, handler: (payload: Schema.Schema.Type<Payload>) => void, options?: UseEventOptions): EventState;
4930
+ export declare function useEvent<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor_2<Name, Key, Payload>, key: Schema.Schema.Type<Key> | null, handler: (payload: Schema.Schema.Type<Payload>) => void, options?: UseEventOptions): EventState;
4925
4931
 
4926
4932
  export declare interface UseEventOptions {
4927
4933
  /**
@@ -4970,7 +4976,7 @@ export declare interface UseFormBindingOptions<Input> {
4970
4976
  * the mounted client descriptor (`descriptors[tag].input`, the capability
4971
4977
  * map — innovation/06). Pass it explicitly to override, or when the
4972
4978
  * descriptor isn't on the client. */
4973
- readonly schema?: Schema.Schema.Any;
4979
+ readonly schema?: Schema.Top;
4974
4980
  /** Initial field values. */
4975
4981
  readonly defaults?: Partial<Input>;
4976
4982
  /** The failed no-JS POST's payload for THIS form (`useFormFlash` from
@@ -5244,7 +5250,7 @@ export declare const useResumableAgentStream: <E = unknown>(apiName: string, rpc
5244
5250
  /** A schema-owned form for actions, parent plans, and local saves. It uses the
5245
5251
  * same validation/field engine without connecting to an API or inventing a tag. */
5246
5252
  export declare const useSchemaFormBinding: <Input extends Record<string, unknown>, Encoded, Output>(options: Omit<UseFormBindingOptions<Input>, "schema" | "onSubmit"> & {
5247
- readonly schema: Schema.Schema<Input, Encoded>;
5253
+ readonly schema: Schema.Codec<Input, Encoded>;
5248
5254
  readonly onSubmit: (input: Input) => Output | Promise<Output>;
5249
5255
  }) => FormBinding<Input, Output>;
5250
5256
 
@@ -5422,7 +5428,7 @@ export declare const validateEventPayload: (descriptor: EventDescriptor<string,
5422
5428
  * pass. Client-side validation is non-authoritative UX — the server
5423
5429
  * re-validates the same schema on the mutation.
5424
5430
  */
5425
- export declare const validateFields: (schema: Schema.Schema.Any, values: unknown, options?: ValidateOptions) => ValidationResult;
5431
+ export declare const validateFields: (schema: Schema.Top, values: unknown, options?: ValidateOptions) => ValidationResult;
5426
5432
 
5427
5433
  export declare interface ValidateOptions {
5428
5434
  /** BCP-47-ish tag; only the primary subtag is read. Default: the document's
@@ -5469,6 +5475,8 @@ export declare const validationStatus: (args: {
5469
5475
  readonly skipEmpty?: boolean;
5470
5476
  }) => AsyncValidationResult;
5471
5477
 
5478
+ export { WebSocketConstructorOptions }
5479
+
5472
5480
  /** The default widget kinds the framework can render from a schema. `'custom'`
5473
5481
  * means "no default widget" — the field needs a render-prop (a nested object,
5474
5482
  * an array of objects, or a multi-branch union). Mirrors innovation/01's set. */
@@ -5533,8 +5541,6 @@ export declare type WithOptimistic<T> = T extends ReadonlyArray<infer Element> ?
5533
5541
  readonly optimistic?: boolean;
5534
5542
  } : Element> : T;
5535
5543
 
5536
- /* Excluded from this release type: withProtocolOpenRecovery */
5537
-
5538
5544
  export declare interface WorkflowClientMessages {
5539
5545
  readonly signals?: Readonly<Record<string, unknown>>;
5540
5546
  readonly updates?: Readonly<Record<string, {